From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5778 invoked by alias); 6 Sep 2007 21:33:05 -0000 Received: (qmail 5769 invoked by uid 22791); 6 Sep 2007 21:33:05 -0000 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 06 Sep 2007 21:33:01 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 139152AA487; Thu, 6 Sep 2007 17:33:00 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id rYGszXUhWzln; Thu, 6 Sep 2007 17:33:00 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id ECB5E2AA484; Thu, 6 Sep 2007 17:32:59 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id A8EFCE7B58; Thu, 6 Sep 2007 17:32:59 -0400 (EDT) Date: Thu, 06 Sep 2007 21:48:00 -0000 From: Joel Brobecker To: "Prasanna .S" Cc: gdb@sourceware.org Subject: Re: Fwd: Decompiler program Message-ID: <20070906213259.GD12977@adacore.com> References: <1a47b9f10709061414m3344094m1f9da016cf1f765c@mail.gmail.com> <1a47b9f10709061417t6a8778bboe741ecbe31c2b0eb@mail.gmail.com> <1a47b9f10709061418h4b60ed07od05d07718e4809b5@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1a47b9f10709061418h4b60ed07od05d07718e4809b5@mail.gmail.com> User-Agent: Mutt/1.4.2.2i Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2007-09/txt/msg00061.txt.bz2 > 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