Skip to content

Commit

Permalink
Fix MS calling conventions
Browse files Browse the repository at this point in the history
  • Loading branch information
ifratric committed May 8, 2024
1 parent a86efad commit 25c5e1e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Windows/debugger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1075,13 +1075,13 @@ void Debugger::GetFunctionArguments(uint64_t* arguments, size_t num_args, uint64
case CALLCONV_FASTCALL:
if (num_args > 0) arguments[0] = lcContext.Rcx;
if (num_args > 1) arguments[1] = lcContext.Rdx;
if (num_args > 3) {
if (num_args > 2) {
ReadStack((void*)(sp + child_ptr_size), arguments + 2, num_args - 2);
}
break;
case CALLCONV_THISCALL:
if (num_args > 0) arguments[0] = lcContext.Rcx;
if (num_args > 3) {
if (num_args > 1) {
ReadStack((void*)(sp + child_ptr_size), arguments + 1, num_args - 1);
}
break;
Expand All @@ -1098,13 +1098,13 @@ void Debugger::GetFunctionArguments(uint64_t* arguments, size_t num_args, uint64
case CALLCONV_FASTCALL:
if (num_args > 0) arguments[0] = (uint64_t)lcContext.Ecx;
if (num_args > 1) arguments[1] = (uint64_t)lcContext.Edx;
if (num_args > 3) {
if (num_args > 2) {
ReadStack((void*)(sp + child_ptr_size), arguments + 2, num_args - 2);
}
break;
case CALLCONV_THISCALL:
if (num_args > 0) arguments[0] = (uint64_t)lcContext.Ecx;
if (num_args > 3) {
if (num_args > 1) {
ReadStack((void*)(sp + child_ptr_size), arguments + 1, num_args - 1);
}
break;
Expand Down

0 comments on commit 25c5e1e

Please sign in to comment.