aboutsummaryrefslogtreecommitdiff
path: root/gdb/fbsd-tdep.h
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2018-01-09 13:35:17 -0800
committerJohn Baldwin <jhb@FreeBSD.org>2018-01-09 13:35:17 -0800
commitd2176225dc982c22640215a0e611e997e8eeb030 (patch)
tree3fbfad21e9f1df443eca7e421b2b31b4ca521639 /gdb/fbsd-tdep.h
parent74ccf6db1188b7b05c716f8382d28b276ec578ec (diff)
downloadgdb-d2176225dc982c22640215a0e611e997e8eeb030.zip
gdb-d2176225dc982c22640215a0e611e997e8eeb030.tar.gz
gdb-d2176225dc982c22640215a0e611e997e8eeb030.tar.bz2
Support 'info proc' for FreeBSD process core dumps.
- Command line arguments are obtained from the pr_psargs[] array saved in the NT_PRPSINFO note. - The 'cwd' and 'exe' values are obtained from the per-process file descriptor table stored in the NT_PROCSTAT_FILES core note. - 'mappings' is implemented by walking the array of VM map entries stored in the NT_PROCSTAT_VMMAP core note. - 'status' output is generated by outputting fields from the first structure stored in the NT_PROCSTAT_PROC core note. - 'stat' is aliased to 'status'. gdb/ChangeLog: * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET) (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ) (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW) (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP) (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP) (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD) (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD) (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout) (kinfo_proc_layout_32, kinfo_proc_layout_i386) (kinfo_proc_layout_64, fbsd_vm_map_entry_flags) (fbsd_core_info_proc_mappings, fbsd_core_vnode_path) (fbsd_core_fetch_timeval, fbsd_print_sigset) (fbsd_core_info_proc_status, fbsd_core_info_proc): New. (fbsd_init_abi): Install gdbarch "core_info_proc" method. * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
Diffstat (limited to 'gdb/fbsd-tdep.h')
-rw-r--r--gdb/fbsd-tdep.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/gdb/fbsd-tdep.h b/gdb/fbsd-tdep.h
index 9769903..0b293e5 100644
--- a/gdb/fbsd-tdep.h
+++ b/gdb/fbsd-tdep.h
@@ -22,4 +22,11 @@
extern void fbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch);
+/* Helper function to generate mappings flags for a single VM map
+ entry in 'info proc mappings'. The KVE_FLAGS and KVE_PROTECTION
+ parameters should contain the values of the corresponding fields in
+ a 'struct kinfo_vmentry'. */
+
+extern const char *fbsd_vm_map_entry_flags (int kve_flags, int kve_protection);
+
#endif /* fbsd-tdep.h */