Debug::RSecuritySvrSession Class Reference

class Debug::RSecuritySvrSession : public RSessionBase

Client side API to debug security server (DSS). Interaction with the DSS should be conducted through this class only.

Inherits from

Public Member Functions
RSecuritySvrSession ()
TInt AttachExecutable (const TDesC &, TBool )
TInt BreakInfo (const TBreakId , TThreadId &, TUint32 &, TArchitectureMode &)
TInt CancelGetEvent (const TDesC &)
TInt ClearBreak (const TBreakId )
TInt Close ()
TInt Connect (const TVersion )
TInt DetachExecutable (const TDesC &)
TInt EraseCrashFlashPartition ()
TInt EraseCrashLog (const TUint32 , const TUint32 )
TInt GetDebugFunctionality ( TDes8 &)
TInt GetDebugFunctionalityBufSize ( TUint32 *)
void GetEvent (const TDesC &, TRequestStatus &, TDes8 &)
TInt GetList (const TListId , TDes8 &, TUint32 &)
TInt GetList (const TThreadId , const TListId , TDes8 &, TUint32 &)
TInt GetList (const TProcessId , const TListId , TDes8 &, TUint32 &)
TInt KillProcess (const TProcessId , const TInt )
TInt ModifyBreak (const TBreakId , const TThreadId , const TUint32 , const TArchitectureMode )
TInt ModifyProcessBreak (const TBreakId , const TProcessId , const TUint32 , const TArchitectureMode )
TInt ProcessBreakInfo (const TBreakId , TProcessId &, TUint32 &, TArchitectureMode &)
TInt ReadCrashLog (const TUint32 , TDes8 &, const TUint32 )
TInt ReadMemory (const TThreadId , const TUint32 , const TUint32 , TDes8 &, const TAccess , const TEndianess )
TInt ReadRegisters (const TThreadId , const TDesC8 &, TDes8 &, TDes8 &)
TInt ResumeThread (const TThreadId )
TInt SetBreak ( TBreakId &, const TThreadId , const TUint32 , const TArchitectureMode )
TInt SetEventAction (const TDesC &, TEventType , TKernelEventAction )
TInt SetProcessBreak ( TBreakId &, const TProcessId , const TUint32 , const TArchitectureMode )
TInt Step (const TThreadId , TUint32 )
TInt SuspendThread (const TThreadId )
TVersion Version ()
TInt WriteCrashConfig (const TUint32 , const TDesC8 &, TUint32 &)
TInt WriteMemory (const TThreadId , const TUint32 , const TUint32 , const TDesC8 &, const TAccess , const TEndianess )
TInt WriteRegisters (const TThreadId , const TDesC8 &, const TDesC8 &, TDes8 &)
Private Member Functions
TInt StartServer (void)
Inherited Functions
RHandleBase::Attributes()const
RHandleBase::BTraceId()const
RHandleBase::DoExtendedClose()
RHandleBase::Duplicate(const RThread &,TOwnerType)
RHandleBase::FullName()const
RHandleBase::FullName(TDes &)const
RHandleBase::Handle()const
RHandleBase::HandleInfo(THandleInfo *)
RHandleBase::Name()const
RHandleBase::NotifyDestruction(TRequestStatus &)
RHandleBase::Open(const TFindHandleBase &,TOwnerType)
RHandleBase::OpenByName(const TDesC &,TOwnerType,TInt)
RHandleBase::RHandleBase()
RHandleBase::RHandleBase(TInt)
RHandleBase::SetHandle(TInt)
RHandleBase::SetHandleNC(TInt)
RSessionBase::CreateSession(RServer2,const TVersion &)
RSessionBase::CreateSession(RServer2,const TVersion &,TInt)
RSessionBase::CreateSession(RServer2,const TVersion &,TInt,TIpcSessionType,const TSecurityPolicy *,TRequestStatus *)
RSessionBase::CreateSession(const TDesC &,const TVersion &)
RSessionBase::CreateSession(const TDesC &,const TVersion &,TInt)
RSessionBase::CreateSession(const TDesC &,const TVersion &,TInt,TIpcSessionType,const TSecurityPolicy *,TRequestStatus *)
RSessionBase::CreateSession(const TDesC &,const TVersion &,TInt,TRequestStatus *)
RSessionBase::Open(RMessagePtr2,TInt,TOwnerType)
RSessionBase::Open(RMessagePtr2,TInt,const TSecurityPolicy &,TOwnerType)
RSessionBase::Open(TInt,TOwnerType)
RSessionBase::Open(TInt,const TSecurityPolicy &,TOwnerType)
RSessionBase::Send(TInt)const
RSessionBase::Send(TInt,const TIpcArgs &)const
RSessionBase::SendReceive(TInt)const
RSessionBase::SendReceive(TInt,TRequestStatus &)const
RSessionBase::SendReceive(TInt,const TIpcArgs &)const
RSessionBase::SendReceive(TInt,const TIpcArgs &,TRequestStatus &)const
RSessionBase::SetReturnedHandle(TInt)
RSessionBase::SetReturnedHandle(TInt,RHandleBase &)
RSessionBase::SetReturnedHandle(TInt,const TSecurityPolicy &)
RSessionBase::ShareAuto()
RSessionBase::ShareProtected()
Inherited Enumerations
RHandleBase:TAttributes
RSessionBase:TAttachMode
Inherited Attributes
RHandleBase::iHandle

Constructor & Destructor Documentation

RSecuritySvrSession()

RSecuritySvrSession ( ) [inline]

Server session constructor

Member Functions Documentation

AttachExecutable(const TDesC &, TBool)

TInt AttachExecutable ( const TDesC & aProcessName,
TBool aPassive
) [inline]

Called by a debug agent to request debug privileges for the executable with file name aExecutableName.

Parameters

const TDesC & aProcessName a fully qualified file name of the executable to attach to
TBool aPassive if true then the agent has reduced debug rights.

BreakInfo(const TBreakId, TThreadId &, TUint32 &, TArchitectureMode &)

TInt BreakInfo ( const TBreakId aBreakId,
TThreadId & aThreadId,
TUint32 & aAddress,
TArchitectureMode & aMode
) [inline]

Purpose: Returns the properties associated with a given TBreakId. The supplied break id must previously have been allocated to the debug agent by a SetBreak() call.

Pre-condition
Debug Agent must be connected to the debug security server
Debug Agent must be attached to a process.
The aBreakId must have been previously returned by a SetBreak() call and not subsequently cleared by ClearBreak() .

Parameters

const TBreakId aBreakId the TBreakId returned by a prior SetBreak() call. Must have been set by the same Debug Agent.
TThreadId & aThreadId on return contains the thread id of the thread that the breakpoint is set in
TUint32 & aAddress on return contains the virtual memory address of the breakpoint
TArchitectureMode & aMode on return contains the type of this breakpoint (e.g. ARM/Thumb/Thumb2EE)

CancelGetEvent(const TDesC &)

TInt CancelGetEvent ( const TDesC & aExecutableName ) [inline]

Purpose: Cancel a previously issued asynchronous RSecuritySvrSession::GetEvent call. The previously issued call will immediately complete with the TRequestStatus = KErrCancel

Pre-condition
Debug Agent must be connected to the debug security server
Debug Agent must be attached to the process specified by aProcessName
Debug Agent must have previously issued an RSecuritySvrSession::GetEvent() call.

Parameters

const TDesC & aExecutableName The name of the executable being debugged.

ClearBreak(const TBreakId)

TInt ClearBreak ( const TBreakId aBreakId ) [inline]

Purpose: Clears a previously set thread-specific or process-specific breakpoint.

Pre-condition
Debug Agent must be connected to the debug security server
Debug Agent must be attached to a process.

Parameters

const TBreakId aBreakId The TBreakId returned by a prior SetBreak call. Must have been set by the same Debug Agent.

Close()

TInt Close ( ) [inline]

Close the session and thread

Connect(const TVersion)

TInt Connect ( const TVersion aVersion ) [inline]

Called by a client to create a session with the DSS. This method starts the DSS if it is not running, or connects to it if it already exists.

Parameters

const TVersion aVersion version of the DSS to connect to

DetachExecutable(const TDesC &)

TInt DetachExecutable ( const TDesC & aProcessName ) [inline]

Called by a debug agent to detach from the executable with file name aExecutableName.

Parameters

const TDesC & aProcessName the fully qualified file name of the executable to detach from

EraseCrashFlashPartition()

TInt EraseCrashFlashPartition ( ) [inline]

Purpose: Method to erase entire flash partition

EraseCrashLog(const TUint32, const TUint32)

TInt EraseCrashLog ( const TUint32 aPos,
const TUint32 aBlockNumber
) [inline]

Purpose: Method to erase a block in the crash flash

Parameters

const TUint32 aPos
const TUint32 aBlockNumber

GetDebugFunctionality(TDes8 &)

TInt GetDebugFunctionality ( TDes8 & aBuffer ) [inline]

Get debug functionality text block and place it into aBuffer.

The debug functionality block (DFBlock) is used to provide information about the functionality (i.e. features) which are supported by the rm_debug.ldd device driver.

Calling this function with a suitably sized buffer aBuffer will result in the debug functionality information being stored in aBuffer. The necessary size of aBuffer can be determined by calling DebugFunctionalityBufSize().

The format of the DFBlock is:

         Sub-block 0
Sub-block 1
...
Sub-block N-1
        

The data which will be returned by a call to GetDebugFunctionality() is constant so is guaranteed to fit exactly into the aBuffer allocated, assuming that the size of aBuffer corresponds to the value returned from GetDebugFunctionalityBufSize() .

Each sub-block is composed of a TTagHeader object followed by a C-style array of TTag objects. The sub-block contains information about a particular aspect of the debug sub-system, for example information about the manner in which memory can be accessed. The TTagHeader is comprised of an identifier which determines the type of data it contains, together with the number of TTag elements in the array following the TTagHeader . Each TTag in a sub-block has a unique ID, stored in the TTag::iTagId member variable.

The only sub-block that is guaranteed to exist has TTagHeader::iTagHdrId = ETagHeaderIdCore, all other sub-blocks are optional. The ETagHeaderIdCore sub-block is the first sub-block within the DFBlock. Other sub-blocks may appear in any order after the ETagHeaderIdCore sub-block.

The following is a diagrammatic representation of a sub-block the DFBlock:

         The HHHH represents the tag header ID of a sub-block (TTagHeader::iTagHdrId)
The NNNN represents the number of TTag elements in the sub-block (TTagHeader::iNumTags)
The IIIIIIII represents the ID of the TTag (TTag::iTagId)
The TTTT represents the type of the TTag (TTag::iType)
The SSSS represents the size of the TTag's associated data (TTag::iSize)
The VVVVVVVV represents the TTag's value (TTag::iValue)

0xNNNNHHHH	TTagHeader element for first sub-block (has N1 TTag elements)
0xIIIIIIII	\
0xSSSSTTTT	-- TTag 0
0xVVVVVVVV	/
0xIIIIIIII	\
0xSSSSTTTT	-- TTag 1
0xVVVVVVVV	/
...
0xIIIIIIII	\
0xSSSSTTTT	-- TTag N1 - 1
0xVVVVVVVV	/
0xNNNNHHHH	TTagHeader element for second sub-block (has N2 TTag elements)
0xIIIIIIII	\
0xSSSSTTTT	-- TTag 0
0xVVVVVVVV	/
...
0xIIIIIIII	\
0xSSSSTTTT	-- TTag N2 - 1
0xVVVVVVVV	/
...
0xNNNNHHHH	TTagHeader element for last sub-block (has NX TTag elements)
0xIIIIIIII	\
0xSSSSTTTT	-- TTag 0
0xVVVVVVVV	/
...
0xIIIIIIII	\
0xSSSSTTTT	-- TTag NX - 1
0xVVVVVVVV	/
        
The following example DFBlock contains two sub-blocks (values taken from enums below):
  • ETagHeaderIdCore

  • ETagHeaderIdMemory

         Binary		Meaning					Value

0x000A0000	iTagHdrId, iNumTags		ETagHeaderIdCore, ECoreLast
0x00000000	iTagId					ECoreEvents
0x00000000	iType, iSize			ETagTypeBoolean, 0
0x00000001	iValue					ETrue
0x00000001	iTagId					ECoreStartStop
0x00000000	iType, iSize			ETagTypeBoolean, 0
0x00000001	iValue					ETrue
...
0x00000008	iTagId					ECoreHardware
0x00000000	iType, iSize			ETagTypeBoolean, 0
0x00000000	iValue					EFalse
0x00000009	iTagId					ECoreApiConstants
0x00000000	iType, iSize			ETagTypeBoolean, 0
0x00000001	iValue					ETrue

0x000A0001	iTagHdrId, iNumTags		ETagHeaderIdMemory, EMemoryLast
0x00000000	iTagId					EMemoryRead
0x00000000	iType, iSize			ETagTypeBoolean, 0
0x00000001	iValue					ETrue
0x00000001	iTagId					EMemoryWrite
0x00000000	iType, iSize			ETagTypeBoolean, 0
0x00000001	iValue					ETrue
...
0x00000008	iTagId					EMemoryLE8
0x00000000	iType, iSize			ETagTypeBoolean, 0
0x00000001	iValue					ETrue
0x00000009	iTagId					EMemoryMaxBlockSize
0x00000001	iType, iSize			ETagTypeTUint32, 0
0x00004000	iValue					0x4000
        
  • Debug Agent DFBlock Processing:

Debug Agents MUST understand and process the ETagHeaderIdCore block. The other blocks may be ignored if not recognised. Tags within each block may be ignored if not recognised.

Pre-condition
aBuffer.MaxLength() >= *aBufSize where aBufSize is set by a call to: RSecuritySvrSession::GetDebugFunctionalityBufSize(TUint32 *aBufSize)

Parameters

TDes8 & aBuffer buffer to store functionality block in

GetDebugFunctionalityBufSize(TUint32 *)

TInt GetDebugFunctionalityBufSize ( TUint32 * aBufSize ) [inline]

Get buffer size required to contain Functionality text block.

in-source documentation in rm_debug_api.h

Parameters

TUint32 * aBufSize function will fill this with the required buffer size

GetEvent(const TDesC &, TRequestStatus &, TDes8 &)

void GetEvent ( const TDesC & aExecutableName,
TRequestStatus & aStatus,
TDes8 & aEventInfo
) [inline]

Purpose: Wait for an event to occur to the target executable being debugged. When an event occurs, the TRequestStatus is changed from KRequestPending.

Pre-condition
Debug Agent must be connected to the debug security server
Debug Agent must be attached to a process.
Note 1: Events are reported on a per-executable basis, not per-thread.

Note 2: All the parameters must remain in scope until either CancelGetEvent is called, or until TRequestStatus is changed from KRequestPending. In practice, this generally means these parameters should not be based on the stack, as they may go out of scope before the call completes.

Note 3: TIpcArgs args is allocated on the stack within this function, however, all the data containing in args is transferred in the SendReceive() so it can safely go out of scope after the call has been made.

Parameters

const TDesC & aExecutableName The name of any executable to which the Debug Agent is attached.
TRequestStatus & aStatus Debug Agent request status variable.
TDes8 & aEventInfo Descriptor containing a buffer sufficient for Event information.

GetList(const TListId, TDes8 &, TUint32 &)

TInt GetList ( const TListId aListId,
TDes8 & aListData,
TUint32 & aDataSize
) [inline]

Returns a global listing corresponding to the type specified as aListId. The structure of the returned data depends on the value of aListId, see TListId for details. If aListData is not large enough to contain the listings data then the necessary buffer size is stored in aDataSize and the function returns KErrTooBig. In this case the contents of aListData will not contain useful data.

Note that if the aListData buffer was too small to hold the data then the value returned as aDataSize corresponds to the size of the data at that particular instance. The size of the data will vary over time, for example the thread list will increase and decrease in size as threads are created and destroyed, so re-requesting data with a buffer with max length aDataSize will not necessarily succeed if a list has increased in size between the two calls.

TListId

Parameters

const TListId aListId enum from TListId signifying which type of listing to return
TDes8 & aListData buffer provided by the debug agent in which data can be returned by the debug system
TUint32 & aDataSize if aListData was not large enough to contain the requested data then the necessary buffer size is stored in aDataSize. If aListData was large enough then the value of aDataSize is the length of aListData

GetList(const TThreadId, const TListId, TDes8 &, TUint32 &)

TInt GetList ( const TThreadId aThreadId,
const TListId aListId,
TDes8 & aListData,
TUint32 & aDataSize
) [inline]

Returns a thread-specific listing corresponding to the type specified as aListId. The structure of the returned data depends on the value of aListId, see TListId for details. If aListData is not large enough to contain the listings data then the necessary buffer size is stored in aDataSize and the function returns KErrTooBig. In this case the contents of aListData will not contain useful data.

Note that if the aListData buffer is too small to hold the data then the value returned as aDataSize corresponds to the size of the data at that particular instant. The size of the data will vary over time, for example the thread list will increase and decrease in size as threads are created and destroyed, so re-requesting data with a buffer with max length aDataSize will not necessarily succeed if a list has increased in size between the two calls.

TListId

Parameters

const TThreadId aThreadId thread to return the listing for
const TListId aListId member of TListId signifying which type of listing to return
TDes8 & aListData buffer provided by the debug agent in which data can be returned by the debug system.
TUint32 & aDataSize if aListData was not large enough to contain the requested data then the necessary buffer size is stored in aDataSize. If aListData was large enough then the value of aDataSize is the length of aListData

GetList(const TProcessId, const TListId, TDes8 &, TUint32 &)

TInt GetList ( const TProcessId aProcessId,
const TListId aListId,
TDes8 & aListData,
TUint32 & aDataSize
) [inline]

Returns a process-specific listing corresponding to the type specified as aListId. The structure of the returned data depends on the value of aListId, see TListId for details. If aListData is not large enough to contain the listings data then the necessary buffer size is stored in aDataSize and the function returns KErrTooBig. In this case the contents of aListData will not contain useful data.

Note that if the aListData buffer is too small to hold the data then the value returned as aDataSize corresponds to the size of the data at that particular instant. The size of the data will vary over time, for example the thread list will increase and decrease in size as threads are created and destroyed, so re-requesting data with a buffer with max length aDataSize will not necessarily succeed if a list has increased in size between the two calls.

TListId

Parameters

const TProcessId aProcessId process to return the listing for
const TListId aListId member of TListId signifying which type of listing to return
TDes8 & aListData buffer provided by the debug agent in which data can be returned by the debug system.
TUint32 & aDataSize if aListData was not large enough to contain the requested data then the necessary buffer size is stored in aDataSize. If aListData was large enough then the value of aDataSize is the length of aListData

KillProcess(const TProcessId, const TInt)

TInt KillProcess ( const TProcessId aProcessId,
const TInt aReason
) [inline]

Purpose: Kill the specified process with the supplied reason. Reason codes are equivalent to those in RProcess.Kill() .

Pre-condition
Debug Agent must be connected to the debug security server
Debug Agent must be attached to a process.

Parameters

const TProcessId aProcessId the id of the process which is to be killed
const TInt aReason The reason to be associated with the ending of this process

ModifyBreak(const TBreakId, const TThreadId, const TUint32, const TArchitectureMode)

TInt ModifyBreak ( const TBreakId aBreakId,
const TThreadId aThreadId,
const TUint32 aAddress,
const TArchitectureMode aArchitectureMode
) [inline]

Purpose: Modifies the properties of a previously set breakpoint.

Pre-condition
Debug Agent must be connected to the debug security server
Debug Agent must be attached to a process.

Parameters

const TBreakId aBreakId the TBreakId returned by a prior SetBreak() call. Must have been set by the same Debug Agent.
const TThreadId aThreadId the thread id of the thread to move the breakpoint to
const TUint32 aAddress the virtual memory address at which to place the breakpoint.
const TArchitectureMode aArchitectureMode the kind of breakpoint which is to be set (e.g. ARM/Thumb/Thumb2EE)

ModifyProcessBreak(const TBreakId, const TProcessId, const TUint32, const TArchitectureMode)

TInt ModifyProcessBreak ( const TBreakId aBreakId,
const TProcessId aProcessId,
const TUint32 aAddress,
const TArchitectureMode aArchitectureMode
) [inline]

Purpose: Modifies the properties of a previously set process breakpoint.

Pre-condition
Debug Agent must be connected to the debug security server
Debug Agent must be attached to a process.

Parameters

const TBreakId aBreakId the TBreakId returned by a prior SetBreak() call. Must have been set by the same Debug Agent.
const TProcessId aProcessId the process id of the process to move the breakpoint to
const TUint32 aAddress the virtual memory address at which to place the breakpoint.
const TArchitectureMode aArchitectureMode the kind of breakpoint which is to be set (e.g. ARM/Thumb/Thumb2EE)

ProcessBreakInfo(const TBreakId, TProcessId &, TUint32 &, TArchitectureMode &)

TInt ProcessBreakInfo ( const TBreakId aBreakId,
TProcessId & aProcessId,
TUint32 & aAddress,
TArchitectureMode & aMode
) [inline]

Purpose: Returns the properties associated with a given TBreakId. The supplied break id must previously have been allocated to the debug agent by a SetProcessBreak() call.

Pre-condition
Debug Agent must be connected to the debug security server
Debug Agent must be attached to a process.
The aBreakId must have been previously returned by a SetProcessBreak() call and not subsequently cleared by ClearBreak() .

Parameters

const TBreakId aBreakId the TBreakId returned by a prior SetBreak() call. Must have been set by the same Debug Agent.
TProcessId & aProcessId
TUint32 & aAddress on return contains the virtual memory address of the breakpoint
TArchitectureMode & aMode on return contains the type of this breakpoint (e.g. ARM/Thumb/Thumb2EE)

ReadCrashLog(const TUint32, TDes8 &, const TUint32)

TInt ReadCrashLog ( const TUint32 aPos,
TDes8 & aData,
const TUint32 aDataSize
) [inline]

Purpose Method to read data from the crash flash

Pre-condition
aData buffer to retrieve the data from the crash flash
aDataSize Size of the data

Parameters

const TUint32 aPos
TDes8 & aData
const TUint32 aDataSize

ReadMemory(const TThreadId, const TUint32, const TUint32, TDes8 &, const TAccess, const TEndianess)

TInt ReadMemory ( const TThreadId aThreadId,
const TUint32 aAddress,
const TUint32 aLength,
TDes8 & aData,
const TAccess aAccessSize,
const TEndianess aEndianess
) [inline]

Read a block of memory from the target debug thread defined by aThreadId.

Pre-condition
the client should attach to the process containing the target thread
aData.MaxLength() >= aLength

Parameters

const TThreadId aThreadId thread ID of the thread to read memory from
const TUint32 aAddress address to start reading memory from
const TUint32 aLength number of bytes of memory to read
TDes8 & aData descriptor to read memory into
const TAccess aAccessSize access size for memory reads, default is TAccess::EAccess32
const TEndianess aEndianess interpretation of endianess of target data, default is TEndianess::EEndLE8

ReadRegisters(const TThreadId, const TDesC8 &, TDes8 &, TDes8 &)

TInt ReadRegisters ( const TThreadId aThreadId,
const TDesC8 & aRegisterIds,
TDes8 & aRegisterValues,
TDes8 & aRegisterFlags
) [inline]

Read register values from the thread with thread ID aThreadId. The IDs of the registers to read are stored as an array of TRegisterInfo objects in aRegisterIds. If the nth register requested could be read then the value of the register will be appended to aRegisterValues and EValid stored at offset n in aRegisterFlags. If the register is supported but could not be read then EInValid will be stored at offset n in aRegisterFlags and arbitrary data appended in aRegisterValues. If reading the specified register is not supported by the kernel then ENotSupported will be stored at offset n in aRegisterFlags and arbitrary data appended to aRegisterValues. If an unknown register is specified then EUnknown will be put in aRegisterFlags and arbitrary data placed in aRegisterValues.

Pre-condition
the client should attach to the process containing the target thread
the register ID format is defined in: SGL.TS0028.027 - Symbian Core Dump File Format v1.0.doc

Parameters

const TThreadId aThreadId thread ID of the thread to read register values from
const TDesC8 & aRegisterIds descriptor containing array of TFunctionalityRegister defined register IDs
TDes8 & aRegisterValues descriptor to contain register values
TDes8 & aRegisterFlags descriptor containing array of TUint8 flags, with values taken from TRegisterFlag

ResumeThread(const TThreadId)

TInt ResumeThread ( const TThreadId aThreadId ) [inline]

Resumes execution of the specified thread.

Parameters

const TThreadId aThreadId thread ID of the thread to resume

SetBreak(TBreakId &, const TThreadId, const TUint32, const TArchitectureMode)

TInt SetBreak ( TBreakId & aId,
const TThreadId aThreadId,
const TUint32 aAddress,
const TArchitectureMode aArchitectureMode
) [inline]

Purpose: Set a thread-specific breakpoint in an attached process.

Pre-condition
Debug Agent must be connected to the debug security server
Debug Agent must be attached to a process.

Parameters

TBreakId & aId The address to which the assigned breakpoint ID will be written by this function
const TThreadId aThreadId The thread id to which the breakpoint will apply.
const TUint32 aAddress The virtual memory address at which to place the breakpoint.
const TArchitectureMode aArchitectureMode The kind of breakpoint which is to be set (e.g. ARM/Thumb/Thumb2EE)

SetEventAction(const TDesC &, TEventType, TKernelEventAction)

TInt SetEventAction ( const TDesC & aExecutableName,
TEventType aEvent,
TKernelEventAction aEventAction
) [inline]

Purpose: Set the requisite actions to be taken when a particular event occurs. The events are defined in Debug::TEventType and the actions are defined in Debug::TKernelEventAction.

The default action for all events is EActionIgnore.

Pre-condition
Debug Agent must be connected to the debug security server
Debug Agent must be attached to the executable specified by aExecutableName.
Note: Event actions are on a per-executable basis. This is to ensure that events such as EEventStartThread are notified to the Debug Agent, even though the debug agent cannot be aware of the existence of a new thread at the time the event occurs.

Parameters

const TDesC & aExecutableName The name of the executable to which the Debug Agent is attached.
TEventType aEvent A TEventType enum defined in rm_debug_api.h:Debug::TEventType
TKernelEventAction aEventAction Any TKernelEventAction permitted by the DFBlock.

SetProcessBreak(TBreakId &, const TProcessId, const TUint32, const TArchitectureMode)

TInt SetProcessBreak ( TBreakId & aId,
const TProcessId aProcessId,
const TUint32 aAddress,
const TArchitectureMode aArchitectureMode
) [inline]

Purpose: Set a process-specific breakpoint in an attached process.

Pre-condition
Debug Agent must be connected to the debug security server
Debug Agent must be attached to a process.

Parameters

TBreakId & aId The address to which the assigned breakpoint ID will be written by this function
const TProcessId aProcessId The process id to which the breakpoint will apply.
const TUint32 aAddress The virtual memory address at which to place the breakpoint.
const TArchitectureMode aArchitectureMode The kind of breakpoint which is to be set (e.g. ARM/Thumb/Thumb2EE)

StartServer(void)

TInt StartServer ( void ) [private, inline]

Start the server

Parameters

void

Step(const TThreadId, TUint32)

TInt Step ( const TThreadId aThreadId,
TUint32 aNumSteps
) [inline]

Purpose: Step one or more CPU instructions in the specified thread from the current PC.

Pre-condition
Debug Agent must be connected to the debug security server
Debug Agent must be attached to a process.
The thread being stepped must be suspended by the Debug Agent.

Parameters

const TThreadId aThreadId the id of the thread which is to be stepped
TUint32 aNumSteps how many machine-level instructions are to be stepped.

SuspendThread(const TThreadId)

TInt SuspendThread ( const TThreadId aThreadId ) [inline]

Suspends execution of the specified thread.

Parameters

const TThreadId aThreadId thread ID of the thread to suspend

Version()

TVersion Version ( ) const [inline]

Get version of RSecuritySvrSession

WriteCrashConfig(const TUint32, const TDesC8 &, TUint32 &)

TInt WriteCrashConfig ( const TUint32 aPos,
const TDesC8 & aBuffer,
TUint32 & aSize
) [inline]

Purpose: Method to write the crash flash config

Parameters

const TUint32 aPos
const TDesC8 & aBuffer
TUint32 & aSize

WriteMemory(const TThreadId, const TUint32, const TUint32, const TDesC8 &, const TAccess, const TEndianess)

TInt WriteMemory ( const TThreadId aThreadId,
const TUint32 aAddress,
const TUint32 aLength,
const TDesC8 & aData,
const TAccess aAccessSize,
const TEndianess aEndianess
) [inline]

Write a block of memory to the target debug thread defined by aThreadId.

Pre-condition
the client should attach non-passively to the process containing the target thread

Parameters

const TThreadId aThreadId thread ID of the thread to write memory to
const TUint32 aAddress address to start writing memory at
const TUint32 aLength number of bytes of memory to write
const TDesC8 & aData descriptor to read memory from
const TAccess aAccessSize access size for memory writes, default is TAccess::EAccess32
const TEndianess aEndianess interpretation of endianess of target data, default is TEndianess::EEndLE8

WriteRegisters(const TThreadId, const TDesC8 &, const TDesC8 &, TDes8 &)

TInt WriteRegisters ( const TThreadId aThreadId,
const TDesC8 & aRegisterIds,
const TDesC8 & aRegisterValues,
TDes8 & aRegisterFlags
) [inline]

Write register values to the thread with thread ID aThreadId. The IDs of the registers to write are stored as an array of TRegisterInfo objects in aRegisterIds. The values to put in the registers are stored as an array of objects in aRegisterValues. If the nth register to write could be written then EValid stored at offset n in aRegisterFlags. If the register is supported but could not be written then EInValid will be stored at offset n in aRegisterFlags. If writing to the specified register is not supported by the kernel then ENotSupported will be stored at offset n in aRegisterFlags. If an unknown register is specified then EUnknown will be put in aRegisterFlags.

Pre-condition
the client should attach non-passively to the process containing the target thread
the register ID format is defined in: SGL.TS0028.027 - Symbian Core Dump File Format v1.0.doc

Parameters

const TThreadId aThreadId thread ID of the thread to write register values to
const TDesC8 & aRegisterIds descriptor containing array of TFunctionalityRegister defined register IDs
const TDesC8 & aRegisterValues descriptor containing array of register values
TDes8 & aRegisterFlags descriptor containing array of TUint8 flags, with values taken from TRegisterFlag