I am trying to use gdb on a program in python, but it doesn't seem to work the same way it does with programs in c. I tried looking at a few links here: https://sourceware.org/gdb/onlinedocs/gdb/Breakpoints-In-Python.html https://wiki.python.org/moin/DebuggingWithGdb https://stackoverflow.com/questions/7412708/debugging-stepping-through-python-script-using-gdb
but I still don't really understand how to set breakpoints although I think I know now how to get gdb started with for example
$ gdb python
and run it with
$ (gdb) run mario.py
both seem to work, but I still haven't been able to figure out how to set breakpoints at a specific line or breakpoints in general. Also are other commands the same like p for print and info locals?
When I try using debug50 I get this error:
debug50 mario.py readelf: Error: Not an ELF file - it has the wrong magic bytes at the start Can't debug this program! Are you sure you compiled it with -ggdb?
What am I doing wrong?