30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
# File 'ext/thread_dumper.c', line 30
static VALUE
dump()
{
VALUE ary_dump;
VALUE curr_rb_thread;
struct rb_thread* curr_thread;
struct rb_thread* th;
ary_dump = rb_ary_new();
curr_rb_thread = rb_thread_current();
Data_Get_Struct(curr_rb_thread, struct rb_thread, curr_thread);
if (curr_thread) {
FOREACH_THREAD_FROM(curr_thread, th) {
if (th) {
rb_ary_push(ary_dump, backtrace(th));
}
} END_FOREACH_FROM(curr_thread, th);
}
return ary_dump;
}
|