Debugging a renamed DLL?

I am having problems trying to debug a DLL, which was renamed during the process after the build: WinDBG does not load the correct characters (pdb file).

Example:
The original file name was: abc.dll
The created PDB was named: abc.pdb
During the post-build process, the DLL was renamed to "ab.DLL".

For some reason, when debugging, I can see the module appearing as "a_b.dll" (the hyphen was replaced by an underscore, I don’t know why this is happening). In addition, WinDBG cannot load its characters.

I tried ld a_b /f abcand also tried to rename PDB as "a_b.pdb" and then called .reload /f /i a_b, but that didn't work either. >
All this happens in my assemblyRelease, which was configured to add debug-info and the created PDB, like her.

+4
source share
1 answer

The name PDB is part of the DLL. Renaming a DLL will not change its contents, so renaming a PDB will also not work. Instead, keep the original name.

Make sure your characters are set correctly, for example. use Microsoft characters and your own characters:

.symfix c:\debug\symbols
.sympath+ c:\path_to\myproject\bin\Release
.reload

Also, don't worry about the module name in WinDbg. It replaces some special characters, but does not affect the loading of characters. If you still have problems getting characters to load, enable the debug character

!sym noisy

, WinDbg . , . , .sympath+. ,

!sym quiet

.symopt+ 0x80000000    *** noisy
.symopt- 0x80000000    *** quiet
+3

Source: https://habr.com/ru/post/1599838/


All Articles