From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31792 invoked by alias); 6 Aug 2007 19:16:51 -0000 Received: (qmail 31729 invoked by uid 22791); 6 Aug 2007 19:16:50 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 06 Aug 2007 19:16:46 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 15A64982C5; Mon, 6 Aug 2007 19:16:46 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id C6833982AD; Mon, 6 Aug 2007 19:16:45 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.67) (envelope-from ) id 1II84J-0005V6-BR; Mon, 06 Aug 2007 15:16:43 -0400 Date: Mon, 06 Aug 2007 19:16:00 -0000 From: Daniel Jacobowitz To: Dave Korn Cc: 'Fahd Abidi' , gdb@sourceware.org Subject: Re: trying to use gdb to disassemble a binary file Message-ID: <20070806191643.GA20629@caradoc.them.org> Mail-Followup-To: Dave Korn , 'Fahd Abidi' , gdb@sourceware.org References: <071DB0C788671B48940BC79F8B49306918A858@ultsol01.tewks.ultsol.local> <009801c7d85b$816f7f60$2e08a8c0@CAM.ARTIMI.COM> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <009801c7d85b$816f7f60$2e08a8c0@CAM.ARTIMI.COM> User-Agent: Mutt/1.5.15 (2007-04-09) X-IsSubscribed: yes 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-08/txt/msg00062.txt.bz2 On Mon, Aug 06, 2007 at 07:56:32PM +0100, Dave Korn wrote: > On 06 August 2007 19:45, Fahd Abidi wrote: > > > Hello, > > > > I am trying to use GDB to disassemble a binary file. I have no problems > > when gdb connects to a target board (running a PC440) and viewing the > > disassembly via the display command, (gdb)x /10i$0xfffff000. But GDB > > does will not recognize or open a binary file format. It might not be > > the right tool to use, I really just want to open a binary file in gdb > > and view the disassembly. Is that possible? > > Not easily, although it would work if you could get the file's contents > loaded into memory. > > Probably your best bet is to use "objdump -D --target=binary > --architecture= filename" Alternatively, use objcopy to convert the file into an ELF image. -- Daniel Jacobowitz CodeSourcery