diff options
-rw-r--r-- | gdb/dwarf2/read.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c index e22e09b..80bb292 100644 --- a/gdb/dwarf2/read.c +++ b/gdb/dwarf2/read.c @@ -18283,7 +18283,9 @@ cooked_indexer::index_dies (cutu_reader *reader, const cooked_index_entry *parent_entry, bool fully) { - const gdb_byte *end_ptr = info_ptr + reader->cu->header.get_length (); + const gdb_byte *end_ptr = (reader->buffer + + to_underlying (reader->cu->header.sect_off) + + reader->cu->header.get_length ()); while (info_ptr < end_ptr) { |