Skip to content

Commit

Permalink
Debugger: little refactor of GDB part of debugger
Browse files Browse the repository at this point in the history
  • Loading branch information
vertver committed Apr 4, 2024
1 parent f02fa5d commit 8d42e2a
Show file tree
Hide file tree
Showing 8 changed files with 5 additions and 42 deletions.
5 changes: 2 additions & 3 deletions pcsx2-qt/Debugger/CpuWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,7 @@ void CpuWidget::updateFunctionList(bool whenEmpty)
const QString filter = m_ui.txtFuncSearch->text().toLower();

m_ui.treeModules->clear();
for (const auto& module : m_cpu.GetSymbolMap().GetModules())
for (const auto& module : m_cpu.getSymbolMap().GetModules())
{
QTreeWidgetItem* moduleItem = new QTreeWidgetItem(m_ui.treeModules, QStringList({QString(module.name.c_str()), QString("%0.%1").arg(module.version.major).arg(module.version.minor), QString::number(module.exports.size())}));
QList<QTreeWidgetItem*> functions;
Expand Down Expand Up @@ -762,14 +762,13 @@ void CpuWidget::onFuncListContextMenu(QPoint pos)
QAction* moduleViewAction = new QAction(tr("Module Tree"), m_ui.listFunctions);
moduleViewAction->setCheckable(true);
moduleViewAction->setChecked(m_moduleView);

connect(moduleViewAction, &QAction::triggered, [this] {
m_moduleView = !m_moduleView;
m_ui.treeModules->setVisible(m_moduleView);
m_ui.listFunctions->setVisible(!m_moduleView);
updateFunctionList();
});

m_funclistContextMenu->addAction(moduleViewAction);
}
m_funclistContextMenu->popup(m_ui.listFunctions->viewport()->mapToGlobal(pos));
Expand Down
4 changes: 0 additions & 4 deletions pcsx2/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -770,8 +770,6 @@ set(pcsx2DebugToolsSources
DebugTools/DisassemblyManager.cpp
DebugTools/ExpressionParser.cpp
DebugTools/GDBServer.cpp
DebugTools/GDBServerR3000.cpp
DebugTools/GDBServerR5900.cpp
DebugTools/MIPSAnalyst.cpp
DebugTools/MipsAssembler.cpp
DebugTools/MipsAssemblerTables.cpp
Expand All @@ -791,8 +789,6 @@ set(pcsx2DebugToolsHeaders
DebugTools/DisassemblyManager.h
DebugTools/ExpressionParser.h
DebugTools/GDBServer.h
DebugTools/GDBServerR3000.h
DebugTools/GDBServerR5900.h
DebugTools/MIPSAnalyst.h
DebugTools/MipsAssembler.h
DebugTools/MipsAssemblerTables.h
Expand Down
4 changes: 2 additions & 2 deletions pcsx2/DebugTools/DebugServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -437,8 +437,8 @@ bool DebugNetworkServer::receiveAndSendPacket()
}

m_recv_buffer[receive_length] = 0;
Console.WriteLn(Color_Orange, "recv");
Console.WriteLn(Color_Gray, "%s", (char*)&m_recv_buffer[0]);
//Console.WriteLn(Color_Orange, "recv");
//Console.WriteLn(Color_Gray, "%s", (char*)&m_recv_buffer[0]);

const std::size_t localOffset = m_debugServerInterface->processPacket((char*)&m_recv_buffer.at(offset), receive_length, m_send_buffer.data(), outSize);
if (localOffset == std::size_t(-1))
Expand Down
2 changes: 1 addition & 1 deletion pcsx2/DebugTools/GDBServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1307,7 +1307,7 @@ std::size_t GDBServer::processPacket(const char* inData, std::size_t inSize, voi
break;
}

if (endOffset + 2 > inSize)
auto processCPUThreadsPacket = [this, outData, &outSize]()
{
// Final offset + 2 can't be bigger than size so this packet might
// be invalid or doesn't contain any of checksum.
Expand Down
1 change: 0 additions & 1 deletion pcsx2/DebugTools/GDBServerR3000.cpp

This file was deleted.

15 changes: 0 additions & 15 deletions pcsx2/DebugTools/GDBServerR3000.h

This file was deleted.

1 change: 0 additions & 1 deletion pcsx2/DebugTools/GDBServerR5900.cpp

This file was deleted.

15 changes: 0 additions & 15 deletions pcsx2/DebugTools/GDBServerR5900.h

This file was deleted.

0 comments on commit 8d42e2a

Please sign in to comment.