summaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.cp/m-static.exp
diff options
context:
space:
mode:
authorWill Newton <willnewton@sourceware.org>2013-06-07 08:47:09 +0000
committerWill Newton <willnewton@sourceware.org>2013-06-07 08:47:09 +0000
commitf4059ef3dea24d7ced46bcceddccff7b01af3ba9 (patch)
tree1561e1c837c5910ff8d861120f9de7edd1670705 /gdb/testsuite/gdb.cp/m-static.exp
parentfe8400b4383bda9333b559255b63c2c659e9ad5f (diff)
downloadbinutils-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/m-static.exp')
-rw-r--r--gdb/testsuite/gdb.cp/m-static.exp75
1 files changed, 51 insertions, 24 deletions
diff --git a/gdb/testsuite/gdb.cp/m-static.exp b/gdb/testsuite/gdb.cp/m-static.exp
index 65ec6a00058..9b0e642d50b 100644
--- a/gdb/testsuite/gdb.cp/m-static.exp
+++ b/gdb/testsuite/gdb.cp/m-static.exp
@@ -69,30 +69,57 @@ 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"
-gdb_test "print test5.single_constructor" \
- { = {void \(single_constructor \* const\)} 0x[0-9a-f]+ <single_constructor::single_constructor\(\)>} \
- "simple object instance, print constructor"
-gdb_test "ptype test5.single_constructor" \
- {type = void \(single_constructor \* const\)} \
- "simple object instance, ptype constructor"
-gdb_test "ptype single_constructor::single_constructor" \
- {type = void \(single_constructor \* const\)} \
- "simple object class, ptype constructor"
-
-gdb_test "print test1.~gnu_obj_1" \
- { = {void \(gnu_obj_1 \* const, int\)} 0x[0-9a-f]+ <gnu_obj_1::~gnu_obj_1\(\)>} \
- "simple object instance, print destructor"
-gdb_test "ptype test1.~gnu_obj_1" \
- {type = void \(gnu_obj_1 \* const, int\)} \
- "simple object instance, ptype destructor"
-
-gdb_test "print test1.'~gnu_obj_1'" \
- { = {void \(gnu_obj_1 \*( const)?, int\)} 0x[0-9a-f]+ <gnu_obj_1::~gnu_obj_1\(\)>} \
- "simple object instance, print quoted destructor"
-
-gdb_test "ptype gnu_obj_1::'~gnu_obj_1'" \
- {type = void \(gnu_obj_1 \* const\)} \
- "simple object class, ptype quoted destructor"
+if { [istarget arm*-*-*] } {
+ gdb_test "print test5.single_constructor" \
+ { = {single_constructor \*\(single_constructor \* const\)} 0x[0-9a-f]+ <single_constructor::single_constructor\(\)>} \
+ "simple object instance, print constructor"
+ gdb_test "ptype test5.single_constructor" \
+ {type = class single_constructor {\r\n public:\r\n single_constructor\(void\);\r\n ~single_constructor\(int\);\r\n} \*\(single_constructor \* const\)} \
+ "simple object instance, ptype constructor"
+ gdb_test "ptype single_constructor::single_constructor" \
+ {type = class single_constructor {\r\n public:\r\n single_constructor\(void\);\r\n ~single_constructor\(int\);\r\n} \*\(single_constructor \* const\)} \
+ "simple object class, ptype constructor"
+
+ gdb_test "print test1.~gnu_obj_1" \
+ { = {void \*\(gnu_obj_1 \* const, int\)} 0x[0-9a-f]+ <gnu_obj_1::~gnu_obj_1\(\)>} \
+ "simple object instance, print destructor"
+ gdb_test "ptype test1.~gnu_obj_1" \
+ {type = void \*\(gnu_obj_1 \* const, int\)} \
+ "simple object instance, ptype destructor"
+
+ gdb_test "print test1.'~gnu_obj_1'" \
+ { = {void \*\(gnu_obj_1 \*( const)?, int\)} 0x[0-9a-f]+ <gnu_obj_1::~gnu_obj_1\(\)>} \
+ "simple object instance, print quoted destructor"
+
+ gdb_test "ptype gnu_obj_1::'~gnu_obj_1'" \
+ {type = void \*\(gnu_obj_1 \* const\)} \
+ "simple object class, ptype quoted destructor"
+} else {
+ gdb_test "print test5.single_constructor" \
+ { = {void \(single_constructor \* const\)} 0x[0-9a-f]+ <single_constructor::single_constructor\(\)>} \
+ "simple object instance, print constructor"
+ gdb_test "ptype test5.single_constructor" \
+ {type = void \(single_constructor \* const\)} \
+ "simple object instance, ptype constructor"
+ gdb_test "ptype single_constructor::single_constructor" \
+ {type = void \(single_constructor \* const\)} \
+ "simple object class, ptype constructor"
+
+ gdb_test "print test1.~gnu_obj_1" \
+ { = {void \(gnu_obj_1 \* const, int\)} 0x[0-9a-f]+ <gnu_obj_1::~gnu_obj_1\(\)>} \
+ "simple object instance, print destructor"
+ gdb_test "ptype test1.~gnu_obj_1" \
+ {type = void \(gnu_obj_1 \* const, int\)} \
+ "simple object instance, ptype destructor"
+
+ gdb_test "print test1.'~gnu_obj_1'" \
+ { = {void \(gnu_obj_1 \*( const)?, int\)} 0x[0-9a-f]+ <gnu_obj_1::~gnu_obj_1\(\)>} \
+ "simple object instance, print quoted destructor"
+
+ gdb_test "ptype gnu_obj_1::'~gnu_obj_1'" \
+ {type = void \(gnu_obj_1 \* const\)} \
+ "simple object class, ptype quoted destructor"
+}
# Two.