From 62bca39d302524103e2c5fe72a7a85f7373235bb Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Fri, 1 Nov 2002 16:26:09 +0000 Subject: * gdbtypes.c (get_destructor_fn_field): Return obvious destructors based on method name. --- gdb/ChangeLog.cplus | 5 +++++ gdb/gdbtypes.c | 7 +++++++ 2 files changed, 12 insertions(+) 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 + + * gdbtypes.c (get_destructor_fn_field): Return obvious destructors + based on method name. + 2002-10-30 Daniel Jacobowitz * 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) -- cgit v1.2.1