From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id CB9AD3858406; Tue, 26 Apr 2022 14:59:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CB9AD3858406 From: "aburgess at redhat dot com" 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 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: remote X-Bugzilla-Version: 7.9 X-Bugzilla-Keywords: X-Bugzilla-Severity: critical X-Bugzilla-Who: aburgess at redhat dot com X-Bugzilla-Status: REOPENED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: attachments.created Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gdb-prs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-prs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Apr 2022 14:59:19 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D18772 --- Comment #12 from Andrew Burgess --- Created attachment 14082 --> https://sourceware.org/bugzilla/attachment.cgi?id=3D14082&action=3Ded= it A reproducer for this issue The attached file sig-c-bug.c is a reproducer for this issue. The bug impa= cts 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 li= ne 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 gdbse= rver 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 interrupt= ed. --=20 You are receiving this mail because: You are on the CC list for the bug.=