Bug 16126 - GDB/GDBserver lose signal when reconnecting
Summary: GDB/GDBserver lose signal when reconnecting
Status: NEW
Alias: None
Product: gdb
Classification: Unclassified
Component: remote (show other bugs)
Version: HEAD
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-06 11:32 UTC by Pedro Alves
Modified: 2013-11-06 11:32 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pedro Alves 2013-11-06 11:32:18 UTC
If you disconnect from GDBserver while the program is stopped at a signal
(or gdb crashes), and then connect back, GDB/GDBserver lose the signal.

Without reconnecting:

(gdb) c
Continuing.

Program received signal SIGUSR1, User defined signal 1.
main () at threads.c:35
35          long i = 0;

(gdb) info program 
Debugging a target over a serial line.
Program stopped at 0x4006e4.
It stopped with signal SIGUSR1, User defined signal 1.

(gdb) c
Continuing.

Program terminated with signal SIGUSR1, User defined signal 1.
The program no longer exists.
(gdb) 


==============================

Reconnecting:

(gdb) c
Continuing.

Program received signal SIGUSR1, User defined signal 1.
0x00000034cf408e60 in pthread_join (threadid=140737353922304, thread_return=0x7fffffffd8b8) at pthread_join.c:93
93          lll_wait_tid (pd->tid);
(gdb) info program 
Debugging a target over a serial line.
Program stopped at 0x34cf408e60.
It stopped with signal SIGUSR1, User defined signal 1.

(gdb) disconnect 
Ending remote debugging.

(gdb) tar remote :9999
Remote debugging using :9999
Reading symbols from /lib64/libpthread.so.0...Reading symbols from /usr/lib/debug/lib64/libpthread-2.15.so.debug...done.
...
Loaded symbols for /lib64/ld-linux-x86-64.so.2
0x00000034cf408e60 in pthread_join (threadid=140737353922304, thread_return=0x7fffffffd8b8) at pthread_join.c:93
93          lll_wait_tid (pd->tid);

(gdb) info program 
Debugging a target over a serial line.
Program stopped at 0x34cf408e60.
It stopped with signal SIGTRAP, Trace/breakpoint trap.

(gdb) c
Continuing.
[Inferior 1 (process 25328) exited normally]