From c8bc11f38abeb4b28bffb6e79afff7eeb0ee96f7 Mon Sep 17 00:00:00 2001 From: Eli Bendersky Date: Fri, 16 Dec 2011 13:16:27 +0200 Subject: [PATCH] fixed previous problem --- elftools/dwarf/lineprogram.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/elftools/dwarf/lineprogram.py b/elftools/dwarf/lineprogram.py index 45bca2d..4d9c7b0 100644 --- a/elftools/dwarf/lineprogram.py +++ b/elftools/dwarf/lineprogram.py @@ -184,8 +184,10 @@ class LineProgram(object): add_entry_old_state(ex_opcode, [operand], is_extended=True) else: # Unknown, but need to roll forward the stream because the - # length is specified - self.stream.seek(inst_len, os.SEEK_CUR) + # length is specified. Seek forward inst_len - 1 because + # we've already read the extended opcode, which takes part + # in the length. + self.stream.seek(inst_len - 1, os.SEEK_CUR) else: # 0 < opcode < opcode_base # Standard opcode if opcode == DW_LNS_copy: -- 2.30.2