This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: exceptions.KeyboardInterrupt is thrown in gdb.base/random-signal.exp
- From: Yao Qi <qiyaoltc at gmail dot com>
- To: Pedro Alves <palves at redhat dot com>
- Cc: Yao Qi <qiyaoltc at gmail dot com>, gdb-patches at sourceware dot org
- Date: Wed, 25 Nov 2015 17:16:24 +0000
- Subject: Re: exceptions.KeyboardInterrupt is thrown in gdb.base/random-signal.exp
- Authentication-results: sourceware.org; auth=none
- References: <86ziy2xdt7 dot fsf at gmail dot com> <5655E141 dot 7030503 at redhat dot com>
Pedro Alves <palves@redhat.com> writes:
> Seems like a hack -- I don't see how that can make a difference. In both
> cases, we send \003 after 500ms.
The only difference is that {send_gdb "\003"} will be executed in an
event handler later while tcl has already been in gdb_test.
>
> The test sets a software watchpoint, and resumes the target. That means
> the program will be constantly single-stepping, and gdb will be evaluating
> the watched expression at each single-step. I'd suspect that the problem
> is likely that while the program is stopped to evaluate the watched
> expression, something is calling target_terminal_ours, which restores
> handle_sigint as SIGINT handler. Then somehow you're unlucky to manage to
> ctrl-c at that exact time. The fix in that case is likely to be to call
> target_terminal_ours_for_output instead, which doesn't touch the SIGINT
> handler.
That was one of my clues... I set breakpoint on target_terminal_ours,
but it isn't hit. Anyway, I'll look into it further.
--
Yao (éå)