From: Daniel Jacobowitz <drow@false.org>
To: gdb-patches@sourceware.org
Subject: Re: [rfc] Allow watchpoints on inaccessible memory
Date: Tue, 21 Aug 2007 23:17:00 -0000 [thread overview]
Message-ID: <20070821231657.GA23667@caradoc.them.org> (raw)
In-Reply-To: <m3wsvo4i71.fsf@codesourcery.com>
On Tue, Aug 21, 2007 at 03:49:06PM -0700, Jim Blandy wrote:
> This change could be generalized, although I'm not sure it's worth it.
> In evaluating an expression like p->q->r->s, if p->q is an invalid
> address, we could set a hardware watchpoint on p->q. In other words,
> watching the values produced by a failing expression up to the point
> of failure would allow us to use hardware watchpoints whenever
> possible. As it stands, your patch will record NULL as that
> watchpoint's value, and single-step to watch for changes.
No, that's not true. It will find the memory references that
were un-lazied and wait for their values to change. In your example
that will be p and p->q but the value will be NULL because evaluation
didn't finish.
> A lot of this rationale was not obvious to me by a long shot; I spent
> about an hour working it all out. I think the patch needs more
> comments. If you'd like me to write them, just say the word; I like
> writing docs.
I don't understand what subtleties you've found, to be honest. The
approach is a simple extension of what was already there; I think
you're inventing some of the complexity :-) You're welcome to add
comments if you prefer though.
--
Daniel Jacobowitz
CodeSourcery
next prev parent reply other threads:[~2007-08-21 23:17 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-21 14:25 Daniel Jacobowitz
2007-08-21 16:33 ` Jim Blandy
2007-08-21 18:06 ` Daniel Jacobowitz
2007-08-21 22:49 ` Jim Blandy
2007-08-21 23:17 ` Daniel Jacobowitz [this message]
2007-08-21 19:04 ` Eli Zaretskii
2007-11-20 7:56 ` Vladimir Prus
2008-02-28 16:27 ` Daniel Jacobowitz
2008-02-29 10:11 ` Eli Zaretskii
2008-03-02 4:24 ` Daniel Jacobowitz
2008-03-02 21:09 ` Eli Zaretskii
2008-03-02 23:23 ` Daniel Jacobowitz
2008-03-03 4:27 ` Eli Zaretskii
2008-03-03 14:07 ` Daniel Jacobowitz
2008-02-29 17:54 ` Jim Blandy
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=20070821231657.GA23667@caradoc.them.org \
--to=drow@false.org \
--cc=gdb-patches@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