Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Simon Marchi <simon.marchi@efficios.com>
To: Luis <luis.machado.foss@gmail.com>, Kevin Buettner <kevinb@redhat.com>
Cc: gdb-patches@sourceware.org, Simon Marchi <simon.marchi@polymtl.ca>
Subject: Re: [PATCH] gdb: rename gdbarch_software_single_step -> gdbarch_get_next_pcs
Date: Tue, 19 Aug 2025 09:48:27 -0400	[thread overview]
Message-ID: <42f54179-43ab-4616-9696-32901d7702e4@efficios.com> (raw)
In-Reply-To: <335c9e3c-12ca-417c-a6f7-c7d208268797@gmail.com>

On 8/18/25 7:24 PM, Luis wrote:
> On 8/16/25 04:09, Kevin Buettner wrote:
>> On Thu, 14 Aug 2025 16:14:17 -0400
>> Simon Marchi <simon.marchi@efficios.com> wrote:
>>
>>> From: Simon Marchi <simon.marchi@efficios.com>
>>> To: gdb-patches@sourceware.org
>>> Cc: Simon Marchi <simon.marchi@polymtl.ca>
>>> Subject: [PATCH] gdb: rename gdbarch_software_single_step ->
>>> gdbarch_get_next_pcs Date: Thu, 14 Aug 2025 16:14:17 -0400
>>>
>>> From: Simon Marchi <simon.marchi@polymtl.ca>
>>>
>>> I spotted this while reviewing a patch adding a new
>>> gdbarch_software_single_step implementation.  I find the name
>>> "software_single_step" a bit misleading or unclear.  It makes it sounds
>>> as if the function executed a single step.  In reality, this function
>>> returns the possible next PCs for current instructions.
>>>
>>> We have a similar concept in GDBserver:
>>> linux_process_target::low_get_next_pcs.  I like that name, it's clear
>>> and straight to the point.
>>>
>>> Rename gdbarch_software_single_step to gdbarch_get_next_pcs.  I find
>>> this name more indicative of what happens.
>>>
>>> There is some code for ARM shared between GDB and GDBserver to implement
>>> both sides, also called "get next pcs", so I think it all fits well
>>> together.
>>>
>>> Tested by rebuilding.
>>
>> This one makes sense to me too.
>>
>> Approved-by: Kevin Buettner <kevinb@redhat.com>
>>
> 
> Agreed. The naming has confused me in the past as well.

Thanks, it's nice to have two opinions that confirm my feeling.  I
translated your (Luis') acknowledgement to an Acked-by and pushed the
patch.

Simon

      reply	other threads:[~2025-08-19 13:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-14 20:14 Simon Marchi
2025-08-16  3:09 ` Kevin Buettner
2025-08-18 23:24   ` Luis
2025-08-19 13:48     ` Simon Marchi [this message]

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=42f54179-43ab-4616-9696-32901d7702e4@efficios.com \
    --to=simon.marchi@efficios.com \
    --cc=gdb-patches@sourceware.org \
    --cc=kevinb@redhat.com \
    --cc=luis.machado.foss@gmail.com \
    --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