This is the mail archive of the gdb-patches@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]

Re: [RFC] Catch exception after stepped over watchpoint.


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


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