rem: init_thread_list ();
add: haiku_init_thread_list(&sTeamDebugInfo); haiku_init_image_list(&sTeamDebugInfo);
context: haiku_init_child_debugging (thread_id threadID, bool debugThread){	thread_info threadInfo;	status_t result;	// get a thread info	result = get_thread_info(threadID, &threadInfo);	if (result != B_OK)		error("Thread with ID %ld not found: %s", threadID, strerror(result));	// init our team debug structure	sTeamDebugInfo.team = threadInfo.team;	sTeamDebugInfo.debugger_port = -1;	sTeamDebugInfo.nub_port = -1;	sTeamDebugInfo.reply_port = -1;	sTeamDebugInfo.threads = NULL;	sTeamDebugInfo.events.head = NULL;	sTeamDebugInfo.events.tail = NULL;	// create the debugger port	sTeamDebugInfo.debugger_port = create_port(10, "gdb debug");	if (sTeamDebugInfo.debugger_port < 0) {		error("Failed to create debugger port: %s",			strerror(sTeamDebugInfo.debugger_port));	}	// create a reply port	sTeamDebugInfo.reply_port = create_port(10, "gdb debug reply");	if (sTeamDebugInfo.reply_port < 0) {		error("Failed to create reply port: %s",			strerror(sTeamDebugInfo.reply_port));	}	// install ourselves as the team debugger	sTeamDebugInfo.nub_port = install_team_debugger(sTeamDebugInfo.team,		sTeamDebugInfo.debugger_port);	if (sTeamDebugInfo.nub_port < 0) {		error("Failed to install ourselves as debugger for team %ld: %s",			sTeamDebugInfo.team, strerror(sTeamDebugInfo.nub_port));	}	// start debugging the thread	if (debugThread) {		result = debug_thread(threadID);		if (result != B_OK) {			error("Failed to start debugging thread %ld: %s", threadID,				strerror(result));		}	}	// set the team debug flags	{		debug_nub_set_team_flags message;		message.flags = B_TEAM_DEBUG_SIGNALS /*| B_TEAM_DEBUG_PRE_SYSCALL			| B_TEAM_DEBUG_POST_SYSCALL*/ | B_TEAM_DEBUG_TEAM_CREATION			| B_TEAM_DEBUG_THREADS | B_TEAM_DEBUG_IMAGES;			// TODO: We probably don't need all events		haiku_send_debugger_message(&sTeamDebugInfo,			B_DEBUG_MESSAGE_SET_TEAM_FLAGS, &message, sizeof(message), NULL, 0);	}	haiku_init_thread_list(&sTeamDebugInfo);	haiku_init_image_list(&sTeamDebugInfo);	// the fun can start: push the target and init the rest	push_target(sHaikuTarget);	init_thread_list ();	disable_breakpoints_in_shlibs (1);//	child_clear_solibs ();		// TODO: Implement? Do we need this?	clear_proceed_status ();	init_wait_for_inferior ();	target_terminal_init ();	target_terminal_inferior ();}