Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Etienne Buira via Gdb <gdb@sourceware.org>
To: Martin Simmons <qqxnjvamvxwx@dyxyl.com>
Cc: Etienne Buira <etienne.buira.lists@free.fr>, gdb@sourceware.org
Subject: Re: Feature suggestion: location conditioned watchpoint
Date: Thu, 24 Oct 2024 10:57:20 +0200	[thread overview]
Message-ID: <ZxoL8KiYhOFeCeKi@Z926fQmE5jqhFMgp6> (raw)
In-Reply-To: <jea5f02ptf.fsf@localhost>

On Sat, Oct 19, 2024 at 02:19:08PM +0100, Martin Simmons wrote:
> >>>>> On Sat, 19 Oct 2024 09:35:40 +0200, Etienne Buira via Gdb said:
> > 
> > I tried to debug memory corruption issue with gdb, using watchpoints,
> > and as the bug appeared rarely, i wish i could state "break on this
> > memloc write, if it is not this known good location".
> > 
> > I searched the docs for conditions and convenience variables, but could
> > not find anything useful.
> > 
> > Ideally, i would like to issue a command like:
> > condition WPNUM !(location path/to/myfile.c:42)
> > 
> > If there is already a way to do this, i'd like to hear about it, or
> > please consider it as feature suggestion.
> 
> You could use a condition like:
> 
> $pc != <some_address>
> 
> where <some_address> is the address of the instruction that changes the
> location.
> 
> __Martin

Hi Martin, thank you, sorry to have missed such an obvious way.

Regards.


      reply	other threads:[~2024-10-24  8:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-19  7:35 Etienne Buira via Gdb
2024-10-19 13:19 ` Martin Simmons
2024-10-24  8:57   ` Etienne Buira via Gdb [this message]

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=ZxoL8KiYhOFeCeKi@Z926fQmE5jqhFMgp6 \
    --to=gdb@sourceware.org \
    --cc=etienne.buira.lists@free.fr \
    --cc=qqxnjvamvxwx@dyxyl.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