Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Luis Machado <luisgpm@linux.vnet.ibm.com>
To: gdb@sourceware.org
Subject: Watchpoints stopping GDB on specific threads
Date: Tue, 14 Aug 2007 16:21:00 -0000	[thread overview]
Message-ID: <1187108458.4388.14.camel@localhost> (raw)

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


             reply	other threads:[~2007-08-14 16:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-14 16:21 Luis Machado [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1187108458.4388.14.camel@localhost \
    --to=luisgpm@linux.vnet.ibm.com \
    --cc=gdb@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox