mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-09-24 02:00:05 +00:00
linux -> prefix user raddbg data with ., so we get ~/.raddbg normally - on windows keep normal style
This commit is contained in:
@@ -52,7 +52,7 @@ D_CmdTable: // | | | |
|
||||
{Attach 1 1 0 0 "query:unattached_processes" PID null Nil Null 0 0 0 0 0 1 1 Null "attach" "Attach" "Attaches to a process that is already running on the local machine." "" "" }
|
||||
|
||||
//- rjf: crash dump opening
|
||||
{OpenCrashDump 1 1 0 0 `folder:\\"$input\\"` FilePath null Nil Null 0 0 0 0 0 1 1 Null "open_crash_dump" "Open Crash Dump" "Opens a crash dump file and recreates debuggee state at the time of the crash." "" "" }
|
||||
{OpenCrashDump 1 1 0 0 `folder:\\"$input\\"` FilePath null Nil Null 0 0 0 0 0 1 1 FileOutline "open_crash_dump" "Open Crash Dump" "Opens a crash dump file and recreates debuggee state at the time of the crash." "" "" }
|
||||
}
|
||||
|
||||
@enum D_CmdKind:
|
||||
|
||||
@@ -58,7 +58,7 @@ d_init(void)
|
||||
{
|
||||
Temp scratch = scratch_begin(0, 0);
|
||||
String8 user_program_data_path = get_process_info()->user_program_data_path;
|
||||
String8 user_data_folder = push_str8f(scratch.arena, "%S/raddbg/logs", user_program_data_path);
|
||||
String8 user_data_folder = push_str8f(scratch.arena, "%S/%Sraddbg/logs", user_program_data_path, program_data_folder_prefix_from_os(OperatingSystem_CURRENT));
|
||||
make_directory(user_data_folder);
|
||||
d_ctrl_state->ctrl_thread_log_path = push_str8f(d_ctrl_state->arena, "%S/ctrl_thread.raddbg_log", user_data_folder);
|
||||
write_data_to_file_path(d_ctrl_state->ctrl_thread_log_path, str8_zero());
|
||||
|
||||
@@ -5213,6 +5213,27 @@ d_ctrl_thread__open_crash_dump(DMN_CtrlCtx *ctrl_ctx, D_Msg *msg)
|
||||
}
|
||||
}
|
||||
|
||||
// rjf: allocate parse artifact arena
|
||||
arena = arena_alloc();
|
||||
|
||||
// rjf: gather memory ranges
|
||||
memory_ranges_count = memories_count + memories64_count;
|
||||
memory_ranges = push_array(arena, D_DumpMemoryRange, memory_ranges_count);
|
||||
for EachIndex(idx, memories_count)
|
||||
{
|
||||
memory_ranges[idx].base_vaddr = memories[idx].start_of_memory_range;
|
||||
memory_ranges[idx].foff_range = r1u64(memories[idx].memory_location.foff, memories[idx].memory_location.foff+memories[idx].memory_location.data_size);
|
||||
}
|
||||
{
|
||||
U64 foff = memories64_base_foff;
|
||||
for EachIndex(idx, memories64_count)
|
||||
{
|
||||
memory_ranges[memories_count + idx].base_vaddr = memories64[memories_count + idx].start_of_memory_range;
|
||||
memory_ranges[memories_count + idx].foff_range = r1u64(foff, foff+memories64[idx].size);
|
||||
foff += memories64[idx].size;
|
||||
}
|
||||
}
|
||||
|
||||
// rjf: system info -> arch
|
||||
Arch arch = Arch_Null;
|
||||
if(system_info != 0) switch(system_info->processor_architecture)
|
||||
@@ -5311,27 +5332,6 @@ d_ctrl_thread__open_crash_dump(DMN_CtrlCtx *ctrl_ctx, D_Msg *msg)
|
||||
evt->string = initial_debug_info_path;
|
||||
}
|
||||
}
|
||||
|
||||
// rjf: allocate parse artifact arena
|
||||
arena = arena_alloc();
|
||||
|
||||
// rjf: gather memory ranges
|
||||
memory_ranges_count = memories_count + memories64_count;
|
||||
memory_ranges = push_array(arena, D_DumpMemoryRange, memory_ranges_count);
|
||||
for EachIndex(idx, memories_count)
|
||||
{
|
||||
memory_ranges[idx].base_vaddr = memories[idx].start_of_memory_range;
|
||||
memory_ranges[idx].foff_range = r1u64(memories[idx].memory_location.foff, memories[idx].memory_location.foff+memories[idx].memory_location.data_size);
|
||||
}
|
||||
{
|
||||
U64 foff = memories64_base_foff;
|
||||
for EachIndex(idx, memories64_count)
|
||||
{
|
||||
memory_ranges[memories_count + idx].base_vaddr = memories64[memories_count + idx].start_of_memory_range;
|
||||
memory_ranges[memories_count + idx].foff_range = r1u64(foff, foff+memories64[idx].size);
|
||||
foff += memories64[idx].size;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user