diff options
author | Andreas Färber <afaerber@suse.de> | 2013-07-02 17:43:21 +0200 |
---|---|---|
committer | Andreas Färber <afaerber@suse.de> | 2013-10-07 11:48:39 +0200 |
commit | 30ba0ee52d1519b717089782ef1caf0480a01dc3 (patch) | |
tree | 2007245f902dc0dfba178f55cc9f0a0288fddfc3 /exec.c | |
parent | 812586405c5d165aae791d3806a9bbb8312ec2ac (diff) | |
download | qemu-30ba0ee52d1519b717089782ef1caf0480a01dc3.tar.gz qemu-30ba0ee52d1519b717089782ef1caf0480a01dc3.tar.bz2 qemu-30ba0ee52d1519b717089782ef1caf0480a01dc3.zip |
cpu: Move cpu_copy() into linux-user
It is only used there and is deemed very fragile if not incorrect in its
current memcpy() form. Moving it into linux-user will allow to move
parts into target_cpu.h headers and only copy what the ABI mandates.
Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'exec.c')
-rw-r--r-- | exec.c | 32 |
1 files changed, 0 insertions, 32 deletions
@@ -625,38 +625,6 @@ void cpu_abort(CPUArchState *env, const char *fmt, ...) abort(); } -CPUArchState *cpu_copy(CPUArchState *env) -{ - CPUArchState *new_env = cpu_init(env->cpu_model_str); -#if defined(TARGET_HAS_ICE) - CPUBreakpoint *bp; - CPUWatchpoint *wp; -#endif - - /* Reset non arch specific state */ - cpu_reset(ENV_GET_CPU(new_env)); - - /* Copy arch specific state into the new CPU */ - memcpy(new_env, env, sizeof(CPUArchState)); - - /* Clone all break/watchpoints. - Note: Once we support ptrace with hw-debug register access, make sure - BP_CPU break/watchpoints are handled correctly on clone. */ - QTAILQ_INIT(&env->breakpoints); - QTAILQ_INIT(&env->watchpoints); -#if defined(TARGET_HAS_ICE) - QTAILQ_FOREACH(bp, &env->breakpoints, entry) { - cpu_breakpoint_insert(new_env, bp->pc, bp->flags, NULL); - } - QTAILQ_FOREACH(wp, &env->watchpoints, entry) { - cpu_watchpoint_insert(new_env, wp->vaddr, (~wp->len_mask) + 1, - wp->flags, NULL); - } -#endif - - return new_env; -} - #if !defined(CONFIG_USER_ONLY) static void tlb_reset_dirty_range_all(ram_addr_t start, ram_addr_t end, uintptr_t length) |