Пример #1
0
        DbgValue CreateResult(DbgEngineValue engineValue)
        {
            var value = new DbgValueImpl(Runtime, engineValue);

            Runtime.CloseOnContinue(value);
            return(value);
        }
Пример #2
0
        public DbgValueNodeImpl(DbgLanguage language, DbgRuntime runtime, DbgEngineValueNode engineValueNode)
        {
            Runtime              = runtime ?? throw new ArgumentNullException(nameof(runtime));
            Language             = language ?? throw new ArgumentNullException(nameof(language));
            this.engineValueNode = engineValueNode ?? throw new ArgumentNullException(nameof(engineValueNode));
            var engineValue = engineValueNode.Value;

            if (engineValue != null)
            {
                value = new DbgValueImpl(runtime, engineValue);
            }
            else if (!engineValueNode.IsReadOnly)
            {
                throw new InvalidOperationException();
            }
        }
Пример #3
0
 DbgEvaluationResult CreateResult(DbgRuntime runtime, DbgEngineEvaluationResult result)
 {
     if (result.Error != null)
     {
         return(new DbgEvaluationResult(PredefinedEvaluationErrorMessagesHelper.GetErrorMessage(result.Error), result.FormatSpecifiers, result.Flags));
     }
     try {
         var value = new DbgValueImpl(runtime, result.Value);
         runtime.CloseOnContinue(value);
         return(new DbgEvaluationResult(value, result.FormatSpecifiers, result.Flags));
     }
     catch {
         runtime.Process.DbgManager.Close(result.Value);
         throw;
     }
 }
Пример #4
0
        DbgEvaluationResult CreateResult(DbgEngineEvaluationResult result)
        {
            if (result.Error != null)
            {
                return(new DbgEvaluationResult(result.Error, result.Flags));
            }
            var runtime = result.Thread.Runtime;

            try {
                var value = new DbgValueImpl(runtime, result.Value);
                runtime.CloseOnContinue(value);
                return(new DbgEvaluationResult(value, result.Flags));
            }
            catch {
                runtime.Process.DbgManager.Close(result.Value);
                throw;
            }
        }