* Fix #103
* Fix description for DW_CFA_def_cfa_expression
* Add test file for issue #103
else:
cur_line.pop(instr.args[0], None)
elif name == 'DW_CFA_remember_state':
- line_stack.append(cur_line)
+ line_stack.append(copy.deepcopy(cur_line))
elif name == 'DW_CFA_restore_state':
+ pc = cur_line['pc']
cur_line = line_stack.pop()
+ cur_line['pc'] = pc
# The current line is appended to the table after all instructions
# have ended, if there were instructions.
elif name == 'DW_CFA_def_cfa_expression':
expr_dumper = ExprDumper(entry.structs)
expr_dumper.process_expr(instr.args[0])
- s += ' %s: (%s)\n' % (name, expr_dumper.get_str())
+ # readelf output is missing a colon for DW_CFA_def_cfa_expression
+ s += ' %s (%s)\n' % (name, expr_dumper.get_str())
elif name == 'DW_CFA_expression':
expr_dumper = ExprDumper(entry.structs)
expr_dumper.process_expr(instr.args[1])