[patch] Watchpoints: support for thread <thread_num> parameters

Luis Machado luisgpm@linux.vnet.ibm.com
Thu Aug 16 21:03:00 GMT 2007


Hi,

This is a first try on the implementation of the additional "thread
<thread_num>" parameter for the watchpoint command in order to make GDB
stop only on specific threads when a watchpoint is triggered.

Basically i started parsing the arguments backwards, trying to locate
tokens that identify a "thread <thread_num>" command. After that i hand
all the left parameters over to the default expression parser.

Differently than the breakpoint command, the "thread <thread_num>"
parameter for watchpoints is located at the end of the argument list due
to ambiguities that would arise when putting that parameter in between
expressions, since those could contain strings that would require a more
complex parser with context capabilities, thus being able to figure out
what is part of an expression and what is not.

What do you think? Looking forward to ideas and suggestions to improve
it. We could change the location of the "thread <thread_num>" parameter
for breakpoints as well, in order to keep it standard.

Best regards,

-- 
Luis Machado
Software Engineer 
IBM Linux Technology Center
e-mail: luisgpm@linux.vnet.ibm.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: watch_thread_param.diff
Type: text/x-patch
Size: 3022 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20070816/bf516e52/attachment.bin>


More information about the Gdb-patches mailing list