From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out01.mta.xmission.com (out01.mta.xmission.com [166.70.13.231]) by mx.groups.io with SMTP id smtpd.web12.22888.1620588419080769256 for ; Sun, 09 May 2021 12:26:59 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@bsdio.com header.s=xmission header.b=MeoMZ5WY; spf=none, err=SPF record not found (domain: bsdio.com, ip: 166.70.13.231, 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:MIME-Version:Message-Id:Date: Cc:To:From:Sender:Reply-To:Content-Type:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=0IucfrEKHnOvXEljcL45S52crG9QG9SZVySoiLTYllU=; b=MeoMZ5WYkwyAc1pFyrF+qccPiv 3tkfNiXrupd4M7ECNnM/sgzFGhnsK9KBj/ST/V90xpzw55hPfpz3CBf7tR0GoZxISHb+8jE/oSl6w ZZFgHO+DC6EAMcPf07DkCxjwEItacxYy+HpqCn/I3bAnnqeGR9FLiLlAmIV531pLRXJg=; Received: from in01.mta.xmission.com ([166.70.13.51]) by out01.mta.xmission.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1lfp4r-00BU5t-Pl; Sun, 09 May 2021 13:26:57 -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 1lfp4q-0005r1-3A; Sun, 09 May 2021 13:26:57 -0600 Received: from localhost (localhost [127.0.0.1]) by mta4.zcs.xmission.com (Postfix) with ESMTP id 61AFD500D3E; Sun, 9 May 2021 13:26:51 -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 L7sp5Us0Ri6V; Sun, 9 May 2021 13:26:51 -0600 (MDT) Received: from procan.int.bluestop.org (c-174-52-16-57.hsd1.ut.comcast.net [174.52.16.57]) by mta4.zcs.xmission.com (Postfix) with ESMTPSA id 242D0500D23; Sun, 9 May 2021 13:26:51 -0600 (MDT) From: "Rebecca Cran" To: devel@edk2.groups.io, Andrew Fish , Ray Ni Cc: Rebecca Cran Date: Sun, 9 May 2021 13:26:47 -0600 Message-Id: <20210509192647.14478-1-rebecca@bsdio.com> X-Mailer: git-send-email 2.30.1 (Apple Git-130) MIME-Version: 1.0 X-XM-SPF: eid=1lfp4q-0005r1-3A;;;mid=<20210509192647.14478-1-rebecca@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 sa05.xmission.com X-Spam-Level: *** X-Spam-Status: No, score=3.2 required=8.0 tests=ALL_TRUSTED,BAYES_50, DCC_CHECK_NEGATIVE,TR_XM_SB_Phish,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.5000] * 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 DCC_CHECK_NEGATIVE Not listed in DCC * [sa05 1397; IP=ok Body=1 Fuz1=1] [Fuz2=1] * 0.4 XMBrknScrpt_02 Possible Broken Spam Script * 1.5 XMSubPhish11 Phishy Language Subject * 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: ***;devel@edk2.groups.io, Andrew Fish , Ray Ni X-Spam-Relay-Country: X-Spam-Timing: total 1386 ms - load_scoreonly_sql: 0.07 (0.0%), signal_user_changed: 12 (0.9%), b_tie_ro: 11 (0.8%), parse: 1.58 (0.1%), extract_message_metadata: 27 (2.0%), get_uri_detail_list: 4.4 (0.3%), tests_pri_-1000: 22 (1.6%), tests_pri_-950: 1.64 (0.1%), tests_pri_-900: 1.25 (0.1%), tests_pri_-90: 160 (11.6%), check_bayes: 158 (11.4%), b_tokenize: 12 (0.8%), b_tok_get_all: 9 (0.6%), b_comp_prob: 2.9 (0.2%), b_tok_touch_all: 131 (9.4%), b_finish: 1.17 (0.1%), tests_pri_0: 1147 (82.7%), check_dkim_signature: 0.79 (0.1%), check_dkim_adsp: 19 (1.4%), poll_dns_idle: 16 (1.2%), tests_pri_10: 2.1 (0.2%), tests_pri_500: 7 (0.5%), rewrite_mail: 0.00 (0.0%) Subject: [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-Transfer-Encoding: quoted-printable 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=0D import uuid=0D import string=0D -import commands=0D import optparse=0D import shlex=0D =0D @@ -389,7 +388,7 @@ def LoadEmulatorEfiSymbols(frame, bp_loc , internal_dic= t): =0D FileName =3D frame.thread.process.ReadCStringFromMemory (FileNamePtr, = FileNameLen, Error)=0D if not Error.Success():=0D - print "!ReadCStringFromMemory() did not find a %d byte C string at= %x" % (FileNameLen, FileNamePtr)=0D + print("!ReadCStringFromMemory() did not find a %d byte C string at= %x" % (FileNameLen, FileNamePtr))=0D # make breakpoint command continue=0D return False=0D =0D @@ -398,7 +397,7 @@ def LoadEmulatorEfiSymbols(frame, bp_loc , internal_dic= t): LoadAddress =3D frame.FindVariable ("LoadAddress").GetValueAsUnsig= ned() - 0x240=0D =0D debugger.HandleCommand ("target modules add %s" % FileName)=0D - print "target modules load --slid 0x%x %s" % (LoadAddress, FileNam= e)=0D + print("target modules load --slid 0x%x %s" % (LoadAddress, FileNam= e))=0D debugger.HandleCommand ("target modules load --slide 0x%x --file %= s" % (LoadAddress, FileName))=0D else:=0D target =3D debugger.GetSelectedTarget()=0D @@ -408,7 +407,7 @@ def LoadEmulatorEfiSymbols(frame, bp_loc , internal_dic= t): if FileName =3D=3D ModuleName or FileName =3D=3D SBModule.GetF= ileSpec().GetFilename():=0D target.ClearModuleLoadAddress (SBModule)=0D if not target.RemoveModule (SBModule):=0D - print "!lldb.target.RemoveModule (%s) FAILED" % SBModu= le=0D + print("!lldb.target.RemoveModule (%s) FAILED" % SBModu= le)=0D =0D # make breakpoint command continue=0D return False=0D @@ -490,15 +489,15 @@ def efi_guid_command(debugger, command, result, dict): =0D if len(args) >=3D 1:=0D if GuidStr in guid_dict:=0D - print "%s =3D %s" % (guid_dict[GuidStr], GuidStr)=0D - print "%s =3D %s" % (guid_dict[GuidStr], GuidToCStructStr (Gui= dStr))=0D + print("%s =3D %s" % (guid_dict[GuidStr], GuidStr))=0D + print("%s =3D %s" % (guid_dict[GuidStr], GuidToCStructStr (Gui= dStr)))=0D else:=0D - print GuidStr=0D + print(GuidStr)=0D else:=0D # dump entire dictionary=0D width =3D max(len(v) for k,v in guid_dict.iteritems())=0D for value in sorted(guid_dict, key=3Dguid_dict.get):=0D - print '%-*s %s %s' % (width, guid_dict[value], value, GuidToCS= tructStr(value))=0D + print('%-*s %s %s' % (width, guid_dict[value], value, GuidToCS= tructStr(value)))=0D =0D return=0D =0D @@ -538,4 +537,4 @@ def __lldb_init_module (debugger, internal_dict): if Breakpoint.GetNumLocations() =3D=3D 1:=0D # Set the emulator breakpoints, if we are in the emulator=0D debugger.HandleCommand("breakpoint command add -s python -F ll= dbefi.LoadEmulatorEfiSymbols {id}".format(id=3DBreakpoint.GetID()))=0D - print 'Type r to run emulator. SecLldbScriptBreak armed. EFI m= odules should now get source level debugging in the emulator.'=0D + print('Type r to run emulator. SecLldbScriptBreak armed. EFI m= odules should now get source level debugging in the emulator.')=0D --=20 2.30.1 (Apple Git-130)