From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15805 invoked by alias); 8 Dec 2004 13:57:34 -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 15736 invoked from network); 8 Dec 2004 13:57:26 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sourceware.org with SMTP; 8 Dec 2004 13:57:26 -0000 Received: from drow by nevyn.them.org with local (Exim 4.34 #1 (Debian)) id 1Cc2JU-0004HC-K8; Wed, 08 Dec 2004 08:57:04 -0500 Date: Wed, 08 Dec 2004 13:57:00 -0000 From: Daniel Jacobowitz To: Tarun Cc: 'Peter Barada' , gdb@sources.redhat.com, acmet@vsnl.net, ranjeeta@acmet.com, rm_nair@acmet.com Subject: Re: Query regarding assembly level debugging support Message-ID: <20041208135704.GA16388@nevyn.them.org> Mail-Followup-To: Tarun , 'Peter Barada' , gdb@sources.redhat.com, acmet@vsnl.net, ranjeeta@acmet.com, rm_nair@acmet.com References: <20041202141029.D5DDD9842C@baradas.org> <000a01c4dcf3$d9bf19c0$a100a8c0@u8test4> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <000a01c4dcf3$d9bf19c0$a100a8c0@u8test4> User-Agent: Mutt/1.5.5.1+cvs20040105i X-SW-Source: 2004-12/txt/msg00053.txt.bz2 On Wed, Dec 08, 2004 at 12:32:12PM +0530, Tarun wrote: > Thanks for the information. But my query still remains "Can we step > through assembly code?" > I know GDB supports assembly-level debugging but that refers to inline > assembly. To make the point clear, please look at snip below. For the > sample code segment: > > /* Print the top of the stack if no index is specified. */ > if (which < 0) > { > which = stack->top - 1; > if (which < 0) > > > The inline assembly is (assume) represented as: > > /* Print the top of the stack if no index is specified. */ > if (which < 0) > .frame $fp,16,$31 <- > .mask 0x40000000,-8 <- > .fmask 0x00000000,0 <- > subu $sp,$sp,16 <- > { > which = stack->top - 1; > li $2,20 <- > sw $2,0($fp) <- > if (which < 0) > > > > Does GDB refer to stepping through the above code as assembly-level > debugging? No. > If yes, then my requirement is little different. I want to debug the > assembly code itself keeping it as the source code (and not the C > source). To be more specific I want to debug hand written assembly code > (and not the one generated by compiler) Please see my earlier response: Are you saying that your source code is assembly, and your assembler creates debug information for it? This should work in GDB; make sure that the .debug_line information is correct. -- Daniel Jacobowitz