]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
gdb/dwarf: allocate DWP dwarf2_section_info with new
authorSimon Marchi <simon.marchi@efficios.com>
Mon, 12 May 2025 19:09:44 +0000 (15:09 -0400)
committerSimon Marchi <simon.marchi@efficios.com>
Fri, 23 May 2025 15:12:53 +0000 (11:12 -0400)
commite95749bd0d5579d1e87eaef0d667f23591bf3521
tree6a5f8a0ec4aa2bc0e107efa69a2c972c234e6417
parente82c588969ab1542d7fb32f675e190897e28b64d
gdb/dwarf: allocate DWP dwarf2_section_info with new

For the same reason as explained in the previous patch (allocations on
obstacks aren't thread-safe), change the allocation of
dwarf2_section_info object for dwo files within dwp files to use "new".

The dwo_file::section object is not always owned by the dwo_file, so
introduce a new "dwo_file::section_holder" object that is only set when
the dwo_file owns the dwarf2_section_info.

Change-Id: I74c4608573c7a435bf3dadb83f96a805d21798a2
Approved-By: Tom Tromey <tom@tromey.com>
gdb/dwarf2/read.c
gdb/dwarf2/section.h