qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/10] gdbstub: conversion to runtime endianess helpers
@ 2025-03-19 18:22 Alex Bennée
  2025-03-19 18:22 ` [PATCH 01/10] include/gdbstub: fix include guard in commands.h Alex Bennée
                   ` (10 more replies)
  0 siblings, 11 replies; 41+ messages in thread
From: Alex Bennée @ 2025-03-19 18:22 UTC (permalink / raw)
  To: qemu-devel
  Cc: Peter Maydell, Juan Quintela, Ilya Leoshkevich, Thomas Huth,
	Akihiko Odaki, qemu-ppc, David Gibson, qemu-s390x,
	Wainer dos Santos Moschetta, Peter Xu, Markus Armbruster,
	Daniel P. Berrangé, Cédric Le Goater,
	Daniel Henrique Barboza, David Hildenbrand, Yonggang Luo,
	Alex Bennée, Richard Henderson, Beraldo Leal, qemu-arm,
	Greg Kurz, Philippe Mathieu-Daudé, Nicholas Piggin,
	Paolo Bonzini, Edgar E. Iglesias

The aim of this work is to get rid of the endian aware helpers in
gdbstub/helpers.h which due to their use of tswap() mean target
gdbstubs need to be built multiple times. While this series doesn't
actually build each stub once it introduces a new helper -
gdb_get_register_value() which takes a MemOp which can describe the
current endian state of the system. This will be a lot easier to
dynamically feed from a helper function.

The most complex example is PPC which has a helper called
ppc_maybe_bswap_register() which was doing this.

This is still an RFC so I'm interested in feedback:

  - is the API sane
  - can we avoid lots of (uint8_t *) casting?
  - should we have a reverse helper for setting registers

If this seems like the right approach I can have a go at more of the
frontends later.

There are a few other misc clean-ups I did on the way which might be
worth cherry picking for 10.0 but I'll leave that up to maintainers.

Alex.

Alex Bennée (10):
  include/gdbstub: fix include guard in commands.h
  gdbstub: introduce target independent gdb register helper
  target/arm: convert 32 bit gdbstub to new helper
  target/arm: convert 64 bit gdbstub to new helper
  target/ppc: expand comment on FP/VMX/VSX access functions
  target/ppc: make ppc_maybe_bswap_register static
  target/ppc: convert gdbstub to new helper (!hacky)
  gdbstub: assert earlier in handle_read_all_regs
  include/exec: fix assert in size_memop
  target/microblaze: convert gdbstub to new helper

 include/exec/memop.h        |   4 +-
 include/gdbstub/commands.h  |   2 +-
 include/gdbstub/registers.h |  30 ++++++
 target/ppc/cpu.h            |   8 +-
 gdbstub/gdbstub.c           |  24 ++++-
 target/arm/gdbstub.c        |  57 +++++++----
 target/arm/gdbstub64.c      |  53 ++++++----
 target/microblaze/gdbstub.c |  44 ++++----
 target/ppc/gdbstub.c        | 194 ++++++++++++++++++++----------------
 9 files changed, 257 insertions(+), 159 deletions(-)
 create mode 100644 include/gdbstub/registers.h

-- 
2.39.5



^ permalink raw reply	[flat|nested] 41+ messages in thread

end of thread, other threads:[~2025-03-23 17:33 UTC | newest]

Thread overview: 41+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-19 18:22 [PATCH 00/10] gdbstub: conversion to runtime endianess helpers Alex Bennée
2025-03-19 18:22 ` [PATCH 01/10] include/gdbstub: fix include guard in commands.h Alex Bennée
2025-03-20  7:09   ` Philippe Mathieu-Daudé
2025-03-20 19:37   ` Pierrick Bouvier
2025-03-19 18:22 ` [PATCH 02/10] gdbstub: introduce target independent gdb register helper Alex Bennée
2025-03-20  6:19   ` Akihiko Odaki
2025-03-20  7:24     ` Philippe Mathieu-Daudé
2025-03-20  7:16   ` Philippe Mathieu-Daudé
2025-03-20 19:30   ` Pierrick Bouvier
2025-03-20 19:36     ` Pierrick Bouvier
2025-03-21 11:36       ` Alex Bennée
2025-03-21 17:24         ` Pierrick Bouvier
2025-03-20 19:37   ` Pierrick Bouvier
2025-03-19 18:22 ` [PATCH 03/10] target/arm: convert 32 bit gdbstub to new helper Alex Bennée
2025-03-20  6:21   ` Akihiko Odaki
2025-03-20 19:38   ` Pierrick Bouvier
2025-03-19 18:22 ` [PATCH 04/10] target/arm: convert 64 " Alex Bennée
2025-03-20  7:39   ` Philippe Mathieu-Daudé
2025-03-20 19:42   ` Pierrick Bouvier
2025-03-21 11:38     ` Alex Bennée
2025-03-19 18:22 ` [PATCH 05/10] target/ppc: expand comment on FP/VMX/VSX access functions Alex Bennée
2025-03-20 19:42   ` Pierrick Bouvier
2025-03-19 18:22 ` [PATCH 06/10] target/ppc: make ppc_maybe_bswap_register static Alex Bennée
2025-03-20  6:55   ` Philippe Mathieu-Daudé
2025-03-20 19:42   ` Pierrick Bouvier
2025-03-19 18:22 ` [PATCH 07/10] target/ppc: convert gdbstub to new helper (!hacky) Alex Bennée
2025-03-19 18:22 ` [PATCH 08/10] gdbstub: assert earlier in handle_read_all_regs Alex Bennée
2025-03-20  6:57   ` Philippe Mathieu-Daudé
2025-03-19 18:22 ` [PATCH 09/10] include/exec: fix assert in size_memop Alex Bennée
2025-03-20  6:29   ` Akihiko Odaki
2025-03-20  7:30     ` Philippe Mathieu-Daudé
2025-03-19 18:22 ` [PATCH 10/10] target/microblaze: convert gdbstub to new helper Alex Bennée
2025-03-20  7:09   ` Philippe Mathieu-Daudé
2025-03-20 19:52 ` [PATCH 00/10] gdbstub: conversion to runtime endianess helpers Pierrick Bouvier
2025-03-20 20:16   ` Pierrick Bouvier
2025-03-21 13:02     ` Philippe Mathieu-Daudé
2025-03-21 17:27       ` Pierrick Bouvier
2025-03-21 11:46   ` Alex Bennée
2025-03-21 17:31     ` Pierrick Bouvier
2025-03-23 15:41       ` Philippe Mathieu-Daudé
2025-03-23 17:32         ` Pierrick Bouvier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).