analyzetool/dynamicmemoryhook/src/analyzetooleventhandler.cpp
branchRCL_3
changeset 49 7fdc9a71d314
parent 19 da2cedce4920
child 59 8ad140f3dd41
equal deleted inserted replaced
46:e26895079d7c 49:7fdc9a71d314
    66                 ATFastLogDllLoaded( iProcessId,
    66                 ATFastLogDllLoaded( iProcessId,
    67                         iLibraryInfo.iLibraryName, 
    67                         iLibraryInfo.iLibraryName, 
    68                         iLibraryInfo.iRunAddress,
    68                         iLibraryInfo.iRunAddress,
    69                         iLibraryInfo.iRunAddress + iLibraryInfo.iSize );
    69                         iLibraryInfo.iRunAddress + iLibraryInfo.iSize );
    70                 }
    70                 }
    71             else
    71             else if( iLogOption == EATLogToFile )
    72                 {
    72             	{
    73                 LOGSTR1( "ATMH CLibraryEventHandler::RunL() - iStorageServer.LogDllLoaded() " );
    73 				iLogFile.ATFileLogDllLoaded( iLibraryInfo.iLibraryName, 
    74                 error = iStorageServer.LogDllLoaded( 
    74 						iLibraryInfo.iRunAddress,
    75                         iLibraryInfo.iLibraryName, 
    75 						iLibraryInfo.iRunAddress + iLibraryInfo.iSize );
    76                         iLibraryInfo.iRunAddress,
    76             	}
    77                         iLibraryInfo.iRunAddress + iLibraryInfo.iSize );
    77             
    78                 LOGSTR2( "ATMH StorageServer error: %i",  error );
       
    79                 }
       
    80             if ( KErrNone == error )
    78             if ( KErrNone == error )
    81                 {
    79                 {
    82                 iCodeblocks.Append( TCodeblock( iLibraryInfo.iRunAddress, 
    80                 iCodeblocks.Append( TCodeblock( iLibraryInfo.iRunAddress, 
    83                         iLibraryInfo.iSize, 
    81                         iLibraryInfo.iSize, 
    84                         iLibraryInfo.iLibraryName ) );
    82                         iLibraryInfo.iLibraryName ) );
   104                     ATFastLogDllUnloaded( iProcessId,
   102                     ATFastLogDllUnloaded( iProcessId,
   105                             libraryName,
   103                             libraryName,
   106                             iLibraryInfo.iRunAddress, 
   104                             iLibraryInfo.iRunAddress, 
   107                             iLibraryInfo.iRunAddress + iLibraryInfo.iSize );
   105                             iLibraryInfo.iRunAddress + iLibraryInfo.iSize );
   108                     }
   106                     }
   109                 else
   107                 else if( iLogOption == EATLogToFile )
   110                     {
   108 					{
   111                     LOGSTR1( "ATMH CLibraryEventHandler::RunL() - iStorageServer.LogDllUnloaded() " );
   109 					iLogFile.ATFileLogDllUnloaded( iLibraryInfo.iLibraryName, 
   112                     #ifdef LOGGING_ENABLED
   110 							iLibraryInfo.iRunAddress,
   113                     TInt error = iStorageServer.LogDllUnloaded( 
   111 							iLibraryInfo.iRunAddress + iLibraryInfo.iSize );
   114                             libraryName/*iLibraryInfo.iLibraryName*/, 
   112 					}
   115                             iLibraryInfo.iRunAddress, 
       
   116                             iLibraryInfo.iRunAddress + iLibraryInfo.iSize );
       
   117     
       
   118                     LOGSTR2( "ATMH StorageServer error: %i",  error );
       
   119                     #else
       
   120                     iStorageServer.LogDllUnloaded( 
       
   121                                                 libraryName/*iLibraryInfo.iLibraryName*/, 
       
   122                                                 iLibraryInfo.iRunAddress, 
       
   123                                                 iLibraryInfo.iRunAddress + iLibraryInfo.iSize );
       
   124                     #endif
       
   125                     }
       
   126                 iCodeblocks.Remove( i );
   113                 iCodeblocks.Remove( i );
   127                 break;
   114                 break;
   128                 }
   115                 }
   129             }
   116             }
   130         }
   117         }
   196 // C++ default constructor can NOT contain any code, that
   183 // C++ default constructor can NOT contain any code, that
   197 // might leave.
   184 // might leave.
   198 // -----------------------------------------------------------------------------
   185 // -----------------------------------------------------------------------------
   199 //
   186 //
   200 CLibraryEventHandler::CLibraryEventHandler( RAnalyzeTool& aAnalyzeTool, 
   187 CLibraryEventHandler::CLibraryEventHandler( RAnalyzeTool& aAnalyzeTool, 
   201 	RArray<TCodeblock>& aCodeblocks, RATStorageServer& aStorageServer, 
   188 	RArray<TCodeblock>& aCodeblocks,
   202 	TUint aProcessId, RMutex& aMutex, 
   189 	TUint aProcessId, RMutex& aMutex, 
   203 	MAnalyzeToolEventhandlerNotifier& aNotifier,
   190 	MAnalyzeToolEventhandlerNotifier& aNotifier,
   204 	TUint32 aLogOption ) 
   191 	TUint32 aLogOption,
       
   192 	RATFileLog& aFileLog ) 
   205  :	CActive( EPriorityNormal ),
   193  :	CActive( EPriorityNormal ),
   206     iAnalyzeTool( aAnalyzeTool ),
   194     iAnalyzeTool( aAnalyzeTool ),
   207     iCodeblocks( aCodeblocks ),
   195     iCodeblocks( aCodeblocks ),
   208     iStorageServer( aStorageServer ),
       
   209     iProcessId( aProcessId ),
   196     iProcessId( aProcessId ),
   210     iMutex( aMutex ),
   197     iMutex( aMutex ),
   211     iStarted( EFalse ),
   198     iStarted( EFalse ),
   212     iNotifier( aNotifier ),
   199     iNotifier( aNotifier ),
   213     iLogOption( aLogOption )
   200     iLogOption( aLogOption ),
       
   201     iLogFile( aFileLog )
   214     {
   202     {
   215     LOGSTR1( "ATMH CLibraryEventHandler::CLibraryEventHandler()" );
   203     LOGSTR1( "ATMH CLibraryEventHandler::CLibraryEventHandler()" );
   216     }
   204     }
   217 
   205 
   218 // -----------------------------------------------------------------------------
   206 // -----------------------------------------------------------------------------