public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PUSHED OBV] Use the correct value for the offset of 'kve_protection'.
@ 2018-01-12 20:13 John Baldwin
  0 siblings, 0 replies; only message in thread
From: John Baldwin @ 2018-01-12 20:13 UTC (permalink / raw)
  To: gdb-patches

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  <jhb@FreeBSD.org>
+
+	* fbsd-tdep.c (KVE_PROTECTION): Correct value.
+
 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
 
 	* 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
-- 
2.15.1

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-01-12 20:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-12 20:13 [PUSHED OBV] Use the correct value for the offset of 'kve_protection' John Baldwin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).