[PATCH v2 1/2] Display ExceptionRecord for $_siginfo
Eli Zaretskii
eliz@gnu.org
Sat Feb 8 20:13:00 GMT 2020
> From: Simon Marchi <simark@simark.ca>
> Date: Sat, 8 Feb 2020 15:00:10 -0500
>
> > Program received signal SIGSEGV, Segmentation fault.
> > main () at crasher.c:4
> > 4 *(int*)0x123 = 0;
> > (gdb) p $_siginfo
> > $1 = {
> > ExceptionCode = 3221225477,
> > ExceptionFlags = 0,
> > ExceptionRecord = 0x0,
> > ExceptionAddress = 0x401632 <main+18>,
> > NumberParameters = 2,
> > ExceptionInformation = {1, 291, 0 <repeats 13 times>}
> > }
> > (gdb) p/x $_siginfo.ExceptionCode
> > $2 = 0xc0000005
> > (gdb) p/x $_siginfo.ExceptionInformation[1]
> > $3 = 0x123
> >
> > And 0xc0000005 is the value of EXCEPTION_ACCESS_VIOLATION.
> >
> > [1] https://docs.microsoft.com/en-us/windows/win32/api/winnt/ns-winnt-exception_record
>
> Eli, could you please comment on this from a Windows user point of view, if this looks
> correct to you?
LGTM, although I'd prefer to have ExceptionCode be printed in hex by
default. But I guess that could be tricky, and the next patch makes
then print as symbolic names anyway.
> Also, does this need a manual/NEWS update?
I think only NEWS, because the manual already says "on some targets",
and gives an example from GNU/Linux only.
Thanks.
More information about the Gdb-patches
mailing list