From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out03.mta.xmission.com (out03.mta.xmission.com [166.70.13.233]) by mx.groups.io with SMTP id smtpd.web12.11524.1623538477422611673 for ; Sat, 12 Jun 2021 15:54:37 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@bsdio.com header.s=xmission header.b=eiVbKUl2; spf=none, err=SPF record not found (domain: bsdio.com, ip: 166.70.13.233, mailfrom: rebecca@bsdio.com) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=simple/simple; d=bsdio.com; s=xmission; h=Subject:Content-Transfer-Encoding:Content-Type:In-Reply-To: MIME-Version:Date:Message-ID:From:References:To:Sender:Reply-To:Cc:Content-ID :Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To: Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe :List-Post:List-Owner:List-Archive; bh=dQaQ4Nogboca4rMCV+86s1i691Pzae4ZNSgahGKgY+k=; b=eiVbKUl2Hj2+Pz+TI9G1hez1Av VrVUcyaFXdpcJsUfB418ere+ZFWbr6jMQo+fUADWCJQSt0vLAQlrLW3K1chwdt6tvoG9QREAUCEVT NoRMLs6qF8Zjs4pKFgKja/4fK5lVhCC5MhZD6Ldl7yY0Q2x4jdA2aEBRSHCQPwbDrboU=; Received: from in02.mta.xmission.com ([166.70.13.52]) by out03.mta.xmission.com with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1lsCWQ-002FKX-Gk; Sat, 12 Jun 2021 16:54:34 -0600 Received: from mta4.zcs.xmission.com ([166.70.13.68]) by in02.mta.xmission.com with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1lsCWO-008Hps-US; Sat, 12 Jun 2021 16:54:34 -0600 Received: from localhost (localhost [127.0.0.1]) by mta4.zcs.xmission.com (Postfix) with ESMTP id AD2F4500E52; Sat, 12 Jun 2021 16:54:32 -0600 (MDT) X-Amavis-Modified: Mail body modified (using disclaimer) - mta4.zcs.xmission.com Received: from mta4.zcs.xmission.com ([127.0.0.1]) by localhost (mta4.zcs.xmission.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id JOaNwr15CVwm; Sat, 12 Jun 2021 16:54:32 -0600 (MDT) Received: from photon.int.bsdio.com (c-174-52-16-57.hsd1.ut.comcast.net [174.52.16.57]) by mta4.zcs.xmission.com (Postfix) with ESMTPSA id 57B6F500D77; Sat, 12 Jun 2021 16:54:32 -0600 (MDT) To: gaoliming , devel@edk2.groups.io, 'Andrew Fish' , 'Ray Ni' References: <167D7C94C5E426A6.21893@groups.io> <006b5b47-4419-e04d-29f1-4f04a4fc9884@bsdio.com> <009101d74b7f$24a4d130$6dee7390$@byosoft.com.cn> From: "Rebecca Cran" Message-ID: <0945b06f-d73d-5e9d-becc-88ae13fa7a68@bsdio.com> Date: Sat, 12 Jun 2021 16:54:31 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <009101d74b7f$24a4d130$6dee7390$@byosoft.com.cn> X-XM-SPF: eid=1lsCWO-008Hps-US;;;mid=<0945b06f-d73d-5e9d-becc-88ae13fa7a68@bsdio.com>;;;hst=in02.mta.xmission.com;;;ip=166.70.13.68;;;frm=rebecca@bsdio.com;;;spf=none X-SA-Exim-Connect-IP: 166.70.13.68 X-SA-Exim-Mail-From: rebecca@bsdio.com X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on sa05.xmission.com X-Spam-Level: **** X-Spam-Status: No, score=4.3 required=8.0 tests=ALL_TRUSTED,BAYES_50, DCC_CHECK_NEGATIVE,NICE_REPLY_A,TR_XM_SB_Phish,T_TM2_M_HEADER_IN_MSG, T_TooManySym_01,TooManyTo_001,TooManyTo_002,TooManyTo_003, XMBrknScrpt_02,XMSubLong,XMSubPhish11,XM_B_Unicode,XM_B_Unicode3, XM_B_Unsub autolearn=disabled version=3.4.2 X-Spam-Report: * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP * 0.8 BAYES_50 BODY: Bayes spam probability is 40 to 60% * [score: 0.5000] * 0.7 XMSubLong Long Subject * 0.3 TooManyTo_001 Multiple "To" Header Recipients 2x (uncommon) * 0.6 TooManyTo_003 Multiple "To" Header Recipients 4x (uncommon) * 0.5 TooManyTo_002 Multiple "To" Header Recipients 3x (uncommon) * 0.0 T_TM2_M_HEADER_IN_MSG BODY: No description available. * 0.0 XM_B_Unicode BODY: Testing for specific types of unicode * 0.0 XM_B_Unicode3 BODY: Testing for specific types of unicode * -0.0 DCC_CHECK_NEGATIVE Not listed in DCC * [sa05 1397; IP=ok Body=1 Fuz1=1] [Fuz2=1] * 0.0 T_TooManySym_01 4+ unique symbols in subject * 0.5 XM_B_Unsub Unsubscribe in body of email but missing unsubscribe * header * 1.5 XMSubPhish11 Phishy Language Subject * 0.4 XMBrknScrpt_02 Possible Broken Spam Script * -0.0 NICE_REPLY_A Looks like a legit reply (A) * 0.0 TR_XM_SB_Phish Phishing flag in subject of message X-Spam-DCC: XMission; sa05 1397; IP=ok Body=1 Fuz1=1 Fuz2=1 X-Spam-Combo: ****;gaoliming , devel@edk2.groups.io, 'Andrew Fish' , 'Ray Ni' X-Spam-Relay-Country: X-Spam-Timing: total 791 ms - load_scoreonly_sql: 0.16 (0.0%), signal_user_changed: 12 (1.5%), b_tie_ro: 10 (1.2%), parse: 1.47 (0.2%), extract_message_metadata: 26 (3.2%), get_uri_detail_list: 3.9 (0.5%), tests_pri_-1000: 9 (1.1%), tests_pri_-950: 1.12 (0.1%), tests_pri_-900: 0.92 (0.1%), tests_pri_-90: 68 (8.6%), check_bayes: 67 (8.4%), b_tokenize: 11 (1.3%), b_tok_get_all: 12 (1.5%), b_comp_prob: 3.0 (0.4%), b_tok_touch_all: 39 (4.9%), b_finish: 0.72 (0.1%), tests_pri_0: 537 (67.9%), check_dkim_signature: 1.53 (0.2%), check_dkim_adsp: 42 (5.3%), poll_dns_idle: 141 (17.8%), tests_pri_10: 2.9 (0.4%), tests_pri_500: 130 (16.4%), rewrite_mail: 0.00 (0.0%) Subject: =?UTF-8?B?UmU6IOWbnuWkjTogW2VkazItZGV2ZWxdIFtQQVRDSF0gRW11bGF0b3JQa2c6IFVwZGF0ZSBsbGRiZWZpLnB5IHRvIHdvcmsgd2l0aCBjdXJyZW50IGxsZGIgd2hpY2ggdXNlcyBweXRob24z?= X-SA-Exim-Version: 4.2.1 (built Sat, 08 Feb 2020 21:53:50 +0000) X-SA-Exim-Scanned: Yes (on in02.mta.xmission.com) Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Could someone commit this please? -- Rebecca Cran On 5/17/21 6:45 PM, gaoliming wrote: > Rebecca: > This change supports python2 & python3 both. So, I think this is a good fix. Reviewed-by: Liming Gao > > Thanks > Liming >> -----邮件原件----- >> 发件人: devel@edk2.groups.io 代表 Rebecca Cran >> 发送时间: 2021年5月17日 21:29 >> 收件人: devel@edk2.groups.io; Andrew Fish ; Ray Ni >> >> 主题: Re: [edk2-devel] [PATCH] EmulatorPkg: Update lldbefi.py to work with >> current lldb which uses python3 >> >> Could someone review this please? >> >> Thanks. >> Rebecca Cran >> >> On 5/9/21 1:26 PM, Rebecca Cran wrote: >>> The version of lldb shipping with macOS Big Sur is lldb-1205.0.27.3, and >>> it uses python3. Update lldbefi.py to work with it, including removing >>> the unused 'commands' import and fixing the print statements. >>> >>> Signed-off-by: Rebecca Cran >>> --- >>> EmulatorPkg/Unix/lldbefi.py | 17 ++++++++--------- >>> 1 file changed, 8 insertions(+), 9 deletions(-) >>> >>> diff --git a/EmulatorPkg/Unix/lldbefi.py b/EmulatorPkg/Unix/lldbefi.py >>> index c3fb2675cb..952f8bf982 100755 >>> --- a/EmulatorPkg/Unix/lldbefi.py >>> +++ b/EmulatorPkg/Unix/lldbefi.py >>> @@ -10,7 +10,6 @@ import lldb >>> import os >>> import uuid >>> import string >>> -import commands >>> import optparse >>> import shlex >>> >>> @@ -389,7 +388,7 @@ def LoadEmulatorEfiSymbols(frame, bp_loc , >> internal_dict): >>> FileName = frame.thread.process.ReadCStringFromMemory >> (FileNamePtr, FileNameLen, Error) >>> if not Error.Success(): >>> - print "!ReadCStringFromMemory() did not find a %d byte C string >> at %x" % (FileNameLen, FileNamePtr) >>> + print("!ReadCStringFromMemory() did not find a %d byte C string >> at %x" % (FileNameLen, FileNamePtr)) >>> # make breakpoint command continue >>> return False >>> >>> @@ -398,7 +397,7 @@ def LoadEmulatorEfiSymbols(frame, bp_loc , >> internal_dict): >>> LoadAddress = frame.FindVariable >> ("LoadAddress").GetValueAsUnsigned() - 0x240 >>> debugger.HandleCommand ("target modules add %s" % >> FileName) >>> - print "target modules load --slid 0x%x %s" % (LoadAddress, >> FileName) >>> + print("target modules load --slid 0x%x %s" % (LoadAddress, >> FileName)) >>> debugger.HandleCommand ("target modules load --slide 0x%x >> --file %s" % (LoadAddress, FileName)) >>> else: >>> target = debugger.GetSelectedTarget() >>> @@ -408,7 +407,7 @@ def LoadEmulatorEfiSymbols(frame, bp_loc , >> internal_dict): >>> if FileName == ModuleName or FileName == >> SBModule.GetFileSpec().GetFilename(): >>> target.ClearModuleLoadAddress (SBModule) >>> if not target.RemoveModule (SBModule): >>> - print "!lldb.target.RemoveModule (%s) FAILED" % >> SBModule >>> + print("!lldb.target.RemoveModule (%s) FAILED" % >> SBModule) >>> # make breakpoint command continue >>> return False >>> @@ -490,15 +489,15 @@ def efi_guid_command(debugger, command, >> result, dict): >>> if len(args) >= 1: >>> if GuidStr in guid_dict: >>> - print "%s = %s" % (guid_dict[GuidStr], GuidStr) >>> - print "%s = %s" % (guid_dict[GuidStr], GuidToCStructStr >> (GuidStr)) >>> + print("%s = %s" % (guid_dict[GuidStr], GuidStr)) >>> + print("%s = %s" % (guid_dict[GuidStr], GuidToCStructStr >> (GuidStr))) >>> else: >>> - print GuidStr >>> + print(GuidStr) >>> else: >>> # dump entire dictionary >>> width = max(len(v) for k,v in guid_dict.iteritems()) >>> for value in sorted(guid_dict, key=guid_dict.get): >>> - print '%-*s %s %s' % (width, guid_dict[value], value, >> GuidToCStructStr(value)) >>> + print('%-*s %s %s' % (width, guid_dict[value], value, >> GuidToCStructStr(value))) >>> return >>> >>> @@ -538,4 +537,4 @@ def __lldb_init_module (debugger, internal_dict): >>> if Breakpoint.GetNumLocations() == 1: >>> # Set the emulator breakpoints, if we are in the emulator >>> debugger.HandleCommand("breakpoint command add -s >> python -F lldbefi.LoadEmulatorEfiSymbols {id}".format(id=Breakpoint.GetID())) >>> - print 'Type r to run emulator. SecLldbScriptBreak armed. EFI >> modules should now get source level debugging in the emulator.' >>> + print('Type r to run emulator. SecLldbScriptBreak armed. EFI >> modules should now get source level debugging in the emulator.') >> >> >> >> >> > >