[PATCH 00/10] gdbstub: Remove target_long_bits() from GDB register reads

Philippe Mathieu-Daudé posted 10 patches 1 month, 2 weeks ago
Failed in applying to current master (apply log)
include/exec/target_long.h  |  8 ++--
include/gdbstub/helpers.h   | 18 --------
include/user/tswap-target.h |  2 +-
target/mips/internal.h      |  5 +++
target/ppc/internal.h       | 11 +++++
target/mips/gdbstub.c       | 85 ++++++++++++++++++++++---------------
target/ppc/cpu_init.c       |  2 +-
target/ppc/gdbstub.c        | 38 +++++++++++------
target/riscv/gdbstub.c      | 35 +++++++++------
target/sparc/gdbstub.c      | 13 +++---
10 files changed, 125 insertions(+), 92 deletions(-)
[PATCH 00/10] gdbstub: Remove target_long_bits() from GDB register reads
Posted by Philippe Mathieu-Daudé 1 month, 2 weeks ago
Prefer getting target register word size at runtime (via
CPU state) instead of build time.

This allow to remove gdb_get_regl() and various target_long_bits()
calls, and to eliminate the TARGET_LONG_SIZE definition.

Philippe Mathieu-Daudé (10):
  target/sparc/gdbstub: Replace gdb_get_regl() by gdb_get_reg64()
  target/mips/gdbstub: Reduce to a single gdb_get_regl() call
  target/mips/gdbstub: Replace target_long_bits() by mips_env_is_64bit()
  target/ppc: Factor ppc_env_is_64bit() out
  target/ppc/gdbstub: Replace target_long_bits() by ppc_env_is_64bit()
  target/ppc/gdbstub: Replace gdb_get_regl() by ppc_env_is_64bit()
  target/riscv: Factor riscv_gdb_get_reg_mxl() out
  target/riscv: Replace gdb_get_regl() by riscv_gdb_get_reg_mxl()
  gdbstub: Remove unused gdb_get_regl()
  include: Remove TARGET_LONG_SIZE definition

 include/exec/target_long.h  |  8 ++--
 include/gdbstub/helpers.h   | 18 --------
 include/user/tswap-target.h |  2 +-
 target/mips/internal.h      |  5 +++
 target/ppc/internal.h       | 11 +++++
 target/mips/gdbstub.c       | 85 ++++++++++++++++++++++---------------
 target/ppc/cpu_init.c       |  2 +-
 target/ppc/gdbstub.c        | 38 +++++++++++------
 target/riscv/gdbstub.c      | 35 +++++++++------
 target/sparc/gdbstub.c      | 13 +++---
 10 files changed, 125 insertions(+), 92 deletions(-)

-- 
2.55.0


Re: [PATCH 00/10] gdbstub: Remove target_long_bits() from GDB register reads
Posted by Pierrick Bouvier 1 month, 2 weeks ago
On 10/7/2026 4:23 PM, Philippe Mathieu-Daudé wrote:
> Prefer getting target register word size at runtime (via
> CPU state) instead of build time.
> 
> This allow to remove gdb_get_regl() and various target_long_bits()
> calls, and to eliminate the TARGET_LONG_SIZE definition.
> 
> Philippe Mathieu-Daudé (10):
>   target/sparc/gdbstub: Replace gdb_get_regl() by gdb_get_reg64()
>   target/mips/gdbstub: Reduce to a single gdb_get_regl() call
>   target/mips/gdbstub: Replace target_long_bits() by mips_env_is_64bit()
>   target/ppc: Factor ppc_env_is_64bit() out
>   target/ppc/gdbstub: Replace target_long_bits() by ppc_env_is_64bit()
>   target/ppc/gdbstub: Replace gdb_get_regl() by ppc_env_is_64bit()
>   target/riscv: Factor riscv_gdb_get_reg_mxl() out
>   target/riscv: Replace gdb_get_regl() by riscv_gdb_get_reg_mxl()
>   gdbstub: Remove unused gdb_get_regl()
>   include: Remove TARGET_LONG_SIZE definition
> 
>  include/exec/target_long.h  |  8 ++--
>  include/gdbstub/helpers.h   | 18 --------
>  include/user/tswap-target.h |  2 +-
>  target/mips/internal.h      |  5 +++
>  target/ppc/internal.h       | 11 +++++
>  target/mips/gdbstub.c       | 85 ++++++++++++++++++++++---------------
>  target/ppc/cpu_init.c       |  2 +-
>  target/ppc/gdbstub.c        | 38 +++++++++++------
>  target/riscv/gdbstub.c      | 35 +++++++++------
>  target/sparc/gdbstub.c      | 13 +++---
>  10 files changed, 125 insertions(+), 92 deletions(-)
> 

For the series:
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>

Regards,
Pierrick