2005-01-21 22:50:55 +00:00
|
|
|
2005-01-21 Jeff Johnston <jjohnstn@redhat.com>
|
|
|
|
|
|
|
|
* linespec.c (collect_methods): Don't do special processing for
|
|
|
|
destructors as this will be handled in find_methods.
|
|
|
|
(find_methods): Fix ctor check to also check for dtor.
|
|
|
|
|
2006-07-11 06:33:02 +00:00
|
|
|
Index: gdb-6.5/gdb/linespec.c
|
|
|
|
===================================================================
|
|
|
|
--- gdb-6.5.orig/gdb/linespec.c 2006-07-07 01:04:56.000000000 -0300
|
|
|
|
+++ gdb-6.5/gdb/linespec.c 2006-07-07 02:05:35.000000000 -0300
|
|
|
|
@@ -377,12 +377,14 @@ add_matching_methods (int method_counter
|
2005-01-21 22:50:55 +00:00
|
|
|
|
|
|
|
/* Check for special case of looking for member that
|
|
|
|
doesn't have a mangled name provided. This will happen
|
|
|
|
- when we have in-charge and not-in-charge constructors.
|
|
|
|
+ when we have in-charge and not-in-charge ctors/dtors.
|
|
|
|
Since we don't have a mangled name to work with, if we
|
|
|
|
- look for the symbol, we can only find the class itself.
|
|
|
|
+ look for the symbol, we can at best find the class itself.
|
2006-07-11 06:33:02 +00:00
|
|
|
We can find the information we need in the minimal symbol
|
2005-01-21 22:50:55 +00:00
|
|
|
table which has the full member name information we need. */
|
|
|
|
- if (strlen (phys_name) <= strlen (class_name))
|
2006-07-11 06:33:02 +00:00
|
|
|
+ if (strlen (phys_name) <= strlen (class_name)
|
|
|
|
+ || (strlen (phys_name) == strlen (class_name) + 1
|
|
|
|
+ && phys_name[0] == '~'))
|
2005-01-21 22:50:55 +00:00
|
|
|
return add_minsym_members (class_name, phys_name, msym_arr);
|
|
|
|
|
|
|
|
/* Destructor is handled by caller, don't add it to
|
2006-07-11 06:33:02 +00:00
|
|
|
@@ -1709,6 +1711,11 @@ collect_methods (char *copy, struct type
|
2005-01-21 22:50:55 +00:00
|
|
|
{
|
|
|
|
int i1 = 0; /* Counter for the symbol array. */
|
|
|
|
|
|
|
|
+#if 0
|
|
|
|
+ /* Ignore this special method for getting destructors because
|
|
|
|
+ find_methods is more robust and can handle multiple
|
|
|
|
+ destructors which is the case when gcc generates a not-in-charge
|
|
|
|
+ vs an in-charge destructor. */
|
|
|
|
if (destructor_name_p (copy, t))
|
|
|
|
{
|
|
|
|
/* Destructors are a special case. */
|
2006-07-11 06:33:02 +00:00
|
|
|
@@ -1727,6 +1734,7 @@ collect_methods (char *copy, struct type
|
2005-01-21 22:50:55 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
+#endif
|
|
|
|
i1 = find_methods (t, copy, sym_arr, msym_arr);
|
|
|
|
|
|
|
|
return i1;
|