public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Luis Machado <luis.machado@arm.com>
To: <gdb-patches@sourceware.org>
Subject: [PATCH v2 02/17] [gdb/aarch64] refactor: Rename SVE-specific files
Date: Fri, 19 May 2023 11:24:53 +0100	[thread overview]
Message-ID: <20230519102508.14020-3-luis.machado@arm.com> (raw)
In-Reply-To: <20230519102508.14020-1-luis.machado@arm.com>

In preparation to the SME support patches, rename the SVE-specific files to
something a bit more meaningful that can be shared with the SME code.

In this case, I've renamed the "sve" in the names to "scalable".

No functional changes.

Regression-tested on aarch64-linux Ubuntu 22.04/20.04.
---
 gdb/Makefile.in                                 |  2 +-
 gdb/aarch64-linux-nat.c                         |  2 +-
 gdb/configure.nat                               |  2 +-
 ...ptrace.c => aarch64-scalable-linux-ptrace.c} | 17 +++++++++--------
 ...ptrace.h => aarch64-scalable-linux-ptrace.h} | 11 ++++++-----
 ...xt.h => aarch64-scalable-linux-sigcontext.h} | 11 +++++++----
 gdbserver/Makefile.in                           |  2 +-
 gdbserver/configure.srv                         |  2 +-
 gdbserver/linux-aarch64-low.cc                  |  2 +-
 9 files changed, 28 insertions(+), 23 deletions(-)
 rename gdb/nat/{aarch64-sve-linux-ptrace.c => aarch64-scalable-linux-ptrace.c} (96%)
 rename gdb/nat/{aarch64-sve-linux-ptrace.h => aarch64-scalable-linux-ptrace.h} (90%)
 rename gdb/nat/{aarch64-sve-linux-sigcontext.h => aarch64-scalable-linux-sigcontext.h} (96%)

diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index 14b5dd0bad6..0b9f33c24dc 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -1560,7 +1560,7 @@ HFILES_NO_SRCDIR = \
 	nat/aarch64-linux.h \
 	nat/aarch64-linux-hw-point.h \
 	nat/aarch64-mte-linux-ptrace.h \
-	nat/aarch64-sve-linux-ptrace.h \
+	nat/aarch64-scalable-linux-ptrace.h \
 	nat/amd64-linux-siginfo.h \
 	nat/gdb_ptrace.h \
 	nat/gdb_thread_db.h \
diff --git a/gdb/aarch64-linux-nat.c b/gdb/aarch64-linux-nat.c
index 62656a7347b..0dd9652d001 100644
--- a/gdb/aarch64-linux-nat.c
+++ b/gdb/aarch64-linux-nat.c
@@ -35,7 +35,7 @@
 #include "arch/arm.h"
 #include "nat/aarch64-linux.h"
 #include "nat/aarch64-linux-hw-point.h"
-#include "nat/aarch64-sve-linux-ptrace.h"
+#include "nat/aarch64-scalable-linux-ptrace.h"
 
 #include "elf/external.h"
 #include "elf/common.h"
diff --git a/gdb/configure.nat b/gdb/configure.nat
index aabcdeff989..8d26f521792 100644
--- a/gdb/configure.nat
+++ b/gdb/configure.nat
@@ -238,7 +238,7 @@ case ${gdb_host} in
 		aarch32-linux-nat.o nat/aarch64-hw-point.o \
 		nat/aarch64-linux-hw-point.o \
 		nat/aarch64-linux.o \
-		nat/aarch64-sve-linux-ptrace.o \
+		nat/aarch64-scalable-linux-ptrace.o \
 		nat/aarch64-mte-linux-ptrace.o"
 		;;
 	    arc)
diff --git a/gdb/nat/aarch64-sve-linux-ptrace.c b/gdb/nat/aarch64-scalable-linux-ptrace.c
similarity index 96%
rename from gdb/nat/aarch64-sve-linux-ptrace.c
rename to gdb/nat/aarch64-scalable-linux-ptrace.c
index 51146535672..cc43f510892 100644
--- a/gdb/nat/aarch64-sve-linux-ptrace.c
+++ b/gdb/nat/aarch64-scalable-linux-ptrace.c
@@ -1,4 +1,5 @@
-/* Common target dependent for AArch64 systems.
+/* Common target dependent routines for AArch64 Scalable Extensions
+   (SVE/SME).
 
    Copyright (C) 2018-2023 Free Software Foundation, Inc.
 
@@ -22,13 +23,13 @@
 #include "gdbsupport/common-defs.h"
 #include "elf/external.h"
 #include "elf/common.h"
-#include "aarch64-sve-linux-ptrace.h"
+#include "aarch64-scalable-linux-ptrace.h"
 #include "arch/aarch64.h"
 #include "gdbsupport/common-regcache.h"
 #include "gdbsupport/byte-vector.h"
 #include <endian.h>
 
-/* See nat/aarch64-sve-linux-ptrace.h.  */
+/* See nat/aarch64-scalable-linux-ptrace.h.  */
 
 uint64_t
 aarch64_sve_get_vq (int tid)
@@ -60,7 +61,7 @@ aarch64_sve_get_vq (int tid)
   return vq;
 }
 
-/* See nat/aarch64-sve-linux-ptrace.h.  */
+/* See nat/aarch64-scalable-linux-ptrace.h.  */
 
 bool
 aarch64_sve_set_vq (int tid, uint64_t vq)
@@ -88,7 +89,7 @@ aarch64_sve_set_vq (int tid, uint64_t vq)
   return true;
 }
 
-/* See nat/aarch64-sve-linux-ptrace.h.  */
+/* See nat/aarch64-scalable-linux-ptrace.h.  */
 
 bool
 aarch64_sve_set_vq (int tid, struct reg_buffer_common *reg_buf)
@@ -117,7 +118,7 @@ aarch64_sve_set_vq (int tid, struct reg_buffer_common *reg_buf)
   return aarch64_sve_set_vq (tid, sve_vq_from_vg (reg_vg));
 }
 
-/* See nat/aarch64-sve-linux-ptrace.h.  */
+/* See nat/aarch64-scalable-linux-ptrace.h.  */
 
 std::unique_ptr<gdb_byte[]>
 aarch64_sve_get_sveregs (int tid)
@@ -161,7 +162,7 @@ aarch64_maybe_swab128 (gdb_byte *dst, const gdb_byte *src, size_t size)
 #endif
 }
 
-/* See nat/aarch64-sve-linux-ptrace.h.  */
+/* See nat/aarch64-scalable-linux-ptrace.h.  */
 
 void
 aarch64_sve_regs_copy_to_reg_buf (struct reg_buffer_common *reg_buf,
@@ -250,7 +251,7 @@ aarch64_sve_regs_copy_to_reg_buf (struct reg_buffer_common *reg_buf,
     }
 }
 
-/* See nat/aarch64-sve-linux-ptrace.h.  */
+/* See nat/aarch64-scalable-linux-ptrace.h.  */
 
 void
 aarch64_sve_regs_copy_from_reg_buf (const struct reg_buffer_common *reg_buf,
diff --git a/gdb/nat/aarch64-sve-linux-ptrace.h b/gdb/nat/aarch64-scalable-linux-ptrace.h
similarity index 90%
rename from gdb/nat/aarch64-sve-linux-ptrace.h
rename to gdb/nat/aarch64-scalable-linux-ptrace.h
index 9539e199d34..2847c4e0263 100644
--- a/gdb/nat/aarch64-sve-linux-ptrace.h
+++ b/gdb/nat/aarch64-scalable-linux-ptrace.h
@@ -1,4 +1,5 @@
-/* Common target dependent for AArch64 systems.
+/* Common target dependent definitions for AArch64 Scalable Extensions
+   (SVE/SME).
 
    Copyright (C) 2018-2023 Free Software Foundation, Inc.
 
@@ -17,8 +18,8 @@
    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_SVE_LINUX_PTRACE_H
-#define NAT_AARCH64_SVE_LINUX_PTRACE_H
+#ifndef NAT_AARCH64_SCALABLE_LINUX_PTRACE_H
+#define NAT_AARCH64_SCALABLE_LINUX_PTRACE_H
 
 #include <signal.h>
 #include <sys/utsname.h>
@@ -32,7 +33,7 @@
 #include <asm/ptrace.h>
 
 #ifndef SVE_SIG_ZREGS_SIZE
-#include "aarch64-sve-linux-sigcontext.h"
+#include "aarch64-scalable-linux-sigcontext.h"
 #endif
 
 /* Indicates whether a SVE ptrace header is followed by SVE registers or a
@@ -69,4 +70,4 @@ extern void
 aarch64_sve_regs_copy_from_reg_buf (const struct reg_buffer_common *reg_buf,
 				    void *buf);
 
-#endif /* NAT_AARCH64_SVE_LINUX_PTRACE_H */
+#endif /* NAT_AARCH64_SCALABLE_LINUX_PTRACE_H */
diff --git a/gdb/nat/aarch64-sve-linux-sigcontext.h b/gdb/nat/aarch64-scalable-linux-sigcontext.h
similarity index 96%
rename from gdb/nat/aarch64-sve-linux-sigcontext.h
rename to gdb/nat/aarch64-scalable-linux-sigcontext.h
index aba3c1595d0..e0120e093a0 100644
--- a/gdb/nat/aarch64-sve-linux-sigcontext.h
+++ b/gdb/nat/aarch64-scalable-linux-sigcontext.h
@@ -1,4 +1,7 @@
-/* Copyright (C) 2018-2023 Free Software Foundation, Inc.
+/* Linux Kernel sigcontext definitions for AArch64 Scalable Extensions
+   (SVE/SME).
+
+   Copyright (C) 2018-2023 Free Software Foundation, Inc.
    Contributed by Arm Ltd.
 
    This file is part of GDB.
@@ -16,8 +19,8 @@
    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_SVE_LINUX_SIGCONTEXT_H
-#define NAT_AARCH64_SVE_LINUX_SIGCONTEXT_H
+#ifndef NAT_AARCH64_SCALABLE_LINUX_SIGCONTEXT_H
+#define NAT_AARCH64_SCALABLE_LINUX_SIGCONTEXT_H
 
 #define SVE_MAGIC	0x53564501
 
@@ -264,4 +267,4 @@ struct user_sve_header {
 		  SVE_PT_SVE_OFFSET + SVE_PT_SVE_SIZE(vq, flags)	\
 		: SVE_PT_FPSIMD_OFFSET + SVE_PT_FPSIMD_SIZE(vq, flags))
 
-#endif /* NAT_AARCH64_SVE_LINUX_SIGCONTEXT_H */
+#endif /* NAT_AARCH64_SCALABLE_LINUX_SIGCONTEXT_H */
diff --git a/gdbserver/Makefile.in b/gdbserver/Makefile.in
index 39cb9e7a151..b597515d428 100644
--- a/gdbserver/Makefile.in
+++ b/gdbserver/Makefile.in
@@ -218,7 +218,7 @@ SFILES = \
 	$(srcdir)/../gdb/arch/ppc-linux-common.c \
 	$(srcdir)/../gdb/arch/riscv.c \
 	$(srcdir)/../gdb/nat/aarch64-mte-linux-ptrace.c \
-	$(srcdir)/../gdb/nat/aarch64-sve-linux-ptrace.c \
+	$(srcdir)/../gdb/nat/aarch64-scalable-linux-ptrace.c \
 	$(srcdir)/../gdb/nat/linux-btrace.c \
 	$(srcdir)/../gdb/nat/linux-namespaces.c \
 	$(srcdir)/../gdb/nat/linux-osdata.c \
diff --git a/gdbserver/configure.srv b/gdbserver/configure.srv
index f0101994529..f625c808859 100644
--- a/gdbserver/configure.srv
+++ b/gdbserver/configure.srv
@@ -51,7 +51,7 @@ case "${gdbserver_host}" in
 			srv_tgtobj="$srv_tgtobj arch/aarch64-mte-linux.o"
 			srv_tgtobj="$srv_tgtobj linux-aarch64-tdesc.o"
 			srv_tgtobj="$srv_tgtobj nat/aarch64-mte-linux-ptrace.o"
-			srv_tgtobj="$srv_tgtobj nat/aarch64-sve-linux-ptrace.o"
+			srv_tgtobj="$srv_tgtobj nat/aarch64-scalable-linux-ptrace.o"
 			srv_tgtobj="${srv_tgtobj} $srv_linux_obj"
 			srv_linux_regsets=yes
 			srv_linux_thread_db=yes
diff --git a/gdbserver/linux-aarch64-low.cc b/gdbserver/linux-aarch64-low.cc
index 2ed6e95562c..a20a3485ebc 100644
--- a/gdbserver/linux-aarch64-low.cc
+++ b/gdbserver/linux-aarch64-low.cc
@@ -44,7 +44,7 @@
 #include "linux-aarch32-tdesc.h"
 #include "linux-aarch64-tdesc.h"
 #include "nat/aarch64-mte-linux-ptrace.h"
-#include "nat/aarch64-sve-linux-ptrace.h"
+#include "nat/aarch64-scalable-linux-ptrace.h"
 #include "tdesc.h"
 
 #ifdef HAVE_SYS_REG_H
-- 
2.25.1


  parent reply	other threads:[~2023-05-19 10:25 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-19 10:24 [PATCH v2 00/17] SME support for AArch64 gdb/gdbserver on Linux Luis Machado
2023-05-19 10:24 ` [PATCH v2 01/17] [gdb/aarch64] Fix register fetch/store order for native AArch64 Linux Luis Machado
2023-05-19 10:24 ` Luis Machado [this message]
2023-05-19 10:24 ` [PATCH v2 03/17] [gdb/gdbserver] refactor: Simplify SVE interface to read/write registers Luis Machado
2023-05-19 10:24 ` [PATCH v2 04/17] [gdb/aarch64] sve: Fix return command when using V registers in a SVE-enabled target Luis Machado
2023-05-19 10:24 ` [PATCH v2 05/17] [gdb/aarch64] sme: Enable SME registers and pseudo-registers Luis Machado
2023-05-19 10:24 ` [PATCH v2 06/17] [gdbserver/aarch64] refactor: Adjust expedited registers dynamically Luis Machado
2023-05-19 10:24 ` [PATCH v2 07/17] [gdbserver/aarch64] sme: Add support for SME Luis Machado
2023-05-19 10:24 ` [PATCH v2 08/17] [gdb/aarch64] sve: Fix signal frame z/v register restore Luis Machado
2023-05-19 10:25 ` [PATCH v2 09/17] [gdb/aarch64] sme: Signal frame support Luis Machado
2023-05-19 10:25 ` [PATCH v2 10/17] [gdb/aarch64] sme: Fixup sigframe gdbarch when vg/svg changes Luis Machado
2023-05-19 10:25 ` [PATCH v2 11/17] [gdb/aarch64] sme: Support TPIDR2 signal frame context Luis Machado
2023-05-19 10:25 ` [PATCH v2 12/17] [binutils/aarch64] sme: Core file support Luis Machado
2023-05-19 10:25 ` [PATCH v2 13/17] [gdb/generic] corefile/bug: Use thread-specific gdbarch when dumping register state to core files Luis Machado
2023-05-19 10:25 ` [PATCH v2 14/17] [gdb/generic] corefile/bug: Fixup (gcore) core file target description reading order Luis Machado
2023-05-19 10:25 ` [PATCH v2 15/17] [gdb/aarch64] sme: Core file support for Linux Luis Machado
2023-05-19 10:25 ` [PATCH v2 16/17] [gdb/testsuite] sme: Add SVE/SME testcases Luis Machado
2023-05-19 10:25 ` [PATCH v3 17/17] [gdb/docs] sme: Document SME registers and features Luis Machado
2023-05-19 11:20   ` Eli Zaretskii
2023-06-30 12:10     ` Luis Machado

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230519102508.14020-3-luis.machado@arm.com \
    --to=luis.machado@arm.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).