summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinQt/Debugger/CodeDiffDialog.h
diff options
context:
space:
mode:
authorAdmiral H. Curtiss <pikachu025@gmail.com>2022-04-02 05:42:33 +0200
committerGitHub <noreply@github.com>2022-04-02 05:42:33 +0200
commit25c173cefc833c38ac9da5cdf8e4f43525244d5a (patch)
treed46e201865b9a4ff83151e16f7c7783a3d2c68da /Source/Core/DolphinQt/Debugger/CodeDiffDialog.h
parent4957b2edb99ce04c2b29501aab7aa8682943279e (diff)
parent88a1acdfc072ec48c348124ed59d60cf8368f83a (diff)
Merge pull request #8732 from dreamsyntax/debugger-function-differencing
Qt/Debugger CodeWidget: Record and find specific functions by differencing
Diffstat (limited to 'Source/Core/DolphinQt/Debugger/CodeDiffDialog.h')
-rw-r--r--Source/Core/DolphinQt/Debugger/CodeDiffDialog.h71
1 files changed, 71 insertions, 0 deletions
diff --git a/Source/Core/DolphinQt/Debugger/CodeDiffDialog.h b/Source/Core/DolphinQt/Debugger/CodeDiffDialog.h
new file mode 100644
index 0000000000..33b1d4e108
--- /dev/null
+++ b/Source/Core/DolphinQt/Debugger/CodeDiffDialog.h
@@ -0,0 +1,71 @@
+// Copyright 2022 Dolphin Emulator Project
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#pragma once
+
+#include <QDialog>
+#include <string>
+#include <vector>
+#include "Common/CommonTypes.h"
+
+class CodeWidget;
+class QLabel;
+class QPushButton;
+class QTableWidget;
+
+struct Diff
+{
+ u32 addr;
+ std::string symbol;
+ u32 hits;
+ u32 total_hits;
+
+ bool operator<(const std::string& val) const { return symbol < val; }
+};
+
+class CodeDiffDialog : public QDialog
+{
+ Q_OBJECT
+
+public:
+ explicit CodeDiffDialog(CodeWidget* parent);
+ void reject() override;
+
+private:
+ void CreateWidgets();
+ void ConnectWidgets();
+ void ClearData();
+ void ClearBlockCache();
+ void OnClickItem();
+ void OnRecord(bool enabled);
+ std::vector<Diff> CalculateSymbolsFromProfile();
+ void OnInclude();
+ void OnExclude();
+ void RemoveMissingSymbolsFromIncludes(const std::vector<Diff>& symbol_diff);
+ void RemoveMatchingSymbolsFromIncludes(const std::vector<Diff>& symbol_list);
+ void Update(bool include);
+ void InfoDisp();
+
+ void OnContextMenu();
+
+ void OnGoTop();
+ void OnDelete();
+ void OnSetBLR();
+
+ void UpdateItem();
+
+ QTableWidget* m_matching_results_table;
+ QLabel* m_exclude_size_label;
+ QLabel* m_include_size_label;
+ QPushButton* m_exclude_btn;
+ QPushButton* m_include_btn;
+ QPushButton* m_record_btn;
+ QPushButton* m_reset_btn;
+ QPushButton* m_help_btn;
+ CodeWidget* m_code_widget;
+
+ std::vector<Diff> m_exclude;
+ std::vector<Diff> m_include;
+ bool m_failed_requirements = false;
+ bool m_include_active = false;
+};