From 08cfba5d1493f6e71cba14a686cb208fb1f190e8 Mon Sep 17 00:00:00 2001 From: Olivier Houchard Date: Sat, 2 Aug 2008 12:49:43 +0000 Subject: [PATCH] Fix software single-stepping: we need to check if the instruction is a return instruction as well, or we'll stop single-stepping as soon as we'll return from a function. MFC after: 3 days --- sys/ddb/db_run.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/ddb/db_run.c b/sys/ddb/db_run.c index 18f9c0df7d2..f0b31bf47d3 100644 --- a/sys/ddb/db_run.c +++ b/sys/ddb/db_run.c @@ -269,7 +269,7 @@ db_set_single_step(void) * at pc was not executed. */ inst = db_get_value(pc, sizeof(int), FALSE); - if (inst_branch(inst) || inst_call(inst)) { + if (inst_branch(inst) || inst_call(inst) || inst_return(inst)) { brpc = branch_taken(inst, pc); if (brpc != pc) { /* self-branches are hopeless */ db_taken_bkpt = db_set_temp_breakpoint(brpc);