From patchwork Fri Sep 9 13:04:25 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 75887 Delivered-To: patch@linaro.org Received: by 10.140.106.11 with SMTP id d11csp336446qgf; Fri, 9 Sep 2016 06:04:29 -0700 (PDT) X-Received: by 10.66.100.162 with SMTP id ez2mr6316093pab.123.1473426269706; Fri, 09 Sep 2016 06:04:29 -0700 (PDT) Return-Path: Received: from ml01.01.org (ml01.01.org. [198.145.21.10]) by mx.google.com with ESMTPS id qj2si3908457pac.7.2016.09.09.06.04.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 09 Sep 2016 06:04:29 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) client-ip=198.145.21.10; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 10C151A1E5D; Fri, 9 Sep 2016 06:04:29 -0700 (PDT) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org Received: from mail-it0-x22f.google.com (mail-it0-x22f.google.com [IPv6:2607:f8b0:4001:c0b::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 4667C1A1E16 for ; Fri, 9 Sep 2016 06:04:27 -0700 (PDT) Received: by mail-it0-x22f.google.com with SMTP id i184so12845816itf.1 for ; Fri, 09 Sep 2016 06:04:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=qpC1USlTRiIsZTJzVh1R8FYqV+v1FFsrVdGrmsEcQ74=; b=isZV41Fs+NKqjzwuPB5IMkxe9GaO9VFy4WA0n27u4nnWOmlGP542S7buFNrZsCZsNt D3T495GIQaNJh23/NInRKxOj1g4D5kMK/BrrebUnpVLwac5XbiPk0HW9ZQTFehEo1JWa DZ97pbXKcIQS9oWgO+5FS8gQ0xF3GTlKc0kBk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=qpC1USlTRiIsZTJzVh1R8FYqV+v1FFsrVdGrmsEcQ74=; b=GrEzgIcii0T1/QhkG+WuAmctnce1empRQNlIdckK+E9ZI2W/yDwG40Gt3HliVamB3x dc2Mei1UMRGW7OHUHsy912tJ+QuZg+XEi2U8/Y9hwFaO/8IrNZ+UfdXR/wrxc3F7Xntv EqOkPaRgqNpbeLKMLvLlBKUAZQqicS9s7psCDdE2l40EZUPVgBq9xGQ3w6wD7TVL90+8 OOuDqEDHuZ9xhMiDH7JJKzs5Zb253JNJtyrXqyul8IJwEj50Fd52I9Fb7p+TxNVN8twT XyJ8lTXqrhXmtG9l1jidVJqv1aQ1O1Y1vUlycyeaXyFcSDHCScMS9123YxGTmx33rgGI p/UQ== X-Gm-Message-State: AE9vXwOlsiJnmCePkr/zVXZANByndePMKemeonb6CCb12dHAwQkBe2fAsxbL5SPiEAWMKMpytGF+ZlIK9FYTrdLs X-Received: by 10.157.27.151 with SMTP id z23mr4827928otd.72.1473426266589; Fri, 09 Sep 2016 06:04:26 -0700 (PDT) MIME-Version: 1.0 Received: by 10.36.204.195 with HTTP; Fri, 9 Sep 2016 06:04:25 -0700 (PDT) In-Reply-To: <20160909112623.GN16080@bivouac.eciton.net> References: <1473406521-6216-1-git-send-email-ard.biesheuvel@linaro.org> <20160909112623.GN16080@bivouac.eciton.net> From: Ard Biesheuvel Date: Fri, 9 Sep 2016 14:04:25 +0100 Message-ID: To: Leif Lindholm Subject: Re: [edk2] [PATCH] ArmPkg/DefaultExceptionHandlerLib: trim module name in backtrace output X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: edk2-devel-01 , "Oliyil Kunnil, Vishal" Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" On 9 September 2016 at 12:26, Leif Lindholm wrote: > On Fri, Sep 09, 2016 at 08:35:21AM +0100, Ard Biesheuvel wrote: >> As reported by Vishal, the new backtrace output would be more useful if >> it did not contain the full absolute path of each module in the list. >> So strip off everything up to the last forward slash or backslash in the >> string. >> >> Example output: >> >> IRQ Exception at 0x000000005EF110E0 >> DxeCore.dll loaded at 0x000000005EEED000 >> called from DxeCore.dll (0x000000005EF121F0) loaded at 0x000000005EEED000 >> called from DxeCore.dll (0x000000005EF1289C) loaded at 0x000000005EEED000 >> called from DxeCore.dll (0x000000005EEFB6B4) loaded at 0x000000005EEED000 >> called from DxeCore.dll (0x000000005EEFAA44) loaded at 0x000000005EEED000 >> called from DxeCore.dll (0x000000005EEFB450) loaded at 0x000000005EEED000 >> called from DxeCore.dll (0x000000005EEF938C) loaded at 0x000000005EEED000 >> called from DxeCore.dll (0x000000005EEF8D04) loaded at 0x000000005EEED000 >> called from DxeCore.dll (0x000000005EEFA8E8) loaded at 0x000000005EEED000 >> called from DxeCore.dll (0x000000005EEF3C14) loaded at 0x000000005EEED000 >> called from DxeCore.dll (0x000000005EEF3E48) loaded at 0x000000005EEED000 >> called from DxeCore.dll (0x000000005EF0C838) loaded at 0x000000005EEED000 >> called from DxeCore.dll (0x000000005EEEF70C) loaded at 0x000000005EEED000 >> called from DxeCore.dll (0x000000005EEEE93C) loaded at 0x000000005EEED000 >> called from DxeCore.dll (0x000000005EEEE024) loaded at 0x000000005EEED000 >> >> Suggested-by: "Oliyil Kunnil, Vishal" >> Contributed-under: TianoCore Contribution Agreement 1.0 >> Signed-off-by: Ard Biesheuvel > > Yes, that is cleaner. > Reviewed-by: Leif Lindholm > Pushed, with the below folded in to prevent the RELEASE build from breaking on an 'unused function' Thanks, Ard. _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel --- a/ArmPkg/Library/DefaultExceptionHandlerLib/AArch64/DefaultExceptionHandler.c +++ b/ArmPkg/Library/DefaultExceptionHandlerLib/AArch64/DefaultExceptionHandler.c @@ -119,6 +119,7 @@ DescribeExceptionSyndrome ( DEBUG ((EFI_D_ERROR, "\n %a \n", Message)); } +#ifndef MDEPKG_NDEBUG STATIC CONST CHAR8 * BaseName ( @@ -136,6 +137,7 @@ BaseName ( } return Str; } +#endif /** This is the default action to take on an unexpected exception