已经创建了分析二进制文件 [英] Profiling binaries already created

查看:74
本文介绍了已经创建了分析二进制文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果组件是使用/ Profile开关编译的,我知道如何进行代码覆盖率分析。但问题是......


我有一大堆EXE和DLL及其相应的PDB和源代码。这些不是使用/ PROFILE开关编译的。有没有办法对代码进行检测和代码覆盖率分析,而无需重新编译所有二进制文件?


 


 

解决方案


嗨Vijay,



 



欢迎来到MSDN论坛!



您介意让我们知道您使用的是哪种语言吗?



 



与此链接中的step1类似
http://blogs.msdn.com/b/cellfish/archive/2008/11/16/native-c-code-coverage-reports-using-visual-studio-2008-team-system.aspx



 



你的意思是首先必须使用/ PROFILE链接选项编译你的项目吗?如果我们调出项目属性
它可在此处找到:

配置属性 - >链接器 - >高级 - >配置文件



 



另一种获取代码覆盖率报告的方法,我们可以创建一个测试,然后双击local.testSetings(它叫做
LocalTestRun.testrunco​​nfig在VS2008
中打开文件的属性,然后我们就可以获得代码覆盖率信息在Visual Studio中,如下面的屏幕截图。有关详细步骤,请参阅"教程:在IDE中生成代码覆盖率报告"并在此链接中使用"
http://msdn.microsoft.com/en-us/library/dd299398(v = vs.90).aspx



 


 

谢谢,



I know how to do a code coverage analysis if the component was compiled with the /Profile switch. But the problem is...

I have a huge set of EXEs and DLLs with their corresponding PDBs and source code. These were not compiled with the /PROFILE switch. Is there a way to instrument and do a code coverage analysis of the code without having to recompile all the binaries?

 

 

解决方案

Hi Vijay,

 

Welcome to the MSDN forum!

Would you mind letting us know what language are you using?

 

Like step1 in this link http://blogs.msdn.com/b/cellfish/archive/2008/11/16/native-c-code-coverage-reports-using-visual-studio-2008-team-system.aspx

 

Do you mean that first of all your project must be compiled using the /PROFILE link option? If we bring up the project properties it can be found here:
Configuration Properties -> Linker -> Advanced -> Profile

 

Another way to get code coverage report, we can create a test, then double-click local.testSetings ( it called LocalTestRun.testrunconfig in VS2008 ) in Solution Explorer to open the properties for the file, then we can obtain code coverage information in Visual Studio, like following screen shot. For detailed steps, see “Tutorial: Generating a Code Coverage report from within the IDE” in this link: http://msdn.microsoft.com/en-us/library/dd299398(v=vs.90).aspx.

 

 

Thanks,


这篇关于已经创建了分析二进制文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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