[PATCH] gdb: support rseq auxvs
Ilya Leoshkevich
iii@linux.ibm.com
Wed Jun 21 23:03:04 GMT 2023
Linux kernel commit commit 317c8194e6ae ("rseq: Introduce feature size
and alignment ELF auxiliary vector entries") introduced two new auxvs:
AT_RSEQ_FEATURE_SIZE and AT_RSEQ_ALIGN. Support them in GDB. This
fixes auxv.exp on kernels >= v6.3.
---
gdb/auxv.c | 4 ++++
include/elf/common.h | 2 ++
2 files changed, 6 insertions(+)
diff --git a/gdb/auxv.c b/gdb/auxv.c
index 812b2807554..3ce5ccd3342 100644
--- a/gdb/auxv.c
+++ b/gdb/auxv.c
@@ -493,6 +493,10 @@ default_print_auxv_entry (struct gdbarch *gdbarch, struct ui_file *file,
AUXV_FORMAT_STR);
TAG (AT_RANDOM, _("Address of 16 random bytes"), AUXV_FORMAT_HEX);
TAG (AT_HWCAP2, _("Extension of AT_HWCAP"), AUXV_FORMAT_HEX);
+ TAG (AT_RSEQ_FEATURE_SIZE, _("rseq supported feature size"),
+ AUXV_FORMAT_HEX);
+ TAG (AT_RSEQ_ALIGN, _("rseq allocation alignment"),
+ AUXV_FORMAT_HEX);
TAG (AT_EXECFN, _("File name of executable"), AUXV_FORMAT_STR);
TAG (AT_SECURE, _("Boolean, was exec setuid-like?"), AUXV_FORMAT_DEC);
TAG (AT_SYSINFO, _("Special system info/entry points"), AUXV_FORMAT_HEX);
diff --git a/include/elf/common.h b/include/elf/common.h
index ffa6b60bd2b..3ebaebfb34b 100644
--- a/include/elf/common.h
+++ b/include/elf/common.h
@@ -1374,6 +1374,8 @@
may differ from AT_PLATFORM. */
#define AT_RANDOM 25 /* Address of 16 random bytes. */
#define AT_HWCAP2 26 /* Extension of AT_HWCAP. */
+#define AT_RSEQ_FEATURE_SIZE 27 /* rseq supported feature size */
+#define AT_RSEQ_ALIGN 28 /* rseq allocation alignment */
#define AT_EXECFN 31 /* Filename of executable. */
/* Pointer to the global system page used for system calls and other
nice things. */
--
2.40.1
More information about the Gdb-patches
mailing list