From: Paul Pluzhnikov <ppluzhnikov@google.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Pedro Alves <pedro@codesourcery.com>, gdb@sourceware.org
Subject: Re: Breakpoint commands
Date: Sat, 24 Oct 2009 23:05:00 -0000 [thread overview]
Message-ID: <8ac60eac0910241229g44d8d657ve8f888f1a606790b@mail.gmail.com> (raw)
In-Reply-To: <83hbtog3fv.fsf@gnu.org>
On Sat, Oct 24, 2009 at 9:30 AM, Eli Zaretskii <eliz@gnu.org> wrote:
>> From: Pedro Alves <pedro@codesourcery.com>
>> Date: Sat, 24 Oct 2009 17:03:59 +0100
>>
>> "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."
>
> Thanks for reminding me. We 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,
--
Paul Pluzhnikov
next prev parent reply other threads:[~2009-10-24 19:29 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-24 15:03 Eli Zaretskii
2009-10-24 16:30 ` Pedro Alves
2009-10-24 16:48 ` Eli Zaretskii
2009-10-24 23:05 ` Paul Pluzhnikov [this message]
2009-10-25 0:30 ` Michael Snyder
2009-10-26 11:30 ` Joel Brobecker
2009-10-26 13:15 ` Vladimir Prus
2009-10-26 23:42 ` Paul Pluzhnikov
2009-10-24 18:29 ` Andreas Schwab
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8ac60eac0910241229g44d8d657ve8f888f1a606790b@mail.gmail.com \
--to=ppluzhnikov@google.com \
--cc=eliz@gnu.org \
--cc=gdb@sourceware.org \
--cc=pedro@codesourcery.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox