aboutsummaryrefslogtreecommitdiff
path: root/src/core/debugger
diff options
context:
space:
mode:
authorliamwhite <liamwhite@users.noreply.github.com>2023-03-01 10:38:20 -0500
committerGitHub <noreply@github.com>2023-03-01 10:38:20 -0500
commit7b8304614ce6d374b7a38ea6456cf7a9f6445b87 (patch)
treee60a69f96d16d051220b66e90906a7abeacf1064 /src/core/debugger
parentcec37d97c3535d99a43b68a881c8bc0a5125f1de (diff)
parent91c597e869e655d28eb446dc05516dff5ef06bf7 (diff)
Merge pull request #9832 from liamwhite/hle-mp
service: HLE multiprocess
Diffstat (limited to 'src/core/debugger')
-rw-r--r--src/core/debugger/debugger.cpp7
-rw-r--r--src/core/debugger/gdbstub.cpp6
2 files changed, 7 insertions, 6 deletions
diff --git a/src/core/debugger/debugger.cpp b/src/core/debugger/debugger.cpp
index a9675df76d..a1589fecb5 100644
--- a/src/core/debugger/debugger.cpp
+++ b/src/core/debugger/debugger.cpp
@@ -16,6 +16,7 @@
#include "core/debugger/debugger_interface.h"
#include "core/debugger/gdbstub.h"
#include "core/hle/kernel/global_scheduler_context.h"
+#include "core/hle/kernel/k_process.h"
#include "core/hle/kernel/k_scheduler.h"
template <typename Readable, typename Buffer, typename Callback>
@@ -284,12 +285,12 @@ private:
void UpdateActiveThread() {
const auto& threads{ThreadList()};
if (std::find(threads.begin(), threads.end(), state->active_thread) == threads.end()) {
- state->active_thread = threads[0];
+ state->active_thread = threads.front();
}
}
- const std::vector<Kernel::KThread*>& ThreadList() {
- return system.GlobalSchedulerContext().GetThreadList();
+ const std::list<Kernel::KThread*>& ThreadList() {
+ return system.ApplicationProcess()->GetThreadList();
}
private:
diff --git a/src/core/debugger/gdbstub.cpp b/src/core/debugger/gdbstub.cpp
index 945ec528e1..18afe97e12 100644
--- a/src/core/debugger/gdbstub.cpp
+++ b/src/core/debugger/gdbstub.cpp
@@ -573,7 +573,7 @@ void GDBStub::HandleQuery(std::string_view command) {
SendReply(PaginateBuffer(buffer, command.substr(21)));
} else if (command.starts_with("fThreadInfo")) {
// beginning of list
- const auto& threads = system.GlobalSchedulerContext().GetThreadList();
+ const auto& threads = system.ApplicationProcess()->GetThreadList();
std::vector<std::string> thread_ids;
for (const auto& thread : threads) {
thread_ids.push_back(fmt::format("{:x}", thread->GetThreadID()));
@@ -587,7 +587,7 @@ void GDBStub::HandleQuery(std::string_view command) {
buffer += R"(<?xml version="1.0"?>)";
buffer += "<threads>";
- const auto& threads = system.GlobalSchedulerContext().GetThreadList();
+ const auto& threads = system.ApplicationProcess()->GetThreadList();
for (const auto* thread : threads) {
auto thread_name{GetThreadName(system, thread)};
if (!thread_name) {
@@ -817,7 +817,7 @@ void GDBStub::HandleRcmd(const std::vector<u8>& command) {
}
Kernel::KThread* GDBStub::GetThreadByID(u64 thread_id) {
- const auto& threads{system.GlobalSchedulerContext().GetThreadList()};
+ const auto& threads{system.ApplicationProcess()->GetThreadList()};
for (auto* thread : threads) {
if (thread->GetThreadID() == thread_id) {
return thread;