From patchwork Fri Jan 12 20:13:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Baldwin X-Patchwork-Id: 25368 Received: (qmail 80610 invoked by alias); 12 Jan 2018 20:13:51 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 80601 invoked by uid 89); 12 Jan 2018 20:13:50 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-23.7 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_HELO_PASS, SPF_SOFTFAIL autolearn=ham version=3.3.2 spammy= X-HELO: mail.baldwin.cx Received: from bigwig.baldwin.cx (HELO mail.baldwin.cx) (96.47.65.170) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 12 Jan 2018 20:13:48 +0000 Received: from ralph.baldwin.cx.com (astound-66-234-199-215.ca.astound.net [66.234.199.215]) by mail.baldwin.cx (Postfix) with ESMTPSA id 8174A10A8BC for ; Fri, 12 Jan 2018 15:13:46 -0500 (EST) From: John Baldwin To: gdb-patches@sourceware.org Subject: [PUSHED OBV] Use the correct value for the offset of 'kve_protection'. Date: Fri, 12 Jan 2018 12:13:06 -0800 Message-Id: <20180112201306.12844-1-jhb@FreeBSD.org> X-IsSubscribed: yes I had forgotten to convert the decimal output of 'ptype /o' to hex (but still used a 0x prefix) for the KVE_PROTECTION constant defining the offset of the 'kve_protection' field in the 'kinfo_vmentry' structure. This resulted in garbage permissions for entries in 'info proc mappings' for FreeBSD core dumps. gdb/ChangeLog: * fbsd-tdep.c (KVE_PROTECTION): Correct value. --- gdb/ChangeLog | 4 ++++ gdb/fbsd-tdep.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 66ca03d0ec..1c52f5f17b 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2018-01-12 John Baldwin + + * fbsd-tdep.c (KVE_PROTECTION): Correct value. + 2018-01-12 Andreas Arnez * infrun.c (keep_going_pass_signal): Clear step-over info when diff --git a/gdb/fbsd-tdep.c b/gdb/fbsd-tdep.c index 8aa0243d54..e49a9aff09 100644 --- a/gdb/fbsd-tdep.c +++ b/gdb/fbsd-tdep.c @@ -62,7 +62,7 @@ #define KVE_END 0x10 #define KVE_OFFSET 0x18 #define KVE_FLAGS 0x2c -#define KVE_PROTECTION 0x56 +#define KVE_PROTECTION 0x38 #define KVE_PATH 0x88 /* Flags in the 'kve_protection' field in struct kinfo_vmentry. These