Comment mettre en pause gdb connecté à gdbserver cible distant

Après la connexion à un gdbserver distant via:

target remote server:8888 

ou

 target extended-remote server:8888 

il n’est pas possible de suspendre le débogueur après une poursuite en utilisant CTRL + c. Faire la même chose dans une session gdb locale sur le même PID que cela fonctionne. Essayer de déboguer un gdbserver distant attaché à un autre processus tel que vim par exemple, CTRL + c fonctionne également.

J’ai essayé différentes combinaisons comme

 handle SIGINT stop noprint nopass 

Mais cela n’a pas aidé.

La seule façon de mettre le débogueur en pause est un

 kill -SIGTRAP $(pgrep -f my_app) 

sur l’hôte distant.

 $ gdb target extended-remote localhost:8888 Remote debugging using localhost:8888 Reading /lib64/libdl.so.2 from remote target... Reading /lib64/libSegFault.so from remote target... ... Reading /lib64/ld-linux-x86-64.so.2 from remote target... 0x00007f6b26857923 in __select_nocancel () from target:/lib64/libc.so.6 (gdb) where #0 0x00007f6b26857923 in __select_nocancel () from target:/lib64/libc.so.6 ... #9 0x00000000004497ee in main (argc=14, argv=0x7ffe8e4b0af8) at main.cpp:245 (gdb) c Continuing. ^C^CThe target is not responding to interrupt requests. Stop debugging it? (y or n) y Disconnected from target.