2018-02-14 22:25:01 +00:00
|
|
|
// Copyright 2018 Dolphin Emulator Project
|
2021-07-05 01:22:19 +00:00
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
2018-02-14 22:25:01 +00:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <QDockWidget>
|
|
|
|
#include <QString>
|
|
|
|
|
2018-04-09 13:31:20 +00:00
|
|
|
#include "Common/CommonTypes.h"
|
2020-04-09 01:12:23 +00:00
|
|
|
#include "DolphinQt/Debugger/CodeDiffDialog.h"
|
2018-07-06 22:40:15 +00:00
|
|
|
#include "DolphinQt/Debugger/CodeViewWidget.h"
|
2018-04-09 13:31:20 +00:00
|
|
|
|
2018-02-14 22:25:01 +00:00
|
|
|
class QCloseEvent;
|
|
|
|
class QLineEdit;
|
2019-07-06 08:50:11 +00:00
|
|
|
class QShowEvent;
|
2018-02-14 22:25:01 +00:00
|
|
|
class QSplitter;
|
|
|
|
class QListWidget;
|
2020-04-09 01:12:23 +00:00
|
|
|
class QPushButton;
|
2018-02-14 22:25:01 +00:00
|
|
|
class QTableWidget;
|
2018-05-27 21:37:52 +00:00
|
|
|
|
|
|
|
namespace Common
|
|
|
|
{
|
2018-02-14 22:25:01 +00:00
|
|
|
struct Symbol;
|
2018-05-27 21:37:52 +00:00
|
|
|
}
|
2018-02-14 22:25:01 +00:00
|
|
|
|
|
|
|
class CodeWidget : public QDockWidget
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
explicit CodeWidget(QWidget* parent = nullptr);
|
|
|
|
~CodeWidget();
|
|
|
|
|
|
|
|
void Step();
|
|
|
|
void StepOver();
|
|
|
|
void StepOut();
|
|
|
|
void Skip();
|
|
|
|
void ShowPC();
|
|
|
|
void SetPC();
|
|
|
|
|
2020-04-09 01:12:23 +00:00
|
|
|
void OnDiff();
|
2018-02-14 22:25:01 +00:00
|
|
|
void ToggleBreakpoint();
|
|
|
|
void AddBreakpoint();
|
2018-05-05 22:17:06 +00:00
|
|
|
void SetAddress(u32 address, CodeViewWidget::SetAddressUpdate update);
|
2018-02-14 22:25:01 +00:00
|
|
|
|
2018-03-16 11:39:53 +00:00
|
|
|
void Update();
|
2018-05-11 20:38:32 +00:00
|
|
|
void UpdateSymbols();
|
2018-02-14 22:25:01 +00:00
|
|
|
signals:
|
|
|
|
void BreakpointsChanged();
|
2018-04-09 13:31:20 +00:00
|
|
|
void RequestPPCComparison(u32 addr);
|
2018-12-28 18:12:30 +00:00
|
|
|
void ShowMemory(u32 address);
|
2018-02-14 22:25:01 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
void CreateWidgets();
|
|
|
|
void ConnectWidgets();
|
|
|
|
void UpdateCallstack();
|
2018-05-27 21:37:52 +00:00
|
|
|
void UpdateFunctionCalls(const Common::Symbol* symbol);
|
|
|
|
void UpdateFunctionCallers(const Common::Symbol* symbol);
|
2018-02-14 22:25:01 +00:00
|
|
|
|
|
|
|
void OnSearchAddress();
|
|
|
|
void OnSearchSymbols();
|
|
|
|
void OnSelectSymbol();
|
|
|
|
void OnSelectCallstack();
|
|
|
|
void OnSelectFunctionCallers();
|
|
|
|
void OnSelectFunctionCalls();
|
|
|
|
|
|
|
|
void closeEvent(QCloseEvent*) override;
|
2019-07-06 08:50:11 +00:00
|
|
|
void showEvent(QShowEvent* event) override;
|
2018-02-14 22:25:01 +00:00
|
|
|
|
2020-04-09 01:12:23 +00:00
|
|
|
CodeDiffDialog* m_diff_dialog = nullptr;
|
2018-02-14 22:25:01 +00:00
|
|
|
QLineEdit* m_search_address;
|
2020-04-09 01:12:23 +00:00
|
|
|
QPushButton* m_code_diff;
|
2018-02-14 22:25:01 +00:00
|
|
|
|
2022-07-05 13:17:06 +00:00
|
|
|
QLineEdit* m_search_callstack;
|
2018-02-14 22:25:01 +00:00
|
|
|
QListWidget* m_callstack_list;
|
2022-07-05 13:17:06 +00:00
|
|
|
QLineEdit* m_search_symbols;
|
2018-02-14 22:25:01 +00:00
|
|
|
QListWidget* m_symbols_list;
|
2022-07-05 13:17:06 +00:00
|
|
|
QLineEdit* m_search_calls;
|
2018-02-14 22:25:01 +00:00
|
|
|
QListWidget* m_function_calls_list;
|
2022-07-05 13:17:06 +00:00
|
|
|
QLineEdit* m_search_callers;
|
2018-02-14 22:25:01 +00:00
|
|
|
QListWidget* m_function_callers_list;
|
|
|
|
CodeViewWidget* m_code_view;
|
|
|
|
QSplitter* m_box_splitter;
|
|
|
|
QSplitter* m_code_splitter;
|
|
|
|
|
|
|
|
QString m_symbol_filter;
|
|
|
|
};
|