Commit 887a56ba authored by Yuhei Okazaki's avatar Yuhei Okazaki

fix bug that doesn't stop program when execute next command.

parent a08439a7
...@@ -57,5 +57,6 @@ dbgcmd_state ...@@ -57,5 +57,6 @@ dbgcmd_state
dbgcmd_next(mrb_state *mrb, mrdb_state *mrdb) dbgcmd_next(mrb_state *mrb, mrdb_state *mrdb)
{ {
mrdb->dbg->xm = DBG_NEXT; mrdb->dbg->xm = DBG_NEXT;
mrdb->dbg->prvci = mrb->c->ci;
return DBGST_CONTINUE; return DBGST_CONTINUE;
} }
...@@ -585,6 +585,7 @@ mrb_code_fetch_hook(mrb_state *mrb, mrb_irep *irep, mrb_code *pc, mrb_value *reg ...@@ -585,6 +585,7 @@ mrb_code_fetch_hook(mrb_state *mrb, mrb_irep *irep, mrb_code *pc, mrb_value *reg
if((uint32_t)(dbg->prvci) < (uint32_t)(mrb->c->ci)) { if((uint32_t)(dbg->prvci) < (uint32_t)(mrb->c->ci)) {
return; return;
} }
dbg->prvci = NULL;
dbg->method_bpno = 0; dbg->method_bpno = 0;
dbg->bm = BRK_NEXT; dbg->bm = BRK_NEXT;
break; break;
...@@ -606,7 +607,6 @@ mrb_code_fetch_hook(mrb_state *mrb, mrb_irep *irep, mrb_code *pc, mrb_value *reg ...@@ -606,7 +607,6 @@ mrb_code_fetch_hook(mrb_state *mrb, mrb_irep *irep, mrb_code *pc, mrb_value *reg
} }
dbg->prvfile = file; dbg->prvfile = file;
dbg->prvline = line; dbg->prvline = line;
dbg->prvci = mrb->c->ci;
return; return;
case DBG_INIT: case DBG_INIT:
dbg->root_irep = irep; dbg->root_irep = irep;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment