Rémi Bernon (@rbernon) commented about programs/winedbg/gdbproxy.c:
argv[3] = "-x"; argv[4] = unix_tmp; argv[5] = NULL;
- if (flags & FLAG_WITH_XTERM)
__wine_unix_spawnvp( (char **)argv, FALSE );
- else
__wine_unix_spawnvp( (char **)argv + 2, FALSE );
- HeapFree( GetProcessHeap(), 0, unix_tmp );
- return TRUE;
- return CreateThread( NULL, 0, gdb_ctrl_thread, (flags & FLAG_WITH_XTERM) ? argv : argv + 2, 0, NULL );
This passes the `argv` variable from the stack to the other thread.