]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb/symtab: remove section parameter from find_function_start_sal
authorSimon Marchi <simon.marchi@efficios.com>
Thu, 9 Oct 2025 19:14:24 +0000 (15:14 -0400)
committerSimon Marchi <simon.marchi@polymtl.ca>
Sat, 11 Oct 2025 04:04:09 +0000 (00:04 -0400)
All 2 callers of this overload pass NULL.  Remove the parameter and pass
nullptr explicitly to find_function_start_sal_1.

Change-Id: Ie20e7c8ad980cd7af99b6ba9c23f4da19febc1bc

gdb/elfread.c
gdb/linespec.c
gdb/symtab.c
gdb/symtab.h

index c8e976ace6f554221e9cfda7812a8cf7445e2f47..152576d3523ae133ae713af4c4fa450079f18de4 100644 (file)
@@ -1048,7 +1048,7 @@ elf_gnu_ifunc_resolver_return_stop (code_breakpoint *b)
 
   b->type = bp_breakpoint;
   update_breakpoint_locations (b, current_program_space,
-                              find_function_start_sal (resolved_pc, NULL, true),
+                              find_function_start_sal (resolved_pc, true),
                               {});
 }
 
index e87bac370054653cd70049091f3be803592dda73..7489af0ccae396c4bdb62260b247049397216956 100644 (file)
@@ -4074,7 +4074,7 @@ minsym_found (struct linespec_state *self, struct objfile *objfile,
   symtab_and_line sal;
 
   if (is_function && want_start_sal)
-    sal = find_function_start_sal (func_addr, NULL, self->funfirstline);
+    sal = find_function_start_sal (func_addr, self->funfirstline);
   else
     {
       sal.objfile = objfile;
index aefa1881fe557107422443ef3a9012c68ab4c492..216a4c18c0ccefcf2145b628a2ded81413642454 100644 (file)
@@ -3546,11 +3546,10 @@ find_function_start_sal_1 (CORE_ADDR func_addr, obj_section *section,
 /* See symtab.h.  */
 
 symtab_and_line
-find_function_start_sal (CORE_ADDR func_addr, obj_section *section,
-                        bool funfirstline)
+find_function_start_sal (CORE_ADDR func_addr, bool funfirstline)
 {
   symtab_and_line sal
-    = find_function_start_sal_1 (func_addr, section, funfirstline);
+    = find_function_start_sal_1 (func_addr, nullptr, funfirstline);
 
   /* find_function_start_sal_1 does a linetable search, so it finds
      the symtab and linenumber, but not a symbol.  Fill in the
index 5be7edb07b0e4c7d69ee0f50a326e97acc91c278..49daac5112c53fbd035b4138e36bc956d01bb0b7 100644 (file)
@@ -2527,10 +2527,8 @@ extern symtab *find_line_symtab (symtab *sym_tab, int line, int *index);
 extern symtab_and_line find_function_start_sal (symbol *sym, bool
                                                funfirstline);
 
-/* Same, but start with a function address/section instead of a
-   symbol.  */
+/* Same, but start with a function address instead of a symbol.  */
 extern symtab_and_line find_function_start_sal (CORE_ADDR func_addr,
-                                               obj_section *section,
                                                bool funfirstline);
 
 extern void skip_prologue_sal (struct symtab_and_line *);