"fix" debugger display after breakpoint hits
Breakpoint hits don't actually pause execution, so it's necessary to immediately update the disassember view as the core will continue executing after. This isn't great design but whatever
This commit is contained in:
parent
a6b8bd86ab
commit
edda865afb
|
@ -56,7 +56,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
private void BreakpointCallback(uint addr, uint value, uint flags)
|
||||
{
|
||||
MainForm.PauseEmulator();
|
||||
UpdateValues();
|
||||
ParentDebugger.UpdateForBreakpointHit();
|
||||
MainForm.AddOnScreenMessage("Breakpoint hit");
|
||||
}
|
||||
|
||||
|
|
|
@ -66,6 +66,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
_disassemblyLines.Add(new DisasmOp(currentAddress, advance, line));
|
||||
currentAddress += (uint)advance;
|
||||
}
|
||||
DisassemblerView.Refresh();
|
||||
}
|
||||
|
||||
private void DisassemblerView_QueryItemText(int index, RollColumn column, out string text, ref int offsetX, ref int offsetY)
|
||||
|
@ -149,14 +150,12 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
IncrementCurrentAddress();
|
||||
Disassemble();
|
||||
DisassemblerView.Refresh();
|
||||
}
|
||||
|
||||
private void SmallDecrement()
|
||||
{
|
||||
DecrementCurrentAddress();
|
||||
Disassemble();
|
||||
DisassemblerView.Refresh();
|
||||
}
|
||||
|
||||
private void DisassemblerView_KeyDown(object sender, KeyEventArgs e)
|
||||
|
|
|
@ -31,6 +31,8 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
private bool CanStepOut = false;
|
||||
|
||||
private bool _breakpointHit;
|
||||
|
||||
private void UpdateCapabilitiesProps()
|
||||
{
|
||||
try
|
||||
|
@ -96,6 +98,12 @@ namespace BizHawk.Client.EmuHawk
|
|||
}
|
||||
}
|
||||
|
||||
public void UpdateForBreakpointHit()
|
||||
{
|
||||
_breakpointHit = true;
|
||||
FullUpdate();
|
||||
}
|
||||
|
||||
private void FullUpdate()
|
||||
{
|
||||
RegisterPanel.UpdateValues();
|
||||
|
@ -115,7 +123,14 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
protected override void UpdateAfter()
|
||||
{
|
||||
if (MainForm.EmulatorPaused) FullUpdate();
|
||||
if (_breakpointHit)
|
||||
{
|
||||
_breakpointHit = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
FullUpdate();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue