]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb: rename find_pc_compunit_symtab -> find_compunit_symtab_for_pc
authorSimon Marchi <simon.marchi@polymtl.ca>
Thu, 16 Oct 2025 00:07:58 +0000 (20:07 -0400)
committerSimon Marchi <simon.marchi@efficios.com>
Mon, 20 Oct 2025 19:11:39 +0000 (15:11 -0400)
Change-Id: I6eef5db4ae55f3eb0415768207ae3c26b305f773
Approved-by: Kevin Buettner <kevinb@redhat.com>
13 files changed:
gdb/amd64-tdep.c
gdb/amdgpu-tdep.c
gdb/arm-tdep.c
gdb/block.c
gdb/compile/compile.c
gdb/dwarf2/frame.c
gdb/frame.c
gdb/guile/scm-block.c
gdb/i386-tdep.c
gdb/infrun.c
gdb/python/py-progspace.c
gdb/symtab.c
gdb/symtab.h

index 9245889210b35ead0a29998449f11de24827858b..b1021c071c559cc4eae7c7be66a28acfc374d44d 100755 (executable)
@@ -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)
index 26e5a27a749acac86aed970e3e3ee07d5d49ff70..07ad307afc18610bf2bb652a5fbe251b7b8d0399 100644 (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.  */
index f4c2e0413f1923b8b1725905d4779479a1f40dc7..b03e67b1aa82f2d8db8b9db9e37e1d1974d3569d 100644 (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
index e09bccdcf8620a2467fbf5dabdd9507b067d886b..9ce14849566b0edcfae0a88598c79aca9b5c71d1 100644 (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);
index 5d81ec12b7149f9f9d92d4e5dba76e413106bb77..79c6af157629e3482328e58f8c265d4a0f9d4804 100644 (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
index 8d0d59fb5671685ffa625e0b01d4914cb36e4da4..525b581cf39391362797d5eab84c97dab3f7049a 100644 (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;
 
index 5c41dcdc34573f7647473f6530ee33fef9642306..4162a35b75332b01aa7612134fc930277cfcdf2f 100644 (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 ();
index a4e692b8ccb14c124743af586ba0882900bfa9d8..e1b2928df18016f88837625e1d427c32a9542d0a 100644 (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);
index d3ad402addc140ef393e164f50b5af7b6cde742c..e00b3337beaf3a3a10e8fc5ad1de282cfad6275e 100644 (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)
index b5d2e43d5361994daf13687c9f7266dce0f688b9..959393d3e5e76e29c7c015bb835aee10e83e64f4 100644 (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);
index 9f3e45c0cc65fadd80aa1eeac5cfb270d9b1c86e..a0afc7b7dba3edd7bbd3cf3267122d9da786f1f7 100644 (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);
index 100e7dbbda140a4e57e67e16221c5ceef712a7b6..0180c4eadac5bff560eab4ee0e3345c45e6490d3 100644 (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
index f6f25a62d2c440d235f58db1ca8a02369a131514..c8c43b9f7cf47a27fa952d2f67eea458670521e5 100644 (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.  */