From: Stefano Sabatini <stefano.sabatini-lala@poste.it>
To: gdb Mailing List <gdb@sources.redhat.com>
Subject: [NEWBIE] How to exit from a loop
Date: Mon, 30 Jun 2008 15:32:00 -0000 [thread overview]
Message-ID: <20080630153311.GA19538@geppetto> (raw)
Hi all,
suppose I'm debugging some code like this:
int i;
for (i=0; i < a_big_number; i++)
do_something(i);
out_of_the_loop:
do_something_else();
and I'd like to jump out of the loop.
What I did everytime is to simply put a breakpoint just after
out_of_the_loop and hit continue, then I need to unset the breakpoint.
I wonder if there is a more efficient way to exit from the loop,
without the need to set a breakpoint at the rigth place, continue and
then unset the breakpoint but with just a single command/macro.
Many thanks in advance, regards.
next reply other threads:[~2008-06-30 15:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-30 15:32 Stefano Sabatini [this message]
2008-06-30 15:36 ` Daniel Jacobowitz
2008-06-30 15:36 ` 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=20080630153311.GA19538@geppetto \
--to=stefano.sabatini-lala@poste.it \
--cc=gdb@sources.redhat.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