mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-08-08 23:08:08 +00:00
fix rdi folder writability test to account for possibly-uncreated directories, so that we don't unnecessarily write into the user-local rdi cache
This commit is contained in:
+1
-1
@@ -49,7 +49,7 @@ commands =
|
||||
// .f1 = { .win = "raddbg_stable --ipc kill_all && build raddbg", .linux = "", .out = "*compilation*", .footer_panel = true, .save_dirty_files = true, .cursor_at_end = false, },
|
||||
// .f1 = { .win = "raddbg_stable --ipc kill_all && build raddbg debug telemetry", .linux = "", .out = "*compilation*", .footer_panel = true, .save_dirty_files = true, .cursor_at_end = false, },
|
||||
// .f1 = { .win = "raddbg_stable --ipc kill_all && build radbin", .linux = "", .out = "*compilation*", .footer_panel = true, .save_dirty_files = true, .cursor_at_end = false, },
|
||||
.f1 = { .win = "raddbg_stable --ipc kill_all && build torture", .linux = "", .out = "*compilation*", .footer_panel = true, .save_dirty_files = true, .cursor_at_end = false, },
|
||||
.f1 = { .win = "raddbg_stable --ipc kill_all && build raddbg", .linux = "", .out = "*compilation*", .footer_panel = true, .save_dirty_files = true, .cursor_at_end = false, },
|
||||
|
||||
//- rjf: [raddbg wsl]
|
||||
// .f1 = { .win = "wsl ./build.sh raddbg", .linux = "", .out = "*compilation*", .footer_panel = true, .save_dirty_files = true, .cursor_at_end = false, },
|
||||
|
||||
+1
-1
@@ -7,12 +7,12 @@ target:
|
||||
working_directory: "../raddebugger"
|
||||
arguments: "--user:C:/devel/raddebugger/build/raddbg_test.user"
|
||||
debug_subprocesses: 0
|
||||
enabled: 1
|
||||
}
|
||||
target:
|
||||
{
|
||||
executable: "build/mule_main.exe"
|
||||
working_directory: build
|
||||
enabled: 1
|
||||
}
|
||||
target:
|
||||
{
|
||||
|
||||
+17
-2
@@ -750,13 +750,28 @@ di_async_tick(void)
|
||||
}
|
||||
}
|
||||
|
||||
//- rjf: determine if RDI path is writable; if not, need to write into the writable cache path
|
||||
//- rjf: determine if RDI folder is writable; if not, need to write into the writable cache path
|
||||
if(!t->og_folder_analyzed)
|
||||
{
|
||||
t->og_folder_analyzed = 1;
|
||||
File file = file_open(AccessFlag_Write, rdi_path);
|
||||
String8 rdi_folder = str8_chop_last_slash(rdi_path);
|
||||
for(U64 slash_pos = 0; slash_pos <= rdi_folder.size; slash_pos = str8_find_needle(rdi_folder, slash_pos+1, s("/"), StringMatchFlag_SlashInsensitive))
|
||||
{
|
||||
String8 ancestor_folder = str8_substr(rdi_folder, r1u64(0, slash_pos));
|
||||
if(ancestor_folder.size != 0)
|
||||
{
|
||||
make_directory(ancestor_folder);
|
||||
}
|
||||
if(slash_pos == rdi_folder.size)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
String8 dummy_file_path = str8f(scratch.arena, "%S/writability_test", rdi_folder);
|
||||
File file = file_open(AccessFlag_Write, dummy_file_path);
|
||||
t->og_folder_is_writable = !file_match(file, file_zero());
|
||||
file_close(file);
|
||||
delete_file_at_path(dummy_file_path);
|
||||
}
|
||||
|
||||
//- rjf: if RDI path is not writable -> adjust into writable cache directory
|
||||
|
||||
@@ -518,34 +518,6 @@ entry_point(CmdLine *cmd_line)
|
||||
{
|
||||
Temp scratch = scratch_begin(0, 0);
|
||||
|
||||
//- TODO(rjf): test symbol server download
|
||||
#if 0
|
||||
{
|
||||
GuardedRing *out_ring = guarded_ring_alloc(scratch.arena, KB(64));
|
||||
{
|
||||
HTTP_RequestParams p =
|
||||
{
|
||||
.id = 1,
|
||||
.method = HTTP_Method_Get,
|
||||
.url = s("https://msdl.microsoft.com/download/symbols/ntdll.pdb/E84AF4A1E3CDFABC99A41209581EB6861/ntdll.pdb"),
|
||||
};
|
||||
http_push_request(out_ring, &p, max_U64);
|
||||
String8List pieces = {0};
|
||||
for(HTTP_Response r = {0}; http_pop_response(scratch.arena, out_ring, &r, max_U64);)
|
||||
{
|
||||
str8_list_push(scratch.arena, &pieces, r.body);
|
||||
if(r.has_more == 0)
|
||||
{
|
||||
int x = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
int x = 0;
|
||||
}
|
||||
guarded_ring_release(out_ring);
|
||||
}
|
||||
#endif
|
||||
|
||||
//- rjf: unpack command line arguments
|
||||
ExecMode exec_mode = ExecMode_Normal;
|
||||
B32 auto_run = 0;
|
||||
|
||||
@@ -78,24 +78,24 @@ rd_code_view_build(Arena *arena, RD_CodeViewState *cv, RD_CodeViewBuildFlags fla
|
||||
case RD_CmdKind_Search:
|
||||
{
|
||||
arena_clear(cv->find_text_arena);
|
||||
cv->find_text_fwd = push_str8_copy(cv->find_text_arena, cmd->regs->string);
|
||||
cv->find_text_fwd = str8_copy(cv->find_text_arena, cmd->regs->string);
|
||||
}break;
|
||||
case RD_CmdKind_SearchBackwards:
|
||||
{
|
||||
arena_clear(cv->find_text_arena);
|
||||
cv->find_text_bwd = push_str8_copy(cv->find_text_arena, cmd->regs->string);
|
||||
cv->find_text_bwd = str8_copy(cv->find_text_arena, cmd->regs->string);
|
||||
}break;
|
||||
case RD_CmdKind_FindNext:
|
||||
{
|
||||
String8 string = rd_view_query_input();
|
||||
arena_clear(cv->find_text_arena);
|
||||
cv->find_text_fwd = push_str8_copy(cv->find_text_arena, string);
|
||||
cv->find_text_fwd = str8_copy(cv->find_text_arena, string);
|
||||
}break;
|
||||
case RD_CmdKind_FindPrev:
|
||||
{
|
||||
String8 string = rd_view_query_input();
|
||||
arena_clear(cv->find_text_arena);
|
||||
cv->find_text_bwd = push_str8_copy(cv->find_text_arena, string);
|
||||
cv->find_text_bwd = str8_copy(cv->find_text_arena, string);
|
||||
}break;
|
||||
case RD_CmdKind_ToggleWatchExpressionAtMouse:
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user