aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2020-10-17 05:52:13 -0700
committerH.J. Lu <hjl.tools@gmail.com>2020-10-17 05:52:13 -0700
commit9717970a4e374218fe74c99cf5bc7f1d45adbf0e (patch)
tree60324c45481b6d7ca0a947a3e457d772f53368f8
parent7ffdc9ae6ed88601e7f422ab117fe3abeef110dc (diff)
downloadgdb-9717970a4e374218fe74c99cf5bc7f1d45adbf0e.zip
gdb-9717970a4e374218fe74c99cf5bc7f1d45adbf0e.tar.gz
gdb-9717970a4e374218fe74c99cf5bc7f1d45adbf0e.tar.bz2
gas: Add a -gdwarf-5 debug_line test with .s file
PR gas/25878 PR gas/26740 * testsuite/gas/i386/dwarf5-line-4.d: New file. * testsuite/gas/i386/dwarf5-line-4.s: Likewise. * testsuite/gas/i386/i386.exp: Run dwarf5-line-4.
-rw-r--r--gas/ChangeLog8
-rw-r--r--gas/testsuite/gas/i386/dwarf5-line-4.d50
-rw-r--r--gas/testsuite/gas/i386/dwarf5-line-4.s3
-rw-r--r--gas/testsuite/gas/i386/i386.exp1
4 files changed, 62 insertions, 0 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index a55302c..4e394a2 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -2,6 +2,14 @@
PR gas/25878
PR gas/26740
+ * testsuite/gas/i386/dwarf5-line-4.d: New file.
+ * testsuite/gas/i386/dwarf5-line-4.s: Likewise.
+ * testsuite/gas/i386/i386.exp: Run dwarf5-line-4.
+
+2020-10-17 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR gas/25878
+ PR gas/26740
* testsuite/gas/i386/dwarf5-line-3.s: Replace dwarf5-line-2.S
with dwarf5-line-3.S.
* testsuite/gas/i386/dwarf5-line-3.d: Updated.
diff --git a/gas/testsuite/gas/i386/dwarf5-line-4.d b/gas/testsuite/gas/i386/dwarf5-line-4.d
new file mode 100644
index 0000000..30e1bb2
--- /dev/null
+++ b/gas/testsuite/gas/i386/dwarf5-line-4.d
@@ -0,0 +1,50 @@
+#as: -g -gdwarf-5
+#readelf: -wl
+#name: DWARF5 .debug_line 4
+
+Raw dump of debug contents of section \.z?debug_line:
+
+ Offset: 0x0
+ Length: .*
+ DWARF Version: 5
+ Address size \(bytes\): .*
+ Segment selector \(bytes\): 0
+ Prologue Length: .*
+ Minimum Instruction Length: 1
+ Maximum Ops per Instruction: 1
+ Initial value of 'is_stmt': 1
+ Line Base: -5
+ Line Range: 14
+ Opcode Base: 13
+
+ Opcodes:
+ Opcode 1 has 0 args
+ Opcode 2 has 1 arg
+ Opcode 3 has 1 arg
+ Opcode 4 has 1 arg
+ Opcode 5 has 1 arg
+ Opcode 6 has 0 args
+ Opcode 7 has 0 args
+ Opcode 8 has 0 args
+ Opcode 9 has 1 arg
+ Opcode 10 has 0 args
+ Opcode 11 has 0 args
+ Opcode 12 has 1 arg
+
+ The Directory Table \(offset 0x.*, lines 2, columns 1\):
+ Entry Name
+ 0 \(indirect line string, offset: 0x.*\): .*
+ 1 \(indirect line string, offset: 0x.*\): .*
+
+ The File Name Table \(offset 0x.*, lines 2, columns 2\):
+ Entry Dir Name
+ 0 0 \(indirect line string, offset: 0x.*\): dwarf5-line-4.s
+ 1 1 \(indirect line string, offset: 0x.*\): dwarf5-line-4.s
+
+ Line Number Statements:
+ \[0x.*\] Extended opcode 2: set Address to 0x0
+ \[0x.*\] Special opcode 7: advance Address by 0 to 0x0 and Line by 2 to 3
+ \[0x.*\] Advance PC by 1 to 0x1
+ \[0x.*\] Extended opcode 1: End of Sequence
+
+
diff --git a/gas/testsuite/gas/i386/dwarf5-line-4.s b/gas/testsuite/gas/i386/dwarf5-line-4.s
new file mode 100644
index 0000000..ee21dd1
--- /dev/null
+++ b/gas/testsuite/gas/i386/dwarf5-line-4.s
@@ -0,0 +1,3 @@
+ .text
+lbasename:
+ .nop
diff --git a/gas/testsuite/gas/i386/i386.exp b/gas/testsuite/gas/i386/i386.exp
index d8bae38..edb053c 100644
--- a/gas/testsuite/gas/i386/i386.exp
+++ b/gas/testsuite/gas/i386/i386.exp
@@ -617,6 +617,7 @@ if [gas_32_check] then {
run_dump_test "dwarf5-line-1"
run_dump_test "dwarf5-line-2"
run_dump_test "dwarf5-line-3"
+ run_dump_test "dwarf5-line-4"
run_dump_test "dw2-compress-2"
run_dump_test "dw2-compressed-2"