[![License: GPL v3](https://img.shields.io/github/license/MarcoBalossini/gdbPy)](https://www.gnu.org/licenses/gpl-3.0)
[![made-with-python](https://img.shields.io/badge/Made%20with-Python-1f425f.svg)](https://www.python.org/)
[![Downloads](https://static.pepy.tech/badge/gdbpy)](https://pepy.tech/project/gdbpy)
# gdbPy
Not so many people are skilled in the dark arts of gdb scripting... and I'm not one of those!
gdbPy is an attempt to help all this people to write a higher level gdb scripts.<br>
gdbPy relies on GNU Python APIs for gdb to do the work, but without the need of installing gdb module on python ([more on this matter](#gdb-module-for-python))<br>
## Installation
The project is on Pypi. Install with:
```
python3 -m pip install gdbPy
```
## GDB module for Python
The major dependency (and major problem) of gdbPy is gdb module for Python: it cannot be easily installed as a normal module but, as far as I know, there's only one online [guide](http://tromey.com/blog/?p=494) (written in 2008 and never updated) to install it.<br>
In short gdb it's not a Python library, and its import will work only if it's running within the gdb process.
Fortunately gdb embeds python interpreter, so we can rerun the scripts importing gdbPy like
```
gdb -q -x script.py
```
Don't worry, gdbPy will do it for you!
## Doc
[Here](./docs/)
## Examples
```python
from gdbPy import *
set_file("exFile")
# Breakpoints
set_breakpoint("main+42")
set_breakpoint(0xdeadbeef)
set_breakpoint("*0xdeadbeef")
# Start execution
start()/run()
# Debugging actions
next_instruction()/next_instruction(repeat=2)
step_in()
countinue_exec()
# Can't find the command you need?
res = execute("command")
# Now quit gdb
quit()
```
Raw data
{
"_id": null,
"home_page": "https://github.com/MarcoBalossini/gdbPy",
"name": "gdbPy",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "gdb,debugging",
"author": "Marco Balossini",
"author_email": "",
"download_url": "https://files.pythonhosted.org/packages/1b/74/053bde0b6663030cc661432e9f1ee0d67ea68a0fa0ca3fdd9082e755f04d/gdbPy-0.1.2.tar.gz",
"platform": null,
"description": "[![License: GPL v3](https://img.shields.io/github/license/MarcoBalossini/gdbPy)](https://www.gnu.org/licenses/gpl-3.0)\n[![made-with-python](https://img.shields.io/badge/Made%20with-Python-1f425f.svg)](https://www.python.org/)\n[![Downloads](https://static.pepy.tech/badge/gdbpy)](https://pepy.tech/project/gdbpy)\n\n# gdbPy\nNot so many people are skilled in the dark arts of gdb scripting... and I'm not one of those!\ngdbPy is an attempt to help all this people to write a higher level gdb scripts.<br>\ngdbPy relies on GNU Python APIs for gdb to do the work, but without the need of installing gdb module on python ([more on this matter](#gdb-module-for-python))<br>\n\n## Installation\nThe project is on Pypi. Install with:\n```\npython3 -m pip install gdbPy\n```\n\n## GDB module for Python\nThe major dependency (and major problem) of gdbPy is gdb module for Python: it cannot be easily installed as a normal module but, as far as I know, there's only one online [guide](http://tromey.com/blog/?p=494) (written in 2008 and never updated) to install it.<br>\nIn short gdb it's not a Python library, and its import will work only if it's running within the gdb process.\nFortunately gdb embeds python interpreter, so we can rerun the scripts importing gdbPy like \n```\ngdb -q -x script.py\n```\nDon't worry, gdbPy will do it for you!\n\n## Doc\n[Here](./docs/)\n\n## Examples\n```python\nfrom gdbPy import *\n\nset_file(\"exFile\")\n\n# Breakpoints\nset_breakpoint(\"main+42\")\nset_breakpoint(0xdeadbeef)\nset_breakpoint(\"*0xdeadbeef\")\n\n# Start execution\nstart()/run()\n\n# Debugging actions\nnext_instruction()/next_instruction(repeat=2)\nstep_in()\ncountinue_exec()\n\n# Can't find the command you need?\nres = execute(\"command\")\n\n# Now quit gdb\nquit()\n```\n\n",
"bugtrack_url": null,
"license": "GPL",
"summary": "gdb scripts in Python",
"version": "0.1.2",
"split_keywords": [
"gdb",
"debugging"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "2c41cab0c3193abafbf8cb15cb79e938b4f6c523115016ba88ac6d71873751ca",
"md5": "fc931e1a18506e8dde357a25087ff8fc",
"sha256": "9db08c274950eb43f169e1b16b3ed5b2731d9f02fecf7d830ea8ffcf42714fc5"
},
"downloads": -1,
"filename": "gdbPy-0.1.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "fc931e1a18506e8dde357a25087ff8fc",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 22077,
"upload_time": "2023-01-12T16:02:30",
"upload_time_iso_8601": "2023-01-12T16:02:30.435554Z",
"url": "https://files.pythonhosted.org/packages/2c/41/cab0c3193abafbf8cb15cb79e938b4f6c523115016ba88ac6d71873751ca/gdbPy-0.1.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "1b74053bde0b6663030cc661432e9f1ee0d67ea68a0fa0ca3fdd9082e755f04d",
"md5": "eada52dc149220db665c76d07cb9ba85",
"sha256": "25158172accfd4eba0061ba368ac63d4244a8aeb4d3c7909b7822beeefe5cd62"
},
"downloads": -1,
"filename": "gdbPy-0.1.2.tar.gz",
"has_sig": false,
"md5_digest": "eada52dc149220db665c76d07cb9ba85",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 21846,
"upload_time": "2023-01-12T16:02:32",
"upload_time_iso_8601": "2023-01-12T16:02:32.136986Z",
"url": "https://files.pythonhosted.org/packages/1b/74/053bde0b6663030cc661432e9f1ee0d67ea68a0fa0ca3fdd9082e755f04d/gdbPy-0.1.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-01-12 16:02:32",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "MarcoBalossini",
"github_project": "gdbPy",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "gdbpy"
}