From: Eli Bendersky Date: Fri, 16 Dec 2011 11:16:27 +0000 (+0200) Subject: fixed previous problem X-Git-Tag: v0.10~27 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c8bc11f38abeb4b28bffb6e79afff7eeb0ee96f7;p=pyelftools.git fixed previous problem --- 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: