This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] Fix breakpoint condition that use member variables.


On Saturday 22 March 2008 15:55:42 Eli Zaretskii wrote:
> > From: Vladimir Prus <vladimir@codesourcery.com>
> > Date: Sat, 22 Mar 2008 15:36:06 +0300
> > Cc: gdb-patches@sources.redhat.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 
behaviour.

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.

- Volodya


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]