]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb: rename target_read_auxv(target_ops *) to target_read_auxv_raw
authorSimon Marchi <simon.marchi@polymtl.ca>
Wed, 12 Oct 2022 00:53:39 +0000 (20:53 -0400)
committerSimon Marchi <simon.marchi@polymtl.ca>
Wed, 12 Oct 2022 01:08:19 +0000 (21:08 -0400)
Having two overloads of target_read_auxv that don't have the same goals
is confusing.  Rename the one that reads from an explicit target_ops to
target_read_auxv_raw.  Also, it occured to me that the non-raw version
could use the raw version, that reduces duplication a bit.

Change-Id: I28e5f7cecbfcacd0174d4686efb3e4a23b4ad491

gdb/aarch64-linux-tdep.c
gdb/arm-fbsd-tdep.c
gdb/arm-linux-tdep.c
gdb/auxv.c
gdb/auxv.h
gdb/ppc-linux-tdep.c
gdb/s390-linux-tdep.c

index 476db5aa3b8821a81ab8a6dd829344d5a18300e6..a321aee036a0c5c3865c2db495df641aea84eaaa 100644 (file)
@@ -780,7 +780,7 @@ aarch64_linux_core_read_description (struct gdbarch *gdbarch,
                                     struct target_ops *target, bfd *abfd)
 {
   asection *tls = bfd_get_section_by_name (abfd, ".reg-aarch-tls");
-  gdb::optional<gdb::byte_vector> auxv = target_read_auxv (target);
+  gdb::optional<gdb::byte_vector> auxv = target_read_auxv_raw (target);
   CORE_ADDR hwcap = linux_get_hwcap (auxv, target, gdbarch);
   CORE_ADDR hwcap2 = linux_get_hwcap2 (auxv, target, gdbarch);
 
index 28fc73d694e6ba1e7a888ed075080cdb1edb2d45..4395136b83ce4d84a87dc4dc9a07532b89a5c0df 100644 (file)
@@ -238,7 +238,7 @@ arm_fbsd_core_read_description (struct gdbarch *gdbarch,
 {
   asection *tls = bfd_get_section_by_name (abfd, ".reg-aarch-tls");
 
-  gdb::optional<gdb::byte_vector> auxv = target_read_auxv (target);
+  gdb::optional<gdb::byte_vector> auxv = target_read_auxv_raw (target);
   return arm_fbsd_read_description_auxv (auxv, target, gdbarch, tls != nullptr);
 }
 
index 65343f6c0758ad6c14e763370e44adee95ca66df..7fa8a67ae42cf6d8f6d16416a1ad3468c7839d31 100644 (file)
@@ -732,7 +732,7 @@ arm_linux_core_read_description (struct gdbarch *gdbarch,
                                 struct target_ops *target,
                                 bfd *abfd)
 {
-  gdb::optional<gdb::byte_vector> auxv = target_read_auxv (target);
+  gdb::optional<gdb::byte_vector> auxv = target_read_auxv_raw (target);
   CORE_ADDR arm_hwcap = linux_get_hwcap (auxv, target, gdbarch);
 
   if (arm_hwcap & HWCAP_VFP)
index 5853437b0f24b7d848b5c6d300f1159b5fd16c58..51723f9b17cbd6c73b4b833ecaf298a7a794fdef 100644 (file)
@@ -363,8 +363,7 @@ target_read_auxv ()
   if (info == nullptr)
     {
       info = auxv_inferior_data.emplace (inf);
-      info->data = target_read_alloc (inf->top_target (), TARGET_OBJECT_AUXV,
-                                     nullptr);
+      info->data = target_read_auxv_raw (inf->top_target ());
     }
 
   return info->data;
@@ -373,7 +372,7 @@ target_read_auxv ()
 /* See auxv.h.  */
 
 gdb::optional<gdb::byte_vector>
-target_read_auxv (target_ops *ops)
+target_read_auxv_raw (target_ops *ops)
 {
   return target_read_alloc (ops, TARGET_OBJECT_AUXV, NULL);
 }
index 983e3bc9b0d9fd48ce31ad415303a1058e5b6d23..788d187b27a0814c5ddaa71eee834af5bb4dd8ac 100644 (file)
@@ -52,7 +52,7 @@ extern gdb::optional<gdb::byte_vector> target_read_auxv ();
 
 /* Read auxv data from OPS.  */
 
-extern gdb::optional<gdb::byte_vector> target_read_auxv (target_ops *ops);
+extern gdb::optional<gdb::byte_vector> target_read_auxv_raw (target_ops *ops);
 
 /* Search AUXV for an entry with a_type matching MATCH.
 
index 12f418fb5ac6375d9fbb1d4a5fffb9225f2c15b4..f7d13bac8a3ebb621127eef894e644d8185d67b1 100644 (file)
@@ -1599,7 +1599,7 @@ ppc_linux_core_read_description (struct gdbarch *gdbarch,
   if (vsx)
     features.vsx = true;
 
-  gdb::optional<gdb::byte_vector> auxv = target_read_auxv (target);
+  gdb::optional<gdb::byte_vector> auxv = target_read_auxv_raw (target);
   CORE_ADDR hwcap = linux_get_hwcap (auxv, target, gdbarch);
 
   features.isa205 = ppc_linux_has_isa205 (hwcap);
index ef2ed8510a64861ff66db9645ab236103abb58d7..14d71134e0cd1d5f7c34410e9580ae230a96ab33 100644 (file)
@@ -332,7 +332,7 @@ s390_core_read_description (struct gdbarch *gdbarch,
                            struct target_ops *target, bfd *abfd)
 {
   asection *section = bfd_get_section_by_name (abfd, ".reg");
-  gdb::optional<gdb::byte_vector> auxv = target_read_auxv (target);
+  gdb::optional<gdb::byte_vector> auxv = target_read_auxv_raw (target);
   CORE_ADDR hwcap = linux_get_hwcap (auxv, target, gdbarch);
   bool high_gprs, v1, v2, te, vx, gs;