From 18f0168b636855ce18bf4340861f29ca70fb644c Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sun, 3 Jun 2018 09:12:36 -0700 Subject: [PATCH] Qt Debugger: Remove VFPU dialog. Being replaced by new WeBsocket based debugger with better maintenance. --- CMakeLists.txt | 5 -- Qt/Debugger/ctrlvfpuview.cpp | 93 --------------------------------- Qt/Debugger/ctrlvfpuview.h | 38 -------------- Qt/Debugger/debugger_disasm.cpp | 13 ----- Qt/Debugger/debugger_disasm.h | 4 -- Qt/Debugger/debugger_disasm.ui | 7 --- Qt/Debugger/debugger_vfpu.cpp | 38 -------------- Qt/Debugger/debugger_vfpu.h | 31 ----------- Qt/Debugger/debugger_vfpu.ui | 87 ------------------------------ 9 files changed, 316 deletions(-) delete mode 100644 Qt/Debugger/ctrlvfpuview.cpp delete mode 100644 Qt/Debugger/ctrlvfpuview.h delete mode 100644 Qt/Debugger/debugger_vfpu.cpp delete mode 100644 Qt/Debugger/debugger_vfpu.h delete mode 100644 Qt/Debugger/debugger_vfpu.ui diff --git a/CMakeLists.txt b/CMakeLists.txt index 6337db39dd..d67b65f837 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -761,7 +761,6 @@ elseif(USING_QT_UI) Qt/Debugger/debugger_displaylist.ui Qt/Debugger/debugger_memory.ui Qt/Debugger/debugger_memorytex.ui - Qt/Debugger/debugger_vfpu.ui ) qt5_wrap_ui(QT_UI_GEN ${Qt_UI}) list(APPEND NativeAppSource @@ -778,8 +777,6 @@ elseif(USING_QT_UI) Qt/Debugger/ctrlmemview.h Qt/Debugger/ctrlregisterlist.cpp Qt/Debugger/ctrlregisterlist.h - Qt/Debugger/ctrlvfpuview.cpp - Qt/Debugger/ctrlvfpuview.h Qt/Debugger/debugger_disasm.cpp Qt/Debugger/debugger_disasm.h Qt/Debugger/debugger_displaylist.cpp @@ -788,8 +785,6 @@ elseif(USING_QT_UI) Qt/Debugger/debugger_memory.h Qt/Debugger/debugger_memorytex.cpp Qt/Debugger/debugger_memorytex.h - Qt/Debugger/debugger_vfpu.cpp - Qt/Debugger/debugger_vfpu.h ) add_definitions(-DUSING_QT_UI) include_directories(${CMAKE_CURRENT_BINARY_DIR} Qt Qt/Debugger) diff --git a/Qt/Debugger/ctrlvfpuview.cpp b/Qt/Debugger/ctrlvfpuview.cpp deleted file mode 100644 index f7622d03ef..0000000000 --- a/Qt/Debugger/ctrlvfpuview.cpp +++ /dev/null @@ -1,93 +0,0 @@ -#include "ctrlvfpuview.h" -#include - -#include "Core/MIPS/MIPS.h" // BAD - -CtrlVfpuView::CtrlVfpuView(QWidget *parent) : - QWidget(parent) -{ - mode = 0; -} - -void CtrlVfpuView::setMode(int newMode) -{ - mode = newMode; - redraw(); -} - -void CtrlVfpuView::paintEvent(QPaintEvent *) -{ - QPainter painter(this); - painter.setBrush(Qt::white); - painter.setPen(Qt::white); - painter.drawRect(rect()); - - if (!cpu) - return; - - QFont normalFont("Arial", 10); - painter.setFont(normalFont); - - QPen currentPen(0xFF000000); - QBrush nullBrush(0xFFEfE8); - painter.setPen(currentPen); - painter.setBrush(nullBrush); - - enum - { - rowHeight = 15, - columnWidth = 80, - xStart = columnWidth/2, - yStart = 0 - }; - - for (int matrix = 0; matrix<8; matrix++) - { - int my = (int)(yStart + matrix * rowHeight * 5.5f); - painter.drawRect(0, my, xStart-1, rowHeight-1); - painter.drawText(3, my+rowHeight-3, QString("M%1").arg(matrix)+"00"); - painter.drawRect(xStart, my+rowHeight, columnWidth*4-1, 4*rowHeight-1); - - for (int column = 0; column<4; column++) - { - int y = my; - int x = column * columnWidth + xStart; - - painter.drawRect(x, y, columnWidth-1, rowHeight - 1); - painter.drawText(x+3, y-3+rowHeight, QString("R%1").arg(matrix)+QString("0%1").arg(column)); - - painter.drawRect(0, y+rowHeight*(column+1), xStart - 1, rowHeight - 1); - painter.drawText(3, y+rowHeight*(column+2)-3, QString("C%1").arg(matrix)+QString("%1").arg(column)+"0"); - - y+=rowHeight; - - for (int row = 0; row<4; row++) - { - float val = mipsr4k.v[column*32+row+matrix*4]; - u32 hex = *((u32*)&val); - char temp[256]; - switch (mode) - { - case 0: sprintf(temp,"%f",val); break; -// case 1: sprintf(temp,"??"); break; - case 2: sprintf(temp,"0x%08x",hex); break; - default:sprintf(temp,"%f",val); break; - } - - painter.drawText(x+3, y-3 + rowHeight, temp); - y+=rowHeight; - } - } - } - - setMinimumHeight((int)(yStart + 8 * rowHeight * 5.5f)); - setMinimumWidth(4*columnWidth+xStart); - -} - - -void CtrlVfpuView::redraw() -{ - update(); -} - diff --git a/Qt/Debugger/ctrlvfpuview.h b/Qt/Debugger/ctrlvfpuview.h deleted file mode 100644 index 5fabb3dd66..0000000000 --- a/Qt/Debugger/ctrlvfpuview.h +++ /dev/null @@ -1,38 +0,0 @@ -#ifndef CTRLVFPUVIEW_H -#define CTRLVFPUVIEW_H - -#include -#include "Core/Debugger/DebugInterface.h" - -class Debugger_Vfpu; -class CtrlVfpuView : public QWidget -{ - Q_OBJECT -public: - explicit CtrlVfpuView(QWidget *parent = 0); - - void setParentWindow(Debugger_Vfpu* win) - { - parentWindow = win; - } - - void setCPU(DebugInterface *deb) - { - cpu = deb; - } - DebugInterface *getCPU() - { - return cpu; - } - void setMode(int newMode); - void redraw(); -protected: - void paintEvent(QPaintEvent *); - -private: - DebugInterface *cpu; - Debugger_Vfpu* parentWindow; - int mode; -}; - -#endif // CTRLVFPUVIEW_H diff --git a/Qt/Debugger/debugger_disasm.cpp b/Qt/Debugger/debugger_disasm.cpp index f8e585e23d..dfdf2c5699 100644 --- a/Qt/Debugger/debugger_disasm.cpp +++ b/Qt/Debugger/debugger_disasm.cpp @@ -29,8 +29,6 @@ Debugger_Disasm::Debugger_Disasm(DebugInterface *_cpu, MainWindow* mainWindow_, { ui->setupUi(this); - vfpudlg = new Debugger_VFPU(_cpu, mainWindow, this); - ui->DisasmView->setWindowTitle(_cpu->GetName()); QObject::connect(ui->RegListScroll,SIGNAL(actionTriggered(int)), ui->RegList, SLOT(scrollChanged(int))); @@ -58,11 +56,6 @@ Debugger_Disasm::~Debugger_Disasm() delete ui; } -void Debugger_Disasm::ShowVFPU() -{ - vfpudlg->show(); -} - void Debugger_Disasm::Update() { ui->RegList->redraw(); @@ -108,7 +101,6 @@ void Debugger_Disasm::UpdateDialog() ui->DisasmView->setAlign(cpu->getInstructionSize(0)); ui->DisasmView->redraw(); ui->RegList->redraw(); - vfpudlg->Update(); UpdateBreakpoints(); UpdateThread(); UpdateDisplayList(); @@ -267,11 +259,6 @@ void Debugger_Disasm::ShowMemory(u32 addr) mainWindow->ShowMemory(addr); } -void Debugger_Disasm::on_vfpu_clicked() -{ - ShowVFPU(); -} - void Debugger_Disasm::on_FuncList_itemClicked(QListWidgetItem *item) { u32 addr = item->data(Qt::UserRole).toInt(); diff --git a/Qt/Debugger/debugger_disasm.h b/Qt/Debugger/debugger_disasm.h index aa06dc5bc8..d2fa1d0a54 100644 --- a/Qt/Debugger/debugger_disasm.h +++ b/Qt/Debugger/debugger_disasm.h @@ -4,7 +4,6 @@ #include "Core/MIPS/MIPSStackWalk.h" #include "Core/HLE/sceKernelThread.h" #include "Core/Debugger/DebugInterface.h" -#include "debugger_vfpu.h" #include #include #include @@ -24,7 +23,6 @@ public: ~Debugger_Disasm(); void SetDebugMode(bool _bDebug); - void ShowVFPU(); void Go(); void Step(); void StepOver(); @@ -73,7 +71,6 @@ private slots: void on_DisasmView_customContextMenuRequested(const QPoint &pos); void on_RegList_customContextMenuRequested(const QPoint &pos); - void on_vfpu_clicked(); void on_FuncList_itemClicked(QListWidgetItem *item); void on_breakpointsList_itemClicked(QTreeWidgetItem *item, int column); void on_breakpointsList_customContextMenuRequested(const QPoint &pos); @@ -92,7 +89,6 @@ private: Ui::Debugger_Disasm *ui; DebugInterface* cpu; MainWindow* mainWindow; - Debugger_VFPU* vfpudlg; u32 breakpointAddr; QTreeWidgetItem* threadRowSelected; QTreeWidgetItem* displayListRowSelected; diff --git a/Qt/Debugger/debugger_disasm.ui b/Qt/Debugger/debugger_disasm.ui index fb3b7e6e17..89f5783e78 100644 --- a/Qt/Debugger/debugger_disasm.ui +++ b/Qt/Debugger/debugger_disasm.ui @@ -122,13 +122,6 @@ - - - - Show VFPU - - - diff --git a/Qt/Debugger/debugger_vfpu.cpp b/Qt/Debugger/debugger_vfpu.cpp deleted file mode 100644 index af10c2e058..0000000000 --- a/Qt/Debugger/debugger_vfpu.cpp +++ /dev/null @@ -1,38 +0,0 @@ -#include "debugger_vfpu.h" -#include "ui_debugger_vfpu.h" -#include "mainwindow.h" -#include - -Debugger_VFPU::Debugger_VFPU(DebugInterface *_cpu, MainWindow* mainWindow_, QWidget *parent) : - QDialog(parent), - ui(new Ui::Debugger_VFPU), - cpu(_cpu), - mainWindow(mainWindow_) -{ - ui->setupUi(this); - - setWindowTitle(QString("VFPU - %1").arg(cpu->GetName())); - - ui->vfpu->setCPU(_cpu); -} - -Debugger_VFPU::~Debugger_VFPU() -{ - delete ui; -} - -void Debugger_VFPU::Update() -{ - ui->vfpu->redraw(); -} - -void Debugger_VFPU::Goto(u32 addr) -{ - show(); - mainWindow->GetDialogMemory()->Goto(addr & ~3); -} - -void Debugger_VFPU::on_comboBox_currentIndexChanged(int index) -{ - ui->vfpu->setMode(index); -} diff --git a/Qt/Debugger/debugger_vfpu.h b/Qt/Debugger/debugger_vfpu.h deleted file mode 100644 index e14fc73713..0000000000 --- a/Qt/Debugger/debugger_vfpu.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef DEBUGGER_VFPU_H -#define DEBUGGER_VFPU_H - -#include "Core/Debugger/DebugInterface.h" -#include - -class MainWindow; -namespace Ui { -class Debugger_VFPU; -} - -class Debugger_VFPU : public QDialog -{ - Q_OBJECT - -public: - explicit Debugger_VFPU(DebugInterface *_cpu, MainWindow *mainWindow_, QWidget *parent = 0); - ~Debugger_VFPU(); - - void Update(); - void Goto(u32 addr); -private slots: - void on_comboBox_currentIndexChanged(int index); - -private: - Ui::Debugger_VFPU *ui; - DebugInterface* cpu; - MainWindow* mainWindow; -}; - -#endif // DEBUGGER_VFPU_H diff --git a/Qt/Debugger/debugger_vfpu.ui b/Qt/Debugger/debugger_vfpu.ui deleted file mode 100644 index acf1f04dba..0000000000 --- a/Qt/Debugger/debugger_vfpu.ui +++ /dev/null @@ -1,87 +0,0 @@ - - - Debugger_VFPU - - - - 0 - 0 - 400 - 300 - - - - VFPU - - - - - - - - - Float - - - - - HalfFloat - - - - - Hex - - - - - Bytes - - - - - Shorts - - - - - Ints - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - Qt::StrongFocus - - - - - - - - CtrlVfpuView - QWidget -
ctrlvfpuview.h
- 1 -
-
- - -