From 99ea44c4ccfec014c65129c8164c4e0025ce1929 Mon Sep 17 00:00:00 2001 From: Ryan Fleury Date: Wed, 26 Aug 2026 17:52:33 -0700 Subject: [PATCH] try relative paths correctly with crash dump modules --- src/dbg_engine/dbg_engine_ctrl.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/dbg_engine/dbg_engine_ctrl.c b/src/dbg_engine/dbg_engine_ctrl.c index b83871c1..980f18e4 100644 --- a/src/dbg_engine/dbg_engine_ctrl.c +++ b/src/dbg_engine/dbg_engine_ctrl.c @@ -4114,7 +4114,16 @@ d_ctrl_thread__open_crash_dump(DMN_CtrlCtx *ctrl_ctx, D_Msg *msg) module_name = path_normalized_from_string(scratch.arena, module_name); } - // rjf: open module file + // rjf: relativize module path to the dmp file, if needed + { + String8 relative_module_path = str8f(scratch.arena, "%S/%S", str8_chop_last_slash(path), str8_skip_last_slash(module_name)); + if(properties_from_file_path(relative_module_path).created != 0) + { + module_name = relative_module_path; + } + } + + // rjf: unpack module file File module_file = file_open(AccessFlag_Read|AccessFlag_ShareRead, module_name); FileProperties module_props = properties_from_file(module_file); FileMap module_map = file_map_open(AccessFlag_Read, module_file);