mbox

[PULL,00/22] gdb cleanups and tcg plugin register access

Message ID 20240116104809.250076-1-alex.bennee@linaro.org
State New
Headers show

Pull-request

https://gitlab.com/stsquad/qemu.git tags/pull-registers-for-plugins-160124-2

Message

Alex Bennée Jan. 16, 2024, 10:47 a.m. UTC
The following changes since commit 977542ded7e6b28d2bc077bcda24568c716e393c:

  Merge tag 'pull-testing-updates-120124-2' of https://gitlab.com/stsquad/qemu into staging (2024-01-12 14:02:53 +0000)

are available in the Git repository at:

  https://gitlab.com/stsquad/qemu.git tags/pull-registers-for-plugins-160124-2

for you to fetch changes up to 87bed6910aa0d0942244b5eedee60b4f8b162c05:

  docs/devel: document some plugin assumptions (2024-01-16 10:34:20 +0000)

----------------------------------------------------------------
read-only register access for plugins:

  - move misa_mxl to CPU class for riscv
  - use GDBFeature for arm XML
  - use GDBFeature for ppc XML
  - use GDBFeature for riscv XML
  - unify gdb code to use GDBFeature
  - move dynamic XML generation to core GDB code
  - provide introspection APIs for rest of QEMU
  - expose a plugin API to access registers
  - fix memory re-use in execlog
  - extend execlog to track registers
  - optimise instrumentation based on disassembly
  - tweak API docs and expand on assumptions

----------------------------------------------------------------
Akihiko Odaki (15):
      hw/riscv: Use misa_mxl instead of misa_mxl_max
      target/riscv: Remove misa_mxl validation
      target/riscv: Move misa_mxl_max to class
      target/riscv: Validate misa_mxl_max only once
      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
      plugins: Use different helpers when reading registers

Alex Bennée (7):
      gdbstub: expose api to find registers
      plugins: add an API to read registers
      contrib/plugins: fix imatch
      contrib/plugins: extend execlog to track register changes
      contrib/plugins: optimise the register value tracking
      docs/devel: lift example and plugin API sections up
      docs/devel: document some plugin assumptions

 docs/devel/tcg-plugins.rst   |  72 +++++++++-
 accel/tcg/plugin-helpers.h   |   3 +-
 include/exec/gdbstub.h       |  62 ++++++++-
 include/hw/core/cpu.h        |   7 +-
 include/qemu/plugin.h        |   1 +
 include/qemu/qemu-plugin.h   |  51 ++++++-
 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         |   1 +
 target/ppc/cpu.h             |   5 +-
 target/riscv/cpu.h           |   9 +-
 target/s390x/cpu.h           |   2 -
 accel/tcg/plugin-gen.c       |  43 +++++-
 contrib/plugins/execlog.c    | 324 ++++++++++++++++++++++++++++++++++++-------
 gdbstub/gdbstub.c            | 198 +++++++++++++++++---------
 hw/core/cpu-common.c         |   5 +-
 hw/riscv/boot.c              |   2 +-
 plugins/api.c                | 123 +++++++++++++++-
 target/arm/cpu.c             |   2 -
 target/arm/cpu64.c           |   1 -
 target/arm/gdbstub.c         | 230 +++++++++++++++---------------
 target/arm/gdbstub64.c       | 122 ++++++++--------
 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           | 193 +++++++++++++-------------
 target/riscv/gdbstub.c       | 151 +++++++++++---------
 target/riscv/kvm/kvm-cpu.c   |  10 +-
 target/riscv/machine.c       |   7 +-
 target/riscv/tcg/tcg-cpu.c   |  44 +-----
 target/riscv/translate.c     |   3 +-
 target/rx/cpu.c              |   1 -
 target/s390x/cpu.c           |   1 -
 target/s390x/gdbstub.c       | 105 ++++++++------
 plugins/qemu-plugins.symbols |   2 +
 scripts/feature_to_c.py      |  14 +-
 47 files changed, 1343 insertions(+), 695 deletions(-)

Comments

Peter Maydell Jan. 18, 2024, 10:13 a.m. UTC | #1
On Tue, 16 Jan 2024 at 10:49, Alex Bennée <alex.bennee@linaro.org> wrote:
>
> The following changes since commit 977542ded7e6b28d2bc077bcda24568c716e393c:
>
>   Merge tag 'pull-testing-updates-120124-2' of https://gitlab.com/stsquad/qemu into staging (2024-01-12 14:02:53 +0000)
>
> are available in the Git repository at:
>
>   https://gitlab.com/stsquad/qemu.git tags/pull-registers-for-plugins-160124-2
>
> for you to fetch changes up to 87bed6910aa0d0942244b5eedee60b4f8b162c05:
>
>   docs/devel: document some plugin assumptions (2024-01-16 10:34:20 +0000)
>
> ----------------------------------------------------------------
> read-only register access for plugins:
>
>   - move misa_mxl to CPU class for riscv
>   - use GDBFeature for arm XML
>   - use GDBFeature for ppc XML
>   - use GDBFeature for riscv XML
>   - unify gdb code to use GDBFeature
>   - move dynamic XML generation to core GDB code
>   - provide introspection APIs for rest of QEMU
>   - expose a plugin API to access registers
>   - fix memory re-use in execlog
>   - extend execlog to track registers
>   - optimise instrumentation based on disassembly
>   - tweak API docs and expand on assumptions

I see that Akihiko has asked for this not to be merged, so I'll
drop this pull req.

Akihiko: for the future, if you want an on-list pullreq
to not be merged, please reply to the cover letter, not to
an individual patch. I am very unlikely to notice replies
to individual patches before I do a merge. (I only noticed
in this case because somebody happened to point it out to
me on IRC.)

thanks
-- PMM