From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 7E46A385B53D; Sun, 27 Nov 2022 09:32:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7E46A385B53D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1669541520; bh=rYArieAhv9SX6dUa7fk+k54WKYhpIXjtXjdzthmmiYo=; h=From:To:Subject:Date:In-Reply-To:References:From; b=CAvUsOoFoPdte00P0JLJK3s7LnIp0S+DFGsDHvu6fD+TWuoR3dm1RBb6GMAqmpgrg 0aOeG+6wcxgtdD/2y0KxnUDzF4sOMK/go0fQzflYmNMd22Z26dlMmXnshKHF49i3E5 mlqKCZ8h1Han2LR79U+k92ryA2PRJ3mvI27gCj6E= From: "cvs-commit at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug remote/18772] gdb does not respond to CTRL-C Date: Sun, 27 Nov 2022 09:31:56 +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: cvs-commit at gcc dot gnu.org 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: 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 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D18772 --- Comment #16 from cvs-commit at gcc dot gnu.org --- The master branch has been updated by Tom de Vries : https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D4c35c4c6a779= c79e456b7a5311f74aafc9026bd5 commit 4c35c4c6a779c79e456b7a5311f74aafc9026bd5 Author: Tom de Vries Date: Sun Nov 27 10:31:50 2022 +0100 [gdb/server] Emit warning for SIGINT failure Consider the executable from test-case gdb.base/interrupt-daemon.exp. When starting it using gdbserver: ... $ ./build/gdbserver/gdbserver localhost:2345 \ ./outputs/gdb.base/interrupt-daemon/interrupt-daemon ... and connecting to it using gdb: ... $ gdb -q -ex "target remote localhost:2345" \ -ex "set follow-fork-mode child" \ -ex "break daemon_main" -ex cont ... we are setup to do the same as in the test-case: interrupt a running inferior using ^C. So let's try: ... (gdb) continue Continuing. ^C ... After pressing ^C, nothing happens. This a known problem, filed as PR remote/18772. The problem is that in linux_process_target::request_interrupt, a kill = is used to send a SIGINT, but it fails. And it fails silently. Make the failure verbose by adding a warning, such that the gdbserver output becomes more helpful: ... Process interrupt-daemon created; pid =3D 15068 Listening on port 2345 Remote debugging from host ::1, port 35148 Detaching from process 15068 Detaching from process 15085 gdbserver: Sending SIGINT to process group of pid 15068 failed: \ No such process ... Note that the failure can easily be reproduced using the test-case and target board native-gdbserver: ... (gdb) continue^M Continuing.^M PASS: gdb.base/interrupt-daemon.exp: fg: continue ^CFAIL: gdb.base/interrupt-daemon.exp: fg: ctrl-c stops process (timeou= t) ... as reported in PR server/23382. Tested on x86_64-linux. Approved-By: Simon Marchi --=20 You are receiving this mail because: You are on the CC list for the bug.=