I am trying to set up a python script in gdb that steps through a program one line at a time and records the stack pointer at each step. I have been searching all over for some good online references for gdb-python scripting and have not been able to find any that are worthwhile.
A script example or a link to a good online reference for gdb-python scripting would be appreciated.
You can do this even from the gdb command line:
The Python version would look similar, something like: