dolphin/Source/Core/DolphinQt/Debugger/MemoryWidget.h

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

106 lines
2.2 KiB
C
Raw Normal View History

2018-03-16 05:39:53 -06:00
// Copyright 2018 Dolphin Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
2018-03-16 05:39:53 -06:00
#pragma once
#include <vector>
#include <QByteArray>
2018-03-16 05:39:53 -06:00
#include <QDockWidget>
#include "Common/CommonTypes.h"
class MemoryViewWidget;
class QCheckBox;
class QComboBox;
2018-03-16 05:39:53 -06:00
class QLabel;
class QLineEdit;
class QPushButton;
class QRadioButton;
class QShowEvent;
2018-03-16 05:39:53 -06:00
class QSplitter;
class MemoryWidget : public QDockWidget
{
Q_OBJECT
public:
explicit MemoryWidget(QWidget* parent = nullptr);
~MemoryWidget();
void SetAddress(u32 address);
2018-03-16 05:39:53 -06:00
void Update();
signals:
void BreakpointsChanged();
void ShowCode(u32 address);
void RequestWatch(QString name, u32 address);
2018-03-16 05:39:53 -06:00
private:
struct TargetAddress
{
u32 address = 0;
bool is_good_address = false;
bool is_good_offset = false;
};
2018-03-16 05:39:53 -06:00
void CreateWidgets();
void ConnectWidgets();
void LoadSettings();
void SaveSettings();
void OnAddressSpaceChanged();
void OnDisplayChanged();
2018-03-16 05:39:53 -06:00
void OnBPLogChanged();
void OnBPTypeChanged();
void OnSearchAddress();
void OnFindNextValue();
void OnFindPreviousValue();
void OnSetValue();
2022-04-10 20:02:33 -06:00
void OnSetValueFromFile();
2018-03-16 05:39:53 -06:00
void OnDumpMRAM();
void OnDumpExRAM();
void OnDumpARAM();
2018-03-16 05:39:53 -06:00
void OnDumpFakeVMEM();
void ValidateAndPreviewInputValue();
QByteArray GetInputData() const;
TargetAddress GetTargetAddress() const;
2018-03-16 05:39:53 -06:00
void FindValue(bool next);
void closeEvent(QCloseEvent*) override;
void showEvent(QShowEvent* event) override;
2018-03-16 05:39:53 -06:00
MemoryViewWidget* m_memory_view;
QSplitter* m_splitter;
QComboBox* m_search_address;
QLineEdit* m_search_offset;
2018-03-16 05:39:53 -06:00
QLineEdit* m_data_edit;
QCheckBox* m_base_check;
QLabel* m_data_preview;
QComboBox* m_display_combo;
QComboBox* m_align_combo;
QComboBox* m_row_length_combo;
QCheckBox* m_dual_check;
2018-03-16 05:39:53 -06:00
QPushButton* m_set_value;
// Search
QPushButton* m_find_next;
QPushButton* m_find_previous;
QComboBox* m_input_combo;
2018-03-16 05:39:53 -06:00
QLabel* m_result_label;
// Address Spaces
QRadioButton* m_address_space_physical;
QRadioButton* m_address_space_effective;
QRadioButton* m_address_space_auxiliary;
2018-03-16 05:39:53 -06:00
// Breakpoint options
QRadioButton* m_bp_read_write;
QRadioButton* m_bp_read_only;
QRadioButton* m_bp_write_only;
QCheckBox* m_bp_log_check;
};