tweak registers cache lookup rules, to correctly return stale results on failed reads

This commit is contained in:
Ryan Fleury
2024-03-21 11:48:48 -07:00
parent e0e84c2ee3
commit 1466b27385
3 changed files with 8 additions and 5 deletions
+1 -1
View File
@@ -47,7 +47,7 @@ commands =
{
.rjf_f1 =
{
.win = "build raddbg",
.win = "build raddbg telemetry",
.linux = "",
.out = "*compilation*",
.footer_panel = true,
+6 -2
View File
@@ -1344,11 +1344,15 @@ ctrl_query_cached_reg_block_from_thread(Arena *arena, CTRL_MachineID machine_id,
if(node)
{
U64 current_reg_gen = dmn_reg_gen();
if(node->reg_gen != current_reg_gen && dmn_thread_read_reg_block(thread, node->block))
if(node->reg_gen != current_reg_gen && dmn_thread_read_reg_block(thread, result))
{
node->reg_gen = current_reg_gen;
MemoryCopy(node->block, result, reg_block_size);
}
else
{
MemoryCopy(result, node->block, reg_block_size);
}
MemoryCopy(result, node->block, reg_block_size);
}
}
return result;
+1 -2
View File
@@ -3655,8 +3655,7 @@ df_architecture_from_entity(DF_Entity *entity)
internal CTRL_Unwind
df_push_unwind_from_thread(Arena *arena, DF_Entity *thread)
{
DF_Entity *process = df_entity_ancestor_from_kind(thread, DF_EntityKind_Process);
CTRL_Unwind unwind = ctrl_unwind_from_thread(arena, df_state->ctrl_entity_store, thread->ctrl_machine_id, thread->ctrl_handle, os_now_microseconds()+5000);
CTRL_Unwind unwind = ctrl_unwind_from_thread(arena, df_state->ctrl_entity_store, thread->ctrl_machine_id, thread->ctrl_handle, 0);
return unwind;
}