void DebugRegisterChangeEvent(object sender, DebugRegisterChangeEventArgs args) { mRegisters = args.Registers; UpdateLocals(); }
public DebugRegisterChangeEventArgs(Registers regs) { Registers = regs; }
public DisplayValue(DebugConnection conn, Registers reg, Variable var) { mName = var.Name; mConnection = conn; mRegisters = reg; mVariable = var; mReader = new BinaryReader(mConnection.NewMemoryStream()); StringBuilder sb = new StringBuilder(); ulong regVal; byte[] buf = new byte[mVariable.Size]; if (mVariable.Regval) { regVal = GetRegisterValue(mVariable.Reg); sb.Append(string.Format("{0:X}", regVal)); mValue = sb.ToString(); return; } else if (mVariable.Regrel) { regVal = GetRegisterValue(mVariable.Reg); mReader.BaseStream.Seek((long)regVal + mVariable.Offset, SeekOrigin.Begin); mReader.Read(buf, 0, buf.Length); } else if (mVariable.Local || mVariable.Parameter) { mReader.BaseStream.Seek(mVariable.Offset, SeekOrigin.Begin); mReader.Read(buf, 0, buf.Length); } if (buf.Length == 4) { sb.Append(string.Format("{3:X2}{2:X2}{1:X2}{0:X2}", buf[0], buf[1], buf[2], buf[3])); } else { foreach (byte b in buf) sb.Append(string.Format("{0:X2} ", (int)b)); } mValue = sb.ToString(); }
void DebugRegisterChangeEvent(object sender, DebugRegisterChangeEventArgs args) { mRegisters = args.Registers; Invoke(Delegate.CreateDelegate(typeof(NoParamsDelegate), this, "UpdateGrid")); }