From: Simon Marchi Date: Thu, 16 Oct 2025 00:07:56 +0000 (-0400) Subject: gdb: rename find_pc_sect_function -> find_symbol_for_pc_sect X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d8cf16fc34a229e91c50a80ff7967cb60d892cd4;p=thirdparty%2Fbinutils-gdb.git gdb: rename find_pc_sect_function -> find_symbol_for_pc_sect Change-Id: I24d584024053655b469cabc78809abf05f0f0f02 Approved-by: Kevin Buettner --- diff --git a/gdb/blockframe.c b/gdb/blockframe.c index 7c421a0ad3f..9374cb15184 100644 --- a/gdb/blockframe.c +++ b/gdb/blockframe.c @@ -131,7 +131,7 @@ get_frame_function (const frame_info_ptr &frame) Returns 0 if function is not known. */ struct symbol * -find_pc_sect_function (CORE_ADDR pc, struct obj_section *section) +find_symbol_for_pc_sect (CORE_ADDR pc, struct obj_section *section) { const struct block *b = block_for_pc_sect (pc, section); @@ -147,7 +147,7 @@ find_pc_sect_function (CORE_ADDR pc, struct obj_section *section) struct symbol * find_symbol_for_pc (CORE_ADDR pc) { - return find_pc_sect_function (pc, find_pc_mapped_section (pc)); + return find_symbol_for_pc_sect (pc, find_pc_mapped_section (pc)); } /* See symtab.h. */ @@ -249,7 +249,7 @@ find_pc_partial_function_sym (CORE_ADDR pc, address of the function. This will happen when the function has more than one range and the entry pc is not within the lowest range of addresses. */ - f = find_pc_sect_function (mapped_pc, section); + f = find_symbol_for_pc_sect (mapped_pc, section); if (f != NULL && (msymbol.minsym == NULL || (f->value_block ()->entry_pc () diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index bfcfc2404b0..de98a2327d7 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -12891,7 +12891,7 @@ update_static_tracepoint (tracepoint *tp, struct symtab_and_line sal) tp->number, tp->static_trace_marker_id.c_str ()); symtab_and_line sal2 = find_pc_line (tpmarker->address, 0); - sym = find_pc_sect_function (tpmarker->address, NULL); + sym = find_symbol_for_pc_sect (tpmarker->address, NULL); uiout->text ("Now in "); if (sym) { diff --git a/gdb/printcmd.c b/gdb/printcmd.c index e27ccd05d4f..047833a261d 100644 --- a/gdb/printcmd.c +++ b/gdb/printcmd.c @@ -636,7 +636,7 @@ build_address_symbolic (struct gdbarch *gdbarch, symbols anyway). */ bound_minimal_symbol msymbol = lookup_minimal_symbol_by_pc_section (addr, section); - symbol = find_pc_sect_function (addr, section); + symbol = find_symbol_for_pc_sect (addr, section); if (symbol) { diff --git a/gdb/symtab.c b/gdb/symtab.c index 9109103da41..386107451be 100644 --- a/gdb/symtab.c +++ b/gdb/symtab.c @@ -3700,7 +3700,7 @@ skip_prologue_sal (struct symtab_and_line *sal) switch_to_program_space_and_thread (sal->pspace); - symbol *sym = find_pc_sect_function (sal->pc, sal->section); + symbol *sym = find_symbol_for_pc_sect (sal->pc, sal->section); objfile *objfile; CORE_ADDR pc; obj_section *section; diff --git a/gdb/symtab.h b/gdb/symtab.h index ea34228df12..5d64e2149c0 100644 --- a/gdb/symtab.h +++ b/gdb/symtab.h @@ -2212,7 +2212,7 @@ extern struct symbol *find_symbol_for_pc (CORE_ADDR); return value will not be an inlined function; the containing function will be returned instead. */ -extern struct symbol *find_pc_sect_function (CORE_ADDR, struct obj_section *); +extern struct symbol *find_symbol_for_pc_sect (CORE_ADDR, struct obj_section *); /* lookup the function symbol corresponding to the address and section. The return value will be the closest enclosing function, diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c index ade745a0865..ce5418b8791 100644 --- a/gdb/tracepoint.c +++ b/gdb/tracepoint.c @@ -3618,7 +3618,7 @@ print_one_static_tracepoint_marker (int count, uiout->field_core_addr ("addr", marker.gdbarch, marker.address); sal = find_pc_line (marker.address, 0); - sym = find_pc_sect_function (marker.address, NULL); + sym = find_symbol_for_pc_sect (marker.address, NULL); if (sym) { uiout->text ("in ");