Visual Studio调试最大缓冲区大小 [英] Visual Studio debug maximum buffer size

查看:795
本文介绍了Visual Studio调试最大缓冲区大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当在visual studio(2010)中调试我的项目时,一旦我进入我的一个文件,我会收到消息不可用的源代码。该文件现在只是一个具有一个功能的测试文件:

When debugging my project in visual studio (2010) I get the message "no source available" once I step into one of my files. The file is now just a test file with one function:

void foo()
{
    float testbuf[200000] = {0};
}

如果我分配一个较小的缓冲区,调试器正常进入文件。
在我的调试视图中,我的调用堆栈位置是空的,有没有反汇编可用。

If i allocate a smaller buffer the debugger enters the file normally. In my debugging view my "call stack location" is empty and there is "no disassembly available".

看起来像我最喜欢的的数据可视化工作室调试器可以处理或在这个方向上的东西。

It looks to me like there is a maximum amount of data that the visual studio debugger can handle or something in this direction.

有人可以告诉我,这是否是问题,我可以如何解决它。也许一些Visual Studio设置可以帮助我吗?

Could someone tell me if this is the problem and how I can fix it. Maybe some Visual Studio settings can help me out?

推荐答案

我已经找到了一种方法来避免这个问题。
如果我通过仅使用同一个大缓冲区来创建缓冲区动态,那么Visual Studio在调试我的源文件时没有问题。
代码示例:

I have found a way to avoid the problem. If I create the buffer "dynamically" by just malloc-ing the same big buffer then Visual Studio has no problem debugging my source file. Code example:

void foo()
{
    float *testbuf;
    testbuf = (float*) malloc(200000*sizeof(float)); // "dynamic" malloc
    memset(testbuf, 0, 200000*sizeof(float)); // Make sure buffer is empty.
    // Code (irrelevant to example)
    free(testbuf);
}

所以这没有回答这个问题堆栈内存的最大容量是多少视觉工作室调试器,但它确实提供了解决方案的问题。

So this does not answer the question what the maximum capacity of stack memory is for the visual studio debugger but it does provide a workaround to the problem.

我希望这将有助于某人。

I hope this will help someone.

这篇关于Visual Studio调试最大缓冲区大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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