gdb: replace function pointer with `void *` data with function_view
Replace the function pointer + `void *` parameters of dwarf2_fetch_die_loc_sect_off and dwarf2_fetch_die_loc_cu_off with a function_view parameter. Change call sites to use a lambda function. This improves type-safety, so reduces the chances of errors. gdb/ChangeLog: * read.h (dwarf2_fetch_die_loc_sect_off, dwarf2_fetch_die_loc_cu_off): Replace function pointer + `void *` parameter with function_view. * read.c (dwarf2_fetch_die_loc_sect_off, dwarf2_fetch_die_loc_cu_off): Likewise. * loc.c (get_frame_pc_for_per_cu_dwarf_call): Remove. (per_cu_dwarf_call): Adjust. (get_frame_address_in_block_wrapper): Remove. (indirect_synthetic_pointer): Adjust. (get_ax_pc): Remove. (dwarf2_compile_expr_to_ax): Adjust. Change-Id: Ic9b6ced0c4128f2b75ca62e0ed638b0962a22859
Loading
Please register or sign in to comment