• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

GNU Binutils with patches for OS216


Commit MetaInfo

Revision04af1924d97910a274be9d569f98b1f4a714ea8f (tree)
Time2020-06-26 01:23:38
AuthorLuis Machado <luis.machado@lina...>
CommiterLuis Machado

Log Message

AArch64: Add MTE CPU feature check support

This patch is a preparation for the next patches implementing MTE. It just adds
a HWCAP2 constant for MTE, creates a new generic arch/aarch64-mte-linux.h file
and includes that file in the source files that will use it.

gdb/ChangeLog:

YYYY-MM-DD Luis Machado <luis.machado@linaro.org>

* Makefile.in (HFILES_NO_SRCDIR): Add arch/aarch64-mte-linux.h.
* aarch64-linux-nat.c: Include arch/aarch64-mte-linux.h.
* aarch64-linux-tdep.c: Likewise
* arch/aarch64-mte-linux.h: New file.

gdbserver/ChangeLog:

YYYY-MM-DD Luis Machado <luis.machado@linaro.org>

* linux-aarch64-low.cc: Include arch/aarch64-mte-linux.h.

Change Summary

Incremental Difference

--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -1444,6 +1444,7 @@ HFILES_NO_SRCDIR = \
14441444 arch/aarch32.h \
14451445 arch/aarch64.h \
14461446 arch/aarch64-insn.h \
1447+ arch/aarch64-mte-linux.h \
14471448 arch/arc.h \
14481449 arch/arm.h \
14491450 arch/i386.h \
--- a/gdb/aarch64-linux-nat.c
+++ b/gdb/aarch64-linux-nat.c
@@ -50,6 +50,8 @@
5050 #include "gdb_proc_service.h"
5151 #include "arch-utils.h"
5252
53+#include "arch/aarch64-mte-linux.h"
54+
5355 #ifndef TRAP_HWBKPT
5456 #define TRAP_HWBKPT 0x0004
5557 #endif
--- a/gdb/aarch64-linux-tdep.c
+++ b/gdb/aarch64-linux-tdep.c
@@ -44,6 +44,8 @@
4444 #include "record-full.h"
4545 #include "linux-record.h"
4646
47+#include "arch/aarch64-mte-linux.h"
48+
4749 /* Signal frame handling.
4850
4951 +------------+ ^
--- /dev/null
+++ b/gdb/arch/aarch64-mte-linux.h
@@ -0,0 +1,28 @@
1+/* Common Linux target-dependent definitions for AArch64 MTE
2+
3+ Copyright (C) 2020 Free Software Foundation, Inc.
4+
5+ This file is part of GDB.
6+
7+ This program is free software; you can redistribute it and/or modify
8+ it under the terms of the GNU General Public License as published by
9+ the Free Software Foundation; either version 3 of the License, or
10+ (at your option) any later version.
11+
12+ This program is distributed in the hope that it will be useful,
13+ but WITHOUT ANY WARRANTY; without even the implied warranty of
14+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15+ GNU General Public License for more details.
16+
17+ You should have received a copy of the GNU General Public License
18+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
19+
20+#ifndef ARCH_AARCH64_LINUX_H
21+#define ARCH_AARCH64_LINUX_H
22+
23+/* Feature check for Memory Tagging Extension. */
24+#ifndef HWCAP2_MTE
25+#define HWCAP2_MTE (1 << 18)
26+#endif
27+
28+#endif /* ARCH_AARCH64_LINUX_H */
--- a/gdbserver/linux-aarch64-low.cc
+++ b/gdbserver/linux-aarch64-low.cc
@@ -40,6 +40,7 @@
4040
4141 #include "gdb_proc_service.h"
4242 #include "arch/aarch64.h"
43+#include "arch/aarch64-mte-linux.h"
4344 #include "linux-aarch32-tdesc.h"
4445 #include "linux-aarch64-tdesc.h"
4546 #include "nat/aarch64-sve-linux-ptrace.h"