aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorDoug Evans <dje@google.com>2013-01-17 23:21:41 +0000
committerDoug Evans <dje@google.com>2013-01-17 23:21:41 +0000
commit848e3e78efc8fadb5ae9c101153b4282174ab509 (patch)
tree6fb18151b3ba15909efbf1c94974f7a05c43fcc2 /gdb
parent5c04624b7ad217c70e13ac9ae11069f008179d50 (diff)
downloadgdb-848e3e78efc8fadb5ae9c101153b4282174ab509.zip
gdb-848e3e78efc8fadb5ae9c101153b4282174ab509.tar.gz
gdb-848e3e78efc8fadb5ae9c101153b4282174ab509.tar.bz2
* dwarf2read.c (dw2_build_type_unit_groups_reader): Delete.
(dw2_build_type_unit_groups): Delete. All uses updated.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog3
-rw-r--r--gdb/dwarf2read.c59
2 files changed, 15 insertions, 47 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index fbe7759..2831fd4 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,8 @@
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.
2013-01-17 Jan Kratochvil <jan.kratochvil@redhat.com>
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 519eee8..b43cf5b 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -2814,40 +2814,6 @@ dw2_setup (struct objfile *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. */
static void
@@ -3072,10 +3038,10 @@ dw2_map_symtabs_matching_filename (struct objfile *objfile, const char *name,
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
- + dwarf2_per_objfile->n_type_unit_groups); ++i)
+ for (i = 0; i < dwarf2_per_objfile->n_comp_units; ++i)
{
int j;
struct dwarf2_per_cu_data *per_cu = dw2_get_primary_cu (i);
@@ -3528,8 +3494,6 @@ dw2_expand_symtabs_matching
struct cleanup *cleanup;
htab_t visited_found, visited_not_found;
- dw2_build_type_unit_groups ();
-
visited_found = htab_create_alloc (10,
htab_hash_pointer, htab_eq_pointer,
NULL, xcalloc, xfree);
@@ -3539,8 +3503,10 @@ dw2_expand_symtabs_matching
NULL, xcalloc, xfree);
make_cleanup_htab_delete (visited_not_found);
- for (i = 0; i < (dwarf2_per_objfile->n_comp_units
- + dwarf2_per_objfile->n_type_unit_groups); ++i)
+ /* 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; ++i)
{
int j;
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);
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
- + dwarf2_per_objfile->n_type_units); ++i)
+ for (i = 0; i < dwarf2_per_objfile->n_comp_units; ++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
- + dwarf2_per_objfile->n_type_unit_groups); ++i)
+ for (i = 0; i < dwarf2_per_objfile->n_comp_units; ++i)
{
int j;
struct dwarf2_per_cu_data *per_cu = dw2_get_primary_cu (i);