public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
From: "aburgess at redhat dot com" <sourceware-bugzilla@sourceware.org> To: gdb-prs@sourceware.org Subject: [Bug remote/18772] gdb does not respond to CTRL-C Date: Tue, 26 Apr 2022 14:59:19 +0000 [thread overview] Message-ID: <bug-18772-4717-Ae0x2MbKMc@http.sourceware.org/bugzilla/> (raw) In-Reply-To: <bug-18772-4717@http.sourceware.org/bugzilla/> https://sourceware.org/bugzilla/show_bug.cgi?id=18772 --- Comment #12 from Andrew Burgess <aburgess at redhat dot com> --- Created attachment 14082 --> https://sourceware.org/bugzilla/attachment.cgi?id=14082&action=edit A reproducer for this issue The attached file sig-c-bug.c is a reproducer for this issue. The bug impacts not just remote targets, but also native Linux targets too as of commit 2b718529b99. Compile up the attached file as: gcc -g3 -O0 -Wall -Wextra -Werror -o sig-c-bug.x sig-c-bug.c Then run the test as: ./gdb/gdb --data-directory ./gdb/data-directory/ \ ~/tmp/sig-c-bug.x \ -q \ -ex 'set detach-on-fork off' \ -ex 'set follow-fork-mode parent' \ -ex 'run' \ -ex 'info inferiors' \ -ex 'inferior 2' \ -ex 'continue' You should end up with inferior 2 running, every second you'll see a new line of this output: Tick: 0 Tick: 1 Tick: 2 Tick: 3 Tick: 4 ... and so on ... try to interrupt gdb using ctrl-c ... it doesn't work for me. Inferior 2 will automatically exit after 'Tick: 9', at which point you need to restart the test. The same behaviour can be seen when using a remote target, just start gdbserver something like: gdbserver --multi :54321 sig-c-bug.x and then: ./gdb/gdb --data-directory ./gdb/data-directory/ \ ~/tmp/sig-c-bug.x \ -q \ -ex 'set sysroot /' \ -ex 'set detach-on-fork off' \ -ex 'set follow-fork-mode parent' \ -ex 'target extended-remote :54321' \ -ex 'continue' \ -ex 'info inferiors' \ -ex 'inferior 2' \ -ex 'continue' and the remote target will be ticking in inferior 2, and can't be interrupted. -- You are receiving this mail because: You are on the CC list for the bug.
next prev parent reply other threads:[~2022-04-26 14:59 UTC|newest] Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top 2015-08-05 11:32 [Bug remote/18772] New: " moorel at ntlworld dot com 2020-04-20 8:55 ` [Bug remote/18772] " massimo.b at gmx dot net 2020-08-18 2:45 ` paul at sourceware dot m.darkrain42.org 2020-10-10 15:49 ` rarul at rarul dot com 2020-10-12 6:15 ` matic.kres at isystem dot si 2022-04-16 14:02 ` aburgess at redhat dot com 2022-04-19 10:26 ` moorel at ntlworld dot com 2022-04-24 22:08 ` richsurgenor at gmail dot com 2022-04-24 22:27 ` richsurgenor at gmail dot com 2022-04-25 13:22 ` aburgess at redhat dot com 2022-04-26 14:59 ` aburgess at redhat dot com [this message] 2022-06-22 10:52 ` ghjghj530-bubu at yahoo dot de 2022-06-22 16:42 ` pedro at palves dot net 2022-08-14 21:25 ` dominik.b.czarnota+bugzilla at gmail dot com 2022-08-30 8:40 ` filip.bascarevic at siemens dot com 2022-11-27 9:31 ` cvs-commit at gcc dot gnu.org 2023-03-20 15:53 ` eldar.abusalimov at jetbrains dot com 2023-03-21 14:58 ` tromey at sourceware dot org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-18772-4717-Ae0x2MbKMc@http.sourceware.org/bugzilla/ \ --to=sourceware-bugzilla@sourceware.org \ --cc=gdb-prs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).