From: hilbert <swdtian@163.com>
To: "Andrew Burgess" <aburgess@redhat.com>
Cc: gdb@sourceware.org
Subject: Re:Re: How does GDB get the function call stack
Date: Fri, 19 Aug 2022 09:57:38 +0800 (CST) [thread overview]
Message-ID: <4d6caba.1e55.182b3d1f6d3.Coremail.swdtian@163.com> (raw)
In-Reply-To: <87r11dabqb.fsf@redhat.com>
For me, totally understand this.
It's unbelievable how knowledgeable you specialists are.
Thank you very much.
At 2022-08-18 22:05:16, "Andrew Burgess" <aburgess@redhat.com> wrote:
>Luis Machado via Gdb <gdb@sourceware.org> writes:
>
>> 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.
>
>To expand on this a little, at least for version of GCC I'm using on
>x86-64, the .eh_frame data replaces the .debug_frame data, so #2 and #3
>are effectively merged.
>
>The two "issues" raised against .eh_frame don't make sense to me. As
>I understand it the .eh_frame encoding is roughly the same as the
>.debug_frame encoding, so I don't think there's much space saving, and
>GDB reads the .eh_frame information from the ELF, so the read-only
>concern seems like a non-issue.
>
>Thanks,
>Andrew
prev parent reply other threads:[~2022-08-19 1:57 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
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 [this message]
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=4d6caba.1e55.182b3d1f6d3.Coremail.swdtian@163.com \
--to=swdtian@163.com \
--cc=aburgess@redhat.com \
--cc=gdb@sourceware.org \
/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).