[U-Boot-Users] Difficulty with symbol maps.

Hello,
I am experiencing some difficulty loading my symbol table into gdb, I'm not sure whether it is a common fault with gdb or perhaps finger trouble on my part.
I have built u-boot for an ep8260 & my custom target such that the code lives in flash memory at 0xFF000000. However the reset configuration word is programmed to initialise flash at address 0x00000000. This appears to work ok as the board does indeed boot correctly. However I would like to be able to step through the code using a BDI2000.
When I attempt to load the symbol file into gdb at address 0x00000000, the symbol _start which I expected to reside at 0x100 actually resides at address 0xFE000100 as illustrated in the following trace.
$ ppc-linux-gdb GNU gdb 5.1.1 Copyright 2002 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "--host=i386-redhat-linux --target=ppc-linux". (gdb) bdi 0x00000100 in ?? () (gdb) add-symbol-file u u-boot u-boot.bin u-boot.map u-boot.srec (gdb) add-symbol-file u-boot 0x00000000 add symbol table from file "u-boot" at .text_addr = 0x0 (y or n) y Reading symbols from u-boot...done. (gdb) info address _start Symbol "_start" is at 0xfe000100 in a file compiled without debugging. (gdb)
Interestingly, when I attempt to load the symbol map at any other address than zero the symbols appear fine.
Any ideas or thoughts would be appreciated.
Many thanks
Mark Doherty.

Dear Mark,
in message 9901EE1E8F8BD3119109009027A1B5F596AE38@DIGINET2 you wrote:
I have built u-boot for an ep8260 & my custom target such that the code lives in flash memory at 0xFF000000. However the reset configuration word is
Are you sure? From what's printed below it looks as if this was 0xFE000000 instead. What is the value of TEXT_BASE in your "board/ep8260/config.mk" file?
programmed to initialise flash at address 0x00000000. This appears to work ok as the board does indeed boot correctly. However I would like to be able to step through the code using a BDI2000.
Should be no problem.
When I attempt to load the symbol file into gdb at address 0x00000000, the symbol _start which I expected to reside at 0x100 actually resides at address 0xFE000100 as illustrated in the following trace.
$ ppc-linux-gdb GNU gdb 5.1.1 Copyright 2002 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "--host=i386-redhat-linux --target=ppc-linux". (gdb) bdi 0x00000100 in ?? () (gdb) add-symbol-file u u-boot u-boot.bin u-boot.map u-boot.srec (gdb) add-symbol-file u-boot 0x00000000 add symbol table from file "u-boot" at .text_addr = 0x0 (y or n) y Reading symbols from u-boot...done. (gdb) info address _start Symbol "_start" is at 0xfe000100 in a file compiled without debugging. (gdb)
Interestingly, when I attempt to load the symbol map at any other address than zero the symbols appear fine.
Any ideas or thoughts would be appreciated.
I think you found a bug in GDB. I see the same problem when trying to load the symbol table at 0:
-> ppc_8xx-gdb GNU gdb 5.1.1 Copyright 2002 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "--host=i386-redhat-linux --target=ppc-linux". (gdb) add-symbol-file u-boot 0x00000000 add symbol table from file "u-boot" at .text_addr = 0x0 (y or n) y Reading symbols from u-boot...done. (gdb) p _start Cannot access memory at address 0x80000100 (gdb) p &_start $1 = (<text variable, no debug info> *) 0x80000100 <_start> (gdb) symbol-file Discard symbol table from `current image(s)'? (y or n) y No symbol file now. (gdb) add-symbol-file u-boot add symbol table from file "u-boot" at (y or n) y Reading symbols from u-boot...done. (gdb) p &_start $1 = (<text variable, no debug info> *) 0x40000100 <_start> (gdb) symbol-file Discard symbol table from `current image(s)'? (y or n) y No symbol file now. (gdb) add-symbol-file u-boot 0x10000000 add symbol table from file "u-boot" at .text_addr = 0x10000000 (y or n) y Reading symbols from u-boot...done. (gdb) p &_start $1 = (<text variable, no debug info> *) 0x10000100 <_start> (gdb)
Best regards,
Wolfgang Denk
participants (2)
-
Mark Doherty
-
Wolfgang Denk