使用SymChk获取符号文件

方式一:类似下面的,递归式获取某一目录下所有文件的符号文件:(windbg的帮助文件及网络上都能查到)

要使用 SymChk.exe 实用程序下载 Windows\System32 文件夹中所有组件的符号文件,请使用以下命令行命令:

symchk /r c:\windows\system32 /s SRV*c:\symbols\*http://msdl.microsoft.com/download/symbols
在此示例中:
  • “/r c:\windows\system32”查找 System32 文件夹和所有子文件夹中的所有符号文件。
  • “/s SRV*c:*http://msdl.microsoft.com/download/symbols”指定用于符号解析的符号路径。在此例中,“c:\symbols”是将在其中从符号服务器复制符号的本地文件夹。

方式二:使用Manifest文件,这个少有人提及,References: http://msdn.microsoft.com/en-us/library/windows/hardware/ff560061(v=vs.85).aspx

Using a Manifest File with SymChk

n some cases, you might need to retrieve symbols for files that are on an isolated computer; that is, a computer that is either not on any network or is on a network that has no symbol store. In that situation, you can use the following procedure to retrieve symbols.

  1. Run SymChk with the /om parameter to create a manifest file that describes the files for which you want to retrieve symbols.

  2. Move the manifest file to a network that has a symbol store.

  3. Run SymChk with /im parameter to retrieve symbols for the files described int the manifest file.

  4. Move the symbol files back to the isolated computer.

Example

Suppose yourApp.exe is running on an isolated computer. The following command creates a manifest file that describes all the symbols needed to debug the yourApp.exe pocess.

C:\>SymChk /om c:\Manifest\man.txt /ie yourApp.exe

SYMCHK: FAILED files = 0
SYMCHK: PASSED + IGNORED files = 28

Now assume you have moved the manifest file to a different computer that is on a network that has access to a symbol store. The following command retrieves the symbols described in the manifest file and places them in the mySymbols folder.

C:\>SymChk /im c:\FolderOnOtherComputer\man.txt /s srv*c:\mysymbols*\\aServer\symbols

SYMCHK: myApp.exe             ERROR - Unable to download file. Error reported was 2
. . .
SYMCHK: FAILED files = 28
SYMCHK: PASSED + IGNORED files = 28

Now you can move the symbols to the isolated computer and use them for debugging.


  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值