Skip to content

Commit

Permalink
[Debugger] Start commands window at PC address (#2178)
Browse files Browse the repository at this point in the history
  • Loading branch information
shygoo committed Jan 26, 2022
1 parent 2b008cc commit b26de13
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Source/Project64/UserInterface/Debugger/Debugger-Commands.cpp
Expand Up @@ -58,6 +58,8 @@ CDebugCommandsView::~CDebugCommandsView()

LRESULT CDebugCommandsView::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
{
m_StartAddress = g_Reg ? g_Reg->m_PROGRAM_COUNTER : 0x80000000;

g_Settings->RegisterChangeCB(Debugger_WaitingForStep, this, (CSettings::SettingChangedFunc)StaticWaitingForStepChanged);
g_Settings->RegisterChangeCB(Debugger_SteppingOps, this, (CSettings::SettingChangedFunc)StaticSteppingOpsChanged);

Expand Down Expand Up @@ -89,7 +91,7 @@ LRESULT CDebugCommandsView::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARA
m_PCEdit.SetLimitText(8);

m_bIgnorePCChange = true;
m_PCEdit.SetValue(0x80000180, DisplayMode::ZeroExtend);
m_PCEdit.SetValue(m_StartAddress, DisplayMode::ZeroExtend);

// Setup view PC button
m_ViewPCButton.EnableWindow(FALSE);
Expand All @@ -113,8 +115,8 @@ LRESULT CDebugCommandsView::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARA
m_OpEdit.SetCommandsWindow(this);

m_bIgnoreAddrChange = true;
m_AddressEdit.SetValue(0x80000000, DisplayMode::ZeroExtend);
ShowAddress(0x80000000, TRUE);
m_AddressEdit.SetValue(m_StartAddress, DisplayMode::ZeroExtend);
ShowAddress(m_StartAddress, TRUE);
m_bIgnoreAddrChange = false;

if (isStepping())
Expand Down

0 comments on commit b26de13

Please sign in to comment.