Update contrib.
1 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of the License "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // some utility classes for writing data to buffer
22 #ifndef __CRASH_LOG_WALKER_H_INCLUDED__
23 #define __CRASH_LOG_WALKER_H_INCLUDED__
26 #include <rm_debug_api.h>
28 #include <scmdatatypes.h>
34 * This class provides functionality to walk through a crash log in a data buffer
35 * ensuring it is valid and getting the information we require back
40 TCrashLogWalker(TDesC8& aBuffer);
42 TInt ReadLogHeader(const TInt aStartPoint);
43 TInt GetCrashSize() const;
44 TInt GetCrashId() const;
45 const TRmdArmExcInfo& GetCrashContext() const;
46 const TCrashInfoHeader& GetCrashHeader() const;
47 const TCrashOffsetsHeader& GetOffsetsHeader() const;
49 #ifndef __KERNEL_MODE__
50 MByteStreamSerializable* GetNextDataTypeL(TInt& aPos, SCMStructId& aId, TInt& aBufferSize);
51 TRawData* GetRawDataTypeL(TInt& aPos, TInt& aBufferSize, TDes8& aRawBuf, TInt aStartRawPosition = 0);
54 void UpdateBuffer(TDesC8& aBuffer);
58 void HelpAssignRegisterToContext(const TRegisterValue& aRegVal);
61 TDesC8& iBuffer; //buffer containing data for the log we are walking - not all of it, just the bit of interest
62 TCrashInfoHeader iCrashHeader; //Stores the header of the log we are walking
63 TCrashOffsetsHeader iOffsets; //Stores the offsets header of the log we are walking
64 TRmdArmExcInfo iContext; //Stores the register context of the log we are walking
66 TByteStreamReader iReader;
75 #endif // __CRASH_LOG_WALKER_H_INCLUDED__