From: Daniel Jacobowitz <drow@mvista.com>
To: gdb-patches@sources.redhat.com
Subject: PATCH: Remove 'args' from cplus_struct_type
Date: Wed, 15 May 2002 21:22:00 -0000 [thread overview]
Message-ID: <20020516042236.GA23283@nevyn.them.org> (raw)
Elena identified this as a merge error from HP, so I'm re-removing it as
obvious. It was only assigned to by hpread.c, directly below the correct
assignments to the arg_types field in type_specific, with comments saying
they didn't know why it was there and it could probably be removed. It was
accessed nowhere.
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer
2002-05-16 Daniel Jacobowitz <drow@mvista.com>
* gdbtypes.h (struct cplus_struct_type): Remove args field.
* hpread.c (hpread_read_struct_type): Remove assignments to args.
(fixup_class_method_type): Likewise.
Index: gdbtypes.h
===================================================================
RCS file: /cvs/src/src/gdb/gdbtypes.h,v
retrieving revision 1.30
diff -u -p -r1.30 gdbtypes.h
--- gdbtypes.h 14 May 2002 18:30:50 -0000 1.30
+++ gdbtypes.h 15 May 2002 20:01:42 -0000
@@ -604,13 +604,6 @@ struct cplus_struct_type
struct type *type;
- /* The argument list. Only valid if is_stub is clear. Contains
- the type of each argument, including `this', and ending with
- a NULL pointer after the last argument. Should not contain
- a `this' pointer for static member functions. */
-
- struct type **args;
-
/* For virtual functions.
First baseclass that defines this virtual function. */
Index: hpread.c
===================================================================
RCS file: /cvs/src/src/gdb/hpread.c,v
retrieving revision 1.19
diff -u -p -r1.19 hpread.c
--- hpread.c 14 May 2002 18:30:51 -0000 1.19
+++ hpread.c 15 May 2002 20:01:43 -0000
@@ -3961,7 +3961,6 @@ hpread_read_struct_type (dnttpointer hp_
if (TYPE_INCOMPLETE (memtype))
{
fn_p->field.fn_fields[ix].type = NULL;
- fn_p->field.fn_fields[ix].args = NULL;
}
else
{
@@ -3979,18 +3978,8 @@ hpread_read_struct_type (dnttpointer hp_
/* void termination */
TYPE_TYPE_SPECIFIC (fn_p->field.fn_fields[ix].type)
.arg_types[TYPE_NFIELDS (memtype)] = builtin_type_void;
-
- /* pai: It's not clear why this args field has to be set. Perhaps
- * it should be eliminated entirely. */
- fn_p->field.fn_fields[ix].args =
- (struct type **) obstack_alloc (&objfile->type_obstack,
- sizeof (struct type *) * (TYPE_NFIELDS (memtype) + 1));
- for (i = 0; i < TYPE_NFIELDS (memtype); i++)
- fn_p->field.fn_fields[ix].args[i]
- = TYPE_FIELDS (memtype)[i].type;
- /* null-terminated, unlike arg_types above e */
- fn_p->field.fn_fields[ix].args[TYPE_NFIELDS (memtype)] = NULL;
}
+
/* For virtual functions, fill in the voffset field with the
* virtual table offset. (This is just copied over from the
* SOM record; not sure if it is what GDB expects here...).
@@ -4474,16 +4463,6 @@ fixup_class_method_type (struct type *cl
TYPE_TYPE_SPECIFIC (TYPE_FN_FIELD_TYPE (TYPE_FN_FIELDLIST1 (class, i), j)).arg_types[k] = TYPE_FIELDS (method)[k].type;
/* void termination */
TYPE_TYPE_SPECIFIC (TYPE_FN_FIELD_TYPE (TYPE_FN_FIELDLIST1 (class, i), j)).arg_types[TYPE_NFIELDS (method)] = builtin_type_void;
-
- /* pai: It's not clear why this args field has to be set. Perhaps
- * it should be eliminated entirely. */
- (TYPE_FN_FIELD (TYPE_FN_FIELDLIST1 (class, i), j)).args
- = (struct type **) obstack_alloc (&objfile->type_obstack,
- sizeof (struct type *) * (TYPE_NFIELDS (method) + 1));
- for (k = 0; k < TYPE_NFIELDS (method); k++)
- (TYPE_FN_FIELD (TYPE_FN_FIELDLIST1 (class, i), j)).args[k] = TYPE_FIELDS (method)[k].type;
- /* null-terminated, unlike arg_types above */
- (TYPE_FN_FIELD (TYPE_FN_FIELDLIST1 (class, i), j)).args[TYPE_NFIELDS (method)] = NULL;
/* Break out of both loops -- only one method to fix up in a class */
goto finish;
next reply other threads:[~2002-05-16 4:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-05-15 21:22 Daniel Jacobowitz [this message]
2002-05-16 9:33 ` Elena Zannoni
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20020516042236.GA23283@nevyn.them.org \
--to=drow@mvista.com \
--cc=gdb-patches@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox