Return TypeFunction nameArguments
voidCatchSegVio(int,)

Declared in file: hzProcess.h
Defined in file : hzProcess.cpp

Function Logic:

0:START 1:printf fflush backtrace nSize backtrace_symbols cpSym getpid pid pthread_self tid GetThreadLogger pLog GetThreadInfo phz 2:!pLog 3:printf printf printf nIndex 4:nIndex 5:printf 6:printf fflush hzProcess::StackTrace 7:hzLogger::Out hzLogger::Out hzLogger::Out nIndex 8:nIndex 9:hzLogger::Out 10:hzProcess::StackTrace hzLogger::Out 11:exit 12: No text

Function body:

void CatchSegVio (int sig)
{
   hzLogger*   pLog ;
   hzProcess*  phz ;
   void*       pvArr[1024];
   char**      cpSym ;
   uint32_t    pid ;
   uint32_t    tid ;
   uint32_t    nSize ;
   uint32_t    nIndex ;
   printf("SEGMENT VIOLATION\n") ;
   fflush(stdout);
   nSize = backtrace(pvArr, 1023);
   cpSym = backtrace_symbols(pvArr, nSize);
   pid = getpid() ;
   tid = pthread_self() ;
   pLog = GetThreadLogger() ;
   phz = GetThreadInfo() ;
   if (!pLog)
   {
       printf("1 CatchSegVio: %s\n", s_signals[sig]) ;
       printf("1 CatchSegVio: Signal %d Process %u, thread %u\n", sig, pid, tid) ;
       printf("1 Stack Trace is:\n") ;
       for (nIndex = 0; nIndex < nSize ; nIndex++)
           printf("%d - %s\n", nIndex, cpSym[nIndex]) ;
       printf("1 Stack Trace end:\n") ;
       fflush(stdout);
       phz->StackTrace() ;
   }
   else
   {
       pLog->Out("2 CatchSegVio: %s\n", s_signals[sig]) ;
       pLog->Out("2 CatchSegVio: Signal %d Process %u, thread %u\n", sig, pid, tid) ;
       pLog->Out("2 Stack Trace is:\n") ;
       for (nIndex = 0; nIndex < nSize ; nIndex++)
           pLog->Out("%d - %s\n", nIndex, cpSym[nIndex]) ;
       phz->StackTrace() ;
       pLog->Out("2 Stack Trace end:\n") ;
   }
   exit(100);
}