Advertisement
Guest User

Untitled

a guest
Oct 22nd, 2016
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. ## Now with python3k support!
  2.  
  3.  
  4. $ python foo.py &
  5. [1] 21377
  6. $ gdb -p 21377
  7. GNU gdb (GDB) Fedora 7.7.1-17.fc20
  8. [... gdb loading messages ...]
  9. 0x00007f9a09af46e3 in __select_nocancel () at ../sysdeps/unix/syscall-template.S:81
  10. 81 T_PSEUDO (SYSCALL_SYMBOL, SYSCALL_NAME, SYSCALL_NARGS)
  11. (gdb) py-bt
  12. #4 Frame 0x22d9c70, for file foo.py, line 12, in forever ()
  13. sleep(1)
  14. #7 Frame 0x224f830, for file foo.py, line 14, in <module> ()
  15. forever()
  16. (gdb) py-print f
  17. global 'f' = <Foo(foo=1) at remote 0x7f9a0abba830>
  18. (gdb) py-print f.foo
  19. 'f.foo' not found
  20. (gdb) source pyfields.py
  21. (gdb) py-fields f.foo
  22. global 'foo' = 1
  23. (gdb) quit
  24. A debugging session is active.
  25.  
  26. Inferior 1 [process 21377] will be detached.
  27.  
  28. Quit anyway? (y or n) y
  29. Detaching from program: /usr/bin/python2.7, process 21377
  30. $ exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement