sl@0: // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of the License "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // sl@0: sl@0: #ifndef __NONXIP__ sl@0: #define __NONXIP__ sl@0: sl@0: #ifndef __MSVCDOTNET__ sl@0: #pragma warning(push, 3) // cannot compile MSVC's STL at warning level 4 sl@0: #pragma warning(disable: 4786 4710 4530) sl@0: #endif //__MSVCDOTNET__ sl@0: sl@0: #include sl@0: #include sl@0: #include sl@0: #include "trace.h" sl@0: #include "codespace.h" sl@0: sl@0: class NonXIP sl@0: { sl@0: friend class ObyFile; sl@0: typedef std::vector FilesVec; sl@0: sl@0: struct OrigName sl@0: { sl@0: OrigName() : iName(""), iId(0) {} sl@0: OrigName(const char* aName, int aId) : iName(aName), iId(aId) {} sl@0: std::string iName; sl@0: int iId; sl@0: }; sl@0: typedef std::map NamesMap; sl@0: sl@0: struct Segment sl@0: { sl@0: PC iSegSize; sl@0: NamesMap::const_iterator iName; sl@0: bool iUnloaded; sl@0: }; sl@0: typedef std::map SegData; sl@0: sl@0: public: sl@0: enum TReportMask {ENonXip=1, ENodebugSupport=2}; sl@0: sl@0: NonXIP(); sl@0: ~NonXIP(); sl@0: sl@0: void AddObyFile(const char* aName) {iObyFiles.push_back(aName);} sl@0: void AddSymbolFile(const char* aName) {iSymbolFiles.push_back(aName);} sl@0: sl@0: void CreateNamesMap(); sl@0: void SetMappedCodeSpace(MappedCodeSpace* aCodeSpace) {iCodeSpace = aCodeSpace;} sl@0: sl@0: void AddSegment(PC aAddress, PC aSegSize, const char *aSegName); sl@0: void DeleteSegment(PC aAddress); sl@0: sl@0: unsigned int iRowBufferErrors; sl@0: unsigned int iCookBufferErrors; sl@0: unsigned int iReportMask; sl@0: sl@0: private: sl@0: void AddObyNames(const char* aOrigName, const char* aSegName); sl@0: bool TryUnDeleteSegment(PC aAddress, PC aSegSize, const char *aSegName); sl@0: sl@0: private: sl@0: FilesVec iObyFiles; sl@0: FilesVec iSymbolFiles; sl@0: NamesMap iNamesMap; sl@0: int iCurId; sl@0: MappedCodeSpace* iCodeSpace; sl@0: SegData iSegData; sl@0: std::vector iSymbols; sl@0: sl@0: }; sl@0: sl@0: #endif // __NONXIP__