获取dll、pdb的Signature签名和Age

获取dll、pdb的Signature签名和Age

1、“C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\dumpbin.exe” /headers xxx.dll
2、“C:\Program Files\Debugging Tools for Windows (x64)\symchk.exe” /v xxx.dll
3、“D:\backup\software\chkmatch\ChkMatch.exe” -c xxx.dll xxx.pdb
4 // windbg命令!lmi xxx也可以。

Debug Directories

    Time Type        Size      RVA  Pointer
-------- ------- -------- -------- --------
6110F23A cv            75 00025224    23A24    Format: RSDS, {71D9B8E0-B437-4A3B-B167-C52C1E37CEBE}, 8, f:\xxx\binU\xxx.pdb

PdbFilename f:\xxx\xxx.pdb
PdbSignature {71D9B8E0-B437-4A3B-B167-C52C1E37CEBE}
PdbDbiAge 0x00000008

Executable:
TimeDateStamp: 6110f23a
Debug info: 2 ( CodeView )
TimeStamp: 6110f23a Characteristics: 0 MajorVer: 0 MinorVer: 0
Size: 117 RVA: 00025224 FileOffset: 00023a24
CodeView format: RSDS
Signature: {71d9b8e0-b437-4a3b-b167-c52c1e37cebe} Age: 8
PdbFile: f:\xxx\xxx.pdb

Debug information file:
Format: PDB 7.00
Signature: {71d9b8e0-b437-4a3b-b167-c52c1e37cebe} Age: 7

Result: Unmatched (reason: Age mismatch)
则此dll对应的pdb存放路径模式应该为(注意后面有个数字age,8):\192.168.100.103\PDB\xxx.pdb\71D9B8E0B4374A3BB167C52C1E37CEBE8

显示dll对应的pdb查找路径:

1、“C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\dumpbin.exe” /pdbpath:verbose xxx.dll
File Type: DLL
PDB 文件“C:\Users\admin\Desktop\xxx.pdb”已选中。 (File not found)
PDB 文件“f:\xxx\xxx.pdb”已选中。 (File not found)
PDB 文件“C:\WINDOWS\symbols\dll\xxx.pdb”已选中。 (File not found)
PDB 文件“C:\WINDOWS\dll\xxx.pdb”已选中。 (File not found)
PDB 文件“C:\WINDOWS\xxx.pdb”已选中。 (File not found)

修改pdb以强制匹配dll:

“D:\backup\software\chkmatch\ChkMatch.exe” -m xxx.dll xxx.pdb
ChkMatch工具
// 也可以在windbg中使用.symopt + 0x40来强制加载不匹配的pdb。方法如下:
// !sym noisy
// ld MGCARD
// .symopt + 0x40
// ld MGCARD
// 关闭
// .symopt-0x40
// !sym quiet
Executable:
TimeDateStamp: 6110f23a
Debug info: 2 ( CodeView )
TimeStamp: 6110f23a Characteristics: 0 MajorVer: 0 MinorVer: 0
Size: 117 RVA: 00025224 FileOffset: 00023a24
CodeView format: RSDS
Signature: {71d9b8e0-b437-4a3b-b167-c52c1e37cebe} Age: 8
PdbFile: f:\xxx\xxx.pdb

Debug information file:
Format: PDB 7.00
Signature: {71d9b8e0-b437-4a3b-b167-c52c1e37cebe} Age: 7

Writing to the debug information file…
Result: Success.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值