# Eli Bendersky (eliben@gmail.com)
# This code is in the public domain
#-------------------------------------------------------------------------------
+import os
import copy
from collections import namedtuple
self.structs.Dwarf_lineprog_file_entry, self.stream)
self['file_entry'].append(operand)
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)
else: # 0 < opcode < opcode_base
# Standard opcode
if opcode == DW_LNS_copy:
self.stream)
state.line += operand
elif opcode == DW_LNS_set_file:
- operand = struct_parse(self.structs.Dwarf_sleb128(''),
+ operand = struct_parse(self.structs.Dwarf_uleb128(''),
self.stream)
state.file = operand
add_entry_old_state(opcode, [operand])
elif 'of the .debug_frame section' in line:
filter_out = False
if not filter_out:
- yield line
+ if not line.startswith('unknown: length'):
+ yield line
lines1 = prepare_lines(s1)
lines2 = prepare_lines(s2)