Re: asm debug problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Results for objdump -W <file>.o

uivsr.o:          file format elf32-big
astest1.o       file format elf32-big

Thanks
Tony
----- Original Message ----- From: "Andrew Haley" <aph-gcc@xxxxxxxxxxxxxxxxxxx>
To: "Yi Tang" <yitang@xxxxxxxxxxxxxx>
Cc: "GCC-HELP" <gcc-help@xxxxxxxxxxx>
Sent: Saturday, November 10, 2007 9:52 PM
Subject: Re: asm debug problem


Yi Tang writes:

> Sorry for not clarifying the problem clearly. Both the rtos and the
> application are compiled using gcc.
>
> The rtos and application code seems work ok. The only problem is that I
> can't debug the assembly written HAL part of the rtos.
>
> I don't know whether my platform support DWARF debuginfo or not. How can > I
> find out? The toolchain I use is a bare c sparc-elf toolchain.
> http://www.gaisler.com/cms/index.php?option=com_content&task=view&id=147&Itemid=31
>
> Following is the command I use for compile, assemble and link:
>
> Thanks for your reply.
> Regards,
> Tony

What does

objdump -W uivsr.o

do?

>
> sparc-elf-gcc -c -o
> astest1.o -I/ecos/osek/dtimer2_install/include -msoft-float -O2 -g -Wall > -Q > -msoft-float -Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef > -Woverloaded-virtual
>  -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -fvtable-gc
>  -finit-priority astest1.c
>
> sparc-elf-gcc -c -o
> uivsr.o -I/ecos/osek/dtimer2_install/include -msoft-float -O2 -g -Wall -Q > -msoft-float
>  -Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -Woverloaded-virtual
>  -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -fvtable-gc
>  -finit-priority uivsr.S
>
> sparc-elf-gcc -L/ecos/osek/dtimer2_install/lib -Ttarget.ld -nostdlib -g -Wl,--gc-sections
> -Wl,-static -Q -msoft-float -g -nostdlib -fvtable-gc -Wl,--gc-sections > -Wl,-static
>  -o astest1 astest1.o uivsr.o
>
> ----- Original Message ----- > From: "Andrew Haley" <aph-gcc@xxxxxxxxxxxxxxxxxxx>
> To: "Yi Tang" <yitang@xxxxxxxxxxxxxx>
> Cc: "GCC-HELP" <gcc-help@xxxxxxxxxxx>
> Sent: Friday, November 09, 2007 7:16 PM
> Subject: Re: asm debug problem
>
>
> > 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
> >
> > do?
> >
> > What *exactly* was the command you used to assumble your file?
> >
> > Andrew.
> >
>
>




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux