From: Wolfgang Denk Date: Thu, 28 Apr 2011 19:32:00 +0200 Subject: [U-Boot] [PATCH] README.arm-relocation: get relocated address in gdb In-Reply-To: <1303996341-6582-1-git-send-email-bengardiner@nanometrics.ca> References: <1303996341-6582-1-git-send-email-bengardiner@nanometrics.ca> Message-ID: <20110428173200.32963D5270C@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Ben Gardiner, In message <1303996341-6582-1-git-send-email-bengardiner@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 > CC: Heiko Schocher ... > +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