From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by sourceware.org (Postfix) with ESMTPS id 699303858C00 for ; Wed, 25 Jan 2023 20:06:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 699303858C00 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 19B411FE94; Wed, 25 Jan 2023 20:06:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1674677187; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=jWodKshpncDUo2ZZUYr2KDoEeajwfY8PJKYEiptXL6E=; b=lt8g8IGGCfL6KqTKdjtaL/6O2b9UpcEjRYtpF4C5QoZWsyRbFvQH8UfCwyBGJl/oqqxKps ldSuW55xyC8dlRzMn59ompSR8/O31OfkiUSA8T9al4hi6HGgoDZFz4daqqAnXKMJNe86b9 CBpOOacSG/BgRz+Pbst/xzDZpYXwHsQ= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1674677187; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=jWodKshpncDUo2ZZUYr2KDoEeajwfY8PJKYEiptXL6E=; b=hJCiqItYLkvZ4h4dtDOJer0WdCenQAwHOgbVDmlUB+P8lhl4OAkcMbJ0pWve3LZzJ4AumD moML9UvwmSJETEDA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id EA9541339E; Wed, 25 Jan 2023 20:06:26 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id CesIOMKL0WPmeAAAMHmgww (envelope-from ); Wed, 25 Jan 2023 20:06:26 +0000 From: Tom de Vries To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [RFC 0/3] [gdb/testsuite] Introduce is_x86_64_m64_target Date: Wed, 25 Jan 2023 21:06:23 +0100 Message-Id: <20230125200626.29340-1-tdevries@suse.de> X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-6.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,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 List-Id: I used a refactoring setup I wrote in python for another refactoring to rewrite: ... if { ![istarget x86_64-*-* ] || ![is_lp64_target] } { verbose "Skipping ${testfile}." return } ... into: ... require is_x86_64_m64_target ... It also handles the elseif case. Due to a recent commit, only the elseif cases are transformed, the others have been handled already. Also, I see now that "require {istarget x86_64-*-*} is_lp64_target" can be used, and that is_x86_64_m64_target not stricly necessary. I've included the two patches with the refactoring scripts. Tom de Vries (3): [gdb/contrib] Add refactor.py [gdb/contrib] Add refactor_require.py [gdb/testsuite] Add and use is_x86_64_m64_target gdb/contrib/refactor.py | 73 +++++++++++++++++++ gdb/contrib/refactor_require.py | 53 ++++++++++++++ .../gdb.arch/amd64-entry-value-param.exp | 5 +- gdb/testsuite/gdb.arch/amd64-tailcall-ret.exp | 5 +- .../gdb.mi/mi2-amd64-entry-value.exp | 5 +- .../gdb.python/py-framefilter-invalidarg.exp | 5 +- gdb/testsuite/gdb.python/py-linetable.exp | 5 +- .../gdb.reverse/amd64-tailcall-reverse.exp | 5 +- .../gdb.reverse/singlejmp-reverse.exp | 5 +- gdb/testsuite/lib/gdb.exp | 4 + 10 files changed, 143 insertions(+), 22 deletions(-) create mode 100755 gdb/contrib/refactor.py create mode 100644 gdb/contrib/refactor_require.py base-commit: 6121eeb72978cc5749c4c9f119b4dbaf637517c9 -- 2.35.3