Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* Watchpoints stopping GDB on specific threads
@ 2007-08-14 16:21 Luis Machado
  2007-08-14 16:42 ` Daniel Jacobowitz
  2007-08-14 19:41 ` Eli Zaretskii
  0 siblings, 2 replies; 6+ messages in thread
From: Luis Machado @ 2007-08-14 16:21 UTC (permalink / raw)
  To: gdb

Folks,

GDB currently has support for conditional breakpoint stops on specific
threads, by issuing the command "break <location> thread <id>".

I'm looking forward to have the same functionality for watchpoints. So
whenever GDB detects a watchpoint trigger, it would verify the current
thread and would stop only if the thread matches the ID we provided in a
command like "watch <address> thread <id>". if no ID is provided, GDB
would stop at every thread as usual (assuming a threaded watchpoint
support).

This is useful to conduct debugging sessions on applications with a
great number of threads, being able to inspect just the thread we're
interested in. It would also take advantage of the upcomming threaded
watchpoint support, hopefully.

At a first glance, i'd need to work in a different way than the
breakpoint case, because the entire watchpoint expression is handled by
a expression parser. It automatically processes the "thread <id>"
parameter and of course gives an error because that's not recognized. Do
you have any idea on how this could be solved in a clever way? We could
start parsing the expression from the end, and try to locate the "thread
<id>" parameter, and then hand over the remaining parameters to the
expression parser. What do you think?

Best regards,

-- 
Luis Machado
Software Engineer 
IBM Linux Technology Center
LoP Toolchain/Debuggers' team
Phone: +55 19-2132-2218
T/L: 839-2218
e-mail: luisgpm@vnet.linux.ibm.com


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2007-08-15  3:06 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-14 16:21 Watchpoints stopping GDB on specific threads Luis Machado
2007-08-14 16:42 ` Daniel Jacobowitz
2007-08-14 19:41 ` Eli Zaretskii
2007-08-14 19:47   ` Daniel Jacobowitz
2007-08-14 20:19   ` Luis Machado
2007-08-15  3:06     ` Eli Zaretskii

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox