• 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: Viewing CFString values in XCode debugger
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Viewing CFString values in XCode debugger


  • Subject: Re: Viewing CFString values in XCode debugger
  • From: Chris Espinosa <email@hidden>
  • Date: Fri, 24 Dec 2004 12:21:28 -0800

On Dec 24, 2004, at 11:31 AM, Mike Lazear wrote:

I'm trying to debug a CFStringRef problem in my program. Is there any way
to see the value of the CFString as a readable string in the variable section
of the debugger?


I realize CFString is a opaque struct but it would be really nice to see the
contents rather than just the hex value of the memory address that a
CFStringRef currently shows.


I guess what I'm looking for is the correct Summary format statement that
will make the CFString readable.

You probably want something like {(char *)CFStringGetCStringPtr ($VAR, CFStringGetSystemEncoding())}:s


But be forewarned that CFStringGetCStringPtr may fail if it can't get a pointer to the backing string. You probably have to allocate memory and call a function to get it reliably.

You could always use CFShow in the gdb console window.

Chris

_______________________________________________
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


References: 
 >Viewing CFString values in XCode debugger (From: Mike Lazear <email@hidden>)

  • Prev by Date: Viewing CFString values in XCode debugger
  • Next by Date: re: Viewing CFString values in XCode debugger
  • Previous by thread: Viewing CFString values in XCode debugger
  • Next by thread: re: Viewing CFString values in XCode debugger
  • Index(es):
    • Date
    • Thread