Skip to content

Commit 2e9d850

Browse files
committed
Fixed usage of wrong macros.
1 parent 3774be1 commit 2e9d850

File tree

6 files changed

+34
-34
lines changed

6 files changed

+34
-34
lines changed

NativeCore/Unix/Debugger.cpp

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -124,35 +124,35 @@ extern "C" bool AwaitDebugEvent(DebugEvent* evt, int timeoutInMilliseconds)
124124

125125
// Copy registers.
126126
auto& reg = evt->ExceptionInfo.Registers;
127-
#ifdef __x86_64__
128-
reg.Rax = static_cast<RC_Pointer>(regs.rax);
129-
reg.Rbx = static_cast<RC_Pointer>(regs.rbx);
130-
reg.Rcx = static_cast<RC_Pointer>(regs.rcx);
131-
reg.Rdx = static_cast<RC_Pointer>(regs.rdx);
132-
reg.Rdi = static_cast<RC_Pointer>(regs.rdi);
133-
reg.Rsi = static_cast<RC_Pointer>(regs.rsi);
134-
reg.Rsp = static_cast<RC_Pointer>(regs.rsp);
135-
reg.Rbp = static_cast<RC_Pointer>(regs.rbp);
136-
reg.Rip = static_cast<RC_Pointer>(regs.rip);
137-
138-
reg.R8 = static_cast<RC_Pointer>(regs.r8);
139-
reg.R9 = static_cast<RC_Pointer>(regs.r9);
140-
reg.R10 = static_cast<RC_Pointer>(regs.r10);
141-
reg.R11 = static_cast<RC_Pointer>(regs.r11);
142-
reg.R12 = static_cast<RC_Pointer>(regs.r12);
143-
reg.R13 = static_cast<RC_Pointer>(regs.r13);
144-
reg.R14 = static_cast<RC_Pointer>(regs.r14);
145-
reg.R15 = static_cast<RC_Pointer>(regs.r15);
127+
#ifdef RECLASSNET64
128+
reg.Rax = reinterpret_cast<RC_Pointer>(regs.rax);
129+
reg.Rbx = reinterpret_cast<RC_Pointer>(regs.rbx);
130+
reg.Rcx = reinterpret_cast<RC_Pointer>(regs.rcx);
131+
reg.Rdx = reinterpret_cast<RC_Pointer>(regs.rdx);
132+
reg.Rdi = reinterpret_cast<RC_Pointer>(regs.rdi);
133+
reg.Rsi = reinterpret_cast<RC_Pointer>(regs.rsi);
134+
reg.Rsp = reinterpret_cast<RC_Pointer>(regs.rsp);
135+
reg.Rbp = reinterpret_cast<RC_Pointer>(regs.rbp);
136+
reg.Rip = reinterpret_cast<RC_Pointer>(regs.rip);
137+
138+
reg.R8 = reinterpret_cast<RC_Pointer>(regs.r8);
139+
reg.R9 = reinterpret_cast<RC_Pointer>(regs.r9);
140+
reg.R10 = reinterpret_cast<RC_Pointer>(regs.r10);
141+
reg.R11 = reinterpret_cast<RC_Pointer>(regs.r11);
142+
reg.R12 = reinterpret_cast<RC_Pointer>(regs.r12);
143+
reg.R13 = reinterpret_cast<RC_Pointer>(regs.r13);
144+
reg.R14 = reinterpret_cast<RC_Pointer>(regs.r14);
145+
reg.R15 = reinterpret_cast<RC_Pointer>(regs.r15);
146146
#else
147-
reg.Eax = static_cast<RC_Pointer>(regs.eax);
148-
reg.Ebx = static_cast<RC_Pointer>(regs.ebx);
149-
reg.Ecx = static_cast<RC_Pointer>(regs.ecx);
150-
reg.Edx = static_cast<RC_Pointer>(regs.edx);
151-
reg.Edi = static_cast<RC_Pointer>(regs.edi);
152-
reg.Esi = static_cast<RC_Pointer>(regs.esi);
153-
reg.Esp = static_cast<RC_Pointer>(regs.esp);
154-
reg.Ebp = static_cast<RC_Pointer>(regs.ebp);
155-
reg.Eip = static_cast<RC_Pointer>(regs.eip);
147+
reg.Eax = reinterpret_cast<RC_Pointer>(regs.eax);
148+
reg.Ebx = reinterpret_cast<RC_Pointer>(regs.ebx);
149+
reg.Ecx = reinterpret_cast<RC_Pointer>(regs.ecx);
150+
reg.Edx = reinterpret_cast<RC_Pointer>(regs.edx);
151+
reg.Edi = reinterpret_cast<RC_Pointer>(regs.edi);
152+
reg.Esi = reinterpret_cast<RC_Pointer>(regs.esi);
153+
reg.Esp = reinterpret_cast<RC_Pointer>(regs.esp);
154+
reg.Ebp = reinterpret_cast<RC_Pointer>(regs.ebp);
155+
reg.Eip = reinterpret_cast<RC_Pointer>(regs.eip);
156156
#endif
157157

158158
result = true;

NativeCore/Unix/DisassembleCode.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ extern "C" bool DisassembleCode(RC_Pointer address, RC_Size length, RC_Pointer v
88
{
99
DISASM disasm = {};
1010
disasm.Options = NasmSyntax;
11-
#ifdef NATIVE_CORE_64
11+
#ifdef RECLASSNET64
1212
disasm.Archi = 64;
1313
#endif
1414
disasm.VirtualAddr = reinterpret_cast<UInt64>(virtualAddress);

NativeCore/Unix/EnumerateProcesses.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ extern "C" void EnumerateProcesses(EnumerateProcessCallback callbackProcess)
114114
auto auxvPath = processPath / "auxv";
115115

116116
auto platform = GetProcessPlatform(auxvPath.string());
117-
#ifdef NATIVE_CORE_64
117+
#ifdef RECLASSNET64
118118
if (platform == Platform::X64)
119119
#else
120120
if (platform == Platform::X86)

NativeCore/Windows/Debugger.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ bool __stdcall AwaitDebugEvent(DebugEvent* evt, int timeoutInMilliseconds)
8282

8383
// Copy registers.
8484
auto& reg = evt->ExceptionInfo.Registers;
85-
#ifdef _WIN64
85+
#ifdef RECLASSNET64
8686
reg.Rax = reinterpret_cast<RC_Pointer>(ctx.Rax);
8787
reg.Rbx = reinterpret_cast<RC_Pointer>(ctx.Rbx);
8888
reg.Rcx = reinterpret_cast<RC_Pointer>(ctx.Rcx);

NativeCore/Windows/DisassembleCode.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ bool __stdcall DisassembleCode(RC_Pointer address, RC_Size length, RC_Pointer vi
77
{
88
DISASM disasm = {};
99
disasm.Options = NasmSyntax;
10-
#ifdef _WIN64
10+
#ifdef RECLASSNET64
1111
disasm.Archi = 64;
1212
#endif
1313
disasm.VirtualAddr = reinterpret_cast<UInt64>(virtualAddress);

NativeCore/Windows/EnumerateProcesses.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Platform GetProcessPlatform(HANDLE process)
3333
return isWow64 ? Platform::X86 : Platform::X64;
3434
}
3535

36-
#ifdef _WIN64
36+
#ifdef RECLASSNET64
3737
return Platform::X64;
3838
#else
3939
return Platform::X86;
@@ -62,7 +62,7 @@ void __stdcall EnumerateProcesses(EnumerateProcessCallback callbackProcess)
6262
if (IsProcessValid(process))
6363
{
6464
auto platform = GetProcessPlatform(process);
65-
#ifdef _WIN64
65+
#ifdef RECLASSNET64
6666
if (platform == Platform::X64)
6767
#else
6868
if (platform == Platform::X86)

0 commit comments

Comments
 (0)