From: Denis PILAT <denis.pilat@st.com>
To: Vladimir Prus <vladimir@codesourcery.com>
Cc: gdb@sources.redhat.com
Subject: Re: Query user with gdb MI intepreter
Date: Thu, 23 Oct 2008 11:08:00 -0000 [thread overview]
Message-ID: <49005ADB.9080003@st.com> (raw)
In-Reply-To: <gdpjme$p89$1@ger.gmane.org>
Vladimir Prus wrote:
> Denis PILAT wrote:
>
>
>> Hi all
>>
>> I have a problem with the current gdb that, run from an eclipse
>> front-end using MI interpreter, query the user with defaulted_query ()
>> to prompt him to "Quit this debugging session?" .
>> Is that a normal behavior or not ?
>> I thought that gdb should not query user when using MI mode, but I can
>> we wrong, that's my point.
>> Here is part of th back trace. As you will see, we have an assertion
>> that comes from a problem with the frame unwinder, but I want first to
>> make sure that this assertion can request for user interaction or no.
>> The command that leads to the assertion is a simple -exec-next
>>
>
> I would have expected this query to be auto-asnwered as "yes". Is this not
> happening? If not, and GDB actually waits till the user types "yes", it's
> clearly a bug.
>
> - Volodya
>
>
>
>
Here is a proposal that prevents assert in gdb to query user.
The inconvenient (to me) is that when gdb ask user for generating a core
file, it *will* be generated and the user may not be aware of that.
I've though to disable the core file generation in MI mode, but I did
not so far. waiting for your feedback.
--
Denis
2008-10-23 Denis Pilat <denis.pilat@st.com>
* utils.c (defaulted_query): return the default value when using MI
interpreter.
Index: utils.c
===================================================================
--- utils.c (revision 293)
+++ utils.c (working copy)
@@ -1180,7 +1180,7 @@ defaulted_query (const char *ctlstr, con
/* Automatically answer the default value if input is not from the user
directly, or if the user did not want prompts. */
- if (!input_from_terminal_p () || !caution)
+ if (!input_from_terminal_p () || !caution || ui_out_is_mi_like_p (uiout))
return def_value;
if ((instream == stdin || instream == NULL) && deprecated_query_hook)
next prev parent reply other threads:[~2008-10-23 11:08 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-21 12:18 Denis PILAT
2008-10-23 10:30 ` Vladimir Prus
2008-10-23 11:08 ` Denis PILAT [this message]
2008-10-23 6:45 Nick Roberts
2008-10-23 10:21 ` Denis PILAT
2008-10-23 11:08 ` Nick Roberts
2008-10-23 12:57 ` Denis PILAT
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=49005ADB.9080003@st.com \
--to=denis.pilat@st.com \
--cc=gdb@sources.redhat.com \
--cc=vladimir@codesourcery.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox