From: Tom Tromey <tromey@redhat.com>
To: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: Ulrich Weigand <uweigand@de.ibm.com>, gdb-patches@sourceware.org
Subject: Re: Regression: Re: RFC: implement typed DWARF stack
Date: Fri, 13 May 2011 17:17:00 -0000 [thread overview]
Message-ID: <m3aaeqjzbd.fsf@fleche.redhat.com> (raw)
In-Reply-To: <20110513075220.GA7000@host1.jankratochvil.net> (Jan Kratochvil's message of "Fri, 13 May 2011 09:52:20 +0200")
Jan> +# This test can only be run on x86 targets.
Jan> +if { ![istarget i?86-*] } {
Jan> + return 0
Jan> +}
Jan> It will not run on x86_64 box with -m32 while it could, I would
Jan> prefer there also x86_64 target with is_ilp32_target conditional.
Here is what I am checking in for this.
This adds a new proc, 'is_x86_like_target', to do this check. Then it
updates gdb.dwarf2 to use it. This also fixes a bug in dw2-restore.exp,
which needs LP64.
I tested this by running --directory=gdb.dwarf2 with and without -m32 on
x86-64, and natively on x86.
Tom
b/gdb/testsuite/ChangeLog:
2011-05-13 Tom Tromey <tromey@redhat.com>
* lib/gdb.exp (is_x86_like_target): New proc.
* gdb.dwarf2/watch-notconst.exp: Use is_x86_like_target.
* gdb.dwarf2/valop.exp: Use is_x86_like_target.
* gdb.dwarf2/typeddwarf.exp: Use is_x86_like_target. Pass
-nostdlib to compiler.
* gdb.dwarf2/typeddwarf.S (_start): Rename from 'main'.
* gdb.dwarf2/pieces.exp: Use is_x86_like_target.
* gdb.dwarf2/implptr.exp: Use is_x86_like_target.
* gdb.dwarf2/dw2-restore.exp: Check for LP64.
* gdb.dwarf2/callframecfa.exp: Use is_x86_like_target.
diff --git a/gdb/testsuite/gdb.dwarf2/callframecfa.exp b/gdb/testsuite/gdb.dwarf2/callframecfa.exp
index 42c02b0..f88348a 100644
--- a/gdb/testsuite/gdb.dwarf2/callframecfa.exp
+++ b/gdb/testsuite/gdb.dwarf2/callframecfa.exp
@@ -21,7 +21,7 @@ if {![dwarf2_support]} {
return 0
}
# This test can only be run on x86 targets.
-if {![istarget i?86-*]} {
+if {![is_x86_like_target]} {
return 0
}
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-restore.exp b/gdb/testsuite/gdb.dwarf2/dw2-restore.exp
index a04b029..e64c5e5 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-restore.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-restore.exp
@@ -16,7 +16,7 @@
# Test handling of DW_CFA_restore_state.
# This test can only be run on x86_64 targets.
-if {![istarget x86_64-*]} {
+if {![istarget x86_64-*] || ![is_lp64_target]} {
return 0
}
set testfile "dw2-restore"
diff --git a/gdb/testsuite/gdb.dwarf2/implptr.exp b/gdb/testsuite/gdb.dwarf2/implptr.exp
index 5bf894b..e9348e40 100644
--- a/gdb/testsuite/gdb.dwarf2/implptr.exp
+++ b/gdb/testsuite/gdb.dwarf2/implptr.exp
@@ -21,7 +21,7 @@ if {![dwarf2_support]} {
return 0
}
# This test can only be run on x86 targets.
-if {![istarget i?86-*]} {
+if {![is_x86_like_target]} {
return 0
}
diff --git a/gdb/testsuite/gdb.dwarf2/pieces.exp b/gdb/testsuite/gdb.dwarf2/pieces.exp
index 73780d8..a2e6c04 100644
--- a/gdb/testsuite/gdb.dwarf2/pieces.exp
+++ b/gdb/testsuite/gdb.dwarf2/pieces.exp
@@ -20,7 +20,7 @@ if {![dwarf2_support]} {
return 0
}
# This test can only be run on x86 targets.
-if {![istarget i?86-*]} {
+if {![is_x86_like_target]} {
return 0
}
diff --git a/gdb/testsuite/gdb.dwarf2/typeddwarf.S b/gdb/testsuite/gdb.dwarf2/typeddwarf.S
index a46da14..2ab7444 100644
--- a/gdb/testsuite/gdb.dwarf2/typeddwarf.S
+++ b/gdb/testsuite/gdb.dwarf2/typeddwarf.S
@@ -212,9 +212,9 @@ f4:
.size f4, .-f4
.section .text.startup,"ax",@progbits
.p2align 4,,15
- .globl main
- .type main, @function
-main:
+ .globl _start
+ .type _start, @function
+_start:
.LFB4:
# typeddwarf.c:87
.LM37:
@@ -314,7 +314,7 @@ main:
# SUCC: EXIT [100.0%]
ret
.LFE4:
- .size main, .-main
+ .size _start, .-_start
.comm vv,4,4
.section .rodata.cst4,"aM",@progbits,4
.align 4
diff --git a/gdb/testsuite/gdb.dwarf2/typeddwarf.exp b/gdb/testsuite/gdb.dwarf2/typeddwarf.exp
index bddcc18..e6a420a 100644
--- a/gdb/testsuite/gdb.dwarf2/typeddwarf.exp
+++ b/gdb/testsuite/gdb.dwarf2/typeddwarf.exp
@@ -23,11 +23,11 @@ if ![dwarf2_support] {
}
# This test can only be run on x86 targets.
-if { ![istarget i?86-*] } {
+if { ![is_x86_like_target] } {
return 0
}
-if { [prepare_for_testing "${test}.exp" "${test}" ${test}.S {nodebug}] } {
+if { [prepare_for_testing "${test}.exp" "${test}" ${test}.S {nodebug additional_flags=-nostdlib}] } {
return -1
}
diff --git a/gdb/testsuite/gdb.dwarf2/valop.exp b/gdb/testsuite/gdb.dwarf2/valop.exp
index f7343ef..4dc7434 100644
--- a/gdb/testsuite/gdb.dwarf2/valop.exp
+++ b/gdb/testsuite/gdb.dwarf2/valop.exp
@@ -21,7 +21,7 @@ if {![dwarf2_support]} {
return 0
}
# This test can only be run on x86 targets.
-if {![istarget i?86-*]} {
+if {![is_x86_like_target]} {
return 0
}
diff --git a/gdb/testsuite/gdb.dwarf2/watch-notconst.exp b/gdb/testsuite/gdb.dwarf2/watch-notconst.exp
index f4e2d52..da13868 100644
--- a/gdb/testsuite/gdb.dwarf2/watch-notconst.exp
+++ b/gdb/testsuite/gdb.dwarf2/watch-notconst.exp
@@ -22,7 +22,7 @@ if ![dwarf2_support] {
}
# This test can only be run on x86 targets.
-if { ![istarget i?86-*] } {
+if { ![is_x86_like_target] } {
return 0
}
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 17ea0b7..531120c 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -1563,6 +1563,17 @@ proc is_lp64_target {} {
return [set is_lp64_target_saved($board) 1]
}
+# Return 1 if this target is an x86 or x86-64 with -m32.
+proc is_x86_like_target {} {
+ if {[istarget i?86-*]} {
+ return 1
+ }
+ if {![istarget "x86_64-*-*"]} {
+ return 0
+ }
+ return [is_ilp32_target]
+}
+
# Run a test on the target to see if it supports vmx hardware. Return 0 if so,
# 1 if it does not. Based on 'check_vmx_hw_available' from the GCC testsuite.
next prev parent reply other threads:[~2011-05-13 17:17 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-04 20:48 Tom Tromey
2011-05-05 16:47 ` Tom Tromey
2011-05-05 18:07 ` Ulrich Weigand
2011-05-05 18:38 ` Tom Tromey
2011-05-05 20:15 ` Tom Tromey
2011-05-09 22:02 ` Ulrich Weigand
2011-05-10 14:15 ` Tom Tromey
2011-05-11 0:15 ` Ulrich Weigand
2011-05-11 14:59 ` Tom Tromey
2011-05-11 19:44 ` Tom Tromey
2011-05-12 0:03 ` Ulrich Weigand
2011-05-12 16:33 ` Tom Tromey
2011-05-13 7:52 ` Regression: " Jan Kratochvil
2011-05-13 15:44 ` Tom Tromey
2011-05-15 8:26 ` gdbindex crash: " Jan Kratochvil
2011-05-16 17:37 ` Tom Tromey
2011-05-17 17:01 ` Tom Tromey
2011-05-13 17:17 ` Tom Tromey [this message]
2011-05-13 17:34 ` Jan Kratochvil
2011-05-12 19:32 ` Tom Tromey
2011-05-16 15:50 ` Ulrich Weigand
2011-05-16 18:09 ` Tom Tromey
2011-05-17 8:35 ` Jakub Jelinek
2011-06-03 13:52 ` Tom Tromey
2011-05-10 16:39 ` Tom Tromey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3aaeqjzbd.fsf@fleche.redhat.com \
--to=tromey@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=jan.kratochvil@redhat.com \
--cc=uweigand@de.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox