This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [drow-cplus-branch] v3 destructors
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Fri, 1 Nov 2002 11:44:27 -0500
- Subject: Re: [drow-cplus-branch] v3 destructors
- References: <20021101163729.GA7955@nevyn.them.org>
On Fri, Nov 01, 2002 at 11:37:29AM -0500, Daniel Jacobowitz wrote:
> I've now added code to the stabs reader to report destructor field names
> properly. This changes get_destructor_fn_field_name to use that, but not to
> rely on it.
>
> I need to double-check with the HP reader, but I can probably rely on this
> now, and kill all physname checks for this purpose. One down, N to go, next
> on the hitlist is decode_line_2 once I figure out an approach. Then calling
> functions.
>
> --
> Daniel Jacobowitz
> MontaVista Software Debian GNU/Linux Developer
>
Oops, with patch.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
2002-11-01 Daniel Jacobowitz <drow@mvista.com>
* gdbtypes.c (get_destructor_fn_field): Return obvious destructors
based on method name.
Index: gdbtypes.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbtypes.c,v
retrieving revision 1.59.2.1
diff -u -p -r1.59.2.1 gdbtypes.c
--- gdbtypes.c 26 Oct 2002 17:12:07 -0000 1.59.2.1
+++ gdbtypes.c 31 Oct 2002 23:04:35 -0000
@@ -1311,6 +1311,13 @@ get_destructor_fn_field (struct type *t,
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)