This is the mail archive of the
mailing list for the GDB project.
Re: question about why gdb needs executable's binary
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 <email@example.com>:
>> On Mär 13 2019, Jirka Koutný <firstname.lastname@example.org> wrote:
>>> If we assume debugging a core file generated by an excutable with
>>> 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
>> A core file only contains data from modified mappings. Any data from
>> read-only mappings needs to be read from the original files.
>> Andreas Schwab, SUSE Labs, email@example.com
>> GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
>> "And now for something completely different."