Re: Threads - while debugging
Re: Threads - while debugging
- Subject: Re: Threads - while debugging
- From: David Dunham <email@hidden>
- Date: Sun, 13 Nov 2005 20:15:00 -0800
John
When I'm single stepping using the X-Code debugger, and I step
through a method that creates the thread, then stop at the
next instruction, will the thread execute or will it stop prior
to execution. Or in other words, when I'm single stepping
with the source debugger, and step through the C++ call
below...
if (thread2 == NULL) {
thread2 = new InfoThread2(this); <--- this also runs the thread
}
next_function();
Once I step through the allocation and creation of the thread,
it also runs it.
The debugger would expectedly stop at the "next_function()",
so when it stops, has the thread executed by this time in its
entirety? Or is the thread suspended until I continue executing
the code?
Depending on what your thread does, I think it's a safe assumption
that execution will reach next_function() long before the thread
terminates. The presence of a debugger doesn't change this.
I've never had much luck stepping through thread context switches
(admittedly most of my experience is with CodeWarrior's interface to
GDB, not Xcode's).
In general, questions about threads are best asked on Apple's mt-smp list.
--
David Dunham A Sharp, LLC
Voice/Fax: 206 783 7404 http://a-sharp.com
Efficiency is intelligent laziness.
_______________________________________________
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