Bug 18063 - Buggy behavior after single-stepping into inferior's SIGWINCH handler
Summary: Buggy behavior after single-stepping into inferior's SIGWINCH handler
Status: RESOLVED DUPLICATE of bug 17511
Alias: None
Product: gdb
Classification: Unclassified
Component: breakpoints (show other bugs)
Version: HEAD
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-28 15:38 UTC by patrick
Modified: 2015-02-28 16:01 UTC (History)
1 user (show)

See Also:
Host: x86_64-unknown-linux-gnu
Target: x86_64-unknown-linux-gnu
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description patrick 2015-02-28 15:38:52 UTC
GDB seems to malfunction after catching a SIGWINCH signal and stepping into the program's SIGWINCH handler.  In particular GDB seems to catch an endless stream of SIGTRAPs when attempting to exit the SIGWINCH handler.  This behavior can be seen when debugging GDB with GDB:

$ gdb gdb
(gdb) catch signal SIGWINCH
Catchpoint 1 (signal SIGWINCH)
(gdb) run
Starting program: /scratchpad/binutils-gdb-build/gdb/gdb 
(gdb) <resize terminal>
Catchpoint 1 (signal SIGWINCH), 0x00007ffff6d784f0 in poll () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) step
Single stepping until exit from function poll,
which has no line number information.
rl_sigwinch_handler (sig=28) at /home/patrick/code/binutils-gdb/readline/signals.c:246
246     {
(gdb) next
259       RL_SETSTATE(RL_STATE_SIGHANDLER);
(gdb) finish
Run till exit from #0  rl_sigwinch_handler (sig=28) at /home/patrick/code/binutils-gdb/readline/signals.c:246

Program received signal SIGTRAP, Trace/breakpoint trap.
rl_sigwinch_handler (sig=28) at /home/patrick/code/binutils-gdb/readline/signals.c:260
260       rl_resize_terminal ();
(gdb) finish
Run till exit from #0  rl_sigwinch_handler (sig=28) at /home/patrick/code/binutils-gdb/readline/signals.c:260

Program received signal SIGTRAP, Trace/breakpoint trap.
rl_resize_terminal () at /home/patrick/code/binutils-gdb/readline/terminal.c:364
364     {
(gdb) <ad infinitum..>
Comment 1 Pedro Alves 2015-02-28 16:01:31 UTC
This is a kernel bug.

*** This bug has been marked as a duplicate of bug 17511 ***