Skip to main content.
Navigation:
DENX
>
DULG
>
WrongDebugSymbolsAfterRelocation
Translations:
Edit
|
Attach
|
Raw
|
Ref-By
|
Printable
|
More
DULG
Sections of this site:
DENX Home
|
DULG
|
ELDK-5
|
Know
|
Training
|
U-Boot
|
U-Bootdoc
Topics
DULG Home
BoardSelect
Manual
FAQ
Application Notes
Changes
Index
List of pages in DULG
Search
%SECTION0{name=WrongDebugSymbolsAfterRelocation}% Wrong debug symbols after relocation Question:: I want to debug U-Boot after relocation to RAM, but it doesn't work since all the symbols are at wrong addresses now. Answer:: To debug parts of U-Boot that are running from ROM/flash, i. e. *before* relocation, just use a command like ="powerpc-linux-gdb uboot"= as usual. <p></p> For parts of U-Boot that run from RAM, i. e. *after* relocation, use ="powerpc-linux-gdb"= _without_ arguments, and use the =add-symbol-file= command in GDB to load the symbol table at the relocation address in RAM. The only problem is that you need to know that address, which depends on RAM size, length reserved for U-Boot, size of "protected RAM" area, etc. If in doubt, enable DEBUG mode when building U-Boot so it prints the address to the console. <p></p> %T% Hint: I use definitions like these in my _.gdbinit_ file: <br> <verbatim> define rom symbol-file file u-boot end define ram symbol-file add-symbol-file u-boot 0x01fe0000 end </verbatim> <p></p> Note: when you want to switch modes during one debug session (i. e. without restarting GDB) you can "delete" the current symbol information by using the =symbol-file= command without arguments, and then either using ="symbol-file u-boot"= for code before relocation, or ="add-symbol-file u-boot _offset_"= for code after relocation.
14.2.6. Net: No ethernet found
1. Abstract
14.2.8. Decoding U-Boot Crash Dumps
Prev
Home
Next