Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.

Single-Step Debugging

Daniel_D
Beginner
603 Views

I have a problem to step through my app. If I set a break-point the debugger stops at the location I expect. If I try to step through the next lines of code by pressing F10 the execution continues same as pressing F5.

0 Kudos
1 Solution
Hubert_H_Intel
Employee
603 Views

First of all, if you don't use the Intel Parallel Debugger Extension for detecting shared memory accesses I'd recommend to remove option /debug:parallel (you may also consider removing option /debug:expr-source-pos). Debug info is generated with /Zi. Then make sure your DLL is loaded and the PDB file for the DLL is in place. You may check also where the DLL is being loaded; perhaps it's not the DLL you want to debug.

Is the problem appearing only with Intel built code? Did you try out a VC++ built?
Hubert.

View solution in original post

0 Kudos
6 Replies
jimdempseyatthecove
Honored Contributor III
603 Views
Is this optimized code?
Also, try F11 (Step Into) and see what happens.
0 Kudos
Daniel_D
Beginner
603 Views

Does anyone - maybe from Intel - have any idea why I cannot stop through the code? It is close to impossible to debug in this environment.

0 Kudos
Hubert_H_Intel
Employee
603 Views
Daniel,
We need more info about the OS, debugger version and how you built the code (with Intel or other compiler) and which compiler flags you used to generate the debugee.
Regards, Hubert.
0 Kudos
Daniel_D
Beginner
603 Views

Hi Hubert,

The OS is Windows 7 64 Bit. Code builds with Intel. Here are the Compiler-Flags I use to build the executable:

/Zi /nologo /W4 /MP /debug:parallel /debug:expr-source-pos /Od /Ob0 /D "_UNICODE" /D "UNICODE" /D "_AFXDLL" /EHsc /RTC1 /GS /fp:precise /Zc:wchar_t /Zc:forScope /Fp"x64\Debug-Win7\xxxxxxxxx.pch" /Fa"x64\Debug-Win7" /Fo"x64\Debug-Win7" /Fd"x64\Debug-Win7\vc100.pdb"

Here are the linker-flags:

/OUT:"x64\Debug-Win7\xxxxxxxx.exe" /INCREMENTAL:NO /NOLOGO /MANIFEST /ManifestFile:"x64\Debug-Win7\xxxxxxx.exe.intermediate.manifest" /ALLOWISOLATION /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG /PDB:"D:\.....\x64\Debug-Win7\ xxxxxxx.pdb" /SUBSYSTEM:WINDOWS /PGD:"D:\ \x64\Debug-Win7\ xxxxxxx .pgd" qnoipo /TLBID:1 /DYNAMICBASE /NXCOMPAT /MACHINE:X64

I already figured out, that this happened if I want to step into one of my DLLs. They are built with the similar set of Flags:

/Zi /nologo /W4 /MP /debug:parallel /debug:expr-source-pos /Od /D "_DEBUG" /D "_WINDLL" /D "_UNICODE" /D "UNICODE" /D "_AFXDLL" /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /GR- /Fp"x64\Debug-Win7\APTeraDirect.pch" /Fa"x64\Debug-Win7" /Fo"x64\Debug-Win7" /Fd"x64\Debug-Win7\vc100.pdb"

Linker-Flags:

/OUT:"x64\Debug-Win7\ yyyyyyyy.dll" /INCREMENTAL:NO /NOLOGO /DLL /MANIFEST /ManifestFile:"x64\Debug-Win7\yyyyyyyy.dll.intermediate.manifest" /ALLOWISOLATION /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG /PDB:"D:\....\x64\Debug-Win7\ yyyyyyyy.pdb" /SUBSYSTEM:WINDOWS /OPT:REF /PGD:"D:\......\x64\Debug-Win7\ yyyyyyyy.pgd" qnoipo /TLBID:1 /DYNAMICBASE /NXCOMPAT /MACHINE:X64

I use the current Intel ParallelStudio XE 2011 eval. version to compilewith the VS 2010 as IDE to debug.
Hope this helps?

Daniel

0 Kudos
Hubert_H_Intel
Employee
604 Views

First of all, if you don't use the Intel Parallel Debugger Extension for detecting shared memory accesses I'd recommend to remove option /debug:parallel (you may also consider removing option /debug:expr-source-pos). Debug info is generated with /Zi. Then make sure your DLL is loaded and the PDB file for the DLL is in place. You may check also where the DLL is being loaded; perhaps it's not the DLL you want to debug.

Is the problem appearing only with Intel built code? Did you try out a VC++ built?
Hubert.

0 Kudos
Daniel_D
Beginner
603 Views

That seems to work so far! I switch both debugging-flags to no and that seems to work. I never have had something similar with the MS VC++ compiler. I thought it was a 3rd party library I have to use which was compiled with the MS compiler.

Thanks again,
Daniel

0 Kudos
Reply