Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## Now with python3k support!
- $ python foo.py &
- [1] 21377
- $ gdb -p 21377
- GNU gdb (GDB) Fedora 7.7.1-17.fc20
- [... gdb loading messages ...]
- 0x00007f9a09af46e3 in __select_nocancel () at ../sysdeps/unix/syscall-template.S:81
- 81 T_PSEUDO (SYSCALL_SYMBOL, SYSCALL_NAME, SYSCALL_NARGS)
- (gdb) py-bt
- #4 Frame 0x22d9c70, for file foo.py, line 12, in forever ()
- sleep(1)
- #7 Frame 0x224f830, for file foo.py, line 14, in <module> ()
- forever()
- (gdb) py-print f
- global 'f' = <Foo(foo=1) at remote 0x7f9a0abba830>
- (gdb) py-print f.foo
- 'f.foo' not found
- (gdb) source pyfields.py
- (gdb) py-fields f.foo
- global 'foo' = 1
- (gdb) quit
- A debugging session is active.
- Inferior 1 [process 21377] will be detached.
- Quit anyway? (y or n) y
- Detaching from program: /usr/bin/python2.7, process 21377
- $ exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement