From patchwork Tue Nov 29 02:50:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Marchi X-Patchwork-Id: 61205 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 460EE385B1A1 for ; Tue, 29 Nov 2022 02:51:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 460EE385B1A1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1669690291; bh=AvwUo32SuhumpGN9b7IK3WLU7X5r6PadyX1ZsEayN9c=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=vkdYaJWqAllwoSp10JQdMZ3+OB994Pxh5PsqtwnpcZrgKbEJN1AzVQcSJyCB9YcgK wZz36jwTI7QVck8W4Y4e8B8OvnczjCLDqjmlF8IqereKfAv4UgI2go98NeE3/8OxrD GvtTLCL11Xp+iN0Sv7KmDpW6NA3geABXioxxwfQI= X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from smtp.polymtl.ca (smtp.polymtl.ca [132.207.4.11]) by sourceware.org (Postfix) with ESMTPS id 9C27F3858C3A for ; Tue, 29 Nov 2022 02:51:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 9C27F3858C3A Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id 2AT2ot29008910 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 28 Nov 2022 21:51:00 -0500 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 2AT2ot29008910 Received: from simark.localdomain (unknown [217.28.27.60]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id BB0101E11E; Mon, 28 Nov 2022 21:50:55 -0500 (EST) To: gdb-patches@sourceware.org Cc: Simon Marchi Subject: [PATCH 3/3] gdb: remove target_ops parameter from gdbarch_core_read_description Date: Mon, 28 Nov 2022 21:50:48 -0500 Message-Id: <20221129025048.44490-3-simon.marchi@polymtl.ca> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221129025048.44490-1-simon.marchi@polymtl.ca> References: <20221129025048.44490-1-simon.marchi@polymtl.ca> MIME-Version: 1.0 X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Tue, 29 Nov 2022 02:50:55 +0000 X-Spam-Status: No, score=-3189.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Simon Marchi via Gdb-patches From: Simon Marchi Reply-To: Simon Marchi Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Sender: "Gdb-patches" Following the previous patch ("gdb: change order of core_target initialization"), it is no longer necessary for the core target to pass a pointer to itself to gdbarch_core_read_description. Implementations of this method can just do regular calls to target_read_auxv, through the inferior target stack. This allows removing the target_ops parameter in gdbarch_core_read_description and a bunch of functions called downstream. Some auxv-related functions received the auxv data as a parameter, since they could not assume it could be read from the current inferior, that is also no longer needed. Regression tested. I also tested manually against an AArch64 MTE test case that Luis Machado sent me a while ago when we were working on this auxv caching issue, the desired behavior of reporting the MTE tags when opening the code still worked. Change-Id: I1e00361209028e9b65dde085d383cf950a7b5e3a --- gdb/aarch64-fbsd-tdep.c | 3 +-- gdb/aarch64-linux-tdep.c | 8 +++----- gdb/amd64-fbsd-tdep.c | 4 +--- gdb/amd64-linux-tdep.c | 4 +--- gdb/arc-linux-tdep.c | 4 +--- gdb/arm-fbsd-tdep.c | 24 +++++------------------- gdb/arm-fbsd-tdep.h | 15 +++++---------- gdb/arm-linux-tdep.c | 7 ++----- gdb/auxv.c | 11 ++--------- gdb/auxv.h | 4 ---- gdb/corelow.c | 2 +- gdb/gdbarch-components.py | 2 +- gdb/gdbarch-gen.h | 4 ++-- gdb/gdbarch.c | 4 ++-- gdb/i386-fbsd-tdep.c | 4 +--- gdb/i386-linux-tdep.c | 4 +--- gdb/linux-tdep.c | 24 ++++++++++-------------- gdb/linux-tdep.h | 14 ++++++-------- gdb/mips-linux-tdep.c | 4 +--- gdb/ppc-linux-tdep.c | 7 ++----- gdb/s390-linux-tdep.c | 6 ++---- 21 files changed, 50 insertions(+), 109 deletions(-) diff --git a/gdb/aarch64-fbsd-tdep.c b/gdb/aarch64-fbsd-tdep.c index 39d193551059..b76ca24aacfd 100644 --- a/gdb/aarch64-fbsd-tdep.c +++ b/gdb/aarch64-fbsd-tdep.c @@ -195,8 +195,7 @@ aarch64_fbsd_iterate_over_regset_sections (struct gdbarch *gdbarch, /* Implement the "core_read_description" gdbarch method. */ static const struct target_desc * -aarch64_fbsd_core_read_description (struct gdbarch *gdbarch, - struct target_ops *target, bfd *abfd) +aarch64_fbsd_core_read_description (gdbarch *gdbarch, bfd *abfd) { asection *tls = bfd_get_section_by_name (abfd, ".reg-aarch-tls"); diff --git a/gdb/aarch64-linux-tdep.c b/gdb/aarch64-linux-tdep.c index a321aee036a0..fb9875f5701d 100644 --- a/gdb/aarch64-linux-tdep.c +++ b/gdb/aarch64-linux-tdep.c @@ -776,13 +776,11 @@ aarch64_linux_iterate_over_regset_sections (struct gdbarch *gdbarch, /* Implement the "core_read_description" gdbarch method. */ static const struct target_desc * -aarch64_linux_core_read_description (struct gdbarch *gdbarch, - struct target_ops *target, bfd *abfd) +aarch64_linux_core_read_description (gdbarch *gdbarch, bfd *abfd) { asection *tls = bfd_get_section_by_name (abfd, ".reg-aarch-tls"); - gdb::optional auxv = target_read_auxv_raw (target); - CORE_ADDR hwcap = linux_get_hwcap (auxv, target, gdbarch); - CORE_ADDR hwcap2 = linux_get_hwcap2 (auxv, target, gdbarch); + CORE_ADDR hwcap = linux_get_hwcap (gdbarch); + CORE_ADDR hwcap2 = linux_get_hwcap2 (gdbarch); aarch64_features features; features.vq = aarch64_linux_core_read_vq (gdbarch, abfd); diff --git a/gdb/amd64-fbsd-tdep.c b/gdb/amd64-fbsd-tdep.c index 960bb0b5942f..90dad4cce98e 100644 --- a/gdb/amd64-fbsd-tdep.c +++ b/gdb/amd64-fbsd-tdep.c @@ -220,9 +220,7 @@ static const struct tramp_frame amd64_fbsd_sigframe = /* Implement the core_read_description gdbarch method. */ static const struct target_desc * -amd64fbsd_core_read_description (struct gdbarch *gdbarch, - struct target_ops *target, - bfd *abfd) +amd64fbsd_core_read_description (gdbarch *gdbarch, bfd *abfd) { return amd64_target_description (i386fbsd_core_read_xcr0 (abfd), true); } diff --git a/gdb/amd64-linux-tdep.c b/gdb/amd64-linux-tdep.c index 07c1669f91e0..ace20ed738bd 100644 --- a/gdb/amd64-linux-tdep.c +++ b/gdb/amd64-linux-tdep.c @@ -1613,9 +1613,7 @@ amd64_linux_read_description (uint64_t xcr0_features_bit, bool is_x32) /* Get Linux/x86 target description from core dump. */ static const struct target_desc * -amd64_linux_core_read_description (struct gdbarch *gdbarch, - struct target_ops *target, - bfd *abfd) +amd64_linux_core_read_description (gdbarch *gdbarch, bfd *abfd) { /* Linux/x86-64. */ uint64_t xcr0 = i386_linux_core_read_xcr0 (abfd); diff --git a/gdb/arc-linux-tdep.c b/gdb/arc-linux-tdep.c index da7f4758c195..805251d5f4fe 100644 --- a/gdb/arc-linux-tdep.c +++ b/gdb/arc-linux-tdep.c @@ -679,9 +679,7 @@ arc_linux_iterate_over_regset_sections (struct gdbarch *gdbarch, /* Implement the `core_read_description` gdbarch method. */ static const struct target_desc * -arc_linux_core_read_description (struct gdbarch *gdbarch, - struct target_ops *target, - bfd *abfd) +arc_linux_core_read_description (gdbarch *gdbarch, bfd *abfd) { arc_arch_features features = arc_arch_features_create (abfd, diff --git a/gdb/arm-fbsd-tdep.c b/gdb/arm-fbsd-tdep.c index 75ee08eba506..4ea238de7c7f 100644 --- a/gdb/arm-fbsd-tdep.c +++ b/gdb/arm-fbsd-tdep.c @@ -215,10 +215,11 @@ arm_fbsd_iterate_over_regset_sections (struct gdbarch *gdbarch, /* See arm-fbsd-tdep.h. */ const struct target_desc * -arm_fbsd_read_description_auxv (const gdb::optional &auxv, - target_ops *target, gdbarch *gdbarch, bool tls) +arm_fbsd_read_description_auxv (gdbarch *gdbarch, bool tls) { CORE_ADDR arm_hwcap = 0; + gdb::optional auxv = target_read_auxv (); + target_ops *target = current_inferior ()->top_target (); if (!auxv.has_value () || target_auxv_search (*auxv, target, gdbarch, AT_FREEBSD_HWCAP, @@ -239,29 +240,14 @@ arm_fbsd_read_description_auxv (const gdb::optional &auxv, return arm_read_description (ARM_FP_TYPE_NONE, tls); } -/* See arm-fbsd-tdep.h. */ - -const struct target_desc * -arm_fbsd_read_description_auxv (bool tls) -{ - gdb::optional auxv = target_read_auxv (); - return arm_fbsd_read_description_auxv (auxv, - current_inferior ()->top_target (), - current_inferior ()->gdbarch, - tls); -} - /* Implement the "core_read_description" gdbarch method. */ static const struct target_desc * -arm_fbsd_core_read_description (struct gdbarch *gdbarch, - struct target_ops *target, - bfd *abfd) +arm_fbsd_core_read_description (gdbarch *gdbarch, bfd *abfd) { asection *tls = bfd_get_section_by_name (abfd, ".reg-aarch-tls"); - gdb::optional auxv = target_read_auxv_raw (target); - return arm_fbsd_read_description_auxv (auxv, target, gdbarch, tls != nullptr); + return arm_fbsd_read_description_auxv (gdbarch, tls != nullptr); } /* Implement the get_thread_local_address gdbarch method. */ diff --git a/gdb/arm-fbsd-tdep.h b/gdb/arm-fbsd-tdep.h index b4137eb9a51a..d76da0d4d40b 100644 --- a/gdb/arm-fbsd-tdep.h +++ b/gdb/arm-fbsd-tdep.h @@ -22,6 +22,8 @@ #include "regset.h" +struct gdbarch; + /* The general-purpose regset consists of 13 R registers, plus SP, LR, PC, and CPSR registers. */ #define ARM_FBSD_SIZEOF_GREGSET (17 * 4) @@ -43,17 +45,10 @@ extern const struct regset arm_fbsd_tls_regset; #define HWCAP_VFPv3 0x00002000 #define HWCAP_VFPD32 0x00080000 -/* Lookup a target description based on the AT_HWCAP value in the auxv data - AUXV. */ - -extern const struct target_desc * - arm_fbsd_read_description_auxv (const gdb::optional &auxv, - target_ops *target, gdbarch *gdbarch, - bool tls); - -/* Same as the above, but read the auxv data from the current inferior. */ +/* Lookup a target description based on the AT_HWCAP value in the current + inferior's auxv data. */ extern const struct target_desc * - arm_fbsd_read_description_auxv (bool tls); + arm_fbsd_read_description_auxv (gdbarch *gdbarch, bool tls); #endif /* ARM_FBSD_TDEP_H */ diff --git a/gdb/arm-linux-tdep.c b/gdb/arm-linux-tdep.c index 27aca0c39e6b..2f88bb036d15 100644 --- a/gdb/arm-linux-tdep.c +++ b/gdb/arm-linux-tdep.c @@ -728,12 +728,9 @@ arm_linux_iterate_over_regset_sections (struct gdbarch *gdbarch, /* Determine target description from core file. */ static const struct target_desc * -arm_linux_core_read_description (struct gdbarch *gdbarch, - struct target_ops *target, - bfd *abfd) +arm_linux_core_read_description (gdbarch *gdbarch, bfd *abfd) { - gdb::optional auxv = target_read_auxv_raw (target); - CORE_ADDR arm_hwcap = linux_get_hwcap (auxv, target, gdbarch); + CORE_ADDR arm_hwcap = linux_get_hwcap (gdbarch); if (arm_hwcap & HWCAP_VFP) { diff --git a/gdb/auxv.c b/gdb/auxv.c index 73e84cf144db..c4362a22f870 100644 --- a/gdb/auxv.c +++ b/gdb/auxv.c @@ -363,7 +363,8 @@ target_read_auxv () if (info == nullptr) { info = auxv_inferior_data.emplace (inf); - info->data = target_read_auxv_raw (inf->top_target ()); + info->data + = target_read_alloc (inf->top_target (), TARGET_OBJECT_AUXV, NULL); } return info->data; @@ -371,14 +372,6 @@ target_read_auxv () /* See auxv.h. */ -gdb::optional -target_read_auxv_raw (target_ops *ops) -{ - return target_read_alloc (ops, TARGET_OBJECT_AUXV, NULL); -} - -/* See auxv.h. */ - int target_auxv_search (const gdb::byte_vector &auxv, target_ops *ops, gdbarch *gdbarch, CORE_ADDR match, CORE_ADDR *valp) diff --git a/gdb/auxv.h b/gdb/auxv.h index 788d187b27a0..abdba082e7bb 100644 --- a/gdb/auxv.h +++ b/gdb/auxv.h @@ -50,10 +50,6 @@ extern int svr4_auxv_parse (struct gdbarch *gdbarch, const gdb_byte **readptr, extern gdb::optional target_read_auxv (); -/* Read auxv data from OPS. */ - -extern gdb::optional target_read_auxv_raw (target_ops *ops); - /* Search AUXV for an entry with a_type matching MATCH. OPS and GDBARCH are the target and architecture to use to parse auxv entries. diff --git a/gdb/corelow.c b/gdb/corelow.c index c8cd5b7a2570..1fdfd80bbc91 100644 --- a/gdb/corelow.c +++ b/gdb/corelow.c @@ -1123,7 +1123,7 @@ core_target::read_description () { const struct target_desc *result; - result = gdbarch_core_read_description (m_core_gdbarch, this, core_bfd); + result = gdbarch_core_read_description (m_core_gdbarch, core_bfd); if (result != NULL) return result; } diff --git a/gdb/gdbarch-components.py b/gdb/gdbarch-components.py index 9b688998a7bd..70381e5a8fce 100644 --- a/gdb/gdbarch-components.py +++ b/gdb/gdbarch-components.py @@ -1892,7 +1892,7 @@ Refresh overlay mapped state for section OSECT. Method( type="const struct target_desc *", name="core_read_description", - params=[("struct target_ops *", "target"), ("bfd *", "abfd")], + params=[("bfd *", "abfd")], predicate=True, invalid=True, ) diff --git a/gdb/gdbarch-gen.h b/gdb/gdbarch-gen.h index a663316df166..4de2b31bc2e3 100644 --- a/gdb/gdbarch-gen.h +++ b/gdb/gdbarch-gen.h @@ -1127,8 +1127,8 @@ extern void set_gdbarch_overlay_update (struct gdbarch *gdbarch, gdbarch_overlay extern bool gdbarch_core_read_description_p (struct gdbarch *gdbarch); -typedef const struct target_desc * (gdbarch_core_read_description_ftype) (struct gdbarch *gdbarch, struct target_ops *target, bfd *abfd); -extern const struct target_desc * gdbarch_core_read_description (struct gdbarch *gdbarch, struct target_ops *target, bfd *abfd); +typedef const struct target_desc * (gdbarch_core_read_description_ftype) (struct gdbarch *gdbarch, bfd *abfd); +extern const struct target_desc * gdbarch_core_read_description (struct gdbarch *gdbarch, bfd *abfd); extern void set_gdbarch_core_read_description (struct gdbarch *gdbarch, gdbarch_core_read_description_ftype *core_read_description); /* Set if the address in N_SO or N_FUN stabs may be zero. */ diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c index 3227e9458801..1ed28515a3d9 100644 --- a/gdb/gdbarch.c +++ b/gdb/gdbarch.c @@ -4211,13 +4211,13 @@ gdbarch_core_read_description_p (struct gdbarch *gdbarch) } const struct target_desc * -gdbarch_core_read_description (struct gdbarch *gdbarch, struct target_ops *target, bfd *abfd) +gdbarch_core_read_description (struct gdbarch *gdbarch, bfd *abfd) { gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->core_read_description != NULL); if (gdbarch_debug >= 2) gdb_printf (gdb_stdlog, "gdbarch_core_read_description called\n"); - return gdbarch->core_read_description (gdbarch, target, abfd); + return gdbarch->core_read_description (gdbarch, abfd); } void diff --git a/gdb/i386-fbsd-tdep.c b/gdb/i386-fbsd-tdep.c index eef124fca0ce..fb3a384d9442 100644 --- a/gdb/i386-fbsd-tdep.c +++ b/gdb/i386-fbsd-tdep.c @@ -281,9 +281,7 @@ i386fbsd_core_read_xcr0 (bfd *abfd) /* Implement the core_read_description gdbarch method. */ static const struct target_desc * -i386fbsd_core_read_description (struct gdbarch *gdbarch, - struct target_ops *target, - bfd *abfd) +i386fbsd_core_read_description (gdbarch *gdbarch, bfd *abfd) { return i386_target_description (i386fbsd_core_read_xcr0 (abfd), true); } diff --git a/gdb/i386-linux-tdep.c b/gdb/i386-linux-tdep.c index 5c2fed39868c..63a56b86a974 100644 --- a/gdb/i386-linux-tdep.c +++ b/gdb/i386-linux-tdep.c @@ -703,9 +703,7 @@ i386_linux_read_description (uint64_t xcr0) /* Get Linux/x86 target description from core dump. */ static const struct target_desc * -i386_linux_core_read_description (struct gdbarch *gdbarch, - struct target_ops *target, - bfd *abfd) +i386_linux_core_read_description (gdbarch *gdbarch, bfd *abfd) { /* Linux/i386. */ uint64_t xcr0 = i386_linux_core_read_xcr0 (abfd); diff --git a/gdb/linux-tdep.c b/gdb/linux-tdep.c index c30d9fb13f8c..e094f7a5735e 100644 --- a/gdb/linux-tdep.c +++ b/gdb/linux-tdep.c @@ -2661,10 +2661,12 @@ linux_displaced_step_restore_all_in_ptid (inferior *parent_inf, ptid_t ptid) /* Helper for linux_get_hwcap and linux_get_hwcap2. */ static CORE_ADDR -linux_get_hwcap_helper (const gdb::optional &auxv, - target_ops *target, gdbarch *gdbarch, CORE_ADDR match) +linux_get_hwcap_helper (gdbarch *gdbarch, CORE_ADDR match) { + gdb::optional auxv = target_read_auxv (); + target_ops *target = current_inferior ()->top_target (); CORE_ADDR field; + if (!auxv.has_value () || target_auxv_search (*auxv, target, gdbarch, match, &field) != 1) return 0; @@ -2674,10 +2676,9 @@ linux_get_hwcap_helper (const gdb::optional &auxv, /* See linux-tdep.h. */ CORE_ADDR -linux_get_hwcap (const gdb::optional &auxv, - target_ops *target, gdbarch *gdbarch) +linux_get_hwcap (gdbarch *gdbarch) { - return linux_get_hwcap_helper (auxv, target, gdbarch, AT_HWCAP); + return linux_get_hwcap_helper (gdbarch, AT_HWCAP); } /* See linux-tdep.h. */ @@ -2685,18 +2686,15 @@ linux_get_hwcap (const gdb::optional &auxv, CORE_ADDR linux_get_hwcap () { - return linux_get_hwcap (target_read_auxv (), - current_inferior ()->top_target (), - current_inferior ()->gdbarch); + return linux_get_hwcap (current_inferior ()->gdbarch); } /* See linux-tdep.h. */ CORE_ADDR -linux_get_hwcap2 (const gdb::optional &auxv, - target_ops *target, gdbarch *gdbarch) +linux_get_hwcap2 (gdbarch *gdbarch) { - return linux_get_hwcap_helper (auxv, target, gdbarch, AT_HWCAP2); + return linux_get_hwcap_helper (gdbarch, AT_HWCAP2); } /* See linux-tdep.h. */ @@ -2704,9 +2702,7 @@ linux_get_hwcap2 (const gdb::optional &auxv, CORE_ADDR linux_get_hwcap2 () { - return linux_get_hwcap2 (target_read_auxv (), - current_inferior ()->top_target (), - current_inferior ()->gdbarch); + return linux_get_hwcap2 (current_inferior ()->gdbarch); } /* Display whether the gcore command is using the diff --git a/gdb/linux-tdep.h b/gdb/linux-tdep.h index 95cc29c828c2..b7a52ccde235 100644 --- a/gdb/linux-tdep.h +++ b/gdb/linux-tdep.h @@ -90,23 +90,21 @@ extern void linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch, extern int linux_is_uclinux (void); -/* Fetch the AT_HWCAP entry from auxv data AUXV. Use TARGET and GDBARCH to - parse auxv entries. +/* Fetch the AT_HWCAP entry from the current inferior's auxv data. Use GDBARCH + to parse auxv entries. On error, 0 is returned. */ -extern CORE_ADDR linux_get_hwcap (const gdb::optional &auxv, - struct target_ops *target, gdbarch *gdbarch); +extern CORE_ADDR linux_get_hwcap (gdbarch *gdbarch); /* Same as the above, but obtain all the inputs from the current inferior. */ extern CORE_ADDR linux_get_hwcap (); -/* Fetch the AT_HWCAP2 entry from auxv data AUXV. Use TARGET and GDBARCH to - parse auxv entries. +/* Fetch the AT_HWCAP2 entry from the current inferior's auxv data. Use GDBARCH + to parse auxv entries. On error, 0 is returned. */ -extern CORE_ADDR linux_get_hwcap2 (const gdb::optional &auxv, - struct target_ops *target, gdbarch *gdbarch); +extern CORE_ADDR linux_get_hwcap2 (gdbarch *gdbarch); /* Same as the above, but obtain all the inputs from the current inferior. */ diff --git a/gdb/mips-linux-tdep.c b/gdb/mips-linux-tdep.c index 1b3b5f88edbc..534d47fc1ae5 100644 --- a/gdb/mips-linux-tdep.c +++ b/gdb/mips-linux-tdep.c @@ -554,9 +554,7 @@ mips_linux_iterate_over_regset_sections (struct gdbarch *gdbarch, } static const struct target_desc * -mips_linux_core_read_description (struct gdbarch *gdbarch, - struct target_ops *target, - bfd *abfd) +mips_linux_core_read_description (gdbarch *gdbarch, bfd *abfd) { asection *section = bfd_get_section_by_name (abfd, ".reg"); if (! section) diff --git a/gdb/ppc-linux-tdep.c b/gdb/ppc-linux-tdep.c index 39d692b2764c..cec3a31d7746 100644 --- a/gdb/ppc-linux-tdep.c +++ b/gdb/ppc-linux-tdep.c @@ -1566,9 +1566,7 @@ ppc_linux_write_pc (struct regcache *regcache, CORE_ADDR pc) } static const struct target_desc * -ppc_linux_core_read_description (struct gdbarch *gdbarch, - struct target_ops *target, - bfd *abfd) +ppc_linux_core_read_description (gdbarch *gdbarch, bfd *abfd) { struct ppc_linux_features features = ppc_linux_no_features; asection *altivec = bfd_get_section_by_name (abfd, ".reg-ppc-vmx"); @@ -1601,8 +1599,7 @@ ppc_linux_core_read_description (struct gdbarch *gdbarch, if (vsx) features.vsx = true; - gdb::optional auxv = target_read_auxv_raw (target); - CORE_ADDR hwcap = linux_get_hwcap (auxv, target, gdbarch); + CORE_ADDR hwcap = linux_get_hwcap (gdbarch); features.isa205 = ppc_linux_has_isa205 (hwcap); diff --git a/gdb/s390-linux-tdep.c b/gdb/s390-linux-tdep.c index 14d71134e0cd..d134332b7b16 100644 --- a/gdb/s390-linux-tdep.c +++ b/gdb/s390-linux-tdep.c @@ -328,12 +328,10 @@ s390_iterate_over_regset_sections (struct gdbarch *gdbarch, /* Implement core_read_description gdbarch method. */ static const struct target_desc * -s390_core_read_description (struct gdbarch *gdbarch, - struct target_ops *target, bfd *abfd) +s390_core_read_description (gdbarch *gdbarch, bfd *abfd) { asection *section = bfd_get_section_by_name (abfd, ".reg"); - gdb::optional auxv = target_read_auxv_raw (target); - CORE_ADDR hwcap = linux_get_hwcap (auxv, target, gdbarch); + CORE_ADDR hwcap = linux_get_hwcap (gdbarch); bool high_gprs, v1, v2, te, vx, gs; if (!section)