From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4208 invoked by alias); 6 Nov 2007 14:02:11 -0000 Received: (qmail 4195 invoked by uid 22791); 6 Nov 2007 14:02:10 -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; Tue, 06 Nov 2007 14:02:07 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 6E27698353; Tue, 6 Nov 2007 14:02:05 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id 22ED69830E; Tue, 6 Nov 2007 14:02:04 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.68) (envelope-from ) id 1IpP0F-0006uQ-QK; Tue, 06 Nov 2007 09:02:03 -0500 Date: Tue, 06 Nov 2007 14:02:00 -0000 From: Daniel Jacobowitz To: Yi Tang Cc: gdb@sourceware.org Subject: Re: asm debug problem Message-ID: <20071106140203.GA26543@caradoc.them.org> Mail-Followup-To: Yi Tang , gdb@sourceware.org References: <002001c8207b$c84042e0$82406682@itee.uq.edu.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <002001c8207b$c84042e0$82406682@itee.uq.edu.au> 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-11/txt/msg00038.txt.bz2 On Tue, Nov 06, 2007 at 11:48:59PM +1000, Yi Tang wrote: > Hello maintainer, > > I have got some trouble using gdb for my source code. > > My code, written in asm and compiled by gcc, should be attached to an rtos > library (ecos) to perform some test. I found it is not possible to debug the > assemble source code. My assemble code, to build the function > (usr_interrupt_vsr()), is in a separate file called uivsr.S. And it is linked > to the OS through a head file. However, when I run the gdb, it goes to some > other file in OS kernel, the clock.cxx (also wrong line num, I'm pretty sure no > such function in this file). And the language is set to C++. I also tried gas > as assembler, same situation. Did you assemble the file with -g to gcc, or --gdwarf2 to gas? -- Daniel Jacobowitz CodeSourcery