From: "Jirka Koutný" <koutnji2@gmail.com>
To: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: gdb@gnu.org
Subject: Re: question about why gdb needs executable's binary
Date: Tue, 19 Mar 2019 15:47:00 -0000 [thread overview]
Message-ID: <CAH5nFm8eK0uOWtgm2rvpeHBSVN6f_PqW2Wd98RGaUuKR6evMxA@mail.gmail.com> (raw)
In-Reply-To: <20190319154144.GA3509809@host1.jankratochvil.net>
Aha, perfect, now it makes sense, thank you very much for your patience :)
Den tir. 19. mar. 2019 kl. 15:41 skrev Jan Kratochvil <
jan.kratochvil@redhat.com>:
> On Tue, 19 Mar 2019 16:25:30 +0100, Jirka Koutný wrote:
> > I see, just to make sure - DT_DEBUG gets dumped into the corefile, is
> that
> > correct?
>
> The PT_DYNAMIC segment containing the DT_DEBUG pointer (pointing to
> r_debug/_r_debug) normally gets dumped into the core file. The problem is
> that
> without having the main executable one cannot much find where is the
> DT_DEBUG
> pointer located in the core file. Core file has for example NT_AUXV where
> is
> AT_PHDR and from program headers one could find PT_DYNAMIC where is
> DT_DEBUG.
> But core file does not have to contain the program headers as those may be
> in
> a read-only page of the main executable. Nowadays with dumping of the first
> page of any ELF (even if it is read-only, for its NT_GNU_BUILD_ID) one can
> probably find the program headers there. But then one can also just read
> NT_FILE nowadays.
>
>
> Jan
>
prev parent reply other threads:[~2019-03-19 15:47 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
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ý [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=CAH5nFm8eK0uOWtgm2rvpeHBSVN6f_PqW2Wd98RGaUuKR6evMxA@mail.gmail.com \
--to=koutnji2@gmail.com \
--cc=gdb@gnu.org \
--cc=jan.kratochvil@redhat.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