Re: Debugging strings in XCode
Re: Debugging strings in XCode
- Subject: Re: Debugging strings in XCode
- From: Jim Ingham <email@hidden>
- Date: Fri, 14 Nov 2003 17:07:30 -0800
Mike,
On Nov 14, 2003, at 4:30 PM, Mike Lazear wrote:
Jim,
That's a good explanation for why it does what it does. I can see
where you would want to see it as a array.
By entering (char *) myCharArray in the expressions window I was able
to see what I wanted. It still would be nice to be able to enter an
expression to do this in the variable window so that I didn't have to
add an expression for every string. I've got to believe that a high
percentage of char arrays are thought of as strings and not just as an
array of individual chars. I mentioned in one of my other posts that
when I create an expression {(char *) ($VAR)} what I get is the
address, something like 0xbffff790.
Humm... If I have:
unsigned char ubby[40] = "something";
among my variables, and I enter "{(char *) $VAR}:s" as the format
string in the summary field, the summary field holds "something". If
this doesn't work for you, please file a bug with a sample of the code
that doesn't work so we can reproduce the problem.
It would still be better if we handled this case internally in Xcode,
however, because the formatters that you enter into the summary field
match the type of the variable they were entered for exactly, so a
"unsigned char [40]" is different from an "unsigned char [41]". This
is the correct behavior (you really would not in general want Xcode
trying to guess which variables you really meant to apply the formatter
to...) but also, you would REALLY like to use the same formatter for
all the "unsigned char [n]" types without having to re-enter it for
every value of n...
Thanks for the suggestion. Now, I just need to figure out how to file
a bug report.
If you have an ADC membership already, just go to
http://bugreporter.apple.com/
log in, and click the New Problem tab.
Jim
--
Jim Ingham email@hidden
Developer Tools
Apple Computer
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.