Mansour
Mansour

Reputation: 1810

GDB scripting: check which function is running

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

Answers (1)

Employed Russian
Employed Russian

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

Related Questions