diff options
-rw-r--r-- | gas/macro.c | 3 | ||||
-rw-r--r-- | gas/testsuite/gas/elf/dwarf-5-irp.d | 20 | ||||
-rw-r--r-- | gas/testsuite/gas/elf/dwarf-5-irp.s | 7 |
3 files changed, 29 insertions, 1 deletions
diff --git a/gas/macro.c b/gas/macro.c index 2228f5b..0d143dc 100644 --- a/gas/macro.c +++ b/gas/macro.c @@ -234,7 +234,8 @@ buffer_and_nest (const char *from, const char *to, sb *ptr, 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]; diff --git a/gas/testsuite/gas/elf/dwarf-5-irp.d b/gas/testsuite/gas/elf/dwarf-5-irp.d index c305c8d..d43a660 100644 --- a/gas/testsuite/gas/elf/dwarf-5-irp.d +++ b/gas/testsuite/gas/elf/dwarf-5-irp.d @@ -52,6 +52,22 @@ Raw dump of debug contents .* .*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: @@ -66,6 +82,8 @@ 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: @@ -75,6 +93,8 @@ 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 diff --git a/gas/testsuite/gas/elf/dwarf-5-irp.s b/gas/testsuite/gas/elf/dwarf-5-irp.s index e9e8746..b133cfd 100644 --- a/gas/testsuite/gas/elf/dwarf-5-irp.s +++ b/gas/testsuite/gas/elf/dwarf-5-irp.s @@ -29,3 +29,10 @@ _start: .nop n = n - 1 .endr + + .irp n, cd, nm +# 35 "irp.s" + .section .text.\n, "ax" + .nop + .nop + .endr |