This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC] Catch exception after stepped over watchpoint.
- From: Yao Qi <yao at codesourcery dot com>
- To: Pedro Alves <palves at redhat dot com>
- Cc: <gdb-patches at sourceware dot org>
- Date: Sat, 6 Jul 2013 15:40:06 +0800
- Subject: Re: [RFC] Catch exception after stepped over watchpoint.
- References: <1372404990-26646-1-git-send-email-yao at codesourcery dot com> <51D6DDA6 dot 3080007 at redhat dot com>
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 (éå)