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: Pedro Alves <palves at redhat dot com>
- To: Yao Qi <yao at codesourcery dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Mon, 29 Jul 2013 18:19:10 +0100
- 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> <51D7C9D6 dot 5050608 at codesourcery dot com>
On 07/06/2013 08:40 AM, Yao Qi wrote:
> 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".
No, of course that was not the question. :-)
You said:
"When the inferior hit a watchpoint, GDB gets a stop and steps over the
watchpoint. GDB will remove all the breakpoints, perform single step,
wait, and insert breakpoints again."
OK, but then, the first time around, the first time we try
to install watchpoints, somewhere, we swallow the error and
continue anyway. So the question is, why is the first time
we try to insert too many watchpoints different from
this case? Where is the error swallowing in the first case
handled? Why doesn't _that_ trigger here?
This is not a comment against the patch, only a request for
help in understanding things.
--
Pedro Alves