Re: Opaque types are nice concepts but how do you debug that?
Re: Opaque types are nice concepts but how do you debug that?
- Subject: Re: Opaque types are nice concepts but how do you debug that?
- From: Jerry <email@hidden>
- Date: Fri, 2 Sep 2005 09:24:36 +0100
On 2 Sep 2005, at 04:12, Yves Poissant wrote:
I'm trying to figure a bug (EXC_BAD_ACCESS) with the Core
Foundation that we're having only with Tiger. This is an old code
that have been working for years previous to Tiger.
This is happening inside a function which receives a set of strings
and eventually calls CFPreferencesSetValue. The value passed is a
CFDictionary. The current key-value pair is read from the
preferences and changed. But all of that is happening through
CFMutableDictionaryRef with CFPreferencesCopyValue.
I found no way to take a look at the values stored in the opaque
datatype while debugging. The only information the debugger gives
me is that there are 6 entries. Entering the CFDictionary reference
address in the memory browser gives only a bunch on meaningless
garbage.
Does anybody know of a way to examine the content of the value
passed to CFPreferencesSetValue? Or any development methodology
that would facilitate debugging when programming with Core
Foundation opaque types?
I don't like contemplating the idea of using 15 year old techniques
such as adding printf() or something similar, plus the long modify -
> compile -> link -> run cycle to be able to examine the passed
values.
Theoretically you can type:
print (int)CFShow( myDictionary )
into the debugger console. Unfortunately, for me this always results
in a message saying that the program was signalled in a function
called by GDB followed by debugging mayhem, but I know it works for
most people.
Also, technote TN2124 can't be publicized too much, so here's a free
plug:
http://developer.apple.com/technotes/tn2004/tn2124.html
Jerry
_______________________________________________
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