tag:blogger.com,1999:blog-24744907.post6302503397180287761..comments2023-06-07T01:04:59.159-07:00Comments on UEFI: HOW-TO: Debug The EDK2's Windows-Hosted UEFI EnvironmentTim Lewishttp://www.blogger.com/profile/13740223047141525668noreply@blogger.comBlogger7125tag:blogger.com,1999:blog-24744907.post-5806095236175408332014-09-05T05:12:02.234-07:002014-09-05T05:12:02.234-07:00Tim, I got the .pdb file of my application but i a...Tim, I got the .pdb file of my application but i am confused how to add it to VS 2010 and debug my application. Actually SecMain.exe is not loading myapp.pdb automatically. so is there any other way to load it ?Anonymoushttps://www.blogger.com/profile/03765870073902216408noreply@blogger.comtag:blogger.com,1999:blog-24744907.post-10553112171558266752013-06-05T07:07:14.819-07:002013-06-05T07:07:14.819-07:00Did a solution ever come to not being able to debu...Did a solution ever come to not being able to debug your own application? I have the same problem as mentioned by Michael/pdplaza. I have built my own Efi application, when I dump the header I see a path to my pdb file which does infact exist. I am unable to set breakpoints in my own code in VS. I am able to thrown in a __breakdebug(), however it breaks outside of my code not in it. Being able to debug UEFI is great, but being able to debug my own code in UEFI would be even better.Stephhttps://www.blogger.com/profile/05906172873072997853noreply@blogger.comtag:blogger.com,1999:blog-24744907.post-61014545574596821782012-11-29T04:19:49.513-08:002012-11-29T04:19:49.513-08:00Hello,
I've got a very similar problem. When ...Hello,<br /><br />I've got a very similar problem. When I try to debug the HelloWorld.efi-application Visual Studio 2010 tells me that "There is no source code available for the current location."<br />And the command window with the SecMain.exe tells me:<br />WARNING: No source level debug d:\edk2\Build\NT32\DEBUG_VS2010_x86\IA32\MdeModulePkg\Application\HelloWorld\HelloWorld\DEBUG\HelloWorld.DLL<br />But in that exact location there is a HelloWorld.pdb-file and the header-entry in HelloWorld.efi points also to the correct pdb-file.<br />Any hints where to have a further look?<br /><br />Thanks. Regards,<br />MichaelMichaelhttps://www.blogger.com/profile/07485983078891348884noreply@blogger.comtag:blogger.com,1999:blog-24744907.post-53195647818022994352012-07-06T02:36:58.929-07:002012-07-06T02:36:58.929-07:00So, there should be a PDB file in e:\uefi\test\Bui...So, there should be a PDB file in e:\uefi\test\Build\NT32\DEBUG_MYTOOLS\IA32\MdeModulePkg\Application\HelloWorld\HelloWorld\DEBUG\HelloWorld.pdb. This file contains the debug information.Tim Lewishttps://www.blogger.com/profile/13740223047141525668noreply@blogger.comtag:blogger.com,1999:blog-24744907.post-78215183092251311122012-07-03T10:02:30.959-07:002012-07-03T10:02:30.959-07:00I built HelloWorld.efi by adding HelloWorld.inf to...I built HelloWorld.efi by adding HelloWorld.inf to Nt32.dsc and i executed the dumpbin command for HelloWorld.bin and out put is as follows<br /><br /> 00000000 cv 87 000027E8 27E8 Format: RSDS, {59806D35-3EF8-452D-8AEA-7BA3A0F802F3}, 1, e:\uefi\test\Build\NT32\DEBUG_MYTOOLS\IA32\MdeModulePkg\Application\HelloWorld\HelloWorld\DEBUG\HelloWorld.pdbpdplazahttps://www.blogger.com/profile/14111239224828244858noreply@blogger.comtag:blogger.com,1999:blog-24744907.post-846389994759851742012-06-22T16:00:41.887-07:002012-06-22T16:00:41.887-07:00So you actually built HelloWorld.efi? If you execu...So you actually built HelloWorld.efi? If you execute dumpbin /headers HelloWorld.efi, you should see that the debug section contains the path to the PDB file associated with the .efi file. For example, here's one from a recent build of mine:<br /><br /> 00000000 cv 7A 000185E0 185E0 Format: RSDS, {D45F7297-9F48-4<br />32D-AEB2-9EB8EB30AB8D}, 15, c:\frou\Build\NT32\DEBUG_VS2010\IA32\Sample\App<br />lication\SampleApp\SampleApp\DEBUG\SampleApp.pdb<br /><br />So, in order to debug, you need to have the PDB file in the same place it was on the build machine so that Visual Studio can find them.Tim Lewishttps://www.blogger.com/profile/13740223047141525668noreply@blogger.comtag:blogger.com,1999:blog-24744907.post-62921594211725810142012-06-21T02:16:59.012-07:002012-06-21T02:16:59.012-07:00How to debug HelloWorld sample application that is...How to debug HelloWorld sample application that is in MdeModulePkg\Application\. I tried to put break point in HelloWorld.c before executing helloWorld.efi from Shell, it is saying could not load debug symbols for HelloWorld.efi. I think HelloWorld program is not compiled for debug mode. What are the flags to be added for visual studio compiler for compiling UEFI applications in debug mode?pdplazahttps://www.blogger.com/profile/14111239224828244858noreply@blogger.com