Thread specific breakpoints
Jeremy Bennett <[email protected]>
| Newsgroups | gmane.comp.gdb.devel |
|---|---|
| Message-ID | <[email protected]> |
GDB allows breakpoints to be set that are specific to a single thread break <addr> thread <threadno> This is implemented for a remote target by using a Z0 (or Z1 for a hardware breakpoint) packet, but this is assumed to set a breakpoint that will stop any thread. In the event that any other thread hits this breakpoint, the GDB client will automatically continue it. Only when the required thread hits the breakpoint is it reported. For a real-time system, this is potentially disruptive, and with a large number of threads, inefficient. I have a RTOS with support for thread specific breakpoints. So I would like a way to pass the thread ID with the Z0/Z1 packet (and for completeness the z0/z1 packet). One way I have considered is to use the KIND argument passed with Z0/Z1 to identify the thread. Another is to extend the Z packets to allow an optional thread field. I'd welcome comments on using this approach, or suggestions of a better way. Thanks, Jeremy -- Tel: +44 (1590) 610184 Cell: +44 (7970) 676050 SkypeId: jeremybennett Email: [email protected] Web: www.embecosm.com Twitter: @embecosm