gdb/testsuite/dwarf: simplify line number program syntax
authorSimon Marchi <simon.marchi@polymtl.ca>
Thu, 7 Apr 2022 01:51:55 +0000 (21:51 -0400)
committerSimon Marchi <simon.marchi@polymtl.ca>
Thu, 7 Apr 2022 17:09:45 +0000 (13:09 -0400)
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

26 files changed:
gdb/testsuite/gdb.base/until-trailing-insns.exp
gdb/testsuite/gdb.dwarf2/dw2-bad-elf.exp
gdb/testsuite/gdb.dwarf2/dw2-disasm-over-non-stmt.exp
gdb/testsuite/gdb.dwarf2/dw2-inline-header-1.exp
gdb/testsuite/gdb.dwarf2/dw2-inline-header-2.exp
gdb/testsuite/gdb.dwarf2/dw2-inline-header-3.exp
gdb/testsuite/gdb.dwarf2/dw2-inline-many-frames.exp
gdb/testsuite/gdb.dwarf2/dw2-inline-small-func.exp
gdb/testsuite/gdb.dwarf2/dw2-inline-stepping.exp
gdb/testsuite/gdb.dwarf2/dw2-inline-with-lexical-scope.exp
gdb/testsuite/gdb.dwarf2/dw2-is-stmt-2.exp
gdb/testsuite/gdb.dwarf2/dw2-is-stmt.exp
gdb/testsuite/gdb.dwarf2/dw2-line-number-zero.exp
gdb/testsuite/gdb.dwarf2/dw2-lines.exp
gdb/testsuite/gdb.dwarf2/dw2-out-of-range-end-of-seq.exp
gdb/testsuite/gdb.dwarf2/dw2-prologue-end.exp
gdb/testsuite/gdb.dwarf2/dw2-ranges-base.exp
gdb/testsuite/gdb.dwarf2/dw2-ranges-func.exp
gdb/testsuite/gdb.dwarf2/dw2-step-out-of-function-no-stmt.exp
gdb/testsuite/gdb.dwarf2/dw2-symtab-includes-lookup.exp
gdb/testsuite/gdb.dwarf2/dw2-symtab-includes.exp
gdb/testsuite/gdb.dwarf2/dw2-vendor-extended-opcode.exp
gdb/testsuite/gdb.dwarf2/fission-multi-cu.exp
gdb/testsuite/gdb.dwarf2/imported-unit-bp.exp.tcl
gdb/testsuite/gdb.dwarf2/locexpr-data-member-location.exp
gdb/testsuite/lib/dwarf.exp

index e87f4a317e7ed3ba8032962432f78e9a65249e3a..ca5b388c0a6632f37b6ab60046b45e8fbd129430 100644 (file)
@@ -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
        }
     }
 
index 0adff2868eb0e1addd43de02943d5a3a95756c43..7b71ed1155ef37aadab219628b8d3d91db953e0a 100644 (file)
@@ -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
        }
     }
 }
index ea679c3adc1825f8b1cd013e4b382f66e0ff11bd..5311dd61a4c72962b6aec4252616faa660ba0b41 100644 (file)
@@ -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
        }
     }
 }
index 4ee7433f249de97470a479d1cc5d7264bd5582cf..19f06adef7b2b5190e6a65d912967ea7c82e7d86 100644 (file)
@@ -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
            }
        }
     }
index a8014489d9d3388cb2b56eb031b48565c0f10d59..198f355399796632285292b6b70252c74f8b05b2 100644 (file)
@@ -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
        }
     }
 }
index 8f36e4f52195150024148270db774f00fc2171d3..68261aa78b0a90bf4b46a7dc6372a282a979cbce 100644 (file)
@@ -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
        }
     }
 }
index 483b197448c63475075ba0f4dac9e76ad5d510cb..9055244979db176096f45008572f7684a067531e 100644 (file)
@@ -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
        }
     }
 
index c480422b7554e00b15c6a2751e7c0b1d9124697c..05286ad6d2fb5c79de1908fa9eff6a24a1df2438 100644 (file)
@@ -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
        }
     }
 }
index aafca3015e679d3823807eba3c3e302fcb7a8413..bd90715c198249f85f382cf063416b43230797c6 100644 (file)
@@ -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
        }
     }
 
index 485f3aef95672c5fce10e234368f0351dada11b5..61fd5d4fed82321309fcce6aa6b75d6c4f5fe91d 100644 (file)
@@ -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
        }
     }
 }
index 3ec9f80716048d98f01fc99d9d4b3747b6ddd799..239f5f1d9e9677848ea1027470f842866e92db4a 100644 (file)
@@ -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
        }
     }
 }
index 9a9fc8cca646f5295f25a38f6186e944c7130249..c449757becb499805a6638b1d1009f9827729372 100644 (file)
@@ -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
        }
     }
 }
index ec15694bb583df02dd0dd015f63295ea9123cbc1..0c5eed9814f448c2bd380a031bd58458744dbac3 100644 (file)
@@ -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
        }
     }
 }
index c1be18aa88cf9f135e9fbc1effe42be9e92e9a02..e36064460fd32c504997765c097a6904312a33d9 100644 (file)
@@ -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
            }
        }
     }
index 23df111e73adb86301e028c6de192c06445c57d5..b8da03ddb3d9988ea51fb32eb95249fdec9e23c1 100644 (file)
@@ -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
        }
     }
 }
index b5f8bcc4b505624104725309af4922bd21e259ef..7fd1bd781328106a1f3b4bf6b599afec1d9fc254 100644 (file)
@@ -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
        }
     }
 }
index ec31f1f9d234ba09fea3fe0101a60c6831964dfd..17530c8cc4b93b40c328b055abe4cfeb0331b936 100644 (file)
@@ -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
        }
     }
 
index b6077e0c67605f4bc81ead0c292b92a6e5d9fcba..aa95dae6bfcd83fce8cee21e9f97ce7c549441ce 100644 (file)
@@ -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
            }
        }
 
index ad4a5f553e612b818fee9910fb7528b048450359..29e6858e04b9c2192ebb0d562e3e617729306584 100644 (file)
@@ -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
        }
     }
 }
index feab51ad13fd2d7e9c151bf9ba2a6b41b37166f3..0390d36f74e184810d064a57cfa13958a77ec6f8 100644 (file)
@@ -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
        }
     }
 }
index e5c3342cf8161a3520f1b42d32c173fd7c847573..6c6d5fe46b4b538f7bb7b4c9cbe6c92b523ca2db 100644 (file)
@@ -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
        }
     }
 }
index 86b5cc69e2ee956822e93c4ae1aa5db10eb88f2d..de8c82bb40cac7b499f66cd7487704133467e74a 100644 (file)
@@ -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
        }
     }
 }
index 9baa67ce7a341226342d5789f5e464699eeb6e99..62bffdf709d2fb36bc7eb6eba350625827a149a5 100644 (file)
@@ -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
        }
     }
 
index 4d95400cacabfb08a56770354b96e7f426d2a963..fe92c530888d43656672cd2eee29d29f147aa0e4 100644 (file)
@@ -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
        }
     }
 }
index a0831082f095d575b4f1ebdc973e316516e63b84..67e96fb1128ade51c95e63ae549bf14de746d864 100644 (file)
@@ -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
        }
     }
 
index 3d88003ccb096796417e75cc4ed8dd31fcb446e3..9c92115fd0034d1731bc91ee10111a4be0e7b603 100644 (file)
@@ -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