[Debugger] Commands: Update address textbox when address is changed
This commit is contained in:
parent
52c62e5707
commit
26151f1d9e
|
@ -469,11 +469,17 @@ const char* CDebugCommandsView::GetCodeAddressNotes(uint32_t vAddr)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CDebugCommandsView::ShowAddress(uint32_t address, bool top)
|
void CDebugCommandsView::ShowAddress(uint32_t address, bool top, bool bUserInput)
|
||||||
{
|
{
|
||||||
if (top == TRUE)
|
if (top == TRUE)
|
||||||
{
|
{
|
||||||
m_StartAddress = address;
|
m_StartAddress = address - address % 4;
|
||||||
|
|
||||||
|
if (!bUserInput)
|
||||||
|
{
|
||||||
|
m_bIgnoreAddrChange = true;
|
||||||
|
m_AddressEdit.SetValue(address, false, true);
|
||||||
|
}
|
||||||
|
|
||||||
if (!isStepping())
|
if (!isStepping())
|
||||||
{
|
{
|
||||||
|
@ -494,7 +500,7 @@ void CDebugCommandsView::ShowAddress(uint32_t address, bool top)
|
||||||
|
|
||||||
if (bOutOfView)
|
if (bOutOfView)
|
||||||
{
|
{
|
||||||
m_StartAddress = address;
|
m_StartAddress = address - address % 4;
|
||||||
m_bIgnoreAddrChange = true;
|
m_bIgnoreAddrChange = true;
|
||||||
m_AddressEdit.SetValue(address, false, true);
|
m_AddressEdit.SetValue(address, false, true);
|
||||||
}
|
}
|
||||||
|
@ -1246,17 +1252,6 @@ LRESULT CDebugCommandsView::OnPopupmenuClearBP(WORD /*wNotifyCode*/, WORD /*wID*
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CDebugCommandsView::GotoEnteredAddress()
|
|
||||||
{
|
|
||||||
char text[9];
|
|
||||||
|
|
||||||
m_AddressEdit.GetWindowTextA(text, 9);
|
|
||||||
|
|
||||||
DWORD address = strtoul(text, NULL, 16);
|
|
||||||
address = address - address % 4;
|
|
||||||
ShowAddress(address, TRUE);
|
|
||||||
}
|
|
||||||
|
|
||||||
void CDebugCommandsView::BeginOpEdit(uint32_t address)
|
void CDebugCommandsView::BeginOpEdit(uint32_t address)
|
||||||
{
|
{
|
||||||
uint32_t opcode;
|
uint32_t opcode;
|
||||||
|
@ -1310,7 +1305,10 @@ LRESULT CDebugCommandsView::OnAddrChanged(WORD /*wNotifyCode*/, WORD /*wID*/, HW
|
||||||
m_bIgnoreAddrChange = false;
|
m_bIgnoreAddrChange = false;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
GotoEnteredAddress();
|
|
||||||
|
uint32_t address = m_AddressEdit.GetValue();
|
||||||
|
ShowAddress(address, TRUE, TRUE);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -81,7 +81,7 @@ public:
|
||||||
CDebugCommandsView(CDebuggerUI * debugger, SyncEvent &StepEvent);
|
CDebugCommandsView(CDebuggerUI * debugger, SyncEvent &StepEvent);
|
||||||
virtual ~CDebugCommandsView(void);
|
virtual ~CDebugCommandsView(void);
|
||||||
|
|
||||||
void ShowAddress(uint32_t address, bool top);
|
void ShowAddress(uint32_t address, bool top, bool bUserInput = false);
|
||||||
void ShowPIRegTab();
|
void ShowPIRegTab();
|
||||||
|
|
||||||
void Reset();
|
void Reset();
|
||||||
|
@ -217,7 +217,6 @@ private:
|
||||||
void BeginOpEdit(uint32_t address);
|
void BeginOpEdit(uint32_t address);
|
||||||
void EndOpEdit();
|
void EndOpEdit();
|
||||||
|
|
||||||
void GotoEnteredAddress();
|
|
||||||
void RefreshBreakpointList();
|
void RefreshBreakpointList();
|
||||||
void RemoveSelectedBreakpoints();
|
void RemoveSelectedBreakpoints();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue