From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tuomas Tynkkynen Date: Sun, 13 May 2018 15:22:58 +0300 Subject: [U-Boot] [PATCH v2 1/1] arm: print instructions pointed to by pc In-Reply-To: <20180510143830.6060-1-xypron.glpk@gmx.de> References: <20180510143830.6060-1-xypron.glpk@gmx.de> Message-ID: <20180513152258.5b3bc5c3@duuni> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi, On Thu, 10 May 2018 16:38:30 +0200 Heinrich Schuchardt wrote: > If an exception occurs in a loaded image and the relocation offset is > unknown, it is helful to know the instructions pointed to by the > program counter. This patch adds the missing output. > > A possible output is: > *pc: fb de f7 e7 1e ff 2f e1 01 00 50 e3 f0 4d 2d e9 01 80 a0 e1 > > The output can be disassembled with > xxd -pc -r - > a.out > $(CROSS_COMPILE)objdump -D -marm -b binary a.out > > Signed-off-by: Heinrich Schuchardt > --- > v2 > print bytes not halfwords Note that Linux already comes with a scripts/decodecode tool where you paste the output of an Oops and it disassembles the "Code: " line from the dump. So I'd vote for importing scripts/decodecode from Linux and making U-Boot's output compatible with Linux.