[PATCH] binutils --dwarf=decodedline: Add display of is_stmt flag

John Darrington john@darrington.wattle.id.au
Wed Sep 19 18:31:00 GMT 2018


binutils/
    * dwarf.c (display_debug_lines_decoded): Add display of is_stmt.
    * testsuite/binutils-all/dw5.W: Deal with the consequences.
    * testsuite/binutils-all/objdump.WL: Deal with the consequences.
---
 binutils/dwarf.c                           | 11 ++++++++---
 binutils/testsuite/binutils-all/dw5.W      | 14 +++++++-------
 binutils/testsuite/binutils-all/objdump.WL |  2 +-
 3 files changed, 16 insertions(+), 11 deletions(-)

diff --git a/binutils/dwarf.c b/binutils/dwarf.c
index ad961b8c9d..a85a9ab2e3 100644
--- a/binutils/dwarf.c
+++ b/binutils/dwarf.c
@@ -4357,7 +4357,7 @@ display_debug_lines_decoded (struct dwarf_section *  section,
 		printf ("%s:\n", file_table[0].name);
 	    }
 
-	  printf (_("File name                            Line number    Starting address    View\n"));
+	  printf (_("File name                            Line number    Starting address    View    Stmt\n"));
 	  saved_linfo = linfo;
 	}
 
@@ -4695,9 +4695,14 @@ display_debug_lines_decoded (struct dwarf_section *  section,
 		}
 
 	      if (state_machine_regs.view)
-		printf ("  %6u\n", state_machine_regs.view);
+		printf ("  %6u", state_machine_regs.view);
 	      else
-		putchar ('\n');
+		printf ("        ");
+
+	      if (state_machine_regs.is_stmt)
+		printf ("       x");
+
+	      putchar ('\n');
 	      state_machine_regs.view++;
 
 	      if (xop == -DW_LNE_end_sequence)
diff --git a/binutils/testsuite/binutils-all/dw5.W b/binutils/testsuite/binutils-all/dw5.W
index 8ea0b28ba5..74c02566ee 100644
--- a/binutils/testsuite/binutils-all/dw5.W
+++ b/binutils/testsuite/binutils-all/dw5.W
@@ -345,13 +345,13 @@ Raw dump of debug contents of section .debug_line:
 Contents of the .debug_line section:
 
 CU: ./main.c:
-File name                            Line number    Starting address    View
-main.c                                         6              0x1234
-main.c                                         6             0x12346
-main.c                                         6              0x1234
+File name                            Line number    Starting address    View    Stmt
+main.c                                         6              0x1234               x
+main.c                                         6             0x12346               x
+main.c                                         6              0x1234               x
 
-main.c                                         5              0x1234
-main.c                                         5              0x1234
-main.c                                         5              0x1234
+main.c                                         5              0x1234               x
+main.c                                         5              0x1234               x
+main.c                                         5              0x1234               x
 
 
diff --git a/binutils/testsuite/binutils-all/objdump.WL b/binutils/testsuite/binutils-all/objdump.WL
index c8bac334e5..954fb3e67f 100644
--- a/binutils/testsuite/binutils-all/objdump.WL
+++ b/binutils/testsuite/binutils-all/objdump.WL
@@ -4,7 +4,7 @@
 Contents of the \.debug_line section:
 
 CU: \./dw2-decodedline\.c:
-File name                            Line number    Starting address    View
+File name                            Line number    Starting address    View    Stmt
 
 directory/file1\.c:
 file1\.c                                        1 .*
-- 
2.11.0



More information about the Binutils mailing list