|
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 // ----------------------------------------------------------------------------- |
|
63 // TCodeblock::EndAddress |
|
64 // Returns specific segment's end address |
|
65 // ----------------------------------------------------------------------------- |
|
66 // |
|
67 TUint32 TCodeblock::EndAddress() |
|
68 { |
|
69 return iEndAddress; |
|
70 } |
|
71 |
|
72 // ----------------------------------------------------------------------------- |
|
73 // TCodeblock::StartAddress |
|
74 // Returns specific segment's start address |
|
75 // ----------------------------------------------------------------------------- |
|
76 // |
|
77 TUint32 TCodeblock::StartAddress() |
|
78 { |
|
79 return iStartAddress; |
|
80 } |
|
81 |
|
82 // ----------------------------------------------------------------------------- |
|
83 // TCodeblock::Name |
|
84 // Gets specific segment's name |
|
85 // ----------------------------------------------------------------------------- |
|
86 // |
|
87 void TCodeblock::Name( TDes8& aName ) |
|
88 { |
|
89 aName.Copy( iName ); |
|
90 } |
|
91 |
|
92 // End of File |