gas: Always use as_where for preprocessed assembly codes
authorH.J. Lu <hjl.tools@gmail.com>
Sat, 17 Oct 2020 11:24:22 +0000 (04:24 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Sat, 17 Oct 2020 11:24:22 +0000 (04:24 -0700)
commitbd0c565edbf4ba8121fded38e389530d7fa6f963
treea56cf044039f44e5acb214d21c0eea27d6de8e32
parent43f8eb75479f1f2d91ef57b0baac90c10a6b3a3d
gas: Always use as_where for preprocessed assembly codes

Always clear the slot 1 if it was assigned to the input file before the
first .file <NUMBER> directive has been seen.  Always use as_where to
generate the correct debug infor for preprocessed assembly codes.

PR gas/25878
PR gas/26740
* dwarf2dbg.c (allocate_filename_to_slot): Don't reuse the slot 1
here.
(dwarf2_where): Restore as_where.
(dwarf2_directive_filename): Clear the slot 1 if it was assigned
to the input file.
* testsuite/gas/i386/dwarf5-line-2.d: New file.
* testsuite/gas/i386/dwarf5-line-2.s: Likewise.
* testsuite/gas/i386/dwarf5-line-3.d: Likewise.
* testsuite/gas/i386/dwarf5-line-3.s: Likewise.
* testsuite/gas/i386/i386.exp: Run dwarf5-line-2 and
dwarf5-line-3.
gas/ChangeLog
gas/dwarf2dbg.c
gas/testsuite/gas/i386/dwarf5-line-2.d [new file with mode: 0644]
gas/testsuite/gas/i386/dwarf5-line-2.s [new file with mode: 0644]
gas/testsuite/gas/i386/dwarf5-line-3.d [new file with mode: 0644]
gas/testsuite/gas/i386/dwarf5-line-3.s [new file with mode: 0644]
gas/testsuite/gas/i386/i386.exp
This page took 0.024553 seconds and 4 git commands to generate.