summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Jacobowitz <dan@debian.org>2002-11-01 16:26:09 +0000
committerDaniel Jacobowitz <dan@debian.org>2002-11-01 16:26:09 +0000
commit62bca39d302524103e2c5fe72a7a85f7373235bb (patch)
tree3cb836821ea009ce1d99bc135d8847d8a9988382
parentbe3998d0cb5a0a135ddc89fb1184e52ca0882060 (diff)
downloadgdb-62bca39d302524103e2c5fe72a7a85f7373235bb.tar.gz
* gdbtypes.c (get_destructor_fn_field): Return obvious destructors
based on method name.
-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)