Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Michael Snyder <msnyder@specifix.com>
Cc: drow@false.org, vladimir@codesourcery.com,
	gdb-patches@sources.redhat.com
Subject: Re: [RFA] Fix breakpoint condition that use member variables.
Date: Mon, 24 Mar 2008 20:18:00 -0000	[thread overview]
Message-ID: <uod93g9lr.fsf@gnu.org> (raw)
In-Reply-To: <1206381927.19253.1102.camel@localhost.localdomain> (message from 	Michael Snyder on Mon, 24 Mar 2008 11:05:27 -0700)

> From: Michael Snyder <msnyder@specifix.com>
> Cc: Daniel Jacobowitz <drow@false.org>, vladimir@codesourcery.com,  gdb-patches@sources.redhat.com
> Date: Mon, 24 Mar 2008 11:05:27 -0700
> 
> On Sat, 2008-03-22 at 19:09 +0200, Eli Zaretskii wrote:
> > > Date: Sat, 22 Mar 2008 10:49:31 -0400
> > > From: Daniel Jacobowitz <drow@false.org>
> > > Cc: Vladimir Prus <vladimir@codesourcery.com>,
> > > 	gdb-patches@sources.redhat.com
> > > 
> > > On Sat, Mar 22, 2008 at 02:55:42PM +0200, Eli Zaretskii wrote:
> > > > That could surprise the user.  Is it possible to make an additional
> > > > change to look for possible other interpretations of i_ which are
> > > > currently in scope, and display a warning of some kind if such
> > > > possibilities are found?
> > > 
> > > This is how breakpoint conditions have worked as long as I can
> > > remember
> > 
> > But we could try make it better, couldn't we?
> 
> I should think that the "i_" that's chosen should be the
> one in the scope of the breakpoint, not the one that is in
> scope when the breakpoint is created.
> 
> Is that not what Vladimir is saying?

I don't know (I'm not Vladimir), but that's not *exactly* what I was
saying.  Imagine the situation where: you have the inferior stopped in
a function that lives in a module which has a variable i_ in global
scope.  You decide to place a breakpoint in some other function in the
same module, and condition it on i_.  So far so good; however,
unbeknownst to you, there's also a local variable i_ in the function
where you put the breakpoint.  How can this be unbeknownst, you ask?
easy: suppose you not really look into that function, just see its
call, and want to step through it.

IOW, the use case I was thinking of is when i_ happens to be in scope
both when you set the breakpoint _and_ when it breaks.


  reply	other threads:[~2008-03-24 20:18 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-22  9:40 Vladimir Prus
2008-03-22 12:07 ` Eli Zaretskii
2008-03-22 12:36   ` Vladimir Prus
2008-03-22 12:56     ` Eli Zaretskii
2008-03-22 13:20       ` Vladimir Prus
2008-03-22 14:49       ` Daniel Jacobowitz
2008-03-22 17:14         ` Eli Zaretskii
2008-03-24 18:05           ` Michael Snyder
2008-03-24 20:18             ` Eli Zaretskii [this message]
2008-03-24 21:04               ` Michael Snyder
2008-04-01 14:10 ` Daniel Jacobowitz
2008-04-03 12:51   ` Vladimir Prus
2008-04-03 13:33     ` Daniel Jacobowitz

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=uod93g9lr.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=drow@false.org \
    --cc=gdb-patches@sources.redhat.com \
    --cc=msnyder@specifix.com \
    --cc=vladimir@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