Пример #1
0
        // Returns true if the dump contains an exception and extracts as much information of the exception as possible.
        public bool GetExceptionInfo()
        {
            if (heapParser.ErrorDetected == true)
            {
                heapParser.GetExceptionInfo(exceptionInfo, threadParser);
                return(true);
            }

            excepInfoParser.GetExceptionInfo(exceptionInfo, threadParser);

            // If the exception is managed, update the current exception info
            int managedFaultThreadNum = managedThreadsParser.GetFaultThreadNum();

            if (managedFaultThreadNum >= 0 && (excepInfoParser.IsClrException() || exceptionInfo.description == null))
            {
                exceptionInfo.threadNum   = managedFaultThreadNum;
                exceptionInfo.description = managedThreadsParser.GetThread(managedFaultThreadNum).exceptionDescription;
            }

            if (exceptionInfo.threadNum < 0)
            {
                // We don't have the exception details but we can at least try to identify the faulting thread
                if (exceptionInfo.threadNum < 0) // Look for keywords in the call stacks
                {
                    exceptionInfo.threadNum = threadParser.GuessFaultingThread();
                }
            }
            return(exceptionInfo.address > 0 || exceptionInfo.threadNum >= 0);
        }
Пример #2
0
        // Returns the index of the faulting thread
        int GetFaultingThreadNum(ThreadParser threadParser)
        {
            // Get all threads containing the exception address
            int threadNum             = -1;
            List <ThreadInfo> threads = threadParser.GetThreadsByAddress(address);

            if (threads.Count == 1)
            {
                threadNum = threads[0].threadNum;
            }
            else if (threads.Count > 1)
            {
                threadNum = threadParser.GuessFaultingThread(threads);
            }
            return(threadNum);
        }
Пример #3
0
 // Returns true if the dump contains an exception and extracts as much information of the exception as possible.
 public bool GetExceptionInfo()
 {
     if (heapParser.ErrorDetected == true)
     {
         heapParser.GetExceptionInfo(exceptionInfo, threadParser);
         return(true);
     }
     excepInfoParser.GetExceptionInfo(exceptionInfo, threadParser);
     if (exceptionInfo.threadNum < 0)
     {
         // We don't have the exception details but we can at least try to identify the faulting thread
         exceptionInfo.threadNum = managedThreadsParser.GetFaultingThread(); // Look in the managed threads
         if (exceptionInfo.threadNum < 0)                                    // Look for keywords in the call stacks
         {
             exceptionInfo.threadNum = threadParser.GuessFaultingThread();
         }
     }
     return(exceptionInfo.address > 0 || exceptionInfo.threadNum >= 0);
 }