All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 00/26] gdbstub/next: re-organise and split build
@ 2023-03-02 19:08 Alex Bennée
  2023-03-02 19:08 ` [PATCH v4 01/26] gdbstub/internals.h: clean up include guard Alex Bennée
                   ` (25 more replies)
  0 siblings, 26 replies; 33+ messages in thread
From: Alex Bennée @ 2023-03-02 19:08 UTC (permalink / raw)
  To: qemu-devel
  Cc: Weiwei Li, Cédric Le Goater, Palmer Dabbelt, Laurent Vivier,
	nicolas.eder, Ilya Leoshkevich, kvm, Edgar E. Iglesias,
	David Gibson, Max Filippov, Sunil Muthuswamy, qemu-s390x,
	Stafford Horne, Bin Meng, Marek Vasut, Greg Kurz, Song Gao,
	Aleksandar Rikalo, Liu Zhiwei, Alistair Francis, Chris Wulff,
	qemu-riscv, Michael Rolnik, qemu-arm, Cleber Rosa,
	Artyom Tarasenko, Marcel Apfelbaum, Eduardo Habkost,
	Yoshinori Sato, Alexandre Iooss, Daniel Henrique Barboza,
	Jiaxun Yang, Philippe Mathieu-Daudé,
	mads, Mark Cave-Ayland, qemu-ppc, Richard Henderson, John Snow,
	Xiaojuan Yang, Thomas Huth, Paolo Bonzini, Mahmoud Mandour,
	Aurelien Jarno, Bastian Koppelmann, Yanan Wang,
	David Hildenbrand, Taylor Simpson, Peter Maydell,
	Alex Bennée

I was motivated to sort this out while working on my register API
which is target agnostic but ran into the weeds when trying to link up
with the gdbstub. This was due to us building gdbstub for every single
target we support due to a few ABI sensitive bits that require CPU
specific information. This series does a bunch of surgery to break the
monolithic file apart into its constituent parts as well as simplify
the headers to users can avoid bringing in more dependencies than they
need.

I had hoped to go all the way and conditionally compile syscalls only
for the two ABIs (32 and 64 bit) unfortunately I was unable to the
appropriate meson-foo to make that happen.

This version is mostly just minor clean-ups and tag updates including
a few extra code motion and checkpatch cleanup patches. The biggest
change is replacing the probe shell script with a slightly smarter
python one and adding Mad's accelops patch.

The following patches need review:

 - gdbstub: split out softmmu/user specifics for syscall handling
 - testing: probe gdb for supported architectures ahead of time
 - gdbstub: only compile gdbstub twice for whole build
 - gdbstub: clean-up indent on gdb_exit

Alex Bennée (24):
  gdbstub/internals.h: clean up include guard
  gdbstub: fix-up copyright and license files
  gdbstub: clean-up indent on gdb_exit
  gdbstub: define separate user/system structures
  gdbstub: move GDBState to shared internals header
  includes: move tb_flush into its own header
  gdbstub: move fromhex/tohex routines to internals
  gdbstub: make various helpers visible to the rest of the module
  gdbstub: move chunk of softmmu functionality to own file
  gdbstub: move chunks of user code into own files
  gdbstub: rationalise signal mapping in softmmu
  gdbstub: abstract target specific details from gdb_put_packet_binary
  gdbstub: specialise handle_query_attached
  gdbstub: specialise target_memory_rw_debug
  gdbstub: introduce gdb_get_max_cpus
  gdbstub: specialise stub_can_reverse
  gdbstub: fix address type of gdb_set_cpu_pc
  gdbstub: don't use target_ulong while handling registers
  gdbstub: move register helpers into standalone include
  gdbstub: move syscall handling to new file
  gdbstub: only compile gdbstub twice for whole build
  testing: probe gdb for supported architectures ahead of time
  include: split target_long definition from cpu-defs
  gdbstub: split out softmmu/user specifics for syscall handling

Mads Ynddal (1):
  gdbstub: move update guest debug to accel ops

Philippe Mathieu-Daudé (1):
  gdbstub: Make syscall_complete/[gs]et_reg target-agnostic typedefs

 MAINTAINERS                                   |    4 +
 configure                                     |    8 +
 gdbstub/internals.h                           |  214 ++-
 include/exec/cpu-defs.h                       |   19 +-
 include/exec/exec-all.h                       |    1 -
 include/exec/gdbstub.h                        |  208 ---
 include/exec/target_long.h                    |   42 +
 include/exec/tb-flush.h                       |   26 +
 include/gdbstub/helpers.h                     |  103 +
 include/gdbstub/syscalls.h                    |  124 ++
 include/gdbstub/user.h                        |   43 +
 include/sysemu/accel-ops.h                    |    1 +
 linux-user/user-internals.h                   |    1 +
 accel/kvm/kvm-accel-ops.c                     |    8 +
 accel/stubs/tcg-stub.c                        |    1 +
 accel/tcg/tb-maint.c                          |    1 +
 accel/tcg/translate-all.c                     |    1 +
 cpu.c                                         |   12 +-
 gdbstub/gdbstub.c                             | 1655 ++---------------
 gdbstub/softmmu.c                             |  613 +++++-
 gdbstub/syscalls.c                            |  221 +++
 gdbstub/user-target.c                         |  283 +++
 gdbstub/user.c                                |  433 ++++-
 hw/ppc/spapr_hcall.c                          |    1 +
 linux-user/exit.c                             |    2 +-
 linux-user/main.c                             |    1 +
 linux-user/signal.c                           |    2 +-
 plugins/core.c                                |    1 +
 plugins/loader.c                              |    2 +-
 semihosting/arm-compat-semi.c                 |    1 +
 semihosting/guestfd.c                         |    2 +-
 semihosting/syscalls.c                        |    3 +-
 softmmu/runstate.c                            |    2 +-
 target/alpha/gdbstub.c                        |    2 +-
 target/alpha/sys_helper.c                     |    1 +
 target/arm/gdbstub.c                          |    1 +
 target/arm/gdbstub64.c                        |    2 +-
 target/arm/tcg/helper-a64.c                   |    2 +-
 target/arm/tcg/m_helper.c                     |    1 +
 target/avr/gdbstub.c                          |    2 +-
 target/cris/gdbstub.c                         |    2 +-
 target/hexagon/gdbstub.c                      |    2 +-
 target/hppa/gdbstub.c                         |    2 +-
 target/i386/gdbstub.c                         |    2 +-
 target/i386/whpx/whpx-all.c                   |    2 +-
 target/loongarch/gdbstub.c                    |    1 +
 target/m68k/gdbstub.c                         |    2 +-
 target/m68k/helper.c                          |    1 +
 target/m68k/m68k-semi.c                       |    3 +-
 target/microblaze/gdbstub.c                   |    2 +-
 target/mips/gdbstub.c                         |    2 +-
 target/mips/tcg/sysemu/mips-semi.c            |    3 +-
 target/nios2/cpu.c                            |    2 +-
 target/nios2/nios2-semi.c                     |    3 +-
 target/openrisc/gdbstub.c                     |    2 +-
 target/openrisc/interrupt.c                   |    2 +-
 target/openrisc/mmu.c                         |    2 +-
 target/ppc/cpu_init.c                         |    2 +-
 target/ppc/gdbstub.c                          |    1 +
 target/riscv/csr.c                            |    1 +
 target/riscv/gdbstub.c                        |    1 +
 target/rx/gdbstub.c                           |    2 +-
 target/s390x/gdbstub.c                        |    1 +
 target/s390x/helper.c                         |    2 +-
 target/sh4/gdbstub.c                          |    2 +-
 target/sparc/gdbstub.c                        |    2 +-
 target/tricore/gdbstub.c                      |    2 +-
 target/xtensa/core-dc232b.c                   |    2 +-
 target/xtensa/core-dc233c.c                   |    2 +-
 target/xtensa/core-de212.c                    |    2 +-
 target/xtensa/core-de233_fpu.c                |    2 +-
 target/xtensa/core-dsp3400.c                  |    2 +-
 target/xtensa/core-fsf.c                      |    2 +-
 target/xtensa/core-lx106.c                    |    2 +-
 target/xtensa/core-sample_controller.c        |    2 +-
 target/xtensa/core-test_kc705_be.c            |    2 +-
 target/xtensa/core-test_mmuhifi_c3.c          |    2 +-
 target/xtensa/gdbstub.c                       |    2 +-
 target/xtensa/helper.c                        |    2 +-
 gdbstub/meson.build                           |   35 +-
 gdbstub/trace-events                          |    4 +-
 scripts/probe-gdb-support.py                  |   88 +
 target/xtensa/import_core.sh                  |    2 +-
 tests/tcg/aarch64/Makefile.target             |    2 +-
 tests/tcg/multiarch/Makefile.target           |    5 +
 .../multiarch/system/Makefile.softmmu-target  |    6 +-
 tests/tcg/s390x/Makefile.target               |    2 +-
 87 files changed, 2470 insertions(+), 1799 deletions(-)
 create mode 100644 include/exec/target_long.h
 create mode 100644 include/exec/tb-flush.h
 create mode 100644 include/gdbstub/helpers.h
 create mode 100644 include/gdbstub/syscalls.h
 create mode 100644 include/gdbstub/user.h
 create mode 100644 gdbstub/syscalls.c
 create mode 100644 gdbstub/user-target.c
 create mode 100755 scripts/probe-gdb-support.py

-- 
2.39.2


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

end of thread, other threads:[~2023-03-03  8:33 UTC | newest]

Thread overview: 33+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-02 19:08 [PATCH v4 00/26] gdbstub/next: re-organise and split build Alex Bennée
2023-03-02 19:08 ` [PATCH v4 01/26] gdbstub/internals.h: clean up include guard Alex Bennée
2023-03-02 19:08 ` [PATCH v4 02/26] gdbstub: fix-up copyright and license files Alex Bennée
2023-03-02 19:08 ` [PATCH v4 03/26] gdbstub: Make syscall_complete/[gs]et_reg target-agnostic typedefs Alex Bennée
2023-03-02 19:08 ` [PATCH v4 04/26] gdbstub: clean-up indent on gdb_exit Alex Bennée
2023-03-02 20:29   ` Richard Henderson
2023-03-03  8:33   ` Daniel Henrique Barboza
2023-03-02 19:08 ` [PATCH v4 05/26] gdbstub: define separate user/system structures Alex Bennée
2023-03-02 19:08 ` [PATCH v4 06/26] gdbstub: move GDBState to shared internals header Alex Bennée
2023-03-02 19:08 ` [PATCH v4 07/26] includes: move tb_flush into its own header Alex Bennée
2023-03-02 19:08 ` [PATCH v4 08/26] gdbstub: move fromhex/tohex routines to internals Alex Bennée
2023-03-02 19:08 ` [PATCH v4 09/26] gdbstub: make various helpers visible to the rest of the module Alex Bennée
2023-03-02 19:08 ` [PATCH v4 10/26] gdbstub: move chunk of softmmu functionality to own file Alex Bennée
2023-03-02 19:08 ` [PATCH v4 11/26] gdbstub: move chunks of user code into own files Alex Bennée
2023-03-02 19:08 ` [PATCH v4 12/26] gdbstub: rationalise signal mapping in softmmu Alex Bennée
2023-03-02 19:08 ` [PATCH v4 13/26] gdbstub: abstract target specific details from gdb_put_packet_binary Alex Bennée
2023-03-02 19:08 ` [PATCH v4 14/26] gdbstub: specialise handle_query_attached Alex Bennée
2023-03-02 19:08 ` [PATCH v4 15/26] gdbstub: specialise target_memory_rw_debug Alex Bennée
2023-03-02 19:08 ` [PATCH v4 16/26] gdbstub: introduce gdb_get_max_cpus Alex Bennée
2023-03-02 19:08 ` [PATCH v4 17/26] gdbstub: specialise stub_can_reverse Alex Bennée
2023-03-02 19:08 ` [PATCH v4 18/26] gdbstub: fix address type of gdb_set_cpu_pc Alex Bennée
2023-03-02 19:08 ` [PATCH v4 19/26] gdbstub: don't use target_ulong while handling registers Alex Bennée
2023-03-02 19:08 ` [PATCH v4 20/26] gdbstub: move register helpers into standalone include Alex Bennée
2023-03-02 19:08 ` [PATCH v4 21/26] gdbstub: move syscall handling to new file Alex Bennée
2023-03-02 19:08 ` [PATCH v4 22/26] gdbstub: only compile gdbstub twice for whole build Alex Bennée
2023-03-02 22:00   ` Richard Henderson
2023-03-02 19:08 ` [PATCH v4 23/26] testing: probe gdb for supported architectures ahead of time Alex Bennée
2023-03-02 20:47   ` Richard Henderson
2023-03-02 21:52   ` Richard Henderson
2023-03-02 19:08 ` [PATCH v4 24/26] include: split target_long definition from cpu-defs Alex Bennée
2023-03-02 19:08 ` [PATCH v4 25/26] gdbstub: split out softmmu/user specifics for syscall handling Alex Bennée
2023-03-02 22:21   ` Richard Henderson
2023-03-02 19:08 ` [PATCH v4 26/26] gdbstub: move update guest debug to accel ops Alex Bennée

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.