* dwarf2read.c (dw2_build_type_unit_groups_reader): Delete.
(dw2_build_type_unit_groups): Delete. All uses updated.
This commit is contained in:
parent
5c04624b7a
commit
848e3e78ef
|
@ -1,5 +1,8 @@
|
||||||
2013-01-17 Doug Evans <dje@google.com>
|
2013-01-17 Doug Evans <dje@google.com>
|
||||||
|
|
||||||
|
* dwarf2read.c (dw2_build_type_unit_groups_reader): Delete.
|
||||||
|
(dw2_build_type_unit_groups): Delete. All uses updated.
|
||||||
|
|
||||||
* symtab.h (struct symbol_search): Add comment.
|
* symtab.h (struct symbol_search): Add comment.
|
||||||
|
|
||||||
2013-01-17 Jan Kratochvil <jan.kratochvil@redhat.com>
|
2013-01-17 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||||
|
|
|
@ -2814,40 +2814,6 @@ dw2_setup (struct objfile *objfile)
|
||||||
gdb_assert (dwarf2_per_objfile);
|
gdb_assert (dwarf2_per_objfile);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Reader function for dw2_build_type_unit_groups. */
|
|
||||||
|
|
||||||
static void
|
|
||||||
dw2_build_type_unit_groups_reader (const struct die_reader_specs *reader,
|
|
||||||
gdb_byte *info_ptr,
|
|
||||||
struct die_info *type_unit_die,
|
|
||||||
int has_children,
|
|
||||||
void *data)
|
|
||||||
{
|
|
||||||
struct dwarf2_cu *cu = reader->cu;
|
|
||||||
struct attribute *attr;
|
|
||||||
struct type_unit_group *tu_group;
|
|
||||||
|
|
||||||
gdb_assert (data == NULL);
|
|
||||||
|
|
||||||
if (! has_children)
|
|
||||||
return;
|
|
||||||
|
|
||||||
attr = dwarf2_attr_no_follow (type_unit_die, DW_AT_stmt_list);
|
|
||||||
/* Call this for its side-effect of creating the associated
|
|
||||||
struct type_unit_group if it doesn't already exist. */
|
|
||||||
tu_group = get_type_unit_group (cu, attr);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Build dwarf2_per_objfile->type_unit_groups.
|
|
||||||
This function may be called multiple times. */
|
|
||||||
|
|
||||||
static void
|
|
||||||
dw2_build_type_unit_groups (void)
|
|
||||||
{
|
|
||||||
if (dwarf2_per_objfile->type_unit_groups == NULL)
|
|
||||||
build_type_unit_groups (dw2_build_type_unit_groups_reader, NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* die_reader_func for dw2_get_file_names. */
|
/* die_reader_func for dw2_get_file_names. */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -3072,10 +3038,10 @@ dw2_map_symtabs_matching_filename (struct objfile *objfile, const char *name,
|
||||||
|
|
||||||
dw2_setup (objfile);
|
dw2_setup (objfile);
|
||||||
|
|
||||||
dw2_build_type_unit_groups ();
|
/* The rule is CUs specify all the files, including those used by
|
||||||
|
any TU, so there's no need to scan TUs here. */
|
||||||
|
|
||||||
for (i = 0; i < (dwarf2_per_objfile->n_comp_units
|
for (i = 0; i < dwarf2_per_objfile->n_comp_units; ++i)
|
||||||
+ dwarf2_per_objfile->n_type_unit_groups); ++i)
|
|
||||||
{
|
{
|
||||||
int j;
|
int j;
|
||||||
struct dwarf2_per_cu_data *per_cu = dw2_get_primary_cu (i);
|
struct dwarf2_per_cu_data *per_cu = dw2_get_primary_cu (i);
|
||||||
|
@ -3528,8 +3494,6 @@ dw2_expand_symtabs_matching
|
||||||
struct cleanup *cleanup;
|
struct cleanup *cleanup;
|
||||||
htab_t visited_found, visited_not_found;
|
htab_t visited_found, visited_not_found;
|
||||||
|
|
||||||
dw2_build_type_unit_groups ();
|
|
||||||
|
|
||||||
visited_found = htab_create_alloc (10,
|
visited_found = htab_create_alloc (10,
|
||||||
htab_hash_pointer, htab_eq_pointer,
|
htab_hash_pointer, htab_eq_pointer,
|
||||||
NULL, xcalloc, xfree);
|
NULL, xcalloc, xfree);
|
||||||
|
@ -3539,8 +3503,10 @@ dw2_expand_symtabs_matching
|
||||||
NULL, xcalloc, xfree);
|
NULL, xcalloc, xfree);
|
||||||
make_cleanup_htab_delete (visited_not_found);
|
make_cleanup_htab_delete (visited_not_found);
|
||||||
|
|
||||||
for (i = 0; i < (dwarf2_per_objfile->n_comp_units
|
/* The rule is CUs specify all the files, including those used by
|
||||||
+ dwarf2_per_objfile->n_type_unit_groups); ++i)
|
any TU, so there's no need to scan TUs here. */
|
||||||
|
|
||||||
|
for (i = 0; i < dwarf2_per_objfile->n_comp_units; ++i)
|
||||||
{
|
{
|
||||||
int j;
|
int j;
|
||||||
struct dwarf2_per_cu_data *per_cu = dw2_get_primary_cu (i);
|
struct dwarf2_per_cu_data *per_cu = dw2_get_primary_cu (i);
|
||||||
|
@ -3713,11 +3679,11 @@ dw2_map_symbol_filenames (struct objfile *objfile, symbol_filename_ftype *fun,
|
||||||
cleanup = make_cleanup_htab_delete (visited);
|
cleanup = make_cleanup_htab_delete (visited);
|
||||||
dw2_setup (objfile);
|
dw2_setup (objfile);
|
||||||
|
|
||||||
dw2_build_type_unit_groups ();
|
/* The rule is CUs specify all the files, including those used by
|
||||||
|
any TU, so there's no need to scan TUs here.
|
||||||
|
We can ignore file names coming from already-expanded CUs. */
|
||||||
|
|
||||||
/* We can ignore file names coming from already-expanded CUs. */
|
for (i = 0; i < dwarf2_per_objfile->n_comp_units; ++i)
|
||||||
for (i = 0; i < (dwarf2_per_objfile->n_comp_units
|
|
||||||
+ dwarf2_per_objfile->n_type_units); ++i)
|
|
||||||
{
|
{
|
||||||
struct dwarf2_per_cu_data *per_cu = dw2_get_cu (i);
|
struct dwarf2_per_cu_data *per_cu = dw2_get_cu (i);
|
||||||
|
|
||||||
|
@ -3730,8 +3696,7 @@ dw2_map_symbol_filenames (struct objfile *objfile, symbol_filename_ftype *fun,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < (dwarf2_per_objfile->n_comp_units
|
for (i = 0; i < dwarf2_per_objfile->n_comp_units; ++i)
|
||||||
+ dwarf2_per_objfile->n_type_unit_groups); ++i)
|
|
||||||
{
|
{
|
||||||
int j;
|
int j;
|
||||||
struct dwarf2_per_cu_data *per_cu = dw2_get_primary_cu (i);
|
struct dwarf2_per_cu_data *per_cu = dw2_get_primary_cu (i);
|
||||||
|
|
Loading…
Reference in New Issue