Multi-threaded debugging within GDB & eCOS
Alex Schuilenburg
alexs@cygnus.co.uk
Wed Sep 5 00:12:00 GMT 2001
Could someone describe how gdb would handle the following situation in
debugging multiple threads using gdb (particularly on eCOS)? Has anyone
thought of this scenario before?
1) gdb is tracking thread A, which claims a system mutex.
2) Either a context switch occurs or the user suspends thread A and
switches to debugging thread B (which itself is suspended).
3) While stepping over fn calls within B, the code attempts to claim
the mutex already owned by A. Hence B will never return from the call
to the next temporary breakpoint until A is resumed and releases the
mutex.
Will gdb lock up? Is there any mechanisim to allow gdb to detect/catch this
scenario and report back to the user what has happened?
I have some idea on how this could be handled (having written a gdb/debug
type debugger for a multi-threaded RTOS) but would like to know the
specifics within eCOS/gdb.
-- Alex
More information about the Gdb
mailing list