gas/Dwarf: improve debug info generation from .irp and alike blocks
authorJan Beulich <jbeulich@suse.com>
Wed, 23 Mar 2022 07:46:39 +0000 (08:46 +0100)
committerJan Beulich <jbeulich@suse.com>
Wed, 23 Mar 2022 07:46:39 +0000 (08:46 +0100)
commit7992631e8c0b0e711fbaba991348ef6f6e583725
treee9de3979a5cba919d9903a1e3e7a5789cb8aa26f
parent36e2d65d26622e83fa4c3af8289f6728376b9e89
gas/Dwarf: improve debug info generation from .irp and alike blocks

Tying the bumping of the logical line number to reading from the
original source file looks wrong: Upon finishing of the processing of an
sb the original values will be restored anyway. Yet without bumping the
line counter uses of .line inside e.g. an .irp construct won't have the
intended effect: Such uses may be necessary to ensure proper debug info
is emitted in particular when switching sections inside the .irp body,
as dwarf2_gen_line_info() would bail without doing anything when it
finds the line number unchanged from what it saw last.
gas/input-scrub.c
gas/testsuite/gas/elf/dwarf-5-irp.d [new file with mode: 0644]
gas/testsuite/gas/elf/dwarf-5-irp.s [new file with mode: 0644]
gas/testsuite/gas/elf/elf.exp