On 2/25/20 12:10 PM, Luis Machado wrote:
I noticed GDB didn't know a particular AT tag (51) when doing some debugging.
Turns out we're missing a few entries compared to glibc's headers.
This patch adds them to the ELF include file and GDB.
include/ChangeLog:
* elf/common.h (AT_L1I_CACHESIZE, AT_L1I_CACHEGEOMETRY,
AT_L1D_CACHESIZE, AT_L1D_CACHEGEOMETRY, AT_L2_CACHESIZE,
AT_L2_CACHEGEOMETRY, AT_L3_CACHESIZE, AT_L3_CACHEGEOMETRY,
AT_MINSIGSTKSZ): New defines, imported from glibc.
The standard says to split lines by closing and reopening parens,
instead of comma. Like:
* elf/common.h (AT_L1I_CACHESIZE, AT_L1I_CACHEGEOMETRY)
(AT_L1D_CACHESIZE, AT_L1D_CACHEGEOMETRY, AT_L2_CACHESIZE)
(AT_L2_CACHEGEOMETRY, AT_L3_CACHESIZE, AT_L3_CACHEGEOMETRY)
(AT_MINSIGSTKSZ): New defines, imported from glibc.
gdb/ChangeLog:
* auxv.c (default_print_auxv_entry): Add new auxv entries.
---
gdb/auxv.c | 12 ++++++++++++
include/elf/common.h | 15 +++++++++++++++
2 files changed, 27 insertions(+)
diff --git a/gdb/auxv.c b/gdb/auxv.c
index eb1233527e..e7432e1852 100644
--- a/gdb/auxv.c
+++ b/gdb/auxv.c
@@ -497,6 +497,18 @@ default_print_auxv_entry (struct gdbarch *gdbarch, struct ui_file *file,
AUXV_FORMAT_HEX);
TAG (AT_SUN_CAP_HW2, _("Machine-dependent CPU capability hints 2"),
AUXV_FORMAT_HEX);
+ TAG (AT_L1I_CACHESIZE , _("L1 Instruction cache size"), AUXV_FORMAT_HEX);
+ TAG (AT_L1I_CACHEGEOMETRY , _("L1 Instruction cache geometry"),
+ AUXV_FORMAT_HEX);
+ TAG (AT_L1D_CACHESIZE , _("L1 Data cache size"), AUXV_FORMAT_HEX);
+ TAG (AT_L1D_CACHEGEOMETRY , _("L1 Data cache geometry"),
+ AUXV_FORMAT_HEX);
+ TAG (AT_L2_CACHESIZE , _("L2 cache size"), AUXV_FORMAT_HEX);
+ TAG (AT_L2_CACHEGEOMETRY , _("L2 cache geometry"), AUXV_FORMAT_HEX);
+ TAG (AT_L3_CACHESIZE , _("L3 cache size"), AUXV_FORMAT_HEX);
+ TAG (AT_L3_CACHEGEOMETRY , _("L3 cache geometry"), AUXV_FORMAT_HEX);
+ TAG (AT_MINSIGSTKSZ , _("Minimum stack size for signal delivery"),
+ AUXV_FORMAT_HEX);
Odd space before comma in all the new lines above.
How about putting these right after AT_L3_CACHESHAPE /
before the SUN ones?