public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Martin v. Loewis" <martin@loewis.home.cs.tu-berlin.de>
To: pec@counsellor.com
Cc: help-gcc@gnu.org
Subject: Re: Comparing binaries in Source Code space
Date: Sat, 01 Apr 2000 02:39:00 -0000	[thread overview]
Message-ID: <200004011033.MAA09487@loewis.home.cs.tu-berlin.de> (raw)
In-Reply-To: <381827635.954514321065.JavaMail.root@web32.pub01>

> GDB  does not seem to be enough. How can you relate the byte offset within a
> binary to the actual code location?

I don't know a simple procedure, but the following might work:

1. Use objdump -h to determine the file offsets of each section.
2. Check whether it really is in a code section. If not, you may need
   to reconsider your analysis so far.
3. Translate the file offset to a VMA offset.
4. Use objdump --disassemble to display all code sections in
   disassembly, and look for the VMA offset.

Hope this helps,
Martin

      parent reply	other threads:[~2000-04-01  2:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-03-31  6:52 P Costello
2000-04-01  0:00 ` P Costello
2000-04-01  2:39 ` Martin v. Loewis [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=200004011033.MAA09487@loewis.home.cs.tu-berlin.de \
    --to=martin@loewis.home.cs.tu-berlin.de \
    --cc=help-gcc@gnu.org \
    --cc=pec@counsellor.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).