Why can't I Run > Fix?
Why can't I Run > Fix?
- Subject: Why can't I Run > Fix?
- From: Fritz Anderson <email@hidden>
- Date: Thu, 21 Jan 2010 14:38:31 -0600
Xcode 3.1.2, Mac OS X 10.6.2
I find that when I edit a function that is paused in the debugger, the Run > Fix menu item is inactive. I don't understand why.
Here is the function (abbreviated):
===
void doRegression(void)
{
int nScanned;
int n;
double sumX, sumY;
double sumX2, sumY2;
double sumXY;
n = 0;
// Replace this:
sumX = sumX2 = sumY2 = sumXY = 0.0;
// With this:
// sumX = sumY = sumX2 = sumY2 = sumXY = 0.0;
do {
double x, y;
nScanned = scanf("%lg %lg", &x, &y);
// ...
} while (nScanned == 2);
// ...
}
===
The line beginning sumX = contains a bug -- sumY is not initialized. I stepped over that line, and the program was paused at the nScanned = line in the do loop. I edited the sumX = line, as I indicate in the comments. I saved the file. The Fix command is not dimmed in the Run menu.
Changing the program so that n = 0; follows the problem line, and I am paused outside the do loop, doesn't change anything.
I'm using the default Debug configuration unchanged:
GCC_ENABLE_FIX_AND_CONTINUE = YES
GCC_OPTIMIZATION_LEVEL = 0
GCC_VERSION =
GCC_GENERATE_DEBUGGING_SYMBOLS = YES
GCC_DEBUGGING_SYMBOLS = default
GCC_SYMBOLS_PRIVATE_EXTERN = YES
(Setting this to NO doesn't help, and the note on the Fix and Continue setting says it overrides GCC_SYMBOLS_PRIVATE_EXTERN anyway.)
My reading of the docs says that exported symbols, optimization off, and "GCC 3.3 or later" is all that is needed. I'm a bit distressed to see that GCC_VERSION is empty; it shows up as 4.2 in the build settings tab, so maybe the empty setting means the default.
I think I'm doing everything that's needed. Any ideas on why I can't fix?
— F
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden