From: simon.marchi@polymtl.ca
To: gdb-patches@sourceware.org
Cc: Simon Marchi <simon.marchi@polymtl.ca>
Subject: [PATCH 00/10] Rename some symtab find functions
Date: Wed, 15 Oct 2025 20:07:54 -0400 [thread overview]
Message-ID: <20251016001154.3969223-1-simon.marchi@polymtl.ca> (raw)
From: Simon Marchi <simon.marchi@polymtl.ca>
I have long been confused by the names of the functions to look up
things in symtab. For a function named find_foo_bar, it's not obvious
if it finds a foo from a bar or vice-versa (answer: it finds a bar for a
given foo). When asking around on IRC a while ago, a few people agreed.
I'm therefore proposing to rename those functions to be of the form
find_bar_for_foo.
Simon Marchi (10):
gdb: rename find_pc_function -> find_symbol_for_pc
gdb: rename find_pc_sect_function -> find_symbol_for_pc_sect
gdb: rename find_pc_sect_containing_function ->
find_symbol_for_pc_sect_maybe_inline
gdb: rename find_pc_compunit_symtab -> find_compunit_symtab_for_pc
gdb: rename find_pc_sect_compunit_symtab ->
find_compunit_symtab_for_pc_sect
gdb: rename find_pc_line_pc_range -> find_line_pc_range_for_pc
gdb: rename find_pc_line -> find_sal_for_pc
gdb: rename find_pc_sect_line -> find_sal_for_pc_sect
gdb: rename find_pc_line_symtab -> find_symtab_for_pc
gdb: rename find_line_pc_range -> find_pc_range_for_sal
gdb/aarch64-tdep.c | 2 +-
gdb/alpha-tdep.c | 2 +-
gdb/amd64-tdep.c | 10 ++--
gdb/amdgpu-tdep.c | 2 +-
gdb/arc-tdep.c | 2 +-
gdb/arm-linux-tdep.c | 2 +-
gdb/arm-tdep.c | 4 +-
gdb/block.c | 4 +-
gdb/blockframe.c | 14 +++---
gdb/breakpoint.c | 24 +++++-----
gdb/btrace.c | 2 +-
gdb/c-exp.y | 2 +-
gdb/cli/cli-cmds.c | 6 +--
gdb/compile/compile-c-support.c | 2 +-
gdb/compile/compile.c | 2 +-
gdb/cp-namespace.c | 2 +-
gdb/cris-tdep.c | 2 +-
gdb/disasm.c | 10 ++--
gdb/dwarf2/frame.c | 2 +-
gdb/dwarf2/loc.c | 2 +-
gdb/elfread.c | 2 +-
gdb/eval.c | 2 +-
gdb/frame.c | 6 +--
gdb/frv-tdep.c | 2 +-
gdb/ft32-tdep.c | 2 +-
gdb/guile/scm-block.c | 2 +-
gdb/guile/scm-frame.c | 2 +-
gdb/guile/scm-symtab.c | 2 +-
gdb/h8300-tdep.c | 2 +-
gdb/hppa-tdep.c | 2 +-
gdb/i386-tdep.c | 4 +-
gdb/ia64-tdep.c | 4 +-
gdb/infcall.c | 2 +-
gdb/infcmd.c | 24 +++++-----
gdb/infrun.c | 16 +++----
gdb/iq2000-tdep.c | 6 +--
gdb/linespec.c | 6 +--
gdb/linux-fork.c | 2 +-
gdb/loongarch-tdep.c | 2 +-
gdb/m32r-tdep.c | 2 +-
gdb/m68hc11-tdep.c | 2 +-
gdb/macroscope.c | 2 +-
gdb/mi/mi-cmd-disas.c | 2 +-
gdb/mi/mi-main.c | 2 +-
gdb/microblaze-tdep.c | 2 +-
gdb/moxie-tdep.c | 2 +-
gdb/namespace.c | 2 +-
gdb/or1k-tdep.c | 2 +-
gdb/printcmd.c | 6 +--
gdb/python/py-finishbreakpoint.c | 2 +-
gdb/python/py-progspace.c | 4 +-
gdb/python/py-record-btrace.c | 2 +-
gdb/record-btrace.c | 4 +-
gdb/reverse.c | 2 +-
gdb/rs6000-tdep.c | 4 +-
gdb/solib-frv.c | 2 +-
gdb/source.c | 2 +-
gdb/sparc-tdep.c | 4 +-
gdb/sparc64-tdep.c | 2 +-
gdb/symmisc.c | 2 +-
gdb/symtab.c | 78 ++++++++++++++++----------------
gdb/symtab.h | 28 ++++++------
gdb/tracepoint.c | 16 +++----
gdb/tui/tui-disasm.c | 2 +-
gdb/tui/tui-source.c | 6 +--
gdb/tui/tui-winsource.c | 10 ++--
gdb/v850-tdep.c | 2 +-
gdb/xstormy16-tdep.c | 2 +-
gdb/xtensa-tdep.c | 4 +-
gdb/z80-tdep.c | 2 +-
70 files changed, 196 insertions(+), 196 deletions(-)
base-commit: b6753354fbbe7c2c66ae9f452ba7aa049db0fe0c
--
2.51.0
next reply other threads:[~2025-10-16 0:19 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-16 0:07 simon.marchi [this message]
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 ` [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-1-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