Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@adacore.com>
To: Paul Pluzhnikov <ppluzhnikov@google.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFC] Interaction between HW watchpoints and 'set var'.
Date: Wed, 25 Nov 2009 18:06:00 -0000	[thread overview]
Message-ID: <20091125180625.GG26004@adacore.com> (raw)
In-Reply-To: <20091125175149.BB89D76D99@ppluzhnikov.mtv.corp.google.com>

Interesting.  One thing that you don't see is the behavior when using
software watchpoints.  My guess is that you'd see the debugger stop
immediately at the first resume because the value looks new to GDB
as well.

> Now, I can fix that by installing deprecated_memory_changed_hook,
> but the deprecated part gives me pause.
> 
> Should I create a new memory_changed observer and remove
> deprecated_memory_changed_hook instead?

After reviewing the history of that hook, I think it would be a desired
cleanup to have a memory_changed observer. Once you have the observer,
you'll want to (possibly) re-evaluate the watchpoint value every time
the memory changes. Not sure how to best implement that, but one issue
you might face is when the user is updating the variable value while
it being out of scope...  If you manipulate memory blocks exclusively,
then it shouldn't be a problem, but if you re-evaluate using the
watchpoint expression, it might be.

-- 
Joel


      reply	other threads:[~2009-11-25 18:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-25 17:52 Paul Pluzhnikov
2009-11-25 18:06 ` Joel Brobecker [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=20091125180625.GG26004@adacore.com \
    --to=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=ppluzhnikov@google.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