1

我已经用嵌入式符号编译了我的程序集:

namespace SymbolsTest
{
    static class Program
    {
        private static void Main()
        {
            var now = System.DateTime.Now;
            System.Console.WriteLine($"Now:  {now}");
        }
    }
}
csc SymbolsTest.cs /target:exe /platform:x64 /debug+ /debug:embedded /out:SymbolsTest_x64.exe

当我尝试在 WinDbg 中加载符号时,符号加载时出现错误:

0:000> !CLRStack
OS Thread Id: 0x21e4 (0)
        Child SP               IP Call Site
0000000000dfe940 00007ffa7a0b6004 [PrestubMethodFrame: 0000000000dfe940] SymbolsTest.Program.Main()
0000000000dfee30 00007ffa7a0b6004 [GCFrame: 0000000000dfee30] 
0:000> .reload
Reloading current modules
................................
0:000> .reload /f
Reloading current modules
.*** WARNING: Unable to verify checksum for SymbolsTest_x64.exe
*** ERROR: Module load completed but symbols could not be loaded for SymbolsTest_x64.exe
...........*** ERROR: Symbol file could not be found.  Defaulted to export symbols for C:\Program Files\Avecto\Privilege Guard Client\PGHook.dll - 
....................

************* Symbol Loading Error Summary **************
Module name            Error
SymbolsTest_x64        0x80190194 - Not found (404). : srv*c:\symbols*http://msdl.microsoft.com/download/symbols
PGHook                 0x80190194 - Not found (404). : srv*c:\symbols*http://msdl.microsoft.com/download/symbols

You can troubleshoot most symbol related issues by turning on symbol loading diagnostics (!sym noisy) and repeating the command that caused symbols to be loaded.
You should also verify that your symbol search path (.sympath) is correct.

sympath设置正确(我认为是正确的):

0:000> .sympath
Symbol search path is: srv*C:\Symbols*http://msdl.microsoft.com/download/symbols
Expanded Symbol search path is: srv*c:\symbols*http://msdl.microsoft.com/download/symbols

************* Path validation summary **************
Response                         Time (ms)     Location
Deferred                                       srv*C:\Symbols*http://msdl.microsoft.com/download/symbols

我如何告诉调试器符号嵌入在文件中?

4

0 回答 0