Update debugger UI on the debugger's threads.

This commit is contained in:
Unknown W. Brackets 2013-07-02 22:59:47 -07:00
parent 69d14879b2
commit defe750558
5 changed files with 26 additions and 11 deletions

View File

@ -8,7 +8,9 @@ enum { WM_DEB_RUNTOWPARAM = WM_USER+2,
WM_DEB_REMOVEBREAKPOINT,
WM_DEB_GOTOADDRESSEDIT,
WM_DEB_MAPLOADED,
WM_DEB_TABPRESSED
WM_DEB_TABPRESSED,
WM_DEB_SETDEBUGLPARAM,
WM_DEB_UPDATE,
};
bool executeExpressionWindow(HWND hwnd, DebugInterface* cpu, u32& dest);

View File

@ -784,9 +784,14 @@ BOOL CDisasm::DlgProc(UINT message, WPARAM wParam, LPARAM lParam)
}
break;
case WM_DISASM_SETDEBUG:
case WM_DEB_SETDEBUGLPARAM:
SetDebugMode(lParam != 0);
return TRUE;
case WM_DEB_UPDATE:
Update();
return TRUE;
case WM_DEB_TABPRESSED:
{
HWND bp = GetDlgItem(m_hDlg, IDC_BREAKPOINTLIST);

View File

@ -14,9 +14,6 @@
#include <windows.h>
// Takes lParam for debug mode, zero or non zero.
const int WM_DISASM_SETDEBUG = WM_APP + 0;
class CtrlThreadList;
class CDisasm : public Dialog

View File

@ -177,6 +177,11 @@ BOOL CMemoryDlg::DlgProc(UINT message, WPARAM wParam, LPARAM lParam)
}
break;
}
case WM_DEB_UPDATE:
Update();
return TRUE;
case WM_INITDIALOG:
{
return TRUE;

View File

@ -25,9 +25,10 @@
#include "WndMainWindow.h"
#include "OpenGLBase.h"
#include "../Windows/Debugger/Debugger_Disasm.h"
#include "../Windows/Debugger/Debugger_MemoryDlg.h"
#include "../Core/Debugger/SymbolMap.h"
#include "Windows/Debugger/DebuggerShared.h"
#include "Windows/Debugger/Debugger_Disasm.h"
#include "Windows/Debugger/Debugger_MemoryDlg.h"
#include "Core/Debugger/SymbolMap.h"
#include "main.h"
@ -45,6 +46,11 @@ int MyMix(short *buffer, int numSamples, int bits, int rate, int channels)
}
}
static BOOL PostDialogMessage(Dialog *dialog, UINT message, WPARAM wParam = 0, LPARAM lParam = 0)
{
return PostMessage(dialog->GetDlgHandle(), message, wParam, lParam);
}
bool WindowsHost::InitGL(std::string *error_message)
{
return GL_Init(MainWindow::GetDisplayHWND(), error_message);
@ -112,14 +118,14 @@ void WindowsHost::UpdateMemView()
{
for (int i=0; i<numCPUs; i++)
if (memoryWindow[i])
memoryWindow[i]->Update();
PostDialogMessage(memoryWindow[i], WM_DEB_UPDATE);
}
void WindowsHost::UpdateDisassembly()
{
for (int i=0; i<numCPUs; i++)
if (disasmWindow[i])
disasmWindow[i]->Update();
PostDialogMessage(disasmWindow[i], WM_DEB_UPDATE);
}
void WindowsHost::SetDebugMode(bool mode)
@ -127,7 +133,7 @@ void WindowsHost::SetDebugMode(bool mode)
for (int i = 0; i < numCPUs; i++)
{
if (disasmWindow[i])
PostMessage(disasmWindow[i]->GetDlgHandle(), WM_DISASM_SETDEBUG, 0, (LPARAM)mode);
PostDialogMessage(disasmWindow[i], WM_DEB_SETDEBUGLPARAM, 0, (LPARAM)mode);
}
}