From 564e3f5032b072204f05e2b13604d9486fa52b2f Mon Sep 17 00:00:00 2001
From: Mathieu Vaillancourt <vaillancourtm@gmail.com>
Date: Thu, 3 Apr 2014 21:22:13 -0400
Subject: [PATCH] Add Core::GetState() for debugger

---
 src/core/src/core.cpp | 5 +++++
 src/core/src/core.h   | 4 ++++
 2 files changed, 9 insertions(+)

diff --git a/src/core/src/core.cpp b/src/core/src/core.cpp
index 523b860f6e..800a2a3fb9 100644
--- a/src/core/src/core.cpp
+++ b/src/core/src/core.cpp
@@ -143,6 +143,11 @@ int Init() {
     return 0;
 }
 
+ARMul_State* GetState()
+{
+    return core->state;
+}
+
 void Shutdown() {
     //delete g_arm_state;
     //g_arm_state = NULL;
diff --git a/src/core/src/core.h b/src/core/src/core.h
index 8021b762ed..f4a3ca05d4 100644
--- a/src/core/src/core.h
+++ b/src/core/src/core.h
@@ -25,6 +25,8 @@
 #ifndef CORE_CORE_H_
 #define CORE_CORE_H_
 
+#include "arm/armdefs.h"
+
 ////////////////////////////////////////////////////////////////////////////////////////////////////
 
 namespace Core {
@@ -47,6 +49,8 @@ void Stop();
 /// Initialize the core
 int Init();
 
+ARMul_State* GetState();
+
 } // namespace
 
 ////////////////////////////////////////////////////////////////////////////////////////////////////