aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2013-02-12 20:27:36 +0000
committerTom Tromey <tromey@redhat.com>2013-02-12 20:27:36 +0000
commite234dfafcd88ca5015d3497e52c819a5c96493c5 (patch)
treec04b8f82a7e30a45c0f1433862f0c9bfa4ed413b /gdb/testsuite
parent0b1afbb37b6c21c50564ead74decadc13eba73c5 (diff)
downloadgdb-e234dfafcd88ca5015d3497e52c819a5c96493c5.zip
gdb-e234dfafcd88ca5015d3497e52c819a5c96493c5.tar.gz
gdb-e234dfafcd88ca5015d3497e52c819a5c96493c5.tar.bz2
PR symtab/11464:
* c-exp.y (lex_one_token): Initialize other fields of yylval on NAME return. (classify_inner_name): Remove 'first_name' argument, add 'context'. Remove unused variable. (yylex): Explicitly maintain the context type. Exit loop earlier if NAME result is seen. gdb/testsuite * gdb.cp/m-static.cc (gnu_obj_1::~gnu_obj_1): New destructor. * gdb.cp/m-static.exp: Add tests to print quoted destructor.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r--gdb/testsuite/ChangeLog5
-rw-r--r--gdb/testsuite/gdb.cp/m-static.cc1
-rw-r--r--gdb/testsuite/gdb.cp/m-static.exp8
3 files changed, 14 insertions, 0 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 81c1401..cd0989f 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2013-02-12 Tom Tromey <tromey@redhat.com>
+
+ * gdb.cp/m-static.cc (gnu_obj_1::~gnu_obj_1): New destructor.
+ * gdb.cp/m-static.exp: Add tests to print quoted destructor.
+
2013-02-12 Pedro Alves <palves@redhat.com>
* gdb.base/catch-signal.c: Update copyright years.
diff --git a/gdb/testsuite/gdb.cp/m-static.cc b/gdb/testsuite/gdb.cp/m-static.cc
index e9dce18..8472988 100644
--- a/gdb/testsuite/gdb.cp/m-static.cc
+++ b/gdb/testsuite/gdb.cp/m-static.cc
@@ -17,6 +17,7 @@ protected:
public:
gnu_obj_1(antiquities a, long l) {}
+ ~gnu_obj_1() {}
long method ()
{
diff --git a/gdb/testsuite/gdb.cp/m-static.exp b/gdb/testsuite/gdb.cp/m-static.exp
index 38d2498..ae4b2ad 100644
--- a/gdb/testsuite/gdb.cp/m-static.exp
+++ b/gdb/testsuite/gdb.cp/m-static.exp
@@ -64,6 +64,14 @@ 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 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.
# derived template object, base static const bool