From nobody Mon Nov 25 13:17:28 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+70296+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+70296+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1610642196; cv=none; d=zohomail.com; s=zohoarc; b=F3UqX7/RwD2xbGEZ5AJHBQMvjqE9q91TDlmVZGbzxJspG9mqSiIN5AhXuz16R/JUvdvPezb7D2sQFPf1GIM7knAVWABGfFuWR5fRFvZEOdnol7Wokhqwvv1HIxorsELTv/I4+oF6tKqF+zCBul8BapMipElD65YJUQTuD9IsAzc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1610642196; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=eaAqWkHdOal05SPZCVw3puxSaCfam3oT0eI8U5l5j0A=; b=J7TYt/efzhvCsnc/qvC7IaL8GQVAVIsEl4KaNEuOIKcfd28E8rhKZtg9zhKjqcoKO16MQjMyels/7yaBjO1YQw6XiBvPsEdz+6UjVOM7Zq2cMC5A2Pms809EqjjvCdHTlPSi154UqCanph9K4Iy4MANJGsDNU9IujyNQslBwTb0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+70296+1787277+3901457@groups.io Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1610642196717558.4642380186692; Thu, 14 Jan 2021 08:36:36 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id v7nvYY1788612xwob4m6a1Xi; Thu, 14 Jan 2021 08:36:36 -0800 X-Received: from mail-io1-f41.google.com (mail-io1-f41.google.com [209.85.166.41]) by mx.groups.io with SMTP id smtpd.web11.4144.1610642195739078564 for ; Thu, 14 Jan 2021 08:36:35 -0800 X-Received: by mail-io1-f41.google.com with SMTP id y19so12416903iov.2 for ; Thu, 14 Jan 2021 08:36:35 -0800 (PST) X-Gm-Message-State: nqmYckJYOALQITg2BiCuXa7cx1787277AA= X-Google-Smtp-Source: ABdhPJwRVOmTwDOX0Mxan+5x4eaoGrZKFDmGRmZS+3s/mVJ//HEHT/oANixLtcjCEgLRPkPZUPH1tw== X-Received: by 2002:a5e:d717:: with SMTP id v23mr5833146iom.60.1610642194934; Thu, 14 Jan 2021 08:36:34 -0800 (PST) X-Received: from cube.nuviainc.com (c-174-52-16-57.hsd1.ut.comcast.net. [174.52.16.57]) by smtp.gmail.com with ESMTPSA id y5sm3711920ilj.35.2021.01.14.08.36.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Jan 2021 08:36:34 -0800 (PST) From: "Rebecca Cran" To: devel@edk2.groups.io Cc: Bob Feng , Leif Lindholm , Ard Biesheuvel , nd@arm.com, Sami Mujawar , Liming Gao , Michael D Kinney , Zhiguang Liu , Yuwei Chen Subject: [edk2-devel] [PATCH v6 01/22] BaseTools: Fix the build report crash issue Date: Thu, 14 Jan 2021 09:36:07 -0700 Message-Id: <20210114163628.31952-2-rebecca@nuviainc.com> In-Reply-To: <20210114163628.31952-1-rebecca@nuviainc.com> References: <20210114163628.31952-1-rebecca@nuviainc.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,rebecca@nuviainc.com Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1610642196; bh=0w18qtTcvFBCmju6h6/DfLd1ubxY7T6wpxoGfRBrrbo=; h=Cc:Date:From:Reply-To:Subject:To; b=un2MFG3ICsHsoW/nba1fpxNhZk+L/0fFbhRlCKi1CoQJPUP493I2l+0nbBp0SInrR6B YkJLePGOmSz5gvleGZy4DtUzy6ibUtg5jGBEORl7KuiyvW4TDAKBDV0ysIm3FtwDUipWU azNJ4ZzxZ/YlAdJCTj0zQdKmyAdIEWKdkAY= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" From: Bob Feng In the following corner case, the build report will crash. This patch is to fix this problem. Case: Multiple SKU are used and 2 more DynamicHii structure Pcds are set in dsc file under different SKU. And 1 more of those Pcds are not used in any INF file. Signed-off-by: Bob Feng Cc: Liming Gao Cc: Yuwei Chen Reviewed-by: Liming Gao Reviewed-by: Yuwei Chen --- BaseTools/Source/Python/build/BuildReport.py | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/BaseTools/Source/Python/build/BuildReport.py b/BaseTools/Sourc= e/Python/build/BuildReport.py index 3b1add9999d2..468772930ca1 100644 --- a/BaseTools/Source/Python/build/BuildReport.py +++ b/BaseTools/Source/Python/build/BuildReport.py @@ -1125,10 +1125,11 @@ class PcdReport(object): if SkuInfo.DefaultStoreDict: DefaultStoreList =3D sorte= d(SkuInfo.DefaultStoreDict.keys()) for DefaultStore in Defaul= tStoreList: - OverrideValues =3D Pcd= .SkuOverrideValues[Sku] - DscOverride =3D self.P= arseStruct(OverrideValues[DefaultStore]) - if DscOverride: - break + OverrideValues =3D Pcd= .SkuOverrideValues.get(Sku) + if OverrideValues: + DscOverride =3D se= lf.ParseStruct(OverrideValues[DefaultStore]) + if DscOverride: + break if DscOverride: break if DscOverride: @@ -1388,9 +1389,10 @@ class PcdReport(object): FileWrite(File, ' %-*s : %6s %10= s %10s %10s =3D %s' % (self.MaxLen, ' ', TypeName, '(' + Pcd.DatumType + ')= ', '(' + SkuIdName + ')', '(' + DefaultStore + ')', Value)) FileWrite(File, '%*s: %s: %s' % (self.MaxLen += 4, SkuInfo.VariableGuid, SkuInfo.VariableName, SkuInfo.VariableOffset)) if IsStructure: - OverrideValues =3D Pcd.SkuOverrideValues[S= ku] - OverrideFieldStruct =3D self.OverrideField= Value(Pcd, OverrideValues[DefaultStore]) - self.PrintStructureInfo(File, OverrideFiel= dStruct) + OverrideValues =3D Pcd.SkuOverrideValues.g= et(Sku) + if OverrideValues: + OverrideFieldStruct =3D self.OverrideF= ieldValue(Pcd, OverrideValues[DefaultStore]) + self.PrintStructureInfo(File, Override= FieldStruct) self.PrintPcdDefault(File, Pcd, IsStructure, D= scMatch, DscDefaultValue, InfMatch, InfDefaultValue, DecMatch, DecDefaultVa= lue) else: Value =3D SkuInfo.DefaultValue --=20 2.26.2 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#70296): https://edk2.groups.io/g/devel/message/70296 Mute This Topic: https://groups.io/mt/79679234/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-