From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29573 invoked by alias); 24 Oct 2009 16:03:56 -0000 Received: (qmail 29484 invoked by uid 22791); 24 Oct 2009 16:03:55 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,SPF_PASS 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; Sat, 24 Oct 2009 16:03:51 +0000 Received: (qmail 28875 invoked from network); 24 Oct 2009 16:03:48 -0000 Received: from unknown (HELO orlando) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 24 Oct 2009 16:03:48 -0000 From: Pedro Alves To: gdb@sourceware.org, Eli Zaretskii Subject: Re: Breakpoint commands Date: Sat, 24 Oct 2009 16:30:00 -0000 User-Agent: KMail/1.9.10 References: <83iqe4g9t2.fsf@gnu.org> In-Reply-To: <83iqe4g9t2.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200910241704.00548.pedro@codesourcery.com> 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: 2009-10/txt/msg00352.txt.bz2 A Saturday 24 October 2009 15:12:41, Eli Zaretskii escreveu: > Some commands seem to be not working inside breakpoint commands, in > the sense that breakpoint commands after them are not executed. >=20 > Two examples that I tried were `finish' and `until'. What I wanted > was to stop at function entry, print some variable, then let the > function run to completion, and print some other (global) variable > that gets modified by this function. The breakpoint commands > therefore were something like >=20 > break FOO > commands > >print BAR > >finish > >print BAZ > >end >=20 > and similarly with `until' instead of `finish'; I used the last line > of the function's body for its argument. >=20 > What I see is that the second `print' is never executed. Sounds like > a bug to me. Or did I miss something? >=20 =46rom gdb.texinfo:'Break Commands': "You can use breakpoint commands to start your program up again. Simply use the @code{continue} command, or @code{step}, or any other command that resumes execution. Any other commands in the command list, after a command that resumes execution, are ignored. This is because any time you resume execution (even with a simple @code{next} or @code{step}), you may encounter another breakpoint---which could have its own command list, leading to ambiguities about which list to execute." --=20 Pedro Alves