Remove debug symbol save call from load symbols function so that live file edits are not overwriten. Added a save debug symbols debugger menu action so that this can be explicitly performed. Fixes issue #642.

This commit is contained in:
harry 2023-05-15 20:42:17 -04:00
parent 7573f1b7dc
commit 584593816f
3 changed files with 18 additions and 1 deletions

View File

@ -756,7 +756,6 @@ int debugSymbolTable_t::loadGameSymbols(void)
{
int nPages, pageSize, romSize = 0x10000;
this->save();
this->clear();
if ( GameInfo != nullptr )

View File

@ -879,6 +879,16 @@ QMenuBar *ConsoleDebugger::buildMenuBar(void)
symMenu->addAction(act);
// Symbols -> Save
act = new QAction(tr("&Save"), this);
//act->setShortcut(QKeySequence( tr("F7") ) );
act->setStatusTip(tr("&Save"));
//act->setCheckable(true);
//act->setChecked( break_on_unlogged_data );
connect( act, SIGNAL(triggered(void)), this, SLOT(saveSymbolsCB(void)) );
symMenu->addAction(act);
symMenu->addSeparator();
// Symbols -> Symbolic Debug
@ -2935,6 +2945,13 @@ void ConsoleDebugger::reloadSymbolsCB(void)
FCEU_WRAPPER_UNLOCK();
}
//----------------------------------------------------------------------------
void ConsoleDebugger::saveSymbolsCB(void)
{
FCEU_WRAPPER_LOCK();
debugSymbolTable.save();
FCEU_WRAPPER_UNLOCK();
}
//----------------------------------------------------------------------------
void ConsoleDebugger::pcSetPlaceTop(void)
{
asmView->setPC_placement( 0 );

View File

@ -632,6 +632,7 @@ class ConsoleDebugger : public QDialog
void resizeToMinimumSizeHint(void);
void resetCountersCB (void);
void reloadSymbolsCB(void);
void saveSymbolsCB(void);
void displayByteCodesCB(bool value);
void displayTraceDataCB(bool value);
void displayROMoffsetCB(bool value);