From: John Baldwin <jhb@FreeBSD.org>
To: "Jirka Koutný" <koutnji2@gmail.com>, "Andreas Schwab" <schwab@suse.de>
Cc: gdb@gnu.org
Subject: Re: question about why gdb needs executable's binary
Date: Wed, 13 Mar 2019 16:22:00 -0000 [thread overview]
Message-ID: <0272e0ae-2269-bd36-f4b3-110eeaa2d2c3@FreeBSD.org> (raw)
In-Reply-To: <CAH5nFm-g4wJXVAC32a1edn-oL_7YcUp3ELTDQ0hzLw74hii4Gg@mail.gmail.com>
On 3/13/19 8:41 AM, Jirka Koutný wrote:
> Thanks Andreas! Aha that's interesting.. hmm so, is there some read-only
> segment, that would contain information necessary for the output of 'where'?
The .text section containing the instructions being executed is often needed
for unwinding if there is no debug info. On some architectures with a fixed
frame layout like 32-bit x86 you can get by without decoding instructions, but
on other architectures like 64-bit x86, an unwinder has to try to decode
instructions to determine frame layouts in the absence of debug info.
> Den ons. 13. mar. 2019 kl. 14:34 skrev Andreas Schwab <schwab@suse.de>:
>
>> On Mär 13 2019, Jirka Koutný <koutnji2@gmail.com> wrote:
>>
>>> If we assume debugging a core file generated by an excutable with
>> stripped
>>> symbols (that gdb is able to find and load correctly in my case),
>>> I was wondering why does gdb still need the executable's binary as
>>> well?
>>
>> A core file only contains data from modified mappings. Any data from
>> read-only mappings needs to be read from the original files.
>>
>> Andreas.
>>
>> --
>> Andreas Schwab, SUSE Labs, schwab@suse.de
>> GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
>> "And now for something completely different."
>>
--
John Baldwin
next prev parent reply other threads:[~2019-03-13 16:22 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-13 14:25 Jirka Koutný
2019-03-13 14:34 ` Andreas Schwab
2019-03-13 15:41 ` Jirka Koutný
2019-03-13 16:22 ` John Baldwin [this message]
2019-03-14 21:51 ` Jan Kratochvil
2019-03-19 14:25 ` Jirka Koutný
2019-03-19 14:35 ` Jan Kratochvil
2019-03-19 15:25 ` Jirka Koutný
2019-03-19 15:42 ` Jan Kratochvil
2019-03-19 15:47 ` Jirka Koutný
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=0272e0ae-2269-bd36-f4b3-110eeaa2d2c3@FreeBSD.org \
--to=jhb@freebsd.org \
--cc=gdb@gnu.org \
--cc=koutnji2@gmail.com \
--cc=schwab@suse.de \
/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