mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-10-19 05:42:42 +08:00
Fix ADL anonymous name crash.
2010-06-02 Sami Wagiaalla <swagiaal@redhat.com> * cp-support.c (make_symbol_overload_list_adl_namespace): Handle anonymous type case. 2010-06-02 Sami Wagiaalla <swagiaal@redhat.com> * gdb.cp/koenig.exp: Added new test case. * gdb.cp/koenig.cc: Ditto.
This commit is contained in:
@ -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>
|
2010-06-02 Pierre Muller <muller@ics.u-strasbg.fr>
|
||||||
|
|
||||||
* dwarf2read.c (read_subrange_type): Handle missing base type
|
* dwarf2read.c (read_subrange_type): Handle missing base type
|
||||||
|
@ -752,6 +752,9 @@ make_symbol_overload_list_adl_namespace (struct type *type,
|
|||||||
|
|
||||||
type_name = TYPE_NAME (type);
|
type_name = TYPE_NAME (type);
|
||||||
|
|
||||||
|
if (type_name == NULL)
|
||||||
|
return;
|
||||||
|
|
||||||
prefix_len = cp_entire_prefix_len (type_name);
|
prefix_len = cp_entire_prefix_len (type_name);
|
||||||
|
|
||||||
if (prefix_len != 0)
|
if (prefix_len != 0)
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
2010-06-02 Sami Wagiaalla <swagiaal@redhat.com>
|
||||||
|
|
||||||
|
* gdb.cp/koenig.exp: Added new test case.
|
||||||
|
* gdb.cp/koenig.cc: Ditto.
|
||||||
|
|
||||||
2010-06-01 Michael Snyder <msnyder@vmware.com>
|
2010-06-01 Michael Snyder <msnyder@vmware.com>
|
||||||
|
|
||||||
* gdb.base/arithmet.exp: Use gdb_test_no_output.
|
* gdb.base/arithmet.exp: Use gdb_test_no_output.
|
||||||
|
@ -175,6 +175,13 @@ typedef O::A TOA;
|
|||||||
typedef TOA TTOA;
|
typedef TOA TTOA;
|
||||||
|
|
||||||
//------------
|
//------------
|
||||||
|
static union {
|
||||||
|
int a;
|
||||||
|
char b;
|
||||||
|
}p_union;
|
||||||
|
|
||||||
|
//------------
|
||||||
|
|
||||||
int
|
int
|
||||||
main ()
|
main ()
|
||||||
{
|
{
|
||||||
|
@ -64,6 +64,7 @@ gdb_test "p foo(go, fo, eo)" "= 6"
|
|||||||
|
|
||||||
#test that gdb fails gracefully
|
#test that gdb fails gracefully
|
||||||
gdb_test "p fake(eo)" "No symbol \"fake\" in current context."
|
gdb_test "p fake(eo)" "No symbol \"fake\" in current context."
|
||||||
|
gdb_test "p foo (fake)" "No symbol \"fake\" in current context."
|
||||||
|
|
||||||
#test that namespaces of base classes are searched
|
#test that namespaces of base classes are searched
|
||||||
gdb_test "p foo(io)" "= 7"
|
gdb_test "p foo(io)" "= 7"
|
||||||
@ -104,3 +105,7 @@ gdb_test "p M::N::bar('a')" "= 22"
|
|||||||
|
|
||||||
#test that lookup supports typedef
|
#test that lookup supports typedef
|
||||||
gdb_test "p foo(ttoa, 'a')" "= 23"
|
gdb_test "p foo(ttoa, 'a')" "= 23"
|
||||||
|
|
||||||
|
#test that lookup is not thwarted by anonymous types
|
||||||
|
gdb_test "p foo (p_union)" \
|
||||||
|
"Cannot resolve function foo to any overloaded instance"
|
||||||
|
Reference in New Issue
Block a user