20
|
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: Interface definition for locating code lines using memory addresses.
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
#ifndef __IADDRESSTOLINE_H__
|
|
18 |
#define __IADDRESSTOLINE_H__
|
|
19 |
|
|
20 |
#include "ATCommonDefines.h"
|
|
21 |
|
|
22 |
class CATMemoryAddress;
|
|
23 |
|
|
24 |
/**
|
|
25 |
* Codeline locating interface. Thru this interface CATModule2 locates code lines
|
|
26 |
* using different implementations depending on platform.
|
|
27 |
*/
|
|
28 |
class IAddressToLine
|
|
29 |
{
|
|
30 |
public:
|
|
31 |
IAddressToLine() {};
|
|
32 |
virtual ~IAddressToLine() {};
|
|
33 |
/**
|
|
34 |
* Open binary.
|
|
35 |
* @sString
|
|
36 |
* @iNumber
|
|
37 |
* @return true if successful.
|
|
38 |
*/
|
|
39 |
virtual bool Open( const string& sString, const unsigned long iLong) = 0;
|
|
40 |
|
|
41 |
/**
|
|
42 |
* Get error string. In case of any method failed use this to acquire details on error.
|
|
43 |
* @return error string.
|
|
44 |
*/
|
|
45 |
virtual string GetError( void ) = 0;
|
|
46 |
|
|
47 |
/**
|
|
48 |
* Close binary.
|
|
49 |
* @return true if succesful.
|
|
50 |
*/
|
|
51 |
virtual bool Close( void ) = 0;
|
|
52 |
|
|
53 |
/**
|
|
54 |
* Locate code line and file for given address.
|
|
55 |
* @result
|
|
56 |
* @return true if successful.
|
|
57 |
*/
|
|
58 |
virtual bool AddressToLine( CATMemoryAddress* result ) = 0;
|
|
59 |
};
|
|
60 |
#endif |