debugsrv/runmodedebug/securityserver/src/c_security_svr_session.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.
    13 // Description:
    13 // Description:
    14 // Provides the debug security server session implementation.
    14 // Provides the debug security server session implementation.
    15 // 
    15 // 
    16 //
    16 //
    17 
    17 
    18 /**
       
    19  @file
       
    20  @internalTechnology
       
    21  @released
       
    22 */
       
    23 
    18 
    24 // Needed so we get the text strings for capabilities
    19 // Needed so we get the text strings for capabilities
    25 #define __INCLUDE_CAPABILITY_NAMES__
    20 #define __INCLUDE_CAPABILITY_NAMES__
    26 
    21 
    27 #include <e32std.h>
    22 #include <e32std.h>
    28 #include <e32std_private.h>
    23 #include <e32std_private.h>
    29 #include <e32btrace.h>
       
    30 #include <d32btrace.h>
    24 #include <d32btrace.h>
    31 #include <e32base.h>
    25 #include <e32base.h>
    32 #include <e32base_private.h>
    26 #include <e32base_private.h>
    33 #include <e32uid.h>
    27 #include <e32uid.h>
    34 #include <f32file.h>
    28 #include <f32file.h>
   595 
   589 
   596 	aMessage.Complete(KErrNone);
   590 	aMessage.Complete(KErrNone);
   597 	}
   591 	}
   598 
   592 
   599 /**
   593 /**
   600 @internalTechnology
       
   601 
   594 
   602 Notes: This call is used to set a thread specific breakpoint. Its input arguments
   595 Notes: This call is used to set a thread specific breakpoint. Its input arguments
   603 are the thread id, address and architecture type of the breakpoint. It returns success
   596 are the thread id, address and architecture type of the breakpoint. It returns success
   604 or failure, and if successful, it sets the TBreakId in the Debug Agent to the 
   597 or failure, and if successful, it sets the TBreakId in the Debug Agent to the 
   605 breakpoint id by which it can be referenced in future calls to ModifyBreak,ClearBreak and
   598 breakpoint id by which it can be referenced in future calls to ModifyBreak,ClearBreak and
   727 
   720 
   728 	aMessage.Complete(KErrNone);
   721 	aMessage.Complete(KErrNone);
   729 	}
   722 	}
   730 
   723 
   731 /**
   724 /**
   732 @internalTechnology
       
   733 
   725 
   734 Modify a previously set breakpoint.
   726 Modify a previously set breakpoint.
   735 
   727 
   736 @param aMessage.Int0() - The breakpoint id of the breakpoint to modify
   728 @param aMessage.Int0() - The breakpoint id of the breakpoint to modify
   737 @param aMessage.Ptr1() - The new Thread Id for the breakpoint
   729 @param aMessage.Ptr1() - The new Thread Id for the breakpoint
   776 
   768 
   777 	aMessage.Complete(KErrNone);
   769 	aMessage.Complete(KErrNone);
   778 	}
   770 	}
   779 
   771 
   780 /**
   772 /**
   781 @internalTechnology
       
   782 
   773 
   783 Notes: This call is used to set a process wide breakpoint. Its input arguments
   774 Notes: This call is used to set a process wide breakpoint. Its input arguments
   784 are the process id, address and architecture type of the breakpoint. It returns success
   775 are the process id, address and architecture type of the breakpoint. It returns success
   785 or failure, and if successful, it sets the TBreakId in the Debug Agent to the 
   776 or failure, and if successful, it sets the TBreakId in the Debug Agent to the 
   786 breakpoint id by which it can be referenced in future calls to ModifyBreak,ClearBreak and
   777 breakpoint id by which it can be referenced in future calls to ModifyBreak,ClearBreak and
   825 
   816 
   826 	aMessage.Complete(KErrNone);
   817 	aMessage.Complete(KErrNone);
   827 	}
   818 	}
   828 
   819 
   829 /**
   820 /**
   830 @internalTechnology
       
   831 
   821 
   832 Modify a previously set process breakpoint.
   822 Modify a previously set process breakpoint.
   833 
   823 
   834 @param aMessage.Int0() - The breakpoint id of the breakpoint to modify
   824 @param aMessage.Int0() - The breakpoint id of the breakpoint to modify
   835 @param aMessage.Ptr1() - The new Process Id for the breakpoint
   825 @param aMessage.Ptr1() - The new Process Id for the breakpoint
  1265 	//get the debug agent's process
  1255 	//get the debug agent's process
  1266 	RProcess debugAgentProcess;
  1256 	RProcess debugAgentProcess;
  1267 
  1257 
  1268 	CleanupClosePushL(debugAgentProcess);
  1258 	CleanupClosePushL(debugAgentProcess);
  1269 
  1259 
  1270 	debugAgentProcess.Open(iDebugAgentProcessId);
  1260 	User::LeaveIfError(debugAgentProcess.Open(iDebugAgentProcessId));
  1271 
  1261 
  1272 	// We have now obtained a process handle based on the token executable, so we can check its security properties.
  1262 	// We have now obtained a process handle based on the token executable, so we can check its security properties.
  1273 	TSecurityInfo secInfo(debugAgentProcess);
  1263 	TSecurityInfo secInfo(debugAgentProcess);
  1274 
  1264 
  1275 	// Compute the name of the OEM debug token based on the SID of the debug agent
  1265 	// Compute the name of the OEM debug token based on the SID of the debug agent