From: Joel Brobecker <brobecker@adacore.com>
To: "Prasanna .S" <myprasanna@gmail.com>
Cc: gdb@sourceware.org
Subject: Re: Fwd: Decompiler program
Date: Thu, 06 Sep 2007 21:48:00 -0000 [thread overview]
Message-ID: <20070906213259.GD12977@adacore.com> (raw)
In-Reply-To: <1a47b9f10709061418h4b60ed07od05d07718e4809b5@mail.gmail.com>
> I've used gdb to step through binaries without debug info, but as far
> as i've known (or tried),
> it has a limitation that it cant step out of a proc that it doesnt
> have src (or debug info to).
If I understand you correctly ("step out" refering to the "finish"
command), then this is actually not true: GDB does not need debugging
info in order to do a finish.
> So i cant step into libraries (am i correct?)
Next/step operations are only relevant when you are in a location
where line number information is available. So in order to step
into a shared library, you'll need to step at the instruction level:
stepi, nexti.
> So all i want to know is a broad idea about the complexity involved in
> writing a decompiler using some of gcc's C libs, that can parse the
> ELF binary (i think i've seen a lib for this parsing part in gcc) and
> generate dis-assembly that can be traced freely. (Ofcourse the ELF
> binary has to assumed to contain no debug info).
You mean a disassembler? Have you looked at objdump --disassemble?
--
Joel
next prev parent reply other threads:[~2007-09-06 21:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1a47b9f10709061414m3344094m1f9da016cf1f765c@mail.gmail.com>
[not found] ` <1a47b9f10709061417t6a8778bboe741ecbe31c2b0eb@mail.gmail.com>
2007-09-06 21:33 ` Prasanna .S
2007-09-06 21:48 ` Joel Brobecker [this message]
[not found] ` <46E0732F.7060309@adacore.com>
2007-09-07 13:53 ` Prasanna .S
2007-09-10 15:49 ` Robert Norton
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=20070906213259.GD12977@adacore.com \
--to=brobecker@adacore.com \
--cc=gdb@sourceware.org \
--cc=myprasanna@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