aboutsummaryrefslogtreecommitdiff
path: root/gas/read.c
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2024-08-05 16:29:54 +0200
committerJan Beulich <jbeulich@suse.com>2024-08-05 16:29:54 +0200
commitb43f37b77fd5d47466c7f35ec9acde68908d7aeb (patch)
treeee4e284a4857064c89f91e716925943e1afb7b43 /gas/read.c
parent526363dbe4524a5364853276caba3306b813b71c (diff)
downloadgdb-b43f37b77fd5d47466c7f35ec9acde68908d7aeb.zip
gdb-b43f37b77fd5d47466c7f35ec9acde68908d7aeb.tar.gz
gdb-b43f37b77fd5d47466c7f35ec9acde68908d7aeb.tar.bz2
gas: maintain line numbers correctly after #APP / #NO_APP
Maintaining line numbers correctly both inside the region and past it requires special care. The SB produced there is somewhat different from that produced for e.g. macro expansions, and hence also needs treating differently: In particular we aren't doing anything resembling macro expansion here. The new testcase may be a little misplaced in macros/, but that's where all the other #APP / #NO_APP ones are.
Diffstat (limited to 'gas/read.c')
-rw-r--r--gas/read.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gas/read.c b/gas/read.c
index 7855193..ba31f8d 100644
--- a/gas/read.c
+++ b/gas/read.c
@@ -998,7 +998,6 @@ read_a_source_file (const char *name)
input_line_pointer = s;
continue;
}
- bump_line_counters ();
s += 4;
ends = find_no_app (s, next_char);
@@ -1023,9 +1022,10 @@ read_a_source_file (const char *name)
}
while (!ends);
}
+ sb_add_char (&sbuf, '\n');
input_line_pointer = ends ? ends + 8 : NULL;
- input_scrub_include_sb (&sbuf, input_line_pointer, expanding_none);
+ input_scrub_include_sb (&sbuf, input_line_pointer, expanding_app);
sb_kill (&sbuf);
buffer_limit = input_scrub_next_buffer (&input_line_pointer);
continue;