Re: Viewing CFString values in XCode debugger
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