private void ShowMemoryControlRange(IStatusBarService sbSvc, AddressRange range) { if (range.Begin == null || range.End == null) return; if (range.Begin.ToLinear() == range.End.ToLinear()) //$REFACTOR: make bytespan a method of addressrange. { sbSvc.SetText(string.Format("[{0}]", range.Begin)); } else { sbSvc.SetText(string.Format("[{0}-{1}]", range.Begin, range.End)); } }
public void DumpData(LoadedImage image, AddressRange range, TextWriter stm) { DumpData(image, range.Begin, (long) (range.End - range.Begin), stm); }
private bool TryGetSelectedAddressRange(out AddressRange addrRange) { addrRange = null; if (control.MemoryView.Focused) { addrRange = control.MemoryView.GetAddressRange(); if (!addrRange.IsValid) return false; } else if (control.DisassemblyView.Focused) { var addr = control.DisassemblyView.SelectedObject as Address; if (addr == null) return false; addrRange = new AddressRange(addr, addr); return true; } return true; }
private string SelectionToHex(AddressRange addr) { var sb = new StringBuilder(); var rdr = program.Architecture.CreateImageReader(program.Image, addr.Begin); var sep = ""; while (rdr.Address <= addr.End) { sb.Append(sep); sep = " "; sb.AppendFormat("{0:X2}", (uint)rdr.ReadByte()); } return sb.ToString(); }
public SelectionChangedEventArgs(AddressRange range) { this.range = range; }