MI query questions
Nick Roberts
nickrob@snap.net.nz
Thu Jun 1 00:58:00 GMT 2006
> > > > I suggest, for the moment, at least, that we make MI select "[1] all"
> > > > automatically in this case.
> > >
> > > Nick,
> > >
> > > I don't think this solves the problem though. As Daniel pointed out,
> > >
> > > -interpreter-exec console "b A::func"
> > >
> > > will cause the same problem, and needs to be addressed. I haven't
> > > thought this through well enough though.
> >
> > Well, I guess it depends whether the existing behaviour breaks the front
> > end or not i.e when the prompt ">" appears will it know that GDB wants
> > more input or not? If the answer is yes (I've not tried it) then things
> > can be left as they are. If its no, then something should be done and the
> > solution being proposed doesn't sound like a quick fix.
> >
> > "-interpreter-exec console "b A::func" could presumably be made to behave
> > as "-break-insert A::func". Witness pending breakpoints:
>
> I wouldn't like to change the behavior of the CLI commands. This would
> be confusing to users and I don't think they would like it at all.
I don't know how it would work to keep existing CLI behaviour. I think
"-interpreter-exec console" only works for single isolated CLI commands and
not for ones like "source", "commands", "if", "while" etc or user-defined
ones. Current behaviour seems to be broken, I'm just trying to suggest an
immediate temporary fix. Will your solution be ready for 6.5?
> > (gdb)
> > -break-insert fgfg
> > &"Function \"fgfg\" not defined.\n"
> > ^done
> > (gdb)
> > -interpreter-exec console "b ghgh"
> > &"Function \"ghgh\" not defined.\n"
> > ~"Breakpoint 1 (ghgh) pending.\n"
> > ^done
> > (gdb)
> > inf bre
> > &"inf bre\n"
> > ~"Num Type Disp Enb Address What\n"
> > ~"1 breakpoint keep y <PENDING> ghgh\n"
> > ^done
> > (gdb)
> >
> > For the CLI command "break" the behaviour seems to be reversed but it's
> > no longer a query.
>
> I think this is a bug in GDB that there is no longer a query. The user
> is going to want to know why they are not prompted when using the FE,
> but they are prompted when using GDB. I think this is a step backwards,
> not forwards.
We've had this one before. With "b ghgh", deprecated_query_hook has the value
mi_interp_query_hook which always returns 1, so this is deliberate. With
"-break-insert fgfg" the error `Function "fgfg" not defined.' is caught further
up the stack and GDB never gets a chance to set the breakpoint. I don't
know if that's deliberate.
--
Nick http://www.inet.net.nz/~nickrob
More information about the Gdb
mailing list