From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mx.groups.io with SMTP id smtpd.web11.1905.1584491415422387066 for ; Tue, 17 Mar 2020 17:30:15 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.31, mailfrom: liming.gao@intel.com) IronPort-SDR: zs8/F897DzYNY5Rcc54euWuu2t1RLc2AvfA+CtHaWBzegrs8hksAWSOvcE+xx4Gtemp/T4Okv4 pxbh+SLvXrOA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Mar 2020 17:30:14 -0700 IronPort-SDR: 6PWMZNdsFEjW5dHf1a4hluMoMCwo7E7DANmozAqWdSy0PPyyPO4vSPcVfNTNSoTStLnqkFPamu LuLRyr2jdkJQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,565,1574150400"; d="scan'208";a="417754230" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by orsmga005.jf.intel.com with ESMTP; 17 Mar 2020 17:30:14 -0700 Received: from shsmsx606.ccr.corp.intel.com (10.109.6.216) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 17 Mar 2020 17:29:40 -0700 Received: from shsmsx606.ccr.corp.intel.com (10.109.6.216) by SHSMSX606.ccr.corp.intel.com (10.109.6.216) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Wed, 18 Mar 2020 08:29:37 +0800 Received: from shsmsx606.ccr.corp.intel.com ([10.109.6.216]) by SHSMSX606.ccr.corp.intel.com ([10.109.6.216]) with mapi id 15.01.1713.004; Wed, 18 Mar 2020 08:29:37 +0800 From: "Liming Gao" To: "Liu, Zhiguang" , "devel@edk2.groups.io" CC: "Kinney, Michael D" Subject: Re: [PATCH] MdePkg DebugLib: Enable FILE NAME as DEBUG ASSERT for CLANG Thread-Topic: [PATCH] MdePkg DebugLib: Enable FILE NAME as DEBUG ASSERT for CLANG Thread-Index: AQHV/CummzXRucTwCU6EAuDL34W/xqhNfj+g Date: Wed, 18 Mar 2020 00:29:37 +0000 Message-ID: References: <20200317071317.959-1-zhiguang.liu@intel.com> In-Reply-To: <20200317071317.959-1-zhiguang.liu@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.2.0.6 dlp-product: dlpe-windows dlp-reaction: no-action x-originating-ip: [10.239.127.36] MIME-Version: 1.0 Return-Path: liming.gao@intel.com Content-Language: en-US Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: quoted-printable Zhiguang: Please add more information on macro __FILE_NAME__. This is new macro sup= ported by CLANG compiler.=20 Thanks Liming -----Original Message----- From: Liu, Zhiguang =20 Sent: 2020=1B$BG/=1B(B3=1B$B7n=1B(B17=1B$BF|=1B(B 15:13 To: devel@edk2.groups.io Cc: Kinney, Michael D ; Gao, Liming Subject: [PATCH] MdePkg DebugLib: Enable FILE NAME as DEBUG ASSERT for CLAN= G REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1548 This change will make the generated image not include the absolute file pat= h. If so, the generated debug image can be reproduced in the different root di= rectory. Also, it will reduce the size of debug image size. CC: Michael D Kinney CC: Liming Gao Signed-off-by: Zhiguang Liu --- MdePkg/Include/Library/DebugLib.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/MdePkg/Include/Library/DebugLib.h b/MdePkg/Include/Library/Deb= ugLib.h index f1d55cf62b..baab34bf05 100644 --- a/MdePkg/Include/Library/DebugLib.h +++ b/MdePkg/Include/Library/DebugLib.h @@ -8,7 +8,7 @@ of size reduction when compiler optimization is disabled. If MDEPKG_NDEB= UG is defined, then debug and assert related macros wrapped by it are the= NULL implementations. -Copyright (c) 2006 - 2019, Intel Corporation. All r= ights reserved.
+Copyright (c) 2006 - 2020, Intel Corporation. All right= s reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent **/@@ -289,7 = +289,11 @@ DebugPrintLevelEnabled ( @param Expression Boolean expression that evaluated to FALSE **/+#if = defined(__clang__) && defined(__FILE_NAME__)+#define _ASSERT(Expression) D= ebugAssert (__FILE_NAME__, __LINE__, #Expression)+#else #define _ASSERT(Exp= ression) DebugAssert (__FILE__, __LINE__, #Expression)+#endif /**--=20 2.25.1.windows.1