Bug 22849 - ctrl-c doesn't work in extended-remote
Summary: ctrl-c doesn't work in extended-remote
Status: RESOLVED FIXED
Alias: None
Product: gdb
Classification: Unclassified
Component: gdb (show other bugs)
Version: HEAD
: P2 normal
Target Milestone: 8.1.1
Assignee: Yao Qi
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-02-15 14:30 UTC by Yao Qi
Modified: 2018-03-31 12:36 UTC (History)
1 user (show)

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 Yao Qi 2018-02-15 14:30:58 UTC
Start GDBserver in one console,

$ ./gdbserver/gdbserver --multi :1234 ./1.exe

and start GDB in another,

$ ./gdb ./1.exe
....
(gdb) target extended-remote :1234
Remote debugging using :1234
Reading /lib64/ld-linux-x86-64.so.2 from remote target...
warning: File transfers from remote targets can be slow. Use "set sysroot" to access files locally instead.
Reading /lib64/ld-linux-x86-64.so.2 from remote target...
Reading symbols from target:/lib64/ld-linux-x86-64.so.2...Reading /lib64/ld-2.19.so from remote target...
Reading /lib64/.debug/ld-2.19.so from remote target...
(no debugging symbols found)...done.
Python Exception <type 'exceptions.NameError'> Installation error: gdb.execute_unwinders function is missing: 
0x00007ffff7ddb2d0 in ?? () from target:/lib64/ld-linux-x86-64.so.2
(gdb) r
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /scratch/yao/gdb/build-git/x86_64/gdb/1.exe 
Reading /lib64/ld-linux-x86-64.so.2 from remote target...
Reading /lib64/ld-linux-x86-64.so.2 from remote target...
Reading /lib64/ld-2.19.so from remote target...
Reading /lib64/.debug/ld-2.19.so from remote target...
^C^CInterrupted while waiting for the program.
Give up waiting? (y or n) n
Comment 1 Yao Qi 2018-02-15 14:42:20 UTC
GDB 8.1 is affected too.
Comment 2 cvs-commit@gcc.gnu.org 2018-02-15 14:50:01 UTC
The master branch has been updated by Yao Qi <qiyao@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=85046ae23f853bfd01db6b4a840e80220487bffd

commit 85046ae23f853bfd01db6b4a840e80220487bffd
Author: Yao Qi <yao.qi@linaro.org>
Date:   Thu Feb 15 14:48:30 2018 +0000

    Reset inferior::control on inferior exit
    
    When we kill an inferior, the inferior is not deleted.  What is more, it
    is reused when the new process is created, so we need to reset inferior's
    state when it exits.
    
    gdb:
    
    2018-02-15  Yao Qi  <yao.qi@linaro.org>
    
    	PR gdb/22849
    	* inferior.c (exit_inferior_1): Reset inf->control.
Comment 3 cvs-commit@gcc.gnu.org 2018-02-15 14:57:29 UTC
The gdb-8.1-branch branch has been updated by Yao Qi <qiyao@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=2ba75fb16a5c78007010cfbde1c1b5be4bb9a8c8

commit 2ba75fb16a5c78007010cfbde1c1b5be4bb9a8c8
Author: Yao Qi <yao.qi@linaro.org>
Date:   Thu Feb 15 14:48:30 2018 +0000

    Reset inferior::control on inferior exit
    
    When we kill an inferior, the inferior is not deleted.  What is more, it
    is reused when the new process is created, so we need to reset inferior's
    state when it exits.
    
    gdb:
    
    2018-02-15  Yao Qi  <yao.qi@linaro.org>
    
    	PR gdb/22849
    	* inferior.c (exit_inferior_1): Reset inf->control.
Comment 4 Yao Qi 2018-02-15 15:00:24 UTC
Patch is committed to master and 8.1 branch.