How can I change a variable through the debugger in the Eclipse CDT on a mac?
This may be a dumb question, I realize, but this is quite frustrating for me right now so I'm going to ask anyway.
I'm following the C/C++ Development User Guide in the Eclipse help.
I'm at开发者_如何学Python C/C++ Development User Guide -> Getting Started -> Debugging projects
At this point I am told the following:
In the Variables view, right-click the input variable, and select Change Value... and type 'm' between the single quotes and hit OK.
Except, there is no Change Value...
! Here is a screenshot of what it looks like for me:
Where is Change Value...
? Whiskey Tango Foxtrot?!
Despite the instructions you are following, you can simply click (single left click) on the value in the value box. The data shown in the variable's value column will go into edit mode so you can type your new value.
Ok I figured things out after much pain.
I had installed the gdb provided by XCode 3:
GNU gdb 6.3.50-20050815 (Apple version gdb-1515) (Sat Jan 15 08:33:48 UTC 2011)
There appears to be better compatibility with Eclipse and Photran, and perhaps with whatever version of the GCC I was using.
The solution to my problem came about by installing the fink gdb
package, which is GDB 7.1.
Note that this is called with fsf-gdb
to avoid a conflict with the Apple Dev Tools GDB.
Thus, you're going to need to change your debug configuration in eclipse to point to fsf-gdb
from gdb
.
May this help any other poor souls who happen to want to debug with Photran on a mac.
精彩评论