next up previous contents
Next: Limitations Up: Using GDB Previous: Attaching to the Target

Threads

Once attached to uCR, GDB knows about the threads of the application, can list them and can focus on any one of them at a time. Get a list of the threads with the info threads command, like so:

(uCR/i960) tar ucr /dev/cyclone0
(uCR/i960) info threads
  2 thread 0x60044d50  0x60042278 in uCR_switch ()
* 1 thread 0x60045d50  0x60042278 in uCR_switch ()
(uCR/i960)

GDB numbers threads staring with 1, and displays the thread ID as uCR knows threads. The thread marked with a * is the current thread. Switch threads with a command like thread 2. The thread handling is a normal part of GDB.

Commands that examine registers or the procedure call stack always examine those of the current thread. Also, a thread that has faulted, either because of a TRACE or an actual fault, will be described at the point where it faulted. The fault handling code, which is normally on the thread stack, is not displayed by GDB.



Stephen Williams
9/2/1997