This is the mail archive of the
mailing list for the GDB project.
RE: How to set default value of yquery and nquery
> -----Original Message-----
> From: email@example.com
> [mailto:firstname.lastname@example.org] On Behalf Of Tom Tromey
> Sent: Tuesday, February 23, 2010 12:14 PM
> To: Hui Zhu
> Cc: email@example.com
> Subject: Re: How to set default value of yquery and nquery
> >>>>> ">" == Hui Zhu <firstname.lastname@example.org> writes:
> >> A people want set a lot of command with .gdbinit,
> >> He want set a breakpoint to a solib before load it.
> >> He just got:
> >> Function "www2" not defined.
> >> Make breakpoint pending on future shared library load? (y or [n])
> >> [answered N; input not from terminal]
> >> We can handle this issue with load solib before set
> breakpoint. But
> >> does GDB have some ways to set default value with input not from
> >> terminal?
> In this particular case you can also use "set breakpoint pending".
> I don't think there is a general facility for answering queries from a
This was my problem with Eclipse and PRecord. When a query is answered
not from a terminal it always takes the the default
(N for nquery(), Y for for query() and yquery()).
That is why we had to make PRecord use query() instead of nquery()
For pending breakpoints you have "set breakpoint pending" that Tom
mentions, but if anyone else uses nquery() (no one currently does),
they would have to add their own optional setting.
We discussed a bunch of ways to improve this when I had the problem.
But the easiest fix was to not use nquery() :-)