46 RUBY_FMODE_NOREVLOOKUP = 0x00000100,
49 RUBY_FMODE_PREP = 0x00010000,
51 RUBY_FMODE_UNIX = 0x00200000,
52 RUBY_FMODE_INET = 0x00400000,
53 RUBY_FMODE_INET6 = 0x00800000,
67 if (level < debug_level) {
68 fprintf(stderr,
"%*s", indent_level,
"");
80 vfprintf(stderr, format, ap);
89 if (level < debug_level) {
93 fprintf(stderr,
"DBG> %s: %s\n", header, buff);
108 if (level < debug_level) {
109 fprintf(stderr,
"DBG> %s: %s\n", header,
rb_id2name(
id));
118 if (level < debug_level) {
119 fprintf(stderr,
"DBG> %s: %s (%u)\n", header,
132 # if RUBY_MSVCRT_VERSION >= 80 133 extern int ruby_w32_rtc_error;
136 #if defined _WIN32 || defined __CYGWIN__ 138 UINT ruby_w32_codepage[2];
148 #define SET_WHEN(name, var, val) do { \ 149 if (len == sizeof(name) - 1 && \ 150 strncmp(str, (name), len) == 0) { \ 155 #define NAME_MATCH_VALUE(name) \ 156 ((size_t)len >= sizeof(name)-1 && \ 157 strncmp(str, (name), sizeof(name)-1) == 0 && \ 158 ((len == sizeof(name)-1 && !(len = 0)) || \ 159 (str[sizeof(name)-1] == '=' && \ 160 (str += sizeof(name), len -= sizeof(name), 1)))) 161 #define SET_UINT(val) do { \ 162 n = ruby_scan_digits(str, len, 10, &retlen, &ov); \ 163 if (!ov && retlen) { \ 164 val = (unsigned int)n; \ 169 #define SET_UINT_LIST(name, vals, num) do { \ 171 for (i = 0; i < (num); ++i) { \ 172 SET_UINT((vals)[i]); \ 173 if (!len || *str != ':') break; \ 178 fprintf(stderr, "ignored "name" option: `%.*s'\n", len, str); \ 181 #define SET_WHEN_UINT(name, vals, num, req) \ 182 if (NAME_MATCH_VALUE(name)) SET_UINT_LIST(name, vals, num); 192 # if RUBY_MSVCRT_VERSION >= 80 193 SET_WHEN(
"rtc_error", ruby_w32_rtc_error, 1);
196 #if defined _WIN32 || defined __CYGWIN__ 198 if (!len) fprintf(stderr,
"missing codepage argument");
207 set_debug_option(
const char *str,
int len,
void *arg)
210 fprintf(stderr,
"unexpected debug option: %.*s\n",
len, str);
VALUE ruby_debug_print_value(int level, int debug_level, const char *header, VALUE obj)
enum ruby_robject_flags robject_flags
#define NAME_MATCH_VALUE(name)
enum ruby_method_ids method_ids
enum ruby_econv_flag_type econv_flag_types
void ruby_each_words(const char *, void(*)(const char *, int, void *), void *)
#define SET_WHEN(name, var, val)
enum ruby_tag_type tag_type
void ruby_debug_printf(const char *format,...)
int ruby_debug_print_indent(int level, int debug_level, int indent_level)
enum ruby_id_types id_types
#define FMODE_SETENC_BY_BOM
const SIGNED_VALUE RUBY_NODE_LMASK
enum ruby_rstring_flags rstring_flags
enum ruby_rarray_flags rarray_flags
const union @4 ruby_dummy_gdb_enums
#define SET_UINT_LIST(name, vals, num)
VALUE * ruby_initial_gc_stress_ptr
const char * rb_id2name(ID)
enum ruby_encoding_consts encoding_consts
void ruby_set_debug_option(const char *str)
register unsigned int len
enum ruby_coderange_type enc_coderange_types
NODE * ruby_debug_print_node(int level, int debug_level, const char *header, const NODE *node)
const char * ruby_node_name(int node)
enum ruby_special_consts special_consts
enum ruby_value_type value_type
enum ruby_rmodule_flags rmodule_flags
int ruby_env_debug_option(const char *str, int len, void *arg)
void ruby_debug_print_v(VALUE v)
const char * rb_raw_obj_info(char *buff, const int buff_size, VALUE obj)
void ruby_debug_breakpoint(void)
enum ruby_fl_type fl_types
ID ruby_debug_print_id(int level, int debug_level, const char *header, ID id)