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]

Multi-threaded debugging within GDB & eCOS


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




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