summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2015-02-14 17:12:31 +0000
committerjhb <jhb@FreeBSD.org>2015-02-14 17:12:31 +0000
commitde820a9105c29893835e5d97c94d0acdcb8b5cbf (patch)
treeceebc6adcd8102452bc7d017b5d0e3d6ebeed780
parent4247c4fbb3c08542de966e57e8767f2c079df26a (diff)
downloadFreeBSD-src-de820a9105c29893835e5d97c94d0acdcb8b5cbf.zip
FreeBSD-src-de820a9105c29893835e5d97c94d0acdcb8b5cbf.tar.gz
Include OBJT_PHYS VM objects in ELF core dumps. In particular this
includes the shared page allowing debuggers to use the signal trampoline code to identify signal frames in core dumps. Differential Revision: https://reviews.freebsd.org/D1828 Reviewed by: alc, kib MFC after: 1 week
-rw-r--r--sys/kern/imgact_elf.c3
-rw-r--r--usr.bin/gcore/elfcore.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c
index 53abf92..4df182a 100644
--- a/sys/kern/imgact_elf.c
+++ b/sys/kern/imgact_elf.c
@@ -1401,7 +1401,8 @@ each_writable_segment(td, func, closure)
object = backing_object;
}
ignore_entry = object->type != OBJT_DEFAULT &&
- object->type != OBJT_SWAP && object->type != OBJT_VNODE;
+ object->type != OBJT_SWAP && object->type != OBJT_VNODE &&
+ object->type != OBJT_PHYS;
VM_OBJECT_RUNLOCK(object);
if (ignore_entry)
continue;
diff --git a/usr.bin/gcore/elfcore.c b/usr.bin/gcore/elfcore.c
index d487b21..2d1acb8 100644
--- a/usr.bin/gcore/elfcore.c
+++ b/usr.bin/gcore/elfcore.c
@@ -511,7 +511,8 @@ readmap(pid_t pid)
((pflags & PFLAGS_FULL) == 0 &&
kve->kve_type != KVME_TYPE_DEFAULT &&
kve->kve_type != KVME_TYPE_VNODE &&
- kve->kve_type != KVME_TYPE_SWAP))
+ kve->kve_type != KVME_TYPE_SWAP &&
+ kve->kve_type != KVME_TYPE_PHYS))
continue;
ent = calloc(1, sizeof(*ent));
OpenPOWER on IntegriCloud