crashanalysercmd/PerfToolsSharedLibraries/Engine/SymbianDebugLib/Entity/Configurations/DbgEntityConfigManager.cs
changeset 3 045ade241ef5
parent 2 0c91f0baec58
equal deleted inserted replaced
2:0c91f0baec58 3:045ade241ef5
    74                     // Unload any old data
    74                     // Unload any old data
    75                     iEngine.Clear();
    75                     iEngine.Clear();
    76 
    76 
    77                     // Prepare list of files
    77                     // Prepare list of files
    78                     List<string> files = new List<string>();
    78                     List<string> files = new List<string>();
    79                     foreach ( DbgEntityConfig.CfgSet set in config )
    79                     
       
    80                     if (config.SymbolDataNeeded)
    80                     {
    81                     {
    81                         foreach ( DbgEntityConfig.CfgFile file in set )
    82                         foreach (DbgEntityConfig.CfgSet set in config)
    82                         {
    83                         {
    83                             files.Add( file.FileNameAndPath );
    84                             foreach (DbgEntityConfig.CfgFile file in set)
       
    85                             {
       
    86                                 files.Add(file.FileNameAndPath);
       
    87                             }
    84                         }
    88                         }
    85                     }
    89                     }
    86                     iEngine.AddRange( files );
    90                     iEngine.AddRange( files );
    87                     iEngine.Prime( TSynchronicity.ESynchronous );
    91                     iEngine.Prime( TSynchronicity.ESynchronous );
    88                 }
    92                 }
    89             }
    93             }
    90         }
    94         }
    91 
    95 
       
    96         // Returns true if aRomId is currently used id
    92         public bool IsActiveRomId(uint aRomId)
    97         public bool IsActiveRomId(uint aRomId)
    93         {
    98         {
    94             return iEngine.IsActiveRomId(aRomId);
    99             return iEngine.IsActiveRomId(aRomId);
       
   100         }
       
   101 
       
   102         // Returns true if symbol data is needed for this RomId
       
   103         public bool IsSymbolDataNeeded(uint aRomId)
       
   104         {
       
   105             return iEngine.IsSymbolDataNeeded(aRomId);
       
   106         }
       
   107 
       
   108         public DbgEntityConfig ConfigById(DbgEntityConfigIdentifier aId)
       
   109         {
       
   110             DbgEntityConfig ret = null;
       
   111             //
       
   112             lock (iConfigurations)
       
   113             {
       
   114                 foreach (DbgEntityConfig cfg in iConfigurations)
       
   115                 {
       
   116                     if (cfg.Contains(aId))
       
   117                     {
       
   118                         ret = cfg;
       
   119                         break;
       
   120                     }
       
   121                 }
       
   122             }
       
   123             //
       
   124             return ret;
    95         }
   125         }
    96 
   126 
    97         #endregion
   127         #endregion
    98 
   128 
    99         #region Event handlers
   129         #region Event handlers
   116             get { return iEngine; }
   146             get { return iEngine; }
   117         }
   147         }
   118         #endregion
   148         #endregion
   119 
   149 
   120         #region Internal methods
   150         #region Internal methods
   121         private DbgEntityConfig ConfigById( DbgEntityConfigIdentifier aId )
       
   122         {
       
   123             DbgEntityConfig ret = null;
       
   124             //
       
   125             lock ( iConfigurations )
       
   126             {
       
   127                 foreach ( DbgEntityConfig cfg in iConfigurations )
       
   128                 {
       
   129                     if ( cfg.Contains( aId ) )
       
   130                     {
       
   131                         ret = cfg;
       
   132                         break;
       
   133                     }
       
   134                 }
       
   135             }
       
   136             //
       
   137             return ret;
       
   138         }
       
   139         #endregion
   151         #endregion
   140 
   152 
   141         #region Data members
   153         #region Data members
   142         private readonly DbgEngine iEngine;
   154         private readonly DbgEngine iEngine;
   143         private List<DbgEntityConfig> iConfigurations = new List<DbgEntityConfig>();
   155         private List<DbgEntityConfig> iConfigurations = new List<DbgEntityConfig>();