This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
dynamic breakpoints/watchpoints
- From: "Ed S. Peschko" <esp5 at pge dot com>
- To: gdb at sourceware dot org
- Date: Tue, 13 Mar 2007 17:22:42 -0700
- Subject: dynamic breakpoints/watchpoints
All,
I'm not sure how feasible this is for gdb, but I've written something like
this for perl and it does wonders for your productivity, especially in
dealing with unfamiliar code.
What I'm looking for is something akin to grep integrated with gdb. Commands
like:
bc /pattern_in_code/
would stop at the first place where 'pattern_in_code' was seen after continuing
execution, and
bv /pattern_in_variable/
would monitor the data that *any* variable is using, and stop as soon as an
assignment of that pattern is made to that variable.
Of course, it might be difficult to do this with c, with differences between
floats && ints && ascii data, but it's not impossible. Maybe, 'bs' for break string,
or bi for break integer would do the trick..
Thoughts? I'd think that 'bc' would be easier to implement but I'm not sure...
Ed