aboutsummaryrefslogtreecommitdiff
path: root/gdb/arch
diff options
context:
space:
mode:
authorLuis Machado <luis.machado@linaro.org>2020-06-15 15:44:20 -0300
committerLuis Machado <luis.machado@linaro.org>2021-03-24 14:56:07 -0300
commitcf44c9fa1b94837b093752854370b9c2db531264 (patch)
treece9e1af6df3ea2bca1d89937ec62dc4168c5aa00 /gdb/arch
parentb4a7d4fcfef4e0ca3c5de52efbaf33c1c98295eb (diff)
downloadgdb-cf44c9fa1b94837b093752854370b9c2db531264.zip
gdb-cf44c9fa1b94837b093752854370b9c2db531264.tar.gz
gdb-cf44c9fa1b94837b093752854370b9c2db531264.tar.bz2
AArch64: Report tag violation error information
Whenever a memory tag violation occurs, we get a SIGSEGV. Additional information can be obtained through the siginfo data structure. For AArch64 the Linux kernel may expose the fault address and tag information, if we have a synchronous event. Otherwise there is no fault address available. The synchronous event looks like this: -- (gdb) continue Continuing. Program received signal SIGSEGV, Segmentation fault Memory tag violation while accessing address 0x0500fffff7ff8000 Allocation tag 0x1. Logical tag 0x5 -- The asynchronous event looks like this: -- (gdb) continue Continuing. Program received signal SIGSEGV, Segmentation fault Memory tag violation Fault address unavailable. -- gdb/ChangeLog: 2021-03-24 Luis Machado <luis.machado@linaro.org> * aarch64-linux-tdep.c (aarch64_linux_report_signal_info): New function. (aarch64_linux_init_abi): Register aarch64_linux_report_signal_info as the report_signal_info hook. * arch/aarch64-linux.h (SEGV_MTEAERR): Define. (SEGV_MTESERR): Define.
Diffstat (limited to 'gdb/arch')
-rw-r--r--gdb/arch/aarch64-mte-linux.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/gdb/arch/aarch64-mte-linux.h b/gdb/arch/aarch64-mte-linux.h
index f517638..2aa97eb 100644
--- a/gdb/arch/aarch64-mte-linux.h
+++ b/gdb/arch/aarch64-mte-linux.h
@@ -35,6 +35,12 @@
#define AARCH64_MTE_LOGICAL_TAG_START_BIT 56
#define AARCH64_MTE_LOGICAL_MAX_VALUE 0xf
+/* Memory tagging definitions. */
+#ifndef SEGV_MTEAERR
+# define SEGV_MTEAERR 8
+# define SEGV_MTESERR 9
+#endif
+
/* Memory tag types for AArch64. */
enum class aarch64_memtag_type
{