UNKNOWN
Project description
Install
You’ll need GDB compiled with python support, and the pdbinject package:
easy_install pdbinject
OS X Notes
The default GDB does not come compiled with Python support.
Homebrew fixes that:
brew install gdb
Usage
$ python example/loop.py &
Process running with PID 6319
$ sudo pdbinject 6319
Remote PDB has been configured on port 4444
nc 127.0.0.1 4444
$ nc 127.0.0.1 4444
--Return--
> /home/ubuntu/pdbinject/pdbinject/debugger.py(16)run()->None
-> debugger.set_trace()
Now have some fun:
from guppy import hpy hp = hpy() heap = hp.heap() heap.get_rp()
To print the stacktrace across all the threads:
import sys, traceback for thread_id, stack in sys._current_frames().iteritems(): print 'Thread id: %s\n%s' % (thread_id, ''.join(traceback.format_stack(stack)))
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pdbinject-0.2.0.tar.gz
(3.5 kB
view details)
File details
Details for the file pdbinject-0.2.0.tar.gz.
File metadata
- Download URL: pdbinject-0.2.0.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
857f06b1a5bda7b42379256d52a331a3b955d51dd7a9a73850a4b9b331ddf711
|
|
| MD5 |
0201efacd4c609d28a0779e253cc73c4
|
|
| BLAKE2b-256 |
9cba99e8f14f60f4f11ac8b18b0e2752ac93f8f3a8d13aff9a0b669bcb7721b3
|