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 09/10] gdb: rename find_pc_line_symtab -> find_symtab_for_pc
Date: Wed, 15 Oct 2025 20:08:03 -0400	[thread overview]
Message-ID: <20251016001154.3969223-10-simon.marchi@polymtl.ca> (raw)
In-Reply-To: <20251016001154.3969223-1-simon.marchi@polymtl.ca>

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

Change-Id: I2940e0f80c4b1d63fb1aee85f5753df5fbf4326a
---
 gdb/disasm.c            | 2 +-
 gdb/record-btrace.c     | 2 +-
 gdb/symmisc.c           | 2 +-
 gdb/symtab.c            | 2 +-
 gdb/symtab.h            | 2 +-
 gdb/tui/tui-source.c    | 2 +-
 gdb/tui/tui-winsource.c | 2 +-
 7 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/gdb/disasm.c b/gdb/disasm.c
index b2e795d5c69c..512edcf4cc34 100644
--- a/gdb/disasm.c
+++ b/gdb/disasm.c
@@ -1150,7 +1150,7 @@ gdb_disassembly (struct gdbarch *gdbarch, struct ui_out *uiout,
   int nlines = -1;
 
   /* Assume symtab is valid for whole PC range.  */
-  symtab = find_pc_line_symtab (low);
+  symtab = find_symtab_for_pc (low);
 
   if (symtab != NULL && symtab->linetable () != NULL)
     nlines = symtab->linetable ()->nitems;
diff --git a/gdb/record-btrace.c b/gdb/record-btrace.c
index cc9365d2fa1b..be3a3955974a 100644
--- a/gdb/record-btrace.c
+++ b/gdb/record-btrace.c
@@ -709,7 +709,7 @@ btrace_find_line_range (CORE_ADDR pc)
   struct symtab *symtab;
   int nlines, i;
 
-  symtab = find_pc_line_symtab (pc);
+  symtab = find_symtab_for_pc (pc);
   if (symtab == NULL)
     return btrace_mk_line_range (NULL, 0, 0);
 
diff --git a/gdb/symmisc.c b/gdb/symmisc.c
index 2ad3620c9f27..78c44e899482 100644
--- a/gdb/symmisc.c
+++ b/gdb/symmisc.c
@@ -447,7 +447,7 @@ maintenance_print_symbols (const char *args, int from_tty)
   if (address_arg != NULL)
     {
       CORE_ADDR pc = parse_and_eval_address (address_arg);
-      struct symtab *s = find_pc_line_symtab (pc);
+      struct symtab *s = find_symtab_for_pc (pc);
 
       if (s == NULL)
 	error (_("No symtab for address: %s"), address_arg);
diff --git a/gdb/symtab.c b/gdb/symtab.c
index fab16f7ad48c..bb17276102f9 100644
--- a/gdb/symtab.c
+++ b/gdb/symtab.c
@@ -3246,7 +3246,7 @@ find_line_range_start (CORE_ADDR pc)
 /* See symtab.h.  */
 
 struct symtab *
-find_pc_line_symtab (CORE_ADDR pc)
+find_symtab_for_pc (CORE_ADDR pc)
 {
   struct symtab_and_line sal;
 
diff --git a/gdb/symtab.h b/gdb/symtab.h
index 6e8283280623..3a2088cb6af3 100644
--- a/gdb/symtab.h
+++ b/gdb/symtab.h
@@ -2430,7 +2430,7 @@ extern std::optional<CORE_ADDR> find_line_range_start (CORE_ADDR pc);
 
 /* Wrapper around find_sal_for_pc to just return the symtab.  */
 
-extern struct symtab *find_pc_line_symtab (CORE_ADDR);
+extern struct symtab *find_symtab_for_pc (CORE_ADDR);
 
 /* Given a symtab and line number, return the pc there.  */
 
diff --git a/gdb/tui/tui-source.c b/gdb/tui/tui-source.c
index e2dff84a5d58..9485ad960022 100644
--- a/gdb/tui/tui-source.c
+++ b/gdb/tui/tui-source.c
@@ -157,7 +157,7 @@ tui_source_window::do_scroll_vertical (int num_to_scroll)
       if (cursal.symtab == NULL)
 	{
 	  frame_info_ptr fi = get_selected_frame (NULL);
-	  s = find_pc_line_symtab (get_frame_pc (fi));
+	  s = find_symtab_for_pc (get_frame_pc (fi));
 	  arch = get_frame_arch (fi);
 	}
       else
diff --git a/gdb/tui/tui-winsource.c b/gdb/tui/tui-winsource.c
index e66c4596586e..27f682b7ea80 100644
--- a/gdb/tui/tui-winsource.c
+++ b/gdb/tui/tui-winsource.c
@@ -55,7 +55,7 @@ tui_display_main ()
 	  tui_batch_rendering defer;
 
 	  tui_update_source_windows_with_addr (gdbarch, addr);
-	  struct symtab *s = find_pc_line_symtab (addr);
+	  struct symtab *s = find_symtab_for_pc (addr);
 	  tui_location.set_location (s);
 	}
     }
-- 
2.51.0


  parent reply	other threads:[~2025-10-16  0:26 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 ` [PATCH 02/10] gdb: rename find_pc_sect_function -> find_symbol_for_pc_sect simon.marchi
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 ` simon.marchi [this message]
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-10-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