Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Kevin Buettner <kevinb@redhat.com>
To: simon.marchi@polymtl.ca
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 00/10] Rename some symtab find functions
Date: Sat, 18 Oct 2025 21:07:02 -0700	[thread overview]
Message-ID: <20251018210702.18409872@f41-zbm-amd> (raw)
In-Reply-To: <20251016001154.3969223-1-simon.marchi@polymtl.ca>

On Wed, 15 Oct 2025 20:07:54 -0400
simon.marchi@polymtl.ca wrote:

> 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

I wholeheartedly approve of these name changes.  Over the years, I've
been confused by these names too.

Approved-by: Kevin Buettner <kevinb@redhat.com>


  parent reply	other threads:[~2025-10-19  4:07 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-16  0:07 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 ` [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 ` Kevin Buettner [this message]
2025-10-20 19:41   ` [PATCH 00/10] Rename some symtab find functions 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=20251018210702.18409872@f41-zbm-amd \
    --to=kevinb@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=simon.marchi@polymtl.ca \
    /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