在调试跟踪vc执行时出现要打开dllcrto.c这个文件,该怎么办?

来源:百度知道 编辑:UC知道 时间:2024/06/07 15:53:00
调试跟踪是在VC6.0下出现这情况的
我想看一下程序的具体运行步骤,所以才需要按F11单步跟踪的。

出现这个原因是因为你想进入的函数不是你自己写的,或者你函数是这样调用的:Function1(Obj.Function1() , Obj.Function2()),这样会在你按单步的时候进入Obj.Function1()函数,但是这个函数又不是你自己写的,所以调试器找不到源代码,需要你自己寻找这个函数的源代码。
简单的处理就改成这个样子:
Type var1 = Obj.Function1();
Type var2 = Obj.Function2();
Function1(var1 , var2)<------ 在这里单步

你可以不要单步跟踪,跳过调用dllcrto.c中的执行语句

C runtime库的原代码,vc英文企业版+sp6只接可以显示,其它的版本不知道。
文件位于 ...\Microsoft Visual Studio\VC98\CRT\SRC 目录,下面是这个文件头部的一些内容

/***
*dllcrt0.c - C runtime initialization routine for a DLL with linked-in C R-T
*
* Copyright (c) 1989-1997, Microsoft Corporation. All rights reserved.
*
*Purpose:
* This the startup routine for a DLL which is linked with its own
* C run-time code. It is similar to the routine _mainCRTStartup()
* in the file CRT0.C, except that there is no main() in a DLL.
*
*******************************************************************************/