]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
LVU: output end of sequence row
authorAlexandre Oliva <aoliva@redhat.com>
Wed, 26 Apr 2017 19:26:17 +0000 (16:26 -0300)
committerAlexandre Oliva <aoliva@redhat.com>
Wed, 26 Apr 2017 19:26:17 +0000 (16:26 -0300)
binutils/dwarf.c
binutils/testsuite/binutils-all/objdump.WL

index 4c2506d1ea433df7f9702e8e8dd19c3dc94c37c4..6e4efb711f560b626bed546e4db77f301fd2edd0 100644 (file)
@@ -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);
            }
        }
index 990c68056072cb8d0b60f7860906726b5a285995..7c5a591a6ddeb7f729c696aa16ba664e3b5f0dea 100644 (file)
@@ -12,4 +12,5 @@ file1\.c                                        1 .*
 
 \./dw2-decodedline\.c:\[\+\+\]
 dw2-decodedline\.c                              2 .*
+dw2-decodedline\.c                              2 .*