NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

bin/58325: gdb lacks support for $_siginfo



>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!



Home | Main Index | Thread Index | Old Index