From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4370 invoked by alias); 6 Aug 2002 13:28:22 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 4317 invoked from network); 6 Aug 2002 13:28:21 -0000 Received: from unknown (HELO systemhalted) (24.112.140.233) by sources.redhat.com with SMTP; 6 Aug 2002 13:28:21 -0000 Received: from carlos by systemhalted with local (Exim 3.35 #1 (Debian)) id 17c4MV-0005Jv-00; Tue, 06 Aug 2002 09:26:59 -0400 Date: Tue, 06 Aug 2002 06:28:00 -0000 From: Carlos O'Donell To: Vinayak P Risbud Cc: gdb Subject: Re: assembly editing in GDB Message-ID: <20020806132659.GA14779@systemhalted> References: <3D4F6B35.A5D0AA07@multitech.co.in> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3D4F6B35.A5D0AA07@multitech.co.in> User-Agent: Mutt/1.4i X-Useless-Header: oooohhmmm, chant the email mantra... X-SW-Source: 2002-08/txt/msg00029.txt.bz2 On Tue, Aug 06, 2002 at 11:52:46AM +0530, Vinayak P Risbud wrote: > Can I run and debug, an assembly program in GDB ? > If yes, how can I edit and write the assembly program > in GDB ? GDB is a debugger not an editor :} Assembly programs can definately be debug'd in gdb. Just start it up as you would with any other program, and start putting break points at addresses instead of source lines. # gdb hello > break main > r ... > disassemble And if you want to _edit_ it while running you need to use 'set write on' (before loading) and then 'file hello'. Check out all the variations of break, since you will have to feed it addresses for code that doesn't have debug info. I really really really recommend reading all the material at: http://sources.redhat.com/gdb/documentation/ c.