Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## code
- t = Thread.new { p 5 }
- t.join
- ## gdb
- $ gdb vm/vm
- GNU gdb 6.6
- Copyright (C) 2006 Free Software Foundation, Inc.
- GDB is free software, covered by the GNU General Public License, and you are
- welcome to change it and/or distribute copies of it under certain conditions.
- Type "show copying" to see the conditions.
- There is absolutely no warranty for GDB. Type "show warranty" for details.
- This GDB was configured as "x86_64-pc-linux-gnu"...
- Using host libthread_db library "/lib/libthread_db.so.1".
- (gdb) r thread.rb
- Starting program: /home/brixen/rubuildius/repo/rubinius/e4c7d3a74ea8b6ed39529fc3b5affa988495cd32/vm/vm thread.rb
- [Thread debugging using libthread_db enabled]
- [New Thread 47569272873344 (LWP 9472)]
- [New Thread 1082132800 (LWP 9475)]
- 5
- Program received signal SIGINT, Interrupt.
- [Switching to Thread 47569272873344 (LWP 9472)]
- 0x00002b4395843356 in poll () from /lib/libc.so.6
- (gdb) b rubinius::VM::find_and_activade_thread
- the class rubinius::VM does not have any method named find_and_activade_thread
- Hint: try 'rubinius::VM::find_and_activade_thread<TAB> or 'rubinius::VM::find_and_activade_thread<ESC-?>
- (Note leading single quote.)
- (gdb) b rubinius::VM::find_and_activate_thread
- Breakpoint 1 at 0x5a47e0: file vm/vm.cpp, line 219.
- (gdb) c
- Continuing.
- Breakpoint 1, rubinius::VM::find_and_activate_thread (this=0x7fff15cf81d0) at vm/vm.cpp:219
- 219 bool VM::find_and_activate_thread() {
- (gdb) n
- 220 Tuple* scheduled = globals.scheduled_threads.get();
- (gdb) n
- 222 for(std::size_t i = scheduled->num_fields() - 1; i > 0; i--) {
- (gdb)
- 223 List* list = as<List>(scheduled->at(this, i));
- (gdb) p i
- $1 = 2
- (gdb) n
- 225 Thread* thread = try_as<Thread>(list->shift(this));
- (gdb)
- 227 while(thread) {
- (gdb)
- 222 for(std::size_t i = scheduled->num_fields() - 1; i > 0; i--) {
- (gdb)
- 223 List* list = as<List>(scheduled->at(this, i));
- (gdb)
- 225 Thread* thread = try_as<Thread>(list->shift(this));
- (gdb)
- 227 while(thread) {
- (gdb)
- 222 for(std::size_t i = scheduled->num_fields() - 1; i > 0; i--) {
- (gdb)
- 246 return false;
- (gdb) c
- Continuing.
Add Comment
Please, Sign In to add comment