Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Bogdan Harjoc <harjoc@gmail.com>
Cc: gdb@sourceware.org
Subject: Re: Adding a missing NT_FILES note to a core file so gdb can load solibs for it
Date: Mon, 25 Jan 2016 14:22:00 -0000	[thread overview]
Message-ID: <20160125142226.GA5665@host1.jankratochvil.net> (raw)
In-Reply-To: <CAF4+tmrNC8WbrECU8jqx8cS3k_BE9kbvphc=4LYWs6WX5m_PUg@mail.gmail.com>

On Mon, 25 Jan 2016 15:06:05 +0100, Bogdan Harjoc wrote:
> So I'd like to ask whether this has any chance of working.

No.  GDB does not support NT_FILE reading.  GDB follows DT_DEBUG:
	readelf -d execbinary|grep -w DEBUG

Besides that it would not be completely correct, depending on the point of
view.  mmap()ped shared library will be present in NT_FILE but GDB will not
shows it as it was not dlopen()ed (either by a call or via DT_NEEDED).

When GDB cannot read shared libraries it usually means your executable does
not exactly match the one that was core dumped.  To make them matching one
should match build-id from the core file with that of the executable:
	eu-unstrip -n --core=corefile
	readelf -n execbinary|grep -A1 NT_GNU_BUILD_ID
IIRC ld-linux.so also needs to match, I cannot remember why now.


Jan


  reply	other threads:[~2016-01-25 14:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-25 14:06 Bogdan Harjoc
2016-01-25 14:22 ` Jan Kratochvil [this message]
2016-01-25 15:56   ` Bogdan Harjoc
2016-01-25 16:01     ` Jan Kratochvil

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=20160125142226.GA5665@host1.jankratochvil.net \
    --to=jan.kratochvil@redhat.com \
    --cc=gdb@sourceware.org \
    --cc=harjoc@gmail.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