Gdb

From wikinotes
Revision as of 22:36, 6 May 2018 by Will (talk | contribs) (→‎python)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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
bt

python/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 provided

Archlinux

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).