Skip to content

Commit

Permalink
prioritize exe-relative debug paths - treat embedded pdb/rdi paths as…
Browse files Browse the repository at this point in the history
… 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.
  • Loading branch information
ryanfleury committed Jan 5, 2025
1 parent 4cb6e88 commit 47373fb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ctrl/ctrl_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 47373fb

Please sign in to comment.