diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-07-29 01:39:17 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-07-29 01:39:17 +0000 |
commit | 72272159d8e4c63225c7be1d35e4daf8dcc80e6c (patch) | |
tree | 267370582c2387c62d5a17476a1b149e4e17662a /.gdbinit | |
parent | 6a5dda00d8fef046b1df3ba41411fb041106cd23 (diff) |
refix r51329 and show thread information
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51417 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to '.gdbinit')
-rw-r--r-- | .gdbinit | 30 |
1 files changed, 12 insertions, 18 deletions
@@ -910,23 +910,16 @@ end define rb_ps_vm print $ps_vm = (rb_vm_t*)$arg0 - set $ps_threads = (st_table*)$ps_vm->living_threads - if $ps_threads->entries_packed - set $ps_threads_i = 0 - while $ps_threads_i < $ps_threads->num_entries - set $ps_threads_key = (st_data_t)$ps_threads->as.packed.entries[$ps_threads_i].key - set $ps_threads_val = (st_data_t)$ps_threads->as.packed.entries[$ps_threads_i].val - rb_ps_thread $ps_threads_key $ps_threads_val - set $ps_threads_i = $ps_threads_i + 1 - end - else - set $ps_threads_ptr = (st_table_entry*)$ps_threads->as.big.private_list_head[0] - while $ps_threads_ptr - set $ps_threads_key = (st_data_t)$ps_threads_ptr->key - set $ps_threads_val = (st_data_t)$ps_threads_ptr->record - rb_ps_thread $ps_threads_key $ps_threads_val - set $ps_threads_ptr = (st_table_entry*)$ps_threads_ptr->olist.next + set $ps_thread_ln = $ps_vm->living_threads.n.next + set $ps_thread_ln_last = $ps_vm->living_threads.n.prev + while 1 + set $ps_thread_th = (rb_thread_t *)$ps_thread_ln + set $ps_thread = (VALUE)($ps_thread_th->self) + rb_ps_thread $ps_thread + if $ps_thread_ln == $ps_thread_ln_last + loop_break end + set $ps_thread_ln = $ps_thread_ln->next end end document rb_ps_vm @@ -935,8 +928,9 @@ end define rb_ps_thread set $ps_thread = (struct RTypedData*)$arg0 - set $ps_thread_id = $arg1 - print $ps_thread_th = (rb_thread_t*)$ps_thread->data + set $ps_thread_th = (rb_thread_t*)$ps_thread->data + printf "* #<Thread:%p rb_thread_t:%p native_thread:%p>\n", \ + $ps_thread, $ps_thread_th, $ps_thread_th->thread_id end # Details: https://bugs.ruby-lang.org/projects/ruby-trunk/wiki/MachineInstructionsTraceWithGDB |