public string GetLineComment(int lineNumber) { if (_code.SymbolProvider != null && _code._config?.ShowSourceAsComments == true) { AddressTypeInfo addressInfo = _code.GetAddressInfo(lineNumber); if (addressInfo.Type == AddressType.PrgRom) { return(_code.SymbolProvider.GetSourceCodeLine(addressInfo.Address)); } } return(null); }
public ScrollbarColorProvider(ctrlDebuggerCode code) { _code = code; DebugInfo info = ConfigManager.Config.DebugInfo; int len = _code._absoluteLineNumbers.Count; AddressTypeInfo[] addressInfo = new AddressTypeInfo[len]; for (int i = 0; i < len; i++) { addressInfo[i] = _code.GetAddressInfo(i); } foreach (Breakpoint breakpoint in BreakpointManager.Breakpoints) { for (int i = 0; i < len; i++) { if (breakpoint.Matches(_code._lineNumbers[i], ref addressInfo[i])) { Color bpColor = breakpoint.BreakOnExec ? info.CodeExecBreakpointColor : (breakpoint.BreakOnWrite ? info.CodeWriteBreakpointColor : info.CodeReadBreakpointColor); _breakpointColors[i] = bpColor; } } } }