Merge pull request #11130 from unknownbrackets/qt-debugger

Remove Qt debugger
This commit is contained in:
Henrik Rydgård authored and GitHub committed 2018-06-06 18:40:48 +02:00
commit f7d7aee58e
30 files changed
+18 -5903

No files matched your search

+9 -31
View File
@@ -273,8 +273,13 @@ if(NOT MSVC)
if(IOS)
elseif(APPLE AND NOT CMAKE_CROSSCOMPILING)
# We want C++11, so target 10.7+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mmacosx-version-min=10.7")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mmacosx-version-min=10.7 -stdlib=libc++ -U__STRICT_ANSI__")
if(USING_QT_UI)
set(MACOSX_VERSION_MIN "10.8")
else()
set(MACOSX_VERSION_MIN "10.7")
endif()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mmacosx-version-min=${MACOSX_VERSION_MIN}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mmacosx-version-min=${MACOSX_VERSION_MIN} -stdlib=libc++ -U__STRICT_ANSI__")
set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++")
elseif(NOT ANDROID)
# TODO: See if we can get rid of no-psabi
@@ -751,40 +756,13 @@ elseif(USING_QT_UI)
if(NOT SDL2_FOUND)
find_package(Qt5 COMPONENTS Multimedia)
endif(NOT SDL2_FOUND)
set(Qt_UI
Qt/Debugger/debugger_disasm.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
${QT_UI_GEN}
Qt/QtMain.cpp
Qt/QtMain.h
Qt/QtHost.cpp
Qt/QtHost.h
Qt/mainwindow.cpp
Qt/mainwindow.h
Qt/Debugger/ctrldisasmview.cpp
Qt/Debugger/ctrldisasmview.h
Qt/Debugger/ctrlmemview.cpp
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
Qt/Debugger/debugger_displaylist.h
Qt/Debugger/debugger_memory.cpp
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)
@@ -1701,7 +1679,6 @@ add_library(${CoreLibName} ${CoreLinkType}
Core/Util/ppge_atlas.h
${CORE_NEON}
${GPU_SOURCES}
git-version.cpp
ext/disarm.cpp
git-version.cpp)
@@ -1751,7 +1728,8 @@ add_custom_command(OUTPUT something_that_never_exists
-P ${CMAKE_CURRENT_SOURCE_DIR}/git-version.cmake)
set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/git-version.cpp
PROPERTIES GENERATED TRUE)
PROPERTIES GENERATED TRUE
SKIP_AUTOMOC ON)
add_dependencies(${CoreLibName} GitVersion)
set(WindowsFiles
+1
View File
@@ -241,6 +241,7 @@ public:
virtual void DumpNextFrame() = 0;
virtual void GetReportingInfo(std::string &primaryInfo, std::string &fullInfo) = 0;
virtual const std::list<int>& GetDisplayLists() = 0;
// TODO: Currently Qt only, needs to be cleaned up.
virtual std::vector<FramebufferInfo> GetFramebufferList() = 0;
virtual s64 GetListTicks(int listid) = 0;
-422
View File
@@ -1,422 +0,0 @@
#include "ctrldisasmview.h"
#include <QPainter>
#include <QKeyEvent>
#include <QClipboard>
#include <QMenu>
#include <QAction>
#include <QApplication>
#include <QInputDialog>
#include <QMessageBox>
#include "math.h"
#include "debugger_disasm.h"
#include "Core/Debugger/SymbolMap.h"
namespace
{
u32 halfAndHalf(u32 a, u32 b)
{
return ((a>>1)&0x7f7f7f7f) + ((b>>1)&0x7f7f7f7f);
}
}
CtrlDisAsmView::CtrlDisAsmView(QWidget *parent) :
QWidget(parent)
{
curAddress=0;
rowHeight=14;
align=2;
selecting=false;
showHex=false;
}
void CtrlDisAsmView::keyPressEvent(QKeyEvent *e)
{
int page=(rect().bottom()/rowHeight)/2-1;
switch (e->key())
{
case Qt::Key_Down: curAddress += align; break;
case Qt::Key_Up: curAddress -= align; break;
case Qt::Key_PageDown: curAddress += page*align; break;
case Qt::Key_PageUp: curAddress -= page*align; break;
default: QWidget::keyPressEvent(e); break;
}
update();
}
void CtrlDisAsmView::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();
}
else
{
debugger->toggleBreakpoint(yToAddress(y));
parentWindow->Update();
redraw();
}
}
void CtrlDisAsmView::wheelEvent(QWheelEvent* e)
{
int numDegrees = e->delta() / 8;
int numSteps = numDegrees / 15;
if (e->orientation() == Qt::Vertical)
{
curAddress -= numSteps*align;
update();
}
}
void CtrlDisAsmView::redraw()
{
update();
}
void CtrlDisAsmView::contextMenu(const QPoint &pos)
{
QMenu menu(this);
QAction *copyAddress = new QAction(tr("Copy &address"), this);
connect(copyAddress, SIGNAL(triggered()), this, SLOT(CopyAddress()));
menu.addAction(copyAddress);
QAction *copyInstrHex = new QAction(tr("Copy instruction (&hex)"), this);
connect(copyInstrHex, SIGNAL(triggered()), this, SLOT(CopyInstrHex()));
menu.addAction(copyInstrHex);
QAction *copyInstrDisAsm = new QAction(tr("Copy instruction (&disasm)"), this);
connect(copyInstrDisAsm, SIGNAL(triggered()), this, SLOT(CopyInstrDisAsm()));
menu.addAction(copyInstrDisAsm);
menu.addSeparator();
QAction *runToHere = new QAction(tr("&Run to here"), this);
connect(runToHere, SIGNAL(triggered()), this, SLOT(RunToHere()));
menu.addAction(runToHere);
QAction *setNextStatement = new QAction(tr("&Set Next Statement"), this);
connect(setNextStatement, SIGNAL(triggered()), this, SLOT(SetNextStatement()));
menu.addAction(setNextStatement);
QAction *toggleBreakpoint = new QAction(tr("&Toggle breakpoint"), this);
connect(toggleBreakpoint, SIGNAL(triggered()), this, SLOT(ToggleBreakpoint()));
menu.addAction(toggleBreakpoint);
QAction *followBranch = new QAction(tr("&Follow branch"), this);
connect(followBranch, SIGNAL(triggered()), this, SLOT(FollowBranch()));
menu.addAction(followBranch);
menu.addSeparator();
//QAction *showDynarecResults = new QAction(tr("&Show Dynarec Results"), this);
//connect(showDynarecResults, SIGNAL(triggered()), this, SLOT(ShowDynarecResults()));
//menu.addAction(showDynarecResults);
QAction *goToMemoryView = new QAction(tr("Go to in &Memory View"), this);
connect(goToMemoryView, SIGNAL(triggered()), this, SLOT(GoToMemoryView()));
menu.addAction(goToMemoryView);
menu.addSeparator();
//QAction *killFunction = new QAction(tr("&Kill function"), this);
//connect(killFunction, SIGNAL(triggered()), this, SLOT(KillFunction()));
//menu.addAction(killFunction);
QAction *renameFunction = new QAction(tr("&Rename function..."), this);
connect(renameFunction, SIGNAL(triggered()), this, SLOT(RenameFunction()));
menu.addAction(renameFunction);
menu.exec( mapToGlobal(pos));
}
void CtrlDisAsmView::GoToMemoryView()
{
parentWindow->ShowMemory(selection);
}
void CtrlDisAsmView::CopyAddress()
{
QApplication::clipboard()->setText(QString("%1").arg(selection,8,16,QChar('0')));
}
void CtrlDisAsmView::CopyInstrDisAsm()
{
QApplication::clipboard()->setText(debugger->disasm(selection,align));
}
void CtrlDisAsmView::CopyInstrHex()
{
QApplication::clipboard()->setText(QString("%1").arg(debugger->readMemory(selection),8,16,QChar('0')));
}
void CtrlDisAsmView::SetNextStatement()
{
debugger->setPC(selection);
redraw();
}
void CtrlDisAsmView::ToggleBreakpoint()
{
debugger->toggleBreakpoint(selection);
parentWindow->Update();
redraw();
}
void CtrlDisAsmView::FollowBranch()
{
const char *temp = debugger->disasm(selection,align);;
const char *mojs=strstr(temp,"->$");
if (mojs)
{
u32 dest;
sscanf(mojs+3,"%08x",&dest);
if (dest)
{
marker = selection;
gotoAddr(dest);
}
}
}
void CtrlDisAsmView::RunToHere()
{
debugger->setBreakpoint(selection);
debugger->runToBreakpoint();
redraw();
}
void CtrlDisAsmView::RenameFunction()
{
u32 funcBegin = g_symbolMap->GetFunctionStart(curAddress);
if (funcBegin != (u32)-1)
{
QString name = QString::fromStdString(g_symbolMap->GetLabelString(funcBegin));
bool ok;
QString newname = QInputDialog::getText(this, tr("New function name"),
tr("New function name:"), QLineEdit::Normal,
name, &ok);
if (ok && !newname.isEmpty())
{
g_symbolMap->SetLabelName(newname.toStdString().c_str(),funcBegin);
redraw();
parentWindow->NotifyMapLoaded();
}
}
else
{
QMessageBox::information(this,tr("Warning"),tr("No symbol selected"),QMessageBox::Ok);
}
}
void CtrlDisAsmView::paintEvent(QPaintEvent *)
{
QPainter painter(this);
painter.setBrush(Qt::white);
painter.setPen(Qt::white);
painter.drawRect(rect());
struct branch
{
int src,dst,srcAddr;
bool conditional;
};
branch branches[256];
int numBranches=0;
int width = rect().width();
int numRows=(rect().height()/rowHeight);
QColor bgColor(0xFFFFFFFF);
QPen nullPen(bgColor);
QPen currentPen(QColor(0,0,0));
QPen selPen(QColor(0xFF808080));
QPen condPen(QColor(0xFFFF3020));
QBrush lbr;
lbr.setColor(bgColor);
QBrush currentBrush(QColor(0xFFFFEfE8));
QBrush pcBrush(QColor(0xFF70FF70));
QFont normalFont("Arial", 10);
QFont boldFont("Arial", 10);
QFont alignedFont("Monospace", 10);
alignedFont.setStyleHint(QFont::Monospace);
boldFont.setBold(true);
painter.setFont(normalFont);
QImage breakPoint(":/resources/breakpoint.ico");
int i;
curAddress&=~(align-1);
align=(debugger->getInstructionSize(0));
for (i=0; i<=numRows; i++)
{
unsigned int address=curAddress + (i-(numRows/2))*align;
int rowY1 = rect().top() + rowHeight*i;
int rowY2 = rect().top() + rowHeight*i + rowHeight - 1;
lbr.setColor((unsigned int)marker == address ? QColor(0xFFFFEEE0) : QColor(debugger->getColor(address)));
QColor bg = lbr.color();
painter.setBrush(currentBrush);
painter.setPen(nullPen);
painter.drawRect(0,rowY1,16-1,rowY2-rowY1);
if (selecting && address == (unsigned int)selection)
painter.setPen(selPen);
else
{
if(i==numRows/2)
painter.setPen(currentPen);
else
painter.setPen(bg);
}
painter.setBrush(QBrush(bg));
if (address == debugger->getPC())
{
painter.setBrush(pcBrush);
}
painter.drawRect(16,rowY1,width-16-1,rowY2-rowY1);
painter.setBrush(currentBrush);
QPen textPen(QColor(halfAndHalf(bg.rgba(),0)));
painter.setPen(textPen);
painter.setFont(alignedFont);
painter.drawText(17,rowY1-3+rowHeight,QString("%1").arg(address,8,16,QChar('0')));
painter.setFont(normalFont);
textPen.setColor(QColor(0xFF000000));
painter.setPen(textPen);
if (debugger->isAlive())
{
const char *dizz = debugger->disasm(address, align);
char dis[512];
strcpy(dis, dizz);
char *dis2 = strchr(dis,'\t');
char desc[256]="";
if (dis2)
{
*dis2=0;
dis2++;
const char *mojs=strstr(dis2,"->$");
if (mojs)
{
for (int i=0; i<8; i++)
{
bool found=false;
for (int j=0; j<22; j++)
{
if (mojs[i+3]=="0123456789ABCDEFabcdef"[j])
found=true;
}
if (!found)
{
mojs=0;
break;
}
}
}
if (mojs)
{
unsigned int offs;
sscanf(mojs+3,"%08x",&offs);
branches[numBranches].src=rowY1 + rowHeight/2;
branches[numBranches].srcAddr=address/align;
branches[numBranches].dst=(int)(rowY1+((s64)offs-(s64)address)*rowHeight/align + rowHeight/2);
branches[numBranches].conditional = (dis[1]!=0); //unconditional 'b' branch
numBranches++;
const char *t = debugger->getDescription(offs).c_str();
if (memcmp(t,"z_",2)==0)
t+=2;
if (memcmp(t,"zz_",3)==0)
t+=3;
sprintf(desc,"-->%s", t);
textPen.setColor(QColor(0xFF600060));
painter.setPen(textPen);
}
else
{
textPen.setColor(QColor(0xFF000000));
painter.setPen(textPen);
}
painter.drawText(149,rowY1-3+rowHeight,QString(dis2));
}
textPen.setColor(QColor(0xFF007000));
painter.setPen(textPen);
painter.setFont(boldFont);
painter.drawText(84,rowY1-3+rowHeight,QString(dis));
painter.setFont(normalFont);
if (desc[0]==0)
{
const char *t = debugger->getDescription(address).c_str();
if (memcmp(t,"z_",2)==0)
t+=2;
if (memcmp(t,"zz_",3)==0)
t+=3;
strcpy(desc,t);
}
if (memcmp(desc,"-->",3) == 0)
{
textPen.setColor(QColor(0xFF0000FF));
painter.setPen(textPen);
}
else
{
textPen.setColor(halfAndHalf(halfAndHalf(bg.rgba(),0),bg.rgba()));
painter.setPen(textPen);
}
if (strlen(desc))
painter.drawText(std::max(280,width/3+190),rowY1-3+rowHeight,QString(desc));
if (debugger->isBreakpoint(address))
{
painter.drawImage(2,rowY1+2,breakPoint);
}
}
}
for (i=0; i<numBranches; i++)
{
painter.setPen(branches[i].conditional ? condPen : currentPen);
int x=280+(branches[i].srcAddr%9)*8;
QPoint curPos(x-2,branches[i].src);
if (branches[i].dst<rect().bottom()+200 && branches[i].dst>-200)
{
painter.drawLine(curPos, QPoint(x+2,branches[i].src));
curPos = QPoint(x+2,branches[i].src);
painter.drawLine(curPos, QPoint(x+2,branches[i].dst));
curPos = QPoint(x+2,branches[i].dst);
painter.drawLine(curPos, QPoint(x-4,branches[i].dst));
curPos = QPoint(x,branches[i].dst-4);
painter.drawLine(curPos, QPoint(x-4,branches[i].dst));
curPos = QPoint(x-4,branches[i].dst);
painter.drawLine(curPos, QPoint(x+1,branches[i].dst+5));
}
else
{
painter.drawLine(curPos, QPoint(x+4,branches[i].src));
}
}
}
int CtrlDisAsmView::yToAddress(int y)
{
//int ydiff=y - rect().bottom()/2;//-rowHeight/2;
int ydiff=(int)(floor((float)y / (float)rowHeight));
ydiff -= (rect().height()/rowHeight)/2;
return curAddress + ydiff *align;
}
-100
View File
@@ -1,100 +0,0 @@
#ifndef CTRLDISASMVIEW_H
#define CTRLDISASMVIEW_H
#include <QWidget>
#include "Core/Debugger/DebugInterface.h"
class Debugger_Disasm;
class CtrlDisAsmView : public QWidget
{
Q_OBJECT
public:
explicit CtrlDisAsmView(QWidget *parent = 0);
void redraw();
void setAlign(int l)
{
align=l;
}
void setParentWindow(Debugger_Disasm* win)
{
parentWindow = win;
}
void setDebugger(DebugInterface *deb)
{
debugger=deb;
curAddress=debugger->getPC();
align=debugger->getInstructionSize(0);
}
DebugInterface *getDebugger()
{
return debugger;
}
void gotoAddr(unsigned int addr)
{
curAddress=addr&(~(align-1));
redraw();
}
void gotoPC()
{
curAddress=debugger->getPC()&(~(align-1));
redraw();
}
unsigned int getSelection()
{
return curAddress;
}
void setShowMode(bool s)
{
showHex=s;
}
void toggleBreakpoint()
{
debugger->toggleBreakpoint(curAddress);
redraw();
}
void contextMenu(const QPoint& pos);
protected:
void paintEvent(QPaintEvent *);
void mousePressEvent(QMouseEvent *e);
void keyPressEvent(QKeyEvent *);
void wheelEvent(QWheelEvent *e);
public slots:
void CopyAddress();
void CopyInstrDisAsm();
void SetNextStatement();
void FollowBranch();
void CopyInstrHex();
void RunToHere();
void ToggleBreakpoint();
void GoToMemoryView();
void RenameFunction();
private:
int yToAddress(int y);
int curAddress;
int align;
int rowHeight;
int selection;
int marker;
int oldSelection;
bool selectionChanged;
bool selecting;
bool hasFocus;
bool showHex;
DebugInterface *debugger;
Debugger_Disasm* parentWindow;
};
#endif // CTRLDISASMVIEW_H
-259
View File
@@ -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;
}
-91
View File
@@ -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
-335
View File
@@ -1,335 +0,0 @@
#include "ctrlregisterlist.h"
#include <QPainter>
#include <QFont>
#include <QKeyEvent>
#include <QScrollBar>
#include <QMenu>
#include <QApplication>
#include <QClipboard>
#include <QInputDialog>
#include "debugger_disasm.h"
CtrlRegisterList::CtrlRegisterList(QWidget *parent) :
QWidget(parent)
{
rowHeight = 14;
selecting=false;
selection=0;
category=0;
showHex=false;
cpu=0;
lastPC = 0;
lastCat0Values = NULL;
changedCat0Regs = NULL;
curVertOffset = 0;
}
CtrlRegisterList::~CtrlRegisterList()
{
if (lastCat0Values != NULL)
delete [] lastCat0Values;
if (changedCat0Regs != NULL)
delete [] changedCat0Regs;
}
void CtrlRegisterList::redraw()
{
update();
}
void CtrlRegisterList::scrollChanged(int action)
{
QScrollBar *bar = findChild<QScrollBar*>("RegListScroll");
switch(action)
{
case QScrollBar::SliderSingleStepAdd:
curVertOffset++;
break;
case QScrollBar::SliderSingleStepSub:
curVertOffset--;
break;
case QScrollBar::SliderPageStepAdd:
curVertOffset+= 4;
break;
case QScrollBar::SliderPageStepSub:
curVertOffset-= 4;
break;
case QScrollBar::SliderMove:
curVertOffset = bar->sliderPosition();
break;
default:
break;
}
redraw();
}
void CtrlRegisterList::keyPressEvent(QKeyEvent *e)
{
switch (e->key())
{
case Qt::Key_Down: selection += 1; break;
case Qt::Key_Up: selection -= 1; break;
case Qt::Key_PageDown: selection += 4; break;
case Qt::Key_PageUp: selection -= 4; break;
default: QWidget::keyPressEvent(e); break;
}
int maxRowsDisplay =rect().bottom()/rowHeight - 1;
curVertOffset = std::min(std::max(curVertOffset, selection-maxRowsDisplay),selection);
update();
}
void CtrlRegisterList::mousePressEvent(QMouseEvent *e)
{
int x = e->pos().x();
int y = e->pos().y();
if (x>16)
{
oldSelection=selection;
if (y>rowHeight)
{
selection=yToIndex(y);
bool oldselecting=selecting;
selecting=true;
if (!oldselecting || (selection!=oldSelection))
redraw();
}
else
{
int lastCat = category;
category = (x*cpu->GetNumCategories())/(rect().width());
if (category<0) category=0;
if (category>=cpu->GetNumCategories())
category=cpu->GetNumCategories()-1;
if (category!=lastCat)
{
curVertOffset = 0;
redraw();
}
}
}
else
{
redraw();
}
}
void CtrlRegisterList::wheelEvent(QWheelEvent* e)
{
int numDegrees = e->delta() / 8;
int numSteps = numDegrees / 15;
if (e->orientation() == Qt::Vertical)
{
curVertOffset -= numSteps;
update();
}
}
void CtrlRegisterList::paintEvent(QPaintEvent *)
{
int numRowsTotal = cpu->GetNumRegsInCategory(category);
int maxRowsDisplay =rect().bottom()/rowHeight - 1;
selection = std::min(std::max(selection,0),numRowsTotal);
curVertOffset = std::max(std::min(curVertOffset,numRowsTotal - maxRowsDisplay),0);
QScrollBar *bar = findChild<QScrollBar*>("RegListScroll");
if(bar)
{
bar->setMinimum(0);
bar->setMaximum(numRowsTotal - maxRowsDisplay);
bar->setPageStep(1);
bar->setValue(curVertOffset);
}
QPainter painter(this);
painter.setBrush(Qt::white);
painter.setPen(Qt::white);
painter.drawRect(rect());
if (!cpu)
return;
QFont normalFont = QFont("Arial", 10);
painter.setFont(normalFont);
int width = rect().width();
QColor bgColor(0xffffff);
QPen nullPen(bgColor);
QPen currentPen(QColor(0xFF000000));
QPen selPen(0x808080);
QPen textPen;
QBrush lbr;
lbr.setColor(bgColor);
QBrush nullBrush(bgColor);
QBrush currentBrush(0xFFEfE8);
QBrush pcBrush(0x70FF70);
int nc = cpu->GetNumCategories();
for (int i=0; i<nc; i++)
{
painter.setPen(i==category?currentPen:nullPen);
painter.setBrush(i==category?pcBrush:nullBrush);
painter.drawRect(width*i/nc,0,width*(i+1)/nc - width*i/nc -1,rowHeight-1);
QString name = cpu->GetCategoryName(i);
painter.setPen(currentPen);
painter.drawText(width*i/nc+1,-3+rowHeight,name);
}
int numRows=rect().bottom()/rowHeight;
for (int i=curVertOffset; i<curVertOffset+numRows; i++)
{
int rowY1 = rowHeight*(i-curVertOffset+1);
int rowY2 = rowHeight*(i-curVertOffset+2)-1;
lbr.setColor(i==selection?0xffeee0:0xffffff);
painter.setBrush(currentBrush);
painter.setPen(nullPen);
painter.drawRect(0,rowY1,16-1,rowY2-rowY1);
if (selecting && i == selection)
painter.setPen(selPen);
else
painter.setPen(nullPen);
QBrush mojsBrush(lbr.color());
painter.setBrush(mojsBrush);
painter.drawRect(16,rowY1,width-16-1,rowY2-rowY1);
// Check for any changes in the registers.
if (lastPC != cpu->GetPC())
{
for (int i = 0, n = cpu->GetNumRegsInCategory(0); i < n; ++i)
{
u32 v = cpu->GetRegValue(0, i);
changedCat0Regs[i] = v != lastCat0Values[i];
lastCat0Values[i] = v;
}
lastPC = cpu->GetPC();
}
painter.setBrush(currentBrush);
if (i<cpu->GetNumRegsInCategory(category))
{
QString regName = cpu->GetRegName(category,i);
textPen.setColor(0x600000);
painter.setPen(textPen);
painter.drawText(17,rowY1-3+rowHeight,regName);
textPen.setColor(0xFF000000);
painter.setPen(textPen);
char temp[256];
cpu->PrintRegValue(category,i,temp);
if (category == 0 && changedCat0Regs[i])
{
textPen.setColor(0x0000FF);
painter.setPen(textPen);
}
else
{
textPen.setColor(0x004000);
painter.setPen(textPen);
}
painter.drawText(77,rowY1-3+rowHeight,temp);
}
}
}
int CtrlRegisterList::yToIndex(int y)
{
int n = (y/rowHeight) - 1 + curVertOffset;
if (n<0) n=0;
return n;
}
void CtrlRegisterList::contextMenu(const QPoint &pos)
{
QMenu menu(this);
QAction *gotoMemory = new QAction(tr("Go to in &memory view"), this);
connect(gotoMemory, SIGNAL(triggered()), this, SLOT(GotoMemory()));
menu.addAction(gotoMemory);
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 *change = new QAction(tr("C&hange..."), this);
connect(change, SIGNAL(triggered()), this, SLOT(Change()));
menu.addAction(change);
menu.exec( mapToGlobal(pos));
}
void CtrlRegisterList::GotoMemory()
{
int cat = category;
int reg = selection;
if (selection >= cpu->GetNumRegsInCategory(cat))
return;
u32 val = cpu->GetRegValue(cat,reg);
parentWindow->ShowMemory(val);
}
void CtrlRegisterList::GotoDisAsm()
{
int cat = category;
int reg = selection;
if (selection >= cpu->GetNumRegsInCategory(cat))
return;
u32 val = cpu->GetRegValue(cat,reg);
emit GotoDisasm(val);
}
void CtrlRegisterList::CopyValue()
{
int cat = category;
int reg = selection;
if (selection >= cpu->GetNumRegsInCategory(cat))
return;
u32 val = cpu->GetRegValue(cat,reg);
QApplication::clipboard()->setText(QString("%1").arg(val,8,16,QChar('0')));
}
void CtrlRegisterList::Change()
{
int cat = category;
int reg = selection;
if (selection >= cpu->GetNumRegsInCategory(cat))
return;
u32 val = cpu->GetRegValue(cat,reg);
bool ok;
QString text = QInputDialog::getText(this, tr("Set new value"),
tr("Set new value:"), QLineEdit::Normal,
QString::number(val), &ok);
if (ok && !text.isEmpty())
{
cpu->SetRegValue(cat,reg,text.toInt());
redraw();
}
}
-77
View File
@@ -1,77 +0,0 @@
#ifndef CTRLREGISTERLIST_H
#define CTRLREGISTERLIST_H
#include <QWidget>
#include "Core/Debugger/DebugInterface.h"
class Debugger_Disasm;
class CtrlRegisterList : public QWidget
{
Q_OBJECT
public:
explicit CtrlRegisterList(QWidget *parent = 0);
void setParentWindow(Debugger_Disasm* win)
{
parentWindow = win;
}
void setCPU(DebugInterface *deb)
{
cpu = deb;
int regs = cpu->GetNumRegsInCategory(0);
lastCat0Values = new u32[regs];
changedCat0Regs = new bool[regs];
memset(lastCat0Values, 0, regs * sizeof(u32));
memset(changedCat0Regs, 0, regs * sizeof(bool));
}
DebugInterface *getCPU()
{
return cpu;
}
~CtrlRegisterList();
void contextMenu(const QPoint &pos);
protected:
void paintEvent(QPaintEvent *);
void keyPressEvent(QKeyEvent *e);
void mousePressEvent(QMouseEvent *e);
void wheelEvent(QWheelEvent *e);
signals:
void GotoDisasm(u32);
public slots:
void redraw();
void scrollChanged(int);
void GotoDisAsm();
void CopyValue();
void Change();
void GotoMemory();
private:
int yToIndex(int y);
int rowHeight;
int selection;
int marker;
int category;
int oldSelection;
bool selectionChanged;
bool selecting;
bool hasFocus;
bool showHex;
DebugInterface *cpu;
int curVertOffset;
u32 lastPC;
u32 *lastCat0Values;
bool *changedCat0Regs;
Debugger_Disasm* parentWindow;
};
#endif // CTRLREGISTERLIST_H
-93
View File
@@ -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();
}
-38
View File
@@ -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
-607
View File
@@ -1,607 +0,0 @@
#include <QMenu>
#include <QTimer>
#include <deque>
#include "debugger_disasm.h"
#include "ui_debugger_disasm.h"
#include "Core/Debugger/DebugInterface.h"
#include "Core/Debugger/SymbolMap.h"
#include "ctrldisasmview.h"
#include "Core/Debugger/Breakpoints.h"
#include "Core/HLE/HLE.h"
#include "Core/CoreTiming.h"
#include "mainwindow.h"
#include "ctrlregisterlist.h"
#include "base/stringutil.h"
#include "Core/Debugger/SymbolMap.h"
#include "GPU/GPUState.h"
#include "GPU/GPUInterface.h"
#include "GPU/GeDisasm.h"
#include "GPU/Common/GPUDebugInterface.h"
#include "Core/Host.h"
Debugger_Disasm::Debugger_Disasm(DebugInterface *_cpu, MainWindow* mainWindow_, QWidget *parent) :
QDialog(parent),
ui(new Ui::Debugger_Disasm),
cpu(_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)));
QObject::connect(ui->RegList,SIGNAL(GotoDisasm(u32)),this,SLOT(Goto(u32)));
QObject::connect(this, SIGNAL(UpdateCallstack_()), this, SLOT(UpdateCallstackGUI()));
QObject::connect(this, SIGNAL(UpdateDisplayList_()), this, SLOT(UpdateDisplayListGUI()));
QObject::connect(this, SIGNAL(UpdateBreakpoints_()), this, SLOT(UpdateBreakpointsGUI()));
QObject::connect(this, SIGNAL(UpdateThread_()), this, SLOT(UpdateThreadGUI()));
CtrlDisAsmView *ptr = ui->DisasmView;
ptr->setDebugger(cpu);
ptr->setParentWindow(this);
ptr->gotoAddr(0x00000000);
CtrlRegisterList *rl = ui->RegList;
rl->setParentWindow(this);
rl->setCPU(cpu);
FillFunctions();
}
Debugger_Disasm::~Debugger_Disasm()
{
delete ui;
}
void Debugger_Disasm::ShowVFPU()
{
vfpudlg->show();
}
void Debugger_Disasm::Update()
{
ui->RegList->redraw();
mainWindow->updateMenus();
UpdateDialog();
}
void Debugger_Disasm::Go()
{
SetDebugMode(false);
Core_EnableStepping(false);
mainWindow->updateMenus();
}
void Debugger_Disasm::Step()
{
Core_DoSingleStep();
_dbg_update_();
}
void Debugger_Disasm::StepOver()
{
SetDebugMode(false);
CBreakPoints::AddBreakPoint(cpu->GetPC()+cpu->getInstructionSize(0),true);
_dbg_update_();
Core_EnableStepping(false);
mainWindow->updateMenus();
}
void Debugger_Disasm::StepHLE()
{
hleDebugBreak();
SetDebugMode(false);
_dbg_update_();
Core_EnableStepping(false);
mainWindow->updateMenus();
}
void Debugger_Disasm::UpdateDialog()
{
if(!isVisible())
return;
ui->DisasmView->setAlign(cpu->getInstructionSize(0));
ui->DisasmView->redraw();
ui->RegList->redraw();
vfpudlg->Update();
UpdateBreakpoints();
UpdateThread();
UpdateDisplayList();
UpdateCallstack();
char tempTicks[24];
sprintf(tempTicks, "%lld", CoreTiming::GetTicks());
ui->debugCount->setText(QString("Ctr : ") + tempTicks);
if(mainWindow->GetDialogMemory())
mainWindow->GetDialogMemory()->Update();
}
void Debugger_Disasm::Stop()
{
SetDebugMode(true);
Core_EnableStepping(true);
_dbg_update_();
mainWindow->updateMenus();
UpdateDialog();
}
void Debugger_Disasm::Skip()
{
CtrlDisAsmView *ptr = ui->DisasmView;
cpu->SetPC(cpu->GetPC() + cpu->getInstructionSize(0));
ptr->gotoPC();
UpdateDialog();
}
void Debugger_Disasm::GotoPC()
{
CtrlDisAsmView *ptr = ui->DisasmView;
ptr->gotoPC();
UpdateDialog();
}
void Debugger_Disasm::GotoLR()
{
CtrlDisAsmView *ptr = ui->DisasmView;
ptr->gotoAddr(cpu->GetLR());
}
void Debugger_Disasm::SetDebugMode(bool _bDebug)
{
if (_bDebug)
{
ui->Go->setEnabled(true);
ui->StepInto->setEnabled(true);
ui->StepOver->setEnabled(false); // Crash, so disable for now
ui->NextHLE->setEnabled(true);
ui->Stop->setEnabled(false);
ui->Skip->setEnabled(true);
CtrlDisAsmView *ptr = ui->DisasmView;
ptr->gotoPC();
UpdateDialog();
}
else
{
ui->Go->setEnabled(false);
ui->StepInto->setEnabled(false);
ui->StepOver->setEnabled(false);
ui->NextHLE->setEnabled(false);
ui->Stop->setEnabled(true);
ui->Skip->setEnabled(false);
CtrlRegisterList *reglist = ui->RegList;
reglist->redraw();
}
}
void Debugger_Disasm::Goto(u32 addr)
{
CtrlDisAsmView *ptr = ui->DisasmView;
ptr->gotoAddr(addr);
ptr->redraw();
}
void Debugger_Disasm::on_GotoPc_clicked()
{
GotoPC();
}
void Debugger_Disasm::on_Go_clicked()
{
Go();
}
void Debugger_Disasm::on_Stop_clicked()
{
Stop();
}
void Debugger_Disasm::on_StepInto_clicked()
{
Step();
}
void Debugger_Disasm::on_StepOver_clicked()
{
StepOver();
}
void Debugger_Disasm::on_Skip_clicked()
{
Skip();
}
void Debugger_Disasm::on_NextHLE_clicked()
{
StepHLE();
}
void Debugger_Disasm::on_GotoLr_clicked()
{
GotoLR();
}
void Debugger_Disasm::on_GotoInt_currentIndexChanged(int index)
{
CtrlDisAsmView *ptr = ui->DisasmView;
u32 addr = ui->GotoInt->itemData(index,Qt::UserRole).toInt();
if (addr != 0xFFFFFFFF)
ptr->gotoAddr(addr);
}
void Debugger_Disasm::on_Address_textChanged(const QString &arg1)
{
CtrlDisAsmView *ptr = ui->DisasmView;
ptr->gotoAddr(parseHex(ui->Address->text().toStdString().c_str()));
UpdateDialog();
}
void Debugger_Disasm::on_DisasmView_customContextMenuRequested(const QPoint &pos)
{
ui->DisasmView->contextMenu(pos);
}
void Debugger_Disasm::NotifyMapLoaded()
{
FillFunctions();
CtrlDisAsmView *ptr = ui->DisasmView;
ptr->redraw();
}
void Debugger_Disasm::on_RegList_customContextMenuRequested(const QPoint &pos)
{
ui->RegList->contextMenu(pos);
}
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();
ui->DisasmView->gotoAddr(addr);
}
void Debugger_Disasm::FillFunctions()
{
QListWidgetItem* item = new QListWidgetItem();
item->setText("(0x02000000)");
item->setData(Qt::UserRole, 0x02000000);
ui->FuncList->addItem(item);
std::vector<SymbolEntry> symbols = g_symbolMap->GetAllSymbols(ST_FUNCTION);
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->FuncList->addItem(item);
}
}
void Debugger_Disasm::UpdateCallstack()
{
emit UpdateCallstack_();
}
void Debugger_Disasm::UpdateCallstackGUI()
{
auto threads = GetThreadsInfo();
u32 entry = 0, stackTop = 0;
for (size_t i = 0; i < threads.size(); i++)
{
if (threads[i].isCurrent)
{
entry = threads[i].entrypoint;
stackTop = threads[i].initialStack;
break;
}
}
if (entry != 0) {
stackTraceModel = MIPSStackWalk::Walk(
cpu->GetPC(),
cpu->GetRegValue(0,MIPS_REG_RA),
cpu->GetRegValue(0,MIPS_REG_SP),
entry,
stackTop);
} else {
stackTraceModel.clear();
}
ui->callStack->clear();
QTreeWidgetItem* item;
for(auto it=stackTraceModel.begin();it!=stackTraceModel.end();it++)
{
item = new QTreeWidgetItem();
item->setText(0,QString("%1").arg(it->pc,8,16,QChar('0')).prepend("0x"));
item->setData(0,Qt::UserRole,it->pc);
item->setText(1,QString("%1").arg(it->entry,8,16,QChar('0')).prepend("0x"));
item->setData(1,Qt::UserRole,it->entry);
item->setText(2,QString("%1").arg(it->sp,8,16,QChar('0')).prepend("0x"));
item->setText(3,QString("%1").arg(it->stackSize,8,16,QChar('0')).prepend("0x"));
ui->callStack->addTopLevelItem(item);
}
}
void Debugger_Disasm::UpdateBreakpoints()
{
emit UpdateBreakpoints_();
}
void Debugger_Disasm::UpdateBreakpointsGUI()
{
u32 curBpAddr = 0;
QTreeWidgetItem* curItem = ui->breakpointsList->currentItem();
if(curItem)
curBpAddr = ui->breakpointsList->currentItem()->data(0,Qt::UserRole).toInt();
ui->breakpointsList->clear();
auto breakpoints = CBreakPoints::GetBreakpoints();
for(size_t i = 0; i < breakpoints.size(); i++)
{
u32 addr_ = breakpoints[i].addr;
if(!CBreakPoints::IsTempBreakPoint(addr_))
{
QTreeWidgetItem* item = new QTreeWidgetItem();
item->setText(0,QString("%1").arg(addr_,8,16,QChar('0')));
item->setData(0,Qt::UserRole,addr_);
ui->breakpointsList->addTopLevelItem(item);
if(curBpAddr == addr_)
ui->breakpointsList->setCurrentItem(item);
}
}
}
void Debugger_Disasm::on_breakpointsList_itemClicked(QTreeWidgetItem *item, int column)
{
ui->DisasmView->gotoAddr(item->data(column,Qt::UserRole).toInt());
}
void Debugger_Disasm::on_breakpointsList_customContextMenuRequested(const QPoint &pos)
{
QTreeWidgetItem* item = ui->breakpointsList->itemAt(pos);
if(item)
{
breakpointAddr = item->data(0,Qt::UserRole).toInt();
QMenu menu(this);
QAction *removeBP = new QAction(tr("Remove breakpoint"), this);
connect(removeBP, SIGNAL(triggered()), this, SLOT(RemoveBreakpoint()));
menu.addAction(removeBP);
menu.exec( ui->breakpointsList->mapToGlobal(pos));
}
}
void Debugger_Disasm::RemoveBreakpoint()
{
CBreakPoints::RemoveBreakPoint(breakpointAddr);
Update();
}
void Debugger_Disasm::on_clearAllBP_clicked()
{
CBreakPoints::ClearAllBreakPoints();
Update();
}
void Debugger_Disasm::UpdateThread()
{
emit UpdateThread_();
}
void Debugger_Disasm::UpdateThreadGUI()
{
ui->threadList->clear();
std::vector<DebugThreadInfo> threads = GetThreadsInfo();
for(size_t i = 0; i < threads.size(); i++)
{
QTreeWidgetItem* item = new QTreeWidgetItem();
item->setText(0,QString::number(threads[i].id));
item->setData(0,Qt::UserRole,threads[i].id);
item->setText(1,threads[i].name);
QString status = "";
if(threads[i].status & THREADSTATUS_RUNNING) status += "Running ";
if(threads[i].status & THREADSTATUS_WAIT) status += "Wait ";
if(threads[i].status & THREADSTATUS_READY) status += "Ready ";
if(threads[i].status & THREADSTATUS_SUSPEND) status += "Suspend ";
if(threads[i].status & THREADSTATUS_DORMANT) status += "Dormant ";
if(threads[i].status & THREADSTATUS_DEAD) status += "Dead ";
item->setText(2,status);
item->setText(3,QString("%1").arg(threads[i].curPC,8,16,QChar('0')));
item->setData(3,Qt::UserRole,threads[i].curPC);
item->setText(4,QString("%1").arg(threads[i].entrypoint,8,16,QChar('0')));
item->setData(4,Qt::UserRole,threads[i].entrypoint);
if(threads[i].isCurrent)
{
for(int j = 0; j < 5; j++)
item->setTextColor(j,Qt::green);
}
ui->threadList->addTopLevelItem(item);
}
for(int i = 0; i < ui->threadList->columnCount(); i++)
ui->threadList->resizeColumnToContents(i);
}
void Debugger_Disasm::on_threadList_itemClicked(QTreeWidgetItem *item, int column)
{
ui->DisasmView->gotoAddr(item->data(3,Qt::UserRole).toInt());
}
void Debugger_Disasm::on_threadList_customContextMenuRequested(const QPoint &pos)
{
QTreeWidgetItem* item = ui->threadList->itemAt(pos);
if(item)
{
threadRowSelected = item;
QMenu menu(this);
QAction *gotoEntryPoint = new QAction(tr("Go to entry point"), this);
connect(gotoEntryPoint, SIGNAL(triggered()), this, SLOT(GotoThreadEntryPoint()));
menu.addAction(gotoEntryPoint);
QMenu* changeStatus = menu.addMenu(tr("Change status"));
QAction *statusRunning = new QAction(tr("Running"), this);
connect(statusRunning, SIGNAL(triggered()), this, SLOT(SetThreadStatusRun()));
changeStatus->addAction(statusRunning);
QAction *statusWait = new QAction(tr("Wait"), this);
connect(statusWait, SIGNAL(triggered()), this, SLOT(SetThreadStatusWait()));
changeStatus->addAction(statusWait);
QAction *statusSuspend = new QAction(tr("Suspend"), this);
connect(statusSuspend, SIGNAL(triggered()), this, SLOT(SetThreadStatusSuspend()));
changeStatus->addAction(statusSuspend);
menu.exec( ui->threadList->mapToGlobal(pos));
}
}
void Debugger_Disasm::GotoThreadEntryPoint()
{
ui->DisasmView->gotoAddr(threadRowSelected->data(4,Qt::UserRole).toInt());
Update();
}
void Debugger_Disasm::SetThreadStatus(ThreadStatus status)
{
__KernelChangeThreadState(threadRowSelected->data(0,Qt::UserRole).toInt(), status);
UpdateThread();
}
void Debugger_Disasm::SetThreadStatusRun()
{
SetThreadStatus(THREADSTATUS_RUNNING);
}
void Debugger_Disasm::SetThreadStatusWait()
{
SetThreadStatus(THREADSTATUS_WAIT);
}
void Debugger_Disasm::SetThreadStatusSuspend()
{
SetThreadStatus(THREADSTATUS_SUSPEND);
}
void Debugger_Disasm::UpdateDisplayList()
{
emit UpdateDisplayList_();
}
void Debugger_Disasm::UpdateDisplayListGUI()
{
u32 curDlId = 0;
QTreeWidgetItem* curItem = ui->displayList->currentItem();
if(curItem)
curDlId = ui->displayList->currentItem()->data(0,Qt::UserRole).toInt();
ui->displayList->clear();
const std::list<int>& dlQueue = gpu->GetDisplayLists();
DisplayList dlist;
DisplayList* dl = &dlist;
if(gpuDebug->GetCurrentDisplayList(dlist))
{
QTreeWidgetItem* item = new QTreeWidgetItem();
item->setText(0,QString::number(dl->id));
item->setData(0, Qt::UserRole, dl->id);
switch(dl->state)
{
case PSP_GE_DL_STATE_NONE: item->setText(1,"None"); break;
case PSP_GE_DL_STATE_QUEUED: item->setText(1,"Queued"); break;
case PSP_GE_DL_STATE_RUNNING: item->setText(1,"Running"); break;
case PSP_GE_DL_STATE_COMPLETED: item->setText(1,"Completed"); break;
case PSP_GE_DL_STATE_PAUSED: item->setText(1,"Paused"); break;
default: break;
}
item->setText(2,QString("%1").arg(dl->startpc,8,16,QChar('0')));
item->setData(2, Qt::UserRole, dl->startpc);
item->setText(3,QString("%1").arg(dl->pc,8,16,QChar('0')));
item->setData(3, Qt::UserRole, dl->pc);
ui->displayList->addTopLevelItem(item);
if(curDlId == (u32)dl->id)
{
ui->displayList->setCurrentItem(item);
displayListRowSelected = item;
}
}
for(auto listIdIt = dlQueue.begin(); listIdIt != dlQueue.end(); ++listIdIt)
{
DisplayList *it = gpu->getList(*listIdIt);
if(dl && it->id == dl->id)
continue;
QTreeWidgetItem* item = new QTreeWidgetItem();
item->setText(0,QString::number(it->id));
item->setData(0, Qt::UserRole, it->id);
switch(it->state)
{
case PSP_GE_DL_STATE_NONE: item->setText(1,"None"); break;
case PSP_GE_DL_STATE_QUEUED: item->setText(1,"Queued"); break;
case PSP_GE_DL_STATE_RUNNING: item->setText(1,"Running"); break;
case PSP_GE_DL_STATE_COMPLETED: item->setText(1,"Completed"); break;
case PSP_GE_DL_STATE_PAUSED: item->setText(1,"Paused"); break;
default: break;
}
item->setText(2,QString("%1").arg(it->startpc,8,16,QChar('0')));
item->setData(2, Qt::UserRole, it->startpc);
item->setText(3,QString("%1").arg(it->pc,8,16,QChar('0')));
item->setData(3, Qt::UserRole, it->pc);
ui->displayList->addTopLevelItem(item);
if(curDlId == (u32)it->id)
{
ui->displayList->setCurrentItem(item);
displayListRowSelected = item;
}
}
for(int i = 0; i < ui->displayList->columnCount(); i++)
ui->displayList->resizeColumnToContents(i);
}
void Debugger_Disasm::on_displayList_customContextMenuRequested(const QPoint &pos)
{
QTreeWidgetItem* item = ui->displayList->itemAt(pos);
if(item)
{
displayListRowSelected = item;
/*QMenu menu(this);
QAction *showCode = new QAction(tr("Show code"), this);
connect(showCode, SIGNAL(triggered()), this, SLOT(ShowDLCode()));
menu.addAction(showCode);*/
//menu.exec( ui->displayList->mapToGlobal(pos));
}
}
-102
View File
@@ -1,102 +0,0 @@
#ifndef DEBUGGER_DISASM_H
#define DEBUGGER_DISASM_H
#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>
#include <vector>
class MainWindow;
namespace Ui {
class Debugger_Disasm;
}
class Debugger_Disasm : public QDialog
{
Q_OBJECT
public:
explicit Debugger_Disasm(DebugInterface *_cpu, MainWindow* mainWindow_, QWidget *parent = 0);
~Debugger_Disasm();
void SetDebugMode(bool _bDebug);
void ShowVFPU();
void Go();
void Step();
void StepOver();
void StepHLE();
void Stop();
void Skip();
void GotoPC();
void GotoLR();
void UpdateDialog();
void NotifyMapLoaded();
void Update();
void ShowMemory(u32 addr);
void FillFunctions();
void UpdateCallstack();
void UpdateBreakpoints();
void UpdateThread();
void UpdateDisplayList();
signals:
void UpdateCallstack_();
void UpdateDisplayList_();
void UpdateBreakpoints_();
void UpdateThread_();
public slots:
void Goto(u32 addr);
void RemoveBreakpoint();
void GotoThreadEntryPoint();
private slots:
void UpdateCallstackGUI();
void UpdateDisplayListGUI();
void UpdateBreakpointsGUI();
void UpdateThreadGUI();
void on_GotoPc_clicked();
void on_Go_clicked();
void on_Stop_clicked();
void on_StepInto_clicked();
void on_StepOver_clicked();
void on_Skip_clicked();
void on_NextHLE_clicked();
void on_GotoLr_clicked();
void on_GotoInt_currentIndexChanged(int index);
void on_Address_textChanged(const QString &arg1);
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);
void on_clearAllBP_clicked();
void on_threadList_itemClicked(QTreeWidgetItem *item, int column);
void on_threadList_customContextMenuRequested(const QPoint &pos);
void SetThreadStatusRun();
void SetThreadStatusWait();
void SetThreadStatusSuspend();
void on_displayList_customContextMenuRequested(const QPoint &pos);
private:
void SetThreadStatus(ThreadStatus status);
Ui::Debugger_Disasm *ui;
DebugInterface* cpu;
MainWindow* mainWindow;
Debugger_VFPU* vfpudlg;
u32 breakpointAddr;
QTreeWidgetItem* threadRowSelected;
QTreeWidgetItem* displayListRowSelected;
std::vector<MIPSStackWalk::StackFrame> stackTraceModel;
};
#endif // DEBUGGER_DISASM_H
-530
View File
@@ -1,530 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>Debugger_Disasm</class>
<widget class="QDialog" name="Debugger_Disasm">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>837</width>
<height>492</height>
</rect>
</property>
<property name="focusPolicy">
<enum>Qt::ClickFocus</enum>
</property>
<property name="windowTitle">
<string comment="Window title">Disassembler</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_7">
<item>
<widget class="QSplitter" name="splitter_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<widget class="QWidget" name="layoutWidget">
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QLabel" name="debugCount">
<property name="text">
<string>Ctr:</string>
</property>
</widget>
</item>
<item>
<widget class="QGroupBox" name="Goto">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>&amp;Go to</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>4</number>
</property>
<property name="topMargin">
<number>4</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QLineEdit" name="Address"/>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<property name="sizeConstraint">
<enum>QLayout::SetDefaultConstraint</enum>
</property>
<item>
<widget class="QPushButton" name="GotoPc">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>&amp;PC</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="GotoLr">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>&amp;LR</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="GotoInt">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="vfpu">
<property name="text">
<string>Show VFPU</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QTabWidget" name="tabWidget">
<property name="currentIndex">
<number>0</number>
</property>
<widget class="QWidget" name="tab">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<attribute name="title">
<string>Regs</string>
</attribute>
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
<widget class="CtrlRegisterList" name="RegList" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="focusPolicy">
<enum>Qt::ClickFocus</enum>
</property>
<property name="contextMenuPolicy">
<enum>Qt::CustomContextMenu</enum>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_6">
<property name="spacing">
<number>0</number>
</property>
<property name="margin">
<number>0</number>
</property>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>120</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QScrollBar" name="RegListScroll">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="tab_2">
<attribute name="title">
<string>Funcs</string>
</attribute>
<layout class="QHBoxLayout" name="horizontalLayout_5">
<item>
<widget class="QListWidget" name="FuncList"/>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="layoutWidget">
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QPushButton" name="Go">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>&amp;Go</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="Stop">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Stop</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="StepInto">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Step &amp;Into</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="StepOver">
<property name="enabled">
<bool>false</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Step &amp;Over</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="Skip">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>S&amp;kip</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="NextHLE">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Next &amp;HLE</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="CtrlDisAsmView" name="DisasmView" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="focusPolicy">
<enum>Qt::ClickFocus</enum>
</property>
<property name="contextMenuPolicy">
<enum>Qt::CustomContextMenu</enum>
</property>
</widget>
</item>
<item>
<widget class="QTabWidget" name="tabWidget_2">
<property name="currentIndex">
<number>0</number>
</property>
<widget class="QWidget" name="breakpointsTab">
<attribute name="title">
<string>Breakpoints</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
<widget class="QTreeWidget" name="breakpointsList">
<property name="contextMenuPolicy">
<enum>Qt::CustomContextMenu</enum>
</property>
<property name="itemsExpandable">
<bool>false</bool>
</property>
<property name="expandsOnDoubleClick">
<bool>false</bool>
</property>
<attribute name="headerDefaultSectionSize">
<number>30</number>
</attribute>
<column>
<property name="text">
<string>Address</string>
</property>
</column>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_8">
<item>
<spacer name="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="clearAllBP">
<property name="text">
<string>Clear All</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<widget class="QWidget" name="callstackTab">
<attribute name="title">
<string>Callstack</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_5">
<item>
<widget class="QTreeWidget" name="callStack">
<property name="columnCount">
<number>4</number>
</property>
<column>
<property name="text">
<string>Address</string>
</property>
</column>
<column>
<property name="text">
<string>Entry Point</string>
</property>
</column>
<column>
<property name="text">
<string>SP</string>
</property>
</column>
<column>
<property name="text">
<string>length</string>
</property>
</column>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="displaylistTab">
<attribute name="title">
<string>Display Lists</string>
</attribute>
<layout class="QHBoxLayout" name="horizontalLayout_10">
<item>
<widget class="QSplitter" name="splitter">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<widget class="QTreeWidget" name="displayList">
<property name="contextMenuPolicy">
<enum>Qt::CustomContextMenu</enum>
</property>
<property name="rootIsDecorated">
<bool>false</bool>
</property>
<property name="itemsExpandable">
<bool>false</bool>
</property>
<property name="expandsOnDoubleClick">
<bool>false</bool>
</property>
<attribute name="headerDefaultSectionSize">
<number>30</number>
</attribute>
<column>
<property name="text">
<string>Id</string>
</property>
</column>
<column>
<property name="text">
<string>Status</string>
</property>
</column>
<column>
<property name="text">
<string>Start Address</string>
</property>
</column>
<column>
<property name="text">
<string>Current Address</string>
</property>
</column>
</widget>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="threadsTab">
<attribute name="title">
<string>Threads</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_7">
<item>
<widget class="QTreeWidget" name="threadList">
<property name="contextMenuPolicy">
<enum>Qt::CustomContextMenu</enum>
</property>
<property name="rootIsDecorated">
<bool>false</bool>
</property>
<property name="itemsExpandable">
<bool>false</bool>
</property>
<property name="expandsOnDoubleClick">
<bool>false</bool>
</property>
<attribute name="headerDefaultSectionSize">
<number>50</number>
</attribute>
<column>
<property name="text">
<string>Id</string>
</property>
</column>
<column>
<property name="text">
<string>Name</string>
</property>
</column>
<column>
<property name="text">
<string>Status</string>
</property>
</column>
<column>
<property name="text">
<string>Current PC</string>
</property>
</column>
<column>
<property name="text">
<string>Entry point</string>
</property>
</column>
</widget>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>CtrlDisAsmView</class>
<extends>QWidget</extends>
<header>ctrldisasmview.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>CtrlRegisterList</class>
<extends>QWidget</extends>
<header>ctrlregisterlist.h</header>
<container>1</container>
</customwidget>
</customwidgets>
<resources/>
<connections/>
</ui>
File diff suppressed because it is too large. Load diff
-104
View File
@@ -1,104 +0,0 @@
#pragma once
#include "Core/Debugger/DebugInterface.h"
#include <QDialog>
#include <QTreeWidgetItem>
#include "GPU/GPUState.h"
#include "thin3d/thin3d.h"
class MainWindow;
namespace Ui {
class Debugger_DisplayList;
}
class DListLine
{
public:
u32 addr;
u32 cmd;
u32 data;
QString comment;
bool implementationNotFinished;
u32 texAddr;
u32 fboAddr;
u32 vtxAddr;
int vtxStart;
int vtxCount;
u32 idxAddr;
int idxStart;
int idxCount;
};
class Debugger_DisplayList : public QDialog
{
Q_OBJECT
public:
Debugger_DisplayList(DebugInterface *_cpu, Draw::DrawContext *draw, MainWindow *mainWindow_, QWidget *parent = 0);
~Debugger_DisplayList();
void UpdateDisplayList();
void ShowDLCode();
void FillDisplayListCmd(std::map<int,DListLine> &data, u32 pc, u32 prev, GPUgstate &state);
void Update();
void UpdateRenderBuffer();
void UpdateRenderBufferList();
void UpdateVertexInfo();
void UpdateIndexInfo();
signals:
void updateDisplayList_();
void updateRenderBufferList_();
void updateRenderBuffer_();
private slots:
void UpdateDisplayListGUI();
void UpdateRenderBufferListGUI();
void UpdateRenderBufferGUI();
void on_displayList_itemClicked(QTreeWidgetItem *item, int column);
void on_stepBtn_clicked();
void on_runBtn_clicked();
void on_stopBtn_clicked();
void on_nextDrawBtn_clicked();
void on_gotoPCBtn_clicked();
void on_texturesList_itemDoubleClicked(QTreeWidgetItem *item, int column);
void on_comboBox_currentIndexChanged(int index);
void on_fboList_itemClicked(QTreeWidgetItem *item, int column);
void on_nextDLBtn_clicked();
void setCurrentFBO(u32 addr);
void on_zoommBtn_clicked();
void on_zoompBtn_clicked();
void on_vertexList_itemClicked(QTreeWidgetItem *item, int column);
void on_pushButton_clicked();
void on_nextIdx_clicked();
void on_indexList_itemClicked(QTreeWidgetItem *item, int column);
void on_displayListData_customContextMenuRequested(const QPoint &pos);
void on_texturesList_customContextMenuRequested(const QPoint &pos);
void RunToDLPC();
void RunToDrawTex();
private:
QString DisassembleOp(u32 pc, u32 op, u32 prev, const GPUgstate &state);
Ui::Debugger_DisplayList *ui;
DebugInterface* cpu;
Draw::DrawContext* draw_;
MainWindow* mainWindow;
QTreeWidgetItem* displayListRowSelected;
QTreeWidgetItem* displayListDataSelected;
QTreeWidgetItem* textureDataSelected;
int currentRenderFrameDisplay;
Draw::Framebuffer *currentTextureDisplay;
float fboZoomFactor;
int maxVtxDisplay;
int maxIdxDisplay;
std::vector<GPUgstate> drawGPUState;
std::map<u32, int> vtxBufferSize;
std::map<u32, int> idxBufferSize;
};
-533
View File
@@ -1,533 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>Debugger_DisplayList</class>
<widget class="QDialog" name="Debugger_DisplayList">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>795</width>
<height>506</height>
</rect>
</property>
<property name="windowTitle">
<string>Dialog</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_7">
<item>
<widget class="QSplitter" name="splitter_5">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<widget class="QSplitter" name="splitter_3">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string>DisplayList</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QTreeWidget" name="displayList">
<property name="contextMenuPolicy">
<enum>Qt::CustomContextMenu</enum>
</property>
<property name="rootIsDecorated">
<bool>false</bool>
</property>
<property name="itemsExpandable">
<bool>false</bool>
</property>
<property name="expandsOnDoubleClick">
<bool>false</bool>
</property>
<attribute name="headerDefaultSectionSize">
<number>30</number>
</attribute>
<column>
<property name="text">
<string>Id</string>
</property>
</column>
<column>
<property name="text">
<string>Status</string>
</property>
</column>
<column>
<property name="text">
<string>Start Address</string>
</property>
</column>
<column>
<property name="text">
<string>Current Address</string>
</property>
</column>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QPushButton" name="runBtn">
<property name="text">
<string>Run</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="stopBtn">
<property name="text">
<string>Stop</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="nextDLBtn">
<property name="text">
<string>Next DL</string>
</property>
</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>
</layout>
</widget>
<widget class="QTabWidget" name="displayListInfo">
<property name="currentIndex">
<number>0</number>
</property>
<widget class="QWidget" name="tab">
<attribute name="title">
<string>Commands</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QTreeWidget" name="displayListData">
<property name="contextMenuPolicy">
<enum>Qt::CustomContextMenu</enum>
</property>
<property name="rootIsDecorated">
<bool>false</bool>
</property>
<property name="itemsExpandable">
<bool>false</bool>
</property>
<property name="expandsOnDoubleClick">
<bool>false</bool>
</property>
<property name="columnCount">
<number>2</number>
</property>
<attribute name="headerVisible">
<bool>false</bool>
</attribute>
<column>
<property name="text">
<string notr="true">1</string>
</property>
</column>
<column>
<property name="text">
<string notr="true">2</string>
</property>
</column>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<widget class="QPushButton" name="stepBtn">
<property name="text">
<string>Step</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="nextDrawBtn">
<property name="text">
<string>Next Draw</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="gotoPCBtn">
<property name="text">
<string>Goto PC</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_2">
<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>
</layout>
</widget>
<widget class="QWidget" name="tab_2">
<attribute name="title">
<string>Textures</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<widget class="QTreeWidget" name="texturesList">
<property name="contextMenuPolicy">
<enum>Qt::CustomContextMenu</enum>
</property>
<column>
<property name="text">
<string>Address</string>
</property>
</column>
<column>
<property name="text">
<string>Width</string>
</property>
</column>
<column>
<property name="text">
<string>Height</string>
</property>
</column>
<column>
<property name="text">
<string>Format</string>
</property>
</column>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="tab_3">
<attribute name="title">
<string>Vertex Buffer</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
<widget class="QTreeWidget" name="vertexList">
<attribute name="headerDefaultSectionSize">
<number>30</number>
</attribute>
<column>
<property name="text">
<string notr="true">Address</string>
</property>
</column>
<column>
<property name="text">
<string>Coord Type</string>
</property>
</column>
<column>
<property name="text">
<string>Number Morph</string>
</property>
</column>
<column>
<property name="text">
<string>Number Weights</string>
</property>
</column>
<column>
<property name="text">
<string>Has Weight</string>
</property>
</column>
<column>
<property name="text">
<string>Has Position</string>
</property>
</column>
<column>
<property name="text">
<string>Has Normal</string>
</property>
</column>
<column>
<property name="text">
<string>Has Color</string>
</property>
</column>
<column>
<property name="text">
<string>Has UV</string>
</property>
</column>
</widget>
</item>
<item>
<widget class="QTreeWidget" name="vertexData">
<attribute name="headerDefaultSectionSize">
<number>30</number>
</attribute>
<column>
<property name="text">
<string notr="true">Idx</string>
</property>
</column>
<column>
<property name="text">
<string>Address</string>
</property>
</column>
<column>
<property name="text">
<string>Values</string>
</property>
</column>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_5">
<item>
<widget class="QPushButton" name="pushButton">
<property name="text">
<string>Next 20</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_4">
<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>
</layout>
</widget>
<widget class="QWidget" name="tab_4">
<attribute name="title">
<string>Index Buffer</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_5">
<item>
<widget class="QSplitter" name="splitter_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<widget class="QTreeWidget" name="indexList">
<column>
<property name="text">
<string notr="true">Address</string>
</property>
</column>
</widget>
<widget class="QTreeWidget" name="indexData">
<attribute name="headerDefaultSectionSize">
<number>30</number>
</attribute>
<column>
<property name="text">
<string>Idx</string>
</property>
</column>
<column>
<property name="text">
<string notr="true">Adress</string>
</property>
</column>
<column>
<property name="text">
<string>Value</string>
</property>
</column>
</widget>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_6">
<item>
<widget class="QPushButton" name="nextIdx">
<property name="text">
<string>Next 20</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_5">
<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>
</layout>
</widget>
</widget>
</widget>
<widget class="QGroupBox" name="groupBox_2">
<property name="title">
<string>Framebuffer</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_6">
<item>
<widget class="QSplitter" name="splitter_4">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<widget class="QTreeWidget" name="fboList">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<column>
<property name="text">
<string>VAddress</string>
</property>
</column>
<column>
<property name="text">
<string>Width</string>
</property>
</column>
<column>
<property name="text">
<string>Height</string>
</property>
</column>
<column>
<property name="text">
<string>Format</string>
</property>
</column>
</widget>
<widget class="QScrollArea" name="fboScroll">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="widgetResizable">
<bool>true</bool>
</property>
<widget class="QWidget" name="scrollAreaWidgetContents">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>375</width>
<height>76</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QLabel" name="fboImg">
<property name="frameShape">
<enum>QFrame::Box</enum>
</property>
<property name="text">
<string/>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>Display : </string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="comboBox">
<item>
<property name="text">
<string>Color</string>
</property>
</item>
<item>
<property name="text">
<string>Depth</string>
</property>
</item>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="zoommBtn">
<property name="text">
<string>Zoom-</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="zoompBtn">
<property name="text">
<string>Zoom+</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>
-89
View File
@@ -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());
}
-45
View File
@@ -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
-92
View File
@@ -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>
-60
View File
@@ -1,60 +0,0 @@
#include "debugger_memorytex.h"
#include "gfx/gl_common.h"
#include "ui_debugger_memorytex.h"
#include "Core/MemMap.h"
#include <QImage>
#include <QTimer>
#include "Core/HLE/sceDisplay.h"
#include "GPU/GPUInterface.h"
#include "base/display.h"
Debugger_MemoryTex::Debugger_MemoryTex(QWidget *parent) :
QDialog(parent),
ui(new Ui::Debugger_MemoryTex)
{
ui->setupUi(this);
}
Debugger_MemoryTex::~Debugger_MemoryTex()
{
delete ui;
}
void Debugger_MemoryTex::ShowTex(const GPUgstate &state)
{
ui->texaddr->setText(QString("%1").arg(state.texaddr[0] & 0xFFFFFF,8,16,QChar('0')));
ui->texbufwidth0->setText(QString("%1").arg(state.texbufwidth[0] & 0xFFFFFF,8,16,QChar('0')));
ui->texformat->setText(QString("%1").arg(state.texformat & 0xFFFFFF,8,16,QChar('0')));
ui->texsize->setText(QString("%1").arg(state.texsize[0] & 0xFFFFFF,8,16,QChar('0')));
ui->texmode->setText(QString("%1").arg(state.texmode & 0xFFFFFF,8,16,QChar('0')));
ui->clutformat->setText(QString("%1").arg(state.clutformat & 0xFFFFFF,8,16,QChar('0')));
ui->clutaddr->setText(QString("%1").arg(state.clutaddr & 0xFFFFFF,8,16,QChar('0')));
ui->clutaddrupper->setText(QString("%1").arg(state.clutaddrupper & 0xFFFFFF,8,16,QChar('0')));
ui->loadclut->setText(QString("%1").arg(state.loadclut & 0xFFFFFF,8,16,QChar('0')));
on_readBtn_clicked();
show();
}
void Debugger_MemoryTex::on_readBtn_clicked()
{
GPUgstate state;
state.texaddr[0] = ui->texaddr->text().toUInt(0,16);
state.texbufwidth[0] = ui->texbufwidth0->text().toUInt(0,16);
state.texformat = ui->texformat->text().toUInt(0,16);
state.texsize[0] = ui->texsize->text().toUInt(0,16);
state.texmode = ui->texmode->text().toUInt(0,16);
state.clutformat = ui->clutformat->text().toUInt(0,16);
state.clutaddr = ui->clutaddr->text().toUInt(0,16);
state.clutaddrupper = ui->clutaddrupper->text().toUInt(0,16);
state.loadclut = ui->loadclut->text().toUInt(0,16);
int bufW = state.texbufwidth[0] & 0x3ff;
int w = 1 << (state.texsize[0] & 0xf);
int h = 1 << ((state.texsize[0]>>8) & 0xf);
w = std::max(bufW,w);
uchar* newData = new uchar[w*h*4];
// TODO: Use GPU_GetCurrentTexture(). Warning: blocks.
delete[] newData;
}
-27
View File
@@ -1,27 +0,0 @@
#ifndef DEBUGGER_MEMORYTEX_H
#define DEBUGGER_MEMORYTEX_H
#include <QDialog>
#include "GPU/GPUState.h"
namespace Ui {
class Debugger_MemoryTex;
}
class Debugger_MemoryTex : public QDialog
{
Q_OBJECT
public:
explicit Debugger_MemoryTex(QWidget *parent = 0);
~Debugger_MemoryTex();
void ShowTex(const GPUgstate& state);
private slots:
void on_readBtn_clicked();
private:
Ui::Debugger_MemoryTex *ui;
};
#endif // DEBUGGER_MEMORYTEX_H
-177
View File
@@ -1,177 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>Debugger_MemoryTex</class>
<widget class="QDialog" name="Debugger_MemoryTex">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>768</width>
<height>546</height>
</rect>
</property>
<property name="windowTitle">
<string>Dialog</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<widget class="QSplitter" name="splitter">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<widget class="QWidget" name="layoutWidget">
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QFormLayout" name="formLayout_2">
<item row="0" column="0">
<widget class="QLabel" name="label_6">
<property name="text">
<string>TexAddr</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_7">
<property name="text">
<string>TexBufWidth0</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_8">
<property name="text">
<string>TexFormat</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_9">
<property name="text">
<string>TexSize</string>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="label_10">
<property name="text">
<string>ClutFormat</string>
</property>
</widget>
</item>
<item row="6" column="0">
<widget class="QLabel" name="label_11">
<property name="text">
<string>ClutAddr</string>
</property>
</widget>
</item>
<item row="7" column="0">
<widget class="QLabel" name="label_12">
<property name="text">
<string>ClutAddrUpper</string>
</property>
</widget>
</item>
<item row="8" column="0">
<widget class="QLabel" name="label_13">
<property name="text">
<string>LoadClut</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="texaddr"/>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="texbufwidth0"/>
</item>
<item row="2" column="1">
<widget class="QLineEdit" name="texformat"/>
</item>
<item row="3" column="1">
<widget class="QLineEdit" name="texsize"/>
</item>
<item row="5" column="1">
<widget class="QLineEdit" name="clutformat"/>
</item>
<item row="6" column="1">
<widget class="QLineEdit" name="clutaddr"/>
</item>
<item row="7" column="1">
<widget class="QLineEdit" name="clutaddrupper"/>
</item>
<item row="8" column="1">
<widget class="QLineEdit" name="loadclut"/>
</item>
<item row="4" column="0">
<widget class="QLabel" name="label_14">
<property name="text">
<string>TexMode</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QLineEdit" name="texmode"/>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QPushButton" name="readBtn">
<property name="text">
<string>Read</string>
</property>
</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>
</layout>
</widget>
<widget class="QScrollArea" name="texture">
<property name="widgetResizable">
<bool>true</bool>
</property>
<widget class="QWidget" name="scrollAreaWidgetContents">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>76</width>
<height>526</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QLabel" name="textureImg">
<property name="frameShape">
<enum>QFrame::Box</enum>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>
-38
View File
@@ -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);
}
-31
View File
@@ -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
-87
View File
@@ -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>
+1 -25
View File
@@ -28,8 +28,6 @@ public:
QtHost(MainWindow *mainWindow_)
{
mainWindow = mainWindow_;
m_GPUStep = false;
m_GPUFlag = 0;
}
virtual void UpdateUI() override {
@@ -37,19 +35,12 @@ public:
}
virtual void UpdateMemView() override {
if(mainWindow->GetDialogMemory())
mainWindow->GetDialogMemory()->Update();
}
virtual void UpdateDisassembly() override {
if(mainWindow->GetDialogDisasm())
mainWindow->GetDialogDisasm()->Update();
if(mainWindow->GetDialogDisplaylist())
mainWindow->GetDialogDisplaylist()->Update();
mainWindow->updateMenus();
}
virtual void SetDebugMode(bool mode) override {
if(mainWindow->GetDialogDisasm())
mainWindow->GetDialogDisasm()->SetDebugMode(mode);
}
virtual bool InitGraphics(std::string *error_message, GraphicsContext **ctx) override { return true; }
@@ -100,24 +91,9 @@ public:
}
bool GPUDebuggingActive() override {
auto dialogDisplayList = mainWindow->GetDialogDisplaylist();
if (dialogDisplayList && dialogDisplayList->isVisible()) {
if (m_GPUStep && m_GPUFlag == -1)
m_GPUFlag = 0;
return true;
}
return false;
}
void SetGPUStep(bool value, int flag = 0, u32 data = 0) {
m_GPUStep = value;
m_GPUFlag = flag;
m_GPUData = data;
}
private:
const char* SymbolMapFilename(std::string currentFilename);
MainWindow* mainWindow;
bool m_GPUStep;
int m_GPUFlag;
u32 m_GPUData;
};
+3 -87
View File
@@ -20,11 +20,7 @@ MainWindow::MainWindow(QWidget *parent, bool fullscreen) :
QMainWindow(parent),
currentLanguage("en"),
nextState(CORE_POWERDOWN),
lastUIState(UISTATE_MENU),
dialogDisasm(0),
memoryWindow(0),
memoryTexWindow(0),
displaylistWindow(0)
lastUIState(UISTATE_MENU)
{
QDesktopWidget *desktop = QApplication::desktop();
int screenNum = QProcessEnvironment::systemEnvironment().value("SDL_VIDEO_FULLSCREEN_HEAD", "0").toInt();
@@ -49,12 +45,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;
@@ -145,19 +135,9 @@ void MainWindow::updateMenus()
void MainWindow::bootDone()
{
dialogDisasm = new Debugger_Disasm(currentDebugMIPS, this, this);
if(g_Config.bShowDebuggerOnLoad)
dialogDisasm->show();
if(g_Config.bFullScreen != isFullScreen())
fullscrAct();
memoryWindow = new Debugger_Memory(currentDebugMIPS, this, this);
memoryTexWindow = new Debugger_MemoryTex(this);
displaylistWindow = new Debugger_DisplayList(currentDebugMIPS, gpu->GetDrawContext(), this, this);
notifyMapsLoaded();
if (nextState == CORE_RUNNING)
runAct();
updateMenus();
@@ -177,17 +157,7 @@ void MainWindow::openAct()
void MainWindow::closeAct()
{
if(dialogDisasm)
dialogDisasm->Stop();
if(dialogDisasm && dialogDisasm->isVisible())
dialogDisasm->close();
if(memoryWindow && memoryWindow->isVisible())
memoryWindow->close();
if(memoryTexWindow && memoryTexWindow->isVisible())
memoryTexWindow->close();
if(displaylistWindow && displaylistWindow->isVisible())
displaylistWindow->close();
updateMenus();
NativeMessageReceived("stop", "");
SetGameTitle("");
@@ -266,17 +236,7 @@ void MainWindow::pauseAct()
void MainWindow::resetAct()
{
if(dialogDisasm)
dialogDisasm->Stop();
if(dialogDisasm)
dialogDisasm->close();
if(memoryWindow)
memoryWindow->close();
if(memoryTexWindow)
memoryTexWindow->close();
if(displaylistWindow)
displaylistWindow->close();
updateMenus();
NativeMessageReceived("reset", "");
}
@@ -302,7 +262,6 @@ void MainWindow::lmapAct()
{
QString fileName = QFileInfo(fileNames[0]).absoluteFilePath();
g_symbolMap->LoadSymbolMap(fileName.toStdString().c_str());
notifyMapsLoaded();
}
}
@@ -325,7 +284,6 @@ void MainWindow::smapAct()
void MainWindow::resetTableAct()
{
g_symbolMap->Clear();
notifyMapsLoaded();
}
void MainWindow::dumpNextAct()
@@ -333,38 +291,13 @@ void MainWindow::dumpNextAct()
gpu->DumpNextFrame();
}
void MainWindow::disasmAct()
{
if(dialogDisasm)
dialogDisasm->show();
}
void MainWindow::dpyListAct()
{
if(displaylistWindow)
displaylistWindow->show();
}
void MainWindow::consoleAct()
{
LogManager::GetInstance()->GetConsoleListener()->Show(LogManager::GetInstance()->GetConsoleListener()->Hidden());
}
void MainWindow::memviewAct()
{
if (memoryWindow)
memoryWindow->show();
}
void MainWindow::memviewTexAct()
{
if(memoryTexWindow)
memoryTexWindow->show();
}
void MainWindow::raiseTopMost()
{
setWindowState( (windowState() & ~Qt::WindowMinimized) | Qt::WindowActive);
raise();
activateWindow();
@@ -537,17 +470,8 @@ void MainWindow::createMenus()
debugMenu->add(new MenuAction(this, SLOT(takeScreen()), QT_TR_NOOP("Take Screenshot"), Qt::Key_F12))
->addDisableState(UISTATE_MENU);
debugMenu->addSeparator();
debugMenu->add(new MenuAction(this, SLOT(disasmAct()), QT_TR_NOOP("Disassembly"), Qt::CTRL + Qt::Key_D))
->addDisableState(UISTATE_MENU);
//commented out until someone bothers to maintain it
//debugMenu->add(new MenuAction(this, SLOT(dpyListAct()), QT_TR_NOOP("Display List...")))
// ->addDisableState(UISTATE_MENU);
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);
// Options
MenuTree* optionsMenu = new MenuTree(this, menuBar(), QT_TR_NOOP("&Options"));
@@ -668,11 +592,3 @@ void MainWindow::createMenus()
retranslate();
}
void MainWindow::notifyMapsLoaded()
{
if (dialogDisasm)
dialogDisasm->NotifyMapLoaded();
if (memoryWindow)
memoryWindow->NotifyMapLoaded();
}
-19
View File
@@ -12,10 +12,6 @@
#include "Core/Core.h"
#include "Core/Config.h"
#include "Core/System.h"
#include "Debugger/debugger_disasm.h"
#include "Debugger/debugger_memory.h"
#include "Debugger/debugger_memorytex.h"
#include "Debugger/debugger_displaylist.h"
#include "Qt/QtMain.h"
extern bool g_TakeScreenshot;
@@ -37,13 +33,8 @@ public:
explicit MainWindow(QWidget *parent = 0, bool fullscreen=false);
~MainWindow() { };
Debugger_Disasm* GetDialogDisasm() { return dialogDisasm; }
Debugger_Memory* GetDialogMemory() { return memoryWindow; }
Debugger_MemoryTex* GetDialogMemoryTex() { return memoryTexWindow; }
Debugger_DisplayList* GetDialogDisplaylist() { return displaylistWindow; }
CoreState GetNextState() { return nextState; }
void ShowMemory(u32 addr);
void updateMenus();
void Notify(MainWindowMsg msg) {
@@ -97,11 +88,7 @@ private slots:
void resetTableAct();
void dumpNextAct();
void takeScreen() { g_TakeScreenshot = true; }
void disasmAct();
void dpyListAct();
void consoleAct();
void memviewAct();
void memviewTexAct();
// Options
// Core
@@ -159,7 +146,6 @@ private:
void SetGameTitle(QString text);
void loadLanguage(const QString &language, bool retranslate);
void createMenus();
void notifyMapsLoaded();
QTranslator translator;
QString currentLanguage;
@@ -167,11 +153,6 @@ private:
CoreState nextState;
GlobalUIState lastUIState;
Debugger_Disasm *dialogDisasm;
Debugger_Memory *memoryWindow;
Debugger_MemoryTex *memoryTexWindow;
Debugger_DisplayList *displaylistWindow;
QActionGroup *anisotropicGroup, *screenGroup, *displayLayoutGroup,
*defaultLogGroup, *g3dLogGroup, *hleLogGroup;
+2 -70
View File
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
@@ -341,60 +341,6 @@
<ForcedIncludeFiles Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
</ForcedIncludeFiles>
</ClCompile>
<ClCompile Include="..\Qt\Debugger\ctrldisasmview.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\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\ctrlregisterlist.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\ctrlvfpuview.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_disasm.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_displaylist.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>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\Qt\Debugger\debugger_vfpu.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\mainwindow.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
@@ -494,15 +440,6 @@
</ClInclude>
<ClInclude Include="..\android\jni\TestRunner.h" />
<ClInclude Include="..\ios\ViewController.h" />
<ClInclude Include="..\Qt\Debugger\ctrldisasmview.h" />
<ClInclude Include="..\Qt\Debugger\ctrlmemview.h" />
<ClInclude Include="..\Qt\Debugger\ctrlregisterlist.h" />
<ClInclude Include="..\Qt\Debugger\ctrlvfpuview.h" />
<ClInclude Include="..\Qt\Debugger\debugger_disasm.h" />
<ClInclude Include="..\Qt\Debugger\debugger_displaylist.h" />
<ClInclude Include="..\Qt\Debugger\debugger_memory.h" />
<ClInclude Include="..\Qt\Debugger\debugger_memorytex.h" />
<ClInclude Include="..\Qt\Debugger\debugger_vfpu.h" />
<ClInclude Include="..\Qt\mainwindow.h" />
<ClInclude Include="GPU\D3D11Context.h" />
<ClInclude Include="GPU\D3D9Context.h" />
@@ -562,11 +499,6 @@
<None Include="..\Qt\assets.qrc" />
<None Include="..\Qt\Common.pro" />
<None Include="..\Qt\Core.pro" />
<None Include="..\Qt\Debugger\debugger_disasm.ui" />
<None Include="..\Qt\Debugger\debugger_displaylist.ui" />
<None Include="..\Qt\Debugger\debugger_memory.ui" />
<None Include="..\Qt\Debugger\debugger_memorytex.ui" />
<None Include="..\Qt\Debugger\debugger_vfpu.ui" />
<None Include="..\Qt\GPU.pro" />
<None Include="..\Qt\Native.pro" />
<None Include="..\Qt\PPSSPP.pro" />
@@ -627,4 +559,4 @@
<UserProperties RESOURCE_FILE="DaSh.rc" />
</VisualStudio>
</ProjectExtensions>
</Project>
</Project>
+2 -68
View File
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Resource Files">
@@ -161,33 +161,6 @@
<ClCompile Include="..\Qt\mainwindow.cpp">
<Filter>Other Platforms\Qt</Filter>
</ClCompile>
<ClCompile Include="..\Qt\Debugger\debugger_disasm.cpp">
<Filter>Other Platforms\Qt\Debugger</Filter>
</ClCompile>
<ClCompile Include="..\Qt\Debugger\debugger_displaylist.cpp">
<Filter>Other Platforms\Qt\Debugger</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\debugger_vfpu.cpp">
<Filter>Other Platforms\Qt\Debugger</Filter>
</ClCompile>
<ClCompile Include="..\Qt\Debugger\ctrldisasmview.cpp">
<Filter>Other Platforms\Qt\Debugger</Filter>
</ClCompile>
<ClCompile Include="..\Qt\Debugger\ctrlmemview.cpp">
<Filter>Other Platforms\Qt\Debugger</Filter>
</ClCompile>
<ClCompile Include="..\Qt\Debugger\ctrlregisterlist.cpp">
<Filter>Other Platforms\Qt\Debugger</Filter>
</ClCompile>
<ClCompile Include="..\Qt\Debugger\ctrlvfpuview.cpp">
<Filter>Other Platforms\Qt\Debugger</Filter>
</ClCompile>
<ClCompile Include="GPU\D3D11Context.cpp">
<Filter>Windows\System</Filter>
</ClCompile>
@@ -341,30 +314,6 @@
<ClInclude Include="..\Qt\Debugger\ctrlvfpuview.h">
<Filter>Other Platforms\Qt\Debugger</Filter>
</ClInclude>
<ClInclude Include="..\Qt\Debugger\debugger_disasm.h">
<Filter>Other Platforms\Qt\Debugger</Filter>
</ClInclude>
<ClInclude Include="..\Qt\Debugger\debugger_displaylist.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\debugger_vfpu.h">
<Filter>Other Platforms\Qt\Debugger</Filter>
</ClInclude>
<ClInclude Include="..\Qt\Debugger\ctrldisasmview.h">
<Filter>Other Platforms\Qt\Debugger</Filter>
</ClInclude>
<ClInclude Include="..\Qt\Debugger\ctrlmemview.h">
<Filter>Other Platforms\Qt\Debugger</Filter>
</ClInclude>
<ClInclude Include="..\Qt\Debugger\ctrlregisterlist.h">
<Filter>Other Platforms\Qt\Debugger</Filter>
</ClInclude>
<ClInclude Include="GPU\D3D11Context.h">
<Filter>Windows\System</Filter>
</ClInclude>
@@ -468,21 +417,6 @@
<None Include="..\Qt\assets.qrc">
<Filter>Other Platforms\Qt</Filter>
</None>
<None Include="..\Qt\Debugger\debugger_disasm.ui">
<Filter>Other Platforms\Qt\Debugger</Filter>
</None>
<None Include="..\Qt\Debugger\debugger_displaylist.ui">
<Filter>Other Platforms\Qt\Debugger</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>
<None Include="..\Qt\Debugger\debugger_vfpu.ui">
<Filter>Other Platforms\Qt\Debugger</Filter>
</None>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="ppsspp.rc">
@@ -494,4 +428,4 @@
<Filter>Resource Files</Filter>
</Image>
</ItemGroup>
</Project>
</Project>