Arm32: arrange for line number emission for .inst
authorJan Beulich <jbeulich@suse.com>
Thu, 7 Apr 2022 06:15:24 +0000 (08:15 +0200)
committerJan Beulich <jbeulich@suse.com>
Thu, 7 Apr 2022 06:15:24 +0000 (08:15 +0200)
Just like insns encoded the more conventional way these should have line
number info associated with them.

gas/config/tc-arm.c
gas/testsuite/gas/arm/inst-po-dwarf.d [new file with mode: 0644]

index 04f6ade830b21c12ecd07e4f57373cfe27de7ce3..ca4f97b164ae8b0196e1830dc49e4927f8ea2480 100644 (file)
@@ -4033,6 +4033,8 @@ s_arm_elf_inst (int nbytes)
       mapping_state (MAP_ARM);
     }
 
+  dwarf2_emit_insn (0);
+
   do
     {
       expressionS exp;
diff --git a/gas/testsuite/gas/arm/inst-po-dwarf.d b/gas/testsuite/gas/arm/inst-po-dwarf.d
new file mode 100644 (file)
index 0000000..800e12a
--- /dev/null
@@ -0,0 +1,21 @@
+#as: -gdwarf-2
+#name: Dwarf line number info for .inst
+#objdump: -WL -w
+#source: inst-po.s
+#skip: *-*-pe *-*-wince
+
+.*:[   ]+file format .*
+
+Contents of the .debug_line section:
+
+CU: .*/inst-po.s:
+File name +Line number +Starting address.*
+inst-po.s +5 +0.*
+inst-po.s +12 +0x4.*
+inst-po.s +13 +0x8.*
+inst-po.s +20 +0xe.*
+inst-po.s +22 +0x14.*
+inst-po.s +26 +0x16.*
+inst-po.s +27 +0x1a.*
+inst-po.s +- +0x1e
+#pass