]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb: rename find_pc_function -> find_symbol_for_pc
authorSimon Marchi <simon.marchi@polymtl.ca>
Thu, 16 Oct 2025 00:07:55 +0000 (20:07 -0400)
committerSimon Marchi <simon.marchi@efficios.com>
Mon, 20 Oct 2025 19:11:39 +0000 (15:11 -0400)
Change-Id: I2069be1a6d7c3250cf330574c941bf851c89bab4
Approved-by: Kevin Buettner <kevinb@redhat.com>
15 files changed:
gdb/blockframe.c
gdb/btrace.c
gdb/cli/cli-cmds.c
gdb/dwarf2/loc.c
gdb/eval.c
gdb/guile/scm-frame.c
gdb/infcall.c
gdb/infcmd.c
gdb/infrun.c
gdb/python/py-finishbreakpoint.c
gdb/solib-frv.c
gdb/sparc-tdep.c
gdb/symtab.c
gdb/symtab.h
gdb/tracepoint.c

index 5a3e342ee513546d385b4f1d621f5a31ecf29944..7c421a0ad3f7408ba8b1a4fd48f98758759f2bda 100644 (file)
@@ -145,7 +145,7 @@ find_pc_sect_function (CORE_ADDR pc, struct obj_section *section)
    Backward compatibility, no section */
 
 struct symbol *
-find_pc_function (CORE_ADDR pc)
+find_symbol_for_pc (CORE_ADDR pc)
 {
   return find_pc_sect_function (pc, find_pc_mapped_section (pc));
 }
@@ -419,7 +419,7 @@ find_function_entry_range_from_pc (CORE_ADDR pc, const char **name,
 struct type *
 find_function_type (CORE_ADDR pc)
 {
-  struct symbol *sym = find_pc_function (pc);
+  struct symbol *sym = find_symbol_for_pc (pc);
 
   if (sym != NULL && sym->value_block ()->entry_pc () == pc)
     return sym->type ();
index ed7e41d3b79c5a9c48fd6228963528aff334e907..b5516a1499c82fa2d1badea1dff3e4d02fe8ab16 100644 (file)
@@ -557,7 +557,7 @@ ftrace_update_function (struct btrace_thread_info *btinfo,
      only a minimal symbol.  */
   if (pc.has_value ())
     {
-      fun = find_pc_function (*pc);
+      fun = find_symbol_for_pc (*pc);
       bound_minimal_symbol bmfun = lookup_minimal_symbol_by_pc (*pc);
       mfun = bmfun.minsym;
 
index d3536547c337bff8a38f8a319fd341ddb27fdbcf..1007af46cbadf28fc44f4fba6def813228f205fe 100644 (file)
@@ -1039,7 +1039,7 @@ edit_command (const char *arg, int from_tty)
                   paddress (get_current_arch (), sal.pc));
 
          gdbarch = sal.symtab->compunit ()->objfile ()->arch ();
-         sym = find_pc_function (sal.pc);
+         sym = find_symbol_for_pc (sal.pc);
          if (sym)
            gdb_printf ("%ps is in %ps (%ps:%ps).\n",
                        styled_string (address_style.style (),
@@ -1475,7 +1475,7 @@ list_command (const char *arg, int from_tty)
               paddress (get_current_arch (), sal.pc));
 
       gdbarch = sal.symtab->compunit ()->objfile ()->arch ();
-      sym = find_pc_function (sal.pc);
+      sym = find_symbol_for_pc (sal.pc);
       if (sym)
        gdb_printf ("%s is in %s (%s:%d).\n",
                    paddress (gdbarch, sal.pc),
index 37c85d8d19210a81f52ae84d4778b50b98d62f85..cb4a39e65ad544ae22a49147168d837d2d0af5ae 100644 (file)
@@ -759,7 +759,7 @@ call_site_target::iterate_over_addresses (gdbarch *call_site_gdbarch,
 static struct symbol *
 func_addr_to_tail_call_list (struct gdbarch *gdbarch, CORE_ADDR addr)
 {
-  struct symbol *sym = find_pc_function (addr);
+  struct symbol *sym = find_symbol_for_pc (addr);
   struct type *type;
 
   if (sym == NULL || sym->value_block ()->entry_pc () != addr)
index 07fa0af472235c29fbdb520220e24e09e42f57cc..5455164dc63465d283f8f6e8782471a003020b4b 100644 (file)
@@ -2054,7 +2054,7 @@ eval_op_objc_msgcall (struct type *expect_type, struct expression *exp,
        (exp->gdbarch, addr, current_inferior ()->top_target ());
 
       /* Is it a high_level symbol?  */
-      sym = find_pc_function (addr);
+      sym = find_symbol_for_pc (addr);
       if (sym != NULL)
        method = value_of_variable (sym, 0);
     }
index db35ae525967385edfb1d015d7f7220fd8b56f60..c77633cb59aa2e9b3f499b8b96b63689ecf9bda7 100644 (file)
@@ -665,7 +665,7 @@ gdbscm_frame_function (SCM self)
       if (frame != NULL)
        {
          found = true;
-         sym = find_pc_function (get_frame_address_in_block (frame));
+         sym = find_symbol_for_pc (get_frame_address_in_block (frame));
        }
     }
   catch (const gdb_exception &except)
index c4b4c8f0beadc2e9d2b9d4388a3b0e71c50ef2e1..3b7542cf70c868ffaea68626b15af893ea871a0a 100644 (file)
@@ -480,7 +480,7 @@ static const char *
 get_function_name (CORE_ADDR funaddr, char *buf, int buf_size)
 {
   {
-    struct symbol *symbol = find_pc_function (funaddr);
+    struct symbol *symbol = find_symbol_for_pc (funaddr);
 
     if (symbol)
       return symbol->print_name ();
index e4b3e5b61f82be5b4020f3a732ffa7454ec9af9b..7747f03b63b2f9cf33fa674f3e5779bda160b56a 100644 (file)
@@ -743,7 +743,7 @@ set_step_frame (thread_info *tp)
   set_step_info (tp, frame, sal);
 
   CORE_ADDR pc = get_frame_pc (frame);
-  tp->control.step_start_function = find_pc_function (pc);
+  tp->control.step_start_function = find_symbol_for_pc (pc);
 }
 
 /* Step until outside of current statement.  */
@@ -1352,7 +1352,7 @@ until_next_command (int from_tty)
      not).  */
 
   pc = get_frame_pc (frame);
-  func = find_pc_function (pc);
+  func = find_symbol_for_pc (pc);
 
   if (!func)
     {
@@ -1834,7 +1834,7 @@ finish_command (const char *arg, int from_tty)
 
   /* Find the function we will return from.  */
   frame_info_ptr callee_frame = get_selected_frame (nullptr);
-  sm->function = find_pc_function (get_frame_pc (callee_frame));
+  sm->function = find_symbol_for_pc (get_frame_pc (callee_frame));
   sm->return_buf = 0;    /* Initialize buffer address is not available.  */
 
   /* Determine the return convention.  If it is RETURN_VALUE_STRUCT_CONVENTION,
index b3c408feb3043bc62becc7ae5bd9a6fdbb516729..b5d2e43d5361994daf13687c9f7266dce0f688b9 100644 (file)
@@ -7865,7 +7865,7 @@ process_event_stop_test (struct execution_control_state *ecs)
          && ((ecs->event_thread->control.step_stack_frame_id
               != outer_frame_id)
              || (ecs->event_thread->control.step_start_function
-                 != find_pc_function (ecs->event_thread->stop_pc ())))))
+                 != find_symbol_for_pc (ecs->event_thread->stop_pc ())))))
     {
       CORE_ADDR stop_pc = ecs->event_thread->stop_pc ();
       CORE_ADDR real_stop_pc;
@@ -9350,7 +9350,7 @@ print_stop_location (const target_waitstatus &ws)
          && (tp->control.step_frame_id
              == get_frame_id (get_current_frame ()))
          && (tp->control.step_start_function
-             == find_pc_function (tp->stop_pc ())))
+             == find_symbol_for_pc (tp->stop_pc ())))
        {
          symtab_and_line sal = find_frame_sal (get_selected_frame (nullptr));
          if (sal.symtab != tp->current_symtab)
index 70e1684524d862121ea31177b9298206534197af..75224b6d2d7e259685a884bf8917bc5029f03ba2 100644 (file)
@@ -251,7 +251,7 @@ bpfinishpy_init (PyObject *self, PyObject *args, PyObject *kwargs)
     {
       if ((pc = get_frame_pc_if_available (frame)))
        {
-         struct symbol *function = find_pc_function (*pc);
+         struct symbol *function = find_symbol_for_pc (*pc);
          if (function != nullptr)
            {
              struct type *ret_type =
index beb880228fcd68d463f3f60312986e6f7b311684..d5c83f4573b0e45e334bd665e76a2201b293fd29 100644 (file)
@@ -904,7 +904,7 @@ frv_fdpic_find_canonical_descriptor (CORE_ADDR entry_point)
   /* Attempt to find the name of the function.  If the name is available,
      it'll be used as an aid in finding matching functions in the dynamic
      symbol table.  */
-  sym = find_pc_function (entry_point);
+  sym = find_symbol_for_pc (entry_point);
   if (sym == 0)
     name = 0;
   else
index 914a568c98b94be701e75c12d71254c8d450d6fe..6ac02def8c0076aaa83806dc8ed3d6d354383d1f 100644 (file)
@@ -1249,7 +1249,7 @@ sparc32_frame_cache (const frame_info_ptr &this_frame, void **this_cache)
 
   cache = sparc_frame_cache (this_frame, this_cache);
 
-  sym = find_pc_function (cache->pc);
+  sym = find_symbol_for_pc (cache->pc);
   if (sym)
     {
       cache->struct_return_p = sparc32_struct_return_from_sym (sym);
@@ -1552,7 +1552,7 @@ static int
 sparc32_dwarf2_struct_return_p (const frame_info_ptr &this_frame)
 {
   CORE_ADDR pc = get_frame_address_in_block (this_frame);
-  struct symbol *sym = find_pc_function (pc);
+  struct symbol *sym = find_symbol_for_pc (pc);
 
   if (sym)
     return sparc32_struct_return_from_sym (sym);
index b0cea7a06b5b7f66143644d489b466fd00fe9ee0..9109103da41639b7c5a6a7979859a4b1388d66f2 100644 (file)
@@ -4108,7 +4108,7 @@ find_function_alias_target (bound_minimal_symbol msymbol)
   if (!msymbol_is_function (msymbol.objfile, msymbol.minsym, &func_addr))
     return NULL;
 
-  symbol *sym = find_pc_function (func_addr);
+  symbol *sym = find_symbol_for_pc (func_addr);
   if (sym != NULL
       && sym->loc_class () == LOC_BLOCK
       && sym->value_block ()->entry_pc () == func_addr)
index 64028bf271f02bb4edcaed11cdd78bdc5b27b18b..ea34228df12df8a24c892daf69e7eaca4a506906 100644 (file)
@@ -2206,7 +2206,7 @@ extern struct type *lookup_enum (const char *, const struct block *);
    return value will not be an inlined function; the containing
    function will be returned instead.  */
 
-extern struct symbol *find_pc_function (CORE_ADDR);
+extern struct symbol *find_symbol_for_pc (CORE_ADDR);
 
 /* lookup the function corresponding to the address and section.  The
    return value will not be an inlined function; the containing
index 879e4a6b33e34fecd0df46ed508ccdf2b28ac034..ade745a0865300d8a3894750de8993b888630e2a 100644 (file)
@@ -217,7 +217,7 @@ set_traceframe_context (const frame_info_ptr &trace_frame)
       && (trace_pc = get_frame_pc_if_available (trace_frame)))
     {
       traceframe_sal = find_pc_line (*trace_pc, 0);
-      traceframe_fun = find_pc_function (*trace_pc);
+      traceframe_fun = find_symbol_for_pc (*trace_pc);
 
       /* Save linenumber as "$trace_line", a debugger variable visible to
         users.  */