Index: include/lldb/Host/windows/win32.h =================================================================== --- include/lldb/Host/windows/win32.h +++ include/lldb/Host/windows/win32.h @@ -57,6 +57,7 @@ int usleep(uint32_t useconds); char* getcwd(char* path, int max); +int chdir(const char* path); char* basename(char *path); char *dirname(char *path); Index: source/Host/windows/Windows.cpp =================================================================== --- source/Host/windows/Windows.cpp +++ source/Host/windows/Windows.cpp @@ -159,11 +159,18 @@ char* getcwd(char* path, int max) { - if (GetCurrentDirectory(max, path) == 0) + if (GetCurrentDirectory(max, path) != 0) return path; return NULL; } +int chdir(const char* path) +{ + if (SetCurrentDirectory(path) != 0) + return 0; + return -1; +} + char *dirname(char *path) { char* l1 = strrchr(path, '\\');