From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 4A49D385800C; Fri, 17 Sep 2021 12:05:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4A49D385800C From: "vries at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug threads/28347] FAIL: gdb.threads/signal-sigtrap.exp: sigtrap thread 1: signal SIGTRAP reaches handler Date: Fri, 17 Sep 2021 12:05:56 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: threads X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: vries at gcc dot gnu.org X-Bugzilla-Status: NEW 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: cc 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: Fri, 17 Sep 2021 12:05:56 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D28347 Tom de Vries changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |palves at sourceware dot o= rg, | |simark at simark dot ca --- Comment #2 from Tom de Vries --- So, what I understand that happens is: - gdb command "signal SIGTRAP" sends the signal to the main thread using PTRACE_CONT - the signal is blocked, so it becomes pending - when the signal is unblocked, the pending signal is delivered, but because the inferior is ptraced, gdb is notified, and gdb does the stop/print/pass processing. This seems to contradict the documentation, which states: ... Invoking the signal command is not the same as invoking the kill utility fr= om the shell. Sending a signal with kill causes GDB to decide what to do with = the signal depending on the signal handling tables (see Signals). The signal command passes the signal directly to your program.=20 ... I'm not sure whether the documentation needs to be updated, or gdb needs to= be fixed (and indeed, can be fixed). --=20 You are receiving this mail because: You are on the CC list for the bug.=