public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* touch and go breakpoints?
@ 2003-06-15  6:53 Michael D. Crawford
  2003-06-15 14:04 ` Peter Barada
  0 siblings, 1 reply; 2+ messages in thread
From: Michael D. Crawford @ 2003-06-15  6:53 UTC (permalink / raw)
  To: gdb

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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-06-15 14:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-06-15  6:53 touch and go breakpoints? Michael D. Crawford
2003-06-15 14:04 ` Peter Barada

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).