From patchwork Mon Aug 2 12:06:28 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Haavard Skinnemoen X-Patchwork-Id: 71803 X-Patchwork-Delegate: info@emk-elektronik.de Return-Path: X-Original-To: wd@gemini.denx.de Delivered-To: wd@gemini.denx.de Received: from diddl.denx.de (diddl.denx.de [10.0.0.6]) by gemini.denx.de (Postfix) with ESMTP id B067511D922 for ; Mon, 2 Aug 2010 14:20:17 +0200 (CEST) Received: from diddl.denx.de (localhost.localdomain [127.0.0.1]) by diddl.denx.de (Postfix) with ESMTP id 95F1A34BB19B for ; Mon, 2 Aug 2010 14:20:17 +0200 (CEST) Received: from pop.mnet-online.de by diddl.denx.de with POP3 (fetchmail-6.3.17) for (single-drop); Mon, 02 Aug 2010 14:20:17 +0200 (CEST) Received: from murder ([192.168.8.180]) by backend2 (Cyrus v2.2.12) with LMTPA; Mon, 02 Aug 2010 14:17:28 +0200 X-Sieve: CMU Sieve 2.2 Received: from mail.m-online.net (localhost [127.0.0.1]) by frontend1.mail.m-online.net (Cyrus v2.2.12) with LMTPA; Mon, 02 Aug 2010 14:17:28 +0200 Received: from scanner-1.m-online.net (scanner-1.mail.m-online.net [192.168.8.165]) by mail.m-online.net (Postfix) with ESMTP id 4BA071C000A4; Mon, 2 Aug 2010 14:17:28 +0200 (CEST) Received: from mxin-3.m-online.net ([192.168.6.165]) by scanner-1.m-online.net (scanner-1.m-online.net [192.168.8.165]) (amavisd-new, port 10026) with ESMTP id 09775-05-3; Mon, 2 Aug 2010 14:17:26 +0200 (CEST) Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by mxin-3.m-online.net (Postfix) with ESMTP id D48B646E1DF; Mon, 2 Aug 2010 14:17:25 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 6131528124; Mon, 2 Aug 2010 14:17:07 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id l7T9+iTFnjuD; Mon, 2 Aug 2010 14:17:07 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id F1F2328132; Mon, 2 Aug 2010 14:16:58 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 3297D2811E for ; Mon, 2 Aug 2010 14:16:53 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id NCVrDwxu8b2d for ; Mon, 2 Aug 2010 14:16:51 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from relay.atmel.no (relay.atmel.no [80.232.32.139]) by theia.denx.de (Postfix) with ESMTPS id E5F8028105 for ; Mon, 2 Aug 2010 14:16:50 +0200 (CEST) Received: from localhost.localdomain (vpn-000-016.norway.atmel.com [172.21.0.16]) by relay.atmel.no (8.13.4/8.13.4) with ESMTP id o72C6ZrA092302; Mon, 2 Aug 2010 14:06:35 +0200 (CEST) (envelope-from haavard.skinnemoen@atmel.com) From: Haavard Skinnemoen To: u-boot@lists.denx.de Date: Mon, 2 Aug 2010 14:06:28 +0200 Message-Id: <1280750789-10359-3-git-send-email-haavard.skinnemoen@atmel.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1280750789-10359-1-git-send-email-haavard.skinnemoen@atmel.com> References: <1280750789-10359-1-git-send-email-haavard.skinnemoen@atmel.com> Cc: Haavard Skinnemoen Subject: [U-Boot] [PATCH 2/3] avr32: Print unrelocated PC on exception X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.9 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de X-Virus-Scanned: by amavisd-new at m-online.net 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 --- arch/avr32/cpu/exception.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/arch/avr32/cpu/exception.c b/arch/avr32/cpu/exception.c index dc9c300..b21ef1f 100644 --- a/arch/avr32/cpu/exception.c +++ b/arch/avr32/cpu/exception.c @@ -59,7 +59,8 @@ void do_unknown_exception(unsigned int ecr, struct pt_regs *regs) { 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) { case ECR_BUS_ERROR_WRITE: