This is the mail archive of the
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: <firstname.lastname@example.org> <email@example.com> <firstname.lastname@example.org>
> 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:
> 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?