From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28090 invoked by alias); 12 Feb 2010 15:37:22 -0000 Received: (qmail 28072 invoked by uid 22791); 12 Feb 2010 15:37:21 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,SPF_PASS,WEIRD_PORT X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 12 Feb 2010 15:37:15 +0000 Received: (qmail 23966 invoked from network); 12 Feb 2010 15:37:14 -0000 Received: from unknown (HELO wind.localnet) (vladimir@127.0.0.2) by mail.codesourcery.com with ESMTPA; 12 Feb 2010 15:37:14 -0000 From: Vladimir Prus To: Marc Khouzam Subject: Re: [MI] -exec-return or CLI 'return' do not trigger MI events Date: Fri, 12 Feb 2010 15:37:00 -0000 User-Agent: KMail/1.12.2 (Linux/2.6.31-14-generic-pae; KDE/4.3.2; i686; ; ) Cc: "'gdb@sources.redhat.com'" References: In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-Id: <201002121837.11704.vladimir@codesourcery.com> 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: 2010-02/txt/msg00098.txt.bz2 On Friday 12 February 2010 18:33:28 Marc Khouzam wrote: > > -----Original Message----- > > From: gdb-owner@sourceware.org > > [mailto:gdb-owner@sourceware.org] On Behalf Of Vladimir Prus > > Sent: Friday, February 12, 2010 5:28 AM > > To: gdb@sources.redhat.com > > Subject: Re: [MI] -exec-return or CLI 'return' do not trigger > > MI events > > > > Marc Khouzam wrote: > > > > > Hi, > > > > > > I just noticed that GDB 7.0.1 does not issue MI events > > > *running and *stopped for the CLI 'return' command. > > > This is the relevant output, while the whole (small) > > > session is after. > > > > > > (gdb) -exec-return > > > > > ^done,frame={level="0",addr="0x08048412",func="foo",args=[],fi > > le="a.cc",fullname="/local/lmckhou/testing/a.cc",line="6"} > > > (gdb) return > > > &"return\n" > > > ~"#0 main () at a.cc:9\n" > > > ~"9\t return 0;\n" > > > ^done > > > > > > Do you want me to write a bug? > > > > For all I can tell, the 'return' command does not actually > > resume the target. > > It just pops the stack. > > Ok, but how does the frontend know the stack has been poped > and the editor should show a new line? I think it has to special-case the '-exec-return' command. Note that the new stack is reported as the result. > When we use GDB 7.0 we only listen for MI events to update the > frontend data. > > I'll have to fix this for '-exec-return' anyway to support > GDB 7.0, but with respect to GDB itself, aren't we missing > some MI event then? I don't know any other command like that, so special-casing -exec-return is just as good as a new notification -- that frontend has to specially support just as well. - Volodya