Re:Debugging a Mixed Python and C Language Stack
by winter_blue on Tuesday April 25, 2023 @07:05PM
(#35707907)
Wow, that's pretty amazing. I wonder how it's implemented, and if there are any tutorials on implementing something similar, for programming language designers/creators.
[ Parent
| on HN ]
Re:Debugging a Mixed Python and C Language Stack
by bobbyi on Tuesday April 25, 2023 @08:28PM
(#35708433)
Theres also Py Spy, a profiling tool that can generate flame charts containing a mix of python and C (or C++) calls.
https://github.com/benfred/py-spy
It's worked really well for my needs
Re:Debugging a Mixed Python and C Language Stack
by misnome on Wednesday April 26, 2023 @05:18AM
(#35711220)
py-spy also makes it very easy to scrape from existing processes, which is invaluable if you are e.g. ever trying to diagnose a deadlock
Re:Debugging a Mixed Python and C Language Stack
by vmiklos on Wednesday April 26, 2023 @02:29AM
(#35710180)
I think it uses gdb's frame filter API: https://sourceware.org/gdb/onlinedocs/gdb/Writing-a-Frame-Fi...
Re:Debugging a Mixed Python and C Language Stack
by fmajid on Wednesday April 26, 2023 @10:32AM
(#35714229)
GDB itself is fully scriptable in Python:
https://sourceware.org/gdb/current/onlinedocs/gdb.html/Pytho...