This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[patch] Remove nfn_fields_total, unused.
- From: dje at google dot com (Doug Evans)
- To: gdb-patches at sourceware dot org
- Date: Sat, 10 Dec 2011 16:44:54 -0800 (PST)
- Subject: [patch] Remove nfn_fields_total, unused.
Hi.
I noticed struct cplus_struct_type member nfn_fields_total
is no longer used.
I will check this in in a few days if there are no objections.
2011-12-10 Doug Evans <dje@google.com>
* gdbtypes.h (struct cplus_struct_type): Delete member
nfn_fields_total. All uses removed.
Index: dwarf2read.c
===================================================================
RCS file: /cvs/src/src/gdb/dwarf2read.c,v
retrieving revision 1.586
diff -u -p -r1.586 dwarf2read.c
--- dwarf2read.c 10 Dec 2011 23:57:39 -0000 1.586
+++ dwarf2read.c 11 Dec 2011 00:30:49 -0000
@@ -7548,7 +7548,6 @@ dwarf2_attach_fn_fields_to_type (struct
struct dwarf2_cu *cu)
{
struct fnfieldlist *flp;
- int total_length = 0;
int i;
if (cu->language == language_ada)
@@ -7571,11 +7570,8 @@ dwarf2_attach_fn_fields_to_type (struct
for (k = flp->length; (k--, nfp); nfp = nfp->next)
fn_flp->fn_fields[k] = nfp->fnfield;
-
- total_length += flp->length;
}
TYPE_NFN_FIELDS (type) = fip->nfnfields;
- TYPE_NFN_FIELDS_TOTAL (type) = total_length;
}
/* Returns non-zero if NAME is the name of a vtable member in CU's
Index: gdbtypes.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbtypes.c,v
retrieving revision 1.221
diff -u -p -r1.221 gdbtypes.c
--- gdbtypes.c 10 Nov 2011 06:53:55 -0000 1.221
+++ gdbtypes.c 11 Dec 2011 00:30:49 -0000
@@ -2897,8 +2897,6 @@ print_cplus_stuff (struct type *type, in
TYPE_N_BASECLASSES (type));
printfi_filtered (spaces, "nfn_fields %d\n",
TYPE_NFN_FIELDS (type));
- printfi_filtered (spaces, "nfn_fields_total %d\n",
- TYPE_NFN_FIELDS_TOTAL (type));
if (TYPE_N_BASECLASSES (type) > 0)
{
printfi_filtered (spaces, "virtual_field_bits (%d bits at *",
Index: gdbtypes.h
===================================================================
RCS file: /cvs/src/src/gdb/gdbtypes.h,v
retrieving revision 1.158
diff -u -p -r1.158 gdbtypes.h
--- gdbtypes.h 17 Oct 2011 14:04:37 -0000 1.158
+++ gdbtypes.h 11 Dec 2011 00:30:49 -0000
@@ -695,11 +695,6 @@ struct cplus_struct_type
short nfn_fields;
- /* Number of methods described for this type, not including the
- methods that it derives from. */
-
- short nfn_fields_total;
-
/* Number of template arguments. */
unsigned short n_template_arguments;
@@ -1052,7 +1047,6 @@ extern void allocate_gnat_aux_type (stru
#define TYPE_VPTR_FIELDNO(thistype) TYPE_MAIN_TYPE(thistype)->vptr_fieldno
#define TYPE_FN_FIELDS(thistype) TYPE_CPLUS_SPECIFIC(thistype)->fn_fields
#define TYPE_NFN_FIELDS(thistype) TYPE_CPLUS_SPECIFIC(thistype)->nfn_fields
-#define TYPE_NFN_FIELDS_TOTAL(thistype) TYPE_CPLUS_SPECIFIC(thistype)->nfn_fields_total
#define TYPE_SPECIFIC_FIELD(thistype) \
TYPE_MAIN_TYPE(thistype)->type_specific_field
#define TYPE_TYPE_SPECIFIC(thistype) TYPE_MAIN_TYPE(thistype)->type_specific
Index: jv-lang.c
===================================================================
RCS file: /cvs/src/src/gdb/jv-lang.c,v
retrieving revision 1.95
diff -u -p -r1.95 jv-lang.c
--- jv-lang.c 6 Dec 2011 18:54:39 -0000 1.95
+++ jv-lang.c 11 Dec 2011 00:30:49 -0000
@@ -501,7 +501,6 @@ java_link_class_type (struct gdbarch *gd
temp = clas;
nmethods = value_as_long (value_struct_elt (&temp, NULL, "method_count",
NULL, "structure"));
- TYPE_NFN_FIELDS_TOTAL (type) = nmethods;
j = nmethods * sizeof (struct fn_field);
fn_fields = (struct fn_field *)
obstack_alloc (&objfile->objfile_obstack, j);
Index: stabsread.c
===================================================================
RCS file: /cvs/src/src/gdb/stabsread.c,v
retrieving revision 1.140
diff -u -p -r1.140 stabsread.c
--- stabsread.c 10 Nov 2011 20:21:28 -0000 1.140
+++ stabsread.c 11 Dec 2011 00:30:49 -0000
@@ -2280,10 +2280,6 @@ read_member_functions (struct field_info
{
int nfn_fields = 0;
int length = 0;
- /* Total number of member functions defined in this class. If the class
- defines two `f' functions, and one `g' function, then this will have
- the value 3. */
- int total_length = 0;
int i;
struct next_fnfield
{
@@ -2683,7 +2679,6 @@ read_member_functions (struct field_info
destr_fnlist->next = fip->fnlist;
fip->fnlist = destr_fnlist;
nfn_fields++;
- total_length += has_destructor;
length -= has_destructor;
}
else if (is_v3)
@@ -2734,7 +2729,6 @@ read_member_functions (struct field_info
new_fnlist->next = fip->fnlist;
fip->fnlist = new_fnlist;
nfn_fields++;
- total_length += length;
}
}
@@ -2746,7 +2740,6 @@ read_member_functions (struct field_info
memset (TYPE_FN_FIELDLISTS (type), 0,
sizeof (struct fn_fieldlist) * nfn_fields);
TYPE_NFN_FIELDS (type) = nfn_fields;
- TYPE_NFN_FIELDS_TOTAL (type) = total_length;
}
return 1;