This is the mail archive of the gdb-patches@sourceware.cygnus.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Patch for RDI target code to allow user-specified devices


On Mon, Feb 21, 2000 at 05:56:13PM -0500, Fernando Nasser wrote:

> > 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:".

Oops.  I only intended to change the behavior when you specified s= or
p=, the behavior when you just specified a device name wasn't supposed
to change.  Thanks for catching that.

> 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?)

Sure -- that's what I had intended.

> > 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.

I don't know if ARM is maintaining this code or not.  

> 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.

It doesn't really matter much to me.  I have a hard time reading code
indented in the sytle of the original ARM code, but when I'm done
messing with it, I can re-indent it to match the rest of the file.

> 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.

Rightly so.

> 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.

I'll fix the "if" problem and re-indent it to match the rest of the
file.

> 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.

So far the patches haven't overlapped, so it shouldn't be a bit deal.
One of these days I'm going to try to figure out why the current
snapshot isn't working for me.

BTW, the parallel port code does seem to work, in case anybody was
wondering.  :)

--
Grant Edwards
grante@visi.com

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]