Symbian OS outputs a system message log that can be useful when debugging. It includes:
A message is placed in the log file when a thread panics. Each message is written in the following format:
Thread <program>::<thread> <a thread identifier> Panic <panic type> <panic number>
For example:
Thread MyProg.exe::Worker135463368 393670456 Panic KERN-EXEC 0
In this example, a program called MyProg.exe
panicked.
Look for the panic type in About panics. In
the example, the panic type is KERN-EXEC. Click on the panic type to get a
list of panic numbers. For instance, once you have a list of
KERN-EXEC
panics, read the description of panic number zero.
The debug output tells you when threads are created and destroyed.
The beginning of the log contains information about the security settings of the platform.
The log also contains any platform security errors. They are produced
when an application attempts to call a function or perform an action without
the required capabilities. The error message displays the required
capabilities. Search the debug output for 'PlatSec
'.
Enforcement of platform security checks and logging of errors can be
controlled through the configuration settings in epoc.ini
. For
mroe information, see Platform security.
The emulator writes debug output toEPOCWIND.OUT
file in a
temporary directory on your PC. This is typically:
> C:\Documents and Settings\<your username>\Local
Settings\Temp
The exact location may vary from PC to PC.
The debug output can also be seen when debugging from an IDE. For Metrowerks CodeWarrior, you must enable debug output when debugging, as it is not enabled by default.
To enable the debug output when debugging, do the following:
Select the target that you wish to debug from the drop-down box at
the top of your project window. For instance, choose WINSCW
UREL
or WINSCW UDEB
.
Open the Edit
menu then select the settings for
the chosen target.
Go to Debugger->Debugger Settings
panel and
check the box Log System Messages
.
Click OK.
Open the file \epoc32\data\epoc.ini
in your Symbian OS
installation and add the following line:
LogToDebugger=1
Now debug output (the system message log) will be sent to a window in Metrowerks CodeWarrior.