From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17518 invoked by alias); 12 Feb 2010 10:54:49 -0000 Received: (qmail 17508 invoked by uid 22791); 12 Feb 2010 10:54:48 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 12 Feb 2010 10:54:45 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 804D32BAC26; Fri, 12 Feb 2010 05:54:43 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id FdCmwFAyaglS; Fri, 12 Feb 2010 05:54:43 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id DE3942BAB12; Fri, 12 Feb 2010 05:54:42 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id B6309F59AE; Fri, 12 Feb 2010 14:54:33 +0400 (RET) Date: Fri, 12 Feb 2010 10:54:00 -0000 From: Joel Brobecker To: Vladimir Prus Cc: gdb@sources.redhat.com Subject: Re: [MI] -exec-return or CLI 'return' do not trigger MI events Message-ID: <20100212105433.GR2919@adacore.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) 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/msg00089.txt.bz2 > For all I can tell, the 'return' command does not actually resume the > target. It just pops the stack. I got caught by this tiny but important detail as well. But if you look at the GDB User's manual, it's very explicit about it. Among many things, it says: The return command does not resume execution; it leaves the program stopped in the state that would exist if the function had just returned. In contrast, the finish command (see Continuing and Stepping) resumes execution until the selected stack frame returns naturally. -- Joel