From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 107486 invoked by alias); 8 Feb 2020 21:09:27 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 107476 invoked by uid 89); 8 Feb 2020 21:09:27 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-21.9 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.1 spammy=HX-Languages-Length:2057, H*x:5.0, H*x:Windows X-HELO: sonic314-20.consmr.mail.ir2.yahoo.com Received: from sonic314-20.consmr.mail.ir2.yahoo.com (HELO sonic314-20.consmr.mail.ir2.yahoo.com) (77.238.177.146) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 08 Feb 2020 21:09:25 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.de; s=s2048; t=1581196163; bh=qwC2TqL4KYZdW1Ymaw0ZY+pQsebQ2bYcXnJdLtcFUm4=; h=Date:From:To:In-Reply-To:References:Subject:From:Subject; b=oHgPgKPkDItdxMv5b6u/Y7eFmdavlwQOz8oeuxGLtiFsWerk7Rmhwd5CcUQC6B4ubd2oKHYEz4nWCCUVNe8TWp7e+O6k8vjrgXhLmbsFv6c4V8QPhoJNndsUopB0AcKAYXRKEkzzxWVc3gSktDnoCN+P/yZ36ORQozzscW7Hd1xbXhi92lh+YLcmp9sib8toqJVGqZwemJfnom3HqVOnINQqR1ux16iJmQLo5IfTncaZTkgPlzMzJ0nCNwuFxjDSmmGv1BdOFKhf11WxxhjX9cmjNONrOdFC48ADCsE7mGX8USNPGfnjUttsxAB4D5WPm7uJo3A81aPVBBWQb1l83g== Received: from sonic.gate.mail.ne1.yahoo.com by sonic314.consmr.mail.ir2.yahoo.com with HTTP; Sat, 8 Feb 2020 21:09:23 +0000 Date: Sat, 08 Feb 2020 21:09:00 -0000 From: "Hannes Domani via gdb-patches" Reply-To: Hannes Domani To: Gdb-patches Message-ID: <955533175.395475.1581196161533@mail.yahoo.com> In-Reply-To: <83r1z4dehn.fsf@gnu.org> References: <20200208162614.4918-1-ssbssa.ref@yahoo.de> <20200208162614.4918-1-ssbssa@yahoo.de> <83r1z4dehn.fsf@gnu.org> Subject: Re: [PATCH v2 1/2] Display ExceptionRecord for $_siginfo MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2020-02/txt/msg00248.txt.bz2 Am Samstag, 8. Februar 2020, 21:13:54 MEZ hat Eli Zaretskii = Folgendes geschrieben: > > From: Simon Marchi > > Date: Sat, 8 Feb 2020 15:00:10 -0500 > > > > > Program received signal SIGSEGV, Segmentation fault. > > > main () at crasher.c:4 > > > 4=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 *(int*)0x123 =3D 0; > > > (gdb) p $_siginfo > > > $1 =3D { > > >=C2=A0 ExceptionCode =3D 3221225477, > > >=C2=A0 ExceptionFlags =3D 0, > > >=C2=A0 ExceptionRecord =3D 0x0, > > >=C2=A0 ExceptionAddress =3D 0x401632 , > > >=C2=A0 NumberParameters =3D 2, > > >=C2=A0 ExceptionInformation =3D {1, 291, 0 } > > > } > > > (gdb) p/x $_siginfo.ExceptionCode > > > $2 =3D 0xc0000005 > > > (gdb) p/x $_siginfo.ExceptionInformation[1] > > > $3 =3D 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.=C2=A0 But I guess that could be tricky, and the next patch makes > then print as symbolic names anyway. These were basically the same thoughts I had when I made this. > > 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. Is it fine if I add the following to this patch?: =C2=A0=C2=A0 =C2=A0* NEWS: Mention $_siginfo support for Windows. --- diff --git a/gdb/NEWS b/gdb/NEWS index d4e2e70f38..c202fe06de 100644 --- a/gdb/NEWS +++ b/gdb/NEWS @@ -10,6 +10,9 @@ =C2=A0=C2=A0 that support it (see entry for GDB 9, below), providing faster =C2=A0=C2=A0 performance for programs with many symbols. +* The $_siginfo convenience variable now also works on Windows targets, +=C2=A0 and will display the EXCEPTION_RECORD of the last handled exception. + =C2=A0* New commands =C2=A0set exec-file-mismatch -- Set exec-file-mismatch handling (ask|warn|o= ff).