Added Qt debugger auto open on game load feature.

This commit is contained in:
Matthew Budd 2020-09-18 06:00:19 -04:00
parent fdd246fcd6
commit dad6ddfe64
4 changed files with 17 additions and 10 deletions

View File

@ -457,7 +457,7 @@ ConsoleDebugger::ConsoleDebugger(QWidget *parent)
connect( debFileChkBox , SIGNAL(stateChanged(int)), this, SLOT(debFileAutoLoadCB(int)) ); connect( debFileChkBox , SIGNAL(stateChanged(int)), this, SLOT(debFileAutoLoadCB(int)) );
button->setEnabled(false); // TODO button->setEnabled(false); // TODO
autoOpenChkBox->setEnabled(false); // TODO //autoOpenChkBox->setEnabled(false); // TODO
//debFileChkBox->setEnabled(false); // TODO //debFileChkBox->setEnabled(false); // TODO
idaFontChkBox->setEnabled(false); // TODO idaFontChkBox->setEnabled(false); // TODO
@ -2176,6 +2176,11 @@ void FCEUD_DebugBreakpoint( int bpNum )
fceuWrapperLock(); fceuWrapperLock();
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
bool debuggerWindowIsOpen(void)
{
return (dbgWinList.size() > 0);
}
//----------------------------------------------------------------------------
static int getGameDebugBreakpointFileName(char *filepath) static int getGameDebugBreakpointFileName(char *filepath)
{ {
int i,j; int i,j;

View File

@ -231,6 +231,7 @@ class ConsoleDebugger : public QDialog
}; };
bool debuggerWindowIsOpen(void);
void saveGameDebugBreakpoints(void); void saveGameDebugBreakpoints(void);
void loadGameDebugBreakpoints(void); void loadGameDebugBreakpoints(void);
void debuggerClearAllBreakpoints(void); void debuggerClearAllBreakpoints(void);

View File

@ -113,6 +113,9 @@ class consoleWin_t : public QMainWindow
private: private:
void createMainMenu(void); void createMainMenu(void);
public slots:
void openDebugWindow(void);
void openHexEditor(void);
private slots: private slots:
void closeApp(void); void closeApp(void);
void openROMFile(void); void openROMFile(void);
@ -156,8 +159,6 @@ class consoleWin_t : public QMainWindow
void fdsEjectDisk(void); void fdsEjectDisk(void);
void fdsLoadBiosFile(void); void fdsLoadBiosFile(void);
void openCheats(void); void openCheats(void);
void openDebugWindow(void);
void openHexEditor(void);
void openMovie(void); void openMovie(void);
void stopMovie(void); void stopMovie(void);
void recordMovie(void); void recordMovie(void);

View File

@ -229,13 +229,6 @@ int LoadGame(const char *path)
return 0; return 0;
} }
g_config->getOption( "SDL.AutoOpenDebugger", &autoOpenDebugger );
if ( autoOpenDebugger )
{
// TODO Auto Open Debugger
}
hexEditorLoadBookmarks(); hexEditorLoadBookmarks();
g_config->getOption( "SDL.AutoLoadDebugFiles", &autoLoadDebug ); g_config->getOption( "SDL.AutoLoadDebugFiles", &autoLoadDebug );
@ -245,6 +238,13 @@ int LoadGame(const char *path)
loadGameDebugBreakpoints(); loadGameDebugBreakpoints();
} }
g_config->getOption( "SDL.AutoOpenDebugger", &autoOpenDebugger );
if ( autoOpenDebugger && !debuggerWindowIsOpen() )
{
consoleWindow->openDebugWindow();
}
debugSymbolTable.loadGameSymbols(); debugSymbolTable.loadGameSymbols();
int state_to_load; int state_to_load;