aboutsummaryrefslogtreecommitdiff
path: root/gdb/target.h
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2018-09-06 15:03:19 -0700
committerJohn Baldwin <jhb@FreeBSD.org>2018-09-06 15:07:59 -0700
commit739ab2e92e1840c9285f3cfce1f1236c0fa68730 (patch)
treec73a69f78dcdbc8f709727803a395c1d27402425 /gdb/target.h
parentd82b3862f1218134f5301ed990c6db48fcb82b2f (diff)
downloadfsf-binutils-gdb-739ab2e92e1840c9285f3cfce1f1236c0fa68730.zip
fsf-binutils-gdb-739ab2e92e1840c9285f3cfce1f1236c0fa68730.tar.gz
fsf-binutils-gdb-739ab2e92e1840c9285f3cfce1f1236c0fa68730.tar.bz2
Generate NT_PROCSTAT_{AUXV,VMMAP,PS_STRINGS} in FreeBSD coredumps
gcore generates NT_AUXV and NT_FILE notes for Linux targets. On FreeBSD auxv is stored in a NT_PROCSTAT_AUXV section, virtual memory mappings are stored in a NT_PROCSTAT_VMMAP, and both are prefixed with the struct size. In addition, store a NT_PROCSTAT_PS_STRINGS note saving the initial location of the argv[] and environment[] arrays. gdb/ChangeLog: PR gdb/23105 * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS. * fbsd-tdep.c (fbsd_make_note_desc): New. (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV, NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes. * target.h (enum target_object) Add FreeBSD-specific TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
Diffstat (limited to 'gdb/target.h')
-rw-r--r--gdb/target.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/gdb/target.h b/gdb/target.h
index 229b5d0..a3000c8 100644
--- a/gdb/target.h
+++ b/gdb/target.h
@@ -202,6 +202,10 @@ enum target_object
of the process ID of the process in question, in hexadecimal
format. */
TARGET_OBJECT_EXEC_FILE,
+ /* FreeBSD virtual memory mappings. */
+ TARGET_OBJECT_FREEBSD_VMMAP,
+ /* FreeBSD process strings. */
+ TARGET_OBJECT_FREEBSD_PS_STRINGS,
/* Possible future objects: TARGET_OBJECT_FILE, ... */
};