aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.cp
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2010-02-19 20:22:03 +0000
committerTom Tromey <tromey@redhat.com>2010-02-19 20:22:03 +0000
commit48e32051ca17ba1cc1a2d5adc90ae5a63775e138 (patch)
treeceb4f1f24d0d7bb10e106f1d9416354b0d5e5915 /gdb/testsuite/gdb.cp
parent629d6a470a1b61631c812ec417b522fb6d69d9d1 (diff)
downloadgdb-48e32051ca17ba1cc1a2d5adc90ae5a63775e138.zip
gdb-48e32051ca17ba1cc1a2d5adc90ae5a63775e138.tar.gz
gdb-48e32051ca17ba1cc1a2d5adc90ae5a63775e138.tar.bz2
gdb
PR c++/8693, PR c++/9496: * cp-namespace.c (cp_lookup_nested_type): Handle TYPE_CODE_UNION. * c-exp.y (lex_one_token): Rename from yylex. Don't call write_dollar_variable. Don't try to classify NAME tokens. (token_and_value): New type. (token_fifo, popping, name_obstack): New globals. (classify_name): New function. (classify_inner_name): Likewise. (yylex): Likewise. (VARIABLE): Now has type sval. (exp : VARIABLE): Call write_dollar_variable. (qualified_name): Use TYPENAME, not typebase. Add production for multiple "::" instances. (variable): Use name_not_typename. (qualified_type): Remove. (typebase): Update. gdb/testsuite PR c++/8693, PR c++/9496: * gdb.cp/namespace.exp: Remove some setup_kfail calls. Added regression tests.
Diffstat (limited to 'gdb/testsuite/gdb.cp')
-rw-r--r--gdb/testsuite/gdb.cp/namespace.exp7
1 files changed, 4 insertions, 3 deletions
diff --git a/gdb/testsuite/gdb.cp/namespace.exp b/gdb/testsuite/gdb.cp/namespace.exp
index 4362fd8..fc59c5f 100644
--- a/gdb/testsuite/gdb.cp/namespace.exp
+++ b/gdb/testsuite/gdb.cp/namespace.exp
@@ -241,9 +241,7 @@ gdb_test "ptype E" "type = namespace C::D::E"
gdb_test "ptype CClass" "type = (class C::CClass \{\r\n public:|struct C::CClass \{)\r\n int x;\r\n\}"
gdb_test "ptype CClass::NestedClass" "type = (class C::CClass::NestedClass \{\r\n public:|struct C::CClass::NestedClass \{)\r\n int y;\r\n\}"
gdb_test "ptype NestedClass" "No symbol \"NestedClass\" in current context."
-setup_kfail "gdb/1448" "*-*-*"
gdb_test "ptype ::C::CClass" "type = class C::CClass \{\r\n public:\r\n int x;\r\n\}"
-setup_kfail "gdb/1448" "*-*-*"
gdb_test "ptype ::C::CClass::NestedClass" "type = class C::CClass::NestedClass \{\r\n public:\r\n int y;\r\n\}"
setup_kfail "gdb/1448" "*-*-*"
gdb_test "ptype ::C::NestedClass" "No symbol \"NestedClass\" in namespace \"C\"."
@@ -255,7 +253,6 @@ gdb_test "ptype C::NestedClass" "No symbol \"NestedClass\" in namespace \"C::C\"
gdb_test "print cOtherFile" "\\$\[0-9\].* = 316"
gdb_test "ptype OtherFileClass" "type = (class C::OtherFileClass \{\r\n public:|struct C::OtherFileClass \{)\r\n int z;\r\n\}"
-setup_kfail "gdb/1448" "*-*-*"
gdb_test "ptype ::C::OtherFileClass" "type = class C::OtherFileClass \{\r\n public:\r\n int z;\r\n\}"
gdb_test "ptype C::OtherFileClass" "No symbol \"OtherFileClass\" in namespace \"C::C\"."
@@ -274,3 +271,7 @@ gdb_test "print XOtherFile" "No symbol \"XOtherFile\" in current context."
# Enum tests.
gdb_test "print AAA::ALPHA" "\\$\[0-9\].* = AAA::ALPHA"
+
+# Regression tests for PR 9496.
+gdb_test "whatis ::C::CClass::NestedClass" "type = C::CClass::NestedClass"
+gdb_test "whatis ::C::CClass::NestedClass *" "type = C::CClass::NestedClass \\*"