aboutsummaryrefslogtreecommitdiff
path: root/bfd/dwarf2.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2021-01-23 18:17:37 -0800
committerH.J. Lu <hjl.tools@gmail.com>2021-01-23 18:17:48 -0800
commit18454c151f5824564130ba626bd90e9de30444ef (patch)
tree4a4d1c9d4932a2e53d7dc9a5187bbc6c1e34b51a /bfd/dwarf2.c
parent9f7f6cb8d2cf1f356aab2a260baaa537de24d00b (diff)
downloadgdb-18454c151f5824564130ba626bd90e9de30444ef.zip
gdb-18454c151f5824564130ba626bd90e9de30444ef.tar.gz
gdb-18454c151f5824564130ba626bd90e9de30444ef.tar.bz2
DWARF-5: Fix parsing DWARF-5 line number tables
Advance rngs_ptr when parsing DW_RLE_offset_pair, which was missing in commit c3757b583d2448a5996e83e374fb96ac7938da35 Author: Mark Wielaard <mark@klomp.org> Date: Tue Aug 25 15:33:00 2020 +0100 Fix the linker's handling of DWARF-5 line number tables. PR binutils/27231 * dwarf2.c (read_rnglists): Advance rngs_ptr after _bfd_safe_read_leb128 when parsing DW_RLE_offset_pair.
Diffstat (limited to 'bfd/dwarf2.c')
-rw-r--r--bfd/dwarf2.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/bfd/dwarf2.c b/bfd/dwarf2.c
index d1770ae..292d60c 100644
--- a/bfd/dwarf2.c
+++ b/bfd/dwarf2.c
@@ -3265,9 +3265,11 @@ read_rnglists (struct comp_unit *unit, struct arange *arange,
low_pc = base_address;
low_pc += _bfd_safe_read_leb128 (abfd, rngs_ptr, &bytes_read,
FALSE, rngs_end);
+ rngs_ptr += bytes_read;
high_pc = base_address;
high_pc += _bfd_safe_read_leb128 (abfd, rngs_ptr, &bytes_read,
FALSE, rngs_end);
+ rngs_ptr += bytes_read;
break;
case DW_RLE_start_end: