From nobody Fri May 3 13:38:34 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+78042+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+78042+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1626911813; cv=none; d=zohomail.com; s=zohoarc; b=MpaylCYFJJH1i6UGwpoWMng64sLeoAvCfhcaYrl+al4/3eNawzLqjhPGSilYAGtR/gWhFRMiYBmbY30u01UvgoN52VDPkkNCGzo4GDmD9Q6+2Jb2ofDhjtx0cSy3Yu7xIC/czxETW27iPX9Lsz7/3qbkDKQMzrVGSX8hErQKp8o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1626911813; 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=MI6Oj05jZpBTfy9zo5w8+H84daEquQ+Ett5FnvvJzgA=; b=V7uN5+OZjxxo1nZb7ptxMyKQvMP/W00sf0OJ18DEVfUQefSU4Vqsqusv2FJB5YD5pUfeOPBgX9GG6VlvgTQ2PqqvZorWYxl7W1tO/PudA9ouXEaPg3SVGGxBPbXFoyNqrkUURnyjvJy8zDMFB63+magMYJGoCZkvH7hHbkvvJuE= 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+78042+1787277+3901457@groups.io Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1626911813269836.0397535745253; Wed, 21 Jul 2021 16:56:53 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id 2XwIYY1788612xGfdr7nDEUi; Wed, 21 Jul 2021 16:56:52 -0700 X-Received: from out03.mta.xmission.com (out03.mta.xmission.com [166.70.13.233]) by mx.groups.io with SMTP id smtpd.web11.1181.1626911812348346134 for ; Wed, 21 Jul 2021 16:56:52 -0700 X-Received: from in01.mta.xmission.com ([166.70.13.51]:51752) by out03.mta.xmission.com with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1m6M55-000aQX-FY; Wed, 21 Jul 2021 17:56:51 -0600 X-Received: from mta4.zcs.xmission.com ([166.70.13.68]:58242) by in01.mta.xmission.com with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1m6M52-00AkA6-QP; Wed, 21 Jul 2021 17:56:51 -0600 X-Received: from localhost (localhost [127.0.0.1]) by mta4.zcs.xmission.com (Postfix) with ESMTP id 9C12D500E25; Wed, 21 Jul 2021 17:56:48 -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 CaazMRveRpoe; Wed, 21 Jul 2021 17:56:48 -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 615825005AD; Wed, 21 Jul 2021 17:56:48 -0600 (MDT) From: "Rebecca Cran" To: devel@edk2.groups.io, Andrew Fish Cc: Rebecca Cran Date: Wed, 21 Jul 2021 17:56:41 -0600 Message-Id: <20210721235641.11491-1-rebecca@bsdio.com> MIME-Version: 1.0 X-XM-SPF: eid=1m6M52-00AkA6-QP;;;mid=<20210721235641.11491-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 sa06.xmission.com X-Spam-Level: *** X-Spam-Status: No, score=3.9 required=8.0 tests=ALL_TRUSTED,BAYES_50, DCC_CHECK_NEGATIVE,FVGT_m_MULTI_ODD,LotsOfNums_01,TR_XM_SB_Phish, TooManyTo_001,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.7 XMSubLong Long Subject * 0.3 TooManyTo_001 Multiple "To" Header Recipients 2x (uncommon) * 1.2 LotsOfNums_01 BODY: Lots of long strings of numbers * -0.0 DCC_CHECK_NEGATIVE Not listed in DCC * [sa06 1397; IP=ok Body=1 Fuz1=1] [Fuz2=1] * 0.4 FVGT_m_MULTI_ODD Contains multiple odd letter combinations * 1.5 XMSubPhish11 Phishy Language Subject * 0.0 TR_XM_SB_Phish Phishing flag in subject of message X-Spam-DCC: XMission; sa06 1397; IP=ok Body=1 Fuz1=1 Fuz2=1 X-Spam-Combo: ***;devel@edk2.groups.io, Andrew Fish X-Spam-Relay-Country: X-Spam-Timing: total 1827 ms - load_scoreonly_sql: 0.04 (0.0%), signal_user_changed: 11 (0.6%), b_tie_ro: 9 (0.5%), parse: 1.46 (0.1%), extract_message_metadata: 60 (3.3%), get_uri_detail_list: 12 (0.6%), tests_pri_-1000: 93 (5.1%), tests_pri_-950: 2.0 (0.1%), tests_pri_-900: 1.67 (0.1%), tests_pri_-90: 125 (6.9%), check_bayes: 111 (6.1%), b_tokenize: 32 (1.8%), b_tok_get_all: 22 (1.2%), b_comp_prob: 6 (0.3%), b_tok_touch_all: 45 (2.5%), b_finish: 0.92 (0.1%), tests_pri_0: 1069 (58.5%), check_dkim_signature: 0.76 (0.0%), check_dkim_adsp: 47 (2.5%), poll_dns_idle: 485 (26.6%), tests_pri_10: 3.0 (0.2%), tests_pri_500: 457 (25.0%), rewrite_mail: 0.00 (0.0%) Subject: [edk2-devel] [PATCH v2] Xcode.md: Update instructions to work on modern macOS and Xcode versions X-SA-Exim-Version: 4.2.1 (built Sat, 08 Feb 2020 21:53:50 +0000) 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: kaz4xXekfNOjWWTfZXGarRfvx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1626911812; bh=xPHF4Sx4aaqjWvjy3CmIeff8RWZ4jbD2Ej/Hfx1Vjxg=; h=Cc:Date:From:Reply-To:Subject:To; b=l3gr5QsIYQ8l4T5kxp8Mg9U/J2ibz3lg5CL02K/uvL2dZlLxYEf7rhb9RebFHXG6VgU 3wQnALFIPk0BjdOjynhSjH8iKZgLRDbqhytpV8JvcHJAsfwyxSUbSVqMt79gPv57qo3am OVn3PLCfWyTCSWcOIEls/En3nG/2gl8a+Us= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1626911814046100001 Content-Type: text/plain; charset="utf-8" The existing instructions no longer work on macOS Big Sur and Xcode 12.5. Update them to include for example using lldb instead of gdb, installing XQuartz, and using modern names such as macOS instead of Mac OS X. Also, since MacPorts is less popular these days, remove instructions for installing tools with it, leaving steps for using Homebrew. Signed-off-by: Rebecca Cran Reviewed-by: Andrew Fish --- Xcode.md | 172 +++++++++----------- 1 file changed, 78 insertions(+), 94 deletions(-) diff --git a/Xcode.md b/Xcode.md index 3d220a5..8af2653 100644 --- a/Xcode.md +++ b/Xcode.md @@ -1,43 +1,28 @@ -This page provides step-by-step instructions for setting up a [http://www.= tianocore.org/edk2/ EDK II] build environment on Mac OS X systems using the= Xcode development tools. These steps have been verified with macOS Sierra= Version 10.12.4 +This page provides step-by-step instructions for setting up a [EDK II](htt= ps://github.com/tianocore/tianocore.github.io/wiki/EDK-II) build environmen= t on macOS systems using the Xcode development tools. These steps have bee= n verified with macOS Big Sur 11.3.1 =20 -# Mac OS X Xcode -Download the latest version of [Xcode](https://developer.apple.com/xcode) = (9.4.1 as of this writing) from the Mac App Store. After installing Xcode,= you will additionally need to install the extra command-line tools. To do= this, at a Terminal prompt, enter: +# macOS Xcode +Download the latest version of [Xcode](https://developer.apple.com/xcode) = (12.5 as of 2021-05-09) from the Mac App Store. After installing Xcode, yo= u will additionally need to install the extra command-line tools. To do th= is, at a Terminal prompt, enter: ``` $ xcode-select --install ``` ## Additional Development Tools -While Xcode provides a full development environment as well as a suite of = different utilities, it does not provide all tools required for Tianocore d= evelopment. These tools can be provided in a number of ways, but the two m= ost popular ways come from [Brew](https://brew.sh) and [MacPorts](https://w= ww.macports.org/install.php). Installation information is provided at the = previous links. - -### MacPorts Tips -* If you work behind a firewall and need to pass your network traffic thro= ugh a proxy, ensure you set the environment variable RSYNC_PROXY to your ht= tp proxy in the form of `proxy.dns.name:port_number`. - * Remember that `sudo` by default drops most environment variables. Ad= d the `-E` option to tell `sudo` to keep your environment variables. -* When installing MacPorts packages, if you would like to build from sourc= e like traditional [FreeBSD Ports](https://en.wikipedia.org/wiki/FreeBSD_Po= rts) systems, add the `-s` option to the command line. Otherwise, default = behavior is to pull precompiled packages.=20 +While Xcode provides a full development environment as well as a suite of = different utilities, it does not provide all tools required for TianoCore d= evelopment. These tools can be provided in a number of ways, but the most = popular way comes from [Brew](https://brew.sh). Installation information i= s provided at the previous link. =20 ## Install mtoc The mtoc utility is required to convert from the macOS Mach-O image format= to the PE/COFF format as required by the UEFI specification. =20 ### Brew Instructions ``` -$ brew install mtoc -``` -## MacPorts Instructions -``` -$ sudo port install cctools +$ brew install mtoc ``` -By default, this will install `mtoc` at `/opt/local/bin/mtoc`. # Install NASM =20 -The assembler used for EDK II builds is Netwide Assembler (NASM). The late= st version of NASM is available from http://www.nasm.us/. +The assembler used for EDK II builds is Netwide Assembler (NASM). The late= st version of NASM is available from https://nasm.us/. ## Brew Instructions ``` $ brew install nasm $ brew upgrade nasm ``` -## MacPorts Instructions -``` -$ sudo port install nasm -``` -By default this installs `nasm` at `/opt/local/bin/nasm`. =20 # Install ACPI Compiler =20 @@ -47,26 +32,20 @@ In order to support EDK II firmware builds, the latest = version of the ASL compil $ brew install acpica $ brew upgrade acpica ``` -## MacPorts Install -``` -$ sudo port install acpica -``` -By default this installs `iasl` at `/opt/local/bin/iasl` + +# Install XQuartz + +The EmulatorPkg requires headers from X11, which are provided by the XQuar= tz project. Install it from https://www.xquartz.org/. =20 # Install QEMU Emulator =20 -On order to support running the OVMF platforms from the OvmfPkg, the QEMU = emulator from http://www.qemu.org/ must be installed. +On order to support running the OVMF platforms from the OvmfPkg, the QEMU = emulator from https://www.qemu.org/ must be installed. =20 ## Brew Install ``` $ brew install qemu $ brew upgrade qemu ``` -## MacPorts Install -``` -$ sudo port install qemu -``` -By default qemu is installed in `/opt/local/bin`. ## Update PATH environment variable =20 Tools installed using the `brew` command are placed in `/usr/local/bin`. = The `PATH` environment variable must be updated so the newly installed tool= s are used instead of older pre-installed tools. @@ -75,11 +54,6 @@ Tools installed using the `brew` command are placed in `= /usr/local/bin`. The `P export PATH=3D/usr/local/bin:$PATH ``` =20 -Tools installed using the `port` should automatically be in your shell's P= ATH. If not, you can manually set it by: -``` -export PATH=3D/opt/local/bin:$PATH -``` - # Verify tool versions =20 Run the following commands to verify the versions of the tools that have b= een installed. @@ -97,84 +71,94 @@ Pick the location you want to down load the files to an= d `cd` to that directory: ``` cd ~/work git clone https://github.com/tianocore/edk2.git +cd edk2 +git submodule update --init ``` =20 -# Build from Command Line/Debug with gdb +# Build from Command Line/Debug with lldb =20 -Build the UnixPkg: +Build the EmulatorPkg: =20 ``` -cd ~/work/edk2/UnixPkg +cd ~/work/edk2/EmulatorPkg ./build.sh ``` =20 -Debug the UnixPkg +Debug the EmulatorPkg =20 ``` ./build.sh run =20 -Building from: /Users/fish/work/edk2 +Initializing workspace +/Users/bcran/src/edk2/BaseTools +Loading previous configuration from /Users/bcran/src/edk2/Conf/BuildEnv.sh +Using EDK2 in-source Basetools +WORKSPACE: /Users/bcran/src/edk2 +EDK_TOOLS_PATH: /Users/bcran/src/edk2/BaseTools +CONF_PATH: /Users/bcran/src/edk2/Conf using prebuilt tools -Reading symbols for shared libraries ...... done -Breakpoint 1 at 0xce84: file /Users/fish/work/edk2/UnixPkg/Sec/SecMain.c, = line 1070. -(gdb)=20 -``` - -Type `r` at the gdb prompt (don't forget to hit carriage return) to boot t= he emulator. Ctrl-c in the terminal window will break in to gdb. bt is the = stack backtrace command: - -``` -^C -Program received signal SIGINT, Interrupt. -0x92423806 in __semwait_signal () -(gdb) bt -#0 0x92423806 in __semwait_signal () -#1 0x9244f441 in nanosleep$UNIX2003 () -#2 0x0000b989 in msSleep (Milliseconds=3D0x14) at /Users/fish/work/Migrat= ion/edk2/UnixPkg/Sec/UnixThunk.c:102 -#3 0x0000acf5 in UgaCheckKey (UgaIo=3D0x2078d0) at /Users/fish/work/Migra= tion/edk2/UnixPkg/Sec/UgaX11.c:380 -#4 0x0000d8b7 in _GasketUintn () at /Users/fish/work/Migration/edk2/Build= /Unix/DEBUG_XCODE32/IA32/UnixPkg/Sec/SecMain/OUTPUT/Ia32/Gasket.iii:63 -#5 0x0000d801 in GasketUgaCheckKey (UgaIo=3D0x2078d0) at /Users/fish/work= /Migration/edk2/UnixPkg/Sec/Gasket.c:406 -#6 0x454a25fb in UnixUgaSimpleTextInWaitForKey (Event=3D0x45603610, Conte= xt=3D0x45382110) at /Users/fish/work/Migration/edk2/UnixPkg/UnixUgaDxe/Unix= UgaInput.c:169 -#7 0x45faad3a in CoreDispatchEventNotifies (Priority=3D0x10) at /Users/fi= sh/work/Migration/edk2/MdeModulePkg/Core/Dxe/Event/Event.c:185 -#8 0x45faa639 in CoreRestoreTpl (NewTpl=3D0x4) at /Users/fish/work/Migrat= ion/edk2/MdeModulePkg/Core/Dxe/Event/Tpl.c:114 -#9 0x45f9f197 in CoreReleaseLock (Lock=3D0x45fb1024) at /Users/fish/work/= Migration/edk2/MdeModulePkg/Core/Dxe/Library/Library.c:102 -#10 0x45faabd6 in CoreReleaseEventLock () at /Users/fish/work/Migration/ed= k2/MdeModulePkg/Core/Dxe/Event/Event.c:113 -#11 0x45fab26c in CoreCheckEvent (UserEvent=3D0x45603210) at /Users/fish/w= ork/Migration/edk2/MdeModulePkg/Core/Dxe/Event/Event.c:562 -#12 0x45fab2db in CoreWaitForEvent (NumberOfEvents=3D0x1, UserEvents=3D0x4= 5f94cc4, UserIndex=3D0x45f94cb8) at /Users/fish/work/Migration/edk2/MdeModu= lePkg/Core/Dxe/Event/Event.c:621 -#13 0x49ce9557 in ?? () -#14 0x49cf0344 in ?? () -#15 0x49ce3bc2 in ?? () -#16 0x49ce3ae1 in ?? () -#17 0x45f9e4e3 in CoreStartImage (ImageHandle=3D0x49e31e10, ExitDataSize= =3D0x45f94eec, ExitData=3D0x45f94ee8) at /Users/fish/work/Migration/edk2/Md= eModulePkg/Core/Dxe/Image/Image.c:1260 -#18 0x4550cccc in BdsLibBootViaBootOption (Option=3D0x49ffa110, DevicePath= =3D0x49ffa190, ExitDataSize=3D0x45f94eec, ExitData=3D0x45f94ee8) at /Users/= fish/work/Migration/edk2/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsB= oot.c:382 -#19 0x455252a9 in BdsBootDeviceSelect () at /Users/fish/work/Migration/edk= 2/IntelFrameworkModulePkg/Universal/BdsDxe/BdsEntry.c:214 -#20 0x455255bc in BdsEntry (This=3D0x4552d01c) at /Users/fish/work/Migrati= on/edk2/IntelFrameworkModulePkg/Universal/BdsDxe/BdsEntry.c:356 -#21 0x45fad7e8 in DxeMain (HobStart=3D0x45f70010) at /Users/fish/work/Migr= ation/edk2/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c:425 -#22 0x45fadd1d in ProcessModuleEntryPointList (HobStart=3D0x42020000) at /= Users/fish/work/Migration/edk2/Build/Unix/DEBUG_XCODE32/IA32/MdeModulePkg/C= ore/Dxe/DxeMain/DEBUG/AutoGen.c:287 -#23 0x45f97773 in _ModuleEntryPoint (HobStart=3D0x42020000) at /Users/fish= /work/Migration/edk2/MdePkg/Library/DxeCoreEntryPoint/DxeCoreEntryPoint.c:54 -(gdb)=20 +(lldb) target create "./Host" +Current executable set to '/Users/bcran/src/edk2/Build/EmulatorX64/DEBUG_X= CODE5/X64/Host' (x86_64). +(lldb) command script import /Users/bcran/src/edk2/EmulatorPkg/Unix/lldbef= i.py +Type r to run emulator. SecLldbScriptBreak armed. EFI modules should now g= et source level debugging in the emulator. +(lldb) script lldb.debugger.SetAsync(True) +(lldb) run +Process 12155 launched: '/Users/bcran/src/edk2/Build/EmulatorX64/DEBUG_XCO= DE5/X64/Host' (x86_64) + +EDK II UNIX Host Emulation Environment from http://www.tianocore.org/edk2/ + BootMode 0x00 + OS Emulator passing in 128 KB of temp RAM at 0x102000000 to SEC + FD loaded from ../FV/FV_RECOVERY.fd at 0x102020000 contains SEC Core +... +``` + +Type `process interrupt` at the lldb prompt (don't forget to hit carriage = return) to pause execution. Ctrl-c in the terminal window will quit lldb. `= bt` is the stack backtrace command: + +``` +Process 12420 stopped +* thread #1, queue =3D 'com.apple.main-thread', stop reason =3D signal SIG= STOP + frame #0: 0x00007fff2033cc22 libsystem_kernel.dylib:__semwait_signal()= + 10 +libsystem_kernel.dylib`__semwait_signal: +-> 0x7fff2033cc22 <+10>: jae 0x7fff2033cc2c ; <+20> + 0x7fff2033cc24 <+12>: movq %rax, %rdi + 0x7fff2033cc27 <+15>: jmp 0x7fff2033b72d ; cerror + 0x7fff2033cc2c <+20>: retq +Target 0: (Host) stopped. +(lldb) bt +* thread #1, queue =3D 'com.apple.main-thread', stop reason =3D signal SIG= STOP + * frame #0: 0x00007fff2033cc22 libsystem_kernel.dylib:__semwait_signal()= + 10 + frame #1: 0x00007fff202bcc2a libsystem_c.dylib:nanosleep() + 196 + frame #2: 0x0000000100005e55 Host:SecCpuSleep() + 37 at /Users/bcran/s= rc/edk2/EmulatorPkg/Unix/Host/EmuThunk.c:334 + frame #3: 0x000000010000e96e Host:GasketSecCpuSleep() + 11 at /Users/b= cran/src/edk2/Build/EmulatorX64/DEBUG_XCODE5/X64/EmulatorPkg/Unix/Host/Host= /OUTPUT/X64/Gasket.iiii:283 + frame #4: 0x0000000106f985e9 DxeCore.dll:CoreDispatchEventNotifies() += 264 at /Users/bcran/src/edk2/MdeModulePkg/Core/Dxe/Event/Event.c:194 + frame #5: 0x0000000106f97fce DxeCore.dll:CoreRestoreTpl() + 227 at /Us= ers/bcran/src/edk2/MdeModulePkg/Core/Dxe/Event/Tpl.c:131 + frame #6: 0x0000000106f989db DxeCore.dll:CoreSignalEvent() + 111 at /U= sers/bcran/src/edk2/MdeModulePkg/Core/Dxe/Event/Event.c:566 + frame #7: 0x0000000106f98b01 DxeCore.dll:CoreWaitForEvent() + 94 at /U= sers/bcran/src/edk2/MdeModulePkg/Core/Dxe/Event/Event.c:707 + frame #8: 0x0000000113e8e54c BdsDxe.dll:BdsWaitForSingleEvent() + 127 = at /Users/bcran/src/edk2/MdeModulePkg/Universal/BdsDxe/BdsEntry.c:250 + frame #9: 0x0000000113e8e70b BdsDxe.dll:BdsWait() + 215 at /Users/bcra= n/src/edk2/MdeModulePkg/Universal/BdsDxe/BdsEntry.c:328 + frame #10: 0x0000000113e8dffb BdsDxe.dll:BdsEntry() + 2612 at /Users/b= cran/src/edk2/MdeModulePkg/Universal/BdsDxe/BdsEntry.c:1012 + frame #11: 0x0000000106f9bbd6 DxeCore.dll:DxeMain() + 2791 at /Users/b= cran/src/edk2/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c:551 + frame #12: 0x0000000106f9ed8f DxeCore.dll:_ModuleEntryPoint() + 20 at = /Users/bcran/src/edk2/MdePkg/Library/DxeCoreEntryPoint/DxeCoreEntryPoint.c:= 48 + frame #13: 0x0000000106fdd02f DxeIpl.dll:InternalSwitchStack() + 15 + frame #14: 0x0000000106fdc0b6 DxeIpl.dll:HandOffToDxeCore() + 546 at /= Users/bcran/src/edk2/MdeModulePkg/Core/DxeIplPeim/X64/DxeLoadFunc.c:126 + frame #15: 0x0000000106fda78a DxeIpl.dll:DxeLoadCore() + 1354 at /User= s/bcran/src/edk2/MdeModulePkg/Core/DxeIplPeim/DxeLoad.c:449 + frame #16: 0x0000000106ff1d7c + frame #17: 0x00000001020255c6 PeiCore.dll:PeiCore() + 1982 at /Users/b= cran/src/edk2/MdeModulePkg/Core/Pei/PeiMain/PeiMain.c:331 + frame #18: 0x000000010202a82c PeiCore.dll:PeiCheckAndSwitchStack() + 1= 171 at /Users/bcran/src/edk2/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c:= 842 + frame #19: 0x000000010202b853 PeiCore.dll:PeiDispatcher() + 1206 at /U= sers/bcran/src/edk2/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c:1609 +(lldb) + ``` =20 # Build and Debug from Xcode -To build from the Xcode GUI open ~/work/edk2/UnixPkg/Xcode/xcode_project/x= code_project.xcodeproj. You can build, clean, and source level debug from= the Xcode GUI. You can hit the Build and Debug button to start the build p= rocess. You need to need to hit command-shift-B to show the output of the b= uild. Click Pause to break into the debugger. - -[[File:Xcode.jpg]] +To build from the Xcode GUI open ~/work/edk2/EmulatorPkg/Unix/Xcode/xcode_= project64/xcode_project.xcodeproj. You can build, clean, and source level d= ebug from the Xcode GUI. You can hit the Build and Debug button to start th= e build process. You need to need to hit command-shift-B to show the output= of the build. Click Pause to break into the debugger. =20 The stack trace contains items that show as ?? since the default shell is = checked in as a binary. `nanosleep$UNIX2003` and `__semwait_signal` are POS= IX library calls and you do not get C source debug with these symbols. =20 -# Source Level Debug Shell=20 - -It is possible to get source level debug for the EFI Shell by pulling thes= e projects from source control and building them. - -Instructions for building and hooking in the shell are located in the [htt= ps://sourceforge.net/apps/mediawiki/tianocore/index.php?title=3DGcc-shell g= cc-shell] project. - -Please note the gcc-shell and UnixPkg build separately, so if you update s= hell code you need to build the shell to see the changes. The following scr= een shot shows being able to source level debug the shell: - -[[File:Xcode_good.jpg]] +*Note* The Xcode project is currently (as of 2021-05-09) broken. =20 # See Also =20 -* [[Step-by-step instructions]] - # Continue with common instructions =20 -The [remaining instructions](../Common-instructions) are common for most U= NIX-like systems. +The [remaining instructions](https://github.com/tianocore/tianocore.github= .io/wiki/Common-instructions-for-Unix) are common for most UNIX-like system= s. --=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 (#78042): https://edk2.groups.io/g/devel/message/78042 Mute This Topic: https://groups.io/mt/84369241/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-