summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog.cplus5
-rw-r--r--gdb/gdbtypes.c7
2 files changed, 12 insertions, 0 deletions
diff --git a/gdb/ChangeLog.cplus b/gdb/ChangeLog.cplus
index c2283bf7a65..a55ce94fe30 100644
--- a/gdb/ChangeLog.cplus
+++ b/gdb/ChangeLog.cplus
@@ -1,3 +1,8 @@
+2002-11-01 Daniel Jacobowitz <drow@mvista.com>
+
+ * gdbtypes.c (get_destructor_fn_field): Return obvious destructors
+ based on method name.
+
2002-10-30 Daniel Jacobowitz <drow@mvista.com>
* c-typeprint.c (c_type_print_modifier_before): New function.
diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
index 5f0d4fe3649..8dfbed08d96 100644
--- a/gdb/gdbtypes.c
+++ b/gdb/gdbtypes.c
@@ -1311,6 +1311,13 @@ get_destructor_fn_field (struct type *t, int *method_indexp, int *field_indexp)
int j;
struct fn_field *f = TYPE_FN_FIELDLIST1 (t, i);
+ if (TYPE_FN_FIELDLIST_NAME (t, i)[0] == '~')
+ {
+ *method_indexp = i;
+ *field_indexp = 0;
+ return 1;
+ }
+
for (j = 0; j < TYPE_FN_FIELDLIST_LENGTH (t, i); j++)
{
if (is_destructor_name (TYPE_FN_FIELD_PHYSNAME (f, j)) != 0)