Re: Re: ___spin_lock
Re: Re: ___spin_lock
- Subject: Re: Re: ___spin_lock
- From: alex <email@hidden>
- Date: Wed, 13 Dec 2006 12:06:30 -0800
I recently switched to DWARF after reading about it here. It has helped alot. The problem I frequently run into (and never have time to flesh out and report) is when I try to print out values in arrays. I do alot of DSP work and find it really hard to live without CW's array window. so I type things like p/f *mOutput[12]@8 all day long. This sometimes causes gdb to crash itself somehow (btw, I'm not asking gdb to display unmapped memory which it usually handles properly anyway).
I will say that gdb is the best source level debugger the Mac has had, especially for an open source, 70's era, free debugger.
How much time do you estimate it takes to install the kernel debug kit (does this include the darwin sources)? Do you have to reinstall it for every OS update as well?
thanks,
alex
At 10:46 AM -0800 12/13/06, Shawn Erickson wrote:
>On 12/13/06, alex <email@hidden> wrote:
>>
>>
>>To answer your question: __spin_lock is usually called internally when you
>>attempt to take a lock. If you look at the source code for the pthreads
>>implementation you will see that the code first tries to spin on the lock
>>before blocking the thread to wait for it.
>>
>>
>>If the offset from __spin_lock + xxxx is huge than you can assume the stack
>>is not accurate.
>>
>>
>>Also, if it makes you feel any better I too get the error about not being
>>able to locate cpu_capabilities.h and I also tend to crash gdb about 5 times
>>a day doing simple work. There is nothing worse than not being able to
>>trust your debugger but this is something you will get used to on the Mac.
>>There has never been a good Mac debugger (other than Macsbug, IMHO).
>
>Using gdb against a product built with DWARF symbols work well in my
>experience (better then STABS), give that a try if you aren't already.
>
>Also having the appropriate kernel debug kit installed and ideally
>with access to related source from Darwin can greatly improve your
>ability to debug into Mac OS X code base (at least aspects of it).
>
>-Shawn
_______________________________________________
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