aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.trace
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2011-09-08 17:40:54 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2011-09-08 17:40:54 +0000
commit7f062217672c13050f68eec1a6cd296d7b7f93be (patch)
treec9081719885b884389ec614fe781f137609dc481 /gdb/testsuite/gdb.trace
parentbc587a6bd2e261d0a7645d0f5466379fe44f5f8b (diff)
downloadgdb-7f062217672c13050f68eec1a6cd296d7b7f93be.zip
gdb-7f062217672c13050f68eec1a6cd296d7b7f93be.tar.gz
gdb-7f062217672c13050f68eec1a6cd296d7b7f93be.tar.bz2
gdb/testsuite/
Fix compatibility with x32 arch. * testsuite/gdb.dwarf2/typeddwarf.exp: Check also is_lp64_target. * testsuite/gdb.trace/backtrace.exp: Use is_amd64_regs_target and is_x86_like_target. * testsuite/gdb.trace/collection.exp: Likewise. * testsuite/gdb.trace/report.exp: Likewise. * testsuite/gdb.trace/unavailable.exp: Likewise. * testsuite/gdb.trace/while-dyn.exp: Likewise. * testsuite/lib/gdb.exp (is_amd64_regs_target): New function. (is_x86_like_target): Check also is_amd64_regs_target.
Diffstat (limited to 'gdb/testsuite/gdb.trace')
-rw-r--r--gdb/testsuite/gdb.trace/backtrace.exp4
-rw-r--r--gdb/testsuite/gdb.trace/collection.exp4
-rw-r--r--gdb/testsuite/gdb.trace/report.exp4
-rw-r--r--gdb/testsuite/gdb.trace/unavailable.exp8
-rw-r--r--gdb/testsuite/gdb.trace/while-dyn.exp4
5 files changed, 12 insertions, 12 deletions
diff --git a/gdb/testsuite/gdb.trace/backtrace.exp b/gdb/testsuite/gdb.trace/backtrace.exp
index 9b72d49..e2807c5 100644
--- a/gdb/testsuite/gdb.trace/backtrace.exp
+++ b/gdb/testsuite/gdb.trace/backtrace.exp
@@ -150,10 +150,10 @@ gdb_trace_setactions "8.6: setup TP to collect regs, args, and locals" \
"$tdp4" \
"collect \$regs, \$args, \$locs" "^$"
-if {([istarget "x86_64-*"] || [istarget "i?86-*"]) && [is_lp64_target]} then {
+if [is_amd64_regs_target] {
set fpreg "\$rbp"
set spreg "\$rsp"
-} elseif {[istarget "x86_64-*"] || [istarget "i?86-*"]} then {
+} elseif [is_x86_like_target] {
set fpreg "\$ebp"
set spreg "\$esp"
} else {
diff --git a/gdb/testsuite/gdb.trace/collection.exp b/gdb/testsuite/gdb.trace/collection.exp
index 4917ea8..4d57ad4 100644
--- a/gdb/testsuite/gdb.trace/collection.exp
+++ b/gdb/testsuite/gdb.trace/collection.exp
@@ -45,11 +45,11 @@ if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
set ws "\[\r\n\t \]+"
set cr "\[\r\n\]+"
-if {([istarget "x86_64-*"] || [istarget "i?86-*"]) && [is_lp64_target]} then {
+if [is_amd64_regs_target] {
set fpreg "rbp"
set spreg "rsp"
set pcreg "rip"
-} elseif {[istarget "x86_64-*"] || [istarget "i?86-*"]} then {
+} elseif [is_x86_like_target] {
set fpreg "ebp"
set spreg "esp"
set pcreg "eip"
diff --git a/gdb/testsuite/gdb.trace/report.exp b/gdb/testsuite/gdb.trace/report.exp
index 8bb6780..f765a57 100644
--- a/gdb/testsuite/gdb.trace/report.exp
+++ b/gdb/testsuite/gdb.trace/report.exp
@@ -159,11 +159,11 @@ gdb_trace_setactions "9.x: setup TP to collect locals" \
"$tdp4" \
"collect \$locs" "^$"
-if {([istarget "x86_64-*"] || [istarget "i?86-*"]) && [is_lp64_target]} then {
+if [is_amd64_regs_target] {
set fpreg "rbp"
set spreg "rsp"
set pcreg "rip"
-} elseif {[istarget "x86_64-*"] || [istarget "i?86-*"]} then {
+} elseif [is_x86_like_target] {
set fpreg "ebp"
set spreg "esp"
set pcreg "eip"
diff --git a/gdb/testsuite/gdb.trace/unavailable.exp b/gdb/testsuite/gdb.trace/unavailable.exp
index fce65ca..7278ebf 100644
--- a/gdb/testsuite/gdb.trace/unavailable.exp
+++ b/gdb/testsuite/gdb.trace/unavailable.exp
@@ -30,11 +30,11 @@ if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
set ws "\[\r\n\t \]+"
set cr "\[\r\n\]+"
-if {([istarget "x86_64-*"] || [istarget "i?86-*"]) && [is_lp64_target]} then {
+if [is_amd64_regs_target] {
set fpreg "rbp"
set spreg "rsp"
set pcreg "rip"
-} elseif {[istarget "x86_64-*"] || [istarget "i?86-*"]} then {
+} elseif [is_x86_like_target] {
set fpreg "ebp"
set spreg "esp"
set pcreg "eip"
@@ -295,12 +295,12 @@ proc gdb_unavailable_registers_test { } {
# Test reading uncollected pseudo-registers. The set of which
# depends on target.
- if {$pcreg == "rip"} then {
+ if [is_amd64_regs_target] {
# Check the raw register first.
test_register_unavailable "\$rax"
test_register_unavailable "\$eax"
test_register_unavailable "\$ax"
- } elseif {$pcreg == "eip"} then {
+ } elseif [is_x86_like_target] {
# Check the raw register first.
test_register_unavailable "\$eax"
test_register_unavailable "\$ax"
diff --git a/gdb/testsuite/gdb.trace/while-dyn.exp b/gdb/testsuite/gdb.trace/while-dyn.exp
index 6227f23..58aa710 100644
--- a/gdb/testsuite/gdb.trace/while-dyn.exp
+++ b/gdb/testsuite/gdb.trace/while-dyn.exp
@@ -52,9 +52,9 @@ if { ![gdb_target_supports_trace] } then {
# test while-stepping dynamically (live target)
#
-if {([istarget "x86_64-*"] || [istarget "i?86-*"]) && [is_lp64_target]} then {
+if [is_amd64_regs_target] {
set fpreg "\$rbp"
-} elseif {[istarget "x86_64-*"] || [istarget "i?86-*"]} then {
+} elseif [is_x86_like_target] {
set fpreg "\$ebp"
} else {
set fpreg "\$fp"