]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb: rename find_pc_sect_containing_function -> find_symbol_for_pc_sect_maybe_inline
authorSimon Marchi <simon.marchi@polymtl.ca>
Thu, 16 Oct 2025 00:07:57 +0000 (20:07 -0400)
committerSimon Marchi <simon.marchi@efficios.com>
Mon, 20 Oct 2025 19:11:39 +0000 (15:11 -0400)
Use the suffix "maybe_inline" to differentiate it from
find_symbol_for_pc_sect.  find_symbol_for_pc_sect_maybe_inline can
return symbols for inline functions, while find_symbol_for_pc_sect
doesn't.

Change-Id: I6c4ef961383429ee26c8fcc0cc5df2e4e1e24959
Approved-by: Kevin Buettner <kevinb@redhat.com>
gdb/blockframe.c
gdb/infcmd.c
gdb/linespec.c
gdb/symtab.c
gdb/symtab.h

index 9374cb15184f4bba75b6b9e548c240c3f22ef663..434208c7e269e6314cc72fbbf000fd98c54f0a44 100644 (file)
@@ -153,7 +153,7 @@ find_symbol_for_pc (CORE_ADDR pc)
 /* See symtab.h.  */
 
 struct symbol *
-find_pc_sect_containing_function (CORE_ADDR pc, struct obj_section *section)
+find_symbol_for_pc_sect_maybe_inline (CORE_ADDR pc, struct obj_section *section)
 {
   const block *bl = block_for_pc_sect (pc, section);
 
index 7747f03b63b2f9cf33fa674f3e5779bda160b56a..bb929240978f9e12c6b5cb6f989cf47807ee82c9 100644 (file)
@@ -1093,7 +1093,7 @@ jump_command (const char *arg, int from_tty)
 
   /* See if we are trying to jump to another function.  */
   fn = get_frame_function (get_current_frame ());
-  sfn = find_pc_sect_containing_function (sal.pc,
+  sfn = find_symbol_for_pc_sect_maybe_inline (sal.pc,
                                          find_pc_mapped_section (sal.pc));
   if (fn != nullptr && sfn != fn)
     {
index fe1fb4c07fb9c33949f823795257c8cb9febf680..b6fe4e170bf3c6c02d5d850de984db0092b42e11 100644 (file)
@@ -2165,7 +2165,7 @@ convert_address_location_to_sals (struct linespec_state *self,
   sal.pc = address;
   sal.section = find_pc_overlay (address);
   sal.explicit_pc = 1;
-  sal.symbol = find_pc_sect_containing_function (sal.pc, sal.section);
+  sal.symbol = find_symbol_for_pc_sect_maybe_inline (sal.pc, sal.section);
 
   std::vector<symtab_and_line> sals;
   add_sal_to_sals (self, sals, sal, core_addr_to_string (address), true);
index 386107451be341762aa0ed66113d846755552ab1..100e7dbbda140a4e57e67e16221c5ceef712a7b6 100644 (file)
@@ -3565,7 +3565,7 @@ find_function_start_sal (CORE_ADDR func_addr, bool funfirstline)
   /* find_function_start_sal_1 does a linetable search, so it finds
      the symtab and linenumber, but not a symbol.  Fill in the
      function symbol too.  */
-  sal.symbol = find_pc_sect_containing_function (sal.pc, sal.section);
+  sal.symbol = find_symbol_for_pc_sect_maybe_inline (sal.pc, sal.section);
 
   return sal;
 }
index 5d64e2149c0fabc62b2b0632f9208ab60edfe551..f6f25a62d2c440d235f58db1ca8a02369a131514 100644 (file)
@@ -2218,7 +2218,7 @@ extern struct symbol *find_symbol_for_pc_sect (CORE_ADDR, struct obj_section *);
    section.  The return value will be the closest enclosing function,
    which might be an inline function.  */
 
-extern struct symbol *find_pc_sect_containing_function
+extern struct symbol *find_symbol_for_pc_sect_maybe_inline
   (CORE_ADDR pc, struct obj_section *section);
 
 /* Find the symbol at the given address.  Returns NULL if no symbol