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]

MIPS GDB Problems


Hi,

I'm trying to use eCos with a slightly unusual MIPS chip (I'm compiling
with -mcpu=r4000 -mips2).  I'm using a GNU toolchain (binutils 2.10.1, gcc
2.95.2 and insight 5.0) built for mips-elf (I had to make some slight
changes to the gcc makefile so that I can use -mips2)

I've built with '-g' and located my code at 0x80000000.  It runs OK, but GDB
can't find the code...

If I try 'list main' then it lists the 'abort' code.  Similarly, if I try
'list breakpoint' it also lists the 'abort' code!  If I single step
assembler instructions then gdb complains, e.g. "Warning: GDB can't find the
start of the function at 0x8003c50c"

I wonder if this is because the address has been sign extended.
mips-elf-objdump shows the code starting at 0xffffffff80000000.  Similarly,
if I have a 'main' function at 0x80028644 then if I try to 'disassemble
0x80028644' gdb says "No function contains specified address".  However, if
I 'disassemble 0xffffffff80028644' then this shows the assembly code for my
main function.


All suggestions as to how I can get gdb to see my source are welcome!

Thanks,

Colin.
--
Colin Spier
PipingHot Networks Ltd.
Office: +44 (0)1364 655500
DDI: +44 (0)1364 655521
Fax: +44 (0)1364 654625
mailto:colin.spier@pipinghotnetworks.com
http://www.pipinghotnetworks.com



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