This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: asm debug problem
- From: Daniel Jacobowitz <drow at false dot org>
- To: Yi Tang <yitang at itee dot uq dot edu dot au>
- Cc: gdb at sourceware dot org
- Date: Tue, 6 Nov 2007 09:02:03 -0500
- Subject: Re: asm debug problem
- References: <002001c8207b$c84042e0$82406682@itee.uq.edu.au>
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