[PATCH 2/3] gdb/testsuite: Add support for DW_LNS_set_file to DWARF compiler

Andrew Burgess andrew.burgess@embecosm.com
Mon Mar 23 17:30:18 GMT 2020


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     | 5 +++++
 gdb/testsuite/lib/dwarf.exp | 5 +++++
 2 files changed, 10 insertions(+)

diff --git a/gdb/testsuite/lib/dwarf.exp b/gdb/testsuite/lib/dwarf.exp
index 4371b56d4de..93bde76de35 100644
--- a/gdb/testsuite/lib/dwarf.exp
+++ b/gdb/testsuite/lib/dwarf.exp
@@ -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
 	    }
-- 
2.14.5



More information about the Gdb-patches mailing list