aboutsummaryrefslogtreecommitdiff
path: root/gdb/auxv.c
diff options
context:
space:
mode:
authorRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>2018-09-20 10:23:46 +0200
committerRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>2018-09-20 10:23:46 +0200
commit3d282ac37064ec0105d3aa3f379f7fb8af98759c (patch)
treea8610dea4bf9f680343604c6a0e326da53a9226c /gdb/auxv.c
parent8c93fae61550ee343ad15e98a6636c56bcb0dc9d (diff)
downloadfsf-binutils-gdb-3d282ac37064ec0105d3aa3f379f7fb8af98759c.zip
fsf-binutils-gdb-3d282ac37064ec0105d3aa3f379f7fb8af98759c.tar.gz
fsf-binutils-gdb-3d282ac37064ec0105d3aa3f379f7fb8af98759c.tar.bz2
Handle missing Solaris auxv entries
Currently, three tests FAIL on Solaris 11.4+ (amd64-pc-solaris2.11 and sparcv9-sun-solaris2.11): info auxv [...] 2009 AT_SUN_HWCAP Machine-dependent CPU capability hints 0x3f5ff7 2023 ??? 0x0 0 AT_NULL End of vector 0x0 (gdb) WARNING: Unrecognized tag value: 2023 ??? 0x0 FAIL: gdb.base/auxv.exp: info auxv on live process info auxv 4294969310 ??? 0x7fffbfffe410 9225589753816 ??? 0x7fffbfffe45c [...] WARNING: Unrecognized tag value: 4294969310 ??? 0x7fffbfffe410 WARNING: Unrecognized tag value: 9225589753816 ??? 0x7fffbfffe45c WARNING: Unrecognized tag value: 140733193388037 ??? 0x6 [...] 2009 AT_SUN_HWCAP Machine-dependent CPU capability hints 0x3f5ff7 2023 ??? 0x0 0 AT_NULL End of vector 0x0 (gdb) WARNING: Unrecognized tag value: 2023 ??? 0x0 UNRESOLVED: gdb.base/auxv.exp: info auxv on native core dump info auxv [...] 2009 AT_SUN_HWCAP Machine-dependent CPU capability hints 0x3f5ff7 2023 ??? 0x0 0 AT_NULL End of vector 0x0 (gdb) WARNING: Unrecognized tag value: 2023 ??? 0x0 FAIL: gdb.base/auxv.exp: info auxv on gcore-created dump The following patch fixes this by introducing the missing AT_SUN_* values from Solaris 11.4+ <sys/auxv.h>. This lets the live and gcore-created dump tests PASS. I don't know yet what's the reason for those weird 'Unrecognized tag value' warnings with native core dumps is; elfdump -n certainly doesn't show them. However, native core dumps still need quite some work (mostly in bfd) in this and other areas. Tested on amd64-pc-solaris2.11. gdb: * auxv.c (default_print_auxv_entry): Reflect AT_SUN_CAP_HW1 renaming. Handle AT_SUN_EMULATOR, AT_SUN_BRANDNAME, AT_SUN_BRAND_AUX1, AT_SUN_BRAND_AUX2, AT_SUN_BRAND_AUX3, AT_SUN_CAP_HW2. include: * elf/common.h (AT_SUN_HWCAP): Rename to ... (AT_SUN_CAP_HW1): ... this. Retain old name for backward compatibility. (AT_SUN_EMULATOR, AT_SUN_BRANDNAME, AT_SUN_BRAND_AUX1) (AT_SUN_BRAND_AUX2, AT_SUN_BRAND_AUX3, AT_SUN_CAP_HW2): Define.
Diffstat (limited to 'gdb/auxv.c')
-rw-r--r--gdb/auxv.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/gdb/auxv.c b/gdb/auxv.c
index 13bf9c3..2148b52 100644
--- a/gdb/auxv.c
+++ b/gdb/auxv.c
@@ -493,7 +493,7 @@ default_print_auxv_entry (struct gdbarch *gdbarch, struct ui_file *file,
AUXV_FORMAT_STR);
TAG (AT_SUN_LPAGESZ, _("Large pagesize"), AUXV_FORMAT_DEC);
TAG (AT_SUN_PLATFORM, _("Platform name string"), AUXV_FORMAT_STR);
- TAG (AT_SUN_HWCAP, _("Machine-dependent CPU capability hints"),
+ TAG (AT_SUN_CAP_HW1, _("Machine-dependent CPU capability hints"),
AUXV_FORMAT_HEX);
TAG (AT_SUN_IFLUSH, _("Should flush icache?"), AUXV_FORMAT_DEC);
TAG (AT_SUN_CPU, _("CPU name string"), AUXV_FORMAT_STR);
@@ -507,6 +507,17 @@ default_print_auxv_entry (struct gdbarch *gdbarch, struct ui_file *file,
AUXV_FORMAT_HEX);
TAG (AT_SUN_AUXFLAGS,
_("AF_SUN_ flags passed from the kernel"), AUXV_FORMAT_HEX);
+ TAG (AT_SUN_EMULATOR, _("Name of emulation binary for runtime linker"),
+ AUXV_FORMAT_STR);
+ TAG (AT_SUN_BRANDNAME, _("Name of brand library"), AUXV_FORMAT_STR);
+ TAG (AT_SUN_BRAND_AUX1, _("Aux vector for brand modules 1"),
+ AUXV_FORMAT_HEX);
+ TAG (AT_SUN_BRAND_AUX2, _("Aux vector for brand modules 2"),
+ AUXV_FORMAT_HEX);
+ TAG (AT_SUN_BRAND_AUX3, _("Aux vector for brand modules 3"),
+ AUXV_FORMAT_HEX);
+ TAG (AT_SUN_CAP_HW2, _("Machine-dependent CPU capability hints 2"),
+ AUXV_FORMAT_HEX);
}
fprint_auxv_entry (file, name, description, format, type, val);