rem: const char *argv[] = { terminal, kGDBPath, fExecutablePath, teamString, NULL }; int argc = 4;
add: const char *argv[16]; int argc = 0;  argv[argc++] = terminal;  if (!debugInConsoled) { char windowTitle[64]; snprintf(windowTitle, sizeof(windowTitle), "Debug of Team %ld: %s", fTeam, _LastPathComponent(fExecutablePath)); argv[argc++] = "-t"; argv[argc++] = windowTitle; }  argv[argc++] = kGDBPath; argv[argc++] = fExecutablePath; argv[argc++] = teamString; argv[argc] = NULL;
context: TeamDebugHandler::_EnterDebugger(){	TRACE(("debug_server: TeamDebugHandler::_EnterDebugger(): team %ld\n",		fTeam));	bool debugInConsoled = _IsAppServer();	if (debugInConsoled) {		TRACE(("debug_server: TeamDebugHandler::_EnterDebugger(): team %ld is "			"the app server. Killing input_server...\n", fTeam));		// kill the input server		team_id isTeam = _FindTeam("input_server");		if (isTeam >= 0) {			printf("debug_server: preparing for debugging the app server: "				"killing the input server\n");			kill_team(isTeam);		}	}	// prepare a debugger handover	TRACE(("debug_server: TeamDebugHandler::_EnterDebugger(): preparing "		"debugger handover for team %ld...\n", fTeam));	status_t error = send_debug_message(&fDebugContext,		B_DEBUG_MESSAGE_PREPARE_HANDOVER, NULL, 0, NULL, 0);	if (error != B_OK) {		printf("debug_server: Failed to prepare debugger handover: %s\n",			strerror(error));		return error;	}	// prepare the argument vector	char teamString[32];	snprintf(teamString, sizeof(teamString), "%ld", fTeam);	const char *terminal = (debugInConsoled ? kConsoledPath : kTerminalPath);	const char *argv[] = {		terminal, kGDBPath, fExecutablePath, teamString, NULL	};	int argc = 4;	// start the terminal	TRACE(("debug_server: TeamDebugHandler::_EnterDebugger(): starting  "		"terminal (debugger) for team %ld...\n", fTeam));	thread_id thread = load_image(argc, argv, (const char**)environ);	if (thread < 0) {		printf("debug_server: Failed to start consoled + gdb: %s\n",			strerror(thread));		return thread;	}	resume_thread(thread);	TRACE(("debug_server: TeamDebugHandler::_EnterDebugger(): debugger started "		"for team %ld: thread: %ld\n", fTeam, thread));	return thread;}