From nobody Sat May 18 17:34:37 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+74852+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+74852+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1620588426; cv=none; d=zohomail.com; s=zohoarc; b=Se6Ej9C/gvNVDfgbp0n/f53hoDyHvZGBEsAEhlrmkr06sCEiEoY7mvhIKosn1taK2zS0R7q2pL+63qcU2Gxaj6AnCBDIZyf+URjIipLp18AgMNh6C/CXgD/ixr9pWxrkvt7PcdeqltDXQLgLvuAy1RKQGzT/B1DxzH6nEl1udRg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1620588426; h=Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Sender:Subject:To; bh=SDKStlgTdcNi/zpmss8M7pHmHij7K2wVlxCXre97fH4=; b=W3O10rDM4PaQQ14PdQC+n5GSxNfoBVCOJQilwhJE4cd1XfjdW7FFoBwb0tovD5PLlAvnGqCt/5ilqNQoPVsdCeoqe4xBm6niIeUX7vvypP1f5vLMuz//dEANzyWc6jKe6eA7DsmJKqLqRkGuqMSIJYDqDfgTd1TsB088rITYFY0= 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+74852+1787277+3901457@groups.io Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1620588426137744.2880490957975; Sun, 9 May 2021 12:27:06 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id WfTNYY1788612xDIQDpBu6ba; Sun, 09 May 2021 12:27:05 -0700 X-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 X-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 X-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 X-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 X-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) X-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> 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: [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) Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: 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@bsdio.com X-Gm-Message-State: qDi2QrrCzkKETwRjXXCEjePAx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1620588425; bh=HSqu5eLfyxe41zQlRiwfExayLsjgwRLUxNSUk3m4wf4=; h=Cc:Date:From:Reply-To:Subject:To; b=r/bkT6zKWm0imbJCGEROHYmjJJ6lS3Uf+x/OqPxI9i33p1iViZnQzGmtbN5oC32zZiY J/9ih8J1Rdg0HUat4aiZqalmDgLJD+0ahTCyaIT6htyzE5/ntaPPOxBQbE1Red3wCiMOh lsExWlg+zMLJf2mZmGWnELPRKOyglRmjzro= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" 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 Reviewed-by: Andrew Fish --- 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 =20 @@ -389,7 +388,7 @@ def LoadEmulatorEfiSymbols(frame, bp_loc , internal_dic= t): =20 FileName =3D 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 =20 @@ -398,7 +397,7 @@ def LoadEmulatorEfiSymbols(frame, bp_loc , internal_dic= t): LoadAddress =3D frame.FindVariable ("LoadAddress").GetValueAsUnsig= ned() - 0x240 =20 debugger.HandleCommand ("target modules add %s" % FileName) - print "target modules load --slid 0x%x %s" % (LoadAddress, FileNam= e) + print("target modules load --slid 0x%x %s" % (LoadAddress, FileNam= e)) debugger.HandleCommand ("target modules load --slide 0x%x --file %= s" % (LoadAddress, FileName)) else: target =3D debugger.GetSelectedTarget() @@ -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(): target.ClearModuleLoadAddress (SBModule) if not target.RemoveModule (SBModule): - print "!lldb.target.RemoveModule (%s) FAILED" % SBModu= le + print("!lldb.target.RemoveModule (%s) FAILED" % SBModu= le) =20 # make breakpoint command continue return False @@ -490,15 +489,15 @@ def efi_guid_command(debugger, command, result, dict): =20 if len(args) >=3D 1: if GuidStr in guid_dict: - print "%s =3D %s" % (guid_dict[GuidStr], GuidStr) - print "%s =3D %s" % (guid_dict[GuidStr], GuidToCStructStr (Gui= dStr)) + print("%s =3D %s" % (guid_dict[GuidStr], GuidStr)) + print("%s =3D %s" % (guid_dict[GuidStr], GuidToCStructStr (Gui= dStr))) else: - print GuidStr + print(GuidStr) else: # dump entire dictionary width =3D max(len(v) for k,v in guid_dict.iteritems()) for value in sorted(guid_dict, key=3Dguid_dict.get): - print '%-*s %s %s' % (width, guid_dict[value], value, GuidToCS= tructStr(value)) + print('%-*s %s %s' % (width, guid_dict[value], value, GuidToCS= tructStr(value))) =20 return =20 @@ -538,4 +537,4 @@ def __lldb_init_module (debugger, internal_dict): if Breakpoint.GetNumLocations() =3D=3D 1: # Set the emulator breakpoints, if we are in the emulator debugger.HandleCommand("breakpoint command add -s python -F ll= dbefi.LoadEmulatorEfiSymbols {id}".format(id=3DBreakpoint.GetID())) - print 'Type r to run emulator. SecLldbScriptBreak armed. EFI m= odules should now get source level debugging in the emulator.' + print('Type r to run emulator. SecLldbScriptBreak armed. EFI m= odules should now get source level debugging in the emulator.') --=20 2.30.1 (Apple Git-130) -=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 (#74852): https://edk2.groups.io/g/devel/message/74852 Mute This Topic: https://groups.io/mt/82705174/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-