This is the mail archive of the gdb@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: How to set default value of yquery and nquery


On Wed, Feb 24, 2010 at 04:51, Marc Khouzam <marc.khouzam@ericsson.com> wrote:
>> -----Original Message-----
>> From: gdb-owner@sourceware.org
>> [mailto:gdb-owner@sourceware.org] On Behalf Of Tom Tromey
>> Sent: Tuesday, February 23, 2010 12:14 PM
>> To: Hui Zhu
>> Cc: gdb@sourceware.org
>> Subject: Re: How to set default value of yquery and nquery
>>
>> >>>>> ">" == Hui Zhu <teawater@gmail.com> 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
>> script.
>

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  query/yquery/nquery answer will be no


> 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()
>

This is really a long issue.  I remember that someone said this issue
will be handle by MI after 7.0 release.

Thanks,
Hui


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