debugsrv/runmodedebug/rmdriver/src/d_process_tracker.cpp
changeset 56 aa2539c91954
parent 42 0ff24a8f6ca2
equal deleted inserted replaced
54:a151135b0cf9 56:aa2539c91954
     1 // Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
     1 // Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     3 // This component and the accompanying materials are made available
     4 // under the terms of the License "Eclipse Public License v1.0"
     4 // under the terms of "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 //
     7 //
     8 // Initial Contributors:
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
     9 // Nokia Corporation - initial contribution.
    40 	}
    40 	}
    41 
    41 
    42 /**
    42 /**
    43  * dtor
    43  * dtor
    44  * Go through forzen thread list and resume each one before clearing our structures
    44  * Go through forzen thread list and resume each one before clearing our structures
    45  * @internalTechnology
       
    46  */
    45  */
    47 DProcessTracker::~DProcessTracker()
    46 DProcessTracker::~DProcessTracker()
    48 	{
    47 	{
    49 
    48 
    50 	for(TInt i=0; i<iFrozenThreadSemaphores.Count(); i++)
    49 	for(TInt i=0; i<iFrozenThreadSemaphores.Count(); i++)
    60 	iAgentsAttachedToAll.ResetAndDestroy();
    59 	iAgentsAttachedToAll.ResetAndDestroy();
    61 	NKern::ThreadLeaveCS();
    60 	NKern::ThreadLeaveCS();
    62 	}
    61 	}
    63 
    62 
    64 /**
    63 /**
    65  * @internalTechnology
       
    66  *
    64  *
    67  * Creates and stores an internal mapping of debug agent to debugged process.
    65  * Creates and stores an internal mapping of debug agent to debugged process.
    68  * Note that an individual process may be mapped to a number of debug agents.
    66  * Note that an individual process may be mapped to a number of debug agents.
    69  *
    67  *
    70  * @param aProcessName - The fullly qualified path of the debugged process. E.g. z:\sys\bin\hello_world.exe
    68  * @param aProcessName - The fullly qualified path of the debugged process. E.g. z:\sys\bin\hello_world.exe
   160 		return iProcesses.Append(tmpProcess);
   158 		return iProcesses.Append(tmpProcess);
   161 		}
   159 		}
   162 	}
   160 	}
   163 
   161 
   164 /**
   162 /**
   165  * @internalTechnology
       
   166  * 
   163  * 
   167  * Removes a previously created mapping between a debug agent and a debugged process,
   164  * Removes a previously created mapping between a debug agent and a debugged process,
   168  * as created by AttachProcess.
   165  * as created by AttachProcess.
   169  *
   166  *
   170  * @param aProcessName - The fully qualified path of the debugged process. E.g. z:\sys\bin\hello_world.exe
   167  * @param aProcessName - The fully qualified path of the debugged process. E.g. z:\sys\bin\hello_world.exe
   237 
   234 
   238 	return KErrNone;
   235 	return KErrNone;
   239 	}
   236 	}
   240 
   237 
   241 /**
   238 /**
   242  * @internalTechnology
       
   243  *
   239  *
   244  * Detachs a debug agent from every process being debugged. Used when a debug agent is being detached
   240  * Detachs a debug agent from every process being debugged. Used when a debug agent is being detached
   245  * from the debug security server and has not supplied a specific process name from which to detach.
   241  * from the debug security server and has not supplied a specific process name from which to detach.
   246  */
   242  */
   247 TInt DProcessTracker::DetachAgent(const TUint64 aAgentId)
   243 TInt DProcessTracker::DetachAgent(const TUint64 aAgentId)
   285 		
   281 		
   286 	return KErrNone;
   282 	return KErrNone;
   287 	}
   283 	}
   288 
   284 
   289 /**
   285 /**
   290  * @internalTechnology
       
   291  *
   286  *
   292  * Returns a pointer to a DTargetProcess object representing the mapping of a debugged process
   287  * Returns a pointer to a DTargetProcess object representing the mapping of a debugged process
   293  * with all the relevant debug agents interested in that process, as determined
   288  * with all the relevant debug agents interested in that process, as determined
   294  * by AttachProcess.
   289  * by AttachProcess.
   295  *
   290  *
   328 
   323 
   329 	return found;
   324 	return found;
   330 	}
   325 	}
   331 
   326 
   332 /**
   327 /**
   333  * @internalTechnology
       
   334  *
   328  *
   335  * Returns a pointer to a DTargetProcess object representing the mapping of a debugged process
   329  * Returns a pointer to a DTargetProcess object representing the mapping of a debugged process
   336  * with all the relevant debug agents interested in that process, as determined
   330  * with all the relevant debug agents interested in that process, as determined
   337  * by AttachProcess.
   331  * by AttachProcess.
   338  *
   332  *