diff options
Diffstat (limited to 'binutils')
-rw-r--r-- | binutils/dwarf.c | 13 | ||||
-rw-r--r-- | binutils/testsuite/binutils-all/objdump.WL | 1 |
2 files changed, 10 insertions, 4 deletions
diff --git a/binutils/dwarf.c b/binutils/dwarf.c index 4c2506d..6e4efb7 100644 --- a/binutils/dwarf.c +++ b/binutils/dwarf.c @@ -3503,7 +3503,7 @@ display_debug_lines_decoded (struct dwarf_section *section, switch (ext_op_code) { case DW_LNE_end_sequence: - reset_state_machine (linfo.li_default_is_stmt); + /* Reset stuff after printing this row. */ break; case DW_LNE_set_address: SAFE_BYTE_GET_AND_INC (state_machine_regs.address, @@ -3702,9 +3702,8 @@ display_debug_lines_decoded (struct dwarf_section *section, /* Only Special opcodes, DW_LNS_copy and DW_LNE_end_sequence adds a row to the DWARF address/line matrix. */ - if (xop == -DW_LNE_end_sequence) - putchar ('\n'); - else if ((is_special_opcode) || (xop == DW_LNS_copy)) + if ((is_special_opcode) || (xop == -DW_LNE_end_sequence) + || (xop == DW_LNS_copy)) { const unsigned int MAX_FILENAME_LENGTH = 35; char *fileName; @@ -3773,6 +3772,12 @@ display_debug_lines_decoded (struct dwarf_section *section, putchar ('\n'); state_machine_regs.view++; + if (xop == -DW_LNE_end_sequence) + { + reset_state_machine (linfo.li_default_is_stmt); + putchar ('\n'); + } + free (newFileName); } } diff --git a/binutils/testsuite/binutils-all/objdump.WL b/binutils/testsuite/binutils-all/objdump.WL index 990c680..7c5a591 100644 --- a/binutils/testsuite/binutils-all/objdump.WL +++ b/binutils/testsuite/binutils-all/objdump.WL @@ -12,4 +12,5 @@ file1\.c 1 .* \./dw2-decodedline\.c:\[\+\+\] dw2-decodedline\.c 2 .* +dw2-decodedline\.c 2 .* |