RFC DEBUG: relocate to fixed address
Get series with b4
b4 am 1354054951.2317.14@tyrVersions newest first
- v1 RFC Latest0 of 2 patches 0 repliesNew
Patches in v1 No applies recorded yet
None of the 2 patches the cover letter announces are in this archive.
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [U-Boot] [PATCH 0/2] [RFC] DEBUG: relocate to fixed address
Quoted 6 lines · Wolfgang Denk
Dear Tetsuyuki Kobayashi,
In message <[email protected]> you
Quoted 2 lines · wrote:
U-Boot from NOR flash relocates itself to RAM erea. The relocation
Quoted 8 lines
address is
Quoted 1 line
calaculated at runtime to get maxium contiguous space to load
kernel. So it may
Quoted 1 line
vary after code changed. In the early debug phase it would be
easier to handle
Quoted 1 line
if the relocation address does not change per build.
No, it is not.
Maybe not for you, but for some of us it definitely would make things easier. I usually end up randomly peeking at some likely destinations until I find the expected content.
Quoted 7 lines
You still need to determine where it gets relocated to, and iot makes no difference for debugging wehter you enter one number or another one.
Any debugger out there today allows you to automatemost such operations by scripts or functions or macros you can define to help you doing that.
Just because you've managed to compensate for it doesn't mean it isn't annoying.
How am I going to script gdb to figure out the relocation address when I'm just running it on the image to get symbols, not actually connecting to the target?
Is such a script published anywhere?
Quoted 16 lines
Quoted 1 line
My idea is define fixed address as
CONFIG_DEBUG_RELOC_FIX_ADDRinconfig file
Quoted 1 line
and relocate to the address. Then you don't need to execute
'bdinfo' command to
Quoted 1 line
get actual relocated address. It is done by the first patch.
I'm not willing to accept such change. It appears to ad a (minimal) easement at first glance, but at the same time it bears potential to break a large number of other things, and not unlikely in areas which are why you need to run a debugger in the first place.
This makes no sense.
Quoted 1 line
The second patch is for u-boot_r, which is linked for fixed
relocation address.
Quoted 1 line
When you want to symbolic debug after relocation, flash
Quoted 8 lines
'u-boot.bin' and
Quoted 2 lines
load symbol from 'u-boot_r' to debugger.
(CF. When you want to symblic debug before relocation, load symbolfrom 'u-boot'
Quoted 1 line
to debugger.)
Why would that be needed? The standard ELF file has all debug information you ever may need.
If the symbols in the ELF ?file match where U-Boot is actually located, that avoids the need to manually apply the relocation offset every time you want to look at something.
Quoted 1 line
Just to save the "load symbol table" command?
Where would you get the symbol table to load that matches U-Boot post-relocation?
-Scott