2 // callstackbrowser.cpp - Call Stack
6 // JPM = Jean-Paul Mari <djipi.mari@gmail.com>
9 // --- ---------- -----------------------------------------------------------
10 // JPM 08/31/2018 Created this file
14 // Better display presentation
15 // To display call function
16 // To use DWARF frame information
19 #include "debugger/callstackbrowser.h"
21 #include "debugger/DBGManager.h"
22 #include "m68000/m68kinterface.h"
26 CallStackBrowserWindow::CallStackBrowserWindow(QWidget
* parent
/*= 0*/) : QWidget(parent
, Qt::Dialog
),
27 layout(new QVBoxLayout
), text(new QTextBrowser
)
29 setWindowTitle(tr("Call Stack"));
31 QFont
fixedFont("Lucida Console", 8, QFont::Normal
);
32 fixedFont
.setStyleHint(QFont::TypeWriter
);
33 text
->setFont(fixedFont
);
36 layout
->addWidget(text
);
41 CallStackBrowserWindow::~CallStackBrowserWindow(void)
47 void CallStackBrowserWindow::RefreshContents(void)
49 unsigned int a6
, Sa6
, ret
;
56 if ((a6
= m68k_get_reg(NULL
, M68K_REG_A6
)) && DBGManager_GetType())
60 a6
= GET32(jaguarMainRAM
, Sa6
);
61 ret
= GET32(jaguarMainRAM
, Sa6
+ 4);
63 sprintf(string
, "0x%06X | Ret: 0x%06X | From: %s - 0x%06X", Sa6
, ret
, (FuncName
= DBGManager_GetFunctionName(ret
)), (unsigned int)DBGManager_GetAdrFromSymbolName(FuncName
));
64 CallStack
+= QString(string
);
67 sprintf(string
, "<br>");
68 CallStack
+= QString(string
);
73 text
->setText(CallStack
);
84 void CallStackBrowserWindow::keyPressEvent(QKeyEvent
* e
)
86 if (e
->key() == Qt::Key_Escape
)