
In message 200605051651.00264.laurent.pinchart@tbox.biz you wrote:
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 ?
Sounds like a toolchain problem to me. For a test, try the GDB that comes with the ELDK.
Best regards,
Wolfgang Denk