This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


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

Problems with MIPS 4Kc core and GDB...



Hello,

I'm having some trouble getting GDB 5.0 to work correctly with an
embedded MIPS 4Kc target.  My host machine is FreeBSD 2.2.8 and the GDB
config.status is:

configure --host=i386-unknown-freebsd2.2.8 --prefix=/tools/bin/mips
--target=mips--elf --norecursion 

I've built and used GDB (4.17) successfully with embedded PowerPC
targets for years, but MIPS is just giving me fits.  The MIPS 4Kc is a
32-bit implementation of the MIPS32 Architecture with all the MIPSII
instructions and R4000-style memory management.  Various configurations
other than "mips--elf" yield increasingly more problematic results,
ranging from refusing to recognize that the target is big endian to
insisting that it's a 64-bit machine, etc., but perhaps the greatest
concerns are that I can't seem to get "step", "next", or even "next
instruction" to work correctly.  "Step instruction" and explicit
breakpoints seem OK, but there also appears to be a problem mapping the
symbol information back to the actual source code - the target just
isn't where GDB says it is (compile flags for all files are "-g -O0"). 
It'll probably get the function correct, but the line within the
function is generally not going to be right.  Debugging dumps of the
serial line communication with the target indicate that GDB seems to do
some of the right stuff for "step", "next", and "next instruction" but
seems to get carried away and ultimately sets a breakpoint at an
instruction that the target has already executed and then issues a
"continue".  Off it goes!

The toolchain used to produce the images are Wind River's VxWorks 5.4
for MIPS package (I believe this is cygnus-2.7.2-960126 egcs-971225
tornado 2.0 with cygnus-2.6 binutils).  Their configuration seems to be
"mips-wrs-vxworks", but that also refuses to work correctly with my
target.

I'm kinda lost in the swirl of configurations and various stages of
brokenness at this point.  Someone please help!


Thanks very much,
Dave


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