This is the mail archive of the
mailing list for the GDB project.
Re: [RFA] Fix breakpoint condition that use member variables.
On Saturday 22 March 2008 15:55:42 Eli Zaretskii wrote:
> > From: Vladimir Prus <firstname.lastname@example.org>
> > Date: Sat, 22 Mar 2008 15:36:06 +0300
> > Cc: email@example.com
> > > What will happen after your patch if there's also a variable i_
> > > in the selected frame?
> > The i_ in the breakpoint condition will be associated with the
> > member variable, not with the variable with selected frame.
> 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?
The current behaviour was around for some time, and my patch only
fixes one corner case that is not consistent with the existing
To answer your question -- I'm not sure. I think it would be
wrong for parse_exp_1 -- which is passed explicit block, to
go around looking at other blocks it was not asked for. We probably
can get block of selected frame, call parse_exp_1 again, in that block,
and then walk over two parse results, reporting variables which are
bound to different blocks. This sounds like some
substantial amount of work, though.