85 case LOCATION_TYPE_ISEQ:
86 case LOCATION_TYPE_ISEQ_CALCED:
89 case LOCATION_TYPE_CFUNC:
90 case LOCATION_TYPE_IFUNC:
129 case LOCATION_TYPE_ISEQ:
130 loc->
type = LOCATION_TYPE_ISEQ_CALCED;
132 case LOCATION_TYPE_ISEQ_CALCED:
133 return loc->
body.
iseq.lineno.lineno;
134 case LOCATION_TYPE_CFUNC:
140 rb_bug(
"location_lineno: unreachable");
163 case LOCATION_TYPE_ISEQ:
164 case LOCATION_TYPE_ISEQ_CALCED:
166 case LOCATION_TYPE_CFUNC:
168 case LOCATION_TYPE_IFUNC:
170 rb_bug(
"location_label: unreachable");
195 case LOCATION_TYPE_ISEQ:
196 case LOCATION_TYPE_ISEQ_CALCED:
198 case LOCATION_TYPE_CFUNC:
200 case LOCATION_TYPE_IFUNC:
202 rb_bug(
"location_base_label: unreachable");
222 case LOCATION_TYPE_ISEQ:
223 case LOCATION_TYPE_ISEQ_CALCED:
225 case LOCATION_TYPE_CFUNC:
230 case LOCATION_TYPE_IFUNC:
232 rb_bug(
"location_path: unreachable");
255 case LOCATION_TYPE_ISEQ:
256 case LOCATION_TYPE_ISEQ_CALCED:
258 case LOCATION_TYPE_CFUNC:
263 case LOCATION_TYPE_IFUNC:
265 rb_bug(
"location_absolute_path: unreachable");
301 case LOCATION_TYPE_ISEQ:
306 loc->
type = LOCATION_TYPE_ISEQ_CALCED;
308 case LOCATION_TYPE_ISEQ_CALCED:
310 lineno = loc->
body.
iseq.lineno.lineno;
313 case LOCATION_TYPE_CFUNC:
315 file = loc->
body.
cfunc.prev_loc->body.iseq.iseq->location.path;
325 case LOCATION_TYPE_IFUNC:
327 rb_bug(
"location_to_str: unreachable");
366 for (i=0; i<s; i++) {
411 void (*init)(
void *
arg,
size_t size),
435 if (start_cfp < last_cfp) {
439 size = start_cfp - last_cfp + 1;
453 ID mid = cfp->me->def ? cfp->me->def->original_id : cfp->me->called_id;
455 iter_cfunc(arg, cfp, mid);
483 loc->
type = LOCATION_TYPE_ISEQ;
494 loc->
type = LOCATION_TYPE_CFUNC;
527 rb_bug(
"backtrace_collect: unreachable");
672 (arg->
func)(arg->
data, file, lineno, name);
683 (arg->
func)(arg->
data, file, lineno, name);
692 fprintf(fp,
"\tfrom %s:%d:in unknown method\n",
696 fprintf(fp,
"\tfrom %s:%d:in `%s'\n",
707 arg.
data = (
void *)fp;
720 fprintf(stderr,
"-- Ruby level backtrace information "
721 "----------------------------------------\n");
725 fprintf(stderr,
"%s:%d:in unknown method\n", filename, line);
728 fprintf(stderr,
"%s:%d:in `%s'\n", filename, line,
RSTRING_PTR(method));
739 arg.
data = (
int *)&i;
775 lev = lev_default + lev_plus;
793 lev = beg + lev_plus;
999 #if defined __GNUC__ && __GNUC__ >= 4
1000 #pragma GCC visibility push(default)
1003 #if defined __GNUC__ && __GNUC__ >= 4
1004 #pragma GCC visibility pop
1039 return RBASIC(klass)->klass;
1102 if (!
NIL_P(cfp_val)) {
1124 dbg_context.
th = th;
1125 dbg_context.
cfp = dbg_context.
th->
cfp;
1132 result = (*func)(&dbg_context, data);