From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 33345 invoked by alias); 8 Feb 2020 20:00:58 -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 33189 invoked by uid 89); 8 Feb 2020 20:00:40 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-5.3 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: simark.ca Received: from simark.ca (HELO simark.ca) (158.69.221.121) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 08 Feb 2020 20:00:21 +0000 Received: from [10.0.0.11] (unknown [192.222.164.54]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 708731E08E; Sat, 8 Feb 2020 15:00:11 -0500 (EST) Subject: Re: [PATCH v2 1/2] Display ExceptionRecord for $_siginfo To: Hannes Domani , gdb-patches@sourceware.org, Eli Zaretskii References: <20200208162614.4918-1-ssbssa.ref@yahoo.de> <20200208162614.4918-1-ssbssa@yahoo.de> From: Simon Marchi Message-ID: Date: Sat, 08 Feb 2020 20:00:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.2 MIME-Version: 1.0 In-Reply-To: <20200208162614.4918-1-ssbssa@yahoo.de> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2020-02/txt/msg00243.txt.bz2 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 , > NumberParameters = 2, > ExceptionInformation = {1, 291, 0 } > } > (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