epoc32/include/tools/coredump/crashdatasource.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
williamr@4
     1
// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
williamr@4
     2
// All rights reserved.
williamr@4
     3
// This component and the accompanying materials are made available
williamr@4
     4
// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
williamr@4
     5
// which accompanies this distribution, and is available
williamr@4
     6
// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
williamr@4
     7
//
williamr@4
     8
// Initial Contributors:
williamr@4
     9
// Nokia Corporation - initial contribution.
williamr@4
    10
//
williamr@4
    11
// Contributors:
williamr@4
    12
//
williamr@4
    13
// Description:
williamr@4
    14
// Definition of Data Source API that supplies crash information. 
williamr@4
    15
//
williamr@4
    16
williamr@4
    17
williamr@4
    18
williamr@4
    19
/**
williamr@4
    20
 @file
williamr@4
    21
 @publishedPartner 
williamr@4
    22
 @released
williamr@4
    23
*/
williamr@4
    24
williamr@4
    25
williamr@4
    26
#ifndef CRASH_DATA_SOURCE_H
williamr@4
    27
#define CRASH_DATA_SOURCE_H
williamr@4
    28
williamr@4
    29
#include <e32std.h>
williamr@4
    30
#include <e32base.h>
williamr@4
    31
williamr@4
    32
#include <crashdata.h>
williamr@4
    33
#include <processdata.h>
williamr@4
    34
#include <executabledata.h>
williamr@4
    35
#include <threaddata.h>
williamr@4
    36
williamr@4
    37
williamr@4
    38
/**
williamr@4
    39
Definition of the Data Source API. This API is used by formatters to obtain crash data from 
williamr@4
    40
the Core Dump Server. The Core Dump Server derives and implements this API.
williamr@4
    41
*/
williamr@4
    42
class CCrashDataSource : public CBase
williamr@4
    43
{
williamr@4
    44
protected:
williamr@4
    45
williamr@4
    46
	/** Standard second-phase constructor. */
williamr@4
    47
	virtual void ConstructL() = 0;
williamr@4
    48
	
williamr@4
    49
public:
williamr@4
    50
	
williamr@4
    51
	/** 
williamr@4
    52
	This call returns information on all available registers. It does not
williamr@4
    53
	return the register contents. This is used to establish which registers 
williamr@4
    54
	a caller could ask for, in particular for Co Processor registers. 
williamr@4
    55
	The callee (not the caller) allocates aRegisterList. 
williamr@4
    56
	This method is used by a formatter to establish which registers it can ask for, 
williamr@4
    57
	and thus need only be called once per session. 
williamr@4
    58
williamr@4
    59
    @param aRegisterList Returned register list with available registers.
williamr@4
    60
williamr@4
    61
    @see TRegisterData.
williamr@4
    62
	@see RRegisterList.
williamr@4
    63
	*/
williamr@4
    64
	virtual void GetRegisterListL( RRegisterList  &	aRegisterList ) = 0;
williamr@4
    65
williamr@4
    66
	/** 
williamr@4
    67
	Ask the Core Dump server for some register data. The caller allocates
williamr@4
    68
	the array and fills in the details of the registers for which it would like 
williamr@4
    69
	the contents.
williamr@4
    70
	@param aThreadId Thread to read registers from.
williamr@4
    71
	@param aRegisterList Returned register list with current values.
williamr@4
    72
williamr@4
    73
    @see TRegisterData.
williamr@4
    74
	@see GetRegisterListL().
williamr@4
    75
	@see RRegisterList.
williamr@4
    76
	*/
williamr@4
    77
	virtual void ReadRegistersL( const TUint64 aThreadId, RRegisterList &aRegisterList ) = 0;
williamr@4
    78
williamr@4
    79
	/**
williamr@4
    80
 	Read data from target relative to a particular thread. 
williamr@4
    81
	The caller assumes ownership of the resulting data descriptor.
williamr@4
    82
 	
williamr@4
    83
 	@param aThreadId Memory read is relative to this thread parameter
williamr@4
    84
	@param aAddress Virtual address to read from
williamr@4
    85
    @param aLength Number of bytes to read
williamr@4
    86
	@param aData Descriptor for read data
williamr@4
    87
	*/
williamr@4
    88
	virtual void ReadMemoryL(
williamr@4
    89
                   const TUint64    aThreadId,
williamr@4
    90
                   const TUint32    aAddress,
williamr@4
    91
                   const TUint32    aLength,
williamr@4
    92
                   TDes8          & aData ) = 0;
williamr@4
    93
williamr@4
    94
williamr@4
    95
	/**
williamr@4
    96
 	Read the current process list.
williamr@4
    97
	The caller assumes ownership of resulting data.
williamr@4
    98
	@param aData Array of currently running processes . 
williamr@4
    99
	
williamr@4
   100
	@see RProcessPointerList.
williamr@4
   101
	@see CProcessInfo.
williamr@4
   102
	*/
williamr@4
   103
	virtual void GetProcessListL( RProcessPointerList & aData )
williamr@4
   104
		{
williamr@4
   105
		TUint totalProcessListDescSize;
williamr@4
   106
		GetProcessListL( aData, totalProcessListDescSize );
williamr@4
   107
		};
williamr@4
   108
williamr@4
   109
	/**
williamr@4
   110
 	Read the current process list.
williamr@4
   111
	The caller assumes ownership of the resulting data.
williamr@4
   112
	This call is only useful if the total descriptor size required for 
williamr@4
   113
	transferring across the client-server boundary must be known.
williamr@4
   114
	
williamr@4
   115
 	@param aData	Array of currently running processes. 
williamr@4
   116
	@param aTotalProcessListDescSize Total descriptor size required 
williamr@4
   117
	to transfer the list across the client-server interface.
williamr@4
   118
williamr@4
   119
    @see RProcessPointerList.
williamr@4
   120
	@see CProcessInfo.
williamr@4
   121
	*/
williamr@4
   122
	virtual void GetProcessListL( RProcessPointerList & aData, 
williamr@4
   123
						         TUint & aTotalProcessListDescSize ) = 0;
williamr@4
   124
williamr@4
   125
williamr@4
   126
	/**
williamr@4
   127
 	Read the current executable list. The caller assumes ownership of the resulting data.
williamr@4
   128
	@param aData Array of current executables. 
williamr@4
   129
williamr@4
   130
	@see RExecutablePointerList.
williamr@4
   131
	@see CExecutableInfo
williamr@4
   132
	*/
williamr@4
   133
	virtual void GetExecutableListL( RExecutablePointerList & aData )
williamr@4
   134
		{
williamr@4
   135
		TUint totalExecutableListDescSize;
williamr@4
   136
		GetExecutableListL( aData, totalExecutableListDescSize );
williamr@4
   137
		};
williamr@4
   138
williamr@4
   139
williamr@4
   140
	/**
williamr@4
   141
 	Read the current executable list.
williamr@4
   142
	The caller assumes ownership of the resulting data.
williamr@4
   143
	This call is only useful if the total descriptor size required for 
williamr@4
   144
	transferring across the client-server boundary must be known.
williamr@4
   145
	
williamr@4
   146
 	@param aData	Array of current executables. 
williamr@4
   147
	@param aTotalExecutableListDescSize	Total descriptor size required 
williamr@4
   148
	to transfer the list across the client-server interface.
williamr@4
   149
williamr@4
   150
	@see RExecutablePointerList.
williamr@4
   151
	@see CExecutableInfo
williamr@4
   152
	*/
williamr@4
   153
	virtual void GetExecutableListL( RExecutablePointerList & aData, 
williamr@4
   154
						         TUint & aTotalExecutableListDescSize ) = 0;
williamr@4
   155
williamr@4
   156
williamr@4
   157
 	/** 
williamr@4
   158
	Read the current thread list.
williamr@4
   159
	This call is only useful if the total descriptor size required for 
williamr@4
   160
	transferring across the client-server boundary must be known.
williamr@4
   161
williamr@4
   162
	@param aProcessId If this argument is -1, all the threads in the 
williamr@4
   163
	system are returned. Otherwise the threads under the process with the id
williamr@4
   164
	aProcessId are returned.
williamr@4
   165
 	@param aThreadList Array of currently running threads. 
williamr@4
   166
	@param aTotalThreadListDescSize Size in bytes of the descriptor 
williamr@4
   167
	required to transfer the data over the client server interface.
williamr@4
   168
williamr@4
   169
  	@see CThreadInfo
williamr@4
   170
    @see RThreadPointerList.
williamr@4
   171
	@see GetThreadListL
williamr@4
   172
	*/
williamr@4
   173
	virtual void GetThreadListL( const TUint64 aProcessId, 
williamr@4
   174
						RThreadPointerList & aThreadList,
williamr@4
   175
						TUint & aTotalThreadListDescSize ) = 0;
williamr@4
   176
williamr@4
   177
	/**
williamr@4
   178
 	Read the current thread list.
williamr@4
   179
	The caller assumes ownership of the resulting data.
williamr@4
   180
	
williamr@4
   181
	@param aProcessId If this argument is -1, all the threads in the 
williamr@4
   182
	system are returned. Otherwise the threads under the process with the id
williamr@4
   183
	aProcessId are returned.
williamr@4
   184
 	@param aThreadList	Array of currently running threads.
williamr@4
   185
	
williamr@4
   186
	@see CThreadInfo
williamr@4
   187
	@see RThreadPointerList
williamr@4
   188
	*/
williamr@4
   189
  	virtual void GetThreadListL( const TUint64 aProcessId, 
williamr@4
   190
								 RThreadPointerList & aThreadList )
williamr@4
   191
		{
williamr@4
   192
		TUint totalThreadListDescSize;
williamr@4
   193
		GetThreadListL(	aProcessId, aThreadList, totalThreadListDescSize );
williamr@4
   194
		};
williamr@4
   195
williamr@4
   196
    /**
williamr@4
   197
	Obtain a list of the code segments for a process. 
williamr@4
   198
	
williamr@4
   199
	@param aTid Thread identifier to obtain code segments for.
williamr@4
   200
	@param aCodeSegs Array of code segments. 
williamr@4
   201
	@param aTotalCodeSegListDescSize Size in bytes of the descriptor 
williamr@4
   202
	required to transfer the data over the client server interface.
williamr@4
   203
williamr@4
   204
	@see RCodeSegPointerList
williamr@4
   205
	@see TSegmentInfo
williamr@4
   206
	*/
williamr@4
   207
    virtual void GetCodeSegmentsL(const TUint64 aTid, 
williamr@4
   208
									RCodeSegPointerList &aCodeSegs, 
williamr@4
   209
									TUint &aTotalCodeSegListDescSize ) = 0;
williamr@4
   210
williamr@4
   211
    /**
williamr@4
   212
	Obtain a list of the code segments for a process. 
williamr@4
   213
williamr@4
   214
	@param aTid Thread identifier to obtain code segments for.
williamr@4
   215
	@param aCodeSegs Array of code segments. 
williamr@4
   216
williamr@4
   217
	@see RCodeSegPointerList
williamr@4
   218
	@see TSegmentInfo
williamr@4
   219
	*/
williamr@4
   220
    virtual void GetCodeSegmentsL(const TUint64 aTid, RCodeSegPointerList &aCodeSegs)
williamr@4
   221
        {
williamr@4
   222
        TUint totalThreadListDescSize;
williamr@4
   223
        GetCodeSegmentsL(aTid, aCodeSegs, totalThreadListDescSize);
williamr@4
   224
        };
williamr@4
   225
williamr@4
   226
	/** For future expansion
williamr@4
   227
	@internalTechnology */
williamr@4
   228
	TUint32 iSpare1;
williamr@4
   229
williamr@4
   230
	/** @internalTechnology */
williamr@4
   231
	TUint32 iSpare2;
williamr@4
   232
};
williamr@4
   233
williamr@4
   234
#endif // CRASH_DATA_SOURCE_H
williamr@4
   235
williamr@4
   236