From: "Marten Ringwelski" <git@maringuu.de>
To: <gdb@sourceware.org>
Subject: [Question] Is there a way to specify an offset to the loaded symbols?
Date: Thu, 29 Oct 2020 09:13:58 +0100 [thread overview]
Message-ID: <C6P83HUYSLQG.1C4V3A4P7XZDD@marten-xps> (raw)
Hello,
for some reason that is not important here I need to debug a binary that is executed by calling the linker manually.
In my case I do `/lib/ld-musl-x86_64.so.1 binary`.
The problem with this is that gdb now obviously thinks that I want to debug `/lib/ld-musl-x86_64.so.1`. This is not the case.
Loading the symbols from `binary` does not help since the the linker loads the process into memory and the jumps to its main.
In other words I have the symbols for the binary to be debugged but the binary is loaded into memory with an offset so the symbols are offseted.
Is there any way to get this working?
Thank you!
Marten Ringwelski
next reply other threads:[~2020-10-29 8:23 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-29 8:13 Marten Ringwelski [this message]
2020-10-29 12:29 ` Christian Biesinger
2020-10-29 15:26 ` Marten Ringwelski
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=C6P83HUYSLQG.1C4V3A4P7XZDD@marten-xps \
--to=git@maringuu.de \
--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).