From patchwork Wed Jan 25 20:06:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom de Vries X-Patchwork-Id: 63686 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 7A2A7385B528 for ; Wed, 25 Jan 2023 20:06:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7A2A7385B528 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1674677211; bh=ApnLW56GpbBVlqCApDFwhdWUYGQDK7uwWMwxrFja7wI=; 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=a72upkrcvdlaCABLI93olPKyXrmjvfl6R7XPDT6ALfxtr+Q7ekYIBe8edXS+O2ybn 1rNEvFPjusMCe3fH5LS6rL4Kzh3X66+3sX5kLZ/1M43vRwQfnO/iZs3xPbigT5nfS2 lj1lKu1RoTYheV1a0M4akygz26GLEvpvrdvyC1kQ= X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by sourceware.org (Postfix) with ESMTPS id E52F23858D28 for ; Wed, 25 Jan 2023 20:06:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E52F23858D28 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-out1.suse.de (Postfix) with ESMTPS id 2AA4A21CE2; Wed, 25 Jan 2023 20:06:27 +0000 (UTC) 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 1344913A06; Wed, 25 Jan 2023 20:06:27 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id GGaDA8OL0WPmeAAAMHmgww (envelope-from ); Wed, 25 Jan 2023 20:06:27 +0000 To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [RFC 1/3] [gdb/contrib] Add refactor.py Date: Wed, 25 Jan 2023 21:06:24 +0100 Message-Id: <20230125200626.29340-2-tdevries@suse.de> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20230125200626.29340-1-tdevries@suse.de> References: <20230125200626.29340-1-tdevries@suse.de> MIME-Version: 1.0 X-Spam-Status: No, score=-12.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, 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 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: Tom de Vries via Gdb-patches From: Tom de Vries Reply-To: Tom de Vries Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Sender: "Gdb-patches" Add a refactoring script gdb/contrib/refactor.py that takes a transformation script as argument, for instance a script gdb/contrib/transform.py, like so: ... $ ./gdb/contrib/refactor.py transform ... --- gdb/contrib/refactor.py | 73 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100755 gdb/contrib/refactor.py diff --git a/gdb/contrib/refactor.py b/gdb/contrib/refactor.py new file mode 100755 index 00000000000..fe2fa019051 --- /dev/null +++ b/gdb/contrib/refactor.py @@ -0,0 +1,73 @@ +#! /usr/bin/env python3 + +# Copyright (C) 2022 Free Software Foundation, Inc. +# +# This file is part of GDB. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +import os +import sys +import re + +transform_file = sys.argv[1] +transform_file = re.sub(r"\.py$", r"", transform_file) + +transformation = __import__(transform_file) + +# Define scope of refactoring. + +# Sources. +#dirs = ["gdb", "gdbserver", "gdbsupport"] +#avoid_dir = "/testsuite/" +#exts = [".c", ".cc", ".h"] + +# Testsuite. +#dirs = ["gdb/testsuite"] +#avoid_dir = None +#exts = [".exp"] + +# In transformation file. +dirs=transformation.dirs +avoid_dir=transformation.avoid_dir +exts=transformation.exts + +def handle_file(filename): + file = open(filename, 'r+') + data = file.read() + file.close() + + transformation.have_match = False + data = transformation.transform(data) + if transformation.have_match: + file = open(filename, 'w') + file.write(data) + file.close() + +def main(): + for dir in dirs: + for walk_root, walk_dirs, walk_files in os.walk(dir): + for file in walk_files: + full = os.path.join(walk_root, file) + if avoid_dir != None and avoid_dir in full: + continue + found = False + for ext in exts: + if file.endswith(ext): + found = True + break + if found: + handle_file(full) + +main() From patchwork Wed Jan 25 20:06:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom de Vries X-Patchwork-Id: 63688 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 DF1CA3858005 for ; Wed, 25 Jan 2023 20:07:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DF1CA3858005 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1674677238; bh=GeW3XmS96K9+VKgXVYQZlPqjWVcv3gFGjV5Ng9WWS9o=; 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=my9/VQp1JWrtEcOQ5rsa0mdBLS1Ns2DDfUHZtNSIVvZh2bvX9FmBuu/KO/XcZAaIU 83bC5MhD2HwuKOShcLNQg1D3HEygzf2BWqOpy7jC0hdtVyniPsjkYIRhpYVrFspIv9 mUreYnuVkjLiQp1B7PWnVHej2o3Nl4SPOiJfGYIA= X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by sourceware.org (Postfix) with ESMTPS id 2AEE83858D38 for ; Wed, 25 Jan 2023 20:06:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2AEE83858D38 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 471311FEAB; Wed, 25 Jan 2023 20:06:27 +0000 (UTC) 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 2E2651339E; Wed, 25 Jan 2023 20:06:27 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id IMAuCsOL0WPmeAAAMHmgww (envelope-from ); Wed, 25 Jan 2023 20:06:27 +0000 To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [RFC 2/3] [gdb/contrib] Add refactor_require.py Date: Wed, 25 Jan 2023 21:06:25 +0100 Message-Id: <20230125200626.29340-3-tdevries@suse.de> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20230125200626.29340-1-tdevries@suse.de> References: <20230125200626.29340-1-tdevries@suse.de> MIME-Version: 1.0 X-Spam-Status: No, score=-12.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, 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 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: Tom de Vries via Gdb-patches From: Tom de Vries Reply-To: Tom de Vries Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Sender: "Gdb-patches" Add refactoring script refactor_require.py, to be used with refactor.py. --- gdb/contrib/refactor_require.py | 53 +++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 gdb/contrib/refactor_require.py diff --git a/gdb/contrib/refactor_require.py b/gdb/contrib/refactor_require.py new file mode 100644 index 00000000000..e8ac96643cf --- /dev/null +++ b/gdb/contrib/refactor_require.py @@ -0,0 +1,53 @@ +#! /usr/bin/env python3 + +# Copyright (C) 2022 Free Software Foundation, Inc. +# +# This file is part of GDB. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +import re + +dirs = ["gdb/testsuite"] +avoid_dir = None +exts = [".exp"] + +pattern_lines = [ + "(else)?" + re.escape ("if { ![istarget x86_64-*-* ] || ![is_lp64_target] } {"), + r"\s+verbose.*", + r"\s+return", + "\}" +] +pattern = "\n".join(pattern_lines) + +def repl(matchobj): + global have_match + have_match = True + + if matchobj.group(1) == "else": + repl_lines = [ + r"else {", + r" require is_x86_64_m64_target", + r"}" + ] + else: + repl_lines = [ + r"require is_x86_64_m64_target" + ] + repl= "\n".join(repl_lines) + + return repl + +def transform(data): + return re.sub(pattern, repl, data) From patchwork Wed Jan 25 20:06:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom de Vries X-Patchwork-Id: 63687 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 3D2CA3858404 for ; Wed, 25 Jan 2023 20:06:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3D2CA3858404 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1674677217; bh=7GRdpdHetJ/8uozCR/gukToof6EKET+Dqr292ZCDxUY=; 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=FObLfg6ytHW/d4Cbg750P/O0CnPenFEROBZwY0YQeHPxh663btj/67fK6ELMUZB1P WKdDUWe0t3Wqof5yrN3CYPtZKg8dvho/dRsOWyBDjq8YDfIwb8lpyUVedfiRjqs90G 6d4ssWtN8qAYQ17ozbx0J6niq4WC+3pdzGynGSH8= X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by sourceware.org (Postfix) with ESMTPS id 36F5A3858C74 for ; Wed, 25 Jan 2023 20:06:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 36F5A3858C74 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-out1.suse.de (Postfix) with ESMTPS id 637A921CE3; Wed, 25 Jan 2023 20:06:27 +0000 (UTC) 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 4AF1C13A06; Wed, 25 Jan 2023 20:06:27 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 4NokEcOL0WPmeAAAMHmgww (envelope-from ); Wed, 25 Jan 2023 20:06:27 +0000 To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [RFC 3/3] [gdb/testsuite] Add and use is_x86_64_m64_target Date: Wed, 25 Jan 2023 21:06:26 +0100 Message-Id: <20230125200626.29340-4-tdevries@suse.de> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20230125200626.29340-1-tdevries@suse.de> References: <20230125200626.29340-1-tdevries@suse.de> MIME-Version: 1.0 X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, 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 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: Tom de Vries via Gdb-patches From: Tom de Vries Reply-To: Tom de Vries Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Sender: "Gdb-patches" Add new proc is_x86_64_m64_target and use it by running: ... $ ./gdb/contrib/refactor.py refactor_require ... --- gdb/testsuite/gdb.arch/amd64-entry-value-param.exp | 5 ++--- gdb/testsuite/gdb.arch/amd64-tailcall-ret.exp | 5 ++--- gdb/testsuite/gdb.mi/mi2-amd64-entry-value.exp | 5 ++--- gdb/testsuite/gdb.python/py-framefilter-invalidarg.exp | 5 +---- gdb/testsuite/gdb.python/py-linetable.exp | 5 ++--- gdb/testsuite/gdb.reverse/amd64-tailcall-reverse.exp | 5 ++--- gdb/testsuite/gdb.reverse/singlejmp-reverse.exp | 5 ++--- gdb/testsuite/lib/gdb.exp | 4 ++++ 8 files changed, 17 insertions(+), 22 deletions(-) diff --git a/gdb/testsuite/gdb.arch/amd64-entry-value-param.exp b/gdb/testsuite/gdb.arch/amd64-entry-value-param.exp index 242a7a35ce7..da1445f51c2 100644 --- a/gdb/testsuite/gdb.arch/amd64-entry-value-param.exp +++ b/gdb/testsuite/gdb.arch/amd64-entry-value-param.exp @@ -20,9 +20,8 @@ if [info exists COMPILE] { # make check RUNTESTFLAGS="gdb.arch/amd64-entry-value-param.exp COMPILE=1" set srcfile ${srcfile2} lappend opts debug optimize=-O2 -} elseif { ![istarget x86_64-*-* ] || ![is_lp64_target] } { - verbose "Skipping amd64-entry-value-param." - return +} else { + require is_x86_64_m64_target } if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} $opts] } { diff --git a/gdb/testsuite/gdb.arch/amd64-tailcall-ret.exp b/gdb/testsuite/gdb.arch/amd64-tailcall-ret.exp index 9d3e4d40f60..1602aff5dc5 100644 --- a/gdb/testsuite/gdb.arch/amd64-tailcall-ret.exp +++ b/gdb/testsuite/gdb.arch/amd64-tailcall-ret.exp @@ -20,9 +20,8 @@ if [info exists COMPILE] { # make check RUNTESTFLAGS="gdb.arch/amd64-tailcall-ret.exp COMPILE=1" standard_testfile lappend opts debug optimize=-O2 -} elseif { ![istarget x86_64-*-* ] || ![is_lp64_target] } { - verbose "Skipping ${testfile}." - return +} else { + require is_x86_64_m64_target } if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} $opts] } { diff --git a/gdb/testsuite/gdb.mi/mi2-amd64-entry-value.exp b/gdb/testsuite/gdb.mi/mi2-amd64-entry-value.exp index 4657509e84c..76acabc0ade 100644 --- a/gdb/testsuite/gdb.mi/mi2-amd64-entry-value.exp +++ b/gdb/testsuite/gdb.mi/mi2-amd64-entry-value.exp @@ -28,9 +28,8 @@ if [info exists COMPILE] { # make check RUNTESTFLAGS="gdb.mi/mi2-amd64-entry-value.exp COMPILE=1" set srcfile ${testfile}.c lappend opts debug optimize=-O2 -} elseif { ![istarget x86_64-*-* ] || ![is_lp64_target] } { - verbose "Skipping mi2-amd64-entry-value." - return +} else { + require is_x86_64_m64_target } set executable ${testfile} diff --git a/gdb/testsuite/gdb.python/py-framefilter-invalidarg.exp b/gdb/testsuite/gdb.python/py-framefilter-invalidarg.exp index d2c29afa81d..2fab2bbd80a 100644 --- a/gdb/testsuite/gdb.python/py-framefilter-invalidarg.exp +++ b/gdb/testsuite/gdb.python/py-framefilter-invalidarg.exp @@ -19,10 +19,7 @@ require allow_python_tests standard_testfile amd64-py-framefilter-invalidarg.S -if { ![istarget x86_64-*-* ] || ![is_lp64_target] } { - verbose "Skipping py-framefilter-invalidarg." - return -} +require is_x86_64_m64_target # We cannot use prepare_for_testing as we have to set the safe-patch # to check objfile and progspace printers. diff --git a/gdb/testsuite/gdb.python/py-linetable.exp b/gdb/testsuite/gdb.python/py-linetable.exp index d19516df9a8..c43fb7fc987 100644 --- a/gdb/testsuite/gdb.python/py-linetable.exp +++ b/gdb/testsuite/gdb.python/py-linetable.exp @@ -22,9 +22,8 @@ if [info exists COMPILE] { # make check RUNTESTFLAGS="gdb.python/py-linetable.exp COMPILE=1" standard_testfile lappend opts debug optimize=-O2 -} elseif { ![istarget x86_64-*-* ] || ![is_lp64_target] } { - verbose "Skipping ${testfile}." - return +} else { + require is_x86_64_m64_target } if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} $opts] } { diff --git a/gdb/testsuite/gdb.reverse/amd64-tailcall-reverse.exp b/gdb/testsuite/gdb.reverse/amd64-tailcall-reverse.exp index dd6e4d2045f..9654dffc378 100644 --- a/gdb/testsuite/gdb.reverse/amd64-tailcall-reverse.exp +++ b/gdb/testsuite/gdb.reverse/amd64-tailcall-reverse.exp @@ -22,9 +22,8 @@ if [info exists COMPILE] { # make check RUNTESTFLAGS="gdb.reverse/amd64-tailcall-reverse.exp COMPILE=1" standard_testfile lappend opts debug optimize=-O2 -} elseif { ![istarget x86_64-*-* ] || ![is_lp64_target] } { - verbose "Skipping ${testfile}." - return +} else { + require is_x86_64_m64_target } if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} $opts] } { diff --git a/gdb/testsuite/gdb.reverse/singlejmp-reverse.exp b/gdb/testsuite/gdb.reverse/singlejmp-reverse.exp index bc7e6876bd2..c31e555fe2a 100644 --- a/gdb/testsuite/gdb.reverse/singlejmp-reverse.exp +++ b/gdb/testsuite/gdb.reverse/singlejmp-reverse.exp @@ -26,9 +26,8 @@ if [info exists COMPILE] { ] == -1 } { return -1 } -} elseif { ![istarget x86_64-*-* ] || ![is_lp64_target] } { - verbose "Skipping ${testfile}." - return +} else { + require is_x86_64_m64_target } elseif { [build_executable ${testfile}.exp ${testfile} \ [list ${srcfile} ${srcfile2}] {}] == -1 } { return -1 diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index e2af5a252b7..cc454583242 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -3414,6 +3414,10 @@ proc is_x86_like_target {} { return [expr [is_ilp32_target] && ![is_amd64_regs_target]] } +proc is_x86_64_m64_target {} { + return [istarget x86_64-*-* ] && [is_lp64_target] +} + # Return 1 if this target is an arm or aarch32 on aarch64. gdb_caching_proc is_aarch32_target {