This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Ctrl+C when a watchpoint is set gdb
- From: Daniel Jacobowitz <drow at false dot org>
- To: Siva Velusamy <siva dot velusamy at gmail dot com>
- Cc: gdb at sourceware dot org
- Date: Tue, 6 Nov 2007 21:41:01 -0500
- Subject: Re: Ctrl+C when a watchpoint is set gdb
- References: <e7dfeff00711061832w3dddaafq2c71c07d367fac60@mail.gmail.com>
On Tue, Nov 06, 2007 at 06:32:04PM -0800, Siva Velusamy wrote:
> However, the function bpstat_explains_signal is defined as follows:
>
> breakpoint.h:547
> /* Nonzero if a signal that we got in wait() was due to circumstances
> explained by the BS. */
> /* Currently that is true if we have hit a breakpoint, or if there is
> a watchpoint enabled. */
> #define bpstat_explains_signal(bs) ((bs) != NULL)
>
> Since there is a watchpoint defined, this ends up evaluating to true,
> even though this is a trap signal caused by Ctrl+C. Eventually, this
> leads to keep_going(ecs) being called.
You shouldn't be getting to the call to bpstat_explains_signal at all.
Is your remote stub returning the wrong signal for C-c? It should be
TARGET_SIGNAL_INT, not TARGET_SIGNAL_TRAP.
--
Daniel Jacobowitz
CodeSourcery