Mixed mode assembly not loading a character for native C ++ pdbs

I work with mixed mode builds in C ++ / CLI. All pdb collected using managed mode are loaded upon successful assembly in mixed mode, but the original dll and pdb are not loaded, even if information about the native pdb is displayed in the Modules panel (that is, in VS Debug-> Windows-> Modules).

I use the built-in dll and call its exported function in a mixed assembly in C ++ / CLI code. Here the functions are called successfully, but pdb's own characters are not loaded, and all breakpoints in the native code are shown as a hollow circle, and tooltips for tooltips say that there are no characters for this.

I did everything, pdb is placed in the current directory where the managed process starts; deleted all obj and debug folders and recompiled each project at the same time; I even used the ChkMatch utility, which shows the characters in Exe and the corresponding pdb match.

Is there a way to enable breakpoints of my own code when calling from managed (C ++ / LCI mixed mode) code?

Hi,

Usman

+4
source share
1 answer

Mixed mode debugging can be deleted and skipped, mostly skip. First check that you are really using debugging work in mixed mode. From a C # project, this is the option Project + Properties, Debug, Enabled unmanaged code debugging. Then mixed-mode debugging is not enabled for 64-bit processes. If you are running a 64-bit operating system, make sure you force .exe to run in 32-bit mode. Project + Properties, Build tab, Platform Target = x86.

Next, check where the debugger looked for .pdb files. In the "Debug + Windows + Modules" window, right-click the DLL and select "Symbol Download Information". The final sigh should use __debugbreak () in unmanaged code.

+16
source

All Articles