get default symbol path as part of process info; sketch out windows-style path for local symbol server cache

This commit is contained in:
Ryan Fleury
2026-06-02 12:10:48 -07:00
parent e1782d08cf
commit 4e44a3c271
6 changed files with 56 additions and 9 deletions
+18
View File
@@ -1923,12 +1923,30 @@ w32_entry_point_caller(int argc, WCHAR **wargv)
{
String16 string16 = str16((U16 *)this_proc_env + start_idx, idx - start_idx);
String8 string = str8_from_16(arena, string16);
if(str8_match(string, s("_NT_SYMBOL_PATH="), StringMatchFlag_RightSideSloppy))
{
info->symbol_cache_path = str8_skip(string, 16);
info->symbol_cache_path = str8_skip_chop_whitespace(info->symbol_cache_path);
}
str8_list_push(arena, &info->environment, string);
start_idx = idx+1;
}
}
}
}
if(info->symbol_cache_path.size == 0)
{
Temp scratch = scratch_begin(0, 0);
U64 size = KB(32);
U16 *buffer = push_array_no_zero(scratch.arena, U16, size);
if(SUCCEEDED(SHGetFolderPathW(0, CSIDL_LOCAL_APPDATA, 0, 0, (WCHAR*)buffer)))
{
String8 local_appdata = str8_from_16(scratch.arena, str16_cstring(buffer));
info->symbol_cache_path = str8f(arena, "%S\\Temp\\SymbolCache", local_appdata);
}
scratch_end(scratch);
}
}
//- rjf: set up entity storage