/* 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.Globalization; using System.Threading; using dnSpy.Contracts.Debugger.CallStack; using dnSpy.Contracts.Debugger.Code; using dnSpy.Contracts.Debugger.Evaluation; using dnSpy.Contracts.Debugger.Text; using dnSpy.Contracts.Documents; namespace dnSpy.Contracts.Debugger.Engine.CallStack { /// /// Stack frame implemented by a /// public abstract class DbgEngineStackFrame : DbgObject { /// /// Gets the module or null if it's unknown /// public abstract DbgModule? Module { get; } /// /// Gets the location or null if none. Can be passed to /// public abstract DbgCodeLocation? Location { get; } /// /// Gets the offset of the IP relative to the start of the function /// public abstract uint FunctionOffset { get; } /// /// Gets the flags /// public abstract DbgStackFrameFlags Flags { get; } /// /// Gets the function token or if it doesn't have a token. /// public abstract uint FunctionToken { get; } /// /// Invalid function token /// public const uint InvalidFunctionToken = uint.MaxValue; /// /// Formats the stack frame or returns false /// /// Evaluation context /// Output /// Stack frame options /// Value option /// Culture or null to use invariant culture /// Cancellation token public virtual bool TryFormat(DbgEvaluationContext context, IDbgTextWriter output, DbgStackFrameFormatterOptions options, DbgValueFormatterOptions valueOptions, CultureInfo? cultureInfo, CancellationToken cancellationToken) => false; /// /// Called after the has been created /// /// Stack frame public abstract void OnFrameCreated(DbgStackFrame frame); } }