How do I make gdb print functions of interest as they are called, indented according to how deep in the stack they are?
I want to be able to say something like (made
You may call gdb in batch mode (using -x option), break where you need and ask for backtrace (bt), then you filter the result using grep or egrep.
Indents are more difficult, however bt output is ordered so you have current function at the top of the trace and main at very bottom.
So you create file with commands:
br
run
bt
kill
quit
then run gdb
Filter strings that starts with # - you get stack trace.