• 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: Opaque types are nice concepts but how do you debug that?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Opaque types are nice concepts but how do you debug that?
      • From: Jim Ingham <email@hidden>
    • Re: Opaque types are nice concepts but how do you debug that?
      • From: "Yves Poissant" <email@hidden>
    • Build configurations and static libraries
      • From: Carsten G Pedersen <email@hidden>
    • Re: Opaque types are nice concepts but how do you debug that?
      • From: Alexey Proskuryakov <email@hidden>
References: 
 >Opaque types are nice concepts but how do you debug that? (From: "Yves Poissant" <email@hidden>)

  • Prev by Date: Xcode Events for External Editors
  • Next by Date: Re: Opaque types are nice concepts but how do you debug that?
  • Previous by thread: Opaque types are nice concepts but how do you debug that?
  • Next by thread: Re: Opaque types are nice concepts but how do you debug that?
  • Index(es):
    • Date
    • Thread