AQtime学习资料(3)

2019-04-23 18:58

Compiling your application with debug information

In order to profile your application with AQtime you may need to compile it with debug information.

一、Native-code(unmanaged) applications:

用以下工具编写的程序必须编译时加入debug信息: ? Microsoft Visual C++ ? ? ? ? ? ? ? ? ? ? ?

- Native code is computer programming (code) that is compiled to run with a particular processor (such as an Intel x86-class processor) and its set of instructions. If the same program is run on a computer with a different processor, software can be provided so that the computer emulates the original processor. In this case, the original program runs in \in native mode on the original processor. (The program can be rewritten and recompiled so that it runs on the new processor in native mode.)

源文档

Microsoft Visual Basic

CodeGear Delphi 2007 for Win32 Borland Delphi 2006 for Win32 Borland Delphi 2005 for Win32 Borland Delphi Borland C++Builder 2006 Borland C++Builder Borland C++ Intel C++

GCC (GNU Compiler Collection for Windows) Compaq Visual Fortran

二、Managed(.NET) applications(托管应用程序):

一般情况下,用.NET开发的应用程序通过metadata(元数据)已经为Profiling提供了一些必要的信息;但是metadata中没有提供源代码与应用程序内部细节的链接信息,所以AQtime的有些功能无法使用,比如Editor面板将不会显示具体的源代码等等;为了能够得到消除这种局限性,也需要在开发工具做一些相关的设置,将Debug信息加入到已经存在的.NET元数据中。 AQtime支持的.NET开发工具:

? ASP.NET

? ? ? ?

Microsoft Visual C# 2005 Microsoft Visual C# .NET Microsoft Visual J# 2005 Microsoft Visual J# .NET

? ? ? ? ? ? ? ? ?

Microsoft Visual Basic 2005 Microsoft Visual Basic .NET Microsoft Visual C++ 2005 Microsoft Visual C++ .NET Borland C#Builder 2006 Borland C#Builder Borland Delphi 2006 for .NET Borland Delphi 2005 for .NET Borland Delphi 8 (Delphi for .NET)

三、Visual C++ 6.0和Visual C++ 2005的设置方法:

1.Visual C++ 6.0:

1. Open your project in Visual Studio.

2. Choose Build | Set Active Configuration from Visual C++'s menu and select another

configuration, say Debug, as the active configuration for the project.. Usually the Debug configuration is similar to this: - Win32 Debug:

Note that the only reason to change the active configuration is to leave the Release

configuration unaffected. If you want to profile the Release configuration, you may skip this step. In this case, do not forget to restore the compiler settings before compiling the release version of your application.

3. Now, open the Project Settings dialog (press ALT-F7 or use Project | Settings) and

select the configuration you have set.

4. In the dialog, open the C/C++ page and make sure that Debug Info is set either to

Program Database or Program Database for Edit and Continue

For more information on these options review Microsoft Visual C++ Help.

5. You now have set your project to generate debug information when compiling. Next, you

must ensure that the linker saves it. From Project | Settings select the Link page. There, first set the Category to General. Then check Generate debug info:

On the Link page, select Debug in the Category box and then do the following: ? Select the Debug info check box.

? ?

Clear the Separate type check box. Select the Microsoft format option button.

6. The last step is to set how the linker will save the debug information. AQtime supports

? Switch to the Link page of the Project Settings dialog: ? Set the Category to Customize. ? Check Use program database.

? Enter the PDB file name you want into the Program database name edit field.

debug information generated as an external PDB file (PDB format). To set linker options:

2.Visual C++ 2005:

1. Open your project in Visual Studio 2005 or Visual Studio 2008.

2. Select Build | Configuration Manager from the main menu. This will open the

Configuration Manager dialog. Select the Release configuration for your project:

Close the dialog. Note:

Of course, you can profile your application in any configuration, not just in the Release one. We recommend that you choose this configuration if you are going to use the Performance profiler (see above).

3. Right-click the project in the Solution Explorer and select Properties from the

context menu. This will call the Property Pages dialog. 4. In the dialog,

a. Select Active (Release) from the Configuration dropdown list. b. Switch to the Configuration Properties | C/C++ | General page and

set Debug Information Format to Program Database (/Zi) or Program Database for Edit & Continue (/ZI). For more information on these options review the Visual Studio documentation.


AQtime学习资料(3).doc 将本文的Word文档下载到电脑 下载失败或者文档不完整,请联系客服人员解决!

下一篇:11-050职业技能鉴定指导书-变电站值班员(2)-高级技师

相关阅读
本类排行
× 注册会员免费下载(下载后可以自由复制和排版)

马上注册会员

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: