- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Compiling any program with /Qparallel enabled causes debug symbols to be emitted and stored in the executable file. Details of many functions appear in the executable file using the standard source file name;function name;line number syntax. Setting the /debug:none option or using the Microsoft /NDEBUG (from within Visual Studio) flag does not alter the inclusion of symbol information in the executable file.
This behavior was noted last year with version 11.0.072 of the Intel C++ Compiler. It persists with version 11.1.065. Compiling a simple "Hello World" application either from the ICL command line or within Visual Studio 2008 when /Qparallel is enabled generates start/end symbol information in the executable file. Compiling:
inserts debug symbols for _main into the executable:
;_main;5;5; Function start
;_main;7;7; Function end
For a non-trivial program, the included debug symbol weight quickly becomes substantial. If /Qparallel is not specified, no debug symbol information is included in the executable. Unfortunately, that does not help much when parallelization is needed.
This behavior was noted last year with version 11.0.072 of the Intel C++ Compiler. It persists with version 11.1.065. Compiling a simple "Hello World" application either from the ICL command line or within Visual Studio 2008 when /Qparallel is enabled generates start/end symbol information in the executable file. Compiling:
[bash]#includeusing compiler options: /c /O2 /Oi /Qipo /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_UNICODE" /D "UNICODE" /EHsc /MD /GS /Gy /fp:fast /Fo"Release/" /W3 /nologo /Zi /Qparallel /Qvc9 /Qlocation,link,"c:\\Program Files (x86)\\Microsoft Visual Studio 9.0\\VC\\bin" .\\DebugTest.cpp
int main(int argc, char** argv[])
{
printf("Hello world\n");
}[/bash]
inserts debug symbols for _main into the executable:
For a non-trivial program, the included debug symbol weight quickly becomes substantial. If /Qparallel is not specified, no debug symbol information is included in the executable. Unfortunately, that does not help much when parallelization is needed.
Link Copied
5 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm not seeing the problem on Mac:
schouten@schouten-mac02: u74240$ icc -c -parallel hello.cpp
schouten@schouten-mac02: u74240$ dwarfdump hello.o
----------------------------------------------------------------------
File: hello.o (x86_64)
----------------------------------------------------------------------
.debug_info contents:
< EMPTY >
schouten@schouten-mac02: u74240$
On windows, I'm not seeing anything emitted either, neither a .pdb file or anything in the .exe (when I use icc /Qparallel hello.cpp). If I use /Zi, then I see the debug info, which is what I expect.
Can you describe exactly how you detect the presence of debug info in the exe? I see similar results with and without /Zi if I use cl or icl, so I guess I'm a little confused as to exactly what you're seeing.
Thanks!
Dale
schouten@schouten-mac02: u74240$ icc -c -parallel hello.cpp
schouten@schouten-mac02: u74240$ dwarfdump hello.o
----------------------------------------------------------------------
File: hello.o (x86_64)
----------------------------------------------------------------------
.debug_info contents:
< EMPTY >
schouten@schouten-mac02: u74240$
On windows, I'm not seeing anything emitted either, neither a .pdb file or anything in the .exe (when I use icc /Qparallel hello.cpp). If I use /Zi, then I see the debug info, which is what I expect.
Can you describe exactly how you detect the presence of debug info in the exe? I see similar results with and without /Zi if I use cl or icl, so I guess I'm a little confused as to exactly what you're seeing.
Thanks!
Dale
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'll need to check on a Mac again later to make sure of the symbols. In a
Windows environment the executable file contains symbols. I realized
that the command line I posted above had the /Zi switch. I was
experimenting with all the Debug Info formats to see if that had any
influence on the executable contents (from a debug symbols standpoint).
They did not.
Open the generated executable file in a hex viewer. There will be lines for each function using the syntax:
;C:\Dev\Projects\Temp\DebugTest\DebugTest.cpp;_main;5;5;;
Translation: ; ; ; ; ;;
In projects that are less trivial, numerous such symbol references appear. These include ones from external libraries including Intel's Performance Primitives. For example, oone of our applications includes references to different Intel developer's D: drives, e.g.
;D:\users\nbtester\x86win_nightly\branch-11_1\20100415_000000\libdev\libm\real\pow_sse2.c;___libm_sse2_pow
Open the generated executable file in a hex viewer. There will be lines for each function using the syntax:
;C:\Dev\Projects\Temp\DebugTest\DebugTest.cpp;_main;5;5;;
Translation: ;
In projects that are less trivial, numerous such symbol references appear. These include ones from external libraries including Intel's Performance Primitives. For example, oone of our applications includes references to different Intel developer's D: drives, e.g.
;D:\users\nbtester\x86win_nightly\branch-11_1\20100415_000000\libdev\libm\real\pow_sse2.c;___libm_sse2_pow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The /Zi compiler option is supposed to generate debug symbol.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
To clarify, if you remove /Zi from the command line, you're still seeing the debug info in the executable, correct?
Thanks!
Dale
Thanks!
Dale
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting Dale Schouten (Intel)
To clarify, if you remove /Zi from the command line, you're still seeing the debug info in the executable, correct?
Correct. There is no difference in the included executable file symbols when /Zi is present or not. The pdb file is not created when /Zi is not present, but the symbol info still appears in the executable. In real-world applications, however, the order the function symbols appear in the executable changes when /Zi is or is not specified.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page