From patchwork Fri Mar 10 18:43:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Burgess X-Patchwork-Id: 66246 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 E53273858033 for ; Fri, 10 Mar 2023 18:43:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E53273858033 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1678473838; bh=eL3mdRKfSOdbQeDZwIBz/qU+bN8SikfzangJsCJNiZk=; 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=jj22Mv+Bo+zBdULTwuIrBhA92mUX7/6jwO59gjGQwNqXWh6BH1E+Z1/zAsqxpyNf0 LX3px+fNlCoeDzyufLbRBMKwZGpuoYPM2oZsFzIETPcqPiPcml9a1rU99A0sIgPCgK /B7zD3+mceD8RQIRDUBpYHuFBLplU5wsQtzbpdQ0= X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 527053858407 for ; Fri, 10 Mar 2023 18:43:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 527053858407 Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-145-bfej9yCxNeiTSSv8dw3eUg-1; Fri, 10 Mar 2023 13:43:24 -0500 X-MC-Unique: bfej9yCxNeiTSSv8dw3eUg-1 Received: by mail-wm1-f70.google.com with SMTP id m28-20020a05600c3b1c00b003e7d4662b83so4261888wms.0 for ; Fri, 10 Mar 2023 10:43:24 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678473803; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=eL3mdRKfSOdbQeDZwIBz/qU+bN8SikfzangJsCJNiZk=; b=iuOryq72AAjXSLItOQvTAdolaoRFfmYAo+rSbsSChJIR1Fk7Q0tH2jmK8hA5HRow1p F08jIIPelaa2HQJXd0QTI85HGYlgE11C1daUL6Vuga3cPECCTq/P7TABOV7kixDUVcRH ROk2dFjZzYYcjXX/QFs9hhgdHQG+hpUzsoZlqCPAf89Ely/xYs2+SskrMY5K3YQNIB6+ kJDDsGwA2bT07H0Zc0wmV22X1lEkVJ4kIq7SxQ5CaaQ3g9/f5z7nbQBqE258JU9+W0ee OvWo6PnXpwXHFvu2PRIvvSf5XkeBHq4/u7JimHlZ8HlYpOyYdTPi/vduBGou+EB8FdM7 Aowg== X-Gm-Message-State: AO0yUKXHkmTa2o3tr43lpMZDM9xJC8MkxwaKJKpxwF+2W9ykmCguowfk YvEZy58IGwPs98uCe1rMHGUvlRnaPpbc33JRikjpnfJu0S3zgAQG81xBW5kPHvFeY2axAGlRN1E xvUU44+ldrVOxa08HL/IhXnvKH8fPv990hQHRYdDwZvnrpwAX9dByef14QFGY2fcX/lCk99mZGA cFXJRSIw== X-Received: by 2002:a5d:6689:0:b0:2c7:a39:7453 with SMTP id l9-20020a5d6689000000b002c70a397453mr19140506wru.54.1678473803392; Fri, 10 Mar 2023 10:43:23 -0800 (PST) X-Google-Smtp-Source: AK7set9kJIE94K+SeuJyzBrykQCSq6tbil//wBmsJ7zB23Gwwn4UuLf3KXZwLgLIrqlWEnSzL+gIRQ== X-Received: by 2002:a5d:6689:0:b0:2c7:a39:7453 with SMTP id l9-20020a5d6689000000b002c70a397453mr19140483wru.54.1678473802900; Fri, 10 Mar 2023 10:43:22 -0800 (PST) Received: from localhost (95.72.115.87.dyn.plus.net. [87.115.72.95]) by smtp.gmail.com with ESMTPSA id n6-20020a5d6b86000000b002c54c8e70b1sm460579wrx.9.2023.03.10.10.43.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Mar 2023 10:43:22 -0800 (PST) To: gdb-patches@sourceware.org Cc: Andrew Burgess Subject: [PATCHv3 1/9] gdb/gdbarch: remove unused 'invalid=True' from gdbarch_components.py Date: Fri, 10 Mar 2023 18:43:10 +0000 Message-Id: X-Mailer: git-send-email 2.25.4 In-Reply-To: References: MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-11.7 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, 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: Andrew Burgess via Gdb-patches From: Andrew Burgess Reply-To: Andrew Burgess Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Sender: "Gdb-patches" Due to the algorithm used to generate verify_gdbarch in gdbarch.py, if a component has a predicate, then a validation check will never be generated. There are a bunch of components that are declared with both a predicate AND have 'invalid=True' set. The 'invalid=True' has no effect. In this commit I clean things up by removing all these additional 'invalid=True' lines. There's no change in any of the generated files after this commit. --- gdb/gdbarch_components.py | 64 --------------------------------------- 1 file changed, 64 deletions(-) diff --git a/gdb/gdbarch_components.py b/gdb/gdbarch_components.py index caa65c334ec..656c6a9f905 100644 --- a/gdb/gdbarch_components.py +++ b/gdb/gdbarch_components.py @@ -374,7 +374,6 @@ Function( name="read_pc", params=[("readable_regcache *", "regcache")], predicate=True, - invalid=True, ) Function( @@ -382,7 +381,6 @@ Function( name="write_pc", params=[("struct regcache *", "regcache"), ("CORE_ADDR", "val")], predicate=True, - invalid=True, ) Method( @@ -411,7 +409,6 @@ Method( ("gdb_byte *", "buf"), ], predicate=True, - invalid=True, ) Method( @@ -425,7 +422,6 @@ never be called. name="pseudo_register_read_value", params=[("readable_regcache *", "regcache"), ("int", "cookednum")], predicate=True, - invalid=True, ) Method( @@ -437,7 +433,6 @@ Method( ("const gdb_byte *", "buf"), ], predicate=True, - invalid=True, ) Value( @@ -469,7 +464,6 @@ Return -1 if something goes wrong, 0 otherwise. name="ax_pseudo_register_collect", params=[("struct agent_expr *", "ax"), ("int", "reg")], predicate=True, - invalid=True, ) Method( @@ -482,7 +476,6 @@ Return -1 if something goes wrong, 0 otherwise. name="ax_pseudo_register_push_stack", params=[("struct agent_expr *", "ax"), ("int", "reg")], predicate=True, - invalid=True, ) Method( @@ -495,7 +488,6 @@ UIOUT is the output stream where the handler will place information. name="report_signal_info", params=[("struct ui_out *", "uiout"), ("enum gdb_signal", "siggnal")], predicate=True, - invalid=True, ) Value( @@ -649,7 +641,6 @@ Method( ("CORE_ADDR", "struct_addr"), ], predicate=True, - invalid=True, ) Value( @@ -673,7 +664,6 @@ Method( ("struct regcache *", "regcache"), ], predicate=True, - invalid=True, ) Method( @@ -721,7 +711,6 @@ Method( ("const char *", "args"), ], predicate=True, - invalid=True, ) Method( @@ -763,7 +752,6 @@ FRAME corresponds to the longjmp frame. name="get_longjmp_target", params=[("frame_info_ptr", "frame"), ("CORE_ADDR *", "pc")], predicate=True, - invalid=True, ) Value( @@ -845,7 +833,6 @@ Method( name="integer_to_address", params=[("struct type *", "type"), ("const gdb_byte *", "buf")], predicate=True, - invalid=True, ) Method( @@ -952,7 +939,6 @@ Method( name="skip_main_prologue", params=[("CORE_ADDR", "ip")], predicate=True, - invalid=True, ) Method( @@ -973,7 +959,6 @@ is not used. name="skip_entrypoint", params=[("CORE_ADDR", "ip")], predicate=True, - invalid=True, ) Function( @@ -1034,7 +1019,6 @@ Method( name="adjust_breakpoint_address", params=[("CORE_ADDR", "bpaddr")], predicate=True, - invalid=True, ) Method( @@ -1094,7 +1078,6 @@ Fetch the target specific address used to represent a load module. name="fetch_tls_load_module_address", params=[("struct objfile *", "objfile")], predicate=True, - invalid=True, ) Method( @@ -1109,7 +1092,6 @@ be zero for statically linked multithreaded inferiors. name="get_thread_local_address", params=[("ptid_t", "ptid"), ("CORE_ADDR", "lm_addr"), ("CORE_ADDR", "offset")], predicate=True, - invalid=True, ) Value( @@ -1143,7 +1125,6 @@ frame-base. Enable frame-base before frame-unwind. name="frame_num_args", params=[("frame_info_ptr", "frame")], predicate=True, - invalid=True, ) Method( @@ -1151,7 +1132,6 @@ Method( name="frame_align", params=[("CORE_ADDR", "address")], predicate=True, - invalid=True, ) Method( @@ -1314,7 +1294,6 @@ past a conditional branch to self. name="software_single_step", params=[("struct regcache *", "regcache")], predicate=True, - invalid=True, ) Method( @@ -1326,7 +1305,6 @@ further single-step is needed before the instruction finishes. name="single_step_through_delay", params=[("frame_info_ptr", "frame")], predicate=True, - invalid=True, ) Function( @@ -1425,7 +1403,6 @@ the main symbol table and DWARF-2 records. name="elf_make_msymbol_special", params=[("asymbol *", "sym"), ("struct minimal_symbol *", "msym")], predicate=True, - invalid=True, ) Function( @@ -1513,7 +1490,6 @@ Function( name="address_class_type_flags", params=[("int", "byte_size"), ("int", "dwarf2_addr_class")], predicate=True, - invalid=True, ) Method( @@ -1521,7 +1497,6 @@ Method( name="address_class_type_flags_to_name", params=[("type_instance_flags", "type_flags")], predicate=True, - invalid=True, ) Method( @@ -1546,7 +1521,6 @@ type_flags was set, false otherwise. name="address_class_name_to_type_flags", params=[("const char *", "name"), ("type_instance_flags *", "type_flags_ptr")], predicate=True, - invalid=True, ) Method( @@ -1572,7 +1546,6 @@ Fetch the pointer to the ith function argument. ("struct type *", "type"), ], predicate=True, - invalid=True, ) Method( @@ -1592,7 +1565,6 @@ sections. ("const struct regcache *", "regcache"), ], predicate=True, - invalid=True, ) Method( @@ -1603,7 +1575,6 @@ Create core file notes name="make_corefile_notes", params=[("bfd *", "obfd"), ("int *", "note_size")], predicate=True, - invalid=True, ) Method( @@ -1614,7 +1585,6 @@ Find core file memory regions name="find_memory_regions", params=[("find_memory_region_ftype", "func"), ("void *", "data")], predicate=True, - invalid=True, ) Method( @@ -1625,7 +1595,6 @@ Given a bfd OBFD, segment ADDRESS and SIZE, create a memory tag section to be du name="create_memtag_section", params=[("bfd *", "obfd"), ("CORE_ADDR", "address"), ("size_t", "size")], predicate=True, - invalid=True, ) Method( @@ -1636,7 +1605,6 @@ Given a memory tag section OSEC, fill OSEC's contents with the appropriate tag d name="fill_memtag_section", params=[("asection *", "osec")], predicate=True, - invalid=True, ) Method( @@ -1654,7 +1622,6 @@ If no tags were found, return an empty vector. ("size_t", "length"), ], predicate=True, - invalid=True, ) Method( @@ -1668,7 +1635,6 @@ failed, otherwise, return the red length of READBUF. name="core_xfer_shared_libraries", params=[("gdb_byte *", "readbuf"), ("ULONGEST", "offset"), ("ULONGEST", "len")], predicate=True, - invalid=True, ) Method( @@ -1681,7 +1647,6 @@ Return the number of bytes read (zero indicates failure). name="core_xfer_shared_libraries_aix", params=[("gdb_byte *", "readbuf"), ("ULONGEST", "offset"), ("ULONGEST", "len")], predicate=True, - invalid=True, ) Method( @@ -1692,7 +1657,6 @@ How the core target converts a PTID from a core file to a string. name="core_pid_to_str", params=[("ptid_t", "ptid")], predicate=True, - invalid=True, ) Method( @@ -1703,7 +1667,6 @@ How the core target extracts the name of a thread from a core file. name="core_thread_name", params=[("struct thread_info *", "thr")], predicate=True, - invalid=True, ) Method( @@ -1716,7 +1679,6 @@ of bytes read (zero indicates EOF, a negative value indicates failure). name="core_xfer_siginfo", params=[("gdb_byte *", "readbuf"), ("ULONGEST", "offset"), ("ULONGEST", "len")], predicate=True, - invalid=True, ) Value( @@ -1727,7 +1689,6 @@ BFD target to use when generating a core file. name="gcore_bfd_target", predicate=True, predefault="0", - invalid=True, printer="pstring (gdbarch->gcore_bfd_target)", ) @@ -1773,7 +1734,6 @@ The maximum length of an instruction on this architecture in bytes. name="max_insn_length", predicate=True, predefault="0", - invalid=True, ) Method( @@ -1806,7 +1766,6 @@ that case. name="displaced_step_copy_insn", params=[("CORE_ADDR", "from"), ("CORE_ADDR", "to"), ("struct regcache *", "regs")], predicate=True, - invalid=True, ) Method( @@ -1856,7 +1815,6 @@ see the comments in infrun.c. ], predicate=True, predefault="NULL", - invalid=True, ) Method( @@ -1869,7 +1827,6 @@ Throw an exception if any unexpected error happens. name="displaced_step_prepare", params=[("thread_info *", "thread"), ("CORE_ADDR &", "displaced_pc")], predicate=True, - invalid=True, ) Method( @@ -1891,7 +1848,6 @@ Return the closure associated to the displaced step buffer that is at ADDR. name="displaced_step_copy_insn_closure_by_addr", params=[("inferior *", "inf"), ("CORE_ADDR", "addr")], predicate=True, - invalid=True, ) Function( @@ -1924,7 +1880,6 @@ offset adjusted; etc. params=[("CORE_ADDR *", "to"), ("CORE_ADDR", "from")], predicate=True, predefault="NULL", - invalid=True, ) Function( @@ -1935,7 +1890,6 @@ Refresh overlay mapped state for section OSECT. name="overlay_update", params=[("struct obj_section *", "osect")], predicate=True, - invalid=True, ) Method( @@ -1943,7 +1897,6 @@ Method( name="core_read_description", params=[("struct target_ops *", "target"), ("bfd *", "abfd")], predicate=True, - invalid=True, ) Value( @@ -1967,7 +1920,6 @@ Return -1 if something goes wrong, 0 otherwise. name="process_record", params=[("struct regcache *", "regcache"), ("CORE_ADDR", "addr")], predicate=True, - invalid=True, ) Method( @@ -1979,7 +1931,6 @@ Return -1 if something goes wrong, 0 otherwise. name="process_record_signal", params=[("struct regcache *", "regcache"), ("enum gdb_signal", "signal")], predicate=True, - invalid=True, ) Method( @@ -1996,7 +1947,6 @@ headers. This is mainly used when cross-debugging core files --- name="gdb_signal_from_target", params=[("int", "signo")], predicate=True, - invalid=True, ) Method( @@ -2013,7 +1963,6 @@ signal number is invalid. name="gdb_signal_to_target", params=[("enum gdb_signal", "signal")], predicate=True, - invalid=True, ) Method( @@ -2026,7 +1975,6 @@ Return a type suitable to inspect extra signal information. name="get_siginfo_type", params=[], predicate=True, - invalid=True, ) Method( @@ -2037,7 +1985,6 @@ Record architecture-specific information from the symbol table. name="record_special_symbol", params=[("struct objfile *", "objfile"), ("asymbol *", "sym")], predicate=True, - invalid=True, ) Method( @@ -2049,7 +1996,6 @@ Get architecture-specific system calls information from registers. name="get_syscall_number", params=[("thread_info *", "thread")], predicate=True, - invalid=True, ) Value( @@ -2219,7 +2165,6 @@ something like `(%', do not match just the `('. name="stap_is_single_operand", params=[("const char *", "s")], predicate=True, - invalid=True, ) Method( @@ -2250,7 +2195,6 @@ parser), and should advance the buffer pointer (p->arg). name="stap_parse_special_token", params=[("struct stap_parse_info *", "p")], predicate=True, - invalid=True, ) Method( @@ -2287,7 +2231,6 @@ The rationale for this can be found at PR breakpoints/24541. ("int", "regnum"), ], predicate=True, - invalid=True, ) Method( @@ -2300,7 +2243,6 @@ NARG must be >= 0. name="dtrace_parse_probe_argument", params=[("int", "narg")], predicate=True, - invalid=True, ) Method( @@ -2312,7 +2254,6 @@ corresponding to a disabled DTrace is-enabled probe. name="dtrace_probe_is_enabled", params=[("CORE_ADDR", "addr")], predicate=True, - invalid=True, ) Method( @@ -2323,7 +2264,6 @@ Enable a DTrace is-enabled probe at ADDR. name="dtrace_enable_probe", params=[("CORE_ADDR", "addr")], predicate=True, - invalid=True, ) Method( @@ -2334,7 +2274,6 @@ Disable a DTrace is-enabled probe at ADDR. name="dtrace_disable_probe", params=[("CORE_ADDR", "addr")], predicate=True, - invalid=True, ) Value( @@ -2476,7 +2415,6 @@ Implement the "info proc" command. name="info_proc", params=[("const char *", "args"), ("enum info_proc_what", "what")], predicate=True, - invalid=True, ) Method( @@ -2489,7 +2427,6 @@ one for live targets. name="core_info_proc", params=[("const char *", "args"), ("enum info_proc_what", "what")], predicate=True, - invalid=True, ) Method( @@ -2585,7 +2522,6 @@ Return 1 if an entry was read into *TYPEP and *VALP. ("CORE_ADDR *", "valp"), ], predicate=True, - invalid=True, ) Method(