summaryrefslogtreecommitdiffstats
path: root/src/citra_qt/callstack.cpp
diff options
context:
space:
mode:
authorbunnei <ericbunnie@gmail.com>2014-04-09 01:25:03 +0200
committerbunnei <ericbunnie@gmail.com>2014-04-09 01:25:03 +0200
commit63e46abdb8764bc97e91bae862c8d461e61b1965 (patch)
treee73f4aa25d7b4015a265e7bbfb6004dab7561027 /src/citra_qt/callstack.cpp
parentfixed some license headers that I missed (diff)
downloadyuzu-63e46abdb8764bc97e91bae862c8d461e61b1965.tar
yuzu-63e46abdb8764bc97e91bae862c8d461e61b1965.tar.gz
yuzu-63e46abdb8764bc97e91bae862c8d461e61b1965.tar.bz2
yuzu-63e46abdb8764bc97e91bae862c8d461e61b1965.tar.lz
yuzu-63e46abdb8764bc97e91bae862c8d461e61b1965.tar.xz
yuzu-63e46abdb8764bc97e91bae862c8d461e61b1965.tar.zst
yuzu-63e46abdb8764bc97e91bae862c8d461e61b1965.zip
Diffstat (limited to 'src/citra_qt/callstack.cpp')
-rw-r--r--src/citra_qt/callstack.cpp36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/citra_qt/callstack.cpp b/src/citra_qt/callstack.cpp
new file mode 100644
index 000000000..2d62cb0d0
--- /dev/null
+++ b/src/citra_qt/callstack.cpp
@@ -0,0 +1,36 @@
+#include <QStandardItemModel>
+#include "callstack.hxx"
+
+//#include "debugger/debugger.h"
+
+GCallstackView::GCallstackView(QWidget* parent): QDockWidget(parent)
+{
+ ui.setupUi(this);
+
+ callstack_model = new QStandardItemModel(this);
+ callstack_model->setColumnCount(3);
+ callstack_model->setHeaderData(0, Qt::Horizontal, "Depth");
+ callstack_model->setHeaderData(1, Qt::Horizontal, "Address");
+ callstack_model->setHeaderData(2, Qt::Horizontal, "Function Name");
+ ui.treeView->setModel(callstack_model);
+
+ // TODO: Make single clicking a callstack entry jump to the corresponding disassembly position
+}
+
+void GCallstackView::OnCPUStepped()
+{
+ /*
+ Debugger::Callstack callstack;
+ Debugger::GetCallstack(callstack);
+ callstack_model->setRowCount(callstack.size());
+
+ for (int i = 0; i < callstack.size(); ++i)
+ for (Debugger::CallstackIterator it = callstack.begin(); it != callstack.end(); ++it)
+ {
+ Debugger::CallstackEntry entry = callstack[i];
+ callstack_model->setItem(i, 0, new QStandardItem(QString("%1").arg(i+1)));
+ callstack_model->setItem(i, 1, new QStandardItem(QString("0x%1").arg(entry.addr, 8, 16, QLatin1Char('0'))));
+ callstack_model->setItem(i, 2, new QStandardItem(QString::fromStdString(entry.name)));
+ }
+ */
+} \ No newline at end of file