How does GDB get the function call stack
hilbert
swdtian@163.com
Tue Aug 16 10:16:40 GMT 2022
@Andrew Dinn
Now I totally understand. Thank you very much for your patience.
By the way, when a multithreaded program hits a breakpoint, GDB can use the command: thread ID
to switch between threads arbitrarily, and view the memory and other information of each thread.
This is also implemented using ptrace, right?
At 2022-08-16 17:33:07, "Andrew Dinn" <adinn@redhat.com> wrote:
>On 16/08/2022 10:19, hilbert via Gdb wrote:
>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
More information about the Gdb
mailing list