From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6538 invoked by alias); 31 Mar 2008 12:51:47 -0000 Received: (qmail 6526 invoked by uid 22791); 31 Mar 2008 12:51:44 -0000 X-Spam-Check-By: sourceware.org Received: from s200aog16.obsmtp.com (HELO s200aog16.obsmtp.com) (207.126.144.130) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 31 Mar 2008 12:51:13 +0000 Received: from source ([164.129.1.35]) (using TLSv1) by eu1sys200aob016.postini.com ([207.126.147.11]) with SMTP; Mon, 31 Mar 2008 12:51:07 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 E3E19DAFB; Mon, 31 Mar 2008 12:50:55 +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 04EF04C0FD; Mon, 31 Mar 2008 12:50:53 +0000 (GMT) Received: from crx595.cro.st.com (crx595.cro.st.com [164.129.44.95]) by mail1.cro.st.com (MOS 3.7.5a-GA) with ESMTP id CNU50688 (AUTH "denis pilat"); Mon, 31 Mar 2008 14:52:04 +0200 (CEST) Message-ID: <47F0DE2C.6010302@st.com> Date: Mon, 31 Mar 2008 13:00:00 -0000 From: Denis PILAT User-Agent: Thunderbird 2.0.0.12 (X11/20080213) MIME-Version: 1.0 To: Vladimir Prus Cc: gdb@sources.redhat.com Subject: Re: Calling inferior functions and MI notification References: <200803271949.10914.vladimir@codesourcery.com> In-Reply-To: <200803271949.10914.vladimir@codesourcery.com> Content-Type: text/plain; charset=UTF-8; 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-03/txt/msg00276.txt.bz2 Hi Vladimir, I think solution 2 is better since it will let Eclipse (or any FE) the possibility to handles "*running" as an Out Of Band Record, as then let the user knows that the program is running... Moreover, when within Eclipse you hit a breakpoint in an inferior function call, it exits gdb so I think CDT needs to handle inf. calls in a better way, or gdb avoid stopping when it's an inferior function call. Having these new notifications would help I guess, at least to warn the GUI about the execution of a command and avoid entering new execution command until it returns. Did you post that to cdt mailing list ? Denis Vladimir Prus wrote: > Hello, > presently, when a GDB command calls an inferior function, for > example: > > -data-evaluate-expression foo() > > the MI frontend is not informed in any way. So, should the function > get stuck, the user will not even understand that inferior is running, > and will have hard time figuring that he should click the "interrupt" > button, or whatever. > > Ideally, the output should be like this: > > (gdb) -data-evaluate-expression foo() > *running,thread-id="1" > *stopped > ^done,result="100" > > However, I believe that making such a change will immediately break both KDevelop > and Eclipse CDT -- because whenever they see *stopped, a full refresh of everything > is done. If any variable object involves function call, *stopped will be emitted > again, and cause another refresh. At least, I cannot see anything protecting > from that. > > So, we have two solutions: > 1. Just don't emit those notification for inferior function calls. > 2. Don't emit them by default. Provide a command to enable this new > behaviour. > > Comments or better suggestions? > > - Volodya > > > > >