eliminate unnecessary info in debug engine entity abstraction / demon events; adjust symbol server / debug info loading such that the debug info loader is the one who decides to kick off downloads based on presence in cache path; use cache path as key, unpack info for download requests

This commit is contained in:
Ryan Fleury committed 2026-06-08 21:06:44 -07:00
1 parent b22f9f2d8b
commit 132751777f
19 files changed
+199 -318

No files matched your search

+3 -5
View File
@@ -13066,7 +13066,6 @@ rd_frame(void)
str8_list_pushf(rd_state->cmd_output_arena, &rd_state->cmd_outputs, " exception_code: 0x%I64x\n", (U64)evt.exception_code);
str8_list_pushf(rd_state->cmd_output_arena, &rd_state->cmd_outputs, " bp_flags: 0x%I64x\n", (U64)evt.bp_flags);
str8_list_pushf(rd_state->cmd_output_arena, &rd_state->cmd_outputs, " string: \"%S\"\n", escaped_from_raw_str8(scratch.arena, evt.string));
str8_list_pushf(rd_state->cmd_output_arena, &rd_state->cmd_outputs, " tls_model: 0x%I64x\n", evt.tls_model);
str8_list_pushf(rd_state->cmd_output_arena, &rd_state->cmd_outputs, " explanation: \"%S\"\n", escaped_from_raw_str8(scratch.arena, explanation_string));
str8_list_pushf(rd_state->cmd_output_arena, &rd_state->cmd_outputs, " }\n");
}
@@ -17393,14 +17392,13 @@ rd_frame(void)
}
}
}break;
case D_EventKind_NewModule:
case D_EventKind_ModuleDebugInfoPathChange:
{
D_Entity *module = d_entity_from_handle(evt->entity);
D_Entity *debug_info_path = d_entity_child_from_kind(module, D_EntityKind_DebugInfoPath);
String8 new_path = debug_info_path->string;
B32 file_exists = file_path_exists(new_path);
B32 file_is_pending = (!file_exists ? smsv_status_from_local_path(new_path) == SMSV_Status_Pending : 0);
if(new_path.size != 0 && (file_exists || file_is_pending))
B32 file_exists = 1; // file_path_exists(new_path);
if(new_path.size != 0 && file_exists)
{
CFG_NodePtrList dbg_infos = cfg_node_top_level_list_from_string(scratch.arena, str8_lit("debug_info"));
B32 path_found = 0;
+1 -1
View File
@@ -2268,7 +2268,7 @@ RD_VIEW_UI_FUNCTION_DEF(text)
default:
{
String8 checksum_value = rd_checksum_value_from_hash_kind(scratch.arena, hash, checksum_kind);
file_is_out_of_date = !memory_is_zero(checksum_value.str, checksum_value.size) && !str8_match(checksum_value, checksum_expected, 0);
file_is_out_of_date = checksum_expected.size != 0 && !memory_is_zero(checksum_value.str, checksum_value.size) && !str8_match(checksum_value, checksum_expected, 0);
}break;
case RDI_ChecksumKind_Timestamp:
{
+35 -24
View File
@@ -562,39 +562,50 @@ rd_title_fstrs_from_ctrl_entity(Arena *arena, D_Entity *entity, B32 include_extr
ARCH_Info *arch_info = arch_info_from_arch(entity->arch);
B32 call_stack_high_priority = d_handle_match(entity->handle, rd_base_regs()->thread);
D_CallStack call_stack = d_call_stack_from_thread(access, entity->handle, call_stack_high_priority, call_stack_high_priority ? rd_state->frame_eval_memread_endt_us : 0);
B32 did_first_in_main_module = 0;
B32 did_first_known = 0;
U64 num_pushed = 0;
D_Entity *first_module = d_entity_child_from_kind(process, D_EntityKind_Module);
for(U64 idx = 0, limit = 10;
idx < call_stack.frames_count && idx < limit;
idx < call_stack.frames_count && num_pushed < limit;
idx += 1)
{
D_CallStackFrame *f = &call_stack.frames[call_stack.frames_count - 1 - idx];
U64 rip_vaddr = arch_ip_from_reg_block(arch_info, f->regs);
D_Entity *module = d_module_from_process_vaddr(process, rip_vaddr);
U64 rip_voff = d_voff_from_vaddr(module, rip_vaddr);
String8 name = {0};
if(f->inline_depth == 0)
{
DI_Key dbgi_key = d_dbgi_key_from_module(module);
RDI_Parsed *rdi = di_rdi_from_key(access, dbgi_key, 0, 0);
if(rdi != &rdi_parsed_nil)
U64 rip_vaddr = arch_ip_from_reg_block(arch_info, f->regs);
D_Entity *module = d_module_from_process_vaddr(process, rip_vaddr);
if(did_first_in_main_module || module == first_module)
{
RDI_Symbol *procedure = rdi_procedure_from_voff(rdi, rip_voff);
name.str = rdi_string_from_idx(rdi, procedure->name_string_idx, &name.size);
name = push_str8_copy(arena, name);
}
if(name.size == 0 && did_first_known)
{
name = str8_lit("???");
}
if(name.size != 0)
{
did_first_known = 1;
dr_fstrs_push_new(arena, &result, &params, name, .size = extras_size, .color = symbol_color);
if(idx+1 < call_stack.frames_count)
did_first_in_main_module = 1;
U64 rip_voff = d_voff_from_vaddr(module, rip_vaddr);
String8 name = {0};
{
dr_fstrs_push_new(arena, &result, &params, str8_lit(" > "), .color = secondary_color, .size = extras_size);
if(idx+1 == limit)
DI_Key dbgi_key = d_dbgi_key_from_module(module);
RDI_Parsed *rdi = di_rdi_from_key(access, dbgi_key, 0, 0);
if(rdi != &rdi_parsed_nil)
{
dr_fstrs_push_new(arena, &result, &params, str8_lit("..."), .color = secondary_color, .size = extras_size);
RDI_Symbol *procedure = rdi_procedure_from_voff(rdi, rip_voff);
name.str = rdi_string_from_idx(rdi, procedure->name_string_idx, &name.size);
name = push_str8_copy(arena, name);
}
if(name.size == 0 && did_first_known)
{
name = str8_lit("???");
}
if(name.size != 0)
{
did_first_known = 1;
num_pushed += 1;
dr_fstrs_push_new(arena, &result, &params, name, .size = extras_size, .color = symbol_color);
if(idx+1 < call_stack.frames_count)
{
dr_fstrs_push_new(arena, &result, &params, str8_lit(" > "), .color = secondary_color, .size = extras_size);
if(num_pushed+1 == limit)
{
dr_fstrs_push_new(arena, &result, &params, str8_lit("..."), .color = secondary_color, .size = extras_size);
}
}
}
}
}