85 case LOCATION_TYPE_ISEQ:
86 case LOCATION_TYPE_ISEQ_CALCED:
89 case LOCATION_TYPE_CFUNC:
90 case LOCATION_TYPE_IFUNC:
130 case LOCATION_TYPE_ISEQ:
131 loc->
type = LOCATION_TYPE_ISEQ_CALCED;
133 case LOCATION_TYPE_ISEQ_CALCED:
134 return loc->
body.
iseq.lineno.lineno;
135 case LOCATION_TYPE_CFUNC:
141 rb_bug(
"location_lineno: unreachable");
164 case LOCATION_TYPE_ISEQ:
165 case LOCATION_TYPE_ISEQ_CALCED:
167 case LOCATION_TYPE_CFUNC:
169 case LOCATION_TYPE_IFUNC:
171 rb_bug(
"location_label: unreachable");
213 case LOCATION_TYPE_ISEQ:
214 case LOCATION_TYPE_ISEQ_CALCED:
216 case LOCATION_TYPE_CFUNC:
218 case LOCATION_TYPE_IFUNC:
220 rb_bug(
"location_base_label: unreachable");
240 case LOCATION_TYPE_ISEQ:
241 case LOCATION_TYPE_ISEQ_CALCED:
243 case LOCATION_TYPE_CFUNC:
248 case LOCATION_TYPE_IFUNC:
250 rb_bug(
"location_path: unreachable");
273 case LOCATION_TYPE_ISEQ:
274 case LOCATION_TYPE_ISEQ_CALCED:
276 case LOCATION_TYPE_CFUNC:
281 case LOCATION_TYPE_IFUNC:
283 rb_bug(
"location_absolute_path: unreachable");
319 case LOCATION_TYPE_ISEQ:
324 loc->
type = LOCATION_TYPE_ISEQ_CALCED;
326 case LOCATION_TYPE_ISEQ_CALCED:
328 lineno = loc->
body.
iseq.lineno.lineno;
331 case LOCATION_TYPE_CFUNC:
333 file = loc->
body.
cfunc.prev_loc->body.iseq.iseq->location.path;
343 case LOCATION_TYPE_IFUNC:
345 rb_bug(
"location_to_str: unreachable");
385 for (i=0; i<s; i++) {
432 void (*init)(
void *
arg,
size_t size),
456 if (start_cfp < last_cfp) {
460 size = start_cfp - last_cfp + 1;
474 ID mid = cfp->me->def ? cfp->me->def->original_id : cfp->me->called_id;
476 iter_cfunc(arg, cfp, mid);
504 loc->
type = LOCATION_TYPE_ISEQ;
515 loc->
type = LOCATION_TYPE_CFUNC;
548 rb_bug(
"backtrace_collect: unreachable");
705 (arg->
func)(arg->
data, file, lineno, name);
716 (arg->
func)(arg->
data, file, lineno, name);
725 fprintf(fp,
"\tfrom %s:%d:in unknown method\n",
729 fprintf(fp,
"\tfrom %s:%d:in `%s'\n",
740 arg.
data = (
void *)fp;
753 fprintf(stderr,
"-- Ruby level backtrace information "
754 "----------------------------------------\n");
758 fprintf(stderr,
"%s:%d:in unknown method\n", filename, line);
761 fprintf(stderr,
"%s:%d:in `%s'\n", filename, line,
RSTRING_PTR(method));
772 arg.
data = (
int *)&i;
808 arg.
data = (
void *)output;
835 if (argc == 2 &&
NIL_P(vn)) argc--;
839 lev = lev_default + lev_plus;
857 lev = beg + lev_plus;
1099 return RBASIC(klass)->klass;
1162 if (!
NIL_P(cfp_val)) {
1184 dbg_context.
th = th;
1185 dbg_context.
cfp = dbg_context.
th->
cfp;
1192 result = (*func)(&dbg_context, data);
1255 for (i=0; i<limit && cfp != end_cfp;) {
1256 if (cfp->
iseq && cfp->
pc) {
1273 #define frame2iseq(frame) frame
1310 if (klass && !
NIL_P(klass)) {
1312 klass =
RBASIC(klass)->klass;
1348 if (method_name !=
Qnil) {
1352 if (classpath !=
Qnil) {
1354 classpath, singleton_p ==
Qtrue ?
"." :
"#", method_name);
1372 if (
NIL_P(qualified_method_name) || base_label == qualified_method_name) {
1378 int prefix_len =
rb_long2int(label_length - base_label_length);