Skip to content

Commit

Permalink
Debugger: Memory search expansions + results count
Browse files Browse the repository at this point in the history
Adds memory search comparisons for Increased, Increased By, Decreased, Decreased By, Changed, Not Changed, Changed By.
For arrays, adds not equals, changed, not changed for filter searches.
Now only shows the comparison types that are currently valid for the given search type and if there's prior search results.

Also refactors to allow holding the prior set of search results rather than just the addresses, needed for these search comparisons to work.

Also adds a ui label to show that the debugger is searching after clicking the search button which then gets replaced with the results count when the search completes.
  • Loading branch information
Daniel-McCarthy authored and refractionpcsx2 committed Mar 2, 2024
1 parent 875fdc4 commit bd032bb
Show file tree
Hide file tree
Showing 7 changed files with 375 additions and 105 deletions.
1 change: 0 additions & 1 deletion pcsx2-qt/Debugger/CpuWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
using namespace QtUtils;
using namespace MipsStackWalk;


CpuWidget::CpuWidget(QWidget* parent, DebugInterface& cpu)
: m_cpu(cpu)
, m_bpModel(cpu)
Expand Down
4 changes: 0 additions & 4 deletions pcsx2-qt/Debugger/CpuWidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@ class CpuWidget final : public QWidget
CpuWidget(QWidget* parent, DebugInterface& cpu);
~CpuWidget();


// Note: The order of these enum values must reflect the order in thee Search Comparison combobox.

public slots:
void paintEvent(QPaintEvent* event);

Expand Down Expand Up @@ -92,7 +89,6 @@ public slots:
m_ui.memoryviewWidget->update();
};


void saveBreakpointsToDebuggerSettings();
void saveSavedAddressesToDebuggerSettings();

Expand Down
2 changes: 1 addition & 1 deletion pcsx2-qt/Debugger/CpuWidget.ui
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@
<attribute name="title">
<string>Memory Search</string>
</attribute>
<layout class="QHBoxLayout" name="horizontalLayout_6">
<layout class="QHBoxLayout" name="horizontalLayout_10">
<property name="spacing">
<number>0</number>
</property>
Expand Down
7 changes: 0 additions & 7 deletions pcsx2-qt/Debugger/DisassemblyWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,6 @@ void DisassemblyWidget::paintEvent(QPaintEvent* event)
std::vector<BranchLine> branchLines = m_disassemblyManager.getBranchLines(m_visibleStart, visibleEnd - m_visibleStart);

s32 branchCount = 0;
s32 skippedBranches = 0;
for (const auto& branchLine : branchLines)
{
if (branchCount == (m_showInstructionOpcode ? 3 : 5))
Expand Down Expand Up @@ -453,12 +452,6 @@ void DisassemblyWidget::paintEvent(QPaintEvent* event)
bottom = (((branchLine.second - m_visibleStart) / 4) * m_rowHeight) + (m_rowHeight / 2);
}

if ((top < 0 && bottom < 0) || (top > winBottom && bottom > winBottom) || (top < 0 && bottom > winBottom) || (top > winBottom && bottom < 0))
{
skippedBranches++;
continue;
}

branchCount++;

if (branchLine.first == m_selectedAddressStart || branchLine.second == m_selectedAddressStart)
Expand Down
Loading

0 comments on commit bd032bb

Please sign in to comment.