This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] Fix C++ leading :: (PR c++/11703 and PR gdb/1448)
On Mon, 28 Jun 2010 20:28:27 +0200, Tom Tromey wrote:
> >>>>> "Jan" == Jan Kratochvil <jan.kratochvil@redhat.com> writes:
> Jan> 2010-06-26 Jan Kratochvil <jan.kratochvil@redhat.com>
> Jan> Fix PR c++/11703 and PR gdb/1448.
> Jan> * c-exp.y (yylex) <last_was_coloncolon && first_was_coloncolon>: Add
> Jan> FIRST_ITER check.
>
> Jan> 2010-06-26 Jan Kratochvil <jan.kratochvil@redhat.com>
> Jan> Test PR c++/11703 and PR gdb/1448.
> Jan> * gdb.cp/namespace.exp (whatis ::C::cOtherFileVar)
> Jan> (print ::C::cOtherFileVar)
> Jan> (print ::C::OtherFileClass::cOtherFileClassVar): Remove KFAIL for
> Jan> c++/11703.
> Jan> (ptype ::C::NestedClass): Remove KFAIL for gdb/1448.
>
> This is ok. Thanks for fixing this.
Checked-in. Simlified patches order so the gdb/testsuite/ change is reduced.
Thanks,
Jan
http://sourceware.org/ml/gdb-cvs/2010-06/msg00197.html
--- src/gdb/ChangeLog 2010/06/28 20:12:52 1.11942
+++ src/gdb/ChangeLog 2010/06/28 20:18:26 1.11943
@@ -1,5 +1,11 @@
2010-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
+ Fix PR c++/11703 and PR gdb/1448.
+ * c-exp.y (yylex) <last_was_coloncolon && first_was_coloncolon>: Add
+ FIRST_ITER check.
+
+2010-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
+
Fix modification of cplus_struct_default.
* dwarf2read.c (dwarf2_add_member_fn) <no DW_AT_vtable_elem_location>:
Call ALLOCATE_CPLUS_STRUCT_TYPE.
--- src/gdb/c-exp.y 2010/05/07 14:46:25 1.75
+++ src/gdb/c-exp.y 2010/06/28 20:18:26 1.76
@@ -2553,7 +2553,7 @@
{
token_and_value cc;
memset (&cc, 0, sizeof (token_and_value));
- if (first_was_coloncolon)
+ if (first_was_coloncolon && first_iter)
{
yylval = cc.value;
return COLONCOLON;
--- src/gdb/testsuite/ChangeLog 2010/06/28 20:12:52 1.2359
+++ src/gdb/testsuite/ChangeLog 2010/06/28 20:18:26 1.2360
@@ -1,5 +1,11 @@
2010-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
+ Test PR c++/11703 and PR gdb/1448.
+ * gdb.cp/namespace.exp (ptype ::C::NestedClass): Remove KFAIL for
+ gdb/1448.
+
+2010-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
+
* gdb.cp/virtbase.cc (class RTTI_base, class RTTI_data)
(main) <rtti_data>: New.
* gdb.cp/virtbase.exp (print rtti_data): New.
--- src/gdb/testsuite/gdb.cp/namespace.exp 2010/06/01 18:18:35 1.19
+++ src/gdb/testsuite/gdb.cp/namespace.exp 2010/06/28 20:18:27 1.20
@@ -192,7 +192,6 @@
gdb_test "ptype NestedClass" "No symbol \"NestedClass\" in current context."
gdb_test "ptype ::C::CClass" "type = class C::CClass \{\r\n public:\r\n int x;\r\n\}"
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\"."
gdb_test "ptype C::CClass" "No symbol \"CClass\" in namespace \"C::C\"."
gdb_test "ptype C::CClass::NestedClass" "No type \"CClass\" within class or namespace \"C::C\"."