- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
为什么Eclipse Mars CDT中strings
的值没有出现在表达式或variables
窗口中?它显示为 {...}
,但我想在值选项卡下查看值本身。
我该怎么做?
最佳答案
这里发生的事情是 CDT 显示 GDB 提供给它的信息。
对于一个简单的程序,调试器在返回 0 的行上停止;
#include <string>
using namespace std;
int main() {
string mystring = "my string here";
return 0;
}
这是我在 CDT 变量 View 中看到的:
这与我在 GDB 中看到的相符:
(gdb) p mystring
$1 = {static npos = <optimised out>,
_M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>},
_M_p = 0x602028 "my string here"}}
但是,我怀疑您想要的是 libstdc++ 的 pretty-print ,它使变量 View 看起来像这样:
创建一个包含以下内容的 ~/.gdbinit 文件(更新您机器的路径)
python
import sys
sys.path.insert(0, '/usr/share/gcc-4.8/python/')
from libstdcxx.v6.printers import register_libstdcxx_printers
register_libstdcxx_printers (None)
end
然后将您的启动配置指向该 gdbinit 文件并开始调试。
关于eclipse - 字符串的值没有出现在eclipse mars CDT中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32411117/
在使用包 Npsql 在 Mono 上使用带有 Entity Framework 的 PostgreSQL 数据库时和 Npsql.EntityFramework 尝试从控制台应用程序运行 Code
当我开始 eclipse 时,我收到此错误。 -vm 参数包含 java.exe 的路径,在 java 升级后,这在我的系统中是不可能的。我该如何纠正? Java 已启动但返回退出代码=13 C:/P
通常当我切换到 MARS 中的“执行”选项卡时,“文本”和“数据”窗口会最小化并且不会展开。实际上,“最小化”这个词是错误的——您只能看到标题栏的上半部分,所以您甚至无法访问最大化按钮。有没有其他人看
我不能在 eclipse mars 中使用默认存储库。例如 http://download.eclipse.org/eclipse/updates/4.5/ .代理没有问题。我可以联系http://d
我正在使用 eclipse mars 4.5。问题是,它总是忙于扫描类路径,这实际上让 Eclipse 运行起来太慢了。我正在处理多模块 OSGI 项目,因此工作区中大约有 30 个项目,eclips
我正在尝试从“坚持不懈的火星天气报告”(https://mars.nasa.gov/mars2020/weather/)中抓取数据。但是当我尝试抓取例如火星日期时,它会在列表中返回一个无项目。像这样:
上周突然之间,一个 javascript 文件将不再在比较编辑器中打开。 我正在运行最新的 Mars Eclipse 我正在运行最新的 Subclipse 我与 repo 同步,并查看更改的文件 当我
我正在尝试删除恢复保管库,但它有一些由 MARS 代理在不存在的计算机上生成的旧数据。没有用于删除这些的 UI 选项。我在下面尝试了 Powershell,但失败并显示 Get-AzureRmReco
所以,每次我想使用 JavaFX 8 组件时,我都必须在谷歌上搜索包的确切名称,然后手动输入 import packageName; 我会更详细地介绍。 假设我想创建一个 StackPane St
我想知道是否有人遇到相同的问题,所以我在Eclipse中打开gradle文件(版本:Mars.2发行版(4.5.2)),没有发现gradle语法的亮点。我从http://projects.eclips
我正在 MARS 中测试 MIPS 汇编程序,并希望指定一个文件在执行期间作为输入(有点像我可以通过使用以下 UNIX 命令重定向 stdin 来完成的操作): spim -file [filenam
Ctrl+Space 未显示建议。例如 sysout 或 arr。不管用。我尝试从“内容辅助”->“高级”恢复默认设置。 但是,我所做的更改不会保存,并且会恢复为首选项中的原始设置。以前有人遇到过
为什么Eclipse Mars CDT中strings的值没有出现在表达式或variables窗口中?它显示为 {...},但我想在值选项卡下查看值本身。 我该怎么做? 最佳答案 这里发生的事情是 C
我试图弄清楚平均排名 (MAR) 的平均值是多少在图建模中进行计算。有人可以看一下我的例子并告诉我我是否正确吗? 假设我们有两个如下所示的图表: 1-2, 3-4 1, 2, 3-4 在图 1 中,有
我正在使用 Eclipse Mars 编写 Java 代码。当我使用 Ctrl-/注释某些行,然后应用 Ctrl-Shift-F 对其进行格式化,然后取消注释这些行时,结果是两行代码,而不仅仅是原始代
为什么Eclipse Mars CDT中strings的值没有出现在表达式或variables窗口中?它显示为 {...},但我想在值选项卡下查看值本身。 我该怎么做? 最佳答案 这里发生的事情是 C
我不想使用制表符来缩进。所以我选中了“使用空格缩进”选项,但我无法设置空格的数量。加号和减号按钮不可点击,我无法手动编辑值,这意味着输入数字。仅缩进一个空格太少了。 我记得一些技巧,包括编辑工作区配置
typedef struct node { int data; struct node *next; } nodeL; 假设我想用 MIPS 汇编语言翻译上面的声明,
从头开始最后的编辑...它仍然无法正常工作,地址偏移量仍然以字节为单位,据我所知 >_< 我正在尝试用 C 编写我自己的任意精度整数运算的实现。为了高效地做到这一点,我需要使用内联汇编函数来访问进位标
我更新到 Eclipse Mars。现在,如果我将鼠标悬停在方法上,我会在黑色背景上看到黑色文本。在从 Luna 更新之前,我有黄色背景,黑色文本。如何为方法配置悬停?我在 Ubuntu 14.04.
我是一名优秀的程序员,十分优秀!