Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pcsx2-qt/Debugger/ThreadModel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ ThreadModel::ThreadModel(DebugInterface& cpu, QObject* parent)

int ThreadModel::rowCount(const QModelIndex&) const
{
return m_cpu.GetThreadList().size();
return static_cast<int>(m_threads.size());
}

int ThreadModel::columnCount(const QModelIndex&) const
Expand Down
24 changes: 9 additions & 15 deletions pcsx2/DebugTools/BiosDebugData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,19 @@

std::vector<std::unique_ptr<BiosThread>> getEEThreads()
{
std::vector<std::unique_ptr<BiosThread>> threads;

if (CurrentBiosInformation.eeThreadListAddr <= 0)
return threads;
if (!VMManager::HasValidVM() || CurrentBiosInformation.eeThreadListAddr == 0)
return {};

const u32 start = CurrentBiosInformation.eeThreadListAddr & 0x3fffff;

std::vector<std::unique_ptr<BiosThread>> threads;
for (int tid = 0; tid < 256; tid++)
{
EEInternalThread* internal = static_cast<EEInternalThread*>(
PSM(start + tid * sizeof(EEInternalThread)));

EEInternalThread* internal = static_cast<EEInternalThread*>(PSM(start + tid * sizeof(EEInternalThread)));
if (internal->status != (int)ThreadStatus::THS_BAD)
{
auto thread = std::make_unique<EEThread>(tid, *internal);
threads.push_back(std::move(thread));
}
if (internal && internal->status != (int)ThreadStatus::THS_BAD)
threads.emplace_back(std::make_unique<EEThread>(tid, *internal));
}

return threads;
Expand Down Expand Up @@ -63,8 +60,7 @@ std::vector<std::unique_ptr<BiosThread>> getIOPThreads()

data.PC = iopMemRead32(data.SavedSP + 0x8c);

auto thread = std::make_unique<IOPThread>(data);
threads.push_back(std::move(thread));
threads.emplace_back(std::make_unique<IOPThread>(data));

item = iopMemRead32(item + 0x24);
}
Expand Down Expand Up @@ -93,7 +89,7 @@ std::vector<IopMod> getIOPModules()
if (i > 1000)
return {};

IopMod mod;
IopMod& mod = modlist.emplace_back();

u32 nstr = iopMemRead32(maddr + 4);
if (nstr)
Expand All @@ -113,8 +109,6 @@ std::vector<IopMod> getIOPModules()
mod.data_size = iopMemRead32(maddr + 0x20);
mod.bss_size = iopMemRead32(maddr + 0x24);

modlist.push_back(mod);

maddr = iopMemRead32(maddr);
}

Expand Down