gdb/testsuite: Add support for DW_LNS_set_file to DWARF compiler
authorAndrew Burgess <andrew.burgess@embecosm.com>
Mon, 23 Mar 2020 15:11:48 +0000 (15:11 +0000)
committerAndrew Burgess <andrew.burgess@embecosm.com>
Thu, 2 Apr 2020 16:44:03 +0000 (17:44 +0100)
Extend the Dejagnu DWARF compiler to support DW_LNS_set_file opcode.
This will be used in a later commit.  There should be no change in the
testsuite after this commit.

gdb/testsuite/ChangeLog:

* lib/dwarf.exp (Dwarf::lines::program::DW_LNS_set_file): New
function.

gdb/testsuite/ChangeLog
gdb/testsuite/lib/dwarf.exp

index 7193942ac17915dcae2a526f67b2136bd834b843..eed6f45279f2f76af81f65aaec8915b22818d814 100644 (file)
@@ -1,3 +1,8 @@
+2020-04-02  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+       * lib/dwarf.exp (Dwarf::lines::program::DW_LNS_set_file): New
+       function.
+
 2020-04-02  Andrew Burgess  <andrew.burgess@embecosm.com>
 
        * lib/dwarf.exp (function_range): Allow compiler options to be
index 4371b56d4def014e288f3efaacd3bca822f79d40..93bde76de35b85e228709a166bb32f8cd972b5ea 100644 (file)
@@ -1454,6 +1454,11 @@ namespace eval Dwarf {
                _op .sleb128 ${offset}
            }
 
+           proc DW_LNS_set_file {num} {
+               _op .byte 4
+               _op .sleb128 ${num}
+           }
+
            foreach statement $statements {
                uplevel 1 $statement
            }