In Files

  • iseq.c
  • vm.c

Parent

Methods

RubyVM

::VM

Public Class Methods

NSDR() click to toggle source
 
               static VALUE
nsdr(void)
{
    VALUE ary = rb_ary_new();
#if HAVE_BACKTRACE
#include <execinfo.h>
#define MAX_NATIVE_TRACE 1024
    static void *trace[MAX_NATIVE_TRACE];
    int n = backtrace(trace, MAX_NATIVE_TRACE);
    char **syms = backtrace_symbols(trace, n);
    int i;

    if (syms == 0) {
        rb_memerror();
    }

    for (i=0; i<n; i++) {
        rb_ary_push(ary, rb_str_new2(syms[i]));
    }
    free(syms); /* OK */
#endif
    return ary;
}
            
SDR() click to toggle source

debug functions

 
               static VALUE
sdr(void)
{
    rb_vm_bugreport();
    return Qnil;
}