aboutsummaryrefslogtreecommitdiff
path: root/sys/ddb/db_run.c
diff options
context:
space:
mode:
authorOlivier Houchard <cognet@FreeBSD.org>2008-08-02 12:49:43 +0000
committerOlivier Houchard <cognet@FreeBSD.org>2008-08-02 12:49:43 +0000
commit08cfba5d1493f6e71cba14a686cb208fb1f190e8 (patch)
treeca5e2a133caf0875060c90c0a1f2a54308a89fb7 /sys/ddb/db_run.c
parent4ed897041f980939dd873cae9734f35fe5f4bcff (diff)
downloadsrc-08cfba5d1493f6e71cba14a686cb208fb1f190e8.tar.gz
src-08cfba5d1493f6e71cba14a686cb208fb1f190e8.zip
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
Notes
Notes: svn path=/head/; revision=181175
Diffstat (limited to 'sys/ddb/db_run.c')
-rw-r--r--sys/ddb/db_run.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/ddb/db_run.c b/sys/ddb/db_run.c
index 18f9c0df7d26..f0b31bf47d3b 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);