-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathWindows.cc
49 lines (37 loc) · 962 Bytes
/
Windows.cc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#ifdef _WIN32
#include <string>
#include <libloaderapi.h>
#include <processthreadsapi.h>
#include <windef.h>
#include <windows.h>
#include "indexer/os/Os.h"
namespace scip_clang {
std::string exec(std::string cmd) {
// FIXME(def: windows-support) Implement this if needed for addr2line
return "";
}
std::string addr2line(std::string_view programName, void const *const *addr,
int count) {
// FIXME(def: windows-support)
return "";
}
std::string getProgramName() {
char buf[MAX_PATH];
GetModuleFileNameA(nullptr, buf, MAX_PATH);
return buf;
}
bool setCurrentThreadName(std::string_view name) {
std::wstring wstr = std::wstring(name.begin(), name.end());
SetThreadDescription(GetCurrentThread(), wstr.c_str());
return true;
}
bool amIBeingDebugged() {
// FIXME(def: windows-support)
return false;
}
bool stopInDebugger() {
// FIXME(def: windows-support)
return false;
}
} // namespace scip_clang
#endif