[binutils-gdb] gdb/symtab: remove section parameter from find_function_start_sal
Simon Marchi
simark@sourceware.org
Sat Oct 11 04:04:20 GMT 2025
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=6b0581fc925ab807647a0ff38f7f015bf94c0eb0
commit 6b0581fc925ab807647a0ff38f7f015bf94c0eb0
Author: Simon Marchi <simon.marchi@efficios.com>
Date: Thu Oct 9 15:14:24 2025 -0400
gdb/symtab: remove section parameter from find_function_start_sal
All 2 callers of this overload pass NULL. Remove the parameter and pass
nullptr explicitly to find_function_start_sal_1.
Change-Id: Ie20e7c8ad980cd7af99b6ba9c23f4da19febc1bc
Diff:
---
gdb/elfread.c | 2 +-
gdb/linespec.c | 2 +-
gdb/symtab.c | 5 ++---
gdb/symtab.h | 4 +---
4 files changed, 5 insertions(+), 8 deletions(-)
diff --git a/gdb/elfread.c b/gdb/elfread.c
index c8e976ace6f..152576d3523 100644
--- a/gdb/elfread.c
+++ b/gdb/elfread.c
@@ -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),
{});
}
diff --git a/gdb/linespec.c b/gdb/linespec.c
index e87bac37005..7489af0ccae 100644
--- a/gdb/linespec.c
+++ b/gdb/linespec.c
@@ -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;
diff --git a/gdb/symtab.c b/gdb/symtab.c
index aefa1881fe5..216a4c18c0c 100644
--- a/gdb/symtab.c
+++ b/gdb/symtab.c
@@ -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
diff --git a/gdb/symtab.h b/gdb/symtab.h
index 5be7edb07b0..49daac5112c 100644
--- a/gdb/symtab.h
+++ b/gdb/symtab.h
@@ -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 *);
More information about the Gdb-cvs
mailing list