This is the mail archive of the
mailing list for the GCC project.
Re: asm debug problem
- From: Andrew Haley <aph-gcc at littlepinkcloud dot COM>
- To: "Yi Tang" <yitang at itee dot uq dot edu dot au>
- Cc: "GCC-HELP" <gcc-help at gcc dot gnu dot org>
- Date: Fri, 9 Nov 2007 09:16:03 +0000
- Subject: Re: asm debug problem
- References: <email@example.com>
Yi Tang writes:
> Hello maintainter,
> I have got some trouble using gdb for my assemble source code. It seems like
> some gcc link problem.
> My code, written in asm and compiled by gcc, should be attached to an rtos
> library (ecos) to perform some test. However, I found it is not possible to
> debug the assemble source code under gdb. 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.
> Following is the snapshot, hope you guys can give me some hints.
You haven't really given us enough information.
Firstly, does debugging usually work on your platform?
Does your platform use DWARF debuginfo? What does
objdump -W <file>.o
What *exactly* was the command you used to assumble your file?