From: Jean-Paul Mari Date: Tue, 23 Oct 2018 08:43:05 +0000 (-0400) Subject: Added the return address information in the call stack X-Git-Tag: v2.1.3-R4~15 X-Git-Url: http://git.hcoop.net/clinton/Virtual-Jaguar-Rx.git/commitdiff_plain/79a018fa160ead41dc5ea29a3939531f0e4a7e21?ds=sidebyside Added the return address information in the call stack --- diff --git a/src/debugger/callstackbrowser.cpp b/src/debugger/callstackbrowser.cpp index c2d349e..b3d2b47 100644 --- a/src/debugger/callstackbrowser.cpp +++ b/src/debugger/callstackbrowser.cpp @@ -9,7 +9,7 @@ // --- ---------- ----------------------------------------------------------- // JPM 08/31/2018 Created this file // JPM 09/12/2018 Added a status bar and better status report -// +// JPM 10/20/2018 Added the return address information in the call stack // STILL TO DO: // To set the information display at the right @@ -45,9 +45,10 @@ layout(new QVBoxLayout) layout->addWidget(text); #else // Set the new layout with proper identation and readibility - model->setColumnCount(2); + model->setColumnCount(3); model->setHeaderData(0, Qt::Horizontal, QObject::tr("Name")); model->setHeaderData(1, Qt::Horizontal, QObject::tr("Line")); + model->setHeaderData(2, Qt::Horizontal, QObject::tr("Return address")); // Information table TableView->setModel(model); TableView->setEditTriggers(QAbstractItemView::NoEditTriggers); @@ -105,10 +106,12 @@ void CallStackBrowserWindow::RefreshContents(void) } #else model->insertRow(NbRaw); - model->setItem(NbRaw, 0, new QStandardItem(QString("%1").arg((FuncName = DBGManager_GetFunctionName(ret)) ? FuncName : "(null)"))); + model->setItem(NbRaw, 0, new QStandardItem(QString("%1").arg((FuncName = DBGManager_GetFunctionName(ret)) ? FuncName : "(N/A)"))); FunctionName = QString(FuncName = DBGManager_GetLineSrcFromAdr(ret, DBG_NO_TAG)); FunctionName.replace(" ", " "); - model->setItem(NbRaw++, 1, new QStandardItem(QString("%1").arg(FuncName ? FunctionName : "(null)"))); + model->setItem(NbRaw, 1, new QStandardItem(QString("%1").arg(FuncName ? FunctionName : "(N/A)"))); + sprintf(msg, "0x%06X", ret); + model->setItem(NbRaw++, 2, new QStandardItem(QString("%1").arg(msg))); #endif } #ifdef CS_LAYOUTTEXTS