Common: Move OSThreads into core

Common shouldn't be depending on APIs in Core (in this, case depending
on the PowerPC namespace). Because of the poor separation here, this
moves OSThread functionality into core, so that it resolves the implicit
dependency on core.
This commit is contained in:
Lioncash
2020-10-20 18:05:59 -04:00
parent 7e197186b9
commit 57534777d4
9 changed files with 49 additions and 45 deletions

View File

@@ -11,10 +11,10 @@
#include <fmt/format.h>
#include "Common/Align.h"
#include "Common/Debug/OSThread.h"
#include "Common/GekkoDisassembler.h"
#include "Core/Core.h"
#include "Core/Debugger/OSThread.h"
#include "Core/HW/DSP.h"
#include "Core/PowerPC/MMU.h"
#include "Core/PowerPC/PPCSymbolDB.h"
@@ -176,14 +176,14 @@ Common::Debug::Threads PPCDebugInterface::GetThreads() const
if (!PowerPC::HostIsRAMAddress(active_queue_head))
return threads;
auto active_thread = std::make_unique<Common::Debug::OSThreadView>(active_queue_head);
auto active_thread = std::make_unique<Core::Debug::OSThreadView>(active_queue_head);
if (!active_thread->IsValid())
return threads;
const auto insert_threads = [&threads](u32 addr, auto get_next_addr) {
while (addr != 0 && PowerPC::HostIsRAMAddress(addr))
{
auto thread = std::make_unique<Common::Debug::OSThreadView>(addr);
auto thread = std::make_unique<Core::Debug::OSThreadView>(addr);
if (!thread->IsValid())
break;
addr = get_next_addr(*thread);