diff --git a/src/core/gdbstub/gdbstub.cpp b/src/core/gdbstub/gdbstub.cpp index d293bf194f..c7146983bd 100644 --- a/src/core/gdbstub/gdbstub.cpp +++ b/src/core/gdbstub/gdbstub.cpp @@ -200,7 +200,7 @@ void RegisterModule(std::string name, PAddr beg, PAddr end, bool add_elf_ext) { static Kernel::Thread* FindThreadById(int id) { for (u32 core = 0; core < Core::NUM_CPU_CORES; core++) { const auto& threads = Core::System::GetInstance().Scheduler(core)->GetThreadList(); - for (auto thread : threads) { + for (const auto& thread : threads) { if (thread->GetThreadId() == id) { current_core = core; return thread.get(); @@ -579,7 +579,7 @@ static void HandleQuery() { std::string val = "m"; for (u32 core = 0; core < Core::NUM_CPU_CORES; core++) { const auto& threads = Core::System::GetInstance().Scheduler(core)->GetThreadList(); - for (auto thread : threads) { + for (const auto& thread : threads) { val += fmt::format("{:x}", thread->GetThreadId()); val += ","; } @@ -592,9 +592,9 @@ static void HandleQuery() { std::string buffer; buffer += "l"; buffer += ""; - for (int core = 0; core < Core::NUM_CPU_CORES; core++) { + for (u32 core = 0; core < Core::NUM_CPU_CORES; core++) { const auto& threads = Core::System::GetInstance().Scheduler(core)->GetThreadList(); - for (auto thread : threads) { + for (const auto& thread : threads) { buffer += fmt::format(R"*()*", thread->GetThreadId(), core, thread->GetThreadId());