diff options
Diffstat (limited to 'gdb/testsuite/gdb.dwarf2/dw2-lines.exp')
-rw-r--r-- | gdb/testsuite/gdb.dwarf2/dw2-lines.exp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-lines.exp b/gdb/testsuite/gdb.dwarf2/dw2-lines.exp index 3cbbd28..b24eec0 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-lines.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-lines.exp @@ -79,10 +79,15 @@ proc test_1 { _cv _cdw64 _lv _ldw64 {_string_form ""}} { } lines [list version $lv is_64 $ldw64 string_form $string_form] Llines { - include_dir "${srcdir}/${subdir}" - file_name "$srcfile" 1 + set diridx [include_dir "${srcdir}/${subdir}"] + file_name "$srcfile" $diridx program { + # If using DWARF 5, we want to refer to file 0, but the LNP + # state machine is still initialized with file 1. So we need + # to set the current file explicitly. + DW_LNS_set_file $diridx + DW_LNE_set_address bar_label line [line_for bar_label] DW_LNS_copy |