mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-23 03:29:47 +08:00
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.
This commit is contained in:
@ -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>
|
2016-07-26 Tom Tromey <tom@tromey.com>
|
||||||
|
|
||||||
PR python/20190:
|
PR python/20190:
|
||||||
|
@ -20,7 +20,7 @@ if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} {debug c++}] }
|
|||||||
return -1
|
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\\)" \
|
gdb_test "ptype t::t" "type = struct t {\r\n C m;\r\n} \\*\\(t \\* const\\)" \
|
||||||
"print type of t::t"
|
"print type of t::t"
|
||||||
} else {
|
} else {
|
||||||
@ -31,7 +31,7 @@ if { [istarget arm*-*-*] } {
|
|||||||
gdb_test "ptype X::t2" "type = struct X::t2 {\[\r\n \]*X::C2 m;\[\r\n \]*}" \
|
gdb_test "ptype X::t2" "type = struct X::t2 {\[\r\n \]*X::C2 m;\[\r\n \]*}" \
|
||||||
"print type of X::t2"
|
"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\\)" \
|
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"
|
"print type of X::t2::t2"
|
||||||
gdb_test "ptype t3::~t3" "type = void \\*\\(t3 \\* const\\)" \
|
gdb_test "ptype t3::~t3" "type = void \\*\\(t3 \\* const\\)" \
|
||||||
|
@ -144,7 +144,7 @@ add {base2::a_function} \
|
|||||||
# On targets using the ARM EABI, the constructor is expected to return
|
# On targets using the ARM EABI, the constructor is expected to return
|
||||||
# "this".
|
# "this".
|
||||||
proc ctor_ret { type } {
|
proc ctor_ret { type } {
|
||||||
if { [istarget arm*-*eabi*] } {
|
if { [istarget arm*-*eabi*] || [is_aarch32_target] } {
|
||||||
return "$type *"
|
return "$type *"
|
||||||
} else {
|
} else {
|
||||||
return "void "
|
return "void "
|
||||||
@ -195,7 +195,7 @@ add {base::base(int)} \
|
|||||||
# GCC returns void * instead of $type *; RealView appears to do
|
# GCC returns void * instead of $type *; RealView appears to do
|
||||||
# the same.
|
# the same.
|
||||||
proc dtor { type } {
|
proc dtor { type } {
|
||||||
if { [istarget arm*-*eabi*] } {
|
if { [istarget arm*-*eabi*] || [is_aarch32_target] } {
|
||||||
set ret "void *"
|
set ret "void *"
|
||||||
} else {
|
} else {
|
||||||
set ret "void "
|
set ret "void "
|
||||||
|
@ -69,7 +69,7 @@ gdb_test "print test1.key2" "\\$\[0-9\]* = 77" "simple object, static long"
|
|||||||
# simple object, static enum
|
# simple object, static enum
|
||||||
gdb_test "print test1.value" "\\$\[0-9\]* = oriental" "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" \
|
gdb_test "print test5.single_constructor" \
|
||||||
{ = {single_constructor \*\(single_constructor \* const\)} 0x[0-9a-f]+ <single_constructor::single_constructor\(\)>} \
|
{ = {single_constructor \*\(single_constructor \* const\)} 0x[0-9a-f]+ <single_constructor::single_constructor\(\)>} \
|
||||||
"simple object instance, print constructor"
|
"simple object instance, print constructor"
|
||||||
|
Reference in New Issue
Block a user