What does gdb stub need for thread aware debugging on embedded system?
Michael Snyder
msnyder@specifix.com
Mon Jun 16 00:20:00 GMT 2008
On Mon, 2008-06-16 at 12:09 +1200, John Carter wrote:
> I'm looking to get thread aware debugging running on our "sparc-alike"
> Leon II processor.
>
> Unlike the usual sparc stub, I cannot get thread information from
> Solaris as we're not running solaris on this device.
>
> If I understand things correctly, getting gdb working should just be a
> matter of tying gdb/sparc-stub.c to our serial ports by defining
> extern void putDebugChar(); /* write a single character */
> extern int getDebugChar(); /* read and return a single char */
>
> Grepping through that code the word "thread" doesn't occur.
>
> What I'm missing is how does gdb get information about threads from
> the devices OS to gdb running on the desktop.
>
> Any pointers to the right bit of documentation / code would be most
> welcome.
At the time that that code was written, threads were very far from
the minds of people who wrote remote gdb stubs!
Look at gdbserver -- it has support for threads.
More information about the Gdb
mailing list