* Watchpoints and Ctrl-C
@ 2008-07-11 14:49 Robert Norton
2008-07-11 15:03 ` Daniel Jacobowitz
0 siblings, 1 reply; 2+ messages in thread
From: Robert Norton @ 2008-07-11 14:49 UTC (permalink / raw)
To: gdb
Hi,
The function bpstat_stop_status in breakpoints.c calls
watchpoint_check() via catch_errors with a mask of RETURN_MASK_ALL. This
means that if the user presses Ctrl-C whilst a watchpoint is being
evaluated (as is quite likely if using software watchpoints on a
simulator target) then GDB issues the message "Error evaluating
watchpoint x" and deletes the watchpoint. Of course there wasn't really
an error so this is quite confusing!
Shouldn't this be using RETURN_MASK_ERROR?
There's a similar call to breakpoint_cond_eval which might require the
same treatment.
Robert
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Watchpoints and Ctrl-C
2008-07-11 14:49 Watchpoints and Ctrl-C Robert Norton
@ 2008-07-11 15:03 ` Daniel Jacobowitz
0 siblings, 0 replies; 2+ messages in thread
From: Daniel Jacobowitz @ 2008-07-11 15:03 UTC (permalink / raw)
To: Robert Norton; +Cc: gdb
On Fri, Jul 11, 2008 at 07:48:47AM -0700, Robert Norton wrote:
> Hi,
>
> The function bpstat_stop_status in breakpoints.c calls
> watchpoint_check() via catch_errors with a mask of RETURN_MASK_ALL. This
> means that if the user presses Ctrl-C whilst a watchpoint is being
> evaluated (as is quite likely if using software watchpoints on a
> simulator target) then GDB issues the message "Error evaluating
> watchpoint x" and deletes the watchpoint. Of course there wasn't really
> an error so this is quite confusing!
>
> Shouldn't this be using RETURN_MASK_ERROR?
>
> There's a similar call to breakpoint_cond_eval which might require the
> same treatment.
Perhaps. I think most uses of RETURN_MASK_ALL are incorrect.
There are some where, correct or not, it is necessary - I remember a
conversation with Vladimir about this during review of this patch:
2008-05-05 Vladimir Prus <vladimir@codesourcery.com>
* inf-loop.c (inferior_event_handler): Call bpstat_do_action,
and catch all exceptions from it.
* top.c (command_line_handler_continuation): Don't
call bpstat_do_action here.
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-07-11 15:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-07-11 14:49 Watchpoints and Ctrl-C Robert Norton
2008-07-11 15:03 ` Daniel Jacobowitz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox