aboutsummaryrefslogtreecommitdiff
path: root/gdb/python
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@efficios.com>2025-07-09 11:35:10 -0400
committerSimon Marchi <simon.marchi@polymtl.ca>2025-08-01 00:25:15 -0400
commit5acdeb08eb52cb1dd893853376c380412d5706cb (patch)
treea12cb0ea8ffc3e338639990957d5fc8ec57f2b6d /gdb/python
parent3e27b49025ff4cc62a8d028f7de6aa1a53a31df1 (diff)
downloadbinutils-5acdeb08eb52cb1dd893853376c380412d5706cb.zip
binutils-5acdeb08eb52cb1dd893853376c380412d5706cb.tar.gz
binutils-5acdeb08eb52cb1dd893853376c380412d5706cb.tar.bz2
gdb/dwarf: move index unit vectors to .debug_names reader and use them
The all_comp_units_index_cus and all_comp_units_index_tus vectors contain the CU and TU lists as found in the .debug_names list. It seems like they are meant to be used by the .debug_names reader when handling a DW_IDX_compile_unit or DW_IDX_type_unit attribute. The value of the attribute would translate directly into an index into one of these vectors. However, it looks like these vectors aren't actually used in practice. They are used in the dwarf2_per_bfd::get_index_{c,t}u methods, which in turn aren't used anywhere. The handlers of DW_IDX_compile_unit and DW_IDX_type_unit use the dwarf2_per_bfd::get_unit method, with the assumption that dwarf2_per_bfd::all_units has comp units before type units. This is not the case: the .debug_names reader creates the units in dwarf2_per_bfd::all_units using the create_all_units function, which creates the units in the order found in .debug_info, where type units can be interleaved with comp units. Since those vectors are specific to the .debug_names reader, move them to the mapped_debug_names_reader struct. Then, update the handlers of DW_IDX_compile_unit and DW_IDX_type_unit to actually use them. Change-Id: Ie7db81f4442f634ac6d02280a60c6c671bcd22a5 Approved-By: Tom Tromey <tom@tromey.com>
Diffstat (limited to 'gdb/python')
0 files changed, 0 insertions, 0 deletions