aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.cp
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2013-03-25 17:28:03 +0000
committerTom Tromey <tromey@redhat.com>2013-03-25 17:28:03 +0000
commit24955f6344eb641157245700e0727fd81e968a33 (patch)
tree09faede4999ef9ffa573d8d041fdcf62d95a813e /gdb/testsuite/gdb.cp
parentfce632b6dc97eaa7e9f10f5c2c7dd8fd55931a51 (diff)
downloadgdb-24955f6344eb641157245700e0727fd81e968a33.zip
gdb-24955f6344eb641157245700e0727fd81e968a33.tar.gz
gdb-24955f6344eb641157245700e0727fd81e968a33.tar.bz2
PR symtab/11462:
* c-exp.y (exp): Add new productions for destructors after '.' and '->'. (write_destructor_name): New function. gdb/testsuite * gdb.cp/m-static.exp: Add destructor-printing tests.
Diffstat (limited to 'gdb/testsuite/gdb.cp')
-rw-r--r--gdb/testsuite/gdb.cp/m-static.exp7
1 files changed, 7 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.cp/m-static.exp b/gdb/testsuite/gdb.cp/m-static.exp
index b31922a..65ec6a0 100644
--- a/gdb/testsuite/gdb.cp/m-static.exp
+++ b/gdb/testsuite/gdb.cp/m-static.exp
@@ -79,6 +79,13 @@ 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"