Weird behavior in gdb (m5475) ?

Andreas Engberg andreas at cryptkeeper.org
Wed Mar 28 07:07:51 UTC 2007


Hi,

I've been having problems with gdb and the m5475 development board.
Bear with me as I try to explain>>>

I have the 4.1-32 version.
I have a simple 'hello world' program running in RAM. It compiles and  
links ok.
I set up the target using sprite and everything seems to be ok (I can  
read/write to valid memory regions including mbar).

After issuing a 'target remote' command, everything is still fine. Or is  
it?
At first, I thought I forgot to load the application. It loads nicely but  
the problem is still there.

Here is the deal:
I try to read address 0x4e2 (part of the puts function):

(gdb) x /i 0x4e2
0x4e2 <_puts_r+18>:     movel %d2,%fp@(20463)
(gdb) x /x 0x4e2
0x4e2 <_puts_r+18>:     0x2d424fef

This is close but no cigar. According to objdump, the data (or in this  
case instruction) at address 0x4e2 should be :
4e2:    2d42 ffe4       movel %d2,%fp@(-28)


These error are scattered through out the coldfire side. Some are minor,  
like the one above, but some are interpreted as different instructions.
I've tried changing the speed of my Multilink. No change.
Tried to write my own board spec file for m5475. No change.

Frankly, I'm puzzled.

It could be that all the sdram controller settings are off. I would think  
that should have greater impact than this. The data is really close what  
it should be but not 100% exact.
Or does something happen in the bdm driver that I'm not aware of?

Ideas? Suggestions? Oh, I've also downloaded the 30day pro. version but  
the problem persist.

I'll try to go back to an older version of the toolchain to see if that  
makes any difference.

Thanks,
Andreas




More information about the coldfire-gnu-discuss mailing list