aboutsummaryrefslogtreecommitdiff
path: root/src/target/mips_m4k.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/target/mips_m4k.c')
-rw-r--r--src/target/mips_m4k.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/target/mips_m4k.c b/src/target/mips_m4k.c
index fb4c3762..485f4e8c 100644
--- a/src/target/mips_m4k.c
+++ b/src/target/mips_m4k.c
@@ -90,14 +90,14 @@ static int mips_m4k_debug_entry(struct target *target)
/* make sure stepping disabled, SSt bit in CP0 debug register cleared */
mips_ejtag_config_step(ejtag_info, 0);
+ mips32_save_context(target);
+
/* make sure break unit configured */
mips32_configure_break_unit(target);
/* attempt to find halt reason */
mips_m4k_examine_debug_reason(target);
- mips32_save_context(target);
-
/* default to mips32 isa, it will be changed below if required */
mips32->isa_mode = MIPS32_ISA_MIPS32;
@@ -558,12 +558,12 @@ static int mips_m4k_step(struct target *target, int current,
/* registers are now invalid */
register_cache_invalidate(mips32->core_cache);
+ LOG_DEBUG("target stepped ");
+ mips_m4k_debug_entry(target);
+
if (breakpoint)
mips_m4k_set_breakpoint(target, breakpoint);
- LOG_DEBUG("target stepped ");
-
- mips_m4k_debug_entry(target);
target_call_event_callbacks(target, TARGET_EVENT_HALTED);
return ERROR_OK;