This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]