mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-07-18 15:11:32 -07:00
bucket artifact cache requests by wideness/priority; do high/wide, high/thin, low/wide, low/thin
This commit is contained in:
+12
-12
@@ -1816,8 +1816,8 @@ rd_eval_space_read(void *u, E_Space space, void *out, Rng1U64 range)
|
||||
}break;
|
||||
case CTRL_EntityKind_Thread:
|
||||
{
|
||||
CTRL_Scope *ctrl_scope = ctrl_scope_open();
|
||||
CTRL_CallStack call_stack = ctrl_call_stack_from_thread(ctrl_scope, entity->handle, 1, rd_state->frame_eval_memread_endt_us);
|
||||
Access *access = access_open();
|
||||
CTRL_CallStack call_stack = ctrl_call_stack_from_thread_new(access, entity->handle, 1, rd_state->frame_eval_memread_endt_us);
|
||||
U64 concrete_frame_idx = e_interpret_ctx->reg_unwind_count;
|
||||
if(concrete_frame_idx < call_stack.concrete_frames_count)
|
||||
{
|
||||
@@ -1829,7 +1829,7 @@ rd_eval_space_read(void *u, E_Space space, void *out, Rng1U64 range)
|
||||
MemoryCopy(out, (U8 *)f->regs + read_range.min, read_size);
|
||||
result = (read_size == dim_1u64(range));
|
||||
}
|
||||
ctrl_scope_close(ctrl_scope);
|
||||
access_close(access);
|
||||
}break;
|
||||
}
|
||||
}break;
|
||||
@@ -6464,12 +6464,12 @@ rd_window_frame(void)
|
||||
// rjf: unwind
|
||||
if(ctrl_entity->kind == CTRL_EntityKind_Thread) RD_Font(RD_FontSlot_Code)
|
||||
{
|
||||
CTRL_Scope *ctrl_scope = ctrl_scope_open();
|
||||
Access *access = access_open();
|
||||
Vec4F32 code_color = ui_color_from_name(str8_lit("code_default"));
|
||||
Vec4F32 symbol_color = ui_color_from_name(str8_lit("code_symbol"));
|
||||
CTRL_Entity *process = ctrl_entity_ancestor_from_kind(ctrl_entity, CTRL_EntityKind_Process);
|
||||
B32 call_stack_high_priority = ctrl_handle_match(ctrl_entity->handle, rd_base_regs()->thread);
|
||||
CTRL_CallStack call_stack = ctrl_call_stack_from_thread(ctrl_scope, ctrl_entity->handle, call_stack_high_priority, call_stack_high_priority ? rd_state->frame_eval_memread_endt_us : 0);
|
||||
CTRL_CallStack call_stack = ctrl_call_stack_from_thread_new(access, ctrl_entity->handle, call_stack_high_priority, call_stack_high_priority ? rd_state->frame_eval_memread_endt_us : 0);
|
||||
if(call_stack.frames_count != 0)
|
||||
{
|
||||
ui_spacer(ui_em(1.5f, 1.f));
|
||||
@@ -6486,7 +6486,7 @@ rd_window_frame(void)
|
||||
String8 rip_value_string = rd_value_string_from_eval(scratch.arena, str8_zero(), &string_params, ui_top_font(), ui_top_font_size(), ui_top_font_size()*40.f, rip_eval);
|
||||
rd_code_label(1, 0, code_color, rip_value_string);
|
||||
}
|
||||
ctrl_scope_close(ctrl_scope);
|
||||
access_close(access);
|
||||
}
|
||||
|
||||
}break;
|
||||
@@ -16258,9 +16258,9 @@ rd_frame(void)
|
||||
}break;
|
||||
case RD_CmdKind_SelectUnwind:
|
||||
{
|
||||
CTRL_Scope *ctrl_scope = ctrl_scope_open();
|
||||
Access *access = access_open();
|
||||
CTRL_Entity *thread = ctrl_entity_from_handle(&d_state->ctrl_entity_store->ctx, rd_base_regs()->thread);
|
||||
CTRL_CallStack call_stack = ctrl_call_stack_from_thread(ctrl_scope, thread->handle, 1, os_now_microseconds()+10000);
|
||||
CTRL_CallStack call_stack = ctrl_call_stack_from_thread_new(access, thread->handle, 1, os_now_microseconds()+10000);
|
||||
CTRL_CallStackFrame *frame = ctrl_call_stack_frame_from_unwind_and_inline_depth(&call_stack, rd_regs()->unwind_count, rd_regs()->inline_depth);
|
||||
if(frame == 0)
|
||||
{
|
||||
@@ -16272,14 +16272,14 @@ rd_frame(void)
|
||||
rd_state->base_regs.v.inline_depth = rd_regs()->inline_depth;
|
||||
}
|
||||
rd_cmd(RD_CmdKind_FindThread, .thread = thread->handle, .unwind_count = rd_state->base_regs.v.unwind_count, .inline_depth = rd_state->base_regs.v.inline_depth);
|
||||
ctrl_scope_close(ctrl_scope);
|
||||
access_close(access);
|
||||
}break;
|
||||
case RD_CmdKind_UpOneFrame:
|
||||
case RD_CmdKind_DownOneFrame:
|
||||
{
|
||||
CTRL_Scope *ctrl_scope = ctrl_scope_open();
|
||||
Access *access = access_open();
|
||||
CTRL_Entity *thread = ctrl_entity_from_handle(&d_state->ctrl_entity_store->ctx, rd_base_regs()->thread);
|
||||
CTRL_CallStack call_stack = ctrl_call_stack_from_thread(ctrl_scope, thread->handle, 1, os_now_microseconds()+10000);
|
||||
CTRL_CallStack call_stack = ctrl_call_stack_from_thread_new(access, thread->handle, 1, os_now_microseconds()+10000);
|
||||
CTRL_CallStackFrame *current_frame = ctrl_call_stack_frame_from_unwind_and_inline_depth(&call_stack, rd_regs()->unwind_count, rd_regs()->inline_depth);
|
||||
CTRL_CallStackFrame *next_frame = current_frame;
|
||||
if(current_frame != 0) switch(kind)
|
||||
@@ -16303,7 +16303,7 @@ rd_frame(void)
|
||||
.unwind_count = next_frame->unwind_count,
|
||||
.inline_depth = next_frame->inline_depth);
|
||||
}
|
||||
ctrl_scope_close(ctrl_scope);
|
||||
access_close(access);
|
||||
}break;
|
||||
|
||||
//- rjf: meta controls
|
||||
|
||||
@@ -1026,11 +1026,11 @@ rd_watch_row_info_from_row(Arena *arena, EV_Row *row)
|
||||
CTRL_Entity *entity = rd_ctrl_entity_from_eval_space(block_eval.space);
|
||||
if(entity->kind == CTRL_EntityKind_Thread)
|
||||
{
|
||||
CTRL_Scope *ctrl_scope = ctrl_scope_open();
|
||||
Access *access = access_open();
|
||||
info.callstack_thread = entity;
|
||||
U64 frame_num = ev_block_num_from_id(block, key.child_id);
|
||||
B32 call_stack_high_priority = ctrl_handle_match(entity->handle, rd_base_regs()->thread);
|
||||
CTRL_CallStack call_stack = ctrl_call_stack_from_thread(ctrl_scope, entity->handle, call_stack_high_priority, call_stack_high_priority ? rd_state->frame_eval_memread_endt_us : 0);
|
||||
CTRL_CallStack call_stack = ctrl_call_stack_from_thread_new(access, entity->handle, call_stack_high_priority, call_stack_high_priority ? rd_state->frame_eval_memread_endt_us : 0);
|
||||
if(1 <= frame_num && frame_num <= call_stack.frames_count)
|
||||
{
|
||||
CTRL_CallStackFrame *f = &call_stack.frames[frame_num-1];
|
||||
@@ -1038,7 +1038,7 @@ rd_watch_row_info_from_row(Arena *arena, EV_Row *row)
|
||||
info.callstack_inline_depth = f->inline_depth;
|
||||
info.callstack_vaddr = regs_rip_from_arch_block(entity->arch, f->regs);
|
||||
}
|
||||
ctrl_scope_close(ctrl_scope);
|
||||
access_close(access);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2930,10 +2930,10 @@ RD_VIEW_UI_FUNCTION_DEF(memory)
|
||||
};
|
||||
AnnotationList *visible_memory_annotations = push_array(scratch.arena, AnnotationList, visible_memory_size);
|
||||
{
|
||||
CTRL_Scope *ctrl_scope = ctrl_scope_open();
|
||||
Access *access = access_open();
|
||||
CTRL_Entity *selected_thread = ctrl_entity_from_handle(&d_state->ctrl_entity_store->ctx, rd_regs()->thread);
|
||||
CTRL_Entity *selected_process = ctrl_entity_ancestor_from_kind(selected_thread, CTRL_EntityKind_Process);
|
||||
CTRL_CallStack selected_call_stack = ctrl_call_stack_from_thread(ctrl_scope, selected_thread->handle, 1, 0);
|
||||
CTRL_CallStack selected_call_stack = ctrl_call_stack_from_thread_new(access, selected_thread->handle, 1, 0);
|
||||
CTRL_Entity *eval_process = &ctrl_entity_nil;
|
||||
if(eval.space.kind == RD_EvalSpaceKind_CtrlEntity)
|
||||
{
|
||||
@@ -3203,7 +3203,7 @@ RD_VIEW_UI_FUNCTION_DEF(memory)
|
||||
}
|
||||
}
|
||||
|
||||
ctrl_scope_close(ctrl_scope);
|
||||
access_close(access);
|
||||
}
|
||||
|
||||
//////////////////////////////
|
||||
|
||||
@@ -547,12 +547,12 @@ rd_title_fstrs_from_ctrl_entity(Arena *arena, CTRL_Entity *entity, B32 include_e
|
||||
{
|
||||
Vec4F32 symbol_color = ui_color_from_name(str8_lit("code_symbol"));
|
||||
dr_fstrs_push_new(arena, &result, ¶ms, str8_lit(" "));
|
||||
CTRL_Scope *ctrl_scope = ctrl_scope_open();
|
||||
Access *access = access_open();
|
||||
DI_Scope *di_scope = di_scope_open();
|
||||
CTRL_Entity *process = ctrl_entity_ancestor_from_kind(entity, CTRL_EntityKind_Process);
|
||||
Arch arch = entity->arch;
|
||||
B32 call_stack_high_priority = ctrl_handle_match(entity->handle, rd_base_regs()->thread);
|
||||
CTRL_CallStack call_stack = ctrl_call_stack_from_thread(ctrl_scope, entity->handle, call_stack_high_priority, call_stack_high_priority ? rd_state->frame_eval_memread_endt_us : 0);
|
||||
CTRL_CallStack call_stack = ctrl_call_stack_from_thread_new(access, entity->handle, call_stack_high_priority, call_stack_high_priority ? rd_state->frame_eval_memread_endt_us : 0);
|
||||
B32 did_first_known = 0;
|
||||
for(U64 idx = 0, limit = 10;
|
||||
idx < call_stack.frames_count && idx < limit;
|
||||
@@ -592,7 +592,7 @@ rd_title_fstrs_from_ctrl_entity(Arena *arena, CTRL_Entity *entity, B32 include_e
|
||||
}
|
||||
}
|
||||
di_scope_close(di_scope);
|
||||
ctrl_scope_close(ctrl_scope);
|
||||
access_close(access);
|
||||
}
|
||||
|
||||
//- rjf: modules get debug info status extras
|
||||
|
||||
Reference in New Issue
Block a user