Where is debug info?
Leon Pollak
leonp at plris.com
Wed Aug 27 08:39:38 UTC 2003
On Wednesday 27 August 2003 06:38, you wrote:
> On Tue, 2003-08-26 at 18:53, Leon Pollak wrote:
> > Hello, gurus.
> > This must be a simple question...:-))
> > I compiled all the last (gcc, gdb, snapshots...) on my RH9 machine for
> > powerpc. I took the mbx860 BSP and modified some things inside the files
> > (such as no console, RAM addresses, and similar).
> > Now, when I download the hello.exe file into target (via bdm, but this
> > is not relevant IMHO), I can see only the assembler - no C text.
> > I run objdump and received:
> >
> > [leonp at leonp o-debug]$ powerpc-rtems-objdump -g hello_sym.exe
> > hello_sym.exe: file format elf32-powerpc
> > powerpc-rtems-objdump: hello_sym.exe: no recognized debugging information
> > ----------------------------------------------------------^^^^^^^^^^^^^^^
> >^^^^^^^^^^^^^^^^^^^ [leonp at leonp o-debug]$ powerpc-rtems-objdump -g
> > hello.exe
> > hello.exe: file format elf32-powerpc
> > powerpc-rtems-objdump: hello.exe: no symbols
> > powerpc-rtems-objdump: hello.exe: no recognized debugging information
> > ----------------------------------------------------------^^^^^^^^^^^^^^^
> >^^^^^^^^^^^^^^^^^^^
> >
> > I checked all the build process - each gcc call was with -ggdb and -g
> > parameters. So, where is the debug info?
>
> Somebody of the mbx8xx authors found it useful to strip the bootables:
>
> From mbx8xx.cfg:
>
> define make-exe
> $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) $(MBX8xx_LDFLAGS) \
> -o $(basename $@)_sym.exe $(LINK_OBJS) $(LINK_LIBS)
> $(NM) -g -n $(basename $@)_sym.exe > $(basename $@).nm
> cp $(basename $@)_sym.exe $(basename $@).exe
> $(STRIP) $(basename $@).exe
> $(SIZE) $(basename $@)_sym.exe
> endef
>
> Note the $(STRIP).
>
> I guess, simply removing the line containing the STRIP will produce the
> result you want to see.
>
> Ralf
Ralf, thank you for the help - this is not the first time you help me..:-))
If I understand correct the cfg file you quoted above, there are two "exe"
files - hello_g.exe and hello_sym.exe.
hello_g.exe is the stripped version, while hello_sym.exe is not.
As you can see from my first mail above, I tested both of them for debug info
and the result was the same in both cases. The only difference is that
stripped version also produces the "no symbols" message, while not stripped
says that there is no debug info only.
Do you see something incorrect?
Thank you very much again.
--
Leon
More information about the users
mailing list