debug-symbols

How to tell if a .NET application was compiled in DEBUG or RELEASE mode?

十年热恋 提交于 2019-11-26 06:00:49
问题 I have an application installed on my computer. How do I find out if it was compiled in DEBUG mode or not? I\'ve tried to use .NET Reflector, but it does not show anything specific. Here is what I see: // Assembly APPLICATION_NAME, Version 8.0.0.15072 Location: C:\\APPLICATION_FOLDER\\APPLICATION_NAME.exe Name: APPLICATION_NAME, Version=8.0.0.15072, Culture=neutral, PublicKeyToken=null Type: Windows Application 回答1: I blogged this a long time ago, and I don't know if it still valid or not,

How can I tell if a library was compiled with -g?

萝らか妹 提交于 2019-11-26 05:16:40
问题 I have some compiled libraries on x86 Linux and I want to quickly determine whether they were compiled with debugging symbols. 回答1: If you're running on Linux, use objdump --debugging . There should be an entry for each object file in the library. For object files without debugging symbols, you'll see something like: objdump --debugging libvoidincr.a In archive libvoidincr.a: voidincr.o: file format elf64-x86-64 If there are debugging symbols, the output will be much more verbose. 回答2: The

#if DEBUG vs. Conditional(“DEBUG”)

十年热恋 提交于 2019-11-26 03:19:11
问题 Which is better to use, and why, on a large project: #if DEBUG public void SetPrivateValue(int value) { ... } #endif or [System.Diagnostics.Conditional(\"DEBUG\")] public void SetPrivateValue(int value) { ... } 回答1: It really depends on what you're going for: #if DEBUG : The code in here won't even reach the IL on release. [Conditional("DEBUG")] : This code will reach the IL, however calls to the method will be omitted unless DEBUG is set when the caller is compiled. Personally I use both

How to set up symbols in WinDbg?

流过昼夜 提交于 2019-11-25 22:34:27
问题 I am using Debugging Tools for Windows and I get the following error message when starting WinDbg / cdb or ntsd: Symbol search path is: *** Invalid *** **************************************************************************** * Symbol loading may be unreliable without a symbol search path. * * Use .symfix to have the debugger choose a symbol path. * * After setting your symbol path, use .reload to refresh symbol locations. * *****************************************************************