How does GDB get the function call stack

hilbert swdtian@163.com
Tue Aug 16 09:19:16 GMT 2022


 @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?








At 2022-08-16 15:56:52, "Luis Machado" <luis.machado@arm.com> wrote:
>On 8/16/22 08:43, hilbert via Gdb wrote:
>> Hi ,
>> There are 4 ways to get the function call stack in the GDB Internals Manual.   https://sourceware.org/gdb/papers/unwind.html
>> For x86_64, does GDB get information by parsing the .eh_frame section? Or just get the call stack by Parse the function prologues.
>> 
>> 
>> 
>
>I'd say mostly 1 and 2. 1 is usually used with functions without debug information. 2 is used when there is debug information.


More information about the Gdb mailing list