[U-Boot-Users] Debugging u-boot after relocation - add-symbol-file issues with gdb 6.4

Laurent Pinchart laurent.pinchart at tbox.biz
Fri May 5 16:50:59 CEST 2006


Hi everybody,

I'm trying to debug U-Boot crashes with the help of a BDI2000. Remote 
debugging with gdb works fine until the point where u-boot relocates to 
SDRAM. At that point, the symbols in the ELF image obviously become useless.

After reading the mailing list archive I found out about the add-symbol-file 
gdb command. I've been able to add symbol files from the u-boot image 
relative to the relocated address. gdb prints the correct relocated location 
when asked for the address of a symbol. Unfortunately, it isn't able to 
display source code when stepping through the software. The file in which the 
function at the current PC value seems to be found correctly, but gdb will 
always display the first line of code in that file. That's probably because 
the relocated address is lower than the first line of code address before 
relocation. gdb should have (at least in my opinion) updated the debug 
symbols, but it doesn't seem to have done so.

Is there something I've done wrong, or is that a gdb bug ? Does anyone know of 
a workaround ?

Thanks for all the help you can provide.

Best regards,

Laurent Pinchart




More information about the U-Boot mailing list