Re: How does GDB get the function call stack
Andrew Dinn via Gdb <[email protected]>
| Newsgroups | gmane.comp.gdb.devel |
|---|---|
| Message-ID | <[email protected]> |
On 16/08/2022 10:19, hilbert via Gdb wrote:
> @Luis Machado
> Thank you very much .
> What does the sentence “functions without debug information”mean? Does it refer to the call stack information from the rpb register?
> If there is no debug information, the call stack can be obtained. Why does gdb still need DWARF2 unwind information?
When it says without debug information I believe that means without
DWARF info. This info is located either in .debug_xxx sections embedded
in the binary or, alternatively, supplied in a separate dwinfo/dwz file
that is tied to the binary (e.g. by search path and file name or by a
build id).
DWARF .debug_frame info can specify a lot more than how to do a stack
unwind. So, while the other methods enable this specific operation they
do not enable many other useful actions that gdb might need to establish
frame context and which DWARF info may enable. For full details see the
DWARF standard(s).
regards,
Andrew Dinn
-----------
Red Hat Distinguished Engineer
Red Hat UK Ltd
Registered in England and Wales under Company Registration No. 03798903
Directors: Michael Cunningham, Michael ("Mike") O'Neill