Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: Luis Machado <luisgpm@linux.vnet.ibm.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [rfc, rfa/doc] Multi-threaded watchpoint improvements
Date: Wed, 24 Oct 2007 16:51:00 -0000	[thread overview]
Message-ID: <20071024164712.GB4025@caradoc.them.org> (raw)
In-Reply-To: <1193246520.4316.16.camel@localhost>

On Wed, Oct 24, 2007 at 02:22:00PM -0300, Luis Machado wrote:
> Hi Daniel,
> 
> This is what i get while trying to use a hardware watchpoint to monitor
> an int variable "i" that changes during a for statement (attached). Upon
> further investigation, it seems GDB is only calling
> "breakpoint_delete_event". I don't see GDB calling
> "breakpoint_create_event" anywhere except in the momment i created the
> watchpoint up there, so i presume that's the reason it's not triggering.

That's the only time it is supposed to be called; it's the event at
the creation of a breakpoint.  THe user creates it, it lives until it
is deleted.

> (gdb) watch i
> During symbol reading, incomplete CFI data; unspecified registers (e.g.,
> r0) at 0x10000738.
> breakpoint_create_event (CREATED!)
> Hardware watchpoint 2: i
> (gdb) n
> 41              res = pthread_create(&threads[i],
> (gdb)
> [New Thread 0x40000a26240 (LWP 3290)]
> breakpoint_delete_event (DELETED! After this point, no more creations.)

GDB has stopped for some reason and checked whether the watchpoint on
i is still in scope.  It thinks it isn't.  This may be an unwinder
problem.  Since the scope is gone, the watchpoint is deleted.

When you have a problem with watchpoints it's useful to remember that
watchpoints on local variables are by far the most complicated kind.
See if they still work on a global variable or a memory location.

-- 
Daniel Jacobowitz
CodeSourcery


  reply	other threads:[~2007-10-24 16:47 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-16 18:40 Daniel Jacobowitz
2007-09-22  9:03 ` Eli Zaretskii
2007-09-22 14:04   ` Daniel Jacobowitz
2007-09-22 14:13     ` Eli Zaretskii
2007-09-22 15:37       ` Daniel Jacobowitz
2007-09-22 15:46         ` Eli Zaretskii
2007-09-22 18:28           ` Daniel Jacobowitz
2007-10-01  0:20 ` Daniel Jacobowitz
2007-10-24 14:59   ` Luis Machado
2007-10-24 16:00     ` Daniel Jacobowitz
2007-10-24 16:42       ` Luis Machado
2007-10-24 16:51         ` Daniel Jacobowitz [this message]
2007-10-24 18:08           ` Luis Machado
2007-10-24 18:20             ` Daniel Jacobowitz
2008-04-16 22:57   ` Andreas Schwab
2008-04-16 23:05     ` Daniel Jacobowitz
2008-04-16 23:18       ` Andreas Schwab
2008-04-17  0:25         ` Daniel Jacobowitz
2008-04-17  9:52           ` Andreas Schwab
2008-04-17  9:59             ` Andreas Schwab
2008-04-17 10:17           ` Andreas Schwab
2008-04-17 14:53             ` Daniel Jacobowitz
2008-04-20  2:35               ` Andreas Schwab
2008-04-23 11:55                 ` Andreas Schwab
2008-04-23 19:46                   ` Eli Zaretskii
2008-05-01 19:30                   ` Daniel Jacobowitz
2008-05-01 19:50       ` Luis Machado

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=20071024164712.GB4025@caradoc.them.org \
    --to=drow@false.org \
    --cc=gdb-patches@sourceware.org \
    --cc=luisgpm@linux.vnet.ibm.com \
    /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