无法从索引的PDB文件中找到匹配的源文件 [英] Could not find matching source files from indexed PDB files
问题描述
我正在为工作构建一个符号服务器,并且在检索正确方面遇到困难用于匹配PDB文件的源文件。
我已按照下面写的网站的说明操作,并且我已成功创建了具有正确P4索引信息的PDB文件。
Visual Studio可以从符号服务器中找到正确的PDB信息来调试转储文件,但是,它一直生成一条消息说:"源文件与模块构建时的
不同。"
是否有人有过相似的经历?请理解由于公司的安全政策,我无法附上任何照片,并随时可以提出更多信息。
感谢您阅读本文^^。下面列出的详细步骤和条件。
------------------------------------------- - - - - - - - - - - - - - - - 细节 - - - - - - - - - - ------------------------------------
P4V版本:Perforce Visual Client / NTX64 / 2012.1 / 490402
< g class =" gr_ gr_100 gr-alert gr_gramm gr_inline_cards gr_run_anim样式multiReplace" data-gr-id =" 100" id =" 100"> OS:< / g> Windows 7
64位Service Pack 1
Visual Studio Professional 2013版本12更新5
1.首先我创建了一个C ++项目,它在执行时生成一个虚拟转储文件并将其上传到P4服务器。
2.我更新了< ; g class =" gr_ gr_68 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling" data-gr-id =" 68" id =" 68"> srcsrv< / g>。< g class =" gr_ gr_69 gr -alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling"
data-gr-id =" 69" id =" 69"> ini< / g>文件来设置变量:set [MYSERVER]  ; 使用P4系统信息中的服务器地址,并将p4.exe = C:\Program Files \ Perforce \ p4.exe添加到 [可信命令] 。 />
3.上传源文件后,我使用了p4index.cmd,我相信该命令是Windows Kits的一部分,它使用-SYSTEM = P4选项调用ssindex.cmd。
- 命令行:p4index.cmd / source =" E:\本地项目源路径" / debug / symbols =" E:\本地项目符号(PDB和EXE)路径"
- 结果:
- ssindex.cmd [INFO]:...索引E:\本地项目路径\ Project.pdb
- ssindex.cmd [INFO]:...写了c:\Users\AppData \Temp \ index127B.stream到E:\本地项目路径\ Project.pdb
4.然后我执行了srctool.exe来查看PDB文件是否被正确编入索引,并且看起来PDB文件已成功编入索引。
- 命令< g class =" gr_ gr_78 gr-alert gr_gramm gr_inline_cards gr_run_anim样式multiReplace" data-gr-id =" 78" id =" 78"> ;行:< / g> srctool.exe E:\本地项目路径\Project.pdb
- 结果:
- p4.exe -p"Perforce服务器地址" print -o" c:\ Users \ MYSERVER \本地项目路径\ Main.cpp \\\。< g class =" gr_ gr_66 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling" data-gr -id =" 66" id =" 66"> cpp< / g>"
-q" Perforce服务器路径\ MainCpp#9" - E: \本地项目路径\项目。< g class =" gr_ gr_76 gr-alert gr_gramm gr_inline_cards gr_run_anim样式multiReplace" data-gr-id =" 76" id =" 76">< g class = " gr_ gr_67 gr-alert gr_spell gr_inline_cards gr_disable_anim_appear
ContextualSpelling ins-del multiReplace" data-gr-id =" 67&quo t; id =" 67"> pdb< / g>:< / g> 1源文件被索引
5.最后,我将索引的PDB文件复制到符号服务器,并成功复制了它们。我还跑了< g class =" gr_ gr_81 gr-alert gr_gramm gr_inline_cards gr_run_anim Grammar only-ins doubleReplace replaceWithoutSep"数据-GR-ID =" 81"
id =" 81"> srctool.exe< / g>命令检查重复的PDB文件索引,我得到了相同的结果。
- 命令行:symstore.exe add / o / r / f" E:\本地项目源文件路径" / s" //符号服务器路径" / t / compress
- 结果:
- SYMSTORE MESSAGE:将E:\本地项目路径\Project.pdb复制到//符号服务器路径\Porject.pd_ [强制: T,压缩:T]
- SYMSTORE MESSAGE:复制E:\本地项目路径\ Project.exe到//符号服务器路径\Porject.ex_ [强制:T,压缩:T]
- SYMSTORE:存储的文件数= 3
- SYMSTORE:错误数= 0
- SYMSTORE:忽略的文件数= 21
6 。设置符号服务器的符号路径
嗨Dynomart,
你有没有试图删除 " charset = utf-8" 来自
.editorconfig
之前发生过同样的问题,上面已经解决了这个问题:
祝你好运,
Fletcher
Hi,
I am building a symbol server for work and having difficulties with retrieving correct source files for matching PDB files.
I have followed the instructions from a website written below and I've successfully created PDB files with correct P4 index information.
Visual Studio could find correct PDB information from the symbol server to debug a dump file, however, it kept generating a message said: "The source file is different
from when the module was built."
Is there anyone who had the similar experience? Please understand that I could not attach any photos due to the company's security policy and feel free to ask more information.
Thank you for reading this post ^^. Detailed steps and conditions listed below.
------------------------------------------------------------------------- Details -------------------------------------------------------
P4V version: Perforce Visual Client/NTX64/2012.1/490402
<g class="gr_ gr_100 gr-alert gr_gramm gr_inline_cards gr_run_anim Style multiReplace" data-gr-id="100" id="100">OS :</g> Windows 7
64-bit Service Pack 1
Visual Studio Professional 2013 Version 12 Update 5
1. First I created a C++ project which generates a dummy dump file when it is executed and I uploaded it to P4 Server.
2. I updated <g class="gr_ gr_68 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling" data-gr-id="68" id="68">srcsrv</g>.<g class="gr_ gr_69 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling"
data-gr-id="69" id="69">ini</g> file to set variables: set [MYSERVER] with the server address from P4 system info and added p4.exe=C:\Program Files\Perforce\p4.exe to [trusted commands].
3. After uploading source files, I used p4index.cmd, I believe the command is a part of Windows Kits and it calls ssindex.cmd with -SYSTEM=P4 option.
- Command Line : p4index.cmd /source="E:\Local project source path" /debug /symbols="E:\Local project symbol(PDB and EXE) path"
- Results:
- ssindex.cmd [INFO ] : ... indexing E:\Local project path\Project.pdb
- ssindex.cmd [INFO ] : ... wrote c:\Users\AppData\Temp\index127B.stream to E:\Local project path\Project.pdb
4. Then I executed srctool.exe to see whether PDB files were correctly indexed and it appeared that PDB files were successfully indexed.
- Command <g class="gr_ gr_78 gr-alert gr_gramm gr_inline_cards gr_run_anim Style multiReplace" data-gr-id="78" id="78">Line :</g> srctool.exe E:\Local project path\Project.pdb
- Results:
- p4.exe -p "Perforce server address" print -o "c:\Users\MYSERVER\Local project path\Main.cpp\9\main.<g class="gr_ gr_66 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling" data-gr-id="66" id="66">cpp</g>" -q "Perforce server path\Main.cpp#9"
- E:\Local project path\Project.<g class="gr_ gr_76 gr-alert gr_gramm gr_inline_cards gr_run_anim Style multiReplace" data-gr-id="76" id="76"><g class="gr_ gr_67 gr-alert gr_spell gr_inline_cards gr_disable_anim_appear ContextualSpelling ins-del multiReplace" data-gr-id="67" id="67">pdb</g> :</g> 1 source file is indexed
5. Finally, I copied the indexed PDB files to the symbol server and they were successfully duplicated. I also ran <g class="gr_ gr_81 gr-alert gr_gramm gr_inline_cards gr_run_anim Grammar only-ins doubleReplace replaceWithoutSep" data-gr-id="81" id="81">srctool.exe</g> command to check the duplicated PDB files for indexing and I got the same result.
- Command Line : symstore.exe add /o /r /f "E:\Local project source file path" /s "//Symbol server path" /t /compress
- Results:
- SYMSTORE MESSAGE: Copying E:\Local project path\Project.pdb to //Symbol server path\Porject.pd_ [Force: T, Compress: T]
- SYMSTORE MESSAGE: Copying E:\Local project path\Project.exe to //Symbol server path\Porject.ex_ [Force: T, Compress: T]
- SYMSTORE: Number of files stored = 3
- SYMSTORE: Number of errors = 0
- SYMSTORE: Number of files ignored = 21
6. Set symbol paths to the symbol server
Hi Dynomart,
Have you tried to remove "charset = utf-8" from .editorconfig
Same issue has happened before, and above resolved the issue:
Hope it helps.
Best regards,
Fletcher
这篇关于无法从索引的PDB文件中找到匹配的源文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!