Closed mattcostanzo closed 10 years ago
guarnold commented 3 months ago The command pthread_setname_np is not working properly. It should return 0 but it is returning 16. (http://developer.blackberry.com/native/documentation/playbook/com.qnx.doc.neutrino.lib_ref/topic/p/pthread_setname_np.html)
The problem is that the documentation doesn't tell the codes for each error, so I don't know at this moment what that number (16) means.
"Returns:
EOK Success.
E2BIG The name is too long.
EBUSY As described above, you're trying to name a thread other than the calling thread, and another program already has write access to /proc/ pid /as.
EPERM You don't have the appropriate permissions to set the name."
Estimate: 1 Day
The plug-in was supporting thread names but GDB was not. Now it is and it is possible to see the name of the thread in the thread window.
Verified using VS2013/12 from build 2.0.0022 on Win8.1 and Win7 64 bit. it is possible to see the name of the thread in threads window after hit a breakpoint.
Giving a thread a name doesn't appear in the Threads Name Column.
pthread_t producerThread; int rc1 = pthread_create(&producerThread, NULL, producer, NULL); if( 0 == rc1 ) { rc1 = pthread_setname_np(producerThread, "producerThread"); }
pthread_t consumerThread; int rc2 = pthread_create(&consumerThread, NULL, consumer, NULL); if( 0 == rc2 ) { rc2 = pthread_setname_np(consumerThread, "consumerThread"); }
1.Debug Multi-Threaded application 2.Hit a breakpoint in the thread Behaviour: No name appears in the thread window for that thread.