rem: thread_debug_info *threadDebugInfo =  haiku_find_thread(teamDebugInfo, threadID);
add: threadDebugInfo = haiku_find_thread(teamDebugInfo, threadID);
context: haiku_add_thread(team_debug_info *teamDebugInfo, thread_id threadID){	struct thread_info *gdbThreadInfo;	// find the thread first	thread_debug_info *threadDebugInfo		=  haiku_find_thread(teamDebugInfo, threadID);	if (threadDebugInfo)		return threadDebugInfo;	// allocate a new thread debug info	threadDebugInfo = XMALLOC(thread_debug_info);	if (!threadDebugInfo)		error("haiku_thread_added(): Out of memory!\n");	// init and add it	threadDebugInfo->thread = threadID;	threadDebugInfo->next = teamDebugInfo->threads;	threadDebugInfo->stopped = false;	threadDebugInfo->last_event = NULL;	teamDebugInfo->threads = threadDebugInfo;	// add it to gdb's thread DB	gdbThreadInfo = add_thread(ptid_build(teamDebugInfo->team, 0, threadID));	// Note: In theory we could spare us the whole thread list management, since	// gdb's thread DB is doing exactly the same. We could put our data as	// thread_info::private. The only catch is that when the thread_info is	// freed, xfree() is invoked on the private data directly, but there's no	// callback invoked before that would allow us to do cleanup (e.g. free	// last_event).	TRACE(("haiku_add_thread(): team %ld thread %ld added: "		"gdb thread info: %p\n", teamDebugInfo->team, threadID, gdbThreadInfo));	return threadDebugInfo;}