16RUBY_SYMBOL_EXPORT_BEGIN
 
   18#define dpv(h,v) ruby_debug_print_value(-1, 0, (h), (v)) 
   19#define dp(v)    ruby_debug_print_value(-1, 0, "", (v)) 
   20#define dpi(i)   ruby_debug_print_id(-1, 0, "", (i)) 
   21#define dpn(n)   ruby_debug_print_node(-1, 0, "", (n)) 
   25VALUE ruby_debug_print_value(
int level, 
int debug_level, 
const char *header, 
VALUE v);
 
   26void  ruby_debug_print_v(
VALUE v);
 
   27ID    ruby_debug_print_id(
int level, 
int debug_level, 
const char *header, 
ID id);
 
   28struct RNode *ruby_debug_print_node(
int level, 
int debug_level, 
const char *header, 
const struct RNode *node);
 
   29void  ruby_debug_print_n(
const struct RNode *node);
 
   30int   ruby_debug_print_indent(
int level, 
int debug_level, 
int indent_level);
 
   31void  ruby_debug_gc_check_func(
void);
 
   32void ruby_set_debug_option(
const char *str);
 
   36#ifndef USE_RUBY_DEBUG_LOG 
   37#define USE_RUBY_DEBUG_LOG 0 
   79extern enum ruby_debug_log_mode {
 
   80    ruby_debug_log_disabled = 0x00,
 
   81    ruby_debug_log_memory   = 0x01,
 
   82    ruby_debug_log_stderr   = 0x02,
 
   83    ruby_debug_log_file     = 0x04,
 
   87void ruby_debug_log(const 
char *file, 
int line, const 
char *func_name, const 
char *fmt, ...);
 
   88void ruby_debug_log_print(
unsigned int n);
 
   89bool ruby_debug_log_filter(const 
char *func_name, const 
char *file_name);
 
   91#if RBIMPL_COMPILER_IS(GCC) && defined(__OPTIMIZE__) 
   92# define ruby_debug_log(...) \ 
   93    RB_GNUC_EXTENSION_BLOCK( \ 
   94        RBIMPL_WARNING_PUSH(); \ 
   95        RBIMPL_WARNING_IGNORED(-Wformat-zero-length); \ 
   96        ruby_debug_log(__VA_ARGS__); \ 
  102#define _RUBY_DEBUG_LOG(...) ruby_debug_log(__FILE__, __LINE__, RUBY_FUNCTION_NAME_STRING, "" __VA_ARGS__) 
  104#if USE_RUBY_DEBUG_LOG 
  105# define RUBY_DEBUG_LOG_ENABLED(func_name, file_name)                     \ 
  106    (ruby_debug_log_mode && ruby_debug_log_filter(func_name, file_name)) 
  108#define RUBY_DEBUG_LOG(...) do { \ 
  109    if (RUBY_DEBUG_LOG_ENABLED(RUBY_FUNCTION_NAME_STRING, __FILE__)) \ 
  110        ruby_debug_log(__FILE__, __LINE__, RUBY_FUNCTION_NAME_STRING, "" __VA_ARGS__); \ 
  113#define RUBY_DEBUG_LOG2(file, line, ...) do { \ 
  114    if (RUBY_DEBUG_LOG_ENABLED(RUBY_FUNCTION_NAME_STRING, file)) \ 
  115        ruby_debug_log(file, line, RUBY_FUNCTION_NAME_STRING, "" __VA_ARGS__); \ 
  120#define RUBY_DEBUG_LOG(...) 
  121#define RUBY_DEBUG_LOG2(file, line, ...) 
uintptr_t ID
Type that represents a Ruby identifier such as a variable name.
uintptr_t VALUE
Type that represents a Ruby object.