[PATCH 0/5] Fix race in DWARF reader, 2nd approach
Tom Tromey
tom@tromey.com
Tue Apr 16 17:05:22 GMT 2024
This series is a different approach to fixing the race pointed out in
PR gdb/31261. The problem there is that the indexer can be running at
the same time that an objfile is relocated, resulting in races in
dwarf2_per_objfile::adjust.
The previous series to fix this problem is here:
https://inbox.sourceware.org/gdb-patches/20240217-dwarf-race-relocate-v1-0-d3d2d908c1e8@tromey.com/
This series is less invasive and works by justifying the eventual
removal of the 'adjust' method.
Regression tested on x86-64 Fedora 38.
I also tested this in a small way on a MIPS executable. I don't have
access to a machine where I can truly test MIPS16 in its entirety, but
what I did is make an executable where one function was marked
__attribute__((mips16)). Then, I tested that the symbol side of gdb
still correctly applies the address transform in "break" and
"disassemble" commands with this series applied.
---
Tom Tromey (5):
Remove call to dwarf2_per_objfile::adjust from ranges readers
Remove more calls to dwarf2_per_objfile::adjust
Remove call to dwarf2_per_objfile::adjust from read_call_site_scope
Remove call to dwarf2_per_objfile::adjust from read_attribute_value
Remove dwarf2_per_objfile::adjust
gdb/dwarf2/aranges.c | 2 --
gdb/dwarf2/read-gdb-index.c | 2 --
gdb/dwarf2/read.c | 45 ++++++++++-----------------------------------
gdb/dwarf2/read.h | 4 ----
4 files changed, 10 insertions(+), 43 deletions(-)
---
base-commit: 12f5356130c2cda10e2589e74a8716563050dccb
change-id: 20240416-dwarf-race-relocate-2-621894b33715
Best regards,
--
Tom Tromey <tom@tromey.com>
More information about the Gdb-patches
mailing list