summaryrefslogtreecommitdiffstats
path: root/src/core/arm/debug.h
diff options
context:
space:
mode:
authorLiam <byteslice@airmail.cc>2023-11-28 20:30:39 +0100
committerLiam <byteslice@airmail.cc>2023-12-04 16:37:16 +0100
commit45c87c7e6e841c11def43e5ab25160006dab6d77 (patch)
tree04a3ea0bd8c07389e17741aa28615e3b32ace2f7 /src/core/arm/debug.h
parentMerge pull request #12235 from liamwhite/flip-clip (diff)
downloadyuzu-45c87c7e6e841c11def43e5ab25160006dab6d77.tar
yuzu-45c87c7e6e841c11def43e5ab25160006dab6d77.tar.gz
yuzu-45c87c7e6e841c11def43e5ab25160006dab6d77.tar.bz2
yuzu-45c87c7e6e841c11def43e5ab25160006dab6d77.tar.lz
yuzu-45c87c7e6e841c11def43e5ab25160006dab6d77.tar.xz
yuzu-45c87c7e6e841c11def43e5ab25160006dab6d77.tar.zst
yuzu-45c87c7e6e841c11def43e5ab25160006dab6d77.zip
Diffstat (limited to 'src/core/arm/debug.h')
-rw-r--r--src/core/arm/debug.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/core/arm/debug.h b/src/core/arm/debug.h
new file mode 100644
index 000000000..c542633db
--- /dev/null
+++ b/src/core/arm/debug.h
@@ -0,0 +1,35 @@
+// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#pragma once
+
+#include <optional>
+
+#include "core/hle/kernel/k_thread.h"
+#include "core/loader/loader.h"
+
+namespace Core {
+
+std::optional<std::string> GetThreadName(const Kernel::KThread* thread);
+std::string_view GetThreadWaitReason(const Kernel::KThread* thread);
+std::string GetThreadState(const Kernel::KThread* thread);
+
+Loader::AppLoader::Modules FindModules(const Kernel::KProcess* process);
+Kernel::KProcessAddress GetModuleEnd(const Kernel::KProcess* process, Kernel::KProcessAddress base);
+Kernel::KProcessAddress FindMainModuleEntrypoint(const Kernel::KProcess* process);
+
+void InvalidateInstructionCacheRange(const Kernel::KProcess* process, u64 address, u64 size);
+
+struct BacktraceEntry {
+ std::string module;
+ u64 address;
+ u64 original_address;
+ u64 offset;
+ std::string name;
+};
+
+std::vector<BacktraceEntry> GetBacktraceFromContext(const Kernel::KProcess* process,
+ const Kernel::Svc::ThreadContext& ctx);
+std::vector<BacktraceEntry> GetBacktrace(const Kernel::KThread* thread);
+
+} // namespace Core