From nobody Mon Feb 9 00:42:39 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+45959+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+45959+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1566003441; cv=none; d=zoho.com; s=zohoarc; b=a7cEMaW6OYynftP28oPgMB6hm41+81oMdXYhjy00lP+iVQYU67oScyOw0uXlsuPe1PbLIyQsDYYSN660r1v0lv4r0uHCdhhDMH/6DpVtkwnQXBFqkUXZ6Tnm3rh8VZlHby9oODqctKUwobX+lY1bmJ2JEgzjO70iLgYBRhAB7r4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1566003441; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To:ARC-Authentication-Results; bh=ecc02i0Lejs0IypJBt5QRCthO28aZGnmB2760FIiYnk=; b=FJGZwpsH4Zc9j8OOoo/AiF2sqmL5usxFeZg4Wd79uhb+q5ABdUpQY60QvWjkfljd5R3tvftgRyVycYrWv0+dGlo/vvd8JUk+3NCm0tq3gCsMyLpNvH6bwVpazEkXCqdJ9pgz8CVLJblGdnGk1chQtKdJ3F3JGCf/v2TVyER8lVc= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+45959+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1566003441659998.320936183705; Fri, 16 Aug 2019 17:57:21 -0700 (PDT) Return-Path: X-Received: from mga17.intel.com (mga17.intel.com []) by groups.io with SMTP; Fri, 16 Aug 2019 17:57:20 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Aug 2019 17:57:20 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,395,1559545200"; d="scan'208";a="171574101" X-Received: from mdkinney-mobl2.amr.corp.intel.com ([10.251.3.193]) by orsmga008.jf.intel.com with ESMTP; 16 Aug 2019 17:57:19 -0700 From: "Michael D Kinney" To: devel@edk2.groups.io Cc: Andrew Fish , Jordan Justen , Ray Ni Subject: [edk2-devel] [Patch V5 06/11] EmulatorPkg: Fix XCODE5 lldb issues Date: Fri, 16 Aug 2019 17:57:10 -0700 Message-Id: <20190817005715.9856-7-michael.d.kinney@intel.com> In-Reply-To: <20190817005715.9856-1-michael.d.kinney@intel.com> References: <20190817005715.9856-1-michael.d.kinney@intel.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,michael.d.kinney@intel.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=1566003441; bh=4UgzUwIafKMN3h3YJdgtg3zxtklOSYt/JqLBonH0ccI=; h=Cc:Date:From:Reply-To:Subject:To; b=CxRex++F3KBOFH+y8QMGE281QuQRTFrZdPOnVAdpXQv+Fw/JttKii3Fs+RWBVTO8QUU Sq0R6jcf5elR8FWlxlt/OCudQXDN1gIdwEmOjX4ad3gIbCyymfyOnyIgVucG3QzfCc2Wh O1unK30k6DoCmV49iS6/GnYUMpttBGHyBhU= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" From: Andrew Fish Fix scripts to support lldb symbolic debugging when using XCODE5 tool chain. Cc: Jordan Justen Cc: Ray Ni Cc: Michael D Kinney Signed-off-by: Andrew Fish Reviewed-by: Michael D Kinney Tested-by: Andrew Fish --- EmulatorPkg/Unix/lldbefi.py | 8 +++++--- EmulatorPkg/build.sh | 21 ++++++--------------- 2 files changed, 11 insertions(+), 18 deletions(-) diff --git a/EmulatorPkg/Unix/lldbefi.py b/EmulatorPkg/Unix/lldbefi.py index 218326b8cb..099192d8b5 100755 --- a/EmulatorPkg/Unix/lldbefi.py +++ b/EmulatorPkg/Unix/lldbefi.py @@ -346,6 +346,7 @@ def TypePrintFormating(debugger): debugger.HandleCommand("type summary add CHAR8 --python-function lldbe= fi.CHAR8_TypeSummary") debugger.HandleCommand('type summary add --regex "CHAR8 \[[0-9]+\]" --= python-function lldbefi.CHAR8_TypeSummary') =20 + debugger.HandleCommand('setting set frame-format "frame #${frame.index= }: ${frame.pc}{ ${module.file.basename}{:${function.name}()${function.pc-of= fset}}}{ at ${line.file.fullpath}:${line.number}}\n"') =20 gEmulatorBreakWorkaroundNeeded =3D True =20 @@ -381,15 +382,16 @@ def LoadEmulatorEfiSymbols(frame, bp_loc , internal_d= ict): Error =3D lldb.SBError() FileNamePtr =3D frame.FindVariable ("FileName").GetValueAsUnsigned() FileNameLen =3D frame.FindVariable ("FileNameLength").GetValueAsUnsign= ed() + 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) # make breakpoint command contiue - frame.GetThread().GetProcess().Continue() + return False =20 debugger =3D frame.thread.process.target.debugger if frame.FindVariable ("AddSymbolFlag").GetValueAsUnsigned() =3D=3D 1: - LoadAddress =3D frame.FindVariable ("LoadAddress").GetValueAsUnsig= ned() + 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) @@ -405,7 +407,7 @@ def LoadEmulatorEfiSymbols(frame, bp_loc , internal_dic= t): print "!lldb.target.RemoveModule (%s) FAILED" % SBModu= le =20 # make breakpoint command contiue - frame.thread.process.Continue() + return False =20 def GuidToCStructStr (guid, Name=3DFalse): # diff --git a/EmulatorPkg/build.sh b/EmulatorPkg/build.sh index 60056e1b6c..76c22dfaf8 100755 --- a/EmulatorPkg/build.sh +++ b/EmulatorPkg/build.sh @@ -209,21 +209,12 @@ fi if [[ "$RUN_EMULATOR" =3D=3D "yes" ]]; then case `uname` in Darwin*) - # - # On Darwin we can't use dlopen, so we have to load the real PE/COFF= images. - # This .gdbinit script sets a breakpoint that loads symbols for the = PE/COFFEE - # images that get loaded in Host - # - if [[ "$CLANG_VER" =3D=3D *-ccc-host-triple* ]] - then - # only older versions of Xcode support -ccc-host-tripe, for newer ve= rsions - # it is -target - cp $WORKSPACE/EmulatorPkg/Unix/lldbefi.py "$BUILD_OUTPUT_DIR/${BUI= LDTARGET}_$TARGET_TOOLS/$PROCESSOR" - cd $BUILD_ROOT_ARCH; /usr/bin/lldb --source $WORKSPACE/EmulatorPkg= /Unix/lldbinit Host - exit $?=20 - else - cp $WORKSPACE/EmulatorPkg/Unix/.gdbinit "$BUILD_OUTPUT_DIR/${BUILD= TARGET}_$TARGET_TOOLS/$PROCESSOR" - fi + cd $BUILD_ROOT_ARCH + /usr/bin/lldb \ + -o "command script import $WORKSPACE/EmulatorPkg/Unix/lldbefi.py" \ + -o 'script lldb.debugger.SetAsync(True)' \ + -o "run" ./Host + exit $? ;; esac =20 --=20 2.21.0.windows.1 -=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 (#45959): https://edk2.groups.io/g/devel/message/45959 Mute This Topic: https://groups.io/mt/32918480/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-