summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
4f04dc8)
Gdbserver seems to pass an empty argv[0], at least on Windows. That
causes problems with the various get_*_dir functions.
+ if(!argv0 || !*argv0)
+ {
+#ifdef _WIN32
+ argv0 = "application.exe";
+#else
+ argv0 = "./application";
+#endif
+ }
+
bool has_slash = strchr(argv0, FS::DIRSEP);
if(!has_slash)
exe = FS::path_lookup(argv0);
bool has_slash = strchr(argv0, FS::DIRSEP);
if(!has_slash)
exe = FS::path_lookup(argv0);