crashanalysercmd/Libraries/Engine/CrashDebuggerLib/Structures/NThread/NThreadExtraContextInfo.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.Collections.Generic;
       
    20 using System.Text;
       
    21 using CrashDebuggerLib.Structures.KernelObjects;
       
    22 
       
    23 namespace CrashDebuggerLib.Structures.NThread
       
    24 {
       
    25     public class NThreadExtraContextInfo
       
    26     {
       
    27         #region Enumerations
       
    28         public enum TExtraContextType
       
    29         {
       
    30             ENone = 0,
       
    31             EDynamicallyAllocated,
       
    32             EStaticallyAllocated,
       
    33         }
       
    34         #endregion
       
    35 
       
    36         #region Constructors
       
    37         public NThreadExtraContextInfo()
       
    38         {
       
    39         }
       
    40         #endregion
       
    41 
       
    42         #region API
       
    43         #endregion
       
    44 
       
    45         #region Properties
       
    46         public uint ExtraContext
       
    47         {
       
    48             get { return iExtraContext; }
       
    49             set { iExtraContext = value; }
       
    50         }
       
    51 
       
    52         public int ExtraContextSize
       
    53         {
       
    54             get { return iExtraContextSize; }
       
    55             set { iExtraContextSize = value; }
       
    56         }
       
    57 
       
    58         public uint ExtraContextSizeRaw
       
    59         {
       
    60             get { return (uint) iExtraContextSize; }
       
    61             set { iExtraContextSize = (int) value; }
       
    62         }
       
    63 
       
    64         public TExtraContextType ExtraContextType
       
    65         {
       
    66             get
       
    67             {
       
    68                 TExtraContextType ret = TExtraContextType.ENone;
       
    69                 //
       
    70                 if ( ExtraContextSize > 0 )
       
    71                 {
       
    72                     ret = TExtraContextType.EDynamicallyAllocated;
       
    73                 }
       
    74                 else if ( ExtraContextSize < 0 )
       
    75                 {
       
    76                     ret = TExtraContextType.EStaticallyAllocated;
       
    77                 }
       
    78                 //
       
    79                 return ret;
       
    80             }
       
    81         }
       
    82         #endregion
       
    83 
       
    84         #region Internal methods
       
    85         #endregion
       
    86 
       
    87         #region Internal constants
       
    88         #endregion
       
    89 
       
    90         #region From System.Object
       
    91         public override string ToString()
       
    92         {
       
    93             return base.ToString();
       
    94         }
       
    95         #endregion
       
    96 
       
    97         #region Data members
       
    98         private uint iExtraContext = 0;		// coprocessor context
       
    99         private int iExtraContextSize = 0;	// +ve=dynamically allocated, 0=none, -ve=statically allocated
       
   100         #endregion
       
   101     }
       
   102 }