diff options
author | Andreas Färber <afaerber@suse.de> | 2013-06-21 19:09:18 +0200 |
---|---|---|
committer | Andreas Färber <afaerber@suse.de> | 2013-07-23 02:41:31 +0200 |
commit | f45748f10eda61d6262153fadf3910cb63e17ecd (patch) | |
tree | 9b386381473d206b62f0940e3bb60d9cbacfeacc /target-s390x/cpu.c | |
parent | 2be8d4509896116dae7b3b9dffc0fccef480126d (diff) | |
download | qemu-f45748f10eda61d6262153fadf3910cb63e17ecd.tar.gz qemu-f45748f10eda61d6262153fadf3910cb63e17ecd.tar.bz2 qemu-f45748f10eda61d6262153fadf3910cb63e17ecd.zip |
cpu: Introduce CPUClass::set_pc() for gdb_set_cpu_pc()
This moves setting the Program Counter from gdbstub into target code.
Use vaddr type as upper-bound replacement for target_ulong.
Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'target-s390x/cpu.c')
-rw-r--r-- | target-s390x/cpu.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/target-s390x/cpu.c b/target-s390x/cpu.c index 1ef2fc0e86..fe3cd8ed15 100644 --- a/target-s390x/cpu.c +++ b/target-s390x/cpu.c @@ -58,6 +58,13 @@ CpuDefinitionInfoList *arch_query_cpu_definitions(Error **errp) } #endif +static void s390_cpu_set_pc(CPUState *cs, vaddr value) +{ + S390CPU *cpu = S390_CPU(cs); + + cpu->env.psw.addr = value; +} + /* CPUClass::reset() */ static void s390_cpu_reset(CPUState *s) { @@ -165,6 +172,7 @@ static void s390_cpu_class_init(ObjectClass *oc, void *data) cc->do_interrupt = s390_cpu_do_interrupt; cc->dump_state = s390_cpu_dump_state; + cc->set_pc = s390_cpu_set_pc; dc->vmsd = &vmstate_s390_cpu; } |