[U-Boot] [PATCH] README.arm-relocation: get relocated address in gdb

Wolfgang Denk wd at denx.de
Thu Apr 28 19:32:00 CEST 2011


Dear Ben Gardiner,

In message <1303996341-6582-1-git-send-email-bengardiner at nanometrics.ca> you wrote:
> When your emulator is connected at reset (or is used to load u-boot)
> it is possible to get the relocation address from the parameter
> passed to relocate_code() instead of building with -DDEBUG and
> extracting from the console messages.
> 
> Document this alternate method following the style of the original
> method written by Heiko Schocher.
> 
> Signed-off-by: Ben Gardiner <bengardiner at nanometrics.ca>
> CC: Heiko Schocher <hs at denx.de>
...

> +d) set breakpoint on relocate_code
...
> +e) run target until relocate_code
...

> +g) load new symbol table using the addr parameter (aka $r2)

Actually in my previous message I also wanted to point out that
"relocaddr" is a member of struct global_data, so you can simply read
it anywhere in U-Boot code, even if you did nt set any breakpoint
before.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"You can have my Unix system when you  pry  it  from  my  cold,  dead
fingers."                                                - Cal Keegan


More information about the U-Boot mailing list