aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2read.c
diff options
context:
space:
mode:
authorDoug Evans <xdje42@gmail.com>2014-12-17 00:00:14 -0800
committerDoug Evans <xdje42@gmail.com>2014-12-17 00:00:14 -0800
commit0ab9ce852ba65ef77cfc1fc82d1c48d03152f868 (patch)
tree394748921a97d73623ca72e4ce6d7277acbf8af1 /gdb/dwarf2read.c
parentb6615d1086eb357e62ec2db85b48d1d1c75157bc (diff)
downloadgdb-0ab9ce852ba65ef77cfc1fc82d1c48d03152f868.zip
gdb-0ab9ce852ba65ef77cfc1fc82d1c48d03152f868.tar.gz
gdb-0ab9ce852ba65ef77cfc1fc82d1c48d03152f868.tar.bz2
Make buildsym set-up/tear-down more consistent, and document it.
gdb/ChangeLog: * buildsym.c: Add comments describing how the buildsym machinery is used by the various file formats. (really_free_pendings): Enhance function comment. See pending_macros to NULL. Simplify resetting pending_addrmap. Call free_buildsym_compunit. (free_buildsym_compunit): Set current_subfile to NULL. (prepare_for_building): New function. (start_symtab): Call it. Remove call to set_last_source_file. (restart_symtab): New arg "cust". All callers updated. Simplify, call prepare_for_building. Re-initialize buildsym_compunit. (reset_symtab_globals): Enhance function comment. Set local_symbols, file_symbols, global_symbols to NULL. Set pending_macros to NULL. Simplify resetting pending_addrmap. Call free_buildysym_compunit. (end_symtab_without_blockvector): Delete. All callers updated. (end_symtab_with_blockvector): Remove redundant call to free_buildsym_compunit. (augment_type_symtab): Remove arg "cust". All callers updated. (buildsym_init): Remove resetting of free_pendings, file_symbols, global_symbols, pending_blocks, pending_macros. Instead make handling consistent with pending_addrmap: Assert value was reset at end of previous symtab building. Initialize context_stack here.
Diffstat (limited to 'gdb/dwarf2read.c')
-rw-r--r--gdb/dwarf2read.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index e36af5a..0e8f937 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -8093,7 +8093,7 @@ process_full_type_unit (struct dwarf2_per_cu_data *per_cu,
}
else
{
- augment_type_symtab (sig_type->type_unit_group->compunit_symtab);
+ augment_type_symtab ();
cust = sig_type->type_unit_group->compunit_symtab;
}
@@ -9149,7 +9149,7 @@ setup_type_unit_groups (struct die_info *die, struct dwarf2_cu *cu)
else
{
gdb_assert (tu_group->symtabs == NULL);
- restart_symtab (0);
+ restart_symtab (tu_group->compunit_symtab, "", 0);
}
/* Note: The compunit symtab will get allocated at the end. */
return;
@@ -9190,7 +9190,7 @@ setup_type_unit_groups (struct die_info *die, struct dwarf2_cu *cu)
}
else
{
- restart_symtab (0);
+ restart_symtab (tu_group->compunit_symtab, "", 0);
for (i = 0; i < lh->num_file_names; ++i)
{