This is the mail archive of the 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: exceptions.KeyboardInterrupt is thrown in gdb.base/random-signal.exp

Pedro Alves <> 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 (éå)

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