• R/O
  • HTTP
  • SSH
  • HTTPS

提交

標籤
無標籤

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

修訂48d2ae75f2330d36522b4e39aaee2511970fa9bd (tree)
時間2020-06-16 21:58:32
作者Luis Machado <luis.machado@lina...>
CommiterLuis Machado

Log Message

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 and creates a couple new generic aarch64-linux files
in the arch subdirectory. Those will be used later.

gdb/ChangeLog:

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

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

gdbserver/ChangeLog:

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

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

Change Summary

差異

--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -679,6 +679,7 @@ ALL_64_TARGET_OBS = \
679679 amd64-tdep.o \
680680 amd64-windows-tdep.o \
681681 arch/aarch64.o \
682+ arch/aarch64-linux.o \
682683 arch/aarch64-insn.o \
683684 arch/amd64.o \
684685 ia64-linux-tdep.o \
@@ -1443,6 +1444,7 @@ HFILES_NO_SRCDIR = \
14431444 xtensa-tdep.h \
14441445 arch/aarch32.h \
14451446 arch/aarch64.h \
1447+ arch/aarch64-linux.h \
14461448 arch/aarch64-insn.h \
14471449 arch/arc.h \
14481450 arch/arm.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-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-linux.h"
48+
4749 /* Signal frame handling.
4850
4951 +------------+ ^
--- /dev/null
+++ b/gdb/arch/aarch64-linux.c
@@ -0,0 +1,20 @@
1+/* Common Linux target-dependent functionality for AArch64.
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+#include "arch/aarch64-linux.h"
--- /dev/null
+++ b/gdb/arch/aarch64-linux.h
@@ -0,0 +1,28 @@
1+/* Common Linux target-dependent definitions for AArch64
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/gdb/configure.tgt
+++ b/gdb/configure.tgt
@@ -123,9 +123,9 @@ aarch64*-*-freebsd*)
123123
124124 aarch64*-*-linux*)
125125 # Target: AArch64 linux
126- gdb_target_obs="aarch64-linux-tdep.o arch/aarch64.o\
127- arch/arm.o arch/arm-linux.o arch/arm-get-next-pcs.o \
128- arm-tdep.o arm-linux-tdep.o \
126+ gdb_target_obs="aarch64-linux-tdep.o arch/aarch64.o \
127+ arch/aarch64-linux.o arch/arm.o arch/arm-linux.o \
128+ arch/arm-get-next-pcs.o arm-tdep.o arm-linux-tdep.o \
129129 glibc-tdep.o linux-tdep.o solib-svr4.o \
130130 symfile-mem.o linux-record.o"
131131 ;;
--- 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-linux.h"
4344 #include "linux-aarch32-tdesc.h"
4445 #include "linux-aarch64-tdesc.h"
4546 #include "nat/aarch64-sve-linux-ptrace.h"