[RFC] Catch exception after stepped over watchpoint.
Yao Qi
yao@codesourcery.com
Sat Jul 6 07:40:00 GMT 2013
On 07/05/2013 10:52 PM, Pedro Alves wrote:
> What's different between the insert_breakpoints calls that makes
> the first one after setting the watchpoints just warn and still the
> program is continued, while this one errors out?
Pedro,
I am not sure I fully understand your question. In the original code,
the error is thrown if GDB failed to insert watchpoints in
insert_breakpoints. With the patch, we catch the error, just warn, and
let the GDB continue to process the "watchpoint hit" event. Your
question is "what is the difference between the original code and the
patched code".
If that is what you meant, the difference are
1) the state on software single step is cleared, so that the internal
error I mentioned is fixed,
2) the message on watched value changed is still shown,
(gdb) c
Continuing.
Warning:
Could not insert hardware watchpoint 1.
Could not insert hardware breakpoints:
You may have requested too many hardware breakpoints/watchpoints.
[1]Hardware watchpoint 1: *global_ptr
Old value = <unreadable>
New value = 3 '\003'
func4 () at
/scratch/yqi/mips-linux/src/gdb-2013.05/gdb/testsuite/gdb.base/watchpoint.c:135
135 buf[0] = 7;
if we stop stepping and return, we can't get the message after [1].
--
Yao (é½å°§)
More information about the Gdb-patches
mailing list