在 Visual Studio 中调试 - 我能否看到英特尔编译器库代码
Debugging in Visual Studio- can I see the Intel Compiler library code?
我正在使用Visual Studio 2012与Intel C/C++编译器,并且当单步执行如下行时:
x = new X();
然后我看到代码,如下所示:
#ifdef _SYSCRT
#include <cruntime.h>
#include <crtdbg.h>
#include <malloc.h>
#include <new.h>
#include <stdlib.h>
#include <winheap.h>
#include <rtcsup.h>
#include <internal.h>
void * operator new( size_t cb )
{
void *res;
for (;;) {
// allocate memory block
res = _heap_alloc(cb);
// if successful allocation, return pointer to memory
if (res)
break;
// call installed new handler
if (!_callnewh(cb))
break;
// new handler was successful -- try to allocate again
}
RTCCALLBACK(_RTC_Allocate_hook, (res, cb, 0));
return res;
}
#else /* _SYSCRT */
#include <cstdlib>
#include <new>
_C_LIB_DECL
int __cdecl _callnewh(size_t size) _THROW1(_STD bad_alloc);
_END_C_LIB_DECL
void *__CRTDECL operator new(size_t size) _THROW1(_STD bad_alloc)
{ // try to allocate size bytes
void *p;
while ((p = malloc(size)) == 0)
if (_callnewh(size) == 0)
{ // report no memory
_THROW_NCEE(_XSTD bad_alloc, );
}
return (p);
}
#endif /* _SYSCRT */
这是英特尔编译器对 new(( 的定义吗?就像我可以看到英特尔如何在通过我的应用程序进行调试时实施 C++ 标准一样?
我怎样才能看到 malloc.c 中的内容(而不是 malloc.h(?
编辑:我认为这是Microsoft新的((,因为Microsoft出现在评论中。为什么我在使用英特尔编译器时看到 new(( Microsoft实现?
- 我怎样才能看到 malloc.c 中的内容(而不是 malloc.h(?
- 您看不到 malloc.c 的一个原因是,您正在调用的函数是否在 malloc.h 中定义和声明。当你谈到malloc.c和malloc.h时,我猜你的意思是你想看到内存分配函数,即new((或malloc(sizeof(5(/sizeof(int((等函数。
- 您也可能看不到此文件,因为内存分配函数或任何其他间接使用内存分配器函数的函数没有错误。如果错误不存在,那么编译器不会指出您收到的错误来自 malloc.c 或 malloc.h。
- 编译器将指向生成错误的类或文件。除非有违反 malloc.c 或 malloc.h 函数的函数,否则可能看不到这些文件。
相关文章:
- 将"-01"替换为"-02" 英特尔编译器选项会导致 FPE 在较小的 for 循环行程计数中抛出
- 在 Azure DevOps 构建管道中使用英特尔C++编译器为 Linux 环境构建C++代码
- 如何要求 macports 用英特尔编译器包装 openmpi?
- 带有 gcc 7.1/8.1 的英特尔编译器 17.0
- 编译 Fortran 和C++程序并从英特尔编译器链接
- 英特尔C++编译器 19.0 测试版中删除了对英特尔®图形技术的卸载支持
- 英特尔编译器 (C++) 问题与 std::vector 上的 OpenMP 缩减
- 无法在 Windows 上使用英特尔编译器编译示例 boost::多精度
- 英特尔C++编译器 (19.0) 现在是否仅使用 Clang 前端(即已经放弃的 EDG)?
- 在英特尔C++编译器 (Linux) 的配置搜索路径中找不到文件可执行文件
- 英特尔C++编译器错误:标识符"_Compare"未定义
- 可能的编译器错误:在两台机器之间使用英特尔编译器的boost bessel函数会产生奇怪的结果
- 英特尔C++编译器和Eigen
- 英特尔C++编译器找不到 stdio.h
- 使用英特尔编译器编译boost 1.57
- 如何使用“英特尔C++编译器”(ICC)在三种方法上使用SFINAE
- 使用英特尔编译器套件编译 OpenMPI 应用
- 最新的英特尔c++编译器是否支持隐式移动构造函数和移动赋值
- 奇怪的英特尔C++编译器错误
- 使用带有英特尔C++编译器的 boost::spirit 无法编译程序