From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1879) id 09FDC3853543; Wed, 12 Oct 2022 01:11:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 09FDC3853543 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1665537062; bh=8QgaXnLUpeYOYF3U8dkPJrOtAy0gXmnqwCgSvbY9JRk=; h=From:To:Subject:Date:From; b=FjB14mX67LZmN58QWPfLHesbE5MQBqL7OXZAX5DFFPrjqcjQN8zYTNYaT4Cz+eFIl DBAI0Y7mdCCsH+ACE/6IZTE0jlMrTMBPiI9/PTqCIv7bCNFS6gHkCliDuJn1il08dI HrwFqsG1SpbCHzkBZuJcne5b2CTSqDMM+REO1xtg= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Simon Marchi To: gdb-cvs@sourceware.org Subject: [binutils-gdb] gdb: rename target_read_auxv(target_ops *) to target_read_auxv_raw X-Act-Checkin: binutils-gdb X-Git-Author: Simon Marchi X-Git-Refname: refs/heads/master X-Git-Oldrev: 8652404e813a895dfebe8591b30e90328b6e6898 X-Git-Newrev: 1639fab33b5932e1a5e88e29273996f70047da85 Message-Id: <20221012011102.09FDC3853543@sourceware.org> Date: Wed, 12 Oct 2022 01:11:02 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D1639fab33b59= 32e1a5e88e29273996f70047da85 commit 1639fab33b5932e1a5e88e29273996f70047da85 Author: Simon Marchi Date: Tue Oct 11 20:53:39 2022 -0400 gdb: rename target_read_auxv(target_ops *) to target_read_auxv_raw =20 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. =20 Change-Id: I28e5f7cecbfcacd0174d4686efb3e4a23b4ad491 Diff: --- gdb/aarch64-linux-tdep.c | 2 +- gdb/arm-fbsd-tdep.c | 2 +- gdb/arm-linux-tdep.c | 2 +- gdb/auxv.c | 5 ++--- gdb/auxv.h | 2 +- gdb/ppc-linux-tdep.c | 2 +- gdb/s390-linux-tdep.c | 2 +- 7 files changed, 8 insertions(+), 9 deletions(-) diff --git a/gdb/aarch64-linux-tdep.c b/gdb/aarch64-linux-tdep.c index 476db5aa3b8..a321aee036a 100644 --- a/gdb/aarch64-linux-tdep.c +++ b/gdb/aarch64-linux-tdep.c @@ -780,7 +780,7 @@ aarch64_linux_core_read_description (struct gdbarch *gd= barch, struct target_ops *target, bfd *abfd) { asection *tls =3D bfd_get_section_by_name (abfd, ".reg-aarch-tls"); - gdb::optional auxv =3D target_read_auxv (target); + gdb::optional auxv =3D target_read_auxv_raw (target); CORE_ADDR hwcap =3D linux_get_hwcap (auxv, target, gdbarch); CORE_ADDR hwcap2 =3D linux_get_hwcap2 (auxv, target, gdbarch); =20 diff --git a/gdb/arm-fbsd-tdep.c b/gdb/arm-fbsd-tdep.c index 28fc73d694e..4395136b83c 100644 --- a/gdb/arm-fbsd-tdep.c +++ b/gdb/arm-fbsd-tdep.c @@ -238,7 +238,7 @@ arm_fbsd_core_read_description (struct gdbarch *gdbarch, { asection *tls =3D bfd_get_section_by_name (abfd, ".reg-aarch-tls"); =20 - gdb::optional auxv =3D target_read_auxv (target); + gdb::optional auxv =3D target_read_auxv_raw (target); return arm_fbsd_read_description_auxv (auxv, target, gdbarch, tls !=3D n= ullptr); } =20 diff --git a/gdb/arm-linux-tdep.c b/gdb/arm-linux-tdep.c index 65343f6c075..7fa8a67ae42 100644 --- a/gdb/arm-linux-tdep.c +++ b/gdb/arm-linux-tdep.c @@ -732,7 +732,7 @@ arm_linux_core_read_description (struct gdbarch *gdbarc= h, struct target_ops *target, bfd *abfd) { - gdb::optional auxv =3D target_read_auxv (target); + gdb::optional auxv =3D target_read_auxv_raw (target); CORE_ADDR arm_hwcap =3D linux_get_hwcap (auxv, target, gdbarch); =20 if (arm_hwcap & HWCAP_VFP) diff --git a/gdb/auxv.c b/gdb/auxv.c index 5853437b0f2..51723f9b17c 100644 --- a/gdb/auxv.c +++ b/gdb/auxv.c @@ -363,8 +363,7 @@ target_read_auxv () if (info =3D=3D nullptr) { info =3D auxv_inferior_data.emplace (inf); - info->data =3D target_read_alloc (inf->top_target (), TARGET_OBJECT_= AUXV, - nullptr); + info->data =3D target_read_auxv_raw (inf->top_target ()); } =20 return info->data; @@ -373,7 +372,7 @@ target_read_auxv () /* See auxv.h. */ =20 gdb::optional -target_read_auxv (target_ops *ops) +target_read_auxv_raw (target_ops *ops) { return target_read_alloc (ops, TARGET_OBJECT_AUXV, NULL); } diff --git a/gdb/auxv.h b/gdb/auxv.h index 983e3bc9b0d..788d187b27a 100644 --- a/gdb/auxv.h +++ b/gdb/auxv.h @@ -52,7 +52,7 @@ extern gdb::optional target_read_auxv (= ); =20 /* Read auxv data from OPS. */ =20 -extern gdb::optional target_read_auxv (target_ops *ops); +extern gdb::optional target_read_auxv_raw (target_ops *o= ps); =20 /* Search AUXV for an entry with a_type matching MATCH. =20 diff --git a/gdb/ppc-linux-tdep.c b/gdb/ppc-linux-tdep.c index 12f418fb5ac..f7d13bac8a3 100644 --- a/gdb/ppc-linux-tdep.c +++ b/gdb/ppc-linux-tdep.c @@ -1599,7 +1599,7 @@ ppc_linux_core_read_description (struct gdbarch *gdba= rch, if (vsx) features.vsx =3D true; =20 - gdb::optional auxv =3D target_read_auxv (target); + gdb::optional auxv =3D target_read_auxv_raw (target); CORE_ADDR hwcap =3D linux_get_hwcap (auxv, target, gdbarch); =20 features.isa205 =3D ppc_linux_has_isa205 (hwcap); diff --git a/gdb/s390-linux-tdep.c b/gdb/s390-linux-tdep.c index ef2ed8510a6..14d71134e0c 100644 --- a/gdb/s390-linux-tdep.c +++ b/gdb/s390-linux-tdep.c @@ -332,7 +332,7 @@ s390_core_read_description (struct gdbarch *gdbarch, struct target_ops *target, bfd *abfd) { asection *section =3D bfd_get_section_by_name (abfd, ".reg"); - gdb::optional auxv =3D target_read_auxv (target); + gdb::optional auxv =3D target_read_auxv_raw (target); CORE_ADDR hwcap =3D linux_get_hwcap (auxv, target, gdbarch); bool high_gprs, v1, v2, te, vx, gs;