* dwarf2read.c (dwarf2_per_objfile): Change type of all_type_units
to struct signatured_type **. All uses updated.
This commit is contained in:
parent
9357e02197
commit
b4dd56334d
|
@ -1,5 +1,8 @@
|
||||||
2012-07-09 Doug Evans <dje@google.com>
|
2012-07-09 Doug Evans <dje@google.com>
|
||||||
|
|
||||||
|
* dwarf2read.c (dwarf2_per_objfile): Change type of all_type_units
|
||||||
|
to struct signatured_type **. All uses updated.
|
||||||
|
|
||||||
* dwarf2read.c (dwarf2_attr_no_follow): Delete unused arg "cu".
|
* dwarf2read.c (dwarf2_attr_no_follow): Delete unused arg "cu".
|
||||||
All callers updated.
|
All callers updated.
|
||||||
|
|
||||||
|
|
|
@ -212,7 +212,7 @@ struct dwarf2_per_objfile
|
||||||
int n_type_units;
|
int n_type_units;
|
||||||
|
|
||||||
/* The .debug_types-related CUs (TUs). */
|
/* The .debug_types-related CUs (TUs). */
|
||||||
struct dwarf2_per_cu_data **all_type_units;
|
struct signatured_type **all_type_units;
|
||||||
|
|
||||||
/* A chain of compilation units that are currently read in, so that
|
/* A chain of compilation units that are currently read in, so that
|
||||||
they can be freed later. */
|
they can be freed later. */
|
||||||
|
@ -2072,7 +2072,7 @@ dw2_get_cu (int index)
|
||||||
if (index >= dwarf2_per_objfile->n_comp_units)
|
if (index >= dwarf2_per_objfile->n_comp_units)
|
||||||
{
|
{
|
||||||
index -= dwarf2_per_objfile->n_comp_units;
|
index -= dwarf2_per_objfile->n_comp_units;
|
||||||
return dwarf2_per_objfile->all_type_units[index];
|
return &dwarf2_per_objfile->all_type_units[index]->per_cu;
|
||||||
}
|
}
|
||||||
return dwarf2_per_objfile->all_comp_units[index];
|
return dwarf2_per_objfile->all_comp_units[index];
|
||||||
}
|
}
|
||||||
|
@ -2155,7 +2155,7 @@ create_signatured_type_table_from_index (struct objfile *objfile,
|
||||||
dwarf2_per_objfile->all_type_units
|
dwarf2_per_objfile->all_type_units
|
||||||
= obstack_alloc (&objfile->objfile_obstack,
|
= obstack_alloc (&objfile->objfile_obstack,
|
||||||
dwarf2_per_objfile->n_type_units
|
dwarf2_per_objfile->n_type_units
|
||||||
* sizeof (struct dwarf2_per_cu_data *));
|
* sizeof (struct signatured_type *));
|
||||||
|
|
||||||
sig_types_hash = allocate_signatured_type_table (objfile);
|
sig_types_hash = allocate_signatured_type_table (objfile);
|
||||||
|
|
||||||
|
@ -2186,7 +2186,7 @@ create_signatured_type_table_from_index (struct objfile *objfile,
|
||||||
slot = htab_find_slot (sig_types_hash, sig_type, INSERT);
|
slot = htab_find_slot (sig_types_hash, sig_type, INSERT);
|
||||||
*slot = sig_type;
|
*slot = sig_type;
|
||||||
|
|
||||||
dwarf2_per_objfile->all_type_units[i / 3] = &sig_type->per_cu;
|
dwarf2_per_objfile->all_type_units[i / 3] = sig_type;
|
||||||
}
|
}
|
||||||
|
|
||||||
dwarf2_per_objfile->signatured_types = sig_types_hash;
|
dwarf2_per_objfile->signatured_types = sig_types_hash;
|
||||||
|
@ -3636,9 +3636,9 @@ static int
|
||||||
add_signatured_type_cu_to_table (void **slot, void *datum)
|
add_signatured_type_cu_to_table (void **slot, void *datum)
|
||||||
{
|
{
|
||||||
struct signatured_type *sigt = *slot;
|
struct signatured_type *sigt = *slot;
|
||||||
struct dwarf2_per_cu_data ***datap = datum;
|
struct signatured_type ***datap = datum;
|
||||||
|
|
||||||
**datap = &sigt->per_cu;
|
**datap = sigt;
|
||||||
++*datap;
|
++*datap;
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -3810,7 +3810,7 @@ static int
|
||||||
create_all_type_units (struct objfile *objfile)
|
create_all_type_units (struct objfile *objfile)
|
||||||
{
|
{
|
||||||
htab_t types_htab;
|
htab_t types_htab;
|
||||||
struct dwarf2_per_cu_data **iter;
|
struct signatured_type **iter;
|
||||||
|
|
||||||
types_htab = create_debug_types_hash_table (NULL, dwarf2_per_objfile->types);
|
types_htab = create_debug_types_hash_table (NULL, dwarf2_per_objfile->types);
|
||||||
if (types_htab == NULL)
|
if (types_htab == NULL)
|
||||||
|
@ -3825,7 +3825,7 @@ create_all_type_units (struct objfile *objfile)
|
||||||
dwarf2_per_objfile->all_type_units
|
dwarf2_per_objfile->all_type_units
|
||||||
= obstack_alloc (&objfile->objfile_obstack,
|
= obstack_alloc (&objfile->objfile_obstack,
|
||||||
dwarf2_per_objfile->n_type_units
|
dwarf2_per_objfile->n_type_units
|
||||||
* sizeof (struct dwarf2_per_cu_data *));
|
* sizeof (struct signatured_type *));
|
||||||
iter = &dwarf2_per_objfile->all_type_units[0];
|
iter = &dwarf2_per_objfile->all_type_units[0];
|
||||||
htab_traverse_noresize (types_htab, add_signatured_type_cu_to_table, &iter);
|
htab_traverse_noresize (types_htab, add_signatured_type_cu_to_table, &iter);
|
||||||
gdb_assert (iter - &dwarf2_per_objfile->all_type_units[0]
|
gdb_assert (iter - &dwarf2_per_objfile->all_type_units[0]
|
||||||
|
|
Loading…
Reference in New Issue