diff --git a/gdb/amd64-tdep.c b/gdb/amd64-tdep.c index 9245889210b..b1021c071c5 100755 --- a/gdb/amd64-tdep.c +++ b/gdb/amd64-tdep.c @@ -2850,7 +2850,7 @@ amd64_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR start_pc) { CORE_ADDR post_prologue_pc = skip_prologue_using_sal (gdbarch, func_addr); - struct compunit_symtab *cust = find_pc_compunit_symtab (func_addr); + struct compunit_symtab *cust = find_compunit_symtab_for_pc (func_addr); /* LLVM backend (Clang/Flang) always emits a line note before the prologue and another one after. We trust clang and newer Intel @@ -3233,7 +3233,7 @@ amd64_stack_frame_destroyed_p_1 (struct gdbarch *gdbarch, CORE_ADDR pc) static int amd64_stack_frame_destroyed_p (struct gdbarch *gdbarch, CORE_ADDR pc) { - struct compunit_symtab *cust = find_pc_compunit_symtab (pc); + struct compunit_symtab *cust = find_compunit_symtab_for_pc (pc); if (cust != nullptr && cust->producer () != nullptr && producer_is_llvm (cust->producer ())) @@ -3255,7 +3255,7 @@ amd64_epilogue_frame_sniffer_1 (const struct frame_unwind *self, return 0; bool unwind_valid_p - = compunit_epilogue_unwind_valid (find_pc_compunit_symtab (pc)); + = compunit_epilogue_unwind_valid (find_compunit_symtab_for_pc (pc)); if (override_p) { if (unwind_valid_p) diff --git a/gdb/amdgpu-tdep.c b/gdb/amdgpu-tdep.c index 26e5a27a749..07ad307afc1 100644 --- a/gdb/amdgpu-tdep.c +++ b/gdb/amdgpu-tdep.c @@ -1002,7 +1002,7 @@ amdgpu_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR start_pc) { CORE_ADDR post_prologue_pc = skip_prologue_using_sal (gdbarch, func_addr); - struct compunit_symtab *cust = find_pc_compunit_symtab (func_addr); + struct compunit_symtab *cust = find_compunit_symtab_for_pc (func_addr); /* Clang always emits a line note before the prologue and another one after. We trust clang to emit usable line notes. */ diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c index f4c2e0413f1..b03e67b1aa8 100644 --- a/gdb/arm-tdep.c +++ b/gdb/arm-tdep.c @@ -1780,7 +1780,7 @@ arm_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc) { CORE_ADDR post_prologue_pc = skip_prologue_using_sal (gdbarch, func_addr); - struct compunit_symtab *cust = find_pc_compunit_symtab (func_addr); + struct compunit_symtab *cust = find_compunit_symtab_for_pc (func_addr); if (post_prologue_pc) post_prologue_pc diff --git a/gdb/block.c b/gdb/block.c index e09bccdcf86..9ce14849566 100644 --- a/gdb/block.c +++ b/gdb/block.c @@ -219,7 +219,7 @@ call_site_for_pc (struct gdbarch *gdbarch, CORE_ADDR pc) call_site *cs = nullptr; /* -1 as tail call PC can be already after the compilation unit range. */ - cust = find_pc_compunit_symtab (pc - 1); + cust = find_compunit_symtab_for_pc (pc - 1); if (cust != nullptr) cs = cust->find_call_site (pc); diff --git a/gdb/compile/compile.c b/gdb/compile/compile.c index 5d81ec12b71..79c6af15762 100644 --- a/gdb/compile/compile.c +++ b/gdb/compile/compile.c @@ -437,7 +437,7 @@ static const char * get_selected_pc_producer_options (void) { CORE_ADDR pc = get_frame_pc (get_selected_frame (NULL)); - struct compunit_symtab *symtab = find_pc_compunit_symtab (pc); + struct compunit_symtab *symtab = find_compunit_symtab_for_pc (pc); const char *cs; if (symtab == NULL || symtab->producer () == NULL diff --git a/gdb/dwarf2/frame.c b/gdb/dwarf2/frame.c index 8d0d59fb567..525b581cf39 100644 --- a/gdb/dwarf2/frame.c +++ b/gdb/dwarf2/frame.c @@ -740,7 +740,7 @@ dwarf2_frame_find_quirks (struct dwarf2_frame_state *fs, { struct compunit_symtab *cust; - cust = find_pc_compunit_symtab (fs->pc); + cust = find_compunit_symtab_for_pc (fs->pc); if (cust == NULL) return; diff --git a/gdb/frame.c b/gdb/frame.c index 5c41dcdc345..4162a35b753 100644 --- a/gdb/frame.c +++ b/gdb/frame.c @@ -1991,7 +1991,7 @@ select_frame (const frame_info_ptr &fi) block. */ if (get_frame_address_in_block_if_available (fi, &pc)) { - struct compunit_symtab *cust = find_pc_compunit_symtab (pc); + struct compunit_symtab *cust = find_compunit_symtab_for_pc (pc); if (cust != NULL && cust->language () != current_language->la_language @@ -3143,7 +3143,7 @@ get_frame_language (const frame_info_ptr &frame) if (pc_p) { - struct compunit_symtab *cust = find_pc_compunit_symtab (pc); + struct compunit_symtab *cust = find_compunit_symtab_for_pc (pc); if (cust != NULL) return cust->language (); diff --git a/gdb/guile/scm-block.c b/gdb/guile/scm-block.c index a4e692b8ccb..e1b2928df18 100644 --- a/gdb/guile/scm-block.c +++ b/gdb/guile/scm-block.c @@ -676,7 +676,7 @@ gdbscm_lookup_block (SCM pc_scm) gdbscm_gdb_exception exc {}; try { - cust = find_pc_compunit_symtab (pc); + cust = find_compunit_symtab_for_pc (pc); if (cust != NULL && cust->objfile () != NULL) block = block_for_pc (pc); diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c index d3ad402addc..e00b3337bea 100644 --- a/gdb/i386-tdep.c +++ b/gdb/i386-tdep.c @@ -1803,7 +1803,7 @@ i386_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR start_pc) { CORE_ADDR post_prologue_pc = skip_prologue_using_sal (gdbarch, func_addr); - struct compunit_symtab *cust = find_pc_compunit_symtab (func_addr); + struct compunit_symtab *cust = find_compunit_symtab_for_pc (func_addr); /* LLVM backend (Clang/Flang) always emits a line note before the prologue and another one after. We trust clang and newer Intel @@ -2197,7 +2197,7 @@ i386_epilogue_frame_sniffer_1 (const struct frame_unwind *self, return 0; bool unwind_valid_p - = compunit_epilogue_unwind_valid (find_pc_compunit_symtab (pc)); + = compunit_epilogue_unwind_valid (find_compunit_symtab_for_pc (pc)); if (override_p) { if (unwind_valid_p) diff --git a/gdb/infrun.c b/gdb/infrun.c index b5d2e43d536..959393d3e5e 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -8671,7 +8671,7 @@ handle_step_into_function (struct gdbarch *gdbarch, fill_in_stop_func (gdbarch, ecs); compunit_symtab *cust - = find_pc_compunit_symtab (ecs->event_thread->stop_pc ()); + = find_compunit_symtab_for_pc (ecs->event_thread->stop_pc ()); if (cust != nullptr && cust->language () != language_asm) ecs->stop_func_start = gdbarch_skip_prologue_noexcept (gdbarch, ecs->stop_func_start); @@ -8750,7 +8750,7 @@ handle_step_into_function_backward (struct gdbarch *gdbarch, fill_in_stop_func (gdbarch, ecs); - cust = find_pc_compunit_symtab (ecs->event_thread->stop_pc ()); + cust = find_compunit_symtab_for_pc (ecs->event_thread->stop_pc ()); if (cust != nullptr && cust->language () != language_asm) ecs->stop_func_start = gdbarch_skip_prologue_noexcept (gdbarch, ecs->stop_func_start); diff --git a/gdb/python/py-progspace.c b/gdb/python/py-progspace.c index 9f3e45c0cc6..a0afc7b7dba 100644 --- a/gdb/python/py-progspace.c +++ b/gdb/python/py-progspace.c @@ -515,7 +515,7 @@ pspy_block_for_pc (PyObject *o, PyObject *args) scoped_restore_current_program_space saver; set_current_program_space (self->pspace); - cust = find_pc_compunit_symtab (pc); + cust = find_compunit_symtab_for_pc (pc); if (cust != NULL && cust->objfile () != NULL) block = block_for_pc (pc); diff --git a/gdb/symtab.c b/gdb/symtab.c index 100e7dbbda1..0180c4eadac 100644 --- a/gdb/symtab.c +++ b/gdb/symtab.c @@ -2825,7 +2825,7 @@ find_pc_sect_compunit_symtab (CORE_ADDR pc, struct obj_section *section) Backward compatibility, no section. */ struct compunit_symtab * -find_pc_compunit_symtab (CORE_ADDR pc) +find_compunit_symtab_for_pc (CORE_ADDR pc) { return find_pc_sect_compunit_symtab (pc, find_pc_mapped_section (pc)); } @@ -4755,7 +4755,7 @@ global_symbol_searcher::expand_symtabs msymbols to the results list, and that requires that the symbols tables are expanded. */ if ((kind & SEARCH_FUNCTION_DOMAIN) != 0 - ? (find_pc_compunit_symtab + ? (find_compunit_symtab_for_pc (msymbol->value_address (objfile)) == NULL) : (lookup_symbol_in_objfile_from_linkage_name (objfile, msymbol->linkage_name (), @@ -4875,7 +4875,7 @@ global_symbol_searcher::add_matching_msymbols /* For functions we can do a quick check of whether the symbol might be found via find_pc_symtab. */ if ((kind & SEARCH_FUNCTION_DOMAIN) == 0 - || (find_pc_compunit_symtab + || (find_compunit_symtab_for_pc (msymbol->value_address (objfile)) == NULL)) { if (lookup_symbol_in_objfile_from_linkage_name diff --git a/gdb/symtab.h b/gdb/symtab.h index f6f25a62d2c..c8c43b9f7cf 100644 --- a/gdb/symtab.h +++ b/gdb/symtab.h @@ -2308,7 +2308,7 @@ extern void clear_pc_function_cache (void); /* lookup full symbol table by address. */ -extern struct compunit_symtab *find_pc_compunit_symtab (CORE_ADDR); +extern struct compunit_symtab *find_compunit_symtab_for_pc (CORE_ADDR); /* lookup full symbol table by address and section. */