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>,
"Andreas Färber" <afaerber@suse.de>,
"Aurélien Jarno" <aurelien@aurel32.net>,
"Richard Henderson" <rth@twiddle.net>
Subject: [Qemu-devel] [PATCH qom-cpu v3 00/41] QOM CPUState, part 11: GDB stub
Date: Wed, 10 Jul 2013 00:23:19 +0200 [thread overview]
Message-ID: <1373408640-6046-1-git-send-email-afaerber@suse.de> (raw)
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?
v3 avoids find_cpu() related breakages by deferring GDBState::c_cpu conversion
until GDBState::g_cpu and find_cpu() can easily be converted, too.
Available for testing at:
git://github.com/afaerber/qemu-cpu.git qom-cpu-11.v3
https://github.com/afaerber/qemu-cpu/commits/qom-cpu-11.v3
Regards,
Andreas
v2 -> v3:
* Rebased onto c52a6b67c1d7c6fc9fb2e3ba988d7b978e1487d3 revert (Max).
* Don't replace find_cpu() with qemu_get_cpu() (Max).
* Squashed GDBState::c_cpu and GDBState::g_cpu() conversion.
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).
* Documented all CPUClass and CPUState field additions.
* 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 (41):
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 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::{c,g}_cpu and find_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 | 1621 ++++-----------------------------------
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, 2709 insertions(+), 1889 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
--
1.8.1.4
next reply other threads:[~2013-07-09 22:24 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-09 22:23 Andreas Färber [this message]
2013-07-09 22:23 ` [Qemu-devel] [PATCH qom-cpu v3 01/41] cpu: Introduce vaddr type Andreas Färber
2013-07-09 22:23 ` [Qemu-devel] [PATCH qom-cpu v3 02/41] cpu: Introduce CPUClass::set_pc() for gdb_set_cpu_pc() Andreas Färber
2013-07-09 22:23 ` [Qemu-devel] [PATCH qom-cpu v3 03/41] target-m68k: Implement CPUClass::set_pc() Andreas Färber
2013-07-09 22:23 ` [Qemu-devel] [PATCH qom-cpu v3 04/41] target-moxie: " Andreas Färber
2013-07-09 22:23 ` [Qemu-devel] [PATCH qom-cpu v3 05/41] target-unicore32: " Andreas Färber
2013-07-09 22:23 ` [Qemu-devel] [PATCH qom-cpu v3 06/41] cpu: Introduce CPUClass::synchronize_from_tb() for cpu_pc_from_tb() Andreas Färber
2013-07-09 22:23 ` [Qemu-devel] [PATCH qom-cpu v3 07/41] cpu: Move singlestep_enabled field from CPU_COMMON to CPUState Andreas Färber
2013-07-09 22:23 ` [Qemu-devel] [PATCH qom-cpu v3 08/41] gdbstub: Update gdb_handlesig() and gdb_signalled() Coding Style Andreas Färber
2013-07-09 22:23 ` [Qemu-devel] [PATCH qom-cpu v3 09/41] cpu: Change cpu_single_step() argument to CPUState Andreas Färber
2013-07-09 22:23 ` [Qemu-devel] [PATCH qom-cpu v3 10/41] kvm: Change kvm_{insert, remove}_breakpoint() " Andreas Färber
2013-07-09 22:23 ` [Qemu-devel] [PATCH qom-cpu v3 11/41] gdbstub: Change syscall callback " Andreas Färber
2013-07-09 22:23 ` [Qemu-devel] [PATCH qom-cpu v3 12/41] gdbstub: Change gdb_handlesig() " Andreas Färber
2013-07-09 22:23 ` [Qemu-devel] [PATCH qom-cpu v3 13/41] gdbstub: Change gdb_{read, write}_register() " Andreas Färber
2013-07-09 22:23 ` [Qemu-devel] [PATCH qom-cpu v3 14/41] cpu: Turn cpu_get_phys_page_debug() into a CPUClass hook Andreas Färber
2013-07-09 22:23 ` [Qemu-devel] [PATCH qom-cpu v3 15/41] exec: Change cpu_memory_rw_debug() argument to CPUState Andreas Färber
2013-07-09 22:23 ` [Qemu-devel] [PATCH qom-cpu v3 16/41] cpu: Introduce CPUClass::memory_rw_debug() for target_memory_rw_debug() Andreas Färber
2013-07-09 22:23 ` [Qemu-devel] [PATCH qom-cpu v3 17/41] gdbstub: Change GDBState::{c, g}_cpu and find_cpu() to CPUState Andreas Färber
2013-07-09 22:23 ` [Qemu-devel] [PATCH qom-cpu v3 18/41] cpu: Move gdb_regs field from CPU_COMMON " Andreas Färber
2013-07-09 22:23 ` [Qemu-devel] [PATCH qom-cpu v3 19/41] gdbstub: Change gdb_register_coprocessor() argument " Andreas Färber
2013-07-09 22:23 ` [Qemu-devel] [PATCH qom-cpu v3 20/41] target-xtensa: Introduce XtensaCPU subclasses Andreas Färber
2013-07-09 22:23 ` [Qemu-devel] [PATCH qom-cpu v3 21/41] gdbstub: Fix cpu_gdb_{read, write}_register() Coding Style Andreas Färber
2013-07-09 22:23 ` [Qemu-devel] [PATCH qom-cpu v3 22/41] gdbstub: Drop dead code in cpu_gdb_{read, write}_register() Andreas Färber
2013-07-09 22:23 ` [Qemu-devel] [PATCH qom-cpu v3 23/41] cpu: Introduce CPUState::gdb_num_regs and CPUClass::gdb_num_core_regs Andreas Färber
2013-07-09 22:23 ` [Qemu-devel] [PATCH qom-cpu v3 24/41] target-i386: Move cpu_gdb_{read, write}_register() Andreas Färber
2013-07-09 22:23 ` [Qemu-devel] [PATCH qom-cpu v3 25/41] target-ppc: " Andreas Färber
2013-07-09 22:23 ` [Qemu-devel] [PATCH qom-cpu v3 26/41] target-sparc: " Andreas Färber
2013-07-09 22:23 ` [Qemu-devel] [PATCH qom-cpu v3 27/41] target-arm: " Andreas Färber
2013-07-09 22:23 ` [Qemu-devel] [PATCH qom-cpu v3 28/41] target-m68k: " Andreas Färber
2013-07-09 22:23 ` [Qemu-devel] [PATCH qom-cpu v3 29/41] target-mips: " Andreas Färber
2013-07-09 22:23 ` [Qemu-devel] [PATCH qom-cpu v3 30/41] target-openrisc: " Andreas Färber
2013-07-10 1:59 ` Jia Liu
2013-07-09 22:23 ` [Qemu-devel] [PATCH qom-cpu v3 31/41] target-sh4: " Andreas Färber
2013-07-09 22:23 ` [Qemu-devel] [PATCH qom-cpu v3 32/41] target-microblaze: " Andreas Färber
2013-07-09 22:23 ` [Qemu-devel] [PATCH qom-cpu v3 33/41] target-cris: " Andreas Färber
2013-07-09 22:23 ` [Qemu-devel] [PATCH qom-cpu v3 34/41] target-alpha: " Andreas Färber
2013-07-09 22:23 ` [Qemu-devel] [PATCH qom-cpu v3 35/41] target-s390x: " Andreas Färber
2013-07-09 22:23 ` [Qemu-devel] [PATCH qom-cpu v3 36/41] target-lm32: " Andreas Färber
2013-07-09 22:23 ` [Qemu-devel] [PATCH qom-cpu v3 37/41] target-xtensa: " Andreas Färber
2013-07-09 22:23 ` [Qemu-devel] [PATCH qom-cpu v3 38/41] gdbstub: Replace GET_REG*() macros with gdb_get_reg*() functions Andreas Färber
2013-07-09 22:23 ` [Qemu-devel] [PATCH qom-cpu v3 39/41] cpu: Introduce CPUClass::gdb_{read, write}_register() Andreas Färber
2013-07-09 22:23 ` [Qemu-devel] [PATCH qom-cpu v3 40/41] target-cris: Factor out CPUClass::gdb_read_register() hook for v10 Andreas Färber
2013-07-09 22:24 ` [Qemu-devel] [PATCH qom-cpu v3 41/41] cpu: Introduce CPUClass::gdb_core_xml_file for GDB_CORE_XML Andreas Färber
2013-07-22 14:52 ` [Qemu-devel] [PATCH qom-cpu v3 00/41] QOM CPUState, part 11: GDB stub Andreas Färber
2013-07-23 10:32 ` Max Filippov
2013-07-26 21:32 ` Andreas Färber
2013-07-26 22:17 ` Edgar E. Iglesias
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=1373408640-6046-1-git-send-email-afaerber@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).