diff options
author | polaris- <nagatospam@gmail.com> | 2015-09-02 14:56:38 +0200 |
---|---|---|
committer | polaris- <nagatospam@gmail.com> | 2015-10-04 17:16:59 +0200 |
commit | 31dee93e849d79a91f280faf16941806e3cb3c6b (patch) | |
tree | 22f64217b38dfa38b25a772f9fc5a9b025e1cbd6 /src/core/core.cpp | |
parent | OS X build uploading: auto-confirm SSH host key (diff) | |
download | yuzu-31dee93e849d79a91f280faf16941806e3cb3c6b.tar yuzu-31dee93e849d79a91f280faf16941806e3cb3c6b.tar.gz yuzu-31dee93e849d79a91f280faf16941806e3cb3c6b.tar.bz2 yuzu-31dee93e849d79a91f280faf16941806e3cb3c6b.tar.lz yuzu-31dee93e849d79a91f280faf16941806e3cb3c6b.tar.xz yuzu-31dee93e849d79a91f280faf16941806e3cb3c6b.tar.zst yuzu-31dee93e849d79a91f280faf16941806e3cb3c6b.zip |
Diffstat (limited to 'src/core/core.cpp')
-rw-r--r-- | src/core/core.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/core/core.cpp b/src/core/core.cpp index dddc16708..219b03af4 100644 --- a/src/core/core.cpp +++ b/src/core/core.cpp @@ -13,6 +13,8 @@ #include "core/hle/kernel/thread.h" #include "core/hw/hw.h" +#include "core/gdbstub/gdbstub.h" + namespace Core { ARM_Interface* g_app_core = nullptr; ///< ARM11 application core @@ -20,6 +22,21 @@ ARM_Interface* g_sys_core = nullptr; ///< ARM11 system (OS) core /// Run the core CPU loop void RunLoop(int tight_loop) { + if (GDBStub::g_server_enabled) { + GDBStub::HandlePacket(); + + // If the loop is halted and we want to step, use a tiny (1) number of instructions to execute. + // Otherwise get out of the loop function. + if (GDBStub::GetCpuHaltFlag()) { + if (GDBStub::GetCpuStepFlag()) { + GDBStub::SetCpuStepFlag(false); + tight_loop = 1; + } else { + return; + } + } + } + // If we don't have a currently active thread then don't execute instructions, // instead advance to the next event and try to yield to the next thread if (Kernel::GetCurrentThread() == nullptr) { |