/* Copyright (C) 2014-2019 de4dot@gmail.com This file is part of dnSpy dnSpy is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. dnSpy is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with dnSpy. If not, see . */ using System; namespace dnSpy.Contracts.Debugger.Engine { /// /// A class that can update a /// public abstract class DbgEngineModule { /// /// Gets the module /// public abstract DbgModule Module { get; } /// /// Removes the module and disposes of it. The engine has paused the program. /// /// Message flags public abstract void Remove(DbgEngineMessageFlags messageFlags); /// /// Properties to update /// [Flags] public enum UpdateOptions { /// /// No option is enabled /// None = 0, /// /// Update /// IsExe = 0x00000001, /// /// Update /// Address = 0x00000002, /// /// Update /// Size = 0x00000004, /// /// Update /// ImageLayout = 0x00000008, /// /// Update /// Name = 0x00000010, /// /// Update /// Filename = 0x00000020, /// /// Update /// IsDynamic = 0x00000040, /// /// Update /// IsInMemory = 0x00000080, /// /// Update /// IsOptimized = 0x00000100, /// /// Update /// Order = 0x00000200, /// /// Update /// Timestamp = 0x00000400, /// /// Update /// Version = 0x00000800, } /// /// Updates /// /// New value public void UpdateIsExe(bool isExe) => Update(UpdateOptions.IsExe, isExe: isExe); /// /// Updates /// /// New value public void UpdateAddress(ulong address) => Update(UpdateOptions.Address, address: address); /// /// Updates /// /// New value public void UpdateSize(uint size) => Update(UpdateOptions.Size, size: size); /// /// Updates /// /// New value public void UpdateImageLayout(DbgImageLayout imageLayout) => Update(UpdateOptions.ImageLayout, imageLayout: imageLayout); /// /// Updates /// /// New value public void UpdateName(string name) => Update(UpdateOptions.Name, name: name); /// /// Updates /// /// New value public void UpdateFilename(string filename) => Update(UpdateOptions.Filename, filename: filename); /// /// Updates /// /// New value public void UpdateIsDynamic(bool isDynamic) => Update(UpdateOptions.IsDynamic, isDynamic: isDynamic); /// /// Updates /// /// New value public void UpdateIsInMemory(bool isInMemory) => Update(UpdateOptions.IsInMemory, isInMemory: isInMemory); /// /// Updates /// /// New value public void UpdateIsOptimized(bool? isOptimized) => Update(UpdateOptions.IsOptimized, isOptimized: isOptimized); /// /// Updates /// /// New value public void UpdateOrder(int order) => Update(UpdateOptions.Order, order: order); /// /// Updates /// /// New value public void UpdateTimestamp(DateTime? timestamp) => Update(UpdateOptions.Timestamp, timestamp: timestamp); /// /// Updates /// /// New value public void UpdateVersion(string version) => Update(UpdateOptions.Version, version: version); /// /// Updates properties /// /// Options /// New value /// New value /// New value /// New value /// New value /// New value /// New value /// New value /// New value /// New value /// New value /// New value public abstract void Update(UpdateOptions options, bool isExe = false, ulong address = 0, uint size = 0, DbgImageLayout imageLayout = 0, string? name = null, string? filename = null, bool isDynamic = false, bool isInMemory = false, bool? isOptimized = null, int order = 0, DateTime? timestamp = null, string? version = null); } }