From: Andrew Dinn <adinn@redhat.com>
To: hilbert <swdtian@163.com>, Luis Machado <luis.machado@arm.com>
Cc: gdb@sourceware.org
Subject: Re: How does GDB get the function call stack
Date: Tue, 16 Aug 2022 10:33:07 +0100 [thread overview]
Message-ID: <2271bb26-4534-44ce-b7e4-551343ffa871@redhat.com> (raw)
In-Reply-To: <5c30085e.8da0.182a5f3377d.Coremail.swdtian@163.com>
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
next prev parent reply other threads:[~2022-08-16 9:33 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-16 7:43 hilbert
2022-08-16 7:56 ` Luis Machado
2022-08-16 9:19 ` hilbert
2022-08-16 9:33 ` Andrew Dinn [this message]
2022-08-16 10:16 ` hilbert
2022-08-16 12:48 ` Andrew Dinn
2022-08-16 13:18 ` hilbert
2022-08-16 13:27 ` Luis Machado
2022-08-16 13:46 ` hilbert
2022-08-18 14:05 ` Andrew Burgess
2022-08-19 1:57 ` hilbert
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2271bb26-4534-44ce-b7e4-551343ffa871@redhat.com \
--to=adinn@redhat.com \
--cc=gdb@sourceware.org \
--cc=luis.machado@arm.com \
--cc=swdtian@163.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).