Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: gdb@sourceware.org
Subject: Re: Checking if addess is on stack?
Date: Sat, 22 Apr 2006 08:06:00 -0000	[thread overview]
Message-ID: <20060420191231.GA22029@nevyn.them.org> (raw)
In-Reply-To: <uu08oul1s.fsf@gnu.org>

On Thu, Apr 20, 2006 at 10:03:11PM +0300, Eli Zaretskii wrote:
> That's one possible situation, sure.  But there are others: someone
> could be scribbling over ptr->i by inadvertently changing ptr itself.
> 
> If you think this latter situation is unlikely or uninteresting, you
> in effect say that our whole concept of watching expression values is
> wrong.

It depends what you're debugging, of course.  I'm generally debugging
"something in the list is wrong, later, in another function";
"something in this function clobbered the loop pointer" is much rarer.
That's likely to be in a register, for instance.

I think that the idea of watching expression values is useful as an
option, but if there's more than one memory location involved I can't
think when the last time I wanted the current behavior was.  And I find
it very unintuitive that "print &foo->bar; watch *$31" is not the same
as "watch foo->bar" (and that the former is so cumbersome).

But I'm not suggesting changing our behavior at this late date.

> In your example, you (the user) knew what you were after.  I was
> arguing that doing this always in a front end, like what Vladimir was
> suggesting, might not be what users expect in each particular case.

I would believe that it is more often correct, especially if the GUI is
used to set the watchpoint - if I clicked on a member of a structure and
said "watch this", I'd mean the member, not whatever expression I followed
to get that window to pop up.

-- 
Daniel Jacobowitz
CodeSourcery


  reply	other threads:[~2006-04-20 19:12 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-20 10:27 Vladimir Prus
2006-04-20 11:42 ` Eli Zaretskii
2006-04-20 11:48   ` Vladimir Prus
2006-04-20 12:21     ` Eli Zaretskii
2006-04-20 12:49       ` Vladimir Prus
2006-04-20 14:27         ` Eli Zaretskii
2006-04-20 14:39           ` Daniel Jacobowitz
2006-04-20 15:24             ` Eli Zaretskii
2006-04-20 15:32               ` Daniel Jacobowitz
2006-04-20 18:41                 ` Eli Zaretskii
2006-04-20 19:12                   ` Daniel Jacobowitz
2006-04-21 11:45                     ` Eli Zaretskii
2006-04-22  8:06                       ` Daniel Jacobowitz [this message]
2006-04-20 16:29           ` Vladimir Prus
2006-04-20 19:03             ` 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=20060420191231.GA22029@nevyn.them.org \
    --to=drow@false.org \
    --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