This is the mail archive of the
gdb-patches@sourceware.cygnus.com
mailing list for the GDB project.
Re: Patch for RDI target code to allow user-specified devices
- To: Grant Edwards <grante at visi dot com>
- Subject: Re: Patch for RDI target code to allow user-specified devices
- From: Fernando Nasser <fnasser at cygnus dot com>
- Date: Mon, 21 Feb 2000 17:56:13 -0500
- CC: gdb-patches at sourceware dot cygnus dot com
- Organization: Red Hat , Inc. - Toronto
- References: <20000221141155.A31206@visi.com>
Hi Grant, nice to see you're back.
Grant Edwards wrote:
>
> Hello,
>
> The attached patch against 4.18 sources modifies the RDI target
> unix comm code to allow users to specify any device they please
> to be used for serial and/or parallel communication with the
> target.
>
> The current routines limit the user to a certain set of devices
> (which never seems to include the one I want). I've tripped
> over this many times. With the patch applied, the target
> commands like
>
> target rdi s=/whatever/flipping/device/the/user/wants
> target rdi s=/serial/device/name,p=/parallel/device/name
>
> Will accept whatever the user specifies (I think the path is
> limited to 64 characters). After all it's _my_ computer and I
> do, in fact, know which serial port is hooked to the target!
> The fact that the ARM Ltd. code won't believe me has always
> been annoying...
>
So far so good.
However, people also like to specify:
target rdi /dev/ttyS0
and let gdb figure this is a serial device (the same applies to a parallel device).
When you cut the "if" you cut it too short, and now one is required to specify the "s:" or "p:".
If you put that back I think it is fine. You should be able to have a different device name, as long as you let gdb
know if it is a serial "s:" or parallel "p:" device -- it is the price you pay (but we cannot impose this on the ones
with standard names, right?)
> Yes, I know, the patched code uses a different indenting style
> that the rest of the file -- if this is a problem, feel free to
> re-indent it however you please. I simply can not easily grok
> the existing style.
>
Now we really got to a crossroads here. I believe the reason people were leaving the indentation alone was because we
could eventually receive a newer code from ARM and having their indentation would help scanning for the differences. We
have already changed this code a lot, and they probably did the same, so a diff would probably be useless.
We could discuss with the other interested parts a move (moving to gdb@sourceware) a possible GNU style reindentations
of the whole rdi-share directory. This would take time.
I could eventually reindent it myself, but with the size of my current todo list this will take even longer :-)
Mixing the two indentation styles gives me the creeps. I don't know what Stan and Andrew think about this but I would
guess they may also object.
The fastest way to get you patch in would be for you to keep the current indentation. In the meanwhile you could
propose a GNU reindentation of the whole thing to gdb@sourceware.
But don't worry about the possible differences from 4.18 sources with or without patches. I will take care of adjusting
that for you.
Best regards,
Fernando
--
Fernando Nasser
Red Hat - Toronto E-Mail: fnasser@cygnus.com
2323 Yonge Street, Suite #300 Tel: 416-482-2661 ext. 311
Toronto, Ontario M4P 2C9 Fax: 416-482-6299