From d13ef4cdbed3b3bdcd34b86ff35440a1aba2bed2 Mon Sep 17 00:00:00 2001 From: mjbudd77 Date: Thu, 19 Aug 2021 23:06:54 -0400 Subject: [PATCH] Fix to ensure that Qt hex editor gets updated at each breakpoint. --- src/drivers/Qt/ConsoleDebugger.cpp | 5 +++++ src/drivers/Qt/HexEditor.cpp | 4 ++-- src/drivers/Qt/HexEditor.h | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/drivers/Qt/ConsoleDebugger.cpp b/src/drivers/Qt/ConsoleDebugger.cpp index 6fec0f27..763aaa82 100644 --- a/src/drivers/Qt/ConsoleDebugger.cpp +++ b/src/drivers/Qt/ConsoleDebugger.cpp @@ -2756,6 +2756,9 @@ void ConsoleDebugger::debugStepBackCB(void) fceuWrapperLock(); FCEUD_TraceLoggerBackUpInstruction(); updateWindowData(); + hexEditorUpdateMemoryValues(true); + hexEditorRequestUpdateAll(); + lastBpIdx = BREAK_TYPE_STEP; fceuWrapperUnLock(); } } @@ -4269,6 +4272,8 @@ void FCEUD_DebugBreakpoint( int bpNum ) } } } + hexEditorUpdateMemoryValues(true); + hexEditorRequestUpdateAll(); printf("Breakpoint Hit: %i \n", bpNum ); diff --git a/src/drivers/Qt/HexEditor.cpp b/src/drivers/Qt/HexEditor.cpp index 3a27d941..9aea1ba1 100644 --- a/src/drivers/Qt/HexEditor.cpp +++ b/src/drivers/Qt/HexEditor.cpp @@ -4107,11 +4107,11 @@ int hexEditorOpenFromDebugger( int mode, int addr ) } //---------------------------------------------------------------------------- // This function must be called from within the emulation thread -void hexEditorUpdateMemoryValues(void) +void hexEditorUpdateMemoryValues( bool force ) { std::list ::iterator it; - if ( !memNeedsCheck ) + if ( !memNeedsCheck && !force ) { return; } diff --git a/src/drivers/Qt/HexEditor.h b/src/drivers/Qt/HexEditor.h index a5ab07a5..8016bbd1 100644 --- a/src/drivers/Qt/HexEditor.h +++ b/src/drivers/Qt/HexEditor.h @@ -354,7 +354,7 @@ class HexEditorDialog_t : public QDialog int hexEditorNumWindows(void); void hexEditorRequestUpdateAll(void); -void hexEditorUpdateMemoryValues(void); +void hexEditorUpdateMemoryValues(bool force = false); void hexEditorLoadBookmarks(void); void hexEditorSaveBookmarks(void); int hexEditorOpenFromDebugger( int mode, int addr );