Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: Nate Eldredge <neldredge@math.ucsd.edu>
Cc: gdb@sourceware.org
Subject: Re: Add to symbol table for reverse engineering?
Date: Thu, 19 Jul 2007 05:26:00 -0000	[thread overview]
Message-ID: <20070719031008.GB13744@caradoc.them.org> (raw)
In-Reply-To: <Pine.GSO.4.64.0707181341040.15725@zeno.ucsd.edu>

On Wed, Jul 18, 2007 at 02:56:39PM -0700, Nate Eldredge wrote:
> I am trying to reverse engineer a stripped binary using gdb.  I wonder if there 
> is a way to interactively add symbols as I go.  For example, suppose I discover 
> that 0xdeadbeef is the address of a function that does "foo". Presumably the 
> binary originally had an entry "foo = 0xdeadbeef" in its symbol table, which is 
> now gone.  I would like to be able to "put it back" and use it with gdb's 
> convenient symbol features.  For instance, if I come across a "call 0xdeadbeef" 
> instruction elsewhere in the program, I would like the gdb disassembler to tag 
> it as "call 0xdeadbeef <foo>".  Is there any way to do this?  I didn't see such 
> a thing in the manual.

Not using GDB.  But you can probably do it with objcopy on the binary.

-- 
Daniel Jacobowitz
CodeSourcery


      reply	other threads:[~2007-07-19  3:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-19  3:09 Nate Eldredge
2007-07-19  5:26 ` Daniel Jacobowitz [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=20070719031008.GB13744@caradoc.them.org \
    --to=drow@false.org \
    --cc=gdb@sourceware.org \
    --cc=neldredge@math.ucsd.edu \
    /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