From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27722 invoked by alias); 11 Oct 2012 15:29:41 -0000 Received: (qmail 27709 invoked by uid 22791); 11 Oct 2012 15:29:40 -0000 X-SWARE-Spam-Status: No, hits=-4.2 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,KHOP_RCVD_TRUST,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-ie0-f169.google.com (HELO mail-ie0-f169.google.com) (209.85.223.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 11 Oct 2012 15:29:34 +0000 Received: by mail-ie0-f169.google.com with SMTP id 10so4048521ied.0 for ; Thu, 11 Oct 2012 08:29:34 -0700 (PDT) Received: by 10.50.219.129 with SMTP id po1mr9014770igc.35.1349969372549; Thu, 11 Oct 2012 08:29:32 -0700 (PDT) Received: from gnu-tools-1.localdomain (76-220-57-190.lightspeed.sntcca.sbcglobal.net. [76.220.57.190]) by mx.google.com with ESMTPS id uq6sm14487801igb.14.2012.10.11.08.29.31 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 11 Oct 2012 08:29:32 -0700 (PDT) Received: by gnu-tools-1.localdomain (Postfix, from userid 1000) id 024AF1A0649; Thu, 11 Oct 2012 08:29:29 -0700 (PDT) Date: Thu, 11 Oct 2012 15:29:00 -0000 From: "H.J. Lu" To: GDB Subject: PATCH: Use is_x86_like_target to check x86 targets Message-ID: <20121011152929.GC14479@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-10/txt/msg00175.txt.bz2 Hi, Use if {(![istarget "x86_64-*-*"] && ![istarget "i?86-*-*"]) || ![is_ilp32_target] } then { to check x86 targets doesn't work for x32. This patch uses is_x86_like_target to check x86 targets. Tested on x32, ia32 and x86-64. OK to install? Thanks. H.J. --- 2012-10-11 H.J. Lu * gdb.arch/i386-bp_permanent.exp: Skip if not is_x86_like_target. * gdb.arch/i386-cfi-notcurrent.exp: Likewise. * gdb.arch/i386-disp-step.exp: Likewise. * gdb.arch/i386-gnu-cfi.exp: Likewise. * gdb.arch/i386-prologue.exp: Likewise. * gdb.arch/i386-size-overlap.exp: Likewise. * gdb.arch/i386-size.exp: Likewise. * gdb.arch/i386-unwind.exp: Likewise. diff --git a/gdb/testsuite/gdb.arch/i386-bp_permanent.exp b/gdb/testsuite/gdb.arch/i386-bp_permanent.exp index 026f956..907eb95 100644 --- a/gdb/testsuite/gdb.arch/i386-bp_permanent.exp +++ b/gdb/testsuite/gdb.arch/i386-bp_permanent.exp @@ -18,7 +18,7 @@ # Test stepping over permanent breakpoints on i386. -if {(![istarget "x86_64-*-*"] && ![istarget "i?86-*-*"]) || ![is_ilp32_target] } then { +if { ![is_x86_like_target] } then { verbose "Skipping skip over permanent breakpoint on i386 tests." return } diff --git a/gdb/testsuite/gdb.arch/i386-cfi-notcurrent.exp b/gdb/testsuite/gdb.arch/i386-cfi-notcurrent.exp index cf41c57..52731f7 100644 --- a/gdb/testsuite/gdb.arch/i386-cfi-notcurrent.exp +++ b/gdb/testsuite/gdb.arch/i386-cfi-notcurrent.exp @@ -16,7 +16,7 @@ # [RFA] DWARF frame unwinder executes one too many rows # http://sourceware.org/ml/gdb-patches/2012-07/msg00650.html -if {(![istarget "x86_64-*-*"] && ![istarget "i?86-*-*"]) || ![is_ilp32_target] } { +if { ![is_x86_like_target] } { return 0 } diff --git a/gdb/testsuite/gdb.arch/i386-disp-step.exp b/gdb/testsuite/gdb.arch/i386-disp-step.exp index 8a51be5..bf7f985 100644 --- a/gdb/testsuite/gdb.arch/i386-disp-step.exp +++ b/gdb/testsuite/gdb.arch/i386-disp-step.exp @@ -18,7 +18,7 @@ # Test i386 displaced stepping. -if {(![istarget "x86_64-*-*"] && ![istarget "i?86-*-*"]) || ![is_ilp32_target] } then { +if { ![is_x86_like_target] } then { verbose "Skipping x86 displaced stepping tests." return } diff --git a/gdb/testsuite/gdb.arch/i386-gnu-cfi.exp b/gdb/testsuite/gdb.arch/i386-gnu-cfi.exp index d7b41cc..f603fc5 100644 --- a/gdb/testsuite/gdb.arch/i386-gnu-cfi.exp +++ b/gdb/testsuite/gdb.arch/i386-gnu-cfi.exp @@ -23,7 +23,7 @@ # Test i386 unwinder. -if {(![istarget "x86_64-*-*"] && ![istarget "i?86-*-*"]) || ![is_ilp32_target] } then { +if { ![is_x86_like_target] } then { verbose "Skipping i386 unwinder tests." return } diff --git a/gdb/testsuite/gdb.arch/i386-prologue.exp b/gdb/testsuite/gdb.arch/i386-prologue.exp index 2e724aa..b48952f 100644 --- a/gdb/testsuite/gdb.arch/i386-prologue.exp +++ b/gdb/testsuite/gdb.arch/i386-prologue.exp @@ -21,7 +21,7 @@ # Test i386 prologue analyzer. -if {(![istarget "x86_64-*-*"] && ![istarget "i?86-*-*"]) || ![is_ilp32_target] } then { +if { ![is_x86_like_target] } then { verbose "Skipping i386 prologue tests." return } diff --git a/gdb/testsuite/gdb.arch/i386-size-overlap.exp b/gdb/testsuite/gdb.arch/i386-size-overlap.exp index 23cbabc..67d5db1 100644 --- a/gdb/testsuite/gdb.arch/i386-size-overlap.exp +++ b/gdb/testsuite/gdb.arch/i386-size-overlap.exp @@ -17,7 +17,7 @@ # Test that GDB can handle overlapping sizes of symbols. -if {(![istarget "x86_64-*-*"] && ![istarget "i?86-*-*"]) || ![is_ilp32_target] } then { +if { ![is_x86_like_target] } then { verbose "Skipping i386 unwinder tests." return } diff --git a/gdb/testsuite/gdb.arch/i386-size.exp b/gdb/testsuite/gdb.arch/i386-size.exp index 241d939..0f0b1d8 100644 --- a/gdb/testsuite/gdb.arch/i386-size.exp +++ b/gdb/testsuite/gdb.arch/i386-size.exp @@ -20,7 +20,7 @@ # Test that GDB can see the sizes of symbols. -if {(![istarget "x86_64-*-*"] && ![istarget "i?86-*-*"]) || ![is_ilp32_target] } then { +if { ![is_x86_like_target] } then { verbose "Skipping i386 unwinder tests." return } diff --git a/gdb/testsuite/gdb.arch/i386-unwind.exp b/gdb/testsuite/gdb.arch/i386-unwind.exp index 4ae5943..89fcbc9 100644 --- a/gdb/testsuite/gdb.arch/i386-unwind.exp +++ b/gdb/testsuite/gdb.arch/i386-unwind.exp @@ -21,7 +21,7 @@ # Test i386 unwinder. -if {(![istarget "x86_64-*-*"] && ![istarget "i?86-*-*"]) || ![is_ilp32_target] } then { +if { ![is_x86_like_target] } then { verbose "Skipping i386 unwinder tests." return }