[U-Boot-Users] Debugging u-boot after relocation - add-symbol-file issues with gdb 6.4
laurent.pinchart at tbox.biz
Mon May 8 11:36:44 CEST 2006
> > 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.
That works much better. Not sure if a patch in the ELDK fixes the problem or
if this was a regression introduced in GDB 6.4. I had upgraded from 6.3 to
6.4 because of another issue (GDB printed <signal handler called> instead of
source lines when stepping through code in remote mode) which seems to have
been fixed by the ELDK patches.
Thanks for your help.
More information about the U-Boot