mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-06-20 17:05:41 -04:00
Qt: Add debugger UI
This commit is contained in:
79
src/duckstation-qt/debuggerwindow.h
Normal file
79
src/duckstation-qt/debuggerwindow.h
Normal file
@ -0,0 +1,79 @@
|
||||
#pragma once
|
||||
#include "core/types.h"
|
||||
#include "ui_debuggerwindow.h"
|
||||
#include <QtWidgets/QMainWindow>
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
|
||||
namespace Bus {
|
||||
enum class MemoryRegion;
|
||||
}
|
||||
|
||||
class DebuggerCodeModel;
|
||||
class DebuggerRegistersModel;
|
||||
class DebuggerStackModel;
|
||||
|
||||
class DebuggerWindow : public QMainWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit DebuggerWindow(QWidget* parent = nullptr);
|
||||
~DebuggerWindow();
|
||||
|
||||
Q_SIGNALS:
|
||||
void closed();
|
||||
|
||||
protected:
|
||||
void closeEvent(QCloseEvent* event);
|
||||
|
||||
private Q_SLOTS:
|
||||
void onEmulationPaused(bool paused);
|
||||
void onDebuggerMessageReported(const QString& message);
|
||||
|
||||
void refreshAll();
|
||||
|
||||
void scrollToPC();
|
||||
|
||||
void onPauseActionToggled(bool paused);
|
||||
void onRunToCursorTriggered();
|
||||
void onGoToPCTriggered();
|
||||
void onGoToAddressTriggered();
|
||||
void onDumpAddressTriggered();
|
||||
void onFollowAddressTriggered();
|
||||
void onAddBreakpointTriggered();
|
||||
void onToggleBreakpointTriggered();
|
||||
void onClearBreakpointsTriggered();
|
||||
void onStepIntoActionTriggered();
|
||||
void onStepOverActionTriggered();
|
||||
void onStepOutActionTriggered();
|
||||
void onCodeViewItemActivated(QModelIndex index);
|
||||
void onMemorySearchTriggered();
|
||||
void onMemorySearchStringChanged(const QString&);
|
||||
|
||||
private:
|
||||
void setupAdditionalUi();
|
||||
void connectSignals();
|
||||
void disconnectSignals();
|
||||
void createModels();
|
||||
void setUIEnabled(bool enabled);
|
||||
void setMemoryViewRegion(Bus::MemoryRegion region);
|
||||
void toggleBreakpoint(VirtualMemoryAddress address);
|
||||
void clearBreakpoints();
|
||||
std::optional<VirtualMemoryAddress> promptForAddress(const QString& label);
|
||||
std::optional<VirtualMemoryAddress> getSelectedCodeAddress();
|
||||
bool tryFollowLoadStore(VirtualMemoryAddress address);
|
||||
void scrollToCodeAddress(VirtualMemoryAddress address);
|
||||
bool scrollToMemoryAddress(VirtualMemoryAddress address);
|
||||
void refreshBreakpointList();
|
||||
|
||||
Ui::DebuggerWindow m_ui;
|
||||
|
||||
std::unique_ptr<DebuggerCodeModel> m_code_model;
|
||||
std::unique_ptr<DebuggerRegistersModel> m_registers_model;
|
||||
std::unique_ptr<DebuggerStackModel> m_stack_model;
|
||||
|
||||
Bus::MemoryRegion m_active_memory_region;
|
||||
|
||||
PhysicalMemoryAddress m_next_memory_search_address = 0;
|
||||
};
|
Reference in New Issue
Block a user