This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: gdb debugging python frames in optimised interpreters
Type: enhancement Stage:
Components: Demos and Tools Versions: Python 2.7
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: dmalcolm, mcobden
Priority: normal Keywords:

Created on 2013-03-27 14:32 by mcobden, last changed 2022-04-11 14:57 by admin.

Messages (2)
msg185337 - (view) Author: Marcus Cobden (mcobden) Date: 2013-03-27 14:32
I've made some tweaks to the libpython.py util functions to better pick up python frames when using a normal python interpreter.

It's not by any means perfect, but it works on my ubuntu-shipped python interpreter (with debugging symbols installed, but not running the debug interpreter).

It works by finding the top frame via the thread state struct, and then going up the frame stack, comparing the stack pointer to a stack pointer in the C context.

I'd appreciate some feedback/advice :)

https://gist.github.com/leth/5254239/revisions
msg192779 - (view) Author: Marcus Cobden (mcobden) Date: 2013-07-09 21:07
Is there anyone who could take a look at this? I'd rather it not bit-rot into oblivion.

I know the code quality is rather poor, but I can fix that.
History
Date User Action Args
2022-04-11 14:57:43adminsetgithub: 61758
2013-07-09 21:07:07mcobdensetmessages: + msg192779
2013-03-27 21:22:38r.david.murraysetnosy: + dmalcolm
2013-03-27 14:32:18mcobdencreate