This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
touch and go breakpoints?
- From: "Michael D. Crawford" <crawford at goingware dot com>
- To: gdb at sources dot redhat dot com
- Date: Sun, 15 Jun 2003 03:59:13 -0400
- Subject: touch and go breakpoints?
- Organization: GoingWare Inc. - Expert Software Development and Consulting
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.