Re: Debugger "Variable is not a CFDictionary"
Re: Debugger "Variable is not a CFDictionary"
- Subject: Re: Debugger "Variable is not a CFDictionary"
- From: Fritz Anderson <email@hidden>
- Date: Thu, 02 Jun 2011 11:33:40 -0500
> I have the following code:
>
> #define kAppleReadWriteMedia "Apple read/write Media"
> CFMutableDictionaryRef classesToMatch;
> classesToMatch = IOServiceNameMatching(kAppleReadWriteMedia);
>
> After execution of the above code the debugger summary field shows:
> "Variable is not a CFDictionary"
>
> Is this a bug in the debugger?
This is the summary column in the variables inspector? It's not _always_ accurate, and there are reasons to be charitable about that. See if it clears up when you step to a line at which the value is actually used.
Do you have a reason to suspect the value is not what it should be? If it's misbehavior later in your code, I'd consider the summary-field problem a red herring. "po classesToMatch" in the debugger console will tell you whether the search dictionary (the name is a bit odd; it should just be a one-item dictionary saying kIONameMatchKey is "Apple read/write Media," not the result of a search) is what you'd expect.
Another reason I'd expect later code not to do what you seem to want is that I'd be surprised if there were a service with the name "Apple read/write Media." But it's been a while since I worked with IOKit.
— F
_______________________________________________
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