gas: restore Dwarf info generation after macro diagnostic adjustments
authorJan Beulich <jbeulich@suse.com>
Fri, 16 Dec 2022 08:01:14 +0000 (09:01 +0100)
committerJan Beulich <jbeulich@suse.com>
Fri, 16 Dec 2022 08:01:14 +0000 (09:01 +0100)
commit22a8433e00fd33efcb1fa4961eb826cd97f2cd8b
tree0ccd9c48c3a0b29a69264f07303924fae4500c03
parent689933867ad45487751a6bb411e69cd91ef24990
gas: restore Dwarf info generation after macro diagnostic adjustments

While 6fdb723799e2 ("gas: re-work line number tracking for macros and
their expansions") was meant to leave generated Dwarf as is, it really
didn't (and the testcase intended to catch that wasn't covering the case
which broke). Its adjustment to buffer_and_nest() didn't go far enough,
leading to the "linefile" directive inserted at the top to also be
processed later in the PRĀ gas/16908 workaround (which clearly isn't
intended - it's being put there for processing during macro expansion
only). That unnoticed flaw in turn led me to work around it by a
(suspicious to me already at the time) conditional in as_where().
gas/input-scrub.c
gas/macro.c
gas/testsuite/gas/elf/dwarf-5-macro-include.d [new file with mode: 0644]
gas/testsuite/gas/elf/dwarf-5-macro-include.inc [new file with mode: 0644]
gas/testsuite/gas/elf/dwarf-5-macro-include.s [new file with mode: 0644]
gas/testsuite/gas/elf/elf.exp