sl@0: // Copyright (c) 2006-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: // Purpose: Kernel-side tracking of process state sl@0: // sl@0: // sl@0: sl@0: #ifndef D_TARGET_PROCESS_H sl@0: #define D_TARGET_PROCESS_H sl@0: sl@0: #include "d_debug_agent.h" sl@0: sl@0: // Debug Process Tracker class sl@0: class DTargetProcess : public DBase sl@0: { sl@0: public: sl@0: DTargetProcess(); sl@0: ~DTargetProcess(); sl@0: sl@0: static TInt Compare(const DTargetProcess& aFirst, const DTargetProcess& aSecond); sl@0: sl@0: TInt SetProcessName(const TDesC8& aProcessName); sl@0: sl@0: const TPtr8& ProcessName(void); sl@0: sl@0: TInt AddAgent(const TUint64 aAgentId); sl@0: sl@0: TInt RemoveAgent(TUint64 aAgentId); sl@0: sl@0: DDebugAgent* operator[](TInt aIndex); sl@0: sl@0: DDebugAgent* Agent(TUint64 aAgentId); sl@0: sl@0: TInt AgentCount(void); sl@0: TInt ResumeThread(DThread* aThread); sl@0: TInt SuspendThread(DThread* aThread, TBool aFreezeThread=EFalse); sl@0: TBool CheckSuspended(DThread* aThread) const; sl@0: void FSWait(); sl@0: TBool HasSuspendedThreads() const; sl@0: void NotifyEvent(const TDriverEventInfo& aEventInfo); sl@0: sl@0: private: sl@0: TInt ResumeFrozenThread(NThread& aThread); sl@0: TInt ResumeSuspendedThread(DThread* aThread); sl@0: TInt FreezeThread(); sl@0: TInt DoSuspendThread(DThread* aThread); sl@0: sl@0: private: sl@0: TPtr8 iProcessName; sl@0: sl@0: RPointerArray iAgentList; sl@0: sl@0: RArray iSuspendedThreads; sl@0: sl@0: RPointerArray iFrozenThreadSemaphores; sl@0: sl@0: }; sl@0: sl@0: #endif // D_TARGET_PROCESS_H sl@0: