Commit d77c72da authored by Kouhei Sutou's avatar Kouhei Sutou

Revert "Merge pull request #3126 from jbreeden/backtrace_irep_null_check"

This reverts commit bf7719fe, reversing
changes made to 4f4fa0ad.

We should get backtrace while irep is alive.
parent bf7719fe
...@@ -111,8 +111,6 @@ each_backtrace(mrb_state *mrb, mrb_int ciidx, mrb_code *pc0, each_backtrace_func ...@@ -111,8 +111,6 @@ each_backtrace(mrb_state *mrb, mrb_int ciidx, mrb_code *pc0, each_backtrace_func
mrb_callinfo *ci; mrb_callinfo *ci;
mrb_irep *irep; mrb_irep *irep;
mrb_code *pc; mrb_code *pc;
loc.lineno = -1;
ci = &mrb->c->cibase[i]; ci = &mrb->c->cibase[i];
...@@ -130,11 +128,8 @@ each_backtrace(mrb_state *mrb, mrb_int ciidx, mrb_code *pc0, each_backtrace_func ...@@ -130,11 +128,8 @@ each_backtrace(mrb_state *mrb, mrb_int ciidx, mrb_code *pc0, each_backtrace_func
else { else {
pc = pc0; pc = pc0;
} }
loc.filename = mrb_debug_get_filename(irep, (uint32_t)(pc - irep->iseq));
if (irep) { loc.lineno = mrb_debug_get_line(irep, (uint32_t)(pc - irep->iseq));
loc.filename = mrb_debug_get_filename(irep, (uint32_t)(pc - irep->iseq));
loc.lineno = mrb_debug_get_line(irep, (uint32_t)(pc - irep->iseq));
}
if (loc.lineno == -1) continue; if (loc.lineno == -1) continue;
......
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