Skip to content

Commit

Permalink
(windows) Fixing RestoreRegisters() save register status to lcContext
Browse files Browse the repository at this point in the history
  • Loading branch information
0x7Fancy committed Sep 28, 2023
1 parent e9ef262 commit 2dfa3ba
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Windows/debugger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ void Debugger::SaveRegisters(SavedRegisters* registers) {

void Debugger::RestoreRegisters(SavedRegisters* registers) {
have_thread_context = false;
memcpy(&lcContext, &registers->saved_context, sizeof(registers->saved_context));

HANDLE thread_handle = OpenThread(THREAD_ALL_ACCESS, FALSE, thread_id);
if (!SetThreadContext(thread_handle, &lcContext)) {
FATAL("Error restoring registers");
Expand Down

0 comments on commit 2dfa3ba

Please sign in to comment.