From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11673 invoked by alias); 23 Oct 2008 10:21:46 -0000 Received: (qmail 11664 invoked by uid 22791); 23 Oct 2008 10:21:45 -0000 X-Spam-Check-By: sourceware.org Received: from eu1sys200aog016.obsmtp.com (HELO eu1sys200aog016.obsmtp.com) (207.126.144.130) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 23 Oct 2008 10:20:39 +0000 Received: from source ([164.129.1.35]) (using TLSv1) by eu1sys200aob016.postini.com ([207.126.147.11]) with SMTP; Thu, 23 Oct 2008 10:20:27 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 D2C76DAC7; Thu, 23 Oct 2008 10:20:22 +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 98D964C014; Thu, 23 Oct 2008 10:20:22 +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 CQF10735 (AUTH "denis pilat"); Thu, 23 Oct 2008 12:21:29 +0200 (CEST) Message-ID: <49004FE5.6020807@st.com> Date: Thu, 23 Oct 2008 10:21:00 -0000 From: Denis PILAT User-Agent: Thunderbird 2.0.0.17 (X11/20080914) MIME-Version: 1.0 To: Nick Roberts Cc: gdb@sourceware.org Subject: Re: Query user with gdb MI intepreter References: <18688.7480.96669.634046@kahikatea.snap.net.nz> In-Reply-To: <18688.7480.96669.634046@kahikatea.snap.net.nz> 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/msg00104.txt.bz2 Nick Roberts wrote: >> 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 ? >> > > MI has no provision for handling query functions > > >> I thought that gdb should not query user when using MI mode, but I can we >> wrong, that's my point. >> > > MI avoids queries generated by CLI commands by implicitly answering them in the > affirmative (by making deprecated_query_hook return 1). > > >> 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 >> > > This query arose (indirectly) from an MI command. Only a few MI commands > deal with queries, e.g, -break-insert for pending breakpoints and and > breakpoint menus, and they just take a default action. > > If you want to request for user interaction you will need to give MI a richer > set of output records. Good luck! > No that's not what I want. Is the actual behavior correct from your point of view ? Let me explain it: It's a corner case, but does an assertion in gdb that using MI interpreter should query user for quiting the program or ? Today we don't go thru deprecated_query_hook when gdb asserts so user is prompted. If actual behavior is not correct, then I will propose a simple patch that is already in place in my version of gdb sources. Denis