Permalink
Browse files

Revert "Merge pull request #3126 from jbreeden/backtrace_irep_null_ch…

…eck"

This reverts commit bf7719f, reversing
changes made to 4f4fa0a.

We should get backtrace while irep is alive.
  • Loading branch information...
kou committed Mar 6, 2016
1 parent bf7719f commit d77c72dac5b46dacc8332bca73a8398ae2cf9a78
Showing with 2 additions and 7 deletions.
  1. +2 −7 src/backtrace.c
View
@@ -111,8 +111,6 @@ each_backtrace(mrb_state *mrb, mrb_int ciidx, mrb_code *pc0, each_backtrace_func
mrb_callinfo *ci;
mrb_irep *irep;
mrb_code *pc;
loc.lineno = -1;
ci = &mrb->c->cibase[i];
@@ -130,11 +128,8 @@ each_backtrace(mrb_state *mrb, mrb_int ciidx, mrb_code *pc0, each_backtrace_func
else {
pc = pc0;
}
if (irep) {
loc.filename = mrb_debug_get_filename(irep, (uint32_t)(pc - irep->iseq));
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;

0 comments on commit d77c72d

Please sign in to comment.