qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/29] gdbstub and plugin read register and windows support
@ 2023-11-03 19:59 Alex Bennée
  2023-11-03 19:59 ` [PATCH 01/29] default-configs: Add TARGET_XML_FILES definition Alex Bennée
                   ` (28 more replies)
  0 siblings, 29 replies; 46+ messages in thread
From: Alex Bennée @ 2023-11-03 19:59 UTC (permalink / raw)
  To: qemu-devel
  Cc: Peter Maydell, Edgar E. Iglesias, Song Gao, qemu-arm,
	Marc-André Lureau, Wainer dos Santos Moschetta, Weiwei Li,
	Marcel Apfelbaum, Ilya Leoshkevich, Daniel Henrique Barboza,
	Yanan Wang, Alex Bennée, Cédric Le Goater,
	Paolo Bonzini, David Hildenbrand, Brian Cain, qemu-ppc,
	Palmer Dabbelt, qemu-riscv, Eduardo Habkost,
	Philippe Mathieu-Daudé, Alistair Francis, Liu Zhiwei,
	Cleber Rosa, qemu-s390x, Laurent Vivier, Yoshinori Sato,
	Nicholas Piggin, Thomas Huth, John Snow, Alexandre Iooss,
	Daniel P. Berrangé, Mahmoud Mandour, Daniel Henrique Barboza,
	Bin Meng, Beraldo Leal, Richard Henderson, Michael Rolnik

Here are my final updates for the 8.2 cycle which I can hopefully
merge if we get enough review. Aside from the usual tweaks and fixes
there are two new features:

TCG Plugin Register Access

This is based on Akihiko's previously posted series with some changes
by myself. I wasn't keen on the plugin facing API so I've re-written
it to use an opaque handle and hide the gdb details from the plugin. I
think this allows for potential future improvements as well as being
ready for up-coming heterogeneous support. The new API allowed for
making the execlog register tracking a bit more flexible and able to
track multiple registers.

Windows Support

This fairly late breaking patch finally adds support for Windows to
the TCG plugins subsystem. I'm pretty pleased with Greg's approach
which improves on previous attempts by avoiding re-implementing a
linker for POSIX targets. I don't have access to Windows though so I'm
calling on Windows users to test the solution.

The following patches still need review:

  contrib/plugins: extend execlog to track register changes
  plugins: add an API to read registers
  gdbstub: expose api to find registers
  tests/avocado: update the tcg_plugins test
  tests/tcg: add an explicit gdbstub register tester
  target/arm: hide aliased MIDR from gdbstub
  target/arm: hide all versions of DBGD[RS]AR from gdbstub
  target/arm: hide the 32bit version of PAR from gdbstub
  gdb-xml: fix duplicate register in arm-neon.xml

Akihiko Odaki (16):
  default-configs: Add TARGET_XML_FILES definition
  gdbstub: Add num_regs member to GDBFeature
  gdbstub: Introduce gdb_find_static_feature()
  gdbstub: Introduce GDBFeatureBuilder
  target/arm: Use GDBFeature for dynamic XML
  target/ppc: Use GDBFeature for dynamic XML
  target/riscv: Use GDBFeature for dynamic XML
  gdbstub: Use GDBFeature for gdb_register_coprocessor
  gdbstub: Use GDBFeature for GDBRegisterState
  gdbstub: Change gdb_get_reg_cb and gdb_set_reg_cb
  gdbstub: Simplify XML lookup
  gdbstub: Infer number of core registers from XML
  hw/core/cpu: Remove gdb_get_dynamic_xml member
  gdbstub: Add members to identify registers to GDBFeature
  cpu: Call plugin hooks only when ready
  plugins: Use different helpers when reading registers

Alex Bennée (9):
  gdb-xml: fix duplicate register in arm-neon.xml
  target/arm: hide the 32bit version of PAR from gdbstub
  target/arm: hide all versions of DBGD[RS]AR from gdbstub
  target/arm: hide aliased MIDR from gdbstub
  tests/tcg: add an explicit gdbstub register tester
  tests/avocado: update the tcg_plugins test
  gdbstub: expose api to find registers
  plugins: add an API to read registers
  contrib/plugins: extend execlog to track register changes

Greg Manning (4):
  plugins: add dllexport and dllimport to api funcs
  plugins: make test/example plugins work on windows
  plugins: disable lockstep plugin on windows
  plugins: allow plugins to be enabled on windows

 docs/devel/tcg-plugins.rst                    |  10 +-
 configure                                     |   9 +-
 configs/targets/loongarch64-linux-user.mak    |   1 +
 meson.build                                   |   5 +
 accel/tcg/plugin-helpers.h                    |   3 +-
 include/exec/gdbstub.h                        | 121 +++++++-
 include/hw/core/cpu.h                         |   7 +-
 include/qemu/plugin.h                         |   1 +
 include/qemu/qemu-plugin.h                    | 104 ++++++-
 target/arm/cpu.h                              |  27 +-
 target/arm/internals.h                        |  14 +-
 target/hexagon/internal.h                     |   4 +-
 target/microblaze/cpu.h                       |   4 +-
 target/ppc/cpu-qom.h                          |   4 +-
 target/ppc/cpu.h                              |   2 -
 target/riscv/cpu.h                            |   5 +-
 target/s390x/cpu.h                            |   2 -
 accel/tcg/plugin-gen.c                        |  43 ++-
 contrib/plugins/execlog.c                     | 180 +++++++++---
 contrib/plugins/win32_linker.c                |  34 +++
 cpu-target.c                                  |  11 -
 gdbstub/gdbstub.c                             | 273 +++++++++++++-----
 hw/core/cpu-common.c                          |  15 +-
 plugins/api.c                                 | 114 +++++++-
 target/arm/cpu.c                              |   2 -
 target/arm/cpu64.c                            |   1 -
 target/arm/debug_helper.c                     |   8 +-
 target/arm/gdbstub.c                          | 230 +++++++--------
 target/arm/gdbstub64.c                        | 122 ++++----
 target/arm/helper.c                           |   4 +-
 target/avr/cpu.c                              |   1 -
 target/hexagon/cpu.c                          |   4 +-
 target/hexagon/gdbstub.c                      |  10 +-
 target/i386/cpu.c                             |   2 -
 target/loongarch/cpu.c                        |   2 -
 target/loongarch/gdbstub.c                    |  13 +-
 target/m68k/cpu.c                             |   1 -
 target/m68k/helper.c                          |  26 +-
 target/microblaze/cpu.c                       |   6 +-
 target/microblaze/gdbstub.c                   |   9 +-
 target/ppc/cpu_init.c                         |   7 -
 target/ppc/gdbstub.c                          | 114 ++++----
 target/riscv/cpu.c                            |  15 -
 target/riscv/gdbstub.c                        | 139 +++++----
 target/rx/cpu.c                               |   1 -
 target/s390x/cpu.c                            |   1 -
 target/s390x/gdbstub.c                        | 105 ++++---
 contrib/plugins/Makefile                      |  26 +-
 gdb-xml/arm-neon.xml                          |   2 +-
 plugins/meson.build                           |  17 ++
 plugins/qemu-plugins.symbols                  |   2 +
 scripts/feature_to_c.py                       |  58 +++-
 tests/avocado/tcg_plugins.py                  |  28 +-
 tests/plugin/meson.build                      |  14 +-
 tests/tcg/multiarch/Makefile.target           |  11 +-
 tests/tcg/multiarch/gdbstub/registers.py      | 188 ++++++++++++
 .../multiarch/system/Makefile.softmmu-target  |  13 +-
 57 files changed, 1577 insertions(+), 598 deletions(-)
 create mode 100644 contrib/plugins/win32_linker.c
 create mode 100644 tests/tcg/multiarch/gdbstub/registers.py

-- 
2.39.2



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

end of thread, other threads:[~2023-11-07 11:45 UTC | newest]

Thread overview: 46+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-03 19:59 [PATCH 00/29] gdbstub and plugin read register and windows support Alex Bennée
2023-11-03 19:59 ` [PATCH 01/29] default-configs: Add TARGET_XML_FILES definition Alex Bennée
2023-11-05 20:55   ` Richard Henderson
2023-11-06 15:44     ` Alex Bennée
2023-11-06 23:22       ` Richard Henderson
2023-11-03 19:59 ` [PATCH 02/29] gdb-xml: fix duplicate register in arm-neon.xml Alex Bennée
2023-11-05 20:45   ` Richard Henderson
2023-11-03 19:59 ` [PATCH 03/29] target/arm: hide the 32bit version of PAR from gdbstub Alex Bennée
2023-11-03 19:59 ` [PATCH 04/29] target/arm: hide all versions of DBGD[RS]AR " Alex Bennée
2023-11-03 19:59 ` [PATCH 05/29] target/arm: hide aliased MIDR " Alex Bennée
2023-11-03 19:59 ` [PATCH 06/29] tests/tcg: add an explicit gdbstub register tester Alex Bennée
2023-11-05 12:17   ` Akihiko Odaki
2023-11-03 19:59 ` [PATCH 07/29] tests/avocado: update the tcg_plugins test Alex Bennée
2023-11-03 19:59 ` [PATCH 08/29] gdbstub: Add num_regs member to GDBFeature Alex Bennée
2023-11-03 19:59 ` [PATCH 09/29] gdbstub: Introduce gdb_find_static_feature() Alex Bennée
2023-11-03 19:59 ` [PATCH 10/29] gdbstub: Introduce GDBFeatureBuilder Alex Bennée
2023-11-03 19:59 ` [PATCH 11/29] target/arm: Use GDBFeature for dynamic XML Alex Bennée
2023-11-03 19:59 ` [PATCH 12/29] target/ppc: " Alex Bennée
2023-11-03 19:59 ` [PATCH 13/29] target/riscv: " Alex Bennée
2023-11-06  9:32   ` Alex Bennée
2023-11-06 15:35     ` Alex Bennée
2023-11-03 19:59 ` [PATCH 14/29] gdbstub: Use GDBFeature for gdb_register_coprocessor Alex Bennée
2023-11-03 19:59 ` [PATCH 15/29] gdbstub: Use GDBFeature for GDBRegisterState Alex Bennée
2023-11-03 19:59 ` [PATCH 16/29] gdbstub: Change gdb_get_reg_cb and gdb_set_reg_cb Alex Bennée
2023-11-03 19:59 ` [PATCH 17/29] gdbstub: Simplify XML lookup Alex Bennée
2023-11-07  8:46   ` Frédéric Pétrot
2023-11-07 10:31     ` Alex Bennée
2023-11-07 11:46       ` Frédéric Pétrot
2023-11-03 19:59 ` [PATCH 18/29] gdbstub: Infer number of core registers from XML Alex Bennée
2023-11-03 19:59 ` [PATCH 19/29] hw/core/cpu: Remove gdb_get_dynamic_xml member Alex Bennée
2023-11-03 19:59 ` [PATCH 20/29] gdbstub: Add members to identify registers to GDBFeature Alex Bennée
2023-11-03 19:59 ` [PATCH 21/29] gdbstub: expose api to find registers Alex Bennée
2023-11-03 19:59 ` [PATCH 22/29] cpu: Call plugin hooks only when ready Alex Bennée
2023-11-03 19:59 ` [PATCH 23/29] plugins: Use different helpers when reading registers Alex Bennée
2023-11-07  3:13   ` Richard Henderson
2023-11-03 19:59 ` [PATCH 24/29] plugins: add an API to read registers Alex Bennée
2023-11-05 12:40   ` Akihiko Odaki
     [not found]     ` <87il6fdyaq.fsf@draig.linaro.org>
     [not found]       ` <94da2184-2586-458e-9362-fa913ca68fb5@daynix.com>
     [not found]         ` <874jhzdur3.fsf@draig.linaro.org>
     [not found]           ` <333fbdf6-9f5b-41c3-99ce-8808c542d485@daynix.com>
2023-11-06 11:40             ` Alex Bennée
2023-11-07  6:56               ` Akihiko Odaki
2023-11-03 19:59 ` [PATCH 25/29] contrib/plugins: extend execlog to track register changes Alex Bennée
2023-11-06 15:30   ` Alex Bennée
2023-11-03 19:59 ` [PATCH 26/29] plugins: add dllexport and dllimport to api funcs Alex Bennée
2023-11-03 19:59 ` [PATCH 27/29] plugins: make test/example plugins work on windows Alex Bennée
2023-11-04  9:14   ` Alex Bennée
2023-11-03 19:59 ` [PATCH 28/29] plugins: disable lockstep plugin " Alex Bennée
2023-11-03 19:59 ` [PATCH 29/29] plugins: allow plugins to be enabled " Alex Bennée

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).