Ruby  3.1.0dev(2021-09-10revisionb76ad15ed0da636161de0243c547ee1e6fc95681)
Macros | Enumerations | Functions | Variables
vm_debug.h File Reference

(b76ad15ed0da636161de0243c547ee1e6fc95681)

#include "ruby/ruby.h"
#include "node.h"
Include dependency graph for vm_debug.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define dpv(h, v)   ruby_debug_print_value(-1, 0, (h), (v))
 
#define dp(v)   ruby_debug_print_value(-1, 0, "", (v))
 
#define dpi(i)   ruby_debug_print_id(-1, 0, "", (i))
 
#define dpn(n)   ruby_debug_print_node(-1, 0, "", (n))
 
#define _RUBY_DEBUG_LOG(fmt, ...)   ruby_debug_log(__FILE__, __LINE__, __func__, fmt, __VA_ARGS__)
 
#define RUBY_DEBUG_LOG(fmt, ...)
 
#define RUBY_DEBUG_LOG2(file, line, fmt, ...)
 

Enumerations

enum  ruby_debug_log_mode { ruby_debug_log_disabled = 0x00, ruby_debug_log_memory = 0x01, ruby_debug_log_stderr = 0x02, ruby_debug_log_file = 0x04 }
 

Functions

VALUE ruby_debug_print_value (int level, int debug_level, const char *header, VALUE v)
 
ID ruby_debug_print_id (int level, int debug_level, const char *header, ID id)
 
NODEruby_debug_print_node (int level, int debug_level, const char *header, const NODE *node)
 
int ruby_debug_print_indent (int level, int debug_level, int indent_level)
 
void ruby_debug_gc_check_func (void)
 
void ruby_set_debug_option (const char *str)
 
void ruby_debug_log (const char *file, int line, const char *func_name, const char *fmt,...)
 
void ruby_debug_log_print (unsigned int n)
 
bool ruby_debug_log_filter (const char *func_name)
 

Variables

enum ruby_debug_log_mode ruby_debug_log_mode
 

Macro Definition Documentation

◆ _RUBY_DEBUG_LOG

#define _RUBY_DEBUG_LOG (   fmt,
  ... 
)    ruby_debug_log(__FILE__, __LINE__, __func__, fmt, __VA_ARGS__)

Definition at line 96 of file vm_debug.h.

◆ dp

#define dp (   v)    ruby_debug_print_value(-1, 0, "", (v))

Definition at line 20 of file vm_debug.h.

◆ dpi

#define dpi (   i)    ruby_debug_print_id(-1, 0, "", (i))

Definition at line 21 of file vm_debug.h.

◆ dpn

#define dpn (   n)    ruby_debug_print_node(-1, 0, "", (n))

Definition at line 22 of file vm_debug.h.

◆ dpv

#define dpv (   h,
 
)    ruby_debug_print_value(-1, 0, (h), (v))

Definition at line 19 of file vm_debug.h.

◆ RUBY_DEBUG_LOG

#define RUBY_DEBUG_LOG (   fmt,
  ... 
)

Definition at line 112 of file vm_debug.h.

◆ RUBY_DEBUG_LOG2

#define RUBY_DEBUG_LOG2 (   file,
  line,
  fmt,
  ... 
)

Definition at line 113 of file vm_debug.h.

Enumeration Type Documentation

◆ ruby_debug_log_mode

Enumerator
ruby_debug_log_disabled 
ruby_debug_log_memory 
ruby_debug_log_stderr 
ruby_debug_log_file 

Definition at line 83 of file vm_debug.h.

Function Documentation

◆ ruby_debug_gc_check_func()

void ruby_debug_gc_check_func ( void  )

◆ ruby_debug_log()

void ruby_debug_log ( const char *  file,
int  line,
const char *  func_name,
const char *  fmt,
  ... 
)

◆ ruby_debug_log_filter()

bool ruby_debug_log_filter ( const char *  func_name)

◆ ruby_debug_log_print()

void ruby_debug_log_print ( unsigned int  n)

◆ ruby_debug_print_id()

ID ruby_debug_print_id ( int  level,
int  debug_level,
const char *  header,
ID  id 
)

Definition at line 137 of file debug.c.

References id, and rb_id2name().

◆ ruby_debug_print_indent()

int ruby_debug_print_indent ( int  level,
int  debug_level,
int  indent_level 
)

Definition at line 96 of file debug.c.

References FALSE, and TRUE.

◆ ruby_debug_print_node()

NODE* ruby_debug_print_node ( int  level,
int  debug_level,
const char *  header,
const NODE node 
)

Definition at line 147 of file debug.c.

References nd_line, nd_type, and ruby_node_name().

◆ ruby_debug_print_value()

VALUE ruby_debug_print_value ( int  level,
int  debug_level,
const char *  header,
VALUE  v 
)

Definition at line 118 of file debug.c.

References rb_raw_obj_info().

Referenced by ruby_debug_print_v().

◆ ruby_set_debug_option()

void ruby_set_debug_option ( const char *  str)

Definition at line 258 of file debug.c.

References ruby_each_words(), and str.

Referenced by main().

Variable Documentation

◆ ruby_debug_log_mode