diff options
author | Tom Tromey <tromey@redhat.com> | 2013-05-13 16:56:09 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2013-05-13 16:56:09 +0000 |
commit | d62bfeaff54f9f5307bf933f21a0843b8935ca34 (patch) | |
tree | 4e10904c75ad7de5cb4f99354daa5d497cab8b1b | |
parent | ac1ca910d74d5bd1d2800cb190659c9e3043a904 (diff) | |
download | gdb-d62bfeaff54f9f5307bf933f21a0843b8935ca34.zip gdb-d62bfeaff54f9f5307bf933f21a0843b8935ca34.tar.gz gdb-d62bfeaff54f9f5307bf933f21a0843b8935ca34.tar.bz2 |
PR gdb/15538:
* dwarf2read.c (dwarf2_record_block_ranges): Ensure that the
ranges section has been read.
-rw-r--r-- | gdb/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/dwarf2read.c | 5 |
2 files changed, 9 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index deefda9..e9c923d 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,11 @@ 2013-05-13 Tom Tromey <tromey@redhat.com> + PR gdb/15538: + * dwarf2read.c (dwarf2_record_block_ranges): Ensure that the + ranges section has been read. + +2013-05-13 Tom Tromey <tromey@redhat.com> + PR exp/15364: * eval.c (evaluate_subexp_standard) <STRUCTOP_STRUCT, STRUCTOP_PTR>: Return a not_lval value for diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index 2a5acf0..ed5aea3 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -10493,7 +10493,7 @@ dwarf2_record_block_ranges (struct die_info *die, struct block *block, address range list in the .debug_ranges section. */ unsigned long offset = (DW_UNSND (attr) + (need_ranges_base ? cu->ranges_base : 0)); - const gdb_byte *buffer = dwarf2_per_objfile->ranges.buffer + offset; + const gdb_byte *buffer; /* For some target architectures, but not others, the read_address function sign-extends the addresses it returns. @@ -10512,7 +10512,7 @@ dwarf2_record_block_ranges (struct die_info *die, struct block *block, CORE_ADDR base = cu->base_address; int base_known = cu->base_known; - gdb_assert (dwarf2_per_objfile->ranges.readin); + dwarf2_read_section (objfile, &dwarf2_per_objfile->ranges); if (offset >= dwarf2_per_objfile->ranges.size) { complaint (&symfile_complaints, @@ -10520,6 +10520,7 @@ dwarf2_record_block_ranges (struct die_info *die, struct block *block, offset); return; } + buffer = dwarf2_per_objfile->ranges.buffer + offset; for (;;) { |