From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: None (no SPF record) identity=mailfrom; client-ip=128.130.2.109; helo=mr.tuwien.ac.at; envelope-from=johannes.swoboda@student.tuwien.ac.at; receiver=edk2-devel@lists.01.org Received: from mr.tuwien.ac.at (mr1.kom.tuwien.ac.at [128.130.2.109]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 3086F22512153 for ; Fri, 20 Apr 2018 07:54:17 -0700 (PDT) X-Virus-Scanned: amavisd-new at vc1.kom.tuwien.ac.at Received: from mail.student.tuwien.ac.at (mail1.student.tuwien.ac.at [193.170.73.221]) by mr.tuwien.ac.at (8.14.4/8.14.4/Debian-2ubuntu2.1) with ESMTP id w3KEs6sM019019; Fri, 20 Apr 2018 16:54:06 +0200 MIME-Version: 1.0 Date: Fri, 20 Apr 2018 16:54:06 +0200 From: Johannes Swoboda To: Rebecca Cran , thomas.palmer@hpe.com, lersek@redhat.com, Laszlo Ersek Cc: Michael Kinney , edk2-devel@lists.01.org, clemens.hlauschek@inso.tuwien.ac.at In-Reply-To: <81abcc10-1c8c-1012-7c08-b9cd24efa85a@bluestop.org> References: <12fe2332-c864-60e1-4f12-280e9939449f@redhat.com> <81abcc10-1c8c-1012-7c08-b9cd24efa85a@bluestop.org> Message-ID: X-Sender: johannes.swoboda@student.tuwien.ac.at User-Agent: Roundcube Webmail/1.1.10 Subject: gdb reload-uefi missing EFI_SYSTEM_TABLE_POINTER [was: Source code debugging of OVMF] X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Apr 2018 14:54:18 -0000 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Hello, Thank you all for your insights. You advised me to use the scripts from [1]. I did so following this guide [2] (thank you also for putting it back up!), with the minor adaptions that I made the script python3-compatible[3], and applied the patches mentioned in [2] manually. I assume they failed because they could only be applied to older versions of the files to be patched. In particular, I added the line DebugPkg/GdbSyms/GdbSyms.inf right below line OvmfPkg/PlatformDxe/Platform.inf in line 830 of the vUDK2018 release. That makes sense, right? The guide looks promising; I think this would give me everything I need. However I ran into a problem when executing > (gdb) reload-uefi -o > ./Build/OvmfX64/DEBUG_GCC5/X64/DebugPkg/GdbSyms/GdbSyms/DEBUG/GdbSyms.dll gdb complained: > Python Exception No type named > EFI_SYSTEM_TABLE_POINTER.: > Error occurred in Python command: No type named > EFI_SYSTEM_TABLE_POINTER. The EFI_SYSTEM_TABLE_POINTER is defined in [WORKSPACE]/MdeModulePkg/Core/Dxe/Misc/DebugImageInfo.c, so I'm guessing I lack that file respectively its corresponding module. I compiled OVMF with nice OvmfPkg/build.sh -a X64 -n $(getconf _NPROCESSORS_ONLN). If you could tell me whether my guess make sense and how I would include [WORKSPACE]/MdeModulePkg/Core/Dxe/Misc/DebugImageInfo.c, that would be great. Kind regards, Johannes [1]: https://github.com/andreiw/andreiw-wip.git [2]: https://code.bluestop.org/w/tianocore/debugging-with-gdb/ [3]: https://github.com/johannesswoboda/andreiw-wip/blob/master/uefi/DebugPkg/Scripts/gdb_uefi.py - in case someone else needs it one day