Restrict the PR gas/16908 workaround to just macros, matching the
original intention as well as the comment there. For constructs like
.irp or .rept the reasoning doesn't apply, as there's no separate
"invocation" point which may be of interest to record (for, as said
there, short macros).
number when expanding the macro), and since for short
macros we clearly prefer reporting the point of expansion
anyway, there's not an obviously better fix here. */
- if (len >= 8 && strncasecmp (ptr->ptr + i, "linefile", 8) == 0)
+ if (from != NULL && strcasecmp (from, "MACRO") == 0
+ && len >= 8 && strncasecmp (ptr->ptr + i, "linefile", 8) == 0)
{
char saved_eol_char = ptr->ptr[ptr->len];
.*Advance PC by .*
.*Extended opcode 1: End of Sequence
+.*Set File Name to entry 4 .*
+.*Extended opcode 2: .*
+.*Advance Line by 35 to 36
+.*Copy
+.*Special opcode .* and Line by 1 to 37
+.*Advance PC by .*
+.*Extended opcode 1: End of Sequence
+
+.*Set File Name to entry 4 .*
+.*Extended opcode 2: .*
+.*Advance Line by 35 to 36
+.*Copy
+.*Special opcode .* and Line by 1 to 37
+.*Advance PC by .*
+.*Extended opcode 1: End of Sequence
+
Contents of the \.debug_aranges section:
0+ [0-9a-f]+ ?
0+ [0-9a-f]+ ?
0+ [0-9a-f]+ ?
+ 0+ [0-9a-f]+ ?
+ 0+ [0-9a-f]+ ?
0+ 0+ ?
Contents of the \.debug_rnglists section:
[0-9a-f]+ 0+ [0-9a-f]+ ?
[0-9a-f]+ 0+ [0-9a-f]+ ?
[0-9a-f]+ 0+ [0-9a-f]+ ?
+ [0-9a-f]+ 0+ [0-9a-f]+ ?
+ [0-9a-f]+ 0+ [0-9a-f]+ ?
[0-9a-f]+ <End of list>
#pass
.nop
n = n - 1
.endr
+
+ .irp n, cd, nm
+# 35 "irp.s"
+ .section .text.\n, "ax"
+ .nop
+ .nop
+ .endr