diff options
author | cognet <cognet@FreeBSD.org> | 2008-08-02 12:49:43 +0000 |
---|---|---|
committer | cognet <cognet@FreeBSD.org> | 2008-08-02 12:49:43 +0000 |
commit | 3bbb49a345a9c362ea68b1c84998da2b606ff342 (patch) | |
tree | ca5e2a133caf0875060c90c0a1f2a54308a89fb7 /sys/ddb | |
parent | 91e09275cc88585dbe3f10bb86b2e1f954e02922 (diff) | |
download | FreeBSD-src-3bbb49a345a9c362ea68b1c84998da2b606ff342.zip FreeBSD-src-3bbb49a345a9c362ea68b1c84998da2b606ff342.tar.gz |
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
Diffstat (limited to 'sys/ddb')
-rw-r--r-- | sys/ddb/db_run.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/ddb/db_run.c b/sys/ddb/db_run.c index 18f9c0d..f0b31bf 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); |