gdb: rename find_pc_compunit_symtab -> find_compunit_symtab_for_pc

Change-Id: I6eef5db4ae55f3eb0415768207ae3c26b305f773
Approved-by: Kevin Buettner <kevinb@redhat.com>
This commit is contained in:
Simon Marchi
2025-10-15 20:07:58 -04:00
committed by Simon Marchi
parent b183172322
commit 3845baa0c6
13 changed files with 20 additions and 20 deletions

View File

@@ -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)

View File

@@ -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. */

View File

@@ -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

View File

@@ -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);

View File

@@ -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

View File

@@ -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;

View File

@@ -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 ();

View File

@@ -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);

View File

@@ -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)

View File

@@ -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);

View File

@@ -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);

View File

@@ -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

View File

@@ -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. */