mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-03-02 19:16:56 +00:00
Qt Debugger: Remove memory viewer.
Being replaced by WebSocket based debugger.
This commit is contained in:
parent
28cabd578a
commit
cf33e852ef
@ -757,7 +757,6 @@ elseif(USING_QT_UI)
|
||||
find_package(Qt5 COMPONENTS Multimedia)
|
||||
endif(NOT SDL2_FOUND)
|
||||
set(Qt_UI
|
||||
Qt/Debugger/debugger_memory.ui
|
||||
Qt/Debugger/debugger_memorytex.ui
|
||||
)
|
||||
qt5_wrap_ui(QT_UI_GEN ${Qt_UI})
|
||||
@ -769,10 +768,6 @@ elseif(USING_QT_UI)
|
||||
Qt/QtHost.h
|
||||
Qt/mainwindow.cpp
|
||||
Qt/mainwindow.h
|
||||
Qt/Debugger/ctrlmemview.cpp
|
||||
Qt/Debugger/ctrlmemview.h
|
||||
Qt/Debugger/debugger_memory.cpp
|
||||
Qt/Debugger/debugger_memory.h
|
||||
Qt/Debugger/debugger_memorytex.cpp
|
||||
Qt/Debugger/debugger_memorytex.h
|
||||
)
|
||||
|
@ -1,259 +0,0 @@
|
||||
#include "ctrlmemview.h"
|
||||
|
||||
#include <QPainter>
|
||||
#include <QKeyEvent>
|
||||
#include <QMenu>
|
||||
#include <QMessageBox>
|
||||
#include <QApplication>
|
||||
#include <QClipboard>
|
||||
#include <QInputDialog>
|
||||
|
||||
#include "math.h"
|
||||
|
||||
#include "Core/MemMap.h"
|
||||
#include "Core/Debugger/SymbolMap.h"
|
||||
|
||||
CtrlMemView::CtrlMemView(QWidget *parent) :
|
||||
QWidget(parent)
|
||||
{
|
||||
curAddress=0;
|
||||
rowHeight=14;
|
||||
align=4;
|
||||
alignMul=4;
|
||||
selecting=false;
|
||||
mode=MV_NORMAL;
|
||||
debugger = 0;
|
||||
|
||||
setMinimumWidth(500);
|
||||
}
|
||||
|
||||
void CtrlMemView::redraw()
|
||||
{
|
||||
update();
|
||||
}
|
||||
|
||||
void CtrlMemView::wheelEvent(QWheelEvent* e)
|
||||
{
|
||||
int numDegrees = e->delta() / 8;
|
||||
int numSteps = numDegrees / 15;
|
||||
if (e->orientation() == Qt::Vertical)
|
||||
{
|
||||
curAddress -= numSteps*align*alignMul;
|
||||
redraw();
|
||||
}
|
||||
}
|
||||
|
||||
void CtrlMemView::keyPressEvent(QKeyEvent *e)
|
||||
{
|
||||
int page=(rect().bottom()/rowHeight)/2-1;
|
||||
|
||||
switch (e->key())
|
||||
{
|
||||
case Qt::Key_Up: curAddress -= align*alignMul; break;
|
||||
case Qt::Key_Down: curAddress += align*alignMul; break;
|
||||
case Qt::Key_PageUp: curAddress -= page*align*alignMul; break;
|
||||
case Qt::Key_PageDown: curAddress += page*align*alignMul; break;
|
||||
default: QWidget::keyPressEvent(e); break;
|
||||
}
|
||||
|
||||
redraw();
|
||||
}
|
||||
|
||||
void CtrlMemView::paintEvent(QPaintEvent *)
|
||||
{
|
||||
QPainter painter(this);
|
||||
painter.setBrush(Qt::white);
|
||||
painter.setPen(Qt::white);
|
||||
painter.drawRect(rect());
|
||||
|
||||
if (!debugger)
|
||||
return;
|
||||
|
||||
int width = rect().width();
|
||||
int numRows=(rect().bottom()/rowHeight)/2+1;
|
||||
|
||||
QPen nullPen(0xFFFFFF);
|
||||
QPen currentPen(0xFF000000);
|
||||
QPen selPen(0x808080);
|
||||
QBrush lbr(0xFFFFFF);
|
||||
QBrush nullBrush(0xFFFFFF);
|
||||
QBrush currentBrush(0xFFEFE8);
|
||||
QBrush pcBrush(0x70FF70);
|
||||
QPen textPen;
|
||||
|
||||
QFont normalFont("Arial", 10);
|
||||
QFont alignedFont("Monospace", 10);
|
||||
alignedFont.setStyleHint(QFont::Monospace);
|
||||
painter.setFont(normalFont);
|
||||
|
||||
int i;
|
||||
curAddress&=~(align-1);
|
||||
for (i=-numRows; i<=numRows; i++)
|
||||
{
|
||||
unsigned int address=curAddress + i*align*alignMul;
|
||||
|
||||
int rowY1 = rect().bottom()/2 + rowHeight*i - rowHeight/2;
|
||||
int rowY2 = rect().bottom()/2 + rowHeight*i + rowHeight/2;
|
||||
|
||||
char temp[256];
|
||||
|
||||
painter.setBrush(currentBrush);
|
||||
|
||||
if (selecting && address == (unsigned int)selection)
|
||||
painter.setPen(selPen);
|
||||
else
|
||||
painter.setPen(i==0 ? currentPen : nullPen);
|
||||
painter.drawRect(0, rowY1, 16-1, rowY2 - rowY1 - 1);
|
||||
|
||||
painter.drawRect(16, rowY1, width - 16 -1, rowY2 - rowY1 - 1);
|
||||
painter.setBrush(nullBrush);
|
||||
textPen.setColor(0x600000);
|
||||
painter.setPen(textPen);
|
||||
painter.setFont(alignedFont);
|
||||
painter.drawText(17,rowY1-2+rowHeight, QString("%1").arg(address,8,16,QChar('0')));
|
||||
textPen.setColor(0xFF000000);
|
||||
painter.setPen(textPen);
|
||||
if (debugger->isAlive())
|
||||
{
|
||||
|
||||
switch(mode) {
|
||||
case MV_NORMAL:
|
||||
{
|
||||
const char *m = "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0";
|
||||
if (Memory::IsValidAddress(address))
|
||||
{
|
||||
u32 memory[4] = {
|
||||
debugger->readMemory(address),
|
||||
debugger->readMemory(address+4),
|
||||
debugger->readMemory(address+8),
|
||||
debugger->readMemory(address+12)
|
||||
};
|
||||
m = (const char*)memory;
|
||||
sprintf(temp, "%08x %08x %08x %08x ................",
|
||||
memory[0],memory[1],memory[2],memory[3]);
|
||||
}
|
||||
for (int i=0; i<16; i++)
|
||||
{
|
||||
int c = (unsigned char)m[i];
|
||||
if (c>=32 && c<255)
|
||||
temp[i+37]=c;
|
||||
}
|
||||
}
|
||||
painter.setFont(alignedFont);
|
||||
painter.drawText(85,rowY1 - 2 + rowHeight, temp);
|
||||
break;
|
||||
|
||||
case MV_SYMBOLS:
|
||||
{
|
||||
/* textPen.setColor(0x0000FF);
|
||||
painter.setPen(textPen);
|
||||
int fn = g_symbolMap->GetSymbolNum(address);
|
||||
if (fn==-1)
|
||||
{
|
||||
sprintf(temp, "%s (ns)", Memory::GetAddressName(address));
|
||||
}
|
||||
else
|
||||
sprintf(temp, "%s (0x%x b)", g_symbolMap->GetSymbolName(fn),g_symbolMap->GetSymbolSize(fn));
|
||||
painter.drawText(205,rowY1 - 2 + rowHeight, temp);
|
||||
|
||||
textPen.setColor(0xFF000000);
|
||||
painter.setPen(textPen);
|
||||
|
||||
if (align==4)
|
||||
{
|
||||
u32 value = Memory::ReadUnchecked_U32(address);
|
||||
int symbolnum = g_symbolMap->GetSymbolNum(value);
|
||||
if(symbolnum>=0)
|
||||
sprintf(temp, "%08x [%s]", value, g_symbolMap->GetSymbolName(symbolnum));
|
||||
}
|
||||
else if (align==2)
|
||||
{
|
||||
u16 value = Memory::ReadUnchecked_U16(address);
|
||||
int symbolnum = g_symbolMap->GetSymbolNum(value);
|
||||
if(symbolnum>=0)
|
||||
sprintf(temp, "%04x [%s]", value, g_symbolMap->GetSymbolName(symbolnum));
|
||||
}
|
||||
|
||||
painter.drawText(85,rowY1 - 2 + rowHeight, temp);*/
|
||||
break;
|
||||
}
|
||||
case MV_MAX: break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CtrlMemView::mousePressEvent(QMouseEvent *e)
|
||||
{
|
||||
int x = e->pos().x();
|
||||
int y = e->pos().y();
|
||||
if (x>16)
|
||||
{
|
||||
oldSelection=selection;
|
||||
selection=yToAddress(y);
|
||||
bool oldselecting=selecting;
|
||||
selecting=true;
|
||||
if (!oldselecting || (selection!=oldSelection))
|
||||
redraw();
|
||||
}
|
||||
}
|
||||
|
||||
void CtrlMemView::contextMenu(const QPoint &pos)
|
||||
{
|
||||
QMenu menu(this);
|
||||
|
||||
QAction *gotoDisAsm = new QAction(tr("Go to in &disasm"), this);
|
||||
//connect(gotoDisAsm, SIGNAL(triggered()), this, SLOT(GotoDisAsm()));
|
||||
menu.addAction(gotoDisAsm);
|
||||
|
||||
menu.addSeparator();
|
||||
|
||||
QAction *copyValue = new QAction(tr("&Copy value"), this);
|
||||
connect(copyValue, SIGNAL(triggered()), this, SLOT(CopyValue()));
|
||||
menu.addAction(copyValue);
|
||||
|
||||
QAction *changeValue = new QAction(tr("C&hange value"), this);
|
||||
connect(changeValue, SIGNAL(triggered()), this, SLOT(Change()));
|
||||
menu.addAction(changeValue);
|
||||
|
||||
QAction *dump = new QAction(tr("Dump..."), this);
|
||||
connect(dump, SIGNAL(triggered()), this, SLOT(Dump()));
|
||||
menu.addAction(dump);
|
||||
|
||||
menu.exec( mapToGlobal(pos));
|
||||
}
|
||||
|
||||
void CtrlMemView::CopyValue()
|
||||
{
|
||||
QApplication::clipboard()->setText(QString("%1").arg(Memory::ReadUnchecked_U32(selection),8,16,QChar('0')));
|
||||
}
|
||||
|
||||
void CtrlMemView::Dump()
|
||||
{
|
||||
QMessageBox::information(this,"Sorry","This feature has not been implemented.",QMessageBox::Ok);
|
||||
}
|
||||
|
||||
|
||||
void CtrlMemView::Change()
|
||||
{
|
||||
QString curVal = QString("%1").arg(Memory::ReadUnchecked_U32(selection),8,16,QChar('0'));
|
||||
|
||||
bool ok;
|
||||
QString text = QInputDialog::getText(this, tr("Set new value"),
|
||||
tr("Set new value:"), QLineEdit::Normal,
|
||||
curVal, &ok);
|
||||
if (ok && !text.isEmpty())
|
||||
{
|
||||
Memory::WriteUnchecked_U32(text.toUInt(0,16),selection);
|
||||
redraw();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int CtrlMemView::yToAddress(int y)
|
||||
{
|
||||
int ydiff=y-rect().bottom()/2-rowHeight/2;
|
||||
ydiff=(int)(floor((float)ydiff / (float)rowHeight))+1;
|
||||
return curAddress + ydiff * align*alignMul;
|
||||
}
|
||||
|
@ -1,91 +0,0 @@
|
||||
#ifndef CTRLMEMVIEW_H
|
||||
#define CTRLMEMVIEW_H
|
||||
|
||||
#include "Core/Debugger/DebugInterface.h"
|
||||
#include <QWidget>
|
||||
|
||||
enum MemViewMode
|
||||
{
|
||||
MV_NORMAL,
|
||||
MV_SYMBOLS,
|
||||
MV_MAX
|
||||
};
|
||||
|
||||
class CtrlMemView : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit CtrlMemView(QWidget *parent = 0);
|
||||
|
||||
void setDebugger(DebugInterface *deb)
|
||||
{
|
||||
debugger=deb;
|
||||
if (debugger)
|
||||
align=debugger->getInstructionSize(0);
|
||||
}
|
||||
DebugInterface *getDebugger()
|
||||
{
|
||||
return debugger;
|
||||
}
|
||||
void redraw();
|
||||
|
||||
void setMode(MemViewMode m)
|
||||
{
|
||||
mode=m;
|
||||
switch(mode) {
|
||||
case MV_NORMAL:
|
||||
alignMul=4;
|
||||
break;
|
||||
case MV_SYMBOLS:
|
||||
alignMul=1;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
redraw();
|
||||
}
|
||||
|
||||
void setAlign(int l)
|
||||
{
|
||||
align=l;
|
||||
}
|
||||
int yToAddress(int y);
|
||||
|
||||
void gotoAddr(unsigned int addr)
|
||||
{
|
||||
curAddress=addr&(~(align-1));
|
||||
redraw();
|
||||
}
|
||||
|
||||
unsigned int getSelection()
|
||||
{
|
||||
return curAddress;
|
||||
}
|
||||
void contextMenu(const QPoint &pos);
|
||||
protected:
|
||||
void paintEvent(QPaintEvent *);
|
||||
void keyPressEvent(QKeyEvent *e);
|
||||
void wheelEvent(QWheelEvent *e);
|
||||
void mousePressEvent(QMouseEvent *e);
|
||||
|
||||
public slots:
|
||||
void CopyValue();
|
||||
void Dump();
|
||||
void Change();
|
||||
private:
|
||||
int curAddress;
|
||||
int align;
|
||||
int alignMul;
|
||||
int rowHeight;
|
||||
|
||||
int selection;
|
||||
int oldSelection;
|
||||
bool selectionChanged;
|
||||
bool selecting;
|
||||
bool hasFocus;
|
||||
|
||||
DebugInterface *debugger;
|
||||
MemViewMode mode;
|
||||
};
|
||||
|
||||
#endif // CTRLMEMVIEW_H
|
@ -1,89 +0,0 @@
|
||||
#include "debugger_memory.h"
|
||||
#include "ui_debugger_memory.h"
|
||||
#include "Core/Debugger/SymbolMap.h"
|
||||
#include <QTimer>
|
||||
|
||||
Debugger_Memory::Debugger_Memory(DebugInterface *_cpu, MainWindow* mainWindow_, QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::Debugger_Memory),
|
||||
cpu(_cpu),
|
||||
mainWindow(mainWindow_)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
setWindowTitle(tr("Memory Viewer - %1").arg(cpu->GetName()));
|
||||
|
||||
ui->memView->setDebugger(_cpu);
|
||||
}
|
||||
|
||||
Debugger_Memory::~Debugger_Memory()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void Debugger_Memory::Update()
|
||||
{
|
||||
ui->memView->redraw();
|
||||
}
|
||||
|
||||
void Debugger_Memory::Goto(u32 addr)
|
||||
{
|
||||
show();
|
||||
ui->memView->gotoAddr(addr & ~3);
|
||||
}
|
||||
|
||||
void Debugger_Memory::on_editAddress_textChanged(const QString &arg1)
|
||||
{
|
||||
ui->memView->gotoAddr(arg1.toUInt(0,16) & ~3);
|
||||
}
|
||||
|
||||
void Debugger_Memory::on_normalBtn_clicked()
|
||||
{
|
||||
ui->memView->setMode(MV_NORMAL);
|
||||
}
|
||||
|
||||
void Debugger_Memory::on_symbolsBtn_clicked()
|
||||
{
|
||||
ui->memView->setMode(MV_SYMBOLS);
|
||||
}
|
||||
|
||||
void Debugger_Memory::on_memView_customContextMenuRequested(const QPoint &pos)
|
||||
{
|
||||
ui->memView->contextMenu(pos);
|
||||
}
|
||||
|
||||
void Debugger_Memory::NotifyMapLoaded()
|
||||
{
|
||||
QListWidgetItem* item = new QListWidgetItem();
|
||||
item->setText("(0x80000000)");
|
||||
item->setData(Qt::UserRole, 0x80000000);
|
||||
ui->symbols->addItem(item);
|
||||
|
||||
std::vector<SymbolEntry> symbols = g_symbolMap->GetAllSymbols(ST_DATA);
|
||||
for(int i = 0; i < (int)symbols.size(); i++)
|
||||
{
|
||||
QListWidgetItem* item = new QListWidgetItem();
|
||||
item->setText(QString("%1 (%2)").arg(QString::fromStdString(symbols[i].name)).arg(symbols[i].size));
|
||||
item->setData(Qt::UserRole, symbols[i].address);
|
||||
ui->symbols->addItem(item);
|
||||
}
|
||||
|
||||
ui->regions->clear();
|
||||
/*
|
||||
for (int i = 0; i < cpu->getMemMap()->numRegions; i++)
|
||||
{
|
||||
int n = ComboBox_AddString(lb,cpu->getMemMap()->regions[i].name);
|
||||
ComboBox_SetItemData(lb,n,cpu->getMemMap()->regions[i].start);
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
void Debugger_Memory::on_regions_currentIndexChanged(int index)
|
||||
{
|
||||
ui->memView->gotoAddr(ui->regions->itemData(index,Qt::UserRole).toInt());
|
||||
}
|
||||
|
||||
void Debugger_Memory::on_symbols_itemClicked(QListWidgetItem *item)
|
||||
{
|
||||
ui->memView->gotoAddr(item->data(Qt::UserRole).toInt());
|
||||
}
|
@ -1,45 +0,0 @@
|
||||
#ifndef DEBUGGER_MEMORY_H
|
||||
#define DEBUGGER_MEMORY_H
|
||||
|
||||
#include "Core/Debugger/DebugInterface.h"
|
||||
#include <QDialog>
|
||||
#include <QListWidgetItem>
|
||||
|
||||
class MainWindow;
|
||||
namespace Ui {
|
||||
class Debugger_Memory;
|
||||
}
|
||||
|
||||
class Debugger_Memory : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit Debugger_Memory(DebugInterface *_cpu, MainWindow* mainWindow_, QWidget *parent = 0);
|
||||
~Debugger_Memory();
|
||||
|
||||
void Update();
|
||||
void Goto(u32 addr);
|
||||
|
||||
void NotifyMapLoaded();
|
||||
private slots:
|
||||
void on_editAddress_textChanged(const QString &arg1);
|
||||
|
||||
void on_normalBtn_clicked();
|
||||
|
||||
void on_symbolsBtn_clicked();
|
||||
|
||||
void on_memView_customContextMenuRequested(const QPoint &pos);
|
||||
|
||||
void on_regions_currentIndexChanged(int index);
|
||||
|
||||
void on_symbols_itemClicked(QListWidgetItem *item);
|
||||
|
||||
private:
|
||||
Ui::Debugger_Memory *ui;
|
||||
DebugInterface* cpu;
|
||||
MainWindow* mainWindow;
|
||||
|
||||
};
|
||||
|
||||
#endif // DEBUGGER_MEMORY_H
|
@ -1,92 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>Debugger_Memory</class>
|
||||
<widget class="QDialog" name="Debugger_Memory">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>611</width>
|
||||
<height>384</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Dialog</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Goto:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="editAddress"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="regions"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="title">
|
||||
<string>Mode</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
<widget class="QPushButton" name="normalBtn">
|
||||
<property name="text">
|
||||
<string>Normal</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="symbolsBtn">
|
||||
<property name="text">
|
||||
<string>Symbols</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QListWidget" name="symbols"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="CtrlMemView" name="memView" native="true">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="contextMenuPolicy">
|
||||
<enum>Qt::CustomContextMenu</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>CtrlMemView</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>ctrlmemview.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
@ -35,8 +35,6 @@ public:
|
||||
}
|
||||
|
||||
virtual void UpdateMemView() override {
|
||||
if(mainWindow->GetDialogMemory())
|
||||
mainWindow->GetDialogMemory()->Update();
|
||||
}
|
||||
virtual void UpdateDisassembly() override {
|
||||
mainWindow->updateMenus();
|
||||
|
@ -21,7 +21,6 @@ MainWindow::MainWindow(QWidget *parent, bool fullscreen) :
|
||||
currentLanguage("en"),
|
||||
nextState(CORE_POWERDOWN),
|
||||
lastUIState(UISTATE_MENU),
|
||||
memoryWindow(0),
|
||||
memoryTexWindow(0)
|
||||
{
|
||||
QDesktopWidget *desktop = QApplication::desktop();
|
||||
@ -47,12 +46,6 @@ MainWindow::MainWindow(QWidget *parent, bool fullscreen) :
|
||||
QObject::connect(emugl, SIGNAL(newFrame()), this, SLOT(newFrame()));
|
||||
}
|
||||
|
||||
void MainWindow::ShowMemory(u32 addr)
|
||||
{
|
||||
if(memoryWindow)
|
||||
memoryWindow->Goto(addr);
|
||||
}
|
||||
|
||||
inline float clamp1(float x) {
|
||||
if (x > 1.0f) return 1.0f;
|
||||
if (x < -1.0f) return -1.0f;
|
||||
@ -146,11 +139,8 @@ void MainWindow::bootDone()
|
||||
if(g_Config.bFullScreen != isFullScreen())
|
||||
fullscrAct();
|
||||
|
||||
memoryWindow = new Debugger_Memory(currentDebugMIPS, this, this);
|
||||
memoryTexWindow = new Debugger_MemoryTex(this);
|
||||
|
||||
notifyMapsLoaded();
|
||||
|
||||
if (nextState == CORE_RUNNING)
|
||||
runAct();
|
||||
updateMenus();
|
||||
@ -172,8 +162,6 @@ void MainWindow::closeAct()
|
||||
{
|
||||
updateMenus();
|
||||
|
||||
if(memoryWindow && memoryWindow->isVisible())
|
||||
memoryWindow->close();
|
||||
if(memoryTexWindow && memoryTexWindow->isVisible())
|
||||
memoryTexWindow->close();
|
||||
|
||||
@ -256,8 +244,6 @@ void MainWindow::resetAct()
|
||||
{
|
||||
updateMenus();
|
||||
|
||||
if(memoryWindow)
|
||||
memoryWindow->close();
|
||||
if(memoryTexWindow)
|
||||
memoryTexWindow->close();
|
||||
|
||||
@ -285,7 +271,6 @@ void MainWindow::lmapAct()
|
||||
{
|
||||
QString fileName = QFileInfo(fileNames[0]).absoluteFilePath();
|
||||
g_symbolMap->LoadSymbolMap(fileName.toStdString().c_str());
|
||||
notifyMapsLoaded();
|
||||
}
|
||||
}
|
||||
|
||||
@ -308,7 +293,6 @@ void MainWindow::smapAct()
|
||||
void MainWindow::resetTableAct()
|
||||
{
|
||||
g_symbolMap->Clear();
|
||||
notifyMapsLoaded();
|
||||
}
|
||||
|
||||
void MainWindow::dumpNextAct()
|
||||
@ -321,12 +305,6 @@ void MainWindow::consoleAct()
|
||||
LogManager::GetInstance()->GetConsoleListener()->Show(LogManager::GetInstance()->GetConsoleListener()->Hidden());
|
||||
}
|
||||
|
||||
void MainWindow::memviewAct()
|
||||
{
|
||||
if (memoryWindow)
|
||||
memoryWindow->show();
|
||||
}
|
||||
|
||||
void MainWindow::memviewTexAct()
|
||||
{
|
||||
if(memoryTexWindow)
|
||||
@ -510,8 +488,6 @@ void MainWindow::createMenus()
|
||||
debugMenu->addSeparator();
|
||||
debugMenu->add(new MenuAction(this, SLOT(consoleAct()), QT_TR_NOOP("Log Console")))
|
||||
->addDisableState(UISTATE_MENU);
|
||||
debugMenu->add(new MenuAction(this, SLOT(memviewAct()), QT_TR_NOOP("Memory View")))
|
||||
->addDisableState(UISTATE_MENU);
|
||||
debugMenu->add(new MenuAction(this, SLOT(memviewTexAct()),QT_TR_NOOP("Memory View Texture")))
|
||||
->addDisableState(UISTATE_MENU);
|
||||
|
||||
@ -634,9 +610,3 @@ void MainWindow::createMenus()
|
||||
|
||||
retranslate();
|
||||
}
|
||||
|
||||
void MainWindow::notifyMapsLoaded()
|
||||
{
|
||||
if (memoryWindow)
|
||||
memoryWindow->NotifyMapLoaded();
|
||||
}
|
||||
|
@ -12,7 +12,6 @@
|
||||
#include "Core/Core.h"
|
||||
#include "Core/Config.h"
|
||||
#include "Core/System.h"
|
||||
#include "Debugger/debugger_memory.h"
|
||||
#include "Debugger/debugger_memorytex.h"
|
||||
#include "Qt/QtMain.h"
|
||||
|
||||
@ -35,11 +34,9 @@ public:
|
||||
explicit MainWindow(QWidget *parent = 0, bool fullscreen=false);
|
||||
~MainWindow() { };
|
||||
|
||||
Debugger_Memory* GetDialogMemory() { return memoryWindow; }
|
||||
Debugger_MemoryTex* GetDialogMemoryTex() { return memoryTexWindow; }
|
||||
CoreState GetNextState() { return nextState; }
|
||||
|
||||
void ShowMemory(u32 addr);
|
||||
void updateMenus();
|
||||
|
||||
void Notify(MainWindowMsg msg) {
|
||||
@ -94,7 +91,6 @@ private slots:
|
||||
void dumpNextAct();
|
||||
void takeScreen() { g_TakeScreenshot = true; }
|
||||
void consoleAct();
|
||||
void memviewAct();
|
||||
void memviewTexAct();
|
||||
|
||||
// Options
|
||||
@ -153,7 +149,6 @@ private:
|
||||
void SetGameTitle(QString text);
|
||||
void loadLanguage(const QString &language, bool retranslate);
|
||||
void createMenus();
|
||||
void notifyMapsLoaded();
|
||||
|
||||
QTranslator translator;
|
||||
QString currentLanguage;
|
||||
@ -161,7 +156,6 @@ private:
|
||||
CoreState nextState;
|
||||
GlobalUIState lastUIState;
|
||||
|
||||
Debugger_Memory *memoryWindow;
|
||||
Debugger_MemoryTex *memoryTexWindow;
|
||||
|
||||
QActionGroup *anisotropicGroup, *screenGroup, *displayLayoutGroup,
|
||||
|
@ -341,18 +341,6 @@
|
||||
<ForcedIncludeFiles Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
</ForcedIncludeFiles>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Qt\Debugger\ctrlmemview.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Qt\Debugger\debugger_memory.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Qt\Debugger\debugger_memorytex.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
@ -458,8 +446,6 @@
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\android\jni\TestRunner.h" />
|
||||
<ClInclude Include="..\ios\ViewController.h" />
|
||||
<ClInclude Include="..\Qt\Debugger\ctrlmemview.h" />
|
||||
<ClInclude Include="..\Qt\Debugger\debugger_memory.h" />
|
||||
<ClInclude Include="..\Qt\Debugger\debugger_memorytex.h" />
|
||||
<ClInclude Include="..\Qt\mainwindow.h" />
|
||||
<ClInclude Include="GPU\D3D11Context.h" />
|
||||
@ -520,7 +506,6 @@
|
||||
<None Include="..\Qt\assets.qrc" />
|
||||
<None Include="..\Qt\Common.pro" />
|
||||
<None Include="..\Qt\Core.pro" />
|
||||
<None Include="..\Qt\Debugger\debugger_memory.ui" />
|
||||
<None Include="..\Qt\Debugger\debugger_memorytex.ui" />
|
||||
<None Include="..\Qt\GPU.pro" />
|
||||
<None Include="..\Qt\Native.pro" />
|
||||
|
@ -161,15 +161,9 @@
|
||||
<ClCompile Include="..\Qt\mainwindow.cpp">
|
||||
<Filter>Other Platforms\Qt</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Qt\Debugger\debugger_memory.cpp">
|
||||
<Filter>Other Platforms\Qt\Debugger</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Qt\Debugger\debugger_memorytex.cpp">
|
||||
<Filter>Other Platforms\Qt\Debugger</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Qt\Debugger\ctrlmemview.cpp">
|
||||
<Filter>Other Platforms\Qt\Debugger</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="GPU\D3D11Context.cpp">
|
||||
<Filter>Windows\System</Filter>
|
||||
</ClCompile>
|
||||
@ -323,15 +317,9 @@
|
||||
<ClInclude Include="..\Qt\Debugger\ctrlvfpuview.h">
|
||||
<Filter>Other Platforms\Qt\Debugger</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Qt\Debugger\debugger_memory.h">
|
||||
<Filter>Other Platforms\Qt\Debugger</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Qt\Debugger\debugger_memorytex.h">
|
||||
<Filter>Other Platforms\Qt\Debugger</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Qt\Debugger\ctrlmemview.h">
|
||||
<Filter>Other Platforms\Qt\Debugger</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="GPU\D3D11Context.h">
|
||||
<Filter>Windows\System</Filter>
|
||||
</ClInclude>
|
||||
@ -435,9 +423,6 @@
|
||||
<None Include="..\Qt\assets.qrc">
|
||||
<Filter>Other Platforms\Qt</Filter>
|
||||
</None>
|
||||
<None Include="..\Qt\Debugger\debugger_memory.ui">
|
||||
<Filter>Other Platforms\Qt\Debugger</Filter>
|
||||
</None>
|
||||
<None Include="..\Qt\Debugger\debugger_memorytex.ui">
|
||||
<Filter>Other Platforms\Qt\Debugger</Filter>
|
||||
</None>
|
||||
|
Loading…
x
Reference in New Issue
Block a user