diff options
author | John Baldwin <jhb@FreeBSD.org> | 2018-10-17 11:41:30 -0700 |
---|---|---|
committer | John Baldwin <jhb@FreeBSD.org> | 2018-10-17 11:42:00 -0700 |
commit | 6f3b1098e820cef84709ef71c287c4b72e6c671b (patch) | |
tree | 6c32813cdedcfb6114f14779cc2f2e49f815fb1a /gdb/fbsd-tdep.h | |
parent | d500b4f23fc329f5c8cce6ee8fa3629c0f130038 (diff) | |
download | gdb-6f3b1098e820cef84709ef71c287c4b72e6c671b.zip gdb-6f3b1098e820cef84709ef71c287c4b72e6c671b.tar.gz gdb-6f3b1098e820cef84709ef71c287c4b72e6c671b.tar.bz2 |
Share the code to format "info proc mappings" entries for FreeBSD.
gdb/ChangeLog:
* fbsd-nat.c (fbsd_nat_target::info_proc) Use
fbsd_info_proc_mappings_header and fbsd_info_proc_mappings_entry.
* fbsd-tdep.c (fbsd_vm_map_entry_flags): Mark static.
(fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
New functions.
(fbsd_core_info_proc_mappings): Use fbsd_info_proc_mappings_header
and fbsd_info_proc_mappings_header.
* fbsd-tdep.h (fbsd_vm_map_entry_flags): Remove.
(fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
New.
Diffstat (limited to 'gdb/fbsd-tdep.h')
-rw-r--r-- | gdb/fbsd-tdep.h | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/gdb/fbsd-tdep.h b/gdb/fbsd-tdep.h index e0cad7d..700f23e 100644 --- a/gdb/fbsd-tdep.h +++ b/gdb/fbsd-tdep.h @@ -42,11 +42,22 @@ extern void fbsd_info_proc_files_entry (int kf_type, int kf_fd, int kf_flags, const void *kf_sa_peer, const void *kf_path); -/* 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); +/* Output the header for "info proc mappings". ADDR_BIT is the size + of a virtual address in bits. */ + +extern void fbsd_info_proc_mappings_header (int addr_bit); + +/* Output description of a single memory range for "info proc + mappings". ADDR_BIT is the size of a virtual address in bits. The + KVE_START, KVE_END, KVE_OFFSET, KVE_FLAGS, and KVE_PROTECTION + parameters should contain the value of the corresponding fields in + a 'struct kinfo_vmentry'. The KVE_PATH parameter should contain a + pointer to the 'kve_path' field in a 'struct kinfo_vmentry'. */ + +extern void fbsd_info_proc_mappings_entry (int addr_bit, ULONGEST kve_start, + ULONGEST kve_end, + ULONGEST kve_offset, + int kve_flags, int kve_protection, + const void *kve_path); #endif /* fbsd-tdep.h */ |