From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13914 invoked by alias); 2 Dec 2004 14:10:55 -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 13748 invoked from network); 2 Dec 2004 14:10:30 -0000 Received: from unknown (HELO baradas.org) (66.166.225.55) by sourceware.org with SMTP; 2 Dec 2004 14:10:30 -0000 Received: by baradas.org (Postfix, from userid 500) id D5DDD9842C; Thu, 2 Dec 2004 09:10:29 -0500 (EST) From: Peter Barada To: tarun@acmet.com Cc: gdb@sources.redhat.com, acmet@vsnl.net, ranjeeta@acmet.com, rm_nair@acmet.com In-reply-to: <000e01c4d84f$dba18c30$a100a8c0@u8test4> (tarun@acmet.com) Subject: Re: Query regarding assembly level debugging support References: <000e01c4d84f$dba18c30$a100a8c0@u8test4> Message-Id: <20041202141029.D5DDD9842C@baradas.org> Date: Thu, 02 Dec 2004 14:10:00 -0000 X-SW-Source: 2004-12/txt/msg00012.txt.bz2 > The linked out file is loaded without errors on GDB. When we run >the respective out file on GDB, the control of debugger moves to label >main in the assembly code ( Breakpoint 1, 0xa00200ec in main ()). When I >try to move to next instruction using "nexti", the control moves to next >address (Displaying: 0xa00200f0 in main ()). This continues till the >last address is reached. Only the address increments within the assembly >file are displayed and not the actual assembly source. > > When I try to single step using "step", the message prompted is >"Single stepping until exit from function main, which has no line number >information". Whereas if I disassemble one of the addresses give above, >entire assembly code which I am trying to debug is displayed. > > Does this mean that GDB does not support debugging of the assembly >code? Peope have been using GDB to debug assembler code for years. A couple of tricks: 1) Use stepi/nexti commands to step or next one *instruction* as opposed to source line 2) Use the 'disp/i $pc' to have GDB display the assembler instruction that will be executed next. 3) Use 'i reg' to dump the registers, or 'p $reg' where 'reg' is the register name. -- Peter Barada peter@the-baradas.com