Browse Source

avr32: Print unrelocated PC on exception

In addition to the real PC value, also print the value of PC after
subtracting the relocation offset. This value will match the address in
the ELF file so it's much easier to figure out where things went wrong.

Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
Haavard Skinnemoen 14 years ago
parent
commit
8d1334a787
1 changed files with 2 additions and 1 deletions
  1. 2 1
      arch/avr32/cpu/exception.c

+ 2 - 1
arch/avr32/cpu/exception.c

@@ -59,7 +59,8 @@ void do_unknown_exception(unsigned int ecr, struct pt_regs *regs)
 {
 {
 	unsigned int mode;
 	unsigned int mode;
 
 
-	printf("\n *** Unhandled exception %u at PC=0x%08lx\n", ecr, regs->pc);
+	printf("\n *** Unhandled exception %u at PC=0x%08lx [%08lx]\n",
+			ecr, regs->pc, regs->pc - gd->reloc_off);
 
 
 	switch (ecr) {
 	switch (ecr) {
 	case ECR_BUS_ERROR_WRITE:
 	case ECR_BUS_ERROR_WRITE: