Crash occurs during the reset between an executable without debugging information to one with it.
15) Remove Visual Studio 2015 support
16) Work around fix for a compilation error on Linux
-- EEPROM directory creation allowed only for Windows at the moment
15) Remove Visual Studio 2015 support
16) Work around fix for a compilation error on Linux
-- EEPROM directory creation allowed only for Windows at the moment
-17) Show the SR value as a readable form in the CPU browser
+17) Show the SR value as a readable form in the M68K CPU browser
18) Potential fix to compile on Linux
-- Added the relative directory path for the Qt include files
19) Merge the Linux build fixes from @richard42
18) Potential fix to compile on Linux
-- Added the relative directory path for the Qt include files
19) Merge the Linux build fixes from @richard42
25) Added a #line in the call stack window
26) Add a search feature in the all watches window
27) Added video output display in a specific window
25) Added a #line in the call stack window
26) Add a search feature in the all watches window
27) Added video output display in a specific window
+28) Fixed potential crash with the debugger tabs reset
Release 4a (15th August 2019)
-----------------------------
Release 4a (15th August 2019)
-----------------------------
// Who When What
// --- ---------- -------------------------------------------------------------
// JPM 08/23/2019 Created this file
// Who When What
// --- ---------- -------------------------------------------------------------
// JPM 08/23/2019 Created this file
+// JPM Apr./2021 Fixed potential crash with the tabs reset
+// Use the CloseTab signal's value instead to close the current tab
indexErrorTab(-1),
sourceErrorTab(0)
{
indexErrorTab(-1),
sourceErrorTab(0)
{
sourcestabWidget->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
sourcestabWidget->setTabsClosable(true);
layout->addWidget(sourcestabWidget);
sourcestabWidget->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
sourcestabWidget->setTabsClosable(true);
layout->addWidget(sourcestabWidget);
connect(sourcestabWidget, SIGNAL(currentChanged(const int)), this, SLOT(SelectTab(const int)));
connect(sourcestabWidget, SIGNAL(tabCloseRequested(const int)), this, SLOT(CloseTab(const int)));
}
connect(sourcestabWidget, SIGNAL(currentChanged(const int)), this, SLOT(SelectTab(const int)));
connect(sourcestabWidget, SIGNAL(tabCloseRequested(const int)), this, SLOT(CloseTab(const int)));
}
void SourcesWindow::CloseTab(const int)
{
CloseCurrentTab();
void SourcesWindow::CloseTab(const int)
{
CloseCurrentTab();
// Sources initialisation
// Sources initialisation
+// Prepare tabs for every available source code file
void SourcesWindow::Init(void)
{
size_t i, j;
char *Ptr, *Ptr1;
void SourcesWindow::Init(void)
{
size_t i, j;
char *Ptr, *Ptr1;
- // Get number of sources
+ // get number of sources
NbSourcesInfos = DBGManager_GetNbSources();
if (NbSourcesInfos)
{
NbSourcesInfos = DBGManager_GetNbSources();
if (NbSourcesInfos)
{
- // Alloc structure for the source informations
+ // alloc structure for the source informations
sourcesinfostab = (SourcesInfos *)calloc(NbSourcesInfos, sizeof(SourcesInfos));
sourcesinfostab = (SourcesInfos *)calloc(NbSourcesInfos, sizeof(SourcesInfos));
- // Fill sources information
+ // fill sources information
for (i = 0; i < NbSourcesInfos; i++)
{
for (i = 0; i < NbSourcesInfos; i++)
{
- // Get source filename without misguiding information
+ // get source filename without misguiding information
Ptr = DBGManager_GetNumSourceFilename(i);
Ptr1 = sourcesinfostab[i].Filename = (char *)malloc(strlen(Ptr) + 1);
while (((*Ptr == '.') || ((*Ptr == '/') || (*Ptr == '\\'))) && Ptr++);
strcpy(Ptr1, Ptr);
Ptr = DBGManager_GetNumSourceFilename(i);
Ptr1 = sourcesinfostab[i].Filename = (char *)malloc(strlen(Ptr) + 1);
while (((*Ptr == '.') || ((*Ptr == '/') || (*Ptr == '\\'))) && Ptr++);
strcpy(Ptr1, Ptr);
- // Get texts dedicated information
+ // get texts dedicated information
for (j = 0; j < 2; j++)
{
sourcesinfostab[i].NbLinesText[j] = DBGManager_GetSrcNbListPtrFromIndex(i, j);
}
sourcesinfostab[i].NumLinesUsed = DBGManager_GetSrcNumLinesPtrFromIndex(i, true);
sourcesinfostab[i].SourceText = DBGManager_GetSrcListPtrFromIndex(i, false);
for (j = 0; j < 2; j++)
{
sourcesinfostab[i].NbLinesText[j] = DBGManager_GetSrcNbListPtrFromIndex(i, j);
}
sourcesinfostab[i].NumLinesUsed = DBGManager_GetSrcNumLinesPtrFromIndex(i, true);
sourcesinfostab[i].SourceText = DBGManager_GetSrcListPtrFromIndex(i, false);
- // Get remaining information
+ // get remaining information
sourcesinfostab[i].Language = DBGManager_GetSrcLanguageFromIndex(i);
sourcesinfostab[i].IndexTab = -1;
}
}
sourcesinfostab[i].Language = DBGManager_GetSrcLanguageFromIndex(i);
sourcesinfostab[i].IndexTab = -1;
}
}
+ else
+ {
+ // no source files exist
+ sourcesinfostab = NULL;
+ }
-// Check if line has changed
+// Check if the line's number has changed across the tabs
+// Return true in case of the line is different, otherwise return false
bool SourcesWindow::CheckChangeLine(void)
{
size_t NumLine;
bool SourcesWindow::CheckChangeLine(void)
{
size_t NumLine;
+ // get the line number based on the current M68K PC address
if (NumLine = DBGManager_GetNumLineFromAdr(m68k_get_reg(NULL, M68K_REG_PC), DBG_NO_TAG))
{
if (OldCurrentTab == CurrentTab)
if (NumLine = DBGManager_GetNumLineFromAdr(m68k_get_reg(NULL, M68K_REG_PC), DBG_NO_TAG))
{
if (OldCurrentTab == CurrentTab)
OldCurrentTab = CurrentTab;
OldCurrentNumLineSrc = 0;
}
OldCurrentTab = CurrentTab;
OldCurrentNumLineSrc = 0;
}
+// Refresh tabs
+// Open a new tab for a file source code
+// Set a unique tab for unavailable source code
void SourcesWindow::RefreshContents(void)
{
size_t m68kPC = m68k_get_reg(NULL, M68K_REG_PC);
void SourcesWindow::RefreshContents(void)
{
size_t m68kPC = m68k_get_reg(NULL, M68K_REG_PC);
DBGstatus Status;
char *Filename;
DBGstatus Status;
char *Filename;
+ // check valid M68K PC address
if (m68kPC && NbSourcesInfos)
{
if (m68kPC && NbSourcesInfos)
{
- // Get source filename pointed by PC address
+ // get source filename pointed by PC address
Filename = DBGManager_GetFullSourceFilenameFromAdr(m68kPC, &Status);
if (!Status && Filename)
{
Filename = DBGManager_GetFullSourceFilenameFromAdr(m68kPC, &Status);
if (!Status && Filename)
{
for (i = 0; i < NbSourcesInfos; i++, !index)
{
if (sourcesinfostab[i].Filename)
{
if (strstr(Filename, sourcesinfostab[i].Filename))
{
for (i = 0; i < NbSourcesInfos; i++, !index)
{
if (sourcesinfostab[i].Filename)
{
if (strstr(Filename, sourcesinfostab[i].Filename))
{
- // Open a new tab for a source code
+ // open a new tab for a source code
if (sourcesinfostab[i].IndexTab == -1)
{
sourcesinfostab[i].IndexTab = index = sourcestabWidget->addTab(sourcesinfostab[i].sourceCtab = new(SourceCWindow), tr(sourcesinfostab[i].Filename));
if (sourcesinfostab[i].IndexTab == -1)
{
sourcesinfostab[i].IndexTab = index = sourcestabWidget->addTab(sourcesinfostab[i].sourceCtab = new(SourceCWindow), tr(sourcesinfostab[i].Filename));
- // Source file doesn't exist
+ // source file doesn't exist
if (indexErrorTab == -1)
{
indexErrorTab = sourcestabWidget->addTab(sourceErrorTab = new(SourceCWindow), tr("Source file not available"));
if (indexErrorTab == -1)
{
indexErrorTab = sourcestabWidget->addTab(sourceErrorTab = new(SourceCWindow), tr("Source file not available"));
int Index;
QString t = sourcestabWidget->tabText((Index = sourcestabWidget->currentIndex()));
int Index;
QString t = sourcestabWidget->tabText((Index = sourcestabWidget->currentIndex()));
- // Check error tab presence
+ // check error tab presence
if (indexErrorTab == Index)
{
if (indexErrorTab == Index)
{
indexErrorTab = -1;
}
else
{
indexErrorTab = -1;
}
else
{
- // Close source code text tab
+ // close source code text tab
while ((i < NbSourcesInfos) && strcmp(sourcesinfostab[i++].Filename, t.toLatin1().data()));
sourcesinfostab[(i - 1)].IndexTab = -1;
}
while ((i < NbSourcesInfos) && strcmp(sourcesinfostab[i++].Filename, t.toLatin1().data()));
sourcesinfostab[(i - 1)].IndexTab = -1;
}
void SourcesWindow::keyPressEvent(QKeyEvent * e)
{
void SourcesWindow::keyPressEvent(QKeyEvent * e)
{
- // Close/Remove the current tab
+ // close/remove the current tab
if (e->key() == Qt::Key_Escape)
{
CloseCurrentTab();
if (e->key() == Qt::Key_Escape)
{
CloseCurrentTab();
+// Reset all source files tab
void SourcesWindow::Reset(void)
{
void SourcesWindow::Reset(void)
{
sourcestabWidget->clear();
sourcestabWidget->clear();
- // Clear tab information
+ // clear tab information
while (NbSourcesInfos)
{
free(sourcesinfostab[--NbSourcesInfos].Filename);
while (NbSourcesInfos)
{
free(sourcesinfostab[--NbSourcesInfos].Filename);