prioritize exe-relative debug paths - treat embedded pdb/rdi paths as relative to the exe first - if they are relative, then relative to the exe is the correct choice, but if they are absolute, then it will simply be an invalid path, and so it will just pick up the full absolute embedded pdb path on the next candidate.

This commit is contained in:
Ryan Fleury
2025-01-04 17:02:46 -08:00
parent 4cb6e889ef
commit 47373fbb58
+2 -2
View File
@@ -3667,13 +3667,13 @@ ctrl_thread__module_open(CTRL_Handle process, CTRL_Handle module, Rng1U64 vaddr_
String8List dbg_path_candidates = {0};
if(rdi_dbg_path.size != 0)
{
str8_list_push(scratch.arena, &dbg_path_candidates, rdi_dbg_path);
str8_list_pushf(scratch.arena, &dbg_path_candidates, "%S/%S", exe_folder, rdi_dbg_path);
str8_list_push(scratch.arena, &dbg_path_candidates, rdi_dbg_path);
}
if(pdb_dbg_path.size != 0)
{
str8_list_push(scratch.arena, &dbg_path_candidates, pdb_dbg_path);
str8_list_pushf(scratch.arena, &dbg_path_candidates, "%S/%S", exe_folder, pdb_dbg_path);
str8_list_push(scratch.arena, &dbg_path_candidates, pdb_dbg_path);
}
str8_list_pushf(scratch.arena, &dbg_path_candidates, "%S.pdb", str8_chop_last_dot(path));
str8_list_pushf(scratch.arena, &dbg_path_candidates, "%S.pdb", path);