qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Andreas Färber" <afaerber@suse.de>
To: qemu-devel@nongnu.org
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
	"Anthony Green" <green@moxielogic.com>,
	"Blue Swirl" <blauwirbel@gmail.com>,
	"Max Filippov" <jcmvbkbc@gmail.com>,
	"Michael Walle" <michael@walle.cc>,
	"Jan Kiszka" <jan.kiszka@web.de>,
	"Anthony Liguori" <anthony@codemonkey.ws>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Guan Xuetao" <gxt@mprc.pku.edu.cn>,
	"Aurélien Jarno" <aurelien@aurel32.net>,
	"Richard Henderson" <rth@twiddle.net>
Subject: Re: [Qemu-devel] [PATCH qom-cpu v2 00/42] QOM CPUState, part 11: GDB stub
Date: Tue, 09 Jul 2013 23:03:35 +0200	[thread overview]
Message-ID: <51DC7AA7.8010406@suse.de> (raw)
In-Reply-To: <1373221591-17091-1-git-send-email-afaerber@suse.de>

Am 07.07.2013 20:25, schrieb Andreas Färber:
> Hello,
> 
> This series cleans up gdbstub by changing all its internal CPU state to CPUState
> and by moving most target-specific code into the target directories.
> 
> Support for m68k, moxie and unicore32 to set the PC via gdbstub is added.
> 
> Lightweight subclasses for XtensaCPU are introduced, keeping the XtensaConfig
> mechanisms, to stop xtensa from deviating at gdbstub level wrt register count.
> 
> I still wonder whether there would be interest in adding a "program-counter"
> dynamic property to the CPU, given that a setter has been factored out here?
> 
> v2 replaces uint64_t with a new vaddr type, fixes xtensa breakage, adds a patch
> replacing GDB_CORE_XML and attempts to make the read/write_register changes
> better reviewable. More details below.

Needs to be respun to keep find_cpu() around - any comments before I do?

Andreas

> 
> Available for testing at:
> git://github.com/afaerber/qemu-cpu.git qom-cpu-11.v2
> https://github.com/afaerber/qemu-cpu/commits/qom-cpu-11.v2
> 
> Regards,
> Andreas
> 
> v1 -> v2:
> * Applied some patches.
> * Introduced new vaddr type, name courtesy of PMM.
> * Avoided making the TranslationBlock typedef generally available.
> * Rebased to avoid env/cpu field in alpha DisasContext (rth).
> * Added missing ppc_cpu_get_phys_page_debug assignment.
> * Converted two more cpu_get_phys_page_debug()s breaking xtensa (Max).
> * Simplified xtensa subclasses by keeping CPUXtensaState::config for now (Max).
> * Split up cpu_gdb_{read,write}_register() conversion (rth).
> * Appended patch to drop GDB_CORE_XML.
> 
> Cc: Anthony Liguori <anthony@codemonkey.ws>
> Cc: Blue Swirl <blauwirbel@gmail.com>
> Cc: Aurélien Jarno <aurelien@aurel32.net>
> Cc: Paolo Bonzini <pbonzini@redhat.com>
> Cc: Jan Kiszka <jan.kiszka@web.de> (gdbstub)
> Cc: Anthony Green <green@moxielogic.com> (moxie)
> Cc: Guan Xuetao <gxt@mprc.pku.edu.cn> (unicore32)
> Cc: Max Filippov <jcmvbkbc@gmail.com> (xtensa)
> Cc: Richard Henderson <rth@twiddle.net>
> Cc: Michael Walle <michael@walle.cc> (lm32)
> Cc: Peter Maydell <peter.maydell@linaro.org> (vaddr)
> 
> Andreas Färber (42):
>   cpu: Introduce vaddr type
>   cpu: Introduce CPUClass::set_pc() for gdb_set_cpu_pc()
>   target-m68k: Implement CPUClass::set_pc()
>   target-moxie: Implement CPUClass::set_pc()
>   target-unicore32: Implement CPUClass::set_pc()
>   cpu: Introduce CPUClass::synchronize_from_tb() for cpu_pc_from_tb()
>   cpu: Move singlestep_enabled field from CPU_COMMON to CPUState
>   gdbstub: Update gdb_handlesig() and gdb_signalled() Coding Style
>   cpu: Change cpu_single_step() argument to CPUState
>   kvm: Change kvm_{insert,remove}_breakpoint() argument to CPUState
>   gdbstub: Change syscall callback argument to CPUState
>   gdbstub: Change gdb_handlesig() argument to CPUState
>   gdbstub: Change GDBState::c_cpu to CPUState
>   gdbstub: Change gdb_{read,write}_register() argument to CPUState
>   cpu: Turn cpu_get_phys_page_debug() into a CPUClass hook
>   exec: Change cpu_memory_rw_debug() argument to CPUState
>   cpu: Introduce CPUClass::memory_rw_debug() for
>     target_memory_rw_debug()
>   gdbstub: Change GDBState::g_cpu to CPUState
>   cpu: Move gdb_regs field from CPU_COMMON to CPUState
>   gdbstub: Change gdb_register_coprocessor() argument to CPUState
>   target-xtensa: Introduce XtensaCPU subclasses
>   gdbstub: Fix cpu_gdb_{read,write}_register() Coding Style
>   gdbstub: Drop dead code in cpu_gdb_{read,write}_register()
>   cpu: Introduce CPUState::gdb_num_regs and CPUClass::gdb_num_core_regs
>   target-i386: Move cpu_gdb_{read,write}_register()
>   target-ppc: Move cpu_gdb_{read,write}_register()
>   target-sparc: Move cpu_gdb_{read,write}_register()
>   target-arm: Move cpu_gdb_{read,write}_register()
>   target-m68k: Move cpu_gdb_{read,write}_register()
>   target-mips: Move cpu_gdb_{read,write}_register()
>   target-openrisc: Move cpu_gdb_{read,write}_register()
>   target-sh4: Move cpu_gdb_{read,write}_register()
>   target-microblaze: Move cpu_gdb_{read,write}_register()
>   target-cris: Move cpu_gdb_{read,write}_register()
>   target-alpha: Move cpu_gdb_{read,write}_register()
>   target-s390x: Move cpu_gdb_{read,write}_register()
>   target-lm32: Move cpu_gdb_{read,write}_register()
>   target-xtensa: Move cpu_gdb_{read,write}_register()
>   gdbstub: Replace GET_REG*() macros with gdb_get_reg*() functions
>   cpu: Introduce CPUClass::gdb_{read,write}_register()
>   target-cris: Factor out CPUClass::gdb_read_register() hook for v10
>   cpu: Introduce CPUClass::gdb_core_xml_file for GDB_CORE_XML
> 
>  bsd-user/main.c                 |   10 +-
>  cpu-exec.c                      |   10 +-
>  cpus.c                          |    6 +-
>  disas.c                         |    4 +-
>  exec.c                          |   36 +-
>  gdbstub.c                       | 1616 ++++-----------------------------------
>  hw/i386/kvmvapic.c              |   78 +-
>  hw/xtensa/xtensa_lx60.c         |    8 +-
>  hw/xtensa/xtensa_sim.c          |   10 +-
>  include/exec/cpu-all.h          |   14 +-
>  include/exec/cpu-defs.h         |    3 -
>  include/exec/gdbstub.h          |   51 +-
>  include/exec/softmmu-semi.h     |   18 +-
>  include/qom/cpu.h               |  122 +--
>  include/sysemu/kvm.h            |    4 +-
>  kvm-all.c                       |   12 +-
>  kvm-stub.c                      |    4 +-
>  linux-user/main.c               |   35 +-
>  linux-user/signal.c             |    3 +-
>  monitor.c                       |    2 +-
>  qom/cpu.c                       |   22 +
>  stubs/Makefile.objs             |    1 +
>  stubs/gdbstub.c                 |    5 +
>  target-alpha/Makefile.objs      |    1 +
>  target-alpha/cpu-qom.h          |    3 +
>  target-alpha/cpu.c              |   18 +-
>  target-alpha/cpu.h              |    5 -
>  target-alpha/gdbstub.c          |   93 +++
>  target-alpha/helper.c           |    5 +-
>  target-alpha/translate.c        |    3 +-
>  target-arm/Makefile.objs        |    1 +
>  target-arm/arm-semi.c           |   10 +-
>  target-arm/cpu-qom.h            |    5 +
>  target-arm/cpu.c                |   17 +-
>  target-arm/cpu.h                |    5 -
>  target-arm/gdbstub.c            |  102 +++
>  target-arm/helper.c             |   15 +-
>  target-arm/translate.c          |    7 +-
>  target-cris/Makefile.objs       |    1 +
>  target-cris/cpu-qom.h           |    6 +
>  target-cris/cpu.c               |   19 +
>  target-cris/cpu.h               |    4 -
>  target-cris/gdbstub.c           |  130 ++++
>  target-cris/helper.c            |    7 +-
>  target-cris/translate.c         |    7 +-
>  target-i386/Makefile.objs       |    1 +
>  target-i386/cpu-qom.h           |    5 +
>  target-i386/cpu.c               |   22 +-
>  target-i386/cpu.h               |    5 -
>  target-i386/gdbstub.c           |  231 ++++++
>  target-i386/helper.c            |   12 +-
>  target-i386/kvm.c               |   20 +-
>  target-i386/translate.c         |    5 +-
>  target-lm32/Makefile.objs       |    1 +
>  target-lm32/cpu-qom.h           |    3 +
>  target-lm32/cpu.c               |   16 +-
>  target-lm32/cpu.h               |    5 -
>  target-lm32/gdbstub.c           |   92 +++
>  target-lm32/helper.c            |    6 +-
>  target-lm32/translate.c         |    7 +-
>  target-m68k/Makefile.objs       |    1 +
>  target-m68k/cpu-qom.h           |    3 +
>  target-m68k/cpu.c               |   15 +
>  target-m68k/cpu.h               |    5 -
>  target-m68k/gdbstub.c           |   75 ++
>  target-m68k/helper.c            |    5 +-
>  target-m68k/m68k-semi.c         |    5 +-
>  target-m68k/translate.c         |    7 +-
>  target-microblaze/Makefile.objs |    1 +
>  target-microblaze/cpu-qom.h     |    3 +
>  target-microblaze/cpu.c         |   16 +-
>  target-microblaze/cpu.h         |    5 -
>  target-microblaze/gdbstub.c     |   56 ++
>  target-microblaze/helper.c      |    4 +-
>  target-microblaze/translate.c   |    8 +-
>  target-mips/Makefile.objs       |    1 +
>  target-mips/cpu-qom.h           |    3 +
>  target-mips/cpu.c               |   34 +-
>  target-mips/cpu.h               |    7 -
>  target-mips/gdbstub.c           |  155 ++++
>  target-mips/helper.c            |    7 +-
>  target-mips/translate.c         |   11 +-
>  target-moxie/cpu.c              |   13 +-
>  target-moxie/cpu.h              |    6 +-
>  target-moxie/helper.c           |   11 +-
>  target-moxie/translate.c        |    5 +-
>  target-openrisc/Makefile.objs   |    1 +
>  target-openrisc/cpu.c           |   16 +-
>  target-openrisc/cpu.h           |    8 +-
>  target-openrisc/gdbstub.c       |   83 ++
>  target-openrisc/mmu.c           |    5 +-
>  target-openrisc/translate.c     |    7 +-
>  target-ppc/Makefile.objs        |    1 +
>  target-ppc/cpu-qom.h            |    3 +
>  target-ppc/cpu.h                |    5 -
>  target-ppc/gdbstub.c            |  131 ++++
>  target-ppc/mmu_helper.c         |    4 +-
>  target-ppc/translate.c          |    8 +-
>  target-ppc/translate_init.c     |   35 +-
>  target-s390x/Makefile.objs      |    1 +
>  target-s390x/cpu-qom.h          |    3 +
>  target-s390x/cpu.c              |   14 +
>  target-s390x/cpu.h              |    5 -
>  target-s390x/gdbstub.c          |   88 +++
>  target-s390x/helper.c           |    5 +-
>  target-s390x/translate.c        |    5 +-
>  target-sh4/Makefile.objs        |    1 +
>  target-sh4/cpu-qom.h            |    3 +
>  target-sh4/cpu.c                |   23 +
>  target-sh4/cpu.h                |    6 -
>  target-sh4/gdbstub.c            |  146 ++++
>  target-sh4/helper.c             |    5 +-
>  target-sh4/translate.c          |    8 +-
>  target-sparc/Makefile.objs      |    1 +
>  target-sparc/cpu-qom.h          |    3 +
>  target-sparc/cpu.c              |   34 +-
>  target-sparc/cpu.h              |   11 +-
>  target-sparc/gdbstub.c          |  208 +++++
>  target-sparc/mmu_helper.c       |   22 +-
>  target-sparc/translate.c        |    3 +-
>  target-unicore32/cpu-qom.h      |    1 +
>  target-unicore32/cpu.c          |   11 +
>  target-unicore32/cpu.h          |    5 -
>  target-unicore32/softmmu.c      |    7 +-
>  target-unicore32/translate.c    |    7 +-
>  target-xtensa/Makefile.objs     |    1 +
>  target-xtensa/cpu-qom.h         |    6 +
>  target-xtensa/cpu.c             |   40 +-
>  target-xtensa/cpu.h             |    5 -
>  target-xtensa/gdbstub.c         |  109 +++
>  target-xtensa/helper.c          |   47 +-
>  target-xtensa/translate.c       |    7 +-
>  target-xtensa/xtensa-semi.c     |   14 +-
>  133 files changed, 2701 insertions(+), 1892 deletions(-)
>  create mode 100644 stubs/gdbstub.c
>  create mode 100644 target-alpha/gdbstub.c
>  create mode 100644 target-arm/gdbstub.c
>  create mode 100644 target-cris/gdbstub.c
>  create mode 100644 target-i386/gdbstub.c
>  create mode 100644 target-lm32/gdbstub.c
>  create mode 100644 target-m68k/gdbstub.c
>  create mode 100644 target-microblaze/gdbstub.c
>  create mode 100644 target-mips/gdbstub.c
>  create mode 100644 target-openrisc/gdbstub.c
>  create mode 100644 target-ppc/gdbstub.c
>  create mode 100644 target-s390x/gdbstub.c
>  create mode 100644 target-sh4/gdbstub.c
>  create mode 100644 target-sparc/gdbstub.c
>  create mode 100644 target-xtensa/gdbstub.c
> 


-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg

      parent reply	other threads:[~2013-07-09 21:07 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-07 18:25 [Qemu-devel] [PATCH qom-cpu v2 00/42] QOM CPUState, part 11: GDB stub Andreas Färber
2013-07-07 18:25 ` [Qemu-devel] [PATCH qom-cpu v2 01/42] cpu: Introduce vaddr type Andreas Färber
2013-07-15 14:46   ` Peter Maydell
2013-07-22 14:48     ` Andreas Färber
2013-07-07 18:25 ` [Qemu-devel] [PATCH qom-cpu v2 02/42] cpu: Introduce CPUClass::set_pc() for gdb_set_cpu_pc() Andreas Färber
2013-07-07 18:25 ` [Qemu-devel] [PATCH qom-cpu v2 03/42] target-m68k: Implement CPUClass::set_pc() Andreas Färber
2013-07-07 18:25 ` [Qemu-devel] [PATCH qom-cpu v2 04/42] target-moxie: " Andreas Färber
2013-07-07 18:25 ` [Qemu-devel] [PATCH qom-cpu v2 05/42] target-unicore32: " Andreas Färber
2013-07-07 18:25 ` [Qemu-devel] [PATCH qom-cpu v2 06/42] cpu: Introduce CPUClass::synchronize_from_tb() for cpu_pc_from_tb() Andreas Färber
2013-07-07 18:25 ` [Qemu-devel] [PATCH qom-cpu v2 07/42] cpu: Move singlestep_enabled field from CPU_COMMON to CPUState Andreas Färber
2013-07-07 18:25 ` [Qemu-devel] [PATCH qom-cpu v2 08/42] gdbstub: Update gdb_handlesig() and gdb_signalled() Coding Style Andreas Färber
2013-07-07 18:25 ` [Qemu-devel] [PATCH qom-cpu v2 09/42] cpu: Change cpu_single_step() argument to CPUState Andreas Färber
2013-07-07 18:25 ` [Qemu-devel] [PATCH qom-cpu v2 10/42] kvm: Change kvm_{insert, remove}_breakpoint() " Andreas Färber
2013-07-07 18:26 ` [Qemu-devel] [PATCH qom-cpu v2 11/42] gdbstub: Change syscall callback " Andreas Färber
2013-07-07 18:26 ` [Qemu-devel] [PATCH qom-cpu v2 12/42] gdbstub: Change gdb_handlesig() " Andreas Färber
2013-07-07 18:26 ` [Qemu-devel] [PATCH qom-cpu v2 13/42] gdbstub: Change GDBState::c_cpu " Andreas Färber
2013-07-07 18:26 ` [Qemu-devel] [PATCH qom-cpu v2 14/42] gdbstub: Change gdb_{read, write}_register() argument " Andreas Färber
2013-07-07 18:26 ` [Qemu-devel] [PATCH qom-cpu v2 15/42] cpu: Turn cpu_get_phys_page_debug() into a CPUClass hook Andreas Färber
2013-07-07 18:26 ` [Qemu-devel] [PATCH qom-cpu v2 16/42] exec: Change cpu_memory_rw_debug() argument to CPUState Andreas Färber
2013-07-07 18:26 ` [Qemu-devel] [PATCH qom-cpu v2 17/42] cpu: Introduce CPUClass::memory_rw_debug() for target_memory_rw_debug() Andreas Färber
2013-07-07 18:26 ` [Qemu-devel] [PATCH qom-cpu v2 18/42] gdbstub: Change GDBState::g_cpu to CPUState Andreas Färber
2013-07-07 18:26 ` [Qemu-devel] [PATCH qom-cpu v2 19/42] cpu: Move gdb_regs field from CPU_COMMON " Andreas Färber
2013-07-07 18:26 ` [Qemu-devel] [PATCH qom-cpu v2 20/42] gdbstub: Change gdb_register_coprocessor() argument " Andreas Färber
2013-07-07 18:26 ` [Qemu-devel] [PATCH qom-cpu v2 21/42] target-xtensa: Introduce XtensaCPU subclasses Andreas Färber
2013-07-07 18:26 ` [Qemu-devel] [PATCH qom-cpu v2 22/42] gdbstub: Fix cpu_gdb_{read, write}_register() Coding Style Andreas Färber
2013-07-07 18:26 ` [Qemu-devel] [PATCH qom-cpu v2 23/42] gdbstub: Drop dead code in cpu_gdb_{read, write}_register() Andreas Färber
2013-07-07 18:26 ` [Qemu-devel] [PATCH qom-cpu v2 24/42] cpu: Introduce CPUState::gdb_num_regs and CPUClass::gdb_num_core_regs Andreas Färber
2013-07-07 18:26 ` [Qemu-devel] [PATCH qom-cpu v2 25/42] target-i386: Move cpu_gdb_{read, write}_register() Andreas Färber
2013-07-07 18:26 ` [Qemu-devel] [PATCH qom-cpu v2 26/42] target-ppc: " Andreas Färber
2013-07-07 18:26 ` [Qemu-devel] [PATCH qom-cpu v2 27/42] target-sparc: " Andreas Färber
2013-07-07 18:26 ` [Qemu-devel] [PATCH qom-cpu v2 28/42] target-arm: " Andreas Färber
2013-07-07 18:26 ` [Qemu-devel] [PATCH qom-cpu v2 29/42] target-m68k: " Andreas Färber
2013-07-07 18:26 ` [Qemu-devel] [PATCH qom-cpu v2 30/42] target-mips: " Andreas Färber
2013-07-07 18:26 ` [Qemu-devel] [PATCH qom-cpu v2 31/42] target-openrisc: " Andreas Färber
2013-07-07 18:26 ` [Qemu-devel] [PATCH qom-cpu v2 32/42] target-sh4: " Andreas Färber
2013-07-07 18:26 ` [Qemu-devel] [PATCH qom-cpu v2 33/42] target-microblaze: " Andreas Färber
2013-07-07 18:26 ` [Qemu-devel] [PATCH qom-cpu v2 34/42] target-cris: " Andreas Färber
2013-07-07 18:26 ` [Qemu-devel] [PATCH qom-cpu v2 35/42] target-alpha: " Andreas Färber
2013-07-07 18:26 ` [Qemu-devel] [PATCH qom-cpu v2 36/42] target-s390x: " Andreas Färber
2013-07-07 18:26 ` [Qemu-devel] [PATCH qom-cpu v2 37/42] target-lm32: " Andreas Färber
2013-07-07 18:26 ` [Qemu-devel] [PATCH qom-cpu v2 38/42] target-xtensa: " Andreas Färber
2013-07-07 18:26 ` [Qemu-devel] [PATCH qom-cpu v2 39/42] gdbstub: Replace GET_REG*() macros with gdb_get_reg*() functions Andreas Färber
2013-07-07 18:26 ` [Qemu-devel] [PATCH qom-cpu v2 40/42] cpu: Introduce CPUClass::gdb_{read, write}_register() Andreas Färber
2013-07-07 18:26 ` [Qemu-devel] [PATCH qom-cpu v2 41/42] target-cris: Factor out CPUClass::gdb_read_register() hook for v10 Andreas Färber
2013-07-07 18:26 ` [Qemu-devel] [PATCH qom-cpu v2 42/42] cpu: Introduce CPUClass::gdb_core_xml_file for GDB_CORE_XML Andreas Färber
2013-07-09 21:03 ` Andreas Färber [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51DC7AA7.8010406@suse.de \
    --to=afaerber@suse.de \
    --cc=anthony@codemonkey.ws \
    --cc=aurelien@aurel32.net \
    --cc=blauwirbel@gmail.com \
    --cc=green@moxielogic.com \
    --cc=gxt@mprc.pku.edu.cn \
    --cc=jan.kiszka@web.de \
    --cc=jcmvbkbc@gmail.com \
    --cc=michael@walle.cc \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).