Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSThread -setName:




On Nov 8, 2007, at 5:21 PM, John Mikros wrote:

If the debugger doesn't display the thread name, then what is this useful for?

It's printed as part of the NSThread description (when you NSLog(), for instance), and you can ask the debugger to 'po' the current thread's description:


	(gdb) po [NSThread currentThread]
	<NSThread: 0x103db0>{name = Loader thread, num = 1}

For a given thread, gdb doesn't know if there's an NSThread associated with the pthread or not, so it can't really do this automatically.

Until the set-the-pthread-name API comes through, we're labeling what we can.

.chris

--
Chris Parker
Cocoa Frameworks Engineer
Apple Inc.

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden
References: 
 >NSThread -setName: (From: John Stiles <email@hidden>)
 >Re: NSThread -setName: (From: Chris Parker <email@hidden>)
 >Re: NSThread -setName: (From: John Mikros <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.