NetBSD Problem Report #58325
From www@netbsd.org Sun Jun 9 12:04:49 2024
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256
client-signature RSA-PSS (2048 bits) client-digest SHA256)
(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id 8AE9D1A9238
for <gnats-bugs@gnats.NetBSD.org>; Sun, 9 Jun 2024 12:04:49 +0000 (UTC)
Message-Id: <20240609120448.211501A923A@mollari.NetBSD.org>
Date: Sun, 9 Jun 2024 12:04:48 +0000 (UTC)
From: campbell+netbsd@mumble.net
Reply-To: campbell+netbsd@mumble.net
To: gnats-bugs@NetBSD.org
Subject: gdb lacks support for $_siginfo
X-Send-Pr-Version: www-1.0
>Number: 58325
>Category: bin
>Synopsis: gdb lacks support for $_siginfo
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: bin-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Jun 09 12:05:00 +0000 2024
>Originator: Taylor R Campbell
>Release: current, 10, 9, ...
>Organization:
The NetGDB Siginformation
>Environment:
>Description:
According to https://sourceware.org/gdb/current/onlinedocs/gdb.html/Signals.html:
> On some targets, GDB can inspect extra signal information associated with the intercepted signal, before it is actually delivered to the program being debugged. This information is exported by the convenience variable $_siginfo, and consists of data that is passed by the kernel to the signal handler at the time of the receipt of a signal. The data type of the information itself is target dependent. You can see the data type using the ptype $_siginfo command. On Unix systems, it typically corresponds to the standard siginfo_t type, as defined in the signal.h system header.
But:
(gdb) run
Starting program: /tmp/riastradh/bar
Program received signal SIGSEGV, Segmentation fault.
main () at bar.c:6
6 *p = 0;
(gdb) print $_siginfo
$1 = void
(gdb) ptype $_siginfo
type = void
>How-To-Repeat:
1. Run a program that gets a signal under gdb.
2. print $_siginfo
3. ptype $_siginfo
>Fix:
Yes, please!
(Contact us)
$NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2024
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.