mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-06-17 09:32:22 -07:00
ctrl thread stepping machine: read initial stack-pointer-check-value *before* single-stepping stuck threads, otherwise we can obtain an incorrect stack check value if the single-step causes a call.
This commit is contained in:
@@ -2861,6 +2861,15 @@ ctrl_thread__run(DMN_CtrlCtx *ctrl_ctx, CTRL_Msg *msg)
|
||||
}
|
||||
}
|
||||
|
||||
//////////////////////////////
|
||||
//- rjf: read initial stack-pointer-check value
|
||||
//
|
||||
// This MUST happen before any threads move, including single-stepping stuck
|
||||
// threads, because otherwise, their stack pointer may change, if single-stepping
|
||||
// causes e.g. entrance into a function via a call instruction.
|
||||
//
|
||||
U64 sp_check_value = dmn_rsp_from_thread(target_thread);
|
||||
|
||||
//////////////////////////////
|
||||
//- rjf: single step "stuck threads"
|
||||
//
|
||||
@@ -3011,7 +3020,6 @@ ctrl_thread__run(DMN_CtrlCtx *ctrl_ctx, CTRL_Msg *msg)
|
||||
//
|
||||
if(stop_event == 0)
|
||||
{
|
||||
U64 sp_check_value = dmn_rsp_from_thread(target_thread);
|
||||
B32 spoof_mode = 0;
|
||||
CTRL_Spoof spoof = {0};
|
||||
for(;;)
|
||||
|
||||
Reference in New Issue
Block a user