This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Fwd: Decompiler program
- From: Joel Brobecker <brobecker at adacore dot com>
- To: "Prasanna .S" <myprasanna at gmail dot com>
- Cc: gdb at sourceware dot org
- Date: Thu, 6 Sep 2007 17:32:59 -0400
- Subject: Re: Fwd: Decompiler program
- References: <1a47b9f10709061414m3344094m1f9da016cf1f765c@mail.gmail.com> <1a47b9f10709061417t6a8778bboe741ecbe31c2b0eb@mail.gmail.com> <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