[lldb-dev] Associating SBThread with a native thread
gclayton at apple.com
Thu Jan 8 10:40:00 PST 2015
We use the globally unique thread ID:
GetGloballyUniqueThreadIDForMachPortID (thread_t mach_port_id)
mach_msg_type_number_t tident_count = THREAD_IDENTIFIER_INFO_COUNT;
kr = thread_info (mach_port_id, THREAD_IDENTIFIER_INFO, (thread_info_t) &tident, &tident_count);
if (kr != KERN_SUCCESS)
this is the best way because mach ports can be re-used, but the globally unique thread ID is always guaranteed to be unique.
> On Jan 8, 2015, at 8:26 AM, Mario Zechner <badlogicgames at gmail.com> wrote:
> we are currently trying work around some issues with rapid suspend/resume. We essentially setup a thread in the inferior with which we communicate via TCP to get informed of events such as thread start/stop without having to set breakpoints and stopping the inferior.
> Eventually we need to associate the native threads with the SBThread we get from LLDB's API. SBThread has an id and an index, but those don't seem to map to anything on the inferior side (e.g. the pthread id of the thread).
> Is there a way to perform this association?
> lldb-dev mailing list
> lldb-dev at cs.uiuc.edu
More information about the lldb-dev