Skip to content

Commit 4049490

Browse files
committed
Imported Upstream version 2.3.3
1 parent 799ea68 commit 4049490

File tree

2,933 files changed

+103033
-61266
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,933 files changed

+103033
-61266
lines changed

.document

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,7 @@ ChangeLog
2020

2121
NEWS
2222

23-
README
24-
README.EXT
25-
README.EXT.ja
26-
README.ja
23+
README.md
24+
README.ja.md
2725

2826
doc

.gdbinit

Lines changed: 70 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,12 @@ define rp
245245
printf "%sT_UNDEF%s: ", $color_type, $color_end
246246
print (struct RBasic *)($arg0)
247247
else
248+
if ($flags & RUBY_T_MASK) == RUBY_T_IMEMO
249+
printf "%sT_IMEMO%s(", $color_type, $color_end
250+
output (enum imemo_type)(($flags>>RUBY_FL_USHIFT)&imemo_mask)
251+
printf "): "
252+
rp_imemo $arg0
253+
else
248254
if ($flags & RUBY_T_MASK) == RUBY_T_NODE
249255
printf "%sT_NODE%s(", $color_type, $color_end
250256
output (enum node_type)(($flags&RUBY_NODE_TYPEMASK)>>RUBY_NODE_TYPESHIFT)
@@ -289,6 +295,7 @@ define rp
289295
end
290296
end
291297
end
298+
end
292299
end
293300
document rp
294301
Print a Ruby's VALUE.
@@ -448,8 +455,8 @@ end
448455

449456
define rp_class
450457
printf "(struct RClass *) %p", (void*)$arg0
451-
if ((struct RClass *)($arg0))->ptr.origin != $arg0
452-
printf " -> %p", ((struct RClass *)($arg0))->ptr.origin
458+
if ((struct RClass *)($arg0))->ptr.origin_ != $arg0
459+
printf " -> %p", ((struct RClass *)($arg0))->ptr.origin_
453460
end
454461
printf "\n"
455462
rb_classname $arg0
@@ -460,6 +467,40 @@ document rp_class
460467
Print the content of a Class/Module.
461468
end
462469

470+
define rp_imemo
471+
set $flags = (((struct RBasic *)($arg0))->flags >> RUBY_FL_USHIFT) & imemo_mask
472+
if $flags == imemo_cref
473+
printf "(rb_cref_t *) %p\n", (void*)$arg0
474+
print *(rb_cref_t *)$arg0
475+
else
476+
if $flags == imemo_svar
477+
printf "(struct vm_svar *) %p\n", (void*)$arg0
478+
print *(struct vm_svar *)$arg0
479+
else
480+
if $flags == imemo_throw_data
481+
printf "(struct vm_throw_data *) %p\n", (void*)$arg0
482+
print *(struct vm_throw_data *)$arg0
483+
else
484+
if $flags == imemo_ifunc
485+
printf "(struct vm_ifunc *) %p\n", (void*)$arg0
486+
print *(struct vm_ifunc *)$arg0
487+
else
488+
if $flags == imemo_memo
489+
printf "(struct MEMO *) %p\n", (void*)$arg0
490+
print *(struct MEMO *)$arg0
491+
else
492+
printf "(struct RIMemo *) %p\n", (void*)$arg0
493+
print *(struct RIMemo *)$arg0
494+
end
495+
end
496+
end
497+
end
498+
end
499+
end
500+
document rp_imemo
501+
Print the content of a memo
502+
end
503+
463504
define nd_type
464505
print (enum node_type)((((NODE*)($arg0))->flags&RUBY_NODE_TYPEMASK)>>RUBY_NODE_TYPESHIFT)
465506
end
@@ -869,23 +910,16 @@ end
869910

870911
define rb_ps_vm
871912
print $ps_vm = (rb_vm_t*)$arg0
872-
set $ps_threads = (st_table*)$ps_vm->living_threads
873-
if $ps_threads->entries_packed
874-
set $ps_threads_i = 0
875-
while $ps_threads_i < $ps_threads->num_entries
876-
set $ps_threads_key = (st_data_t)$ps_threads->as.packed.entries[$ps_threads_i].key
877-
set $ps_threads_val = (st_data_t)$ps_threads->as.packed.entries[$ps_threads_i].val
878-
rb_ps_thread $ps_threads_key $ps_threads_val
879-
set $ps_threads_i = $ps_threads_i + 1
880-
end
881-
else
882-
set $ps_threads_ptr = (st_table_entry*)$ps_threads->head
883-
while $ps_threads_ptr
884-
set $ps_threads_key = (st_data_t)$ps_threads_ptr->key
885-
set $ps_threads_val = (st_data_t)$ps_threads_ptr->record
886-
rb_ps_thread $ps_threads_key $ps_threads_val
887-
set $ps_threads_ptr = (st_table_entry*)$ps_threads_ptr->fore
913+
set $ps_thread_ln = $ps_vm->living_threads.n.next
914+
set $ps_thread_ln_last = $ps_vm->living_threads.n.prev
915+
while 1
916+
set $ps_thread_th = (rb_thread_t *)$ps_thread_ln
917+
set $ps_thread = (VALUE)($ps_thread_th->self)
918+
rb_ps_thread $ps_thread
919+
if $ps_thread_ln == $ps_thread_ln_last
920+
loop_break
888921
end
922+
set $ps_thread_ln = $ps_thread_ln->next
889923
end
890924
end
891925
document rb_ps_vm
@@ -894,8 +928,9 @@ end
894928

895929
define rb_ps_thread
896930
set $ps_thread = (struct RTypedData*)$arg0
897-
set $ps_thread_id = $arg1
898-
print $ps_thread_th = (rb_thread_t*)$ps_thread->data
931+
set $ps_thread_th = (rb_thread_t*)$ps_thread->data
932+
printf "* #<Thread:%p rb_thread_t:%p native_thread:%p>\n", \
933+
$ps_thread, $ps_thread_th, $ps_thread_th->thread_id
899934
end
900935

901936
# Details: https://bugs.ruby-lang.org/projects/ruby-trunk/wiki/MachineInstructionsTraceWithGDB
@@ -914,3 +949,18 @@ define SDR
914949
call rb_vmdebug_stack_dump_raw_current()
915950
end
916951

952+
define rbi
953+
if ((LINK_ELEMENT*)$arg0)->type == ISEQ_ELEMENT_LABEL
954+
p *(LABEL*)$arg0
955+
else
956+
if ((LINK_ELEMENT*)$arg0)->type == ISEQ_ELEMENT_INSN
957+
p *(INSN*)$arg0
958+
else
959+
if ((LINK_ELEMENT*)$arg0)->type == ISEQ_ELEMENT_ADJUST
960+
p *(ADJUST*)$arg0
961+
else
962+
print *$arg0
963+
end
964+
end
965+
end
966+
end

.gitattributes

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
*.gemspec diff=ruby
2+
*.rb diff=ruby
3+
bin/* diff=ruby
4+
tool/update-deps diff=ruby
5+
tool/make-snapshot diff=ruby

.gitignore

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
*-*-*.def
2+
*-*-*.exp
3+
*-*-*.lib
24
*.a
35
*.bak
46
*.dSYM
@@ -8,10 +10,13 @@
810
*.inc
911
*.log
1012
*.o
13+
*.obj
1114
*.orig
15+
*.pdb
1216
*.rej
1317
*.sav
1418
*.swp
19+
*.yarb
1520
*~
1621
.*-*
1722
.*.list
@@ -24,13 +29,18 @@
2429
.svn
2530
Makefile
2631
Makefile.old
32+
cygruby*.def
2733
extconf.h
2834
y.output
2935
y.tab.c
3036

3137
# /
3238
/*-fake.rb
39+
/*.dll
40+
/*.exe
41+
/*.res
3342
/*.pc
43+
/*.rc
3444
/*_prelude.c
3545
/COPYING.LIB
3646
/ChangeLog-*
@@ -56,6 +66,8 @@ y.tab.c
5666
/config.status.lineno
5767
/configure
5868
/coverage/simplecov
69+
/coverage/simplecov-html
70+
/coverage/doclie
5971
/coverage/.last_run.json
6072
/coverage/.resultset.json*
6173
/coverage/assets
@@ -90,13 +102,16 @@ y.tab.c
90102
/riscos
91103
/rubicon
92104
/ruby
105+
/ruby-runner
106+
/ruby-runner.c
93107
/ruby-man.rd.gz
94108
/sizes.c
95109
/test.rb
96110
/tmp
97111
/transdb.h
98112
/uncommon.mk
99113
/verconf.h
114+
/verconf.mk
100115
/web
101116
/yasmdata.rb
102117

@@ -105,14 +120,25 @@ y.tab.c
105120
/benchmark/fasta.output.*
106121
/benchmark/wc.input
107122

123+
/enc/*.def
124+
/enc/*.exp
125+
/enc/*.lib
108126
/enc/unicode/data
109127

110128
# /enc/trans/
111129
/enc/trans/*.c
130+
/enc/trans/*.def
131+
/enc/trans/*.exp
132+
/enc/trans/*.lib
133+
/enc/trans/.time
112134

113135
# /ext/
114136
/ext/extinit.c
115137

138+
# /ext/-test-/win32/dln/
139+
/ext/-test-/win32/dln/dlntest.exp
140+
/ext/-test-/win32/dln/dlntest.lib
141+
116142
# /ext/dl/callback/
117143
/ext/dl/callback/callback-*.c
118144
/ext/dl/callback/callback.c

.travis.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,10 @@ script:
6464
branches:
6565
only:
6666
- trunk
67+
- ruby_2_0_0
6768
- ruby_2_1
6869
- ruby_2_2
6970
- ruby_2_3
70-
- /^feature\//
71-
- /^bug\//
7271

7372
# We want to be notified when something happens.
7473
notifications:
@@ -88,6 +87,10 @@ notifications:
8887
on_success: always
8988
on_failure: never
9089

90+
email:
91+
92+
93+
9194
# Local Variables:
9295
# mode: YAML
9396
# coding: utf-8-unix

0 commit comments

Comments
 (0)