Reputation: 1810
I'm writing a GDB script to walk the stack and inspect certain local variables only if the function running at that stack level is a specific one. How can I programatically check which function is running at each level? "backtrace" shows what I want. I just need it in a variable.
Upvotes: 2
Views: 296
Reputation: 213955
You can do what you want in GDB 7.3, which has Python scripting and exposed stack frame info to the Python interpreter.
Upvotes: 1