aboutsummaryrefslogtreecommitdiff
path: root/gdb/fbsd-tdep.c
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2020-07-09 09:39:05 -0700
committerJohn Baldwin <jhb@FreeBSD.org>2020-07-09 09:39:05 -0700
commitfc238d4a066cdb1a979475ffdf5bd45cdb8a00f0 (patch)
tree1ffb5fb644d6a3124c3c02936e5d0f5ffdd380ca /gdb/fbsd-tdep.c
parent939b95c77bf273b252a49334844c469bd28356a9 (diff)
downloadgdb-fc238d4a066cdb1a979475ffdf5bd45cdb8a00f0.zip
gdb-fc238d4a066cdb1a979475ffdf5bd45cdb8a00f0.tar.gz
gdb-fc238d4a066cdb1a979475ffdf5bd45cdb8a00f0.tar.bz2
Support several new ELF auxiliary vector types on FreeBSD.
FreeBSD's kernel recently added several ELF auxiliary vector entries to describe the arguments passed to new executable images during exec(). The AT_FREEBSD_ARGC and AT_FREEBSD_ARGV entries give the length and address of the process argument array. AT_FREEBSD_ENVC and AT_FREEBSD_ENVV entries give the length and address of the initial process environment. AT_FREEBSD_PS_STRINGS gives the address of the 'struct ps_strings' object. include/ChangeLog: * elf/common.h (AT_FREEBSD_ARGC, AT_FREEBSD_ARGV, AT_FREEBSD_ENVC) (AT_FREEBSD_ENVV, AT_FREEBSD_PS_STRINGS): Define. gdb/ChangeLog: * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_FREEBSD_ARGC, AT_FREEBSD_ARGV, AT_FREEBSD_ENVC, AT_FREEBSD_ENVV, AT_FREEBSD_PS_STRINGS.
Diffstat (limited to 'gdb/fbsd-tdep.c')
-rw-r--r--gdb/fbsd-tdep.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gdb/fbsd-tdep.c b/gdb/fbsd-tdep.c
index acf787c..557c5d3 100644
--- a/gdb/fbsd-tdep.c
+++ b/gdb/fbsd-tdep.c
@@ -1598,6 +1598,11 @@ fbsd_print_auxv_entry (struct gdbarch *gdbarch, struct ui_file *file,
TAG (HWCAP, _("Machine-dependent CPU capability hints"), AUXV_FORMAT_HEX);
TAG (HWCAP2, _("Extension of AT_HWCAP"), AUXV_FORMAT_HEX);
TAG (BSDFLAGS, _("ELF BSD flags"), AUXV_FORMAT_HEX);
+ TAG (ARGC, _("Argument count"), AUXV_FORMAT_DEC);
+ TAG (ARGV, _("Argument vector"), AUXV_FORMAT_HEX);
+ TAG (ENVC, _("Environment count"), AUXV_FORMAT_DEC);
+ TAG (ENVV, _("Environment vector"), AUXV_FORMAT_HEX);
+ TAG (PS_STRINGS, _("Pointer to ps_strings"), AUXV_FORMAT_HEX);
}
fprint_auxv_entry (file, name, description, format, type, val);