[PATCH v2 2/2] gas: re-work line number tracking for macros and their expansions
Jan Beulich
jbeulich@suse.com
Thu Dec 15 08:28:51 GMT 2022
On 14.12.2022 17:58, Andrew Burgess wrote:
> I think I understand the issue a little more now. I have a simple
> reproducer which can be run outside the gdb testsuite (see below).
>
> It appears that the DWARF for macros now tries to associate the
> instructions within the macro the source location within the macro
> definition, rather than the macro use site. I'm not entirely convinced
> this is a good idea (as a macro could be used multiple times), or even
> if this was an intended change of this series.
No, there was no intention to alter generated Dwarf. In fact I had put in
place a test ahead of this change here (commit 6fdb723799e2) to have at
least some proof of that. Quite likely that wasn't elaborate enough a test
then.
> If this is the direction gas is moving in then I guess we will need to
> update the GDB test, but there is, I think, a bug in the generated
> DWARF, in that it appears that the wrong file name is being used.
While I would like to improve representation of .macro expansions, we
first need to determine what the best way is for representing them. See
also the post-commit-message remark in the submission of the patch here.
Jan
More information about the Binutils
mailing list