From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30588 invoked by alias); 23 Oct 2008 11:08:29 -0000 Received: (qmail 30571 invoked by uid 22791); 23 Oct 2008 11:08:29 -0000 X-Spam-Check-By: sourceware.org Received: from eu1sys200aog013.obsmtp.com (HELO eu1sys200aog013.obsmtp.com) (207.126.144.127) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 23 Oct 2008 11:07:23 +0000 Received: from source ([164.129.1.35]) (using TLSv1) by eu1sys200aob013.postini.com ([207.126.147.11]) with SMTP; Thu, 23 Oct 2008 11:07:12 UTC Received: from zeta.dmz-eu.st.com (ns2.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 32EB8DA90; Thu, 23 Oct 2008 11:07:08 +0000 (GMT) Received: from mail1.cro.st.com (mail1.cro.st.com [164.129.40.131]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 07FD44C06D; Thu, 23 Oct 2008 11:07:07 +0000 (GMT) Received: from crx595.cro.st.com (crx595.cro.st.com [164.129.44.95]) by mail1.cro.st.com (MOS 3.8.7a) with ESMTP id CQF11846 (AUTH "denis pilat"); Thu, 23 Oct 2008 13:08:15 +0200 (CEST) Message-ID: <49005ADB.9080003@st.com> Date: Thu, 23 Oct 2008 11:08:00 -0000 From: Denis PILAT User-Agent: Thunderbird 2.0.0.17 (X11/20080914) MIME-Version: 1.0 To: Vladimir Prus Cc: gdb@sources.redhat.com Subject: Re: Query user with gdb MI intepreter References: <48FDC870.5040900@st.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2008-10/txt/msg00108.txt.bz2 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 * 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)