views:

11

answers:

1

I have a small (<300 lines) C++ file in a C++ CLI project in Visual Studio 2010. I have crafted some macros which do different things depending on the Debug/Release configurations.

I would like to be able to look at the resulting .obj files (when I compile in Debug and Release) and be able to compare the two. The hard part is that files are binary and I do not understand their format.

I am sure there are other ways to ensure that the macro is not destructive - e.g. try it out at runtime in both modes, but that is a lot more time consuming. Plus, it would be cool to learn what those .obj have in them.

Thanks, let me know if you have questions.

+1  A: 

Dumpbin.exe has some options to peek an the .obj file content. Building the final DLL and looking at either the generated machine code with the debugger or the IL with Ildasm.exe or Reflector ought to be a lot more productive.

Hans Passant
Hans, please elaborate on how to use dumpbin.exe for .obj files.
Hamish Grubijan
Did you try it? Run it with the /all argument.
Hans Passant