diff options
author | Doug Evans <dje@google.com> | 2013-03-29 00:35:20 +0000 |
---|---|---|
committer | Doug Evans <dje@google.com> | 2013-03-29 00:35:20 +0000 |
commit | 0349ea227a93db57acba96cba1a3556742e1bddf (patch) | |
tree | f601ee506ddaf73b6134f0e6b6d2a36f71936850 /gdb | |
parent | f652bce2eecba0f090550c462a356a65a379fada (diff) | |
download | gdb-0349ea227a93db57acba96cba1a3556742e1bddf.zip gdb-0349ea227a93db57acba96cba1a3556742e1bddf.tar.gz gdb-0349ea227a93db57acba96cba1a3556742e1bddf.tar.bz2 |
* dwarf2read.c (create_debug_types_hash_table): Don't allocate the
types hash table until we know we need it.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 3 | ||||
-rw-r--r-- | gdb/dwarf2read.c | 16 |
2 files changed, 11 insertions, 8 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 2838b3c..9dbcc16 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,8 @@ 2013-03-28 Doug Evans <dje@google.com> + * dwarf2read.c (create_debug_types_hash_table): Don't allocate the + types hash table until we know we need it. + * dwarf2read.c (create_addrmap_from_index): Complain about bad CU index numbers. diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index a3e68cd..70c5093 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -4251,14 +4251,6 @@ create_debug_types_hash_table (struct dwo_file *dwo_file, else abbrev_section = &dwarf2_per_objfile->abbrev; - if (types_htab == NULL) - { - if (dwo_file) - types_htab = allocate_dwo_unit_table (objfile); - else - types_htab = allocate_signatured_type_table (objfile); - } - /* We don't use init_cutu_and_read_dies_simple, or some such, here because we don't need to read any dies: the signature is in the header. */ @@ -4295,6 +4287,14 @@ create_debug_types_hash_table (struct dwo_file *dwo_file, continue; } + if (types_htab == NULL) + { + if (dwo_file) + types_htab = allocate_dwo_unit_table (objfile); + else + types_htab = allocate_signatured_type_table (objfile); + } + if (dwo_file) { sig_type = NULL; |