[英]How do I view variables values in nsight eclipse edition
I'm using nsight eclipse edition, and I cant figure out how to view variables values in debug mode for now (meaning usual variables in host memory, debugging usual c++ code so far). 我正在使用nsight eclipse版本,我现在无法弄清楚如何在调试模式下查看变量值(意味着主机内存中的常用变量,到目前为止调试常用的c ++代码)。 "Variables" tab does not contain anything useful for me (nothing I can use now at least), and Memory tab, which should be able to display variables by their addresses and also monitor expressions does not work for me either.
“变量”选项卡不包含对我有用的任何内容(至少我现在无法使用),而Memory选项卡应该能够通过地址显示变量并监视表达式也不适用于我。
Any suggestions? 有什么建议么?
The following steps seemed to work for me: 以下步骤似乎对我有用:
idata
variable, select the triangle to expand the sub-menu. idata
变量的左侧,选择三角形以展开子菜单。 The submenu is populated with the values of idata
at each index. idata
值填充。 The data will be garbage, as it has not been initialized yet. idata
variable in the "Variables" pane, we see that the values have been changed (initialized) to 0, 1, 2, ... etc. idata
变量,我们会看到值已被更改(初始化)为0,1,2,...等。 If you attempt to debug a project for which you have built the "Release" configuration instead of "Debug" configuration, you will have a variety of issues, and will get a message "no source available" and there will be no variables displayed in the "Variables" pane. 如果您尝试调试已构建“发布”配置而不是“调试”配置的项目,则会出现各种问题,并且会收到“无可用源”消息,并且不会显示任何变量“变量”窗格。
I was using gcc 4.8, which caused problems. 我使用gcc 4.8,这导致了问题。 Now I downgraded to gcc 4.6 and it solved problem.
现在我降级到gcc 4.6,它解决了问题。
Robert Crovella, thanks for your effort. Robert Crovella,谢谢你的努力。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.