memana/analyzetoolclient/dynamicmemoryhook/inc/codeblock.h
changeset 0 f0f2b8682603
equal deleted inserted replaced
-1:000000000000 0:f0f2b8682603
       
     1 /*
       
     2 * Copyright (c) 2009 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:  Declaration of the class TCodeblock.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CODEBLOCK_H
       
    20 #define CODEBLOCK_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <u32std.h>
       
    24 
       
    25 /**
       
    26 *  Stores information of process loaded code segments
       
    27 */
       
    28 class TCodeblock
       
    29     {
       
    30     
       
    31     public: // Constructors
       
    32         
       
    33         /**
       
    34         * C++ default constructor.
       
    35         * @param aRunAddress Start address of the memory block. 
       
    36         * @param aSize The size of the memory block.
       
    37         * @param aName The name of the library
       
    38         */
       
    39         TCodeblock( TLinAddr aRunAddress, TUint32 aSize, TBuf8<KMaxLibraryName>& aName );
       
    40 
       
    41     public: // New functions
       
    42 
       
    43         /**
       
    44         * Checks if the given address is in this memory block area
       
    45         * @param aAddress A address to be checked. 
       
    46         * @return TBool Returns ETrue if the given address is in this
       
    47         *               memory block area, EFalse otherwise
       
    48         */
       
    49         TBool CheckAddress( TUint32 aAddress );
       
    50 
       
    51         /**
       
    52         * Matches if the given parameters represents this memory block 
       
    53         * @param aName The name of the library
       
    54         * @return TBool Returns ETrue if the given parameters represents
       
    55         *               this memory block, EFalse otherwise
       
    56         */
       
    57         TBool Match( TBuf8<KMaxLibraryName>& aName );
       
    58 
       
    59         /**
       
    60         * Returs specific segment's end address 
       
    61         * @return TUint end address of the code segment
       
    62         */
       
    63         TUint32 EndAddress();
       
    64 
       
    65         /**
       
    66         * Returs specific segment's start address
       
    67         * @return TUint start address of the code segment
       
    68         */
       
    69         TUint32 StartAddress();
       
    70 
       
    71         /**
       
    72         * Gets specific code segment's name
       
    73         * @param aName Name of the code segment
       
    74         */
       
    75         void Name( TDes8& aName );
       
    76         
       
    77     private: // Member variables
       
    78 
       
    79         /* Start address of the memory block */
       
    80         TLinAddr iStartAddress;
       
    81 
       
    82         /* End address of the memory block */
       
    83         TLinAddr iEndAddress;
       
    84 
       
    85         /* End address of the memory block */
       
    86         TBuf8<KMaxLibraryName> iName;
       
    87     };
       
    88 
       
    89 #endif // CODEBLOCK_H
       
    90 
       
    91 // End of File
       
    92