public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* GDB Stacktrace for optimized code!
@ 2021-04-20  5:55 Thamil K
  2021-04-20 10:54 ` Hannes Domani
  0 siblings, 1 reply; 2+ messages in thread
From: Thamil K @ 2021-04-20  5:55 UTC (permalink / raw)
  To: gdb

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-04-20 10:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-20  5:55 GDB Stacktrace for optimized code! Thamil K
2021-04-20 10:54 ` Hannes Domani

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).