[if gte mso 9]>
Subject: Re: [edk2] Problems with generation of debug symbols when using visual studio compiler
From: "Gray, Zachary C" <email@example.com>
To: "firstname.lastname@example.org" <email@example.com>
Date: 2012-07-31 14:55:10
It never fails, if I want to make myself look like a fool I only need to post to a public mailing list… Thanks for the hint, this fixed it, I never noticed the level of optimization *or* the fact that there was a third build variant.
Have you tried a NOOPT vs. DEBUG build? The debug build has optimizations cranked way up for your compiler to make stuff fit, so maybe you are just seeing the compiler doing massive amounts of optimization?
DEBUG_VS2008_X64_CC_FLAGS = /nologo /c /WX /GS- /X /W4 /Gs32768 /D UNICODE /O1ib2s /GL /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Zi /Gm
RELEASE_VS2008_X64_CC_FLAGS = /nologo /c /WX /GS- /X /W4 /Gs32768 /D UNICODE /O1ib2s /GL /Gy /FIAutoGen.h /EHs-c- /GR- /GF
NOOPT_VS2008_X64_CC_FLAGS = /nologo /c /WX /GS- /X /W4 /Gs32768 /D UNICODE /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Zi /Gm /Od
On Jul 30, 2012, at 7:21 AM, Gray, Zachary C wrote:
I am building some test applications using the MdeModulePkg in UDK2010.SR1, I am using the “VS2008x86” toolchain…
When I compile for a 64-bit target I don’t seem to be getting debug symbols for all of the code, in particular my application code has no symbols at all. For example there are no line numbers for the UefiMain() application entrypoint function. But there are symbols for most of the boilerplate code such as the print functions in uefilibprint.c. These symbols are correct, I have verified them by manually looking at the line number to asm mapping, and I can set breakpoints, etc. So the toolchain is definitely compiling in debug mode and outputting a valid PDB file…
If I compile the exact same code for a 32-bit target I get symbols for my application code.
At first I suspected this was a problem with the debugger that I am using, but I found a utility in the MSDIA SDK called “dia2dump” and when I use that to examine the debug symbols for the 32-bit and 64-bit versions it shows the same results. This dia2dump utility is just sample code but seeing as how it ships with the DIA SDK I hope it is meaningful…
Has anyone seen an issue like this and are there any ideas on how to resolve it?
Dornacher Strasse 1
85622 Feldkirchen/Muenchen, Deutschland
Sitz der Gesellschaft: Feldkirchen bei Muenchen
Geschaeftsfuehrer: Douglas Lusk, Peter Gleissner, Hannes Schwaderer, Christian Lamprechter
Registergericht: Muenchen HRB 47456
Ust.-IdNr./VAT Registration No.: DE129385895
Citibank Frankfurt a.M. (BLZ 502 109 00) 600119052
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
edk2-devel mailing list