Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Michael Snyder <msnyder@specifix.com>
To: Jim Blandy <jimb@codesourcery.com>
Cc: Vladimir Prus <ghost@cs.msu.su>, gdb-patches@sources.redhat.com
Subject: Re: Variable identification
Date: Sat, 01 Dec 2007 01:47:00 -0000	[thread overview]
Message-ID: <1196472874.2501.187.camel@localhost.localdomain> (raw)
In-Reply-To: <m3oddbtcrt.fsf@codesourcery.com>

On Fri, 2007-11-30 at 17:38 -0800, Jim Blandy wrote:
> Michael Snyder <msnyder at specifix.com> writes:
> > On Thu, 2007-11-29 at 22:02 +0300, Vladimir Prus wrote:
> >> Jim Blandy wrote:
> >> 
> >> >> This is probably good behaviour, indeed. Or maybe we should not
> >> >> disable watchpoint, but mark it as pending, in the same sense of
> >> >> "user wanted it to be enabled, but it won't trigger until a shared
> >> >> lib is loaded" that is used for ordinary watchpoints.
> >> > 
> >> > I think so, too.  I guess the key observation is that, while it's not
> >> > meaningful to talk about a particular local variable "coming back
> >> > alive", since each function call creates a distinct set of local
> >> > variables, and you can have recursion, etc., it is meaningful to talk
> >> > about a shared library being reloaded, and it's intuitive to identify
> >> > the 'X' from the first loading with the 'X' in the second loading,
> >> > even if they're at different addresses.
> >> 
> >> Yes. I now recall this is more general problem with identification of
> >> variables in GDB. Say, you're in function, and you have local variable
> >> 'foo'. In GUI, you do something with 'foo' -- set display format to
> >> hex, expand it, and so on. It's highly desirable to keep this
> >> information for the next run of program, or even next run of the GUI --
> >> even if variable is local, it's not likely that the display properties
> >> user wants depend on frame.
> >> 
> >> Unfortunately, there's no way to do that.
> >
> > I haven't followed the discussion closely, but
> > shouldn't it be up to the GUI to keep such persistant
> > info?  It's nothing to do with gdb, really.  It's the
> > GUI's state.
> 
> These questions all affect how watchpoints behave in the CLI as well.

Right, with the CLI being a special case of "the GUI" -- one
in which we (gdb maintainers) have control of everything.

GDB can keep track of the CLI "state", but other GUI 
should keep track of their own state.




  reply	other threads:[~2007-12-01  1:47 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-20 17:14 [RFA] Don't reset watchpoint block on solib load Vladimir Prus
2007-11-27 23:00 ` Jim Blandy
2007-11-28 15:59   ` Vladimir Prus
2007-11-28 16:23     ` Vladimir Prus
2007-11-28 19:46     ` Jim Blandy
2007-11-28 20:04       ` Vladimir Prus
2007-11-28 22:37         ` Jim Blandy
2007-11-29  6:09           ` Vladimir Prus
2007-11-28 22:50         ` Jim Blandy
2007-11-28 22:18     ` Jim Blandy
2007-11-29  4:24       ` Eli Zaretskii
2007-11-29  7:04         ` Vladimir Prus
2007-11-29 18:54           ` Jim Blandy
2007-11-29 19:03             ` Variable identification (Was: [RFA] Don't reset watchpoint block on solib load.) Vladimir Prus
2007-11-30  1:22               ` Michael Snyder
2007-11-30  5:52                 ` Vladimir Prus
2007-11-30 20:53                 ` Eli Zaretskii
2007-12-01  1:39                 ` Variable identification Jim Blandy
2007-12-01  1:47                   ` Michael Snyder [this message]
2008-01-16  1:29     ` [RFA] Don't reset watchpoint block on solib load Jim Blandy
2008-01-23  9:58       ` Vladimir Prus
2008-01-29 15:23         ` Daniel Jacobowitz
2007-11-29  6:55   ` Vladimir Prus
2007-11-29 18:40     ` Jim Blandy
2007-11-29 18:45       ` Vladimir Prus

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=1196472874.2501.187.camel@localhost.localdomain \
    --to=msnyder@specifix.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=ghost@cs.msu.su \
    --cc=jimb@codesourcery.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