summaryrefslogtreecommitdiffstats
path: root/src/core/core.cpp
diff options
context:
space:
mode:
authorLiam <byteslice@airmail.cc>2022-05-31 01:35:01 +0200
committerLiam <byteslice@airmail.cc>2022-06-01 06:01:25 +0200
commitfb4b3c127f7c390358d7f4cadd2f58de116fec48 (patch)
treee2588a859d364a32be0cd9e0401a345c6492d1a7 /src/core/core.cpp
parentMerge pull request #8368 from german77/seventimes (diff)
downloadyuzu-fb4b3c127f7c390358d7f4cadd2f58de116fec48.tar
yuzu-fb4b3c127f7c390358d7f4cadd2f58de116fec48.tar.gz
yuzu-fb4b3c127f7c390358d7f4cadd2f58de116fec48.tar.bz2
yuzu-fb4b3c127f7c390358d7f4cadd2f58de116fec48.tar.lz
yuzu-fb4b3c127f7c390358d7f4cadd2f58de116fec48.tar.xz
yuzu-fb4b3c127f7c390358d7f4cadd2f58de116fec48.tar.zst
yuzu-fb4b3c127f7c390358d7f4cadd2f58de116fec48.zip
Diffstat (limited to '')
-rw-r--r--src/core/core.cpp29
1 files changed, 25 insertions, 4 deletions
diff --git a/src/core/core.cpp b/src/core/core.cpp
index 8a887904d..7d974ba65 100644
--- a/src/core/core.cpp
+++ b/src/core/core.cpp
@@ -17,6 +17,7 @@
#include "core/core.h"
#include "core/core_timing.h"
#include "core/cpu_manager.h"
+#include "core/debugger/debugger.h"
#include "core/device_memory.h"
#include "core/file_sys/bis_factory.h"
#include "core/file_sys/mode.h"
@@ -171,6 +172,10 @@ struct System::Impl {
}
}
+ void InitializeDebugger(System& system, u16 port) {
+ debugger = std::make_unique<Debugger>(system, port);
+ }
+
SystemResultStatus Init(System& system, Frontend::EmuWindow& emu_window) {
LOG_DEBUG(Core, "initialized OK");
@@ -329,6 +334,7 @@ struct System::Impl {
gpu_core->NotifyShutdown();
}
+ debugger.reset();
services.reset();
service_manager.reset();
cheat_engine.reset();
@@ -436,6 +442,9 @@ struct System::Impl {
/// Network instance
Network::NetworkInstance network_instance;
+ /// Debugger
+ std::unique_ptr<Core::Debugger> debugger;
+
SystemResultStatus status = SystemResultStatus::Success;
std::string status_details = "";
@@ -472,10 +481,6 @@ SystemResultStatus System::Pause() {
return impl->Pause();
}
-SystemResultStatus System::SingleStep() {
- return SystemResultStatus::Success;
-}
-
void System::InvalidateCpuInstructionCaches() {
impl->kernel.InvalidateAllInstructionCaches();
}
@@ -496,6 +501,10 @@ void System::UnstallCPU() {
impl->UnstallCPU();
}
+void System::InitializeDebugger() {
+ impl->InitializeDebugger(*this, Settings::values.gdbstub_port.GetValue());
+}
+
SystemResultStatus System::Load(Frontend::EmuWindow& emu_window, const std::string& filepath,
u64 program_id, std::size_t program_index) {
return impl->Load(*this, emu_window, filepath, program_id, program_index);
@@ -809,6 +818,18 @@ bool System::IsMulticore() const {
return impl->is_multicore;
}
+bool System::DebuggerEnabled() const {
+ return Settings::values.use_gdbstub.GetValue();
+}
+
+Core::Debugger& System::GetDebugger() {
+ return *impl->debugger;
+}
+
+const Core::Debugger& System::GetDebugger() const {
+ return *impl->debugger;
+}
+
void System::RegisterExecuteProgramCallback(ExecuteProgramCallback&& callback) {
impl->execute_program_callback = std::move(callback);
}