Guest User

Untitled

a guest
May 25th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.17 KB | None | 0 0
  1. ## code
  2. t = Thread.new { p 5 }
  3. t.join
  4.  
  5. ## gdb
  6. $ gdb vm/vm
  7. GNU gdb 6.6
  8. Copyright (C) 2006 Free Software Foundation, Inc.
  9. GDB is free software, covered by the GNU General Public License, and you are
  10. welcome to change it and/or distribute copies of it under certain conditions.
  11. Type "show copying" to see the conditions.
  12. There is absolutely no warranty for GDB. Type "show warranty" for details.
  13. This GDB was configured as "x86_64-pc-linux-gnu"...
  14. Using host libthread_db library "/lib/libthread_db.so.1".
  15. (gdb) r thread.rb
  16. Starting program: /home/brixen/rubuildius/repo/rubinius/e4c7d3a74ea8b6ed39529fc3b5affa988495cd32/vm/vm thread.rb
  17. [Thread debugging using libthread_db enabled]
  18. [New Thread 47569272873344 (LWP 9472)]
  19. [New Thread 1082132800 (LWP 9475)]
  20. 5
  21.  
  22. Program received signal SIGINT, Interrupt.
  23. [Switching to Thread 47569272873344 (LWP 9472)]
  24. 0x00002b4395843356 in poll () from /lib/libc.so.6
  25. (gdb) b rubinius::VM::find_and_activade_thread
  26. the class rubinius::VM does not have any method named find_and_activade_thread
  27. Hint: try 'rubinius::VM::find_and_activade_thread<TAB> or 'rubinius::VM::find_and_activade_thread<ESC-?>
  28. (Note leading single quote.)
  29. (gdb) b rubinius::VM::find_and_activate_thread
  30. Breakpoint 1 at 0x5a47e0: file vm/vm.cpp, line 219.
  31. (gdb) c
  32. Continuing.
  33.  
  34. Breakpoint 1, rubinius::VM::find_and_activate_thread (this=0x7fff15cf81d0) at vm/vm.cpp:219
  35. 219 bool VM::find_and_activate_thread() {
  36. (gdb) n
  37. 220 Tuple* scheduled = globals.scheduled_threads.get();
  38. (gdb) n
  39. 222 for(std::size_t i = scheduled->num_fields() - 1; i > 0; i--) {
  40. (gdb)
  41. 223 List* list = as<List>(scheduled->at(this, i));
  42. (gdb) p i
  43. $1 = 2
  44. (gdb) n
  45. 225 Thread* thread = try_as<Thread>(list->shift(this));
  46. (gdb)
  47. 227 while(thread) {
  48. (gdb)
  49. 222 for(std::size_t i = scheduled->num_fields() - 1; i > 0; i--) {
  50. (gdb)
  51. 223 List* list = as<List>(scheduled->at(this, i));
  52. (gdb)
  53. 225 Thread* thread = try_as<Thread>(list->shift(this));
  54. (gdb)
  55. 227 while(thread) {
  56. (gdb)
  57. 222 for(std::size_t i = scheduled->num_fields() - 1; i > 0; i--) {
  58. (gdb)
  59. 246 return false;
  60. (gdb) c
  61. Continuing.
Add Comment
Please, Sign In to add comment