mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-08-14 17:28:07 +00:00
extend os info struct with binary file path
This commit is contained in:
committed by
Ryan Fleury
parent
5d8c568d82
commit
2643d14e06
@@ -9,6 +9,7 @@ struct ProcessInfo
|
||||
{
|
||||
U32 pid;
|
||||
B32 large_pages_allowed;
|
||||
String8 binary_file_path;
|
||||
String8 binary_path;
|
||||
String8 initial_path;
|
||||
String8 user_program_data_path;
|
||||
|
||||
@@ -797,7 +797,7 @@ di_async_tick(void)
|
||||
params.path = get_process_info()->binary_path;
|
||||
params.inherit_env = 1;
|
||||
params.consoleless = 1;
|
||||
str8_list_push(scratch.arena, ¶ms.cmd_line, os_get_process_info()->binary_path);
|
||||
str8_list_push(scratch.arena, ¶ms.cmd_line, get_process_info()->binary_file_path);
|
||||
str8_list_pushf(scratch.arena, ¶ms.cmd_line, "--bin");
|
||||
str8_list_pushf(scratch.arena, ¶ms.cmd_line, "--quiet");
|
||||
if(should_compress)
|
||||
|
||||
@@ -1548,8 +1548,8 @@ main(int argc, char **argv)
|
||||
if(got_final_result && size > 0)
|
||||
{
|
||||
String8 full_name = str8(buffer, size);
|
||||
String8 name_chopped = str8_chop_last_slash(full_name);
|
||||
info->binary_path = push_str8_copy(lnx_state.arena, name_chopped);
|
||||
info->binary_file_path = push_str8_copy(os_lnx_state.arena, full_name);
|
||||
info->binary_path = str8_chop_last_slash(info->binary_file_path);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -1893,8 +1893,8 @@ w32_entry_point_caller(int argc, WCHAR **wargv)
|
||||
U16 *buffer = push_array_no_zero(scratch.arena, U16, size);
|
||||
DWORD length = GetModuleFileNameW(0, (WCHAR*)buffer, size);
|
||||
String8 name8 = str8_from_16(scratch.arena, str16(buffer, length));
|
||||
String8 name_chopped = str8_chop_last_slash(name8);
|
||||
info->binary_path = push_str8_copy(arena, name_chopped);
|
||||
info->binary_file_path = push_str8_copy(arena, name8);
|
||||
info->binary_path = str8_chop_last_slash(info->binary_file_path);
|
||||
scratch_end(scratch);
|
||||
}
|
||||
info->initial_path = get_current_path(arena);
|
||||
|
||||
Reference in New Issue
Block a user