[binutils-gdb] dwarf: properly update all_comp_units_without_ranges in stash_comp_unit
Jan Beulich
jbeulich@sourceware.org
Fri Sep 26 10:25:01 GMT 2025
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=ba55d01e99a6dbc474d14d0238439015ea2f37a8
commit ba55d01e99a6dbc474d14d0238439015ea2f37a8
Author: oltolm <oleg.tolmatcev@gmail.com>
Date: Fri Sep 26 12:23:14 2025 +0200
dwarf: properly update all_comp_units_without_ranges in stash_comp_unit
each->next_unit_without_ranges = file->all_comp_units_without_ranges;
- file->all_comp_units_without_ranges = each->next_unit_without_ranges;
The second line of this code is probably a bug because it does nothing. It
was probably supposed to update "file->all_comp_units_without_ranges" to point
to "each" - the new head of the list.
Signed-off-by: oltolm <oleg.tolmatcev@gmail.com>
Diff:
---
bfd/dwarf2.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bfd/dwarf2.c b/bfd/dwarf2.c
index a62c9523743..58d464bccd4 100644
--- a/bfd/dwarf2.c
+++ b/bfd/dwarf2.c
@@ -5645,7 +5645,7 @@ stash_comp_unit (struct dwarf2_debug *stash, struct dwarf2_debug_file *file)
if (each->arange.high == 0)
{
each->next_unit_without_ranges = file->all_comp_units_without_ranges;
- file->all_comp_units_without_ranges = each->next_unit_without_ranges;
+ file->all_comp_units_without_ranges = each;
}
file->info_ptr += length;
More information about the Binutils-cvs
mailing list