From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out02.mta.xmission.com (out02.mta.xmission.com [166.70.13.232]) by mx.groups.io with SMTP id smtpd.web09.18953.1621258138058465721 for ; Mon, 17 May 2021 06:28:58 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@bsdio.com header.s=xmission header.b=EGPeNnzM; spf=none, err=SPF record not found (domain: bsdio.com, ip: 166.70.13.232, 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=gVdxToTPB9XSMtLxa1HzGMz35cxNdFSVZ4hhoktF1ZE=; b=EGPeNnzMTn69m3C1lknvonaKR3 8pirqdigJKlsXpB5NAcNEo8uxC7gWLOc8Eo/shhbKTto1kopLA0pPaOU6ma3tDf13tRAN+nHPH3uV 8JNqUc30ru1Fm6VS+OtbIRDMi6O2GPMNIrcungIyt7PNLPSmHAOYHO5wZIjmUPN12R1g=; Received: from in01.mta.xmission.com ([166.70.13.51]) by out02.mta.xmission.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1lidIk-008DSS-Lo; Mon, 17 May 2021 07:28:54 -0600 Received: from mta4.zcs.xmission.com ([166.70.13.68]) by in01.mta.xmission.com with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.87) (envelope-from ) id 1lidIj-0003yQ-TM; Mon, 17 May 2021 07:28:54 -0600 Received: from localhost (localhost [127.0.0.1]) by mta4.zcs.xmission.com (Postfix) with ESMTP id A62E55008EE; Mon, 17 May 2021 07:28:53 -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 AaawFUAk-42U; Mon, 17 May 2021 07:28:53 -0600 (MDT) Received: from [10.0.10.142] (c-174-52-16-57.hsd1.ut.comcast.net [174.52.16.57]) by mta4.zcs.xmission.com (Postfix) with ESMTPSA id 6A2285008BE; Mon, 17 May 2021 07:28:53 -0600 (MDT) To: devel@edk2.groups.io, Andrew Fish , Ray Ni References: <167D7C94C5E426A6.21893@groups.io> From: "Rebecca Cran" Message-ID: <006b5b47-4419-e04d-29f1-4f04a4fc9884@bsdio.com> Date: Mon, 17 May 2021 07:28:53 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: <167D7C94C5E426A6.21893@groups.io> X-XM-SPF: eid=1lidIj-0003yQ-TM;;;mid=<006b5b47-4419-e04d-29f1-4f04a4fc9884@bsdio.com>;;;hst=in01.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 sa08.xmission.com X-Spam-Level: *** X-Spam-Status: No, score=3.2 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,XMBrknScrpt_02,XMSubLong, XMSubPhish11 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.5003] * 0.3 TooManyTo_001 Multiple "To" Header Recipients 2x (uncommon) * 0.5 TooManyTo_002 Multiple "To" Header Recipients 3x (uncommon) * 0.7 XMSubLong Long Subject * 0.0 T_TM2_M_HEADER_IN_MSG BODY: No description available. * -0.0 DCC_CHECK_NEGATIVE Not listed in DCC * [sa08 1397; IP=ok Body=1 Fuz1=1] [Fuz2=1] * 0.4 XMBrknScrpt_02 Possible Broken Spam Script * 0.0 T_TooManySym_01 4+ unique symbols in subject * 1.5 XMSubPhish11 Phishy Language Subject * -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; sa08 1397; IP=ok Body=1 Fuz1=1 Fuz2=1 X-Spam-Combo: ***;devel@edk2.groups.io, Andrew Fish , Ray Ni X-Spam-Relay-Country: X-Spam-Timing: total 514 ms - load_scoreonly_sql: 0.05 (0.0%), signal_user_changed: 16 (3.1%), b_tie_ro: 13 (2.5%), parse: 1.23 (0.2%), extract_message_metadata: 18 (3.6%), get_uri_detail_list: 2.8 (0.5%), tests_pri_-1000: 12 (2.4%), tests_pri_-950: 1.45 (0.3%), tests_pri_-900: 1.16 (0.2%), tests_pri_-90: 72 (14.0%), check_bayes: 70 (13.6%), b_tokenize: 10 (1.9%), b_tok_get_all: 10 (2.0%), b_comp_prob: 2.3 (0.4%), b_tok_touch_all: 41 (8.1%), b_finish: 1.46 (0.3%), tests_pri_0: 377 (73.4%), check_dkim_signature: 0.53 (0.1%), check_dkim_adsp: 34 (6.7%), poll_dns_idle: 32 (6.3%), tests_pri_10: 2.1 (0.4%), tests_pri_500: 9 (1.8%), rewrite_mail: 0.00 (0.0%) Subject: Re: [edk2-devel] [PATCH] EmulatorPkg: Update lldbefi.py to work with current lldb which uses python3 X-Spam-Flag: No X-SA-Exim-Version: 4.2.1 (built Thu, 05 May 2016 13:38:54 -0600) X-SA-Exim-Scanned: Yes (on in01.mta.xmission.com) Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit 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.') >