代码::块调试器,"Cannot find the bounds of current function"

code::blocks debugger, "Cannot find the bounds of current function"

本文关键字:of bounds current function the Cannot 调试器 代码 find      更新时间:2023-10-16

我想用代码::blocks调试一个简单的c ++程序。"运行到光标"有效,但"单步进入"或"下一行"无效,这些给出消息"找不到当前功能的边界"。我做了什么:

    选中
  • -g 编译选项,而 -s 未选中
  • 最新版本的代码::块刚刚安装
  • 为 GDB 设置了正确的可执行路径

我的设置:

  • 视窗 7 64 位
  • 代码::块 13.12
  • 海湾合作委员会编译器

c++ 代码:

#include <iostream>
#include <cstdio>
using namespace std;
int main()
{
    printf("qwe");
    printf("qwe");
    printf("qwe");
    printf("qwe");
    printf("qwe");
    return 0;
}

在"运行到行"命令之后,它还说"in ??() ()",可能值得一提。

那么,我该怎么做才能让我有一个功能调试器呢?根本问题是什么?

最终解决问题的是将代码::blocks编译器可执行文件从"mingw32-g++.exe"更改为简单的"g++.exe"并重建程序。我最终通过学习从命令行使用 gdb 并看到它与 code::blocks 构建的可执行文件也存在相同的问题,但如果我使用 g++ 从命令编译完全相同的源代码,则不会。所以,这是唯一的区别,我改变了它,它奏效了。不知道为什么,呵呵。