aboutsummaryrefslogtreecommitdiff
path: root/gas/macro.c
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2022-03-29 08:18:14 +0200
committerJan Beulich <jbeulich@suse.com>2022-03-29 08:18:14 +0200
commitbe13be5b687ff0c31eacb0bdd0ab90c329476ed1 (patch)
treea1ccaedd3425fb13ccb73464713336cddcd670f7 /gas/macro.c
parent1d1595b48b7146952bdd2f7c90607977dd0c89d6 (diff)
downloadgdb-be13be5b687ff0c31eacb0bdd0ab90c329476ed1.zip
gdb-be13be5b687ff0c31eacb0bdd0ab90c329476ed1.tar.gz
gdb-be13be5b687ff0c31eacb0bdd0ab90c329476ed1.tar.bz2
gas/Dwarf: special-case .linefile only for macros
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).
Diffstat (limited to 'gas/macro.c')
-rw-r--r--gas/macro.c3
1 files changed, 2 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];