使用分析工具的函数调用图选项时出现日食 CDT 错误
Eclipse CDT error while using Function Callgraph option of Profiling Tools
我在使用分析工具的函数调用图选项时在 Eclipse CDT 中收到以下错误
/tmp/org.eclipse.linuxtools.profiling.launch14272008124383356638983332386495.sh: 2: /tmp/org.eclipse.linuxtools.profiling.launch14272008124383356638983332386495.sh: Syntax error: Bad fd number
我用谷歌搜索了这个错误。我发现问题出在>&
.答案表明,可以通过将其替换为&>
来解决该问题。但是如何做到这一点,因为日食会创建文件?
下面是我使用分析工具的示例 C 代码。但是我有一个巨大的代码,我面临着同样的问题。
/*
============================================================================
Name : hello.c
Version :
Copyright : Your copyright notice
Description : Hello World in C, Ansi-style
============================================================================
*/
#include <stdio.h>
#include <stdlib.h>
void abc() {
}
int main(void) {
puts("!!!Hello World!!!"); /* prints !!!Hello World!!! */
abc();
return EXIT_SUCCESS;
}
下面是错误中提到的 shell 脚本
#!/bin/sh
exec stap -c '/home/tejus/workspaces/testC/hello/Debug/hello' /home/tejus/workspaces/testC/.metadata/.plugins/org.eclipse.linuxtools.callgraph.core/callgraphGen.stp --runtime=dyninst /home/tejus/workspaces/testC/hello/Debug/hello >& /home/tejus/workspaces/testC/.metadata/.plugins/org.eclipse.linuxtools.callgraph.core/callgraph.out
我在两个 C/C++ 代码中都面临同样的问题。
这可能是因为 bash 和 sh 中的样式不同。 试试这个:将/bin/sh 的旧链接重命名为 bash,并将/bin/sh 的新链接重命名为 bash。
cd /bin
sudo mv sh sh_orig
sudo ln -s /bin/bash sh
相关文章:
- Eclipse CDT 将 static_assert(cond) 突出显示为语法错误
- 在 CentOS 7 上通过 devtoolset-4 安装的 Eclipse CDT 使用了错误版本的 gcc/g++
- CDT 可视化 c++ 支持错误
- 使用 Makefiles 在 Eclipse CDT 中进行错误检查
- 尝试在 eclipse CDT 中提取函数时"Too many declarations in selection"错误消息
- CDT 在以下期间发生内部错误: "Setting up indexer"
- 如何在新的 Eclipse CDT 项目中更改缺省错误解析器的列表
- eclipse中的C++:更新后?:CDT错误
- 使用分析工具的函数调用图选项时出现日食 CDT 错误
- Eclipse CDT:致命错误:NewLib/MathFuncsLib.h:没有这样的文件或目录
- 日食 CDT 显示错误图标
- Eclipse/CDT/MinGW C++和奇怪的错误
- 错误:NDK CDT JNI 'class'未知类型名称
- Eclipse CDT 无法在 Windows 中运行编译的可执行文件,并显示错误"terminated, exit value: <some number>"
- Eclipse CDT:错误:'::wcstold'尚未使用 MinGW 声明
- 使eclipse CDT忽略某些函数上的错误
- Eclipse CDT构建错误
- 为什么我在Eclipse CDT上得到这个错误
- 使用Eclipse CDT的Armadillo编译错误
- c++ opencv编译错误- Windows7 64位使用Eclipse CDT