* dwarf2read.c (create_debug_types_hash_table): Don't allocate the
types hash table until we know we need it.
This commit is contained in:
parent
f652bce2ee
commit
0349ea227a
|
@ -1,5 +1,8 @@
|
||||||
2013-03-28 Doug Evans <dje@google.com>
|
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
|
* dwarf2read.c (create_addrmap_from_index): Complain about bad CU
|
||||||
index numbers.
|
index numbers.
|
||||||
|
|
||||||
|
|
|
@ -4251,14 +4251,6 @@ create_debug_types_hash_table (struct dwo_file *dwo_file,
|
||||||
else
|
else
|
||||||
abbrev_section = &dwarf2_per_objfile->abbrev;
|
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
|
/* 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
|
because we don't need to read any dies: the signature is in the
|
||||||
header. */
|
header. */
|
||||||
|
@ -4295,6 +4287,14 @@ create_debug_types_hash_table (struct dwo_file *dwo_file,
|
||||||
continue;
|
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)
|
if (dwo_file)
|
||||||
{
|
{
|
||||||
sig_type = NULL;
|
sig_type = NULL;
|
||||||
|
|
Loading…
Reference in New Issue