2018-03-16 11:39:53 +00:00
|
|
|
// Copyright 2018 Dolphin Emulator Project
|
2021-07-05 01:22:19 +00:00
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
2018-03-16 11:39:53 +00:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
#include <QDockWidget>
|
|
|
|
|
|
|
|
#include "Common/CommonTypes.h"
|
|
|
|
|
|
|
|
class MemoryViewWidget;
|
|
|
|
class QCheckBox;
|
|
|
|
class QLabel;
|
|
|
|
class QLineEdit;
|
|
|
|
class QPushButton;
|
|
|
|
class QRadioButton;
|
2019-07-06 08:50:11 +00:00
|
|
|
class QShowEvent;
|
2018-03-16 11:39:53 +00:00
|
|
|
class QSplitter;
|
|
|
|
|
|
|
|
class MemoryWidget : public QDockWidget
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
explicit MemoryWidget(QWidget* parent = nullptr);
|
|
|
|
~MemoryWidget();
|
|
|
|
|
2018-12-28 18:12:30 +00:00
|
|
|
void SetAddress(u32 address);
|
2018-03-16 11:39:53 +00:00
|
|
|
void Update();
|
|
|
|
signals:
|
|
|
|
void BreakpointsChanged();
|
2018-12-28 18:12:30 +00:00
|
|
|
void ShowCode(u32 address);
|
2021-02-17 17:12:27 +00:00
|
|
|
void RequestWatch(QString name, u32 address);
|
2018-03-16 11:39:53 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
void CreateWidgets();
|
|
|
|
void ConnectWidgets();
|
|
|
|
|
|
|
|
void LoadSettings();
|
|
|
|
void SaveSettings();
|
|
|
|
|
2019-04-11 05:50:52 +00:00
|
|
|
void OnAddressSpaceChanged();
|
2018-03-16 11:39:53 +00:00
|
|
|
void OnTypeChanged();
|
|
|
|
void OnBPLogChanged();
|
|
|
|
void OnBPTypeChanged();
|
|
|
|
|
|
|
|
void OnSearchAddress();
|
|
|
|
void OnFindNextValue();
|
|
|
|
void OnFindPreviousValue();
|
|
|
|
void ValidateSearchValue();
|
|
|
|
|
|
|
|
void OnSetValue();
|
|
|
|
|
|
|
|
void OnDumpMRAM();
|
|
|
|
void OnDumpExRAM();
|
2019-04-11 05:50:52 +00:00
|
|
|
void OnDumpARAM();
|
2018-03-16 11:39:53 +00:00
|
|
|
void OnDumpFakeVMEM();
|
|
|
|
|
|
|
|
std::vector<u8> GetValueData() const;
|
|
|
|
|
|
|
|
void FindValue(bool next);
|
|
|
|
|
|
|
|
void closeEvent(QCloseEvent*) override;
|
2019-07-06 08:50:11 +00:00
|
|
|
void showEvent(QShowEvent* event) override;
|
2018-03-16 11:39:53 +00:00
|
|
|
|
|
|
|
MemoryViewWidget* m_memory_view;
|
|
|
|
QSplitter* m_splitter;
|
|
|
|
QLineEdit* m_search_address;
|
2020-09-13 16:03:17 +00:00
|
|
|
QLineEdit* m_search_offset;
|
2018-03-16 11:39:53 +00:00
|
|
|
QLineEdit* m_data_edit;
|
|
|
|
QPushButton* m_set_value;
|
|
|
|
QPushButton* m_dump_mram;
|
|
|
|
QPushButton* m_dump_exram;
|
2019-04-11 05:50:52 +00:00
|
|
|
QPushButton* m_dump_aram;
|
2018-03-16 11:39:53 +00:00
|
|
|
QPushButton* m_dump_fake_vmem;
|
|
|
|
|
|
|
|
// Search
|
|
|
|
QPushButton* m_find_next;
|
|
|
|
QPushButton* m_find_previous;
|
|
|
|
QRadioButton* m_find_ascii;
|
|
|
|
QRadioButton* m_find_hex;
|
|
|
|
QLabel* m_result_label;
|
|
|
|
|
2019-04-11 05:50:52 +00:00
|
|
|
// Address Spaces
|
|
|
|
QRadioButton* m_address_space_physical;
|
|
|
|
QRadioButton* m_address_space_effective;
|
|
|
|
QRadioButton* m_address_space_auxiliary;
|
|
|
|
|
2018-03-16 11:39:53 +00:00
|
|
|
// Datatypes
|
|
|
|
QRadioButton* m_type_u8;
|
|
|
|
QRadioButton* m_type_u16;
|
|
|
|
QRadioButton* m_type_u32;
|
|
|
|
QRadioButton* m_type_ascii;
|
|
|
|
QRadioButton* m_type_float;
|
|
|
|
|
|
|
|
// Breakpoint options
|
|
|
|
QRadioButton* m_bp_read_write;
|
|
|
|
QRadioButton* m_bp_read_only;
|
|
|
|
QRadioButton* m_bp_write_only;
|
|
|
|
QCheckBox* m_bp_log_check;
|
|
|
|
};
|