aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuis Machado <luis.machado@linaro.org>2020-06-19 16:09:11 -0300
committerLuis Machado <luis.machado@linaro.org>2021-03-24 14:53:30 -0300
commit3f3bd8b8c14d844533b70b25c7f1a8cbdbac2639 (patch)
tree64d1bb837b8eefdd98ba3aa53464c5ab5b2cd796
parent5e984dbf3523ea86e3ef3750d6ecaeed74d87c87 (diff)
downloadgdb-3f3bd8b8c14d844533b70b25c7f1a8cbdbac2639.zip
gdb-3f3bd8b8c14d844533b70b25c7f1a8cbdbac2639.tar.gz
gdb-3f3bd8b8c14d844533b70b25c7f1a8cbdbac2639.tar.bz2
AArch64: Add MTE ptrace requests
This patch adds the required ptrace request definitions into a new include file that will be used by the next patches. They are PTRACE_PEEKMTETAGS and PTRACE_POKEMTETAGS. gdb/ChangeLog: 2021-03-24 Luis Machado <luis.machado@linaro.org> * Makefile.in (HFILES_NO_SRCDIR): Add nat/aarch64-mte-linux-ptrace.h. * nat/aarch64-mte-linux-ptrace.h: New file.
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/Makefile.in1
-rw-r--r--gdb/nat/aarch64-mte-linux-ptrace.h33
3 files changed, 39 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 866623e..bf7f19d 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
2021-03-24 Luis Machado <luis.machado@linaro.org>
+ * Makefile.in (HFILES_NO_SRCDIR): Add nat/aarch64-mte-linux-ptrace.h.
+ * nat/aarch64-mte-linux-ptrace.h: New file.
+
+2021-03-24 Luis Machado <luis.machado@linaro.org>
+
* aarch64-linux-nat.c (fetch_mteregs_from_thread): New function.
(store_mteregs_to_thread): New function.
(aarch64_linux_nat_target::fetch_registers): Update to call
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index 49202d4..7943a3c 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -1510,6 +1510,7 @@ HFILES_NO_SRCDIR = \
mi/mi-parse.h \
nat/aarch64-linux.h \
nat/aarch64-linux-hw-point.h \
+ nat/aarch64-mte-linux-ptrace.h \
nat/aarch64-sve-linux-ptrace.h \
nat/amd64-linux-siginfo.h \
nat/gdb_ptrace.h \
diff --git a/gdb/nat/aarch64-mte-linux-ptrace.h b/gdb/nat/aarch64-mte-linux-ptrace.h
new file mode 100644
index 0000000..65ac141
--- /dev/null
+++ b/gdb/nat/aarch64-mte-linux-ptrace.h
@@ -0,0 +1,33 @@
+/* Common native Linux definitions for AArch64 MTE.
+
+ Copyright (C) 2021 Free Software Foundation, Inc.
+
+ This file is part of GDB.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef NAT_AARCH64_MTE_LINUX_PTRACE_H
+#define NAT_AARCH64_MTE_LINUX_PTRACE_H
+
+/* MTE allocation tag access */
+
+#ifndef PTRACE_PEEKMTETAGS
+#define PTRACE_PEEKMTETAGS 33
+#endif
+
+#ifndef PTRACE_POKEMTETAGS
+#define PTRACE_POKEMTETAGS 34
+#endif
+
+#endif /* NAT_AARCH64_MTE_LINUX_PTRACE_H */