From: Jean-Paul Mari Date: Tue, 25 Sep 2018 22:48:39 +0000 (-0400) Subject: Added a source code files list viewer X-Git-Tag: v2.1.3-R4~27 X-Git-Url: http://git.hcoop.net/clinton/Virtual-Jaguar-Rx.git/commitdiff_plain/6564336c1aab410c2f67c4a2accb948080211201 Added a source code files list viewer --- diff --git a/Win-VS2017/virtualjaguar.vcxproj b/Win-VS2017/virtualjaguar.vcxproj index 000e64b..24f7707 100644 --- a/Win-VS2017/virtualjaguar.vcxproj +++ b/Win-VS2017/virtualjaguar.vcxproj @@ -281,6 +281,7 @@ + @@ -346,6 +347,10 @@ true true + + true + true + true true @@ -517,6 +522,10 @@ true true + + true + true + true true @@ -660,6 +669,24 @@ .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_CRT_SECURE_NO_WARNINGS -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -D__GCCWIN32__ -DQT_NO_DEBUG -DQT_OPENGL_LIB -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB -D_UNICODE "-I." "-I.\..\src" "-I.\..\src\gui" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtOpenGL" "-IC:\SDK\OpenGL\include" "-IC:\SDK\SDL\SDL-1.2.15\include" "-IC:\SDK\DWARF\libdwarf-VS2015\include" "-IC:\SDK\Elf\libelf-0.8.13\include" "-IC:\SDK\zlib\zlib-1.2.11\include" "-I.\GeneratedFiles\$(ConfigurationName)\." + + $(QTDIR)\bin\moc.exe;%(FullPath) + Moc%27ing %(Identity)... + .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -D__GCCWIN32__ -DQT_OPENGL_ES_2 -DQT_OPENGL_ES_2_ANGLE -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB -DQT_OPENGL_LIB "-I." "-I.\..\src" "-I.\..\src\gui" "-I.\..\..\..\Qt\Qt5.5.1\msvc2015_64\include" "-I.\..\..\..\Qt\Qt5.5.1\msvc2015_64\include\QtOpenGL" "-I.\..\..\..\Qt\Qt5.5.1\msvc2015_64\include\QtWidgets" "-I.\..\..\..\Qt\Qt5.5.1\msvc2015_64\include\QtGui" "-I.\..\..\..\Qt\Qt5.5.1\msvc2015_64\include\QtANGLE" "-I.\..\..\..\Qt\Qt5.5.1\msvc2015_64\include\QtCore" "-I.\..\..\..\Qt\Qt5.5.1\msvc2015_64\mkspecs\win32-msvc2015" "-IC:\SDK\SDL-1.2.15\include" "-IC:\SDK\mesa-11.2.0-rc4\include" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtOpenGL" "-I.\GeneratedFiles\$(ConfigurationName)\." + $(QTDIR)\bin\moc.exe;%(FullPath) + Moc%27ing %(Identity)... + .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_CRT_SECURE_NO_WARNINGS -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -D__GCCWIN32__ -DQT_OPENGL_LIB -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB -D_UNICODE "-I." "-I.\..\src" "-I.\..\src\gui" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtOpenGL" "-IC:\SDK\SDL\SDL-1.2.15\include" "-IC:\SDK\DWARF\libdwarf-VS2015\include" "-IC:\SDK\Elf\libelf-0.8.13\include" "-IC:\SDK\zlib\zlib-1.2.8\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-IC:\SDK\OpenGL\include" + $(QTDIR)\bin\moc.exe;%(FullPath) + Moc%27ing %(Identity)... + .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -D__GCCWIN32__ -DQT_NO_DEBUG -DQT_OPENGL_ES_2 -DQT_OPENGL_ES_2_ANGLE -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB -DQT_OPENGL_LIB "-I." "-I.\..\src" "-I.\..\src\gui" "-I.\..\..\..\Qt\Qt5.5.1\msvc2015_64\include" "-I.\..\..\..\Qt\Qt5.5.1\msvc2015_64\include\QtOpenGL" "-I.\..\..\..\Qt\Qt5.5.1\msvc2015_64\include\QtWidgets" "-I.\..\..\..\Qt\Qt5.5.1\msvc2015_64\include\QtGui" "-I.\..\..\..\Qt\Qt5.5.1\msvc2015_64\include\QtANGLE" "-I.\..\..\..\Qt\Qt5.5.1\msvc2015_64\include\QtCore" "-I.\..\..\..\Qt\Qt5.5.1\msvc2015_64\mkspecs\win32-msvc2015" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtOpenGL" "-I.\GeneratedFiles\$(ConfigurationName)\." + $(QTDIR)\bin\moc.exe;%(FullPath) + Moc%27ing %(Identity)... + .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_CRT_SECURE_NO_WARNINGS -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -D__GCCWIN32__ -DQT_NO_DEBUG -DQT_OPENGL_LIB -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB -D_UNICODE "-I." "-I.\..\src" "-I.\..\src\gui" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtOpenGL" "-IC:\SDK\OpenGL\include" "-IC:\SDK\SDL\SDL-1.2.15\include" "-IC:\SDK\DWARF\libdwarf-VS2015\include" "-IC:\SDK\Elf\libelf-0.8.13\include" "-IC:\SDK\zlib\zlib-1.2.11\include" "-I.\GeneratedFiles\$(ConfigurationName)\." + Moc%27ing keybindingstab.h... diff --git a/Win-VS2017/virtualjaguar.vcxproj.filters b/Win-VS2017/virtualjaguar.vcxproj.filters index e10ceb7..909a45c 100644 --- a/Win-VS2017/virtualjaguar.vcxproj.filters +++ b/Win-VS2017/virtualjaguar.vcxproj.filters @@ -403,6 +403,15 @@ Source Files + + Generated Files + + + Generated Files + + + Source Files\debugger + @@ -706,6 +715,9 @@ Header Files\gui\tab + + Header Files\debugger + diff --git a/src/debugger/DBGManager.cpp b/src/debugger/DBGManager.cpp index af92c17..5f9251a 100644 --- a/src/debugger/DBGManager.cpp +++ b/src/debugger/DBGManager.cpp @@ -640,3 +640,30 @@ char *DBGManager_GetLineSrcFromNumLineBaseAdr(size_t Adr, size_t NumLine) return Symbolname; } + +// Get number of source code filenames +size_t DBGManager_GetNbFullSourceFilename(void) +{ + size_t Nbr = 0; + + if ((DBGType & DBG_ELFDWARF)) + { + Nbr = DWARFManager_GetNbFullSourceFilename(); + } + + return Nbr; +} + + +// Get source code filename based on index +char *DBGManager_GetNumFullSourceFilename(size_t Index) +{ + char *FullSourceFilename = NULL; + + if ((DBGType & DBG_ELFDWARF)) + { + FullSourceFilename = DWARFManager_GetNumFullSourceFilename(Index); + } + + return FullSourceFilename; +} diff --git a/src/debugger/DBGManager.h b/src/debugger/DBGManager.h index cafc295..6e61bb9 100644 --- a/src/debugger/DBGManager.h +++ b/src/debugger/DBGManager.h @@ -237,6 +237,8 @@ extern char *DBGManager_GetLineSrcFromNumLineBaseAdr(size_t Adr, size_t NumLine) extern size_t DBGManager_GetAdrFromSymbolName(char *SymbolName); extern char *DBGManager_GetFunctionName(size_t Adr); extern char *DBGManager_GetVariableValueFromAdr(size_t Adr, size_t TypeEncoding, size_t TypeByteSize); +extern size_t DBGManager_GetNbFullSourceFilename(void); +extern char *DBGManager_GetNumFullSourceFilename(size_t Index); // Global variables manager extern size_t DBGManager_GetNbGlobalVariables(void); diff --git a/src/debugger/DWARFManager.cpp b/src/debugger/DWARFManager.cpp index bba80ea..1ee459f 100644 --- a/src/debugger/DWARFManager.cpp +++ b/src/debugger/DWARFManager.cpp @@ -9,8 +9,7 @@ // --- ---------- ------------------------------------------------------------ // JPM 12/03/2016 Created this file // JPM 12/03/2016 DWARF format support -// JPM 09/12/2018 Added LEB128 decoding features -// JPM 09/14/2018 Improve the DWARF parsing information +// JPM Sept./2018 Added LEB128 decoding features, and improve the DWARF parsing information // // To Do @@ -1778,3 +1777,17 @@ char *DWARFManager_GetLineSrcFromNumLineBaseAdr(size_t Adr, size_t NumLine) return NULL; } + +// Get number of source code filenames +size_t DWARFManager_GetNbFullSourceFilename(void) +{ + return NbCU; +} + + +// Get source code filename based on index +char *DWARFManager_GetNumFullSourceFilename(size_t Index) +{ + return (PtrCU[Index].PtrFullFilename); +} + diff --git a/src/debugger/DWARFManager.h b/src/debugger/DWARFManager.h index f7f9744..7b66a74 100644 --- a/src/debugger/DWARFManager.h +++ b/src/debugger/DWARFManager.h @@ -18,6 +18,8 @@ extern char *DWARFManager_GetLineSrcFromAdr(size_t Adr, size_t Tag); extern char *DWARFManager_GetLineSrcFromAdrNumLine(size_t Adr, size_t NumLine); extern char *DWARFManager_GetLineSrcFromNumLineBaseAdr(size_t Adr, size_t NumLine); extern char *DWARFManager_GetFunctionName(size_t Adr); +extern size_t DWARFManager_GetNbFullSourceFilename(void); +extern char *DWARFManager_GetNumFullSourceFilename(size_t Index); // Global variables manager extern size_t DWARFManager_GetNbGlobalVariables(void); diff --git a/src/debugger/FilesrcListWin.cpp b/src/debugger/FilesrcListWin.cpp new file mode 100644 index 0000000..8554c0f --- /dev/null +++ b/src/debugger/FilesrcListWin.cpp @@ -0,0 +1,180 @@ +// +// FilesrcListWin.cpp - List all source code filenames +// +// by Jean-Paul Mari +// +// JPM = Jean-Paul Mari +// +// Who When What +// --- ---------- ----------------------------------------------------------- +// JPM 09/23/2018 Created this file +// + +// STILL TO DO: +// Remove the 1st information, named '1', at the top +// To allow source code file opening / viewing +// + +#include "debugger/FilesrcListWin.h" +//#include "memory.h" +#include "debugger/DBGManager.h" + + +// +FilesrcListWindow::FilesrcListWindow(QWidget * parent/*= 0*/) : QWidget(parent, Qt::Dialog), +layout(new QVBoxLayout), +treeView(new QTreeView), +standardModel(new QStandardItemModel), +rootNode(new QStandardItem), +filesrcItems(NULL), +statusbar(new QStatusBar), +nbItem(0) +{ + // Setup root + rootNode = standardModel->invisibleRootItem(); + //register the model + treeView->setModel(standardModel); + treeView->expandAll(); + layout->addWidget(treeView); + + // Status bar + layout->addWidget(statusbar); + setLayout(layout); +} + + +// +FilesrcListWindow::~FilesrcListWindow(void) +{ +} + + +// +void FilesrcListWindow::Reset(void) +{ + standardModel->setRowCount(0); + free(filesrcItems); + filesrcItems = NULL; + nbItem = 0; +} + + +// +void FilesrcListWindow::RefreshContents(void) +{ + size_t Error, Nbr; + char msg[1024]; + + if (!filesrcItems) + { + if ((Nbr = UpdateInfos())) + { + sprintf(msg, "%i files found", Nbr); + Error = FSL_NOERROR; + } + else + { + sprintf(msg, "No files found"); + Error = FSL_NOFILESRCLIST; + } + + // Display status bar + if (Error) + { + if ((Error & FSL_WARNING)) + { + statusbar->setStyleSheet("background-color: lightyellow; font: bold"); + } + else + { + statusbar->setStyleSheet("background-color: tomato; font: bold"); + } + } + else + { + statusbar->setStyleSheet("background-color: lightgreen; font: bold"); + } + statusbar->showMessage(QString(msg)); + } +} + + +// +size_t FilesrcListWindow::UpdateInfos(void) +{ + size_t Nbr, i; + + Nbr = DBGManager_GetNbFullSourceFilename(); + + for (i = 0; i < Nbr; i++) + { + AddFilename(DBGManager_GetNumFullSourceFilename(i), rootNode, 0); + } + + return Nbr; +} + + +// Add source code filename in the list +void FilesrcListWindow::AddFilename(char *FileName, QStandardItem *root, size_t ItemPos) +{ + char *Ptr = FileName; + Sfilesrcitem *PtrNewFilesrc; + char Buffer[255]; + char a; + +#ifdef _MSC_VER + while ((a = *Ptr++) && (a != '\\')); +#else + while ((a = *Ptr++) && (a != '/')); +#endif + if (a) + { + strncpy(Buffer, FileName, (Ptr - FileName - 1)); + Buffer[(Ptr - FileName - 1)] = 0; + } + else + { + strcpy(Buffer, FileName); + } + PtrNewFilesrc = (Sfilesrcitem *)AddItem(Buffer, ItemPos); + if (!PtrNewFilesrc->PreviousItem) + { + PtrNewFilesrc->PreviousItem = root; + root->appendRow(PtrNewFilesrc->Item); + PtrNewFilesrc->Item->setEditable(false); + } + + if (a) + { + return (AddFilename(Ptr, PtrNewFilesrc->Item, (ItemPos + 1))); + } +} + + +// Add item to the list +// Return void * on new item or already existing one +void *FilesrcListWindow::AddItem(char *ItemName, size_t ItemPos) +{ + Sfilesrcitem *Ptr = filesrcItems; + + // Look for already existing item + for (size_t i = 0; i < nbItem; i++) + { + if ((Ptr->column == ItemPos) && !strcmp(Ptr->Item->text().toLocal8Bit().constData(), ItemName)) + { + return Ptr; + } + else + { + Ptr++; + } + } + + // Add item in the list + filesrcItems = (Sfilesrcitem *)realloc(filesrcItems, (sizeof(Sfilesrcitem) * ++nbItem)); + (filesrcItems + (nbItem - 1))->column = ItemPos; + (filesrcItems + (nbItem - 1))->PreviousItem = NULL; + (filesrcItems + (nbItem - 1))->Item = new QStandardItem(ItemName); + return (filesrcItems + (nbItem - 1)); +} diff --git a/src/debugger/FilesrcListWin.h b/src/debugger/FilesrcListWin.h new file mode 100644 index 0000000..7ddc938 --- /dev/null +++ b/src/debugger/FilesrcListWin.h @@ -0,0 +1,55 @@ +// +// FilesrcListWin.h: List all source code filenames +// +// by Jean-Paul Mari +// + +#ifndef __FILESRCLISTWIN_H__ +#define __FILESRCLISTWIN_H__ + +#include +#include + +// Error code definitions +#define FSL_NOERROR 0x00 +#define FSL_ERROR 0x80 +#define FSL_WARNING 0x40 +#define FSL_NOFILESRCLIST (0x01 | FSL_WARNING) + + +// +class FilesrcListWindow: public QWidget +{ + Q_OBJECT + + typedef struct _filesrcitem + { + size_t column; + QStandardItem *PreviousItem; + QStandardItem *Item; + }Sfilesrcitem; + + public: + FilesrcListWindow(QWidget *parent = 0); + ~FilesrcListWindow(void); + void RefreshContents(void); + void Reset(void); + + public slots: + + protected: + void *AddItem(char *ItemName, size_t ItemPos); + void AddFilename(char *FileName, QStandardItem *root, size_t ItemPos); + size_t UpdateInfos(void); + + private: + size_t nbItem; + QVBoxLayout *layout; + QTreeView *treeView; + QStandardItemModel *standardModel; + QStandardItem *rootNode; + Sfilesrcitem *filesrcItems; + QStatusBar *statusbar; +}; + +#endif // __FILESRCLISTWIN_H__ diff --git a/src/gui/mainwin.cpp b/src/gui/mainwin.cpp index cd312dc..ad3a838 100644 --- a/src/gui/mainwin.cpp +++ b/src/gui/mainwin.cpp @@ -11,25 +11,15 @@ // JLH 12/23/2009 Created this file // JLH 12/20/2010 Added settings, menus & toolbars // JLH 07/05/2011 Added CD BIOS functionality to GUI -// JPM 06/06/2016 Visual Studio support -// JPM 06/19/2016 Soft debugger integration +// JPM June/2016 Visual Studio support & Soft debugger integration // JPM 01/11/2017 Added stack browser -// JPM 01/02/2017 Added GPU disassembly -// JPM 02/02/2017 Added DSP disassembly +// JPM Feb./2017 Added GPU/DSP disassembly // JPM 07/12/2017 Added all Watch window -// JPM 08/01/2017 Added heap allocator window -// JPM 08/07/2017 Added memories window -// JPM 08/10/2017 Added a restart feature -// JPM 08/31/2017 Added breakpoints window [Not Supported] -// JPM 09/01/2017 Save position & visibility windows status in the settings -// JPM 09/02/2017 Save size windows in the settings -// JPM 09/05/2017 Added Exception Vector Table window -// JPM 09/06/2017 Added the 'Rx' word to the emulator window name -// JPM 09/12/2017 Added the keybindings in the settings +// JPM Aug./2017 Added heap allocator and memories window, a restart feature, and a [Not Supported] breakpoints window +// JPM Sept./2017 Save position, size & visibility windows status in the settings; added Exception Vector Table window, the 'Rx' word to the emulator window name, and the keybindings in the settings // JPM 11/04/2017 Added the local window // JPM 08/31/2018 Added the call stack window -// JPM 09/04/2018 Added the new Models and BIOS handler -// JPM 09/17/2018 Added a screenshot feature +// JPM Sept./2018 Added the new Models and BIOS handler, a screenshot feature and source code files browsing // // FIXED: @@ -94,12 +84,13 @@ #include "m68000/m68kinterface.h" //#include "debugger/VideoWin.h" -#include "debugger/DasmWin.h" +//#include "debugger/DasmWin.h" #include "debugger/m68KDasmWin.h" #include "debugger/GPUDasmWin.h" #include "debugger/DSPDasmWin.h" #include "debugger/memory1browser.h" -#include "debugger/brkWin.h" +//#include "debugger/brkWin.h" +#include "debugger/FilesrcListWin.h" #include "debugger/exceptionvectortablebrowser.h" #include "debugger/allwatchbrowser.h" #include "debugger/localbrowser.h" @@ -197,11 +188,11 @@ MainWin::MainWin(bool autoRun): running(true), powerButtonOn(false), //VideoOutputWin = new VideoOutputWindow(this); //VideoOutputWin->setCentralWidget() //DasmWin = new DasmWindow(); - DasmWin = new DasmWindow(this); + //DasmWin = new DasmWindow(this); allWatchBrowseWin = new AllWatchBrowserWindow(this); LocalBrowseWin = new LocalBrowserWindow(this); heapallocatorBrowseWin = new HeapAllocatorBrowserWindow(this); - brkWin = new BrkWindow(this); + //brkWin = new BrkWindow(this); exceptionvectortableBrowseWin = new ExceptionVectorTableBrowserWindow(this); CallStackBrowseWin = new CallStackBrowserWindow(this); @@ -216,21 +207,30 @@ MainWin::MainWin(bool autoRun): running(true), powerButtonOn(false), mem1BrowseWin[i] = new Memory1BrowserWindow(this); } + // Setup dock to display source code filenames tree + QDockWidget *dockFiles = new QDockWidget(tr("Files"), this); + dockFiles->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea); + dockFiles->hide(); + addDockWidget(Qt::LeftDockWidgetArea, dockFiles); + mainWindowCentrale->addAction(dockFiles->toggleViewAction()); + dockFiles->setWidget(FilesrcListWin = new FilesrcListWindow(this)); +#if 0 + // Setup dock to display disassembly + QDockWidget *dockDisasm = new QDockWidget(tr("Disassembly"), this); + dockDisasm->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea); + addDockWidget(Qt::RightDockWidgetArea, dockDisasm); + mainWindowCentrale->addAction(dockDisasm->toggleViewAction()); + dockDisasm->setWidget(dasmtabWidget = new QTabWidget(this)); +#else dasmtabWidget = new QTabWidget(this); +#endif + // Setup disasm tabs dasmtabWidget->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); dasmtabWidget->addTab(m68kDasmWin = new m68KDasmWindow(this), tr("M68000")); dasmtabWidget->addTab(GPUDasmWin = new GPUDasmWindow(this), tr("GPU")); dasmtabWidget->addTab(DSPDasmWin = new DSPDasmWindow(this), tr("DSP")); - ////dasmtabWidget->addTab(m68kDasmBrowseWin, tr("M68000")); +#if 1 setCentralWidget(dasmtabWidget); - -#if 0 - QDockWidget *shapesDockWidget = new QDockWidget(tr("Shapes")); - shapesDockWidget->setObjectName("shapesDockWidget"); - shapesDockWidget->setWidget(m68kDasmWin); - //shapesDockWidget->setWidget(treeWidget); - shapesDockWidget->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea); - addDockWidget(Qt::LeftDockWidgetArea, shapesDockWidget); #endif } @@ -484,13 +484,13 @@ MainWin::MainWin(bool autoRun): running(true), powerButtonOn(false), if (vjs.softTypeDebugger) { - VideoOutputAct = new QAction(tr("Output Video"), this); - VideoOutputAct->setStatusTip(tr("Shows the output video window")); - connect(VideoOutputAct, SIGNAL(triggered()), this, SLOT(ShowVideoOutputWin())); + //VideoOutputAct = new QAction(tr("Output Video"), this); + //VideoOutputAct->setStatusTip(tr("Shows the output video window")); + //connect(VideoOutputAct, SIGNAL(triggered()), this, SLOT(ShowVideoOutputWin())); - DasmAct = new QAction(tr("Disassembly"), this); - DasmAct->setStatusTip(tr("Shows the disassembly window")); - connect(DasmAct, SIGNAL(triggered()), this, SLOT(ShowDasmWin())); + //DasmAct = new QAction(tr("Disassembly"), this); + //DasmAct->setStatusTip(tr("Shows the disassembly window")); + //connect(DasmAct, SIGNAL(triggered()), this, SLOT(ShowDasmWin())); } // Misc. connections... @@ -580,7 +580,7 @@ MainWin::MainWin(bool autoRun): running(true), powerButtonOn(false), // Create toolbars - toolbar = addToolBar(tr("Stuff")); + toolbar = addToolBar(tr("System")); toolbar->addAction(powerAct); if (!vjs.softTypeDebugger) { @@ -1093,7 +1093,7 @@ static uint32_t refresh = 0; { if (refresh == vjs.refresh) { - RefreshAlpineWindows(); + AlpineRefreshWindows(); //memBrowseWin->RefreshContents(); //cpuBrowseWin->RefreshContents(); refresh = 0; @@ -1440,8 +1440,8 @@ void MainWin::ToggleCDUsage(void) // void MainWin::NewBreakpointFunction(void) { - brkWin->show(); - brkWin->RefreshContents(); + //brkWin->show(); + //brkWin->RefreshContents(); } @@ -1674,13 +1674,18 @@ void MainWin::ShowRISCDasmBrowserWin(void) } +// +#if 0 void MainWin::ShowDasmWin(void) { - DasmWin->show(); +// DasmWin->show(); // DasmWin->RefreshContents(); } +#endif +// +#if 0 void MainWin::ShowVideoOutputWin(void) { //VideoOutputWindowCentrale = mainWindowCentrale->addSubWindow(videoWidget); @@ -1690,6 +1695,7 @@ void MainWin::ShowVideoOutputWin(void) //VideoOutputWin->show(); //VideoOutputWin->RefreshContents(videoWidget); } +#endif void MainWin::ResizeMainWindow(void) @@ -2176,7 +2182,7 @@ void MainWin::WriteUISettings(void) // Refresh alpine debug windows -void MainWin::RefreshAlpineWindows(void) +void MainWin::AlpineRefreshWindows(void) { cpuBrowseWin->RefreshContents(); memBrowseWin->RefreshContents(); @@ -2193,6 +2199,7 @@ void MainWin::DebuggerResetWindows(void) { if (vjs.softTypeDebugger) { + FilesrcListWin->Reset(); allWatchBrowseWin->Reset(); heapallocatorBrowseWin->Reset(); @@ -2208,6 +2215,7 @@ void MainWin::DebuggerRefreshWindows(void) if (vjs.softTypeDebugger) { + FilesrcListWin->RefreshContents(); m68kDasmWin->RefreshContents(); GPUDasmWin->RefreshContents(); DSPDasmWin->RefreshContents(); @@ -2220,7 +2228,7 @@ void MainWin::DebuggerRefreshWindows(void) mem1BrowseWin[i]->RefreshContents(i); } - RefreshAlpineWindows(); + AlpineRefreshWindows(); } } diff --git a/src/gui/mainwin.h b/src/gui/mainwin.h index ac98b38..bcf12b1 100644 --- a/src/gui/mainwin.h +++ b/src/gui/mainwin.h @@ -16,12 +16,12 @@ // Main windows class GLWidget; -class VideoWindow; +//class VideoWindow; class AboutWindow; class HelpWindow; class FilePickerWindow; //class VideoOutputWindow; -class DasmWindow; +//class DasmWindow; class m68KDasmWindow; class GPUDasmWindow; class DSPDasmWindow; @@ -41,10 +41,12 @@ class LocalBrowserWindow; class CallStackBrowserWindow; class HeapAllocatorBrowserWindow; class Memory1BrowserWindow; -class BrkWindow; +//class BrkWindow; class ExceptionVectorTableBrowserWindow; +class FilesrcListWindow; +// class MainWin: public QMainWindow { // All Qt apps require this macro for signal/slot functionality to work @@ -55,9 +57,9 @@ class MainWin: public QMainWindow MainWin(bool); void LoadFile(QString); void SyncUI(void); - void DebuggerRefreshWindows(void); - void DebuggerResetWindows(void); - void RefreshAlpineWindows(void); + void DebuggerRefreshWindows(void); + void DebuggerResetWindows(void); + void AlpineRefreshWindows(void); protected: void closeEvent(QCloseEvent *); @@ -97,8 +99,8 @@ class MainWin: public QMainWindow void ShowMemory1BrowserWin(int NumWin); void ShowExceptionVectorTableBrowserWin(void); void NewBreakpointFunction(void); - void ShowVideoOutputWin(void); - void ShowDasmWin(void); + //void ShowVideoOutputWin(void); + //void ShowDasmWin(void); // Alpine void ShowMemoryBrowserWin(void); void ShowStackBrowserWin(void); @@ -121,31 +123,32 @@ class MainWin: public QMainWindow GLWidget *videoWidget; QMdiArea *mainWindowCentrale; QMdiSubWindow *VideoOutputWindowCentrale; - AboutWindow * aboutWin; - HelpWindow * helpWin; - FilePickerWindow * filePickWin; - EmuStatusWindow * emuStatusWin; - MemoryBrowserWindow * memBrowseWin; - StackBrowserWindow * stackBrowseWin; - CPUBrowserWindow * cpuBrowseWin; - OPBrowserWindow * opBrowseWin; - M68KDasmBrowserWindow * m68kDasmBrowseWin; - RISCDasmBrowserWindow * riscDasmBrowseWin; - //VideoOutputWindow * VideoOutputWin; + AboutWindow *aboutWin; + HelpWindow *helpWin; + FilePickerWindow *filePickWin; + EmuStatusWindow *emuStatusWin; + MemoryBrowserWindow *memBrowseWin; + StackBrowserWindow *stackBrowseWin; + CPUBrowserWindow *cpuBrowseWin; + OPBrowserWindow *opBrowseWin; + M68KDasmBrowserWindow *m68kDasmBrowseWin; + RISCDasmBrowserWindow *riscDasmBrowseWin; + //VideoOutputWindow *VideoOutputWin; AllWatchBrowserWindow *allWatchBrowseWin; LocalBrowserWindow *LocalBrowseWin; CallStackBrowserWindow *CallStackBrowseWin; ExceptionVectorTableBrowserWindow *exceptionvectortableBrowseWin; HeapAllocatorBrowserWindow *heapallocatorBrowseWin; Memory1BrowserWindow **mem1BrowseWin; - DasmWindow * DasmWin; + //DasmWindow * DasmWin; QTabWidget *dasmtabWidget; //QDockWidget *dasmtabWidget; m68KDasmWindow *m68kDasmWin; GPUDasmWindow *GPUDasmWin; DSPDasmWindow *DSPDasmWin; - BrkWindow *brkWin; - QTimer * timer; + FilesrcListWindow *FilesrcListWin; + //BrkWindow *brkWin; + QTimer *timer; bool running; int zoomLevel; bool powerButtonOn; @@ -204,7 +207,7 @@ class MainWin: public QMainWindow QAction *traceStepIntoAct; QAction *restartAct; QAction * fullScreenAct; - QAction *DasmAct; + //QAction *DasmAct; QAction *screenshotAct;; // Alpine @@ -216,7 +219,7 @@ class MainWin: public QMainWindow QAction *riscDasmBrowseAct; // Debugger - QAction *VideoOutputAct; + //QAction *VideoOutputAct; QAction *heapallocatorBrowseAct; QAction *allWatchBrowseAct; QAction *LocalBrowseAct; diff --git a/virtualjaguar.pro b/virtualjaguar.pro index db75531..7d33423 100644 --- a/virtualjaguar.pro +++ b/virtualjaguar.pro @@ -119,7 +119,8 @@ HEADERS = \ src/debugger/memory1browser.h \ src/debugger/heapallocatorbrowser.h \ src/debugger/brkWin.h \ - src/debugger/VideoWin.h \ + src/debugger/VideoWin.h + src/debugger/FilesrcListWin.h \ src/debugger/callstackbrowser.h \ src/debugger/exceptionvectortablebrowser.h \ src/log.h \ @@ -171,6 +172,7 @@ SOURCES = \ src/debugger/heapallocatorbrowser.cpp \ src/debugger/brkWin.cpp \ src/debugger/VideoWin.cpp \ + src/debugger/FilesrcListWin.cpp \ src/debugger/exceptionvectortablebrowser.cpp \ src/debugger/callstackbrowser.cpp \ src/log.cpp \