Skip to content

Commit

Permalink
Merge pull request #75 from 0x7Fancy/master
Browse files Browse the repository at this point in the history
(windows) Fixing RestoreRegisters() save register status to lcContext
  • Loading branch information
ifratric authored Sep 28, 2023
2 parents e9ef262 + 2dfa3ba commit 5a45ad4
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 5a45ad4

Please sign in to comment.