Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: simon.marchi@polymtl.ca
To: gdb-patches@sourceware.org
Cc: Simon Marchi <simon.marchi@polymtl.ca>
Subject: [PATCH 02/10] gdb: rename find_pc_sect_function -> find_symbol_for_pc_sect
Date: Wed, 15 Oct 2025 20:07:56 -0400	[thread overview]
Message-ID: <20251016001154.3969223-3-simon.marchi@polymtl.ca> (raw)
In-Reply-To: <20251016001154.3969223-1-simon.marchi@polymtl.ca>

From: Simon Marchi <simon.marchi@polymtl.ca>

Change-Id: I24d584024053655b469cabc78809abf05f0f0f02
---
 gdb/blockframe.c | 6 +++---
 gdb/breakpoint.c | 2 +-
 gdb/printcmd.c   | 2 +-
 gdb/symtab.c     | 2 +-
 gdb/symtab.h     | 2 +-
 gdb/tracepoint.c | 2 +-
 6 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/gdb/blockframe.c b/gdb/blockframe.c
index 7c421a0ad3f7..9374cb15184f 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 bfcfc2404b0b..de98a2327d7e 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 e27ccd05d4fb..047833a261d9 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 9109103da416..386107451be3 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 ea34228df12d..5d64e2149c0f 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 ade745a08653..ce5418b87913 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 ");
-- 
2.51.0


  parent reply	other threads:[~2025-10-16  0:14 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-16  0:07 [PATCH 00/10] Rename some symtab find functions simon.marchi
2025-10-16  0:07 ` [PATCH 01/10] gdb: rename find_pc_function -> find_symbol_for_pc simon.marchi
2025-10-16  0:07 ` simon.marchi [this message]
2025-10-16  0:07 ` [PATCH 03/10] gdb: rename find_pc_sect_containing_function -> find_symbol_for_pc_sect_maybe_inline simon.marchi
2025-10-16  0:07 ` [PATCH 04/10] gdb: rename find_pc_compunit_symtab -> find_compunit_symtab_for_pc simon.marchi
2025-10-16  0:07 ` [PATCH 05/10] gdb: rename find_pc_sect_compunit_symtab -> find_compunit_symtab_for_pc_sect simon.marchi
2025-10-16  0:08 ` [PATCH 06/10] gdb: rename find_pc_line_pc_range -> find_line_pc_range_for_pc simon.marchi
2025-10-16  0:08 ` [PATCH 07/10] gdb: rename find_pc_line -> find_sal_for_pc simon.marchi
2025-10-16  0:08 ` [PATCH 08/10] gdb: rename find_pc_sect_line -> find_sal_for_pc_sect simon.marchi
2025-10-16  0:08 ` [PATCH 09/10] gdb: rename find_pc_line_symtab -> find_symtab_for_pc simon.marchi
2025-10-16  0:08 ` [PATCH 10/10] gdb: rename find_line_pc_range -> find_pc_range_for_sal simon.marchi
2025-10-19  4:07 ` [PATCH 00/10] Rename some symtab find functions Kevin Buettner
2025-10-20 19:41   ` Simon Marchi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251016001154.3969223-3-simon.marchi@polymtl.ca \
    --to=simon.marchi@polymtl.ca \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox