This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Opening ELF file in GDB (MIPS 32 Little endian)


When I try to open my final linked program from eCos (fx. hello.c) in GDB,
it complains:

dam@brmlinux:~/examples$ ../gdb-5.2/gdb/gdb hello.elf
GNU gdb 5.2
.....(snip)
This GDB was configured as "--host=i686-pc-linux-gnu
--target=mipsisa32-elf"...(no debugging symbols found)...


It doesn't seem to find any debugging information in the file, though
readelf shows a lot of debugging information to me.
(I've tested with 3 different versions of GDB, same result. GCC is version
3.1, --target=mipsisa32-elf).


We then tried to change a setting in the linker script in
install/lib/target.ld:
from    . = ALIGN(4);  ...(snip out)...: { *(.gptab.bss) *(.gptab.sbss) }
/DISCARD/ 0 : { *(.mdebug) }
to    . = ALIGN(4);  ...(snip out)...: { *(.gptab.bss) *(.gptab.sbss) }
.mdebug : { *(.mdebug) }

Then GDB stops complaining.... :-)

This is strange to me, because of the following comment in the source for
the linker-script:

/* The /DISCARD/ section ensures that the output will not contain a
 * .mdebug section as it confuses GDB. This is a workaround for CR 100804.
 */

Does this happen because some change in GDB?
Does it tricker some other not-so-obvious error?

Regards,
David Marqvar.

-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]