mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 13:30:02 +00:00
Qt Debugger: Remove VFPU dialog.
Being replaced by new WeBsocket based debugger with better maintenance.
This commit is contained in:
parent
360e28f971
commit
18f0168b63
@ -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)
|
||||
|
@ -1,93 +0,0 @@
|
||||
#include "ctrlvfpuview.h"
|
||||
#include <QPainter>
|
||||
|
||||
#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();
|
||||
}
|
||||
|
@ -1,38 +0,0 @@
|
||||
#ifndef CTRLVFPUVIEW_H
|
||||
#define CTRLVFPUVIEW_H
|
||||
|
||||
#include <QWidget>
|
||||
#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
|
@ -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();
|
||||
|
@ -4,7 +4,6 @@
|
||||
#include "Core/MIPS/MIPSStackWalk.h"
|
||||
#include "Core/HLE/sceKernelThread.h"
|
||||
#include "Core/Debugger/DebugInterface.h"
|
||||
#include "debugger_vfpu.h"
|
||||
#include <QDialog>
|
||||
#include <QListWidgetItem>
|
||||
#include <QTreeWidgetItem>
|
||||
@ -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;
|
||||
|
@ -122,13 +122,6 @@
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="vfpu">
|
||||
<property name="text">
|
||||
<string>Show VFPU</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
|
@ -1,38 +0,0 @@
|
||||
#include "debugger_vfpu.h"
|
||||
#include "ui_debugger_vfpu.h"
|
||||
#include "mainwindow.h"
|
||||
#include <QTimer>
|
||||
|
||||
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);
|
||||
}
|
@ -1,31 +0,0 @@
|
||||
#ifndef DEBUGGER_VFPU_H
|
||||
#define DEBUGGER_VFPU_H
|
||||
|
||||
#include "Core/Debugger/DebugInterface.h"
|
||||
#include <QDialog>
|
||||
|
||||
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
|
@ -1,87 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>Debugger_VFPU</class>
|
||||
<widget class="QDialog" name="Debugger_VFPU">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>400</width>
|
||||
<height>300</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>VFPU</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QComboBox" name="comboBox">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Float</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>HalfFloat</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Hex</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Bytes</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Shorts</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Ints</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="CtrlVfpuView" name="vfpu" native="true">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>CtrlVfpuView</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>ctrlvfpuview.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
Loading…
Reference in New Issue
Block a user