aboutsummaryrefslogtreecommitdiff
path: root/src/core/core.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/core.h')
-rw-r--r--src/core/core.h26
1 files changed, 24 insertions, 2 deletions
diff --git a/src/core/core.h b/src/core/core.h
index ada23b347..ade456cfc 100644
--- a/src/core/core.h
+++ b/src/core/core.h
@@ -7,11 +7,13 @@
#include <memory>
#include <string>
#include "common/common_types.h"
+#include "core/hle/kernel/kernel.h"
#include "core/hle/kernel/scheduler.h"
#include "core/loader/loader.h"
#include "core/memory.h"
#include "core/perf_stats.h"
#include "core/telemetry_session.h"
+#include "video_core/debug_utils/debug_utils.h"
#include "video_core/gpu.h"
class EmuWindow;
@@ -52,10 +54,10 @@ public:
* is not required to do a full dispatch with each instruction. NOTE: the number of instructions
* requested is not guaranteed to run, as this will be interrupted preemptively if a hardware
* update is requested (e.g. on a thread switch).
- * @param tight_loop Number of instructions to execute.
+ * @param tight_loop If false, the CPU single-steps.
* @return Result status, indicating whether or not the operation succeeded.
*/
- ResultStatus RunLoop(int tight_loop = 100000);
+ ResultStatus RunLoop(bool tight_loop = true);
/**
* Step the CPU one instruction
@@ -112,6 +114,10 @@ public:
return *scheduler;
}
+ Kernel::SharedPtr<Kernel::Process>& CurrentProcess() {
+ return current_process;
+ }
+
PerfStats perf_stats;
FrameLimiter frame_limiter;
@@ -130,6 +136,14 @@ public:
return *app_loader;
}
+ void SetGPUDebugContext(std::shared_ptr<Tegra::DebugContext> context) {
+ debug_context = std::move(context);
+ }
+
+ std::shared_ptr<Tegra::DebugContext> GetGPUDebugContext() const {
+ return debug_context;
+ }
+
private:
/**
* Initialize the emulated system.
@@ -149,6 +163,10 @@ private:
std::unique_ptr<Kernel::Scheduler> scheduler;
std::unique_ptr<Tegra::GPU> gpu_core;
+ std::shared_ptr<Tegra::DebugContext> debug_context;
+
+ Kernel::SharedPtr<Kernel::Process> current_process;
+
/// When true, signals that a reschedule should happen
bool reschedule_pending{};
@@ -169,4 +187,8 @@ inline TelemetrySession& Telemetry() {
return System::GetInstance().TelemetrySession();
}
+inline Kernel::SharedPtr<Kernel::Process>& CurrentProcess() {
+ return System::GetInstance().CurrentProcess();
+}
+
} // namespace Core