From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29715 invoked by alias); 24 Oct 2009 19:29:15 -0000 Received: (qmail 29707 invoked by uid 22791); 24 Oct 2009 19:29:14 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.33.17) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 24 Oct 2009 19:29:10 +0000 Received: from wpaz29.hot.corp.google.com (wpaz29.hot.corp.google.com [172.24.198.93]) by smtp-out.google.com with ESMTP id n9OJT7eQ031209 for ; Sat, 24 Oct 2009 20:29:07 +0100 Received: from ywh2 (ywh2.prod.google.com [10.192.8.2]) by wpaz29.hot.corp.google.com with ESMTP id n9OJT4EE020510 for ; Sat, 24 Oct 2009 12:29:05 -0700 Received: by ywh2 with SMTP id 2so9474771ywh.27 for ; Sat, 24 Oct 2009 12:29:04 -0700 (PDT) MIME-Version: 1.0 Received: by 10.101.191.1 with SMTP id t1mr7801462anp.67.1256412544736; Sat, 24 Oct 2009 12:29:04 -0700 (PDT) In-Reply-To: <83hbtog3fv.fsf@gnu.org> References: <83iqe4g9t2.fsf@gnu.org> <200910241704.00548.pedro@codesourcery.com> <83hbtog3fv.fsf@gnu.org> Date: Sat, 24 Oct 2009 23:05:00 -0000 Message-ID: <8ac60eac0910241229g44d8d657ve8f888f1a606790b@mail.gmail.com> Subject: Re: Breakpoint commands From: Paul Pluzhnikov To: Eli Zaretskii Cc: Pedro Alves , gdb@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-System-Of-Record: true 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/msg00356.txt.bz2 On Sat, Oct 24, 2009 at 9:30 AM, Eli Zaretskii wrote: >> From: Pedro Alves >> Date: Sat, 24 Oct 2009 17:03:59 +0100 >> >> "You can use breakpoint commands to start your program up again. =A0Simp= ly >> 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. =A0This 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." > > Thanks for reminding me. =A0We ought to display a warning when any > commands are used on the command list beyond those which resume. FWIW, I very often would like to do this: int foo(int x) { ... } break foo command 1 print x finish ## expecting it to print return of foo() continue and that last 'continue' of course doesn't work, so I have to sit an press enter all day :-( The argument of "you may encounter other breakpoints ..." is (IMHO) a weak one: I *don't* in fact encounter any other breakpoints. It's probably not too difficult to implement "if you encounter any other breakpoint with its own command list while executing the original command list, the original command list is abandoned" policy. I'll open a feature request unless somebody explains why this would be a bad idea. Thanks, --=20 Paul Pluzhnikov