gdb: rename gdbarch_software_single_step -> gdbarch_get_next_pcs

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.

Change-Id: Ide74011a5034ba11117b7e7c865a093ef0b1dece
Approved-by: Kevin Buettner <kevinb@redhat.com>
Acked-by: Luis Machado <luis.machado.foss@gmail.com>
This commit is contained in:
Simon Marchi
2025-08-14 16:14:17 -04:00
committed by Simon Marchi
parent 1bf1357c68
commit 1d5f884e50
36 changed files with 57 additions and 59 deletions

View File

@@ -48,7 +48,7 @@
bool
default_displaced_step_hw_singlestep (struct gdbarch *gdbarch)
{
return !gdbarch_software_single_step_p (gdbarch);
return !gdbarch_get_next_pcs_p (gdbarch);
}
CORE_ADDR