aboutsummaryrefslogtreecommitdiff
path: root/gas/input-scrub.c
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2022-03-23 08:46:39 +0100
committerJan Beulich <jbeulich@suse.com>2022-03-23 08:46:39 +0100
commit7992631e8c0b0e711fbaba991348ef6f6e583725 (patch)
treee9de3979a5cba919d9903a1e3e7a5789cb8aa26f /gas/input-scrub.c
parent36e2d65d26622e83fa4c3af8289f6728376b9e89 (diff)
downloadgdb-7992631e8c0b0e711fbaba991348ef6f6e583725.zip
gdb-7992631e8c0b0e711fbaba991348ef6f6e583725.tar.gz
gdb-7992631e8c0b0e711fbaba991348ef6f6e583725.tar.bz2
gas/Dwarf: improve debug info generation from .irp and alike blocks
Tying the bumping of the logical line number to reading from the original source file looks wrong: Upon finishing of the processing of an sb the original values will be restored anyway. Yet without bumping the line counter uses of .line inside e.g. an .irp construct won't have the intended effect: Such uses may be necessary to ensure proper debug info is emitted in particular when switching sections inside the .irp body, as dwarf2_gen_line_info() would bail without doing anything when it finds the line number unchanged from what it saw last.
Diffstat (limited to 'gas/input-scrub.c')
-rw-r--r--gas/input-scrub.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/gas/input-scrub.c b/gas/input-scrub.c
index 26af4fe..d9f1694 100644
--- a/gas/input-scrub.c
+++ b/gas/input-scrub.c
@@ -429,11 +429,10 @@ void
bump_line_counters (void)
{
if (sb_index == (size_t) -1)
- {
- ++physical_input_line;
- if (logical_input_line != -1u)
- ++logical_input_line;
- }
+ ++physical_input_line;
+
+ if (logical_input_line != -1u)
+ ++logical_input_line;
}
/* Tells us what the new logical line number and file are.