67 lines
1.9 KiB
Diff
67 lines
1.9 KiB
Diff
|
[patch] Fix ADL anonymous type crash
|
||
|
http://sourceware.org/ml/gdb-patches/2010-06/msg00004.html
|
||
|
http://sourceware.org/ml/gdb-cvs/2010-06/msg00012.html
|
||
|
|
||
|
[ Backported the testcase. ]
|
||
|
|
||
|
### src/gdb/ChangeLog 2010/06/02 06:24:00 1.11862
|
||
|
### src/gdb/ChangeLog 2010/06/02 15:31:29 1.11863
|
||
|
## -1,3 +1,8 @@
|
||
|
+2010-06-02 Sami Wagiaalla <swagiaal@redhat.com>
|
||
|
+
|
||
|
+ * cp-support.c (make_symbol_overload_list_adl_namespace): Handle
|
||
|
+ anonymous type case.
|
||
|
+
|
||
|
2010-06-02 Pierre Muller <muller@ics.u-strasbg.fr>
|
||
|
|
||
|
* dwarf2read.c (read_subrange_type): Handle missing base type
|
||
|
### src/gdb/testsuite/ChangeLog 2010/06/01 21:29:21 1.2298
|
||
|
### src/gdb/testsuite/ChangeLog 2010/06/02 15:31:30 1.2299
|
||
|
## -1,3 +1,8 @@
|
||
|
+2010-06-02 Sami Wagiaalla <swagiaal@redhat.com>
|
||
|
+
|
||
|
+ * gdb.cp/namespace-koenig.exp: Added new test case.
|
||
|
+ * gdb.cp/namespace-koenig.cc: Ditto.
|
||
|
+
|
||
|
2010-06-01 Michael Snyder <msnyder@vmware.com>
|
||
|
|
||
|
* gdb.base/arithmet.exp: Use gdb_test_no_output.
|
||
|
--- src/gdb/cp-support.c 2010/05/13 23:53:32 1.40
|
||
|
+++ src/gdb/cp-support.c 2010/06/02 15:31:30 1.41
|
||
|
@@ -752,6 +752,9 @@
|
||
|
|
||
|
type_name = TYPE_NAME (type);
|
||
|
|
||
|
+ if (type_name == NULL)
|
||
|
+ return;
|
||
|
+
|
||
|
prefix_len = cp_entire_prefix_len (type_name);
|
||
|
|
||
|
if (prefix_len != 0)
|
||
|
--- gdb-7.1/gdb/testsuite/gdb.cp/namespace-koenig.cc.orig 2010-06-09 08:20:14.000000000 +0200
|
||
|
+++ gdb-7.1/gdb/testsuite/gdb.cp/namespace-koenig.cc 2010-06-09 11:09:29.000000000 +0200
|
||
|
@@ -165,6 +165,13 @@ namespace M {
|
||
|
|
||
|
}
|
||
|
//------------
|
||
|
+static union {
|
||
|
+ int a;
|
||
|
+ char b;
|
||
|
+}p_union;
|
||
|
+
|
||
|
+//------------
|
||
|
+
|
||
|
int
|
||
|
main ()
|
||
|
{
|
||
|
--- gdb-7.1/gdb/testsuite/gdb.cp/namespace-koenig.exp.orig 2010-06-09 08:20:14.000000000 +0200
|
||
|
+++ gdb-7.1/gdb/testsuite/gdb.cp/namespace-koenig.exp 2010-06-09 11:09:48.000000000 +0200
|
||
|
@@ -110,3 +111,7 @@ gdb_test "p o + 5.0f" "= 22"
|
||
|
gdb_test "p o + 5" "= 23"
|
||
|
|
||
|
gdb_test "p o++" "= 24"
|
||
|
+
|
||
|
+#test that lookup is not thwarted by anonymous types
|
||
|
+gdb_test "p foo (p_union)" \
|
||
|
+ "Cannot resolve function foo to any overloaded instance"
|