符号问题调试C#code时, [英] Symbol issue when debugging C# code

查看:196
本文介绍了符号问题调试C#code时,的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的WinDbg 加载从管理code崩溃转储(C#,内置的的的控制台应用程序的任何CPU 的),和一个崩溃转储在x64平台上创建的。我调试在x64平台上。我已经把相关的 PDB 文件导入符号路径。

I am using WinDbg to load a crash dump from managed code (C#, a console application built for Any CPU), and a crash dump is created on a x64 platform. I am debugging on a x64 platform. I have put the related PDB file into the symbol path.

但WinDbg中总能找到一种奇怪的文件夹中的符号。下面是一个例子(当我使用了SYM吵!):

But WinDbg always find the symbol from a strange folder. Here is an example (when I got from using !sym noisy):

SYMSRV:  c:\MySymbols\FooService.pdb\4311207E2E2D442CB7473828D2488F941\FooService.pdb not found

我的应用程序名为 FooService.exe 和相关PDB文件被命名为 FooService.pdb 。我已经设置 C:\ MYSYMBOLS 为标志的路径,并复制 FooService.pdb 目录 C:\ MYSYMBOLS 。但是,为什么WinDbg中找不到 FooService.pdb C:\ MYSYMBOLS ,但一个奇怪的子文件夹 FooService.pdb \ 4311207E2E2D442CB7473828D2488F941?

My application is called FooService.exe and the related PDB file is named FooService.pdb. I have set C:\MySymbols as the symbol path and copied FooService.pdb to the directory C:\MySymbols. But why does WinDbg not find FooService.pdb in C:\MySymbols, but from a strange sub-folder, "FooService.pdb\4311207E2E2D442CB7473828D2488F941"?

在我的情况下,为了加载PDB符号文件,什么是最好的解决方案(我必须 FooService.pdb \ 4311207E2E2D442CB7473828D2488F941 通过创建子文件夹我自己手动)?

In my scenario, in order to load the PDB symbol file, what is the best solution (do I have to create the sub-folder FooService.pdb\4311207E2E2D442CB7473828D2488F941 by myself manually)?

推荐答案

我相信路径的怪一部分用于版本的PDBS在符号缓存。作为高速缓存,可用于多种应用,包括不同版本的同一应用程序的符号下载需要做些什么来让他们分开了。

I believe the strange part of the path is used for versioning the PDBs in the symbol cache. As the cache can be used for many applications including different versions of the same application the symbol downloader needs to do something to keep them apart.

您可以强制符号装载机使用 .reload的/ FO 命令忽略任何缓存副本。结合 .sympath 选项,你应该能够成立加载。一个简单的方法来本地路径添加到符号路径是 .sympath +< PATH> 。之后,做了 .reload的/ FO 忽略任何previously缓存PDBS。

You can force the symbol loader to disregard any cached copy by using the .reload /fo command. Combined with the .sympath option you should be able to set up loading. An easy way to add your local path to the symbol path is .sympath+ <PATH>. After that do a .reload /fo to disregard any previously cached PDBs.

编辑:我改变了我的回答平静了一点,因为我相信我最初误解你的问题。我希望这个更新是比较有用。

I changed my answer quiet a bit as I believe I initially misread your question. I hope this update is more useful.

这篇关于符号问题调试C#code时,的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆