• 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
Debugging Questions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Debugging Questions


  • Subject: Debugging Questions
  • From: Greg <email@hidden>
  • Date: Wed, 2 Feb 2005 14:37:54 +1000

My app has started crashing and I am having difficulty in trying to figure out why. The top of the stack trace is as follows:

(gdb) bt
#0 0x90191264 in CFEqual ()
#1 0x90192738 in __CFDictionaryFindBuckets2 ()
#2 0x90195808 in CFDictionarySetValue ()
#3 0x909f4620 in -[NSCFDictionary setObject:forKey:] ()
#4 0x1003cad0 in -[PolarRegistry setObject:forKey:] (self=0x2615320, _cmd=0x90894b08, obj=0x65d40c0, key=0x65d4100) at /Users/ghulands/Development/PolarS710/PObject.m:50



So it seems that core foundation is the problem. The assembly shown in Xcode is as follows:


0x90191238 <+0000> cmpw cr7,r3,r4
0x9019123c <+0004> mflr r0
0x90191240 <+0008> bcl- 20,4*cr7+so,0x90191244 <CFEqual+12>
0x90191244 <+0012> stmw r27,-20(r1)
0x90191248 <+0016> stw r0,8(r1)
0x9019124c <+0020> mr r28,r3
0x90191250 <+0024> stwu r1,-96(r1)
0x90191254 <+0028> mflr r31
0x90191258 <+0032> mr r27,r4
0x9019125c <+0036> li r3,1
0x90191260 <+0040> beq- cr7,0x9019139c <CFEqual+356>
0x90191264 <+0044> lhz r10,6(r28) <-------------- This is where it crashes
0x90191268 <+0048> addis r9,r31,4096
0x9019126c <+0052> addi r2,r9,-4176
0x90191270 <+0056> rlwinm r0,r10,26,22,29
0x90191274 <+0060> lwzx r0,r2,r0
0x90191278 <+0064> lwz r2,0(r28)
0x9019127c <+0068> cmpw cr7,r2,r0
0x90191280 <+0072> beq- cr7,0x901912dc <CFEqual+164>
0x90191284 <+0076> cmplwi cr7,r2,4095
0x90191288 <+0080> ble- cr7,0x901912dc <CFEqual+164>
0x9019128c <+0084> addis r2,r31,4096
0x90191290 <+0088> lwz r29,-4180(r2)



I downloaded the source to core foundation's CFEqual and it shows:

Boolean CFEqual(CFTypeRef cf1, CFTypeRef cf2) {
#if defined(DEBUG)
if (NULL == cf1) HALT;
if (NULL == cf2) HALT;
#endif
if (cf1 == cf2) return true;
CFTYPE_OBJC_FUNCDISPATCH1(Boolean, cf1, "isEqual:", cf2);
CFTYPE_OBJC_FUNCDISPATCH1(Boolean, cf2, "isEqual:", cf1);
__CFGenericAssertIsCF(cf1);
__CFGenericAssertIsCF(cf2);
if (__CFGenericTypeID_inline(cf1) != __CFGenericTypeID_inline(cf2)) return false;
if (NULL != __CFRuntimeClassTable[__CFGenericTypeID_inline(cf1)]->equal) {
return __CFRuntimeClassTable[__CFGenericTypeID_inline(cf1)]->equal(cf1, cf2);
}
return false;
}



What I would like to know is how I can translate to which line is causing the crash and work back into my code or is there a way with xcode to set a directory of the CF source code so that the debugger can pick up the line that is causing it and show the source code instead of the assembly?


Any help is greatly appreciated.

Regards,
Greg

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Debugging Questions
      • From: Jason Harris <email@hidden>
  • Prev by Date: Re: PrefPane contents not being displayed
  • Next by Date: Re: How to re-check "Conditionally sets editable" on a tablecolumn?
  • Previous by thread: Re: PrefPane contents not being displayed
  • Next by thread: Re: Debugging Questions
  • Index(es):
    • Date
    • Thread