qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[RFC PATCH 00/11] gdbstub re-factor and SVE support


From: Alex Bennée
Subject: [RFC PATCH 00/11] gdbstub re-factor and SVE support
Date: Fri, 15 Nov 2019 17:29:49 +0000

Hi,

This RFC is for supporting SVE registers in QEMU's gdbstub.

However on the way to that there is a bunch of re-factoring to the
core gdbstub code to remove some of the hardcoded size limits from its
various buffers. By using dynamically sized buffers we are less likely
to trip up as we potentially push these large registers into the
staging memory before transmission. Ultimately we end up touching all
guest gdbstub register code to make them push bytes into a GByteArray
rather than directly poking memory. For the most part this is a
mechanical process although PPC makes it a little uglier as it can
dynamically change endianess and therefor has its own custom byte
swapping routine after the fact.

One other thing to note is that currently we don't match the existing
gdbstub XML (org.gnu.gdb.aarch64.sve) opting instead to send our own
register layout (org.qemu.gdb.aarch64.sve). The principle difference
is we report the registers in quads (e.g. z0p0 -> z0pN) depending on
the configured size of the machine. It could be changed easily enough
but I was having trouble getting gdbstub on the current master to work
so went with something I could understand more easily.

Alex Bennée (11):
  gdbstub: move allocation of GDBState to one place
  gdbstub: stop passing GDBState * around
  gdbstub: move str_buf to GDBState and use GString
  gdbstub: move mem_buf to GDBState and use GByteArray
  gdbstub: add helper for 128 bit registers
  target/arm: use gdb_get_reg helpers
  target/m68k: use gdb_get_reg helpers
  gdbstub: extend GByteArray to read register helpers
  target/arm: prepare for multiple dynamic XMLs
  target/arm: explicitly encode regnum in our XML
  target/arm: generate xml description of our SVE registers

 include/exec/gdbstub.h              |  41 ++-
 include/hw/core/cpu.h               |   2 +-
 target/alpha/cpu.h                  |   2 +-
 target/arm/cpu.h                    |  34 +-
 target/cris/cpu.h                   |   4 +-
 target/hppa/cpu.h                   |   2 +-
 target/i386/cpu.h                   |   2 +-
 target/lm32/cpu.h                   |   2 +-
 target/m68k/cpu.h                   |   2 +-
 target/microblaze/cpu.h             |   2 +-
 target/mips/internal.h              |   2 +-
 target/openrisc/cpu.h               |   2 +-
 target/ppc/cpu.h                    |   4 +-
 target/riscv/cpu.h                  |   2 +-
 target/s390x/internal.h             |   2 +-
 target/sh4/cpu.h                    |   2 +-
 target/sparc/cpu.h                  |   2 +-
 target/xtensa/cpu.h                 |   2 +-
 gdbstub.c                           | 520 +++++++++++++++-------------
 hw/core/cpu.c                       |   2 +-
 target/alpha/gdbstub.c              |   2 +-
 target/arm/gdbstub.c                | 137 +++++++-
 target/arm/gdbstub64.c              |   2 +-
 target/arm/helper.c                 | 108 ++++--
 target/cris/gdbstub.c               |   4 +-
 target/hppa/gdbstub.c               |   2 +-
 target/i386/gdbstub.c               |   2 +-
 target/lm32/gdbstub.c               |   2 +-
 target/m68k/gdbstub.c               |   2 +-
 target/m68k/helper.c                |  33 +-
 target/microblaze/gdbstub.c         |   2 +-
 target/mips/gdbstub.c               |   2 +-
 target/nios2/cpu.c                  |   2 +-
 target/openrisc/gdbstub.c           |   2 +-
 target/ppc/gdbstub.c                |  48 +--
 target/ppc/translate_init.inc.c     |  54 +--
 target/riscv/gdbstub.c              |  18 +-
 target/s390x/gdbstub.c              |  30 +-
 target/sh4/gdbstub.c                |   2 +-
 target/sparc/gdbstub.c              |   2 +-
 target/xtensa/gdbstub.c             |   2 +-
 tests/tcg/multiarch/float_helpers.c |   7 +-
 42 files changed, 659 insertions(+), 439 deletions(-)

-- 
2.20.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]