<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class="">Tested-by: Andrew Fish <<a href="mailto:afish@apple.com" class="">afish@apple.com</a>></span><div class=""><font color="#000000" class=""><span style="caret-color: rgb(0, 0, 0);" class=""><br class=""></span></font></div><div class=""><font color="#000000" class=""><span style="caret-color: rgb(0, 0, 0);" class="">I tested the XCODE builds of the emulator and made sure that source level debugging worked probably for builds that generate symbols. </span></font></div><div class=""><font color="#000000" class=""><span style="caret-color: rgb(0, 0, 0);" class=""><br class=""></span></font></div><div class=""><font color="#000000" class=""><span style="caret-color: rgb(0, 0, 0);" class="">Thanks,</span></font></div><div class=""><font color="#000000" class=""><span style="caret-color: rgb(0, 0, 0);" class=""><br class=""></span></font></div><div class=""><font color="#000000" class=""><span style="caret-color: rgb(0, 0, 0);" class="">Andrew Fish<br class=""></span></font><div><br class=""><blockquote type="cite" class=""><div class="">On Aug 16, 2019, at 8:09 AM, Michael D Kinney <<a href="mailto:michael.d.kinney@intel.com" class="">michael.d.kinney@intel.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">Jordan,<br class=""><br class="">It is not a typo.<br class=""><br class="">Andrew generated the XCODE specific changes, so they have <br class="">been tested by him.  I have also reviewed and tested the XCODE<br class="">changes and verified that all 6 combinations build and boot<br class="">to shell (IA32/X64 for RELEASE/DEBUG/NOOPT). Since they are<br class="">all related to making EmulatorPkg work, we decided to fold<br class="">them into the same patch set that was already being reviewed.<br class=""><br class="">I also verified build and boot to shell for 6 combinations<br class="">on GCC5 (IA32/X64 for RELEASE/DEBUG/NOOPT) and the 12<br class="">combinations of VS2015/VS2017, IA323/X64, RELEASE/DEBUG/NOOPT.<br class=""><br class="">I have been working on some CI experiments using Azure Pipelines.<br class="">Here is a pointer to the build logs for all the combinations <br class="">listed above.<br class=""><br class=""><a href="https://dev.azure.com/mikekinney/edk2-ci/_build/results?buildId=312" class="">https://dev.azure.com/mikekinney/edk2-ci/_build/results?buildId=312</a><br class=""><br class="">Mike<br class=""><br class=""><blockquote type="cite" class="">-----Original Message-----<br class="">From: Justen, Jordan L<br class="">Sent: Friday, August 16, 2019 12:41 AM<br class="">To: Kinney, Michael D <michael.d.kinney@intel.com>;<br class="">devel@edk2.groups.io<br class="">Cc: Ni, Ray <ray.ni@intel.com>; Andrew Fish<br class=""><afish@apple.com><br class="">Subject: Re: [Patch V4 06/10] EmulatorPkg: Fix XCODE5<br class="">lldb issues<br class=""><br class="">On 2019-08-15 19:14:33, Michael D Kinney wrote:<br class=""><blockquote type="cite" class="">Fix scripts to support lldb symbolic debugging when<br class=""></blockquote>using XCODE5 tool<br class=""><blockquote type="cite" class="">chain.<br class=""><br class="">Cc: Jordan Justen <jordan.l.justen@intel.com><br class="">Cc: Ray Ni <ray.ni@intel.com><br class="">Cc: Michael D Kinney <michael.d.kinney@intel.com><br class="">Signed-off-by: Andrew Fish <afish@apple.com><br class=""></blockquote><br class="">Is this a Cc/Signed-off-by typo? (See also, patches 7-<br class="">10).<br class=""><br class="">This makes me wonder if you are taking advantage of the<br class="">git commit -s switch to add your Signed-off-by.<br class=""><br class="">Also, I'm wondering if you are taking advantage of git-<br class="">send-email automatically Cc'ing the addresses you<br class="">listed in the commit message.<br class="">(I thought it Cc'd for the author and Cc tags, but I<br class="">wasn't sure about the Signed-off-by tag, and yet I see<br class="">Andrew was Cc'd.)<br class=""><br class="">There's a couple long lines below. You could use \ at<br class="">the end of the line to split the .sh line. I think the<br class="">cd can be a separate command in a shell script. (Not in<br class="">make)<br class=""><br class="">I hope someone that uses the XCODE toolchain could<br class="">review/check the XCODE patches.<br class=""><br class="">-Jordan<br class=""><br class=""><blockquote type="cite" class="">---<br class=""> EmulatorPkg/Unix/lldbefi.py |  8 +++++---<br class=""> EmulatorPkg/build.sh        | 17 ++---------------<br class=""> 2 files changed, 7 insertions(+), 18 deletions(-)<br class=""><br class="">diff --git a/EmulatorPkg/Unix/lldbefi.py<br class=""></blockquote>b/EmulatorPkg/Unix/lldbefi.py<br class=""><blockquote type="cite" class="">index 218326b8cb..099192d8b5 100755<br class="">--- a/EmulatorPkg/Unix/lldbefi.py<br class="">+++ b/EmulatorPkg/Unix/lldbefi.py<br class="">@@ -346,6 +346,7 @@ def TypePrintFormating(debugger):<br class="">     debugger.HandleCommand("type summary add CHAR8 -<br class=""></blockquote>-python-function lldbefi.CHAR8_TypeSummary")<br class=""><blockquote type="cite" class="">     debugger.HandleCommand('type summary add --regex<br class=""></blockquote>"CHAR8<br class=""><blockquote type="cite" class="">\[[0-9]+\]" --python-function<br class=""></blockquote>lldbefi.CHAR8_TypeSummary')<br class=""><blockquote type="cite" class=""><br class="">+    debugger.HandleCommand('setting set frame-format<br class=""></blockquote>"frame<br class=""><blockquote type="cite" class="">+ #${frame.index}: ${frame.pc}{<br class="">+<br class=""></blockquote>${module.file.basename}{:${function.name}()${function.p<br class="">c-offset}}}{<br class=""><blockquote type="cite" class="">+ at ${line.file.fullpath}:${line.number}}\n"')<br class=""><br class=""> gEmulatorBreakWorkaroundNeeded = True<br class=""><br class="">@@ -381,15 +382,16 @@ def<br class=""></blockquote>LoadEmulatorEfiSymbols(frame, bp_loc , internal_dict):<br class=""><blockquote type="cite" class="">     Error = lldb.SBError()<br class="">     FileNamePtr = frame.FindVariable<br class=""></blockquote>("FileName").GetValueAsUnsigned()<br class=""><blockquote type="cite" class="">     FileNameLen = frame.FindVariable<br class="">("FileNameLength").GetValueAsUnsigned()<br class="">+<br class="">     FileName =<br class=""></blockquote>frame.thread.process.ReadCStringFromMemory<br class="">(FileNamePtr, FileNameLen, Error)<br class=""><blockquote type="cite" class="">     if not Error.Success():<br class="">         print "!ReadCStringFromMemory() did not find<br class=""></blockquote>a %d byte C string at %x" % (FileNameLen, FileNamePtr)<br class=""><blockquote type="cite" class="">         # make breakpoint command contiue<br class="">-        frame.GetThread().GetProcess().Continue()<br class="">+        return False<br class=""><br class="">     debugger = frame.thread.process.target.debugger<br class="">     if frame.FindVariable<br class=""></blockquote>("AddSymbolFlag").GetValueAsUnsigned() == 1:<br class=""><blockquote type="cite" class="">-        LoadAddress = frame.FindVariable<br class=""></blockquote>("LoadAddress").GetValueAsUnsigned()<br class=""><blockquote type="cite" class="">+        LoadAddress = frame.FindVariable<br class="">+ ("LoadAddress").GetValueAsUnsigned() - 0x240<br class=""><br class="">         debugger.HandleCommand ("target modules add<br class=""></blockquote>%s" % FileName)<br class=""><blockquote type="cite" class="">         print "target modules load --slid 0x%x %s" %<br class=""></blockquote>(LoadAddress,<br class=""><blockquote type="cite" class="">FileName) @@ -405,7 +407,7 @@ def<br class=""></blockquote>LoadEmulatorEfiSymbols(frame, bp_loc , internal_dict):<br class=""><blockquote type="cite" class="">                     print "!lldb.target.RemoveModule<br class=""></blockquote>(%s) FAILED" %<br class=""><blockquote type="cite" class="">SBModule<br class=""><br class="">     # make breakpoint command contiue<br class="">-    frame.thread.process.Continue()<br class="">+    return False<br class=""><br class=""> def GuidToCStructStr (guid, Name=False):<br class="">   #<br class="">diff --git a/EmulatorPkg/build.sh<br class=""></blockquote>b/EmulatorPkg/build.sh index<br class=""><blockquote type="cite" class="">60056e1b6c..35912a7775 100755<br class="">--- a/EmulatorPkg/build.sh<br class="">+++ b/EmulatorPkg/build.sh<br class="">@@ -209,21 +209,8 @@ fi<br class=""> if [[ "$RUN_EMULATOR" == "yes" ]]; then<br class="">   case `uname` in<br class="">     Darwin*)<br class="">-      #<br class="">-      # On Darwin we can't use dlopen, so we have to<br class=""></blockquote>load the real PE/COFF images.<br class=""><blockquote type="cite" class="">-      # This .gdbinit script sets a breakpoint that<br class=""></blockquote>loads symbols for the PE/COFFEE<br class=""><blockquote type="cite" class="">-      # images that get loaded in Host<br class="">-      #<br class="">-      if [[ "$CLANG_VER" == *-ccc-host-triple* ]]<br class="">-      then<br class="">-      # only older versions of Xcode support -ccc-<br class=""></blockquote>host-tripe, for newer versions<br class=""><blockquote type="cite" class="">-      # it is -target<br class="">-        cp $WORKSPACE/EmulatorPkg/Unix/lldbefi.py<br class=""></blockquote>"$BUILD_OUTPUT_DIR/${BUILDTARGET}_$TARGET_TOOLS/$PROCES<br class="">SOR"<br class=""><blockquote type="cite" class="">-        cd $BUILD_ROOT_ARCH; /usr/bin/lldb --source<br class=""></blockquote>$WORKSPACE/EmulatorPkg/Unix/lldbinit Host<br class=""><blockquote type="cite" class="">-        exit $?<br class="">-      else<br class="">-        cp $WORKSPACE/EmulatorPkg/Unix/.gdbinit<br class=""></blockquote>"$BUILD_OUTPUT_DIR/${BUILDTARGET}_$TARGET_TOOLS/$PROCES<br class="">SOR"<br class=""><blockquote type="cite" class="">-      fi<br class="">+      cd $BUILD_ROOT_ARCH; /usr/bin/lldb -o "command<br class=""></blockquote>script import $WORKSPACE/EmulatorPkg/Unix/lldbefi.py" -<br class="">o 'script lldb.debugger.SetAsync(True)' -o "run" ./Host<br class=""><blockquote type="cite" class="">+      exit $?<br class="">       ;;<br class="">   esac<br class=""><br class="">--<br class="">2.21.0.windows.1<br class=""><br class=""></blockquote></blockquote><br class=""><br class=""><br class=""></div></div></blockquote></div><br class=""></div></body></html>

<div width="1" style="color:white;clear:both">_._,_._,_</div>
<hr>
Groups.io Links:<p>

You receive all messages sent to this group.


<p>

<a target="_blank" href="https://edk2.groups.io/g/devel/message/45837">View/Reply Online (#45837)</a> |


  


|


  
    <a target="_blank" href="https://groups.io/mt/32894351/1813853">Mute This Topic</a>
  

| <a href="https://edk2.groups.io/g/devel/post">New Topic</a><br>



<br>

<a href="https://edk2.groups.io/g/devel/editsub/1813853">Your Subscription</a> |
<a href="mailto:devel+owner@edk2.groups.io">Contact Group Owner</a> |

<a href="https://edk2.groups.io/g/devel/unsub">Unsubscribe</a>

 [edk2-devel-archive@redhat.com]<br>
<div width="1" style="color:white;clear:both">_._,_._,_</div>