mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-08-07 06:18:42 +00:00
fix module req cache bug; fall back on exe path as debug info
This commit is contained in:
+12
-7
@@ -3084,12 +3084,15 @@ ctrl_thread__entry_point(void *p)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//- rjf: reset per-message state
|
//- rjf: reset per-message state
|
||||||
arena_clear(ctrl_state->ctrl_thread_msg_process_arena);
|
ProfScope("reset per-message state")
|
||||||
ctrl_state->module_req_cache_slots_count = 1024;
|
{
|
||||||
ctrl_state->module_req_cache_slots = push_array(ctrl_state->ctrl_thread_msg_process_arena, CTRL_ModuleReqCacheNode *, ctrl_state->module_req_cache_slots_count);
|
arena_clear(ctrl_state->ctrl_thread_msg_process_arena);
|
||||||
MemoryZeroStruct(&ctrl_state->msg_user_bp_touched_files);
|
ctrl_state->module_req_cache_slots_count = 4096;
|
||||||
MemoryZeroStruct(&ctrl_state->msg_user_bp_touched_symbols);
|
ctrl_state->module_req_cache_slots = push_array(ctrl_state->ctrl_thread_msg_process_arena, CTRL_ModuleReqCacheNode *, ctrl_state->module_req_cache_slots_count);
|
||||||
MemoryCopyArray(ctrl_state->exception_code_filters, msg->exception_code_filters);
|
MemoryZeroStruct(&ctrl_state->msg_user_bp_touched_files);
|
||||||
|
MemoryZeroStruct(&ctrl_state->msg_user_bp_touched_symbols);
|
||||||
|
MemoryCopyArray(ctrl_state->exception_code_filters, msg->exception_code_filters);
|
||||||
|
}
|
||||||
|
|
||||||
//- rjf: gather all touched symbols by user breakpoints
|
//- rjf: gather all touched symbols by user breakpoints
|
||||||
{
|
{
|
||||||
@@ -3655,6 +3658,7 @@ ctrl_thread__module_open(CTRL_Handle process, CTRL_Handle module, Rng1U64 vaddr_
|
|||||||
str8_list_pushf(scratch.arena, &dbg_path_candidates, "%S.pdb", path);
|
str8_list_pushf(scratch.arena, &dbg_path_candidates, "%S.pdb", path);
|
||||||
str8_list_pushf(scratch.arena, &dbg_path_candidates, "%S.rdi", str8_chop_last_dot(path));
|
str8_list_pushf(scratch.arena, &dbg_path_candidates, "%S.rdi", str8_chop_last_dot(path));
|
||||||
str8_list_pushf(scratch.arena, &dbg_path_candidates, "%S.rdi", path);
|
str8_list_pushf(scratch.arena, &dbg_path_candidates, "%S.rdi", path);
|
||||||
|
str8_list_push(scratch.arena, &dbg_path_candidates, path);
|
||||||
for(String8Node *n = dbg_path_candidates.first; n != 0; n = n->next)
|
for(String8Node *n = dbg_path_candidates.first; n != 0; n = n->next)
|
||||||
{
|
{
|
||||||
String8 candidate_path = n->string;
|
String8 candidate_path = n->string;
|
||||||
@@ -4283,7 +4287,7 @@ ctrl_thread__eval_scope_begin(Arena *arena, CTRL_UserBreakpointList *user_bps, C
|
|||||||
U64 slot_idx = hash%ctrl_state->module_req_cache_slots_count;
|
U64 slot_idx = hash%ctrl_state->module_req_cache_slots_count;
|
||||||
CTRL_ModuleReqCacheNode *slot = ctrl_state->module_req_cache_slots[slot_idx];
|
CTRL_ModuleReqCacheNode *slot = ctrl_state->module_req_cache_slots[slot_idx];
|
||||||
CTRL_ModuleReqCacheNode *node = 0;
|
CTRL_ModuleReqCacheNode *node = 0;
|
||||||
for(CTRL_ModuleReqCacheNode *n = slot; slot != 0; slot = slot->next)
|
for(CTRL_ModuleReqCacheNode *n = slot; n != 0; n = n->next)
|
||||||
{
|
{
|
||||||
if(ctrl_handle_match(n->module, mod->handle))
|
if(ctrl_handle_match(n->module, mod->handle))
|
||||||
{
|
{
|
||||||
@@ -4303,6 +4307,7 @@ ctrl_thread__eval_scope_begin(Arena *arena, CTRL_UserBreakpointList *user_bps, C
|
|||||||
{
|
{
|
||||||
CTRL_Entity *debug_info_path = ctrl_entity_child_from_kind(mod, CTRL_EntityKind_DebugInfoPath);
|
CTRL_Entity *debug_info_path = ctrl_entity_child_from_kind(mod, CTRL_EntityKind_DebugInfoPath);
|
||||||
OS_Handle file = os_file_open(OS_AccessFlag_Read|OS_AccessFlag_ShareRead, debug_info_path->string);
|
OS_Handle file = os_file_open(OS_AccessFlag_Read|OS_AccessFlag_ShareRead, debug_info_path->string);
|
||||||
|
ProfScope("determine if %.*s is necessary", str8_varg(debug_info_path->string))
|
||||||
{
|
{
|
||||||
//- rjf: determine if file is PDB
|
//- rjf: determine if file is PDB
|
||||||
B32 file_is_pdb = 0;
|
B32 file_is_pdb = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user