This is the mail archive of the
mailing list for the GDB project.
Re: How to set default value of yquery and nquery
On Thu, Feb 25, 2010 at 23:27, Marc Khouzam <email@example.com> wrote:
>> -----Original Message-----
>> From: Hui Zhu [mailto:firstname.lastname@example.org]
>> Sent: February-25-10 1:34 AM
>> To: Marc Khouzam
>> Cc: email@example.com; firstname.lastname@example.org
>> Subject: Re: How to set default value of yquery and nquery
>> On Wed, Feb 24, 2010 at 21:42, Marc Khouzam
>> <email@example.com> wrote:
>> >> Do you think we can add a command to set the non-terminal query
>> >> answer?
>> >> For example:
>> >> set non-terminal-query-default yes/no/auto auto This is
>> the default
>> >> value. query/yquery/nquery answer will like before.
>> >> yes ?query/yquery/nquery answer will be yes no
>> >> answer will be no
>> > This is not perfect because every query would be answered the same
>> > way. ?From a non-terminal, you many want to answer 'y' to one query
>> > and 'n' to another.
>> For my idea, it just to handle the query/yquery/nquery and
>> simple commands.
>> After this command complete, set it back to auto can handle it.
> But sometimes you don't know if a command will cause a query,
> like for Precord.
>> > Furthermore, sometimes the query is not directly triggered by the
>> > command used. ?For example, changing a variable value will
>> trigger a
>> > query from PRecord, but it is not really the 'set' command
>> that sends
>> > the query, it is PRecord.
>> Sorry for make you spend a lot of time on query and prec, I
>> think yquery and nquery didn't can be control when
>> non-terminal is really a big trouble.
>> I will try to make each of them have a set commands. ?And
>> could you tell me which one make you feel bad? ?I will do it
>> first. ?:)
> Everything if fixed now because you don't use nquery() anymore.
> So, there is nothing to fix :-)
>> > I believe the cleanest solution up to now was to have individual
>> > setting for each query. ?I didn't like that too much myself, but I
>> > don't have a better suggestion.
>> I suggest each nquery or yquery have a set command together.
> Yes, I believe that was what the maintainers suggested.
> And you have this for pending breakpoints.
>> The more clear way I think is the query will tell user howto
>> set it non-terminal. ?Maybe it is too tangled.
> I didn't understand this.
(gdb) b w
No symbol table is loaded. Use the "file" command.
Make breakpoint pending (set breakpoint pending) on future shared
library load? (y or [n])
The (set breakpoint pending) let user know how to set the behavior.