GDB Stacktrace for optimized code!
Thamil K via Gdb <[email protected]>
| Newsgroups | gmane.comp.gdb.devel |
|---|---|
| Message-ID | <CAOUPoJ1zoPjfxaCb_JYvOEz96xyFGcVRCshVQQh1e5ugY0md4w@mail.gmail.com> |
Hi Geeks, For programs compiled with -O2, where the compiler uses 'jmp' where possible instead of 'call' or where callee doesn't push $rbp onto the stack, gdb is still able to generate stack trace properly. But by inspecting the $rbp and return address, I am unable to trace back the calls. I would like to know how gdb synthesises the stack trace ? Any pointers on documentation? Thanks in advance. Thanks Thamil