How to get back stack trace from trace point? (Gdb)

According to these documents, it is not possible to get a complete back trace of a stack from a trace point, but you can get a partial trace by writing a section of the stack.

How should I do it?

+3
source share
2 answers

I approximated the behavior that I wanted, using the commands at the breakpoint, to print the return line, and then automatically continue:

> break functionName
> commands
> bt
> continue
> end
+5
source

-, gdb 13.1.10, , , backtrace , , - *(unsigned char *)$esp@300. , , : , (rsp x86-64) :

>collect *(unsigned char *)$esp@300
'esp' is a pseudo-register; GDB cannot yet trace its contents.
+1

Source: https://habr.com/ru/post/1791986/


All Articles