WriteInfoLine() public méthode

public WriteInfoLine ( string format ) : void
format string
Résultat void
Exemple #1
0
        private void PerformAutomaticAnalysis()
        {
            var threadToSwitchTo = _context.Runtime.ThreadWithActiveExceptionOrFirstThread();

            if (threadToSwitchTo.CurrentException != null)
            {
                _context.WriteInfoLine("The current thread has an exception; use !pe to view it.");
            }
            new SwitchThread()
            {
                ManagedThreadId = threadToSwitchTo.ManagedThreadId
            }.Execute(_context);

            if (_context.Runtime.OutOfMemoryExceptionOccurred)
            {
                _context.WriteInfoLine("There was an out-of-memory condition in this target:");
                var oomInfo = _context.Runtime.OutOfMemoryInformation;
                _context.WriteInfoLine("\tAn OOM occurred after GC {0} when trying to allocate {1}",
                                       oomInfo.GCNumber, oomInfo.AllocationSize.ToMemoryUnits());
                _context.WriteInfoLine("\t" + oomInfo.Reason);
            }
        }
Exemple #2
0
 public void Execute(CommandExecutionContext context)
 {
     string aliasCommand;
     if (!context.Aliases.TryGetValue(AliasName, out aliasCommand))
     {
         context.WriteErrorLine("Unknown alias '{0}'", AliasName);
         return;
     }
     int index = 1;
     foreach (var paramValue in AliasParameters.Split(' '))
     {
         aliasCommand = aliasCommand.Replace("$" + index, paramValue);
     }
     context.WriteInfoLine("Alias '{0}' expanded to '{1}'", AliasName, aliasCommand);
     context.ExecuteCommand(aliasCommand);
 }
Exemple #3
0
        public void Execute(CommandExecutionContext context)
        {
            string aliasCommand;

            if (!context.Aliases.TryGetValue(AliasName, out aliasCommand))
            {
                context.WriteErrorLine("Unknown alias '{0}'", AliasName);
                return;
            }
            int index = 1;

            foreach (var paramValue in AliasParameters.Split(' '))
            {
                aliasCommand = aliasCommand.Replace("$" + index, paramValue);
            }
            context.WriteInfoLine("Alias '{0}' expanded to '{1}'", AliasName, aliasCommand);
            context.ExecuteCommand(aliasCommand);
        }
Exemple #4
0
 private void DisplayShortSummary()
 {
     // We are using the DbgEng dump reader here, because the CLRMD dump reader doesn't work
     // well with mismatched architectures. For the sake of just getting basic information out
     // there, the DbgEng reader is better.
     string[] dumpFiles = GetFilesFromPattern(_options.SummaryDumpFile);
     foreach (var dumpFile in dumpFiles)
     {
         using (var target = DataTarget.LoadCrashDump(dumpFile, CrashDumpReader.DbgEng))
         {
             _context.WriteInfoLine("Summary for dump file {0}", dumpFile);
             _context.WriteLine("  Is minidump? {0}", target.IsMinidump);
             _context.WriteLine("  Target architecture: {0}", target.Architecture);
             _context.WriteLine("  {0} CLR versions in target", target.ClrVersions.Count);
             foreach (var clrInfo in target.ClrVersions)
             {
                 _context.WriteLine("    {0}", clrInfo.Version);
             }
             _context.WriteLine();
         }
     }
 }