Equating pthreads_self() back to "info threads"?
Equating pthreads_self() back to "info threads"?
- Subject: Equating pthreads_self() back to "info threads"?
- From: Jay Koutavas <email@hidden>
- Date: Fri, 30 Jul 2004 12:16:35 -0700
Hi all.
I'm trying to related pthreds_self() to gdb "info threads" and can't
seem to make sense of it. Apple's Mac OS X 10.3 Developer Release
Notes for GDB state:
12. info threads port numbers
We now map the port numbers for threads that gdb receives back to the
port space of the target program, so the output of info threads will
match the return of thread_self(). This still provides a convenient
way to match up your threads with what gdb presents.
I'm not seeing this match. For example, In one of my threads I get
back 0x2845e00 from pthreads_self(). I sleep the thread, and I enter
"info threads" at the gdb prompt of Xcode 1.2 and I get this output:
(gdb) info threads
0x900074c8 in mach_msg_trap ()
20 process 14581 thread 0xc303 0x900074c8 in mach_msg_trap ()
19 process 14581 thread 0xb907 0x90012568 in syscall_thread_switch ()
18 process 14581 thread 0xab03 0x90018be8 in
semaphore_timedwait_signal_trap ()
17 process 14581 thread 0x9747 0x900074c8 in mach_msg_trap ()
16 process 14581 thread 0x9407 0x9000b20c in select ()
15 process 14581 thread 0x9107 0x900074c8 in mach_msg_trap ()
14 process 14581 thread 0x8603 0x9000b20c in select ()
13 process 14581 thread 0x8403 0x900074c8 in mach_msg_trap ()
12 process 14581 thread 0x7f03 0x9000d4ec in recvfrom ()
11 process 14581 thread 0x660f 0x90018be8 in
semaphore_timedwait_signal_trap ()
10 process 14581 thread 0x6907 0x90016f48 in semaphore_wait_signal_trap ()
9 process 14581 thread 0x520f 0x90016f48 in semaphore_wait_signal_trap ()
5 process 14581 thread 0x6703 0x90012568 in syscall_thread_switch ()
3 process 14581 thread 0x430f 0x90016f48 in semaphore_wait_signal_trap ()
2 process 14581 thread 0x3d13 0x900429ac in kill ()
* 1 process 14581 local thread 0xd03
Snooping around each threads stack reveals that the actual thread I
want is #18 in this list. I don't get how to relate the 0x2845e00
given back to me from pthreads_self() to the columns listed for
thread 18. What am I missing here?
Much Thanks,
/Jay
--
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Jay Koutavas
mailto:email@hidden
Heynow Software
http://www.heynow.com
Windham, New Hampshire, USA
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.