diff options
author | Will Newton <willnewton@sourceware.org> | 2013-06-07 08:47:09 +0000 |
---|---|---|
committer | Will Newton <willnewton@sourceware.org> | 2013-06-07 08:47:09 +0000 |
commit | f4059ef3dea24d7ced46bcceddccff7b01af3ba9 (patch) | |
tree | 1561e1c837c5910ff8d861120f9de7edd1670705 /gdb/testsuite/gdb.cp/anon-struct.exp | |
parent | fe8400b4383bda9333b559255b63c2c659e9ad5f (diff) | |
download | binutils-gdb-f4059ef3dea24d7ced46bcceddccff7b01af3ba9.tar.gz |
gdb/testsuite/gdb.cp: Fix tests for ARM C++ ABI.
The ARM C++ ABI defines constructors and destructors to return
pointers to this. The C++ tests that check the types of constructors
and destructors expect a return type of void. Conditionalize these
tests so they pass on ARM.
gdb/testsuite/ChangeLog:
2013-06-07 Will Newton <will.newton@linaro.org>
* gdb.cp/anon-struct.exp: Conditionalize constructor and
destructor prototypes for ARM ABI.
* gdb.cp/m-static.exp: Likewise.
Diffstat (limited to 'gdb/testsuite/gdb.cp/anon-struct.exp')
-rw-r--r-- | gdb/testsuite/gdb.cp/anon-struct.exp | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/gdb/testsuite/gdb.cp/anon-struct.exp b/gdb/testsuite/gdb.cp/anon-struct.exp index edab09264d1..3446eb78b0f 100644 --- a/gdb/testsuite/gdb.cp/anon-struct.exp +++ b/gdb/testsuite/gdb.cp/anon-struct.exp @@ -20,14 +20,25 @@ if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} {debug c++}] } return -1 } -gdb_test "ptype t::t" "type = void \\(t \\* const\\)" \ - "print type of t::t" +if { [istarget arm*-*-*] } { + gdb_test "ptype t::t" "type = struct t {\r\n C m;\r\n} \\*\\(t \\* const\\)" \ + "print type of t::t" +} else { + gdb_test "ptype t::t" "type = void \\(t \\* const\\)" \ + "print type of t::t" +} gdb_test "ptype X::t2" "type = struct X::t2 {\[\r\n \]*X::C2 m;\[\r\n \]*}" \ "print type of X::t2" -gdb_test "ptype X::t2::t2" "type = void \\(X::t2 \\* const\\)" \ - "print type of X::t2::t2" - -gdb_test "ptype t3::~t3" "type = void \\(t3 \\* const\\)" \ - "print type of t3::~t3" +if { [istarget arm*-*-*] } { + 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\\)" \ + "print type of t3::~t3" +} else { + gdb_test "ptype X::t2::t2" "type = void \\(X::t2 \\* const\\)" \ + "print type of X::t2::t2" + gdb_test "ptype t3::~t3" "type = void \\(t3 \\* const\\)" \ + "print type of t3::~t3" +} |