Ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c52d4d35cc6a173c89eda98ceffa2dcf)
|
#include "eval_intern.h"
#include "internal.h"
#include "internal/vm.h"
#include "iseq.h"
#include "ruby/debug.h"
#include "ruby/encoding.h"
#include "vm_core.h"
Go to the source code of this file.
Data Structures | |
struct | rb_backtrace_location_struct |
struct | valued_frame_info |
struct | rb_backtrace_struct |
struct | bt_iter_arg |
struct | oldbt_arg |
struct | print_to_arg |
struct | rb_debug_inspector_struct |
struct | collect_caller_bindings_data |
Macros | |
#define | rb_id2str(id) id2str(id) |
#define | BACKTRACE_START 0 |
#define | ALL_BACKTRACE_LINES -1 |
Typedefs | |
typedef struct rb_backtrace_location_struct | rb_backtrace_location_t |
typedef struct rb_backtrace_struct | rb_backtrace_t |
Enumerations | |
enum | { CALLER_BINDING_SELF , CALLER_BINDING_CLASS , CALLER_BINDING_BINDING , CALLER_BINDING_ISEQ , CALLER_BINDING_CFP } |
#define ALL_BACKTRACE_LINES -1 |
Definition at line 33 of file vm_backtrace.c.
#define BACKTRACE_START 0 |
Definition at line 32 of file vm_backtrace.c.
Definition at line 30 of file vm_backtrace.c.
typedef struct rb_backtrace_location_struct rb_backtrace_location_t |
typedef struct rb_backtrace_struct rb_backtrace_t |
anonymous enum |
Enumerator | |
---|---|
CALLER_BINDING_SELF | |
CALLER_BINDING_CLASS | |
CALLER_BINDING_BINDING | |
CALLER_BINDING_ISEQ | |
CALLER_BINDING_CFP |
Definition at line 1330 of file vm_backtrace.c.
void Init_vm_backtrace | ( | void | ) |
Definition at line 1246 of file vm_backtrace.c.
References CLASS_OF, rb_cArray, rb_cObject, rb_cThread, rb_define_alloc_func(), rb_define_class_under(), rb_define_global_function, rb_define_method, rb_marshal_define_compat(), rb_undef_alloc_func(), and rb_undef_method().
Referenced by Init_VM().
void rb_backtrace | ( | void | ) |
Definition at line 1013 of file vm_backtrace.c.
Definition at line 1039 of file vm_backtrace.c.
References ALL_BACKTRACE_LINES, BACKTRACE_START, oldbt_arg::data, oldbt_arg::func, print_to_arg::iter, NULL, and print_to_arg::output.
Definition at line 471 of file vm_backtrace.c.
References rb_typeddata_is_kind_of().
void rb_backtrace_print_as_bugreport | ( | void | ) |
Definition at line 994 of file vm_backtrace.c.
References ALL_BACKTRACE_LINES, BACKTRACE_START, oldbt_arg::data, oldbt_arg::func, and NULL.
Referenced by rb_vm_bugreport().
Definition at line 864 of file vm_backtrace.c.
References GetCoreDataFromValue, and rb_backtrace_struct::locary.
Definition at line 809 of file vm_backtrace.c.
References bt_iter_arg::bt, GetCoreDataFromValue, and rb_backtrace_struct::strary.
void rb_backtrace_use_iseq_first_lineno_for_last_location | ( | VALUE | self | ) |
Definition at line 821 of file vm_backtrace.c.
References rb_backtrace_struct::backtrace, rb_backtrace_struct::backtrace_size, rb_backtrace_location_struct::body, rb_iseq_struct::body, bt_iter_arg::bt, rb_iseq_location_struct::first_lineno, FIX2INT, GetCoreDataFromValue, rb_backtrace_location_struct::iseq, rb_iseq_constant_body::location, rb_backtrace_location_struct::type, and VM_ASSERT.
VALUE rb_debug_inspector_backtrace_locations | ( | const rb_debug_inspector_t * | dc | ) |
Definition at line 1506 of file vm_backtrace.c.
References rb_debug_inspector_struct::backtrace.
VALUE rb_debug_inspector_frame_binding_get | ( | const rb_debug_inspector_t * | dc, |
long | index | ||
) |
Definition at line 1490 of file vm_backtrace.c.
References CALLER_BINDING_BINDING, and rb_ary_entry().
VALUE rb_debug_inspector_frame_class_get | ( | const rb_debug_inspector_t * | dc, |
long | index | ||
) |
Definition at line 1483 of file vm_backtrace.c.
References CALLER_BINDING_CLASS, and rb_ary_entry().
VALUE rb_debug_inspector_frame_iseq_get | ( | const rb_debug_inspector_t * | dc, |
long | index | ||
) |
Definition at line 1497 of file vm_backtrace.c.
References CALLER_BINDING_ISEQ, Qnil, rb_ary_entry(), rb_iseqw_new(), and RTEST.
VALUE rb_debug_inspector_frame_self_get | ( | const rb_debug_inspector_t * | dc, |
long | index | ||
) |
Definition at line 1476 of file vm_backtrace.c.
References CALLER_BINDING_SELF, and rb_ary_entry().
VALUE rb_debug_inspector_open | ( | rb_debug_inspector_func_t | func, |
void * | data | ||
) |
Definition at line 1435 of file vm_backtrace.c.
References ALL_BACKTRACE_LINES, rb_debug_inspector_struct::backtrace, rb_debug_inspector_struct::backtrace_size, BACKTRACE_START, rb_debug_inspector_struct::cfp, rb_execution_context_struct::cfp, rb_debug_inspector_struct::contexts, rb_debug_inspector_struct::ec, EC_EXEC_TAG, EC_JUMP_TAG, EC_POP_TAG, EC_PUSH_TAG, FALSE, MAYBE_UNUSED, RARRAY_LEN, rb_ec_backtrace_location_ary(), rb_vm_stack_to_heap(), and TAG_NONE.
VALUE rb_ec_backtrace_object | ( | const rb_execution_context_t * | ec | ) |
Definition at line 770 of file vm_backtrace.c.
References ALL_BACKTRACE_LINES, BACKTRACE_START, FALSE, and NULL.
VALUE rb_ec_backtrace_str_ary | ( | const rb_execution_context_t * | ec, |
long | lev, | ||
long | n | ||
) |
Definition at line 892 of file vm_backtrace.c.
Referenced by rb_make_backtrace().
VALUE rb_make_backtrace | ( | void | ) |
Definition at line 1059 of file vm_backtrace.c.
References ALL_BACKTRACE_LINES, BACKTRACE_START, and rb_ec_backtrace_str_ary().
Definition at line 1612 of file vm_backtrace.c.
References Qfalse, Qnil, rb_gc_register_mark_object(), rb_iseq_realpath(), and rb_str_new_literal.
Definition at line 1634 of file vm_backtrace.c.
References Qnil, and rb_iseq_base_label().
Referenced by rb_profile_frame_full_label().
Definition at line 1663 of file vm_backtrace.c.
References FL_SINGLETON, FL_TEST, NIL_P, Qnil, rb_class2name(), rb_class_path(), rb_ivar_get(), rb_obj_class(), rb_sprintf(), RBASIC, T_CLASS, T_ICLASS, and T_MODULE.
Definition at line 1641 of file vm_backtrace.c.
References Qnil, and rb_iseq_first_lineno().
Definition at line 1737 of file vm_backtrace.c.
References rb_callable_method_entry_struct::def, NIL_P, rb_method_definition_struct::original_id, PRIsVALUE, rb_long2int, rb_profile_frame_base_label(), rb_profile_frame_label(), rb_profile_frame_qualified_method_name(), rb_sprintf(), RSTRING_LEN, and RSTRING_PTR.
Definition at line 1627 of file vm_backtrace.c.
References Qnil, and rb_iseq_label().
Referenced by rb_profile_frame_full_label().
Definition at line 1697 of file vm_backtrace.c.
References rb_callable_method_entry_struct::def, rb_method_definition_struct::original_id, Qnil, and rb_iseq_method_name().
Referenced by rb_profile_frame_qualified_method_name().
Definition at line 1580 of file vm_backtrace.c.
References Qnil, and rb_iseq_path().
Definition at line 1729 of file vm_backtrace.c.
References rb_profile_frame_method_name().
Referenced by rb_profile_frame_full_label().
Definition at line 1684 of file vm_backtrace.c.
References FL_SINGLETON, FL_TEST, NIL_P, Qfalse, and Qtrue.
Definition at line 1512 of file vm_backtrace.c.
References rb_execution_context_struct::cfp, rb_callable_method_entry_struct::def, rb_control_frame_struct::iseq, rb_control_frame_struct::pc, rb_vm_frame_method_entry(), RUBY_VM_PREVIOUS_CONTROL_FRAME, VM_METHOD_TYPE_CFUNC, and VM_METHOD_TYPE_ISEQ.
VALUE rb_vm_backtrace | ( | int | argc, |
const VALUE * | argv, | ||
struct rb_execution_context_struct * | ec | ||
) |
Definition at line 1162 of file vm_backtrace.c.
VALUE rb_vm_backtrace_locations | ( | int | argc, |
const VALUE * | argv, | ||
struct rb_execution_context_struct * | ec | ||
) |
Definition at line 1167 of file vm_backtrace.c.
int rb_vm_get_sourceline | ( | const rb_control_frame_t * | cfp | ) |
Definition at line 71 of file vm_backtrace.c.
References FIX2INT, rb_control_frame_struct::iseq, rb_control_frame_struct::pc, and rb_iseq_first_lineno().
Referenced by rb_method_definition_set(), rb_source_location(), rb_sourceline(), and rb_vm_make_binding().
Definition at line 1151 of file vm_backtrace.c.