• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Debugging strings in XCode
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Debugging strings in XCode


  • Subject: Re: Debugging strings in XCode
  • From: Mike Lazear <email@hidden>
  • Date: Fri, 14 Nov 2003 17:26:51 -0800

Jim,

I'm a happy camper now!!!

the {(char *) $VAR}:s worked I had tried {(char *) ($VAR)} before and that didn't work. The documentation on the Custom Formats is very sketchy so I just kept experimenting but never tried the exact string you recommended.

It would be nice to be built in but I'm not going to complain (at least not anymore) if there is at least a way to show it in the variable list. Being able to set the format for all char arrays would be a nice touch though.

Thanks a bunch,
Mike


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.

References: 
 >Re: Debugging strings in XCode (From: Mike Lazear <email@hidden>)
 >Re: Debugging strings in XCode (From: Jim Ingham <email@hidden>)

  • Prev by Date: Re: Debugging strings in XCode
  • Next by Date: Re: Debugging strings in XCode
  • Previous by thread: Re: Debugging strings in XCode
  • Next by thread: Re: Debugging strings in XCode
  • Index(es):
    • Date
    • Thread