crashanalysercmd/PerfToolsSharedLibraries/Engine/SymbianSymbolLib/Plugins/SLPluginSymbol/Provider/SymbolSourceProvider.cs
changeset 0 818e61de6cd1
equal deleted inserted replaced
-1:000000000000 0:818e61de6cd1
       
     1 /*
       
     2 * Copyright (c) 2004-2008 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: 
       
    15 *
       
    16 */
       
    17 
       
    18 using System;
       
    19 using System.IO;
       
    20 using System.Collections.Generic;
       
    21 using System.Text;
       
    22 using SymbianStructuresLib.Debug.Symbols;
       
    23 using SymbianSymbolLib.SourceManagement.Source;
       
    24 using SymbianSymbolLib.SourceManagement.Provisioning;
       
    25 using SymbianUtils.FileTypes;
       
    26 using SymbianUtils;
       
    27 using SLPluginSymbol.Data;
       
    28 using SLPluginSymbol.Reader;
       
    29 using SLPluginSymbol.Source;
       
    30 using SLPluginSymbol.Utilities;
       
    31 
       
    32 namespace SLPluginSymbol.Provider
       
    33 {
       
    34     public class SymbolSourceProvider : SymSourceProvider
       
    35     {
       
    36         #region Constructors
       
    37         public SymbolSourceProvider( SymSourceProviderManager aManager )
       
    38             : base( aManager )
       
    39         {
       
    40         }
       
    41         #endregion
       
    42 
       
    43         #region From SymSourceProvider
       
    44         public override SymSourceCollection CreateSources( string aFileName )
       
    45         {
       
    46             System.Diagnostics.Debug.WriteLine( string.Format( "[Symbol Memory] START -> {0:d12}, source: {1}", System.GC.GetTotalMemory( true ), aFileName ) );
       
    47             SymbolSource source = new SymbolSource( aFileName, this );
       
    48             return new SymSourceCollection( source );
       
    49         }
       
    50 
       
    51         public override void ReadSource( SymSource aSource, TSynchronicity aSynchronicity )
       
    52         {
       
    53             SymbolSource source = (SymbolSource) aSource;
       
    54             //
       
    55             SymbolFileData data = source.ExcavateData();
       
    56             SymbolFileReader reader = new SymbolFileReader( source, data );
       
    57             reader.Read( aSynchronicity );
       
    58         }
       
    59 
       
    60         public override SymFileTypeList FileTypes
       
    61         {
       
    62             get
       
    63             {
       
    64                 SymFileTypeList ret = new SymFileTypeList();
       
    65                 //
       
    66                 ret.Add( new SymFileType( ".symbol", "Symbian OS Symbolic Information File" ) );
       
    67                 //
       
    68                 return ret;
       
    69             }
       
    70         }
       
    71 
       
    72         public override string Name
       
    73         {
       
    74             get { return "SYMBOL"; }
       
    75         }
       
    76         #endregion
       
    77 
       
    78         #region Properties
       
    79         #endregion
       
    80 
       
    81         #region Event handlers
       
    82 
       
    83         #endregion
       
    84 
       
    85         #region Internal constants
       
    86         private const string KSymbolFileExtension = ".SYMBOL";
       
    87         #endregion
       
    88 
       
    89         #region Internal methods
       
    90         #endregion
       
    91 
       
    92         #region Data members
       
    93         #endregion
       
    94     }
       
    95 }