Sign in to follow this  
Idov

PDB files and compilation options

Recommended Posts

Hi!
I'd like to know which flags were used when an executable was buillt.
for example, if it was built with /Oy - it means the frame pointer optimization was enabled. /ZI provides "edit & continue".
How can I find it?
Is this information even in the PDBs?
thanks :)

Share this post


Link to post
Share on other sites
As far as I know this information is not stored anywhere, because it is possible to build a PDB which makes debuggers barf (they can't tell it's from a different compilation of the same basic binary).

Consider that every compiler (and most versions of the same compiler line) will have different options, but anyone is free to generate a PDB.

Share this post


Link to post
Share on other sites
/Oy and /ZI should be fairly obvious from reading the disassembly. Compile some code with each option and examine the result and you'll see the differences (e.g. for /Oy look how the ebp and esp registers are used).

Also note that /Oy tends to confuse debuggers about what the call stack is when they don't have access to the .pdb file.

Other flags will not be so easy to check for by inspection of the code though.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this