diff options
author | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2003-07-29 20:50:33 +0000 |
---|---|---|
committer | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2003-07-29 20:50:33 +0000 |
commit | c33a346edff5910dddeea84792b73cb117518911 (patch) | |
tree | fc171ac6837d43fbb8ee9b984f2bebf907e45f0e /exec.c | |
parent | 61a2ad53cb6337eb2c535984f65f1cb531ccc452 (diff) | |
download | qemu-c33a346edff5910dddeea84792b73cb117518911.tar.gz qemu-c33a346edff5910dddeea84792b73cb117518911.tar.bz2 qemu-c33a346edff5910dddeea84792b73cb117518911.zip |
first part of single stepping support
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@342 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'exec.c')
-rw-r--r-- | exec.c | 17 |
1 files changed, 16 insertions, 1 deletions
@@ -617,7 +617,8 @@ static void tb_reset_jump_recursive(TranslationBlock *tb) tb_reset_jump_recursive2(tb, 1); } -/* add a breakpoint */ +/* add a breakpoint. EXCP_DEBUG is returned by the CPU loop if a + breakpoint is reached */ int cpu_breakpoint_insert(CPUState *env, uint32_t pc) { #if defined(TARGET_I386) @@ -659,6 +660,20 @@ int cpu_breakpoint_remove(CPUState *env, uint32_t pc) #endif } +/* enable or disable single step mode. EXCP_DEBUG is returned by the + CPU loop after each instruction */ +void cpu_single_step(CPUState *env, int enabled) +{ +#if defined(TARGET_I386) + if (env->singlestep_enabled != enabled) { + env->singlestep_enabled = enabled; + /* must flush all the translated code to avoid inconsistancies */ + tb_flush(); + } +#endif +} + + /* mask must never be zero */ void cpu_interrupt(CPUState *env, int mask) { |