summaryrefslogtreecommitdiff
path: root/src/core/gdbstub/gdbstub.cpp
diff options
context:
space:
mode:
authorGravatar bunnei2018-12-21 13:45:27 -0500
committerGravatar GitHub2018-12-21 13:45:27 -0500
commit59ac3346ebe605bfb0f538d9fa045b32d86168cb (patch)
treed2793ede352840b4326cc7c56fc8e7b7a3e6670f /src/core/gdbstub/gdbstub.cpp
parentMerge pull request #1914 from lioncash/id (diff)
parentkernel/svc: Handle thread handles within GetProcessId (diff)
downloadyuzu-59ac3346ebe605bfb0f538d9fa045b32d86168cb.tar.gz
yuzu-59ac3346ebe605bfb0f538d9fa045b32d86168cb.tar.xz
yuzu-59ac3346ebe605bfb0f538d9fa045b32d86168cb.zip
Merge pull request #1925 from lioncash/pid
kernel/{process, thread}: Amend behavior related to IDs
Diffstat (limited to 'src/core/gdbstub/gdbstub.cpp')
-rw-r--r--src/core/gdbstub/gdbstub.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/gdbstub/gdbstub.cpp b/src/core/gdbstub/gdbstub.cpp
index e6b5171ee..a1cad4fcb 100644
--- a/src/core/gdbstub/gdbstub.cpp
+++ b/src/core/gdbstub/gdbstub.cpp
@@ -201,11 +201,11 @@ void RegisterModule(std::string name, VAddr beg, VAddr end, bool add_elf_ext) {
201 modules.push_back(std::move(module)); 201 modules.push_back(std::move(module));
202} 202}
203 203
204static Kernel::Thread* FindThreadById(int id) { 204static Kernel::Thread* FindThreadById(s64 id) {
205 for (u32 core = 0; core < Core::NUM_CPU_CORES; core++) { 205 for (u32 core = 0; core < Core::NUM_CPU_CORES; core++) {
206 const auto& threads = Core::System::GetInstance().Scheduler(core).GetThreadList(); 206 const auto& threads = Core::System::GetInstance().Scheduler(core).GetThreadList();
207 for (auto& thread : threads) { 207 for (auto& thread : threads) {
208 if (thread->GetThreadID() == static_cast<u32>(id)) { 208 if (thread->GetThreadID() == static_cast<u64>(id)) {
209 current_core = core; 209 current_core = core;
210 return thread.get(); 210 return thread.get();
211 } 211 }