[PATCH 4/7] Arm32: arrange for line number emission for .inst

Jan Beulich jbeulich@suse.com
Mon Mar 28 09:11:04 GMT 2022


Just like insns encoded the more conventional way these should have line
number info associated with them.

--- a/gas/config/tc-arm.c
+++ b/gas/config/tc-arm.c
@@ -4033,6 +4033,8 @@ s_arm_elf_inst (int nbytes)
       mapping_state (MAP_ARM);
     }
 
+  dwarf2_emit_insn (0);
+
   do
     {
       expressionS exp;
--- /dev/null
+++ b/gas/testsuite/gas/arm/inst-po-dwarf.d
@@ -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



More information about the Binutils mailing list