From 13d414afa06a6e290126dbebccdb5076cc6620b8 Mon Sep 17 00:00:00 2001 From: Jan Beulich Date: Thu, 7 Apr 2022 08:15:24 +0200 Subject: [PATCH] Arm32: arrange for line number emission for .inst Just like insns encoded the more conventional way these should have line number info associated with them. --- gas/config/tc-arm.c | 2 ++ gas/testsuite/gas/arm/inst-po-dwarf.d | 21 +++++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 gas/testsuite/gas/arm/inst-po-dwarf.d diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c index 04f6ade830b..ca4f97b164a 100644 --- 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; diff --git a/gas/testsuite/gas/arm/inst-po-dwarf.d b/gas/testsuite/gas/arm/inst-po-dwarf.d new file mode 100644 index 00000000000..800e12acf21 --- /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 -- 2.30.2