public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 1/2] gdb/testsuite/dwarf: remove two unused variables
@ 2022-03-24 16:18 Simon Marchi
  2022-03-24 16:18 ` [PATCH 2/2] gdb/testsuite/dwarf: simplify line number program syntax Simon Marchi
  0 siblings, 1 reply; 3+ messages in thread
From: Simon Marchi @ 2022-03-24 16:18 UTC (permalink / raw)
  To: gdb-patches

From: Simon Marchi <simon.marchi@polymtl.ca>

These variables seem to be unused, remove them.

Change-Id: I7d613d9d35735930ee78b2c348943c73a702afbb
---
 gdb/testsuite/lib/dwarf.exp | 19 -------------------
 1 file changed, 19 deletions(-)

diff --git a/gdb/testsuite/lib/dwarf.exp b/gdb/testsuite/lib/dwarf.exp
index 6e8b1ccbe7f3..f8211c3cc1a2 100644
--- a/gdb/testsuite/lib/dwarf.exp
+++ b/gdb/testsuite/lib/dwarf.exp
@@ -569,12 +569,6 @@ namespace eval Dwarf {
     # Current .debug_line unit count.
     variable _line_count
 
-    # Whether a file_name entry was seen.
-    variable _line_saw_file
-
-    # Whether a line table program has been seen.
-    variable _line_saw_program
-
     # A Label for line table header generation.
     variable _line_header_end_label
 
@@ -2178,11 +2172,9 @@ namespace eval Dwarf {
 
     proc lines {options label body} {
 	variable _line_count
-	variable _line_saw_file
 	variable _line_include_dirs
 	variable _line_file_names
 	variable _line_header_finalized
-	variable _line_saw_program
 	variable _line_header_end_label
 	variable _line_unit_version
 	variable _line_is_64
@@ -2192,8 +2184,6 @@ namespace eval Dwarf {
 	set _line_is_64 0
 	set _line_unit_version 4
 	set _unit_addr_size default
-	set _line_saw_program 0
-	set _line_saw_file 0
 	set _line_include_dirs {}
 	set _line_file_names {}
 	set _line_header_finalized 0
@@ -2295,9 +2285,6 @@ namespace eval Dwarf {
 	proc file_name {filename diridx} {
 	    variable _line_file_names
 	    lappend _line_file_names $filename $diridx
-
-	    variable _line_saw_file 1
-	    set _line_saw_file 1
 	}
 
 	proc _line_finalize_header {} {
@@ -2424,11 +2411,9 @@ namespace eval Dwarf {
 	}
 
 	proc program {statements} {
-	    variable _line_saw_program
 	    variable _line_header_end_label
 	    variable _line
 
-	    set _line_saw_program 1
 
 	    set _line 1
 
@@ -2868,8 +2853,6 @@ namespace eval Dwarf {
 	variable _strings
 	variable _cu_count
 	variable _line_count
-	variable _line_saw_file
-	variable _line_saw_program
 	variable _line_header_end_label
 	variable _debug_ranges_64_bit
 	variable _debug_addr_index
@@ -2887,8 +2870,6 @@ namespace eval Dwarf {
 	_empty_array _strings
 
 	set _line_count 0
-	set _line_saw_file 0
-	set _line_saw_program 0
 	set _debug_ranges_64_bit [is_64_target]
 
 	set _debug_addr_index 0
-- 
2.26.2


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 2/2] gdb/testsuite/dwarf: simplify line number program syntax
  2022-03-24 16:18 [PATCH 1/2] gdb/testsuite/dwarf: remove two unused variables Simon Marchi
@ 2022-03-24 16:18 ` Simon Marchi
  0 siblings, 0 replies; 3+ messages in thread
From: Simon Marchi @ 2022-03-24 16:18 UTC (permalink / raw)
  To: gdb-patches

From: Simon Marchi <simon.marchi@polymtl.ca>

By calling `uplevel $body` in the program proc (a pattern we use at many
places), we can get rid of curly braces around each line number program
directive.  That seems like a nice small improvement to me.

Change-Id: Ib327edcbffbd4c23a08614adee56c12ea25ebc0b
---
 gdb/testsuite/gdb.dwarf2/dw2-bad-elf.exp      |  28 +--
 .../gdb.dwarf2/dw2-disasm-over-non-stmt.exp   |  56 +++---
 .../gdb.dwarf2/dw2-inline-header-1.exp        |  70 ++++----
 .../gdb.dwarf2/dw2-inline-header-2.exp        |  66 +++----
 .../gdb.dwarf2/dw2-inline-header-3.exp        |  66 +++----
 .../gdb.dwarf2/dw2-inline-many-frames.exp     | 168 +++++++++---------
 .../gdb.dwarf2/dw2-inline-small-func.exp      |  34 ++--
 .../gdb.dwarf2/dw2-inline-stepping.exp        |  46 ++---
 .../dw2-inline-with-lexical-scope.exp         |  28 +--
 gdb/testsuite/gdb.dwarf2/dw2-is-stmt-2.exp    | 156 ++++++++--------
 gdb/testsuite/gdb.dwarf2/dw2-is-stmt.exp      |  58 +++---
 .../gdb.dwarf2/dw2-line-number-zero.exp       |  60 +++----
 gdb/testsuite/gdb.dwarf2/dw2-lines.exp        |  28 +--
 .../dw2-out-of-range-end-of-seq.exp           |  20 +--
 gdb/testsuite/gdb.dwarf2/dw2-ranges-base.exp  |  46 ++---
 gdb/testsuite/gdb.dwarf2/dw2-ranges-func.exp  | 120 ++++++-------
 .../dw2-step-out-of-function-no-stmt.exp      |  36 ++--
 .../gdb.dwarf2/dw2-symtab-includes-lookup.exp |   2 +-
 .../gdb.dwarf2/dw2-symtab-includes.exp        |   2 +-
 .../gdb.dwarf2/dw2-vendor-extended-opcode.exp |  14 +-
 gdb/testsuite/gdb.dwarf2/fission-multi-cu.exp |  64 +++----
 .../gdb.dwarf2/imported-unit-bp.exp.tcl       |  48 ++---
 .../locexpr-data-member-location.exp          |  50 +++---
 gdb/testsuite/lib/dwarf.exp                   |   6 +-
 24 files changed, 635 insertions(+), 637 deletions(-)

diff --git a/gdb/testsuite/gdb.dwarf2/dw2-bad-elf.exp b/gdb/testsuite/gdb.dwarf2/dw2-bad-elf.exp
index 0adff2868eb0..7b71ed1155ef 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-bad-elf.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-bad-elf.exp
@@ -127,13 +127,13 @@ Dwarf::assemble $asm_file {
 
 	# Line data doens't need to be correct, just present.
 	program {
-	    {DW_LNE_set_address [lindex $main_result 0]}
-	    {DW_LNS_advance_line 10}
-	    {DW_LNS_copy}
-	    {DW_LNS_advance_pc [lindex $main_result 1]}
-	    {DW_LNS_advance_line 19}
-	    {DW_LNS_copy}
-	    {DW_LNE_end_sequence}
+	    DW_LNE_set_address [lindex $main_result 0]
+	    DW_LNS_advance_line 10
+	    DW_LNS_copy
+	    DW_LNS_advance_pc [lindex $main_result 1]
+	    DW_LNS_advance_line 19
+	    DW_LNS_copy
+	    DW_LNE_end_sequence
 	}
     }
 
@@ -143,13 +143,13 @@ Dwarf::assemble $asm_file {
 
 	# Line data doens't need to be correct, just present.
 	program {
-	    {DW_LNE_set_address some_func}
-	    {DW_LNS_advance_line 5}
-	    {DW_LNS_copy}
-	    {DW_LNS_advance_pc 64}
-	    {DW_LNS_advance_line 8}
-	    {DW_LNS_copy}
-	    {DW_LNE_end_sequence}
+	    DW_LNE_set_address some_func
+	    DW_LNS_advance_line 5
+	    DW_LNS_copy
+	    DW_LNS_advance_pc 64
+	    DW_LNS_advance_line 8
+	    DW_LNS_copy
+	    DW_LNE_end_sequence
 	}
     }
 }
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-disasm-over-non-stmt.exp b/gdb/testsuite/gdb.dwarf2/dw2-disasm-over-non-stmt.exp
index ea679c3adc18..5311dd61a4c7 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-disasm-over-non-stmt.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-disasm-over-non-stmt.exp
@@ -68,34 +68,34 @@ Dwarf::assemble $asm_file {
 	file_name "$srcfile3" 1
 
 	program {
-	    {DW_LNE_set_address $main_start}
-	    {DW_LNS_advance_line 15}
-	    {DW_LNS_copy}
-
-	    {DW_LNE_set_address line_label_2}
-	    {DW_LNS_negate_stmt}
-	    {DW_LNS_copy}
-
-	    {DW_LNE_set_address line_label_3}
-	    {DW_LNS_advance_line 1}
-	    {DW_LNS_copy}
-
-	    {DW_LNE_set_address line_label_4}
-	    {DW_LNS_negate_stmt}
-	    {DW_LNS_copy}
-
-	    {DW_LNE_set_address line_label_5}
-	    {DW_LNS_negate_stmt}
-	    {DW_LNS_copy}
-
-	    {DW_LNE_set_address line_label_6}
-	    {DW_LNS_advance_line 1}
-	    {DW_LNS_negate_stmt}
-	    {DW_LNS_copy}
-
-	    {DW_LNE_set_address $main_end}
-	    {DW_LNS_copy}
-	    {DW_LNE_end_sequence}
+	    DW_LNE_set_address $main_start
+	    DW_LNS_advance_line 15
+	    DW_LNS_copy
+
+	    DW_LNE_set_address line_label_2
+	    DW_LNS_negate_stmt
+	    DW_LNS_copy
+
+	    DW_LNE_set_address line_label_3
+	    DW_LNS_advance_line 1
+	    DW_LNS_copy
+
+	    DW_LNE_set_address line_label_4
+	    DW_LNS_negate_stmt
+	    DW_LNS_copy
+
+	    DW_LNE_set_address line_label_5
+	    DW_LNS_negate_stmt
+	    DW_LNS_copy
+
+	    DW_LNE_set_address line_label_6
+	    DW_LNS_advance_line 1
+	    DW_LNS_negate_stmt
+	    DW_LNS_copy
+
+	    DW_LNE_set_address $main_end
+	    DW_LNS_copy
+	    DW_LNE_end_sequence
 	}
     }
 }
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-header-1.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-header-1.exp
index 4ee7433f249d..19f06adef7b2 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-inline-header-1.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-header-1.exp
@@ -119,41 +119,41 @@ proc do_test { start_label func_name tag } {
 	    file_name "$srcfile4" 1
 
 	    program {
-		{DW_LNE_set_address line_label_1}
-		{DW_LNS_advance_line 15}
-		{DW_LNS_copy}
-
-		{DW_LNE_set_address line_label_2}
-		{DW_LNS_advance_line 1}
-		{DW_LNS_copy}
-
-		{DW_LNS_set_file 2}
-		{DW_LNE_set_address line_label_3}
-		{DW_LNS_advance_line 4}
-		{DW_LNS_copy}
-
-		{DW_LNE_set_address line_label_4}
-		{DW_LNS_advance_line 1}
-		{DW_LNS_copy}
-
-		{DW_LNS_advance_line -4}
-		{DW_LNS_set_file 1}
-		{DW_LNS_negate_stmt}
-		{DW_LNS_copy}
-
-		{DW_LNS_set_file 2}
-		{DW_LNE_set_address line_label_5}
-		{DW_LNS_advance_line 5}
-		{DW_LNS_copy}
-
-		{DW_LNS_negate_stmt}
-		{DW_LNS_set_file 1}
-		{DW_LNE_set_address line_label_6}
-		{DW_LNS_advance_line 1}
-		{DW_LNS_copy}
-
-		{DW_LNE_set_address line_label_7}
-		{DW_LNE_end_sequence}
+		DW_LNE_set_address line_label_1
+		DW_LNS_advance_line 15
+		DW_LNS_copy
+
+		DW_LNE_set_address line_label_2
+		DW_LNS_advance_line 1
+		DW_LNS_copy
+
+		DW_LNS_set_file 2
+		DW_LNE_set_address line_label_3
+		DW_LNS_advance_line 4
+		DW_LNS_copy
+
+		DW_LNE_set_address line_label_4
+		DW_LNS_advance_line 1
+		DW_LNS_copy
+
+		DW_LNS_advance_line -4
+		DW_LNS_set_file 1
+		DW_LNS_negate_stmt
+		DW_LNS_copy
+
+		DW_LNS_set_file 2
+		DW_LNE_set_address line_label_5
+		DW_LNS_advance_line 5
+		DW_LNS_copy
+
+		DW_LNS_negate_stmt
+		DW_LNS_set_file 1
+		DW_LNE_set_address line_label_6
+		DW_LNS_advance_line 1
+		DW_LNS_copy
+
+		DW_LNE_set_address line_label_7
+		DW_LNE_end_sequence
 	    }
 	}
     }
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-header-2.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-header-2.exp
index a8014489d9d3..198f35539979 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-inline-header-2.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-header-2.exp
@@ -109,39 +109,39 @@ Dwarf::assemble $asm_file {
 	file_name "$srcfile4" 1
 
 	program {
-	    {DW_LNE_set_address line_label_1}
-	    {DW_LNS_advance_line 15}
-	    {DW_LNS_copy}
-
-	    {DW_LNE_set_address line_label_2}
-	    {DW_LNS_advance_line 1}
-	    {DW_LNS_copy}
-
-	    {DW_LNS_set_file 2}
-	    {DW_LNE_set_address line_label_3}
-	    {DW_LNS_advance_line 4}
-	    {DW_LNS_copy}
-
-	    {DW_LNE_set_address line_label_4}
-	    {DW_LNS_advance_line 1}
-	    {DW_LNS_copy}
-
-	    {DW_LNS_advance_line -4}
-	    {DW_LNS_set_file 1}
-	    {DW_LNS_negate_stmt}
-	    {DW_LNS_copy}
-
-	    {DW_LNE_set_address line_label_5}
-	    {DW_LNS_advance_line 1}
-	    {DW_LNS_negate_stmt}
-	    {DW_LNS_copy}
-
-	    {DW_LNE_set_address line_label_6}
-	    {DW_LNS_advance_line 1}
-	    {DW_LNS_copy}
-
-	    {DW_LNE_set_address line_label_7}
-	    {DW_LNE_end_sequence}
+	    DW_LNE_set_address line_label_1
+	    DW_LNS_advance_line 15
+	    DW_LNS_copy
+
+	    DW_LNE_set_address line_label_2
+	    DW_LNS_advance_line 1
+	    DW_LNS_copy
+
+	    DW_LNS_set_file 2
+	    DW_LNE_set_address line_label_3
+	    DW_LNS_advance_line 4
+	    DW_LNS_copy
+
+	    DW_LNE_set_address line_label_4
+	    DW_LNS_advance_line 1
+	    DW_LNS_copy
+
+	    DW_LNS_advance_line -4
+	    DW_LNS_set_file 1
+	    DW_LNS_negate_stmt
+	    DW_LNS_copy
+
+	    DW_LNE_set_address line_label_5
+	    DW_LNS_advance_line 1
+	    DW_LNS_negate_stmt
+	    DW_LNS_copy
+
+	    DW_LNE_set_address line_label_6
+	    DW_LNS_advance_line 1
+	    DW_LNS_copy
+
+	    DW_LNE_set_address line_label_7
+	    DW_LNE_end_sequence
 	}
     }
 }
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-header-3.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-header-3.exp
index 8f36e4f52195..68261aa78b0a 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-inline-header-3.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-header-3.exp
@@ -98,39 +98,39 @@ Dwarf::assemble $asm_file {
 	file_name "$srcfile4" 1
 
 	program {
-	    {DW_LNE_set_address line_label_1}
-	    {DW_LNS_advance_line 15}
-	    {DW_LNS_copy}
-
-	    {DW_LNE_set_address line_label_2}
-	    {DW_LNS_advance_line 1}
-	    {DW_LNS_copy}
-
-	    {DW_LNS_set_file 2}
-	    {DW_LNE_set_address line_label_3}
-	    {DW_LNS_advance_line 4}
-	    {DW_LNS_copy}
-
-	    {DW_LNE_set_address line_label_4}
-	    {DW_LNS_advance_line 1}
-	    {DW_LNS_copy}
-
-	    {DW_LNS_advance_line -4}
-	    {DW_LNS_set_file 1}
-	    {DW_LNS_negate_stmt}
-	    {DW_LNS_copy}
-
-	    {DW_LNE_set_address line_label_5}
-	    {DW_LNS_advance_line 1}
-	    {DW_LNS_copy}
-
-	    {DW_LNE_set_address line_label_6}
-	    {DW_LNS_advance_line 1}
-	    {DW_LNS_negate_stmt}
-	    {DW_LNS_copy}
-
-	    {DW_LNE_set_address line_label_7}
-	    {DW_LNE_end_sequence}
+	    DW_LNE_set_address line_label_1
+	    DW_LNS_advance_line 15
+	    DW_LNS_copy
+
+	    DW_LNE_set_address line_label_2
+	    DW_LNS_advance_line 1
+	    DW_LNS_copy
+
+	    DW_LNS_set_file 2
+	    DW_LNE_set_address line_label_3
+	    DW_LNS_advance_line 4
+	    DW_LNS_copy
+
+	    DW_LNE_set_address line_label_4
+	    DW_LNS_advance_line 1
+	    DW_LNS_copy
+
+	    DW_LNS_advance_line -4
+	    DW_LNS_set_file 1
+	    DW_LNS_negate_stmt
+	    DW_LNS_copy
+
+	    DW_LNE_set_address line_label_5
+	    DW_LNS_advance_line 1
+	    DW_LNS_copy
+
+	    DW_LNE_set_address line_label_6
+	    DW_LNS_advance_line 1
+	    DW_LNS_negate_stmt
+	    DW_LNS_copy
+
+	    DW_LNE_set_address line_label_7
+	    DW_LNE_end_sequence
 	}
     }
 }
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-many-frames.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-many-frames.exp
index 483b197448c6..9055244979db 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-inline-many-frames.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-many-frames.exp
@@ -187,95 +187,95 @@ Dwarf::assemble $asm_file {
 	file_name "$srcfile" 1
 
 	program {
-	    {DW_LNE_set_address $main_start}
-	    {line [gdb_get_line_number "main prologue"]}
-	    {DW_LNS_copy}
-	    {DW_LNE_set_address main_label}
-	    {line [gdb_get_line_number "main set global_var"]}
-	    {DW_LNS_copy}
-	    {DW_LNE_set_address main_label2}
-	    {line [gdb_get_line_number "main call aaa"]}
-	    {DW_LNS_copy}
-	    {DW_LNE_set_address main_label2}
-	    {line [gdb_get_line_number "aaa return"]}
-	    {DW_LNS_copy}
-	    {DW_LNE_set_address main_label2}
-	    {line [gdb_get_line_number "bbb return"]}
-	    {DW_LNS_copy}
-	    {DW_LNE_set_address main_label2}
-	    {line [gdb_get_line_number "ccc return"]}
-	    {DW_LNS_copy}
-	    {DW_LNE_set_address main_label3}
-	    {line [gdb_get_line_number "main end"]}
-	    {DW_LNS_copy}
-	    {DW_LNE_set_address $main_end}
-	    {DW_LNE_end_sequence}
+	    DW_LNE_set_address $main_start
+	    line [gdb_get_line_number "main prologue"]
+	    DW_LNS_copy
+	    DW_LNE_set_address main_label
+	    line [gdb_get_line_number "main set global_var"]
+	    DW_LNS_copy
+	    DW_LNE_set_address main_label2
+	    line [gdb_get_line_number "main call aaa"]
+	    DW_LNS_copy
+	    DW_LNE_set_address main_label2
+	    line [gdb_get_line_number "aaa return"]
+	    DW_LNS_copy
+	    DW_LNE_set_address main_label2
+	    line [gdb_get_line_number "bbb return"]
+	    DW_LNS_copy
+	    DW_LNE_set_address main_label2
+	    line [gdb_get_line_number "ccc return"]
+	    DW_LNS_copy
+	    DW_LNE_set_address main_label3
+	    line [gdb_get_line_number "main end"]
+	    DW_LNS_copy
+	    DW_LNE_set_address $main_end
+	    DW_LNE_end_sequence
 
-	    {DW_LNE_set_address $ddd_start}
-	    {line [gdb_get_line_number "ddd prologue"]}
-	    {DW_LNS_copy}
-	    {DW_LNE_set_address ddd_label}
-	    {line [gdb_get_line_number "ddd return"]}
-	    {DW_LNS_copy}
-	    {DW_LNE_set_address ddd_label2}
-	    {line [gdb_get_line_number "ddd end"]}
-	    {DW_LNS_copy}
-	    {DW_LNE_set_address $ddd_end}
-	    {DW_LNE_end_sequence}
+	    DW_LNE_set_address $ddd_start
+	    line [gdb_get_line_number "ddd prologue"]
+	    DW_LNS_copy
+	    DW_LNE_set_address ddd_label
+	    line [gdb_get_line_number "ddd return"]
+	    DW_LNS_copy
+	    DW_LNE_set_address ddd_label2
+	    line [gdb_get_line_number "ddd end"]
+	    DW_LNS_copy
+	    DW_LNE_set_address $ddd_end
+	    DW_LNE_end_sequence
 
-	    {DW_LNE_set_address $eee_start}
-	    {line [gdb_get_line_number "eee prologue"]}
-	    {DW_LNS_copy}
-	    {DW_LNE_set_address eee_label}
-	    {line [gdb_get_line_number "eee return"]}
-	    {DW_LNS_copy}
-	    {DW_LNE_set_address eee_label2}
-	    {line [gdb_get_line_number "eee end"]}
-	    {DW_LNS_copy}
-	    {DW_LNE_set_address $eee_end}
-	    {DW_LNE_end_sequence}
+	    DW_LNE_set_address $eee_start
+	    line [gdb_get_line_number "eee prologue"]
+	    DW_LNS_copy
+	    DW_LNE_set_address eee_label
+	    line [gdb_get_line_number "eee return"]
+	    DW_LNS_copy
+	    DW_LNE_set_address eee_label2
+	    line [gdb_get_line_number "eee end"]
+	    DW_LNS_copy
+	    DW_LNE_set_address $eee_end
+	    DW_LNE_end_sequence
 
-	    {DW_LNE_set_address $fff_start}
-	    {line [gdb_get_line_number "fff prologue"]}
-	    {DW_LNS_copy}
-	    {DW_LNE_set_address fff_label}
-	    {line [gdb_get_line_number "fff return"]}
-	    {DW_LNS_copy}
-	    {DW_LNE_set_address fff_label}
-	    {line [gdb_get_line_number "ggg return"]}
-	    {DW_LNS_copy}
-	    {DW_LNE_set_address fff_label}
-	    {line [gdb_get_line_number "hhh return"]}
-	    {DW_LNS_copy}
-	    {DW_LNE_set_address fff_label}
-	    {line [gdb_get_line_number "iii return"]}
-	    {DW_LNS_copy}
-	    {DW_LNE_set_address fff_label2}
-	    {line [gdb_get_line_number "fff end"]}
-	    {DW_LNS_copy}
-	    {DW_LNE_set_address $fff_end}
-	    {DW_LNE_end_sequence}
+	    DW_LNE_set_address $fff_start
+	    line [gdb_get_line_number "fff prologue"]
+	    DW_LNS_copy
+	    DW_LNE_set_address fff_label
+	    line [gdb_get_line_number "fff return"]
+	    DW_LNS_copy
+	    DW_LNE_set_address fff_label
+	    line [gdb_get_line_number "ggg return"]
+	    DW_LNS_copy
+	    DW_LNE_set_address fff_label
+	    line [gdb_get_line_number "hhh return"]
+	    DW_LNS_copy
+	    DW_LNE_set_address fff_label
+	    line [gdb_get_line_number "iii return"]
+	    DW_LNS_copy
+	    DW_LNE_set_address fff_label2
+	    line [gdb_get_line_number "fff end"]
+	    DW_LNS_copy
+	    DW_LNE_set_address $fff_end
+	    DW_LNE_end_sequence
 
-	    {DW_LNE_set_address $jjj_start}
-	    {line [gdb_get_line_number "jjj prologue"]}
-	    {DW_LNS_copy}
-	    {DW_LNE_set_address jjj_label}
-	    {line [gdb_get_line_number "jjj return"]}
-	    {DW_LNS_copy}
-	    {DW_LNE_set_address jjj_label2}
-	    {line [gdb_get_line_number "jjj end"]}
-	    {DW_LNS_copy}
-	    {DW_LNE_set_address $jjj_end}
-	    {DW_LNE_end_sequence}
+	    DW_LNE_set_address $jjj_start
+	    line [gdb_get_line_number "jjj prologue"]
+	    DW_LNS_copy
+	    DW_LNE_set_address jjj_label
+	    line [gdb_get_line_number "jjj return"]
+	    DW_LNS_copy
+	    DW_LNE_set_address jjj_label2
+	    line [gdb_get_line_number "jjj end"]
+	    DW_LNS_copy
+	    DW_LNE_set_address $jjj_end
+	    DW_LNE_end_sequence
 
-	    {DW_LNE_set_address $kkk_start}
-	    {line [gdb_get_line_number "kkk prologue"]}
-	    {DW_LNS_copy}
-	    {DW_LNE_set_address kkk_label}
-	    {line [gdb_get_line_number "kkk return"]}
-	    {DW_LNS_copy}
-	    {DW_LNE_set_address $kkk_end}
-	    {DW_LNE_end_sequence}
+	    DW_LNE_set_address $kkk_start
+	    line [gdb_get_line_number "kkk prologue"]
+	    DW_LNS_copy
+	    DW_LNE_set_address kkk_label
+	    line [gdb_get_line_number "kkk return"]
+	    DW_LNS_copy
+	    DW_LNE_set_address $kkk_end
+	    DW_LNE_end_sequence
 	}
     }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-small-func.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-small-func.exp
index c480422b7554..05286ad6d2fb 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-inline-small-func.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-small-func.exp
@@ -94,28 +94,28 @@ Dwarf::assemble $asm_file {
 	set f2_l1 [gdb_get_line_number "callee: body" $srcfile4]
 
 	program {
-	    {DW_LNE_set_address line_label_1}
-	    {line $f1_l1}
-	    {DW_LNS_copy}
+	    DW_LNE_set_address line_label_1
+	    line $f1_l1
+	    DW_LNS_copy
 
-	    {line ${f1_l2}}
-	    {DW_LNS_copy}
+	    line ${f1_l2}
+	    DW_LNS_copy
 
-	    {DW_LNS_set_file 2}
-	    {line ${f2_l1}}
-	    {DW_LNS_copy}
+	    DW_LNS_set_file 2
+	    line ${f2_l1}
+	    DW_LNS_copy
 
-	    {DW_LNS_negate_stmt}
-	    {DW_LNS_copy}
+	    DW_LNS_negate_stmt
+	    DW_LNS_copy
 
-	    {DW_LNS_set_file 1}
-	    {DW_LNE_set_address line_label_2}
-	    {line ${f1_l3}}
-	    {DW_LNS_copy}
+	    DW_LNS_set_file 1
+	    DW_LNE_set_address line_label_2
+	    line ${f1_l3}
+	    DW_LNS_copy
 
-	    {DW_LNE_set_address line_label_3}
-	    {DW_LNS_copy}
-	    {DW_LNE_end_sequence}
+	    DW_LNE_set_address line_label_3
+	    DW_LNS_copy
+	    DW_LNE_end_sequence
 	}
     }
 }
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-stepping.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-stepping.exp
index aafca3015e67..bd90715c1982 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-inline-stepping.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-stepping.exp
@@ -94,29 +94,29 @@ Dwarf::assemble $asm_file {
 	file_name "$srcfile" 1
 
 	program {
-	    {DW_LNE_set_address $main_start}
-	    {line [gdb_get_line_number "main prologue"]}
-	    {DW_LNS_copy}
-	    {DW_LNE_set_address main_label}
-	    {line [gdb_get_line_number "main set global_var"]}
-	    {DW_LNS_copy}
-	    {DW_LNE_set_address main_label2}
-	    {line [gdb_get_line_number "main call foo"]}
-	    {DW_LNS_copy}
-	    {DW_LNE_set_address main_label2}
-	    {line [gdb_get_line_number "foo call bar"]}
-	    {DW_LNS_copy}
-	    {DW_LNE_set_address $main_end}
-	    {DW_LNE_end_sequence}
-
-	    {DW_LNE_set_address $bar_start}
-	    {line [gdb_get_line_number "bar prologue"]}
-	    {DW_LNS_copy}
-	    {DW_LNE_set_address bar_label}
-	    {line [gdb_get_line_number "bar return global_var"]}
-	    {DW_LNS_copy}
-	    {DW_LNE_set_address $bar_end}
-	    {DW_LNE_end_sequence}
+	    DW_LNE_set_address $main_start
+	    line [gdb_get_line_number "main prologue"]
+	    DW_LNS_copy
+	    DW_LNE_set_address main_label
+	    line [gdb_get_line_number "main set global_var"]
+	    DW_LNS_copy
+	    DW_LNE_set_address main_label2
+	    line [gdb_get_line_number "main call foo"]
+	    DW_LNS_copy
+	    DW_LNE_set_address main_label2
+	    line [gdb_get_line_number "foo call bar"]
+	    DW_LNS_copy
+	    DW_LNE_set_address $main_end
+	    DW_LNE_end_sequence
+
+	    DW_LNE_set_address $bar_start
+	    line [gdb_get_line_number "bar prologue"]
+	    DW_LNS_copy
+	    DW_LNE_set_address bar_label
+	    line [gdb_get_line_number "bar return global_var"]
+	    DW_LNS_copy
+	    DW_LNE_set_address $bar_end
+	    DW_LNE_end_sequence
 	}
     }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-with-lexical-scope.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-with-lexical-scope.exp
index 485f3aef9567..61fd5d4fed82 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-inline-with-lexical-scope.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-with-lexical-scope.exp
@@ -110,20 +110,20 @@ Dwarf::assemble $asm_file {
 	file_name "$srcfile" 1
 
 	program {
-	    {DW_LNE_set_address $main_start}
-	    {line [gdb_get_line_number "main prologue"]}
-	    {DW_LNS_copy}
-	    {DW_LNE_set_address main_label}
-	    {line [gdb_get_line_number "func call"]}
-	    {DW_LNS_copy}
-	    {DW_LNE_set_address main_label}
-	    {line [gdb_get_line_number "func end"]}
-	    {DW_LNS_copy}
-	    {DW_LNE_set_address main_label2}
-	    {line [gdb_get_line_number "main end"]}
-	    {DW_LNS_copy}
-	    {DW_LNE_set_address $main_end}
-	    {DW_LNE_end_sequence}
+	    DW_LNE_set_address $main_start
+	    line [gdb_get_line_number "main prologue"]
+	    DW_LNS_copy
+	    DW_LNE_set_address main_label
+	    line [gdb_get_line_number "func call"]
+	    DW_LNS_copy
+	    DW_LNE_set_address main_label
+	    line [gdb_get_line_number "func end"]
+	    DW_LNS_copy
+	    DW_LNE_set_address main_label2
+	    line [gdb_get_line_number "main end"]
+	    DW_LNS_copy
+	    DW_LNE_set_address $main_end
+	    DW_LNE_end_sequence
 	}
     }
 }
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-is-stmt-2.exp b/gdb/testsuite/gdb.dwarf2/dw2-is-stmt-2.exp
index 3ec9f8071604..239f5f1d9e96 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-is-stmt-2.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-is-stmt-2.exp
@@ -68,84 +68,84 @@ Dwarf::assemble $asm_file {
 	file_name "$srcfile" 1
 
 	program {
-	    {DW_LNE_set_address main}
-	    {line [gdb_get_line_number "main prologue"]}
-	    {DW_LNS_copy}
-
-	    {DW_LNE_set_address line_label_0}
-	    {line [gdb_get_line_number "main start"]}
-	    {DW_LNS_copy}
-
-	    {DW_LNE_set_address line_label_1}
-	    {line [gdb_get_line_number "Line 1"]}
-	    {DW_LNS_negate_stmt}
-	    {DW_LNS_copy}
-
-	    {DW_LNE_set_address line_label_2}
-	    {DW_LNS_negate_stmt}
-	    {DW_LNS_copy}
-
-	    {DW_LNE_set_address line_label_3}
-	    {line [gdb_get_line_number "Line 2"]}
-	    {DW_LNS_negate_stmt}
-	    {DW_LNS_copy}
-
-	    {DW_LNE_set_address line_label_4}
-	    {line [gdb_get_line_number "Line 1"]}
-	    {DW_LNS_copy}
-
-	    {DW_LNE_set_address line_label_5}
-	    {line [gdb_get_line_number "Line 3"]}
-	    {DW_LNS_copy}
-
-	    {DW_LNE_set_address line_label_6}
-	    {line [gdb_get_line_number "Line 4"]}
-	    {DW_LNS_copy}
-
-	    {DW_LNE_set_address line_label_7}
-	    {DW_LNS_negate_stmt}
-	    {DW_LNS_copy}
-
-	    {DW_LNE_set_address line_label_8}
-	    {line [gdb_get_line_number "Line 2"]}
-	    {DW_LNS_copy}
-
-	    {DW_LNE_set_address line_label_9}
-	    {DW_LNS_negate_stmt}
-	    {DW_LNS_copy}
-
-	    {DW_LNE_set_address line_label_10}
-	    {line [gdb_get_line_number "Line 3"]}
-	    {DW_LNS_copy}
-
-	    {DW_LNE_set_address line_label_11}
-	    {line [gdb_get_line_number "Line 5"]}
-	    {DW_LNS_copy}
-
-	    {DW_LNE_set_address line_label_12}
-	    {DW_LNS_negate_stmt}
-	    {DW_LNS_copy}
-
-	    {DW_LNE_set_address line_label_13}
-	    {line [gdb_get_line_number "Line 3"]}
-	    {DW_LNS_copy}
-
-	    {DW_LNE_set_address line_label_14}
-	    {line [gdb_get_line_number "Line 4"]}
-	    {DW_LNS_negate_stmt}
-	    {DW_LNS_copy}
-
-	    {DW_LNE_set_address line_label_15}
-	    {line [gdb_get_line_number "Line 5"]}
-	    {DW_LNS_copy}
-
-	    {DW_LNE_set_address line_label_16}
-	    {line [gdb_get_line_number "main end"]}
-	    {DW_LNS_negate_stmt}
-	    {DW_LNS_copy}
-
-	    {DW_LNE_set_address ${main_end}}
-	    {DW_LNE_end_sequence}
+	    DW_LNE_set_address main
+	    line [gdb_get_line_number "main prologue"]
+	    DW_LNS_copy
+
+	    DW_LNE_set_address line_label_0
+	    line [gdb_get_line_number "main start"]
+	    DW_LNS_copy
+
+	    DW_LNE_set_address line_label_1
+	    line [gdb_get_line_number "Line 1"]
+	    DW_LNS_negate_stmt
+	    DW_LNS_copy
+
+	    DW_LNE_set_address line_label_2
+	    DW_LNS_negate_stmt
+	    DW_LNS_copy
+
+	    DW_LNE_set_address line_label_3
+	    line [gdb_get_line_number "Line 2"]
+	    DW_LNS_negate_stmt
+	    DW_LNS_copy
+
+	    DW_LNE_set_address line_label_4
+	    line [gdb_get_line_number "Line 1"]
+	    DW_LNS_copy
+
+	    DW_LNE_set_address line_label_5
+	    line [gdb_get_line_number "Line 3"]
+	    DW_LNS_copy
+
+	    DW_LNE_set_address line_label_6
+	    line [gdb_get_line_number "Line 4"]
+	    DW_LNS_copy
+
+	    DW_LNE_set_address line_label_7
+	    DW_LNS_negate_stmt
+	    DW_LNS_copy
+
+	    DW_LNE_set_address line_label_8
+	    line [gdb_get_line_number "Line 2"]
+	    DW_LNS_copy
+
+	    DW_LNE_set_address line_label_9
+	    DW_LNS_negate_stmt
+	    DW_LNS_copy
+
+	    DW_LNE_set_address line_label_10
+	    line [gdb_get_line_number "Line 3"]
+	    DW_LNS_copy
+
+	    DW_LNE_set_address line_label_11
+	    line [gdb_get_line_number "Line 5"]
+	    DW_LNS_copy
+
+	    DW_LNE_set_address line_label_12
+	    DW_LNS_negate_stmt
+	    DW_LNS_copy
+
+	    DW_LNE_set_address line_label_13
+	    line [gdb_get_line_number "Line 3"]
+	    DW_LNS_copy
+
+	    DW_LNE_set_address line_label_14
+	    line [gdb_get_line_number "Line 4"]
+	    DW_LNS_negate_stmt
+	    DW_LNS_copy
+
+	    DW_LNE_set_address line_label_15
+	    line [gdb_get_line_number "Line 5"]
+	    DW_LNS_copy
+
+	    DW_LNE_set_address line_label_16
+	    line [gdb_get_line_number "main end"]
+	    DW_LNS_negate_stmt
+	    DW_LNS_copy
+
+	    DW_LNE_set_address ${main_end}
+	    DW_LNE_end_sequence
 	}
     }
 }
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-is-stmt.exp b/gdb/testsuite/gdb.dwarf2/dw2-is-stmt.exp
index 9a9fc8cca646..c449757becb4 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-is-stmt.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-is-stmt.exp
@@ -68,35 +68,35 @@ Dwarf::assemble $asm_file {
 	file_name "$srcfile" 1
 
 	program {
-	    {DW_LNE_set_address main}
-	    {line [gdb_get_line_number "main prologue"]}
-	    {DW_LNS_negate_stmt}
-	    {DW_LNS_copy}
-
-	    {DW_LNE_set_address line_label_1}
-	    {line [gdb_get_line_number "main, set var to 99"]}
-	    {DW_LNS_copy}
-
-	    {DW_LNE_set_address line_label_2}
-	    {line [gdb_get_line_number "main, set var to 0"]}
-	    {DW_LNS_negate_stmt}
-	    {DW_LNS_copy}
-
-	    {DW_LNE_set_address line_label_3}
-	    {DW_LNS_negate_stmt}
-	    {DW_LNS_copy}
-
-	    {DW_LNE_set_address line_label_4}
-	    {DW_LNS_negate_stmt}
-	    {DW_LNS_copy}
-
-	    {DW_LNE_set_address line_label_5}
-	    {line [gdb_get_line_number "main end"]}
-	    {DW_LNS_negate_stmt}
-	    {DW_LNS_copy}
-
-	    {DW_LNE_set_address ${main_end}}
-	    {DW_LNE_end_sequence}
+	    DW_LNE_set_address main
+	    line [gdb_get_line_number "main prologue"]
+	    DW_LNS_negate_stmt
+	    DW_LNS_copy
+
+	    DW_LNE_set_address line_label_1
+	    line [gdb_get_line_number "main, set var to 99"]
+	    DW_LNS_copy
+
+	    DW_LNE_set_address line_label_2
+	    line [gdb_get_line_number "main, set var to 0"]
+	    DW_LNS_negate_stmt
+	    DW_LNS_copy
+
+	    DW_LNE_set_address line_label_3
+	    DW_LNS_negate_stmt
+	    DW_LNS_copy
+
+	    DW_LNE_set_address line_label_4
+	    DW_LNS_negate_stmt
+	    DW_LNS_copy
+
+	    DW_LNE_set_address line_label_5
+	    line [gdb_get_line_number "main end"]
+	    DW_LNS_negate_stmt
+	    DW_LNS_copy
+
+	    DW_LNE_set_address ${main_end}
+	    DW_LNE_end_sequence
 	}
     }
 }
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-line-number-zero.exp b/gdb/testsuite/gdb.dwarf2/dw2-line-number-zero.exp
index ec15694bb583..0c5eed9814f4 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-line-number-zero.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-line-number-zero.exp
@@ -62,46 +62,46 @@ Dwarf::assemble $asm_file {
 	file_name "$srcfile" 1
 
 	program {
-	    {DW_LNE_set_address bar1_label}
-	    {line 27}
-	    {DW_LNS_copy}
+	    DW_LNE_set_address bar1_label
+	    line 27
+	    DW_LNS_copy
 
-	    {DW_LNE_set_address bar1_label_2}
-	    {line 29}
-	    {DW_LNS_copy}
+	    DW_LNE_set_address bar1_label_2
+	    line 29
+	    DW_LNS_copy
 
-	    {DW_LNE_set_address bar1_label_3}
-	    {line 0}
-	    {DW_LNS_copy}
+	    DW_LNE_set_address bar1_label_3
+	    line 0
+	    DW_LNS_copy
 
-	    {DW_LNE_set_address bar1_label_4}
-	    {line 33}
-	    {DW_LNS_copy}
+	    DW_LNE_set_address bar1_label_4
+	    line 33
+	    DW_LNS_copy
 
-	    {DW_LNE_set_address bar1_label_5}
-	    {DW_LNE_end_sequence}
+	    DW_LNE_set_address bar1_label_5
+	    DW_LNE_end_sequence
 
 
-	    {DW_LNE_set_address bar2_label}
-	    {line 41}
-	    {DW_LNS_copy}
+	    DW_LNE_set_address bar2_label
+	    line 41
+	    DW_LNS_copy
 
-	    {DW_LNE_set_address bar2_label_2}
-	    {line 43}
-	    {DW_LNS_copy}
+	    DW_LNE_set_address bar2_label_2
+	    line 43
+	    DW_LNS_copy
 
-	    {DW_LNE_set_address bar2_label_3}
-	    {line 0}
-	    {DW_LNS_negate_stmt}
-	    {DW_LNS_copy}
-	    {DW_LNS_negate_stmt}
+	    DW_LNE_set_address bar2_label_3
+	    line 0
+	    DW_LNS_negate_stmt
+	    DW_LNS_copy
+	    DW_LNS_negate_stmt
 
-	    {DW_LNE_set_address bar2_label_4}
-	    {line 47}
-	    {DW_LNS_copy}
+	    DW_LNE_set_address bar2_label_4
+	    line 47
+	    DW_LNS_copy
 
-	    {DW_LNE_set_address bar2_label_5}
-	    {DW_LNE_end_sequence}
+	    DW_LNE_set_address bar2_label_5
+	    DW_LNE_end_sequence
 	}
     }
 }
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-lines.exp b/gdb/testsuite/gdb.dwarf2/dw2-lines.exp
index c1be18aa88cf..e36064460fd3 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-lines.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-lines.exp
@@ -83,24 +83,24 @@ proc test_1 { _cv _cdw64 _lv _ldw64 {_string_form ""}} {
 	    file_name "$srcfile" 1
 
 	    program {
-		{DW_LNE_set_address bar_label}
-		{line [line_for bar_label]}
-		{DW_LNS_copy}
+		DW_LNE_set_address bar_label
+		line [line_for bar_label]
+		DW_LNS_copy
 
-		{DW_LNE_set_address bar_label_2}
-		{line [line_for bar_label_2]}
-		{DW_LNS_copy}
+		DW_LNE_set_address bar_label_2
+		line [line_for bar_label_2]
+		DW_LNS_copy
 
-		{DW_LNE_set_address bar_label_3}
-		{line [line_for bar_label_3]}
-		{DW_LNS_copy}
+		DW_LNE_set_address bar_label_3
+		line [line_for bar_label_3]
+		DW_LNS_copy
 
-		{DW_LNE_set_address bar_label_4}
-		{line [line_for bar_label_4]}
-		{DW_LNS_copy}
+		DW_LNE_set_address bar_label_4
+		line [line_for bar_label_4]
+		DW_LNS_copy
 
-		{DW_LNE_set_address bar_label_5}
-		{DW_LNE_end_sequence}
+		DW_LNE_set_address bar_label_5
+		DW_LNE_end_sequence
 	    }
 	}
     }
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-out-of-range-end-of-seq.exp b/gdb/testsuite/gdb.dwarf2/dw2-out-of-range-end-of-seq.exp
index f60f622067ee..46518051c25f 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-out-of-range-end-of-seq.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-out-of-range-end-of-seq.exp
@@ -58,19 +58,19 @@ Dwarf::assemble $asm_file {
 	file_name "$srcfile" 1
 
 	program {
-	    {DW_LNE_set_address main_label}
-	    {line 1}
-	    {DW_LNS_copy}
+	    DW_LNE_set_address main_label
+	    line 1
+	    DW_LNS_copy
 
-	    {DW_LNS_advance_pc 1}
-	    {DW_LNE_end_sequence}
+	    DW_LNS_advance_pc 1
+	    DW_LNE_end_sequence
 
-	    {DW_LNE_set_address 0}
-	    {line 2}
-	    {DW_LNS_copy}
+	    DW_LNE_set_address 0
+	    line 2
+	    DW_LNS_copy
 
-	    {DW_LNS_advance_pc 1}
-	    {DW_LNE_end_sequence}
+	    DW_LNS_advance_pc 1
+	    DW_LNE_end_sequence
 	}
     }
 }
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ranges-base.exp b/gdb/testsuite/gdb.dwarf2/dw2-ranges-base.exp
index ae44dc49329b..9ab030e0ee2d 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-ranges-base.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-ranges-base.exp
@@ -84,29 +84,29 @@ Dwarf::assemble $asm_file {
 	# table data associated with it.  We do make use of the fake
 	# line numbers that we pick here in the tests below.
 	program {
-	    {DW_LNE_set_address [lindex $main_func 0]}
-	    {DW_LNS_advance_line 10}
-	    {DW_LNS_copy}
-	    {DW_LNS_advance_pc [lindex $main_func 1]}
-	    {DW_LNS_advance_line 19}
-	    {DW_LNS_copy}
-	    {DW_LNE_end_sequence}
-
-	    {DW_LNE_set_address [lindex $frame2_func 0]}
-	    {DW_LNS_advance_line 20}
-	    {DW_LNS_copy}
-	    {DW_LNS_advance_pc [lindex $frame2_func 1]}
-	    {DW_LNS_advance_line 29}
-	    {DW_LNS_copy}
-	    {DW_LNE_end_sequence}
-
-	    {DW_LNE_set_address [lindex $frame3_func 0]}
-	    {DW_LNS_advance_line 30}
-	    {DW_LNS_copy}
-	    {DW_LNS_advance_pc [lindex $frame3_func 1]}
-	    {DW_LNS_advance_line 39}
-	    {DW_LNS_copy}
-	    {DW_LNE_end_sequence}
+	    DW_LNE_set_address [lindex $main_func 0]
+	    DW_LNS_advance_line 10
+	    DW_LNS_copy
+	    DW_LNS_advance_pc [lindex $main_func 1]
+	    DW_LNS_advance_line 19
+	    DW_LNS_copy
+	    DW_LNE_end_sequence
+
+	    DW_LNE_set_address [lindex $frame2_func 0]
+	    DW_LNS_advance_line 20
+	    DW_LNS_copy
+	    DW_LNS_advance_pc [lindex $frame2_func 1]
+	    DW_LNS_advance_line 29
+	    DW_LNS_copy
+	    DW_LNE_end_sequence
+
+	    DW_LNE_set_address [lindex $frame3_func 0]
+	    DW_LNS_advance_line 30
+	    DW_LNS_copy
+	    DW_LNS_advance_pc [lindex $frame3_func 1]
+	    DW_LNS_advance_line 39
+	    DW_LNS_copy
+	    DW_LNE_end_sequence
 	}
     }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ranges-func.exp b/gdb/testsuite/gdb.dwarf2/dw2-ranges-func.exp
index b6077e0c6760..aa95dae6bfcd 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-ranges-func.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-ranges-func.exp
@@ -133,66 +133,66 @@ proc do_test {suffix} {
 	    # Generate a line table program.  An attempt was made to make it
 	    # reasonably accurate as it made debugging the test case easier.
 	    program {
-		{DW_LNE_set_address $main_start}
-		{line [gdb_get_line_number "main prologue"]}
-		{DW_LNS_copy}
-		{DW_LNE_set_address main_label}
-		{line [gdb_get_line_number "main foo call"]}
-		{DW_LNS_copy}
-		{DW_LNE_set_address main_label2}
-		{line [gdb_get_line_number "main return"]}
-		{DW_LNS_copy}
-		{DW_LNE_set_address $main_end}
-		{line [expr [gdb_get_line_number "main end"] + 1]}
-		{DW_LNS_copy}
-		{DW_LNE_end_sequence}
-
-		{DW_LNE_set_address $foo_start}
-		{line [gdb_get_line_number "foo prologue"]}
-		{DW_LNS_copy}
-		{DW_LNE_set_address foo_label}
-		{line [gdb_get_line_number "foo bar call"]}
-		{DW_LNS_copy}
-		{DW_LNE_set_address foo_label2}
-		{line [gdb_get_line_number "foo foo_cold call"]}
-		{DW_LNS_copy}
-		{DW_LNE_set_address foo_label3}
-		{line [gdb_get_line_number "foo end"]}
-		{DW_LNS_copy}
-		{DW_LNE_set_address $foo_end}
-		{DW_LNS_advance_line 1}
-		{DW_LNS_copy}
-		{DW_LNE_end_sequence}
-
-		{DW_LNE_set_address $bar_start}
-		{line [gdb_get_line_number "bar end"]}
-		{DW_LNS_copy}
-		{DW_LNS_advance_pc $bar_len}
-		{DW_LNS_advance_line 1}
-		{DW_LNS_copy}
-		{DW_LNE_end_sequence}
-
-		{DW_LNE_set_address $baz_start}
-		{line [gdb_get_line_number "baz end"]}
-		{DW_LNS_copy}
-		{DW_LNS_advance_pc $baz_len}
-		{DW_LNS_advance_line 1}
-		{DW_LNS_copy}
-		{DW_LNE_end_sequence}
-
-		{DW_LNE_set_address $foo_cold_start}
-	        {line [gdb_get_line_number "foo_cold prologue"]}
-		{DW_LNS_copy}
-		{DW_LNE_set_address foo_cold_label}
-		{line [gdb_get_line_number "foo_cold baz call"]}
-		{DW_LNS_copy}
-		{DW_LNE_set_address foo_cold_label2}
-		{line [gdb_get_line_number "foo_cold end"]}
-		{DW_LNS_copy}
-		{DW_LNE_set_address $foo_cold_end}
-		{DW_LNS_advance_line 1}
-		{DW_LNS_copy}
-		{DW_LNE_end_sequence}
+		DW_LNE_set_address $main_start
+		line [gdb_get_line_number "main prologue"]
+		DW_LNS_copy
+		DW_LNE_set_address main_label
+		line [gdb_get_line_number "main foo call"]
+		DW_LNS_copy
+		DW_LNE_set_address main_label2
+		line [gdb_get_line_number "main return"]
+		DW_LNS_copy
+		DW_LNE_set_address $main_end
+		line [expr [gdb_get_line_number "main end"] + 1]
+		DW_LNS_copy
+		DW_LNE_end_sequence
+
+		DW_LNE_set_address $foo_start
+		line [gdb_get_line_number "foo prologue"]
+		DW_LNS_copy
+		DW_LNE_set_address foo_label
+		line [gdb_get_line_number "foo bar call"]
+		DW_LNS_copy
+		DW_LNE_set_address foo_label2
+		line [gdb_get_line_number "foo foo_cold call"]
+		DW_LNS_copy
+		DW_LNE_set_address foo_label3
+		line [gdb_get_line_number "foo end"]
+		DW_LNS_copy
+		DW_LNE_set_address $foo_end
+		DW_LNS_advance_line 1
+		DW_LNS_copy
+		DW_LNE_end_sequence
+
+		DW_LNE_set_address $bar_start
+		line [gdb_get_line_number "bar end"]
+		DW_LNS_copy
+		DW_LNS_advance_pc $bar_len
+		DW_LNS_advance_line 1
+		DW_LNS_copy
+		DW_LNE_end_sequence
+
+		DW_LNE_set_address $baz_start
+		line [gdb_get_line_number "baz end"]
+		DW_LNS_copy
+		DW_LNS_advance_pc $baz_len
+		DW_LNS_advance_line 1
+		DW_LNS_copy
+		DW_LNE_end_sequence
+
+		DW_LNE_set_address $foo_cold_start
+	        line [gdb_get_line_number "foo_cold prologue"]
+		DW_LNS_copy
+		DW_LNE_set_address foo_cold_label
+		line [gdb_get_line_number "foo_cold baz call"]
+		DW_LNS_copy
+		DW_LNE_set_address foo_cold_label2
+		line [gdb_get_line_number "foo_cold end"]
+		DW_LNS_copy
+		DW_LNE_set_address $foo_cold_end
+		DW_LNS_advance_line 1
+		DW_LNS_copy
+		DW_LNE_end_sequence
 	    }
 	}
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-step-out-of-function-no-stmt.exp b/gdb/testsuite/gdb.dwarf2/dw2-step-out-of-function-no-stmt.exp
index ad4a5f553e61..29e6858e04b9 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-step-out-of-function-no-stmt.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-step-out-of-function-no-stmt.exp
@@ -79,29 +79,29 @@ Dwarf::assemble $asm_file {
 	file_name "$srcfile" 1
 
 	program {
-	    {DW_LNE_set_address bar_label}
-	    {line 26}
-	    {DW_LNS_copy}
+	    DW_LNE_set_address bar_label
+	    line 26
+	    DW_LNS_copy
 
-	    {DW_LNE_set_address $bar_end}
-	    {DW_LNE_end_sequence}
+	    DW_LNE_set_address $bar_end
+	    DW_LNE_end_sequence
 
-	    {DW_LNE_set_address main_label}
-	    {line 32}
-	    {DW_LNS_copy}
+	    DW_LNE_set_address main_label
+	    line 32
+	    DW_LNS_copy
 
-	    {DW_LNE_set_address main_label_2}
-	    {line 36}
-	    {DW_LNS_negate_stmt}
-	    {DW_LNS_copy}
-	    {DW_LNS_negate_stmt}
+	    DW_LNE_set_address main_label_2
+	    line 36
+	    DW_LNS_negate_stmt
+	    DW_LNS_copy
+	    DW_LNS_negate_stmt
 
-	    {DW_LNE_set_address main_label_3}
-	    {line 36}
-	    {DW_LNS_copy}
+	    DW_LNE_set_address main_label_3
+	    line 36
+	    DW_LNS_copy
 
-	    {DW_LNE_set_address $main_end}
-	    {DW_LNE_end_sequence}
+	    DW_LNE_set_address $main_end
+	    DW_LNE_end_sequence
 	}
     }
 }
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-symtab-includes-lookup.exp b/gdb/testsuite/gdb.dwarf2/dw2-symtab-includes-lookup.exp
index feab51ad13fd..0390d36f74e1 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-symtab-includes-lookup.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-symtab-includes-lookup.exp
@@ -77,7 +77,7 @@ Dwarf::assemble $asm_file {
 	include_dir "${srcdir}/${subdir}"
 	file_name "dw2-symtab-includes.h" 1
 	program {
-	    {DW_LNS_advance_line 1}
+	    DW_LNS_advance_line 1
 	}
     }
 }
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-symtab-includes.exp b/gdb/testsuite/gdb.dwarf2/dw2-symtab-includes.exp
index e5c3342cf816..6c6d5fe46b4b 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-symtab-includes.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-symtab-includes.exp
@@ -51,7 +51,7 @@ Dwarf::assemble $asm_file {
 	include_dir "${srcdir}/${subdir}"
 	file_name "dw2-symtab-includes.h" 1
 	program {
-	    {DW_LNS_advance_line 1}
+	    DW_LNS_advance_line 1
 	}
     }
 }
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-vendor-extended-opcode.exp b/gdb/testsuite/gdb.dwarf2/dw2-vendor-extended-opcode.exp
index 86b5cc69e2ee..de8c82bb40ca 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-vendor-extended-opcode.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-vendor-extended-opcode.exp
@@ -57,14 +57,14 @@ Dwarf::assemble $asm_file {
 	file_name "$srcfile" 1
 
 	program {
-	    {DW_LNE_set_address main_label}
-	    {line 27}
-	    {DW_LNE_user 1 $DW_LNE_lo_usr}
-	    {DW_LNE_user 2 $DW_LNE_hi_usr}
-	    {DW_LNS_copy}
+	    DW_LNE_set_address main_label
+	    line 27
+	    DW_LNE_user 1 $DW_LNE_lo_usr
+	    DW_LNE_user 2 $DW_LNE_hi_usr
+	    DW_LNS_copy
 
-	    {DW_LNE_set_address main_label_2}
-	    {DW_LNE_end_sequence}
+	    DW_LNE_set_address main_label_2
+	    DW_LNE_end_sequence
 	}
     }
 }
diff --git a/gdb/testsuite/gdb.dwarf2/fission-multi-cu.exp b/gdb/testsuite/gdb.dwarf2/fission-multi-cu.exp
index 9baa67ce7a34..62bffdf709d2 100644
--- a/gdb/testsuite/gdb.dwarf2/fission-multi-cu.exp
+++ b/gdb/testsuite/gdb.dwarf2/fission-multi-cu.exp
@@ -88,18 +88,18 @@ Dwarf::assemble $asm_file_1 {
 	file_name "$srcfile" 1
 
 	program {
-	    {DW_LNE_set_address $func_start}
-	    {DW_LNS_advance_line 24}
-	    {DW_LNS_copy}
-
-	    {DW_LNE_set_address line_label_4}
-	    {DW_LNS_advance_line 3}
-	    {DW_LNS_copy}
-
-	    {DW_LNE_set_address $func_end}
-	    {DW_LNS_advance_line 1}
-	    {DW_LNS_copy}
-	    {DW_LNE_end_sequence}
+	    DW_LNE_set_address $func_start
+	    DW_LNS_advance_line 24
+	    DW_LNS_copy
+
+	    DW_LNE_set_address line_label_4
+	    DW_LNS_advance_line 3
+	    DW_LNS_copy
+
+	    DW_LNE_set_address $func_end
+	    DW_LNS_advance_line 1
+	    DW_LNS_copy
+	    DW_LNE_end_sequence
 	}
     }
 
@@ -164,26 +164,26 @@ Dwarf::assemble $asm_file_2 {
 	file_name "$srcfile" 1
 
 	program {
-	    {DW_LNE_set_address $main_start}
-	    {DW_LNS_advance_line 32}
-	    {DW_LNS_copy}
-
-	    {DW_LNE_set_address line_label_1}
-	    {DW_LNS_advance_line 3}
-	    {DW_LNS_copy}
-
-	    {DW_LNE_set_address line_label_2}
-	    {DW_LNS_advance_line 2}
-	    {DW_LNS_copy}
-
-	    {DW_LNE_set_address line_label_3}
-	    {DW_LNS_advance_line 2}
-	    {DW_LNS_copy}
-
-	    {DW_LNE_set_address $main_end}
-	    {DW_LNS_advance_line 2}
-	    {DW_LNS_copy}
-	    {DW_LNE_end_sequence}
+	    DW_LNE_set_address $main_start
+	    DW_LNS_advance_line 32
+	    DW_LNS_copy
+
+	    DW_LNE_set_address line_label_1
+	    DW_LNS_advance_line 3
+	    DW_LNS_copy
+
+	    DW_LNE_set_address line_label_2
+	    DW_LNS_advance_line 2
+	    DW_LNS_copy
+
+	    DW_LNE_set_address line_label_3
+	    DW_LNS_advance_line 2
+	    DW_LNS_copy
+
+	    DW_LNE_set_address $main_end
+	    DW_LNS_advance_line 2
+	    DW_LNS_copy
+	    DW_LNE_end_sequence
 	}
     }
 
diff --git a/gdb/testsuite/gdb.dwarf2/imported-unit-bp.exp.tcl b/gdb/testsuite/gdb.dwarf2/imported-unit-bp.exp.tcl
index 4d95400cacab..fe92c530888d 100644
--- a/gdb/testsuite/gdb.dwarf2/imported-unit-bp.exp.tcl
+++ b/gdb/testsuite/gdb.dwarf2/imported-unit-bp.exp.tcl
@@ -83,37 +83,37 @@ Dwarf::assemble $asm_file {
 	file_name "$srcfile" 1
 
 	program {
-	    {DW_LNE_set_address line_label_1}
-	    {DW_LNS_advance_line 15}
-	    {DW_LNS_copy}
+	    DW_LNE_set_address line_label_1
+	    DW_LNS_advance_line 15
+	    DW_LNS_copy
 
-	    {DW_LNE_set_address line_label_2}
-	    {DW_LNS_advance_line 1}
-	    {DW_LNS_copy}
+	    DW_LNE_set_address line_label_2
+	    DW_LNS_advance_line 1
+	    DW_LNS_copy
 
-	    {DW_LNE_set_address line_label_3}
-	    {DW_LNS_advance_line 4}
-	    {DW_LNS_copy}
+	    DW_LNE_set_address line_label_3
+	    DW_LNS_advance_line 4
+	    DW_LNS_copy
 
-	    {DW_LNE_set_address line_label_4}
-	    {DW_LNS_advance_line 1}
-	    {DW_LNS_copy}
+	    DW_LNE_set_address line_label_4
+	    DW_LNS_advance_line 1
+	    DW_LNS_copy
 
-	    {DW_LNS_advance_line -4}
-	    {DW_LNS_negate_stmt}
-	    {DW_LNS_copy}
+	    DW_LNS_advance_line -4
+	    DW_LNS_negate_stmt
+	    DW_LNS_copy
 
-	    {DW_LNE_set_address line_label_5}
-	    {DW_LNS_advance_line 1}
-	    {DW_LNS_copy}
+	    DW_LNE_set_address line_label_5
+	    DW_LNS_advance_line 1
+	    DW_LNS_copy
 
-	    {DW_LNE_set_address line_label_6}
-	    {DW_LNS_advance_line 1}
-	    {DW_LNS_negate_stmt}
-	    {DW_LNS_copy}
+	    DW_LNE_set_address line_label_6
+	    DW_LNS_advance_line 1
+	    DW_LNS_negate_stmt
+	    DW_LNS_copy
 
-	    {DW_LNE_set_address line_label_7}
-	    {DW_LNE_end_sequence}
+	    DW_LNE_set_address line_label_7
+	    DW_LNE_end_sequence
 	}
     }
 }
diff --git a/gdb/testsuite/gdb.dwarf2/locexpr-data-member-location.exp b/gdb/testsuite/gdb.dwarf2/locexpr-data-member-location.exp
index a0831082f095..67e96fb1128a 100644
--- a/gdb/testsuite/gdb.dwarf2/locexpr-data-member-location.exp
+++ b/gdb/testsuite/gdb.dwarf2/locexpr-data-member-location.exp
@@ -267,31 +267,31 @@ Dwarf::assemble ${asm_file} {
 
 	# Generate a line table program.
 	program {
-	    {DW_LNE_set_address $foo_start}
-	    {line [gdb_get_line_number "foo prologue"]}
-	    {DW_LNS_copy}
-	    {DW_LNE_set_address foo_label}
-	    {line [gdb_get_line_number "foo return"]}
-	    {DW_LNS_copy}
-	    {line [gdb_get_line_number "foo end"]}
-	    {DW_LNS_copy}
-	    {DW_LNE_set_address $foo_end}
-	    {DW_LNS_advance_line 1}
-	    {DW_LNS_copy}
-	    {DW_LNE_end_sequence}
-
-	    {DW_LNE_set_address $bar_start}
-	    {line [gdb_get_line_number "bar prologue"]}
-	    {DW_LNS_copy}
-	    {DW_LNE_set_address bar_label}
-	    {line [gdb_get_line_number "bar return"]}
-	    {DW_LNS_copy}
-	    {line [gdb_get_line_number "bar end"]}
-	    {DW_LNS_copy}
-	    {DW_LNE_set_address $bar_end}
-	    {DW_LNS_advance_line 1}
-	    {DW_LNS_copy}
-	    {DW_LNE_end_sequence}
+	    DW_LNE_set_address $foo_start
+	    line [gdb_get_line_number "foo prologue"]
+	    DW_LNS_copy
+	    DW_LNE_set_address foo_label
+	    line [gdb_get_line_number "foo return"]
+	    DW_LNS_copy
+	    line [gdb_get_line_number "foo end"]
+	    DW_LNS_copy
+	    DW_LNE_set_address $foo_end
+	    DW_LNS_advance_line 1
+	    DW_LNS_copy
+	    DW_LNE_end_sequence
+
+	    DW_LNE_set_address $bar_start
+	    line [gdb_get_line_number "bar prologue"]
+	    DW_LNS_copy
+	    DW_LNE_set_address bar_label
+	    line [gdb_get_line_number "bar return"]
+	    DW_LNS_copy
+	    line [gdb_get_line_number "bar end"]
+	    DW_LNS_copy
+	    DW_LNE_set_address $bar_end
+	    DW_LNS_advance_line 1
+	    DW_LNS_copy
+	    DW_LNE_end_sequence
 	}
     }
 
diff --git a/gdb/testsuite/lib/dwarf.exp b/gdb/testsuite/lib/dwarf.exp
index f8211c3cc1a2..84c3a92a2826 100644
--- a/gdb/testsuite/lib/dwarf.exp
+++ b/gdb/testsuite/lib/dwarf.exp
@@ -2410,7 +2410,7 @@ namespace eval Dwarf {
 	    define_label $_line_header_end_label
 	}
 
-	proc program {statements} {
+	proc program { body } {
 	    variable _line_header_end_label
 	    variable _line
 
@@ -2498,9 +2498,7 @@ namespace eval Dwarf {
 		_op .sleb128 ${num}
 	    }
 
-	    foreach statement $statements {
-		uplevel 1 $statement
-	    }
+	    uplevel $body
 	}
 
 	uplevel $body
-- 
2.26.2


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 2/2] gdb/testsuite/dwarf: simplify line number program syntax
  2022-04-06 15:43 [PATCH 1/2] gdb/testsuite/dwarf: remove two unused variables Simon Marchi
@ 2022-04-06 15:43 ` Simon Marchi
  0 siblings, 0 replies; 3+ messages in thread
From: Simon Marchi @ 2022-04-06 15:43 UTC (permalink / raw)
  To: gdb-patches

By calling `uplevel $body` in the program proc (a pattern we use at many
places), we can get rid of curly braces around each line number program
directive.  That seems like a nice small improvement to me.

Change-Id: Ib327edcbffbd4c23a08614adee56c12ea25ebc0b
---
 .../gdb.base/until-trailing-insns.exp         |  58 +++---
 gdb/testsuite/gdb.dwarf2/dw2-bad-elf.exp      |  28 +--
 .../gdb.dwarf2/dw2-disasm-over-non-stmt.exp   |  56 +++---
 .../gdb.dwarf2/dw2-inline-header-1.exp        |  70 ++++----
 .../gdb.dwarf2/dw2-inline-header-2.exp        |  66 +++----
 .../gdb.dwarf2/dw2-inline-header-3.exp        |  66 +++----
 .../gdb.dwarf2/dw2-inline-many-frames.exp     | 168 +++++++++---------
 .../gdb.dwarf2/dw2-inline-small-func.exp      |  34 ++--
 .../gdb.dwarf2/dw2-inline-stepping.exp        |  46 ++---
 .../dw2-inline-with-lexical-scope.exp         |  28 +--
 gdb/testsuite/gdb.dwarf2/dw2-is-stmt-2.exp    | 156 ++++++++--------
 gdb/testsuite/gdb.dwarf2/dw2-is-stmt.exp      |  58 +++---
 .../gdb.dwarf2/dw2-line-number-zero.exp       |  60 +++----
 gdb/testsuite/gdb.dwarf2/dw2-lines.exp        |  28 +--
 .../dw2-out-of-range-end-of-seq.exp           |  20 +--
 gdb/testsuite/gdb.dwarf2/dw2-prologue-end.exp |  34 ++--
 gdb/testsuite/gdb.dwarf2/dw2-ranges-base.exp  |  46 ++---
 gdb/testsuite/gdb.dwarf2/dw2-ranges-func.exp  | 120 ++++++-------
 .../dw2-step-out-of-function-no-stmt.exp      |  36 ++--
 .../gdb.dwarf2/dw2-symtab-includes-lookup.exp |   2 +-
 .../gdb.dwarf2/dw2-symtab-includes.exp        |   2 +-
 .../gdb.dwarf2/dw2-vendor-extended-opcode.exp |  14 +-
 gdb/testsuite/gdb.dwarf2/fission-multi-cu.exp |  64 +++----
 .../gdb.dwarf2/imported-unit-bp.exp.tcl       |  48 ++---
 .../locexpr-data-member-location.exp          |  50 +++---
 gdb/testsuite/lib/dwarf.exp                   |   6 +-
 26 files changed, 681 insertions(+), 683 deletions(-)

diff --git a/gdb/testsuite/gdb.base/until-trailing-insns.exp b/gdb/testsuite/gdb.base/until-trailing-insns.exp
index e87f4a317e7e..ca5b388c0a66 100644
--- a/gdb/testsuite/gdb.base/until-trailing-insns.exp
+++ b/gdb/testsuite/gdb.base/until-trailing-insns.exp
@@ -135,35 +135,35 @@ Dwarf::assemble $asm_file {
 	# of adding some !is_stmt at the end of a loop line, making until
 	# not work properly.
 	program {
-	    {DW_LNE_set_address $main_start}
-	    {line [gdb_get_line_number "TAG: main prologue"]}
-	    {DW_LNS_copy}
-	    {DW_LNE_set_address loop_start}
-	    {line [gdb_get_line_number "TAG: loop line"]}
-	    {DW_LNS_copy}
-	    {DW_LNE_set_address loop_condition}
-	    {line [gdb_get_line_number "TAG: loop line"]}
-	    {DW_LNS_negate_stmt}
-	    {DW_LNS_copy}
-	    {DW_LNE_set_address loop_code}
-	    {line [gdb_get_line_number "TAG: loop code"]}
-	    {DW_LNS_negate_stmt}
-	    {DW_LNS_copy}
-	    {DW_LNE_set_address loop_increment}
-	    {line [gdb_get_line_number "TAG: loop line"]}
-	    {DW_LNS_copy}
-	    {DW_LNE_set_address loop_jump}
-	    {line [gdb_get_line_number "TAG: loop line"]}
-	    {DW_LNS_negate_stmt}
-	    {DW_LNS_copy}
-	    {DW_LNE_set_address main_return}
-	    {line [gdb_get_line_number "TAG: main return"]}
-	    {DW_LNS_negate_stmt}
-	    {DW_LNS_copy}
-	    {DW_LNE_set_address $main_end}
-	    {line [expr [gdb_get_line_number "TAG: main return"] + 1]}
-	    {DW_LNS_copy}
-	    {DW_LNE_end_sequence}
+	    DW_LNE_set_address $main_start
+	    line [gdb_get_line_number "TAG: main prologue"]
+	    DW_LNS_copy
+	    DW_LNE_set_address loop_start
+	    line [gdb_get_line_number "TAG: loop line"]
+	    DW_LNS_copy
+	    DW_LNE_set_address loop_condition
+	    line [gdb_get_line_number "TAG: loop line"]
+	    DW_LNS_negate_stmt
+	    DW_LNS_copy
+	    DW_LNE_set_address loop_code
+	    line [gdb_get_line_number "TAG: loop code"]
+	    DW_LNS_negate_stmt
+	    DW_LNS_copy
+	    DW_LNE_set_address loop_increment
+	    line [gdb_get_line_number "TAG: loop line"]
+	    DW_LNS_copy
+	    DW_LNE_set_address loop_jump
+	    line [gdb_get_line_number "TAG: loop line"]
+	    DW_LNS_negate_stmt
+	    DW_LNS_copy
+	    DW_LNE_set_address main_return
+	    line [gdb_get_line_number "TAG: main return"]
+	    DW_LNS_negate_stmt
+	    DW_LNS_copy
+	    DW_LNE_set_address $main_end
+	    line [expr [gdb_get_line_number "TAG: main return"] + 1]
+	    DW_LNS_copy
+	    DW_LNE_end_sequence
 	}
     }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-bad-elf.exp b/gdb/testsuite/gdb.dwarf2/dw2-bad-elf.exp
index 0adff2868eb0..7b71ed1155ef 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-bad-elf.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-bad-elf.exp
@@ -127,13 +127,13 @@ Dwarf::assemble $asm_file {
 
 	# Line data doens't need to be correct, just present.
 	program {
-	    {DW_LNE_set_address [lindex $main_result 0]}
-	    {DW_LNS_advance_line 10}
-	    {DW_LNS_copy}
-	    {DW_LNS_advance_pc [lindex $main_result 1]}
-	    {DW_LNS_advance_line 19}
-	    {DW_LNS_copy}
-	    {DW_LNE_end_sequence}
+	    DW_LNE_set_address [lindex $main_result 0]
+	    DW_LNS_advance_line 10
+	    DW_LNS_copy
+	    DW_LNS_advance_pc [lindex $main_result 1]
+	    DW_LNS_advance_line 19
+	    DW_LNS_copy
+	    DW_LNE_end_sequence
 	}
     }
 
@@ -143,13 +143,13 @@ Dwarf::assemble $asm_file {
 
 	# Line data doens't need to be correct, just present.
 	program {
-	    {DW_LNE_set_address some_func}
-	    {DW_LNS_advance_line 5}
-	    {DW_LNS_copy}
-	    {DW_LNS_advance_pc 64}
-	    {DW_LNS_advance_line 8}
-	    {DW_LNS_copy}
-	    {DW_LNE_end_sequence}
+	    DW_LNE_set_address some_func
+	    DW_LNS_advance_line 5
+	    DW_LNS_copy
+	    DW_LNS_advance_pc 64
+	    DW_LNS_advance_line 8
+	    DW_LNS_copy
+	    DW_LNE_end_sequence
 	}
     }
 }
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-disasm-over-non-stmt.exp b/gdb/testsuite/gdb.dwarf2/dw2-disasm-over-non-stmt.exp
index ea679c3adc18..5311dd61a4c7 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-disasm-over-non-stmt.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-disasm-over-non-stmt.exp
@@ -68,34 +68,34 @@ Dwarf::assemble $asm_file {
 	file_name "$srcfile3" 1
 
 	program {
-	    {DW_LNE_set_address $main_start}
-	    {DW_LNS_advance_line 15}
-	    {DW_LNS_copy}
-
-	    {DW_LNE_set_address line_label_2}
-	    {DW_LNS_negate_stmt}
-	    {DW_LNS_copy}
-
-	    {DW_LNE_set_address line_label_3}
-	    {DW_LNS_advance_line 1}
-	    {DW_LNS_copy}
-
-	    {DW_LNE_set_address line_label_4}
-	    {DW_LNS_negate_stmt}
-	    {DW_LNS_copy}
-
-	    {DW_LNE_set_address line_label_5}
-	    {DW_LNS_negate_stmt}
-	    {DW_LNS_copy}
-
-	    {DW_LNE_set_address line_label_6}
-	    {DW_LNS_advance_line 1}
-	    {DW_LNS_negate_stmt}
-	    {DW_LNS_copy}
-
-	    {DW_LNE_set_address $main_end}
-	    {DW_LNS_copy}
-	    {DW_LNE_end_sequence}
+	    DW_LNE_set_address $main_start
+	    DW_LNS_advance_line 15
+	    DW_LNS_copy
+
+	    DW_LNE_set_address line_label_2
+	    DW_LNS_negate_stmt
+	    DW_LNS_copy
+
+	    DW_LNE_set_address line_label_3
+	    DW_LNS_advance_line 1
+	    DW_LNS_copy
+
+	    DW_LNE_set_address line_label_4
+	    DW_LNS_negate_stmt
+	    DW_LNS_copy
+
+	    DW_LNE_set_address line_label_5
+	    DW_LNS_negate_stmt
+	    DW_LNS_copy
+
+	    DW_LNE_set_address line_label_6
+	    DW_LNS_advance_line 1
+	    DW_LNS_negate_stmt
+	    DW_LNS_copy
+
+	    DW_LNE_set_address $main_end
+	    DW_LNS_copy
+	    DW_LNE_end_sequence
 	}
     }
 }
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-header-1.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-header-1.exp
index 4ee7433f249d..19f06adef7b2 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-inline-header-1.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-header-1.exp
@@ -119,41 +119,41 @@ proc do_test { start_label func_name tag } {
 	    file_name "$srcfile4" 1
 
 	    program {
-		{DW_LNE_set_address line_label_1}
-		{DW_LNS_advance_line 15}
-		{DW_LNS_copy}
-
-		{DW_LNE_set_address line_label_2}
-		{DW_LNS_advance_line 1}
-		{DW_LNS_copy}
-
-		{DW_LNS_set_file 2}
-		{DW_LNE_set_address line_label_3}
-		{DW_LNS_advance_line 4}
-		{DW_LNS_copy}
-
-		{DW_LNE_set_address line_label_4}
-		{DW_LNS_advance_line 1}
-		{DW_LNS_copy}
-
-		{DW_LNS_advance_line -4}
-		{DW_LNS_set_file 1}
-		{DW_LNS_negate_stmt}
-		{DW_LNS_copy}
-
-		{DW_LNS_set_file 2}
-		{DW_LNE_set_address line_label_5}
-		{DW_LNS_advance_line 5}
-		{DW_LNS_copy}
-
-		{DW_LNS_negate_stmt}
-		{DW_LNS_set_file 1}
-		{DW_LNE_set_address line_label_6}
-		{DW_LNS_advance_line 1}
-		{DW_LNS_copy}
-
-		{DW_LNE_set_address line_label_7}
-		{DW_LNE_end_sequence}
+		DW_LNE_set_address line_label_1
+		DW_LNS_advance_line 15
+		DW_LNS_copy
+
+		DW_LNE_set_address line_label_2
+		DW_LNS_advance_line 1
+		DW_LNS_copy
+
+		DW_LNS_set_file 2
+		DW_LNE_set_address line_label_3
+		DW_LNS_advance_line 4
+		DW_LNS_copy
+
+		DW_LNE_set_address line_label_4
+		DW_LNS_advance_line 1
+		DW_LNS_copy
+
+		DW_LNS_advance_line -4
+		DW_LNS_set_file 1
+		DW_LNS_negate_stmt
+		DW_LNS_copy
+
+		DW_LNS_set_file 2
+		DW_LNE_set_address line_label_5
+		DW_LNS_advance_line 5
+		DW_LNS_copy
+
+		DW_LNS_negate_stmt
+		DW_LNS_set_file 1
+		DW_LNE_set_address line_label_6
+		DW_LNS_advance_line 1
+		DW_LNS_copy
+
+		DW_LNE_set_address line_label_7
+		DW_LNE_end_sequence
 	    }
 	}
     }
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-header-2.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-header-2.exp
index a8014489d9d3..198f35539979 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-inline-header-2.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-header-2.exp
@@ -109,39 +109,39 @@ Dwarf::assemble $asm_file {
 	file_name "$srcfile4" 1
 
 	program {
-	    {DW_LNE_set_address line_label_1}
-	    {DW_LNS_advance_line 15}
-	    {DW_LNS_copy}
-
-	    {DW_LNE_set_address line_label_2}
-	    {DW_LNS_advance_line 1}
-	    {DW_LNS_copy}
-
-	    {DW_LNS_set_file 2}
-	    {DW_LNE_set_address line_label_3}
-	    {DW_LNS_advance_line 4}
-	    {DW_LNS_copy}
-
-	    {DW_LNE_set_address line_label_4}
-	    {DW_LNS_advance_line 1}
-	    {DW_LNS_copy}
-
-	    {DW_LNS_advance_line -4}
-	    {DW_LNS_set_file 1}
-	    {DW_LNS_negate_stmt}
-	    {DW_LNS_copy}
-
-	    {DW_LNE_set_address line_label_5}
-	    {DW_LNS_advance_line 1}
-	    {DW_LNS_negate_stmt}
-	    {DW_LNS_copy}
-
-	    {DW_LNE_set_address line_label_6}
-	    {DW_LNS_advance_line 1}
-	    {DW_LNS_copy}
-
-	    {DW_LNE_set_address line_label_7}
-	    {DW_LNE_end_sequence}
+	    DW_LNE_set_address line_label_1
+	    DW_LNS_advance_line 15
+	    DW_LNS_copy
+
+	    DW_LNE_set_address line_label_2
+	    DW_LNS_advance_line 1
+	    DW_LNS_copy
+
+	    DW_LNS_set_file 2
+	    DW_LNE_set_address line_label_3
+	    DW_LNS_advance_line 4
+	    DW_LNS_copy
+
+	    DW_LNE_set_address line_label_4
+	    DW_LNS_advance_line 1
+	    DW_LNS_copy
+
+	    DW_LNS_advance_line -4
+	    DW_LNS_set_file 1
+	    DW_LNS_negate_stmt
+	    DW_LNS_copy
+
+	    DW_LNE_set_address line_label_5
+	    DW_LNS_advance_line 1
+	    DW_LNS_negate_stmt
+	    DW_LNS_copy
+
+	    DW_LNE_set_address line_label_6
+	    DW_LNS_advance_line 1
+	    DW_LNS_copy
+
+	    DW_LNE_set_address line_label_7
+	    DW_LNE_end_sequence
 	}
     }
 }
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-header-3.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-header-3.exp
index 8f36e4f52195..68261aa78b0a 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-inline-header-3.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-header-3.exp
@@ -98,39 +98,39 @@ Dwarf::assemble $asm_file {
 	file_name "$srcfile4" 1
 
 	program {
-	    {DW_LNE_set_address line_label_1}
-	    {DW_LNS_advance_line 15}
-	    {DW_LNS_copy}
-
-	    {DW_LNE_set_address line_label_2}
-	    {DW_LNS_advance_line 1}
-	    {DW_LNS_copy}
-
-	    {DW_LNS_set_file 2}
-	    {DW_LNE_set_address line_label_3}
-	    {DW_LNS_advance_line 4}
-	    {DW_LNS_copy}
-
-	    {DW_LNE_set_address line_label_4}
-	    {DW_LNS_advance_line 1}
-	    {DW_LNS_copy}
-
-	    {DW_LNS_advance_line -4}
-	    {DW_LNS_set_file 1}
-	    {DW_LNS_negate_stmt}
-	    {DW_LNS_copy}
-
-	    {DW_LNE_set_address line_label_5}
-	    {DW_LNS_advance_line 1}
-	    {DW_LNS_copy}
-
-	    {DW_LNE_set_address line_label_6}
-	    {DW_LNS_advance_line 1}
-	    {DW_LNS_negate_stmt}
-	    {DW_LNS_copy}
-
-	    {DW_LNE_set_address line_label_7}
-	    {DW_LNE_end_sequence}
+	    DW_LNE_set_address line_label_1
+	    DW_LNS_advance_line 15
+	    DW_LNS_copy
+
+	    DW_LNE_set_address line_label_2
+	    DW_LNS_advance_line 1
+	    DW_LNS_copy
+
+	    DW_LNS_set_file 2
+	    DW_LNE_set_address line_label_3
+	    DW_LNS_advance_line 4
+	    DW_LNS_copy
+
+	    DW_LNE_set_address line_label_4
+	    DW_LNS_advance_line 1
+	    DW_LNS_copy
+
+	    DW_LNS_advance_line -4
+	    DW_LNS_set_file 1
+	    DW_LNS_negate_stmt
+	    DW_LNS_copy
+
+	    DW_LNE_set_address line_label_5
+	    DW_LNS_advance_line 1
+	    DW_LNS_copy
+
+	    DW_LNE_set_address line_label_6
+	    DW_LNS_advance_line 1
+	    DW_LNS_negate_stmt
+	    DW_LNS_copy
+
+	    DW_LNE_set_address line_label_7
+	    DW_LNE_end_sequence
 	}
     }
 }
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-many-frames.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-many-frames.exp
index 483b197448c6..9055244979db 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-inline-many-frames.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-many-frames.exp
@@ -187,95 +187,95 @@ Dwarf::assemble $asm_file {
 	file_name "$srcfile" 1
 
 	program {
-	    {DW_LNE_set_address $main_start}
-	    {line [gdb_get_line_number "main prologue"]}
-	    {DW_LNS_copy}
-	    {DW_LNE_set_address main_label}
-	    {line [gdb_get_line_number "main set global_var"]}
-	    {DW_LNS_copy}
-	    {DW_LNE_set_address main_label2}
-	    {line [gdb_get_line_number "main call aaa"]}
-	    {DW_LNS_copy}
-	    {DW_LNE_set_address main_label2}
-	    {line [gdb_get_line_number "aaa return"]}
-	    {DW_LNS_copy}
-	    {DW_LNE_set_address main_label2}
-	    {line [gdb_get_line_number "bbb return"]}
-	    {DW_LNS_copy}
-	    {DW_LNE_set_address main_label2}
-	    {line [gdb_get_line_number "ccc return"]}
-	    {DW_LNS_copy}
-	    {DW_LNE_set_address main_label3}
-	    {line [gdb_get_line_number "main end"]}
-	    {DW_LNS_copy}
-	    {DW_LNE_set_address $main_end}
-	    {DW_LNE_end_sequence}
+	    DW_LNE_set_address $main_start
+	    line [gdb_get_line_number "main prologue"]
+	    DW_LNS_copy
+	    DW_LNE_set_address main_label
+	    line [gdb_get_line_number "main set global_var"]
+	    DW_LNS_copy
+	    DW_LNE_set_address main_label2
+	    line [gdb_get_line_number "main call aaa"]
+	    DW_LNS_copy
+	    DW_LNE_set_address main_label2
+	    line [gdb_get_line_number "aaa return"]
+	    DW_LNS_copy
+	    DW_LNE_set_address main_label2
+	    line [gdb_get_line_number "bbb return"]
+	    DW_LNS_copy
+	    DW_LNE_set_address main_label2
+	    line [gdb_get_line_number "ccc return"]
+	    DW_LNS_copy
+	    DW_LNE_set_address main_label3
+	    line [gdb_get_line_number "main end"]
+	    DW_LNS_copy
+	    DW_LNE_set_address $main_end
+	    DW_LNE_end_sequence
 
-	    {DW_LNE_set_address $ddd_start}
-	    {line [gdb_get_line_number "ddd prologue"]}
-	    {DW_LNS_copy}
-	    {DW_LNE_set_address ddd_label}
-	    {line [gdb_get_line_number "ddd return"]}
-	    {DW_LNS_copy}
-	    {DW_LNE_set_address ddd_label2}
-	    {line [gdb_get_line_number "ddd end"]}
-	    {DW_LNS_copy}
-	    {DW_LNE_set_address $ddd_end}
-	    {DW_LNE_end_sequence}
+	    DW_LNE_set_address $ddd_start
+	    line [gdb_get_line_number "ddd prologue"]
+	    DW_LNS_copy
+	    DW_LNE_set_address ddd_label
+	    line [gdb_get_line_number "ddd return"]
+	    DW_LNS_copy
+	    DW_LNE_set_address ddd_label2
+	    line [gdb_get_line_number "ddd end"]
+	    DW_LNS_copy
+	    DW_LNE_set_address $ddd_end
+	    DW_LNE_end_sequence
 
-	    {DW_LNE_set_address $eee_start}
-	    {line [gdb_get_line_number "eee prologue"]}
-	    {DW_LNS_copy}
-	    {DW_LNE_set_address eee_label}
-	    {line [gdb_get_line_number "eee return"]}
-	    {DW_LNS_copy}
-	    {DW_LNE_set_address eee_label2}
-	    {line [gdb_get_line_number "eee end"]}
-	    {DW_LNS_copy}
-	    {DW_LNE_set_address $eee_end}
-	    {DW_LNE_end_sequence}
+	    DW_LNE_set_address $eee_start
+	    line [gdb_get_line_number "eee prologue"]
+	    DW_LNS_copy
+	    DW_LNE_set_address eee_label
+	    line [gdb_get_line_number "eee return"]
+	    DW_LNS_copy
+	    DW_LNE_set_address eee_label2
+	    line [gdb_get_line_number "eee end"]
+	    DW_LNS_copy
+	    DW_LNE_set_address $eee_end
+	    DW_LNE_end_sequence
 
-	    {DW_LNE_set_address $fff_start}
-	    {line [gdb_get_line_number "fff prologue"]}
-	    {DW_LNS_copy}
-	    {DW_LNE_set_address fff_label}
-	    {line [gdb_get_line_number "fff return"]}
-	    {DW_LNS_copy}
-	    {DW_LNE_set_address fff_label}
-	    {line [gdb_get_line_number "ggg return"]}
-	    {DW_LNS_copy}
-	    {DW_LNE_set_address fff_label}
-	    {line [gdb_get_line_number "hhh return"]}
-	    {DW_LNS_copy}
-	    {DW_LNE_set_address fff_label}
-	    {line [gdb_get_line_number "iii return"]}
-	    {DW_LNS_copy}
-	    {DW_LNE_set_address fff_label2}
-	    {line [gdb_get_line_number "fff end"]}
-	    {DW_LNS_copy}
-	    {DW_LNE_set_address $fff_end}
-	    {DW_LNE_end_sequence}
+	    DW_LNE_set_address $fff_start
+	    line [gdb_get_line_number "fff prologue"]
+	    DW_LNS_copy
+	    DW_LNE_set_address fff_label
+	    line [gdb_get_line_number "fff return"]
+	    DW_LNS_copy
+	    DW_LNE_set_address fff_label
+	    line [gdb_get_line_number "ggg return"]
+	    DW_LNS_copy
+	    DW_LNE_set_address fff_label
+	    line [gdb_get_line_number "hhh return"]
+	    DW_LNS_copy
+	    DW_LNE_set_address fff_label
+	    line [gdb_get_line_number "iii return"]
+	    DW_LNS_copy
+	    DW_LNE_set_address fff_label2
+	    line [gdb_get_line_number "fff end"]
+	    DW_LNS_copy
+	    DW_LNE_set_address $fff_end
+	    DW_LNE_end_sequence
 
-	    {DW_LNE_set_address $jjj_start}
-	    {line [gdb_get_line_number "jjj prologue"]}
-	    {DW_LNS_copy}
-	    {DW_LNE_set_address jjj_label}
-	    {line [gdb_get_line_number "jjj return"]}
-	    {DW_LNS_copy}
-	    {DW_LNE_set_address jjj_label2}
-	    {line [gdb_get_line_number "jjj end"]}
-	    {DW_LNS_copy}
-	    {DW_LNE_set_address $jjj_end}
-	    {DW_LNE_end_sequence}
+	    DW_LNE_set_address $jjj_start
+	    line [gdb_get_line_number "jjj prologue"]
+	    DW_LNS_copy
+	    DW_LNE_set_address jjj_label
+	    line [gdb_get_line_number "jjj return"]
+	    DW_LNS_copy
+	    DW_LNE_set_address jjj_label2
+	    line [gdb_get_line_number "jjj end"]
+	    DW_LNS_copy
+	    DW_LNE_set_address $jjj_end
+	    DW_LNE_end_sequence
 
-	    {DW_LNE_set_address $kkk_start}
-	    {line [gdb_get_line_number "kkk prologue"]}
-	    {DW_LNS_copy}
-	    {DW_LNE_set_address kkk_label}
-	    {line [gdb_get_line_number "kkk return"]}
-	    {DW_LNS_copy}
-	    {DW_LNE_set_address $kkk_end}
-	    {DW_LNE_end_sequence}
+	    DW_LNE_set_address $kkk_start
+	    line [gdb_get_line_number "kkk prologue"]
+	    DW_LNS_copy
+	    DW_LNE_set_address kkk_label
+	    line [gdb_get_line_number "kkk return"]
+	    DW_LNS_copy
+	    DW_LNE_set_address $kkk_end
+	    DW_LNE_end_sequence
 	}
     }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-small-func.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-small-func.exp
index c480422b7554..05286ad6d2fb 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-inline-small-func.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-small-func.exp
@@ -94,28 +94,28 @@ Dwarf::assemble $asm_file {
 	set f2_l1 [gdb_get_line_number "callee: body" $srcfile4]
 
 	program {
-	    {DW_LNE_set_address line_label_1}
-	    {line $f1_l1}
-	    {DW_LNS_copy}
+	    DW_LNE_set_address line_label_1
+	    line $f1_l1
+	    DW_LNS_copy
 
-	    {line ${f1_l2}}
-	    {DW_LNS_copy}
+	    line ${f1_l2}
+	    DW_LNS_copy
 
-	    {DW_LNS_set_file 2}
-	    {line ${f2_l1}}
-	    {DW_LNS_copy}
+	    DW_LNS_set_file 2
+	    line ${f2_l1}
+	    DW_LNS_copy
 
-	    {DW_LNS_negate_stmt}
-	    {DW_LNS_copy}
+	    DW_LNS_negate_stmt
+	    DW_LNS_copy
 
-	    {DW_LNS_set_file 1}
-	    {DW_LNE_set_address line_label_2}
-	    {line ${f1_l3}}
-	    {DW_LNS_copy}
+	    DW_LNS_set_file 1
+	    DW_LNE_set_address line_label_2
+	    line ${f1_l3}
+	    DW_LNS_copy
 
-	    {DW_LNE_set_address line_label_3}
-	    {DW_LNS_copy}
-	    {DW_LNE_end_sequence}
+	    DW_LNE_set_address line_label_3
+	    DW_LNS_copy
+	    DW_LNE_end_sequence
 	}
     }
 }
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-stepping.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-stepping.exp
index aafca3015e67..bd90715c1982 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-inline-stepping.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-stepping.exp
@@ -94,29 +94,29 @@ Dwarf::assemble $asm_file {
 	file_name "$srcfile" 1
 
 	program {
-	    {DW_LNE_set_address $main_start}
-	    {line [gdb_get_line_number "main prologue"]}
-	    {DW_LNS_copy}
-	    {DW_LNE_set_address main_label}
-	    {line [gdb_get_line_number "main set global_var"]}
-	    {DW_LNS_copy}
-	    {DW_LNE_set_address main_label2}
-	    {line [gdb_get_line_number "main call foo"]}
-	    {DW_LNS_copy}
-	    {DW_LNE_set_address main_label2}
-	    {line [gdb_get_line_number "foo call bar"]}
-	    {DW_LNS_copy}
-	    {DW_LNE_set_address $main_end}
-	    {DW_LNE_end_sequence}
-
-	    {DW_LNE_set_address $bar_start}
-	    {line [gdb_get_line_number "bar prologue"]}
-	    {DW_LNS_copy}
-	    {DW_LNE_set_address bar_label}
-	    {line [gdb_get_line_number "bar return global_var"]}
-	    {DW_LNS_copy}
-	    {DW_LNE_set_address $bar_end}
-	    {DW_LNE_end_sequence}
+	    DW_LNE_set_address $main_start
+	    line [gdb_get_line_number "main prologue"]
+	    DW_LNS_copy
+	    DW_LNE_set_address main_label
+	    line [gdb_get_line_number "main set global_var"]
+	    DW_LNS_copy
+	    DW_LNE_set_address main_label2
+	    line [gdb_get_line_number "main call foo"]
+	    DW_LNS_copy
+	    DW_LNE_set_address main_label2
+	    line [gdb_get_line_number "foo call bar"]
+	    DW_LNS_copy
+	    DW_LNE_set_address $main_end
+	    DW_LNE_end_sequence
+
+	    DW_LNE_set_address $bar_start
+	    line [gdb_get_line_number "bar prologue"]
+	    DW_LNS_copy
+	    DW_LNE_set_address bar_label
+	    line [gdb_get_line_number "bar return global_var"]
+	    DW_LNS_copy
+	    DW_LNE_set_address $bar_end
+	    DW_LNE_end_sequence
 	}
     }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-with-lexical-scope.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-with-lexical-scope.exp
index 485f3aef9567..61fd5d4fed82 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-inline-with-lexical-scope.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-with-lexical-scope.exp
@@ -110,20 +110,20 @@ Dwarf::assemble $asm_file {
 	file_name "$srcfile" 1
 
 	program {
-	    {DW_LNE_set_address $main_start}
-	    {line [gdb_get_line_number "main prologue"]}
-	    {DW_LNS_copy}
-	    {DW_LNE_set_address main_label}
-	    {line [gdb_get_line_number "func call"]}
-	    {DW_LNS_copy}
-	    {DW_LNE_set_address main_label}
-	    {line [gdb_get_line_number "func end"]}
-	    {DW_LNS_copy}
-	    {DW_LNE_set_address main_label2}
-	    {line [gdb_get_line_number "main end"]}
-	    {DW_LNS_copy}
-	    {DW_LNE_set_address $main_end}
-	    {DW_LNE_end_sequence}
+	    DW_LNE_set_address $main_start
+	    line [gdb_get_line_number "main prologue"]
+	    DW_LNS_copy
+	    DW_LNE_set_address main_label
+	    line [gdb_get_line_number "func call"]
+	    DW_LNS_copy
+	    DW_LNE_set_address main_label
+	    line [gdb_get_line_number "func end"]
+	    DW_LNS_copy
+	    DW_LNE_set_address main_label2
+	    line [gdb_get_line_number "main end"]
+	    DW_LNS_copy
+	    DW_LNE_set_address $main_end
+	    DW_LNE_end_sequence
 	}
     }
 }
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-is-stmt-2.exp b/gdb/testsuite/gdb.dwarf2/dw2-is-stmt-2.exp
index 3ec9f8071604..239f5f1d9e96 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-is-stmt-2.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-is-stmt-2.exp
@@ -68,84 +68,84 @@ Dwarf::assemble $asm_file {
 	file_name "$srcfile" 1
 
 	program {
-	    {DW_LNE_set_address main}
-	    {line [gdb_get_line_number "main prologue"]}
-	    {DW_LNS_copy}
-
-	    {DW_LNE_set_address line_label_0}
-	    {line [gdb_get_line_number "main start"]}
-	    {DW_LNS_copy}
-
-	    {DW_LNE_set_address line_label_1}
-	    {line [gdb_get_line_number "Line 1"]}
-	    {DW_LNS_negate_stmt}
-	    {DW_LNS_copy}
-
-	    {DW_LNE_set_address line_label_2}
-	    {DW_LNS_negate_stmt}
-	    {DW_LNS_copy}
-
-	    {DW_LNE_set_address line_label_3}
-	    {line [gdb_get_line_number "Line 2"]}
-	    {DW_LNS_negate_stmt}
-	    {DW_LNS_copy}
-
-	    {DW_LNE_set_address line_label_4}
-	    {line [gdb_get_line_number "Line 1"]}
-	    {DW_LNS_copy}
-
-	    {DW_LNE_set_address line_label_5}
-	    {line [gdb_get_line_number "Line 3"]}
-	    {DW_LNS_copy}
-
-	    {DW_LNE_set_address line_label_6}
-	    {line [gdb_get_line_number "Line 4"]}
-	    {DW_LNS_copy}
-
-	    {DW_LNE_set_address line_label_7}
-	    {DW_LNS_negate_stmt}
-	    {DW_LNS_copy}
-
-	    {DW_LNE_set_address line_label_8}
-	    {line [gdb_get_line_number "Line 2"]}
-	    {DW_LNS_copy}
-
-	    {DW_LNE_set_address line_label_9}
-	    {DW_LNS_negate_stmt}
-	    {DW_LNS_copy}
-
-	    {DW_LNE_set_address line_label_10}
-	    {line [gdb_get_line_number "Line 3"]}
-	    {DW_LNS_copy}
-
-	    {DW_LNE_set_address line_label_11}
-	    {line [gdb_get_line_number "Line 5"]}
-	    {DW_LNS_copy}
-
-	    {DW_LNE_set_address line_label_12}
-	    {DW_LNS_negate_stmt}
-	    {DW_LNS_copy}
-
-	    {DW_LNE_set_address line_label_13}
-	    {line [gdb_get_line_number "Line 3"]}
-	    {DW_LNS_copy}
-
-	    {DW_LNE_set_address line_label_14}
-	    {line [gdb_get_line_number "Line 4"]}
-	    {DW_LNS_negate_stmt}
-	    {DW_LNS_copy}
-
-	    {DW_LNE_set_address line_label_15}
-	    {line [gdb_get_line_number "Line 5"]}
-	    {DW_LNS_copy}
-
-	    {DW_LNE_set_address line_label_16}
-	    {line [gdb_get_line_number "main end"]}
-	    {DW_LNS_negate_stmt}
-	    {DW_LNS_copy}
-
-	    {DW_LNE_set_address ${main_end}}
-	    {DW_LNE_end_sequence}
+	    DW_LNE_set_address main
+	    line [gdb_get_line_number "main prologue"]
+	    DW_LNS_copy
+
+	    DW_LNE_set_address line_label_0
+	    line [gdb_get_line_number "main start"]
+	    DW_LNS_copy
+
+	    DW_LNE_set_address line_label_1
+	    line [gdb_get_line_number "Line 1"]
+	    DW_LNS_negate_stmt
+	    DW_LNS_copy
+
+	    DW_LNE_set_address line_label_2
+	    DW_LNS_negate_stmt
+	    DW_LNS_copy
+
+	    DW_LNE_set_address line_label_3
+	    line [gdb_get_line_number "Line 2"]
+	    DW_LNS_negate_stmt
+	    DW_LNS_copy
+
+	    DW_LNE_set_address line_label_4
+	    line [gdb_get_line_number "Line 1"]
+	    DW_LNS_copy
+
+	    DW_LNE_set_address line_label_5
+	    line [gdb_get_line_number "Line 3"]
+	    DW_LNS_copy
+
+	    DW_LNE_set_address line_label_6
+	    line [gdb_get_line_number "Line 4"]
+	    DW_LNS_copy
+
+	    DW_LNE_set_address line_label_7
+	    DW_LNS_negate_stmt
+	    DW_LNS_copy
+
+	    DW_LNE_set_address line_label_8
+	    line [gdb_get_line_number "Line 2"]
+	    DW_LNS_copy
+
+	    DW_LNE_set_address line_label_9
+	    DW_LNS_negate_stmt
+	    DW_LNS_copy
+
+	    DW_LNE_set_address line_label_10
+	    line [gdb_get_line_number "Line 3"]
+	    DW_LNS_copy
+
+	    DW_LNE_set_address line_label_11
+	    line [gdb_get_line_number "Line 5"]
+	    DW_LNS_copy
+
+	    DW_LNE_set_address line_label_12
+	    DW_LNS_negate_stmt
+	    DW_LNS_copy
+
+	    DW_LNE_set_address line_label_13
+	    line [gdb_get_line_number "Line 3"]
+	    DW_LNS_copy
+
+	    DW_LNE_set_address line_label_14
+	    line [gdb_get_line_number "Line 4"]
+	    DW_LNS_negate_stmt
+	    DW_LNS_copy
+
+	    DW_LNE_set_address line_label_15
+	    line [gdb_get_line_number "Line 5"]
+	    DW_LNS_copy
+
+	    DW_LNE_set_address line_label_16
+	    line [gdb_get_line_number "main end"]
+	    DW_LNS_negate_stmt
+	    DW_LNS_copy
+
+	    DW_LNE_set_address ${main_end}
+	    DW_LNE_end_sequence
 	}
     }
 }
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-is-stmt.exp b/gdb/testsuite/gdb.dwarf2/dw2-is-stmt.exp
index 9a9fc8cca646..c449757becb4 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-is-stmt.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-is-stmt.exp
@@ -68,35 +68,35 @@ Dwarf::assemble $asm_file {
 	file_name "$srcfile" 1
 
 	program {
-	    {DW_LNE_set_address main}
-	    {line [gdb_get_line_number "main prologue"]}
-	    {DW_LNS_negate_stmt}
-	    {DW_LNS_copy}
-
-	    {DW_LNE_set_address line_label_1}
-	    {line [gdb_get_line_number "main, set var to 99"]}
-	    {DW_LNS_copy}
-
-	    {DW_LNE_set_address line_label_2}
-	    {line [gdb_get_line_number "main, set var to 0"]}
-	    {DW_LNS_negate_stmt}
-	    {DW_LNS_copy}
-
-	    {DW_LNE_set_address line_label_3}
-	    {DW_LNS_negate_stmt}
-	    {DW_LNS_copy}
-
-	    {DW_LNE_set_address line_label_4}
-	    {DW_LNS_negate_stmt}
-	    {DW_LNS_copy}
-
-	    {DW_LNE_set_address line_label_5}
-	    {line [gdb_get_line_number "main end"]}
-	    {DW_LNS_negate_stmt}
-	    {DW_LNS_copy}
-
-	    {DW_LNE_set_address ${main_end}}
-	    {DW_LNE_end_sequence}
+	    DW_LNE_set_address main
+	    line [gdb_get_line_number "main prologue"]
+	    DW_LNS_negate_stmt
+	    DW_LNS_copy
+
+	    DW_LNE_set_address line_label_1
+	    line [gdb_get_line_number "main, set var to 99"]
+	    DW_LNS_copy
+
+	    DW_LNE_set_address line_label_2
+	    line [gdb_get_line_number "main, set var to 0"]
+	    DW_LNS_negate_stmt
+	    DW_LNS_copy
+
+	    DW_LNE_set_address line_label_3
+	    DW_LNS_negate_stmt
+	    DW_LNS_copy
+
+	    DW_LNE_set_address line_label_4
+	    DW_LNS_negate_stmt
+	    DW_LNS_copy
+
+	    DW_LNE_set_address line_label_5
+	    line [gdb_get_line_number "main end"]
+	    DW_LNS_negate_stmt
+	    DW_LNS_copy
+
+	    DW_LNE_set_address ${main_end}
+	    DW_LNE_end_sequence
 	}
     }
 }
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-line-number-zero.exp b/gdb/testsuite/gdb.dwarf2/dw2-line-number-zero.exp
index ec15694bb583..0c5eed9814f4 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-line-number-zero.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-line-number-zero.exp
@@ -62,46 +62,46 @@ Dwarf::assemble $asm_file {
 	file_name "$srcfile" 1
 
 	program {
-	    {DW_LNE_set_address bar1_label}
-	    {line 27}
-	    {DW_LNS_copy}
+	    DW_LNE_set_address bar1_label
+	    line 27
+	    DW_LNS_copy
 
-	    {DW_LNE_set_address bar1_label_2}
-	    {line 29}
-	    {DW_LNS_copy}
+	    DW_LNE_set_address bar1_label_2
+	    line 29
+	    DW_LNS_copy
 
-	    {DW_LNE_set_address bar1_label_3}
-	    {line 0}
-	    {DW_LNS_copy}
+	    DW_LNE_set_address bar1_label_3
+	    line 0
+	    DW_LNS_copy
 
-	    {DW_LNE_set_address bar1_label_4}
-	    {line 33}
-	    {DW_LNS_copy}
+	    DW_LNE_set_address bar1_label_4
+	    line 33
+	    DW_LNS_copy
 
-	    {DW_LNE_set_address bar1_label_5}
-	    {DW_LNE_end_sequence}
+	    DW_LNE_set_address bar1_label_5
+	    DW_LNE_end_sequence
 
 
-	    {DW_LNE_set_address bar2_label}
-	    {line 41}
-	    {DW_LNS_copy}
+	    DW_LNE_set_address bar2_label
+	    line 41
+	    DW_LNS_copy
 
-	    {DW_LNE_set_address bar2_label_2}
-	    {line 43}
-	    {DW_LNS_copy}
+	    DW_LNE_set_address bar2_label_2
+	    line 43
+	    DW_LNS_copy
 
-	    {DW_LNE_set_address bar2_label_3}
-	    {line 0}
-	    {DW_LNS_negate_stmt}
-	    {DW_LNS_copy}
-	    {DW_LNS_negate_stmt}
+	    DW_LNE_set_address bar2_label_3
+	    line 0
+	    DW_LNS_negate_stmt
+	    DW_LNS_copy
+	    DW_LNS_negate_stmt
 
-	    {DW_LNE_set_address bar2_label_4}
-	    {line 47}
-	    {DW_LNS_copy}
+	    DW_LNE_set_address bar2_label_4
+	    line 47
+	    DW_LNS_copy
 
-	    {DW_LNE_set_address bar2_label_5}
-	    {DW_LNE_end_sequence}
+	    DW_LNE_set_address bar2_label_5
+	    DW_LNE_end_sequence
 	}
     }
 }
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-lines.exp b/gdb/testsuite/gdb.dwarf2/dw2-lines.exp
index c1be18aa88cf..e36064460fd3 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-lines.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-lines.exp
@@ -83,24 +83,24 @@ proc test_1 { _cv _cdw64 _lv _ldw64 {_string_form ""}} {
 	    file_name "$srcfile" 1
 
 	    program {
-		{DW_LNE_set_address bar_label}
-		{line [line_for bar_label]}
-		{DW_LNS_copy}
+		DW_LNE_set_address bar_label
+		line [line_for bar_label]
+		DW_LNS_copy
 
-		{DW_LNE_set_address bar_label_2}
-		{line [line_for bar_label_2]}
-		{DW_LNS_copy}
+		DW_LNE_set_address bar_label_2
+		line [line_for bar_label_2]
+		DW_LNS_copy
 
-		{DW_LNE_set_address bar_label_3}
-		{line [line_for bar_label_3]}
-		{DW_LNS_copy}
+		DW_LNE_set_address bar_label_3
+		line [line_for bar_label_3]
+		DW_LNS_copy
 
-		{DW_LNE_set_address bar_label_4}
-		{line [line_for bar_label_4]}
-		{DW_LNS_copy}
+		DW_LNE_set_address bar_label_4
+		line [line_for bar_label_4]
+		DW_LNS_copy
 
-		{DW_LNE_set_address bar_label_5}
-		{DW_LNE_end_sequence}
+		DW_LNE_set_address bar_label_5
+		DW_LNE_end_sequence
 	    }
 	}
     }
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-out-of-range-end-of-seq.exp b/gdb/testsuite/gdb.dwarf2/dw2-out-of-range-end-of-seq.exp
index 23df111e73ad..b8da03ddb3d9 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-out-of-range-end-of-seq.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-out-of-range-end-of-seq.exp
@@ -58,19 +58,19 @@ Dwarf::assemble $asm_file {
 	file_name "$srcfile" 1
 
 	program {
-	    {DW_LNE_set_address main_label}
-	    {line 1}
-	    {DW_LNS_copy}
+	    DW_LNE_set_address main_label
+	    line 1
+	    DW_LNS_copy
 
-	    {DW_LNS_advance_pc 1}
-	    {DW_LNE_end_sequence}
+	    DW_LNS_advance_pc 1
+	    DW_LNE_end_sequence
 
-	    {DW_LNE_set_address 0}
-	    {line 2}
-	    {DW_LNS_copy}
+	    DW_LNE_set_address 0
+	    line 2
+	    DW_LNS_copy
 
-	    {DW_LNS_advance_pc 1}
-	    {DW_LNE_end_sequence}
+	    DW_LNS_advance_pc 1
+	    DW_LNE_end_sequence
 	}
     }
 }
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-prologue-end.exp b/gdb/testsuite/gdb.dwarf2/dw2-prologue-end.exp
index b5f8bcc4b505..7fd1bd781328 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-prologue-end.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-prologue-end.exp
@@ -52,28 +52,28 @@ Dwarf::assemble $asm_file {
 	file_name "$srcfile" 1
 
 	program {
-	    {DW_LNE_set_address $main_start}
-	    {line [gdb_get_line_number "main prologue"]}
-	    {DW_LNS_copy}
+	    DW_LNE_set_address $main_start
+	    line [gdb_get_line_number "main prologue"]
+	    DW_LNS_copy
 
-	    {DW_LNE_set_address main_label}
-	    {line [gdb_get_line_number "main assign m"]}
-	    {DW_LNS_copy}
+	    DW_LNE_set_address main_label
+	    line [gdb_get_line_number "main assign m"]
+	    DW_LNS_copy
 
-	    {DW_LNE_set_address main_assign_n}
-	    {line [gdb_get_line_number "main assign n"]}
-	    {DW_LNS_copy}
+	    DW_LNE_set_address main_assign_n
+	    line [gdb_get_line_number "main assign n"]
+	    DW_LNS_copy
 
-	    {DW_LNE_set_address main_end_prologue}
-	    {line [gdb_get_line_number "main assign o"]}
-	    {DW_LNS_set_prologue_end}
-	    {DW_LNS_copy}
+	    DW_LNE_set_address main_end_prologue
+	    line [gdb_get_line_number "main assign o"]
+	    DW_LNS_set_prologue_end
+	    DW_LNS_copy
 
-	    {DW_LNE_set_address main_end}
-	    {line [gdb_get_line_number "main end"]}
-	    {DW_LNS_copy}
+	    DW_LNE_set_address main_end
+	    line [gdb_get_line_number "main end"]
+	    DW_LNS_copy
 
-	    {DW_LNE_end_sequence}
+	    DW_LNE_end_sequence
 	}
     }
 }
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ranges-base.exp b/gdb/testsuite/gdb.dwarf2/dw2-ranges-base.exp
index ec31f1f9d234..17530c8cc4b9 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-ranges-base.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-ranges-base.exp
@@ -84,29 +84,29 @@ Dwarf::assemble $asm_file {
 	# table data associated with it.  We do make use of the fake
 	# line numbers that we pick here in the tests below.
 	program {
-	    {DW_LNE_set_address [lindex $main_func 0]}
-	    {DW_LNS_advance_line 10}
-	    {DW_LNS_copy}
-	    {DW_LNS_advance_pc [lindex $main_func 1]}
-	    {DW_LNS_advance_line 19}
-	    {DW_LNS_copy}
-	    {DW_LNE_end_sequence}
-
-	    {DW_LNE_set_address [lindex $frame2_func 0]}
-	    {DW_LNS_advance_line 20}
-	    {DW_LNS_copy}
-	    {DW_LNS_advance_pc [lindex $frame2_func 1]}
-	    {DW_LNS_advance_line 29}
-	    {DW_LNS_copy}
-	    {DW_LNE_end_sequence}
-
-	    {DW_LNE_set_address [lindex $frame3_func 0]}
-	    {DW_LNS_advance_line 30}
-	    {DW_LNS_copy}
-	    {DW_LNS_advance_pc [lindex $frame3_func 1]}
-	    {DW_LNS_advance_line 39}
-	    {DW_LNS_copy}
-	    {DW_LNE_end_sequence}
+	    DW_LNE_set_address [lindex $main_func 0]
+	    DW_LNS_advance_line 10
+	    DW_LNS_copy
+	    DW_LNS_advance_pc [lindex $main_func 1]
+	    DW_LNS_advance_line 19
+	    DW_LNS_copy
+	    DW_LNE_end_sequence
+
+	    DW_LNE_set_address [lindex $frame2_func 0]
+	    DW_LNS_advance_line 20
+	    DW_LNS_copy
+	    DW_LNS_advance_pc [lindex $frame2_func 1]
+	    DW_LNS_advance_line 29
+	    DW_LNS_copy
+	    DW_LNE_end_sequence
+
+	    DW_LNE_set_address [lindex $frame3_func 0]
+	    DW_LNS_advance_line 30
+	    DW_LNS_copy
+	    DW_LNS_advance_pc [lindex $frame3_func 1]
+	    DW_LNS_advance_line 39
+	    DW_LNS_copy
+	    DW_LNE_end_sequence
 	}
     }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ranges-func.exp b/gdb/testsuite/gdb.dwarf2/dw2-ranges-func.exp
index b6077e0c6760..aa95dae6bfcd 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-ranges-func.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-ranges-func.exp
@@ -133,66 +133,66 @@ proc do_test {suffix} {
 	    # Generate a line table program.  An attempt was made to make it
 	    # reasonably accurate as it made debugging the test case easier.
 	    program {
-		{DW_LNE_set_address $main_start}
-		{line [gdb_get_line_number "main prologue"]}
-		{DW_LNS_copy}
-		{DW_LNE_set_address main_label}
-		{line [gdb_get_line_number "main foo call"]}
-		{DW_LNS_copy}
-		{DW_LNE_set_address main_label2}
-		{line [gdb_get_line_number "main return"]}
-		{DW_LNS_copy}
-		{DW_LNE_set_address $main_end}
-		{line [expr [gdb_get_line_number "main end"] + 1]}
-		{DW_LNS_copy}
-		{DW_LNE_end_sequence}
-
-		{DW_LNE_set_address $foo_start}
-		{line [gdb_get_line_number "foo prologue"]}
-		{DW_LNS_copy}
-		{DW_LNE_set_address foo_label}
-		{line [gdb_get_line_number "foo bar call"]}
-		{DW_LNS_copy}
-		{DW_LNE_set_address foo_label2}
-		{line [gdb_get_line_number "foo foo_cold call"]}
-		{DW_LNS_copy}
-		{DW_LNE_set_address foo_label3}
-		{line [gdb_get_line_number "foo end"]}
-		{DW_LNS_copy}
-		{DW_LNE_set_address $foo_end}
-		{DW_LNS_advance_line 1}
-		{DW_LNS_copy}
-		{DW_LNE_end_sequence}
-
-		{DW_LNE_set_address $bar_start}
-		{line [gdb_get_line_number "bar end"]}
-		{DW_LNS_copy}
-		{DW_LNS_advance_pc $bar_len}
-		{DW_LNS_advance_line 1}
-		{DW_LNS_copy}
-		{DW_LNE_end_sequence}
-
-		{DW_LNE_set_address $baz_start}
-		{line [gdb_get_line_number "baz end"]}
-		{DW_LNS_copy}
-		{DW_LNS_advance_pc $baz_len}
-		{DW_LNS_advance_line 1}
-		{DW_LNS_copy}
-		{DW_LNE_end_sequence}
-
-		{DW_LNE_set_address $foo_cold_start}
-	        {line [gdb_get_line_number "foo_cold prologue"]}
-		{DW_LNS_copy}
-		{DW_LNE_set_address foo_cold_label}
-		{line [gdb_get_line_number "foo_cold baz call"]}
-		{DW_LNS_copy}
-		{DW_LNE_set_address foo_cold_label2}
-		{line [gdb_get_line_number "foo_cold end"]}
-		{DW_LNS_copy}
-		{DW_LNE_set_address $foo_cold_end}
-		{DW_LNS_advance_line 1}
-		{DW_LNS_copy}
-		{DW_LNE_end_sequence}
+		DW_LNE_set_address $main_start
+		line [gdb_get_line_number "main prologue"]
+		DW_LNS_copy
+		DW_LNE_set_address main_label
+		line [gdb_get_line_number "main foo call"]
+		DW_LNS_copy
+		DW_LNE_set_address main_label2
+		line [gdb_get_line_number "main return"]
+		DW_LNS_copy
+		DW_LNE_set_address $main_end
+		line [expr [gdb_get_line_number "main end"] + 1]
+		DW_LNS_copy
+		DW_LNE_end_sequence
+
+		DW_LNE_set_address $foo_start
+		line [gdb_get_line_number "foo prologue"]
+		DW_LNS_copy
+		DW_LNE_set_address foo_label
+		line [gdb_get_line_number "foo bar call"]
+		DW_LNS_copy
+		DW_LNE_set_address foo_label2
+		line [gdb_get_line_number "foo foo_cold call"]
+		DW_LNS_copy
+		DW_LNE_set_address foo_label3
+		line [gdb_get_line_number "foo end"]
+		DW_LNS_copy
+		DW_LNE_set_address $foo_end
+		DW_LNS_advance_line 1
+		DW_LNS_copy
+		DW_LNE_end_sequence
+
+		DW_LNE_set_address $bar_start
+		line [gdb_get_line_number "bar end"]
+		DW_LNS_copy
+		DW_LNS_advance_pc $bar_len
+		DW_LNS_advance_line 1
+		DW_LNS_copy
+		DW_LNE_end_sequence
+
+		DW_LNE_set_address $baz_start
+		line [gdb_get_line_number "baz end"]
+		DW_LNS_copy
+		DW_LNS_advance_pc $baz_len
+		DW_LNS_advance_line 1
+		DW_LNS_copy
+		DW_LNE_end_sequence
+
+		DW_LNE_set_address $foo_cold_start
+	        line [gdb_get_line_number "foo_cold prologue"]
+		DW_LNS_copy
+		DW_LNE_set_address foo_cold_label
+		line [gdb_get_line_number "foo_cold baz call"]
+		DW_LNS_copy
+		DW_LNE_set_address foo_cold_label2
+		line [gdb_get_line_number "foo_cold end"]
+		DW_LNS_copy
+		DW_LNE_set_address $foo_cold_end
+		DW_LNS_advance_line 1
+		DW_LNS_copy
+		DW_LNE_end_sequence
 	    }
 	}
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-step-out-of-function-no-stmt.exp b/gdb/testsuite/gdb.dwarf2/dw2-step-out-of-function-no-stmt.exp
index ad4a5f553e61..29e6858e04b9 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-step-out-of-function-no-stmt.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-step-out-of-function-no-stmt.exp
@@ -79,29 +79,29 @@ Dwarf::assemble $asm_file {
 	file_name "$srcfile" 1
 
 	program {
-	    {DW_LNE_set_address bar_label}
-	    {line 26}
-	    {DW_LNS_copy}
+	    DW_LNE_set_address bar_label
+	    line 26
+	    DW_LNS_copy
 
-	    {DW_LNE_set_address $bar_end}
-	    {DW_LNE_end_sequence}
+	    DW_LNE_set_address $bar_end
+	    DW_LNE_end_sequence
 
-	    {DW_LNE_set_address main_label}
-	    {line 32}
-	    {DW_LNS_copy}
+	    DW_LNE_set_address main_label
+	    line 32
+	    DW_LNS_copy
 
-	    {DW_LNE_set_address main_label_2}
-	    {line 36}
-	    {DW_LNS_negate_stmt}
-	    {DW_LNS_copy}
-	    {DW_LNS_negate_stmt}
+	    DW_LNE_set_address main_label_2
+	    line 36
+	    DW_LNS_negate_stmt
+	    DW_LNS_copy
+	    DW_LNS_negate_stmt
 
-	    {DW_LNE_set_address main_label_3}
-	    {line 36}
-	    {DW_LNS_copy}
+	    DW_LNE_set_address main_label_3
+	    line 36
+	    DW_LNS_copy
 
-	    {DW_LNE_set_address $main_end}
-	    {DW_LNE_end_sequence}
+	    DW_LNE_set_address $main_end
+	    DW_LNE_end_sequence
 	}
     }
 }
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-symtab-includes-lookup.exp b/gdb/testsuite/gdb.dwarf2/dw2-symtab-includes-lookup.exp
index feab51ad13fd..0390d36f74e1 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-symtab-includes-lookup.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-symtab-includes-lookup.exp
@@ -77,7 +77,7 @@ Dwarf::assemble $asm_file {
 	include_dir "${srcdir}/${subdir}"
 	file_name "dw2-symtab-includes.h" 1
 	program {
-	    {DW_LNS_advance_line 1}
+	    DW_LNS_advance_line 1
 	}
     }
 }
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-symtab-includes.exp b/gdb/testsuite/gdb.dwarf2/dw2-symtab-includes.exp
index e5c3342cf816..6c6d5fe46b4b 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-symtab-includes.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-symtab-includes.exp
@@ -51,7 +51,7 @@ Dwarf::assemble $asm_file {
 	include_dir "${srcdir}/${subdir}"
 	file_name "dw2-symtab-includes.h" 1
 	program {
-	    {DW_LNS_advance_line 1}
+	    DW_LNS_advance_line 1
 	}
     }
 }
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-vendor-extended-opcode.exp b/gdb/testsuite/gdb.dwarf2/dw2-vendor-extended-opcode.exp
index 86b5cc69e2ee..de8c82bb40ca 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-vendor-extended-opcode.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-vendor-extended-opcode.exp
@@ -57,14 +57,14 @@ Dwarf::assemble $asm_file {
 	file_name "$srcfile" 1
 
 	program {
-	    {DW_LNE_set_address main_label}
-	    {line 27}
-	    {DW_LNE_user 1 $DW_LNE_lo_usr}
-	    {DW_LNE_user 2 $DW_LNE_hi_usr}
-	    {DW_LNS_copy}
+	    DW_LNE_set_address main_label
+	    line 27
+	    DW_LNE_user 1 $DW_LNE_lo_usr
+	    DW_LNE_user 2 $DW_LNE_hi_usr
+	    DW_LNS_copy
 
-	    {DW_LNE_set_address main_label_2}
-	    {DW_LNE_end_sequence}
+	    DW_LNE_set_address main_label_2
+	    DW_LNE_end_sequence
 	}
     }
 }
diff --git a/gdb/testsuite/gdb.dwarf2/fission-multi-cu.exp b/gdb/testsuite/gdb.dwarf2/fission-multi-cu.exp
index 9baa67ce7a34..62bffdf709d2 100644
--- a/gdb/testsuite/gdb.dwarf2/fission-multi-cu.exp
+++ b/gdb/testsuite/gdb.dwarf2/fission-multi-cu.exp
@@ -88,18 +88,18 @@ Dwarf::assemble $asm_file_1 {
 	file_name "$srcfile" 1
 
 	program {
-	    {DW_LNE_set_address $func_start}
-	    {DW_LNS_advance_line 24}
-	    {DW_LNS_copy}
-
-	    {DW_LNE_set_address line_label_4}
-	    {DW_LNS_advance_line 3}
-	    {DW_LNS_copy}
-
-	    {DW_LNE_set_address $func_end}
-	    {DW_LNS_advance_line 1}
-	    {DW_LNS_copy}
-	    {DW_LNE_end_sequence}
+	    DW_LNE_set_address $func_start
+	    DW_LNS_advance_line 24
+	    DW_LNS_copy
+
+	    DW_LNE_set_address line_label_4
+	    DW_LNS_advance_line 3
+	    DW_LNS_copy
+
+	    DW_LNE_set_address $func_end
+	    DW_LNS_advance_line 1
+	    DW_LNS_copy
+	    DW_LNE_end_sequence
 	}
     }
 
@@ -164,26 +164,26 @@ Dwarf::assemble $asm_file_2 {
 	file_name "$srcfile" 1
 
 	program {
-	    {DW_LNE_set_address $main_start}
-	    {DW_LNS_advance_line 32}
-	    {DW_LNS_copy}
-
-	    {DW_LNE_set_address line_label_1}
-	    {DW_LNS_advance_line 3}
-	    {DW_LNS_copy}
-
-	    {DW_LNE_set_address line_label_2}
-	    {DW_LNS_advance_line 2}
-	    {DW_LNS_copy}
-
-	    {DW_LNE_set_address line_label_3}
-	    {DW_LNS_advance_line 2}
-	    {DW_LNS_copy}
-
-	    {DW_LNE_set_address $main_end}
-	    {DW_LNS_advance_line 2}
-	    {DW_LNS_copy}
-	    {DW_LNE_end_sequence}
+	    DW_LNE_set_address $main_start
+	    DW_LNS_advance_line 32
+	    DW_LNS_copy
+
+	    DW_LNE_set_address line_label_1
+	    DW_LNS_advance_line 3
+	    DW_LNS_copy
+
+	    DW_LNE_set_address line_label_2
+	    DW_LNS_advance_line 2
+	    DW_LNS_copy
+
+	    DW_LNE_set_address line_label_3
+	    DW_LNS_advance_line 2
+	    DW_LNS_copy
+
+	    DW_LNE_set_address $main_end
+	    DW_LNS_advance_line 2
+	    DW_LNS_copy
+	    DW_LNE_end_sequence
 	}
     }
 
diff --git a/gdb/testsuite/gdb.dwarf2/imported-unit-bp.exp.tcl b/gdb/testsuite/gdb.dwarf2/imported-unit-bp.exp.tcl
index 4d95400cacab..fe92c530888d 100644
--- a/gdb/testsuite/gdb.dwarf2/imported-unit-bp.exp.tcl
+++ b/gdb/testsuite/gdb.dwarf2/imported-unit-bp.exp.tcl
@@ -83,37 +83,37 @@ Dwarf::assemble $asm_file {
 	file_name "$srcfile" 1
 
 	program {
-	    {DW_LNE_set_address line_label_1}
-	    {DW_LNS_advance_line 15}
-	    {DW_LNS_copy}
+	    DW_LNE_set_address line_label_1
+	    DW_LNS_advance_line 15
+	    DW_LNS_copy
 
-	    {DW_LNE_set_address line_label_2}
-	    {DW_LNS_advance_line 1}
-	    {DW_LNS_copy}
+	    DW_LNE_set_address line_label_2
+	    DW_LNS_advance_line 1
+	    DW_LNS_copy
 
-	    {DW_LNE_set_address line_label_3}
-	    {DW_LNS_advance_line 4}
-	    {DW_LNS_copy}
+	    DW_LNE_set_address line_label_3
+	    DW_LNS_advance_line 4
+	    DW_LNS_copy
 
-	    {DW_LNE_set_address line_label_4}
-	    {DW_LNS_advance_line 1}
-	    {DW_LNS_copy}
+	    DW_LNE_set_address line_label_4
+	    DW_LNS_advance_line 1
+	    DW_LNS_copy
 
-	    {DW_LNS_advance_line -4}
-	    {DW_LNS_negate_stmt}
-	    {DW_LNS_copy}
+	    DW_LNS_advance_line -4
+	    DW_LNS_negate_stmt
+	    DW_LNS_copy
 
-	    {DW_LNE_set_address line_label_5}
-	    {DW_LNS_advance_line 1}
-	    {DW_LNS_copy}
+	    DW_LNE_set_address line_label_5
+	    DW_LNS_advance_line 1
+	    DW_LNS_copy
 
-	    {DW_LNE_set_address line_label_6}
-	    {DW_LNS_advance_line 1}
-	    {DW_LNS_negate_stmt}
-	    {DW_LNS_copy}
+	    DW_LNE_set_address line_label_6
+	    DW_LNS_advance_line 1
+	    DW_LNS_negate_stmt
+	    DW_LNS_copy
 
-	    {DW_LNE_set_address line_label_7}
-	    {DW_LNE_end_sequence}
+	    DW_LNE_set_address line_label_7
+	    DW_LNE_end_sequence
 	}
     }
 }
diff --git a/gdb/testsuite/gdb.dwarf2/locexpr-data-member-location.exp b/gdb/testsuite/gdb.dwarf2/locexpr-data-member-location.exp
index a0831082f095..67e96fb1128a 100644
--- a/gdb/testsuite/gdb.dwarf2/locexpr-data-member-location.exp
+++ b/gdb/testsuite/gdb.dwarf2/locexpr-data-member-location.exp
@@ -267,31 +267,31 @@ Dwarf::assemble ${asm_file} {
 
 	# Generate a line table program.
 	program {
-	    {DW_LNE_set_address $foo_start}
-	    {line [gdb_get_line_number "foo prologue"]}
-	    {DW_LNS_copy}
-	    {DW_LNE_set_address foo_label}
-	    {line [gdb_get_line_number "foo return"]}
-	    {DW_LNS_copy}
-	    {line [gdb_get_line_number "foo end"]}
-	    {DW_LNS_copy}
-	    {DW_LNE_set_address $foo_end}
-	    {DW_LNS_advance_line 1}
-	    {DW_LNS_copy}
-	    {DW_LNE_end_sequence}
-
-	    {DW_LNE_set_address $bar_start}
-	    {line [gdb_get_line_number "bar prologue"]}
-	    {DW_LNS_copy}
-	    {DW_LNE_set_address bar_label}
-	    {line [gdb_get_line_number "bar return"]}
-	    {DW_LNS_copy}
-	    {line [gdb_get_line_number "bar end"]}
-	    {DW_LNS_copy}
-	    {DW_LNE_set_address $bar_end}
-	    {DW_LNS_advance_line 1}
-	    {DW_LNS_copy}
-	    {DW_LNE_end_sequence}
+	    DW_LNE_set_address $foo_start
+	    line [gdb_get_line_number "foo prologue"]
+	    DW_LNS_copy
+	    DW_LNE_set_address foo_label
+	    line [gdb_get_line_number "foo return"]
+	    DW_LNS_copy
+	    line [gdb_get_line_number "foo end"]
+	    DW_LNS_copy
+	    DW_LNE_set_address $foo_end
+	    DW_LNS_advance_line 1
+	    DW_LNS_copy
+	    DW_LNE_end_sequence
+
+	    DW_LNE_set_address $bar_start
+	    line [gdb_get_line_number "bar prologue"]
+	    DW_LNS_copy
+	    DW_LNE_set_address bar_label
+	    line [gdb_get_line_number "bar return"]
+	    DW_LNS_copy
+	    line [gdb_get_line_number "bar end"]
+	    DW_LNS_copy
+	    DW_LNE_set_address $bar_end
+	    DW_LNS_advance_line 1
+	    DW_LNS_copy
+	    DW_LNE_end_sequence
 	}
     }
 
diff --git a/gdb/testsuite/lib/dwarf.exp b/gdb/testsuite/lib/dwarf.exp
index 3d88003ccb09..9c92115fd003 100644
--- a/gdb/testsuite/lib/dwarf.exp
+++ b/gdb/testsuite/lib/dwarf.exp
@@ -2410,7 +2410,7 @@ namespace eval Dwarf {
 	    define_label $_line_header_end_label
 	}
 
-	proc program {statements} {
+	proc program { body } {
 	    variable _line_header_end_label
 	    variable _line
 
@@ -2502,9 +2502,7 @@ namespace eval Dwarf {
 		_op .sleb128 ${num}
 	    }
 
-	    foreach statement $statements {
-		uplevel 1 $statement
-	    }
+	    uplevel $body
 	}
 
 	uplevel $body
-- 
2.35.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-04-06 15:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-24 16:18 [PATCH 1/2] gdb/testsuite/dwarf: remove two unused variables Simon Marchi
2022-03-24 16:18 ` [PATCH 2/2] gdb/testsuite/dwarf: simplify line number program syntax Simon Marchi
2022-04-06 15:43 [PATCH 1/2] gdb/testsuite/dwarf: remove two unused variables Simon Marchi
2022-04-06 15:43 ` [PATCH 2/2] gdb/testsuite/dwarf: simplify line number program syntax Simon Marchi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).