aboutsummaryrefslogtreecommitdiff
path: root/src/dolphin
diff options
context:
space:
mode:
authorRSDuck <RSDuck@users.noreply.github.com>2019-07-14 02:37:32 +0200
committerRSDuck <rsduck@users.noreply.github.com>2020-06-16 11:53:11 +0200
commit0ff79ea2ad645f85f3a4878be3717ffda44f9cbe (patch)
tree9dbcb331a3600c90183a570e174c099c70112c07 /src/dolphin
parent24aff49ae496b2401039b09e120dd0fcbd7b8e9e (diff)
jit: fix linux
Diffstat (limited to 'src/dolphin')
-rw-r--r--src/dolphin/Log.h13
-rw-r--r--src/dolphin/MemoryUtil.cpp13
2 files changed, 8 insertions, 18 deletions
diff --git a/src/dolphin/Log.h b/src/dolphin/Log.h
index 21e69a5..a7f4b6a 100644
--- a/src/dolphin/Log.h
+++ b/src/dolphin/Log.h
@@ -4,12 +4,13 @@
#include <stdio.h>
-#define PanicAlert(msg) \
- do \
- { \
- printf("%s\n", msg); \
- Crash(); \
- } while (false)
+#define PanicAlert(fmt, ...) \
+ do \
+ { \
+ printf(fmt "\n", ## __VA_ARGS__); \
+ abort(); \
+ } while (false)
+
#define DYNA_REC 0
diff --git a/src/dolphin/MemoryUtil.cpp b/src/dolphin/MemoryUtil.cpp
index 01cb897..7273a8a 100644
--- a/src/dolphin/MemoryUtil.cpp
+++ b/src/dolphin/MemoryUtil.cpp
@@ -6,15 +6,9 @@
#include <cstdlib>
#include <string>
-#define PanicAlert(fmt, ...) \
- do \
- { \
- printf(fmt "\n", ## __VA_ARGS__); \
- abort(); \
- } while (false)
-
#include "../types.h"
#include "CommonFuncs.h"
+#include "Log.h"
#ifdef _WIN32
#include <windows.h>
@@ -39,8 +33,6 @@ namespace Common
void* AllocateExecutableMemory(size_t size)
{
- printf("c\n");
-
#if defined(_WIN32)
void* ptr = VirtualAlloc(nullptr, size, MEM_COMMIT, PAGE_EXECUTE_READWRITE);
#else
@@ -50,13 +42,10 @@ void* AllocateExecutableMemory(size_t size)
if (ptr == MAP_FAILED)
ptr = nullptr;
#endif
- printf("a\n");
if (ptr == nullptr)
PanicAlert("Failed to allocate executable memory");
- printf("b\n");
-
return ptr;
}