From: Simon Marchi <simark@simark.ca>
To: Hannes Domani <ssbssa@yahoo.de>,
gdb-patches@sourceware.org, Eli Zaretskii <eliz@gnu.org>
Subject: Re: [PATCH v2 1/2] Display ExceptionRecord for $_siginfo
Date: Sat, 08 Feb 2020 20:00:00 -0000 [thread overview]
Message-ID: <f1db8d62-68d7-b912-89e4-1b83127ebea3@simark.ca> (raw)
In-Reply-To: <20200208162614.4918-1-ssbssa@yahoo.de>
On 2020-02-08 11:26 a.m., Hannes Domani via gdb-patches wrote:
> Uses the $_siginfo convenience variable to show the last exception.
>
> The type looks like this:
>
> (gdb) pt $_siginfo
> type = struct EXCEPTION_RECORD {
> DWORD ExceptionCode;
> DWORD ExceptionFlags;
> struct EXCEPTION_RECORD *ExceptionRecord;
> PVOID ExceptionAddress;
> DWORD NumberParameters;
> ULONG_PTR ExceptionInformation[15];
> }
>
> EXCEPTION_RECORD is documented at [1].
>
> Example:
>
> 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? Also, does this need a manual/NEWS update?
The patch otherwise looks ok to me.
Simon
next prev parent reply other threads:[~2020-02-08 20:00 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20200208162614.4918-1-ssbssa.ref@yahoo.de>
2020-02-08 16:26 ` Hannes Domani via gdb-patches
2020-02-08 16:26 ` [PATCH v2 2/2] Use enums for human-readable exception information Hannes Domani via gdb-patches
2020-02-08 20:04 ` Simon Marchi
2020-02-08 20:15 ` Eli Zaretskii
2020-02-08 20:00 ` Simon Marchi [this message]
2020-02-08 20:13 ` [PATCH v2 1/2] Display ExceptionRecord for $_siginfo Eli Zaretskii
2020-02-08 21:09 ` Hannes Domani via gdb-patches
2020-02-09 3:28 ` Eli Zaretskii
2020-02-09 5:33 ` Simon Marchi
2020-02-09 11:19 ` Hannes Domani via gdb-patches
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f1db8d62-68d7-b912-89e4-1b83127ebea3@simark.ca \
--to=simark@simark.ca \
--cc=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
--cc=ssbssa@yahoo.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox