From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.43, mailfrom: jordan.l.justen@intel.com) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by groups.io with SMTP; Fri, 16 Aug 2019 11:21:27 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Aug 2019 11:21:26 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,394,1559545200"; d="scan'208";a="182245440" Received: from adnanrez-mobl.amr.corp.intel.com (HELO localhost) ([10.255.228.102]) by orsmga006.jf.intel.com with ESMTP; 16 Aug 2019 11:21:26 -0700 MIME-Version: 1.0 In-Reply-To: References: <20190816021437.7516-1-michael.d.kinney@intel.com> <20190816021437.7516-7-michael.d.kinney@intel.com> <156594125657.32637.16775516269528755196@jljusten-skl> Subject: Re: [Patch V4 06/10] EmulatorPkg: Fix XCODE5 lldb issues From: "Jordan Justen" To: "Kinney, Michael D" , "devel@edk2.groups.io" Cc: "Ni, Ray" , Andrew Fish Message-ID: <156597968566.11297.10955010752246452994@jljusten-skl> User-Agent: alot/0.8 Date: Fri, 16 Aug 2019 11:21:25 -0700 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable On 2019-08-16 08:09:55, Kinney, Michael D wrote: > Jordan, >=20 > It is not a typo. >=20 > Andrew generated the XCODE specific changes, so they have=20 > been tested by him. In that case, is the git author for the patches set to Andrew? If it was, I would expect to see a line inside the email body with: From: Andrew Fish Git does that for patches where the sender doesn't match the patch author. You might want to rebase and run: git commit --amend --author=3D"Andrew Fish " --reset-author to change the author. I expect you might want to add Reviewed-by for yourself on these patches to help speed things along. If Andrew authored the patch, you reviewed it, and with a quick review it looked good to me, I would probably add an Acked-by for some of the patches. -Jordan > I have also reviewed and tested the XCODE > changes and verified that all 6 combinations build and boot > to shell (IA32/X64 for RELEASE/DEBUG/NOOPT). Since they are > all related to making EmulatorPkg work, we decided to fold > them into the same patch set that was already being reviewed. >=20 > I also verified build and boot to shell for 6 combinations > on GCC5 (IA32/X64 for RELEASE/DEBUG/NOOPT) and the 12 > combinations of VS2015/VS2017, IA323/X64, RELEASE/DEBUG/NOOPT. >=20 > I have been working on some CI experiments using Azure Pipelines. > Here is a pointer to the build logs for all the combinations=20 > listed above. >=20 > https://dev.azure.com/mikekinney/edk2-ci/_build/results?buildId=3D312 >=20 > Mike >=20 > > -----Original Message----- > > From: Justen, Jordan L > > Sent: Friday, August 16, 2019 12:41 AM > > To: Kinney, Michael D ; > > devel@edk2.groups.io > > Cc: Ni, Ray ; Andrew Fish > > > > Subject: Re: [Patch V4 06/10] EmulatorPkg: Fix XCODE5 > > lldb issues > >=20 > > On 2019-08-15 19:14:33, Michael D Kinney wrote: > > > 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 > >=20 > > Is this a Cc/Signed-off-by typo? (See also, patches 7- > > 10). > >=20 > > This makes me wonder if you are taking advantage of the > > git commit -s switch to add your Signed-off-by. > >=20 > > Also, I'm wondering if you are taking advantage of git- > > send-email automatically Cc'ing the addresses you > > listed in the commit message. > > (I thought it Cc'd for the author and Cc tags, but I > > wasn't sure about the Signed-off-by tag, and yet I see > > Andrew was Cc'd.) > >=20 > > There's a couple long lines below. You could use \ at > > the end of the line to split the .sh line. I think the > > cd can be a separate command in a shell script. (Not in > > make) > >=20 > > I hope someone that uses the XCODE toolchain could > > review/check the XCODE patches. > >=20 > > -Jordan > >=20 > > > --- > > > EmulatorPkg/Unix/lldbefi.py | 8 +++++--- > > > EmulatorPkg/build.sh | 17 ++--------------- > > > 2 files changed, 7 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 lldbefi.CHAR8_TypeSummary") > > > debugger.HandleCommand('type summary add --regex > > "CHAR8 > > > \[[0-9]+\]" --python-function > > lldbefi.CHAR8_TypeSummary') > > > > > > + debugger.HandleCommand('setting set frame-format > > "frame > > > + #${frame.index}: ${frame.pc}{ > > > + > > ${module.file.basename}{:${function.name}()${function.p > > c-offset}}}{ > > > + at ${line.file.fullpath}:${line.number}}\n"') > > > > > > gEmulatorBreakWorkaroundNeeded =3D True > > > > > > @@ -381,15 +382,16 @@ def > > LoadEmulatorEfiSymbols(frame, bp_loc , internal_dict): > > > Error =3D lldb.SBError() > > > FileNamePtr =3D frame.FindVariable > > ("FileName").GetValueAsUnsigned() > > > FileNameLen =3D frame.FindVariable > > > ("FileNameLength").GetValueAsUnsigned() > > > + > > > 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 > > > > > > debugger =3D frame.thread.process.target.debugger > > > if frame.FindVariable > > ("AddSymbolFlag").GetValueAsUnsigned() =3D=3D 1: > > > - LoadAddress =3D frame.FindVariable > > ("LoadAddress").GetValueAsUnsigned() > > > + LoadAddress =3D frame.FindVariable > > > + ("LoadAddress").GetValueAsUnsigned() - 0x240 > > > > > > debugger.HandleCommand ("target modules add > > %s" % FileName) > > > print "target modules load --slid 0x%x %s" % > > (LoadAddress, > > > FileName) @@ -405,7 +407,7 @@ def > > LoadEmulatorEfiSymbols(frame, bp_loc , internal_dict): > > > print "!lldb.target.RemoveModule > > (%s) FAILED" % > > > SBModule > > > > > > # make breakpoint command contiue > > > - frame.thread.process.Continue() > > > + return False > > > > > > def GuidToCStructStr (guid, Name=3DFalse): > > > # > > > diff --git a/EmulatorPkg/build.sh > > b/EmulatorPkg/build.sh index > > > 60056e1b6c..35912a7775 100755 > > > --- a/EmulatorPkg/build.sh > > > +++ b/EmulatorPkg/build.sh > > > @@ -209,21 +209,8 @@ 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 versions > > > - # it is -target > > > - cp $WORKSPACE/EmulatorPkg/Unix/lldbefi.py > > "$BUILD_OUTPUT_DIR/${BUILDTARGET}_$TARGET_TOOLS/$PROCES > > SOR" > > > - cd $BUILD_ROOT_ARCH; /usr/bin/lldb --source > > $WORKSPACE/EmulatorPkg/Unix/lldbinit Host > > > - exit $? > > > - else > > > - cp $WORKSPACE/EmulatorPkg/Unix/.gdbinit > > "$BUILD_OUTPUT_DIR/${BUILDTARGET}_$TARGET_TOOLS/$PROCES > > SOR" > > > - 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 > > > > > > -- > > > 2.21.0.windows.1 > > >