This is the mail archive of the gdb@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: GDB and Dragonball EZ.


Stan Shebs wrote:

>    Another "small" problem is that I don't have a spare RS-232 port to
>    communicate to GDB with. I have only one on my system. I have two options,
>    as I see it. Firstly I could share the serial port between GDB and my
>    application. One problem with this approach is will make debugging the IrDA
>    part of my application more difficult. Secondly I could try and implement a
>    software UART using the handshaking lines. Currently I think this second
>    option may be better as long as a simple half duplex software UART can be
>    implemented and provide adequate communications.
> 
> The second option sounds harder to me, but mostly because it sounds like
> some ugly driver hacking.  The latest GDB sources include a mechanism
> to allow an application and GDB to share a single line when using the
> remote protocol.  Look for the function minitelnet() in remote.c.

Please don't encourage people to use that code.  Apart from being due
for a rewrite (to use the event-loop) the implementation also has
technical flaws and shouldn't be considered reliable.  The code fails to
escape the ``+'' and ``-'' characters which are used by GDB to ACK/NAK
output packets.  This can lead to race conditions where GDB incorrectly
ack's/nack's packets.  See readtty().

The output path, however, is fine.

	sorry,
		Andrew

>    Anyway what I would like to know is which parts of GDB to look at and what
>    existing drivers/stubs etc I should use as templates for modification? Are
>    DLDT drivers appropriate? Is GDB stub ("remote target") appropriate?
> 
> I would say so.  An example m68k stub is in gdb/m68k-stub.c.  It's not
> the prettiest code in the world, but note that there's not even a GPL
> on it; the expectation is that you take and modify for your own purposes.
> 
>    Please point me in the right direction I am currently lost in a sea of
>    documentation and source code with no maps!
> 
>    Note: I am currenty using ECGS 1.1.2 and have downloaded GDB 4.18
>    distribution.
> 
> GDB has evolved quite a bit since 4.18, and includes hardware
> breakpoint ("Z packet") and the minitelnet features that you probably
> want to use.  You can get a copy of the latest sources from
> sourceware.cygnus.com/gdb.  Also check out the user's manuals and the
> internals manuals (in gdb/doc), we've been adding to them recently.
> 
>                                                                 Stan

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