u-boot debugging problem with ddd

Hi,

Although the u-boot software is not Linux, but strongly releated to embedded Linux systems, I ask my question here anyway.

I have some troubles in debugging the u-boot software with ddd and a BDI2000 debugger. I can debug the start of the u-boot software, but as soon as the software is moved to RAM, I can't tell DDD how to get the correct source files.

What I do is starting ddd with the crossdebugger and the u-boot file. Next I start u-boot and when the command prompt of u-boot is entered, I stop/interrupt the program. Now I remove the symbols using the gdb symbol-file command without any parameters. Next I give the add-symbol-file with the u-boot file and the correct offset. Now I can see that gdb understand were all the symbols are and they are correct. But ddd doesn't understand it and is not able to show the source file when a breakpoint is entered. If keeps saying that there is no program loaded and first a program must be loaded (with the old symbols).

Has anyone seen this problem or is there something I'm doing wrong. I have the idea that gdb is working fine, but ddd doesn't understand it anymore.

Any help is appreciated.

Regards, Robert

Reply to
Robert Pot
Loading thread data ...

There may be ways to tell GDB/DDD the address offset to the real symbols, but instead the problem is fundamentally to do with the way you are linking the bootloader.

The section of the bootloader image which is copied to RAM should be linked with a different start address, not linked as part of the same section as the initial bootstrap which copies the code to RAM. I am not sure how this is set up with u-boot.

Perhaps alternatively you can configure u-boot not to copy itself to ram. It'll be slow but at least you'll be able to debug it.

Has it been compiled with debug symbols enabled ?

Instead of using add-symbol-file try using the "load program" option within DDD.

Reply to
Geronimo W. Christ Esq

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.