dumpbin with debug and release version

This is a discussion on dumpbin with debug and release version within the C Programming forums, part of the General Programming Boards category; Hello everyone,
Could dumpbin be used to check whether an executable or a DLL (written in Visual Studio C/C++ native ...

dumpbin with debug and release version

Hello everyone,

Could dumpbin be used to check whether an executable or a DLL (written in Visual Studio C/C++ native unmanaged) is debug version or release version? I use /headers option but can not see any differences.

If dumpbin can not be used to check debug or release, any other tool could be used?

Aside from symbols, I don't THINK there's any information stored in the executable file. And of course, there's no "law" against including symbols in a release build if you really want to - you may find that it's hard to debug the code, but it's perfectly valid.

If u'r executable was compiled in debug and if u wanted to debug it only by the debug utility (gbd) can identify that the exe has a debug information. Perhaps u might know as well. Cos when u compile the code u might have raised -g option to include the debug information as well. That can be read only by the gdb. dunno about windows.

If you do not raise any flags (-g) at the time of compilation u wont get those information included in your exe file.

There's no clear difference between "debug" and "release." It boils down to a set of flags. By definition, any code you release is a "release version." So in general this question can only be answered by asking somebody if it is meant for debug or release.

You can detect the presence of various debugging segments with a binary dumper. That tells you if symbolic debugging is enabled. But that doesn't necessarily mean you have a "debug build," you just have a build with debug info in it. Also, a build without debugging symbols might actually count as a "debug build" because it has certain options enabled -- extra logging, assert() checking, etc. Or maybe it has some preprocessor macro MY_MAGIC_DEBUG defined.

What makes something a debug build or a release build is merely whether somebody says so, what the intent is.

If u'r executable was compiled in debug and if u wanted to debug it only by the debug utility (gbd) can identify that the exe has a debug information. Perhaps u might know as well. Cos when u compile the code u might have raised -g option to include the debug information as well. That can be read only by the gdb. dunno about windows.

If you do not raise any flags (-g) at the time of compilation u wont get those information included in your exe file.

ssharish

This applies to gcc. Based on previous posts (and the fact that "dumpbin" is mentioned here), I think George is using MS Visual Studio tools - I could be wrong of course.

And a solution to the original problem would be to add a text-string that gets printed under some circumstances [e.g "app --version"] that is relying on the build mode e.g.: