public PEModule(string modulePath) { bpAddresses_ = new List <uint>(); roBPAddresses_ = new ReadOnlyCollection <uint>(bpAddresses_); loadModuleFile(modulePath); hitSet_ = new HitSet(imageBase_); }
/// <summary> /// copy constructor /// </summary> /// <param name="module"></param> public PEModule(PEModule module) { bpAddresses_ = new List <uint>(module.bpAddresses_); roBPAddresses_ = new ReadOnlyCollection <uint>(bpAddresses_); modulePath_ = module.modulePath_; imageBase_ = module.imageBase_; hitSet_ = new HitSet(imageBase_); }
/// <summary> /// remove all hits in srcHits from our instance /// </summary> /// <param name="srcHits"></param> public void filter(HitSet srcHits) { foreach (Hit h in srcHits) { if (hits_.ContainsKey(h.Address)) { hits_.Remove(h.Address); } } }
/// <summary> /// add all hits from srcHits to our instance /// </summary> /// <param name="srcHits"></param> public void merge(HitSet srcHits) { foreach (Hit h in srcHits) { if (hits_.ContainsKey(h.Address)) { hits_[h.Address] += h.Count; } else { hits_[h.Address] = h.Count; } } }
public CoverageModule(string name) { hits_ = new HitSet(); name_ = name; }