From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id QJ3pKXc5KWcr0iUAWB0awg (envelope-from ) for ; Mon, 04 Nov 2024 16:15:35 -0500 Authentication-Results: simark.ca; dkim=fail reason="signature verification failed" (768-bit key; unprotected) header.d=tromey.com header.i=@tromey.com header.a=rsa-sha256 header.s=default header.b=ozMIZdfB; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id A47791E5E0; Mon, 4 Nov 2024 16:15:35 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-6.5 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_INVALID,DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, URIBL_BLOCKED,URIBL_DBL_BLOCKED_OPENDNS autolearn=ham autolearn_force=no version=4.0.0 Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 9E0E31E0C0 for ; Mon, 4 Nov 2024 16:15:34 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 5790F3857BA5 for ; Mon, 4 Nov 2024 21:15:34 +0000 (GMT) Received: from omta34.uswest2.a.cloudfilter.net (omta34.uswest2.a.cloudfilter.net [35.89.44.33]) by sourceware.org (Postfix) with ESMTPS id 30D0A3858C5F for ; Mon, 4 Nov 2024 21:14:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 30D0A3858C5F Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tromey.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 30D0A3858C5F Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=35.89.44.33 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1730754859; cv=none; b=j8geTwtWrFHFlz3+/y/ldEwoVvIfdtkW1VdlgcMNP3dSs/TyQAVbbxLOq2RBh3UeYJaVOTdGjhXA7MevkOF+3ToNf/OWG44KmcEZjWPZVj2tyjA/tJZ8+i/0oprBKDzAnm7Zt7WzT1mFIJksMgiQmBU/jXRkp7kwI+rIIRFMX5o= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1730754859; c=relaxed/simple; bh=HB/++kFqR/Bo8Pz3LzEQd8zIwkpOiJFrpn04LxZkyuA=; h=DKIM-Signature:From:Date:Subject:MIME-Version:Message-Id:To; b=ZyA1VP5RCoMLA0NaB9lSZXAwGdcmjpgkt432PDtb364irvEeg761wmx/CM8Cz1/QqBrmZO2hB4uG0Acg/iTH2ebfXDXM9Pi/3MVnYMA23K+m8WOZelsJ72oVGleSl+CNpyGllrorxCdbtiQBA+AoLSwhf0Ds+GVQBT1Z1aPnYLc= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from eig-obgw-6008a.ext.cloudfilter.net ([10.0.30.227]) by cmsmtp with ESMTPS id 7ydftVKUJVpzp84OttSxqm; Mon, 04 Nov 2024 21:14:15 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id 84OstPhPFzWaB84Ostc711; Mon, 04 Nov 2024 21:14:14 +0000 X-Authority-Analysis: v=2.4 cv=dfaG32Xe c=1 sm=1 tr=0 ts=67293926 a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=IkcTkHD0fZMA:10 a=VlfZXiiP6vEA:10 a=ItBw4LHWJt0A:10 a=rhcdpRTCQAOqT6zFdU0A:9 a=QEXdDO2ut3YA:10 a=6Ogn3jAGHLSNbaov7Orx:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Cc:To:In-Reply-To:References:Message-Id: Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date:From:Sender: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=iuAQ4wITLj5K4iX26vq4QLTzvHIdOFUVozdy/wIWumI=; b=ozMIZdfBtmz6H31T/IOHfPTE9x D4PjXhBlKff0QGEBd3QznG0kZ8f679pR+6GQKwyYu57Taay/dV+822rAwegzYDF+ok/ZY3XuvB2Eo 1DO3HDjqho0MiIFIPDIxBc+En; Received: from 97-122-113-155.hlrn.qwest.net ([97.122.113.155]:36924 helo=prentzel.local) by box5379.bluehost.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96.2) (envelope-from ) id 1t84Os-003uOz-0O; Mon, 04 Nov 2024 14:14:14 -0700 From: Tom Tromey Date: Mon, 04 Nov 2024 14:14:12 -0700 Subject: [PATCH 2/6] Use 'invalid' rather than 'predicate' in some gdbarch functions MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20241104-check-unused-gdbarch-v1-2-7082f2121077@tromey.com> References: <20241104-check-unused-gdbarch-v1-0-7082f2121077@tromey.com> In-Reply-To: <20241104-check-unused-gdbarch-v1-0-7082f2121077@tromey.com> To: gdb-patches@sourceware.org Cc: Tom Tromey X-Mailer: b4 0.14.2 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - sourceware.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 97.122.113.155 X-Source-L: No X-Exim-ID: 1t84Os-003uOz-0O X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 97-122-113-155.hlrn.qwest.net (prentzel.local) [97.122.113.155]:36924 X-Source-Auth: tom+tromey.com X-Email-Count: 5 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfH943I3erMUXwwPgZlWx2XbaHFalRYoICGf5HXp0YJmxmWKxKhFrD9fTbE2f5kS0Kbeh6cqJP8VT0LOBQF15oC7MArk8HIbT5uNLvQ8dhKDBzsC0D3XH nRvWcryiqECBYNzsRtGyKyBqoUaxMMGM4yqAwbkA5CpybgokO82DCBuojxWlvtfJKtOUOkV4SEsUDtUTgEhTQVZy6qXsGOZOT+4= X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org The check-gdbarch.py script points out that a few gdbarch functions have a predicate that is never called. This patch changes these functions to use 'invalid=False' instead, removing a bit of code. --- gdb/check-gdbarch.py | 5 +--- gdb/gdbarch-gen.c | 75 +++++------------------------------------------ gdb/gdbarch-gen.h | 12 -------- gdb/gdbarch_components.py | 13 ++++---- 4 files changed, 14 insertions(+), 91 deletions(-) diff --git a/gdb/check-gdbarch.py b/gdb/check-gdbarch.py index 1f7479e7d1bdfc177e62ae9f58d971b8b8e34ce9..6f2983c79841d0c8251fdc5c2b284be7702623c5 100755 --- a/gdb/check-gdbarch.py +++ b/gdb/check-gdbarch.py @@ -84,7 +84,4 @@ for line in fileinput.input(files=files): for elt in defined_names - set_names: print(f"never set: {elt}") for elt in defined_names - called_names: - # Don't report _p functions here, predicate=True is sometimes used - # to allow optional functions. - if not elt.endswith("_p"): - print(f"never called: {elt}") + print(f"never called: {elt}") diff --git a/gdb/gdbarch-gen.c b/gdb/gdbarch-gen.c index 0d00cd7c9933ecf0dc40a216f177858803fdd0eb..e50bb1e9a819fe8e2a0219314fe939eb307e4424 100644 --- a/gdb/gdbarch-gen.c +++ b/gdb/gdbarch-gen.c @@ -197,7 +197,7 @@ struct gdbarch gdbarch_displaced_step_copy_insn_closure_by_addr_ftype *displaced_step_copy_insn_closure_by_addr = nullptr; gdbarch_displaced_step_restore_all_in_ptid_ftype *displaced_step_restore_all_in_ptid = nullptr; ULONGEST displaced_step_buffer_length = 0; - gdbarch_relocate_instruction_ftype *relocate_instruction = NULL; + gdbarch_relocate_instruction_ftype *relocate_instruction = nullptr; gdbarch_overlay_update_ftype *overlay_update = nullptr; gdbarch_core_read_description_ftype *core_read_description = nullptr; int sofun_address_maybe_missing = 0; @@ -332,7 +332,7 @@ verify_gdbarch (struct gdbarch *gdbarch) /* Skip verify of pseudo_register_read, has predicate. */ /* Skip verify of pseudo_register_read_value, has predicate. */ /* Skip verify of pseudo_register_write, has predicate. */ - /* Skip verify of deprecated_pseudo_register_write, has predicate. */ + /* Skip verify of deprecated_pseudo_register_write, invalid_p == 0. */ if (gdbarch->num_regs == -1) log.puts ("\n\tnum_regs"); /* Skip verify of num_pseudo_regs, invalid_p == 0. */ @@ -435,12 +435,12 @@ verify_gdbarch (struct gdbarch *gdbarch) /* Skip verify of execute_dwarf_cfa_vendor_op, invalid_p == 0. */ /* Skip verify of address_class_name_to_type_flags, has predicate. */ /* Skip verify of register_reggroup_p, invalid_p == 0. */ - /* Skip verify of fetch_pointer_argument, has predicate. */ + /* Skip verify of fetch_pointer_argument, invalid_p == 0. */ /* Skip verify of iterate_over_regset_sections, has predicate. */ /* Skip verify of make_corefile_notes, has predicate. */ /* Skip verify of find_memory_regions, has predicate. */ - /* Skip verify of create_memtag_section, has predicate. */ - /* Skip verify of fill_memtag_section, has predicate. */ + /* Skip verify of create_memtag_section, invalid_p == 0. */ + /* Skip verify of fill_memtag_section, invalid_p == 0. */ /* Skip verify of decode_memtag_section, has predicate. */ /* Skip verify of core_xfer_shared_libraries, has predicate. */ /* Skip verify of core_xfer_shared_libraries_aix, has predicate. */ @@ -453,7 +453,7 @@ verify_gdbarch (struct gdbarch *gdbarch) /* Skip verify of vbit_in_delta, invalid_p == 0. */ /* Skip verify of skip_permanent_breakpoint, invalid_p == 0. */ /* Skip verify of max_insn_length, has predicate. */ - /* Skip verify of displaced_step_copy_insn, has predicate. */ + /* Skip verify of displaced_step_copy_insn, invalid_p == 0. */ /* Skip verify of displaced_step_hw_singlestep, invalid_p == 0. */ if ((gdbarch->displaced_step_copy_insn == nullptr) != (gdbarch->displaced_step_fixup == nullptr)) log.puts ("\n\tdisplaced_step_fixup"); @@ -466,7 +466,7 @@ verify_gdbarch (struct gdbarch *gdbarch) gdbarch->displaced_step_buffer_length = gdbarch->max_insn_length; if (gdbarch->displaced_step_buffer_length < gdbarch->max_insn_length) log.puts ("\n\tdisplaced_step_buffer_length"); - /* Skip verify of relocate_instruction, has predicate. */ + /* Skip verify of relocate_instruction, invalid_p == 0. */ /* Skip verify of overlay_update, has predicate. */ /* Skip verify of core_read_description, has predicate. */ /* Skip verify of sofun_address_maybe_missing, invalid_p == 0. */ @@ -657,9 +657,6 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file) gdb_printf (file, "gdbarch_dump: pseudo_register_write = <%s>\n", host_address_to_string (gdbarch->pseudo_register_write)); - gdb_printf (file, - "gdbarch_dump: gdbarch_deprecated_pseudo_register_write_p() = %d\n", - gdbarch_deprecated_pseudo_register_write_p (gdbarch)); gdb_printf (file, "gdbarch_dump: deprecated_pseudo_register_write = <%s>\n", host_address_to_string (gdbarch->deprecated_pseudo_register_write)); @@ -1011,9 +1008,6 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file) gdb_printf (file, "gdbarch_dump: register_reggroup_p = <%s>\n", host_address_to_string (gdbarch->register_reggroup_p)); - gdb_printf (file, - "gdbarch_dump: gdbarch_fetch_pointer_argument_p() = %d\n", - gdbarch_fetch_pointer_argument_p (gdbarch)); gdb_printf (file, "gdbarch_dump: fetch_pointer_argument = <%s>\n", host_address_to_string (gdbarch->fetch_pointer_argument)); @@ -1035,15 +1029,9 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file) gdb_printf (file, "gdbarch_dump: find_memory_regions = <%s>\n", host_address_to_string (gdbarch->find_memory_regions)); - gdb_printf (file, - "gdbarch_dump: gdbarch_create_memtag_section_p() = %d\n", - gdbarch_create_memtag_section_p (gdbarch)); gdb_printf (file, "gdbarch_dump: create_memtag_section = <%s>\n", host_address_to_string (gdbarch->create_memtag_section)); - gdb_printf (file, - "gdbarch_dump: gdbarch_fill_memtag_section_p() = %d\n", - gdbarch_fill_memtag_section_p (gdbarch)); gdb_printf (file, "gdbarch_dump: fill_memtag_section = <%s>\n", host_address_to_string (gdbarch->fill_memtag_section)); @@ -1110,9 +1098,6 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file) gdb_printf (file, "gdbarch_dump: max_insn_length = %s\n", plongest (gdbarch->max_insn_length)); - gdb_printf (file, - "gdbarch_dump: gdbarch_displaced_step_copy_insn_p() = %d\n", - gdbarch_displaced_step_copy_insn_p (gdbarch)); gdb_printf (file, "gdbarch_dump: displaced_step_copy_insn = <%s>\n", host_address_to_string (gdbarch->displaced_step_copy_insn)); @@ -1143,9 +1128,6 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file) gdb_printf (file, "gdbarch_dump: displaced_step_buffer_length = %s\n", plongest (gdbarch->displaced_step_buffer_length)); - gdb_printf (file, - "gdbarch_dump: gdbarch_relocate_instruction_p() = %d\n", - gdbarch_relocate_instruction_p (gdbarch)); gdb_printf (file, "gdbarch_dump: relocate_instruction = <%s>\n", host_address_to_string (gdbarch->relocate_instruction)); @@ -1934,13 +1916,6 @@ set_gdbarch_pseudo_register_write (struct gdbarch *gdbarch, gdbarch->pseudo_register_write = pseudo_register_write; } -bool -gdbarch_deprecated_pseudo_register_write_p (struct gdbarch *gdbarch) -{ - gdb_assert (gdbarch != NULL); - return gdbarch->deprecated_pseudo_register_write != NULL; -} - void gdbarch_deprecated_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const gdb_byte *buf) { @@ -3715,13 +3690,6 @@ set_gdbarch_register_reggroup_p (struct gdbarch *gdbarch, gdbarch->register_reggroup_p = register_reggroup_p; } -bool -gdbarch_fetch_pointer_argument_p (struct gdbarch *gdbarch) -{ - gdb_assert (gdbarch != NULL); - return gdbarch->fetch_pointer_argument != NULL; -} - CORE_ADDR gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch, const frame_info_ptr &frame, int argi, struct type *type) { @@ -3811,13 +3779,6 @@ set_gdbarch_find_memory_regions (struct gdbarch *gdbarch, gdbarch->find_memory_regions = find_memory_regions; } -bool -gdbarch_create_memtag_section_p (struct gdbarch *gdbarch) -{ - gdb_assert (gdbarch != NULL); - return gdbarch->create_memtag_section != NULL; -} - asection * gdbarch_create_memtag_section (struct gdbarch *gdbarch, bfd *obfd, CORE_ADDR address, size_t size) { @@ -3835,13 +3796,6 @@ set_gdbarch_create_memtag_section (struct gdbarch *gdbarch, gdbarch->create_memtag_section = create_memtag_section; } -bool -gdbarch_fill_memtag_section_p (struct gdbarch *gdbarch) -{ - gdb_assert (gdbarch != NULL); - return gdbarch->fill_memtag_section != NULL; -} - bool gdbarch_fill_memtag_section (struct gdbarch *gdbarch, asection *osec) { @@ -4128,13 +4082,6 @@ set_gdbarch_max_insn_length (struct gdbarch *gdbarch, gdbarch->max_insn_length = max_insn_length; } -bool -gdbarch_displaced_step_copy_insn_p (struct gdbarch *gdbarch) -{ - gdb_assert (gdbarch != NULL); - return gdbarch->displaced_step_copy_insn != NULL; -} - displaced_step_copy_insn_closure_up gdbarch_displaced_step_copy_insn (struct gdbarch *gdbarch, CORE_ADDR from, CORE_ADDR to, struct regcache *regs) { @@ -4286,19 +4233,11 @@ set_gdbarch_displaced_step_buffer_length (struct gdbarch *gdbarch, gdbarch->displaced_step_buffer_length = displaced_step_buffer_length; } -bool -gdbarch_relocate_instruction_p (struct gdbarch *gdbarch) -{ - gdb_assert (gdbarch != NULL); - return gdbarch->relocate_instruction != NULL; -} - void gdbarch_relocate_instruction (struct gdbarch *gdbarch, CORE_ADDR *to, CORE_ADDR from) { gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->relocate_instruction != NULL); - /* Do not check predicate: gdbarch->relocate_instruction != NULL, allow call. */ if (gdbarch_debug >= 2) gdb_printf (gdb_stdlog, "gdbarch_relocate_instruction called\n"); gdbarch->relocate_instruction (gdbarch, to, from); diff --git a/gdb/gdbarch-gen.h b/gdb/gdbarch-gen.h index b982fd7cd092e071d90b010b9deee2c270520855..582c682de21412b6ead55280fc936c2ce37ee4b7 100644 --- a/gdb/gdbarch-gen.h +++ b/gdb/gdbarch-gen.h @@ -220,8 +220,6 @@ extern void set_gdbarch_pseudo_register_write (struct gdbarch *gdbarch, gdbarch_ Implementations should be migrated to implement pseudo_register_write instead. */ -extern bool gdbarch_deprecated_pseudo_register_write_p (struct gdbarch *gdbarch); - typedef void (gdbarch_deprecated_pseudo_register_write_ftype) (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const gdb_byte *buf); extern void gdbarch_deprecated_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const gdb_byte *buf); extern void set_gdbarch_deprecated_pseudo_register_write (struct gdbarch *gdbarch, gdbarch_deprecated_pseudo_register_write_ftype *deprecated_pseudo_register_write); @@ -925,8 +923,6 @@ extern void set_gdbarch_register_reggroup_p (struct gdbarch *gdbarch, gdbarch_re /* Fetch the pointer to the ith function argument. */ -extern bool gdbarch_fetch_pointer_argument_p (struct gdbarch *gdbarch); - typedef CORE_ADDR (gdbarch_fetch_pointer_argument_ftype) (const frame_info_ptr &frame, int argi, struct type *type); extern CORE_ADDR gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch, const frame_info_ptr &frame, int argi, struct type *type); extern void set_gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch, gdbarch_fetch_pointer_argument_ftype *fetch_pointer_argument); @@ -962,16 +958,12 @@ extern void set_gdbarch_find_memory_regions (struct gdbarch *gdbarch, gdbarch_fi /* Given a bfd OBFD, segment ADDRESS and SIZE, create a memory tag section to be dumped to a core file */ -extern bool gdbarch_create_memtag_section_p (struct gdbarch *gdbarch); - typedef asection * (gdbarch_create_memtag_section_ftype) (struct gdbarch *gdbarch, bfd *obfd, CORE_ADDR address, size_t size); extern asection * gdbarch_create_memtag_section (struct gdbarch *gdbarch, bfd *obfd, CORE_ADDR address, size_t size); extern void set_gdbarch_create_memtag_section (struct gdbarch *gdbarch, gdbarch_create_memtag_section_ftype *create_memtag_section); /* Given a memory tag section OSEC, fill OSEC's contents with the appropriate tag data */ -extern bool gdbarch_fill_memtag_section_p (struct gdbarch *gdbarch); - typedef bool (gdbarch_fill_memtag_section_ftype) (struct gdbarch *gdbarch, asection *osec); extern bool gdbarch_fill_memtag_section (struct gdbarch *gdbarch, asection *osec); extern void set_gdbarch_fill_memtag_section (struct gdbarch *gdbarch, gdbarch_fill_memtag_section_ftype *fill_memtag_section); @@ -1099,8 +1091,6 @@ extern void set_gdbarch_max_insn_length (struct gdbarch *gdbarch, ULONGEST max_i core falls back to stepping past the instruction in-line instead in that case. */ -extern bool gdbarch_displaced_step_copy_insn_p (struct gdbarch *gdbarch); - typedef displaced_step_copy_insn_closure_up (gdbarch_displaced_step_copy_insn_ftype) (struct gdbarch *gdbarch, CORE_ADDR from, CORE_ADDR to, struct regcache *regs); extern displaced_step_copy_insn_closure_up gdbarch_displaced_step_copy_insn (struct gdbarch *gdbarch, CORE_ADDR from, CORE_ADDR to, struct regcache *regs); extern void set_gdbarch_displaced_step_copy_insn (struct gdbarch *gdbarch, gdbarch_displaced_step_copy_insn_ftype *displaced_step_copy_insn); @@ -1203,8 +1193,6 @@ extern void set_gdbarch_displaced_step_buffer_length (struct gdbarch *gdbarch, U relative branches, and other PC-relative instructions need the offset adjusted; etc. */ -extern bool gdbarch_relocate_instruction_p (struct gdbarch *gdbarch); - typedef void (gdbarch_relocate_instruction_ftype) (struct gdbarch *gdbarch, CORE_ADDR *to, CORE_ADDR from); extern void gdbarch_relocate_instruction (struct gdbarch *gdbarch, CORE_ADDR *to, CORE_ADDR from); extern void set_gdbarch_relocate_instruction (struct gdbarch *gdbarch, gdbarch_relocate_instruction_ftype *relocate_instruction); diff --git a/gdb/gdbarch_components.py b/gdb/gdbarch_components.py index 4006380076dc7e25aadb13e640c9788ca326b65d..1c7a0aea35e40fe4b05349ee7815ba92a82bda7a 100644 --- a/gdb/gdbarch_components.py +++ b/gdb/gdbarch_components.py @@ -453,7 +453,7 @@ Implementations should be migrated to implement pseudo_register_write instead. ("int", "cookednum"), ("const gdb_byte *", "buf"), ], - predicate=True, + invalid=False, ) Value( @@ -1600,7 +1600,7 @@ Fetch the pointer to the ith function argument. ("int", "argi"), ("struct type *", "type"), ], - predicate=True, + invalid=False, ) Method( @@ -1649,7 +1649,7 @@ Given a bfd OBFD, segment ADDRESS and SIZE, create a memory tag section to be du type="asection *", name="create_memtag_section", params=[("bfd *", "obfd"), ("CORE_ADDR", "address"), ("size_t", "size")], - predicate=True, + invalid=False, ) Method( @@ -1659,7 +1659,7 @@ Given a memory tag section OSEC, fill OSEC's contents with the appropriate tag d type="bool", name="fill_memtag_section", params=[("asection *", "osec")], - predicate=True, + invalid=False, ) Method( @@ -1829,7 +1829,7 @@ that case. type="displaced_step_copy_insn_closure_up", name="displaced_step_copy_insn", params=[("CORE_ADDR", "from"), ("CORE_ADDR", "to"), ("struct regcache *", "regs")], - predicate=True, + invalid=False, ) Method( @@ -1971,8 +1971,7 @@ offset adjusted; etc. type="void", name="relocate_instruction", params=[("CORE_ADDR *", "to"), ("CORE_ADDR", "from")], - predicate=True, - predefault="NULL", + invalid=False, ) Function( -- 2.46.1