Visual Studio 2010调试器正确构建 - 编译器pdb和链接器pdb不同步? [英] Visual Studio 2010 debugger build correctly - compiler pdb and linker pdb not in synch?

查看:359
本文介绍了Visual Studio 2010调试器正确构建 - 编译器pdb和链接器pdb不同步?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在MS VS 2010中有一个解决方案,可以在重建后(1)正确编译和构建。但是,在对源文件进行更改并开始调试之后,VS会识别项目已过期,并成功构建项目(2)(如预期)。



问题是,似乎VS开始使用上述(1)中的obj / pdb / etc ..而不是(2)调试项目。如果我进入调试器并导航到感兴趣文件中更改的模块,我被告知源文件与模块构建时不同。指示我不想重建源代码,我在下面给出了以下信息:(请注意,为了获得良好的构建,我必须重新构建解决方案(或删除vc100.pdb))。






查找感兴趣的文件的来源。校验和:MD5 {59 96 7d 1 9f b 33 20 63 4c 81 1d d7 c6 94 30}



确定校验和是否匹配以下位置:
1:感兴趣的文件校验和:MD5 {61 66 43 cb d1 97 d1 d5 0 dc 9b 60 64 71 b2 b6}校验和不匹配。
存在感兴趣的文件文件。



查看感兴趣的文件的脚本文档...



确定校验和是否匹配以下位置:



1:感兴趣的文件校验和:MD5 {61 66 43 cb d1 97 d1 d5 0 dc 9b 60 64 71 b2 b6}校验和不匹配。



查看感兴趣的文件项目。



在项目中找不到该文件。



查找目录



。 / p>

misc目录





调试器将请求用户找到文件:感兴趣的文件。



用户在查找源对话框中按取消。
活动解决方案的调试源文件设置已被修改,以便调试器不会要求用户找到文件感兴趣的文件。



调试器无法找到源文件感兴趣的文件。






此时调试器可以识别pdb散列即使编译器/链接器未能很早地识别,它们也不同步。一旦重建后,一切正常工作,但在更改源文件后似乎没有正确构建。



似乎重建正确构建了vc100。 pdb和调试器pdb,而正常构建只触及编译器/链接器vc100.pdb ...但我不是积极的。



任何人都有任何想法?



谢谢,



Paul

解决方案

解决方案非常简单。




  • 只需从项目中排除文件(发生校验和
    问题的文件)。


  • 在项目中再次包含相同的文件


  • 重建整个项目




我希望这将解决你的问题。
SAM


I have a solution in MS VS 2010 that compiles and builds properly after a rebuild all (1). However, after I make a change to a source file and begin debugging, VS recognizes the project is out of date and builds the project (2) successfully (as expected).

The problem is that it seems VS begins debugging the project using obj/pdb/etc.. from (1) above instead of (2). If I break into the debugger and navigate to the module that changed in the file of interest, I'm told "the source file is different from when the module was built". Indicating I don't want to rebuild the source, I'm given the following info below: (Note that in order to get a "good" build I have to rebuild the solution (or delete vc100.pdb)).


Locating source for "file of interest". Checksum: MD5 {59 96 7d 1 9f b 33 20 63 4c 81 1d d7 c6 94 30}

Determining whether the checksum matches for the following locations: 1: "file of interest" Checksum: MD5 {61 66 43 cb d1 97 d1 d5 0 dc 9b 60 64 71 b2 b6} Checksum doesn't match. The file "file of interest" exists.

Looking in script documents for "file of interest"...

Determining whether the checksum matches for the following locations:

1: "file of interest" Checksum: MD5 {61 66 43 cb d1 97 d1 d5 0 dc 9b 60 64 71 b2 b6} Checksum doesn't match.

Looking in the projects for "file of interest".

The file was not found in a project.

Looking in directory

.

misc directories

.

The debugger will ask the user to find the file: "file of interest".

The user pressed Cancel in the Find Source dialog. The debug source files settings for the active solution have been modified so that the debugger will not ask the user to find the file: "file of interest".

The debugger could not locate the source file "file of interest".


At this point the debugger recognizes the pdb hashes are out of synch even though compiler/linker failed to recognize this earlier. Everything works correctly after a rebuild but doesn't seem to build itself correctly after a change to a source file.

It seems that a "rebuild" properly builds both vc100.pdb and debugger pdb while a "normal" build only only touches the compiler/linker vc100.pdb...but I'm not positive.

Anyone have any ideas?

Thanks,

Paul

解决方案

Solution is very simple.

  • Just Exclude the file from the project (the one for which checksum issue occured).

  • Include the same file again in project

  • Rebuild whole project

Thast it. I hope this will resolve your problem. SAM

这篇关于Visual Studio 2010调试器正确构建 - 编译器pdb和链接器pdb不同步?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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