Adaptation/GUID-1E822A8F-3144-509D-A949-BDAF4BB9634A.dita
author Graeme Price <GRAEME.PRICE@NOKIA.COM>
Fri, 15 Oct 2010 14:32:18 +0100
changeset 15 307f4279f433
permissions -rw-r--r--
Initial contribution of the Adaptation Documentation.

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
<!-- This component and the accompanying materials are made available under the terms of the License 
"Eclipse Public License v1.0" which accompanies this distribution, 
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
<!-- Initial Contributors:
    Nokia Corporation - initial contribution.
Contributors: 
-->
<!DOCTYPE concept
  PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
<concept id="GUID-1E822A8F-3144-509D-A949-BDAF4BB9634A" xml:lang="en"><title>Kernel
State Information Commands</title><shortdesc>Describes how to use the <codeph>i</codeph> command to get detailed
information on the current process, thread, user process, user thread, and
the state of the kernel. </shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody>
<p>The output shown below is a typical result of using the <xref href="GUID-08E14B34-5144-5AA8-AA55-7AF03671676C.dita#GUID-08E14B34-5144-5AA8-AA55-7AF03671676C/GUID-D0175D78-6F84-5F4F-BA90-2C591B473C69">i</xref> command, and we use this to illustrate how information can be extracted
about the: </p>
<ul>
<li id="GUID-FCDEBC28-363F-539C-BCF7-C472ED279C5A"><p> <xref href="GUID-1E822A8F-3144-509D-A949-BDAF4BB9634A.dita#GUID-1E822A8F-3144-509D-A949-BDAF4BB9634A/GUID-D64C53F4-78D4-51FC-B7DD-27E10B435CFD">Scheduler state</xref>  </p> </li>
<li id="GUID-12616D76-643A-5814-833A-0C3CDD92BD97"><p> <xref href="GUID-1E822A8F-3144-509D-A949-BDAF4BB9634A.dita#GUID-1E822A8F-3144-509D-A949-BDAF4BB9634A/GUID-31DF5393-FD03-56B7-B5F2-1F6DBD86D7C4">Current thread state</xref>  </p> </li>
<li id="GUID-EF2FF4EC-7F11-5F72-BEC3-7F25762889F3"><p> <xref href="GUID-1E822A8F-3144-509D-A949-BDAF4BB9634A.dita#GUID-1E822A8F-3144-509D-A949-BDAF4BB9634A/GUID-2424E413-F2F3-5625-932D-515860911424">Current process state</xref>  </p> </li>
<li id="GUID-4B3694AB-AB36-5AEC-A514-CB858F5EFEB0"><p> <xref href="GUID-1E822A8F-3144-509D-A949-BDAF4BB9634A.dita#GUID-1E822A8F-3144-509D-A949-BDAF4BB9634A/GUID-877907D5-6A04-510B-AE99-C3856A0469E7">Current data section process</xref>  </p> </li>
</ul>
<codeblock id="GUID-8ACEF4EF-0C02-50A9-8E2B-EB3917E9B726" xml:space="preserve">SCHEDULER @64000348: CurrentThread 640396b0
RescheduleNeeded=00 DfcPending=00 KernCSLocked=00000001
DFCS: next 64000458 prev 64000458
ProcessHandler=f8014904, AddressSpace=64038d5c
SYSLOCK: HoldingThread 00000000 iWaiting 00000000
Extras 0: 64038d5c 1: 64038d5c 2: 64038d5c 3: 00000000
Extras 4: 00000000 5: 00000000 6: 00000000 7: 00000000
Extras 8: 00000000 9: 00000000 A: 00000000 B: 00000000
Extras C: 00000000 D: 00000000 E: 00000000 F: 00000000

TheCurrentThread=64039408
THREAD at 64039408 VPTR=f803423c AccessCount=3 Owner=64038d5c
Full name test2.exe::Main
Thread MState READY
Default priority 16 WaitLink Priority 16
ExitInfo 2,100,USER
Flags 00000004, Handles 640330bc
Supervisor stack base 6571f000 size 1000
User stack base 00402000 size 2000
Id=26, Alctr=00600000, Created alctr=00600000, Frame=00000000
Trap handler=00000000, ActiveScheduler=00000000, Exception handler=00000000
TempObj=00000000 TempAlloc=00000000 IpcCount=00000000
NThread @ 640396b0 Pri 16 NState READY
Next=640396b0 Prev=640396b0 Att=03 iUserContextType=0b
HeldFM=00000000 WaitFM=00000000 AddrSp=64038d5c
Time=17 Timeslice=20 ReqCount=0
SuspendCount=0 CsCount=1 CsFunction=fffffffe
SavedSP=6571ff34 ExtraContext=00000000 ExtraContextSize=0000
DACR 63990000
R13_USR 6571ff88 R14_USR f8025bc0 SPSR_SVC 10000004
 R4 f8033794  R5 64039408  R6 640396b0  R7 f8028518
 R8 640396b0  R9 640396b0 R10 00000000 R11 f80284d8
 PC 00000000

TheCurrentProcess=64038d5c
PROCESS at 64038d5c VPTR=f80342a4 AccessCount=6 Owner=00000000
Full name test2.exe
ExitInfo 3,0,
Flags a0000000, Handles 6403860c, Attributes 60010000
DataBssChunk 64039234, CodeSeg 6403919c
DllLock 64039044, Process Lock 64038eec SID 00000000
TempCodeSeg 00000000 CodeSeg 6403919c Capability 00000000 0003ffff
CodeSegs: Count=0
NumChunks=2
0: Chunk 64039234, run 00400000, access count 1
1: Chunk 6403613c, run 00600000, access count 1
Process shared IO buffers cookie 0000031d
Process has no shared IO buffers
Domain -1, DACR 55555507
TheCurrentAddressSpace=64038d5c
TheCurrentVMProcess=64038d5c
PROCESS at 64038d5c VPTR=f80342a4 AccessCount=6 Owner=00000000
Full name test2.exe
ExitInfo 3,0,
Flags a0000000, Handles 6403860c, Attributes 60010000
DataBssChunk 64039234, CodeSeg 6403919c
DllLock 64039044, Process Lock 64038eec SID 00000000
TempCodeSeg 00000000 CodeSeg 6403919c Capability 00000000 0003ffff
CodeSegs: Count=0
NumChunks=2
0: Chunk 64039234, run 00400000, access count 1
1: Chunk 6403613c, run 00600000, access count 1
Process shared IO buffers cookie 0000031d
Process has no shared IO buffers
Domain -1, DACR 55555507
TheCurrentDataSectionProcess=64038d5c
TheCompleteDataSectionProcess=64038d5c
PROCESS at 64038d5c VPTR=f80342a4 AccessCount=6 Owner=00000000
Full name test2.exe
ExitInfo 3,0,
Flags a0000000, Handles 6403860c, Attributes 60010000
DataBssChunk 64039234, CodeSeg 6403919c
DllLock 64039044, Process Lock 64038eec SID 00000000
TempCodeSeg 00000000 CodeSeg 6403919c Capability 00000000 0003ffff
CodeSegs: Count=0
NumChunks=2
0: Chunk 64039234, run 00400000, access count 1
1: Chunk 6403613c, run 00600000, access count 1
Process shared IO buffers cookie 0000031d
Process has no shared IO buffers
Domain -1, DACR 55555507
</codeblock>
<section id="GUID-D64C53F4-78D4-51FC-B7DD-27E10B435CFD"><title>Scheduler state</title> <p>The
first three lines and the fifth line of the output show the state of the kernel
scheduler. This information is mainly of interest to kernel engineers, although
the state of the kernel and the system locks can be useful when debugging
device driver crashes. </p> <codeblock id="GUID-D21A9A99-C956-5276-AEE1-3609CE72DB6E" xml:space="preserve">SCHEDULER @64000348: CurrentThread 640396b0
RescheduleNeeded=00 DfcPending=00 KernCSLocked=00000001
DFCS: next 64000458 prev 64000458
...
SYSLOCK: HoldingThread 00000000 iWaiting 00000000
</codeblock> <p>The values are interpreted as follows: </p> <table id="GUID-E13DE258-ACD5-5EEB-AFC7-988747AA3863">
<tgroup cols="2"><colspec colname="col0"/><colspec colname="col1"/>
<tbody>
<row>
<entry><p> <codeph>SCHEDULER @</codeph>  </p> </entry>
<entry><p>This is the address of the kernel’s scheduler instance; this is
not very useful. </p> </entry>
</row>
<row>
<entry><p> <codeph>CurrentThread</codeph>  </p> </entry>
<entry><p>The address of the kernel object for the current kernel thread. </p> </entry>
</row>
<row>
<entry><p> <codeph>RescheduleNeeded</codeph>  </p> </entry>
<entry><p>This is set to non-zero by the kernel to force a reschedule, for
example if a thread has been signalled </p> </entry>
</row>
<row>
<entry><p> <codeph>DfcPending</codeph>  </p> </entry>
<entry><p>This is non-zero when there are DFCs queued. </p> </entry>
</row>
<row>
<entry><p> <codeph>KernCSLocked</codeph>  </p> </entry>
<entry><p>This is incremented each time the kernel is locked by a call to <xref href="GUID-3A3C08F3-3D33-3D9E-80E7-7855C7B21E02.dita#GUID-3A3C08F3-3D33-3D9E-80E7-7855C7B21E02/GUID-7CBBF72B-4519-38DD-92CA-38AF636AFD8A"><apiname>NKern::Lock()</apiname></xref>,
and decremented by calls to <xref href="GUID-3A3C08F3-3D33-3D9E-80E7-7855C7B21E02.dita#GUID-3A3C08F3-3D33-3D9E-80E7-7855C7B21E02/GUID-A1A42137-906C-30F1-AF61-4F786FC372DE"><apiname>NKern::Unlock()</apiname></xref>. A value of
zero means that the kernel is not locked. </p> </entry>
</row>
<row>
<entry><p> <codeph>DFCS:</codeph>  </p> </entry>
<entry><p>The addresses of the next and the previous items on the DFC queue </p> </entry>
</row>
<row>
<entry><p> <codeph>HoldingThread</codeph>  </p> </entry>
<entry><p>The address of the thread holding the system lock mutex. The system
lock is set by call to <xref href="GUID-3A3C08F3-3D33-3D9E-80E7-7855C7B21E02.dita#GUID-3A3C08F3-3D33-3D9E-80E7-7855C7B21E02/GUID-B3837744-B8CC-3DC0-BA1D-417016E88EE9"><apiname>NKern::LockSystem()</apiname></xref> and unset by
call to <xref href="GUID-3A3C08F3-3D33-3D9E-80E7-7855C7B21E02.dita#GUID-3A3C08F3-3D33-3D9E-80E7-7855C7B21E02/GUID-63B882C8-C5D0-3595-BBF1-74E942A5060A"><apiname>NKern::UnlockSystem()</apiname></xref>  </p> </entry>
</row>
<row>
<entry><p> <codeph>iWaiting</codeph>  </p> </entry>
<entry><p>Non-zero, if any thread is waiting for the system lock mutex. </p> </entry>
</row>
</tbody>
</tgroup>
</table> </section>
<section id="GUID-31DF5393-FD03-56B7-B5F2-1F6DBD86D7C4"><title>Current thread
state</title> <p>The current thread is the thread that was executing when
the fault occurred. The 23 lines starting at line 10 of the output gives information
relating to the current thread: </p> <codeblock id="GUID-2AB3CE2B-3428-5CFD-8480-FE33B07972C3" xml:space="preserve">TheCurrentThread=64039408
THREAD at 64039408 VPTR=f803423c AccessCount=3 Owner=64038d5c
Full name test2.exe::Main
Thread MState READY
Default priority 16 WaitLink Priority 16
ExitInfo 2,100,USER
Flags 00000004, Handles 640330bc
Supervisor stack base 6571f000 size 1000
User stack base 00402000 size 2000
Id=26, Alctr=00600000, Created alctr=00600000, Frame=00000000
Trap handler=00000000, ActiveScheduler=00000000, Exception handler=00000000
TempObj=00000000 TempAlloc=00000000 IpcCount=00000000
NThread @ 640396b0 Pri 16 NState READY
Next=640396b0 Prev=640396b0 Att=03 iUserContextType=0b
HeldFM=00000000 WaitFM=00000000 AddrSp=64038d5c
Time=17 Timeslice=20 ReqCount=0
SuspendCount=0 CsCount=1 CsFunction=fffffffe
SavedSP=6571ff34 ExtraContext=00000000 ExtraContextSize=0000
DACR 63990000
R13_USR 6571ff88 R14_USR f8025bc0 SPSR_SVC 10000004
 R4 f8033794  R5 64039408  R6 640396b0  R7 f8028518
 R8 640396b0  R9 640396b0 R10 00000000 R11 f80284d8
 PC 00000000</codeblock> <ul>
<li id="GUID-0CEB1586-DB4D-5390-AEB8-987681EA07B2"><p> <xref href="GUID-1E822A8F-3144-509D-A949-BDAF4BB9634A.dita#GUID-1E822A8F-3144-509D-A949-BDAF4BB9634A/GUID-38E186F9-73E3-5A15-9AAF-3CEFCDC0540B">Thread object and access count</xref>  </p> </li>
<li id="GUID-48F79826-183C-5EE0-9B00-FB1D0B66040D"><p> <xref href="GUID-1E822A8F-3144-509D-A949-BDAF4BB9634A.dita#GUID-1E822A8F-3144-509D-A949-BDAF4BB9634A/GUID-73FCD8C6-089B-54E1-A6CA-798DAC33B6DF">The thread name</xref>  </p> </li>
<li id="GUID-75A20FEF-7C66-567C-A774-657065912FF3"><p> <xref href="GUID-1E822A8F-3144-509D-A949-BDAF4BB9634A.dita#GUID-1E822A8F-3144-509D-A949-BDAF4BB9634A/GUID-2581D5E1-6CA2-55AC-ABD9-9E67AF4AE692">The thread state, exit information, priority</xref>  </p> </li>
<li id="GUID-DA7CBB15-0537-5116-8026-F0873AB537F9"><p> <xref href="GUID-1E822A8F-3144-509D-A949-BDAF4BB9634A.dita#GUID-1E822A8F-3144-509D-A949-BDAF4BB9634A/GUID-58B010AF-587A-556D-B831-B083C5BC11EE">Thread flags</xref>  </p> </li>
<li id="GUID-B7DA3F70-5CC8-538D-A2ED-F98EB30D8577"><p> <xref href="GUID-1E822A8F-3144-509D-A949-BDAF4BB9634A.dita#GUID-1E822A8F-3144-509D-A949-BDAF4BB9634A/GUID-026A5C10-C2F5-564A-B5CC-AE2B76A144A9">Handles</xref>  </p> </li>
<li id="GUID-6820DE1D-5109-555B-9BF3-F9FF55507393"><p> <xref href="GUID-1E822A8F-3144-509D-A949-BDAF4BB9634A.dita#GUID-1E822A8F-3144-509D-A949-BDAF4BB9634A/GUID-033C939E-BA01-5FC4-AD77-17FD891FE724">Kernel &amp; user stack addresses</xref>  </p> </li>
<li id="GUID-6FA4EFD8-AE98-5E73-AF5D-8BC202419EB8"><p> <xref href="GUID-1E822A8F-3144-509D-A949-BDAF4BB9634A.dita#GUID-1E822A8F-3144-509D-A949-BDAF4BB9634A/GUID-595813CE-C13C-5E27-9016-63A9FEA393C0">Thread id, RAllocator instances, trap frame</xref>  </p> </li>
<li id="GUID-0144EA8F-E1A8-5F3C-9826-FC4642135FE0"><p> <xref href="GUID-1E822A8F-3144-509D-A949-BDAF4BB9634A.dita#GUID-1E822A8F-3144-509D-A949-BDAF4BB9634A/GUID-71901B6F-6BBF-5DCC-8F3F-DC601DB21543">Trap handler, active scheduler and user-side exception handler</xref>  </p> </li>
<li id="GUID-1FCA2909-CE38-5DE8-A5EA-4A4516D6BBA2"><p> <xref href="GUID-1E822A8F-3144-509D-A949-BDAF4BB9634A.dita#GUID-1E822A8F-3144-509D-A949-BDAF4BB9634A/GUID-62666275-C252-5EE0-B3F5-21F65600AD1D">Temporary object, temporary allocation, IPC count</xref>  </p> </li>
<li id="GUID-5A1CC314-6891-53DA-AF5E-1E4DE0598E4B"><p> <xref href="GUID-1E822A8F-3144-509D-A949-BDAF4BB9634A.dita#GUID-1E822A8F-3144-509D-A949-BDAF4BB9634A/GUID-6C42738E-2644-5064-B349-B48266BF286D">Underlying nanokernel thread</xref>  </p> </li>
<li id="GUID-3F5BD294-813F-595D-93DF-802C9A1E519D"><p> <xref href="GUID-1E822A8F-3144-509D-A949-BDAF4BB9634A.dita#GUID-1E822A8F-3144-509D-A949-BDAF4BB9634A/GUID-3C1A2A53-E2BE-5959-9F2D-C63400F6AABA">Fast mutexes</xref>  </p> </li>
<li id="GUID-70CC2F58-E3FC-59D5-A645-AD27BC3C184C"><p> <xref href="GUID-1E822A8F-3144-509D-A949-BDAF4BB9634A.dita#GUID-1E822A8F-3144-509D-A949-BDAF4BB9634A/GUID-36E24838-15FB-5A69-9122-7AFF98F219AE">Timing, request semaphore count</xref>  </p> </li>
</ul> <p id="GUID-38E186F9-73E3-5A15-9AAF-3CEFCDC0540B"><b>Thread object and access
count</b> </p> <codeblock id="GUID-15EEA149-76AF-57BD-A67D-4337020933E8" xml:space="preserve">THREAD at 64039408 VPTR=f803423c AccessCount=3 Owner=64038d5c</codeblock> <p>The <codeph>THread at</codeph> field contains a pointer to the <codeph>DThread</codeph> object
representing the thread. </p> <p>The <codeph>AccessCount</codeph> field contains
the reference count on the thread object. </p> <p>The <codeph>owner</codeph> field
contains a pointer to the object that owns this <codeph>DThread</codeph> object. </p> <p id="GUID-73FCD8C6-089B-54E1-A6CA-798DAC33B6DF"><b>The thread name</b> </p> <codeblock id="GUID-05E008EE-375F-51D0-B738-42A978B167E4" xml:space="preserve">Full name test2.exe::Main</codeblock> <p>The
thread name is the part after the colons. The part before the colons is the
process name. This means that the thread is called <b>Main</b> inside the
process <b>test2.exe</b>. </p> <p id="GUID-2581D5E1-6CA2-55AC-ABD9-9E67AF4AE692"><b>The thread state, exit information,
priority</b> </p> <codeblock id="GUID-FCFE05EE-FE8B-514D-9EC9-44C14A5DE700" xml:space="preserve">Thread MState READY
Default priority 16 WaitLink Priority 16
ExitInfo 2,100,USER</codeblock> <p>The information that characterises the
thread exit is described by <codeph>ExitInfo</codeph>; this is shown as exit
type, exit reason and exit category. In this example: </p> <ul>
<li id="GUID-E9CE2364-F8B2-5990-8AFD-94BDD0C9782A"><p>the thread has panicked,
as indicated by: <b>exit type 2</b>; See also <xref href="GUID-0296BFC6-7F7C-3259-AF21-7E9B5C304B24.dita"><apiname>TExitType</apiname></xref>. </p> </li>
<li id="GUID-96DACA09-4212-5E6C-8834-53F5B4EE6A82"><p>the panic category was: <b>USER</b>  </p> </li>
<li id="GUID-1077CDFF-4C1D-5256-8A32-FA4B6118541A"><p>the panic number was:<b>100</b>  </p> </li>
<li id="GUID-E42997ED-A327-57BC-BA7B-0D6EEA8BEA95"><p>the thread was running
or it was in a ready-to-run state: <b>MState READY</b>  </p> </li>
</ul> <p>The priority shown is for the underlying thread, see also <xref href="GUID-49379616-C235-598D-AE43-668998AD072B.dita#GUID-49379616-C235-598D-AE43-668998AD072B/GUID-4D7F6A1F-3120-5547-B027-344C08A01D83">Process and thread priorities</xref>. </p> <p id="GUID-58B010AF-587A-556D-B831-B083C5BC11EE"><b>Thread flags</b> </p> <codeblock id="GUID-7D1F17F6-ED74-5A3A-9214-D85B91D52CC4" xml:space="preserve">Flags 00000004, Handles 640330bc</codeblock> <p>The <codeph>Flags</codeph> field
contains information about the state of the thread. The possible values in
this field are defined by the <codeph>KThread...</codeph> constants in <filepath>u32std.h</filepath>.
While the symbols are internal to Symbian platform, the following table summarises
the values and their meaning. </p> <table id="GUID-46D4FB94-284B-5415-8E8A-54EED6C4E37F">
<tgroup cols="3"><colspec colname="col0"/><colspec colname="col1"/><colspec colname="col2"/>
<tbody>
<row>
<entry><p> <b>Symbol</b>  </p> </entry>
<entry><p> <b>Value</b>  </p> </entry>
<entry><p> <b>Meaning</b>  </p> </entry>
</row>
<row>
<entry><p> <codeph>KThreadFlagProcessCritical</codeph>  </p> </entry>
<entry><p> <codeph>0x00000001</codeph>  </p> </entry>
<entry><p>A thread panic causes the process to panic. </p> </entry>
</row>
<row>
<entry><p> <codeph>KThreadFlagProcessPermanent</codeph>  </p> </entry>
<entry><p> <codeph>0x00000002</codeph>  </p> </entry>
<entry><p>If the thread exits for any reason, then this causes the process
to exit. </p> </entry>
</row>
<row>
<entry><p> <codeph>KThreadFlagSystemCritical</codeph>  </p> </entry>
<entry><p> <codeph>0x00000004</codeph>  </p> </entry>
<entry><p>If the thread panics, then this causes the entire system to reboot. </p> </entry>
</row>
<row>
<entry><p> <codeph>KThreadFlagSystemPermanent</codeph>  </p> </entry>
<entry><p> <codeph>0x00000008</codeph>  </p> </entry>
<entry><p>If the thread exits for any reason, then this causes the entire
system to reboot. </p> </entry>
</row>
<row>
<entry><p> <codeph>KThreadFlagOriginal</codeph>  </p> </entry>
<entry><p> <codeph>0x00000010</codeph>  </p> </entry>
<entry><p>Reserved for future use. </p> </entry>
</row>
<row>
<entry><p> <codeph>KThreadFlagLastChance</codeph>  </p> </entry>
<entry><p> <codeph>0x00000020</codeph>  </p> </entry>
<entry><p>Set if the thread is currently handling an exception. </p> </entry>
</row>
</tbody>
</tgroup>
</table> <p id="GUID-026A5C10-C2F5-564A-B5CC-AE2B76A144A9"><b>Handles</b> </p> <codeblock id="GUID-8FF13D5A-D4F2-5B04-B306-B91DB54AA4C3" xml:space="preserve">Flags 00000004, Handles 640330bc</codeblock> <p>The <codeph>Handles</codeph> field
contains the address of a <codeph>DObjectIx</codeph> object that contains
the handles owned by the thread. </p> <p id="GUID-033C939E-BA01-5FC4-AD77-17FD891FE724"><b>Kernel &amp; user stack
addresses</b> </p> <codeblock id="GUID-FA6F4E36-AC78-5518-B82A-82AB7BE9BA9A" xml:space="preserve">Supervisor stack base 6571f000 size 1000
User stack base 00402000 size 2000
</codeblock> <p>These fields give the base address and size, in bytes, of
the kernel and user stacks respectively. </p> <p id="GUID-595813CE-C13C-5E27-9016-63A9FEA393C0"><b>Thread id, RAllocator instances,
trap frame</b> </p> <codeblock id="GUID-E28677AC-E286-5043-AFE7-7E775D836A3A" xml:space="preserve">Id=26, Alctr=00600000, Created alctr=00600000, Frame=00000000</codeblock> <p>The <codeph>Id</codeph> field contains the thread id. </p> <p>The <codeph>Alctr</codeph> field
contains a pointer to the current <xref href="GUID-9DB4A58C-6FC8-3292-A547-4C161BD188FC.dita"><apiname>RAllocator</apiname></xref> instance used
for heap allocation. </p> <p>The <codeph>Created alctr</codeph> field contains
a pointer to the original <xref href="GUID-9DB4A58C-6FC8-3292-A547-4C161BD188FC.dita"><apiname>RAllocator</apiname></xref> instance used for
heap allocation. This may be different from the current instance if <xref href="GUID-C197C9A7-EA05-3F24-9854-542E984C612D.dita#GUID-C197C9A7-EA05-3F24-9854-542E984C612D/GUID-988B1323-D1E2-33DE-923A-A987F2CAFBB7"><apiname>User::SwitchAllocator()</apiname></xref> has
been called. </p> <p>The <codeph>Frame</codeph> field contains a pointer to
the current trap frame, an instance of the <codeph>TTrap</codeph> class, on
the cleanup stack. </p> <p id="GUID-71901B6F-6BBF-5DCC-8F3F-DC601DB21543"><b>Trap handler, active scheduler,
user-side exception handler</b> </p> <codeblock id="GUID-21E4E26F-9F2F-5BC2-9324-0988A50CD376" xml:space="preserve">Trap handler=00000000, ActiveScheduler=00000000, Exception handler=00000000</codeblock> <p>The <codeph>Trap handler</codeph> field contains a pointer to the current
trap handler, an instance of <xref href="GUID-1C6ED16E-2105-3C17-81C7-026D211DCCC0.dita"><apiname>TTrapHandler</apiname></xref>, for the cleanup
stack. </p> <p>The <codeph>ActiveScheduler</codeph> field contains a pointer
to the current active scheduler. </p> <p>The <codeph>Exception handler</codeph> field
contains a pointer to the current user-side exception handler. </p> <p id="GUID-62666275-C252-5EE0-B3F5-21F65600AD1D"><b>Temporary object, temporary
allocation, IPC count</b> </p> <codeblock id="GUID-DCBEBEBE-35FD-57EE-9A8B-DEF0C59A4042" xml:space="preserve">TempObj=00000000 TempAlloc=00000000 IpcCount=00000000</codeblock> <p>The <codeph>Tempobj</codeph> field contains a pointer to an instance
of a <xref href="GUID-E48F1435-14B6-37F1-BE47-2EA803AFE497.dita"><apiname>DObject</apiname></xref> derived class that must be closed when the
thread terminates. </p> <p>The <codeph>TempAlloc</codeph> field contains a
pointer to a kernel heap cell that must be freed when the thread terminates.
Both this and <codeph>Tempobj</codeph> are used to avoid leaks if the thread
terminates unexpectedly. </p> <p>The <codeph>IpcCount</codeph> field contains
the number of messages currently queued to this thread. </p> <p id="GUID-6C42738E-2644-5064-B349-B48266BF286D"><b>Underlying nanokernel thread</b> </p> <codeblock id="GUID-6A4598D5-CD52-54C5-B314-8DF7AD14F4A9" xml:space="preserve">NThread @ 640396b0 Pri 16 NState READY
Next=640396b0 Prev=640396b0 Att=03 iUserContextType=0b</codeblock> <p>The <codeph>NThread</codeph> field
contains a pointer to the underlying nanokernel thread object, an instance
of the <xref href="GUID-187D314F-1115-3671-AC46-37AEC5DFB2AC.dita"><apiname>NThread</apiname></xref> class. </p> <p>The <codeph>Pri</codeph> field
contains the current priority of the underlying nanokernel thread. </p> <p>The <codeph>NState</codeph> field
shows the current state of the underlying nanokernel thread. Note that this
state is often referred to as the N-state, as compared to the to M-state,
the state of a Symbian platform thread. See the <xref href="GUID-49379616-C235-598D-AE43-668998AD072B.dita#GUID-49379616-C235-598D-AE43-668998AD072B/GUID-DDC45F0A-6B62-5EE6-9E42-D21F07BCF4B4">Thread
state summary</xref>. </p> <p>The <codeph>Next</codeph> field points to the
next nanokernel thread object. </p> <p>The <codeph>Prev</codeph> field points
to the previous nanokernel thread object. </p> <p>The <codeph>Att</codeph> field
contains the nanokernel thread attributes, which is an 8-bit mask that controls
how the thread is scheduled in certain cases. Two attributes are defined: </p> <table id="GUID-A241F528-3E55-504B-ACD8-F33AAB7F0D87">
<tgroup cols="2"><colspec colname="col0"/><colspec colname="col1"/>
<tbody>
<row>
<entry><p> <codeph> KThreadAttImplicitSystemLock</codeph>  </p> </entry>
<entry><p>This attribute signifies that the thread may not be scheduled if
another thread currently holds the system lock, unless the the former thread
holds another fast mutex. This attribute is used in implementing address space
switching in the moving memory model and also in implementing change of user
context in order to allow exceptions to be raised on other threads. </p> </entry>
</row>
<row>
<entry><p> <codeph>KThreadAttAddressSpace</codeph>  </p> </entry>
<entry><p>This attribute signifies that the thread may require a change of
address space to schedule it. This attribute is used in conjunction with the
thread’s <codeph>iAddressSpace</codeph> field; if this does not match the
scheduler’s <codeph>iAddressSpace</codeph> field at the point where the thread
is scheduled an address space switch will occur. Note that this is not required
if the address space change is limited to the ARM domain permissions since
these are saved and restored as part of the thread context. </p> </entry>
</row>
</tbody>
</tgroup>
</table> <p id="GUID-3C1A2A53-E2BE-5959-9F2D-C63400F6AABA"><b>Fast mutexes</b> </p> <codeblock id="GUID-09E41C50-99C1-56CC-AD16-2A5C1A47104B" xml:space="preserve">HeldFM=00000000 WaitFM=00000000 AddrSp=64038d5c</codeblock> <p>The <codeph>HeldFM</codeph> field
contains a pointer to the fast mutex held by this thread; this is NULL if
no fast mutext was held. </p> <p>The <codeph>WaitFM</codeph> field contains
a pointer to the fast mutex that this thread was waiting on; this is NULL
if this thread was not waiting on a fast mutex. </p> <p>The <codeph>AddrSp</codeph> field
is the address space identifier used by the scheduler to determine whether
an address space change is required when scheduling in a new thread. </p> <p id="GUID-36E24838-15FB-5A69-9122-7AFF98F219AE"><b>Timing, request semaphore
count</b> </p> <codeblock id="GUID-486FAC6A-5FE5-5937-8E15-FA526E65BDE6" xml:space="preserve">Time=17 Timeslice=20 ReqCount=0</codeblock> <p>The <codeph>Time</codeph> field
contains the number of nanokernel ticks, usually in milliseconds, to go before
the thread is preempted. </p> <p>The <codeph>Timeslice</codeph> field contains
the maximum number of ticks for which the thread can run before being preempted. </p> <p>The <codeph>ReqCount</codeph> contains
the request semaphore counter. If the value is negative, then the thread is
blocked waiting for a request to complete; if it is positive, then one or
more requests have completed. </p> <p id="GUID-BE914CFE-EE27-5661-A8E5-E85E897E880B"><b>Suspend count, critical
section counter, register values</b> </p> <codeblock id="GUID-2F12508F-70D3-5F74-AC62-3BCAA1E00C69" xml:space="preserve">SuspendCount=0 CsCount=1 CsFunction=fffffffe
SavedSP=6571ff34 ExtraContext=00000000 ExtraContextSize=0000
DACR 63990000
R13_USR 6571ff88 R14_USR f8025bc0 SPSR_SVC 10000004
 R4 f8033794  R5 64039408  R6 640396b0  R7 f8028518
 R8 640396b0  R9 640396b0 R10 00000000 R11 f80284d8
 PC 00000000
</codeblock> <p>The <codeph>SuspendCount</codeph> field contains the number
of times that the thread has been suspended. </p> <p>The <codeph>CsCount</codeph> field
critical section counter. When this value is greater than zero, then the thread
is in a critical section and cannot be suspended or killed. </p> <p>The remaining
content is a list of register values. <i>Note that they are not the register
values when the thread panicked.</i> They are the values in the registers
the last time that this thread was pre-empted. </p> </section>
<section id="GUID-2424E413-F2F3-5625-932D-515860911424"><title>Current process
state</title> <p>The current process is the process in whose address space
the current thread was executing when the fault occurred. The 15 lines starting
at line 33 of the output gives information relating to the current process.
This has some similarities with the current thread information: </p> <codeblock id="GUID-9A11F0D0-6939-5EB5-8CA0-D8501699563B" xml:space="preserve">TheCurrentProcess=64038d5c
PROCESS at 64038d5c VPTR=f80342a4 AccessCount=6 Owner=00000000
Full name test2.exe
ExitInfo 3,0,
Flags a0000000, Handles 6403860c, Attributes 60010000
DataBssChunk 64039234, CodeSeg 6403919c
DllLock 64039044, Process Lock 64038eec SID 00000000
TempCodeSeg 00000000 CodeSeg 6403919c Capability 00000000 0003ffff
CodeSegs: Count=0
NumChunks=2
0: Chunk 64039234, run 00400000, access count 1
1: Chunk 6403613c, run 00600000, access count 1
Process shared IO buffers cookie 0000031d
Process has no shared IO buffers
Domain -1, DACR 55555507</codeblock> <ul>
<li id="GUID-958232EF-0C57-5BE8-B7FD-9CE32E8868BA"><p> <xref href="GUID-1E822A8F-3144-509D-A949-BDAF4BB9634A.dita#GUID-1E822A8F-3144-509D-A949-BDAF4BB9634A/GUID-C34D3FEF-E3F9-5123-9F30-40DBDA77C64C">Process object and access count</xref>  </p> </li>
<li id="GUID-883E0C90-C62A-556B-8F7C-8A94EBBBCACD"><p> <xref href="GUID-1E822A8F-3144-509D-A949-BDAF4BB9634A.dita#GUID-1E822A8F-3144-509D-A949-BDAF4BB9634A/GUID-BFACCA5F-FE1A-5580-9A1A-6FF79D60C7C2">The process name</xref>  </p> </li>
<li id="GUID-9F8C813C-A45E-5CF6-8ED7-10F9C684A2EA"><p> <xref href="GUID-1E822A8F-3144-509D-A949-BDAF4BB9634A.dita#GUID-1E822A8F-3144-509D-A949-BDAF4BB9634A/GUID-F229C034-2497-5F64-B2D2-8C677731BA2C">Exit information</xref>  </p> </li>
<li id="GUID-D2C617EB-D70E-5847-8E27-ADF85BBD781E"><p> <xref href="GUID-1E822A8F-3144-509D-A949-BDAF4BB9634A.dita#GUID-1E822A8F-3144-509D-A949-BDAF4BB9634A/GUID-6758C73B-BC11-59FC-9836-E8853665AF47">Process flags</xref>  </p> </li>
<li id="GUID-93008AC0-CA9C-5663-BD48-BC57B767F030"><p> <xref href="GUID-1E822A8F-3144-509D-A949-BDAF4BB9634A.dita#GUID-1E822A8F-3144-509D-A949-BDAF4BB9634A/GUID-026A5C10-C2F5-564A-B5CC-AE2B76A144A9">Handles</xref>  </p> </li>
<li id="GUID-8D9F7DCE-E8E2-5414-87FE-21272BFAF590"><p> <xref href="GUID-1E822A8F-3144-509D-A949-BDAF4BB9634A.dita#GUID-1E822A8F-3144-509D-A949-BDAF4BB9634A/GUID-41734978-89CD-5B5D-8361-2F74378ADB63">Attributes</xref> </p> </li>
<li id="GUID-AA619815-2474-5741-93DD-F5734C2B5617"><p> <xref href="GUID-1E822A8F-3144-509D-A949-BDAF4BB9634A.dita#GUID-1E822A8F-3144-509D-A949-BDAF4BB9634A/GUID-9A4BB007-9B90-51A4-BEA7-FC7108031C6A">Information about memory</xref>  </p> </li>
<li id="GUID-52E95BE0-1123-544C-ADD4-CE087107EEF7"><p> <xref href="GUID-1E822A8F-3144-509D-A949-BDAF4BB9634A.dita#GUID-1E822A8F-3144-509D-A949-BDAF4BB9634A/GUID-BCFE81CD-1E22-58F9-9370-7CA7EFD4B505">Secure id</xref>  </p> </li>
<li id="GUID-053B4284-3873-56DA-9CC3-FC2C3E869E09"><p> <xref href="GUID-1E822A8F-3144-509D-A949-BDAF4BB9634A.dita#GUID-1E822A8F-3144-509D-A949-BDAF4BB9634A/GUID-FF5194C1-B2AB-5665-B9DE-EF4AB08BEA3F">Capability</xref> </p> </li>
<li id="GUID-05E35250-1EE3-5FF5-8622-51B24025FBC6"><p> <xref href="GUID-1E822A8F-3144-509D-A949-BDAF4BB9634A.dita#GUID-1E822A8F-3144-509D-A949-BDAF4BB9634A/GUID-5F4276A9-7EDC-5D5C-840A-06A3EC1903CC">Code segments</xref>  </p> </li>
<li id="GUID-45F0E651-1154-565C-AB4D-6ECA1AA7A7EC"><p> <xref href="GUID-1E822A8F-3144-509D-A949-BDAF4BB9634A.dita#GUID-1E822A8F-3144-509D-A949-BDAF4BB9634A/GUID-E4C48F4E-6EF9-5937-A8DA-6DFA1968557E">Chunks owned by the process</xref>  </p> </li>
<li id="GUID-73763927-40A9-5B34-B702-3FE90F56219C"><p> <xref href="GUID-1E822A8F-3144-509D-A949-BDAF4BB9634A.dita#GUID-1E822A8F-3144-509D-A949-BDAF4BB9634A/GUID-2D147ABB-E9D7-540C-BC98-CB0E9E4B89FF">Shared IO buffer information</xref>  </p> </li>
<li id="GUID-226E15CD-5382-51E6-B65D-8DA4DBD7CE4F"><p> <xref href="GUID-1E822A8F-3144-509D-A949-BDAF4BB9634A.dita#GUID-1E822A8F-3144-509D-A949-BDAF4BB9634A/GUID-9CB0F4F8-C3E9-5108-AB7E-B23057C48BA4">Domain information</xref>  </p> </li>
</ul> <p id="GUID-C34D3FEF-E3F9-5123-9F30-40DBDA77C64C"><b>Process object and access
count</b> </p> <codeblock id="GUID-33CB81C9-8585-5C75-8F5C-2F1D897BA5F9" xml:space="preserve">PROCESS at 64038d5c VPTR=f80342a4 AccessCount=6 Owner=00000000</codeblock> <p>The <codeph>Process at</codeph> field contains a pointer to the <codeph>DProcess</codeph> object
representing the process. </p> <p>The <codeph>AccessCount</codeph> field contains
the reference count on the process object. </p> <p>The <codeph>owner</codeph> field
contains a pointer to the object that owns this <codeph>DProcess</codeph> object. </p> <p id="GUID-BFACCA5F-FE1A-5580-9A1A-6FF79D60C7C2"><b>The process name</b> </p> <codeblock id="GUID-FD1903A5-AC86-59CE-BCC5-EC9E434DD5F8" xml:space="preserve">Full name test2.exe</codeblock> <p>The <codeph>Full
name</codeph> field gives the name of the process. In this example, the name
of the process is <b>test2.exe</b>. </p> <p>See <xref href="GUID-1E822A8F-3144-509D-A949-BDAF4BB9634A.dita#GUID-1E822A8F-3144-509D-A949-BDAF4BB9634A/GUID-73FCD8C6-089B-54E1-A6CA-798DAC33B6DF">the
thread name</xref>. </p> <p id="GUID-F229C034-2497-5F64-B2D2-8C677731BA2C"><b>Exit information</b> </p> <codeblock id="GUID-101BECBC-D613-5928-AB4E-70D292FBFDA7" xml:space="preserve">ExitInfo 3,0,</codeblock> <p>The <codeph>ExitInfo</codeph> field
contains the information that characterises the process exit. In this example,
the value is 3, meaning that this process has not exited. See also <xref href="GUID-0296BFC6-7F7C-3259-AF21-7E9B5C304B24.dita"><apiname>TExitType</apiname></xref>. </p> <p id="GUID-6758C73B-BC11-59FC-9836-E8853665AF47"><b>Process flags</b> </p> <codeblock id="GUID-163D2DFD-F5AF-594F-A618-A6795DBE88DC" xml:space="preserve">Flags a0000000, Handles 6403860c, Attributes 60010000</codeblock> <p>The <codeph>Flags</codeph> field
contains information about the state of the process. The possible values in
this field are defined by the <codeph>KProcess...</codeph> constants in <filepath>u32std.h</filepath>.
While the symbols are internal to Symbian platform, the following
table summarises the values and their meaning. </p> <table id="GUID-1913BCFB-93DD-58F5-B603-2B44A21C4621">
<tgroup cols="3"><colspec colname="col0"/><colspec colname="col1"/><colspec colname="col2"/>
<tbody>
<row>
<entry><p> <b>Symbol</b>  </p> </entry>
<entry><p> <b>Value</b>  </p> </entry>
<entry><p> <b>Meaning</b>  </p> </entry>
</row>
<row>
<entry><p> <codeph>KProcessFlagSystemCritical</codeph>  </p> </entry>
<entry><p> <codeph>0x00000004</codeph>  </p> </entry>
<entry><p>A process panic causes the entire system to reboot. </p> </entry>
</row>
<row>
<entry><p> <codeph>KProcessFlagSystemPermanent</codeph>  </p> </entry>
<entry><p> <codeph>0x00000008</codeph>  </p> </entry>
<entry><p>If the process exits for any reason, then this causes the entire
system to reboot. </p> </entry>
</row>
<row>
<entry><p> <codeph>KProcessFlagPriorityControl</codeph>  </p> </entry>
<entry><p> <codeph> 0x40000000</codeph>  </p> </entry>
<entry><p>If set, then other threads are allowed to change this thread’s priority. </p> </entry>
</row>
<row>
<entry><p> <codeph>KProcessFlagJustInTime</codeph>  </p> </entry>
<entry><p> <codeph>0x80000000</codeph>  </p> </entry>
<entry><p>If set, then just-in-time debug is enabled for this thread. </p> </entry>
</row>
</tbody>
</tgroup>
</table> <p id="GUID-1969D689-9BDD-5564-BA08-5424534EE1F2"><b>Handles</b> </p> <codeblock id="GUID-1DEFC9E1-7597-51DB-AF9A-3690F5D69507" xml:space="preserve">Flags a0000000, Handles 6403860c, Attributes 60010000</codeblock> <p>The <codeph>Handles</codeph> field
contains the address of a <codeph>DObjectIx</codeph> object that contains
the handles owned by the process. </p> <p id="GUID-41734978-89CD-5B5D-8361-2F74378ADB63"><b>Attributes</b> </p> <codeblock id="GUID-D526B23E-67A6-5667-A7E0-3761D83D84FA" xml:space="preserve">Flags a0000000, Handles 6403860c, Attributes 60010000</codeblock> <p>The <codeph>Attributes</codeph> field contains the attributes of the process. Some are generic, as defined
by <xref href="GUID-5B2E4FFA-8E41-3D62-A386-11BFD3EBB436.dita#GUID-5B2E4FFA-8E41-3D62-A386-11BFD3EBB436/GUID-6B8684BC-CDCB-3A01-9937-FF20FB613FE6"><apiname>DProcess::TProcessAttributes</apiname></xref>, but others depend on the
memory model. </p> <p id="GUID-9A4BB007-9B90-51A4-BEA7-FC7108031C6A"><b>Information about memory</b> </p> <codeblock id="GUID-3361448E-5135-5C20-B6D0-133885565EB8" xml:space="preserve">DataBssChunk 64039234, CodeSeg 6403919c</codeblock> <p>The <codeph>DataBssChunk</codeph> field
contains a pointer to the <codeph>DChunk</codeph> object representing the
chunk that contains the process data and <codeph>.bss</codeph> memory. Be
aware that this is not the same as the heap - heaps are allocated to threads,
and chunk information is found in the <codeph>DThread</codeph> object. </p> <p>The <codeph>CodeSeg</codeph> field
contains a pointer to the <codeph>DCodeSeg</codeph> object that represents
the code segment. </p> <p id="GUID-BCFE81CD-1E22-58F9-9370-7CA7EFD4B505"><b>Secure id</b> </p> <codeblock id="GUID-0DF422C0-D066-5A3C-A5CE-EF86F312D6D8" xml:space="preserve">DllLock 64039044, Process Lock 64038eec SID 00000000</codeblock> <p>The <codeph>SID</codeph> field
contains the secure id of the process. </p> <p id="GUID-FF5194C1-B2AB-5665-B9DE-EF4AB08BEA3F"><b>Capability</b> </p> <codeblock id="GUID-2C600784-5877-572C-8D7B-5362C6B25998" xml:space="preserve">TempCodeSeg 00000000 CodeSeg 6403919c Capability 00000000 0003ffff</codeblock> <p>The
second four bytes of the Capability field contains the set of bits that define
the capability for this process. This defines what the process can and cannot
do. </p> <p id="GUID-5F4276A9-7EDC-5D5C-840A-06A3EC1903CC"><b>Code segments</b> </p> <codeblock id="GUID-E2E5055C-0C98-533C-AC64-B12AFF22EC20" xml:space="preserve">CodeSegs: Count=0</codeblock> <p>The <codeph>CodeSegs:
Count</codeph> field contains the number of code segments that have been dynamically
loaded into the process. This will be zero if the process is XIP. </p> <p id="GUID-E4C48F4E-6EF9-5937-A8DA-6DFA1968557E"><b>Chunks owned by the process</b> </p> <codeblock id="GUID-CA07A45D-8905-55DA-A1B3-140C6B318B82" xml:space="preserve">NumChunks=2
0: Chunk 64039234, run 00400000, access count 1
1: Chunk 6403613c, run 00600000, access count 1
</codeblock> <p>The NumChunks field contains the number of chunks owned by
the process. </p> <p>Successive lines contain information about each chunk: </p> <ul>
<li id="GUID-632AEB6C-FF47-5139-A6E6-79DAF1E25214"><p>the <codeph>Chunk</codeph> field
contains the address of a kernel <codeph>DChunk</codeph> object. </p> </li>
<li id="GUID-7E0EA444-2FE0-56D2-AEF5-CA31DAD1A165"><p>the <codeph>run</codeph> field
contains the virtual address at which the chunk resides when this is the current
process. </p> </li>
<li id="GUID-8472FA34-1569-52A3-ABC1-951115A7FA4E"><p>the <codeph>access count</codeph> field
contains the reference count of the object. </p> </li>
</ul> <p id="GUID-2D147ABB-E9D7-540C-BC98-CB0E9E4B89FF"><b>Shared IO buffer information</b> </p> <codeblock id="GUID-05E4BBE9-CA87-5123-BD2C-49B10DE56295" xml:space="preserve">Process shared IO buffers cookie 0000031d
Process has no shared IO buffers
</codeblock> <p>This is information about shared IO buffers. The cookie is
only really of interest to base engineers. </p> <p id="GUID-9CB0F4F8-C3E9-5108-AB7E-B23057C48BA4"><b>Domain information</b> </p> <codeblock id="GUID-43108D24-448E-5D94-BD4C-D62B59F52633" xml:space="preserve">Domain -1, DACR 55555507</codeblock> <p>This
is ARM MMU-specific protection information. Processes have domain -1 and DACR
0xFFFFFFFF. </p> </section>
<section id="GUID-877907D5-6A04-510B-AE99-C3856A0469E7"><title>Current data
section process</title> <p>In the moving memory model the current process
could be a fixed process, in which case there is also a current moving process.
The current data section process is the current moving process. </p> <codeblock id="GUID-4E0FA397-16BF-581C-93FD-0D10BAE7B1B3" xml:space="preserve">TheCurrentDataSectionProcess=64038d5c</codeblock> <p>This
field contains a pointer to the <codeph>DProcess</codeph> object for the current
moving process. This line is followed by detailed information about the process
itself; the format is the same as that described for the <xref href="GUID-1E822A8F-3144-509D-A949-BDAF4BB9634A.dita#GUID-1E822A8F-3144-509D-A949-BDAF4BB9634A/GUID-2424E413-F2F3-5625-932D-515860911424">Current process state</xref>. </p> </section>
</conbody></concept>