do not attempt to refresh tls base calculation cache, if targets running

This commit is contained in:
Ryan Fleury
2024-03-22 16:29:50 -07:00
parent 7cd524d39d
commit 928532f386
2 changed files with 75 additions and 72 deletions
+5 -2
View File
@@ -2520,11 +2520,13 @@ df_set_thread_freeze_state(DF_Entity *thread, B32 frozen)
}
node->handle = thread_handle;
df_handle_list_push_node(&df_state->frozen_threads, node);
df_state->entities_mut_soft_halt = 1;
}
// rjf: frozen => not frozen
if(is_frozen && !should_be_frozen)
{
df_state->entities_mut_soft_halt = 1;
df_handle_list_remove(&df_state->frozen_threads, already_frozen_node);
SLLStackPush(df_state->free_handle_node, already_frozen_node);
}
@@ -3542,7 +3544,8 @@ df_tls_base_vaddr_from_process_root_rip(DF_Entity *process, U64 root_vaddr, U64
U64 base_vaddr = 0;
Temp scratch = scratch_begin(0, 0);
DBGI_Scope *scope = dbgi_scope_open();
if(!df_ctrl_targets_running())
{
//- rjf: unpack thread info
DF_Entity *module = df_module_from_process_vaddr(process, rip_vaddr);
DF_Entity *binary = df_binary_file_from_module(module);
@@ -3618,7 +3621,7 @@ df_tls_base_vaddr_from_process_root_rip(DF_Entity *process, U64 root_vaddr, U64
}
#endif
}
}
dbgi_scope_close(scope);
scratch_end(scratch);
ProfEnd();
+2 -2
View File
@@ -4,8 +4,8 @@
////////////////////////////////
//~ rjf: Demon2 Pass Tasks
//
// [ ] solidify synchronization mechanisms for usage of demon2 layer
// [ ] TLS eval correctness
// [x] solidify synchronization mechanisms for usage of demon2 layer
// [x] TLS eval correctness
// [ ] TLS eval -> in-process-memory EXE info
// [ ] unwinding -> in-process-memory EXE info
// [ ] freezing thread while running -> soft-halt