Ejemplo n.º 1
0
        public override void InitializeContext(DbgEvaluationContext context, DbgCodeLocation location, CancellationToken cancellationToken)
        {
            Debug.Assert(context.Runtime.GetDotNetRuntime() != null);

            IDebuggerDisplayAttributeEvaluatorUtils.Initialize(context, debuggerDisplayAttributeEvaluator);
            // Needed by DebuggerRuntimeImpl (calls expressionCompiler.TryGetAliasInfo())
            context.GetOrCreateData(() => expressionCompiler);

            var loc = location as IDbgDotNetCodeLocation;

            if (loc == null)
            {
                // Could be a special frame, eg. managed to native frame
                return;
            }

            var state = StateWithKey <RuntimeState> .GetOrCreate(context.Runtime, decompiler);

            var debugInfo = GetOrCreateDebugInfo(state, loc, cancellationToken);

            if (debugInfo == null)
            {
                return;
            }
            DbgLanguageDebugInfoExtensions.SetLanguageDebugInfo(context, debugInfo);
        }
Ejemplo n.º 2
0
        public override void InitializeContext(DbgEvaluationContext context, DbgCodeLocation location, CancellationToken cancellationToken)
        {
            Debug.Assert(context.Runtime.GetDotNetRuntime() != null);

            IDebuggerDisplayAttributeEvaluatorUtils.Initialize(context, debuggerDisplayAttributeEvaluator);
            // Needed by DebuggerRuntimeImpl (calls expressionCompiler.TryGetAliasInfo())
            context.GetOrCreateData(() => expressionCompiler);

            if ((context.Options & DbgEvaluationContextOptions.NoMethodBody) == 0 && location is IDbgDotNetCodeLocation loc)
            {
                var state = StateWithKey <RuntimeState> .GetOrCreate(context.Runtime, decompiler);

                var debugInfo = GetOrCreateDebugInfo(context, state, loc, cancellationToken);
                if (debugInfo != null)
                {
                    DbgLanguageDebugInfoExtensions.SetLanguageDebugInfo(context, debugInfo);
                }
            }
        }
Ejemplo n.º 3
0
        public override void InitializeContext(DbgEvaluationContext context, DbgCodeLocation location, CancellationToken cancellationToken)
        {
            Debug.Assert(context.Runtime.GetDotNetRuntime() != null);
            var loc = location as IDbgDotNetCodeLocation;

            if (loc == null)
            {
                // Could be a special frame, eg. managed to native frame
                return;
            }

            var state = StateWithKey <RuntimeState> .GetOrCreate(context.Runtime, decompiler);

            var debugInfo = GetOrCreateDebugInfo(state, loc, cancellationToken);

            if (debugInfo == null)
            {
                return;
            }
            DbgLanguageDebugInfoExtensions.SetLanguageDebugInfo(context, debugInfo);
        }