#include <threaddata.h>
Link against: cdssupport.lib

Class CThreadInfo

Interface access: publishedPartner

class CThreadInfo : public CStreamElementBase;

Description

Class that represents a thread on the target. It is based on CStreamElementBase, so it can be streamed between client and server. It is used by the Core Dump server, its clients and the plugins.

Derivation

    • CBase - No description.
      • CStreamElementBase - Pure virtual base class for streamable classes. Used when a class must be passed...
        • CThreadInfo - Class that represents a thread on the target. It is based on CStreamElementBase,...

Members

Defined in CThreadInfo More...

Inherited from CStreamElementBase:

Construction and destruction


NewL(const TUint64 &,const TDesC &,const TUint64 &,const TUint &,const TLinAddr &,const TLinAddr &,const TUint &,const TLinAddr &,const TUint &)

Interface access: publishedPartnerInherited from: CThreadInfo

IMPORT_C static CThreadInfo* NewL(const TUint64 &aId, const TDesC &aName, const TUint64 &aProcessId, const TUint &aPriority, const TLinAddr &aSvcStackPtr, const TLinAddr &aSvcStackAddr, const TUint &aSvcStackSize, const TLinAddr &aUsrStackAddr, const TUint &aUsrStackSize);

Description

Allocates and constructs a CThreadInfo object.

Parameters

const TUint64 &aId

Kernel thread id

const TDesC &aName

Kernel thread name

const TUint64 &aProcessId

Kernel id of owning process

const TUint &aPriority

Kernel thread priority TThreadPriority

const TLinAddr &aSvcStackPtr

Thread supervisor stack pointer

const TLinAddr &aSvcStackAddr

Thread supervisor mode stack base address

const TUint &aSvcStackSize

Thread supervisor mode stack size in bytes

const TLinAddr &aUsrStackAddr

Thread user mode stack base address

const TUint &aUsrStackSize

Thread user mode stack base size in bytes

Return value

CThreadInfo *

See also:


NewL(const TDesC8 &)

Interface access: publishedPartnerInherited from: CThreadInfo

IMPORT_C static CThreadInfo* NewL(const TDesC8 &aStreamData);

Description

Allocates and constructs a CThreadInfo object from a descriptor. The descriptor contains an externalised version of a CThreadInfo object. This method is typically used to obtain a CThreadInfo object from a descriptor returned by the core dump server.

Parameters

const TDesC8 &aStreamData

Descriptor with externalised/streamed object

Return value

CThreadInfo *

See also:


~CThreadInfo()

Interface access: publishedPartnerInherited from: CThreadInfo

IMPORT_C ~CThreadInfo();

Description

Destructor. Deletes name if allocated.


CThreadInfo(const TUint64 &,const TUint64 &,const TUint &,const TLinAddr &,const TLinAddr &,const TUint &,const TLinAddr &,const TUint &)

Interface access: internal to technologyDefault as private.

private: CThreadInfo(const TUint64 &aId, const TUint64 &aProcessId, const TUint &aPriority, const TLinAddr &aSvcStackPtr, const TLinAddr &aSvcStackAddr, const TUint &aSvcStackSize, const TLinAddr &aUsrStackAddr, const TUint &aUsrStackSize);

Description

First phase contructor. Sets the size to 0, name to NULL.

Parameters

const TUint64 &aId

const TUint64 &aProcessId

const TUint &aPriority

const TLinAddr &aSvcStackPtr

const TLinAddr &aSvcStackAddr

const TUint &aSvcStackSize

const TLinAddr &aUsrStackAddr

const TUint &aUsrStackSize

See also:


CThreadInfo()

Interface access: internal to technologyDefault as private.

private: CThreadInfo();

Description


ConstructL(const TDesC &)

Interface access: internal to technologyDefault as private.

private: void ConstructL(const TDesC &aName);

Description

Second phase constructor initialises the name of the thread.

Parameters

const TDesC &aName

Thread name

See also:

Member functions


Id()const

Interface access: publishedPartnerInherited from: CThreadInfo

IMPORT_C const TUint64& Id() const;

Description

Obtain the kernel thread id.

Return value

const TUint64 &


NameL(const TDesC &)

Interface access: publishedPartnerInherited from: CThreadInfo

IMPORT_C void NameL(const TDesC &aName);

Description

Set the name of the thread by deleting, allocating and then copying the parameter.

Parameters

const TDesC &aName

Name of the thread to set to

See also:


Name()const

Interface access: publishedPartnerInherited from: CThreadInfo

IMPORT_C const TDesC& Name() const;

Description

Obtain the kernel thread name.

Return value

const TDesC &


ProcessId()const

Interface access: publishedPartnerInherited from: CThreadInfo

IMPORT_C const TUint64& ProcessId() const;

Description

Obtain the kernel owning process id.

Return value

const TUint64 &


Priority()const

Interface access: publishedPartnerInherited from: CThreadInfo

IMPORT_C TUint Priority() const;

Description

Obtain the kernel priority.

Return value

TUint


SvcStackPtr()const

Interface access: publishedPartnerInherited from: CThreadInfo

IMPORT_C TUint SvcStackPtr() const;

Description

Obtain the kernel supervisor mode stack pointer.

Return value

TUint


SvcStackAddr()const

Interface access: publishedPartnerInherited from: CThreadInfo

IMPORT_C TUint SvcStackAddr() const;

Description

Obtain the kernel supervisor mode stack base address.

Return value

TUint


SvcStackSize()const

Interface access: publishedPartnerInherited from: CThreadInfo

IMPORT_C TUint SvcStackSize() const;

Description

Obtain the kernel supervisor mode stack size in bytes.

Return value

TUint


UsrStackAddr()const

Interface access: publishedPartnerInherited from: CThreadInfo

IMPORT_C TUint UsrStackAddr() const;

Description

Obtain the kernel user mode stack base address.

Return value

TUint


UsrStackSize()const

Interface access: publishedPartnerInherited from: CThreadInfo

IMPORT_C TUint UsrStackSize() const;

Description

Obtain the kernel user mode stack size in bytes.

Return value

TUint


Observed()const

Interface access: publishedPartnerInherited from: CThreadInfo

IMPORT_C TBool Observed() const;

Description

Returns ETrue if the thread is being explicitly observed for crashes by the Core Dump Server. If only the owning process is being observed, this method returns EFalse.

Return value

TBool


Observed(TBool)

Interface access: publishedPartnerInherited from: CThreadInfo

IMPORT_C void Observed(TBool aFlag);

Description

Set whether this thread is being observed for crashes by the Core Dump Server.

Parameters

TBool aFlag


SetLastCpuId(TInt32)

Interface access: publishedPartnerInherited from: CThreadInfo

IMPORT_C void SetLastCpuId(TInt32 aLastCpu);

Description

Parameters

TInt32 aLastCpu


LastCpuId()const

Interface access: publishedPartnerInherited from: CThreadInfo

IMPORT_C TInt32 LastCpuId() const;

Description

Return value

TInt32


SetHeapBase(TUint32)

Interface access: publishedPartnerInherited from: CThreadInfo

IMPORT_C void SetHeapBase(TUint32 aHeapSize);

Description

Parameters

TUint32 aHeapSize


HeapBase()const

Interface access: publishedPartnerInherited from: CThreadInfo

IMPORT_C TUint32 HeapBase() const;

Description

Return value

TUint32


SetHeapSize(TUint32)

Interface access: publishedPartnerInherited from: CThreadInfo

IMPORT_C void SetHeapSize(TUint32 lastCpu);

Description

Parameters

TUint32 lastCpu


HeapSize()const

Interface access: publishedPartnerInherited from: CThreadInfo

IMPORT_C TUint32 HeapSize() const;

Description

Return value

TUint32


MaxSize()

Interface access: publishedPartnerInherited from: CThreadInfo

IMPORT_C static TInt MaxSize();

Description

Get the maximum size allowed for this object. This is needed as the object is passed across the Client Server interface.

Return value

TInt


Size()const

Interface access: publishedPartnerInherited from: CThreadInfo

IMPORT_C virtual TInt Size() const;

Description

Gets the size of the object when externalized. The sizeofs used to calculate this must match the operators used in ExternalizeL and InternalizeL. Special attention must be paid to the name. If the object has not been externalized yet then this method returns the maximum that it could take. The name descriptor is compressed when externalized, so it is not its CThreadInfo::Size()const. Furthermore the << operator adds two bytes to the stream when externalizing a descriptor

Return value

TInt


InternalizeL(RReadStream &)

Interface access: publishedPartnerInherited from: CThreadInfo

IMPORT_C virtual void InternalizeL(RReadStream &aStream);

Pre-Condition

Call Externalise to obtain the stream containing an externalised version of this object.

Description

Initialise this object with the contents of RReadStream aStream. The descriptor contains an externalised version of an object. This method is typically used to obtain a CThreadInfo object from the core dump server. Any modifications to this method should be synchronised with CThreadInfo::ExternalizeL(RWriteStream &,CBufFlat *). Also note that the methods used from RReadStream (>> or ReadUint32L) can behave differently, especially for descriptors.

Parameters

RReadStream &aStream

Stream with streamed object

See also:


ExternalizeL(RWriteStream &,CBufFlat *)

Interface access: publishedPartnerInherited from: CThreadInfo

IMPORT_C virtual void ExternalizeL(RWriteStream &aStream, CBufFlat *buf);

Description

Make a streamed representation of this object to RWriteStream aStream.

This method is typically by the core dump server when contructing a list of CThreadInfo for a client. Any modifications to this method should be synchronised with CThreadInfo::InternalizeL(RReadStream &). Also note that the methods used from RWriteStream (>> or WriteUint32L) can behave differently, especially for descriptors.

Post-Condition

The stream contains an externalised version of this object.

Parameters

RWriteStream &aStream

Stream to stream object onto

CBufFlat *buf

Buffer onto the same stream, used to obtain correct size of externalised object

See also:

Member data


iId

Interface access: internal to technologyDefault as private.

private: TUint64 iId;

Description

Symbian kernel thread id


iName

Interface access: internal to technologyDefault as private.

private: HBufC * iName;

Description

Symbian kernel thread name


iProcessId

Interface access: internal to technologyDefault as private.

private: TUint64 iProcessId;

Description

Symbian kernel process id of owning process


iPriority

Interface access: internal to technologyDefault as private.

private: TUint iPriority;

Description

Symbian kernel thread priority TThreadPriority


iSvcStackPtr

Interface access: internal to technologyDefault as private.

private: TLinAddr iSvcStackPtr;

Description

Thread supervisor stack pointer


iSvcStackAddr

Interface access: internal to technologyDefault as private.

private: TLinAddr iSvcStackAddr;

Description

Thread supervisor mode stack base address


iSvcStackSize

Interface access: internal to technologyDefault as private.

private: TUint iSvcStackSize;

Description

Thread supervisor mode stack size in bytes


iUsrStackAddr

Interface access: internal to technologyDefault as private.

private: TLinAddr iUsrStackAddr;

Description

Thread user mode stack base address


iUsrStackSize

Interface access: internal to technologyDefault as private.

private: TUint iUsrStackSize;

Description

Thread user mode stack base size in bytes


iObserved

Interface access: internal to technologyDefault as private.

private: TBool iObserved;

Description

Set to ETrue if the thread is being explicitly observed for crashes by the Core Dump Server. If only the owning process is being observed, this should be EFalse.


iSize

Interface access: internal to technologyDefault as private.

private: TUint iSize;

Description

Externalized size


iLastCpuId

Interface access: internal to technologyDefault as private.

private: TInt32 iLastCpuId;

Description

last cpu in use when crash occurred


iHeapBase

Interface access: internal to technologyDefault as private.

private: TInt32 iHeapBase;

Description

threads heap base


iHeapSize

Interface access: internal to technologyDefault as private.

private: TUint32 iHeapSize;

Description

thread heap size


iSpare1

Interface access: internal to technologyDefault as private.

private: TUint32 iSpare1;

Description


iSpare2

Interface access: internal to technologyDefault as private.

private: TUint32 iSpare2;

Description