summaryrefslogtreecommitdiff
path: root/src/citra_qt/callstack.cpp
diff options
context:
space:
mode:
authorGravatar bunnei2014-04-08 19:25:03 -0400
committerGravatar bunnei2014-04-08 19:25:03 -0400
commit63e46abdb8764bc97e91bae862c8d461e61b1965 (patch)
treee73f4aa25d7b4015a265e7bbfb6004dab7561027 /src/citra_qt/callstack.cpp
parentfixed some license headers that I missed (diff)
downloadyuzu-63e46abdb8764bc97e91bae862c8d461e61b1965.tar.gz
yuzu-63e46abdb8764bc97e91bae862c8d461e61b1965.tar.xz
yuzu-63e46abdb8764bc97e91bae862c8d461e61b1965.zip
got rid of 'src' folders in each sub-project
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 @@
1#include <QStandardItemModel>
2#include "callstack.hxx"
3
4//#include "debugger/debugger.h"
5
6GCallstackView::GCallstackView(QWidget* parent): QDockWidget(parent)
7{
8 ui.setupUi(this);
9
10 callstack_model = new QStandardItemModel(this);
11 callstack_model->setColumnCount(3);
12 callstack_model->setHeaderData(0, Qt::Horizontal, "Depth");
13 callstack_model->setHeaderData(1, Qt::Horizontal, "Address");
14 callstack_model->setHeaderData(2, Qt::Horizontal, "Function Name");
15 ui.treeView->setModel(callstack_model);
16
17 // TODO: Make single clicking a callstack entry jump to the corresponding disassembly position
18}
19
20void GCallstackView::OnCPUStepped()
21{
22 /*
23 Debugger::Callstack callstack;
24 Debugger::GetCallstack(callstack);
25 callstack_model->setRowCount(callstack.size());
26
27 for (int i = 0; i < callstack.size(); ++i)
28 for (Debugger::CallstackIterator it = callstack.begin(); it != callstack.end(); ++it)
29 {
30 Debugger::CallstackEntry entry = callstack[i];
31 callstack_model->setItem(i, 0, new QStandardItem(QString("%1").arg(i+1)));
32 callstack_model->setItem(i, 1, new QStandardItem(QString("0x%1").arg(entry.addr, 8, 16, QLatin1Char('0'))));
33 callstack_model->setItem(i, 2, new QStandardItem(QString::fromStdString(entry.name)));
34 }
35 */
36} \ No newline at end of file