aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorYao Qi <yao.qi@linaro.org>2016-08-01 09:18:02 +0100
committerYao Qi <yao.qi@linaro.org>2016-08-01 09:32:06 +0100
commite3465b24a22bd1f783313e680aa76bac83c8aaf5 (patch)
tree57d8b5844203c8bdfdf5c7c6d244426a8560c388 /gdb
parent5e3d6ca4de0d34b32179db62a27efbd2ae420cf9 (diff)
downloadgdb-e3465b24a22bd1f783313e680aa76bac83c8aaf5.zip
gdb-e3465b24a22bd1f783313e680aa76bac83c8aaf5.tar.gz
gdb-e3465b24a22bd1f783313e680aa76bac83c8aaf5.tar.bz2
Tweak gdb.cp tests for aarch32
There are some gdb.cp/ tests fails if the program is compiled for arm 32-bit but GDB/GDBserver is aarch64 64-bit program, because target triplet doesn't match "arm*-*-*". Instead, we can use is_aarch32_target. gdb/testsuite: 2016-08-01 Yao Qi <yao.qi@linaro.org> * gdb.cp/anon-struct.exp: Check is_aarch32_target. * gdb.cp/cpexprs.exp: Likewise. * gdb.cp/m-static.exp: Likewise.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/testsuite/ChangeLog6
-rw-r--r--gdb/testsuite/gdb.cp/anon-struct.exp4
-rw-r--r--gdb/testsuite/gdb.cp/cpexprs.exp4
-rw-r--r--gdb/testsuite/gdb.cp/m-static.exp2
4 files changed, 11 insertions, 5 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 1ba1d91..e9e8eff 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2016-08-01 Yao Qi <yao.qi@linaro.org>
+
+ * gdb.cp/anon-struct.exp: Check is_aarch32_target.
+ * gdb.cp/cpexprs.exp: Likewise.
+ * gdb.cp/m-static.exp: Likewise.
+
2016-07-26 Tom Tromey <tom@tromey.com>
PR python/20190:
diff --git a/gdb/testsuite/gdb.cp/anon-struct.exp b/gdb/testsuite/gdb.cp/anon-struct.exp
index 4c4d8b1..624d560 100644
--- a/gdb/testsuite/gdb.cp/anon-struct.exp
+++ b/gdb/testsuite/gdb.cp/anon-struct.exp
@@ -20,7 +20,7 @@ if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} {debug c++}] }
return -1
}
-if { [istarget arm*-*-*] } {
+if { [is_aarch32_target] } {
gdb_test "ptype t::t" "type = struct t {\r\n C m;\r\n} \\*\\(t \\* const\\)" \
"print type of t::t"
} else {
@@ -31,7 +31,7 @@ if { [istarget arm*-*-*] } {
gdb_test "ptype X::t2" "type = struct X::t2 {\[\r\n \]*X::C2 m;\[\r\n \]*}" \
"print type of X::t2"
-if { [istarget arm*-*-*] } {
+if { [is_aarch32_target] } {
gdb_test "ptype X::t2::t2" "type = struct X::t2 {\r\n X::C2 m;\r\n} \\*\\(X::t2 \\* const\\)" \
"print type of X::t2::t2"
gdb_test "ptype t3::~t3" "type = void \\*\\(t3 \\* const\\)" \
diff --git a/gdb/testsuite/gdb.cp/cpexprs.exp b/gdb/testsuite/gdb.cp/cpexprs.exp
index baf0801..1acd875 100644
--- a/gdb/testsuite/gdb.cp/cpexprs.exp
+++ b/gdb/testsuite/gdb.cp/cpexprs.exp
@@ -144,7 +144,7 @@ add {base2::a_function} \
# On targets using the ARM EABI, the constructor is expected to return
# "this".
proc ctor_ret { type } {
- if { [istarget arm*-*eabi*] } {
+ if { [istarget arm*-*eabi*] || [is_aarch32_target] } {
return "$type *"
} else {
return "void "
@@ -195,7 +195,7 @@ add {base::base(int)} \
# GCC returns void * instead of $type *; RealView appears to do
# the same.
proc dtor { type } {
- if { [istarget arm*-*eabi*] } {
+ if { [istarget arm*-*eabi*] || [is_aarch32_target] } {
set ret "void *"
} else {
set ret "void "
diff --git a/gdb/testsuite/gdb.cp/m-static.exp b/gdb/testsuite/gdb.cp/m-static.exp
index 8972aeb..9c73c69 100644
--- a/gdb/testsuite/gdb.cp/m-static.exp
+++ b/gdb/testsuite/gdb.cp/m-static.exp
@@ -69,7 +69,7 @@ gdb_test "print test1.key2" "\\$\[0-9\]* = 77" "simple object, static long"
# simple object, static enum
gdb_test "print test1.value" "\\$\[0-9\]* = oriental" "simple object, static enum"
-if { [istarget arm*-*-*] } {
+if { [is_aarch32_target] } {
gdb_test "print test5.single_constructor" \
{ = {single_constructor \*\(single_constructor \* const\)} 0x[0-9a-f]+ <single_constructor::single_constructor\(\)>} \
"simple object instance, print constructor"