|         |      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:  Definitions for the class TCodeblock. | 
|         |     15 * | 
|         |     16 */ | 
|         |     17  | 
|         |     18  | 
|         |     19 #include "codeblock.h" | 
|         |     20 #include "atlog.h" | 
|         |     21  | 
|         |     22 // ----------------------------------------------------------------------------- | 
|         |     23 // TCodeblock::TCodeblock | 
|         |     24 // C++ default constructor. | 
|         |     25 // ----------------------------------------------------------------------------- | 
|         |     26 // | 
|         |     27 TCodeblock::TCodeblock( TLinAddr aRunAddress,  | 
|         |     28                         TUint32 aSize,  | 
|         |     29                         TBuf8<KMaxLibraryName>& aName ) : | 
|         |     30                         iStartAddress( aRunAddress ), | 
|         |     31                         iEndAddress( aRunAddress + aSize ) | 
|         |     32     { | 
|         |     33     LOGSTR3( "ATMH TCodeblock::TCodeblock() %x - %x", iStartAddress, iEndAddress ); | 
|         |     34     iName.Copy( aName ); | 
|         |     35     } | 
|         |     36  | 
|         |     37 // ----------------------------------------------------------------------------- | 
|         |     38 // TCodeblock::CheckAddress | 
|         |     39 // Checks if the given address is in this memory block area | 
|         |     40 // ----------------------------------------------------------------------------- | 
|         |     41 // | 
|         |     42 TBool TCodeblock::CheckAddress( TUint32 aAddress ) | 
|         |     43     { | 
|         |     44     if ( iStartAddress <= aAddress && aAddress <= iEndAddress ) | 
|         |     45         { | 
|         |     46         return ETrue; | 
|         |     47         } | 
|         |     48     return EFalse; | 
|         |     49     } | 
|         |     50  | 
|         |     51 // ----------------------------------------------------------------------------- | 
|         |     52 // TCodeblock::Match | 
|         |     53 // Matches if the given parameters represents this memory block  | 
|         |     54 // ----------------------------------------------------------------------------- | 
|         |     55 // | 
|         |     56 TBool TCodeblock::Match( TBuf8<KMaxLibraryName>& aName ) | 
|         |     57     { | 
|         |     58     LOGSTR1( "ATMH TCodeblock::Match()" ); | 
|         |     59     return ( 0 == iName.CompareF( aName ) ) ? ETrue : EFalse; | 
|         |     60     } | 
|         |     61  | 
|         |     62 // End of File |