Skip to content

Commit 5845938

Browse files
committed
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.
1 parent 7573f1b commit 5845938

File tree

3 files changed

+18
-1
lines changed

3 files changed

+18
-1
lines changed

src/debugsymboltable.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -756,7 +756,6 @@ int debugSymbolTable_t::loadGameSymbols(void)
756756
{
757757
int nPages, pageSize, romSize = 0x10000;
758758

759-
this->save();
760759
this->clear();
761760

762761
if ( GameInfo != nullptr )

src/drivers/Qt/ConsoleDebugger.cpp

+17
Original file line numberDiff line numberDiff line change
@@ -879,6 +879,16 @@ QMenuBar *ConsoleDebugger::buildMenuBar(void)
879879

880880
symMenu->addAction(act);
881881

882+
// Symbols -> Save
883+
act = new QAction(tr("&Save"), this);
884+
//act->setShortcut(QKeySequence( tr("F7") ) );
885+
act->setStatusTip(tr("&Save"));
886+
//act->setCheckable(true);
887+
//act->setChecked( break_on_unlogged_data );
888+
connect( act, SIGNAL(triggered(void)), this, SLOT(saveSymbolsCB(void)) );
889+
890+
symMenu->addAction(act);
891+
882892
symMenu->addSeparator();
883893

884894
// Symbols -> Symbolic Debug
@@ -2935,6 +2945,13 @@ void ConsoleDebugger::reloadSymbolsCB(void)
29352945
FCEU_WRAPPER_UNLOCK();
29362946
}
29372947
//----------------------------------------------------------------------------
2948+
void ConsoleDebugger::saveSymbolsCB(void)
2949+
{
2950+
FCEU_WRAPPER_LOCK();
2951+
debugSymbolTable.save();
2952+
FCEU_WRAPPER_UNLOCK();
2953+
}
2954+
//----------------------------------------------------------------------------
29382955
void ConsoleDebugger::pcSetPlaceTop(void)
29392956
{
29402957
asmView->setPC_placement( 0 );

src/drivers/Qt/ConsoleDebugger.h

+1
Original file line numberDiff line numberDiff line change
@@ -632,6 +632,7 @@ class ConsoleDebugger : public QDialog
632632
void resizeToMinimumSizeHint(void);
633633
void resetCountersCB (void);
634634
void reloadSymbolsCB(void);
635+
void saveSymbolsCB(void);
635636
void displayByteCodesCB(bool value);
636637
void displayTraceDataCB(bool value);
637638
void displayROMoffsetCB(bool value);

0 commit comments

Comments
 (0)