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: Query user with gdb MI intepreter




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)



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