From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 Cc: edk2-devel-01 , "Oliyil Kunnil, Vishal" Subject: Re: [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: , X-List-Received-Date: Fri, 09 Sep 2016 13:04:27 -0000 Content-Type: text/plain; charset=UTF-8 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. --- 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