forked from MacRuby/MacRuby
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gdbinit
106 lines (104 loc) · 1.89 KB
/
.gdbinit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
define rp
set $types = rb_type($arg0)
if $types == 0x01
# RUBY_T_OBJECT
p "T_OBJECT:"
p (struct RBasic *)($arg0)
else
if $types == 0x02
# RUBY_T_CLASS
p "T_CLASS:"
p (struct RBasic *)($arg0)
else
if $types == 0x03
# RUBY_T_MODULE
p "T_MODULE:"
p (struct RBasic *)($arg0)
else
if $types == 0x04
# RUBY_T_FLOAT
p "T_FLOAT:"
p coerce_ptr_to_double($arg0)
else
if $types == 0x05
# RUBY_T_STRING
p "T_STRING:"
p *(struct RString *)($arg0)
else
if $types == 0x06
# RUBY_T_REGEXP
p "T_REGEXP:"
p *(struct rb_regexp *)($arg0)
else
if $types == 0x07
# RUBY_T_ARRAY
p "T_ARRAY:"
p *(struct RArray *)($arg0)
else
if $types == 0x08
# RUBY_T_HASH
p "T_HASH:"
p *(struct RHash *)($arg0)
else
if $types == 0x09
# RUBY_T_STRUCT
p "T_STRUCT:"
p *(struct RStruct *)($arg0)
else
if $types == 0x0a
# RUBY_T_BIGNUM
p "T_BIGNUM:"
p *(struct RBignum *)($arg0)
else
if $types == 0x0b
# RUBY_T_FILE
p "T_FILE:"
p *(struct RFile *)($arg0)
p *((struct RFile *)($arg0))->fptr
else
if $types == 0x0c
# RUBY_T_DATA
p "T_DATA:"
p *(struct RData *)($arg0)
else
if $types == 0x0d
# RUBY_T_MATCH
p "T_MATCH:"
p *(struct rb_match *)($arg0)
else
if $types == 0x0e
# RUBY_T_COMPLEX
p "T_COMPLEX:"
p *(struct RComplex *)($arg0)
else
if $types == 0x0f
# RUBY_T_RATIONAL
p "T_RATIONAL:"
p *(struct RRational *)($arg0)
else
if $types == 0x11
# RUBY_T_NIL
p "T_NIL:"
p "nil"
else
if $types == 0x12
# RUBY_T_TRUE
p "T_TRUE:"
p "true"
else
if $types == 0x14
# RUBY_T_SYMBOL
p "T_SYMBOL:"
p *(struct rb_sym_t *)($arg0)
else
if $types == 0x15
# RUBY_T_FIXNUM
p "T_FIXNUM:"
p rb_num2int($arg0)
end
if $types == 0x1b
# RUBY_T_UNDEF
p "T_UNDEF:"
p "undef"
end
end