diff options
author | Doug Evans <dje@google.com> | 2012-09-12 18:57:40 +0000 |
---|---|---|
committer | Doug Evans <dje@google.com> | 2012-09-12 18:57:40 +0000 |
commit | a1b64ce14eb2871983290c5cddaaa565ccbb6749 (patch) | |
tree | 834722167db8ed807568c3eb578f0933bbee8b0a /gdb | |
parent | 5941debbf2f441f8fba4dea2c7f27c671015a0dd (diff) | |
download | gdb-a1b64ce14eb2871983290c5cddaaa565ccbb6749.zip gdb-a1b64ce14eb2871983290c5cddaaa565ccbb6749.tar.gz gdb-a1b64ce14eb2871983290c5cddaaa565ccbb6749.tar.bz2 |
* dwarf2read.c (dwarf2_read_addr_index): Fix handling the case where
cu == NULL.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/dwarf2read.c | 9 |
2 files changed, 11 insertions, 3 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 037ff29..1e9b76e 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2012-09-12 Doug Evans <dje@google.com> + + * dwarf2read.c (dwarf2_read_addr_index): Fix handling the case where + cu == NULL. + 2012-09-11 Doug Evans <dje@google.com> * dwarf2read.c (dw2_do_expand_symtabs_matching): Don't examine diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index 5541b69..0009ff8 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -13728,8 +13728,9 @@ dwarf2_read_addr_index (struct dwarf2_per_cu_data *per_cu, We don't need to read the entire CU(/TU). We just need the header and top level die. + IWBN to use the aging mechanism to let us lazily later discard the CU. - See however init_cutu_and_read_dies_simple. */ + For now we skip this optimization. */ if (cu != NULL) { @@ -13740,8 +13741,10 @@ dwarf2_read_addr_index (struct dwarf2_per_cu_data *per_cu, { struct dwarf2_read_addr_index_data aidata; - init_cutu_and_read_dies_simple (per_cu, dwarf2_read_addr_index_reader, - &aidata); + /* Note: We can't use init_cutu_and_read_dies_simple here, + we need addr_base. */ + init_cutu_and_read_dies (per_cu, NULL, 0, 0, + dwarf2_read_addr_index_reader, &aidata); addr_base = aidata.addr_base; addr_size = aidata.addr_size; } |