Ruby  2.5.0dev(2017-10-22revision60238)
Data Structures | Macros | Typedefs | Enumerations | Functions
vm_backtrace.c File Reference
#include "internal.h"
#include "ruby/debug.h"
#include "vm_core.h"
#include "eval_intern.h"
#include "iseq.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)
 

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
}
 

Functions

int rb_vm_get_sourceline (const rb_control_frame_t *cfp)
 
int rb_backtrace_p (VALUE obj)
 
VALUE rb_threadptr_backtrace_object (rb_thread_t *th)
 
VALUE rb_backtrace_to_str_ary (VALUE self)
 
VALUE rb_backtrace_to_location_ary (VALUE self)
 
VALUE rb_threadptr_backtrace_str_ary (rb_thread_t *th, long lev, long n)
 
VALUE rb_threadptr_backtrace_location_ary (rb_thread_t *th, long lev, long n)
 
void rb_backtrace_print_as_bugreport (void)
 
void rb_backtrace (void)
 
void rb_backtrace_each (VALUE(*iter)(VALUE recv, VALUE str), VALUE output)
 
VALUE rb_make_backtrace (void)
 
VALUE rb_vm_thread_backtrace (int argc, const VALUE *argv, VALUE thval)
 
VALUE rb_vm_thread_backtrace_locations (int argc, const VALUE *argv, VALUE thval)
 
void Init_vm_backtrace (void)
 
VALUE rb_debug_inspector_open (rb_debug_inspector_func_t func, void *data)
 
VALUE rb_debug_inspector_frame_self_get (const rb_debug_inspector_t *dc, long index)
 
VALUE rb_debug_inspector_frame_class_get (const rb_debug_inspector_t *dc, long index)
 
VALUE rb_debug_inspector_frame_binding_get (const rb_debug_inspector_t *dc, long index)
 
VALUE rb_debug_inspector_frame_iseq_get (const rb_debug_inspector_t *dc, long index)
 
VALUE rb_debug_inspector_backtrace_locations (const rb_debug_inspector_t *dc)
 
int rb_profile_frames (int start, int limit, VALUE *buff, int *lines)
 
VALUE rb_profile_frame_path (VALUE frame)
 
VALUE rb_profile_frame_absolute_path (VALUE frame)
 
VALUE rb_profile_frame_label (VALUE frame)
 
VALUE rb_profile_frame_base_label (VALUE frame)
 
VALUE rb_profile_frame_first_lineno (VALUE frame)
 
VALUE rb_profile_frame_classpath (VALUE frame)
 
VALUE rb_profile_frame_singleton_method_p (VALUE frame)
 
VALUE rb_profile_frame_method_name (VALUE frame)
 
VALUE rb_profile_frame_qualified_method_name (VALUE frame)
 
VALUE rb_profile_frame_full_label (VALUE frame)
 

Macro Definition Documentation

◆ rb_id2str

#define rb_id2str (   id)    id2str(id)

Typedef Documentation

◆ rb_backtrace_location_t

◆ rb_backtrace_t

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
CALLER_BINDING_SELF 
CALLER_BINDING_CLASS 
CALLER_BINDING_BINDING 
CALLER_BINDING_ISEQ 
CALLER_BINDING_CFP 

Definition at line 1070 of file vm_backtrace.c.

Function Documentation

◆ Init_vm_backtrace()

void Init_vm_backtrace ( void  )

Definition at line 986 of file vm_backtrace.c.

◆ rb_backtrace()

void rb_backtrace ( void  )

Definition at line 770 of file vm_backtrace.c.

◆ rb_backtrace_each()

void rb_backtrace_each ( VALUE(*)(VALUE recv, VALUE str)  iter,
VALUE  output 
)

Definition at line 796 of file vm_backtrace.c.

◆ rb_backtrace_p()

int rb_backtrace_p ( VALUE  obj)

Definition at line 410 of file vm_backtrace.c.

References rb_typeddata_is_kind_of().

Referenced by rb_check_backtrace().

◆ rb_backtrace_print_as_bugreport()

void rb_backtrace_print_as_bugreport ( void  )

Definition at line 754 of file vm_backtrace.c.

References oldbt_arg::func.

Referenced by rb_vm_bugreport().

◆ rb_backtrace_to_location_ary()

VALUE rb_backtrace_to_location_ary ( VALUE  self)

Definition at line 625 of file vm_backtrace.c.

References GetCoreDataFromValue, and rb_backtrace_struct::locary.

◆ rb_backtrace_to_str_ary()

VALUE rb_backtrace_to_str_ary ( VALUE  self)

◆ rb_debug_inspector_backtrace_locations()

VALUE rb_debug_inspector_backtrace_locations ( const rb_debug_inspector_t dc)

Definition at line 1240 of file vm_backtrace.c.

References rb_debug_inspector_struct::backtrace.

◆ rb_debug_inspector_frame_binding_get()

VALUE rb_debug_inspector_frame_binding_get ( const rb_debug_inspector_t dc,
long  index 
)

Definition at line 1224 of file vm_backtrace.c.

◆ rb_debug_inspector_frame_class_get()

VALUE rb_debug_inspector_frame_class_get ( const rb_debug_inspector_t dc,
long  index 
)

Definition at line 1217 of file vm_backtrace.c.

◆ rb_debug_inspector_frame_iseq_get()

VALUE rb_debug_inspector_frame_iseq_get ( const rb_debug_inspector_t dc,
long  index 
)

Definition at line 1231 of file vm_backtrace.c.

◆ rb_debug_inspector_frame_self_get()

VALUE rb_debug_inspector_frame_self_get ( const rb_debug_inspector_t dc,
long  index 
)

Definition at line 1210 of file vm_backtrace.c.

◆ rb_debug_inspector_open()

VALUE rb_debug_inspector_open ( rb_debug_inspector_func_t  func,
void *  data 
)

Definition at line 1172 of file vm_backtrace.c.

References GET_THREAD, and MAYBE_UNUSED.

◆ rb_make_backtrace()

VALUE rb_make_backtrace ( void  )

Definition at line 813 of file vm_backtrace.c.

References GET_THREAD, and rb_threadptr_backtrace_str_ary().

◆ rb_profile_frame_absolute_path()

VALUE rb_profile_frame_absolute_path ( VALUE  frame)

Definition at line 1313 of file vm_backtrace.c.

References rb_backtrace_location_struct::iseq.

◆ rb_profile_frame_base_label()

VALUE rb_profile_frame_base_label ( VALUE  frame)

Definition at line 1327 of file vm_backtrace.c.

References rb_backtrace_location_struct::iseq.

Referenced by rb_profile_frame_full_label().

◆ rb_profile_frame_classpath()

VALUE rb_profile_frame_classpath ( VALUE  frame)

Definition at line 1356 of file vm_backtrace.c.

◆ rb_profile_frame_first_lineno()

VALUE rb_profile_frame_first_lineno ( VALUE  frame)

Definition at line 1334 of file vm_backtrace.c.

References rb_backtrace_location_struct::iseq.

◆ rb_profile_frame_full_label()

VALUE rb_profile_frame_full_label ( VALUE  frame)

◆ rb_profile_frame_label()

VALUE rb_profile_frame_label ( VALUE  frame)

Definition at line 1320 of file vm_backtrace.c.

References rb_backtrace_location_struct::iseq.

Referenced by rb_profile_frame_full_label().

◆ rb_profile_frame_method_name()

VALUE rb_profile_frame_method_name ( VALUE  frame)

Definition at line 1390 of file vm_backtrace.c.

References rb_backtrace_location_struct::iseq.

◆ rb_profile_frame_path()

VALUE rb_profile_frame_path ( VALUE  frame)

Definition at line 1306 of file vm_backtrace.c.

References rb_backtrace_location_struct::iseq.

◆ rb_profile_frame_qualified_method_name()

VALUE rb_profile_frame_qualified_method_name ( VALUE  frame)

Definition at line 1397 of file vm_backtrace.c.

Referenced by rb_profile_frame_full_label().

◆ rb_profile_frame_singleton_method_p()

VALUE rb_profile_frame_singleton_method_p ( VALUE  frame)

Definition at line 1377 of file vm_backtrace.c.

◆ rb_profile_frames()

int rb_profile_frames ( int  start,
int  limit,
VALUE buff,
int *  lines 
)

◆ rb_threadptr_backtrace_location_ary()

VALUE rb_threadptr_backtrace_location_ary ( rb_thread_t th,
long  lev,
long  n 
)

Definition at line 659 of file vm_backtrace.c.

◆ rb_threadptr_backtrace_object()

VALUE rb_threadptr_backtrace_object ( rb_thread_t th)

Definition at line 515 of file vm_backtrace.c.

References bt_iter_arg::prev_loc.

◆ rb_threadptr_backtrace_str_ary()

VALUE rb_threadptr_backtrace_str_ary ( rb_thread_t th,
long  lev,
long  n 
)

Definition at line 653 of file vm_backtrace.c.

Referenced by rb_make_backtrace().

◆ rb_vm_get_sourceline()

int rb_vm_get_sourceline ( const rb_control_frame_t cfp)

Definition at line 38 of file vm_backtrace.c.

Referenced by rb_source_location(), rb_sourceline(), and rb_thread_current_status().

◆ rb_vm_thread_backtrace()

VALUE rb_vm_thread_backtrace ( int  argc,
const VALUE argv,
VALUE  thval 
)

Definition at line 901 of file vm_backtrace.c.

◆ rb_vm_thread_backtrace_locations()

VALUE rb_vm_thread_backtrace_locations ( int  argc,
const VALUE argv,
VALUE  thval 
)

Definition at line 907 of file vm_backtrace.c.