Gdb: Difference between revisions
From wikinotes
(→python) |
No edit summary |
||
Line 1: | Line 1: | ||
= Tutorials = | |||
<blockquote> | |||
{| class="wikitable" | |||
|- | |||
| gdb in-depth tutorial || https://www.sourceware.org/gdb/current/onlinedocs/gdb.html | |||
|- | |||
|} | |||
</blockquote><!-- Tutorials --> | |||
= In other Languages = | = In other Languages = | ||
<blockquote> | <blockquote> | ||
Line 8: | Line 17: | ||
gdb python2 | gdb python2 | ||
run systems/core/myscript.py | run systems/core/myscript.py | ||
# when a segfault occurs, you can use the standard | # when a segfault occurs, you can use the standard | ||
# gdb options to display the full backtrace | # gdb options to display the full backtrace | ||
Line 18: | Line 27: | ||
<blockquote> | <blockquote> | ||
'''Debian'''<br> | '''Debian'''<br> | ||
Debian-based distros have a separate installable package for python/pyqt to be installed with the gdb debugging symbols. | Debian-based distros have a separate installable package for python/pyqt to be installed with the gdb debugging symbols. | ||
I made an entirely separate vagrant build based on ubuntu-server to gain access to this info. | I made an entirely separate vagrant build based on ubuntu-server to gain access to this info. | ||
Revision as of 00:41, 22 March 2022
Tutorials
gdb in-depth tutorial https://www.sourceware.org/gdb/current/onlinedocs/gdb.html
In other Languages
python
Usage
gdb python2 run systems/core/myscript.py # when a segfault occurs, you can use the standard # gdb options to display the full backtrace btpython/pyqt gdb extensions
Debian
Debian-based distros have a separate installable package for python/pyqt to be installed with the gdb debugging symbols. I made an entirely separate vagrant build based on ubuntu-server to gain access to this info.sudo apt install python-dbg python-pyqt5-dbg ## pyside-dbg no longer providedArchlinux
NOTE:
The author of qutebrowser manages his own repo with dbg builds of python and pyqt for archlinux. I have not tested them yet, and cannot find the link in my history
Archlinux does not provide a package for this, which means you'll need to compile both python and Qt with appropriate flags. I tried this, but was unsuccessful - (more specifically, I successfully compiled python, but make install replaced my builtin python, and broke my system).