From: "Michael D. Crawford" <crawford@goingware.com>
To: gdb@sources.redhat.com
Subject: touch and go breakpoints?
Date: Sun, 15 Jun 2003 06:53:00 -0000 [thread overview]
Message-ID: <3EEC2751.8040201@goingware.com> (raw)
Is there a way I can set a breakpoint, where if it is hit, gdb will execute
some command, and then continue?
What I want to do is print out the value of a variable everytime a certain line
in the code is encountered, but then continue. I have a crash somewhat later,
but only after lots of iterations, so what I'd like to do is see what the last
value of this variable is before the crash.
I used to do this in MacsBug for the old Mac OS like this:
brp 1234 ';dm a0;g'
that will break at location 1234, display some memory starting at whatever
register a0 is, then go.
Thanks,
Mike
--
Michael D. Crawford
GoingWare Inc. - Expert Software Development and Consulting
http://www.goingware.com/
crawford@goingware.com
Tilting at Windmills for a Better Tomorrow.
next reply other threads:[~2003-06-15 6:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-06-15 6:53 Michael D. Crawford [this message]
2003-06-15 14:04 ` Peter Barada
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=3EEC2751.8040201@goingware.com \
--to=crawford@goingware.com \
--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