201041
authorhgs
Fri, 08 Oct 2010 14:56:39 +0300
changeset 56 aa2539c91954
parent 54 a151135b0cf9
child 60 e54443a6878c
child 62 1c2bb2fc7c87
201041
debugsrv/runmodedebug/group/bld.inf
debugsrv/runmodedebug/rmdebug_test/eabi/t_rmdebug_dllu.def
debugsrv/runmodedebug/rmdebug_test/group/bld.inf
debugsrv/runmodedebug/rmdebug_test/group/e32test.bld
debugsrv/runmodedebug/rmdebug_test/group/mk_rmdbg_test.bat
debugsrv/runmodedebug/rmdebug_test/rm_debug/basic_tests/r_kernel_low_memory_security_svr_session.cpp
debugsrv/runmodedebug/rmdebug_test/rm_debug/basic_tests/r_kernel_low_memory_security_svr_session.h
debugsrv/runmodedebug/rmdebug_test/rm_debug/basic_tests/r_low_memory_security_svr_session.cpp
debugsrv/runmodedebug/rmdebug_test/rm_debug/basic_tests/r_low_memory_security_svr_session.h
debugsrv/runmodedebug/rmdebug_test/rm_debug/basic_tests/r_user_low_memory_security_svr_session.cpp
debugsrv/runmodedebug/rmdebug_test/rm_debug/basic_tests/r_user_low_memory_security_svr_session.h
debugsrv/runmodedebug/rmdebug_test/rm_debug/basic_tests/t_rmdebug2.cpp
debugsrv/runmodedebug/rmdebug_test/rm_debug/basic_tests/t_rmdebug2.h
debugsrv/runmodedebug/rmdebug_test/rm_debug/basic_tests/t_rmdebug2_oemtoken.cpp
debugsrv/runmodedebug/rmdebug_test/rm_debug/common/t_debug_logging.h
debugsrv/runmodedebug/rmdebug_test/rm_debug/common/t_target_launcher.cpp
debugsrv/runmodedebug/rmdebug_test/rm_debug/common/t_target_launcher.h
debugsrv/runmodedebug/rmdebug_test/rm_debug/debug_targets/d_demand_paging.cia
debugsrv/runmodedebug/rmdebug_test/rm_debug/debug_targets/d_demand_paging.h
debugsrv/runmodedebug/rmdebug_test/rm_debug/debug_targets/d_rmdebug_bkpt_test.h
debugsrv/runmodedebug/rmdebug_test/rm_debug/debug_targets/d_rmdebug_bkpt_test.s
debugsrv/runmodedebug/rmdebug_test/rm_debug/debug_targets/d_rmdebug_step_test.h
debugsrv/runmodedebug/rmdebug_test/rm_debug/debug_targets/d_rmdebug_step_test.s
debugsrv/runmodedebug/rmdebug_test/rm_debug/debug_targets/d_rmdebug_step_test_armv4.h
debugsrv/runmodedebug/rmdebug_test/rm_debug/debug_targets/d_rmdebug_step_test_armv4.s
debugsrv/runmodedebug/rmdebug_test/rm_debug/debug_targets/d_rmdebugthread.cpp
debugsrv/runmodedebug/rmdebug_test/rm_debug/debug_targets/d_rmdebugthread.h
debugsrv/runmodedebug/rmdebug_test/rm_debug/debug_targets/d_rmdebugthread2.cpp
debugsrv/runmodedebug/rmdebug_test/rm_debug/debug_targets/d_rmdebugthread2.h
debugsrv/runmodedebug/rmdebug_test/rm_debug/debug_targets/d_rmdebugthreadasm.cia
debugsrv/runmodedebug/rmdebug_test/rm_debug/debug_targets/d_rmdebugthreadasm2.cia
debugsrv/runmodedebug/rmdebug_test/rm_debug/debug_targets/t_rmdebug_app.cpp
debugsrv/runmodedebug/rmdebug_test/rm_debug/debug_targets/t_rmdebug_app.h
debugsrv/runmodedebug/rmdebug_test/rm_debug/debug_targets/t_rmdebug_dll.cpp
debugsrv/runmodedebug/rmdebug_test/rm_debug/debug_targets/t_rmdebug_dll.h
debugsrv/runmodedebug/rmdebug_test/rm_debug/debug_targets/t_rmdebug_security.cpp
debugsrv/runmodedebug/rmdebug_test/rm_debug/debug_targets/t_rmdebug_security.h
debugsrv/runmodedebug/rmdebug_test/rm_debug/group/bld.inf
debugsrv/runmodedebug/rmdebug_test/rm_debug/group/mytraces_rm_debug.txt
debugsrv/runmodedebug/rmdebug_test/rm_debug/group/mytraces_rm_debug_ekern.txt
debugsrv/runmodedebug/rmdebug_test/rm_debug/group/rmdbg_test.pkg
debugsrv/runmodedebug/rmdebug_test/rm_debug/group/rmdebug.iby
debugsrv/runmodedebug/rmdebug_test/rm_debug/group/t_multi_agent_launcher.mmp
debugsrv/runmodedebug/rmdebug_test/rm_debug/group/t_performance_test.mmp
debugsrv/runmodedebug/rmdebug_test/rm_debug/group/t_rmdebug.iby
debugsrv/runmodedebug/rmdebug_test/rm_debug/group/t_rmdebug.mmp
debugsrv/runmodedebug/rmdebug_test/rm_debug/group/t_rmdebug2.mmh
debugsrv/runmodedebug/rmdebug_test/rm_debug/group/t_rmdebug2.mmp
debugsrv/runmodedebug/rmdebug_test/rm_debug/group/t_rmdebug2_allcaps.mmp
debugsrv/runmodedebug/rmdebug_test/rm_debug/group/t_rmdebug2_allcapstoken.mmp
debugsrv/runmodedebug/rmdebug_test/rm_debug/group/t_rmdebug2_oem.mmp
debugsrv/runmodedebug/rmdebug_test/rm_debug/group/t_rmdebug2_oem2.mmp
debugsrv/runmodedebug/rmdebug_test/rm_debug/group/t_rmdebug2_oemtoken.mmp
debugsrv/runmodedebug/rmdebug_test/rm_debug/group/t_rmdebug2_oemtoken2.mmp
debugsrv/runmodedebug/rmdebug_test/rm_debug/group/t_rmdebug_app.mmp
debugsrv/runmodedebug/rmdebug_test/rm_debug/group/t_rmdebug_app1.mmp
debugsrv/runmodedebug/rmdebug_test/rm_debug/group/t_rmdebug_app10.mmp
debugsrv/runmodedebug/rmdebug_test/rm_debug/group/t_rmdebug_app2.mmp
debugsrv/runmodedebug/rmdebug_test/rm_debug/group/t_rmdebug_app3.mmp
debugsrv/runmodedebug/rmdebug_test/rm_debug/group/t_rmdebug_app4.mmp
debugsrv/runmodedebug/rmdebug_test/rm_debug/group/t_rmdebug_app5.mmp
debugsrv/runmodedebug/rmdebug_test/rm_debug/group/t_rmdebug_app6.mmp
debugsrv/runmodedebug/rmdebug_test/rm_debug/group/t_rmdebug_app7.mmp
debugsrv/runmodedebug/rmdebug_test/rm_debug/group/t_rmdebug_app8.mmp
debugsrv/runmodedebug/rmdebug_test/rm_debug/group/t_rmdebug_app9.mmp
debugsrv/runmodedebug/rmdebug_test/rm_debug/group/t_rmdebug_dll.mmp
debugsrv/runmodedebug/rmdebug_test/rm_debug/group/t_rmdebug_multi_agent.mmp
debugsrv/runmodedebug/rmdebug_test/rm_debug/group/t_rmdebug_multi_target.mmp
debugsrv/runmodedebug/rmdebug_test/rm_debug/group/t_rmdebug_performance_allcapstoken.mmp
debugsrv/runmodedebug/rmdebug_test/rm_debug/group/t_rmdebug_security0.mmp
debugsrv/runmodedebug/rmdebug_test/rm_debug/group/t_rmdebug_security1.mmp
debugsrv/runmodedebug/rmdebug_test/rm_debug/group/t_rmdebug_security2.mmp
debugsrv/runmodedebug/rmdebug_test/rm_debug/group/t_rmdebug_security3.mmp
debugsrv/runmodedebug/rmdebug_test/rm_debug/group/t_rmdebug_target_launcher.mmp
debugsrv/runmodedebug/rmdebug_test/rm_debug/group/t_rmdebug_tests.iby
debugsrv/runmodedebug/rmdebug_test/rm_debug/multi_agent_tests/t_agent_eventhandler.cpp
debugsrv/runmodedebug/rmdebug_test/rm_debug/multi_agent_tests/t_agent_eventhandler.h
debugsrv/runmodedebug/rmdebug_test/rm_debug/multi_agent_tests/t_multi_agent.cpp
debugsrv/runmodedebug/rmdebug_test/rm_debug/multi_agent_tests/t_multi_agent.h
debugsrv/runmodedebug/rmdebug_test/rm_debug/multi_agent_tests/t_multi_agent_launcher.cpp
debugsrv/runmodedebug/rmdebug_test/rm_debug/multi_agent_tests/t_multi_agent_launcher.h
debugsrv/runmodedebug/rmdebug_test/rm_debug/multi_target_tests/t_multi_target.cpp
debugsrv/runmodedebug/rmdebug_test/rm_debug/multi_target_tests/t_multi_target.h
debugsrv/runmodedebug/rmdebug_test/rm_debug/performance_test/t_rmdebug_performance_oemtoken.cpp
debugsrv/runmodedebug/rmdebug_test/rm_debug/performance_test/t_rmdebug_performance_test.cpp
debugsrv/runmodedebug/rmdebug_test/rm_debug/performance_test/t_rmdebug_performance_test.h
debugsrv/runmodedebug/rmdebug_test/rm_debug/scripts/tef_execute_rtests.script
debugsrv/runmodedebug/rmdriver/group/bld.inf
debugsrv/runmodedebug/rmdriver/group/rm_debug_kerneldriver.mmh
debugsrv/runmodedebug/rmdriver/group/rm_debug_kerneldriver.mmp
debugsrv/runmodedebug/rmdriver/group/rm_debug_svr.iby
debugsrv/runmodedebug/rmdriver/inc/d_debug_agent.h
debugsrv/runmodedebug/rmdriver/inc/d_debug_agent.inl
debugsrv/runmodedebug/rmdriver/inc/d_debug_functionality.h
debugsrv/runmodedebug/rmdriver/inc/d_driver_event_info.h
debugsrv/runmodedebug/rmdriver/inc/d_list_manager.h
debugsrv/runmodedebug/rmdriver/inc/d_process_tracker.h
debugsrv/runmodedebug/rmdriver/inc/d_rmd_breakpoints.h
debugsrv/runmodedebug/rmdriver/inc/d_rmd_breakpoints_debug.inl
debugsrv/runmodedebug/rmdriver/inc/d_rmd_stepping.h
debugsrv/runmodedebug/rmdriver/inc/d_rmd_stepping.inl
debugsrv/runmodedebug/rmdriver/inc/d_target_process.h
debugsrv/runmodedebug/rmdriver/inc/debug_logging.h
debugsrv/runmodedebug/rmdriver/inc/debug_utils.h
debugsrv/runmodedebug/rmdriver/inc/rm_debug_driver.h
debugsrv/runmodedebug/rmdriver/inc/rm_debug_eventhandler.h
debugsrv/runmodedebug/rmdriver/inc/rm_debug_kerneldriver.h
debugsrv/runmodedebug/rmdriver/src/d_debug_agent.cpp
debugsrv/runmodedebug/rmdriver/src/d_debug_functionality.cpp
debugsrv/runmodedebug/rmdriver/src/d_driver_event_info.cpp
debugsrv/runmodedebug/rmdriver/src/d_list_manager.cpp
debugsrv/runmodedebug/rmdriver/src/d_process_tracker.cpp
debugsrv/runmodedebug/rmdriver/src/d_rmd_breakpoints.cpp
debugsrv/runmodedebug/rmdriver/src/d_rmd_stepping.cpp
debugsrv/runmodedebug/rmdriver/src/d_target_process.cpp
debugsrv/runmodedebug/rmdriver/src/debug_utils.cpp
debugsrv/runmodedebug/rmdriver/src/rm_debug_eventhandler.cpp
debugsrv/runmodedebug/rmdriver/src/rm_debug_kerneldriver.cpp
debugsrv/runmodedebug/runmodedebug_plat/group/bld.inf
debugsrv/runmodedebug/runmodedebug_plat/run_mode_debug_api/group/bld.inf
debugsrv/runmodedebug/runmodedebug_plat/run_mode_debug_api/inc/rm_debug_api.h
debugsrv/runmodedebug/runmodedebug_plat/run_mode_debug_api/run_mode_debug_api.metaxml
debugsrv/runmodedebug/securityserver/group/rm_debug_svr.mmp
debugsrv/runmodedebug/securityserver/inc/c_process_pair.h
debugsrv/runmodedebug/securityserver/inc/c_security_svr_async.h
debugsrv/runmodedebug/securityserver/inc/c_security_svr_server.h
debugsrv/runmodedebug/securityserver/inc/c_security_svr_session.h
debugsrv/runmodedebug/securityserver/inc/c_shutdown_timer.h
debugsrv/runmodedebug/securityserver/inc/low_mem_requests.h
debugsrv/runmodedebug/securityserver/inc/rm_debug_api.h
debugsrv/runmodedebug/securityserver/inc/rm_debug_logging.h
debugsrv/runmodedebug/securityserver/src/c_process_pair.cpp
debugsrv/runmodedebug/securityserver/src/c_security_svr_async.cpp
debugsrv/runmodedebug/securityserver/src/c_security_svr_server.cpp
debugsrv/runmodedebug/securityserver/src/c_security_svr_session.cpp
debugsrv/runmodedebug/securityserver/src/c_shutdown_timer.cpp
debugsrv/runmodedebug/securityserver/src/rm_debug_svr.cpp
debugsrv/runmodedebug/tsrc/eabi/t_rmdebug_dllu.def
debugsrv/runmodedebug/tsrc/group/bld.inf
debugsrv/runmodedebug/tsrc/group/e32test.bld
debugsrv/runmodedebug/tsrc/group/mk_rmdbg_test.bat
debugsrv/runmodedebug/tsrc/rm_debug/basic_tests/r_kernel_low_memory_security_svr_session.cpp
debugsrv/runmodedebug/tsrc/rm_debug/basic_tests/r_kernel_low_memory_security_svr_session.h
debugsrv/runmodedebug/tsrc/rm_debug/basic_tests/r_low_memory_security_svr_session.cpp
debugsrv/runmodedebug/tsrc/rm_debug/basic_tests/r_low_memory_security_svr_session.h
debugsrv/runmodedebug/tsrc/rm_debug/basic_tests/r_user_low_memory_security_svr_session.cpp
debugsrv/runmodedebug/tsrc/rm_debug/basic_tests/r_user_low_memory_security_svr_session.h
debugsrv/runmodedebug/tsrc/rm_debug/basic_tests/t_rmdebug2.cpp
debugsrv/runmodedebug/tsrc/rm_debug/basic_tests/t_rmdebug2.h
debugsrv/runmodedebug/tsrc/rm_debug/basic_tests/t_rmdebug2_oemtoken.cpp
debugsrv/runmodedebug/tsrc/rm_debug/common/t_debug_logging.h
debugsrv/runmodedebug/tsrc/rm_debug/common/t_target_launcher.cpp
debugsrv/runmodedebug/tsrc/rm_debug/common/t_target_launcher.h
debugsrv/runmodedebug/tsrc/rm_debug/debug_targets/d_demand_paging.cia
debugsrv/runmodedebug/tsrc/rm_debug/debug_targets/d_demand_paging.h
debugsrv/runmodedebug/tsrc/rm_debug/debug_targets/d_rmdebug_bkpt_test.h
debugsrv/runmodedebug/tsrc/rm_debug/debug_targets/d_rmdebug_bkpt_test.s
debugsrv/runmodedebug/tsrc/rm_debug/debug_targets/d_rmdebug_step_test.h
debugsrv/runmodedebug/tsrc/rm_debug/debug_targets/d_rmdebug_step_test.s
debugsrv/runmodedebug/tsrc/rm_debug/debug_targets/d_rmdebug_step_test_armv4.h
debugsrv/runmodedebug/tsrc/rm_debug/debug_targets/d_rmdebug_step_test_armv4.s
debugsrv/runmodedebug/tsrc/rm_debug/debug_targets/d_rmdebugthread.cpp
debugsrv/runmodedebug/tsrc/rm_debug/debug_targets/d_rmdebugthread.h
debugsrv/runmodedebug/tsrc/rm_debug/debug_targets/d_rmdebugthread2.cpp
debugsrv/runmodedebug/tsrc/rm_debug/debug_targets/d_rmdebugthread2.h
debugsrv/runmodedebug/tsrc/rm_debug/debug_targets/d_rmdebugthreadasm.cia
debugsrv/runmodedebug/tsrc/rm_debug/debug_targets/d_rmdebugthreadasm2.cia
debugsrv/runmodedebug/tsrc/rm_debug/debug_targets/t_rmdebug_app.cpp
debugsrv/runmodedebug/tsrc/rm_debug/debug_targets/t_rmdebug_app.h
debugsrv/runmodedebug/tsrc/rm_debug/debug_targets/t_rmdebug_dll.cpp
debugsrv/runmodedebug/tsrc/rm_debug/debug_targets/t_rmdebug_dll.h
debugsrv/runmodedebug/tsrc/rm_debug/debug_targets/t_rmdebug_security.cpp
debugsrv/runmodedebug/tsrc/rm_debug/debug_targets/t_rmdebug_security.h
debugsrv/runmodedebug/tsrc/rm_debug/group/bld.inf
debugsrv/runmodedebug/tsrc/rm_debug/group/mytraces_rm_debug.txt
debugsrv/runmodedebug/tsrc/rm_debug/group/mytraces_rm_debug_ekern.txt
debugsrv/runmodedebug/tsrc/rm_debug/group/rmdbg_test.pkg
debugsrv/runmodedebug/tsrc/rm_debug/group/rmdebug.iby
debugsrv/runmodedebug/tsrc/rm_debug/group/t_multi_agent_launcher.mmp
debugsrv/runmodedebug/tsrc/rm_debug/group/t_performance_test.mmp
debugsrv/runmodedebug/tsrc/rm_debug/group/t_rmdebug2.mmh
debugsrv/runmodedebug/tsrc/rm_debug/group/t_rmdebug2.mmp
debugsrv/runmodedebug/tsrc/rm_debug/group/t_rmdebug2_allcaps.mmp
debugsrv/runmodedebug/tsrc/rm_debug/group/t_rmdebug2_allcapstoken.mmp
debugsrv/runmodedebug/tsrc/rm_debug/group/t_rmdebug2_oem.mmp
debugsrv/runmodedebug/tsrc/rm_debug/group/t_rmdebug2_oem2.mmp
debugsrv/runmodedebug/tsrc/rm_debug/group/t_rmdebug2_oemtoken.mmp
debugsrv/runmodedebug/tsrc/rm_debug/group/t_rmdebug2_oemtoken2.mmp
debugsrv/runmodedebug/tsrc/rm_debug/group/t_rmdebug_app.mmp
debugsrv/runmodedebug/tsrc/rm_debug/group/t_rmdebug_app1.mmp
debugsrv/runmodedebug/tsrc/rm_debug/group/t_rmdebug_app10.mmp
debugsrv/runmodedebug/tsrc/rm_debug/group/t_rmdebug_app2.mmp
debugsrv/runmodedebug/tsrc/rm_debug/group/t_rmdebug_app3.mmp
debugsrv/runmodedebug/tsrc/rm_debug/group/t_rmdebug_app4.mmp
debugsrv/runmodedebug/tsrc/rm_debug/group/t_rmdebug_app5.mmp
debugsrv/runmodedebug/tsrc/rm_debug/group/t_rmdebug_app6.mmp
debugsrv/runmodedebug/tsrc/rm_debug/group/t_rmdebug_app7.mmp
debugsrv/runmodedebug/tsrc/rm_debug/group/t_rmdebug_app8.mmp
debugsrv/runmodedebug/tsrc/rm_debug/group/t_rmdebug_app9.mmp
debugsrv/runmodedebug/tsrc/rm_debug/group/t_rmdebug_dll.mmp
debugsrv/runmodedebug/tsrc/rm_debug/group/t_rmdebug_multi_agent.mmp
debugsrv/runmodedebug/tsrc/rm_debug/group/t_rmdebug_multi_target.mmp
debugsrv/runmodedebug/tsrc/rm_debug/group/t_rmdebug_performance_allcapstoken.mmp
debugsrv/runmodedebug/tsrc/rm_debug/group/t_rmdebug_security0.mmp
debugsrv/runmodedebug/tsrc/rm_debug/group/t_rmdebug_security1.mmp
debugsrv/runmodedebug/tsrc/rm_debug/group/t_rmdebug_security2.mmp
debugsrv/runmodedebug/tsrc/rm_debug/group/t_rmdebug_security3.mmp
debugsrv/runmodedebug/tsrc/rm_debug/group/t_rmdebug_target_launcher.mmp
debugsrv/runmodedebug/tsrc/rm_debug/group/t_rmdebug_tests.iby
debugsrv/runmodedebug/tsrc/rm_debug/group/testexecute.ini
debugsrv/runmodedebug/tsrc/rm_debug/multi_agent_tests/t_agent_eventhandler.cpp
debugsrv/runmodedebug/tsrc/rm_debug/multi_agent_tests/t_agent_eventhandler.h
debugsrv/runmodedebug/tsrc/rm_debug/multi_agent_tests/t_multi_agent.cpp
debugsrv/runmodedebug/tsrc/rm_debug/multi_agent_tests/t_multi_agent.h
debugsrv/runmodedebug/tsrc/rm_debug/multi_agent_tests/t_multi_agent_launcher.cpp
debugsrv/runmodedebug/tsrc/rm_debug/multi_agent_tests/t_multi_agent_launcher.h
debugsrv/runmodedebug/tsrc/rm_debug/multi_target_tests/t_multi_target.cpp
debugsrv/runmodedebug/tsrc/rm_debug/multi_target_tests/t_multi_target.h
debugsrv/runmodedebug/tsrc/rm_debug/performance_test/t_rmdebug_performance_oemtoken.cpp
debugsrv/runmodedebug/tsrc/rm_debug/performance_test/t_rmdebug_performance_test.cpp
debugsrv/runmodedebug/tsrc/rm_debug/performance_test/t_rmdebug_performance_test.h
debugsrv/runmodedebug/tsrc/rm_debug/scripts/tef_execute_rtests.script
layers.sysdef.xml
package_definition.xml
tracefw/tracecompiler/group/bld.inf
tracefw/tracecompiler/group/build.xml
tracefw/tracecompiler/src/com.nokia.tracecompiler/.classpath
tracefw/tracecompiler/src/com.nokia.tracecompiler/.project
tracefw/tracecompiler/src/com.nokia.tracecompiler/.settings/org.eclipse.core.resources.prefs
tracefw/tracecompiler/src/com.nokia.tracecompiler/.settings/org.eclipse.jdt.core.prefs
tracefw/tracecompiler/src/com.nokia.tracecompiler/.settings/org.eclipse.jdt.ui.prefs
tracefw/tracecompiler/src/com.nokia.tracecompiler/about.html
tracefw/tracecompiler/src/com.nokia.tracecompiler/build.properties
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/Messages.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/TraceCompiler.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/TraceCompilerConfiguration.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/TraceCompilerConstants.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/TraceCompilerGlobals.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/TraceCompilerIllegalArgumentsException.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/TraceCompilerLogger.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/TraceCompilerMain.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/TraceCompilerModelListener.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/TraceCompilerRootException.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/TraceCompilerView.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/DictionaryDefRef.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/DictionaryEngine.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/DictionaryFile.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/DictionaryFileConstants.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/DictionaryFileExport.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/DictionaryFileRef.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/DictionaryFileWriter.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/DictionaryPreferences.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/DictionaryRef.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/Messages.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/encoder/DataType.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/encoder/Dictionary.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/encoder/LocationStore.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/encoder/Options.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/encoder/TagWriter.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/encoder/TestEncoder.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/encoder/Trace.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/encoder/TraceComponent.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/encoder/TraceDataStore.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/encoder/TraceDictionaryEncoder.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/encoder/TraceGroup.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/encoder/TypeDef.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/encoder/TypeDefStore.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/encoder/XMLDataFilter.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/encoder/package.html
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/messages.properties
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/package.html
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/document/FileDocument.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/document/FileDocumentMonitor.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/document/Messages.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/document/StringDocument.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/document/StringDocumentFactory.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/document/messages.properties
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/ConfigurationDelegate.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/LocationListBase.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/LocationMapModelListener.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/LocationProperties.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/Messages.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/SourceContextManager.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/SourceContextManagerImpl.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/TraceCompilerEngine.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/TraceCompilerEngineActions.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/TraceCompilerEngineBase.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/TraceCompilerEngineConfiguration.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/TraceCompilerEngineConfigurationListener.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/TraceCompilerEngineErrorCodes.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/TraceCompilerEngineErrorMessages.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/TraceCompilerEngineEvents.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/TraceCompilerEngineGlobals.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/TraceCompilerEngineInterface.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/TraceCompilerEngineView.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/TraceLocation.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/TraceLocationConverter.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/TraceLocationList.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/TraceLocationListListener.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/TraceLocationMap.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/ViewAdapter.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/event/EventEngine.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/event/Messages.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/event/messages.properties
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/event/package.html
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/header/CheckFormattedTraceExists.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/header/CheckIsBufferSizeDynamic.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/header/CheckIsKernelModeEndifNeeded.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/header/CheckIsKernelModeFlagNeeded.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/header/CheckIsTraceBufferBuilt.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/header/CheckIsTraceFormatDuplicate.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/header/CheckParameterNeedsAlignment.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/header/ComplexHeaderRule.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/header/HeaderConstants.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/header/HeaderEngine.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/header/HeaderTemplate.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/header/IteratorComplexTraces.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/header/IteratorParameters.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/header/IteratorTraces.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/header/Messages.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/header/SetNewLineCount.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/header/TemplateCheckBase.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/header/TemplateChoice.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/header/TemplateIterator.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/header/TemplateIteratorEntry.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/header/TraceHeader.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/header/TraceHeaderWriter.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/header/messages.properties
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/header/package.html
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/messages.properties
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/package.html
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/plugin/PluginEngine.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/plugin/PluginTracePropertyVerifier.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/plugin/TraceAPIPluginManager.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/plugin/package.html
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/project/Messages.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/project/ProjectConstants.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/project/ProjectEngine.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/project/SortedProperties.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/project/TraceCompilerProject.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/project/TraceIDCache.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/project/messages.properties
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/project/package.html
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/propertyfile/DocumentElementWrapper.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/propertyfile/EnumElementParser.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/propertyfile/FileElementParser.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/propertyfile/Messages.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/propertyfile/PropertyFileConstants.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/propertyfile/PropertyFileElementParser.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/propertyfile/PropertyFileEngine.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/propertyfile/PropertyFileParser.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/propertyfile/PropertyFileUtils.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/propertyfile/TracePropertyFile.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/propertyfile/ValueElementParser.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/propertyfile/messages.properties
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/ArrayParameterRuleImpl.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/AutoAddFunctionParametersRule.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/AutoAddParameterRuleBase.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/AutoAddReturnParameterRule.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/AutoAddThisPtrRule.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/AutoAddValueRule.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/AutomaticTraceTextRule.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/ClassNameWrapper.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/ComplexHeaderRuleImpl.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/EndOfFunctionLocationRule.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/EntryTraceRule.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/ExitTracePropertyBuilder.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/ExitTraceRule.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/ExtensionBase.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/FillerParameterRuleImpl.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/Messages.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/ParameterTypeMappingRule.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/PerformanceEventRuleBase.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/PerformanceEventStartRule.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/PerformanceEventStopRule.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/ReadOnlyObjectRuleImpl.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/RuleBase.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/RuleUtils.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/RulesEngine.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/RulesEngineConfigurationListener.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/RulesEngineConstants.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/RulesEngineModelListener.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/RulesEnginePluginManager.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/RulesEngineResetListener.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/SourceParserRuleBase.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/StartOfFunctionLocationRule.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/StateTraceRule.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/ThisPointerParameterTemplate.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/TraceFormatRuleBase.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/TraceParameterFormattingRuleBase.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/ValueParameterTemplate.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/messages.properties
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/osttrace/OstConstants.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/osttrace/OstTraceFormatRule.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/osttrace/OstTraceParserRule.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/osttrace/package.html
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/package.html
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/source/Messages.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/source/SourceEngine.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/source/SourceEngineModelExtensionListener.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/source/SourceEngineModelListener.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/source/SourceFormatter.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/source/SourceListener.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/source/SourceLocationRule.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/source/SourceParserResult.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/source/SourceParserRule.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/source/SourceProperties.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/source/TraceFormattingRule.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/source/TraceParameterFormattingRule.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/source/messages.properties
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/source/package.html
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/utils/TraceMultiplierRule.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/utils/TraceUtils.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/utils/package.html
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/file/FileCompareOutputStream.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/file/FileUtils.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/licence.lic
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/licence_hash.lic
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/messages.properties
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/DuplicateParameterNameModifier.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/DuplicateValueModifier.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/Trace.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceCompilerErrorParameters.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceCompilerException.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceConstantTable.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceConstantTableEntry.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceGroup.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceModel.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceModelExtension.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceModelExtensionListener.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceModelListener.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceModelPersistentExtension.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceModelResetListener.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceObject.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceObjectFactory.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceObjectModifier.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceObjectProperty.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceObjectPropertyList.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceObjectPropertyVerifier.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceObjectRule.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceObjectRuleCreateObject.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceObjectRuleFactory.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceObjectRuleOnDelete.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceObjectRuleRemoveOnCreate.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceObjectUtils.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceParameter.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceProcessingListener.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/package.html
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/package.html
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/plugin/TraceAPIFormatter.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/plugin/TraceAPIParser.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/plugin/TraceAPIPlugin.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/plugin/TraceCompilerExport.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/plugin/TraceCompilerPlugin.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/plugin/TraceFormatConstants.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/plugin/TraceHeaderContribution.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/plugin/package.html
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/project/FormattingUtils.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/project/GroupNameIdPair.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/project/GroupNames.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/project/Messages.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/project/ProjectFileParser.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/project/ProjectUtils.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/project/PropertyNames.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/project/TraceLocationParser.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/project/TraceProjectAPI.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/project/TraceProjectAPIList.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/project/TraceProjectFile.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/project/messages.properties
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/project/package.html
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/rules/ArrayParameterRule.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/rules/FillerParameterRule.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/rules/HiddenTraceObjectRule.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/rules/ReadOnlyObjectRule.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/rules/package.html
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/ContextAreaParser.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/ContextSearchData.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/ExcludedAreaParser.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/ExcludedAreaSearchData.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/FormatMapping.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/FunctionReturnValueParser.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/FunctionReturnValueSearchData.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/OffsetLength.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/ParsedType.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/PositionArrayComparator.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/SourceConstants.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/SourceContext.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/SourceDocumentFactory.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/SourceDocumentInterface.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/SourceDocumentMonitor.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/SourceDocumentProcessor.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/SourceErrorCodes.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/SourceExcludedArea.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/SourceIterator.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/SourceLocation.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/SourceLocationBase.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/SourceLocationInterface.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/SourceLocationListener.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/SourceParameter.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/SourceParameterTokenizer.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/SourceParser.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/SourceParserException.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/SourcePropertyProvider.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/SourceReturn.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/SourceSearch.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/SourceSelector.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/SourceStringSearch.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/SourceUtils.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/SymbianConstants.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/TokenizerSearchData.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/TypeMapping.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/package.html
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/utils/DocumentAdapter.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/utils/DocumentFactory.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/utils/DocumentFactoryBase.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/utils/DocumentMonitorBase.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/utils/SimpleLocation.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/utils/TraceCompilerVersion.java
tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/utils/package.html
tracefw/tracecompiler/test/FixedIdDefinitionsTestApp/data/reference_fid_file_1.txt
tracefw/tracecompiler/test/FixedIdDefinitionsTestApp/data/reference_fid_file_2.txt
tracefw/tracecompiler/test/FixedIdDefinitionsTestApp/data/reference_fid_file_3.txt
tracefw/tracecompiler/test/FixedIdDefinitionsTestApp/data/reference_fid_file_4.txt
tracefw/tracecompiler/test/FixedIdDefinitionsTestApp/data/reference_fid_file_5.txt
tracefw/tracecompiler/test/FixedIdDefinitionsTestApp/data/reference_fid_file_6_0.txt
tracefw/tracecompiler/test/FixedIdDefinitionsTestApp/data/reference_fid_file_6_1.txt
tracefw/tracecompiler/test/FixedIdDefinitionsTestApp/data/reference_fid_file_6_2.txt
tracefw/tracecompiler/test/FixedIdDefinitionsTestApp/data/reference_fid_file_6_3.txt
tracefw/tracecompiler/test/FixedIdDefinitionsTestApp/data/reference_fid_file_7_0.txt
tracefw/tracecompiler/test/FixedIdDefinitionsTestApp/data/reference_fid_file_7_1.txt
tracefw/tracecompiler/test/FixedIdDefinitionsTestApp/data/reference_fid_file_7_2.txt
tracefw/tracecompiler/test/FixedIdDefinitionsTestApp/data/reference_fid_file_8.txt
tracefw/tracecompiler/test/FixedIdDefinitionsTestApp/data/reference_fid_file_9.txt
tracefw/tracecompiler/test/FixedIdDefinitionsTestApp/data/reference_tc_output_8.txt
tracefw/tracecompiler/test/FixedIdDefinitionsTestApp/data/reference_tc_output_9.txt
tracefw/tracecompiler/test/FixedIdDefinitionsTestApp/group/FixedIdDefinitionsTestApp.mmp
tracefw/tracecompiler/test/FixedIdDefinitionsTestApp/group/bld.inf
tracefw/tracecompiler/test/FixedIdDefinitionsTestApp/inc/FixedIdDefinitionsTestApp.h
tracefw/tracecompiler/test/FixedIdDefinitionsTestApp/src/FixedIdDefinitionsTestApp.cpp
tracefw/tracecompiler/test/MultipleCppTraceErrorApp/data/referencelog.txt
tracefw/tracecompiler/test/MultipleCppTraceErrorApp/group/MultipleCppTraceErrorApp.mmp
tracefw/tracecompiler/test/MultipleCppTraceErrorApp/group/bld.inf
tracefw/tracecompiler/test/MultipleCppTraceErrorApp/inc/MultipleCppTraceErrorApp.h
tracefw/tracecompiler/test/MultipleCppTraceErrorApp/sis/TraceErrorApp_EKA2.pkg
tracefw/tracecompiler/test/MultipleCppTraceErrorApp/src/ExtraCppFile.cpp
tracefw/tracecompiler/test/MultipleCppTraceErrorApp/src/MultipleCppTraceErrorApp.cpp
tracefw/tracecompiler/test/MultipleCppTraceErrorApp/traces/OstTraceDefinitions.h
tracefw/tracecompiler/test/MultipleCppTraceErrorApp/traces/fixed_id.definitions
tracefw/tracecompiler/test/MultipleMmpTraceErrorApps/data/referencelog.txt
tracefw/tracecompiler/test/MultipleMmpTraceErrorApps/group/MultipleMmpTraceErrorApp1.mmp
tracefw/tracecompiler/test/MultipleMmpTraceErrorApps/group/MultipleMmpTraceErrorApp2.mmp
tracefw/tracecompiler/test/MultipleMmpTraceErrorApps/group/bld.inf
tracefw/tracecompiler/test/MultipleMmpTraceErrorApps/inc/MultipleMmpTraceErrorApp.h
tracefw/tracecompiler/test/MultipleMmpTraceErrorApps/sis/TraceErrorApp_EKA2.pkg
tracefw/tracecompiler/test/MultipleMmpTraceErrorApps/src/ExtraCppFile1.cpp
tracefw/tracecompiler/test/MultipleMmpTraceErrorApps/src/ExtraCppFile2.cpp
tracefw/tracecompiler/test/MultipleMmpTraceErrorApps/src/MultipleMmpTraceErrorApp1.cpp
tracefw/tracecompiler/test/MultipleMmpTraceErrorApps/src/MultipleMmpTraceErrorApp2.cpp
tracefw/tracecompiler/test/MultipleMmpTraceErrorApps/traces/OstTraceDefinitions.h
tracefw/tracecompiler/test/MultipleMmpTraceErrorApps/traces/fixed_id.definitions
tracefw/tracecompiler/test/TraceErrorApp/data/referencelog.txt
tracefw/tracecompiler/test/TraceErrorApp/group/TraceErrorApp.mmp
tracefw/tracecompiler/test/TraceErrorApp/group/bld.inf
tracefw/tracecompiler/test/TraceErrorApp/inc/TraceErrorApp.h
tracefw/tracecompiler/test/TraceErrorApp/sis/TraceErrorApp_EKA2.pkg
tracefw/tracecompiler/test/TraceErrorApp/src/TraceErrorApp.cpp
tracefw/tracecompiler/test/TraceErrorApp/traces/OstTraceDefinitions.h
tracefw/tracecompiler/test/TraceErrorApp/traces/fixed_id.definitions
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/console/group/HelloTraceConsole.mmp
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/console/group/bld.inf
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/console/group/hellotraceconsole.iby
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/console/inc/HelloTraceConsole.h
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/console/src/HelloTraceConsole.cpp
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/bwins/HelloTraceDllu.def
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/eabi/HelloTraceDllu.def
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/group/HelloTraceDll.mmp
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/group/HelloTraceDll2.mmp
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/group/bld.inf
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/group/hellotracedll.iby
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/inc/HelloTraceExample.h
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/inc/HelloTraceFn.h
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/inc/HelloTraceFn2.h
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/inc/HelloTraceInterface.h
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/inc/HelloTraceInterface2.h
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/inc/HelloTracePanic.h
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/inc/HelloTraceTypes.h
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/inc/HelloTraceTypes2.h
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/incDup/HelloTraceFn2Dup.h
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/incDup/HelloTraceFn2Dup2.inl
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/incDup/HelloTraceFnDup.h
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/incDup/HelloTraceFnDup2.inl
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/incDup/HelloTraceInterface2Dup.h
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/incDup/HelloTraceInterface2Dup2.inl
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/incDup/HelloTraceInterfaceDup.h
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/incDup/HelloTraceInterfaceDup2.inl
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/incDup/HelloTraceTypes2Dup.h
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/incDup/HelloTraceTypes2Dup2.inl
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/incDup/HelloTraceTypesDup.h
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/incDup/HelloTraceTypesDup2.inl
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/src/HelloTraceExample.cpp
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/src/HelloTraceFn.cpp
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/src/HelloTraceInterface.cpp
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/src/HelloTracePanic.cpp
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/src/HelloTraceTypes.cpp
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/traces/trace.properties
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/group/bld.inf
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/console/group/HelloTraceConsole.mmp
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/console/group/bld.inf
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/console/group/hellotraceconsole.iby
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/console/inc/HelloTraceConsole.h
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/console/src/HelloTraceConsole.cpp
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/dll/bwins/HelloTraceDllu.def
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/dll/eabi/HelloTraceDllu.def
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/dll/group/HelloTraceDll.mmp
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/dll/group/HelloTraceDll2.mmp
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/dll/group/bld.inf
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/dll/group/hellotracedll.iby
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/dll/inc/HelloTraceExample.h
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/dll/inc/HelloTraceFn.h
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/dll/inc/HelloTraceInterface.h
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/dll/inc/HelloTracePanic.h
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/dll/inc/HelloTraceTypes.h
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/dll/incDup/HelloTraceFnDup.h
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/dll/incDup/HelloTraceFnDup2.inl
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/dll/incDup/HelloTraceInterfaceDup.h
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/dll/incDup/HelloTraceInterfaceDup2.inl
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/dll/incDup/HelloTraceTypesDup.h
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/dll/incDup/HelloTraceTypesDup2.inl
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/dll/src/HelloTraceExample.cpp
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/dll/src/HelloTraceFn.cpp
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/dll/src/HelloTraceInterface.cpp
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/dll/src/HelloTracePanic.cpp
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/dll/src/HelloTraceTypes.cpp
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/dll/traces/hellotracedll2_dll/trace.properties
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/dll/traces/hellotracedll_dll/trace.properties
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/group/bld.inf
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/console/group/HelloTraceConsole.mmp
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/console/group/bld.inf
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/console/group/hellotraceconsole.iby
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/console/inc/HelloTraceConsole.h
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/console/src/HelloTraceConsole.cpp
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/bwins/HelloTraceDllu.def
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/eabi/HelloTraceDllu.def
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/group/HelloTraceDll.mmp
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/group/HelloTraceDll2.mmp
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/group/bld.inf
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/group/hellotracedll.iby
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/inc/HelloTraceExample.h
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/inc/HelloTraceFn.h
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/inc/HelloTraceFn2.h
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/inc/HelloTraceInterface.h
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/inc/HelloTraceInterface2.h
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/inc/HelloTracePanic.h
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/inc/HelloTraceTypes.h
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/inc/HelloTraceTypes2.h
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/incDup/HelloTraceFn2Dup.h
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/incDup/HelloTraceFn2Dup2.inl
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/incDup/HelloTraceFnDup.h
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/incDup/HelloTraceFnDup2.inl
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/incDup/HelloTraceInterface2Dup.h
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/incDup/HelloTraceInterface2Dup2.inl
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/incDup/HelloTraceInterfaceDup.h
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/incDup/HelloTraceInterfaceDup2.inl
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/incDup/HelloTraceTypes2Dup.h
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/incDup/HelloTraceTypes2Dup2.inl
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/incDup/HelloTraceTypesDup.h
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/incDup/HelloTraceTypesDup2.inl
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/src/HelloTraceExample.cpp
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/src/HelloTraceExample2.cpp
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/src/HelloTraceFn.cpp
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/src/HelloTraceFn2.cpp
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/src/HelloTraceInterface.cpp
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/src/HelloTraceInterface2.cpp
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/src/HelloTracePanic.cpp
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/src/HelloTracePanic2.cpp
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/src/HelloTraceTypes.cpp
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/src/HelloTraceTypes2.cpp
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/traces/trace.properties
tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/group/bld.inf
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/console/group/HelloTraceConsole.mmp
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/console/group/bld.inf
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/console/group/hellotraceconsole.iby
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/console/inc/HelloTraceConsole.h
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/dll/bwins/HelloTraceDllu.def
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/dll/eabi/HelloTraceDllu.def
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/dll/group/HelloTraceDll.mmp
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/dll/group/bld.inf
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/dll/group/hellotracedll.iby
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/dll/inc/HelloTraceExample.h
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/dll/inc/HelloTraceFn.h
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/dll/inc/HelloTraceInterface.h
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/dll/inc/HelloTracePanic.h
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/dll/inc/HelloTraceTypes.h
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/dll/incDup/HelloTraceFnDup.inl
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/dll/incDup/HelloTraceFnDup2.inl
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/dll/incDup/HelloTraceInterfaceDup.h
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/dll/incDup/HelloTraceInterfaceDup2.inl
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/dll/incDup/HelloTraceTypesDup.h
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/dll/incDup/HelloTraceTypesDup2.inl
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/dll/src/HelloTraceExample.cpp
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/dll/src/HelloTraceFn.cpp
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/dll/src/HelloTraceInterface.cpp
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/dll/src/HelloTracePanic.cpp
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/dll/src/HelloTraceTypes.cpp
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/dll/traces/trace.properties
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/group/bld.inf
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/console/group/HelloTraceConsole.mmp
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/console/group/bld.inf
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/console/group/hellotraceconsole.iby
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/console/inc/HelloTraceConsole.h
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/console/src/HelloTraceConsole.cpp
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/dll/bwins/HelloTraceDllu.def
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/dll/eabi/HelloTraceDllu.def
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/dll/group/HelloTraceDll.mmp
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/dll/group/bld.inf
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/dll/group/hellotracedll.iby
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/dll/inc/HelloTraceExample.h
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/dll/inc/HelloTraceFn.h
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/dll/inc/HelloTraceInterface.h
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/dll/inc/HelloTracePanic.h
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/dll/inc/HelloTraceTypes.h
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/dll/incDup/HelloTraceFnDup.h
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/dll/incDup/HelloTraceFnDup2.inl
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/dll/incDup/HelloTraceInterfaceDup.h
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/dll/incDup/HelloTraceInterfaceDup2.inl
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/dll/incDup/HelloTraceTypesDup.h
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/dll/incDup/HelloTraceTypesDup2.inl
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/dll/src/HelloTraceExample.cpp
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/dll/src/HelloTraceFn.cpp
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/dll/src/HelloTraceInterface.cpp
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/dll/src/HelloTracePanic.cpp
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/dll/src/HelloTraceTypes.cpp
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/dll/traces/hellotracedll_dll/trace.properties
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/group/bld.inf
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_import/console/group/HelloTraceConsole.mmp
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_import/console/group/bld.inf
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_import/console/group/hellotraceconsole.iby
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_import/console/inc/HelloTraceConsole.h
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_import/console/src/HelloTraceConsole.cpp
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_import/dll/bwins/HelloTraceDllu.def
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_import/dll/eabi/HelloTraceDllu.def
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_import/dll/group/HelloTraceDll.mmp
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_import/dll/group/bld.inf
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_import/dll/group/hellotracedll.iby
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_import/dll/inc/HelloTraceExample.h
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_import/dll/inc/HelloTraceInterface.h
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_import/dll/inc/HelloTracePanic.h
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_import/dll/inc/HelloTraceTypes.h
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_import/dll/incDup/HelloTraceFnDup.h
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_import/dll/incDup/HelloTraceFnDup2.inl
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_import/dll/incDup/HelloTraceInterfaceDup.h
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_import/dll/incDup/HelloTraceInterfaceDup2.inl
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_import/dll/incDup/HelloTraceTypesDup.h
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_import/dll/incDup/HelloTraceTypesDup2.inl
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_import/dll/src/HelloTraceExample.cpp
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_import/dll/src/HelloTraceFn.cpp
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_import/dll/src/HelloTraceInterface.cpp
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_import/dll/src/HelloTracePanic.cpp
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_import/dll/src/HelloTraceTypes.cpp
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_import/dll/traces/trace.properties
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_import/group/bld.inf
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/console/group/HelloTraceConsole.mmp
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/console/group/bld.inf
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/console/group/hellotraceconsole.iby
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/console/inc/HelloTraceConsole.h
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/console/src/HelloTraceConsole.cpp
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/dll/bwins/HelloTraceDllu.def
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/dll/eabi/HelloTraceDllu.def
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/dll/group/HelloTraceDll.mmp
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/dll/group/bld.inf
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/dll/group/hellotracedll.iby
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/dll/inc/HelloTraceExample.h
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/dll/inc/HelloTraceFn.h
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/dll/inc/HelloTraceInterface.h
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/dll/inc/HelloTracePanic.h
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/dll/inc/HelloTraceTypes.h
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/dll/incDup/HelloTraceFn.inl
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/dll/incDup/HelloTraceFnDup.h
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/dll/incDup/HelloTraceInterface.inl
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/dll/incDup/HelloTraceInterfaceDup.h
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/dll/incDup/HelloTraceTypes.inl
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/dll/incDup/HelloTraceTypesDup.h
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/dll/src/HelloTraceExample.cpp
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/dll/src/HelloTraceFn.cpp
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/dll/src/HelloTraceInterface.cpp
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/dll/src/HelloTracePanic.cpp
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/dll/src/HelloTraceTypes.cpp
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/dll/traces/trace.properties
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/group/bld.inf
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/console/group/HelloTraceConsole.mmp
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/console/group/bld.inf
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/console/group/hellotraceconsole.iby
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/console/inc/HelloTraceConsole.h
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/console/src/HelloTraceConsole.cpp
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/dll/bwins/HelloTraceDllu.def
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/dll/eabi/HelloTraceDllu.def
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/dll/group/HelloTraceDll.mmp
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/dll/group/bld.inf
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/dll/group/hellotracedll.iby
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/dll/inc/HelloTraceExample.h
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/dll/inc/HelloTraceFn.h
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/dll/inc/HelloTraceInterface.h
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/dll/inc/HelloTracePanic.h
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/dll/inc/HelloTraceTypes.h
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/dll/incDup/HelloTraceFn.inl
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/dll/incDup/HelloTraceFnDup.h
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/dll/incDup/HelloTraceInterface.inl
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/dll/incDup/HelloTraceInterfaceDup.h
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/dll/incDup/HelloTraceTypes.inl
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/dll/incDup/HelloTraceTypesDup.h
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/dll/src/HelloTraceExample.cpp
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/dll/src/HelloTraceFn.cpp
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/dll/src/HelloTraceInterface.cpp
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/dll/src/HelloTracePanic.cpp
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/dll/src/HelloTraceTypes.cpp
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/dll/traces/hellotracedll_dll/trace.properties
tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/group/bld.inf
tracefw/tracecompiler/test/group/bld.inf
tracefw/tracecompiler/test/group/build.xml
tracefw/tracecompiler/test/group/ccbuild.xml
tracefw/tracecompiler/test/group/readme.txt
tracefw/tracecompiler/test/lib/junit-4.7.jar
tracefw/tracecompiler/test/multipleMmpTestCases/group/bld.inf
tracefw/tracecompiler/test/multipleMmpTestCases/mmp_traces/group/bld.inf
tracefw/tracecompiler/test/multipleMmpTestCases/mmp_traces/group/mmp_traces1.mmp
tracefw/tracecompiler/test/multipleMmpTestCases/mmp_traces/group/mmp_traces2.mmp
tracefw/tracecompiler/test/multipleMmpTestCases/mmp_traces/inc/MultipleMmpApp.h
tracefw/tracecompiler/test/multipleMmpTestCases/mmp_traces/src/ExtraCppFile1.cpp
tracefw/tracecompiler/test/multipleMmpTestCases/mmp_traces/src/ExtraCppFile2.cpp
tracefw/tracecompiler/test/multipleMmpTestCases/mmp_traces/src/MultipleMmpApp1.cpp
tracefw/tracecompiler/test/multipleMmpTestCases/mmp_traces/src/MultipleMmpApp2.cpp
tracefw/tracecompiler/test/multipleMmpTestCases/mmp_traces_mixed/group/bld.inf
tracefw/tracecompiler/test/multipleMmpTestCases/mmp_traces_mixed/group/mmp_traces_mixed1.mmp
tracefw/tracecompiler/test/multipleMmpTestCases/mmp_traces_mixed/group/mmp_traces_mixed2.mmp
tracefw/tracecompiler/test/multipleMmpTestCases/mmp_traces_mixed/inc/MultipleMmpApp.h
tracefw/tracecompiler/test/multipleMmpTestCases/mmp_traces_mixed/src/ExtraCppFile1.cpp
tracefw/tracecompiler/test/multipleMmpTestCases/mmp_traces_mixed/src/ExtraCppFile2.cpp
tracefw/tracecompiler/test/multipleMmpTestCases/mmp_traces_mixed/src/MultipleMmpApp1.cpp
tracefw/tracecompiler/test/multipleMmpTestCases/mmp_traces_mixed/src/MultipleMmpApp2.cpp
tracefw/tracecompiler/test/multipleMmpTestCases/mmp_traces_mmpname/group/bld.inf
tracefw/tracecompiler/test/multipleMmpTestCases/mmp_traces_mmpname/group/mmp_traces_mmpname1.mmp
tracefw/tracecompiler/test/multipleMmpTestCases/mmp_traces_mmpname/group/mmp_traces_mmpname2.mmp
tracefw/tracecompiler/test/multipleMmpTestCases/mmp_traces_mmpname/inc/MultipleMmpApp.h
tracefw/tracecompiler/test/multipleMmpTestCases/mmp_traces_mmpname/src/ExtraCppFile1.cpp
tracefw/tracecompiler/test/multipleMmpTestCases/mmp_traces_mmpname/src/ExtraCppFile2.cpp
tracefw/tracecompiler/test/multipleMmpTestCases/mmp_traces_mmpname/src/MultipleMmpApp1.cpp
tracefw/tracecompiler/test/multipleMmpTestCases/mmp_traces_mmpname/src/MultipleMmpApp2.cpp
tracefw/tracecompiler/test/multipleMmpTestCases/mmp_traces_slash_target_ext/group/bld.inf
tracefw/tracecompiler/test/multipleMmpTestCases/mmp_traces_slash_target_ext/group/mmp_traces_slash_target_ext1.mmp
tracefw/tracecompiler/test/multipleMmpTestCases/mmp_traces_slash_target_ext/group/mmp_traces_slash_target_ext2.mmp
tracefw/tracecompiler/test/multipleMmpTestCases/mmp_traces_slash_target_ext/inc/MultipleMmpApp.h
tracefw/tracecompiler/test/multipleMmpTestCases/mmp_traces_slash_target_ext/src/ExtraCppFile1.cpp
tracefw/tracecompiler/test/multipleMmpTestCases/mmp_traces_slash_target_ext/src/ExtraCppFile2.cpp
tracefw/tracecompiler/test/multipleMmpTestCases/mmp_traces_slash_target_ext/src/MultipleMmpApp1.cpp
tracefw/tracecompiler/test/multipleMmpTestCases/mmp_traces_slash_target_ext/src/MultipleMmpApp2.cpp
tracefw/tracecompiler/test/multipleMmpTestCases/mmp_traces_slash_target_ext_commonsource/group/bld.inf
tracefw/tracecompiler/test/multipleMmpTestCases/mmp_traces_slash_target_ext_commonsource/group/mmp_traces_slash_target_cs_ext1.mmp
tracefw/tracecompiler/test/multipleMmpTestCases/mmp_traces_slash_target_ext_commonsource/group/mmp_traces_slash_target_cs_ext2.mmp
tracefw/tracecompiler/test/multipleMmpTestCases/mmp_traces_slash_target_ext_commonsource/inc/MultipleMmpApp.h
tracefw/tracecompiler/test/multipleMmpTestCases/mmp_traces_slash_target_ext_commonsource/src/ExtraCppFile1.cpp
tracefw/tracecompiler/test/multipleMmpTestCases/mmp_traces_slash_target_ext_commonsource/src/MultipleMmpApp1.cpp
tracefw/tracecompiler/test/multipleMmpTestCases/mmp_traces_target_type/group/bld.inf
tracefw/tracecompiler/test/multipleMmpTestCases/mmp_traces_target_type/group/mmp_traces_target_type1.mmp
tracefw/tracecompiler/test/multipleMmpTestCases/mmp_traces_target_type/group/mmp_traces_target_type2.mmp
tracefw/tracecompiler/test/multipleMmpTestCases/mmp_traces_target_type/inc/MultipleMmpApp.h
tracefw/tracecompiler/test/multipleMmpTestCases/mmp_traces_target_type/src/ExtraCppFile1.cpp
tracefw/tracecompiler/test/multipleMmpTestCases/mmp_traces_target_type/src/ExtraCppFile2.cpp
tracefw/tracecompiler/test/multipleMmpTestCases/mmp_traces_target_type/src/MultipleMmpApp1.cpp
tracefw/tracecompiler/test/multipleMmpTestCases/mmp_traces_target_type/src/MultipleMmpApp2.cpp
tracefw/tracecompiler/test/src/ErrorLogsTestBase.java
tracefw/tracecompiler/test/src/ErrorLogsTestSystem.java
tracefw/tracecompiler/test/src/ErrorLogsTestUnit.java
tracefw/tracecompiler/test/src/FixedIdDefinitionsTest.java
tracefw/tracecompiler/test/src/GroupNamesTest.java
tracefw/tracecompiler/test/src/MacroWrappersTest.java
tracefw/tracecompiler/test/src/MultipleMmpTest.java
tracefw/tracecompiler/test/src/ParseFunctionParametersTest.java
tracefw/tracecompiler/test/src/PluginTracePropertyVerifierTest.java
tracefw/tracecompiler/test/src/TraceHeadersLicenceTest.java
tracefw/tracecompiler/test/src/TraceLocationConverterTest.java
tracefw/tracecompiler/test/src/TracesInHeadersTest.java
tracefw/tracecompiler/test/testdata/test_opensystemtrace_types.h
tracefw/tracecompiler/tracecompiler/readme.txt
tracefw/tracecompiler/tracecompiler/release_note.txt
tracefw/tracecompiler/tracecompiler/tracecompiler.pl
tracefw/tracecompiler/tracecompiler/tracecompiler.pm
tracefw/tracecompiler/tracecompiler/tracecompiler.zip
tracefw/tracecompiler/tracecompiler/tracecompiler_mmp_data.pm
tracefw/tracecompiler/tracecompiler/tracecompiler_parse_mmp.pl
tracesrv/tracecompiler/group/bld.inf
tracesrv/tracecompiler/group/build.xml
tracesrv/tracecompiler/src/com.nokia.tracecompiler/.classpath
tracesrv/tracecompiler/src/com.nokia.tracecompiler/.project
tracesrv/tracecompiler/src/com.nokia.tracecompiler/.settings/org.eclipse.core.resources.prefs
tracesrv/tracecompiler/src/com.nokia.tracecompiler/.settings/org.eclipse.jdt.core.prefs
tracesrv/tracecompiler/src/com.nokia.tracecompiler/.settings/org.eclipse.jdt.ui.prefs
tracesrv/tracecompiler/src/com.nokia.tracecompiler/about.html
tracesrv/tracecompiler/src/com.nokia.tracecompiler/build.properties
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/Messages.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/TraceCompiler.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/TraceCompilerConfiguration.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/TraceCompilerConstants.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/TraceCompilerGlobals.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/TraceCompilerIllegalArgumentsException.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/TraceCompilerLogger.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/TraceCompilerMain.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/TraceCompilerModelListener.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/TraceCompilerRootException.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/TraceCompilerView.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/DictionaryDefRef.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/DictionaryEngine.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/DictionaryFile.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/DictionaryFileConstants.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/DictionaryFileExport.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/DictionaryFileRef.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/DictionaryFileWriter.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/DictionaryPreferences.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/DictionaryRef.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/Messages.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/encoder/DataType.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/encoder/Dictionary.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/encoder/LocationStore.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/encoder/Options.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/encoder/TagWriter.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/encoder/TestEncoder.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/encoder/Trace.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/encoder/TraceComponent.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/encoder/TraceDataStore.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/encoder/TraceDictionaryEncoder.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/encoder/TraceGroup.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/encoder/TypeDef.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/encoder/TypeDefStore.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/encoder/XMLDataFilter.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/encoder/package.html
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/messages.properties
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/package.html
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/document/FileDocument.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/document/FileDocumentMonitor.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/document/Messages.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/document/StringDocument.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/document/StringDocumentFactory.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/document/messages.properties
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/ConfigurationDelegate.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/LocationListBase.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/LocationMapModelListener.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/LocationProperties.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/Messages.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/SourceContextManager.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/SourceContextManagerImpl.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/TraceCompilerEngine.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/TraceCompilerEngineActions.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/TraceCompilerEngineBase.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/TraceCompilerEngineConfiguration.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/TraceCompilerEngineConfigurationListener.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/TraceCompilerEngineErrorCodes.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/TraceCompilerEngineErrorMessages.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/TraceCompilerEngineEvents.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/TraceCompilerEngineGlobals.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/TraceCompilerEngineInterface.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/TraceCompilerEngineView.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/TraceLocation.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/TraceLocationConverter.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/TraceLocationList.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/TraceLocationListListener.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/TraceLocationMap.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/ViewAdapter.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/event/EventEngine.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/event/Messages.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/event/messages.properties
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/event/package.html
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/header/CheckFormattedTraceExists.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/header/CheckIsBufferSizeDynamic.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/header/CheckIsKernelModeEndifNeeded.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/header/CheckIsKernelModeFlagNeeded.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/header/CheckIsTraceBufferBuilt.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/header/CheckIsTraceFormatDuplicate.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/header/CheckParameterNeedsAlignment.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/header/ComplexHeaderRule.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/header/HeaderConstants.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/header/HeaderEngine.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/header/HeaderTemplate.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/header/IteratorComplexTraces.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/header/IteratorParameters.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/header/IteratorTraces.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/header/Messages.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/header/SetNewLineCount.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/header/TemplateCheckBase.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/header/TemplateChoice.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/header/TemplateIterator.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/header/TemplateIteratorEntry.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/header/TraceHeader.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/header/TraceHeaderWriter.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/header/messages.properties
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/header/package.html
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/messages.properties
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/package.html
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/plugin/PluginEngine.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/plugin/PluginTracePropertyVerifier.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/plugin/TraceAPIPluginManager.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/plugin/package.html
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/project/Messages.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/project/ProjectConstants.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/project/ProjectEngine.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/project/SortedProperties.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/project/TraceCompilerProject.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/project/TraceIDCache.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/project/messages.properties
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/project/package.html
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/propertyfile/DocumentElementWrapper.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/propertyfile/EnumElementParser.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/propertyfile/FileElementParser.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/propertyfile/Messages.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/propertyfile/PropertyFileConstants.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/propertyfile/PropertyFileElementParser.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/propertyfile/PropertyFileEngine.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/propertyfile/PropertyFileParser.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/propertyfile/PropertyFileUtils.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/propertyfile/TracePropertyFile.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/propertyfile/ValueElementParser.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/propertyfile/messages.properties
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/ArrayParameterRuleImpl.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/AutoAddFunctionParametersRule.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/AutoAddParameterRuleBase.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/AutoAddReturnParameterRule.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/AutoAddThisPtrRule.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/AutoAddValueRule.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/AutomaticTraceTextRule.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/ClassNameWrapper.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/ComplexHeaderRuleImpl.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/EndOfFunctionLocationRule.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/EntryTraceRule.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/ExitTracePropertyBuilder.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/ExitTraceRule.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/ExtensionBase.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/FillerParameterRuleImpl.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/Messages.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/ParameterTypeMappingRule.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/PerformanceEventRuleBase.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/PerformanceEventStartRule.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/PerformanceEventStopRule.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/ReadOnlyObjectRuleImpl.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/RuleBase.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/RuleUtils.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/RulesEngine.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/RulesEngineConfigurationListener.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/RulesEngineConstants.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/RulesEngineModelListener.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/RulesEnginePluginManager.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/RulesEngineResetListener.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/SourceParserRuleBase.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/StartOfFunctionLocationRule.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/StateTraceRule.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/ThisPointerParameterTemplate.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/TraceFormatRuleBase.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/TraceParameterFormattingRuleBase.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/ValueParameterTemplate.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/messages.properties
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/osttrace/OstConstants.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/osttrace/OstTraceFormatRule.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/osttrace/OstTraceParserRule.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/osttrace/package.html
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/package.html
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/source/Messages.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/source/SourceEngine.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/source/SourceEngineModelExtensionListener.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/source/SourceEngineModelListener.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/source/SourceFormatter.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/source/SourceListener.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/source/SourceLocationRule.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/source/SourceParserResult.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/source/SourceParserRule.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/source/SourceProperties.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/source/TraceFormattingRule.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/source/TraceParameterFormattingRule.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/source/messages.properties
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/source/package.html
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/utils/TraceMultiplierRule.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/utils/TraceUtils.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/utils/package.html
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/file/FileCompareOutputStream.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/file/FileUtils.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/licence.lic
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/licence_hash.lic
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/messages.properties
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/DuplicateParameterNameModifier.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/DuplicateValueModifier.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/Trace.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceCompilerErrorParameters.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceCompilerException.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceConstantTable.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceConstantTableEntry.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceGroup.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceModel.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceModelExtension.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceModelExtensionListener.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceModelListener.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceModelPersistentExtension.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceModelResetListener.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceObject.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceObjectFactory.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceObjectModifier.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceObjectProperty.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceObjectPropertyList.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceObjectPropertyVerifier.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceObjectRule.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceObjectRuleCreateObject.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceObjectRuleFactory.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceObjectRuleOnDelete.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceObjectRuleRemoveOnCreate.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceObjectUtils.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceParameter.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceProcessingListener.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/package.html
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/package.html
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/plugin/TraceAPIFormatter.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/plugin/TraceAPIParser.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/plugin/TraceAPIPlugin.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/plugin/TraceCompilerExport.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/plugin/TraceCompilerPlugin.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/plugin/TraceFormatConstants.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/plugin/TraceHeaderContribution.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/plugin/package.html
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/project/FormattingUtils.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/project/GroupNameIdPair.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/project/GroupNames.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/project/Messages.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/project/ProjectFileParser.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/project/ProjectUtils.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/project/PropertyNames.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/project/TraceLocationParser.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/project/TraceProjectAPI.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/project/TraceProjectAPIList.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/project/TraceProjectFile.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/project/messages.properties
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/project/package.html
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/rules/ArrayParameterRule.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/rules/FillerParameterRule.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/rules/HiddenTraceObjectRule.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/rules/ReadOnlyObjectRule.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/rules/package.html
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/ContextAreaParser.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/ContextSearchData.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/ExcludedAreaParser.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/ExcludedAreaSearchData.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/FormatMapping.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/FunctionReturnValueParser.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/FunctionReturnValueSearchData.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/OffsetLength.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/ParsedType.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/PositionArrayComparator.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/SourceConstants.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/SourceContext.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/SourceDocumentFactory.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/SourceDocumentInterface.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/SourceDocumentMonitor.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/SourceDocumentProcessor.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/SourceErrorCodes.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/SourceExcludedArea.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/SourceIterator.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/SourceLocation.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/SourceLocationBase.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/SourceLocationInterface.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/SourceLocationListener.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/SourceParameter.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/SourceParameterTokenizer.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/SourceParser.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/SourceParserException.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/SourcePropertyProvider.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/SourceReturn.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/SourceSearch.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/SourceSelector.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/SourceStringSearch.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/SourceUtils.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/SymbianConstants.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/TokenizerSearchData.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/TypeMapping.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/package.html
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/utils/DocumentAdapter.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/utils/DocumentFactory.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/utils/DocumentFactoryBase.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/utils/DocumentMonitorBase.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/utils/SimpleLocation.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/utils/TraceCompilerVersion.java
tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/utils/package.html
tracesrv/tracecompiler/test/FixedIdDefinitionsTestApp/data/reference_fid_file_1.txt
tracesrv/tracecompiler/test/FixedIdDefinitionsTestApp/data/reference_fid_file_2.txt
tracesrv/tracecompiler/test/FixedIdDefinitionsTestApp/data/reference_fid_file_3.txt
tracesrv/tracecompiler/test/FixedIdDefinitionsTestApp/data/reference_fid_file_4.txt
tracesrv/tracecompiler/test/FixedIdDefinitionsTestApp/data/reference_fid_file_5.txt
tracesrv/tracecompiler/test/FixedIdDefinitionsTestApp/data/reference_fid_file_6_0.txt
tracesrv/tracecompiler/test/FixedIdDefinitionsTestApp/data/reference_fid_file_6_1.txt
tracesrv/tracecompiler/test/FixedIdDefinitionsTestApp/data/reference_fid_file_6_2.txt
tracesrv/tracecompiler/test/FixedIdDefinitionsTestApp/data/reference_fid_file_6_3.txt
tracesrv/tracecompiler/test/FixedIdDefinitionsTestApp/data/reference_fid_file_7_0.txt
tracesrv/tracecompiler/test/FixedIdDefinitionsTestApp/data/reference_fid_file_7_1.txt
tracesrv/tracecompiler/test/FixedIdDefinitionsTestApp/data/reference_fid_file_7_2.txt
tracesrv/tracecompiler/test/FixedIdDefinitionsTestApp/data/reference_fid_file_8.txt
tracesrv/tracecompiler/test/FixedIdDefinitionsTestApp/data/reference_fid_file_9.txt
tracesrv/tracecompiler/test/FixedIdDefinitionsTestApp/data/reference_tc_output_8.txt
tracesrv/tracecompiler/test/FixedIdDefinitionsTestApp/data/reference_tc_output_9.txt
tracesrv/tracecompiler/test/FixedIdDefinitionsTestApp/group/FixedIdDefinitionsTestApp.mmp
tracesrv/tracecompiler/test/FixedIdDefinitionsTestApp/group/bld.inf
tracesrv/tracecompiler/test/FixedIdDefinitionsTestApp/inc/FixedIdDefinitionsTestApp.h
tracesrv/tracecompiler/test/FixedIdDefinitionsTestApp/src/FixedIdDefinitionsTestApp.cpp
tracesrv/tracecompiler/test/MultipleCppTraceErrorApp/data/referencelog.txt
tracesrv/tracecompiler/test/MultipleCppTraceErrorApp/group/MultipleCppTraceErrorApp.mmp
tracesrv/tracecompiler/test/MultipleCppTraceErrorApp/group/bld.inf
tracesrv/tracecompiler/test/MultipleCppTraceErrorApp/inc/MultipleCppTraceErrorApp.h
tracesrv/tracecompiler/test/MultipleCppTraceErrorApp/sis/TraceErrorApp_EKA2.pkg
tracesrv/tracecompiler/test/MultipleCppTraceErrorApp/src/ExtraCppFile.cpp
tracesrv/tracecompiler/test/MultipleCppTraceErrorApp/src/MultipleCppTraceErrorApp.cpp
tracesrv/tracecompiler/test/MultipleCppTraceErrorApp/traces/OstTraceDefinitions.h
tracesrv/tracecompiler/test/MultipleCppTraceErrorApp/traces/fixed_id.definitions
tracesrv/tracecompiler/test/MultipleMmpTraceErrorApps/data/referencelog.txt
tracesrv/tracecompiler/test/MultipleMmpTraceErrorApps/group/MultipleMmpTraceErrorApp1.mmp
tracesrv/tracecompiler/test/MultipleMmpTraceErrorApps/group/MultipleMmpTraceErrorApp2.mmp
tracesrv/tracecompiler/test/MultipleMmpTraceErrorApps/group/bld.inf
tracesrv/tracecompiler/test/MultipleMmpTraceErrorApps/inc/MultipleMmpTraceErrorApp.h
tracesrv/tracecompiler/test/MultipleMmpTraceErrorApps/sis/TraceErrorApp_EKA2.pkg
tracesrv/tracecompiler/test/MultipleMmpTraceErrorApps/src/ExtraCppFile1.cpp
tracesrv/tracecompiler/test/MultipleMmpTraceErrorApps/src/ExtraCppFile2.cpp
tracesrv/tracecompiler/test/MultipleMmpTraceErrorApps/src/MultipleMmpTraceErrorApp1.cpp
tracesrv/tracecompiler/test/MultipleMmpTraceErrorApps/src/MultipleMmpTraceErrorApp2.cpp
tracesrv/tracecompiler/test/MultipleMmpTraceErrorApps/traces/OstTraceDefinitions.h
tracesrv/tracecompiler/test/MultipleMmpTraceErrorApps/traces/fixed_id.definitions
tracesrv/tracecompiler/test/TraceErrorApp/data/referencelog.txt
tracesrv/tracecompiler/test/TraceErrorApp/group/TraceErrorApp.mmp
tracesrv/tracecompiler/test/TraceErrorApp/group/bld.inf
tracesrv/tracecompiler/test/TraceErrorApp/inc/TraceErrorApp.h
tracesrv/tracecompiler/test/TraceErrorApp/sis/TraceErrorApp_EKA2.pkg
tracesrv/tracecompiler/test/TraceErrorApp/src/TraceErrorApp.cpp
tracesrv/tracecompiler/test/TraceErrorApp/traces/OstTraceDefinitions.h
tracesrv/tracecompiler/test/TraceErrorApp/traces/fixed_id.definitions
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/console/group/HelloTraceConsole.mmp
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/console/group/bld.inf
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/console/group/hellotraceconsole.iby
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/console/inc/HelloTraceConsole.h
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/console/src/HelloTraceConsole.cpp
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/bwins/HelloTraceDllu.def
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/eabi/HelloTraceDllu.def
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/group/HelloTraceDll.mmp
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/group/HelloTraceDll2.mmp
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/group/bld.inf
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/group/hellotracedll.iby
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/inc/HelloTraceExample.h
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/inc/HelloTraceFn.h
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/inc/HelloTraceFn2.h
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/inc/HelloTraceInterface.h
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/inc/HelloTraceInterface2.h
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/inc/HelloTracePanic.h
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/inc/HelloTraceTypes.h
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/inc/HelloTraceTypes2.h
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/incDup/HelloTraceFn2Dup.h
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/incDup/HelloTraceFn2Dup2.inl
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/incDup/HelloTraceFnDup.h
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/incDup/HelloTraceFnDup2.inl
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/incDup/HelloTraceInterface2Dup.h
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/incDup/HelloTraceInterface2Dup2.inl
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/incDup/HelloTraceInterfaceDup.h
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/incDup/HelloTraceInterfaceDup2.inl
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/incDup/HelloTraceTypes2Dup.h
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/incDup/HelloTraceTypes2Dup2.inl
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/incDup/HelloTraceTypesDup.h
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/incDup/HelloTraceTypesDup2.inl
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/src/HelloTraceExample.cpp
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/src/HelloTraceFn.cpp
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/src/HelloTraceInterface.cpp
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/src/HelloTracePanic.cpp
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/src/HelloTraceTypes.cpp
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/traces/trace.properties
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/group/bld.inf
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/console/group/HelloTraceConsole.mmp
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/console/group/bld.inf
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/console/group/hellotraceconsole.iby
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/console/inc/HelloTraceConsole.h
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/console/src/HelloTraceConsole.cpp
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/dll/bwins/HelloTraceDllu.def
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/dll/eabi/HelloTraceDllu.def
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/dll/group/HelloTraceDll.mmp
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/dll/group/HelloTraceDll2.mmp
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/dll/group/bld.inf
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/dll/group/hellotracedll.iby
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/dll/inc/HelloTraceExample.h
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/dll/inc/HelloTraceFn.h
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/dll/inc/HelloTraceInterface.h
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/dll/inc/HelloTracePanic.h
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/dll/inc/HelloTraceTypes.h
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/dll/incDup/HelloTraceFnDup.h
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/dll/incDup/HelloTraceFnDup2.inl
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/dll/incDup/HelloTraceInterfaceDup.h
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/dll/incDup/HelloTraceInterfaceDup2.inl
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/dll/incDup/HelloTraceTypesDup.h
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/dll/incDup/HelloTraceTypesDup2.inl
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/dll/src/HelloTraceExample.cpp
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/dll/src/HelloTraceFn.cpp
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/dll/src/HelloTraceInterface.cpp
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/dll/src/HelloTracePanic.cpp
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/dll/src/HelloTraceTypes.cpp
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/dll/traces/hellotracedll2_dll/trace.properties
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/dll/traces/hellotracedll_dll/trace.properties
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/group/bld.inf
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/console/group/HelloTraceConsole.mmp
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/console/group/bld.inf
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/console/group/hellotraceconsole.iby
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/console/inc/HelloTraceConsole.h
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/console/src/HelloTraceConsole.cpp
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/bwins/HelloTraceDllu.def
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/eabi/HelloTraceDllu.def
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/group/HelloTraceDll.mmp
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/group/HelloTraceDll2.mmp
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/group/bld.inf
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/group/hellotracedll.iby
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/inc/HelloTraceExample.h
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/inc/HelloTraceFn.h
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/inc/HelloTraceFn2.h
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/inc/HelloTraceInterface.h
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/inc/HelloTraceInterface2.h
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/inc/HelloTracePanic.h
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/inc/HelloTraceTypes.h
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/inc/HelloTraceTypes2.h
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/incDup/HelloTraceFn2Dup.h
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/incDup/HelloTraceFn2Dup2.inl
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/incDup/HelloTraceFnDup.h
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/incDup/HelloTraceFnDup2.inl
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/incDup/HelloTraceInterface2Dup.h
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/incDup/HelloTraceInterface2Dup2.inl
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/incDup/HelloTraceInterfaceDup.h
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/incDup/HelloTraceInterfaceDup2.inl
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/incDup/HelloTraceTypes2Dup.h
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/incDup/HelloTraceTypes2Dup2.inl
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/incDup/HelloTraceTypesDup.h
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/incDup/HelloTraceTypesDup2.inl
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/src/HelloTraceExample.cpp
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/src/HelloTraceExample2.cpp
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/src/HelloTraceFn.cpp
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/src/HelloTraceFn2.cpp
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/src/HelloTraceInterface.cpp
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/src/HelloTraceInterface2.cpp
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/src/HelloTracePanic.cpp
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/src/HelloTracePanic2.cpp
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/src/HelloTraceTypes.cpp
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/src/HelloTraceTypes2.cpp
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/traces/trace.properties
tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/group/bld.inf
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/console/group/HelloTraceConsole.mmp
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/console/group/bld.inf
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/console/group/hellotraceconsole.iby
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/console/inc/HelloTraceConsole.h
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/dll/bwins/HelloTraceDllu.def
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/dll/eabi/HelloTraceDllu.def
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/dll/group/HelloTraceDll.mmp
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/dll/group/bld.inf
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/dll/group/hellotracedll.iby
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/dll/inc/HelloTraceExample.h
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/dll/inc/HelloTraceFn.h
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/dll/inc/HelloTraceInterface.h
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/dll/inc/HelloTracePanic.h
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/dll/inc/HelloTraceTypes.h
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/dll/incDup/HelloTraceFnDup.inl
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/dll/incDup/HelloTraceFnDup2.inl
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/dll/incDup/HelloTraceInterfaceDup.h
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/dll/incDup/HelloTraceInterfaceDup2.inl
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/dll/incDup/HelloTraceTypesDup.h
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/dll/incDup/HelloTraceTypesDup2.inl
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/dll/src/HelloTraceExample.cpp
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/dll/src/HelloTraceFn.cpp
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/dll/src/HelloTraceInterface.cpp
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/dll/src/HelloTracePanic.cpp
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/dll/src/HelloTraceTypes.cpp
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/dll/traces/trace.properties
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/group/bld.inf
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/console/group/HelloTraceConsole.mmp
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/console/group/bld.inf
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/console/group/hellotraceconsole.iby
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/console/inc/HelloTraceConsole.h
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/console/src/HelloTraceConsole.cpp
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/dll/bwins/HelloTraceDllu.def
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/dll/eabi/HelloTraceDllu.def
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/dll/group/HelloTraceDll.mmp
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/dll/group/bld.inf
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/dll/group/hellotracedll.iby
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/dll/inc/HelloTraceExample.h
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/dll/inc/HelloTraceFn.h
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/dll/inc/HelloTraceInterface.h
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/dll/inc/HelloTracePanic.h
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/dll/inc/HelloTraceTypes.h
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/dll/incDup/HelloTraceFnDup.h
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/dll/incDup/HelloTraceFnDup2.inl
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/dll/incDup/HelloTraceInterfaceDup.h
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/dll/incDup/HelloTraceInterfaceDup2.inl
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/dll/incDup/HelloTraceTypesDup.h
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/dll/incDup/HelloTraceTypesDup2.inl
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/dll/src/HelloTraceExample.cpp
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/dll/src/HelloTraceFn.cpp
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/dll/src/HelloTraceInterface.cpp
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/dll/src/HelloTracePanic.cpp
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/dll/src/HelloTraceTypes.cpp
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/dll/traces/hellotracedll_dll/trace.properties
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/group/bld.inf
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_import/console/group/HelloTraceConsole.mmp
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_import/console/group/bld.inf
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_import/console/group/hellotraceconsole.iby
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_import/console/inc/HelloTraceConsole.h
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_import/console/src/HelloTraceConsole.cpp
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_import/dll/bwins/HelloTraceDllu.def
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_import/dll/eabi/HelloTraceDllu.def
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_import/dll/group/HelloTraceDll.mmp
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_import/dll/group/bld.inf
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_import/dll/group/hellotracedll.iby
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_import/dll/inc/HelloTraceExample.h
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_import/dll/inc/HelloTraceInterface.h
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_import/dll/inc/HelloTracePanic.h
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_import/dll/inc/HelloTraceTypes.h
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_import/dll/incDup/HelloTraceFnDup.h
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_import/dll/incDup/HelloTraceFnDup2.inl
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_import/dll/incDup/HelloTraceInterfaceDup.h
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_import/dll/incDup/HelloTraceInterfaceDup2.inl
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_import/dll/incDup/HelloTraceTypesDup.h
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_import/dll/incDup/HelloTraceTypesDup2.inl
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_import/dll/src/HelloTraceExample.cpp
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_import/dll/src/HelloTraceFn.cpp
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_import/dll/src/HelloTraceInterface.cpp
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_import/dll/src/HelloTracePanic.cpp
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_import/dll/src/HelloTraceTypes.cpp
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_import/dll/traces/trace.properties
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_import/group/bld.inf
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/console/group/HelloTraceConsole.mmp
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/console/group/bld.inf
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/console/group/hellotraceconsole.iby
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/console/inc/HelloTraceConsole.h
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/console/src/HelloTraceConsole.cpp
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/dll/bwins/HelloTraceDllu.def
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/dll/eabi/HelloTraceDllu.def
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/dll/group/HelloTraceDll.mmp
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/dll/group/bld.inf
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/dll/group/hellotracedll.iby
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/dll/inc/HelloTraceExample.h
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/dll/inc/HelloTraceFn.h
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/dll/inc/HelloTraceInterface.h
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/dll/inc/HelloTracePanic.h
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/dll/inc/HelloTraceTypes.h
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/dll/incDup/HelloTraceFn.inl
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/dll/incDup/HelloTraceFnDup.h
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/dll/incDup/HelloTraceInterface.inl
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/dll/incDup/HelloTraceInterfaceDup.h
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/dll/incDup/HelloTraceTypes.inl
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/dll/incDup/HelloTraceTypesDup.h
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/dll/src/HelloTraceExample.cpp
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/dll/src/HelloTraceFn.cpp
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/dll/src/HelloTraceInterface.cpp
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/dll/src/HelloTracePanic.cpp
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/dll/src/HelloTraceTypes.cpp
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/dll/traces/trace.properties
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/group/bld.inf
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/console/group/HelloTraceConsole.mmp
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/console/group/bld.inf
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/console/group/hellotraceconsole.iby
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/console/inc/HelloTraceConsole.h
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/console/src/HelloTraceConsole.cpp
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/dll/bwins/HelloTraceDllu.def
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/dll/eabi/HelloTraceDllu.def
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/dll/group/HelloTraceDll.mmp
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/dll/group/bld.inf
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/dll/group/hellotracedll.iby
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/dll/inc/HelloTraceExample.h
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/dll/inc/HelloTraceFn.h
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/dll/inc/HelloTraceInterface.h
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/dll/inc/HelloTracePanic.h
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/dll/inc/HelloTraceTypes.h
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/dll/incDup/HelloTraceFn.inl
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/dll/incDup/HelloTraceFnDup.h
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/dll/incDup/HelloTraceInterface.inl
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/dll/incDup/HelloTraceInterfaceDup.h
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/dll/incDup/HelloTraceTypes.inl
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/dll/incDup/HelloTraceTypesDup.h
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/dll/src/HelloTraceExample.cpp
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/dll/src/HelloTraceFn.cpp
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/dll/src/HelloTraceInterface.cpp
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/dll/src/HelloTracePanic.cpp
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/dll/src/HelloTraceTypes.cpp
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/dll/traces/hellotracedll_dll/trace.properties
tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/group/bld.inf
tracesrv/tracecompiler/test/group/bld.inf
tracesrv/tracecompiler/test/group/build.xml
tracesrv/tracecompiler/test/group/ccbuild.xml
tracesrv/tracecompiler/test/group/readme.txt
tracesrv/tracecompiler/test/lib/junit-4.7.jar
tracesrv/tracecompiler/test/multipleMmpTestCases/group/bld.inf
tracesrv/tracecompiler/test/multipleMmpTestCases/mmp_traces/group/bld.inf
tracesrv/tracecompiler/test/multipleMmpTestCases/mmp_traces/group/mmp_traces1.mmp
tracesrv/tracecompiler/test/multipleMmpTestCases/mmp_traces/group/mmp_traces2.mmp
tracesrv/tracecompiler/test/multipleMmpTestCases/mmp_traces/inc/MultipleMmpApp.h
tracesrv/tracecompiler/test/multipleMmpTestCases/mmp_traces/src/ExtraCppFile1.cpp
tracesrv/tracecompiler/test/multipleMmpTestCases/mmp_traces/src/ExtraCppFile2.cpp
tracesrv/tracecompiler/test/multipleMmpTestCases/mmp_traces/src/MultipleMmpApp1.cpp
tracesrv/tracecompiler/test/multipleMmpTestCases/mmp_traces/src/MultipleMmpApp2.cpp
tracesrv/tracecompiler/test/multipleMmpTestCases/mmp_traces_mixed/group/bld.inf
tracesrv/tracecompiler/test/multipleMmpTestCases/mmp_traces_mixed/group/mmp_traces_mixed1.mmp
tracesrv/tracecompiler/test/multipleMmpTestCases/mmp_traces_mixed/group/mmp_traces_mixed2.mmp
tracesrv/tracecompiler/test/multipleMmpTestCases/mmp_traces_mixed/inc/MultipleMmpApp.h
tracesrv/tracecompiler/test/multipleMmpTestCases/mmp_traces_mixed/src/ExtraCppFile1.cpp
tracesrv/tracecompiler/test/multipleMmpTestCases/mmp_traces_mixed/src/ExtraCppFile2.cpp
tracesrv/tracecompiler/test/multipleMmpTestCases/mmp_traces_mixed/src/MultipleMmpApp1.cpp
tracesrv/tracecompiler/test/multipleMmpTestCases/mmp_traces_mixed/src/MultipleMmpApp2.cpp
tracesrv/tracecompiler/test/multipleMmpTestCases/mmp_traces_mmpname/group/bld.inf
tracesrv/tracecompiler/test/multipleMmpTestCases/mmp_traces_mmpname/group/mmp_traces_mmpname1.mmp
tracesrv/tracecompiler/test/multipleMmpTestCases/mmp_traces_mmpname/group/mmp_traces_mmpname2.mmp
tracesrv/tracecompiler/test/multipleMmpTestCases/mmp_traces_mmpname/inc/MultipleMmpApp.h
tracesrv/tracecompiler/test/multipleMmpTestCases/mmp_traces_mmpname/src/ExtraCppFile1.cpp
tracesrv/tracecompiler/test/multipleMmpTestCases/mmp_traces_mmpname/src/ExtraCppFile2.cpp
tracesrv/tracecompiler/test/multipleMmpTestCases/mmp_traces_mmpname/src/MultipleMmpApp1.cpp
tracesrv/tracecompiler/test/multipleMmpTestCases/mmp_traces_mmpname/src/MultipleMmpApp2.cpp
tracesrv/tracecompiler/test/multipleMmpTestCases/mmp_traces_slash_target_ext/group/bld.inf
tracesrv/tracecompiler/test/multipleMmpTestCases/mmp_traces_slash_target_ext/group/mmp_traces_slash_target_ext1.mmp
tracesrv/tracecompiler/test/multipleMmpTestCases/mmp_traces_slash_target_ext/group/mmp_traces_slash_target_ext2.mmp
tracesrv/tracecompiler/test/multipleMmpTestCases/mmp_traces_slash_target_ext/inc/MultipleMmpApp.h
tracesrv/tracecompiler/test/multipleMmpTestCases/mmp_traces_slash_target_ext/src/ExtraCppFile1.cpp
tracesrv/tracecompiler/test/multipleMmpTestCases/mmp_traces_slash_target_ext/src/ExtraCppFile2.cpp
tracesrv/tracecompiler/test/multipleMmpTestCases/mmp_traces_slash_target_ext/src/MultipleMmpApp1.cpp
tracesrv/tracecompiler/test/multipleMmpTestCases/mmp_traces_slash_target_ext/src/MultipleMmpApp2.cpp
tracesrv/tracecompiler/test/multipleMmpTestCases/mmp_traces_slash_target_ext_commonsource/group/bld.inf
tracesrv/tracecompiler/test/multipleMmpTestCases/mmp_traces_slash_target_ext_commonsource/group/mmp_traces_slash_target_cs_ext1.mmp
tracesrv/tracecompiler/test/multipleMmpTestCases/mmp_traces_slash_target_ext_commonsource/group/mmp_traces_slash_target_cs_ext2.mmp
tracesrv/tracecompiler/test/multipleMmpTestCases/mmp_traces_slash_target_ext_commonsource/inc/MultipleMmpApp.h
tracesrv/tracecompiler/test/multipleMmpTestCases/mmp_traces_slash_target_ext_commonsource/src/ExtraCppFile1.cpp
tracesrv/tracecompiler/test/multipleMmpTestCases/mmp_traces_slash_target_ext_commonsource/src/MultipleMmpApp1.cpp
tracesrv/tracecompiler/test/multipleMmpTestCases/mmp_traces_target_type/group/bld.inf
tracesrv/tracecompiler/test/multipleMmpTestCases/mmp_traces_target_type/group/mmp_traces_target_type1.mmp
tracesrv/tracecompiler/test/multipleMmpTestCases/mmp_traces_target_type/group/mmp_traces_target_type2.mmp
tracesrv/tracecompiler/test/multipleMmpTestCases/mmp_traces_target_type/inc/MultipleMmpApp.h
tracesrv/tracecompiler/test/multipleMmpTestCases/mmp_traces_target_type/src/ExtraCppFile1.cpp
tracesrv/tracecompiler/test/multipleMmpTestCases/mmp_traces_target_type/src/ExtraCppFile2.cpp
tracesrv/tracecompiler/test/multipleMmpTestCases/mmp_traces_target_type/src/MultipleMmpApp1.cpp
tracesrv/tracecompiler/test/multipleMmpTestCases/mmp_traces_target_type/src/MultipleMmpApp2.cpp
tracesrv/tracecompiler/test/src/ErrorLogsTestBase.java
tracesrv/tracecompiler/test/src/ErrorLogsTestSystem.java
tracesrv/tracecompiler/test/src/ErrorLogsTestUnit.java
tracesrv/tracecompiler/test/src/FixedIdDefinitionsTest.java
tracesrv/tracecompiler/test/src/GroupNamesTest.java
tracesrv/tracecompiler/test/src/MacroWrappersTest.java
tracesrv/tracecompiler/test/src/MultipleMmpTest.java
tracesrv/tracecompiler/test/src/ParseFunctionParametersTest.java
tracesrv/tracecompiler/test/src/PluginTracePropertyVerifierTest.java
tracesrv/tracecompiler/test/src/TraceHeadersLicenceTest.java
tracesrv/tracecompiler/test/src/TraceLocationConverterTest.java
tracesrv/tracecompiler/test/src/TracesInHeadersTest.java
tracesrv/tracecompiler/test/testdata/test_opensystemtrace_types.h
tracesrv/tracecompiler/tracecompiler/readme.txt
tracesrv/tracecompiler/tracecompiler/release_note.txt
tracesrv/tracecompiler/tracecompiler/tracecompiler.pl
tracesrv/tracecompiler/tracecompiler/tracecompiler.pm
tracesrv/tracecompiler/tracecompiler/tracecompiler.zip
tracesrv/tracecompiler/tracecompiler/tracecompiler_mmp_data.pm
tracesrv/tracecompiler/tracecompiler/tracecompiler_parse_mmp.pl
tracesrv/tracecore/btrace_handler/EABI/tracecoreu.def
tracesrv/tracecore/btrace_handler/bwins/tracecoreu.def
tracesrv/tracecore/btrace_handler/group/BTraceHooks_0x2001022D_dictionary.xml
tracesrv/tracecore/btrace_handler/group/TraceCore.mmp
tracesrv/tracecore/btrace_handler/group/bld.inf
tracesrv/tracecore/btrace_handler/group/tracecore.mmh
tracesrv/tracecore/btrace_handler/inc/BTraceCategoryHandler.h
tracesrv/tracecore/btrace_handler/inc/BTraceKernelCategoryHandler.h
tracesrv/tracecore/btrace_handler/inc/BTraceOstCategoryBitmap.h
tracesrv/tracecore/btrace_handler/inc/BTraceOstCategoryHandler.h
tracesrv/tracecore/btrace_handler/inc/TraceCore.h
tracesrv/tracecore/btrace_handler/inc/TraceCore.inl
tracesrv/tracecore/btrace_handler/inc/TraceCoreActivation.h
tracesrv/tracecore/btrace_handler/inc/TraceCoreActivationBase.h
tracesrv/tracecore/btrace_handler/inc/TraceCoreActivationBase.inl
tracesrv/tracecore/btrace_handler/inc/TraceCoreBTraceHandler.h
tracesrv/tracecore/btrace_handler/inc/TraceCoreCommon.h
tracesrv/tracecore/btrace_handler/inc/TraceCoreConfiguration.h
tracesrv/tracecore/btrace_handler/inc/TraceCoreConstants.h
tracesrv/tracecore/btrace_handler/inc/TraceCoreDebug.h
tracesrv/tracecore/btrace_handler/inc/TraceCoreHandler.h
tracesrv/tracecore/btrace_handler/inc/TraceCoreInternalMessageHandler.h
tracesrv/tracecore/btrace_handler/inc/TraceCoreMediaIf.h
tracesrv/tracecore/btrace_handler/inc/TraceCoreMediaIf.inl
tracesrv/tracecore/btrace_handler/inc/TraceCoreMediaIfCallback.h
tracesrv/tracecore/btrace_handler/inc/TraceCoreMediaPlugin.h
tracesrv/tracecore/btrace_handler/inc/TraceCoreMediaSWriter.h
tracesrv/tracecore/btrace_handler/inc/TraceCoreMediaWriter.h
tracesrv/tracecore/btrace_handler/inc/TraceCoreMessageReceiver.h
tracesrv/tracecore/btrace_handler/inc/TraceCoreMessageSender.h
tracesrv/tracecore/btrace_handler/inc/TraceCoreMessageUtils.h
tracesrv/tracecore/btrace_handler/inc/TraceCoreNotificationReceiver.h
tracesrv/tracecore/btrace_handler/inc/TraceCoreNotifier.h
tracesrv/tracecore/btrace_handler/inc/TraceCoreOstConnectionIf.h
tracesrv/tracecore/btrace_handler/inc/TraceCoreOstHeader.h
tracesrv/tracecore/btrace_handler/inc/TraceCoreOstLddIf.h
tracesrv/tracecore/btrace_handler/inc/TraceCorePluginIf.h
tracesrv/tracecore/btrace_handler/inc/TraceCorePrintfTraceHandler.h
tracesrv/tracecore/btrace_handler/inc/TraceCoreRouter.h
tracesrv/tracecore/btrace_handler/inc/TraceCoreSendReceive.h
tracesrv/tracecore/btrace_handler/inc/TraceCoreSendReceive.inl
tracesrv/tracecore/btrace_handler/inc/TraceCoreSettings.h
tracesrv/tracecore/btrace_handler/inc/TraceCoreSubscriber.h
tracesrv/tracecore/btrace_handler/inc/TraceCoreTComArgMacro.h
tracesrv/tracecore/btrace_handler/inc/TraceCoreTraceActivationIf.h
tracesrv/tracecore/btrace_handler/inc/TraceCoreWriter.h
tracesrv/tracecore/btrace_handler/inc/tracecore_shared.h
tracesrv/tracecore/btrace_handler/src/BTraceCategoryHandler.cpp
tracesrv/tracecore/btrace_handler/src/BTraceKernelCategoryHandler.cpp
tracesrv/tracecore/btrace_handler/src/BTraceOstCategoryBitmap.cpp
tracesrv/tracecore/btrace_handler/src/BTraceOstCategoryHandler.cpp
tracesrv/tracecore/btrace_handler/src/TraceCore.cpp
tracesrv/tracecore/btrace_handler/src/TraceCoreActivationBase.cpp
tracesrv/tracecore/btrace_handler/src/TraceCoreBTraceHandler.cpp
tracesrv/tracecore/btrace_handler/src/TraceCoreConfiguration.cpp
tracesrv/tracecore/btrace_handler/src/TraceCoreHandler.cpp
tracesrv/tracecore/btrace_handler/src/TraceCoreInternalMessageHandler.cpp
tracesrv/tracecore/btrace_handler/src/TraceCoreMediaIf.cpp
tracesrv/tracecore/btrace_handler/src/TraceCoreMediaPlugin.cpp
tracesrv/tracecore/btrace_handler/src/TraceCoreMediaSWriter.cpp
tracesrv/tracecore/btrace_handler/src/TraceCoreMediaWriter.cpp
tracesrv/tracecore/btrace_handler/src/TraceCoreMessageUtils.cpp
tracesrv/tracecore/btrace_handler/src/TraceCoreNotificationReceiver.cpp
tracesrv/tracecore/btrace_handler/src/TraceCoreNotifier.cpp
tracesrv/tracecore/btrace_handler/src/TraceCoreOstLddIf.cpp
tracesrv/tracecore/btrace_handler/src/TraceCorePluginIf.cpp
tracesrv/tracecore/btrace_handler/src/TraceCorePrintfTraceHandler.cpp
tracesrv/tracecore/btrace_handler/src/TraceCoreRouter.cpp
tracesrv/tracecore/btrace_handler/src/TraceCoreSendReceive.cpp
tracesrv/tracecore/btrace_handler/src/TraceCoreSettings.cpp
tracesrv/tracecore/btrace_handler/src/TraceCoreSubscriber.cpp
tracesrv/tracecore/btrace_handler/src/TraceCoreTraceActivationIf.cpp
tracesrv/tracecore/btrace_handler/src/TraceCoreWriter.cpp
tracesrv/tracecore/btrace_handler/src/tracecore_ext.cpp
tracesrv/tracecore/btrace_handler/test/TEF/group/bld.inf
tracesrv/tracecore/btrace_handler/test/TEF/te_tracecore/group/bld.inf
tracesrv/tracecore/btrace_handler/test/TEF/te_tracecore/group/te_tracecore_datawrapper.mmp
tracesrv/tracecore/btrace_handler/test/TEF/te_tracecore/group/te_tracecore_suite.mmp
tracesrv/tracecore/btrace_handler/test/TEF/te_tracecore/inc/te_processcreator.h
tracesrv/tracecore/btrace_handler/test/TEF/te_tracecore/inc/te_tracecore_controller.h
tracesrv/tracecore/btrace_handler/test/TEF/te_tracecore/inc/te_tracecore_datawrapper.h
tracesrv/tracecore/btrace_handler/test/TEF/te_tracecore/inc/te_tracecore_server.h
tracesrv/tracecore/btrace_handler/test/TEF/te_tracecore/src/te_processcreator.cpp
tracesrv/tracecore/btrace_handler/test/TEF/te_tracecore/src/te_tracecore_controller.cpp
tracesrv/tracecore/btrace_handler/test/TEF/te_tracecore/src/te_tracecore_datawrapper.cpp
tracesrv/tracecore/btrace_handler/test/TEF/te_tracecore/src/te_tracecore_server.cpp
tracesrv/tracecore/btrace_handler/test/d_tracecore/group/bld.inf
tracesrv/tracecore/btrace_handler/test/d_tracecore/group/d_tracecore.mmp
tracesrv/tracecore/btrace_handler/test/d_tracecore/inc/TestDataWriter.h
tracesrv/tracecore/btrace_handler/test/d_tracecore/inc/TestDataWriterNotifier.h
tracesrv/tracecore/btrace_handler/test/d_tracecore/inc/TraceCoreTestWriter.h
tracesrv/tracecore/btrace_handler/test/d_tracecore/inc/d_tracecore.h
tracesrv/tracecore/btrace_handler/test/d_tracecore/src/TestDataWriter.cpp
tracesrv/tracecore/btrace_handler/test/d_tracecore/src/TraceCoreTestWriter.cpp
tracesrv/tracecore/btrace_handler/test/d_tracecore/src/d_tracecore.cpp
tracesrv/tracecore/btrace_handler/test/d_traceonactivation/group/bld.inf
tracesrv/tracecore/btrace_handler/test/d_traceonactivation/group/d_traceonactivation.mmp
tracesrv/tracecore/btrace_handler/test/d_traceonactivation/inc/TraceConnection.h
tracesrv/tracecore/btrace_handler/test/d_traceonactivation/inc/TraceOnActivation.h
tracesrv/tracecore/btrace_handler/test/d_traceonactivation/inc/TraceOnActivationIf.h
tracesrv/tracecore/btrace_handler/test/d_traceonactivation/src/TraceConnection.cpp
tracesrv/tracecore/btrace_handler/test/d_traceonactivation/src/TraceOnActivation.cpp
tracesrv/tracecore/btrace_handler/test/flush_page_cache/group/bld.inf
tracesrv/tracecore/btrace_handler/test/flush_page_cache/group/flush_page_cache.mmp
tracesrv/tracecore/btrace_handler/test/flush_page_cache/src/flush_page_cache.cpp
tracesrv/tracecore/btrace_handler/test/group/bld.inf
tracesrv/tracecore/btrace_handler/test/inc/t_rtest_panic.h
tracesrv/tracecore/btrace_handler/test/t_tracecore/group/bld.inf
tracesrv/tracecore/btrace_handler/test/t_tracecore/group/t_tracecore.mmh
tracesrv/tracecore/btrace_handler/test/t_tracecore/group/t_tracecore.mmp
tracesrv/tracecore/btrace_handler/test/t_tracecore/group/t_tracecore.pkg
tracesrv/tracecore/btrace_handler/test/t_tracecore/group/t_tracecore_disabled.mmp
tracesrv/tracecore/btrace_handler/test/t_tracecore/inc/t_tracecore.h
tracesrv/tracecore/btrace_handler/test/t_tracecore/src/t_tracecore.cpp
tracesrv/tracecore/btrace_handler/test/t_tracecore_wdp/group/bld.inf
tracesrv/tracecore/btrace_handler/test/t_tracecore_wdp/group/t_tracecore_wdp.mmp
tracesrv/tracecore/btrace_handler/test/t_tracecore_wdp/inc/t_tracecore_wdp.h
tracesrv/tracecore/btrace_handler/test/t_tracecore_wdp/src/t_tracecore_wdp.cpp
tracesrv/tracecore/btrace_handler/test/tracedataparser/bwins/tracedataparseru.def
tracesrv/tracecore/btrace_handler/test/tracedataparser/eabi/tracedataparseru.def
tracesrv/tracecore/btrace_handler/test/tracedataparser/group/bld.inf
tracesrv/tracecore/btrace_handler/test/tracedataparser/group/tracedataparser.iby
tracesrv/tracecore/btrace_handler/test/tracedataparser/group/tracedataparser.mmp
tracesrv/tracecore/btrace_handler/test/tracedataparser/inc/tracedataparser.h
tracesrv/tracecore/btrace_handler/test/tracedataparser/src/tracedataparser.cpp
tracesrv/tracecore/btrace_handler/traces/OstTraceDefinitions.h
tracesrv/tracecore/btrace_handler/traces/fixed_id.definitions
tracesrv/tracecore/group/bld.inf
tracesrv/tracecore/group/tracecore.hrh
tracesrv/tracecore/group/tracecoresf.iby
tracesrv/tracecore/plugins/xti_if/common/inc/TraceCoreMessageUtils.h
tracesrv/tracecore/plugins/xti_if/common/inc/TraceCoreXtiIf.h
tracesrv/tracecore/plugins/xti_if/common/src/TraceCoreXtiIf.cpp
tracesrv/tracecore/plugins/xti_if/common/src/XtiIfMessageUtils.cpp
tracesrv/tracecore/test/group/bld.inf
tracesrv/tracecore/test/group/t_tracecoresf.iby
tracesrv/tracecore/test/group/t_tracecoresf_ldd.iby
tracesrv/tracecore/tracecert/bwins/trace_certificationu.def
tracesrv/tracecore/tracecert/eabi/trace_certificationu.def
tracesrv/tracecore/tracecert/group/bld.inf
tracesrv/tracecore/tracecert/group/trace_certification.mmp
tracesrv/tracecore/tracecert/inc/trace_certification.h
tracesrv/tracecore/tracecert/src/trace_certification.cpp
tracesrv/tracecore/writers/xti/common/group/TCXtiWriterLib.mmp
tracesrv/tracecore/writers/xti/common/group/bld.inf
tracesrv/tracecore/writers/xti/common/inc/TraceCoreRegisterWriter.h
tracesrv/tracecore/writers/xti/common/src/TraceCoreRegisterWriter.cia
tracesrv/tracecore/writers/xti/common/src/TraceCoreRegisterWriter.cpp
tracesrv/tracecore/writers/xti/common/traces/OstTraceDefinitions.h
tracesrv/tracecore/writers/xti/common/traces/TraceCoreRegisterWriterTraces.h
tracesrv/tracecore/writers/xti/common/traces/fixed_id.definitions
--- a/debugsrv/runmodedebug/group/bld.inf	Wed Sep 29 17:45:35 2010 +0300
+++ b/debugsrv/runmodedebug/group/bld.inf	Fri Oct 08 14:56:39 2010 +0300
@@ -1,7 +1,7 @@
 // Copyright (c) 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"
+// under the terms of "Eclipse Public License v1.0"
 // which accompanies this distribution, and is available
 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
 //
@@ -15,11 +15,11 @@
 // 
 //
 
-/**
- @file
-*/
+
+#include "../runmodedebug_plat/group/bld.inf"
+
 
 #include "../rmdriver/group/bld.inf"
 
 
-#include "../rmdebug_test/group/bld.inf"
\ No newline at end of file
+#include "../tsrc/group/bld.inf"
\ No newline at end of file
--- a/debugsrv/runmodedebug/rmdebug_test/eabi/t_rmdebug_dllu.def	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-EXPORTS
-	_Z9GetDSSUidv @ 1 NONAME
-
--- a/debugsrv/runmodedebug/rmdebug_test/group/bld.inf	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,22 +0,0 @@
-// Copyright (c) 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:
-//
-// Description:
-// Kernel and User library test code
-// 
-//
-
-/**
- @file
-*/
-
-#include "../rm_debug/group/bld.inf"
--- a/debugsrv/runmodedebug/rmdebug_test/group/e32test.bld	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
-
-!EXPLICIT
-!INCREMENTAL
-
-e32test		e32test\group
--- a/debugsrv/runmodedebug/rmdebug_test/group/mk_rmdbg_test.bat	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,18 +0,0 @@
-@rem
-@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-@rem All rights reserved.
-@rem This component and the accompanying materials are made available
-@rem under the terms of "Eclipse Public License v1.0"
-@rem which accompanies this distribution, and is available
-@rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
-@rem
-@rem Initial Contributors:
-@rem Nokia Corporation - initial contribution.
-@rem
-@rem Contributors:
-@rem
-@rem Description: 
-@rem
-
-makesis rmdbg_test.pkg
-signsis rmdbg_test.sis rmdbg_test.sisx  RDTest_02.der RDTest_02.key
\ No newline at end of file
--- a/debugsrv/runmodedebug/rmdebug_test/rm_debug/basic_tests/r_kernel_low_memory_security_svr_session.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-// Copyright (c) 2007-2009 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:
-//
-// Description:
-// Implementation of RKernelLowMemorySecuritySvrSession
-// 
-//
-
-#include "r_kernel_low_memory_security_svr_session.h"
-
-void RKernelLowMemorySecuritySvrSession::FailAlloc(const TInt aCount)
-	{
-	__KHEAP_FAILNEXT(aCount);
-	}
-
-void RKernelLowMemorySecuritySvrSession::HeapReset()
-	{
-	__KHEAP_RESET;
-	}
-
-void RKernelLowMemorySecuritySvrSession::MarkHeap()
-	{
-	__KHEAP_MARK;
-	}
-
-void RKernelLowMemorySecuritySvrSession::MarkHeapEnd()
-	{
-	__KHEAP_MARKEND;
-	}
-
--- a/debugsrv/runmodedebug/rmdebug_test/rm_debug/basic_tests/r_kernel_low_memory_security_svr_session.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-// Copyright (c) 2007-2009 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:
-//
-// Description:
-// Version of security server session to enable testing of low memory conditions on kernel side
-// 
-//
-
-/**
- @file
- @internalTechnology
- @released
-*/
-
-#ifndef R_KERNEL_LOW_MEMORY_SECURITY_SVR_SESSION_H
-#define R_KERNEL_LOW_MEMORY_SECURITY_SVR_SESSION_H
-
-#include "r_low_memory_security_svr_session.h"
-
-class RKernelLowMemorySecuritySvrSession : public RLowMemorySecuritySvrSession
-	{
-protected:
-	void FailAlloc(const TInt aCount);
-	void HeapReset();
-	void MarkHeap();
-	void MarkHeapEnd();
-	};
-
-#endif //R_KERNEL_LOW_MEMORY_SECURITY_SVR_SESSION_H
-
--- a/debugsrv/runmodedebug/rmdebug_test/rm_debug/basic_tests/r_low_memory_security_svr_session.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,86 +0,0 @@
-// Copyright (c) 2007-2009 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:
-//
-// Description:
-// Implementation of RLowMemorySecuritySvrSession
-// 
-//
-
-#include "r_low_memory_security_svr_session.h"
-#include <e32debug.h>
-
-// test the effects of heap failure on global RSecuritySvrSession::GetList() in debug mode,
-// in release mode normal call is made (heap checking not applicable)
-TInt RLowMemorySecuritySvrSession::GetList(const Debug::TListId aListId, TDes8& aListData, TUint32& aDataSize)
-	{
-	TInt failAt = 0;
-	TInt err = KErrNoMemory;
-	while(err == KErrNoMemory)
-		{
-		failAt++;
-		FailAlloc(failAt);
-		MarkHeap();
-		err = this->RSecuritySvrSession::GetList(aListId, aListData, aDataSize);
-		if(KErrNoMemory == err)
-			{
-			MarkHeapEnd();
-			}
-		HeapReset();
-		//RDebug::Printf("Debug::RLowMemorySecuritySvrSession::GetList(): failAt: %d, err: %d", failAt, err);
-		}
-	return err;
-	}
-
-// test the effects of heap failure on thread-specific RSecuritySvrSession::GetList() in debug mode,
-// in release mode normal call is made (heap checking not applicable)
-TInt RLowMemorySecuritySvrSession::GetList(const TThreadId aThreadId, const Debug::TListId aListId, TDes8& aListData, TUint32& aDataSize)
-	{
-	TInt failAt = 0;
-	TInt err = KErrNoMemory;
-	while(err == KErrNoMemory)
-		{
-		failAt++;
-		FailAlloc(failAt);
-		MarkHeap();
-		err = this->RSecuritySvrSession::GetList(aThreadId, aListId, aListData, aDataSize);
-		if(KErrNoMemory == err)
-			{
-			MarkHeapEnd();
-			}
-		HeapReset();
-		//RDebug::Printf("Debug::RLowMemorySecuritySvrSession::GetList(TThreadId): failAt: %d, err: %d", failAt, err);
-		}
-	return err;
-	}
-
-// test the effects of heap failure on process-specific RSecuritySvrSession::GetList() in debug mode,
-// in release mode normal call is made (heap checking not applicable)
-TInt RLowMemorySecuritySvrSession::GetList(const TProcessId aProcessId, const Debug::TListId aListId, TDes8& aListData, TUint32& aDataSize)
-	{
-	TInt failAt = 0;
-	TInt err = KErrNoMemory;
-	while(err == KErrNoMemory)
-		{
-		failAt++;
-		FailAlloc(failAt);
-		MarkHeap();
-		err = this->RSecuritySvrSession::GetList(aProcessId, aListId, aListData, aDataSize);
-		if(KErrNoMemory == err)
-			{
-			MarkHeapEnd();
-			}
-		HeapReset();
-		//RDebug::Printf("Debug::RLowMemorySecuritySvrSession::GetList(TProcessId): failAt: %d, err: %d", failAt, err);
-		}
-	return err;
-	}
-
--- a/debugsrv/runmodedebug/rmdebug_test/rm_debug/basic_tests/r_low_memory_security_svr_session.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +0,0 @@
-// Copyright (c) 2007-2009 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:
-//
-// Description:
-// Version of security server session to enable testing of low memory conditions
-// 
-//
-
-/**
- @file
- @internalTechnology
- @released
-*/
-
-#ifndef R_LOW_MEMORY_SECURITY_SVR_SESSION_H
-#define R_LOW_MEMORY_SECURITY_SVR_SESSION_H
-
-#include <rm_debug_api.h>
-
-class RLowMemorySecuritySvrSession : public Debug::RSecuritySvrSession
-	{
-public:
-	TInt GetList(const Debug::TListId aListId, TDes8& aListData, TUint32& aDataSize);
-	TInt GetList(const TThreadId aThreadId, const Debug::TListId aListId, TDes8& aListData, TUint32& aDataSize);
-	TInt GetList(const TProcessId aProcessId, const Debug::TListId aListId, TDes8& aListData, TUint32& aDataSize);
-protected:
-	virtual void FailAlloc(const TInt aCount) = 0;
-	virtual void HeapReset() = 0;
-	virtual void MarkHeap() = 0;
-	virtual void MarkHeapEnd() = 0;
-	};
-
-#endif //R_LOW_MEMORY_SECURITY_SVR_SESSION_H
-
--- a/debugsrv/runmodedebug/rmdebug_test/rm_debug/basic_tests/r_user_low_memory_security_svr_session.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,54 +0,0 @@
-// Copyright (c) 2007-2009 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:
-//
-// Description:
-// r_kernel_low_memory_security_svr_session.cpp
-// Implementation of RUserLowMemorySecuritySvrSession
-// 
-//
-
-#include "r_user_low_memory_security_svr_session.h"
-#include <rm_debug_api.h>
-#ifdef _DEBUG
-#include "low_mem_requests.h"
-#endif
-
-void RUserLowMemorySecuritySvrSession::FailAlloc(const TInt aCount)
-	{
-#ifdef _DEBUG
-	TIpcArgs args(aCount);
-	SendReceive(EDebugServFailAlloc, args);
-#endif
-	}
-
-void RUserLowMemorySecuritySvrSession::HeapReset()
-	{
-#ifdef _DEBUG
-	TIpcArgs args(0);
-	SendReceive(EDebugServFailAlloc, args);
-#endif
-	}
-
-void RUserLowMemorySecuritySvrSession::MarkHeap()
-	{
-#ifdef _DEBUG
-	SendReceive(EDebugServMarkHeap);
-#endif
-	}
-
-void RUserLowMemorySecuritySvrSession::MarkHeapEnd()
-	{
-#ifdef _DEBUG
-	SendReceive(EDebugServMarkEnd);
-#endif
-	}
-
--- a/debugsrv/runmodedebug/rmdebug_test/rm_debug/basic_tests/r_user_low_memory_security_svr_session.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-// Copyright (c) 2007-2009 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:
-//
-// Description:
-// Version of security server session to enable testing of low memory conditions on user side
-// 
-//
-
-/**
- @file
- @internalTechnology
- @released
-*/
-
-#ifndef R_USER_LOW_MEMORY_SECURITY_SVR_SESSION_H
-#define R_USER_LOW_MEMORY_SECURITY_SVR_SESSION_H
-
-#include "r_low_memory_security_svr_session.h"
-
-class RUserLowMemorySecuritySvrSession : public RLowMemorySecuritySvrSession
-	{
-protected:
-	void FailAlloc(const TInt aCount);
-	void HeapReset();
-	void MarkHeap();
-	void MarkHeapEnd();
-	};
-
-#endif //R_USER_LOW_MEMORY_SECURITY_SVR_SESSION_H
-
--- a/debugsrv/runmodedebug/rmdebug_test/rm_debug/basic_tests/t_rmdebug2.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,4985 +0,0 @@
-// Copyright (c) 2006-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:
-//
-// Description:
-// Tests the functionality of the run mode debug device driver.
-//
-//
-
-#include <e32base.h>
-#include <e32base_private.h>
-#include <e32cons.h>
-#include <e32test.h>
-#include <e32ldr.h>
-#include <e32cmn.h>
-#include <e32cmn_private.h>
-#include <f32dbg.h>
-#include <f32file.h>
-#include <hal.h>
-#include <u32hal.h>
-#include <e32property.h>
-
-#include "t_rmdebug_dll.h"
-
-#include <rm_debug_api.h>
-#include "d_rmdebugthread2.h"
-#include "t_rmdebug2.h"
-#include "t_rmdebug_app.h"
-
-#ifdef __MARM_ARMV4__
-#include "d_rmdebug_step_test_armv4.h"
-#endif
-
-#ifdef __MARM_ARMV5__
-#include "d_rmdebug_step_test.h"
-#include "d_rmdebug_bkpt_test.h"
-#endif
-
-#include "d_demand_paging.h"
-
-#ifdef KERNEL_OOM_TESTING
-	#ifdef USER_OOM_TESTING
-		#error "Cannot define both KERNEL_OOM_TESTING and USER_OOM_TESTING"
-	#endif
-#endif
-
-#if  defined (NO_DEBUGTOKEN)  || defined (SOMECAPS_DEBUGTOKEN) || defined (FEWCAPS_DEBUGTOKEN)
-_LIT8(KCrashDummyData, "This is a sample write");
-#endif
-
-using namespace Debug;
-
-const TVersion securityServerVersion(0,1,1);
-
-const TVersion testVersion(2,1,0);
-
-IMPORT_C TInt StartDebugThread(RThread& aServerThread, const TDesC& aDebugThreadName);
- 
-extern TInt TestData;
-extern TTestFunction FunctionChooser;
-extern TBuf8<SYMBIAN_RMDBG_MEMORYSIZE> gMemoryAccessBytes;
-
-IMPORT_C TInt TestFunction();
-IMPORT_C void TestPagedCode();
-IMPORT_C extern TInt RMDebugDemandPagingTest();
-
-// Device driver name
-_LIT(KDebugDriverFileName,"rm_debug.ldd");
-_LIT(KRMDebugAppName, "t_rmdebug_app");
-
-
-#if defined(NO_DEBUGTOKEN)
-    _LIT(KTestName, "T_RMDEBUG2");
-#elif defined(SOMECAPS_DEBUGTOKEN)
-    _LIT(KTestName, "T_RMDEBUG2_OEM");
-#elif defined(FEWCAPS_DEBUGTOKEN)
-    _LIT(KTestName, "T_RMDEBUG2_OEM2");
-#elif defined(ALLCAPS_DEBUGTOKEN)
-    _LIT(KTestName, "T_RMDEBUG2_ALLCAPS");
-#endif
-
-#define TIMED_WAIT(request, timeoutInMs) CRunModeAgent::TimedWait(request, timeoutInMs, __LINE__)
-
-LOCAL_D RTest test(KTestName);
-
-TBool gUseDelay;
-
-CRunModeAgent::CRunModeAgent()
-//
-// CRunModeAgent constructor
-//
-	{
-	FillArray();
-	RProcess thisProcess;
-	iFileName = thisProcess.FileName();
-	thisProcess.Close();
-	}
-
-CRunModeAgent* CRunModeAgent::NewL()
-//
-// CRunModeAgent::NewL
-//
-	{
-	CRunModeAgent* self = new(ELeave) CRunModeAgent();
-
-  	self->ConstructL();
-
-	return self;
-	}
-
-CRunModeAgent::~CRunModeAgent()
-//
-// CRunModeAgent destructor
-//
-	{
-    iTimer.Close();
-    iRunCountSubscribe.Close();
-    
-	User::FreeLogicalDevice(KDebugDriverFileName);
-	iServSession.Close();
-	iDebugThread.Close();
-	}
-
-void CRunModeAgent::ConstructL()
-//
-// CRunModeAgent::ConstructL
-//
-	{
-	// nothing to do here
-	}
-
-void CRunModeAgent::SetupAndAttachToDSS()
-//
-// CRunModeAgent::SetupAndAttachToDSS
-//
-	{
-	TInt err = StartDebugThread(iDebugThread, KDebugThreadName);
-
-	// get the thread id for use in the tests
-	iThreadID = iDebugThread.Id();
-
-	if (err != KErrNone)
-		{
-		User::Panic(_L("Can't start debug thread"), err);
-		}
-
-    err = iRunCountSubscribe.Attach( RProcess().SecureId(), CDebugServThread::ERMDBGRunCountProperty);
-    if (err != KErrNone)
-        {
-        User::Panic(_L("Can't attach to RProperty iRunCountSubscribe"), err);
-        }
-
-    err = iTimer.CreateLocal(); 
-    if (err != KErrNone)
-        {
-        User::Panic(_L("Can't create RTimer::CreateLocal()"), err);
-        }
-    
-	err = iServSession.Connect(securityServerVersion);
-	if (err != KErrNone)
-		{
-		User::Panic(_L("Can't open server session"), err);
-		}
-	}
-
-CRunModeAgent *RunModeAgent;
-
-// helper function to check whether the listing of type aListId is supported for a scope of aListScope
-TBool CRunModeAgent::ListingSupported(const TListId aListId, const TListScope aListScope)
-	{
-	TTag tag = GetTag(ETagHeaderList, aListId);
-
-	return (tag.iValue) & aListScope;
-	}
-
-//---------------------------------------------
-//! @SYMTestCaseID KBase-T-RMDEBUG2-0426
-//! @SYMTestType
-//! @SYMPREQ PREQ1426
-//! @SYMTestCaseDesc Test getting the list of XIP libraries
-//! @SYMTestActions The XIP library list should be successfully obtained
-//! @SYMTestExpectedResults The specified ldd file should be present in the obtained listing
-//! @SYMTestPriority High
-//! @SYMTestStatus Implemented
-//---------------------------------------------
-void CRunModeAgent::TestGetXipLibrariesList()
-	{
-	test.Next(_L("TestGetXipLibrariesList\n"));
-
-	test(ListingSupported(EXipLibraries, EScopeGlobal));
-	test(!ListingSupported(EXipLibraries, EScopeProcessSpecific));
-	test(!ListingSupported(EXipLibraries, EScopeThreadSpecific));
-
-	//allocate a very small buffer so the GetList call initially fails
-	RBuf8 buffer;
-	test(KErrNone == buffer.Create(1));
-	TUint32 size = 0;
-
-	//get the list data
-	DoGetList(EXipLibraries, EScopeGlobal, buffer, size);
-
-	//search the buffer for entry corresponding to the debug kernel driver
-	//which should be in the rom
-	_LIT(KRmDebugLddName, "z:\\sys\\bin\\rm_debug.ldd");
-
-	//iterate through the buffer and set found to ETrue if we find the driver
-	TBool found = EFalse;
-	TUint8* ptr = (TUint8*)buffer.Ptr();
-	const TUint8* ptrEnd = ptr + size;
-	while(ptr < ptrEnd)
-		{
-		TXipLibraryListEntry& xipLibrary = *(TXipLibraryListEntry*)ptr;
-
-		//get the name of the library
-		TPtr name(&xipLibrary.iName[0], xipLibrary.iNameLength, xipLibrary.iNameLength);
-		if(name.CompareF(KRmDebugLddName()) == 0)
-			{
-			//found the library but continue reading the rest of the buffer to
-			//check nothing bad happens towards the end
-			found = ETrue;
-			}
-		//move pointer on to next library
-		ptr += Align4(xipLibrary.GetSize());
-		}
-	test(found);
-
-	//do cleanup
-	buffer.Close();
-	}
-
-//---------------------------------------------
-//! @SYMTestCaseID KBase-T-RMDEBUG2-0427
-//! @SYMTestType
-//! @SYMPREQ PREQ1426
-//! @SYMTestCaseDesc Test getting the list of executables
-//! @SYMTestActions The list of debuggable executable files should be obtained
-//! @SYMTestExpectedResults The client exe should appear in the list
-//! @SYMTestPriority High
-//! @SYMTestStatus Implemented
-//---------------------------------------------
-void CRunModeAgent::TestGetExecutablesList()
-	{
-	test.Next(_L("TestGetExecutablesList\n"));
-
-	test(ListingSupported(EExecutables, EScopeGlobal));
-	test(!ListingSupported(EExecutables, EScopeProcessSpecific));
-	test(!ListingSupported(EExecutables, EScopeThreadSpecific));
-
-	//allocate a very small buffer so the GetList call initially fails
-	RBuf8 buffer;
-	test(KErrNone == buffer.Create(1));
-	TUint32 size = 0;
-
-	test(KErrNone == iServSession.AttachExecutable(iFileName, EFalse));
-
-	//get the list data
-	DoGetList(EExecutables, EScopeGlobal, buffer, size);
-
-	//get this process' name
-	RProcess thisProcess;
-	TFileName thisProcessName = thisProcess.FileName();
-
-	//look through the buffer and check if the target debug thread is there
-	TBool found = EFalse;
-	TUint8* ptr = (TUint8*)buffer.Ptr();
-	const TUint8* ptrEnd = ptr + size;
-	while(ptr < ptrEnd)
-		{
-		TExecutablesListEntry& entry = *(TExecutablesListEntry*)ptr;
-		//get name
-		TPtr name(&entry.iName[0], entry.iNameLength, entry.iNameLength);
-		if( (entry.iIsActivelyDebugged != 0) && (0 == thisProcessName.CompareF(name)) )
-			{
-			//found this process and asserted it is being actively debugged
-			found = ETrue;
-			}
-		//move pointer on to next entry
-		ptr += Align4(entry.GetSize());
-		}
-	test(found);
-
-	//clean up
-	buffer.Close();
-
-	test(KErrNone == iServSession.DetachExecutable(iFileName));
-	}
-
-//---------------------------------------------
-//! @SYMTestCaseID KBase-T-RMDEBUG2-0428
-//! @SYMTestType
-//! @SYMPREQ PREQ1426
-//! @SYMTestCaseDesc Test error conditions for the GetList calls
-//! @SYMTestActions Multiple calls to test calling GetList with bad arguments
-//! @SYMTestExpectedResults All tests should fail with the appropriate error codes
-//! @SYMTestPriority High
-//! @SYMTestStatus Implemented
-//---------------------------------------------
-void CRunModeAgent::TestGetListInvalidData()
-	{
-	test.Next(_L("TestGetListInvalidData\n"));
-
-	//allocate a buffer, the size should not matter as expecting all calls to fail
-	RBuf8 buffer;
-	test(KErrNone == buffer.Create(1));
-	TUint32 size = 0;
-
-	//test what happens if we ask for an unsupported list type globally
-	test(KErrNotSupported == iServSession.GetList((TListId)1234, buffer, size));
-
-	//test what happens if we ask for an unsupported list type
-	test(KErrNotSupported == iServSession.GetList(RThread().Id(), (TListId)1234, buffer, size));
-
-	//test what happens if we try to get a non-global libraries list
-	test(KErrArgument == iServSession.GetList(RThread().Id(), EXipLibraries, buffer, size));
-
-	//test what happens if we try to get a non-global executables list
-	test(KErrArgument == iServSession.GetList(RThread().Id(), EExecutables, buffer, size));
-
-	//test what happens if we try to get a non-global process list
-	test(KErrArgument == iServSession.GetList(RThread().Id(), EProcesses, buffer, size));
-
-	//check that using a process id fails
-	test(KErrArgument == iServSession.GetList(RProcess().Id(), EProcesses, buffer, size));
-
-	//check that specifying a non-existant thread id fails
-	test(KErrArgument == iServSession.GetList((TThreadId)0x12345678, EThreads, buffer, size));
-
-	//check that specifying a non-existant process id fails
-	test(KErrArgument == iServSession.GetList((TProcessId)0x12345678, EThreads, buffer, size));
-
-	//check that specifying a non-existant thread id fails
-	test(KErrArgument == iServSession.GetList((TThreadId)0x12345678, ECodeSegs, buffer, size));
-
-	//check that specifying a non-existant process id fails
-	test(KErrArgument == iServSession.GetList((TProcessId)0x12345678, ECodeSegs, buffer, size));
-
-	//cleanup
-	buffer.Close();
-	}
-
-//---------------------------------------------
-//! @SYMTestCaseID KBase-T-RMDEBUG2-0429
-//! @SYMTestType
-//! @SYMPREQ PREQ1426
-//! @SYMTestCaseDesc Test getting the process list
-//! @SYMTestActions Get the process listing
-//! @SYMTestExpectedResults The process listing should be successfully obtained and the current process should be present in the list
-//! @SYMTestPriority High
-//! @SYMTestStatus Implemented
-//---------------------------------------------
-void CRunModeAgent::TestGetProcessList()
-	{
-	test.Next(_L("TestGetProcessList\n"));
-
-	test(ListingSupported(EProcesses, EScopeGlobal));
-	test(!ListingSupported(EProcesses, EScopeProcessSpecific));
-	test(!ListingSupported(EProcesses, EScopeThreadSpecific));
-
-	//allocate a very small buffer so the GetList call fails
-	RBuf8 buffer;
-	test(KErrNone == buffer.Create(1));
-	TUint32 size = 0;
-
-	//get the list data
-	DoGetList(EProcesses, EScopeGlobal, buffer, size);
-
-	//initialise data about the target debug thread to compare the kernel's data against
-	RProcess thisProcess;
-	TFileName thisProcessName = thisProcess.FileName();
-	TUint32 processId = thisProcess.Id().Id();
-
-	//look through the buffer and check if the target debug thread is there
-	TBool found = EFalse;
-	TUint8* ptr = (TUint8*)buffer.Ptr();
-	const TUint8* ptrEnd = ptr + size;
-	while(ptr < ptrEnd)
-		{
-		TProcessListEntry& entry = *(TProcessListEntry*)ptr;
-		if( (RProcess().Id().Id() == entry.iProcessId) &&
-			(0 == thisProcessName.CompareF(TPtr(&(entry.iNames[0]), entry.iFileNameLength, entry.iFileNameLength))) &&
-		 	(0 == thisProcess.FullName().CompareF(TPtr(&(entry.iNames[0]) + entry.iFileNameLength, entry.iDynamicNameLength, entry.iDynamicNameLength))) &&
-			0x4321bbbb /* Magic */ == entry.iUid3)
-			{
-			//if all match then we've found it
-			found = ETrue;
-			}
-		ptr += Align4(entry.GetSize());
-		}
-
-	//check whether the expected result happened
-	test(found);
-
-	//clean up
-	buffer.Close();
-	}
-
-//---------------------------------------------
-//! @SYMTestCaseID KBase-T-RMDEBUG2-0430
-//! @SYMTestType
-//! @SYMPREQ PREQ1426
-//! @SYMTestCaseDesc Test getting the thread list
-//! @SYMTestActions Get the thread listing globally and for a specified thread or process
-//! @SYMTestExpectedResults The thread listings should all be successfully obtained and the current thread should be present in all listings
-//! @SYMTestPriority High
-//! @SYMTestStatus Implemented
-//---------------------------------------------
-void CRunModeAgent::TestGetThreadList()
-	{
-	test.Next(_L("TestGetThreadList\n"));
-
-	test(ListingSupported(EThreads, EScopeGlobal));
-	test(ListingSupported(EThreads, EScopeProcessSpecific));
-	test(ListingSupported(EThreads, EScopeThreadSpecific));
-
-	test(KErrNone == iServSession.AttachExecutable(iFileName, EFalse));
-	test(KErrNone == iServSession.SuspendThread(iThreadID));
-
-	TBool found = EFalse;
-	
-	/* We need these loops because on some system the kernel run mode debugger does not 
-	 immediately present the thread in the thread list. 
-	 */
-	
-	for(TInt retryCount = 0; retryCount < 10 && !found; retryCount++ )
-		{
-		//test getting this process's thread list, ETrue as should find the target debug thread
-		User::After(50000);
-		found = DoTestGetThreadList(ETrue, EScopeProcessSpecific, RProcess().Id().Id());
-		}
-	test( found );
-	found = EFalse;
-
-	for(TInt retryCount = 0; retryCount < 10 && !found; retryCount++ )
-		{
-		//test getting the global list, ETrue as should find the target debug thread
-		User::After(50000);
-		found = DoTestGetThreadList(ETrue, EScopeGlobal);
-		}
-	test( found );
-
-	found = EFalse;
-	for(TInt retryCount = 0; retryCount < 10 && !found; retryCount++ )
-		{
-		//test getting this thread's thread list, ETrue as should find the target debug thread
-		User::After(50000);
-		found = DoTestGetThreadList(ETrue, EScopeThreadSpecific, RThread().Id().Id());
-		}
-	test( found );
-
-	test(KErrNone == iServSession.ResumeThread(iThreadID));
-	test(KErrNone == iServSession.DetachExecutable(iFileName));
-	}
-			
-TBool CRunModeAgent::DoTestGetThreadList(const TBool aShouldPass, const TListScope aListScope, const TUint64 aTargetId)
-	{
-	//create data to pass
-	RBuf8 buffer;
-	TUint32 size = 0;
-
-	//perform the call to get the thread list
-	DoGetList(EThreads, aListScope, buffer, size, aTargetId);
-
-	//initialise data about the target debug thread to compare the kernel's data against
-	TFileName name = iDebugThread.FullName();
-	RProcess thisProcess;
-	TUint64 processId = thisProcess.Id();
-	TUint64 threadId = iDebugThread.Id();
-
-	//look through the buffer and check if the target debug thread is there
-	TBool found = EFalse;
-	TUint8* ptr = (TUint8*)buffer.Ptr();
-	const TUint8* ptrEnd = ptr + size;
-	while(ptr < ptrEnd)
-		{
-		TThreadListEntry* entry = (TThreadListEntry*)ptr;
-		TPtr entryName(&(entry->iName[0]), entry->iNameLength, entry->iNameLength);
-
-		if( (threadId == entry->iThreadId) && (processId == entry->iProcessId) && (0 == name.CompareF(entryName)) )
-			{
-			test(entry->iSupervisorStackBaseValid);
-			test(entry->iSupervisorStackSizeValid);
-			//if all match then we've found it
-			found = ETrue;
-			break;
-			}
-
-		ptr += Align4(entry->GetSize());
-		}
-
-	//clean up
-	buffer.Close();
-	return found;
-
-	}
-
-//---------------------------------------------
-//! @SYMTestCaseID KBase-T-RMDEBUG2-0431
-//! @SYMTestType
-//! @SYMPREQ PREQ1426
-//! @SYMTestCaseDesc Test getting the code segment list
-//! @SYMTestActions Get the code segment list global and for a specified thread
-//! @SYMTestExpectedResults The listings should be returned successfully
-//! @SYMTestPriority High
-//! @SYMTestStatus Implemented
-//---------------------------------------------
-void CRunModeAgent::TestGetCodeSegsList()
-	{
-	test.Next(_L("TestGetCodeSegsList\n"));
-
-	test(ListingSupported(ECodeSegs, EScopeGlobal));
-	test(ListingSupported(ECodeSegs, EScopeProcessSpecific));
-	test(ListingSupported(ECodeSegs, EScopeThreadSpecific));
-
-	// Cannot perform this test with OEM2 debug token, as the t_rmdebug2 app
-	// needs AllFiles, and the OEM2 debug token does not authorise this.
-	// It seems reasonable to suppose that it would work anyway
-
-#ifndef FEWCAPS_DEBUGTOKEN
-	test(KErrNone == iServSession.AttachExecutable(iFileName, EFalse));
-
- 	//test getting the global list, ETrue as should find this process' main codeSeg
-	DoTestGetCodeSegsList(ETrue, EScopeGlobal);
-
-	//test getting this process' codeSegs, ETrue as should find this process' main codeSeg
-	DoTestGetCodeSegsList(ETrue, EScopeProcessSpecific, RProcess().Id().Id());
-
-	//test getting this thread's codeSegs, ETrue as should find this process' main codeSeg
-	DoTestGetCodeSegsList(ETrue, EScopeThreadSpecific, RThread().Id().Id());
-
-	test(KErrNone == iServSession.DetachExecutable(iFileName));
-#endif // FEWCAPS_DEBUGTOKEN
-
-	}
-
-void CRunModeAgent::DoTestGetCodeSegsList(const TBool aShouldPass, const TListScope aListScope, const TUint64 aTargetId)
-	{
-	//create data to pass
-	RBuf8 buffer;
-	TUint32 size = 0;
-
-	//perform the call to get the Code segs
-	DoGetList(ECodeSegs, aListScope, buffer, size, aTargetId);
-
-	//create memoryInfo to contain info about this process
-	RProcess thisProcess;
-	TModuleMemoryInfo memoryInfo;
-	test(KErrNone == thisProcess.GetMemoryInfo(memoryInfo));
-
-	// check whether this process came from a file in ROM so we know whether to
-	// expect the code seg to be XIP or not.
-	RFs fs;
-	test(KErrNone == fs.Connect());
-	TBool thisFileIsInRom = EFalse;
-	if(fs.IsFileInRom(iFileName))
-		{
-		thisFileIsInRom = ETrue;
-		}
-
-	//look through the buffer to find this process' main code seg
-	TBool found = EFalse;
-	TUint8* ptr = (TUint8*)buffer.Ptr();
-	const TUint8* ptrEnd = ptr + size;
-	while(ptr < ptrEnd)
-		{
-		TCodeSegListEntry* codeSeg = (TCodeSegListEntry*)ptr;
-
-		if( (codeSeg->iIsXip == thisFileIsInRom) && (0 == iFileName.CompareF(TPtr(&(codeSeg->iName[0]), codeSeg->iNameLength, codeSeg->iNameLength))) )
-			{
-			if( (memoryInfo.iCodeBase == codeSeg->iCodeBase) &&
-					(memoryInfo.iCodeSize == codeSeg->iCodeSize) &&
-					(memoryInfo.iConstDataSize == codeSeg->iConstDataSize) &&
-					(memoryInfo.iInitialisedDataBase == codeSeg->iInitialisedDataBase) &&
-					(memoryInfo.iInitialisedDataSize == codeSeg->iInitialisedDataSize) &&
-					(memoryInfo.iUninitialisedDataSize == codeSeg->iUninitialisedDataSize))
-				{
-				//all matched so means we've found the codeSeg we're looking for
-				found = ETrue;
-				}
-			}
-		ptr += Align4(codeSeg->GetSize());
-		}
-
-	//check whether the result was as expected
-	test(found == aShouldPass);
-
-	// only care about rm_debug.ldd if we have global scope (belongs to the system not this process)
-	if (aListScope == EScopeGlobal)
-	{
-		// Search for rm_debug.ldd library and check its UID3 is correct
-		found = EFalse;
-
-_LIT(KRMDebugDriverFileName,"Z:\\sys\bin\\rm_debug.ldd");
-
-		TFileName rmdebugFilename(KRMDebugDriverFileName);
-
-		// reset the Ptr
-		ptr = (TUint8*)buffer.Ptr();
-		ptrEnd = ptr+size;
-		while(ptr < ptrEnd)
-		{
-			TCodeSegListEntry* codeSeg = (TCodeSegListEntry*)ptr;
-
-			if( rmdebugFilename.CompareF(TPtr(&(codeSeg->iName[0]), codeSeg->iNameLength, codeSeg->iNameLength)))
-				{
-				if(codeSeg->iUid3 == 0x101f7157 /* Magic */)
-					{
-					//all matched so means we've found the codeSeg we're looking for
-					found = ETrue;
-					}
-				}
-			ptr += Align4(codeSeg->GetSize());
-		}
-		test((TUint32)found == (TUint32)ETrue);
-	}
-
-	//clean up
-	buffer.Close();
-
-	}
-
-
-/**
- * Get a list from the run mode debug system. Most list calls will initially return KErrTooBig, 
- * since the initial size of the buffer is 0. However it is sometimes valid for a list to be empty
- * given its filtering and scope. These calls should return KErrNone.
- */
-void CRunModeAgent::DoGetList(const TListId aListId, const TListScope aListScope, RBuf8& aBuffer, TUint32& aSize, const TUint64 aTargetId)
-	{
-	//close the buffer in case there's stuff allocated in it
-	aBuffer.Close();
-	//initialise it to be one byte big, which will guarantee data won't fit in it
-	test(KErrNone == aBuffer.Create(1));
-	aSize = 0;
-	
-	TInt ret = KErrNone;
-	//should pass this test (assuming we've passed in sensible arguments above...)
-	if(EScopeGlobal == aListScope)
-		{
-		ret = iServSession.GetList(aListId, aBuffer, aSize);
-		}
-	else if(EScopeThreadSpecific == aListScope)
-		{
-		ret = iServSession.GetList((TThreadId)aTargetId, aListId, aBuffer, aSize);
-		}
-	else if(EScopeProcessSpecific == aListScope)
-		{
-		ret = iServSession.GetList((TProcessId)aTargetId, aListId, aBuffer, aSize);
-		}
-	else
-		{
-		// unknown list scope
-		test(0);
-		}
-
-	if( KErrNone == ret )
-		{
-		/* In the case that there is no data, just return and let the caller check
-		the buffer. It is valid for a caller to not expect any data to be returned.
-		*/
-		return;
-		}
-	
-	// The only other allowed return is KErrTooBig
-	test( ret == KErrTooBig );
-
-	//keep allocating larger buffers, beginning with the aSize returned by the above call,
-	//and hopefully we'll eventually make a large enough one
-	test(KErrNone == aBuffer.ReAlloc(aSize));
-
-	for(;;)
-		{
-		TInt err = KErrNone;
-		if(EScopeGlobal == aListScope)
-			{
-			err = iServSession.GetList(aListId, aBuffer, aSize);
-			}
-		else if(EScopeThreadSpecific == aListScope)
-			{
-			err = iServSession.GetList((TThreadId)aTargetId, aListId, aBuffer, aSize);
-			}
-		else if(EScopeProcessSpecific == aListScope)
-			{
-			err = iServSession.GetList((TProcessId)aTargetId, aListId, aBuffer, aSize);
-			}
-		else
-			{
-			// unknown list scope
-			test(0);
-			}
-		if(err == KErrTooBig)
-			{
-			//wasn't big enough so double it
-			aSize = aSize << 1;
-			err = aBuffer.ReAlloc(aSize);
-			if(err != KErrNone)
-				{
-				//print out a message if couldn't allocate memory and quit
-				test.Printf(_L("Out ot memory when attempting to allocate %d bytes."), aSize);
-				test(KErrNone == err);
-				}
-
-			RDebug::Printf(" List size =%d", aSize );
-			}
-		else
-			{
-			test(KErrNone == err);
-			test(aBuffer.Length() == aSize);
-			//break out of the loop if the list has been successfully read in
-			break;
-			}
-		}
-	}
-
-//---------------------------------------------
-//! @SYMTestCaseID KBase-T-RMDEBUG2-0432
-//! @SYMTestType
-//! @SYMPREQ PREQ1426
-//! @SYMTestCaseDesc Test reading and writing memory
-//! @SYMTestActions Multiple calls to read and write memory, with various sizes and at various locations.
-//!	Also test that bad input values cause appropriate errors to be returned.
-//! @SYMTestExpectedResults All tests should pass and the target process should be left unaffected
-//! @SYMTestPriority High
-//! @SYMTestStatus Implemented
-//---------------------------------------------
-void CRunModeAgent::TestMemoryAccess()
-{
-	TInt err;
-
-	test.Next(_L("TestMemoryAccess - Read Memory\n"));
-
-	//initialise buffer
-	gMemoryAccessBytes.SetLength(0);
-	for (TInt i=0; i<SYMBIAN_RMDBG_MEMORYSIZE; i++)
-		{
-		gMemoryAccessBytes.Append(i);
-		}
-
-	TUint32 address = (TUint32)(&gMemoryAccessBytes[0]);
-	TUint32 dataSize = SYMBIAN_RMDBG_MEMORYSIZE;
-
-	//create size for buffer that is rounded up to nearest 4 bytes if not
-	//already 4 byte aligned
-	TUint32 size = dataSize;
-	if(size % 4 != 0)
-		{
-		size += (4 - (size % 4));
-		}
-
-	RBuf8 dataBlock;
-	err = dataBlock.Create(size);
-	test(err==KErrNone);
-	test(KErrNone == iServSession.AttachExecutable(iFileName, EFalse));
-
-	//suspend the thread prior to memory operations
-	test(KErrNone == iServSession.SuspendThread(iThreadID));
-
-	err = iServSession.ReadMemory(iThreadID, address, size, dataBlock, EAccess32, EEndLE8);
-	test(err==KErrNone);
-
-	for (TInt i=0; i<dataSize; i++)
-		{
-		test(dataBlock.Ptr()[i] == gMemoryAccessBytes[i]);
-		}
-
-	test.Next(_L("TestMemoryAccess - Write Memory\n"));
-
-	// Now reset the buffer
-	for (TInt i=0; i<dataSize; i++)
-		{
-		gMemoryAccessBytes[i] = 0;
-		}
-
-	// Write our data into the buffer
-	err = iServSession.WriteMemory(iThreadID, address, size, dataBlock, EAccess32, EEndLE8);
-	test(err==KErrNone);
-
-	for (TInt i=0; i<dataSize; i++)
-		{
-		test(dataBlock.Ptr()[i] == gMemoryAccessBytes[i]);
-		}
-
-	//final test that everything's not been going wrong
-	test(gMemoryAccessBytes[5] != 0);
-
-	test.Next(_L("TestMemoryAccess - Invalid arguments\n"));
-	test.Printf(_L("This test may emit crash-like information. This is intended.\n"));
-
-	//test address that is not 32 bit aligned
-	err = iServSession.ReadMemory(iThreadID, address + 1, size, dataBlock, EAccess32, EEndLE8);
-	test(err == KErrArgument);
-
-	//test size that is not multiple of 4 bytes
-	err = iServSession.WriteMemory(iThreadID, address, size + 2, dataBlock, EAccess32, EEndLE8);
-	test(err == KErrArgument);
-
-	//test size > max block size
-	err = iServSession.ReadMemory(iThreadID, address, (1<<15), dataBlock, EAccess32, EEndLE8);
-	test(err == KErrArgument);
-
-	//test access size == 2 bytes
-	err = iServSession.ReadMemory(iThreadID, address, size, dataBlock, EAccess16, EEndLE8);
-	test(err == KErrNotSupported);
-
-	//test access size == 1 byte
-	err = iServSession.WriteMemory(iThreadID, address, size, dataBlock, EAccess8, EEndLE8);
-	test(err == KErrNotSupported);
-
-	//test endianess == EEndBE8
-	err = iServSession.ReadMemory(iThreadID, address, size, dataBlock, EAccess32, EEndBE8);
-	test(err == KErrNotSupported);
-
-	//test endianess == EEndBE32
-	err = iServSession.WriteMemory(iThreadID, address, size, dataBlock, EAccess32, EEndBE32);
-	test(err == KErrNotSupported);
-
-	//test reading off end of memory
-	err = iServSession.ReadMemory(iThreadID, 0xffffff00, 0x00000101, dataBlock, EAccess32, EEndLE8);
-	test(err == KErrArgument);
-
-	//The following three tests check that edge conditions in the range check are handled correctly.
-	err = iServSession.ReadMemory(iThreadID, 0xffffff00, 0x000000FF, dataBlock, EAccess32, EEndLE8);
-	test(err == KErrArgument);
-
-	err = iServSession.ReadMemory(iThreadID, 0xffffff00, 0x000000F0, dataBlock, EAccess32, EEndLE8);
-	test(err == KErrBadDescriptor);
-
-	//Third range check test. Check that range check is handled correctly even when base + size wraps to 0.
-	err = iServSession.ReadMemory(iThreadID, 0xffffff00, 0x00000100, dataBlock, EAccess32, EEndLE8);
-	test(err == KErrBadDescriptor);
-	//end of range check tests
-
-	//test size == 0
-	err = iServSession.WriteMemory(iThreadID, address, 0, dataBlock, EAccess32, EEndLE8);
-	test(err == KErrArgument);
-
-	//attempt to write to address outside of process data segments,
-	//this address corresponds to the vectors so shouldn't be able to write
-	err = iServSession.WriteMemory(iThreadID, 0xffff0000, size, dataBlock, EAccess32, EEndLE8);
-	test(err == KErrBadDescriptor);
-
-	//attempt to read and write to address in process code segment
-
-	//open a handle to the thread
-	RThread debugThread;
-	test(debugThread.Open(iThreadID) == KErrNone);
-
-	//get a reference to the debug process
-	RProcess debugProcess;
-	test(debugThread.Process(debugProcess) == KErrNone);
-
-	//get the memory info for the process
-	TProcessMemoryInfo info;
-	test(debugProcess.GetMemoryInfo(info) == KErrNone);
-
-	address = info.iCodeBase;
-	if(size <= info.iCodeSize)
-		{
-		test(KErrNone == iServSession.ReadMemory(iThreadID, address, size, dataBlock, EAccess32, EEndLE8));
-		test(KErrBadDescriptor == iServSession.WriteMemory(iThreadID, address, size, dataBlock, EAccess32, EEndLE8));
-		}
-
-	// Some performance tests now
-	TUint32 bytesRead = 0;
-
-	// Allocate a data buffer
-	TUint32* p = (TUint32*)User::Alloc(size);
-	test(p != 0);
-
-	TInt nanokernel_tick_period;
-	HAL::Get(HAL::ENanoTickPeriod, nanokernel_tick_period);
-	test (nanokernel_tick_period != 0);
-
-	static const TInt KOneMillion = 1000000;
-
-	TInt nkTicksPerSecond = KOneMillion/nanokernel_tick_period;
-
-	TUint32 stopTickCount = User::NTickCount() + nkTicksPerSecond;
-
-	while (User::NTickCount() < stopTickCount)
-		{
-		err = iServSession.ReadMemory(iThreadID, (TUint32)p, size, dataBlock, EAccess32, EEndLE8);
-		test(err==KErrNone);
-
-		// Increase the count of bytes read
-		bytesRead += size;
-		}
-
-	test(bytesRead != 0);
-	iMemoryReadKbytesPerSecond = bytesRead/1024;
-
-	// write memory test
-	TUint32 bytesWritten = 0;
-
-	stopTickCount = User::NTickCount() + nkTicksPerSecond;
-
-	while (User::NTickCount() < stopTickCount)
-		{
-		err = iServSession.WriteMemory(iThreadID, (TUint32)p, size, dataBlock, EAccess32, EEndLE8);
-		test(err==KErrNone);
-
-		// Increase the count of bytes read
-		bytesWritten += size;
-		}
-
-	test (bytesWritten != 0);
-	iMemoryWriteKbytesPerSecond = bytesWritten/1024;
-
-	User::Free(p);
-
-	//resume the thread
-	test(KErrNone == iServSession.ResumeThread(iThreadID));
-
-	debugThread.Close();
-	dataBlock.Close();
-
-	test(KErrNone == iServSession.DetachExecutable(iFileName));
-	}
-
-//---------------------------------------------
-//! @SYMTestCaseID KBase-T-RMDEBUG2-0433
-//! @SYMTestType
-//! @SYMPREQ PREQ1426
-//! @SYMTestCaseDesc Test suspending and resuming threads
-//! @SYMTestActions Multiple calls to suspend and resume threads with and without attaching to the thread
-//! @SYMTestExpectedResults All tests should pass and the target process should be left unaffected
-//! @SYMTestPriority High
-//! @SYMTestStatus Implemented
-//---------------------------------------------
-void CRunModeAgent::TestSuspendResume()
-	{
-	TInt err;
-
-	test.Next(_L("TestSuspendResume - Suspend\n"));
-
-	test(KErrNone == iServSession.AttachExecutable(iFileName, EFalse));
-
-	err = iServSession.SuspendThread(iThreadID);
-	test(err==KErrNone);
-	err = TestRunCountSame( iRunCountSubscribe, iTimer );
-	test( KErrNone == err );
-	
-	// Resume the thread
-	test.Next(_L("TestSuspendResume - Resume\n"));
-	err = iServSession.ResumeThread(iThreadID);
-	test(err==KErrNone);
-
-	test(KErrNone == iServSession.DetachExecutable(iFileName));
-
-	err = WaitForRunCountChange( iRunCountSubscribe, iTimer );
-	test(KErrNone == err );
-	
-	// check that agent can resume thread which it previously detached from
-	test(KErrNone == iServSession.AttachExecutable(iFileName, EFalse));
-	test(KErrNone == iServSession.SuspendThread(iThreadID));
-	test(KErrNone == iServSession.DetachExecutable(iFileName));
-
-	test(KErrNone == iServSession.AttachExecutable(iFileName, EFalse));
-	err = TestRunCountSame( iRunCountSubscribe, iTimer );
-	test( KErrNone == err );
-	test(KErrNone == iServSession.ResumeThread(iThreadID));
-	test(KErrNone == iServSession.DetachExecutable(iFileName));
-
-	err = WaitForRunCountChange( iRunCountSubscribe, iTimer );
-	test( KErrNone == err );
-	
-	test(KErrNone == iServSession.AttachExecutable(iFileName, EFalse));
-	test(KErrNone == iServSession.SuspendThread(iThreadID));
-	err = TestRunCountSame( iRunCountSubscribe, iTimer );
-	test( KErrNone == err );
-	test(KErrNone == iServSession.DetachExecutable(iFileName));
-	err = TestRunCountSame( iRunCountSubscribe, iTimer );
-	test( KErrNone == err );
-	    
-	test(KErrNone == iServSession.AttachExecutable(iFileName, EFalse));
-	err = TestRunCountSame( iRunCountSubscribe, iTimer );
-	test( KErrNone == err );
-	test(KErrNone == iServSession.ResumeThread(iThreadID));
-	test(KErrNone == iServSession.DetachExecutable(iFileName));
-	
-	err = WaitForRunCountChange( iRunCountSubscribe, iTimer );
-    test( KErrNone == err );
-	}
-
-//---------------------------------------------
-//! @SYMTestCaseID KBase-T-RMDEBUG2-0434
-//! @SYMTestType
-//! @SYMPREQ PREQ1426
-//! @SYMTestCaseDesc Test getting the debug functionality from the driver
-//! @SYMTestActions Get the size and contents of the debug functionality block
-//! @SYMTestExpectedResults All tests should pass and the expected data should appear in the functionality block
-//! @SYMTestPriority High
-//! @SYMTestStatus Implemented
-//---------------------------------------------
-void CRunModeAgent::TestDebugFunctionality()
-	{
-
-	TInt err;
-
-	test.Next(_L("TestDebugFunctionality - GetDebugFunctionalityBufSize\n"));
-
-	TUint32 bufsize = 0;	// Safe default size
-
-	// Get functionality block size
-	err = iServSession.GetDebugFunctionalityBufSize(&bufsize);
-	test(err==KErrNone);
-	test.Next(_L("TestDebugFunctionality - GetDebugFunctionality\n"));
-
-	// Ensure we have a finite buffer size
-	test(bufsize!=0);
-
-	// Allocate space for the functionality data
-	HBufC8* dftext = HBufC8::NewLC(bufsize);
-
-	// create an empty TPtr8 refering to dftext
-	TPtr8 dftextPtr(dftext->Des());
-
-	// Get the functionality block
-	err = iServSession.GetDebugFunctionality(dftextPtr);
-	test(err==KErrNone);
-
-	// Check that the first entry is correct
-	TTagHeader RefHdr =
-	{
-		ETagHeaderIdCore,ECoreLast,
-	};
-
-	// First header passed from rm_debug.ldd
-	TTagHeader* TestHdr = (TTagHeader*)dftextPtr.Ptr();
-
-	// Check
-	test(RefHdr.iTagHdrId==TestHdr->iTagHdrId);
-	// this test might fail if the agent is used with a Debug Security Server different from
-	// the one it was compiled against. So removing it for now.
-	//test(RefHdr.iNumTags==TestHdr->iNumTags);
-
-	// read a value from the data to check it has come through as expected
-	TTagHeader* header = GetTagHdr(dftext->Des(), ETagHeaderIdApiConstants);
-	test(header != NULL);
-	TTag* tag = GetTag(header, EApiConstantsTEventInfoSize);
-	test(tag != NULL);
-	// this test might fail if the agent is used with a Debug Security Server different from
-	// the one it was compiled against. So removing it for now.
-	//test(sizeof(TEventInfo) == tag->iValue);
-
-	// Remove our temporary buffer
-	CleanupStack::PopAndDestroy(dftext);
-	}
-
-//---------------------------------------------
-//! @SYMTestCaseID KBase-T-RMDEBUG2-0435
-//! @SYMTestType
-//! @SYMPREQ PREQ1426
-//! @SYMTestCaseDesc Test setting and clearing consecutive breakpoints
-//! @SYMTestActions Set and clear consecutive breakpoints of all combinations of breakpoint types
-//! @SYMTestExpectedResults All breakpoints should be set and cleared without error
-//! @SYMTestPriority High
-//! @SYMTestStatus Implemented
-//---------------------------------------------
-void CRunModeAgent::TestConsecutiveBreakPoints()
-	{
-	test.Next(_L("TestConsecutiveBreakPoints\n"));
-
-	test(KErrNone == iServSession.SuspendThread(iThreadID));
-
-	// just a temporary structure for storing info about a breakpoint
-	struct TBreakPoint
-		{
-	public:
-		TBreakPoint()
-			:iId(0),
-			iMode((TArchitectureMode)0),
-			iAddress(0)
-			{}
-		TBreakId iId;
-		TArchitectureMode iMode;
-		TUint32 iAddress;
-		inline TInt Size() { return (EArmMode == iMode) ? 4 : 2; }
-		};
-
-	//an address in the target debug thread
-	TUint32 address = (TUint32)(&TestFunction);
-
-	// there are six orders in which three breakpoints can be set, these are looped
-	// through below to check setting and clearing consecutive breakpoints works
-	TUint8 order[6][3] =
-		{
-			{0,1,2},
-			{0,2,1},
-			{1,0,2},
-			{1,2,0},
-			{2,0,1},
-			{2,1,0}
-		};
-
-	// The following code checks that setting and clearing consecutive breakpoints works correctly:
-	// It checks that setting all combinations of three arm and thumb breakpoints succeeds, and check that the
-	// breakpoints can be set in any order, and then cleared in any order
-
-	// the 3 least significant bits of i control whether each of the three breakpoints should be arm or thumb
-	for(TInt i=0; i<8; i++)
-		{
-		// controls the order in which the breakpoints should be set
-		for(TInt j=0; j<6; j++)
-			{
-			// create the three breakpoints and set their modes
-			TBreakPoint bp[3];
-			bp[0].iMode = (i&1) ? EArmMode : EThumbMode;
-			bp[1].iMode = (i&2) ? EArmMode : EThumbMode;
-			bp[2].iMode = (i&4) ? EArmMode : EThumbMode;
-
-			// set the address of each of the breakpoints
-			bp[0].iAddress = address;
-			if(EArmMode == bp[0].iMode)
-				{ // if an arm breakpoint then must be on a four byte boundary
-				bp[0].iAddress = Align4(bp[0].iAddress);
-				}
-			bp[1].iAddress = bp[0].iAddress + bp[0].Size();
-			if(EArmMode == bp[1].iMode)
-				{ // if an arm breakpoint then must be on a four byte boundary
-				bp[1].iAddress = Align4(bp[1].iAddress);
-				}
-			bp[2].iAddress = bp[1].iAddress + bp[1].Size();
-			if(EArmMode == bp[2].iMode)
-				{ // if an arm breakpoint then must be on a four byte boundary
-				bp[2].iAddress = Align4(bp[2].iAddress);
-				}
-			for(TInt k=0; k<6; k++)
-				{
-				// set the three breakpoints in the order defined by j and then clear them in the order defined by k
-				test(KErrNone==iServSession.SetBreak(bp[order[j][0]].iId, iThreadID, bp[order[j][0]].iAddress, bp[order[j][0]].iMode));
-				test(KErrNone==iServSession.SetBreak(bp[order[j][1]].iId, iThreadID, bp[order[j][1]].iAddress, bp[order[j][1]].iMode));
-				test(KErrNone==iServSession.SetBreak(bp[order[j][2]].iId, iThreadID, bp[order[j][2]].iAddress, bp[order[j][2]].iMode));
-				test(KErrNone==iServSession.ClearBreak(bp[order[k][0]].iId));
-				test(KErrNone==iServSession.ClearBreak(bp[order[k][1]].iId));
-				test(KErrNone==iServSession.ClearBreak(bp[order[k][2]].iId));
-				}
-			}
-		}
-
-	// resume the thread
-	test(KErrNone == iServSession.ResumeThread(iThreadID));
-	}
-
-//---------------------------------------------
-//! @SYMTestCaseID KBase-T-RMDEBUG2-0436
-//! @SYMTestType
-//! @SYMPREQ PREQ1426
-//! @SYMTestCaseDesc Test breakpoint functionality
-//! @SYMTestActions Multiple calls to set and clear breakpoints. Checking bad input produces appropriate errors.
-//! @SYMTestExpectedResults All tests should pass and the target debug thread should be left unaffected
-//! @SYMTestPriority High
-//! @SYMTestStatus Implemented
-//---------------------------------------------
-void CRunModeAgent::TestBreakPoints()
-	{
-	TInt err;
-
-	test.Next(_L("TestBreakPoints - Set\n"));
-
-	test(KErrNone == iServSession.AttachExecutable(iFileName, EFalse));
-
-	TestConsecutiveBreakPoints();
-
-	//an address in the target debug thread
-	TUint32 address = (TUint32)(&TestFunction);
-
-	/*
-	 * Ensure that breakpoint operations don't
-	 * affect memory read/write by checking that reads/writes
-	 * in locations containing breakpoints don't change behaviour
-	 * because of the breakpoints.
-	 */
-
-	TUint32 size = SYMBIAN_RMDBG_MEMORYSIZE;
-
-	RBuf8 originalDataBlock;
-	err = originalDataBlock.Create(size);
-	test(err==KErrNone);
-
-	//suspend the thread
-	test(KErrNone == iServSession.SuspendThread(iThreadID));
-
-	err = iServSession.ReadMemory(iThreadID, address, size, originalDataBlock, EAccess32, EEndLE8);
-	test(err==KErrNone);
-
-	// Test data block for comparison
-	RBuf8 testDataBlock;
-	err = testDataBlock.Create(size);
-	test(err==KErrNone);
-
-	/*
-	 * set an arm breakpoint
-	 */
-	test.Next(_L("TestBreakPoints - set an arm breakpoint1"));
-
-	TBreakId armBreakId = 0;
-	err = iServSession.SetBreak(armBreakId, iThreadID, address, EArmMode);
-	test(err == KErrNone);
-
-	// Ensure that memory read is not corrupted
-	test.Next(_L("TestBreakPoints - read mem 2"));
-	err = iServSession.ReadMemory(iThreadID, address, size, testDataBlock, EAccess32, EEndLE8);
-	test(err==KErrNone);
-
-	test (testDataBlock == originalDataBlock);
-
-	/*
-	 * set a thumb breakpoint
-	 */
-	test.Next(_L("TestBreak- set a thumb breakpoint1"));
-	TBreakId thumbBreakId = 0;
-	err = iServSession.SetBreak(thumbBreakId, iThreadID, address+4, EThumbMode);
-	test(err == KErrNone);
-
-	/*
-	 * set a thumb2EE breakpoint
-	 */
-	test.Next(_L("TestBreak- set a thumb2EE breakpoint"));
-
-	TBreakId thumb2EEBreakId = 0;
-	err = iServSession.SetBreak(thumb2EEBreakId, iThreadID, address+8, EThumb2EEMode);
-	test(err == KErrNotSupported);
-
-	/*
-	 * overlapping breakpoint (same address/threadId/mode)
-	 */
-	test.Next(_L("TestBreak- set overlapping breakpoint 1"));
-	TBreakId overlapBreakId = 0;
-	err = iServSession.SetBreak(overlapBreakId, iThreadID, address, EArmMode);
-	test(err == KErrAlreadyExists);
-
-	/*
-	 * overlapping breakpoint (different address/same threadId/different mode)
-	 *
-	 * address - EArmBreakpoint
-	 * address+2 - EThumbBreakpoint
-	 */
-	test.Next(_L("TestBreak- set overlapping breakpoint 2"));
-	TBreakId overlap2BreakId = 0;
-	err = iServSession.SetBreak(overlap2BreakId, iThreadID, address+2, EThumbMode);
-	test(err == KErrAlreadyExists);
-
-	/*
-	 * Un-aligned address (arm)
-	 */
-	test.Next(_L("TestBreak- set Un-aligned address (arm)"));
-	TBreakId armUnalignedBreakId = 0;
-	err = iServSession.SetBreak(armUnalignedBreakId, iThreadID, address+6, EArmMode);
-	test(err == KErrArgument);
-
-	/*
-	 * Un-aligned address (thumb)
-	 */
-	test.Next(_L("TestBreak- set Un-aligned address (thumb)"));
-	TBreakId thumbUnalignedBreakId = 0;
-	err = iServSession.SetBreak(thumbUnalignedBreakId, iThreadID, address+7, EThumbMode);
-	test(err == KErrArgument);
-
-	/*
-	 * Invalid address (arm)
-	 */
-	test.Next(_L("TestBreak- set Invalid address (arm)"));
-	TBreakId armBadAddressBreakId = 0;
-	err = iServSession.SetBreak(armBadAddressBreakId, iThreadID, 0 /* address */, EThumbMode);
-	test(err == KErrBadDescriptor);
-
-	/*
-	 * Different thread, same address. Should fail for the same process, but succeed
-	 * for a different process.
-	 */
-
-	/*
-	 * Invalid thread
-	 */
-	TBreakId invalidThreadBreakId = 0;
-	err = iServSession.SetBreak(invalidThreadBreakId, 0xbabababa, address, EThumbMode);
-	test(err == KErrPermissionDenied);
-
-	// Clear the ARM breakpoint
-	err = iServSession.ClearBreak(armBreakId);
-	test(err == KErrNone);
-
-	// Clear the Thumb breakpoint
-	err = iServSession.ClearBreak(thumbBreakId);
-	test(err == KErrNone);
-
-	// to do : two threads at the same address
-	// to do : two processes at the same address
-
-	// Ensure that memory read is not corrupted after clearing the breakpoints
-	err = iServSession.ReadMemory(iThreadID, address, size, testDataBlock, EAccess32, EEndLE8);
-	test(err==KErrNone);
-
-	test (testDataBlock == originalDataBlock);
-
-	/*
-	 * How fast can we set breakpoints?
-	 *
-	 * Measure the time by setting/clearing breakpoints for 1 second.
-     */
-	TInt nanokernel_tick_period;
-	HAL::Get(HAL::ENanoTickPeriod, nanokernel_tick_period);
-	test (nanokernel_tick_period != 0);
-
-	TInt nkTicksPerSecond = HelpTicksPerSecond();
-
-	TInt breaksPerSecond = 0;
-
-	TUint32 stopTickCount = User::NTickCount() + nkTicksPerSecond;
-
-	while (User::NTickCount() < stopTickCount)
-		{
-		// set the breakpoint
-		TBreakId armBreakId = 0;
-		err = iServSession.SetBreak(armBreakId, iThreadID, address, EArmMode);
-		test(err == KErrNone);
-
-		// Clear the breakpoint
-		err = iServSession.ClearBreak(armBreakId);
-		test(err == KErrNone);
-
-		// Update the count of breakpoints
-		breaksPerSecond++;
-
-		// Gone wrong if we wrap to negative breakpoints (cannot set 2billion/second!)
-		test(breaksPerSecond >0);
-		}
-
-	// Store the results for later
-	iBreakpointsPerSecond = breaksPerSecond;
-
-	/*
-	 * How many breakpoints can we set?
-	 */
-
-	TBool done = EFalse;
-
-	// We assume all the breakpoints id's are issued in ascending order
-	TInt maxBreakPoints = 0;
-
-	// Temporary buffer
-	RArray<TBreakId> breakIdList;
-
-	TUint32 testAddress = address;
-
-	while(!done)
-		{
-		TBreakId breakId = 0;
-
-		// set the breakpoint
-		testAddress += 4;	// ensure the addresses don't overlap
-
-		err = iServSession.SetBreak(breakId, iThreadID, testAddress, EArmMode);
-		test (err == KErrNone || err == KErrOverflow);
-		if (err != KErrNone)
-			{
-			// we've reached the limit of the number of breaks we can set
-			done = ETrue;
-			break;
-			}
-
-		// store the id of this breakpoint
-		breakIdList.Append(breakId);
-
-		// Increase the count of breakpoints
-		maxBreakPoints++;
-		test(maxBreakPoints > 0);
-		}
-
-	// How many breakpoints can we set?
-	iMaxBreakpoints = maxBreakPoints;
-
-	// now clear all those breakpoints again
-	while(breakIdList.Count() != 0)
-		{
-		// Place it into a TBreakId
-		TBreakId id = breakIdList[0];
-
-		err = iServSession.ClearBreak(id);
-		test(err == KErrNone);
-
-		// next id
-		breakIdList.Remove(0);
-		}
-
-	breakIdList.Close();
-
-	// close our temporary buffers
-	originalDataBlock.Close();
-	testDataBlock.Close();
-
-	err = iServSession.ResumeThread(iThreadID);
-	test (err == KErrNone);
-
-	test(KErrNone == iServSession.DetachExecutable(iFileName));
-	}
-
-//---------------------------------------------
-//! @SYMTestCaseID KBase-T-RMDEBUG2-0437
-//! @SYMTestType
-//! @SYMPREQ PREQ1426
-//! @SYMTestCaseDesc Test modifying breakpoints
-//! @SYMTestActions Several calls to modify breakpoints
-//! @SYMTestExpectedResults Valid requests should result in the breakpoints being changed, invalid requests should return errors
-//! @SYMTestPriority High
-//! @SYMTestStatus Implemented
-//---------------------------------------------
-void CRunModeAgent::TestModifyBreak()
-	{
-	test.Next(_L("TestModifyBreak\n"));
-
-	DoTestModifyBreak(ETrue);
-	DoTestModifyBreak(EFalse);
-	}
-
-void CRunModeAgent::DoTestModifyBreak(TBool aThreadSpecific)
-	{
-	test.Printf(_L("DoTestModifyBreak: aThreadSpecific: %d\n"), aThreadSpecific?1:0);
-
-	TInt err;
-
-	RProcess process;
-	TProcessId processId = process.Id();
-	process.Close();
-
-	test(KErrNone == iServSession.AttachExecutable(iFileName, EFalse));
-
-	//suspend the thread
-	test(KErrNone == iServSession.SuspendThread(iThreadID));
-
-	//an address in the target debug thread
-	TUint32 address = (TUint32)(&TestFunction);
-
-	//set an arm mode break point
-	TBreakId armBreakId = 0;
-	err = aThreadSpecific
-		? iServSession.SetBreak(armBreakId, iThreadID, address, EArmMode)
-		: iServSession.SetProcessBreak(armBreakId, processId, address, EArmMode);
-	test(err == KErrNone);
-
-	/*
-	 * Invalid thread
-	 */
-	err = aThreadSpecific
-		? iServSession.ModifyBreak(armBreakId, 0xbabababa, address, EArmMode)
-		: iServSession.ModifyProcessBreak(armBreakId, 0xbabababa, address, EArmMode);
-	test(err == KErrPermissionDenied);
-
-	/*
-	 * Valid address
-	 */
-	err = aThreadSpecific
-		? iServSession.ModifyBreak(armBreakId, iThreadID, address+4, EArmMode)
-		: iServSession.ModifyProcessBreak(armBreakId, processId, address+4, EArmMode);
-	test(err == KErrNone);
-
-	/*
-	 * Invalid address
-	 */
-	err = aThreadSpecific
-		? iServSession.ModifyBreak(armBreakId, iThreadID, 0, EArmMode)
-		: iServSession.ModifyProcessBreak(armBreakId, processId, 0, EArmMode);
-	test(err == KErrBadDescriptor);
-
-	/*
-	 * Thumb mode
-	 */
-	err = aThreadSpecific
-		? iServSession.ModifyBreak(armBreakId, iThreadID, address, EThumbMode)
-		: iServSession.ModifyProcessBreak(armBreakId, processId, address, EThumbMode);
-	test(err == KErrNone);
-
-	/*
-	 * Thumb2EE mode
-	 */
-	err = aThreadSpecific
-		? iServSession.ModifyBreak(armBreakId, iThreadID, address, EThumb2EEMode)
-		: iServSession.ModifyProcessBreak(armBreakId, processId, address, EThumb2EEMode);
-	test(err == KErrNotSupported);
-
-	/*
-	 * Arm mode
-	 */
-	err = aThreadSpecific
-		? iServSession.ModifyBreak(armBreakId, iThreadID, address, EArmMode)
-		: iServSession.ModifyProcessBreak(armBreakId, processId, address, EArmMode);
-	test(err == KErrNone);
-
-	// Finally, clear the breakpoint
-	err = iServSession.ClearBreak(armBreakId);
-	test(err == KErrNone);
-
-	//resume the thread
-	test(KErrNone == iServSession.ResumeThread(iThreadID));
-	test(KErrNone == iServSession.DetachExecutable(iFileName));
-	}
-
-//---------------------------------------------
-//! @SYMTestCaseID KBase-T-RMDEBUG2-0438
-//! @SYMTestType
-//! @SYMPREQ PREQ1426
-//! @SYMTestCaseDesc Test extracting information about breakpoints
-//! @SYMTestActions Several calls to get information about breakpoints
-//! @SYMTestExpectedResults All tests should pass and the target process should be left unaffected
-//! @SYMTestPriority High
-//! @SYMTestStatus Implemented
-//---------------------------------------------
-void CRunModeAgent::TestBreakInfo()
-	{
-	test.Next(_L("TestBreakInfo\n"));
-
-	DoTestBreakInfo(ETrue);
-	DoTestBreakInfo(EFalse);
-	}
-
-void CRunModeAgent::DoTestBreakInfo(TBool aThreadSpecific)
-	{
-	test.Printf(_L("DoTestModifyBreak: aThreadSpecific: %d\n"), aThreadSpecific?1:0);
-
-	TInt err;
-
-	RProcess process;
-	TProcessId processId = process.Id();
-	process.Close();
-
-	//an address in the target debug thread
-	TUint32 address = (TUint32)(&TestFunction);
-
-	test(KErrNone == iServSession.AttachExecutable(iFileName, EFalse));
-
-	//suspend thread
-	test(KErrNone == iServSession.SuspendThread(iThreadID));
-
-	//set an arm mode break point
-	TBreakId armBreakId = 0;
-	err = aThreadSpecific
-		? iServSession.SetBreak(armBreakId, iThreadID, address, EArmMode)
-		: iServSession.SetProcessBreak(armBreakId, processId, address, EArmMode);
-	test(err == KErrNone);
-
-	// Read back the information and check it is correct
-	TThreadId testThreadId = TThreadId(0);
-	TProcessId testProcessId = TProcessId(0);
-	TUint32 testAddress = 0;
-	TArchitectureMode testMode = EArmMode;
-
-	err = aThreadSpecific
-		? iServSession.BreakInfo(armBreakId,testThreadId,testAddress, testMode)
-		: iServSession.ProcessBreakInfo(armBreakId, testProcessId, testAddress, testMode);
-	test (err == KErrNone);
-	test (aThreadSpecific ? (testThreadId == iThreadID) : (testProcessId == processId));
-	test (testAddress == address);
-	test (testMode == EArmMode);
-
-	//change the address
-	TUint32 changeAddress = address + 64;
-	err = aThreadSpecific
-		? iServSession.ModifyBreak(armBreakId, iThreadID, changeAddress,EArmMode)
-		: iServSession.ModifyProcessBreak(armBreakId, processId, changeAddress, EArmMode);
-	test(err == KErrNone);
-
-	// Check the address has changed
-	err = aThreadSpecific
-		? iServSession.BreakInfo(armBreakId,testThreadId,testAddress, testMode)
-		: iServSession.ProcessBreakInfo(armBreakId, testProcessId, testAddress, testMode);
-	test (err == KErrNone);
-	test (testAddress == changeAddress);
-
-	// change the architecture type
-	TArchitectureMode checkMode = EThumbMode;
-	err = aThreadSpecific
-		? iServSession.ModifyBreak(armBreakId, iThreadID, address,checkMode)
-		: iServSession.ModifyProcessBreak(armBreakId, processId, address, checkMode);
-	test (err == KErrNone);
-
-	// Check the mode has changed
-	err = aThreadSpecific
-		? iServSession.BreakInfo(armBreakId,testThreadId,testAddress,testMode)
-		: iServSession.ProcessBreakInfo(armBreakId, testProcessId, testAddress, testMode);
-	test (err == KErrNone);
-	test (testMode == checkMode);
-
-	// clear the breakpoint again
-	err = iServSession.ClearBreak(armBreakId);
-	test (err == KErrNone);
-
-	//resume thread
-	test(KErrNone == iServSession.ResumeThread(iThreadID));
-	test(KErrNone == iServSession.DetachExecutable(iFileName));
-	}
-
-// Needed for the RunToBreak test
-IMPORT_C extern void RMDebug_BranchTst1();
-IMPORT_C extern void RMDebug_BranchTst2();
-
-//---------------------------------------------
-//! @SYMTestCaseID KBase-T-RMDEBUG2-0439
-//! @SYMTestType
-//! @SYMPREQ PREQ1426
-//! @SYMTestCaseDesc Test hitting various types of breakpoints
-//! @SYMTestActions Several calls to register to observe breakpoints and to hit breakpoints of different types
-//! @SYMTestExpectedResults All tests should pass and the target process should be left unaffected
-//! @SYMTestPriority High
-//! @SYMTestStatus Implemented
-//---------------------------------------------
-void CRunModeAgent::TestRunToBreak()
-	{
-	test.Next(_L("TestRunToBreak\n"));
-
-	DoTestRunToBreak(ETrue);
-	DoTestRunToBreak(EFalse);
-	}
-
-void CRunModeAgent::DoTestRunToBreak(TBool aThreadSpecific)
-	{
-	test.Printf(_L("DoTestRunToBreak: aThreadSpecific: %d\n"), aThreadSpecific?1:0);
-
-	TInt err = KErrNone;
-
-	RProcess process;
-	TProcessId processId = process.Id();
-	process.Close();
-
-	test(KErrNone == iServSession.AttachExecutable(iFileName, EFalse));
-	// we should suspend the thread first, then set the breakpoint
-	err = iServSession.SuspendThread(iThreadID);
-	test (err == KErrNone);
-
-	// Try to set the breakpoint
-	TBreakId armBreakId;
-	TUint32 address = (TUint32)(&RMDebug_BranchTst1);
-
-	err = aThreadSpecific
-		? iServSession.SetBreak(armBreakId,iThreadID,address,EArmMode)
-		: iServSession.SetProcessBreak(armBreakId, processId, address, EArmMode);
-	test(err == KErrNone);
-
-	err = aThreadSpecific
-		? iServSession.SetEventAction(iFileName,EEventsBreakPoint, EActionContinue)
-		: iServSession.SetEventAction(iFileName,EEventsProcessBreakPoint, EActionContinue);
-	test (err == KErrNone);
-
-	// Continue the thread
-	err = iServSession.ResumeThread(iThreadID);
-	test (err == KErrNone);
-
-	// wait for the breakpoint to be hit
-	TEventInfo info;
-	static TRequestStatus status;
-
-	TPtr8 infoPtr((TUint8*)&info,0,sizeof(TEventInfo));
-
-	iServSession.GetEvent(iFileName,status,infoPtr);
-
-	// Wait for notification of the breakpoint hit event
-	User::WaitForRequest(status);
-	test(status==KErrNone);
-
-	// info should now be filled with the details
-	test(info.iEventType == (aThreadSpecific ? EEventsBreakPoint : EEventsProcessBreakPoint));
-	test(info.iThreadBreakPointInfo.iRmdArmExcInfo.iR15 == address);
-	test(info.iProcessIdValid);
-	test(info.iThreadIdValid);
-
-	// Not interested in breakpoint events any more
-	err = aThreadSpecific
-		? iServSession.SetEventAction(iFileName,EEventsBreakPoint, EActionIgnore)
-		: iServSession.SetEventAction(iFileName, EEventsProcessBreakPoint, EActionIgnore);
-	test (err == KErrNone);
-
-	// Clear the breakpoint again
-	err = iServSession.ClearBreak(armBreakId);
-	test(err == KErrNone);
-
-	// continue the thread again
-	err = iServSession.ResumeThread(iThreadID);
-	test (err == KErrNone);
-	test(KErrNone == iServSession.DetachExecutable(iFileName));
-	}
-
-//---------------------------------------------
-//! @SYMTestCaseID KBASE-rmdebug2-2704
-//! @SYMTestType
-//! @SYMPREQ PREQ1426
-//! @SYMTestCaseDesc Test breakpoints in a loop
-//! @SYMTestActions Several calls to register to verify breakpoints are stopping at correct address
-//! @SYMTestExpectedResults All tests should pass and the target thread should be left unaffected
-//! @SYMTestPriority High
-//! @SYMTestStatus Implemented
-//---------------------------------------------
-void CRunModeAgent::TestBreakPointsInLoop()
-	{
-	test.Next(_L("TestBreakPointsInLoop\n"));
-
-	DoTestBreakPointsInLoop(ETrue);
-	DoTestBreakPointsInLoop(EFalse);
-	}
-
-void CRunModeAgent::DoTestBreakPointsInLoop(TBool aThreadSpecific)
-	{
-	test.Printf(_L("DoTestBreakPointsInLoop: aThreadSpecific: %d\n"), aThreadSpecific?1:0);
-
-	TInt err = KErrNone;
-	TProcessId processId = RProcess().Id(); 
-
-	test(KErrNone == iServSession.AttachExecutable(iFileName, EFalse));
-	
-	// We should suspend the thread first, then set the breakpoint
-	err = iServSession.SuspendThread(iThreadID);
-	test (err == KErrNone);
-
-	// 2 breakpoints are sufficient to find issues with hitting breakpoints in a loop
-	const TInt numOfBreakPointsInLoop = 2;
-
-	TBreakId armBreakId[numOfBreakPointsInLoop];
-	TUint32 address[numOfBreakPointsInLoop];
-   	
-	TUint32 entryAddress = (TUint32)(&RMDebug_Bkpt_Test_Entry);
-	TBreakId entryArmBreakId;
-
-	// Copy breakpoint address's in array
-	address[0] = (TUint32)(&RMDebug_Bkpt_Test_Loop_Break_1);
-	address[1] = (TUint32)(&RMDebug_Bkpt_Test_Loop_Break_2);
-
-	err = aThreadSpecific
-		? iServSession.SetBreak(entryArmBreakId,iThreadID,entryAddress,EArmMode)
-		: iServSession.SetProcessBreak(entryArmBreakId, processId, entryAddress, EArmMode);
-	test(err == KErrNone);
-
-	// Try to set the breakpoints inside loop
-	for (TInt i = 0; i < numOfBreakPointsInLoop; i++)
-		{
-		err = aThreadSpecific
-			? iServSession.SetBreak(armBreakId[i],iThreadID,address[i],EArmMode)
-			: iServSession.SetProcessBreak(armBreakId[i], processId, address[i], EArmMode);
-		test(err == KErrNone);
-		}
-
-	err = aThreadSpecific
-		? iServSession.SetEventAction(iFileName,EEventsBreakPoint, EActionSuspend)
-		: iServSession.SetEventAction(iFileName,EEventsProcessBreakPoint, EActionSuspend);
-	test (err == KErrNone);
-
-	// Continue the thread
-	err = iServSession.ResumeThread(iThreadID);
-	test (err == KErrNone);
-
-	// Wait for the breakpoint to be hit
-	TEventInfo info;
-	TRequestStatus status;
-
-	TPtr8 infoPtr((TUint8*)&info,0,sizeof(TEventInfo));
-	iServSession.GetEvent(iFileName,status,infoPtr);
-
-	// Wait for notification of breakpoint event
-	User::WaitForRequest(status);
-	test(status==KErrNone);
-
-	// Info should now be filled with the details
-	test(info.iEventType == (aThreadSpecific ? EEventsBreakPoint : EEventsProcessBreakPoint));
-
-	// Have we stopped at the correct breakpoint?
-	test(info.iThreadBreakPointInfo.iRmdArmExcInfo.iR15 == entryAddress);
-	test(info.iProcessIdValid);
-	test(info.iThreadIdValid);
-
-	// Don't require the entry breakpoint anymore
-	err = iServSession.ClearBreak(entryArmBreakId);
-	test(err == KErrNone);
-	
-	// Stress the system by setting loop count to 100
-	const TUint32 loopCount = 100;
-
-	for (TInt i = 0; i < loopCount; i++)
-		{
-		// Continue the thread
-		err = iServSession.ResumeThread(iThreadID);
-		test (err == KErrNone);
-
-		// Wait for the breakpoint to be hit
-		iServSession.GetEvent(iFileName,status,infoPtr);
-		
-		// Wait for notification of the breakpoint hit event
-		User::WaitForRequest(status);
-		test(status==KErrNone);
-		
-		// Info should now be filled with the details
-		test(info.iEventType == (aThreadSpecific ? EEventsBreakPoint : EEventsProcessBreakPoint));
-		
-		// Have we stopped at the correct breakpoint?
-		test(info.iThreadBreakPointInfo.iRmdArmExcInfo.iR15 == address[i%numOfBreakPointsInLoop]);
-		
-		// Check process and thread id too
-		test(info.iProcessIdValid);
-		test(info.iThreadIdValid);
-		}
-
-	// Not interested in breakpoint events any more
-	err = aThreadSpecific
-		? iServSession.SetEventAction(iFileName,EEventsBreakPoint, EActionIgnore)
-		: iServSession.SetEventAction(iFileName, EEventsProcessBreakPoint, EActionIgnore);
-	test (err == KErrNone);
-
-	// Clear breakpoints
-	for (TInt i = 0; i < numOfBreakPointsInLoop; i++)
-		{
-		err = iServSession.ClearBreak(armBreakId[i]);
-		test(err == KErrNone);
-		}
-	
-	// Continue the thread again
-	err = iServSession.ResumeThread(iThreadID);
-	test (err == KErrNone);
-	test(KErrNone == iServSession.DetachExecutable(iFileName));
-	}
-
-//----------------------------------------------------------------------------------------------
-//! @SYMTestCaseID      KBase-T-RMDEBUG2-0440
-//! @SYMTestType
-//! @SYMPREQ            PREQ1426
-//! @SYMTestCaseDesc    Test access to target user-side registers.
-//! @SYMTestActions     Suspends a target thread, and reads/writes target thread register contents
-//!
-//! @SYMTestExpectedResults KErrNone. Should access target registers without problems.
-//! @SYMTestPriority        High
-//! @SYMTestStatus          Implemented
-//----------------------------------------------------------------------------------------------
-
-void CRunModeAgent::TestRegisterAccess()
-	{
-	TInt err;
-
-	test.Next(_L("TestRegisterAccess - Read\n"));
-
-	test(KErrNone == iServSession.AttachExecutable(iFileName, EFalse));
-
-	//suspend the thread to read registers
-	err = iServSession.SuspendThread(iThreadID);
-	test(err==KErrNone);
-
-	//we'll try to read/write registers ERegisterR0 - ERegisterCPSR and ERegisterR13_IRQ
-	//this way should get valid register values back, invalid ones and not supported ones, and it
-	//means that the register IDs are not completely contiguous
-
-	TInt firstRegister = 0;
-	TInt lastRegister = 17;
-	TInt numberOfRegisters = (lastRegister - firstRegister) + 1;
-
-	RBuf8 ids;
-	err = ids.Create(numberOfRegisters * sizeof(TRegisterInfo));
-	test(err == KErrNone);
-
-	for(TInt i=0; i<numberOfRegisters - 1; i++)
-		{
-		TRegisterInfo reg = (TRegisterInfo)((i + firstRegister)<<8);
-		ids.Append(reinterpret_cast<const TUint8*>(&reg), sizeof(TRegisterInfo));
-		}
-
-	TRegisterInfo reg = ERegisterR13Irq;
-	ids.Append(reinterpret_cast<const TUint8*>(&reg), sizeof(TRegisterInfo));
-
-	//create a buffer to store the register values in
-	RBuf8 originalValues;
-	err = originalValues.Create(numberOfRegisters*sizeof(TUint32));
-	test(err == KErrNone);
-
-	//create a buffer to store the register flags in
-	RBuf8 originalFlags;
-	err = originalFlags.Create(numberOfRegisters*sizeof(TUint8));
-	test(err == KErrNone);
-
-	//read register values
-	err = iServSession.ReadRegisters(iThreadID, ids, originalValues, originalFlags);
-	test(err == KErrNone);
-
-	//create a buffer containing data to write into the registers
-	RBuf8 tempValues;
-	err = tempValues.Create(numberOfRegisters*sizeof(TUint32));
-	test(err == KErrNone);
-
-	TUint cpsrId = 16;
-	for(TUint8 i=0; i<numberOfRegisters*sizeof(TUint32); i++)
-		{
-		if(i/sizeof(TUint32) == cpsrId)
-			{
-			//For the CPSR we wish to write data that makes sense - for USR mode we are
-			//allowed change all except the mode, ie. we must stay in usr mode. We try that here
-			//(allowedCPSRValue[4:0] = 10000) thus not changing the mode.
-			TUint32 allowedCPSRValue = 0x50000010;
-			tempValues.Append((TUint8*)&allowedCPSRValue, 4);
-			i += 3;
-			}
-		else
-			{
-			tempValues.Append(&i, 1);
-			}
-		}
-
-	test.Next(_L("TestRegisterAccess - Write\n"));
-
-	//create a buffer to store the register flags in
-	RBuf8 tempWriteFlags;
-	err = tempWriteFlags.Create(numberOfRegisters*sizeof(TUint8));
-	test(err == KErrNone);
-
-	//write the temp data into the registers
-	err = iServSession.WriteRegisters(iThreadID, ids, tempValues, tempWriteFlags);
-	test(err == KErrNone);
-
-	//create another buffer to store the register flags in
-	RBuf8 tempReadFlags;
-	err = tempReadFlags.Create(numberOfRegisters*sizeof(TUint8));
-	test(err == KErrNone);
-
-	RBuf8 tempReadValues;
-	err = tempReadValues.Create(numberOfRegisters*sizeof(TUint32));
-	test(err == KErrNone);
-
-	//read the temp data out again
-	err = iServSession.ReadRegisters(iThreadID, ids, tempReadValues, tempReadFlags);
-	test(err == KErrNone);
-
-	//check values are correct
-	for(TInt i=0; i<numberOfRegisters; i++)
-		{
-		TRegisterFlag writeFlag;
-		err = GetFlag(tempWriteFlags, i, writeFlag);
-		test(err == KErrNone);
-
-		TRegisterFlag readFlag;
-		err = GetFlag(tempReadFlags, i, readFlag);
-		test(err == KErrNone);
-
-		if((writeFlag == EValid) && (readFlag == EValid))
-			{
-			TUint8 offset = i * sizeof(TUint32);
-			for(TUint j = offset; j< offset + sizeof(TUint32); j++)
-				{
-				test(tempValues.Ptr()[j] == tempReadValues.Ptr()[j]);
-				}
-			}
-		}
-
-	//write the original data into the registers
-	err = iServSession.WriteRegisters(iThreadID, ids, originalValues, originalFlags);
-	test(err == KErrNone);
-
-	//read the data out again
-	err = iServSession.ReadRegisters(iThreadID, ids, tempValues, tempReadFlags);
-	test(err == KErrNone);
-
-	//check values are correct
-	for(TInt i=0; i<numberOfRegisters; i++)
-		{
-		TRegisterFlag writeFlag;
-		err = GetFlag(originalFlags, i, writeFlag);
-		test(err == KErrNone);
-
-		TRegisterFlag readFlag;
-		err = GetFlag(tempReadFlags, i, readFlag);
-		test(err == KErrNone);
-
-		if((writeFlag == EValid) && (readFlag == EValid))
-			{
-			TUint8 offset = i * sizeof(TUint32);
-			for(TUint j = offset; j< offset + sizeof(TUint32); j++)
-				{
-				test(tempValues.Ptr()[j] == originalValues.Ptr()[j]);
-				}
-			}
-		}
-
-	test.Next(_L("TestRegisterAccess - Invalid data\n"));
-
-	//create a buffer of max size 1
-	RBuf8 emptyBuffer;
-	emptyBuffer.Create(1);
-
-	//test register IDs buffer not being a multiple of sizeof(TRegisterInfo)
-	err = iServSession.ReadRegisters(iThreadID, emptyBuffer, tempValues, tempReadFlags);
-	test(err == KErrArgument);
-
-	//test register values buffer not being a multiple of sizeof(TUint32)
-	err = iServSession.ReadRegisters(iThreadID, ids, emptyBuffer, tempReadFlags);
-	test(err == KErrArgument);
-
-	//test flags buffer being representing different number of registers from other two
-	err = iServSession.ReadRegisters(iThreadID, ids, tempValues, emptyBuffer);
-	test(err == KErrArgument);
-
-	//set max length to 0
-	emptyBuffer.ReAlloc(0);
-
-	//test ids buffer being of 0 max length
-	err = iServSession.ReadRegisters(iThreadID, emptyBuffer, tempValues, tempReadFlags);
-	test(err == KErrArgument);
-
-	//do cleanup
-	emptyBuffer.Close();
-	tempValues.Close();
-	tempWriteFlags.Close();
-	tempReadFlags.Close();
-	tempReadValues.Close();
-
-	test.Next(_L("TestRegisterAccess - Setting PC value\n"));
-
-	//create buffer containing PC register ID
-	RBuf8 pcId;
-	err = pcId.Create(sizeof(TRegisterInfo));
-	test(err == KErrNone);
-	TRegisterInfo reg1 = (TRegisterInfo)0x00000f00;
-	pcId.Append(reinterpret_cast<const TUint8*>(&reg1), sizeof(TRegisterInfo));
-
-	//create buffer containing desired PC value
-	RBuf8 pcValue;
-	err = pcValue.Create(sizeof(TUint32));
-	test(err == KErrNone);
-	TUint32 address = (TUint32)(&TestFunction);
-	pcValue.Append(reinterpret_cast<const TUint8*>(&address), sizeof(TUint32));
-
-	//craete buffer for PC flag value
-	RBuf8 pcFlag;
-	err = pcFlag.Create(sizeof(TUint8));
-
-	//write the new PC value
-	err = iServSession.WriteRegisters(iThreadID, pcId, pcValue, pcFlag);
-	test(err==KErrNone);
-
-	//get the flag and check the PC value was written ok
-	TRegisterFlag flag = ENotSupported;
-	err = GetFlag(pcFlag, 0, flag);
-	test(err==KErrNone);
-	test( flag == EValid);
-	if(flag == EValid)
-		{
-		/* The PC value was changed to execute the function TestFunction.
-		* TestFunction changes the value of TestData to a given value and 
-		* then calls RMDebug_BranchTst1.
-		* We place a breakpoint on RMDebug_BranchTst1 so that to we are able 
-		* to test the value of TestData.
-		*/
-
-		test(KErrNone == iServSession.SetEventAction(iFileName,EEventsBreakPoint, EActionSuspend));
-		TBreakId armBreakId;
-		TUint32 address = (TUint32)(&RMDebug_BranchTst1);
-		test(KErrNone == iServSession.SetBreak(armBreakId,iThreadID,address,EArmMode));
-
-		// Continue the thread
-		test(KErrNone == iServSession.ResumeThread(iThreadID));
-
-		// wait for the breakpoint to be hit
-		TEventInfo info;
-		static TRequestStatus status;
-
-		TPtr8 infoPtr((TUint8*)&info,0,sizeof(TEventInfo));
-		iServSession.GetEvent(iFileName,status,infoPtr);
-
-		// Wait for notification of the breakpoint hit event
-		User::WaitForRequest(status);
-		test(status==KErrNone);
-
-		// info should now be filled with the details
-		test(info.iEventType == EEventsBreakPoint);
-		test(info.iThreadBreakPointInfo.iRmdArmExcInfo.iR15 == address);
-		test(info.iProcessIdValid);
-		test(info.iThreadIdValid);
-
-		test(KErrNone == iServSession.ClearBreak(armBreakId));
-
-		// Finally test the value
-		test(TestData == 0xffeeddcc);
-		}
-
-	//Make sure we cannot change the CPSR
-	test.Next(_L("Verifying we cannot change the CPSR mode from USR Mode"));
-
-	TUint32 disallowedCpsr = 0x50000013;
-
-	RBuf8 cpsrRegId;
-	err = cpsrRegId.Create(sizeof(TUint32));
-	test(err == KErrNone);
-
-	TRegisterInfo cpsr = (TRegisterInfo)((cpsrId + firstRegister)<<8);
-	cpsrRegId.Append(reinterpret_cast<const TUint8*>(&cpsr), sizeof(TRegisterInfo));
-
-	RBuf8 cpsrRegFlags;
-	err = cpsrRegFlags.Create(sizeof(TUint8));
-	test(err == KErrNone);
-
-	RBuf8 cpsrVal;
-	err = cpsrVal.Create(sizeof(TUint32));
-	test(err == KErrNone);
-
-	cpsrVal.Append((TUint8*)&disallowedCpsr, 4);
-
-	//attempt to write disallowed CPSR in
-	err = iServSession.WriteRegisters(iThreadID, cpsrRegId, cpsrVal, cpsrRegFlags);
-	test(err == KErrNone);
-
-	RBuf8 cpsrReadVal;
-	err = cpsrReadVal.Create(sizeof(TUint32));
-	test(err == KErrNone);
-
-	//Read back the CPSR
-	err = iServSession.ReadRegisters(iThreadID, cpsrRegId, cpsrReadVal, cpsrRegFlags);
-	test(err == KErrNone);
-
-	//Make sure we havent switched modes ie. its not what we wrote
-	TUint32* readVal = (TUint32*)cpsrReadVal.Ptr();
-	test(*readVal != disallowedCpsr);
-
-	cpsrRegId.Close();
-	cpsrRegFlags.Close();
-	cpsrVal.Close();
-	cpsrReadVal.Close();
-
-	//write the original values back into here
-	err = iServSession.WriteRegisters(iThreadID, ids, originalValues, originalFlags);
-	test(err == KErrNone);
-	
-	test(KErrNone == SwitchTestFunction(EDefaultFunction));
-
-	// Resume the thread
-	err = iServSession.ResumeThread(iThreadID);
-	test(err==KErrNone);
-
-	test(KErrNone == iServSession.DetachExecutable(iFileName));
-
-	//do cleanup
-	pcId.Close();
-	pcValue.Close();
-	pcFlag.Close();
-	ids.Close();
-	originalValues.Close();
-	originalFlags.Close();
-	}
-
-//----------------------------------------------------------------------------------------------
-//! @SYMTestCaseID      KBase-T-RMDEBUG2-0441
-//! @SYMTestType
-//! @SYMPREQ            PREQ1426
-//! @SYMTestCaseDesc    Test registration/de-registration of debug interest in target exe with the Debug Security Server
-//! @SYMTestActions     As per description
-//!
-//! @SYMTestExpectedResults KErrNone.
-//! @SYMTestPriority        High
-//! @SYMTestStatus          Implemented
-//----------------------------------------------------------------------------------------------
-
-void CRunModeAgent::TestAttachExecutable()
-	{
-
-	test.Next(_L("TestAttachExecutable - Attach\n"));
-
-	//attach to process passively
-	test(KErrNone == iServSession.AttachExecutable(iFileName, ETrue));
-
-	//make a thread id for a non-existent thread
-	TThreadId threadId(0x12345678);
-
-	//get a handle to the target thread
-	RThread targetThread;
-	TInt err = targetThread.Open(threadId);
-	test(err != KErrNone);
-
-	//not registered for this thread's process (as it doesn't exist)
-	//so should fail security check
-	err = iServSession.ResumeThread(threadId);
-	test(err==KErrPermissionDenied || err==KErrNotFound); // newer DSS returns the more-descriptive KErrNotFound here
-
-	//try to attach to the same process (and fail)
-	test(KErrAlreadyExists == iServSession.AttachExecutable(iFileName, EFalse));
-
-	test.Next(_L("TestAttachExecutable - Detach\n"));
-
-	//detach from process
-	test(KErrNone == iServSession.DetachExecutable(iFileName));
-
-	//attach non-passively
-	test(KErrNone == iServSession.AttachExecutable(iFileName, EFalse));
-
-	//not registered for this thread's process (as it doesn't exist)
-	//so should fail security check
-	err = iServSession.ResumeThread(0x12345678);
-	test(err==KErrPermissionDenied || err==KErrNotFound); // newer DSS returns the more-descriptive KErrNotFound here
-	test(KErrNone == iServSession.DetachExecutable(iFileName));
-	}
-
-//----------------------------------------------------------------------------------------------
-//! @SYMTestCaseID      KBase-T-RMDEBUG2-0442
-//! @SYMTestType
-//! @SYMPREQ            PREQ1426
-//! @SYMTestCaseDesc    Tests single-stepping target threads.
-//! @SYMTestActions     Steps target thread assembly level instructions, mainly branch/change PC
-//!
-//! @SYMTestExpectedResults KErrNone.
-//! @SYMTestPriority        High
-//! @SYMTestStatus          Implemented
-//----------------------------------------------------------------------------------------------
-
-void CRunModeAgent::TestStep()
-	{
-	test.Next(_L("TestStep\n"));
-
-	DoTestStep(EFalse);
-	DoTestStep(ETrue);
-	}
-
-void CRunModeAgent::DoTestStep(TBool aThreadSpecific)
-	{
-	test.Printf(_L("DoTestStep: aThreadSpecific: %d\n"), aThreadSpecific?1:0);
-
-	TInt err = KErrNone;
-
-	RProcess process;
-	TProcessId processId = process.Id();
-	process.Close();
-
-	test(KErrNone == iServSession.AttachExecutable(iFileName, EFalse));
-	//set the target thread to execute the stepping functions
-	test(KErrNone == SwitchTestFunction(EStepFunction, EFalse));
-
-	
-	err = iServSession.SetEventAction(iFileName,EEventsBreakPoint, EActionContinue);
-	test (err == KErrNone);
-
-	if(!aThreadSpecific)
-		{
-		err = iServSession.SetEventAction(iFileName, EEventsProcessBreakPoint, EActionContinue);
-		test (err == KErrNone);
-		}
-
-	TUint32	startAddress;
-	TUint32	endAddress;
-
-	/*
-	 * RMDebug_StepTest_Non_PC_Modifying
-	 */
-	test.Next(_L("TestStep - Non-PC modifying\n"));
-
-	startAddress = (TUint32)(&RMDebug_StepTest_Non_PC_Modifying);
-
-	endAddress = (TUint32)(&RMDebug_StepTest_Non_PC_Modifying_OK);
-
-	err = aThreadSpecific
-		? HelpTestStep(iThreadID,startAddress,endAddress,EArmMode,1)
-		: HelpTestStep(iThreadID,startAddress,endAddress,EArmMode,1, EFalse, processId);
-	test(err==KErrNone);
-
-	/*
-	 * RMDebug_StepTest_Branch
-	 */
-	test.Next(_L("TestStep - Branch\n"));
-
-	startAddress = (TUint32)(&RMDebug_StepTest_Branch);
-
-	endAddress = (TUint32)(&RMDebug_StepTest_Branch_1);
-
-	err = aThreadSpecific
-		? HelpTestStep(iThreadID,startAddress,endAddress,EArmMode,1)
-		: HelpTestStep(iThreadID,startAddress,endAddress,EArmMode,1, EFalse, processId);
-	test(err==KErrNone);
-
-	/*
-	 * RMDebug_StepTest_Branch_And_Link
-	 */
-	test.Next(_L("TestStep - Branch_And_Link\n"));
-
-	startAddress = (TUint32)(&RMDebug_StepTest_Branch_And_Link_1);
-
-	endAddress = (TUint32)(&RMDebug_StepTest_Branch_And_Link_2);
-
-	err = aThreadSpecific
-		? HelpTestStep(iThreadID,startAddress,endAddress,EArmMode,1)
-		: HelpTestStep(iThreadID,startAddress,endAddress,EArmMode,1, EFalse, processId);
-	test(err==KErrNone);
-
-	/*
-	 * RMDebug_StepTest_MOV_PC
-	 */
-	test.Next(_L("TestStep - MOV PC,X\n"));
-
-	startAddress = (TUint32)(&RMDebug_StepTest_MOV_PC_1);
-
-	endAddress = (TUint32)(&RMDebug_StepTest_MOV_PC_2);
-
-	err = aThreadSpecific
-		? HelpTestStep(iThreadID,startAddress,endAddress,EArmMode,1)
-		: HelpTestStep(iThreadID,startAddress,endAddress,EArmMode,1, EFalse, processId);
-	test(err==KErrNone);
-
-	/*
-	 * RMDebug_StepTest_LDR_PC
-	 */
-	test.Next(_L("TestStep - LDR PC\n"));
-
-	startAddress = (TUint32)(&RMDebug_StepTest_LDR_PC);
-
-	endAddress = (TUint32)(&RMDebug_StepTest_LDR_PC_1);
-
-	err = aThreadSpecific
-		? HelpTestStep(iThreadID,startAddress,endAddress,EArmMode,1)
-		: HelpTestStep(iThreadID,startAddress,endAddress,EArmMode,1, EFalse, processId);
-	test(err==KErrNone);
-
-// thumb and interworking tests are not supported on armv4
-#ifdef __MARM_ARMV5__
-
-	/*
-	 * RMDebug_StepTest_Thumb_Non_PC_Modifying
-	 */
-	test.Next(_L("TestStep - Thumb Non PC-Modifying\n"));
-
-	startAddress = (TUint32)(&RMDebug_StepTest_Thumb_Non_PC_Modifying_1);
-
-	endAddress = (TUint32)(&RMDebug_StepTest_Thumb_Non_PC_Modifying_2);
-
-	err = aThreadSpecific
-		? HelpTestStep(iThreadID,startAddress,endAddress,EThumbMode,1)
-		: HelpTestStep(iThreadID,startAddress,endAddress,EThumbMode,1, EFalse, processId);
-	test(err==KErrNone);
-
-	/*
-	 * RMDebug_StepTest_Thumb_Branch
-	 */
-	test.Next(_L("TestStep - Thumb Branch\n"));
-
-	startAddress = (TUint32)(&RMDebug_StepTest_Thumb_Branch_1);
-
-	endAddress = (TUint32)(&RMDebug_StepTest_Thumb_Branch_2);
-
-	err = aThreadSpecific
-		? HelpTestStep(iThreadID,startAddress,endAddress,EThumbMode,1)
-		: HelpTestStep(iThreadID,startAddress,endAddress,EThumbMode,1, EFalse, processId);
-	test(err==KErrNone);
-
-	/*
-	 * RMDebug_StepTest_Thumb_Branch_And_Link
-	 */
-	test.Next(_L("TestStep - Thumb Branch_And_Link\n"));
-
-	startAddress = (TUint32)(&RMDebug_StepTest_Thumb_Branch_And_Link_2);
-
-	endAddress = (TUint32)(&RMDebug_StepTest_Thumb_Branch_And_Link_3);
-
-	TInt muid=0;
-    test(HAL::Get(HAL::EMachineUid, muid)==KErrNone);
-
-	// check if running on ARMv7 core
-	if(muid==HAL::EMachineUid_OmapH6 || muid==HAL::EMachineUid_OmapZoom || muid==HAL::EMachineUid_EmuBoard)
-        {
-        // Note: ARMv7 treats BL instructions as single 32-bit instructions
-        err = aThreadSpecific
-		? HelpTestStep(iThreadID,startAddress,endAddress,EThumbMode,1)
-		: HelpTestStep(iThreadID,startAddress,endAddress,EThumbMode,1, EFalse, processId);
-        }
-    else
-	    {
-        // Note: Due to the fact that the stepper treats BL instructions
-		// as two instructions (as the hardware does), then we must step
-		// the first half instruction first)
-
-		err = aThreadSpecific
-		? HelpTestStep(iThreadID,startAddress,startAddress+2,EThumbMode,1)
-		: HelpTestStep(iThreadID,startAddress,startAddress+2,EThumbMode,1, EFalse, processId);
-		test(err==KErrNone);
-
-	// Now we actually do the BL
-	err = aThreadSpecific
-		? HelpTestStep(iThreadID,startAddress+2,endAddress,EThumbMode,1)
-		: HelpTestStep(iThreadID,startAddress+2,endAddress,EThumbMode,1, EFalse, processId);
-        }
-	test(err==KErrNone);
-
-	/*
-	 * RMDebug_StepTest_Thumb_Back_Branch_And_Link
-	 */
-	test.Next(_L("TestStep - Thumb Back_Branch_And_Link\n"));
-
-	startAddress = (TUint32)(&RMDebug_StepTest_Thumb_Back_Branch_And_Link_2);
-
-	endAddress = (TUint32)(&RMDebug_StepTest_Thumb_Back_Branch_And_Link_3);
-
-	// check if running on ARMv7 core
-	if(muid==HAL::EMachineUid_OmapH6 || muid==HAL::EMachineUid_OmapZoom || muid==HAL::EMachineUid_EmuBoard)
-		{
-		// Note: ARMv7 treats BL instructions as single 32-bit instructions
-		err = aThreadSpecific
-			? HelpTestStep(iThreadID,startAddress,endAddress,EThumbMode,1)
-			: HelpTestStep(iThreadID,startAddress,endAddress,EThumbMode,1, EFalse, processId);
-		}
-	else
-		{
-		// Note: Due to the fact that the stepper treats BL instructions
-		// as two instructions (as the hardware does), then we must step
-		// the first half instruction first)
-
-		err = aThreadSpecific
-	   		? HelpTestStep(iThreadID,startAddress,startAddress+2,EThumbMode,1)
-			: HelpTestStep(iThreadID,startAddress,startAddress+2,EThumbMode,1, EFalse, processId);
-		test(err==KErrNone);
-
-	   	// Now we actually do the BL
-		err = aThreadSpecific
-   			? HelpTestStep(iThreadID,startAddress+2,endAddress,EThumbMode,1)
-			: HelpTestStep(iThreadID,startAddress+2,endAddress,EThumbMode,1, EFalse, processId);
-		}
-	test(err==KErrNone);
-
-	/*
-	 * RMDebug_StepTest_Thumb_AddPC
-	 */
-	test.Next(_L("TestStep - Thumb ADD PC, PC, R0\n"));
-
-	startAddress = (TUint32)(&RMDebug_StepTest_Thumb_AddPC_2);
-
-	endAddress = (TUint32)(&RMDebug_StepTest_Thumb_AddPC_3);
-
-	err = aThreadSpecific
-		? HelpTestStep(iThreadID,startAddress,endAddress,EThumbMode,1)
-		: HelpTestStep(iThreadID,startAddress,endAddress,EThumbMode,1, EFalse, processId);
-	test(err==KErrNone);
-
-	/*
-	 * RMDebug_StepTest_Interwork ARM to Thumb
-	 */
-	test.Next(_L("TestStep - Interworking ARM to Thumb - BLX \n"));
-
-	startAddress = (TUint32)(&RMDebug_StepTest_Interwork_1);
-
-	endAddress = (TUint32)(&RMDebug_StepTest_Interwork_2);
-
-	err = aThreadSpecific // nb initial breakpoint in ARM code
-		? HelpTestStep(iThreadID,startAddress,endAddress,EArmMode,1)
-		: HelpTestStep(iThreadID,startAddress,endAddress,EArmMode,1, EFalse, processId);
-
-	test(err==KErrNone);
-
-	/*
-	 * RMDebug_StepTest_Interwork Thumb to ARM
-	 */
-	test.Next(_L("TestStep - Interworking Thumb to ARM - BLX\n"));
-
-	startAddress = (TUint32)(&RMDebug_StepTest_Interwork_2);
-
-	endAddress = (TUint32)(&RMDebug_StepTest_Interwork_3);
-
-	// check if running on ARMv7 core
-	if(muid==HAL::EMachineUid_OmapH6 || muid==HAL::EMachineUid_OmapZoom || muid==HAL::EMachineUid_EmuBoard)
-        {
-        // ARMv7 treats BLX instructions as single 32-bit instructions
-        err = aThreadSpecific
-		? HelpTestStep(iThreadID,startAddress,endAddress,EThumbMode,1)
-		: HelpTestStep(iThreadID,startAddress,endAddress,EThumbMode,1, EFalse, processId);
-        }
-    else
-        {
-    	// Stepper treats this as a two-stage instruction (just like the hardware)
-	err = aThreadSpecific
-		? HelpTestStep(iThreadID,startAddress,startAddress+2,EThumbMode,1)
-		: HelpTestStep(iThreadID,startAddress,startAddress+2,EThumbMode,1, EFalse, processId);
-	test(err == KErrNone);
-
-	err = aThreadSpecific
-		? HelpTestStep(iThreadID,startAddress+2,endAddress,EThumbMode,1)
-		: HelpTestStep(iThreadID,startAddress+2,endAddress,EThumbMode,1, EFalse, processId);
-        }
-	test(err == KErrNone);
-
-#endif // __MARM_ARMV5__
-
-	/*
-	 * Test multiple-step of ARM code
-	 */
-	test.Next(_L("TestStep - ARM Multiple instruction step\n"));
-
-	startAddress = (TUint32)(&RMDebug_StepTest_ARM_Step_Multiple);
-
-	endAddress = (TUint32)(&RMDebug_StepTest_ARM_Step_Multiple_1);
-
-	err = aThreadSpecific
-		? HelpTestStep(iThreadID,startAddress,endAddress,EArmMode,5)
-		: HelpTestStep(iThreadID,startAddress,endAddress,EArmMode,5, EFalse, processId);
-	test(err == KErrNone);
-	// stepping performance
-	test.Next(_L("TestStep - Steps per second\n"));
-
-	// run until we reach RMDebug_StepTest_Count_1
-	TBreakId stepBreakId;
-	startAddress = (TUint32)(&RMDebug_StepTest_Count_1);
-	endAddress = (TUint32)(&RMDebug_StepTest_Count_2);
-
-	err = aThreadSpecific
-		? HelpTestStepSetBreak(stepBreakId,iThreadID,startAddress,EArmMode)
-		: HelpTestStepSetBreak(stepBreakId,iThreadID,startAddress,EArmMode,EFalse,processId);
-	test (err == KErrNone);
-
-	// wait until we hit the breakpoint
-	TEventInfo info;
-	err = HelpTestStepWaitForBreak(iFileName,info);
-	test (err == KErrNone);
-
-	// Now clear the breakpoint
-	err = iServSession.ClearBreak(stepBreakId);
-	test(err == KErrNone);
-
-	if(aThreadSpecific)
-		{
-		// now step the code
-		TInt stepsPerSecond = 0;
-
-		TUint32 stopTickCount = User::NTickCount() + HelpTicksPerSecond();
-
-		while (User::NTickCount() < stopTickCount)
-			{
-			err = iServSession.Step(iThreadID,1);
-			test (err == KErrNone);
-
-			// we need to wait now until the step completes before asking for the next step
-				{
-				TEventInfo info;
-				static TRequestStatus status;
-
-				TPtr8 infoPtr((TUint8*)&info,0,sizeof(TEventInfo));
-
-				iServSession.GetEvent(iFileName,status,infoPtr);
-
-				// Wait for notification of the breakpoint hit event
-				User::WaitForRequest(status);
-				test(status==KErrNone);
-				}
-
-			// Update the count of steps
-			stepsPerSecond += 1;
-
-			// Gone wrong if we do too many
-			test(stepsPerSecond < 10000);
-			}
-
-		iStepsPerSecond = stepsPerSecond;
-		test(iStepsPerSecond != 0);
-		}
-
-	// finally resume the thread
-	err = iServSession.ResumeThread(iThreadID);
-	test (err == KErrNone);
-
-	err = iServSession.SetEventAction(iFileName,EEventsBreakPoint, EActionIgnore);
-	test (err == KErrNone);
-
-	if(!aThreadSpecific)
-		{
-		err = iServSession.SetEventAction(iFileName, EEventsProcessBreakPoint, EActionIgnore);
-		test (err == KErrNone);
-		}
-
-	test(KErrNone == iServSession.DetachExecutable(iFileName));
-	}
-
-//----------------------------------------------------------------------------------------------
-//! @SYMTestCaseID      KBase-T-RMDEBUG2-0443
-//! @SYMTestType
-//! @SYMPREQ            PREQ1426
-//! @SYMTestCaseDesc    Tests registration and occurrence of target thread event (in this case panic)
-//! @SYMTestActions     Registers for a panic in the target thread, causes it, and catches the panic notification.
-//!
-//! @SYMTestExpectedResults KErrNone.
-//! @SYMTestPriority        High
-//! @SYMTestStatus          Implemented
-//----------------------------------------------------------------------------------------------
-
-void CRunModeAgent::TestEvents()
-	{
-	TInt err = KErrNone;
-
-	test.Next(_L("TestEvents\n"));
-
-	TInt panicReason = 12345;
-
-	test.Printf(_L("Thread t_rmdebug.exe::DebugThread should panic with reason %d.\n"), panicReason);
-
-	//attach non-passively
-	test(KErrNone == iServSession.AttachExecutable(iFileName, EFalse));
-
-	RThread threadToPanic;
-	test(KErrNone == StartDebugThread(threadToPanic, _L("EventsThread")));
-	TThreadId threadToPanicId = threadToPanic.Id();
-	TEventInfo info;
-
-	// Set things up to wait for a thread kill event
-	err = iServSession.SetEventAction(iFileName, EEventsKillThread, EActionContinue);
-	test(err==KErrNone);
-
-	// Wait for an event to occur in this process - nothing should have happened yet.
-	static TRequestStatus status;
-
-	TPtr8 infoPtr((TUint8*)&info,0,sizeof(TEventInfo));
-
-	iServSession.GetEvent(iFileName,status,infoPtr);
-
-	// Test Request cancellation
-	err = iServSession.CancelGetEvent(iFileName);
-	test (err==KErrNone);
-
-	// Again wait for an event to occur in our process - we will provoke the
-	// thread kill event by panic'ing the test thread.
-	iServSession.GetEvent(iFileName,status,infoPtr);
-
-	// Panic the debug thread to cause a thread kill event
-	threadToPanic.Panic(_L("t_rmdebug panic thread test"), panicReason);
-
-	// Wait for notification of the Thread Kill event
-	User::WaitForRequest(status);
-	test(status==KErrNone);
-
-	// Check we are really recieving information about the panic
-	test(info.iProcessIdValid);
-	test(info.iThreadIdValid);
-	test(info.iProcessId==RProcess().Id());
-	test(info.iThreadId==threadToPanicId);
-	test(info.iEventType==EEventsKillThread);
-	test(info.iThreadKillInfo.iExitType==EExitPanic);
-
-	// Ignore other panic events
-	err = iServSession.SetEventAction(iFileName, EEventsKillThread, EActionIgnore);
-	test(err==KErrNone);
-
-	test(KErrNone == iServSession.DetachExecutable(iFileName));
-	}
-
-//----------------------------------------------------------------------------------------------
-//! @SYMTestCaseID      KBase-T-RMDEBUG2-0444
-//! @SYMTestType
-//! @SYMPREQ            PREQ1426
-//! @SYMTestCaseDesc    Tests registration and occurence of target thread events in separate process.
-//! @SYMTestActions     Registers for a hardware exception and kill thread events, and receives them.
-//!
-//! @SYMTestExpectedResults KErrNone.
-//! @SYMTestPriority        High
-//! @SYMTestStatus          Implemented
-//----------------------------------------------------------------------------------------------
-void CRunModeAgent::TestEventsForExternalProcess()
-	{
-	test.Next(_L("TestEventsForExternalProcess\n"));
-
-	for(TInt main=0; main<3; main++)
-		{
-		for(TInt extra=0; extra<3; extra++)
-			{
-			TestEventsWithExtraThreads((TKernelEventAction)main, (TKernelEventAction)extra, 0);
-			TestEventsWithExtraThreads((TKernelEventAction)main, (TKernelEventAction)extra, 2);
-			}
-		}
-	}
-
-void CRunModeAgent::TestEventsWithExtraThreads(TKernelEventAction aActionMain, TKernelEventAction aActionExtra, TUint32 aExtraThreads)
-	{
-	const TInt KNumberOfTypes = 8;
-	struct TEventStruct
-		{
-		public:
-		TDebugFunctionType iDebugFunctionType;
-		TEventType iEventType;
-		};
-
-	TEventStruct type[KNumberOfTypes] =
-		{
-			{EStackOverflowFunction, EEventsHwExc},
-			{EUserPanicFunction, EEventsKillThread},
-			{EPrefetchAbortFunction, EEventsHwExc},
-			{EDataAbortFunction, EEventsHwExc},
-			{EUndefInstructionFunction, EEventsHwExc},
-			{EDataReadErrorFunction, EEventsHwExc},
-			{EDataWriteErrorFunction, EEventsHwExc},
-			{EUserExceptionFunction, EEventsSwExc},
-		};
-
-	for(TInt j=0; j<KNumberOfTypes; j++)
-		{
-		if( gUseDelay ) User::After(500000);
-
-		RDebug::Printf("CRunModeAgent::TestEventsWithExtraThreads type: %d, main action: %d, extra action: %d, extraThreads: %d", 
-			j, (TUint32)aActionMain, (TUint32)aActionExtra, aExtraThreads);
-
-		// do this check as it seems to hard to do these cases with the current set up
-		if(EEventsKillThread == type[j].iEventType)
-			{
-			if(EActionSuspend != aActionMain)
-				{
-				if(aActionMain != aActionExtra)
-					{
-					return;
-					}
-				}
-			}
-		// attach to KRMDebugTestApplication
-		test(KErrNone == iServSession.AttachExecutable(KRMDebugTestApplication, EFalse));
-
-		// Set things up to wait for the expected exception in KRMDebugTestApplication
-		test(KErrNone == iServSession.SetEventAction(KRMDebugTestApplication, type[j].iEventType, aActionMain));
-
-		if(EActionSuspend != aActionMain)
-			{
-			test(KErrNone == iServSession.SetEventAction(KRMDebugTestApplication, EEventsKillThread, aActionExtra));
-			}
-
-		// declare a TRequestStatus object for asynchronous calls
-		TRequestStatus status;
-
-		TEventInfo info;
-		TPtr8 infoBuffer = TPtr8((TUint8*)&info,0,sizeof(TEventInfo));
-		if(EActionIgnore != aActionMain)
-			{
-			iServSession.GetEvent(KRMDebugTestApplication(), status, infoBuffer);
-			}
-
-		// launch the target process to trigger the expected exception
-		RProcess targetProcess;
-		test(KErrNone == LaunchProcess(targetProcess, KRMDebugTestApplication(), type[j].iDebugFunctionType, 0, aExtraThreads));
-		TProcessId processId(targetProcess.Id());
-		targetProcess.Close();
-
-		if(EActionIgnore != aActionMain)
-			{
-			// wait for notification of the exception
-			User::WaitForRequest(status);
-			test(KErrNone == status.Int());
-
-			// check that this is the event we were expecting
-			test(info.iProcessIdValid);
-			test(info.iThreadIdValid);
-			test(info.iProcessId==processId);
-			test(info.iEventType==type[j].iEventType);
-			}
-
-		if(EActionSuspend == aActionMain)
-			{
-			//RDebug::Printf("CRunModeAgent::TestEventsWithExtraThreads EActionSuspend == aActionMain, j=%d", j);
-			// read the thread list, partly to check the call works, and partly to check the thread still exists
-			test(ThreadExistsForProcess(info.iThreadId, info.iProcessId));
-
-			// register to catch all the thread kills which will occur
-			test(KErrNone == iServSession.SetEventAction(KRMDebugTestApplication, EEventsKillThread, aActionExtra));
-			// we specified EActionSuspend earlier so need to call resume on this thread
-			test(KErrNone == iServSession.ResumeThread(info.iThreadId));
-			}
-
-		// find out how many threads there are in the process and catch all the thread kill events,
-		// the number of kill thread events should correspond to the number of extra threads launched,
-		// plus one if the main thread panicked with a Sw/Hw exception
-		if(EActionIgnore != aActionExtra)
-			{
-			TInt dyingThreads = aExtraThreads + ( (type[j].iEventType != EEventsKillThread) ? 1 : 0);
-			for(TInt k=0; k<dyingThreads; k++)
-				{
-				//RDebug::Printf("CRunModeAgent::TestEventsWithExtraThreads dyingThreads, k=%d, j=%d", k,j);
-				iServSession.GetEvent(KRMDebugTestApplication(), status, infoBuffer);
-
-				// wait for notification of the kill thread
-				User::WaitForRequest(status);
-				test(KErrNone == status.Int());
-
-				// check that this is the event we were expecting
-				test(info.iProcessIdValid);
-				test(info.iThreadIdValid);
-				test(info.iProcessId==processId);
-				test(info.iEventType==EEventsKillThread);
-				if(EActionSuspend == aActionExtra)
-					{
-					// do some calls to check listings work ok at this stage
-					test(ProcessExists(info.iProcessId));
-					test(ThreadExistsForProcess(info.iThreadId, info.iProcessId));
-					// we specified EActionSuspend earlier so need to call resume on this thread
-					test(KErrNone == iServSession.ResumeThread(info.iThreadId));
-					}
-				}
-			}
-
-		if( gUseDelay ) User::After(500000);
-
-		// reset the thread kill event
-		test(KErrNone == iServSession.SetEventAction(KRMDebugTestApplication(), EEventsKillThread, EActionIgnore));
-
-		// reset events for KRMDebugTestApplication
-		test(KErrNone == iServSession.SetEventAction(KRMDebugTestApplication(), type[j].iEventType, EActionIgnore));
-
-		// finished debugging KRMDebugTestApplication so detach
-		test(KErrNone == iServSession.DetachExecutable(KRMDebugTestApplication()));
-	
-		// want to validate that the process has really exited, i.e. we're not accidentally keeping a handle to it...
-		TInt waitCount = 10;
-		while((waitCount-- > 0) && ProcessExists(processId))
-			{
-			/* Wait a little while and try again, just in case the process is still being removed.
-			This can happen on a very busy system or when a popup for the events is still active
-			*/
-			RDebug::Printf("CRunModeAgent::TestEventsWithExtraThreads. ProcessExists(id=%d), waiting count exit=%d", 
-				I64LOW(processId), waitCount);
-			User::After(50000);
-			}
-		test(!ProcessExists(processId));
-		}
-	}
-
-// helper function to check whether a thread with id aThreadId exists in the process with id aProcessId
-TBool CRunModeAgent::ThreadExistsForProcess(const TThreadId aThreadId, const TProcessId aProcessId)
-	{
-	RThread lThread;
-	TInt ret = lThread.Open( aThreadId.Id() );
-
-	if( ret != KErrNone )
-		{
-		RDebug::Printf("ThreadExistsForProcess: thread id=%d opening returned %d",
-			I64LOW( aThreadId.Id() ), ret );
-		lThread.Close();
-		return EFalse;
-		}
-
-	RProcess lProcess;
-	ret = lThread.Process( lProcess );
-
-	lThread.Close();
-
-	if( ret != KErrNone )
-		{
-		RDebug::Printf("ThreadExistsForProcess: proc opening returned %d", ret );
-		ret = KErrNotFound;
-		}
-	else if( lProcess.Id() != aProcessId )
-		{
-		RDebug::Printf("ThreadExistsForProcess: lProcess.Id()(%d)!= aProcessId(%d)",
-				I64LOW(lProcess.Id().Id()), I64LOW(aProcessId.Id()));
-		ret = KErrNotFound;
-		}
-
-	lProcess.Close();
-	
-	return ( ret == KErrNone );
-	}
-
-// helper function to check whether a process with id aProcessId exists
-TBool CRunModeAgent::ProcessExists(const TProcessId aProcessId)
-	{
-	TUint32 size;
-	RBuf8 buffer;
-	test(KErrNone == buffer.Create(1024));
-	TInt err = iServSession.GetList(EProcesses, buffer, size);
-	while(KErrTooBig == err)
-		{
-		size*=2;
-		test(size<=47*1024); // 256 TProcessListEntrys is about 46KB. (256 is max num processes)
-		test(KErrNone == buffer.ReAlloc(size));
-		err = iServSession.GetList(EProcesses, buffer, size);
-		}
-	test(KErrNone == err);
-
-	//look through the buffer and check if the target debug thread is there
-	TUint8* ptr = (TUint8*)buffer.Ptr();
-	const TUint8* ptrEnd = ptr + size;
-	while(ptr < ptrEnd)
-		{
-		TProcessListEntry& entry = *(TProcessListEntry*)ptr;
-		if(aProcessId.Id() == entry.iProcessId)
-			{
-			buffer.Close();
-			return ETrue;
-			}
-		ptr += Align4(entry.GetSize());
-		}
-	buffer.Close();
-	return EFalse;
-	}
-
-//----------------------------------------------------------------------------------------------
-//! @SYMTestCaseID      KBase-T-RMDEBUG2-0445
-//! @SYMTestType
-//! @SYMPREQ            PREQ1426
-//! @SYMTestCaseDesc    Tests basic debug functions work on demand-paged target threads
-//! @SYMTestActions     Checks it can r/w memory, set breakpoints etc in a demand paged target.
-//!
-//! @SYMTestExpectedResults KErrNone.
-//! @SYMTestPriority        High
-//! @SYMTestStatus          Implemented
-//----------------------------------------------------------------------------------------------
-
-void CRunModeAgent::TestDemandPaging(void)
-	{
-	test.Next(_L("TestDemandPaging\n"));
-
-	test(KErrNone == iServSession.AttachExecutable(iFileName, EFalse));
-	test(KErrNone == iServSession.SuspendThread(iThreadID));
-
-	// get the address of a function in code that will be paged in
-	TUint32 address = (TUint32)(&RMDebugDemandPagingTest);
-	const TUint32 armInstSize = 4;
-
-	// read the memory at &RMDebugDemandPagingTest to check that reading memory in demand paged code works
-	TUint32 demandPagedInst = 0;
-	TPtr8 demandPagedInstBuf((TUint8*)&demandPagedInst, armInstSize);
-	test(KErrNone == iServSession.ReadMemory(iThreadID, address, armInstSize, demandPagedInstBuf, EAccess32, EEndLE8));
-
-	// this is the MOVS instruction that we expect to find in RMDebugDemandPagingTest
-	TUint32 expectedDemandPagedInst = 0xe1b02000;
-
-	// check that the instruction we read is as expected
-	test(demandPagedInst == expectedDemandPagedInst);
-
-	// set event action for break points
-	test(KErrNone == iServSession.SetEventAction(RProcess().FileName(), EEventsBreakPoint, EActionContinue));
-
-	// set an arm breakpoint on RMDebugDemandPagingTest
-	TBreakId armBreakId = 0;
-	test(KErrNone == iServSession.SetBreak(armBreakId, iThreadID, address, EArmMode));
-
-	// Ensure that after setting the breakpoint the memory read returns the correct value
-	TUint32 demandPagedInstWithBreakPoint = 0;
-	TPtr8 spinForeverInstWithBreakPointBuf((TUint8*)&demandPagedInstWithBreakPoint, armInstSize);
-	test(KErrNone == iServSession.ReadMemory(iThreadID, address, armInstSize, spinForeverInstWithBreakPointBuf, EAccess32, EEndLE8));
-	test(demandPagedInst == demandPagedInstWithBreakPoint);
-
-	// switch the target thread to run the demand paging function
-	test(KErrNone == SwitchTestFunction(EDemandPagingFunction));
-
-	// set up event watcher to catch breakpoint being hit in demand paged code
-	TEventInfo info;
-	static TRequestStatus status;
-	TPtr8 infoPtr((TUint8*)&info,sizeof(TEventInfo));
-	iServSession.GetEvent(RProcess().FileName(), status, infoPtr);
-
-	// resume the thread
-	test(KErrNone == iServSession.ResumeThread(iThreadID));
-	// wait for notification of the breakpoint hit event
-	User::WaitForRequest(status);
-	test(status==KErrNone);
-
-	// info should now be filled with the details
-	test(info.iProcessIdValid);
-	test(info.iThreadIdValid);
-	test(info.iEventType == EEventsBreakPoint);
-	test(info.iThreadBreakPointInfo.iRmdArmExcInfo.iR15 == address);
-
-	// remove the break point and resume the thread
-	test(KErrNone == iServSession.ClearBreak(armBreakId));
-
-	// switch the target thread to run the default function
-	test(KErrNone == SwitchTestFunction(EDefaultFunction));
-
-	test(KErrNone == iServSession.ResumeThread(iThreadID));
-	test(KErrNone == iServSession.DetachExecutable(iFileName));
-	}
-
-// Names of some test programs used for testing security
-_LIT(KRMDebugSecurity0FileName,"z:\\sys\\bin\\t_rmdebug_security0.exe"); // Debuggable
-_LIT(KRMDebugSecurity1FileName,"z:\\sys\\bin\\t_rmdebug_security1.exe"); // Not debuggable
-
-#if defined (NO_DEBUGTOKEN) || defined (SOMECAPS_DEBUGTOKEN) || defined(FEWCAPS_DEBUGTOKEN)
-_LIT(KRMDebugSecurity2FileName,"z:\\sys\\bin\\t_rmdebug_security2.exe"); // AllFiles
-#endif
-
-_LIT(KRMDebugSecurity3FileName,"z:\\sys\\bin\\t_rmdebug_security3.exe"); // TCB AllFiles
-
-// include the test header file here
-#include "rm_debug_kerneldriver.h"
-
-//----------------------------------------------------------------------------------------------
-//! @SYMTestCaseID      KBase-T-RMDEBUG2-0446
-//! @SYMTestType
-//! @SYMPREQ            PREQ1426
-//! @SYMTestCaseDesc    Tests Debug Device Driver is locked to the SID of the Debug Security Svr.
-//! @SYMTestActions     Loads rm-debug.ldd and tries to open a handle to it. This should fail.
-//!
-//! @SYMTestExpectedResults KErrPermissionDenied.
-//! @SYMTestPriority        High
-//! @SYMTestStatus          Implemented
-//----------------------------------------------------------------------------------------------
-
-void CRunModeAgent::TestDriverSecurity(void)
-	{
-	test.Next(_L("TestDriverSecurity\n"));
-
-	RRM_DebugDriver kernelDriver;
-
-	// Load the debug device driver
-	TInt err = User::LoadLogicalDevice( KDebugDriverFileName );
-	test((KErrNone == err) || (KErrAlreadyExists == err));
-
-	// we were allowed to load the driver, or its already loaded.
-
-	// Try to open a handle to the driver - this should return KErrPermissionDenied as we don't have the DSS SID
-	TRM_DebugDriverInfo driverInfo;
-	driverInfo.iUserLibraryEnd = 0;
-	err = kernelDriver.Open(driverInfo);
-	test((err == KErrInUse) || (err == KErrPermissionDenied));
-
-	}
-
-//----------------------------------------------------------------------------------------------
-//! @SYMTestCaseID      KBase-T-RMDEBUG2-0447
-//! @SYMTestType
-//! @SYMPREQ            PREQ1426
-//! @SYMTestCaseDesc    Tests Debug driver can only be access via the DSS. Also tests DSS cannot
-//!						be subverted. Tests functionality of two representative OEM Debug Tokens.
-//! @SYMTestActions     Tries to open rm_debug.ldd (should fail). Tries to debug various processes
-//!						(only debuggable one should succeed). Checks that DSS behaves correctly
-//!						when different versions are passed in to Connect().
-//!
-//! @SYMTestExpectedResults KErrPermissionDenied.
-//! @SYMTestPriority        High
-//! @SYMTestStatus          Implemented
-//----------------------------------------------------------------------------------------------
-
-void CRunModeAgent::TestSecurity(void)
-	{
-	// Things to test
-	//
-	// try to use debug driver directly ( should have the wrong UID/SID value!)
-	test.Next(_L("TestSecurity - Bypass Debug Security Server to Debug Device Driver - DSS running\n"));
-
-	// Things to test
-	//
-	// Load the debug device driver
-	RRM_DebugDriver kernelDriver;
-	TInt err = User::LoadLogicalDevice( KDebugDriverFileName );
-	test((KErrNone == err) || (KErrAlreadyExists == err));
-
-	// we were allowed to load the driver, or its already loaded.
-
-	// Try to open handle a to the driver - this should return KErrPermission/KErrInUse as we don't have the DSS SID
-	// and we expect the DSS to already be using it.
-	TRM_DebugDriverInfo driverInfo;
-	driverInfo.iUserLibraryEnd = 0;
-	err = kernelDriver.Open(driverInfo);
-	test(err == KErrInUse);
-
-	// Try requesting an unsupported version of DSS
-	test.Next(_L("TestSecurity - requesting unsupported versions of DSS\n"));
-	RSecuritySvrSession dss;
-	err = dss.Connect(TVersion(999999, 0, 0));
-	test(err == KErrNotSupported); // Prior to DEF142018 this would crash, causing a KErrServerTerminated
-	err = dss.Connect(TVersion(KDebugServMajorVersionNumber, 999999, 0));
-	test(err == KErrNotSupported); // Explicitly asking for a minor version should give KErrNotSupported too if it's newer than what's running.
-	err = dss.Connect(TVersion(KDebugServMajorVersionNumber, 0, 0));
-	test(err == KErrNone); // But the correct major version and no explicit minor version should always succeed
-	dss.Close();
-	
-	//
-	// Attach to the Debug Security Server (passive)
-	//
-	test.Next(_L("TestSecurity - Attach to the Debug Security Server (passive)\n"));
-
-	_LIT(KSecurityServerProcessName, "z:\\sys\\bin\\rm_debug_svr.exe");
-
-	test(KErrPermissionDenied == iServSession.AttachExecutable(KSecurityServerProcessName, ETrue));
-
-	//
-	// Attach to the Debug Security Server (active)
-	//
-	test.Next(_L("TestSecurity - Attach to the Debug Security Server (active)\n"));
-
-	test(KErrPermissionDenied == iServSession.AttachExecutable(KSecurityServerProcessName, EFalse));
-
-	//
-	// Attach to Process 0
-	//
-	// Target: Debuggable
-	//
-	test.Next(_L("TestSecurity - Attach to test process 0\n"));
-
-	// Agent can debug the target app as it is marked debuggable - ie capabilities are ignored)
-	HelpTestSecurityAttachDetachExecutable(KRMDebugSecurity0FileName,ETrue);
-
-	//
-	// Attach to Process - 1
-	//
-	// Target: Non-debuggable for ordinary debug agent, debuggable for OEM/OEM2 token authorised agent
-	//
-	// Note: This target app has no PlatSec capabilities
-	//
-	// Agent cannot debug the app unless it has an OEM/OEM2 Debug Token
-
-
-#ifdef NO_DEBUGTOKEN
-	test.Next(_L("TestSecurity NO_DEBUGTOKEN - Attach to test process 1\n"));
-	HelpTestSecurityAttachDetachExecutable(KRMDebugSecurity1FileName,EFalse);
-#endif
-
-#ifdef SOMECAPS_DEBUGTOKEN
-	test.Next(_L("TestSecurity SOMECAPS_DEBUGTOKEN - Attach to test process 1\n"));
-	HelpTestSecurityAttachDetachExecutable(KRMDebugSecurity1FileName,ETrue);
-#endif
-
-#ifdef FEWCAPS_DEBUGTOKEN
-	test.Next(_L("TestSecurity FEWCAPS_DEBUGTOKEN - Attach to test process 1\n"));
-	HelpTestSecurityAttachDetachExecutable(KRMDebugSecurity1FileName,ETrue);
-#endif
-
-	//
-	// Attach to Process - 2
-	//
-	// Target: Non-debuggable for ordinary debug agent, non-debuggable for OEM2 authorised agent (insufficient caps)
-	//
-	// Note: This target app has AllFiles capability
-	//
-	// Agent cannot debug the app unless it has an OEM Debug Token
-
-
-#ifdef NO_DEBUGTOKEN
-	test.Next(_L("TestSecurity NO_DEBUGTOKEN - Attach to test process 2\n"));
-	HelpTestSecurityAttachDetachExecutable(KRMDebugSecurity2FileName,EFalse);
-#endif
-
-#ifdef SOMECAPS_DEBUGTOKEN
-	test.Next(_L("TestSecurity SOMECAPS_DEBUGTOKEN - Attach to test process 2\n"));
-	HelpTestSecurityAttachDetachExecutable(KRMDebugSecurity2FileName,ETrue);
-#endif
-
-#ifdef FEWCAPS_DEBUGTOKEN
-	test.Next(_L("TestSecurity FEWCAPS_DEBUGTOKEN - Attach to test process 2\n"));
-	HelpTestSecurityAttachDetachExecutable(KRMDebugSecurity2FileName,EFalse);
-#endif
-
-	//
-	// Attach to Process - 3
-	//
-	// Target: Non-debuggable for ordinary debug agent, non-debuggable for OEM authorised agent (insufficient caps)
-	//
-	// Note: This target app has AllFiles and TCB and NetworkControl capabilities
-	//
-
-#if  defined (NO_DEBUGTOKEN)  || defined (SOMECAPS_DEBUGTOKEN) || defined (FEWCAPS_DEBUGTOKEN)
-	test.Next(_L("TestSecurity - Attach to test process 3 : Should not be able to debug it\n"));
-	HelpTestSecurityAttachDetachExecutable(KRMDebugSecurity3FileName,EFalse);
-#else
-	test.Next(_L("TestSecurity - Attach to test process 3 : Should be able to debug it\n"));
-	HelpTestSecurityAttachDetachExecutable(KRMDebugSecurity3FileName,ETrue);
-#endif
-	}
-
-//----------------------------------------------------------------------------------------------
-//! @SYMTestCaseID      KBase-T-RMDEBUG2-0543
-//! @SYMTestType
-//! @SYMPREQ            PREQ1426
-//! @SYMTestCaseDesc    Validates that a dll can be built which #include's the rm_debug_api.h header, i.e. rm_debug_api.h contains no static data.
-//! @SYMTestActions     Calls a dummy function in t_rmdebug_dll.dll which implies the dll has been built correctly.
-//!
-//! @SYMTestExpectedResults KErrNone.
-//! @SYMTestPriority        High
-//! @SYMTestStatus          Implemented
-//----------------------------------------------------------------------------------------------
-void CRunModeAgent::TestDllUsage(void)
-	{
-	test.Next(_L("TestDllUsage\n"));
-	test(KUidDebugSecurityServer == GetDSSUid());
-	}
-
-//----------------------------------------------------------------------------------------------
-//! @SYMTestCaseID      KBase-T-RMDEBUG2-0812
-//! @SYMTestType
-//! @SYMPREQ            PREQ1700
-//! @SYMTestCaseDesc    Writes a known data to the crash flash and validates the data written
-//!						using the read operation and finally erase the data. In the absence
-//!						of an OEM debug token, access to the crash partition should not be allowed
-//! @SYMTestActions     Invoke the flash write method in DSS and call the read method in DSS
-//!						to validate the data is written correctly and then erase the written area
-//!
-//! @SYMTestExpectedResults KErrNone.
-//! @SYMTestPriority        High
-//! @SYMTestStatus          Implemented
-//----------------------------------------------------------------------------------------------
-void CRunModeAgent::TestCrashFlash(void)
-	{
-#if  defined (NO_DEBUGTOKEN)  || defined (FEWCAPS_DEBUGTOKEN)
-
-	test.Next(_L("@SYMTestCaseID:DT-debug-securityserver-006 Testing We cannot Erase the Crash Flash with insufficient privileges"));
-
-	TUint32 size = 0;
-	TInt err = iServSession.EraseCrashLog(0, 1);
-	test(KErrPermissionDenied == err);
-
-	test.Next(_L("@SYMTestCaseID:DT-debug-securityserver-005 Testing We can't Write to the Crash Flash with insufficient privileges"));
-
-	err = iServSession.WriteCrashConfig(0, KCrashDummyData, size);
-	test(KErrPermissionDenied == err);
-	test(size == 0);
-
-	test.Next(_L("@SYMTestCaseID:DT-debug-securityserver-008 Testing We can't Read from the Crash Flash with insufficient privileges"));
-
-	TUint32 readSize = 0x10;
-	RBuf8 buf;
-	buf.CleanupClosePushL();
-	err = buf.Create(readSize);
-
-	test(err == KErrNone);
-
-	err = iServSession.ReadCrashLog(0, buf, readSize);
-	test(KErrPermissionDenied == err);
-
-	test.Next(_L("@SYMTestCaseID:DT-debug-securityserver-004 Testing Writing To an invalid location"));
-
-	TUint32 writeSize = 0;
-	err = iServSession.WriteCrashConfig(0xFFFFFFFF, KCrashDummyData, writeSize);
-
-	test(err == KErrPermissionDenied);
-
-	test.Next(_L("@SYMTestCaseID:DT-debug-securityserver-003 Testing Reading from an invalid location"));
-
-	buf.FillZ();
-	err = iServSession.ReadCrashLog(0, buf, writeSize);
-
-	test(err == KErrPermissionDenied);
-
-	CleanupStack::PopAndDestroy(&buf);
-
-#endif
-
-#ifdef SOMECAPS_DEBUGTOKEN
-
-	TInt err = KErrNone;
-
-	test.Next(_L("@SYMTestCaseID:DT-debug-securityserver-007 Testing We can Erase the Crash Flash with sufficient privileges"));
-
-	err = iServSession.EraseCrashLog(0, 1);
-
-	// For platforms where NAND flash is not currently supported we get a KErrNotSupported - this is still a pass
-	if (KErrNotSupported == err)
-		{
-		test.Printf(_L("Nand flash not supported - continue"));
-		return;
-		}
-
- 	//For platforms without a flash partition we get KErrNotFound - this is still a pass
- 	if(KErrNotFound == err)
- 		{
- 		test.Printf(_L("Platform has no flash partition - continue"));
- 		return;
- 		}
-
-	test(KErrNone == err);
-
-	//Read back the start of the block to make sure its 0xFFFFFFFF
-	const TUint numBytesToCheck = 0x80;  //We dont know the block size
-	TBuf8<numBytesToCheck> eraseCheck;
-	eraseCheck.SetLength(numBytesToCheck);
-
-	err = iServSession.ReadCrashLog(0, eraseCheck, numBytesToCheck);
-	test(err == KErrNone);
-
-	TBool dataIsOk = ETrue;
-	for(TUint cnt = 0; cnt < numBytesToCheck; cnt++)
-		{
-		if(eraseCheck[cnt] != 0xFF)
-			{
-			dataIsOk = EFalse;
-			}
-		}
-
-	test(dataIsOk);
-
-	test.Next(_L("@SYMTestCaseID:DT-debug-securityserver-002 Testing We can Write to the Crash Flash with sufficient privileges"));
-
-	TUint32 writeSize = 0;
-	err = iServSession.WriteCrashConfig(0, KCrashDummyData, writeSize);
-
-	test(writeSize == KCrashDummyData().Length());
-
-	test.Next(_L("@SYMTestCaseID:DT-debug-securityserver-001 Testing We can Read from the Crash Flash with sufficient privileges"));
-
-	RBuf8 buf;
-	buf.CleanupClosePushL();
-	err = buf.Create(writeSize);
-
-	test(err == KErrNone);
-
-	buf.FillZ();
-
-	err = iServSession.ReadCrashLog(0, buf, writeSize);
-
-	test(0 == buf.Compare(KCrashDummyData));
-
-	test.Next(_L("@SYMTestCaseID:DT-debug-securityserver-004 Testing Writing To an invalid location"));
-
-	writeSize = 0;
-	err = iServSession.WriteCrashConfig(0xFFFFFFFF, KCrashDummyData, writeSize);
-
-	test(err == KErrArgument);
-
-	test.Next(_L("@SYMTestCaseID:DT-debug-securityserver-003 Testing Reading from an invalid location"));
-
-	buf.FillZ();
-	err = iServSession.ReadCrashLog(0xFFFFFFFF, buf, writeSize);
-
-	test(err == KErrArgument);
-
-	CleanupStack::PopAndDestroy(&buf);
-
-#endif
-	}
-//----------------------------------------------------------------------------------------------
-//! @SYMTestCaseID      KBase-T-RMDEBUG2-0735
-//! @SYMTestType
-//! @SYMPREQ            PREQ1426
-//! @SYMTestCaseDesc    Tests the Kill Process functionality. Only can kill a debuggable process.
-//! @SYMTestActions     Launches a debuggable and non-debuggable process and tries to kill both.
-//!
-//! @SYMTestExpectedResults KErrNone.
-//! @SYMTestPriority        High
-//! @SYMTestStatus          Implemented
-//----------------------------------------------------------------------------------------------
-void CRunModeAgent::TestKillProcess(void)
-	{
-	test.Next(_L("TestKillProcess\n"));
-
-	// Kill a debuggable process
-
-	// check that killing a process is supported
-	TTag tag = GetTag(ETagHeaderIdKillObjects, EFunctionalityKillProcess);
-	test(tag.iValue);
-	// check that killing a thread is not supported
-	tag = GetTag(ETagHeaderIdKillObjects, EFunctionalityKillThread);
-	test(!tag.iValue);
-
-	// attach first!
-	TInt err = iServSession.AttachExecutable(KRMDebugTestApplication, EFalse /* Active */);
-	test(err == KErrNone);
-
-	// first launch a debuggable process
-	RProcess process;
-	err = LaunchProcess(process, KRMDebugTestApplication(),ESpinForever, 0, 0);
-	test (err == KErrNone);
-
-	// try to find the process in the list
-_LIT(KRMDebugAppName, "t_rmdebug_app");
-
-	TBool found = ProcessExists(KRMDebugAppName);
-	test (found);
-
-	TInt processId = process.Id();
-	process.Close();
-
-	// program now running, so try to kill it
-	err = iServSession.KillProcess(processId, 0 /* kill reason */);
-	test(err == KErrNone);
-
-	User::After(2000000);	// should die within two seconds.
-
-	// can we still find it? Should be gone
-	found = ProcessExists(KRMDebugAppName);
-	test (!found);
-
-	// release the program again.
-	err = iServSession.DetachExecutable(KRMDebugTestApplication);
-	test(err == KErrNone);
-
-	// Try to kill a non-debuggable process and fail.
-
-	// first launch a non-debuggable process
-	RProcess process2;
-	err = LaunchProcess(process2, KRMDebugSecurity1FileName(),ESpinForever, 0, 0);
-	test (err == KErrNone);
-
-	// try to find the process in the list
-_LIT(KRMDebugAppName2, "t_rmdebug_security1");
-
-	TBool found2 = ProcessExists(KRMDebugAppName2);
-	test (found2);
-
-	TInt process2Id = process2.Id();
-	process2.Close();
-
-	// program now running, so try to kill it
-	err = iServSession.KillProcess(process2Id, 0 /* kill reason */);
-	test(err == KErrPermissionDenied);
-
-	User::After(2000000);	// should die within two seconds if it is going to die.
-
-	// can we still find it? Should be still around!
-	found2 = ProcessExists(KRMDebugAppName2);
-	test (found2);
-
-	}
-
-//----------------------------------------------------------------------------------------------
-//! @SYMTestCaseID      KBase-T-RMDEBUG2-1388
-//! @SYMTestType
-//! @SYMPREQ            PREQ1426
-//! @SYMTestCaseDesc    Tests the correct operation of the AddProcess and Remove Process
-//! @SYMTestActions     1. Registers for AddProcess and Remove Process events
-//!                     2. Starts a test process z:\sys\bin\t_rmdebug_security0.exe
-//!                     3. Wait for the AddProcess event to be reported
-//!                     4. Kill the newly started test process
-//!                     5. Wait for the RemoveProcess event to be reported
-//!                     6. Tell the DSS it is no longer interested in AddProcess and RemoveProcess events
-//!
-//! @SYMTestExpectedResults KErrNone.
-//! @SYMTestPriority        High
-//! @SYMTestStatus          Implemented
-//----------------------------------------------------------------------------------------------
-
-void CRunModeAgent::TestAddRemoveProcessEvents()
-	{
-	test.Next(_L("TestAddRemoveProcessEvents\n"));
-
-	// attach to a process (e.g. one of the simple security test programs)
-	// launch the security program
-	// wait for the add event
-	// continue the program.
-	// wait for the remove event
-	// detach process
-
-	test(KErrNone == iServSession.AttachExecutable(KRMDebugSecurity0FileName, EFalse));
-
-	test(KErrNone == iServSession.SetEventAction(KRMDebugSecurity0FileName,EEventsAddProcess, EActionContinue));
-
-	test(KErrNone == iServSession.SetEventAction(KRMDebugSecurity0FileName,EEventsRemoveProcess, EActionContinue));
-
-	// Creator thread ID of the current thread (to be creator of test application)
-	TInt creatorThreadId = RThread().Id();
-
-	RProcess process;
-	TInt err = process.Create(KRMDebugSecurity0FileName, KNullDesC, EOwnerProcess);
-	test (err == KErrNone);
-
-	// Rendezvous with process
-	TRequestStatus status;
-	process.Rendezvous(status);
-
-	// Start the test program
-	process.Resume();
-	User::WaitForRequest(status);
-	test(status==KErrNone);
-
-	// Wait for the addprocess event
-	TEventInfo info;
-	TPtr8 infoPtr((TUint8*)&info,0,sizeof(TEventInfo));
-
-	iServSession.GetEvent(KRMDebugSecurity0FileName,status,infoPtr);
-
-	// Wait for notification of the addprocess hit event
-	User::WaitForRequest(status);
-	test(status==KErrNone);
-
-	// Check this was the right kind of event
-	test(info.iEventType == EEventsAddProcess);
-
-	const TInt uid3offset = 2;
-
-	// Get UID3 for current process
-	TUint32 Uid3 = process.Type()[uid3offset].iUid;
-
-	// Check correct UID3 is returned from the driver
-    test(info.iAddProcessInfo.iUid3 == Uid3);
-
-    // Check correct creator ID for test application is returned from the driver
-    test(info.iAddProcessInfo.iCreatorThreadId == creatorThreadId);
-
-	// Kill the process, as we don't need it anymore
-	process.Kill(KErrNone);
-
-	// Wait for the remove process event
-	iServSession.GetEvent(KRMDebugSecurity0FileName,status,infoPtr);
-
-	// Wait for notification of the remove process hit event
-	User::WaitForRequest(status);
-	test(status==KErrNone);
-
-	// Check this was the right kind of event
-	test(info.iEventType == EEventsRemoveProcess);
-
-	test(KErrNone == iServSession.SetEventAction(KRMDebugSecurity0FileName,EEventsRemoveProcess, EActionIgnore));
-
-	test(KErrNone == iServSession.SetEventAction(KRMDebugSecurity0FileName,EEventsAddProcess, EActionIgnore));
-
-	test(KErrNone == iServSession.DetachExecutable(KRMDebugSecurity0FileName));
-
-	}
-
-//----------------------------------------------------------------------------------------------
-//! @SYMTestCaseID      KBase-T-RMDEBUG2-0736
-//! @SYMTestType
-//! @SYMPREQ            PREQ1426
-//! @SYMTestCaseDesc    Checks that process break points can be set, and that they can co-exist alongside thread breakpoints
-//! @SYMTestActions     Checks that process break points can be set, and that they can co-exist alongside thread breakpoints
-//!
-//! @SYMTestExpectedResults KErrNone.
-//! @SYMTestPriority        High
-//! @SYMTestStatus          Implemented
-//----------------------------------------------------------------------------------------------
-void CRunModeAgent::TestProcessBreakPoints(void)
-	{
-	test.Next(_L("TestProcessBreakPoints\n"));
-
-	// check that process breakpoints are supported
-	TTag tag = GetTag(ETagHeaderIdBreakpoints, EBreakpointProcess);
-	test(tag.iValue);
-
-	test(KErrNone == iServSession.AttachExecutable(iFileName, EFalse));
-	test(KErrNone == iServSession.SuspendThread(iThreadID));
-
-	// Try to set the breakpoint
-	TBreakId breakId;
-	TUint32 address = (TUint32)(&RMDebug_BranchTst1);
-	RProcess process;
-	TProcessId processId = process.Id();
-	process.Close();
-
-	test(KErrNone == iServSession.SetProcessBreak(breakId, processId, address, EArmMode));
-	test(KErrAlreadyExists == iServSession.SetBreak(breakId, iThreadID, address, EArmMode));
-	test(KErrAlreadyExists == iServSession.SetBreak(breakId, iThreadID, address, EThumbMode));
-	test(KErrAlreadyExists == iServSession.SetProcessBreak(breakId, processId, address, EArmMode));
-	test(KErrAlreadyExists == iServSession.SetProcessBreak(breakId, processId, address, EThumbMode));
-	test(KErrNone == iServSession.ClearBreak(breakId));
-
-	test(KErrNone == iServSession.SetBreak(breakId, iThreadID, address, EArmMode));
-	test(KErrAlreadyExists == iServSession.SetProcessBreak(breakId, processId, address, EArmMode));
-	test(KErrAlreadyExists == iServSession.SetProcessBreak(breakId, processId, address, EThumbMode));
-	test(KErrNone == iServSession.ClearBreak(breakId));
-
-	test(KErrNone == iServSession.ResumeThread(iThreadID));
-
-	test(KErrNone == iServSession.DetachExecutable(iFileName));
-	}
-
-//----------------------------------------------------------------------------------------------
-//! @SYMTestCaseID      KBase-T-RMDEBUG2-1309
-//! @SYMTestType
-//! @SYMPREQ            PREQ1426
-//! @SYMTestCaseDesc    Checks that in the case of multiple low priority events (user traces in this case) we can still receive higher
-//!				priority events should the buffer reach a critical level
-//! @SYMTestActions     Run to first breakpoint in our test code. Then multiple trace events are issued. We should still be able to hit
-//!				the second breakpoint
-//!
-//! @SYMTestExpectedResults KErrNone.
-//! @SYMTestPriority        High
-//! @SYMTestStatus          Implemented
-//----------------------------------------------------------------------------------------------
-
-void CRunModeAgent::TestMultipleTraceEvents(void)
-	{
-	test.Next(_L("TestMultipleTraceEvents\n"));
-
-	//attach to target debug process
-	test(KErrNone == iServSession.AttachExecutable(iFileName, EFalse));
-
-	//set the target thread to execute the trace test function
-	test(KErrNone == SwitchTestFunction(EMultipleTraceCalls, EFalse));
-	
-	
-
-	//register interest in BP's & trace events and trace ignored events
-	test(KErrNone == iServSession.SetEventAction(iFileName,EEventsBreakPoint, EActionSuspend));
-	test(KErrNone == iServSession.SetEventAction(iFileName,EEventsUserTrace, EActionContinue));
-	test(KErrNone == iServSession.SetEventAction(iFileName,EEventsUserTracesLost, EActionContinue));
-
-	// Try to set the breakpoints
-	TBreakId armBreakId;
-	TBreakId armBreakId2;
-	TUint32 address = (TUint32)(&RMDebug_BranchTst1);
-	TUint32 address2 = (TUint32)(&RMDebug_StepTest_Non_PC_Modifying);
-
-	test(KErrNone == iServSession.SetBreak(armBreakId,iThreadID,address,EArmMode));
-	test(KErrNone == iServSession.SetBreak(armBreakId2,iThreadID,address2,EArmMode));
-
-	// Continue the thread
-	test(KErrNone == iServSession.ResumeThread(iThreadID));
-
-	// wait for the breakpoint to be hit
-	TEventInfo info;
-	static TRequestStatus status;
-
-	TPtr8 infoPtr((TUint8*)&info,0,sizeof(TEventInfo));
-	iServSession.GetEvent(iFileName,status,infoPtr);
-
-	// Wait for notification of the 1st breakpoint hit event
-	User::WaitForRequest(status);
-	test(status==KErrNone);
-
-	// info should now be filled with the details
-	test(info.iEventType == EEventsBreakPoint);
-	test(info.iThreadBreakPointInfo.iRmdArmExcInfo.iR15 == address);
-	test(info.iProcessIdValid);
-	test(info.iThreadIdValid);
-
-	// Continue the thread
-	test(KErrNone == iServSession.ResumeThread(iThreadID));
-
-	//Now we try to hit the second breakpoint. This will occur after a number of trace calls. If we hit this breakpoint it
-	//means many trace calls are not preventing us hitting breakpoints.
-	iServSession.GetEvent(iFileName,status,infoPtr);
-
-	// Wait for notification of the 2nd breakpoint hit event
-	User::WaitForRequest(status);
-	test(status==KErrNone);
-
-	TBool receivedTracesLost = EFalse;
-
-	while(info.iEventType == EEventsUserTrace || info.iEventType == EEventsUserTracesLost)
-		{
-		//ensure we get told traces are being thrown away - we generate enough to flood the buffer
-		if(info.iEventType == EEventsUserTracesLost)
-			{
-			receivedTracesLost = ETrue;
-
-			// Now stop the target thread from generating trace events
-			test(KErrNone == SwitchTestFunction(EDoNothing, EFalse));
-			break;
-			}
-		else
-			{
-			// Its EEventsUserTrace, so delay us in getting the next event so that it will be more 
-			// likely to get a EEventsUserTracesLost next time. 
-			// This is important on SMP since the platform can process lots of events, and thus
-			// withouth the delay it is difficult for this test to reproduce the abnormal situation of 
-			// lost trace packets
-			User::After(200000);
-			}
-
-		iServSession.GetEvent(iFileName,status,infoPtr);
-
-		// Wait for notification of the 2nd breakpoint hit event
-		User::WaitForRequest(status);
-		test(status==KErrNone);
-		}
-
-	//make sure we got told traces were lost
-	test(receivedTracesLost != EFalse);
-
-	//dont care for breakpoints or trace events no more
-	test(KErrNone == iServSession.SetEventAction(iFileName,EEventsBreakPoint, EActionIgnore));
-	test(KErrNone == iServSession.SetEventAction(iFileName,EEventsUserTrace, EActionIgnore));
-	test(KErrNone == iServSession.SetEventAction(iFileName,EEventsUserTracesLost, EActionIgnore));
-
-	//clear the breaks we set
-	test(KErrNone == iServSession.ClearBreak(armBreakId));
-	test(KErrNone == iServSession.ClearBreak(armBreakId2));
-
-	// Continue the thread
-	test(KErrNone == iServSession.ResumeThread(iThreadID));
-
-	//attach to target debug process
-	test(KErrNone == iServSession.DetachExecutable(iFileName));
-
-	}
-
-//----------------------------------------------------------------------------------------------
-//! @SYMTestCaseID KBase-T-RMDEBUG2-2441
-//! @SYMTestType
-//! @SYMPREQ PREQ1426
-//! @SYMTestCaseDesc Test clearing of a process breakpoint once the process has been killed.
-//! @SYMTestActions Creates a new process then tries to set a process breakpoint and then kills the process which should clear the previously set breakpoint. Then repeat the step once again.
-//! @SYMTestExpectedResults KErrNone
-//! @SYMTestPriority High
-//! @SYMTestStatus Implemented
-//----------------------------------------------------------------------------------------------
-
-void CRunModeAgent::TestProcessKillBreakpoint(void)
-	{
-	test.Next(_L("TestProcessKillBreakpoint\n"));
-
-	DoTestProcessKillBreakpoint();
-	// called once again
-	// to check if we can set the breakpoint once again after the process gets killed
-	DoTestProcessKillBreakpoint();
-
-	// And do it a couple more times, there was a leaked process handle that didn't show up
-	// until the third or fourth time this code was run
-	DoTestProcessKillBreakpoint();
-	DoTestProcessKillBreakpoint();
-	}
-
-void CRunModeAgent::DoTestProcessKillBreakpoint()
-	{
-	test.Printf(_L("\nDoTestProcessKillBreakpoint\n"));
-
-	// check that killing a process is supported
-	TTag tag = GetTag(ETagHeaderIdKillObjects, EFunctionalityKillProcess);
-	test(tag.iValue);
-	// check that killing a thread is not supported
-	tag = GetTag(ETagHeaderIdKillObjects, EFunctionalityKillThread);
-	test(!tag.iValue);
-
-	// attach first!
-	test ( KErrNone == iServSession.AttachExecutable(KRMDebugTestApplication, EFalse/*  Active */));
-
-	RProcess processDebug;
-	TThreadId dontCare;
-	LaunchDebugProcessAndSetBreakpoint(processDebug, dontCare);
-
-	// Not interested in breakpoint events any more
-	test(KErrNone == iServSession.SetEventAction(KRMDebugTestApplication, EEventsProcessBreakPoint, EActionIgnore));
-
-	// program now running, so try to kill it which should clear all the breakpoints
-	test(KErrNone == iServSession.KillProcess(processDebug.Id(), 0  /* kill reason */ ));
-
-	TRequestStatus stat;
-	processDebug.NotifyDestruction(stat);
-	processDebug.Close();
-	TIMED_WAIT(stat, 1000);
-
-	// release the program again
-	test(KErrNone == iServSession.DetachExecutable(KRMDebugTestApplication));
-	}
-
-void CRunModeAgent::LaunchDebugProcessAndSetBreakpoint(RProcess& aResultProcess, TThreadId& aResultThread)
-	{
-	// define a property to pass on the address from the other process we would try to debug
-	static _LIT_SECURITY_POLICY_PASS(KAllowAllPolicy);
-	TInt err = RProperty::Define(RProcess().SecureId(), EMyPropertyInteger, RProperty::EInt, KAllowAllPolicy, KAllowAllPolicy);
-	test (err == KErrNone || err == KErrAlreadyExists);
-
-	RSemaphore addressGlobSem;
-	//define a global semaphore to synchronise with debuggable process publishing the property
-	err = addressGlobSem.CreateGlobal(_L("RMDebugGlobSem"), 0);
-	test (err == KErrNone);
-
-	// first launch a debuggable process
-	RProcess& processDebug(aResultProcess);
-	test ( KErrNone == LaunchProcess(processDebug, KRMDebugTestApplication(),ESpinForeverWithBreakPoint, 0, 0));
-
-	// try to find the process in the list
-	TBool found = ProcessExists(KRMDebugAppName);
-	test (found);
-
-	//search for the main thread created
-   _LIT(KThreadWildCard, "t_rmdebug_app*");
-	TProcessId processDebugId = processDebug.Id();
-	TThreadId& threadDebugId(aResultThread);
-
-   	TFindThread find(KThreadWildCard);
-	TFullName name;
-	found = EFalse;
-	while(find.Next(name)==KErrNone && !found)
-		{
-		RThread thread;
-		err = thread.Open(find);
-       	if (err == KErrNone)
-			{
-			RProcess process;
-			thread.Process(process);
-			if (((TUint32)process.Id() == processDebugId))
-				{
-				TFullName fullname = thread.FullName();
-				test.Printf(_L("Match Found Name: %S Process id: %ld Thread id: %ld\n"), &fullname, process.Id().Id(), thread.Id().Id());
-				found = ETrue;
-				threadDebugId = thread.Id();
-				}
-			process.Close();
-			}
-		thread.Close();
-   		}
-
-	test (found); //check if we actually found the thread we want to debug
-
-	//waiting on semaphore to be sure that the property is set
-	addressGlobSem.Wait();
-
-	//get the value(property) for the breakpoint address for the process to debug
-	TInt address;
-	test(KErrNone == RProperty::Get(RProcess().SecureId(), EMyPropertyInteger, address));
-
-	test.Printf(_L("Address retrieved to set breakpoint 0x%08x\n"), address);
-
-	//suspend the thread before we set a breakpoint
-	test (KErrNone == iServSession.SuspendThread(threadDebugId));
-
-	//set a process breakpoint
-	TBreakId breakId;
-	test(KErrNone == iServSession.SetProcessBreak(breakId, processDebugId, address, EArmMode));
-
-	test(KErrNone == iServSession.SetEventAction(KRMDebugTestApplication, EEventsProcessBreakPoint, EActionContinue));
-
-	//resume the thread now
-	test(KErrNone == iServSession.ResumeThread(threadDebugId));
-
-	// wait for the breakpoint to be hit
-	TRequestStatus status;
-	TEventInfo info;
-	TPtr8 infoPtr((TUint8*)&info,0,sizeof(TEventInfo));
-	iServSession.GetEvent(KRMDebugTestApplication,status,infoPtr);
-	// Wait for notification of the breakpoint hit event
-	TIMED_WAIT(status, 2000);
-	test(status==KErrNone);
-
-	// info should now be filled with the details
-	test(info.iEventType ==  EEventsProcessBreakPoint);
-	test(info.iThreadBreakPointInfo.iRmdArmExcInfo.iR15 == address);
-	test(info.iProcessIdValid);
-	test(info.iThreadIdValid);
-
-	addressGlobSem.Close();
-	}
-
-void CRunModeAgent::HelpTestSecurityAttachDetachExecutable(const TDesC& aProcessName, TBool aExpectSuccess)
-	{
-	RProcess process;
-	TInt err = process.Create(aProcessName, KNullDesC, EOwnerProcess);
-	test (err == KErrNone);
-
-	// rendezvous with process
-	TRequestStatus status;
-	process.Rendezvous(status);
-
-	// start the test program
-	process.Resume();
-	User::WaitForRequest(status);
-	test(status==KErrNone);
-
-	// attach to the program (passively)
-	err = iServSession.AttachExecutable(aProcessName, EFalse);
-
-	if( gUseDelay ) User::After(500000);
-
-	// Do we expect to successfully attach
-	if (aExpectSuccess)
-	{
-		// Yes
-		test(KErrNone == err);
-
-		// Now detach again
-		test(KErrNone == iServSession.DetachExecutable(aProcessName));
-		if( gUseDelay ) User::After(500000);
-	}
-	else
-	{
-		// No
-		test(KErrPermissionDenied == err);
-
-		// Just to be sure, try active attachment
-		test(KErrPermissionDenied == iServSession.AttachExecutable(aProcessName, ETrue));
-		if( gUseDelay ) User::After(500000);
-	}
-
-	// Kill the process, as we don't need it anymore
-	process.Kill(KErrNone);
-	if( gUseDelay ) User::After(500000);
-	}
-
-void CRunModeAgent::ReportPerformance(void)
-//
-// Reports performance metrics from all the tests
-//
-	{
-	test.Printf(_L("\nPerformance\n"));
-	test.Printf(_L("========================\n"));
-
-	// Memory
-	test.Printf(_L("Memory read: %d KBytes/sec\n"),iMemoryReadKbytesPerSecond);
-	test.Printf(_L("Memory write: %d KBytes/sec\n"),iMemoryWriteKbytesPerSecond);
-
-	// Registers
-	// to do
-
-	// events
-	// to do
-
-	// Breakpoints
-	test.Printf(_L("Breakpoint set/clear: %d/sec\n"),iBreakpointsPerSecond);
-	test.Printf(_L("Maximum number of breakpoints: %d\n"),iMaxBreakpoints);
-
-	// Stepping
-	test.Printf(_L("Stepping speed: %d/sec\n"),iStepsPerSecond);
-
-	// Runtime
-	TInt ticks = HelpGetTestTicks();
-	test (ticks != 0);
-
-	TInt nkTicksPerSecond = HelpTicksPerSecond();
-	test (nkTicksPerSecond != 0);
-
-	test.Printf(_L("Total test runtime: %d seconds\n"),ticks/nkTicksPerSecond);
-
-	// Final sizes of executables/rom/ram etc
-	// to do
-
-	test.Printf(_L("\n"));
-	}
-
-/**
- * Helper code for the stepping tests. Sets a breakpoint in a running thread.
- * It suspends the thread, sets the breakpoint, and resumes the thread.
- *
- * @param aBreakId - Reference to a TBreakId which will be set when the breakpoint is set
- * @param aThreadId - The thread id for which we should set the breakpoint.
- * @param aBreakAddress - The address to set the breakpoint
- * @param aMode - The architecture of the breakpoint to be set (ARM/Thumb/Thumb2EE)
- * @return KErrNone if successful. One of the other system wide error codes otherwise.
- */
-TInt CRunModeAgent::HelpTestStepSetBreak(TBreakId& aBreakId, TThreadId aThreadId, const TUint32 aBreakAddress, TArchitectureMode aMode, TBool aThreadSpecific, TProcessId aProcessId)
-	{
-	TInt err = KErrNone;
-
-
-	// Set the breakpoint
-	err = aThreadSpecific
-		? iServSession.SetBreak(aBreakId,aThreadId,aBreakAddress,aMode)
-		: iServSession.SetProcessBreak(aBreakId, aProcessId, aBreakAddress, aMode);
-	if (err != KErrNone)
-		{
-		test.Printf(_L("HelpTestStepSetBreak - Failed to set breakpoint\n"));
-		return err;
-		}
-
-	// Continue the thread
-	err = iServSession.ResumeThread(aThreadId);
-	if (err != KErrNone)
-		{
-		test.Printf(_L("HelpTestStepSetBreak - Failed to resume thread\n"));
-		return err;
-		}
-
-	return KErrNone;
-	}
-
-/**
- * Helper code for the stepping tests. Clears a breakpoint in a running thread.
- * It suspends the thread, clears the breakpoint, and resumes the thread.
- *
- * @param aBreakId - Reference to a TBreakId which will be set when the breakpoint is set
- * @return KErrNone if successful. One of the other system wide error codes otherwise.
- */
-TInt CRunModeAgent::HelpTestStepClearBreak(TBreakId aBreakId, const TThreadId aThreadId, TBool aThreadSpecific)
-	{
-	TInt err = KErrNone;
-
-	// Find out what thread id we need to suspend
-	TThreadId threadId;
-	TProcessId processId;
-	TUint32 address;
-	TArchitectureMode mode;
-
-	err = aThreadSpecific
-		? iServSession.BreakInfo(aBreakId, threadId, address, mode)
-		: iServSession.ProcessBreakInfo(aBreakId, processId, address, mode);
-	if (err != KErrNone )
-		{
-		test.Printf(_L("HelpTestStepClearBreak - failed to obtain information for breakpoint\n"));
-		return err;
-		}
-	if(aThreadSpecific && aThreadId != threadId)
-		{
-		test.Printf(_L("HelpTestStepClearBreak - mismatched thread Ids\n"));
-		return KErrGeneral;
-		}
-
-	// Clear the breakpoint
-	err = iServSession.ClearBreak(aBreakId);
-	if (err != KErrNone)
-		{
-		test.Printf(_L("HelpTestStepClearBreak - failed to clear breakpoint\n"));
-		return err;
-		}
-
-	return KErrNone;
-	}
-
-/**
- * Helper code for the stepping tests. Waits for a previously set breakpoint to be hit.
- *
- * @param aProcessName - The name of the process in which the breakpoint is set. E.g. z:\sys\bin\app.exe
- * @param aEventInfo - The event information block which is filled in when the breakpoint is hit.
- * @return KErrNone if successful. One of the other system wide error codes otherwise.
- */
-TInt CRunModeAgent::HelpTestStepWaitForBreak(const TDesC& aProcessName, TEventInfo& aEventInfo)
-	{
-	static TRequestStatus status;
-
-	TPtr8 infoPtr((TUint8*)&aEventInfo,0,sizeof(TEventInfo));
-
-	iServSession.GetEvent(aProcessName,status,infoPtr);
-
-	// Wait for notification of the breakpoint hit event
-	User::WaitForRequest(status);
-	if (status == KErrNone)
-		{
-		return KErrNone;
-		}
-	else
-		{
-		return KErrGeneral;
-		}
-	}
-
-/**
- * Helper code for the stepping tests. Reads the current target PC for a given thread.
- *
- * @param aThreadId - Thread id for which to read the current target PC.
- * @param aPc - Reference to a TUint32 which will be set to the current target PC.
- * @return KErrNone if successful. One of the other system wide error codes otherwise.
- */
-TInt CRunModeAgent::HelpTestStepReadPC(TThreadId aThreadId, TUint32& aPC)
-	{
-	TInt err = KErrNone;
-
-	//create buffer containing PC register ID
-	RBuf8 pcId;
-	err = pcId.Create(sizeof(TRegisterInfo));
-	if (err != KErrNone)
-		{
-		return err;
-		}
-
-	TRegisterInfo reg1 = (TRegisterInfo)0x00000f00;
-	pcId.Append(reinterpret_cast<const TUint8*>(&reg1), sizeof(TRegisterInfo));
-
-	//create buffer containing desired PC value
-	TPtr8 pcValue((TUint8*)&aPC,4,4);
-
-	//create buffer for PC flag value
-	RBuf8 pcFlag;
-	err = pcFlag.Create(sizeof(TUint8));
-
-	//read the new PC value
-	err = iServSession.ReadRegisters(aThreadId, pcId, pcValue, pcFlag);
-	if (err != KErrNone)
-		{
-		//delete temporary buffers
-		pcId.Close();
-		pcFlag.Close();
-		return err;
-		}
-
-	//get the flag and check the PC value was read ok
-	TRegisterFlag flag = ENotSupported;
-	err = GetFlag(pcFlag, 0, flag);
-	if (err != KErrNone)
-		{
-		//delete temporary buffers
-		pcId.Close();
-		pcFlag.Close();
-		return err;
-		}
-
-	if (flag == EValid)
-		{
-		//delete temporary buffers
-		pcId.Close();
-		pcFlag.Close();
-		return KErrNone;
-		}
-	else
-		{
-		//delete temporary buffers
-		pcId.Close();
-		pcFlag.Close();
-		return err;
-		}
-	}
-
-/**
- * Helper code for the stepping tests. Single steps a given thread from aStartAddress to aEndAddress. Note
- * that it reaches aStartAddress by setting a breakpoint at that address and waiting until it is hit.
- *
- * @param aThreadId - Thread id for which to read the current target PC.
- * @param aStartAddress - The target address at which stepping will start.
- * @param aEndAddress - The target address at which stepping will end.
- * @param aMode - The architecture of the breakpoint which must be set at the start address (ARM/Thumb/Thumb2EE).
- * @return KErrNone if successful. One of the other system wide error codes otherwise.
- */
-TInt CRunModeAgent::HelpTestStep(TThreadId aThreadId, TUint32 aStartAddress, TUint32 aEndAddress, TArchitectureMode aMode, TUint aNumSteps, TBool aThreadSpecific, TProcessId aProcessId)
-	{
-	TInt err = KErrNone;
-
-	// Ensure that the supplied addresses are word/half-word aligned as appropriate.
-	if (aMode == EArmMode)
-		{
-		// ARM breakpoints must be word-aligned (2 lsb must be zero)
-		aStartAddress &= 0xFFFFFFFC;
-		aEndAddress &= 0xFFFFFFFC;
-		}
-	else if (aMode == EThumbMode)
-		{
-		// Thumb breakpoints must be half-word aligned (lsb must be zero)
-		aStartAddress &= 0xFFFFFFFE;
-		aEndAddress	 &= 0xFFFFFFFE;
-		}
-	else if (aMode == EThumb2EEMode)
-	{
-		// Thumb2EE breakpoints are not currently supported
-		return KErrNotSupported;
-	}
-
-	// Set breakpoint at the start address
-	TBreakId tempBreakId;
-	TEventInfo info;
-
-	err = HelpTestStepSetBreak(tempBreakId,aThreadId,aStartAddress,aMode,aThreadSpecific,aProcessId);
-	if (err != KErrNone)
-		{
-		test.Printf(_L("HelpTestStep - Failed to set breakpoint at aStartAddress 0x%08x\n"),aStartAddress);
-		return err;
-		}
-
-	// wait for the breakpoint to be hit
-	err = HelpTestStepWaitForBreak(iFileName,info);
-	if (err != KErrNone)
-		{
-		test.Printf(_L("HelpTestStep - Failed to hit the breakpoint at aStartAddress 0x%08x\n"),aStartAddress);
-		return err;
-		}
-
-	// Check the PC == aStartAddress
-	TUint32 pc = 0;
-	err = HelpTestStepReadPC(aThreadId,pc);
-	if (err != KErrNone)
-		{
-		test.Printf(_L("HelpTestStep - Failed to read the PC after hitting breakpoint at aStartAddress 0x%08x\n"),aStartAddress);
-		return err;
-		}
-
-	if (pc != aStartAddress)
-		{
-		test.Printf(_L("HelpTestStep - Incorrect PC value after hitting breakpoint (expected 0x%08x actual 0x%08x)\n"),aStartAddress,pc);
-		return KErrGeneral;
-		}
-
-	err = iServSession.Step(aThreadId,aNumSteps);
-	if (err != KErrNone)
-		{
-		test.Printf(_L("HelpTestStep - Failed to do step from 0x%08x to 0x%08x\n"),aStartAddress,aEndAddress,aNumSteps);
-		return err;
-		}
-
-	// only one 'completed step' event in the buffer.
-	err = HelpTestStepWaitForBreak(iFileName,info);
-	if (err != KErrNone)
-		{
-		test.Printf(_L("HelpTestStep - Could not read breakpoint event info after stepping"));
-		return err;
-		}
-	// end
-
-	// Check PC == aEndAddress
-	err = HelpTestStepReadPC(aThreadId,pc);
-	if (err != KErrNone)
-		{
-		test.Printf(_L("HelpTestStep - failed read the PC after stepping\n"));
-		return err;
-		}
-	if (pc != aEndAddress)
-		{
-		test.Printf(_L("HelpTestStep - Incorrect PC value after stepping (expected 0x%08x actual 0x%08x)\n"),aEndAddress,pc);
-		return KErrGeneral;
-		}
-
-	// Clear the breakpoint
-	err = HelpTestStepClearBreak(tempBreakId, aThreadId, aThreadSpecific);
-	if (err != KErrNone)
-		{
-		test.Printf(_L("HelpTestStep - failed to clear temporary breakpoint\n"));
-		return err;
-		}
-
-	return KErrNone;
-	}
-
-/**
- * Helper code for the stepping tests. Returns the number of nanokernel ticks in one second.
- *
- * @return Number of nanokernel ticks. 0 if unsuccesful.
- */
-TInt CRunModeAgent::HelpTicksPerSecond(void)
-	{
-	TInt nanokernel_tick_period;
-	HAL::Get(HAL::ENanoTickPeriod, nanokernel_tick_period);
-
-	ASSERT(nanokernel_tick_period != 0);
-
-	static const TInt KOneMillion = 1000000;
-
-	return KOneMillion/nanokernel_tick_period;
-	}
-
-/**
-  Given aTestNumber runs the appropriate test inside heap markers
-
-  @param aTestNumber test to run, corresponds to an entry in iTestArray
-
-  @panic Panic if aTestNumber is not in valid range
-  */
-void CRunModeAgent::RunTest(TInt aTestNumber)
-	{
-	if( (aTestNumber<0) || (aTestNumber>=KMaxTests) )
-		{
-		User::Panic(_L("Test number out of range"), aTestNumber);
-		}
-	__UHEAP_MARK;
-	(this->*(iTestArray[aTestNumber].iFunctionPtr))();
-	__UHEAP_MARKEND;
-	}
-
-void CRunModeAgent::PrintVersion()
-	{
-	test.Printf(_L("\nt_rmdebug2.exe\nVersion: %S\n"), &(testVersion.Name()));
-	test.Printf(_L("Press any key...\n"));
-	test.Getch();
-	}
-
-void CRunModeAgent::PrintUsage()
-	{
-	test.Printf(_L("Invoke with arguments:\n"));
-	test.Printf(_L("-r: run specified tests in reverse order\n"));
-	test.Printf(_L("-h: display usage information\n"));
-	test.Printf(_L("-v: display version\n"));
-	test.Printf(_L("-d: use delays\n"));
-	test.Printf(_L("<number>: test number to run, can specify more than one from the following list:\n"));
-	test.Printf(_L("Press any key for list...\n"));
-	test.Getch();
-	// if there are too many of these they won't fit on the screen! Stick another Getch() in if there get too many
-	for(TInt i=0; i<KMaxTests; i++)
-		{
-		test.Printf(_L("%2d: %S\n"), i, &(iTestArray[i].iFunctionName));
-		}
-	test.Printf(_L("Press any key...\n"));
-	test.Getch();
-	}
-
-/**
-  Parse the command line, see CRunModeAgent::PrintUsage for syntax
-  */
-void CRunModeAgent::ParseCommandLineL(TUint32& aMode, RArray<TInt>& aTests)
-	{
-	// get the length of the command line arguments
-	TInt argc = User::CommandLineLength();
-
-	// allocate a buffer for the command line arguments and extract the data to it
-	HBufC* commandLine = HBufC::NewLC(argc);
-	TPtr commandLineBuffer = commandLine->Des();
-	User::CommandLine(commandLineBuffer);
-
-	// reset mode
-	aMode = (TTestMode)0;
-
-	// create a lexer and read through the command line
-	TLex lex(*commandLine);
-	while (!lex.Eos())
-		{
-		// expecting the first character to be a '-'
-		if (lex.Get() == '-')
-			{
-			TChar arg = lex.Get();
-			switch (arg)
-				{
-				case 'v':
-					//print out the help
-					aMode |= EModeVersion;
-					break;
-				case 'h':
-					//print out the help
-					aMode |= EModeHelp;
-					break;
-				case 'r':
-					//store the fact that we want to run in reverse
-					aMode |= EModeReverse;
-					break;
-				case 'd':
-					//store the fact that we want to run in reverse
-					gUseDelay = EFalse;
-					RDebug::Printf("Not using delays");
-					break;
-				default:
-					// unknown argument so leave
-					User::Leave(KErrArgument);
-				}
-			}
-		else
-			{
-			lex.UnGet();
-			TInt testNumber;
-			User::LeaveIfError(lex.Val(testNumber));
-			if( (testNumber<0) || (testNumber>=KMaxTests) )
-				{
-				User::Leave(KErrArgument);
-				}
-			aTests.AppendL(testNumber);
-			}
-		lex.SkipSpace();
-		}
-	// if no tests specified then run them all
-	if(aTests.Count() == 0)
-		{
-		aMode |= EModeAll;
-		}
-
-	// do clean up
-	CleanupStack::PopAndDestroy(commandLine);
-	}
-
-void CRunModeAgent::ClientAppL()
-//
-// Performs each test in turn
-//
-	{
-	test.Start(_L("ClientAppL"));
-
-	RArray<TInt> testsToRun;
-	TUint32 testMode = 0;
-	ParseCommandLineL(testMode, testsToRun);
-
-	//if help or version mode specified then just print out the relevant stuff and quit
-	if((testMode & EModeHelp) || (testMode & EModeVersion))
-		{
-		if(testMode & EModeHelp)
-			{
-			PrintUsage();
-			}
-		if(testMode & EModeVersion)
-			{
-			PrintVersion();
-			}
-		test.End();
-		return;
-		}
-
-	if(testMode & EModeAll)
-		{
-		for(TInt i=0; i<KMaxTests; i++)
-			{
-			testsToRun.AppendL(i);
-			}
-		}
-
-	// if EModeReverse specified then reverse the array elements
-	TInt numberOfTests = testsToRun.Count();
-	if(testMode & EModeReverse)
-		{
-		for(TInt i=0; i<(numberOfTests>>1); i++)
-			{
-			TInt temp = testsToRun[i];
-			testsToRun[i] = testsToRun[numberOfTests - (i+1)];
-			testsToRun[numberOfTests - (i+1)] = temp;
-			}
-		}
-
-	__UHEAP_MARK;
-	SetupAndAttachToDSS();
-	__UHEAP_MARKEND;
-
-	HelpStartTestTimer();
-	for(TInt i=0; i<numberOfTests; i++)
-		{
-		RunTest(testsToRun[i]);
-		if( gUseDelay ) User::After(500000);
-		}
-	testsToRun.Close();
-
-	HelpStopTestTimer();
-
-	ReportPerformance();
-
-	test.End();
-	}
-
-/**
-  Fill the test array with pointers to each test.
-  */
-void CRunModeAgent::FillArray()
-	{
-	iTestArray[0].iFunctionPtr = &CRunModeAgent::TestDriverSecurity;
-	iTestArray[0].iFunctionName = _L("TestDriverSecurity");
-	iTestArray[1].iFunctionPtr = &CRunModeAgent::TestDllUsage;
-	iTestArray[1].iFunctionName = _L("TestDllUsage");
-	iTestArray[2].iFunctionPtr = &CRunModeAgent::TestSecurity;
-	iTestArray[2].iFunctionName = _L("TestSecurity");
-	iTestArray[3].iFunctionPtr = &CRunModeAgent::TestAttachExecutable;
-	iTestArray[3].iFunctionName = _L("TestAttachExecutable");
-	iTestArray[4].iFunctionPtr = &CRunModeAgent::TestGetExecutablesList;
-	iTestArray[4].iFunctionName = _L("TestGetExecutablesList");
-	iTestArray[5].iFunctionPtr = &CRunModeAgent::TestGetProcessList;
-	iTestArray[5].iFunctionName = _L("TestGetProcessList");
-	iTestArray[6].iFunctionPtr = &CRunModeAgent::TestGetXipLibrariesList;
-	iTestArray[6].iFunctionName = _L("TestGetXipLibrariesList");
-	iTestArray[7].iFunctionPtr = &CRunModeAgent::TestGetThreadList;
-	iTestArray[7].iFunctionName = _L("TestGetThreadList");
-	iTestArray[8].iFunctionPtr = &CRunModeAgent::TestGetCodeSegsList;
-	iTestArray[8].iFunctionName = _L("TestGetCodeSegsList");
-	iTestArray[9].iFunctionPtr = &CRunModeAgent::TestGetListInvalidData;
-	iTestArray[9].iFunctionName = _L("TestGetListInvalidData");
-	iTestArray[10].iFunctionPtr = &CRunModeAgent::TestMemoryAccess;
-	iTestArray[10].iFunctionName = _L("TestMemoryAccess");
-	iTestArray[11].iFunctionPtr = &CRunModeAgent::TestDebugFunctionality;
-	iTestArray[11].iFunctionName = _L("TestDebugFunctionality");
-	iTestArray[12].iFunctionPtr = &CRunModeAgent::TestSuspendResume;
-	iTestArray[12].iFunctionName = _L("TestSuspendResume");
-	iTestArray[13].iFunctionPtr = &CRunModeAgent::TestBreakPoints;
-	iTestArray[13].iFunctionName = _L("TestBreakPoints");
-	iTestArray[14].iFunctionPtr = &CRunModeAgent::TestModifyBreak;
-	iTestArray[14].iFunctionName = _L("TestModifyBreak");
-	iTestArray[15].iFunctionPtr = &CRunModeAgent::TestBreakInfo;
-	iTestArray[15].iFunctionName = _L("TestBreakInfo");
-	iTestArray[16].iFunctionPtr = &CRunModeAgent::TestRunToBreak;
-	iTestArray[16].iFunctionName = _L("TestRunToBreak");
-	iTestArray[17].iFunctionPtr = &CRunModeAgent::TestBreakPointsInLoop;
-	iTestArray[17].iFunctionName = _L("TestBreakPointsInLoop");
-	iTestArray[18].iFunctionPtr = &CRunModeAgent::TestRegisterAccess;
-	iTestArray[18].iFunctionName = _L("TestRegisterAccess");
-	iTestArray[19].iFunctionPtr = &CRunModeAgent::TestStep;
-	iTestArray[19].iFunctionName = _L("TestStep");
-	iTestArray[20].iFunctionPtr = &CRunModeAgent::TestDemandPaging;
-	iTestArray[20].iFunctionName = _L("TestDemandPaging");
-	iTestArray[21].iFunctionPtr = &CRunModeAgent::TestEventsForExternalProcess;
-	iTestArray[21].iFunctionName = _L("TestEventsForExternalProcess");
-	iTestArray[22].iFunctionPtr = &CRunModeAgent::TestEvents;
-	iTestArray[22].iFunctionName = _L("TestEvents");
-	iTestArray[23].iFunctionPtr = &CRunModeAgent::TestKillProcess;
-	iTestArray[23].iFunctionName = _L("TestKillProcess");
-	iTestArray[24].iFunctionPtr = &CRunModeAgent::TestProcessBreakPoints;
-	iTestArray[24].iFunctionName = _L("TestProcessBreakPoints");
-	iTestArray[25].iFunctionPtr = &CRunModeAgent::TestMultipleTraceEvents;
-	iTestArray[25].iFunctionName = _L("TestMultipleTraceEvents");
-	iTestArray[26].iFunctionPtr = &CRunModeAgent::TestAddRemoveProcessEvents;
-	iTestArray[26].iFunctionName = _L("TestAddRemoveProcessEvents");
-	iTestArray[27].iFunctionPtr = &CRunModeAgent::TestCrashFlash;
-	iTestArray[27].iFunctionName = _L("TestCrashFlash");
-	iTestArray[28].iFunctionPtr = &CRunModeAgent::TestProcessKillBreakpoint;
-	iTestArray[28].iFunctionName = _L("TestProcessKillBreakpoint");
-	iTestArray[29].iFunctionPtr = &CRunModeAgent::TestAttachToAll;
-	iTestArray[29].iFunctionName = _L("TestAttachToAll");
-	iTestArray[30].iFunctionPtr = &CRunModeAgent::TestResumeBreakpointsRepeatedly;
-	iTestArray[30].iFunctionName = _L("TestResumeBreakpointsRepeatedly");
-
-	};
-
-GLDEF_C TInt E32Main()
-//
-// Entry point for run mode debug driver test
-//
-	{
-   TInt ret = KErrNone;
-
-	// client
-	CTrapCleanup* trap = CTrapCleanup::New();
-	if (!trap)
-		return KErrNoMemory;
-   	test.Title();
-   RunModeAgent = CRunModeAgent::NewL();
-   if (RunModeAgent != NULL)
-       {
-        __UHEAP_MARK;
-	    TRAP(ret,RunModeAgent->ClientAppL());
-	    __UHEAP_MARKEND;
-
-	    delete RunModeAgent;
-       }
-
-	delete trap;
-
-	return ret;
-	}
-
-/**
-Helper function to get the aOffset'th value from aFlags
-
-@param aFlags descriptor containing TRegisterFlag type flags
-@param aOffset index of flag value to extract from aFlags
-@param aFlagValue the flag value if function returned successfully
-
-@return KErrNone if value was read successfully, KErrTooBig if aOffset is
-        greater than aFlags.Length()
-*/
-TInt CRunModeAgent::GetFlag(const TDes8& aFlags, const TUint aOffset, TRegisterFlag &aFlagValue) const
-	{
-	//get pointer to data
-	const TUint8 *ptr = aFlags.Ptr();
-
-	//check aOffset is valid
-	TUint length = aFlags.Length();
-	if(aOffset >= length)
-		return KErrTooBig;
-
-	//get flag value
-	aFlagValue = (TRegisterFlag)ptr[aOffset];
-	return KErrNone;
-	}
-
-/**
-  Helper function to set the value of FunctionChooser in the target debug thread.
-
-  @param aTestFunction TTestFunction enum to set FunctionChooser to
-
-  @return KErrNone if the value was set correctly, or one of the other system wide error codes
-  */
-TInt CRunModeAgent::SwitchTestFunction(TTestFunction aTestFunction, const TBool aResume)
-	{
-	//suspend the target thread
-	TInt suspendError = iServSession.SuspendThread(iThreadID);
-	if(! ( (suspendError == KErrNone) || (suspendError == KErrAlreadyExists) ) )
-		{
-		//the thread is not suspended so exit
-		return suspendError;
-		}
-
-	//get the address of FunctionChooser
-	TUint32 functionChooserAddress = (TUint32)&FunctionChooser;
-	//put the new value for FunctionChooser into a descriptor
-	TPtr8 functionBuf((TUint8*)&aTestFunction, sizeof(TTestFunction), sizeof(TTestFunction));
-	//write the new value into the target thread
-	TInt writeError = iServSession.WriteMemory(iThreadID, functionChooserAddress, sizeof(TTestFunction), functionBuf, EAccess32, EEndLE8);
-
-	if( (KErrNone == suspendError) && aResume )
-		{
-		//if this function suspended the target thread then we need to resume it
-		TInt resumeError = iServSession.ResumeThread(iThreadID);
-		if(KErrNone != resumeError)
-			{
-			//resuming failed so return the error
-			return resumeError;
-			}
-		}
-
-	//suspending and resuming was successful so return the error code from the WriteMemory call
-	return writeError;
-	}
-
-/**
-  Launch a separate process to debug.
-
-  @param aProcess the RProcess object to use to create the process
-  @param aFileName file name of the executable to create the process from
-  @param aFunctionType function that the target process should call on execution
-  @param aDelay delay before the new process should call the function represented by aFunctionType
-  @param aExtraThreads number of extra threads to create in the child process
-
-  @return KErrNone on success, or one of the other system wide error codes
-  */
-TInt CRunModeAgent::LaunchProcess(RProcess& aProcess, const TDesC& aFileName, TDebugFunctionType aFunctionType, TUint32 aDelay, TUint32 aExtraThreads)
-	{
-	// at the moment we support two arguments, this number might have to be increased to support arguments
-	const TUint KMaxCommandLineLength = 32;
-
-	// create a command line buffer
-	RBuf commandLine;
-	commandLine.Create(KMaxCommandLineLength);
-
-	// append the command line arguments to the buffer
-	_LIT(KFArg, "-f");
-	commandLine.Append(KFArg());
-	commandLine.AppendNum(aFunctionType);
-
-	_LIT(KSpace, " ");
-	commandLine.Append(KSpace());
-
-	_LIT(KDArg, "-d");
-	commandLine.Append(KDArg());
-	commandLine.AppendNum(aDelay);
-
-	commandLine.Append(KSpace());
-
-	_LIT(KEArg, "-e");
-	commandLine.Append(KEArg());
-	commandLine.AppendNum(aExtraThreads);
-
-	// create the new process, matching on file name only, not specifying uid values
-	TInt err = aProcess.Create(aFileName, commandLine);	// owned by the process
-
-	// check that there was no error raised
-	if(err != KErrNone)
-		{
-		commandLine.Close();
-		return err;
-		}
-
-	TRequestStatus status = KRequestPending;
-	aProcess.Rendezvous(status);
-
-	commandLine.Close();	// after target thread starts
-
-	if(KRequestPending != status.Int())
-		{
-		// startup failed so kill the process
-		aProcess.Kill(KErrNone);
-		return status.Int();
-		}
-	else
-		{
-		// start up succeeded so resume the process
-		aProcess.Resume();
-		User::WaitForRequest(status);
-		if(KErrNone != status.Int())
-			{
-			aProcess.Kill(KErrNone);
-			}
-		return status.Int();
-		}
-	}
-
-/**
-  Helper function to read a tag header from a debug functionality block
-
-  @param aDebugFunctionalityBlock block to read header from
-  @param aTagHdrId header type to find
-
-  @return pointer to the header, or NULL if not available
-  */
-TTagHeader* CRunModeAgent::GetTagHdr(const TDesC8& aDebugFunctionalityBlock, const TTagHeaderId aTagHdrId) const
-	{
-	TUint8* ptr = (TUint8*) aDebugFunctionalityBlock.Ptr();
-	TUint8* blockEnd = ptr + aDebugFunctionalityBlock.Size();
-
-	while(ptr < blockEnd)
-		{
-		TTagHeader* header = (TTagHeader*)ptr;
-		if(header->iTagHdrId == aTagHdrId)
-			{
-			return header;
-			}
-		ptr += sizeof(TTagHeader) + (header->iNumTags * sizeof(TTag));
-		}
-	return NULL;
-	}
-
-/**
-  Helper function to read a tag from a debug functionality block
-
-  @param aTagHdr pointer to a tag header in a debug functionality block
-  @param aElement element to return from the header's data
-
-  @return pointer to the tag, or NULL if not available
-  */
-TTag* CRunModeAgent::GetTag(const TTagHeader* aTagHdr, const TInt aElement) const
-	{
-	TUint8* ptr = (TUint8*)aTagHdr + sizeof(TTagHeader);
-	TUint8* blockEnd = ptr + (aTagHdr->iNumTags * sizeof(TTag));
-
-	while(ptr < blockEnd)
-		{
-		TTag* tag = (TTag*)ptr;
-		if(tag->iTagId == aElement)
-			{
-			return tag;
-			}
-		ptr += sizeof(TTag);
-		}
-	return NULL;
-	}
-
-TTag CRunModeAgent::GetTag(const TTagHeaderId aTagHdrId, const TInt aElement)
-	{
-	TUint32 bufsize = 0;	// Safe default size
-
-	// Get functionality block size
-	test(KErrNone == iServSession.GetDebugFunctionalityBufSize(&bufsize));
-
-	// Ensure we have a finite buffer size
-	test(bufsize!=0);
-
-	// Allocate space for the functionality data
-	HBufC8* dftext = HBufC8::NewLC(bufsize);
-
-	// create an empty TPtr8 refering to dftext
-	TPtr8 dftextPtr(dftext->Des());
-
-	// Get the functionality block
-	test(KErrNone == iServSession.GetDebugFunctionality(dftextPtr));
-
-	// read a value from the data to check it has come through as expected
-	TTagHeader* header = GetTagHdr(dftext->Des(), aTagHdrId);
-	test(header != NULL);
-	TTag* tag = GetTag(header, aElement);
-	test(tag != NULL);
-
-	TTag tagToReturn = *tag;
-
-	// Remove our temporary buffer
-	CleanupStack::PopAndDestroy(dftext);
-
-	return tagToReturn;
-	}
-
-/**
-  Helper function which returns a Boolean indicating with a process with the
-  specified name is currently running.
-
-  @param aProcessName - Name of the process to find
-  @return ETrue if found, EFalse otherwise
-  */
-TBool CRunModeAgent::ProcessExists(const TDesC& aProcessName)
-	{
-	TInt    err=KErrNone;
-	TBool	found = FALSE;
-
-_LIT(KWildCard,"*");
-
-	TFindProcess find(KWildCard);
-	TFullName name;
-	while(find.Next(name)==KErrNone)
-		{
-		RProcess process;
-		err = process.Open(find);
-		if (err == KErrNone)
-			{
-			if (name.Find(aProcessName) != KErrNotFound)
-				{
-					found = TRUE;
-				}
-			process.Close();
-			}
-	   }
-
-	return found;
-	}
-
-TInt PanicFn(TAny*)
-	{
-	User::Panic(_L("trmdebug_dummy"), 123);
-	return 0;
-	}
-
-void CRunModeAgent::TestAttachToAll()
-	{
-	test.Next(_L("TestAttachToAll - Attach\n"));
-
-#ifdef ALLCAPS_DEBUGTOKEN
-	test.Next(_L("---- First AttachAll \n"));
-	test(iServSession.AttachAll() == KErrNone);
-	test.Next(_L("---- Second AttachAll \n"));	
-	test(iServSession.AttachAll() == KErrAlreadyExists); // Don't think an agent should be allowed to AttachToAll more than once
-	
-	test.Next(_L("---- DetachAll\n"));
-	test(iServSession.DetachAll() == KErrNone);
-	test.Next(_L("---- AttachAll again\n"));
-	test(iServSession.AttachAll() == KErrNone);
-	
-	test.Next(_L("---- Suspend thread\n"));
-	test( iServSession.SuspendThread(iThreadID) == KErrNone);
-
-	// Check that AttachAll picks up thread crashes without needing to be explicitly attached
-	test.Next(_L("---- Attach all SetEventAction\n"));
-	TInt err = iServSession.SetEventAction(EEventsKillThread, EActionSuspend);
-	test(err == KErrNone);
-
-	test.Next(_L("---- Create DebugThread2\n"));
-	// Set up the thread
-	RThread threadToPanic;
-	err = threadToPanic.Create(_L("DebugThread2"), &PanicFn, 8192, NULL, NULL);
-	test(err == KErrNone);
-	TRequestStatus undertakerStat;
-	threadToPanic.Logon(undertakerStat);
-	test(undertakerStat.Int() == KRequestPending);
-
-	// Start listening for events
-	TRequestStatus stat;
-	TEventInfo info;
-	TPckg<TEventInfo> infoPkg(info);
-	test.Next(_L("Attach all get event and then resume thread DebugThread2\n"));
-	
-	iServSession.GetEvent(stat, infoPkg);
-	
-	threadToPanic.Resume();
-	
-	test.Printf(_L("Waiting for DebugThread2 panic event to be picked up by AttachToAll\n"));
-	User::WaitForRequest(stat);
-	test(stat.Int() == KErrNone);
-	test(info.iThreadId == threadToPanic.Id());
-	test(info.iEventType == EEventsKillThread);
-	test(info.iThreadKillInfo.iExitType == EExitPanic);
-
-	test(undertakerStat.Int() == KRequestPending); // This shouldn't get completed until after we call iServSession.ResumeThread below
-
-	// Now resume the thread and wait for the Logon to complete
-	test.Next(_L("---- Attach all resume panic thread and then wait for event after DSS has handled it\n"));
-	err = iServSession.ResumeThread(threadToPanic.Id());
-	test(err == KErrNone);
-	User::WaitForRequest(undertakerStat);
-	test(undertakerStat.Int() == 123); // The panic reason set in PanicFn is 123
-
-	// And clean up, 
-	ResetAttachToAll(threadToPanic);
-	//still attached to all
-	
-	// Test that an explicit attach eclipses an AttachAll, and the AttachAll session 
-	// doesn't see the events for specifically attached executables
-	test.Next(_L(" ---- ExplicitAttachBeatsAttachAll\n"));
-
-	// We shouldn't see this event because of sess2
-	err = iServSession.SetEventAction(EEventsStartThread, EActionContinue); 
-	test(err == KErrNone);
-	iServSession.GetEvent(stat, infoPkg);
-	test(stat.Int() == KRequestPending);
-
-	test.Next(_L("---- New sec session\n"));
-	RSecuritySvrSession sess2;
-	test(sess2.Connect(securityServerVersion) == KErrNone);
-	test.Next(_L("---- New sec session Attach executable \n"));
-	test(sess2.AttachExecutable(iFileName, EFalse) == KErrNone);
-	err = sess2.SetEventAction(iFileName, EEventsKillThread, EActionSuspend);
-	test(err == KErrNone);
-	// The EActionSuspend above should trump this EActionContinue
-	err = iServSession.SetEventAction(EEventsKillThread, EActionContinue); 
-	test(err == KErrNone);
-
-	test.Next(_L("---- New sec session create DebugThread3\n"));
-	err = threadToPanic.Create(_L("DebugThread3"), &PanicFn, 8192, NULL, NULL);
-	test(err == KErrNone);
-	
-	// The attach executable above leads the DSS to launch the token, which results 
-	// in a start thread event, and since we have done an attach all and a get event, 
-	// the TReqStat will be completed accordingly for this token start event. 
-	
-	threadToPanic.Logon(undertakerStat);
-	test(undertakerStat.Int() == KRequestPending); 
-
-	TRequestStatus sess2stat;
-	TEventInfo sess2event;
-	TPckg<TEventInfo> sess2eventPkg(sess2event);
-	test.Next(_L("---- New sec session get event, TReqStat\n") );
-	RDebug::Printf(" undertakerStat=0x%x, sess2stat = 0x%x, Pkg=0x%x", 
-			&undertakerStat, &sess2stat, &sess2eventPkg);
-	
-	sess2.GetEvent(iFileName, sess2stat, sess2eventPkg);
-	// sess2 didn't ask for EEventsStartThread so we should still be pending at this point	
-	test(sess2stat == KRequestPending); 
-
-	test.Next(_L("---- New sec session resume thread and wait for kill event\n"));
-	threadToPanic.Resume();
-	User::WaitForRequest(sess2stat);
-
-	test(sess2stat.Int() == KErrNone);
-	test(sess2event.iThreadId == threadToPanic.Id());
-	test(sess2event.iEventType == EEventsKillThread);
-	test(sess2event.iThreadKillInfo.iExitType == EExitPanic);
-
-	// the EActionSuspend that sess2 specified should ensure this doesn't get completed
-	test(undertakerStat == KRequestPending);
-
-	// Now resume the thread and wait for the Logon to complete
-	test.Next(_L("---- ExplicitAttachBeatsAttachAll resume thread 3 after kill\n"));
-	err = sess2.ResumeThread(threadToPanic.Id());
-	test(err == KErrNone);
-	User::WaitForRequest(undertakerStat);
-	test(undertakerStat.Int() == 123); // The panic reason set in PanicFn is 123
-
-	// And clean up
-	ResetAttachToAll(threadToPanic, &stat, &sess2);
-	test.Next(_L("---- Finishing ExplicitAttachBeatsAttachAll > sess2.Close\n"));
-	
-	sess2.Close();
-#if 0
-	//TODO allow this by changing from agent pid to session ids in DSS.
-	// This will allow a client to have more than one session and call attachall
-	
-	// Test that a second AttachAll eclipses the first
-	// Commented out since not sure we require this
-
-	test.Next(_L("SecondAttachAllBeatsAttachAll"));
-	
-	//TODO fix detachall in ResetAttachToAll
-	test(iServSession.AttachAll() == KErrNone);
-	test(sess2.AttachAll() == KErrNone);
-	err = iServSession.SetEventAction(EEventsKillThread, EActionSuspend);
-	test(err == KErrNone);
-	err = sess2.SetEventAction(EEventsKillThread, EActionSuspend);
-	test(err == KErrNone);
-	err = threadToPanic.Create(_L("DebugThread4"), &PanicFn, 8192, NULL, NULL);
-	test(err == KErrNone);
-	iServSession.GetEvent(stat, infoPkg);
-	test(stat.Int() == KRequestPending);
-	sess2.GetEvent(sess2stat, sess2eventPkg);
-	test(sess2stat.Int() == KRequestPending);
-
-	threadToPanic.Resume();
-	User::WaitForRequest(sess2stat);
-	test(sess2event.iThreadId == threadToPanic.Id());
-	test(sess2event.iEventType == EEventsKillThread);
-	test(sess2event.iThreadKillInfo.iExitType == EExitPanic);
-	test(stat.Int() == KRequestPending); // Shouldn't see the killthread event because of sess2
-
-	// And cleanup
-	ResetAttachToAll(threadToPanic, &stat, &sess2);
-	//TODO fixme test(sess2.DetachAll() == KErrNone);
-#endif
-
-#else
-	test(iServSession.AttachAll() == KErrPermissionDenied);
-#endif
-	}
-
-void CRunModeAgent::ResetAttachToAll(RThread& aTestThread, TRequestStatus* aFirstSessionStat, RSecuritySvrSession* aSecondSession)
-	{
-	
-	aTestThread.Close();
-
-	RDebug::Printf("---- ResetAttachToAll : > iServSession.SetEventAction Ignore for Kill and StartThread");
-	TInt err = iServSession.SetEventAction(EEventsKillThread, EActionIgnore);
-	test(err == KErrNone);
-	err = iServSession.SetEventAction(EEventsStartThread, EActionIgnore);
-	test(err == KErrNone);
-
-
-	if (aFirstSessionStat)
-		{
-		RDebug::Printf("---- ResetAttachToAll : > iServSession.CancelGetEvent");
-		iServSession.CancelGetEvent();
-		
-		RDebug::Printf("---- ResetAttachToAll : > User::WaitForRequest(*aFirstSessionStat);");
-		User::WaitForRequest(*aFirstSessionStat);
-		
-		User::After(1000000);
-		RDebug::Printf("---- ResetAttachToAll : > iServSession.DetachAll");
-		test(iServSession.DetachAll() == KErrNone);
-		}
-
-	if (aSecondSession != NULL)
-		{
-		User::After(1000000);
-		RDebug::Printf("---- ResetAttachToAll : > aSecondSession.SetEventAction kill ignore");
-		err = aSecondSession->SetEventAction(iFileName, EEventsKillThread, EActionIgnore);
-		User::After(1000000);
-		test(err == KErrNone);
-		RDebug::Printf("---- ResetAttachToAll : > aSecondSession.SetEventAction start thrd ignore");
-		err = aSecondSession->SetEventAction(iFileName, EEventsStartThread, EActionIgnore);
-		User::After(1000000);
-		test(err == KErrNone);
-		RDebug::Printf("---- ResetAttachToAll : > aSecondSession.DetachExecutable");
-		err = aSecondSession->DetachExecutable(iFileName);
-		User::After(1000000);
-		test( err == KErrNone);
-		}
-	}
-
-void CRunModeAgent::TestResumeBreakpointsRepeatedly()
-	{
-	test.Next(_L("TestResumeBreakpointsRepeatedly\n"));
-	test(iServSession.AttachExecutable(KRMDebugTestApplication, EFalse/*  Active */) == KErrNone);
-
-	RProcess debugProcess;
-	TThreadId debugThreadId;
-	LaunchDebugProcessAndSetBreakpoint(debugProcess, debugThreadId);
-	test(iServSession.ResumeThread(debugThreadId) == KErrNone);
-	
-	// Let the thread die naturally (at least from DSS's point of view)
-	debugProcess.Kill(0);
-	debugProcess.Close();
-
-	test.Printf(_L("Closing iServSession\n"));
-	iServSession.Close();
-	//User::After(1000000); // I hate myself...
-	test(iServSession.Connect(securityServerVersion) == KErrNone);
-	test(iServSession.AttachExecutable(KRMDebugTestApplication, EFalse/*  Active */) == KErrNone);
-
-	test.Printf(_L("Launching process for second time\n"));
-
-	LaunchDebugProcessAndSetBreakpoint(debugProcess, debugThreadId);
-	test(iServSession.ResumeThread(debugThreadId) == KErrNone);
-	debugProcess.Kill(0);
-	debugProcess.Close();
-
-	/*test.Printf(_L("Launching process for third time\n"));
-	debugProcess.Kill(0);
-	debugProcess.Close();
-	iServSession.Close();
-	User::After(1000000); // I hate myself...
-	test(iServSession.Connect(securityServerVersion) == KErrNone);
-	test(iServSession.AttachExecutable(KRMDebugTestApplication, EFalse/ *  Active * /) == KErrNone);
-	*/
-
-	test(KErrNone == iServSession.DetachExecutable(KRMDebugTestApplication));
-	}
-
-void CRunModeAgent::TimedWait(TRequestStatus& aStatus, TInt aTimeoutInMs, TInt aLineNumber)
-	{
-	RTimer timer;
-	TInt err = timer.CreateLocal();
-	test(err == KErrNone);
-
-	TRequestStatus timerstat;
-	timer.After(timerstat, aTimeoutInMs*1000);
-	User::WaitForRequest(aStatus, timerstat);
-	if (timerstat != KRequestPending)
-		{
-		test.Panic(_L("Timed out at line %d\n"), aLineNumber);
-		}
-	else
-		{
-		timer.Cancel();
-		User::WaitForRequest(timerstat);
-		}
-	timer.Close();
-	}
--- a/debugsrv/runmodedebug/rmdebug_test/rm_debug/basic_tests/t_rmdebug2.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,202 +0,0 @@
-// Copyright (c) 2006-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:
-//
-// Description:
-// Definitions for the run mode debug tests
-// 
-//
-
-/**
- @file
- @internalTechnology
- @released
-*/
-
-#ifndef RMDEBUG_H
-#define RMDEBUG_H
-
-#include "t_rmdebug_app.h"
-#include "r_user_low_memory_security_svr_session.h"
-#include "r_kernel_low_memory_security_svr_session.h"
-
-
-class CRunModeAgent;
-
-// Create a pointer to function type
-typedef void (CRunModeAgent::*testFunction)();
-
-class TFunctionData
-	{
-public:
-	testFunction iFunctionPtr;
-	TBuf<40> iFunctionName;
-	};
-
-//number of test functions that we have
-const TInt KMaxTests = 31; 
-
-//
-// class CRunModeAgent
-//
-// The basic run mode agent.
-//
-class CRunModeAgent : public CBase
-	{
-public:
-	static CRunModeAgent* NewL();
-	~CRunModeAgent();
-	void ClientAppL();
-
-private:
-	CRunModeAgent();
-	void ConstructL();
-	void SetupAndAttachToDSS();
-
-	TInt TestStartup();
-	TInt TestShutdown();
-
-	void TestGetExecutablesList();
-	void TestGetProcessList();
-	void TestGetThreadList();
-	void TestGetCodeSegsList();
-	void TestGetXipLibrariesList();
-	void TestGetListInvalidData();
-
-	TBool DoTestGetThreadList(const TBool aShouldPass, const Debug::TListScope aListScope, const TUint64 aTargetId=0);
-	void DoTestGetCodeSegsList(const TBool aShouldPass, const Debug::TListScope aListScope, const TUint64 aTargetId=0);
-
-	void DoGetList(const Debug::TListId aListId, const Debug::TListScope aListScope, RBuf8& aBuffer, TUint32& aSize, const TUint64 aTargetId=0);
-
-	void TestMemoryAccess();
-	void TestSuspendResume();
-	void TestBreakPoints();
-	void TestConsecutiveBreakPoints();
-	void TestModifyBreak();
-	void DoTestModifyBreak(TBool aThreadSpecific);
-	void TestBreakInfo();
-	void DoTestBreakInfo(TBool aThreadSpecific);
-	void TestRunToBreak();
-	void DoTestRunToBreak(TBool aThreadSpecific);
-	void TestBreakPointsInLoop();
-	void DoTestBreakPointsInLoop(TBool aThreadSpecific);
-	void TestRegisterAccess();
-	void TestAttachExecutable();
-	void TestDebugFunctionality();
-	void TestStep();
-	void DoTestStep(TBool aThreadSpecific);
-	void TestDriverSecurity();
-	void TestSecurity();
-	void TestEvents();
-	void TestEventsForExternalProcess();
-	void TestDemandPaging();
-	void TestTraceSecurity();
-	void TestDllUsage();
-	void TestKillProcess();
-	void TestProcessBreakPoints();
-	void TestMultipleTraceEvents();
-	void TestAddRemoveProcessEvents();
-	void TestProcessKillBreakpoint();
-	void DoTestProcessKillBreakpoint();
-	void TestAttachToAll();
-	void ResetAttachToAll(RThread& aTestThread, TRequestStatus* aFirstSessionStat=NULL, Debug::RSecuritySvrSession* aSecondSession=NULL);
-	void LaunchDebugProcessAndSetBreakpoint(RProcess& aResultProcess, TThreadId& aResultThread);
-	void TestResumeBreakpointsRepeatedly();
-
-	//crash flash test functions
-	void TestCrashFlash();
-		
-	TInt GetFlag(const TDes8 &aFlags, const TUint aOffset, Debug::TRegisterFlag &aFlagValue) const;
-
-	void ReportPerformance(void);
-
-	// helper functions
-	void HelpTestSecurityAttachDetachExecutable(const TDesC& aProcessName, TBool aExpectSuccess);
-
-	TInt HelpTestStepSetBreak(Debug::TBreakId& aBreakId, TThreadId aThreadId, const TUint32 aBreakAddress, Debug::TArchitectureMode aMode, TBool aThreadSpecific=ETrue, TProcessId aProcessId=0);
-	TInt HelpTestStepClearBreak(const Debug::TBreakId aBreakId, const TThreadId aThreadId, TBool aThreadSpecific);
-	TInt HelpTestStepWaitForBreak(const TDesC& aProcessName, Debug::TEventInfo& aEventInfo);
-	TInt HelpTestStepReadPC(TThreadId aThreadId, TUint32& aPC);
-	TInt HelpTestStep(TThreadId aThreadId, TUint32 aStartAddress, TUint32 aEndAddress, Debug::TArchitectureMode aMode, TUint aNumSteps, TBool aThreadSpecific=ETrue, TProcessId=0);
-
-	TInt HelpTicksPerSecond(void);
-
-	// helper functions
-	void HelpStartTestTimer(void) { iStartTick = User::NTickCount(); iStopTick = 0; };
-	void HelpStopTestTimer(void) { iStopTick = User::NTickCount(); };
-	TInt HelpGetTestTicks(void) { return (iStopTick - iStartTick); };
-	TInt SwitchTestFunction(TTestFunction aTestFunction, const TBool aResume = ETrue);
-	TInt LaunchProcess(RProcess& aProcess, const TDesC& aFileName, TDebugFunctionType aFunctionType, TUint32 aDelay=0, TUint32 aExtraThreads=0);
-	Debug::TTagHeader* GetTagHdr(const TDesC8& aDebugFunctionalityBlock, const Debug::TTagHeaderId aTagHdrId) const;
-	Debug::TTag* GetTag(const Debug::TTagHeader* aTagHdr, const TInt aElement) const;
-	Debug::TTag GetTag(const Debug::TTagHeaderId aTagHdrId, const TInt aElement);
-	TBool ProcessExists(const TProcessId aProcessId);
-	TBool ThreadExistsForProcess(const TThreadId aThreadId, const TProcessId aProcessId);
-	TBool ListingSupported(const Debug::TListId aListId, const Debug::TListScope aListScope);
-	void TestEventsWithExtraThreads(Debug::TKernelEventAction aActionMain, Debug::TKernelEventAction aActionExtra, TUint32 aExtraThreads);
-	void FillArray();
-	void PrintUsage();
-	void PrintVersion();
-
-	enum TTestMode 
-		{
-		//run all the tests
-		EModeAll = 1<<0,
-		//run the specified tests in reverse order
-		EModeReverse = 1<<1,
-		//print out help
-		EModeHelp = 1<<2,
-		//print out help
-		EModeVersion = 1<<3
-		};
-
-	void RunTest(TInt aTestNumber);
-	void ParseCommandLineL(TUint32& aMode, RArray<TInt>& aTests);
-
-	TBool ProcessExists(const TDesC& aProcessName);
-	static void TimedWait(TRequestStatus& aStatus, TInt aTimeoutInMs, TInt aLineNumber);
-
-
-private:
-
-	TFunctionData iTestArray[KMaxTests];
-#if defined(KERNEL_OOM_TESTING)
-	RKernelLowMemorySecuritySvrSession iServSession;
-#elif defined (USER_OOM_TESTING)
-	RUserLowMemorySecuritySvrSession iServSession;
-#else
-	Debug::RSecuritySvrSession iServSession;
-#endif
-	RThread	iDebugThread;
-	
-	//Set by test thread, used to check its run state
-	RProperty iRunCountSubscribe;
-	
-	// Used for timeouts when checking the run state
-	RTimer iTimer;
-	
-	RProcess iDSSProcess;
-	TThreadId iThreadID;
-	TFileName iFileName;
-
-	// Performance data
-	TInt iMemoryReadKbytesPerSecond;	
-	TInt iMemoryWriteKbytesPerSecond;	
-	TInt iBreakpointsPerSecond;
-	TInt iMaxBreakpoints;
-	TInt iStepsPerSecond;
-
-	// Timing information
-	TInt iStartTick;
-	TInt iStopTick;
-	};
-
-#endif // RMDEBUG_H
--- a/debugsrv/runmodedebug/rmdebug_test/rm_debug/basic_tests/t_rmdebug2_oemtoken.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-// Copyright (c) 2007-2009 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:
-//
-// Description:
-//
-
-/**
- @file
- @internalTechnology
- @released
-*/
-
-#include <e32base.h>
-#include <e32base_private.h>
-
-GLDEF_C TInt E32Main()
-	{
-	// No need to do anything, the only requirement is that
-	// this executable can be loaded and runs to completion
-	return 0;
-	}
-
-// End of file - t_rmdebug2_oemtoken.cpp
--- a/debugsrv/runmodedebug/rmdebug_test/rm_debug/common/t_debug_logging.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,68 +0,0 @@
-// Copyright (c) 2006-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:
-//
-// Description:
-// Logging macros for use in debug subsystem
-// 
-//
-
-#ifndef RMDEBUG_LOGGING_H
-#define RMDEBUG_LOGGING_H
-
-/* Debug messages
- * 
- * Debug messages are only generated for debug builds.
- * 
- * As user mode use RDebug::Printf(). 
- * 
- */
-
-// Uncomment if logging of required
-//#define RMDEBUG_LOGGING 
-
-#ifdef RMDEBUG_LOGGING
-
-   #include <e32debug.h>
-
-    #define LOG_MSG(args...)            RDebug::Printf(args)
-    #define LOG_DES(args...)            RDebug::Print(args) // For wide descriptors
-    #define LOG_ENTRY()                 RDebug::Printf("+%s", __PRETTY_FUNCTION__)
-    #define LOG_EXIT()                  RDebug::Printf("-%s", __PRETTY_FUNCTION__)
-    #define LOG_ARGS(fmt, args...)      RDebug::Printf("+%s " fmt, __PRETTY_FUNCTION__, args)
-    #define LOG_RETURN(x)               RDebug::Printf("Returning %d from [%s]", x, __PRETTY_FUNCTION__)
-
-    // Kept for compatibility
-    #define LOG_MSG2( a, b )            RDebug::Printf( a, b )
-    #define LOG_MSG3( a, b, c )         RDebug::Printf( a, b, c )
-    #define LOG_MSG4( a, b, c, d )      RDebug::Printf( a, b, c, d )
-    #define LOG_MSG5( a, b, c, d, e )   RDebug::Printf( a, b, c, d, e )
-
-#else
-
-   #include <e32debug.h>
-
-    #define LOG_MSG(args...)            
-    #define LOG_DES(args...)           
-    #define LOG_ENTRY()                 
-    #define LOG_EXIT()                 
-    #define LOG_ARGS(fmt, args...)      
-    #define LOG_RETURN(x)               
-
-    // Kept for compatibility
-    #define LOG_MSG2( a, b )            
-    #define LOG_MSG3( a, b, c )         
-    #define LOG_MSG4( a, b, c, d )     
-    #define LOG_MSG5( a, b, c, d, e )  
-
-#endif 
-
-#endif //RMDEBUG_LOGGING
--- a/debugsrv/runmodedebug/rmdebug_test/rm_debug/common/t_target_launcher.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,224 +0,0 @@
-// Copyright (c) 2007-2009 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:
-//
-// Description:
-// Helper app to launch debug targets. Uses command-line parameters as follows using a + sign:
-//  +n<number of applications to launch>
-//  +m<number of times to launch each application>
-//  +o<order of launch, 1 means launch in reverse order>
-//
-
-#include <e32base.h>
-#include <e32base_private.h>
-#include <e32cons.h>
-#include <e32test.h>
-#include <e32ldr.h>
-#include <e32cmn.h>
-#include <e32cmn_private.h>
-#include <f32dbg.h>
-#include <f32file.h>
-#include <hal.h>
-#include <u32hal.h>
-#include <e32property.h>
-
-#include "t_target_launcher.h"
-
-
-/**
-  Launch a process
-
-  @param aProcess The RProcess object to use to create the process
-  @param aExeName File name of the executable to create the process from
-  @param aCommandLine The command line to pass to the new process
-  @return KErrNone on success, or one of the other system wide error codes
-  */
-TInt LaunchProcess(RProcess& aProcess, TDesC & aExeName, TPtr & aCommandLine )
-    {
-
-    TPtrC commandLine( aCommandLine );
-
-    TInt err = aProcess.Create( aExeName, commandLine );
-
-    // check that there was no error raised
-    if(err != KErrNone)
-        {
-        return err;
-        }
-
-    TRequestStatus status = KRequestPending;
-    aProcess.Rendezvous(status);
-
-    if(KRequestPending != status.Int())
-        {
-        // startup failed so kill the process
-        RDebug::Printf( "> RProcess Rendezvous() failed with %d. Killing process", status.Int() );
-        aProcess.Kill(KErrNone);
-        return status.Int();
-        }
-    else
-        {
-        // start up succeeded so resume the process
-        aProcess.Resume();
-        User::WaitForRequest(status);
-        if(KErrNone != status.Int())
-            {
-            RDebug::Printf( "> RProcess Resume() failed with %d. Killing process", status.Int() );
-            aProcess.Kill(KErrNone);
-            }
-        return status.Int();
-        }
-    }
-
-/**
- * Read command line parameters and control the launching of targets. 
- * Create global launch semaphore KLaunchSemaphoreName
- */
-void MainL()
-    {
-
-    TInt numApps = KNumApps;
-    TInt numLaunches = KNumLaunches;
-    TInt launchControl = 0;
-
-    TInt argc = User::CommandLineLength();
-    HBufC* commandLine = NULL;
-    RDebug::Printf( ">Launcher Process() argc=%d", argc );
-
-    if( argc )
-        {
-        commandLine = HBufC::NewLC(argc);
-        TPtr commandLineBuffer = commandLine->Des();
-        User::CommandLine(commandLineBuffer);
-
-        RBuf printCommandLine;
-        CleanupClosePushL( printCommandLine );
-        printCommandLine.CreateL( commandLine->Des().Length() );
-        printCommandLine.Copy( commandLine->Des() );
-        printCommandLine.Collapse();
-        RDebug::Printf( ">command line = %S", &printCommandLine );
-        CleanupStack::PopAndDestroy( &printCommandLine );
-
-        // create a lexer and read through the command line
-        TLex lex(*commandLine);
-        while (!lex.Eos())
-            {
-            // only look for options with first character '+', other switches are for the targets
-            if (lex.Get() == '+')
-                {
-                TChar arg = lex.Get();
-                switch (arg)
-                    {
-                    case 'n':
-                        lex.Val( numApps );
-                        RDebug::Printf("parsed numApps as %d", numApps);
-                        break;
-                    case 'm':
-                        lex.Val( numLaunches );
-                        RDebug::Printf("parsed numLaunches as %d", numLaunches );
-                        break;
-                    case 'o':
-                        lex.Val( launchControl );
-                        RDebug::Printf("parsed launchControl as %d", launchControl);
-                        break;
-                    default:
-                        // unknown argument ignore it
-                        break;             
-                    }//switch
-                }// if +
-            }//while
-        }//if argc
-
-   RSemaphore launchSemaphore;
-   TInt ret = KErrNone;
-   CleanupClosePushL( launchSemaphore );
-   ret = launchSemaphore.CreateGlobal( KLaunchSemaphoreName, 0 );
-   RDebug::Printf( ">Target Launcher : RSemaphore.CreateGlobal ret %d", ret);
-   User::LeaveIfError( ret );
-
-   ret = launchSemaphore.OpenGlobal( KLaunchSemaphoreName );
-   RDebug::Printf( ">Target Launcher : RSemaphore.OpenGlobal ret %d", ret);
-   User::LeaveIfError( ret );
-   
-   //Only now indicate to the launcher that we have fully started, so they can find and open the semaphore
-   RProcess::Rendezvous(KErrNone);
-
-   //Now launch the requested number of apps for the requested number of launches
-   for( ; numLaunches > 0; numLaunches-- )
-       { 
-       for( TInt launchIndex = numApps; launchIndex > 0; launchIndex-- )  
-           {
-           RDebug::Printf( ">Target Launcher:  Semaphore wait app %d, launch %d", launchIndex, numLaunches );
-           launchSemaphore.Wait();
-
-           RBuf targetName;
-           CleanupClosePushL( targetName );
-           RDebug::Printf( ">Target Launcher:  targetName.Create %d, launch %d", launchIndex, numLaunches );
-           targetName.Create( KTargetExe().Length() + 2 );
-
-           if( launchControl == 1 )
-               {
-               // Reverse the order of the apps launched by reversing the index in the name
-               RDebug::Printf( ">Target Launcher:  targetName.Format %d, launch %d", numApps - launchIndex + 1, numLaunches );
-               targetName.Format( KTargetExe(), numApps - launchIndex + 1 );
-               }
-           else
-               {
-               RDebug::Printf( ">Target Launcher:  targetName.Format %d, launch %d", launchIndex, numLaunches );
-               targetName.Format( KTargetExe(), launchIndex );
-               }
-
-           RProcess aProc;
-           CleanupClosePushL( aProc ); 
-    
-           RDebug::Printf( ">Target Launcher: LaunchProcess %d, launch %d", launchIndex, numLaunches );
-           RDebug::Printf( ">LaunchProcess %lS", &targetName );
-           TPtr cmdLinePtr( commandLine->Des() );
-           ret = LaunchProcess( aProc, targetName, cmdLinePtr );
-           CleanupStack::PopAndDestroy( &aProc );
-
-           RDebug::Printf( "<Target Launcher: LaunchProcess returned %d", ret );
-           CleanupStack::PopAndDestroy( &targetName );
-
-           User::LeaveIfError( ret );
-
-           //By now the add proc event should have been delivered to the
-           //test app agent.
-           }
-       }
-
-    launchSemaphore.Wait( 500000 );
-
-    CleanupStack::PopAndDestroy( &launchSemaphore );
-
-    if( commandLine )
-       CleanupStack::PopAndDestroy( commandLine );
- 
-    }
-
-
-GLDEF_C TInt E32Main()
-	{
-	RProcess thisProcess;
-	thisProcess.Rendezvous(KErrNone);
-	RDebug::Printf( ">Launcher Process()" );
-
-	CTrapCleanup* trap = CTrapCleanup::New();
-	if (!trap)
-		return KErrNoMemory;
-
-	TRAPD(err, MainL());
-	RDebug::Printf( "< Target launching returned %d", err);
-	
-	delete trap;
-	
-	return err;
-	}
--- a/debugsrv/runmodedebug/rmdebug_test/rm_debug/common/t_target_launcher.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-// Copyright (c) 2009 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:
-//
-// Description:
-// Definitions for target launcher
-// 
-//
-
-/**
- @file
- @internalTechnology
- @released
-*/
-
-#ifndef RMDEBUG_TARGET_LAUNCHER_H
-#define RMDEBUG_TARGET_LAUNCHER_H
-
-// Controls how many times the target applications are launched
-const TInt KNumLaunches = 3;
-
-// Controls how many applications are attached and launched
-// If changing this, need to make sure there are enough apps
-// being built. see KTargetExe and t_rmdebug_app*
-const TInt KNumApps = 4;  
-
-_LIT(KLaunchSemaphoreName, "t_rmdebug_launch_semaphore");
-_LIT(KLaunchSemaphoreNameSearchString, "t_rmdebug_launch_semaphore*");
-_LIT(KTargetExe,"z:\\sys\\bin\\t_rmdebug_app%d.exe");
-_LIT8(KTargetExeName,"t_rmdebug_app%d.exe");
-_LIT(KProcessFinder,"*t_rmdebug_app%d*");
-_LIT(KTargetOptions,"-f%d");
-
-_LIT(KZSysBin,"z:\\sys\\bin\\");
-
-_LIT(KLauncherExe,"t_rmdebug_target_launcher.exe");
-
-_LIT_SECURITY_POLICY_PASS(KAllowAllPolicy);
-
-#endif // RMDEBUG_TARGET_LAUNCHER_H
--- a/debugsrv/runmodedebug/rmdebug_test/rm_debug/debug_targets/d_demand_paging.cia	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,57 +0,0 @@
-// 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:
-//
-// Description:
-// 
-//
-
-
-#include <u32std.h>
-
-// unused function that contains enough padding that the test function
-// RMDebugDemandPagingTest starts in a new page.
-__NAKED__ TInt RMDebugDemandPagingPaddingBefore()
-	{
-	asm("movs       r2,r0");
-	asm("adds       r0,r2,r1");
-	asm("bx         lr");
-	// add padding to make this function 4kb in size.
-	// The 4084 corresponds to 2^12 (=4096) - 12,
-	// the 12 being the total size of the movs, adds and bx instructions.
-	asm(".space     4084");
-	}
-
-// test function which is in a page by itself
-__NAKED__ TInt RMDebugDemandPagingTest()
-	{
-	asm("movs       r2,r0");
-	asm("adds       r0,r2,r1");
-	asm("bx         lr");
-	// add padding to make this function 4kb in size.
-	// The 4084 corresponds to 2^12 (=4096) - 12,
-	// the 12 being the total size of the movs, adds and bx instructions.
-	asm(".space     4084");
-	}
-
-// unused function that contains enough padding to ensure that no used code
-// is in the same page as RMDebugDemandPagingTest
-__NAKED__ TInt RMDebugDemandPagingPaddingAfter()
-	{
-	asm("movs       r2,r0");
-	asm("adds       r0,r2,r1");
-	asm("bx         lr");
-	// add padding to make this function 4kb in size.
-	// The 4084 corresponds to 2^12 (=4096) - 12,
-	// the 12 being the total size of the movs, adds and bx instructions.
-	asm(".space     4084");
-	}
-
--- a/debugsrv/runmodedebug/rmdebug_test/rm_debug/debug_targets/d_demand_paging.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,22 +0,0 @@
-// 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:
-//
-// Description:
-// definitions of functions in d_demand_paging.cia
-//
-
-#ifndef D_DEMAND_PAGING_H
-#define D_DEMAND_PAGING_H
-
-TInt RMDebugDemandPagingTest();
-
-#endif // D_DEMAND_PAGING_H
--- a/debugsrv/runmodedebug/rmdebug_test/rm_debug/debug_targets/d_rmdebug_bkpt_test.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
-// Copyright (c) 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:
-//
-// Description:
-//
-
-// definitions of functions in d_rmdebug_bkpt_test.s
-
-#ifndef D_RMDEBUG_BKPT_TESTS_H
-#define D_RMDEBUG_BKPT_TESTS_H
-
-extern "C"
-{
-	// Breakpoints in loop test
-	unsigned int RMDebug_Bkpt_Test_Entry(void);
-	unsigned int RMDebug_Bkpt_Test_Loop_Break_1(void);
-	unsigned int RMDebug_Bkpt_Test_Loop_Break_2(void);
-}
-#endif // D_RMDEBUG_BKPT_TESTS_H
--- a/debugsrv/runmodedebug/rmdebug_test/rm_debug/debug_targets/d_rmdebug_bkpt_test.s	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,52 +0,0 @@
-; Copyright (c) 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:
-;
-; Description:
-;
-
-        AREA |d-rmdebug-bkpt$$Code|, CODE, READONLY, ALIGN=6
-
-	CODE32
-
-;
-; Breakpoints in loop test
-; 
-; This function initialises some variables and then performs some basic operations 
-; within the for loop. This allows us to set multiple breakpoints within the loop 
-; to test and see whether they are being hit. 
-;
-
-	EXPORT RMDebug_Bkpt_Test_Entry
-	EXPORT RMDebug_Bkpt_Test_Loop_Break_1
-	EXPORT RMDebug_Bkpt_Test_Loop_Break_2
-	
-RMDebug_Bkpt_Test_Entry
-    mov r2,#10
-    mov r0,#20    
-    mov r3,#0
-    mov r1,#1
-    b COMPARE
-LOOP      
-    add r3,r2,r0   
-RMDebug_Bkpt_Test_Loop_Break_1    
-    mov r2,r0
-RMDebug_Bkpt_Test_Loop_Break_2  
-    mov r0,r3 
-    add r1,r1,#1
-COMPARE
-    cmp r1,#30
-    ble LOOP 
-    bx lr
- 
-	END
-
-; End of file - d_rmdebug_bkpt_test.s
--- a/debugsrv/runmodedebug/rmdebug_test/rm_debug/debug_targets/d_rmdebug_step_test.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,81 +0,0 @@
-// 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:
-//
-// Description:
-// 
-// definitions of functions in d_rmdebug_step_tests.s
-//
-
-#ifndef D_RMDEBUG_STEP_TESTS_H
-#define D_RMDEBUG_STEP_TESTS_H
-
-extern "C"
-{
-	// ARM tests
-	unsigned int RMDebug_StepTest_Non_PC_Modifying(void);
-	unsigned int RMDebug_StepTest_Non_PC_Modifying_OK(void);
-	
-	unsigned int RMDebug_StepTest_Branch(void);
-	unsigned int RMDebug_StepTest_Branch_1(void);
-
-	unsigned int RMDebug_StepTest_Branch_And_Link(void);
-	unsigned int RMDebug_StepTest_Branch_And_Link_1(void);
-	unsigned int RMDebug_StepTest_Branch_And_Link_2(void);
-	
-	unsigned int RMDebug_StepTest_MOV_PC(void);
-	unsigned int RMDebug_StepTest_MOV_PC_1(void);
-	unsigned int RMDebug_StepTest_MOV_PC_2(void);
-	
-	unsigned int RMDebug_StepTest_LDR_PC(void);
-	unsigned int RMDebug_StepTest_LDR_PC_1(void);
-
-	// Thumb tests
-	unsigned int RMDebug_StepTest_Thumb_Non_PC_Modifying(void);
-	unsigned int RMDebug_StepTest_Thumb_Non_PC_Modifying_1(void);
-	unsigned int RMDebug_StepTest_Thumb_Non_PC_Modifying_2(void);
-
-	unsigned int RMDebug_StepTest_Thumb_Branch(void);
-	unsigned int RMDebug_StepTest_Thumb_Branch_1(void);
-	unsigned int RMDebug_StepTest_Thumb_Branch_2(void);
-	
-	unsigned int RMDebug_StepTest_Thumb_Branch_And_Link(void);
-	unsigned int RMDebug_StepTest_Thumb_Branch_And_Link_1(void);
-	unsigned int RMDebug_StepTest_Thumb_Branch_And_Link_2(void);
-	unsigned int RMDebug_StepTest_Thumb_Branch_And_Link_3(void);
-
-	unsigned int RMDebug_StepTest_Thumb_Back_Branch_And_Link(void);
-	unsigned int RMDebug_StepTest_Thumb_Back_Branch_And_Link_1(void);
-	unsigned int RMDebug_StepTest_Thumb_Back_Branch_And_Link_2(void);
-	unsigned int RMDebug_StepTest_Thumb_Back_Branch_And_Link_3(void);
-
-	unsigned int RMDebug_StepTest_Thumb_AddPC(void);
-	unsigned int RMDebug_StepTest_Thumb_AddPC_1(void);
-	unsigned int RMDebug_StepTest_Thumb_AddPC_2(void);
-	unsigned int RMDebug_StepTest_Thumb_AddPC_3(void);
-
-	// ARM<->Thumb interworking tests
-	unsigned int RMDebug_StepTest_Interwork(void);
-	unsigned int RMDebug_StepTest_Interwork_1(void);
-	unsigned int RMDebug_StepTest_Interwork_2(void);
-	unsigned int RMDebug_StepTest_Interwork_3(void);
-
-	// Stepping performance test
-	unsigned int RMDebug_StepTest_Count(void);
-	unsigned int RMDebug_StepTest_Count_1(void);
-	unsigned int RMDebug_StepTest_Count_2(void);
-
-	// Multiple step test
-	unsigned int RMDebug_StepTest_ARM_Step_Multiple(void);
-	unsigned int RMDebug_StepTest_ARM_Step_Multiple_1(void);
-
-}
-#endif // D_RMDEBUG_STEP_TESTS_H
--- a/debugsrv/runmodedebug/rmdebug_test/rm_debug/debug_targets/d_rmdebug_step_test.s	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,268 +0,0 @@
-; 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:
-;
-; Description:
-; 
-;
-
-        
-		AREA |d-rmdebug-step$$Code|, CODE, READONLY, ALIGN=6
-
-	CODE32
-
-	; ARM tests
-	
-; 
-; Non-PC modifying
-;
-	EXPORT RMDebug_StepTest_Non_PC_Modifying
-	EXPORT RMDebug_StepTest_Non_PC_Modifying_OK
- 
-RMDebug_StepTest_Non_PC_Modifying
-	mov		r0,r0		; nop
-RMDebug_StepTest_Non_PC_Modifying_OK
-	bx		lr			; should return to normal execution of the test thread
-
-;
-; Branch
-;
-	EXPORT RMDebug_StepTest_Branch
-	EXPORT RMDebug_StepTest_Branch_1
-
-RMDebug_StepTest_Branch
-	b		RMDebug_StepTest_Branch_1		
-	mov		r0, #2		; if the pc ends up here, we know its gone wrong
-RMDebug_StepTest_Branch_1
-	bx		lr			; return
-
-;
-; Branch and Link
-;
-	EXPORT RMDebug_StepTest_Branch_And_Link
-	EXPORT RMDebug_StepTest_Branch_And_Link_1
-	EXPORT RMDebug_StepTest_Branch_And_Link_2
-
-RMDebug_StepTest_Branch_And_Link		
-	mov		r0, lr		; preserve lr for the moment
-RMDebug_StepTest_Branch_And_Link_1
-	bl		RMDebug_StepTest_Branch_And_Link_2
-	mov		r1, #1		; insert a gap in the instruction stream so we know we branched.
-RMDebug_StepTest_Branch_And_Link_2
-	mov		lr, r0		; restore lr			
-	bx		lr			; should return to normal execution of the test thread
-
-;
-; MOV PC
-;
-	EXPORT RMDebug_StepTest_MOV_PC
-	EXPORT RMDebug_StepTest_MOV_PC_1
-	EXPORT RMDebug_StepTest_MOV_PC_2
-
-RMDebug_StepTest_MOV_PC
-	mov		r0, #4
-RMDebug_StepTest_MOV_PC_1
-	add		pc, pc, r0	; should be a jump (bear in mind reading pc = current inst + 8bytes for arm)
-	mov		r0, #1		; Simple instructions which allow us to test where the PC really is
-	mov		r0, #2		; just by reading r0.
-RMDebug_StepTest_MOV_PC_2
-	mov		r0, #3		; 
-	mov		r0, #4		; 
-	bx		lr			; should return to normal execution of the test thread
-
-; 
-; LDR PC
-;
-	EXPORT RMDebug_StepTest_LDR_PC
-	EXPORT RMDebug_StepTest_LDR_PC_1
-
-RMDebug_StepTest_LDR_PC
-	ldr		pc, =RMDebug_StepTest_LDR_PC_1
-	mov		r0, #1		;  separate the branch target so we can prove it works
-RMDebug_StepTest_LDR_PC_1
-	bx		lr			; should return to normal execution of the test thread
-	
-;
-; ARM -> Thumb -> ARM interworking test
-;
-; Note: We always start and finish this test
-; in ARM mode.
-	EXPORT RMDebug_StepTest_Interwork
-	EXPORT RMDebug_StepTest_Interwork_1
-	EXPORT RMDebug_StepTest_Interwork_2
-	EXPORT RMDebug_StepTest_Interwork_3	
-RMDebug_StepTest_Interwork
-	mov		r0, lr	; preserve lr
-RMDebug_StepTest_Interwork_1
-	blx		RMDebug_StepTest_Interwork_2
-
-	CODE16
-RMDebug_StepTest_Interwork_2
-	blx		RMDebug_StepTest_Interwork_3
-
-	CODE32
-
-RMDebug_StepTest_Interwork_3
-	bx		r0
-
-;
-; Stepping performance tests
-;
-; This counts down from 100000 to 0
-; This means that for all practical purposes
-; we can single-step as much as we like
-; in less than one second and have some likelyhood
-; that we will not step too far from our loop
-
-	EXPORT RMDebug_StepTest_Count
-	EXPORT RMDebug_StepTest_Count_1
-	EXPORT RMDebug_StepTest_Count_2
-
-RMDebug_StepTest_Count
-	ldr		r2, =100000
-RMDebug_StepTest_Count_1
-	subs	r2, r2, #1
-RMDebug_StepTest_Count_2
-	bne		RMDebug_StepTest_Count_1
-	bx		lr
-
-; Thumb tests
-
-; Thumb non-pc modifying
-;
-;
-RMDebug_StepTest_Thumb_Non_PC_Modifying
-	mov		r0, lr	; preserve lr
-	blx		RMDebug_StepTest_Thumb_Non_PC_Modifying_1
-	bx		r0
-
-;
-; Thumb Branch
-;
-RMDebug_StepTest_Thumb_Branch
-	mov		r0, lr	; preserve lr
-	blx		RMDebug_StepTest_Thumb_Branch_1
-	bx		r0		
-
-;
-; Thumb Branch and link
-;
-RMDebug_StepTest_Thumb_Branch_And_Link
-	mov		r0, lr	; preserve lr
-	blx		RMDebug_StepTest_Thumb_Branch_And_Link_1
-	bx		r0 
-
-;
-; Thumb Back Branch and link
-;
-RMDebug_StepTest_Thumb_Back_Branch_And_Link
-	mov		r0, lr	; preserve lr
-	blx		RMDebug_StepTest_Thumb_Back_Branch_And_Link_1
-	bx		r0 
-
-;
-; Thumb ADD PC,PC, #0
-;
-RMDebug_StepTest_Thumb_AddPC
-	mov		r0, lr	; preserve lr
-	blx		RMDebug_StepTest_Thumb_AddPC_1
-	bx		r0 
-
-	CODE16
-
-	; Thumb tests
-	EXPORT RMDebug_StepTest_Thumb_Non_PC_Modifying
-	EXPORT RMDebug_StepTest_Thumb_Non_PC_Modifying_1
-	EXPORT RMDebug_StepTest_Thumb_Non_PC_Modifying_2
-
-	EXPORT RMDebug_StepTest_Thumb_Branch
-	EXPORT RMDebug_StepTest_Thumb_Branch_1
-	EXPORT RMDebug_StepTest_Thumb_Branch_2
-
-	EXPORT RMDebug_StepTest_Thumb_Branch_And_Link
-	EXPORT RMDebug_StepTest_Thumb_Branch_And_Link_1
-	EXPORT RMDebug_StepTest_Thumb_Branch_And_Link_2
-	EXPORT RMDebug_StepTest_Thumb_Branch_And_Link_3
-
-	EXPORT RMDebug_StepTest_Thumb_Back_Branch_And_Link
-	EXPORT RMDebug_StepTest_Thumb_Back_Branch_And_Link_1
-	EXPORT RMDebug_StepTest_Thumb_Back_Branch_And_Link_2
-	EXPORT RMDebug_StepTest_Thumb_Back_Branch_And_Link_3
-
-RMDebug_StepTest_Thumb_Non_PC_Modifying_1
-	mov		r0, r0	; nop
-RMDebug_StepTest_Thumb_Non_PC_Modifying_2
-	bx		lr	
-
-RMDebug_StepTest_Thumb_Branch_1
-	b		RMDebug_StepTest_Thumb_Branch_2
-	mov		r0, r0
-RMDebug_StepTest_Thumb_Branch_2
-	bx		lr
-
-RMDebug_StepTest_Thumb_Branch_And_Link_1
-	mov		r1, lr
-RMDebug_StepTest_Thumb_Branch_And_Link_2
-	bl		RMDebug_StepTest_Thumb_Branch_And_Link_3
-	mov		r0, r0
-RMDebug_StepTest_Thumb_Branch_And_Link_3
-	bx		r1
-
-RMDebug_StepTest_Thumb_Back_Branch_And_Link_3
-	bx		r1
-
-RMDebug_StepTest_Thumb_Back_Branch_And_Link_1
-	mov		r1, lr
-RMDebug_StepTest_Thumb_Back_Branch_And_Link_2
-	bl		RMDebug_StepTest_Thumb_Back_Branch_And_Link_3
-	bx		r1
-
-;
-; ADD PC
-;
-	EXPORT RMDebug_StepTest_Thumb_AddPC
-	EXPORT RMDebug_StepTest_Thumb_AddPC_1
-	EXPORT RMDebug_StepTest_Thumb_AddPC_2
-	EXPORT RMDebug_StepTest_Thumb_AddPC_3
-
-RMDebug_StepTest_Thumb_AddPC_1
-	mov		r1, lr
-	mov		r2, #4
-RMDebug_StepTest_Thumb_AddPC_2
-	add		pc, pc, r2	; should arrive at RMDebug_StepTest_Thumb_AddPC_3
-	mov		r0, r0
-	mov		r0, r0
-	mov		r0, r0
-RMDebug_StepTest_Thumb_AddPC_3
-	bx		r1
-
-	ALIGN 4
-
-	CODE32
-
-;
-; ARM multiple-step ( 5 steps )
-;
-	EXPORT RMDebug_StepTest_ARM_Step_Multiple
-	EXPORT RMDebug_StepTest_ARM_Step_Multiple_1
-
-RMDebug_StepTest_ARM_Step_Multiple
-	mov		r0,r0		; nop
-	mov		r0,r0		; nop
-	mov		r0,r0		; nop
-	mov		r0,r0		; nop
-	mov		r0,r0		; nop
-RMDebug_StepTest_ARM_Step_Multiple_1
-	bx		lr
-
-	END
-
-; End of file - d_rmdebug_step_test.s
--- a/debugsrv/runmodedebug/rmdebug_test/rm_debug/debug_targets/d_rmdebug_step_test_armv4.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +0,0 @@
-// 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:
-//
-// Description:
-// definitions of functions in d_rmdebug_step_tests_armv4.s
-//
-
-#ifndef D_RMDEBUG_STEP_TESTS_H
-#define D_RMDEBUG_STEP_TESTS_H
-
-extern "C"
-{
-	// ARM tests
-	unsigned int RMDebug_StepTest_Non_PC_Modifying(void);
-	unsigned int RMDebug_StepTest_Non_PC_Modifying_OK(void);
-	
-	unsigned int RMDebug_StepTest_Branch(void);
-	unsigned int RMDebug_StepTest_Branch_1(void);
-
-	unsigned int RMDebug_StepTest_Branch_And_Link(void);
-	unsigned int RMDebug_StepTest_Branch_And_Link_1(void);
-	unsigned int RMDebug_StepTest_Branch_And_Link_2(void);
-	
-	unsigned int RMDebug_StepTest_MOV_PC(void);
-	unsigned int RMDebug_StepTest_MOV_PC_1(void);
-	unsigned int RMDebug_StepTest_MOV_PC_2(void);
-	
-	unsigned int RMDebug_StepTest_LDR_PC(void);
-	unsigned int RMDebug_StepTest_LDR_PC_1(void);
-
-	// Stepping performance test
-	unsigned int RMDebug_StepTest_Count(void);
-	unsigned int RMDebug_StepTest_Count_1(void);
-	unsigned int RMDebug_StepTest_Count_2(void);
-
-	// Multiple step test
-	unsigned int RMDebug_StepTest_ARM_Step_Multiple(void);
-	unsigned int RMDebug_StepTest_ARM_Step_Multiple_1(void);
-
-}
-#endif // D_RMDEBUG_STEP_TESTS_H
--- a/debugsrv/runmodedebug/rmdebug_test/rm_debug/debug_targets/d_rmdebug_step_test_armv4.s	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,130 +0,0 @@
-; 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:
-;
-; Description:
-; 
-;
-
-        AREA |d-rmdebug-bkpt$$Code|, CODE, READONLY, ALIGN=6
-
-	CODE32
-
-	; ARM tests
-	
-; 
-; Non-PC modifying
-;
-	EXPORT RMDebug_StepTest_Non_PC_Modifying
-	EXPORT RMDebug_StepTest_Non_PC_Modifying_OK
- 
-RMDebug_StepTest_Non_PC_Modifying
-	mov		r0,r0		; nop
-RMDebug_StepTest_Non_PC_Modifying_OK
-	bx		lr			; should return to normal execution of the test thread
-
-;
-; Branch
-;
-	EXPORT RMDebug_StepTest_Branch
-	EXPORT RMDebug_StepTest_Branch_1
-
-RMDebug_StepTest_Branch
-	b		RMDebug_StepTest_Branch_1		
-	mov		r0, #2		; if the pc ends up here, we know its gone wrong
-RMDebug_StepTest_Branch_1
-	bx		lr			; return
-
-;
-; Branch and Link
-;
-	EXPORT RMDebug_StepTest_Branch_And_Link
-	EXPORT RMDebug_StepTest_Branch_And_Link_1
-	EXPORT RMDebug_StepTest_Branch_And_Link_2
-
-RMDebug_StepTest_Branch_And_Link		
-	mov		r0, lr		; preserve lr for the moment
-RMDebug_StepTest_Branch_And_Link_1
-	bl		RMDebug_StepTest_Branch_And_Link_2
-	mov		r1, #1		; insert a gap in the instruction stream so we know we branched.
-RMDebug_StepTest_Branch_And_Link_2
-	mov		lr, r0		; restore lr			
-	bx		lr			; should return to normal execution of the test thread
-
-;
-; MOV PC
-;
-	EXPORT RMDebug_StepTest_MOV_PC
-	EXPORT RMDebug_StepTest_MOV_PC_1
-	EXPORT RMDebug_StepTest_MOV_PC_2
-
-RMDebug_StepTest_MOV_PC
-	mov		r0, #4
-RMDebug_StepTest_MOV_PC_1
-	add		pc, pc, r0	; should be a jump (bear in mind reading pc = current inst + 8bytes for arm)
-	mov		r0, #1		; Simple instructions which allow us to test where the PC really is
-	mov		r0, #2		; just by reading r0.
-RMDebug_StepTest_MOV_PC_2
-	mov		r0, #3		; 
-	mov		r0, #4		; 
-	bx		lr			; should return to normal execution of the test thread
-
-; 
-; LDR PC
-;
-	EXPORT RMDebug_StepTest_LDR_PC
-	EXPORT RMDebug_StepTest_LDR_PC_1
-
-RMDebug_StepTest_LDR_PC
-	ldr		pc, =RMDebug_StepTest_LDR_PC_1
-	mov		r0, #1		;  separate the branch target so we can prove it works
-RMDebug_StepTest_LDR_PC_1
-	bx		lr			; should return to normal execution of the test thread
-	
-;
-; Stepping performance tests
-;
-; This counts down from 100000 to 0
-; This means that for all practical purposes
-; we can single-step as much as we like
-; in less than one second and have some likelyhood
-; that we will not step too far from our loop
-
-	EXPORT RMDebug_StepTest_Count
-	EXPORT RMDebug_StepTest_Count_1
-	EXPORT RMDebug_StepTest_Count_2
-
-RMDebug_StepTest_Count
-	ldr		r2, =100000
-RMDebug_StepTest_Count_1
-	subs	r2, r2, #1
-RMDebug_StepTest_Count_2
-	bne		RMDebug_StepTest_Count_1
-	bx		lr
-
-;
-; ARM multiple-step ( 5 steps )
-;
-	EXPORT RMDebug_StepTest_ARM_Step_Multiple
-	EXPORT RMDebug_StepTest_ARM_Step_Multiple_1
-
-RMDebug_StepTest_ARM_Step_Multiple
-	mov		r0,r0		; nop
-	mov		r0,r0		; nop
-	mov		r0,r0		; nop
-	mov		r0,r0		; nop
-	mov		r0,r0		; nop
-RMDebug_StepTest_ARM_Step_Multiple_1
-	bx		lr
-
-	END
-
-; End of file - d_rmdebug_step_test_armv4.s
--- a/debugsrv/runmodedebug/rmdebug_test/rm_debug/debug_targets/d_rmdebugthread.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,106 +0,0 @@
-// Copyright (c) 2006-2009 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:
-//
-// Description:
-// Implements a debug thread for testing.
-// 
-//
-
-#include <e32base.h>
-#include <e32base_private.h>
-#include <e32cons.h>
-#include "d_rmdebugthread.h"
-
-EXPORT_C TBuf8<SYMBIAN_RMDBG_MEMORYSIZE> gMemoryAccessBytes;
-extern void RMDebug_BranchTst1();
-
-EXPORT_C TInt TestData;
-
-CDebugServThread::CDebugServThread()
-//
-// Empty constructor
-//
-	{
-	}
-
-GLDEF_C TInt CDebugServThread::ThreadFunction(TAny*)
-//
-// Generic thread function for testing
-//
-	{
-	CTrapCleanup* cleanup=CTrapCleanup::New();
-	if (cleanup == NULL)
-		{
-		User::Leave(KErrNoMemory);
-		}
-
-	RThread::Rendezvous(KErrNone);
-
-	TestData = 1;
-
-	while(1)
-		{
-		RMDebug_BranchTst1();
-
-		TestData++;                   
-
-		// Wait half a second (suspends this thread)
-		User::After(500000);
-
-		if (TestData == 0xFFFFFFFF)
-			{
-			break;
-			}
-		}
-
-	delete cleanup;
-
-	return (KErrNone);
-	}
-
-EXPORT_C TInt StartDebugThread(RThread& aDebugThread)
-//
-// Starts the test thread
-//
-{
-	TInt res=KErrNone;
-
-	// Create the thread
-	res = aDebugThread.Create(	KDebugThreadName,
-								CDebugServThread::ThreadFunction,
-								KDefaultStackSize,
-								KDebugThreadDefaultHeapSize,
-								KDebugThreadDefaultHeapSize,
-								NULL
-								);
-
-	// Check that the creation worked
-	if (res == KErrNone)
-		{
-		TRequestStatus rendezvousStatus;
-
-		aDebugThread.SetPriority(EPriorityNormal);
-		// Make a request for a rendezvous
-		aDebugThread.Rendezvous(rendezvousStatus);
-		// Set the thread as ready for execution
-		aDebugThread.Resume();
-		// Wait for the resumption
-		User::WaitForRequest(rendezvousStatus);
-		}                                 
-	else
-		{
-		// Close the handle.
-		aDebugThread.Close();
-		}
-
-	return res;
-	}
--- a/debugsrv/runmodedebug/rmdebug_test/rm_debug/debug_targets/d_rmdebugthread.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,38 +0,0 @@
-// Copyright (c) 2006-2009 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:
-//
-// Description:
-// t_rmdebugthread.h
-// Definitions for the run mode debug test thread.
-// 
-//
-
-#ifndef RMDEBUGSVRTHRD_H
-#define RMDEBUGSVRTHRD_H
-
-#define SYMBIAN_RMDBG_MEMORYSIZE    1024*4
-
-// Thread name
-_LIT(KDebugThreadName,"DebugThread");
-
-const TUint KDebugThreadDefaultHeapSize=0x10000;
-
-class CDebugServThread : public CBase
-	{
-	public:
-		CDebugServThread();
-		static TInt ThreadFunction(TAny* aStarted);    
-
-	public:
-	};
-
-#endif // RMDEBUGSVRTHRD_H
--- a/debugsrv/runmodedebug/rmdebug_test/rm_debug/debug_targets/d_rmdebugthread2.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,318 +0,0 @@
-// Copyright (c) 2006-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:
-//
-// Description:
-// Implements a debug thread for testing.
-// 
-//
-
-#include <e32base.h>
-#include <e32base_private.h>
-#include <e32cons.h>
-#include <e32debug.h>
-#include "d_rmdebugthread2.h"
-
-#include "d_rmdebug_step_test.h"
-#include "d_rmdebug_bkpt_test.h"
-#include "d_demand_paging.h"
-
-TBuf8<SYMBIAN_RMDBG_MEMORYSIZE> gMemoryAccessBytes;
-IMPORT_C extern void RMDebug_BranchTst1();
-IMPORT_C extern TInt RMDebugDemandPagingTest();
-
-TInt TestData;
-TTestFunction FunctionChooser;
-
-const TInt 	KNumberOfTraceCalls = 50;
-
-EXPORT_C TInt TestFunction()
-	{
-	// Set TestData to an arbitrary value that can be checked by a tester
-	TestData = 0xffeeddcc;
-	RMDebug_BranchTst1();
-	
-	// Code here may not be executed because tests can change the PC value
-	// at any time, typically once the test passes
-	return 0;
-	}
-
-/**
-  Wrapper around RMDebugDemandPagingTest, need to pause for a short time to
-  allow time in t_rmdebug.cpp to issue a User::WaitForRequest to catch the break point
-  */
-EXPORT_C void TestPagedCode()
-	{
-	User::After(100000);
-
-	// call the function in paged code
-	RMDebugDemandPagingTest();
-	}
-
-EXPORT_C void TestMultipleTraceCalls()
-	{
-	//arbitrary function to set a BP on
-	RMDebug_BranchTst1();
-
-	// The tester will change FunctionChooser once it gets what it needs out of the test
-	for(TInt cnt = KNumberOfTraceCalls; cnt>0 && (FunctionChooser==EMultipleTraceCalls); cnt--)
-		{
-		RDebug::Printf("T");
-		RDebug::Printf("R");
-		RDebug::Printf("A");
-		RDebug::Printf("C");
-		RDebug::Printf("E");
-		}
-	
-	//another arbitrary function to set a BP on
-	RMDebug_StepTest_Non_PC_Modifying();
-	}
-
-CDebugServThread::~CDebugServThread()
-    {
-    }
-
-CDebugServThread::CDebugServThread()
-//
-// Empty constructor
-//
-	{
-	}
-
-
-/**
- * Check that the RProperty argument does not change within the given amount of time.
- * If the property does change, the error KErrInUse is returned.
- * 
- */
-EXPORT_C TInt TestRunCountSame( RProperty & aProperty, RTimer & aTimer, TTimeIntervalMicroSeconds32 aTimeOut )
-    {
-    TRequestStatus propertyStatus;
-    TRequestStatus timerStatus;
-    TInt propertyValueBefore = 0;
-    TInt propertyValueAfter = 0;
-
-    aProperty.Subscribe( propertyStatus );
-    aProperty.Get( propertyValueBefore );
-    aTimer.After( timerStatus, aTimeOut );
-
-    User::WaitForRequest( propertyStatus, timerStatus );
-    if (propertyStatus != KRequestPending)
-        {
-        RDebug::Printf(" CDebugServThread::TestRunCountSame: Property has been set. Returning KErrInUse");
-        aTimer.Cancel();
-        // Wait for the KErrCancel
-        User::WaitForRequest( timerStatus );
-        return KErrInUse;
-        }
-
-    aProperty.Cancel();
-    //This will wait for the KErrCancel to be issued by the property.
-    User::WaitForRequest( propertyStatus );
-    
-    aProperty.Get( propertyValueAfter );
-    if( propertyValueAfter != propertyValueBefore )
-        {
-        RDebug::Printf(" CDebugServThread::TestRunCountSame: Change in property value. Returning KErrInUse");
-        return KErrInUse;
-        }
-        
-    return KErrNone;
-    }
-
-
-/**
- * Check that the RProperty argument changes within the given amount of time.
- * If the property does not change, the error KErrTimedOut is returned.
- * If the values before and after are the same, the error KErrNotReady is returned
- */
-EXPORT_C TInt WaitForRunCountChange( RProperty & aProperty, RTimer & aTimer, TTimeIntervalMicroSeconds32 aTimeOut )
-    {
-    TRequestStatus propertyStatus;
-    TRequestStatus timerStatus;
-    TInt propertyValueBefore = 0;
-    TInt propertyValueAfter = 0;
-    
-    aProperty.Get( propertyValueBefore );
-    aProperty.Subscribe( propertyStatus );
-
-    aTimer.After( timerStatus, aTimeOut );
-
-    User::WaitForRequest( propertyStatus, timerStatus );
-    if (timerStatus != KRequestPending)
-        {
-        RDebug::Printf(" CDebugServThread::WaitForRunCountChange: timeout. Returning KErrTimedOut");
-        aProperty.Cancel();
-        // Wait for the KErrCancel
-        User::WaitForRequest( propertyStatus );
-        return KErrTimedOut;
-        }
-    
-    aTimer.Cancel();
-    //This will wait for the KErrCancel to be issued by the timer.
-    User::WaitForRequest( timerStatus );
-    
-    aProperty.Get( propertyValueAfter );
-    if( propertyValueAfter == propertyValueBefore )
-        {
-        RDebug::Printf(" CDebugServThread::WaitForRunCountChange: No change in property value. Returning KErrNotReady");
-        return KErrNotReady;
-        }
-        
-    return KErrNone;
-    }
-
-GLDEF_C TInt CDebugServThread::ThreadFunction(TAny*)
-//
-// Generic thread function for testing
-//
-	{
-	// set FunctionChooser to run the default function
-	FunctionChooser = EDefaultFunction;
-
-	CTrapCleanup* cleanup=CTrapCleanup::New();
-	if (cleanup == NULL)
-		{
-		User::Leave(KErrNoMemory);
-		}
-    
-	TInt err = RProperty::Define( RProcess().SecureId(), ERMDBGRunCountProperty, RProperty::EInt );
-    if( (err != KErrAlreadyExists) && (err != KErrNone) )
-        {
-        RDebug::Printf("CDebugServThread::ThreadFunction - unable to create 'ERunCount' property. err:%d", err);
-        }
-    
-	RThread::Rendezvous(KErrNone);
-
-	TestData = 1;
-
-	/* Beware of adding printf or other debug-generating events in this loop because
-	* they interfere with the tests
-	*/
-	while(TestData != 0xFFFFFFFF)
-		{
-        //iRunCountPublish.Set( TestData );
-        RProperty::Set( RProcess().SecureId(), ERMDBGRunCountProperty, TestData );
-        
-		switch(FunctionChooser)
-			{
-			case EDemandPagingFunction:
-				TestPagedCode();
-				break;
-			case EDefaultFunction:
-				// the default function is the stepping test functions
-			case EStepFunction:
-				{
-				RMDebug_BranchTst1();
-
-				// Single stepping test support code
-
-				// ARM tests
-				RMDebug_StepTest_Non_PC_Modifying();
-
-				RMDebug_StepTest_Branch();
-
-				RMDebug_StepTest_Branch_And_Link();
-
-				RMDebug_StepTest_MOV_PC();
-
-				RMDebug_StepTest_LDR_PC();
- 
-// thumb/interworking tests not supported on armv4
-#ifdef __MARM_ARMV5__
-
-				// Thumb tests
-				RMDebug_StepTest_Thumb_Non_PC_Modifying();
-
-				RMDebug_StepTest_Thumb_Branch();
-
-				RMDebug_StepTest_Thumb_Branch_And_Link();
-
-				RMDebug_StepTest_Thumb_Back_Branch_And_Link();
-
-				// ARM <-> Thumb interworking tests
-				RMDebug_StepTest_Interwork();
-
-				RMDebug_StepTest_Thumb_AddPC();
-
-#endif	// __MARM_ARMV5__
-				
-				// Single-stepping performance
-				RMDebug_StepTest_Count();
-
-				// multiple step test
-				RMDebug_StepTest_ARM_Step_Multiple();
-
-				// Breakpoints in loop test
-				RMDebug_Bkpt_Test_Entry();
-
-				TestData++;
-				
-				RDebug::Printf("** TestData=%d", TestData) ;
-
-				// Wait 50mSecs. // (suspends this thread)
-				User::After(50000);
-
-				break;
-				}
-			case EMultipleTraceCalls:
-				TestMultipleTraceCalls();
-				break;
-			default:
-				//do nothing
-				break;
-			}
-		}
-
-	RProperty::Delete( RProcess().SecureId(), ERMDBGRunCountProperty );
-	        
-	delete cleanup;
-
-	return (KErrNone);
-	}
-
-EXPORT_C TInt StartDebugThread(RThread& aDebugThread, const TDesC& aDebugThreadName)
-//
-// Starts a test thread
-//
-{
-	TInt res=KErrNone;
-
-	// Create the thread
-	res = aDebugThread.Create(	aDebugThreadName,
-								CDebugServThread::ThreadFunction,
-								KDefaultStackSize,
-								KDebugThreadDefaultHeapSize,
-								KDebugThreadDefaultHeapSize,
-								NULL
-								);
-
-	// Check that the creation worked
-	if (res == KErrNone)
-		{
-		TRequestStatus rendezvousStatus;
-
-		aDebugThread.SetPriority(EPriorityNormal);
-		// Make a request for a rendezvous
-		aDebugThread.Rendezvous(rendezvousStatus);
-		// Set the thread as ready for execution
-		aDebugThread.Resume();
-		// Wait for the resumption
-		User::WaitForRequest(rendezvousStatus);
-		}                                 
-	else
-		{
-		// Close the handle.
-		aDebugThread.Close();
-		}
-	        
-	return res;
-	}
--- a/debugsrv/runmodedebug/rmdebug_test/rm_debug/debug_targets/d_rmdebugthread2.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,71 +0,0 @@
-// Copyright (c) 2006-2009 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:
-//
-// Description:
-// Definitions for the run mode debug test thread.
-// 
-//
-
-#ifndef RMDEBUGSVRTHRD_H
-#define RMDEBUGSVRTHRD_H
-
-#include <e32property.h>
-
-#define SYMBIAN_RMDBG_MEMORYSIZE    1024*4
-
-// Thread name
-_LIT(KDebugThreadName,"DebugThread");
-
-
-IMPORT_C TInt TestRunCountSame( 
-            RProperty & aProperty, 
-            RTimer & aTimer, 
-            TTimeIntervalMicroSeconds32 aTimeOut = 500000 );
-
-
-IMPORT_C TInt WaitForRunCountChange( 
-            RProperty & aProperty, 
-            RTimer & aTimer, 
-            TTimeIntervalMicroSeconds32 aTimeOut = 500000 );
-
-const TUint KDebugThreadDefaultHeapSize=0x10000;
-
-// enumeration of functions which the target debug thread can call, the
-// debugger can choose to switch the thread to a different function by
-// writing the appropriate enumeration value into FunctionChooser, the
-// target thread will finish executing the function it is currently running
-// then execute the chosen function.
-enum TTestFunction
-	{
-	EDefaultFunction = 0,
-	EStepFunction = 1,
-	EDemandPagingFunction = 2,
-	EMultipleTraceCalls = 3,
-	EDoNothing = 4
-	};
-
-class CDebugServThread : public CBase
-	{
-	public:
-		CDebugServThread();
-		~CDebugServThread();
-		static TInt ThreadFunction(TAny* aStarted);    
-		
-
-	//Enums for all the properties used by this class
-	enum TRMDebugProperties 
-            { 
-            ERMDBGRunCountProperty = 3
-            };
-	};
-
-#endif // RMDEBUGSVRTHRD_H
--- a/debugsrv/runmodedebug/rmdebug_test/rm_debug/debug_targets/d_rmdebugthreadasm.cia	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-// Copyright (c) 2006-2009 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:
-//
-// Description:
-// d_rmdebugthreadasm.h
-// Assembler file for debug thread testing.
-// 
-//
-
-//#include <e32cia.h>
-//#include <e32base.h>
-//#include <e32cons.h>
-//#include "d_rmdebugthread.h"
-
-EXPORT_C __NAKED__ void RMDebug_BranchTst1( void )
-//
-// 
-//
-{
-	asm("mov r0, #0 ");			// aResult==KErrNone
-	asm("bx  lr ");             // Return
-}
-
--- a/debugsrv/runmodedebug/rmdebug_test/rm_debug/debug_targets/d_rmdebugthreadasm2.cia	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-// Copyright (c) 2006-2009 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:
-//
-// Description:
-// d_rmdebugthreadasm2.h
-// Assembler file for debug thread testing.
-// 
-//
-
-EXPORT_C __NAKED__ void RMDebug_BranchTst1( void )
-//
-// 
-//
-{
-	asm("mov r0, #0 ");			// aResult==KErrNone
-	asm("bx  lr ");             // Return
-}
-
-EXPORT_C __NAKED__ void RMDebug_BranchTst2( void )
-//
-// 
-//
-{
-	asm("mov r0, #0 ");			// aResult==KErrNone
-	asm("bx  lr ");             // Return
-}
--- a/debugsrv/runmodedebug/rmdebug_test/rm_debug/debug_targets/t_rmdebug_app.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,415 +0,0 @@
-// 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:
-//
-// Description:
-//
-
-#include <e32base.h>
-#include <e32base_private.h>
-#include <e32cmn.h>
-#include <e32cmn_private.h>
-#include <e32debug.h>
-#include <e32property.h> 
-#include <u32hal.h>
-#include <hal.h>
-#include <f32file.h>
-#include <e32svr.h>
-#include <e32const.h>
-
-
-#include "t_rmdebug_app.h"
-
-IMPORT_C extern void RMDebug_BranchTst2();
-
-LOCAL_C void ParseCommandLineL(TInt32& aFunctionType, TUint& aDelay, TUint& aExtraThreads, TInt32& aCpuNumber, TInt32& aThreadPriority)
-	{
-
-	// get the length of the command line arguments
-	TInt argc = User::CommandLineLength();
-	RDebug::Printf(" t_rmdebug_app: ParseCommandLineL argc=%d", argc);
-
-	// allocate a buffer for the command line arguments and extract the data to it
-	HBufC* commandLine = HBufC::NewLC(argc);
-	TPtr commandLineBuffer = commandLine->Des();
-	User::CommandLine(commandLineBuffer);
-
-	// create a lexer and read through the command line
-	TLex lex(*commandLine);
-	while (!lex.Eos())
-		{
-		// expecting the first character to be a '-'
-		if (lex.Get() == '-')
-			{
-			TChar arg = lex.Get();
-			switch (arg)
-				{
-				case 'f':
-					// the digits following '-f' give the function type
-					User::LeaveIfError(lex.Val(aFunctionType));
-					RDebug::Printf(" t_rmdebug_app: setting aFunctionType=%d", aFunctionType);
-					break;
-				case 'd':
-					// the digits following '-d' give the delay
-					User::LeaveIfError(lex.Val(aDelay));
-					RDebug::Printf(" t_rmdebug_app: setting aDelay=%d", aDelay);
-					break;
-				case 'e':
-					// the digits following '-e' give the number of extra threads to launch
-					User::LeaveIfError(lex.Val(aExtraThreads));
-					RDebug::Printf(" t_rmdebug_app: setting aExtraThreads=%d", aExtraThreads);
-					break;
-
-				case 'p':
-					// the digits following '-p' gives the value to set for the main thread priority
-					User::LeaveIfError(lex.Val(aThreadPriority));
-					RDebug::Printf(" t_rmdebug_app: aThreadPriority =%d", aThreadPriority);
-					break;
-
-				case 'a':
-					// the digits following '-a' gives the cpu on which this thread will execute on
-					User::LeaveIfError(lex.Val(aCpuNumber));
-					RDebug::Printf(" t_rmdebug_app: CPU Number =%d", aCpuNumber );
-					break;
-
-				default:
-					// unknown argument so leave
-					User::Leave(KErrArgument);
-				}
-			lex.SkipSpace();
-			}
-		else
-			{
-			// unknown argument so leave
-			User::Leave(KErrArgument);
-			}
-		}
-
-	// do clean up
-	CleanupStack::PopAndDestroy(commandLine);
-	}
-
-typedef void (*TPfun)();
-
-// test function to call corresponding to EPrefetchAbortFunction
-void PrefetchAbort()
-	{
-	TPfun f = NULL;
-	f();
-	}
-
-// test function to call corresponding to EUserPanicFunction
-void UserPanic()
-	{
-	User::Panic(KUserPanic, KUserPanicCode);
-	}
-
-// calls self repeatedly until stack is used up. Slightly convoluted to prevent UREL optimising this out...
-TUint32 StackOverFlowFunction(TUint32 aInt=0)
-	{
-	TUint32 unusedArray[150];
-	for(TInt i=0; i<150; i++)
-		{
-		unusedArray[i] = StackOverFlowFunction(i);
-		}
-	return unusedArray[0];
-	}
-
-void DataAbort()
-	{
-	TInt* r = (TInt*) 0x1000;
-	*r = 0x42;              
-	}
-
-void UndefInstruction()
-	{
-	TUint32 undef = 0xE6000010;
-	TPfun f = (TPfun) &undef;
-	f();
-	}
-
-TInt DataRead()
-	{
-	TInt* r = (TInt*) 0x1000;
-	TInt rr = (TInt)*r;
-	//include the following line to ensure that rr doesn't get optimised out
-	RDebug::Printf("Shouldn't see this being printed out: %d", rr);
-
-	// Stop compilation warning. Should not get here anyway.
-	rr++;
-	return rr;
-	}
-
-void DataWrite()
-	{
-	TInt* r = (TInt*) 0x1000;
-	*r = 0x42;                
-	}
-
-void UserException()
-	{
-	User::RaiseException(EExcGeneral);
-	}
-
-void SpinForeverWithBreakPoint()
-	{
-
-    // finding the process t_rmdebug2/t_rmdebug2_oem/t_rmdebug2_oem2
-    // we find the process.SID to attach to the property
-	_LIT(KThreadWildCard, "t_rmdebug2*");
-
-	TInt err = KErrNone;
-	TUid propertySid = KNullUid;
-	TFindThread find(KThreadWildCard);
-	TFullName name;
-	TBool found = EFalse;
-	while(find.Next(name)==KErrNone && !found)
-		{
-		RThread thread;
-		err = thread.Open(find);
-		if (err == KErrNone)
-			{
-			RProcess process;
-			thread.Process(process);
-			TFullName fullname = thread.FullName();
-		    //RDebug::Printf("SID Search Match Found Name %lS Process ID%ld Thread Id %ld", &fullname, process.Id().Id(), thread.Id().Id());
-			found = ETrue;
-			//SID saved so that the property can be attached to
-			propertySid = process.SecureId();
-			process.Close();
-			}
-		thread.Close();
-	}
-
-    // publish the address of the RMDebug_BranchTst2 with the correct SID value
-	TInt address = (TInt)&RMDebug_BranchTst2;
-	err = RProperty::Set(propertySid, EMyPropertyInteger, address);
-	if(KErrNone != err)
-		RDebug::Printf("Error Set of the property %d", err);
-	
-	//open semaphore to signal the fact we have reached the point where we have to set the property
-	RSemaphore globsem;
-	globsem.OpenGlobal(_L("RMDebugGlobSem"));
-	globsem.Signal();
-	globsem.Close();
-
-	RProcess thisProcess;
-	TFileName thisProcessName = thisProcess.FileName();
-	RDebug::Print(_L("App Process Name %S process id %ld thread id %ld"), &thisProcessName, thisProcess.Id().Id(), RThread().Id().Id());
-
-	TInt i=0;
-	RThread::Rendezvous(KErrNone);
-	while(i<0xffffffff)
-		{
-		RMDebug_BranchTst2();
-		User::After(10000);
-		}
-	}
-
-void SpinForever()
-	{
-	TInt i=0;
-	RThread::Rendezvous(KErrNone);
-	while(i<0xffffffff)
-		{
-		User::After(10000);
-		}
-	}
-
-void NormalExit()
-    {
-    RDebug::Printf("Target app: NormalExit() function. Returning to MainL" );
-    }
-
-void LaunchThreads(TUint aNumber)
-	{
-	_LIT(KDebugThreadName, "DebugThread");
-	const TUint KDebugThreadDefaultHeapSize=0x10000;
-	for(TInt i=0; i<aNumber; i++)
-		{
-		RThread thread;
-		RBuf threadName;
-		threadName.Create(KDebugThreadName().Length()+10); // the 10 is for appending i to the end of the name
-		threadName.Append(KDebugThreadName());
-		threadName.AppendNum(i);
-		TInt err = thread.Create(threadName, (TThreadFunction)SpinForever, KDefaultStackSize, KDebugThreadDefaultHeapSize, KDebugThreadDefaultHeapSize, NULL);
-		if(err != KErrNone)
-			{
-			RDebug::Printf("Couldn't create thread %d", err);
-			threadName.Close();
-			thread.Close();
-			break;
-			}
-		thread.SetPriority(EPriorityNormal);
-		TRequestStatus status;
-		thread.Rendezvous(status);
-		thread.Resume();
-		User::WaitForRequest(status);
-		thread.Close();
-		threadName.Close();
-		}
-	}
-
-void WaitFiveSecondsThenExit(void)
-	{
-	// wait for 5 seconds
-	User::After(5000000);
-	}
-
-TInt NumberOfCpus()
-	{
-	TInt r = UserSvr::HalFunction(EHalGroupKernel, EKernelHalNumLogicalCpus, 0, 0);
-	return r;
-	}
-
-TInt SetCpuAffinity(TInt aCpuNumber)
-	{
-    TInt TestCpuCount = NumberOfCpus();
-	RDebug::Printf("SetCpuAffinity --> TestCpuCount = %d\n", TestCpuCount);		
-	TUint32 cpu = 0;
-
-	if ((aCpuNumber % TestCpuCount) != 0)
-	cpu = (TUint32)(aCpuNumber % TestCpuCount);
-
-	RDebug::Printf("SetCpuAffinity --> Setting cpu %3d\n", cpu);
-	TInt r = UserSvr::HalFunction(EHalGroupKernel, EKernelHalLockThreadToCpu, (TAny *)cpu, 0);
-	return r;
-	}
-
-void SetCurrentThreadPriority(TInt aThreadPriority)
-    {
-     RDebug::Printf("SetCurrentThreadPriority  aThreadPriority =%d\n", aThreadPriority);
-     RThread().SetPriority((TThreadPriority) aThreadPriority);
-     RDebug::Printf("SetCurrentThreadPriority Crashapp RThread Priority() = %d", (TInt) RThread().Priority()) ;
-    }
-
-TInt GetTimeInMs()
-{
-    TInt period = 0;
-    User::LeaveIfError(HAL::Get(HALData::ENanoTickPeriod, period));
-    TInt periodInMs = period / 1000;
-    return User::NTickCount() * periodInMs;
-}
-
-void SetNanoTickTime()
-    {
-    TUid t_performance_test_Sid;
-    t_performance_test_Sid.iUid = 0x102831E5;
-    RProperty::Set(t_performance_test_Sid, EPropertyTimeOfCrash, GetTimeInMs());    
-    }
-
-// call the function corresponding to aFunctionType
-LOCAL_C void CallFunction(TDebugFunctionType aFunctionType, TUint aDelay, TUint aExtraThreads, TInt32 aCpuNumber, TUint aThreadPriority )
-	{
-
-	// pause for aDelay microseconds
-	User::After(aDelay);
-
-	// set cpu on which this thread should execute on
-	if ( aCpuNumber )
-		SetCpuAffinity(aCpuNumber);
-	
-	if ( aThreadPriority )
-	    SetCurrentThreadPriority(aThreadPriority);
-
-	// launch the extra threads
-	LaunchThreads(aExtraThreads);
-	
-	// Publish Nano tick count time for RMDBG performance testing
-	SetNanoTickTime();
-	    
-	// call appropriate function
-	switch( aFunctionType )
-		{
-		case EPrefetchAbortFunction:
-			PrefetchAbort();
-			break;
-		case EUserPanicFunction:
-			UserPanic();
-			break;
-		case EStackOverflowFunction:
-			StackOverFlowFunction();
-			break;
-		case EDataAbortFunction:
-			DataAbort();
-			break;
-		case EUndefInstructionFunction:
-			UndefInstruction();
-			break;
-		case EDataReadErrorFunction:
-			DataRead();
-			break;
-		case EDataWriteErrorFunction:
-			DataWrite();
-			break;
-		case EUserExceptionFunction:
-			UserException();
-			break;
-		case EWaitFiveSecondsThenExit:
-			WaitFiveSecondsThenExit();
-			break;
-		case ESpinForever:
-			SpinForever();
-			break;
-		case ESpinForeverWithBreakPoint:
-			SpinForeverWithBreakPoint();
-			break;
-        case ENormalExit:
-            NormalExit();
-            break;			
-		case EDefaultDebugFunction:
-		default:
-			break;
-		}
-	}
-
-void PrintHelp()
-	{
-	RDebug::Printf("Invoke with arguments:\n");
-	RDebug::Printf("\t-d<delay>\n\t: delay in microseconds before calling target function\n");
-	RDebug::Printf("\t-f<function-number>\n\t: enumerator from TDebugFunctionType representing function to call\n");
-	RDebug::Printf("\t-e<number>\n\t: number of extra threads to launch, these threads run endlessly\n");
-	}
-
-TInt E32Main()
-	{
-    
-    RDebug::Printf("<<<<< E32Main() RThread Priority() = %d, RProcess Priority() = %d", (TInt) RThread().Priority(), (TInt) RProcess().Priority()) ;   
-	RDebug::Printf("t_rmdebug_app tid=%d,pid=%d", I64LOW(RThread().Id().Id()), I64LOW(RProcess().Id().Id()) ) ;
-	// setup heap checking and clean up trap
-	__UHEAP_MARK;
-	CTrapCleanup* cleanup=CTrapCleanup::New();
-	RThread().SetPriority(EPriorityNormal);
-	RProcess::Rendezvous(KErrNone);
-	
-	// read arguments from command line
-	TUint delay = 0;
-	TInt32 functionTypeAsTInt32 = (TInt32)EDefaultDebugFunction;
-	TUint extraThreads = 0;
-	TInt32 aCpuNumber = 0;
-	TInt32 aThreadPriority = 0;
-
-	TRAPD(err, ParseCommandLineL(functionTypeAsTInt32, delay, extraThreads, aCpuNumber, aThreadPriority));
-
-	RDebug::Printf("E32Main :: aThreadPriority=%d", aThreadPriority ) ;
-	
-	if(KErrNone == err)
-		{
-		// if the command line arguments were successfully read then call the appropriate function
-		CallFunction((TDebugFunctionType)functionTypeAsTInt32, delay, extraThreads, aCpuNumber, aThreadPriority);
-		}
-
-	// perform clean up and return any error which was recorded
-	delete cleanup;
-	__UHEAP_MARKEND;
-	return err;
-	}
-
--- a/debugsrv/runmodedebug/rmdebug_test/rm_debug/debug_targets/t_rmdebug_app.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,46 +0,0 @@
-// Copyright (c) 2007-2009 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:
-//
-// Description:
-//
-
-#ifndef T_RMDEBUG_APP_H
-#define T_RMDEBUG_APP_H
-
-_LIT(KRMDebugTestApplication, "z:\\sys\\bin\\t_rmdebug_app.exe");
-_LIT(KUserPanic, "UserPanic");
-const TInt KUserPanicCode = 0x1234ABCD;
-
-enum TMyPropertyKeys {EMyPropertyInteger};
-enum TPropertyTimeKeys {EPropertyTimeOfCrash};
-
-
-// enumeration of functions to call in test debug application
-enum TDebugFunctionType
-	{
-	EDefaultDebugFunction,
-	EPrefetchAbortFunction,
-	EUserPanicFunction,
-	EStackOverflowFunction,
-	EDataAbortFunction,
-	EUndefInstructionFunction,
-	EDataReadErrorFunction,
-	EDataWriteErrorFunction,
-	EUserExceptionFunction,
-	EWaitFiveSecondsThenExit,
-	ESpinForever,
-	ESpinForeverWithBreakPoint,
-	ENormalExit
-	};
-
-#endif //T_RMDEBUG_APP_H
-
--- a/debugsrv/runmodedebug/rmdebug_test/rm_debug/debug_targets/t_rmdebug_dll.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
-// Copyright (c) 2007-2009 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:
-//
-// Description:
-//
-
-#include <e32std.h>
-#include <e32std_private.h>
-#include <rm_debug_api.h>
-#include "t_rmdebug_dll.h"
-
-EXPORT_C TUid GetDSSUid()
-	{
-	return Debug::KUidDebugSecurityServer;
-	}
-
--- a/debugsrv/runmodedebug/rmdebug_test/rm_debug/debug_targets/t_rmdebug_dll.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-// Copyright (c) 2007-2009 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:
-//
-// Description:
-//
-
-#include <e32std.h>
-
-/**
-  This is a simple function that uses an element from rm_debug_api.h.
-  If the e32tests can be built and run then this is 'proof' that the
-  rm_debug_api.h header file can be #include'd into a dll
-  */
-IMPORT_C TUid GetDSSUid();
--- a/debugsrv/runmodedebug/rmdebug_test/rm_debug/debug_targets/t_rmdebug_security.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,100 +0,0 @@
-// Copyright (c) 2006-2009 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:
-//
-// Description:
-// Target application to be debugged by t_rmdebug.exe when testing
-// security restrictions. This application is built with various
-// capabilities by the t_rmdebug_securityX.mmp files. This allows
-// the t_rmdebug2 program to ensure that security restrictions are
-// properly enforced by the DSS/DDD subsystem.
-// 
-//
-
-#include <e32base.h>
-#include <e32base_private.h>
-#include <e32cons.h>
-#include <e32test.h>
-#include <e32ldr.h>
-#include <e32cmn.h>
-#include <e32cmn_private.h>
-#include "t_rmdebug_security.h"
-
-CRunModeApp* CRunModeApp::NewL()
-//
-// CRunModeApp::NewL
-//
-	{
-	CRunModeApp* self = new(ELeave) CRunModeApp();
-
-  	self->ConstructL();
-   
-	return self;
-	}
-
-CRunModeApp::CRunModeApp()
-//
-// CRunModeApp constructor
-//
-	{
-	}
-
-CRunModeApp::~CRunModeApp()
-//
-// CRunModeApp destructor
-//
-	{
-	}
-
-void CRunModeApp::ConstructL()
-//
-// CRunModeApp::ConstructL
-//
-	{
-	}
-
-void CRunModeApp::TestWaitDebug()
-//
-// CRunModeApp::TestWaitDebug
-//
-	{
-	RProcess::Rendezvous(KErrNone);
-
-	// Wait a 3secs then quit (long enough to test, but not hang around forever)
-	User::After(3000000);
-	}
-
-GLDEF_C TInt E32Main()
-//
-// Entry point for run mode debug app test program
-//
-	{
-   TInt ret = KErrNone;
-   
-	// client
-	CTrapCleanup* trap = CTrapCleanup::New();
-	if (!trap)
-		return KErrNoMemory;
-
-   CRunModeApp* myApp = CRunModeApp::NewL();
-   if (myApp != NULL)
-       {
-        __UHEAP_MARK;
-	    TRAP(ret,myApp->TestWaitDebug());
-	    __UHEAP_MARKEND;
-
-	    delete myApp;
-       }
-       
-	delete trap;
-
-	return ret;
-	}
--- a/debugsrv/runmodedebug/rmdebug_test/rm_debug/debug_targets/t_rmdebug_security.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +0,0 @@
-// Copyright (c) 2006-2009 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:
-//
-// Description:
-// Target application to be debugged by t_rmdebug2.exe when testing
-// security restrictions. This application is built with various
-// capabilities by the t_rmdebug_securityX.mmp files. This allows
-// the t_rmdebug2 program to ensure that security restrictions are
-// properly enforced by the DSS/DDD subsystem.
-// 
-//
-
-/**
- @file
- @internalTechnology
- @released
-*/
-
-#ifndef T_RMDEBUG_SECURITY_H
-#define T_RMDEBUG_SECURITY_H
-
-class CRunModeApp : public CBase
-{
-public:
-	static CRunModeApp* NewL();
-	~CRunModeApp();
-
-	void TestWaitDebug();
-
-private:
-	CRunModeApp();
-	void ConstructL();
-};
-
-#endif // T_RMDEBUG_SECURITY_H
--- a/debugsrv/runmodedebug/rmdebug_test/rm_debug/group/bld.inf	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,94 +0,0 @@
-// Copyright (c) 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:
-//
-// Description:
-// e32test/group/bld.inf
-// Kernel and User library test code
-// 
-//
-
-/**
- @file
-*/
-
-
-PRJ_PLATFORMS
-
-BASEDEFAULT
-
-PRJ_TESTEXPORTS
-
-./t_rmdebug_tests.iby					/epoc32/rom/include/t_rmdebug_tests.iby
-./mytraces_rm_debug_ekern.txt			/epoc32/rombuild/mytraces_rm_debug_ekern.txt
-./mytraces_rm_debug.txt					/epoc32/rombuild/mytraces_rm_debug.txt
-
-./rmdebug.iby							/epoc32/rom/include/rmdebug.iby
-../scripts/tef_execute_rtests.script	z:/scripts/tef_execute_rtests.script
-
-
-PRJ_TESTMMPFILES
-
-/******************************************************************************
- Put all device drivers here. These build both SMP and non-SMP variants.
- User side code builds a single variant for both.
- *NOTE: Base BTB will build properly any kernel-side test code embedded within 
- positive check ( #ifdef SMP ), however these binaries will not be included in BTB 
- autotest images for SMP platforms. Refer to DTW-KHS BTB00055 for more details.
- ******************************************************************************/
-
-/******************************************************************************
- User side code here - builds a single variant for both SMP and non-SMP.
- ******************************************************************************/
-
-#if defined(MARM_ARMV5)
-./t_rmdebug_app support
-./t_rmdebug_app1 support
-./t_rmdebug_app2 support
-./t_rmdebug_app3 support
-./t_rmdebug_app4 support
-./t_rmdebug_app5 support
-./t_rmdebug_app6 support
-./t_rmdebug_app7 support
-./t_rmdebug_app8 support
-./t_rmdebug_app9 support
-./t_rmdebug_app10 support
-
-./t_rmdebug_dll support
-
-./t_rmdebug_security0 support
-./t_rmdebug_security1 support
-./t_rmdebug_security2 support
-./t_rmdebug_security3 support
-
-./t_rmdebug2.mmp
-
-./t_rmdebug2_oem.mmp
-./t_rmdebug2_oemtoken support
-
-./t_rmdebug2_oem2.mmp
-./t_rmdebug2_oemtoken2 support
-
-./t_rmdebug2_allcaps.mmp
-./t_rmdebug2_allcapstoken support
-
-./t_rmdebug_target_launcher support
-./t_rmdebug_multi_target.mmp
-
-./t_rmdebug_multi_agent support
-./t_multi_agent_launcher.mmp
-
-./t_rmdebug_performance_allcapstoken
-./t_performance_test.mmp
-
-#endif
-
-
--- a/debugsrv/runmodedebug/rmdebug_test/rm_debug/group/mytraces_rm_debug.txt	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-_fh4hrp_scmonitornor.dll
-_h4hrp_scmonitornor.dll
-OEMDebug_10282FE5.exe
-OEMDebug_102831E5.exe
-OEMDebug_F1234567.exe
-OEMDebug_F123ABCD.exe
-OEMDebug_F123ABCE.exe
-rm_debug.ldd
-rm_debug_svr.exe
-scmonitor_serial.dll
-t_crashmonitor_lib.exe
-t_performance_test.exe
-t_rmdebug_app.exe
-t_rmdebug_app1.exe
-t_rmdebug_app10.exe
-t_rmdebug_app2.exe
-t_rmdebug_app3.exe
-t_rmdebug_app4.exe
-t_rmdebug_app5.exe
-t_rmdebug_app6.exe
-t_rmdebug_app7.exe
-t_rmdebug_app8.exe
-t_rmdebug_app9.exe
-t_rmdebug_attachall.exe
-t_rmdebug_dll.dll
-t_rmdebug_multi_agent.exe
-t_rmdebug_multi_target.exe
-t_rmdebug_security0.exe
-t_rmdebug_security1.exe
-t_rmdebug_security2.exe
-t_rmdebug_security3.exe
-t_rmdebug_target_launcher.exe
-t_rmdebug2.exe
-t_rmdebug2_allcaps.exe
-t_rmdebug2_oem.exe
-t_rmdebug2_oem2.exe
-t_trkdummyapp.exe
\ No newline at end of file
--- a/debugsrv/runmodedebug/rmdebug_test/rm_debug/group/mytraces_rm_debug_ekern.txt	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-_34xx_sdp_ekern.exe
-_8500_ekern.exe
-_f34xx_sdp_ekern.exe
-_fh4hrp_ekern.exe
-_fne1_tb_ekern.exe
-_h4hrp_ekern.exe
-_lab_ekern.exe
-_ne1_tb_ekern.exe
-_rapu_ekern.exe
-_rapu_fmm_ekern.exe
-_template_ekern.exe
-
-_fh4hrp_scmonitornor.dll
-_h4hrp_scmonitornor.dll
-OEMDebug_10282FE5.exe
-OEMDebug_102831E5.exe
-OEMDebug_F1234567.exe
-OEMDebug_F123ABCD.exe
-OEMDebug_F123ABCE.exe
-rm_debug.ldd
-rm_debug_svr.exe
-scmonitor_serial.dll
-t_crashmonitor_lib.exe
-t_performance_test.exe
-t_rmdebug_app.exe
-t_rmdebug_app1.exe
-t_rmdebug_app10.exe
-t_rmdebug_app2.exe
-t_rmdebug_app3.exe
-t_rmdebug_app4.exe
-t_rmdebug_app5.exe
-t_rmdebug_app6.exe
-t_rmdebug_app7.exe
-t_rmdebug_app8.exe
-t_rmdebug_app9.exe
-t_rmdebug_attachall.exe
-t_rmdebug_dll.dll
-t_rmdebug_multi_agent.exe
-t_rmdebug_multi_target.exe
-t_rmdebug_security0.exe
-t_rmdebug_security1.exe
-t_rmdebug_security2.exe
-t_rmdebug_security3.exe
-t_rmdebug_target_launcher.exe
-t_rmdebug2.exe
-t_rmdebug2_allcaps.exe
-t_rmdebug2_oem.exe
-t_rmdebug2_oem2.exe
-t_trkdummyapp.exe
\ No newline at end of file
--- a/debugsrv/runmodedebug/rmdebug_test/rm_debug/group/rmdbg_test.pkg	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,64 +0,0 @@
-// Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "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:
-//
-// Description: 
-//
-
-// BINARIES NEEDED BY TESTS BELOW
-"\epoc32\release\armv5\udeb\t_rmdebug_app.exe"-"c:\sys\bin\t_rmdebug_app.exe"
-"\epoc32\release\armv5\udeb\t_rmdebug_app1.exe"-"c:\sys\bin\t_rmdebug_app1.exe"
-"\epoc32\release\armv5\udeb\t_rmdebug_app2.exe"-"c:\sys\bin\t_rmdebug_app2.exe"
-"\epoc32\release\armv5\udeb\t_rmdebug_app3.exe"-"c:\sys\bin\t_rmdebug_app3.exe"
-"\epoc32\release\armv5\udeb\t_rmdebug_app4.exe"-"c:\sys\bin\t_rmdebug_app4.exe"
-"\epoc32\release\armv5\udeb\t_rmdebug_app5.exe"-"c:\sys\bin\t_rmdebug_app5.exe"
-"\epoc32\release\armv5\udeb\t_rmdebug_app6.exe"-"c:\sys\bin\t_rmdebug_app6.exe"
-"\epoc32\release\armv5\udeb\t_rmdebug_app7.exe"-"c:\sys\bin\t_rmdebug_app7.exe"
-"\epoc32\release\armv5\udeb\t_rmdebug_app8.exe"-"c:\sys\bin\t_rmdebug_app8.exe"
-"\epoc32\release\armv5\udeb\t_rmdebug_app9.exe"-"c:\sys\bin\t_rmdebug_app9.exe"
-"\epoc32\release\armv5\udeb\t_rmdebug_app10.exe"-"c:\sys\bin\t_rmdebug_app10.exe"
-
-"\epoc32\release\armv5\udeb\t_rmdebug_dll.dll"-"c:\sys\bin\t_rmdebug_dll.dll"
-
-"\epoc32\release\armv5\udeb\t_rmdebug_security0.exe"-"c:\sys\bin\t_rmdebug_security0.exe"
-"\epoc32\release\armv5\udeb\t_rmdebug_security1.exe"-"c:\sys\bin\t_rmdebug_security1.exe"
-"\epoc32\release\armv5\udeb\t_rmdebug_security2.exe"-"c:\sys\bin\t_rmdebug_security2.exe"
-"\epoc32\release\armv5\udeb\t_rmdebug_security3.exe"-"c:\sys\bin\t_rmdebug_security3.exe"
-
-
-//RUN_RTESTS_AS_TEF
-"\epoc32\data\z\scripts\tef_execute_rtests.script"-"c:\scripts\tef_execute_rtests.script"
-
-
-//No token required
-"\epoc32\release\armv5\udeb\t_rmdebug2.exe"-"c:\sys\bin\t_rmdebug2.exe"
-
-//SOMECAPS_DEBUGTOKEN
-"\epoc32\release\armv5\udeb\t_rmdebug2_oem.exe"-"c:\sys\bin\t_rmdebug2_oem.exe"
-"\epoc32\release\armv5\udeb\OEMDebug_F123ABCD.exe"-"c:\sys\bin\OEMDebug_F123ABCD.exe"
-
-//FEWCAPS_DEBUGTOKEN
-"\epoc32\release\armv5\udeb\t_rmdebug2_oem2.exe"-"c:\sys\bin\t_rmdebug2_oem2.exe"
-"\epoc32\release\armv5\udeb\OEMDebug_F1234567.exe"-"c:\sys\bin\OEMDebug_F1234567.exe"
-
-//ALLCAPS_DEBUGTOKEN
-"\epoc32\release\armv5\udeb\t_rmdebug2_allcaps.exe"-"c:\sys\bin\t_rmdebug2_allcaps.exe"
-"\epoc32\release\armv5\udeb\OEMDebug_F123ABCE.exe"-"c:\sys\bin\OEMDebug_F123ABCE.exe"
-
-"\epoc32\release\armv5\udeb\t_rmdebug_target_launcher.exe"-"c:\sys\bin\t_rmdebug_target_launcher.exe"
-"\epoc32\release\armv5\udeb\t_rmdebug_multi_target.exe"-"c:\sys\bin\t_rmdebug_multi_target.exe"
-
-"\epoc32\release\armv5\udeb\t_rmdebug_multi_agent.exe"-"c:\sys\bin\t_rmdebug_multi_agent.exe"
-"\epoc32\release\armv5\udeb\t_multi_agent_launcher.exe"-"c:\sys\bin\t_multi_agent_launcher.exe"
-
-//PERFORMANCE TEST DEBUGTOKEN
-"\epoc32\release\armv5\udeb\t_performance_test.exe"-"c:\sys\bin\t_performance_test.exe"
-"\epoc32\release\armv5\udeb\OEMDebug_102831E5.exe"-"c:\sys\bin\OEMDebug_102831E5.exe"
--- a/debugsrv/runmodedebug/rmdebug_test/rm_debug/group/rmdebug.iby	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,18 +0,0 @@
-// Copyright (c) 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:
-//
-// Description:
-// Build configuration file for Sirocco
-//
-
-extension[VARID]=KERNEL_DIR\DEBUG_DIR\rm_debug.ldd		\sys\bin\rm_debug.ldd
-file=KERNEL_DIR\DEBUG_DIR\rm_debug_svr.exe		\sys\bin\rm_debug_svr.exe
--- a/debugsrv/runmodedebug/rmdebug_test/rm_debug/group/t_multi_agent_launcher.mmp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +0,0 @@
-// Copyright (c) 2006-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:
-//
-// Description:
-// Application that launches multiple agents which in-turn test the ability of 
-// the run mode debug component to debug several targets
-// 
-//
-
-// This is an RTest configured to run on Sirocco, hence the testexecuteutils linked in lib below.
-
-targettype     exe
-target         t_multi_agent_launcher.exe
-
-library		euser.lib hal.lib
-library		testexecuteutils.lib // for Sirocco
-
-OS_LAYER_SYSTEMINCLUDE_SYMBIAN
-
-userinclude    ../debug_targets
-userinclude    ../common
-userinclude    ../multi_agent_tests
-
-sourcepath	   ../multi_agent_tests
-source         t_multi_agent_launcher.cpp 
-
-UID            0x0 0x4321bbbc
-SECUREID       0x1234aaab
-VENDORID       0x70000001
-
-DEBUGGABLE
-
-macro NO_DEBUGTOKEN
-
-SMPSAFE
--- a/debugsrv/runmodedebug/rmdebug_test/rm_debug/group/t_performance_test.mmp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-// Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "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:
-//
-// Description:
-// 
-//
-
-// This is an RTest configured to run on Sirocco, hence the testexecuteutils linked in lib below.
-
-TARGET        t_performance_test.exe
-TARGETTYPE    exe
-UID			  0x1000008D 0x102831E5
-VENDORID	  0x70000001
-
- 
-USERINCLUDE   ../common
-USERINCLUDE   ../performance_test
-USERINCLUDE   ../debug_targets
-SOURCEPATH    ../performance_test
-
-OS_LAYER_SYSTEMINCLUDE_SYMBIAN
-
-library       euser.lib
-library       hal.lib
-library       testexecuteutils.lib // for Sirocco
-
-DEBUGGABLE
-
-MACRO SYMBIAN_TRACE_ENABLE
-
-SOURCE t_rmdebug_performance_test.cpp
--- a/debugsrv/runmodedebug/rmdebug_test/rm_debug/group/t_rmdebug.iby	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
-// Copyright (c) 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:
-//
-// Description:
-// Tests the functionality of the run mode debug device driver.
-//
-//
-
-
-#ifndef T_RMDEBUG_IBY
-#define T_RMDEBUG_IBY
-
-file=ABI_DIR\DEBUG_DIR\t_rmdebug2.exe			\sys\bin\t_rmdebug2.exe
-file=ABI_DIR\DEBUG_DIR\t_rmdebug2_oem.exe			\sys\bin\t_rmdebug2_oem.exe
-file=ABI_DIR\DEBUG_DIR\OEMDebug_F123ABCD.exe	\sys\bin\OEMDebug_F123ABCD.exe
-
-file=ABI_DIR\DEBUG_DIR\t_rmdebug_dll.dll		\sys\bin\t_rmdebug_dll.dll
-
-#endif
\ No newline at end of file
--- a/debugsrv/runmodedebug/rmdebug_test/rm_debug/group/t_rmdebug.mmp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-// Copyright (c) 2006-2009 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:
-//
-// Description:
-// 
-//
-
-ALWAYS_BUILD_AS_ARM
-
-target         t_rmdebug.exe
-targettype     exe
-
-sourcepath	   	../metro_trk
-source        	d_rmdebugserver.cpp 
-source        	d_rmdebugthread.cpp 
-source        	t_rmdebug.cpp 
-sourcepath	   	../common
-source			d_rmdebugthreadasm.cia
-
-library		euser.lib
-               
-SYMBIAN_BASE_SYSTEMINCLUDE(nkern)
-OS_LAYER_SYSTEMINCLUDE_SYMBIAN
-
-UID            0x100039CE 0x101F7159
-SECUREID       0x101F7159
-VENDORID       0x70000001
-
-CAPABILITY 	ALL -TCB
-
-SMPSAFE
--- a/debugsrv/runmodedebug/rmdebug_test/rm_debug/group/t_rmdebug2.mmh	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,66 +0,0 @@
-// Copyright (c) 2006-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:
-//
-// Description:
-// 
-//
-
-ALWAYS_BUILD_AS_ARM
-
-targettype     exe
-
-sourcepath	   	..\debug_targets
-
-source        	d_rmdebugthread2.cpp 
-source			d_rmdebugthreadasm2.cia
-
-#if defined(MARM_ARMV5)
-source			d_rmdebug_step_test.s
-source			d_rmdebug_bkpt_test.s
-#endif
-
-#if defined(MARM_ARMV4)
-source			d_rmdebug_step_test_armv4.s
-#endif
-
-source			d_demand_paging.cia
-
-library		euser.lib
-library         hal.lib
-library         efsrv.lib
-library         t_rmdebug_dll.lib
-
-userinclude    ..\..\..\rmdriver\inc
-userinclude    ..\..\..\securityserver\inc
-userinclude    ..\debug_targets
-
-
-#ifdef SYMBIAN_OLD_EXPORT_LOCATION
-SYMBIAN_BASE_SYSTEMINCLUDE(drivers)
-SYMBIAN_BASE_SYSTEMINCLUDE(kernel)
-#endif
-SYMBIAN_BASE_SYSTEMINCLUDE(nkern)
-OS_LAYER_SYSTEMINCLUDE_SYMBIAN
-
-PAGED
-
-// To test heap allocation failure uncomment one or other of the following macros.
-// NOTE: Do not uncomment both, the tests will panic if both are defined!
-
-// To test heap allocation failure in the Debug Device Driver uncomment this macro
-//macro KERNEL_OOM_TESTING
-
-// To test heap allocation failure in the Debug Security Server uncomment this macro
-//macro USER_OOM_TESTING
-
-
-SMPSAFE
--- a/debugsrv/runmodedebug/rmdebug_test/rm_debug/group/t_rmdebug2.mmp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-// Copyright (c) 2006-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:
-//
-// Description:
-// 
-//
-
-// This is an RTest configured to run on Sirocco, hence the testexecuteutils linked in lib below.
-
-#include "t_rmdebug2.mmh"
-
-target         t_rmdebug2.exe
-
-sourcepath	   	../basic_tests
-source        	t_rmdebug2.cpp 
-source		r_low_memory_security_svr_session.cpp
-source		r_kernel_low_memory_security_svr_session.cpp
-source		r_user_low_memory_security_svr_session.cpp
-
-library		testexecuteutils.lib // for Sirocco
-
-UID            0x0 0x4321bbbb
-SECUREID       0x1234aaaa
-VENDORID       0x70000001
-
-CAPABILITY 	READUSERDATA POWERMGMT ALLFILES
-
-DEBUGGABLE
-
-macro NO_DEBUGTOKEN
--- a/debugsrv/runmodedebug/rmdebug_test/rm_debug/group/t_rmdebug2_allcaps.mmp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-// Copyright (c) 2006-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:
-//
-// Description:
-// Same tests as t_rmdebug2.mmp but with OEM rights conferred
-// by the OEMDebug_F123ABCD.exe token file.
-// 
-//
-
-// This is an RTest configured to run on Sirocco, hence the testexecuteutils linked in lib below.
-
-#include "t_rmdebug2.mmh"
-
-target         t_rmdebug2_allcaps.exe
-
-sourcepath	   	../basic_tests
-source        	t_rmdebug2.cpp 
-source		r_low_memory_security_svr_session.cpp
-source		r_kernel_low_memory_security_svr_session.cpp
-source		r_user_low_memory_security_svr_session.cpp
-
-library		testexecuteutils.lib // for Sirocco
-
-UID            0x0 0x4321bbbb
-SECUREID       0xF123abce
-VENDORID       0x70000001
-
-CAPABILITY 	READUSERDATA POWERMGMT ALLFILES
-
-// Used when compiling tests to work in the presence of an
-// OEM Debug Token
-macro ALLCAPS_DEBUGTOKEN
-
--- a/debugsrv/runmodedebug/rmdebug_test/rm_debug/group/t_rmdebug2_allcapstoken.mmp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-// Copyright (c) 2007-2009 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:
-//
-// Description:
-// 
-//
-
-ALWAYS_BUILD_AS_ARM
-
-target         OEMDebug_F123ABCE.exe
-targettype     exe
-
-sourcepath	   	../basic_tests
-
-source        	t_rmdebug2_oemtoken.cpp 
-
-library		euser.lib
-
-OS_LAYER_SYSTEMINCLUDE_SYMBIAN
-
-capability All
-
-UID            0x0 0x0
-SECUREID       0x0
-VENDORID       0x70000001
-
-SMPSAFE
--- a/debugsrv/runmodedebug/rmdebug_test/rm_debug/group/t_rmdebug2_oem.mmp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-// Copyright (c) 2006-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:
-//
-// Description:
-// Same tests as t_rmdebug2.mmp but with OEM rights conferred
-// by the OEMDebug_F123ABCD.exe token file.
-// 
-//
-
-// This is an RTest configured to run on Sirocco, hence the testexecuteutils linked in lib below.
-
-#include "t_rmdebug2.mmh"
-
-target         t_rmdebug2_oem.exe
-
-sourcepath	   	../basic_tests
-source        	t_rmdebug2.cpp 
-source		r_low_memory_security_svr_session.cpp
-source		r_kernel_low_memory_security_svr_session.cpp
-source		r_user_low_memory_security_svr_session.cpp
-
-library		testexecuteutils.lib // for Sirocco
-
-UID            0x0 0x4321bbbb
-SECUREID       0xF123abcd
-VENDORID       0x70000001
-
-CAPABILITY 	READUSERDATA POWERMGMT ALLFILES
-
-// Used when compiling tests to work in the presence of an
-// OEM Debug Token
-macro SOMECAPS_DEBUGTOKEN
-
--- a/debugsrv/runmodedebug/rmdebug_test/rm_debug/group/t_rmdebug2_oem2.mmp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-// Copyright (c) 2006-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:
-//
-// Description:
-// Same tests as t_rmdebug2.mmp but with some OEM rights conferred
-// by the OEMDebug_F1234567.exe token file.
-// 
-//
-
-//RTEST
-
-#include "t_rmdebug2.mmh"
-
-target         t_rmdebug2_oem2.exe
-
-sourcepath	   	../basic_tests
-source        	t_rmdebug2.cpp 
-source		r_low_memory_security_svr_session.cpp
-source		r_kernel_low_memory_security_svr_session.cpp
-source		r_user_low_memory_security_svr_session.cpp
-
-library		testexecuteutils.lib // for Sirocco
-
-UID            0x0 0x4321bbbb
-SECUREID       0xF1234567
-VENDORID       0x70000001
-
-CAPABILITY 	READUSERDATA POWERMGMT
-
-// Used when compiling tests to work in the presence of an
-// OEM Debug Token with AllFiles only capability
-macro FEWCAPS_DEBUGTOKEN
-
--- a/debugsrv/runmodedebug/rmdebug_test/rm_debug/group/t_rmdebug2_oemtoken.mmp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-// Copyright (c) 2007-2009 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:
-//
-// Description:
-// 
-//
-
-ALWAYS_BUILD_AS_ARM
-
-target         OEMDebug_F123ABCD.exe
-targettype     exe
-
-sourcepath	   	../basic_tests
-
-source        	t_rmdebug2_oemtoken.cpp 
-
-library		euser.lib
-
-OS_LAYER_SYSTEMINCLUDE_SYMBIAN
-
-capability PowerMgmt AllFiles Tcb ReadUserData WriteUserData
-
-UID            0x0 0x0
-SECUREID       0x0
-VENDORID       0x70000001
-
-SMPSAFE
--- a/debugsrv/runmodedebug/rmdebug_test/rm_debug/group/t_rmdebug2_oemtoken2.mmp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-// Copyright (c) 2007-2009 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:
-//
-// Description:
-// 
-//
-
-ALWAYS_BUILD_AS_ARM
-
-target         OEMDebug_F1234567.exe
-targettype     exe
-
-sourcepath	   	../basic_tests
-
-source        	t_rmdebug2_oemtoken.cpp 
-
-library		euser.lib
-
-OS_LAYER_SYSTEMINCLUDE_SYMBIAN
-
-// Token requires AllFiles
-capability AllFiles ReadUserData PowerMgmt
-
-UID            0x0 0x0
-SECUREID       0x0
-VENDORID       0x70000001
-
-SMPSAFE
--- a/debugsrv/runmodedebug/rmdebug_test/rm_debug/group/t_rmdebug_app.mmp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-// Copyright (c) 2007-2009 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:
-//
-// Description:
-// 
-//
-
-target             t_rmdebug_app.exe
-targettype         exe
-
-sourcepath         ../debug_targets
-source             t_rmdebug_app.cpp 
-source			   d_rmdebugthreadasm2.cia
-
-OS_LAYER_SYSTEMINCLUDE_SYMBIAN
-library            euser.lib hal.lib
-
-uid                0x0 0x0
-capability         none
-
-always_build_as_arm
-pagedcode
-
-DEBUGGABLE
-
-SMPSAFE
--- a/debugsrv/runmodedebug/rmdebug_test/rm_debug/group/t_rmdebug_app1.mmp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-// Copyright (c) 2007-2009 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:
-//
-// Description:
-// Target application to be debugged
-// 
-//
-
-target             t_rmdebug_app1.exe
-targettype         exe
-
-sourcepath         ../debug_targets
-source             t_rmdebug_app.cpp 
-source             d_rmdebugthreadasm2.cia
-
-OS_LAYER_SYSTEMINCLUDE_SYMBIAN
-library            euser.lib hal.lib
-
-uid                0x0 0x0
-capability         none
-
-always_build_as_arm
-pagedcode
-
-DEBUGGABLE
-
-SMPSAFE
--- a/debugsrv/runmodedebug/rmdebug_test/rm_debug/group/t_rmdebug_app10.mmp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-// Copyright (c) 2007-2009 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:
-//
-// Description:
-// Target application to be debugged
-// 
-//
-
-target             t_rmdebug_app10.exe
-targettype         exe
-
-sourcepath         ../debug_targets
-source             t_rmdebug_app.cpp 
-source             d_rmdebugthreadasm2.cia
-
-OS_LAYER_SYSTEMINCLUDE_SYMBIAN
-library            euser.lib hal.lib
-
-uid                0x0 0x0
-capability         none
-
-always_build_as_arm
-pagedcode
-
-DEBUGGABLE
-
-SMPSAFE
\ No newline at end of file
--- a/debugsrv/runmodedebug/rmdebug_test/rm_debug/group/t_rmdebug_app2.mmp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-// Copyright (c) 2007-2009 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:
-//
-// Description:
-// Target application to be debugged
-// 
-//
-
-target             t_rmdebug_app2.exe
-targettype         exe
-
-sourcepath         ../debug_targets
-source             t_rmdebug_app.cpp 
-source             d_rmdebugthreadasm2.cia
-
-OS_LAYER_SYSTEMINCLUDE_SYMBIAN
-library            euser.lib hal.lib
-
-uid                0x0 0x0
-capability         none
-
-always_build_as_arm
-pagedcode
-
-DEBUGGABLE
-
-SMPSAFE
--- a/debugsrv/runmodedebug/rmdebug_test/rm_debug/group/t_rmdebug_app3.mmp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-// Copyright (c) 2007-2009 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:
-//
-// Description:
-// Target application to be debugged
-// 
-//
-
-target             t_rmdebug_app3.exe
-targettype         exe
-
-sourcepath         ../debug_targets
-source             t_rmdebug_app.cpp 
-source             d_rmdebugthreadasm2.cia
-
-OS_LAYER_SYSTEMINCLUDE_SYMBIAN
-library            euser.lib hal.lib
-
-uid                0x0 0x0
-capability         none
-
-always_build_as_arm
-pagedcode
-
-DEBUGGABLE
-
-SMPSAFE
--- a/debugsrv/runmodedebug/rmdebug_test/rm_debug/group/t_rmdebug_app4.mmp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-// Copyright (c) 2007-2009 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:
-//
-// Description:
-// Target application to be debugged
-// 
-//
-
-target             t_rmdebug_app4.exe
-targettype         exe
-
-sourcepath         ../debug_targets
-source             t_rmdebug_app.cpp 
-source             d_rmdebugthreadasm2.cia
-
-OS_LAYER_SYSTEMINCLUDE_SYMBIAN
-library            euser.lib hal.lib
-
-uid                0x0 0x0
-capability         none
-
-always_build_as_arm
-pagedcode
-
-DEBUGGABLE
-
-SMPSAFE
--- a/debugsrv/runmodedebug/rmdebug_test/rm_debug/group/t_rmdebug_app5.mmp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-// Copyright (c) 2007-2009 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:
-//
-// Description:
-// Target application to be debugged
-// 
-//
-
-target             t_rmdebug_app5.exe
-targettype         exe
-
-sourcepath         ../debug_targets
-source             t_rmdebug_app.cpp 
-source             d_rmdebugthreadasm2.cia
-
-OS_LAYER_SYSTEMINCLUDE_SYMBIAN
-library            euser.lib hal.lib
-
-uid                0x0 0x0
-capability         none
-
-always_build_as_arm
-pagedcode
-
-DEBUGGABLE
-
-SMPSAFE
\ No newline at end of file
--- a/debugsrv/runmodedebug/rmdebug_test/rm_debug/group/t_rmdebug_app6.mmp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-// Copyright (c) 2007-2009 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:
-//
-// Description:
-// Target application to be debugged
-// 
-//
-
-target             t_rmdebug_app6.exe
-targettype         exe
-
-sourcepath         ../debug_targets
-source             t_rmdebug_app.cpp 
-source             d_rmdebugthreadasm2.cia
-
-OS_LAYER_SYSTEMINCLUDE_SYMBIAN
-library            euser.lib hal.lib
-
-uid                0x0 0x0
-capability         none
-
-always_build_as_arm
-pagedcode
-
-DEBUGGABLE
-
-SMPSAFE
\ No newline at end of file
--- a/debugsrv/runmodedebug/rmdebug_test/rm_debug/group/t_rmdebug_app7.mmp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-// Copyright (c) 2007-2009 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:
-//
-// Description:
-// Target application to be debugged
-// 
-//
-
-target             t_rmdebug_app7.exe
-targettype         exe
-
-sourcepath         ../debug_targets
-source             t_rmdebug_app.cpp 
-source             d_rmdebugthreadasm2.cia
-
-OS_LAYER_SYSTEMINCLUDE_SYMBIAN
-library            euser.lib hal.lib
-
-uid                0x0 0x0
-capability         none
-
-always_build_as_arm
-pagedcode
-
-DEBUGGABLE
-
-SMPSAFE
\ No newline at end of file
--- a/debugsrv/runmodedebug/rmdebug_test/rm_debug/group/t_rmdebug_app8.mmp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-// Copyright (c) 2007-2009 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:
-//
-// Description:
-// Target application to be debugged
-// 
-//
-
-target             t_rmdebug_app8.exe
-targettype         exe
-
-sourcepath         ../debug_targets
-source             t_rmdebug_app.cpp 
-source             d_rmdebugthreadasm2.cia
-
-OS_LAYER_SYSTEMINCLUDE_SYMBIAN
-library            euser.lib hal.lib
-
-uid                0x0 0x0
-capability         none
-
-always_build_as_arm
-pagedcode
-
-DEBUGGABLE
-
-SMPSAFE
\ No newline at end of file
--- a/debugsrv/runmodedebug/rmdebug_test/rm_debug/group/t_rmdebug_app9.mmp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-// Copyright (c) 2007-2009 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:
-//
-// Description:
-// Target application to be debugged
-// 
-//
-
-target             t_rmdebug_app9.exe
-targettype         exe
-
-sourcepath         ../debug_targets
-source             t_rmdebug_app.cpp 
-source             d_rmdebugthreadasm2.cia
-
-OS_LAYER_SYSTEMINCLUDE_SYMBIAN
-library            euser.lib hal.lib
-
-uid                0x0 0x0
-capability         none
-
-always_build_as_arm
-pagedcode
-
-DEBUGGABLE
-
-SMPSAFE
\ No newline at end of file
--- a/debugsrv/runmodedebug/rmdebug_test/rm_debug/group/t_rmdebug_dll.mmp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,38 +0,0 @@
-// Copyright (c) 2007-2009 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:
-//
-// Description:
-// 
-//
-
-ALWAYS_BUILD_AS_ARM
-
-target         t_rmdebug_dll.dll
-targettype     dll
-
-DEFFILE        ../../~/t_rmdebug_dll.def
-
-sourcepath	   	../debug_targets
-
-source        	t_rmdebug_dll.cpp 
-
-library		euser.lib
-
-OS_LAYER_SYSTEMINCLUDE_SYMBIAN
-
-capability PowerMgmt AllFiles ReadUserData
-
-UID            0x0 0x0
-SECUREID       0x0
-VENDORID       0x70000001
-
-SMPSAFE
--- a/debugsrv/runmodedebug/rmdebug_test/rm_debug/group/t_rmdebug_multi_agent.mmp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +0,0 @@
-// Copyright (c) 2006-2009 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:
-//
-// Description:
-// Application that tests the ability of the run mode debug component 
-// to debug multiple targets 
-// 
-//
-
-targettype     exe
-target         t_rmdebug_multi_agent.exe
-
-library		euser.lib hal.lib
-
-OS_LAYER_SYSTEMINCLUDE_SYMBIAN
-
-userinclude    ../debug_targets
-userinclude    ../common
-userinclude    ../multi_agent_tests
-
-sourcepath	   ../multi_agent_tests
-source         t_multi_agent.cpp t_agent_eventhandler.cpp 
-
-UID            0x0 0x4321bbbc
-SECUREID       0x1234aaab
-VENDORID       0x70000001
-
-DEBUGGABLE
-
-macro NO_DEBUGTOKEN
-
-SMPSAFE
--- a/debugsrv/runmodedebug/rmdebug_test/rm_debug/group/t_rmdebug_multi_target.mmp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,46 +0,0 @@
-// Copyright (c) 2006-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:
-//
-// Description:
-// Application that tests the ability of the run mode debug component 
-// to debug several targets
-// 
-//
-
-// This is an RTest configured to run on Sirocco, hence the testexecuteutils linked in lib below.
-
-ALWAYS_BUILD_AS_ARM
-
-targettype     exe
-target         t_rmdebug_multi_target.exe
-
-library		euser.lib hal.lib
-library		testexecuteutils.lib // for Sirocco
-
-OS_LAYER_SYSTEMINCLUDE_SYMBIAN
-
-userinclude    ../debug_targets
-userinclude    ../common
-userinclude    ../multi_target_tests
-
-sourcepath	   ../multi_target_tests
-source         t_multi_target.cpp 
-
-UID            0x0 0x4321bbbc
-SECUREID       0x1234aaab
-VENDORID       0x70000001
-
-DEBUGGABLE
-
-macro NO_DEBUGTOKEN
-
-SMPSAFE
--- a/debugsrv/runmodedebug/rmdebug_test/rm_debug/group/t_rmdebug_performance_allcapstoken.mmp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-// Copyright (c) 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:
-//
-// Description:
-// 
-//
-
-ALWAYS_BUILD_AS_ARM
-
-target         OEMDebug_102831E5.exe
-targettype     exe
-
-sourcepath	   	../performance_test
-
-source        	t_rmdebug_performance_oemtoken.cpp 
-
-library		euser.lib
-
-OS_LAYER_SYSTEMINCLUDE_SYMBIAN
-
-capability All
-
-UID            0x0 0x0
-SECUREID       0x0
-VENDORID       0x70000001
-
-SMPSAFE
--- a/debugsrv/runmodedebug/rmdebug_test/rm_debug/group/t_rmdebug_security0.mmp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-// Copyright (c) 2006-2009 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:
-//
-// Description:
-// 
-//
-
-ALWAYS_BUILD_AS_ARM
-
-target         t_rmdebug_security0.exe
-targettype     exe
-
-sourcepath	   	../debug_targets
-source        	t_rmdebug_security.cpp 
-
-library		euser.lib hal.lib
-               
-SYMBIAN_BASE_SYSTEMINCLUDE(nkern)
-OS_LAYER_SYSTEMINCLUDE_SYMBIAN
-
-UID            0x100039CE 0xbaaaf00d
-SECUREID       0x101F7159
-VENDORID       0x70000001
-
-DEBUGGABLE
-
-SMPSAFE
--- a/debugsrv/runmodedebug/rmdebug_test/rm_debug/group/t_rmdebug_security1.mmp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-// Copyright (c) 2006-2009 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:
-//
-// Description:
-// 
-//
-
-ALWAYS_BUILD_AS_ARM
-
-target         t_rmdebug_security1.exe
-targettype     exe
-
-sourcepath	   	../debug_targets
-source        	t_rmdebug_security.cpp 
-
-library		euser.lib hal.lib
-               
-SYMBIAN_BASE_SYSTEMINCLUDE(nkern)
-OS_LAYER_SYSTEMINCLUDE_SYMBIAN
-
-UID            0x100039CE 0xdeadbaaa
-SECUREID       0x101F7159
-VENDORID       0x70000001
-
-
-SMPSAFE
--- a/debugsrv/runmodedebug/rmdebug_test/rm_debug/group/t_rmdebug_security2.mmp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-// Copyright (c) 2006-2009 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:
-//
-// Description:
-// 
-//
-
-ALWAYS_BUILD_AS_ARM
-
-target         t_rmdebug_security2.exe
-targettype     exe
-
-sourcepath	   	../debug_targets
-source        	t_rmdebug_security.cpp 
-
-library		euser.lib hal.lib
-               
-SYMBIAN_BASE_SYSTEMINCLUDE(nkern)
-OS_LAYER_SYSTEMINCLUDE_SYMBIAN
-
-capability AllFiles
-
-UID            0x100039CE 0xdeadbaaa
-SECUREID       0x101F7159
-VENDORID       0x70000001
-
-
-SMPSAFE
--- a/debugsrv/runmodedebug/rmdebug_test/rm_debug/group/t_rmdebug_security3.mmp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-// Copyright (c) 2006-2009 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:
-//
-// Description:
-// 
-//
-
-ALWAYS_BUILD_AS_ARM
-
-target         t_rmdebug_security3.exe
-targettype     exe
-
-sourcepath	   	../debug_targets
-source        	t_rmdebug_security.cpp 
-
-library		euser.lib hal.lib
-               
-SYMBIAN_BASE_SYSTEMINCLUDE(nkern)
-OS_LAYER_SYSTEMINCLUDE_SYMBIAN
-
-capability TCB AllFiles NetworkControl
-
-UID            0x100039CE 0xdeadbaaa
-SECUREID       0x101F7159
-VENDORID       0x70000001
-
-
-SMPSAFE
--- a/debugsrv/runmodedebug/rmdebug_test/rm_debug/group/t_rmdebug_target_launcher.mmp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,38 +0,0 @@
-// Copyright (c) 2006-2009 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:
-//
-// Description:
-// Application that test the ability of the run mode debug component 
-// to handle several target applications
-// 
-//
-
-target         t_rmdebug_target_launcher.exe
-targettype     exe
-
-library		     euser.lib
-
-OS_LAYER_SYSTEMINCLUDE_SYMBIAN
-
-userinclude    ../common
-sourcepath	   ../common
-source         t_target_launcher.cpp 
-
-UID            0x0 0x4321bbbd
-SECUREID       0x1234aaac
-VENDORID       0x70000001
-
-DEBUGGABLE
-
-macro NO_DEBUGTOKEN
-
-SMPSAFE
--- a/debugsrv/runmodedebug/rmdebug_test/rm_debug/group/t_rmdebug_tests.iby	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,63 +0,0 @@
-// Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "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:
-//
-// Description:
-// Run Mode Debug Tests ROM include file
-
-
-file=ABI_DIR\BUILD_DIR\t_rmdebug_app.exe	Sys\Bin\t_rmdebug_app.exe
-file=ABI_DIR\BUILD_DIR\t_rmdebug_app1.exe	Sys\Bin\t_rmdebug_app1.exe
-file=ABI_DIR\BUILD_DIR\t_rmdebug_app2.exe	Sys\Bin\t_rmdebug_app2.exe
-file=ABI_DIR\BUILD_DIR\t_rmdebug_app3.exe	Sys\Bin\t_rmdebug_app3.exe
-file=ABI_DIR\BUILD_DIR\t_rmdebug_app4.exe	Sys\Bin\t_rmdebug_app4.exe
-file=ABI_DIR\BUILD_DIR\t_rmdebug_app5.exe	Sys\Bin\t_rmdebug_app5.exe
-file=ABI_DIR\BUILD_DIR\t_rmdebug_app6.exe	Sys\Bin\t_rmdebug_app6.exe
-file=ABI_DIR\BUILD_DIR\t_rmdebug_app7.exe	Sys\Bin\t_rmdebug_app7.exe
-file=ABI_DIR\BUILD_DIR\t_rmdebug_app8.exe	Sys\Bin\t_rmdebug_app8.exe
-file=ABI_DIR\BUILD_DIR\t_rmdebug_app9.exe	Sys\Bin\t_rmdebug_app9.exe
-file=ABI_DIR\BUILD_DIR\t_rmdebug_app10.exe	Sys\Bin\t_rmdebug_app10.exe
-
-file=ABI_DIR\BUILD_DIR\t_rmdebug_dll.dll	Sys\Bin\t_rmdebug_dll.dll
-
-file=ABI_DIR\BUILD_DIR\t_rmdebug_security0.exe Sys\Bin\t_rmdebug_security0.exe
-file=ABI_DIR\BUILD_DIR\t_rmdebug_security1.exe Sys\Bin\t_rmdebug_security1.exe
-file=ABI_DIR\BUILD_DIR\t_rmdebug_security2.exe Sys\Bin\t_rmdebug_security2.exe
-file=ABI_DIR\BUILD_DIR\t_rmdebug_security3.exe Sys\Bin\t_rmdebug_security3.exe
-
-// This script wraps RTests as TEF3 tests.
-data=DATAZ_\scripts\tef_execute_rtests.script		scripts\tef_execute_rtests.script
-
-
-//No token required
-file=ABI_DIR\BUILD_DIR\t_rmdebug2.exe	Sys\Bin\t_rmdebug2.exe
-
-//SOMECAPS_DEBUGTOKEN
-file=ABI_DIR\BUILD_DIR\t_rmdebug2_oem.exe 		Sys\Bin\t_rmdebug2_oem.exe
-file=ABI_DIR\BUILD_DIR\OEMDebug_F123ABCD.exe Sys\Bin\OEMDebug_F123ABCD.exe
-
-//FEWCAPS_DEBUGTOKEN
-file=ABI_DIR\BUILD_DIR\t_rmdebug2_oem2.exe 		Sys\Bin\t_rmdebug2_oem2.exe
-file=ABI_DIR\BUILD_DIR\OEMDebug_F1234567.exe	Sys\Bin\OEMDebug_F1234567.exe
-
-//ALLCAPS_DEBUGTOKEN
-file=ABI_DIR\BUILD_DIR\t_rmdebug2_allcaps.exe 		Sys\Bin\t_rmdebug2_allcaps.exe
-file=ABI_DIR\BUILD_DIR\OEMDebug_F123ABCE.exe Sys\Bin\OEMDebug_F123ABCE.exe
-
-file=ABI_DIR\BUILD_DIR\t_rmdebug_target_launcher.exe	Sys\Bin\t_rmdebug_target_launcher.exe
-file=ABI_DIR\BUILD_DIR\t_rmdebug_multi_target.exe Sys\Bin\t_rmdebug_multi_target.exe
-
-file=ABI_DIR\BUILD_DIR\t_rmdebug_multi_agent.exe Sys\Bin\t_rmdebug_multi_agent.exe
-file=ABI_DIR\BUILD_DIR\t_multi_agent_launcher.exe Sys\Bin\t_multi_agent_launcher.exe
-
-//PERFORMANCE TEST DEBUGTOKEN
-file=ABI_DIR\BUILD_DIR\OEMDebug_102831E5.exe Sys\Bin\OEMDebug_102831E5.exe
-file=ABI_DIR\BUILD_DIR\t_performance_test.exe Sys\Bin\t_performance_test.exe
--- a/debugsrv/runmodedebug/rmdebug_test/rm_debug/multi_agent_tests/t_agent_eventhandler.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,124 +0,0 @@
-// 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:
-//
-// Description:
-// Implements the handling of run mode events for a particular target executable
-// 
-
-#include <e32base.h>
-#include <e32property.h>
-#include <e32test.h>
-
-#include "t_rmdebug_app.h"
-#include "t_agent_eventhandler.h"
-#include "t_multi_agent.h"
-#include "t_debug_logging.h" 
-
-using namespace Debug;
-
-CAgentAsyncEvent::CAgentAsyncEvent(CMultiAgent& aDriver, const TDesC& aExeName, const TDesC& aExeConfig):
-	CActive(EPriorityStandard), iDriver(aDriver)
-	{
-	}
-
-CAgentAsyncEvent* CAgentAsyncEvent::NewLC(CMultiAgent& aDriver, const TDesC& aExeName, const TDesC& aExeConfig)
-	{
-	CAgentAsyncEvent* self = new(ELeave) CAgentAsyncEvent(aDriver, aExeName, aExeConfig);
-	CleanupStack::PushL(self);
-	self->ConstructL(aExeName, aExeConfig);
-	return self;
-	}
-
-CAgentAsyncEvent* CAgentAsyncEvent::NewL(CMultiAgent& aDriver, const TDesC& aExeName, const TDesC& aExeConfig)
-	{
-	CAgentAsyncEvent* self = CAgentAsyncEvent::NewLC(aDriver, aExeName, aExeConfig);
-	CleanupStack::Pop(); // self
-	return self;
-	}
-
-void CAgentAsyncEvent::ConstructL(const TDesC& aExeName, const TDesC& aExeConfig)
-	{
-	iExeName.CreateL(aExeName);
-	iExeConfig.CreateL(aExeConfig);
-	CActiveScheduler::Add(this);
-	}
-
-CAgentAsyncEvent::~CAgentAsyncEvent()
-	{
-	LOG_MSG2("~CAgentAsyncEvent(), this = 0x%08x", this);
-
-	iSEventInfo.iEventInfoBuf.Delete(0, sizeof(TEventInfo));
-	iExeName.Close();
-	iExeConfig.Close();
-	iProc.Close();
-	Cancel(); // Cancel any request, if outstanding
-	}
-
-/*
- * Issue request to DSS and notify the active scheduler
- */
-void CAgentAsyncEvent::Watch()
-	{
-	LOG_MSG2("ENTER: CAgentAsyncEvent::Watch, this = 0x%08x", this);
-	iDriver.DebugDriver().GetEvent(GetExecutable(), iStatus, iSEventInfo.iEventInfoBuf);
-
-	if (!IsActive())
-		{
-		LOG_MSG("CAgentAsyncEvent::Watch(): SetActive()");
-		SetActive();
-		}
-
-	LOG_MSG("EXIT: CAgentAsyncEvent::Watch");
-	}
-
-void CAgentAsyncEvent::RunL()
-	{
-	LOG_MSG4("ENTER: CAgentAsyncEvent::RunL iDebugType=%d, iStatus.Int() %d, this 0x%x08", 
-			 iSEventInfo.iEventInfo.iEventType, iStatus.Int(), this);
-	
-    LOG_MSG2("%S", &TPtr8((TUint8*)GetExecutable().Ptr(), 2*GetExecutable().Length(), 2*GetExecutable().Length()));	
-	iDriver.HandleEvent(iSEventInfo.iEventInfo);
-
-	LOG_MSG2("iDriver.GetNumApps() %d: ", iDriver.GetNumApps());
-	LOG_MSG2("iDriver.iLaunchCompleted  %d: ", iDriver.GetLaunchCompleted());
-
-	if (iDriver.GetLaunchCompleted() < iDriver.GetNumApps())
-		{
-		// Do not call Watch() if target has run to completion but test is still on going
-		if (iSEventInfo.iEventInfo.iEventType != EEventsRemoveProcess)
-			{
-			LOG_MSG("CAgentAsyncEvent::RunL Setting Watch()");
-			Watch();
-			}
-		}
-	else
-		{
-		// Stop event handling for all targets
-		LOG_MSG("CAgentAsyncEvent::RunL CActiveScheduler::Stop() & Cancel");
-		CActiveScheduler::Stop();
-		}
-
-	LOG_MSG2("EXIT: CAgentAsyncEvent::RunL", KNullDesC);
-	}
-
-void CAgentAsyncEvent::DoCancel()
-	{
-	LOG_MSG("CAgentAsyncEvent::DoCancel");
-	}
-
-TInt CAgentAsyncEvent::RunError(TInt aError)
-	{
-	LOG_MSG3(" RunL() has left with error %d, this 0x%08X", aError, this);
-	return aError; 
-	// Can we handle this error? Not at the moment!
-	}
-
--- a/debugsrv/runmodedebug/rmdebug_test/rm_debug/multi_agent_tests/t_agent_eventhandler.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,90 +0,0 @@
-// 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:
-//
-// Description:
-// Definitions for event handling via the DSS and target specific information
-//
-//
-
-#ifndef RMDEBUG_AGENT_EVENTHANDLER_H
-#define RMDEBUG_AGENT_EVENTHANDLER_H
-
-#include "t_multi_agent.h"
-
-using namespace Debug;
-
-class CMultiAgent;
-
-/**
- Class for gathering event data from the run-mode driver
- */
-class TAgentEventInfo
-{
-public:
-	TAgentEventInfo() : 
-	iEventInfoBuf((TUint8*)&iEventInfo, sizeof(TEventInfo), sizeof(TEventInfo))
-	{ 	
-	}
-
-public:
-	// This is the underlying class for event interaction with the Run Mode debug API 
-	TEventInfo			iEventInfo;
-	
-	// A convenience handle for iEventInfo used across the Debug::GetEvent() method 
-	TPtr8				iEventInfoBuf;
-};
-
-/**
-  Active object class used to trap asynchronous events
-  Also, contains target specific parameters
-  */
-class CAgentAsyncEvent : public CActive
-	{
-public:
-	// Close buffers and Cancel and destroy
-	~CAgentAsyncEvent();	
-
-	// Two-phased constructor
-	static CAgentAsyncEvent* NewLC(CMultiAgent& aDriver, const TDesC& aExeName, const TDesC& aExeConfig);
-
-	// Two-phased constructor
-	static CAgentAsyncEvent* NewL(CMultiAgent& aDriver, const TDesC& aExeName, const TDesC& aExeConfig);
-
-	// set up ASP and issue another request	
-	void Watch();
-
-	TDesC& GetExecutable() { return iExeName; }
- 	TDesC& GetExeConfig() { return iExeConfig; }
-	RProcess& GetProcHandle() { return iProc; }
-
-protected:
-	// from CActive
-	virtual void RunL();
-	virtual void DoCancel();
-	virtual TInt RunError(TInt aError);
-
-private:
-	CAgentAsyncEvent(CMultiAgent& aDriver, const TDesC& aExeName, const TDesC& aExeConfig);
-	void ConstructL(const TDesC& aExeName, const TDesC& aExeConfig);
-
-private:
-	RBuf iExeName;
-	RBuf iExeConfig;
-	RProcess iProc;
-
-	CMultiAgent& iDriver;
-	TAgentEventInfo iSEventInfo;
-	};
-
-#endif // RMDEBUG_AGENT_EVENTHANDLER_H
-
-
--- a/debugsrv/runmodedebug/rmdebug_test/rm_debug/multi_agent_tests/t_multi_agent.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,434 +0,0 @@
-// 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:
-//
-// Description:
-// Tests the run mode debug device component by launching multiple targets 
-// on different CPUs. On a single core the targets run on the same CPU.  
-//
-
-#include <e32base.h>
-#include <e32property.h>
-#include <hal.h>
-#include <e32test.h>
-#include <e32def.h>
-#include <e32svr.h>
-
-
-#include "t_rmdebug_app.h"
-#include "t_multi_agent.h"
-#include "t_agent_eventhandler.h"
-#include "t_debug_logging.h"
-
-const TVersion securityServerVersion(0,1,1);
-
-/**
- * First phase constructor
- */
-CMultiAgent* CMultiAgent::NewL()
-	{
-	CMultiAgent* self = new(ELeave) CMultiAgent();
-	self->ConstructL();
-	return self;
-	}
-
-/**
-  * Destructor
-  */
-CMultiAgent::~CMultiAgent()
-	{
-	LOG_MSG("~CMultiTargetAgent\n");
-	iServSession.Close();
-	}
-
-/**
- * Constructor
- */
-CMultiAgent::CMultiAgent() 
-	{
-	}
-
-/**
- * Second phase constructor
- */
-void CMultiAgent::ConstructL()
-	{
-	}
-
-/**
-  Parse the command line, set agent cpu affinity and call main test function
-  */
-void CMultiAgent::ClientAppL()
-	{
-	LOG_MSG("ENTER: CMultiTargetAgent::ClientAppL"); 
-
-	iNumApps = KNumApps;
-	iAgentCpuNo = KAgentCpu;
-	iTargetNameOffset = KTargetOffset;
-
-	TInt argc = User::CommandLineLength();
-	HBufC* commandLine = NULL;
-	LOG_MSG2(">Launcher Process() argc=%d", argc);
-	
-	if(argc)
-		{
-		commandLine = HBufC::NewLC(argc);
-		TPtr commandLineBuffer = commandLine->Des();
-		User::CommandLine(commandLineBuffer);
-
-		RBuf printCommandLine;
-		CleanupClosePushL(printCommandLine);
-		printCommandLine.CreateL(commandLine->Des().Length());
-		printCommandLine.Copy(commandLine->Des());
-		printCommandLine.Collapse();
-		LOG_MSG2(">command line = %S", &printCommandLine );
-		CleanupStack::PopAndDestroy( &printCommandLine );
-
-		// create a lexer and read through the command line
-		TLex lex(*commandLine);
-	
-		while (!lex.Eos())
-		{
-			// only look for options with first character '-'
-			if (lex.Get() == '-')
-			{
-			TChar arg = lex.Get();
-			
-				switch ( arg )
-				{
-				case 'n':
-					lex.Val( iNumApps );
-					LOG_MSG2("parsed numApps as %d", iNumApps); 
-					break;
-		
-				case 'a':
-					lex.Val( iAgentCpuNo );
-					LOG_MSG2("parsed agentCpuNo as %d", iAgentCpuNo);                        
-					break;
-
-				case 'o':
-					lex.Val( iTargetNameOffset );
-					LOG_MSG2("parsed iTargetNameOffset as %d", iTargetNameOffset);        
-					break;
-
-				default:
-					LOG_MSG("Bad argument from user"); 
-					break;                 
-				}
-			}
-		}
-	}
-	// Create active scheduler (to run active objects)
-	CActiveScheduler* scheduler = new (ELeave) CActiveScheduler();
-	CleanupStack::PushL(scheduler);
-	CActiveScheduler::Install(scheduler);
-	
-	if (iAgentCpuNo)
-		{
-		LOG_MSG2("CMultiAgent::ClientAppL() - setting agent to cpu %d", iAgentCpuNo);
-		UserSvr::HalFunction(EHalGroupKernel, EKernelHalLockThreadToCpu, (TAny *)iAgentCpuNo, 0);
-		}
-
-	TInt err = iServSession.Connect(securityServerVersion);
-	
-	if (err != KErrNone)
-		{
-		User::Panic(_L("Can't open server session"), err);
-		}
-
-	StartTest();
-
-	// Note: below is a workaround to overcome an issue with RTest server crashing 
-	// when writing to the windows console from different agents (on different CPUs 
-	// at the same time). To overcome this we signal the launcher using a global 
-	// semaphore to indicate a RTest complete instead
-	RSemaphore launchSemaphore;
-	CleanupClosePushL(launchSemaphore);
-            
-	TFindSemaphore launchSemFinder(KLaunchSemaphoreSearchString);
-	TFullName semaphoreResult;
-	TInt ret = launchSemFinder.Next(semaphoreResult);
-	LOG_MSG3( "> Find Launch Semaphote.Next ret=%d, %lS", ret, &semaphoreResult);
-         
-	ret = launchSemaphore.OpenGlobal(semaphoreResult);
-	LOG_MSG2( ">OpenGlobal semaphore ret=%d", ret );         
-    
-	LOG_MSG( ">Signalling semaphore" );
-	launchSemaphore.Signal();
-	CleanupStack::PopAndDestroy(&launchSemaphore); // launchSemaphore
-
-	// Delete active scheduler
-	CleanupStack::PopAndDestroy(scheduler);
-
-	if (commandLine)
-	CleanupStack::PopAndDestroy(commandLine);
-	
-	LOG_MSG( "EXIT: CMultiTargetAgent::ClientAppL"); 
-	}
-
-/**
-  Launch a process
-  @param aProcess the RProcess object used to create the process
-  @param aFileName file name of the executable used to create the process
-  @return KErrNone on success, or one of the other system wide error codes
-  */
-TInt CMultiAgent::LaunchProcess(RProcess& aProcess, const TDesC& aExeName, const TDesC& aCommandLine)    
-	{
-	LOG_MSG( "ENTER: CMultiAgent::LaunchProcess");
-    LOG_MSG2("%S", &TPtr8((TUint8*)aExeName.Ptr(), 2*aExeName.Length(), 2*aExeName.Length()));	
-	
-	// wait for 0.5 seconds due to issue with creating several processes in smp quickly
-	User::After(500000);
-	
-	TInt err = aProcess.Create( aExeName, aCommandLine );
-	LOG_MSG2( "CMultiAgent::LaunchProcess, aProcess.Create err = %d", err); 
-
-	// check that there was no error raised
-	if (err != KErrNone)
-		return err;
-	
-	// rendezvous with process
-	TRequestStatus status = KRequestPending;
-	aProcess.Rendezvous(status);
-
-	if (KRequestPending != status.Int())
-		{
-		// startup failed so kill the process
-		LOG_MSG2( "> RProcess Rendezvous() failed with %d. Killing process", status.Int() );
-		aProcess.Kill(KErrNone);
-		LOG_MSG( "EXIT: CMultiAgent::LaunchProcess");
-		return status.Int();
-		}
-	else
-		{
-		// start the test target
-		aProcess.Resume();
-		User::WaitForRequest(status);
-	
-		LOG_MSG2( "> CMultiAgent::LaunchProcess: RProcess Resume() Rendezvous successful %d: ", status.Int() );
-
-		if(KErrNone != status.Int())
-			{
-			LOG_MSG2( "> RProcess Resume() failed with %d. Killing process", status.Int() );
-			aProcess.Kill(KErrNone);
-			}
-
-		LOG_MSG( "EXIT: CMultiAgent::LaunchProcess");
-		return status.Int();
-		}
-	}
-
-/**
-  Handle Event
-  @param aEventInfo object containing event information from the DSS 
-  */
-void CMultiAgent::HandleEvent(TEventInfo& aEventInfo)
-	{
-	LOG_MSG( "ENTER: CMultiAgent::HandleEvent" ); 
-	TInt ret = KErrNone;
-	const TInt idValid = 1;
-	
-	switch ( aEventInfo.iEventType )
-		{
-		case EEventsAddProcess:
-			{
-			LOG_MSG(">> EEventsAddProcess");                        
-			TPtrC8 exeNamePtr8(aEventInfo.iAddProcessInfo.iFileName, aEventInfo.iAddProcessInfo.iFileNameLength);
-	
-			RBuf8 exeName8;
-			CleanupClosePushL(exeName8);
-			exeName8.CreateL(exeNamePtr8);
-			LOG_MSG2("From event: exeName8=%S", &exeName8);
-			CleanupStack::PopAndDestroy(&exeName8);
-			LOG_MSG("Testing if event process id is valid");
-
-			LOG_MSG2("Got aEventInfo.iProcessId=%d", I64LOW( aEventInfo.iProcessId));
-			__ASSERT_ALWAYS((aEventInfo.iProcessIdValid==idValid), User::Panic(_L("ProcessId Invalid"), aEventInfo.iProcessIdValid));
-	
-			RProcess targetProc;
-			ret = targetProc.Open(TProcessId(aEventInfo.iProcessId));
-			LOG_MSG2("RProcess open ret=%d", ret);
-			targetProc.Close();
-
-			__ASSERT_ALWAYS((ret == KErrNone), User::Panic(_L("ProcessId Invalid"), aEventInfo.iProcessIdValid));
-			break;
-			}
-	
-		case EEventsStartThread:
-			{
-			LOG_MSG(">> EEventsStartThread");                
-			TPtrC8 exeNamePtr8(aEventInfo.iStartThreadInfo.iFileName, aEventInfo.iStartThreadInfo.iFileNameLength);
-			RBuf8 exe8Name;
-			CleanupClosePushL(exe8Name);
-			exe8Name.CreateL(exeNamePtr8);
-			LOG_MSG2("From event: exeName8=%S", &exe8Name);
-			CleanupStack::PopAndDestroy(&exe8Name);
-	
-			LOG_MSG("Testing if event process id is valid" );
-
-			__ASSERT_ALWAYS((aEventInfo.iProcessIdValid==idValid), User::Panic(_L("ProcessId Invalid"), aEventInfo.iProcessIdValid));
-
-			LOG_MSG2("Got aEventInfo.iProcessId=%d", I64LOW(aEventInfo.iProcessId));
-
-			LOG_MSG("Testing if event thread id is valid");
-
-			__ASSERT_ALWAYS((aEventInfo.iThreadIdValid==idValid), User::Panic(_L("ThreadId Invalid"), aEventInfo.iThreadIdValid));
-
-			LOG_MSG2("Got aEventInfo.iThreadId=%d", I64LOW(aEventInfo.iThreadId));
-			break;                    
-			}                       
-
-		case EEventsUserTrace:
-			{
-			LOG_MSG(">> EEventsUserTrace");  
-			break;
-			}
-
-		case EEventsRemoveProcess:
-			{
-			LOG_MSG( ">> EEventsRemoveProcess");                        
-			iLaunchCompleted++; 
-			break;
-			}
-	
-		default:   
-			{
-			LOG_MSG( ">> Unknown event - probably due to DSS busy?");
-			break;
-			}	
-		}
- 	 
-	LOG_MSG("EXIT: CMultiAgent::HandleEvent"); 
-	}
-
-/**
- * Main test function which launches several targets and stresses the DSS 
- */
-TInt CMultiAgent::StartTest()
-	{
-	LOG_MSG("ENTER: CMultiTargetAgent::StartTest");
-
-	for( TInt i = 0; i < iNumApps; i++ )
-		{
-		RBuf targetName;
-		RBuf launcherOptions;
-
-		CleanupClosePushL(targetName); 
-		CleanupClosePushL(launcherOptions); 
-
-		targetName.CreateL( KTargetExe().Length() + 2 );
-		targetName.Format( KTargetExe(), i + iTargetNameOffset + 1 );
-
-		LOG_MSG2("App %d: ", i+1);
-		LOG_MSG2("%S", &TPtr8((TUint8*)targetName.Ptr(), 2*targetName.Length(), 2*targetName.Length()));	
-
-		launcherOptions.CreateL( KTargetOptions().Length() + 2 );
-		launcherOptions.Format( KTargetOptions(), (TUint)ENormalExit, (i+1) );
-
-		LOG_MSG( "AppOptions : ");
-		LOG_MSG2("%S", &TPtr8((TUint8*)launcherOptions.Ptr(), 2*launcherOptions.Length(), 2*launcherOptions.Length()));	
-		
-		// Add each test target to array
-		iTargetList.AppendL(CAgentAsyncEvent::NewL(*this, targetName, launcherOptions));
-		CleanupStack::PopAndDestroy(2, &targetName );
-		}
-	
-	iLaunchCompleted = 0;
-	TInt err = KErrNone;
-		
-	for (TInt i = 0; i < iNumApps; i++)
-		{
-		// Attach to process non-passively
-		LOG_MSG2( ">AttachExecutable app %d ", i + iTargetNameOffset + 1 );
-		LOG_MSG2("%S", &TPtr8((TUint8*)iTargetList[i]->GetExecutable().Ptr(), 2*iTargetList[i]->GetExecutable().Length(), 
-					2*iTargetList[i]->GetExecutable().Length()));
-
-		err = iServSession.AttachExecutable( iTargetList[i]->GetExecutable(), EFalse);
-		__ASSERT_ALWAYS((err == KErrNone), User::Panic(_L("DSS Attach failed"), err));
-
-		// Continue on interested event actions
-		LOG_MSG2( ">SetEventAction app %d,  EEventsStartThread EAcionContinue", i + iTargetNameOffset + 1);
-
-		err = iServSession.SetEventAction( iTargetList[i]->GetExecutable(), EEventsStartThread, EActionContinue);
-		__ASSERT_ALWAYS((err==KErrNone), User::Panic(_L("SetEventAction Error"), err));
-	
-		LOG_MSG2(">SetEventAction app %d,  EEventsAddProcess EActionContinue", i + iTargetNameOffset + 1);
-		err = iServSession.SetEventAction( iTargetList[i]->GetExecutable(), EEventsAddProcess, EActionContinue);
-		__ASSERT_ALWAYS((err==KErrNone), User::Panic(_L("SetEventAction Error"), err));
-
-		LOG_MSG2(">SetEventAction app %d,  EEventsUserTrace EActionContinue", i + iTargetNameOffset + 1);
-		err = iServSession.SetEventAction( iTargetList[i]->GetExecutable(), EEventsUserTrace, EActionContinue);
-		__ASSERT_ALWAYS((err==KErrNone), User::Panic(_L("SetEventAction Error"), err));
-	
-		LOG_MSG2(">SetEventAction app %d,  EEventsRemoveProcess EActionContinue", i + iTargetNameOffset + 1);
-		err = iServSession.SetEventAction( iTargetList[i]->GetExecutable(), EEventsRemoveProcess, EActionContinue);
-		__ASSERT_ALWAYS((err==KErrNone), User::Panic(_L("SetEventAction Error"), err));
-
-		// Add target object to active schedular
-		iTargetList[i]->Watch();
-		}
-
-	for (TInt i= 0; i< iNumApps; i++)
-		{
-		LOG_MSG( ">Calling LaunchProcess function");
-		err = LaunchProcess(iTargetList[i]->GetProcHandle(), iTargetList[i]->GetExecutable(), iTargetList[i]->GetExeConfig());
-		__ASSERT_ALWAYS((err==KErrNone), User::Panic(_L("LaunchProcess failed"), err));
-		}
-
-	LOG_MSG( ">CActiveScheduler::Start()");
-	CActiveScheduler::Start();
-
-	for (TInt i= 0; i < iNumApps; i++)
-		{
-		// Now detach again
-		LOG_MSG( "Before iServSession.DetachExecutable" );
-		err = iServSession.DetachExecutable(iTargetList[i]->GetExecutable());
-		__ASSERT_ALWAYS((err==KErrNone), User::Panic(_L("DetachExecutable failed"), err));
-		}
-	
-	// Free all the memory
-	iTargetList.ResetAndDestroy();
-	LOG_MSG( "EXIT: CMultiTargetAgent::StartTest" );
-
-	return KErrNone;
-	}
-
-/**
-  * Entry point for run mode debug driver test
-  */
-GLDEF_C TInt E32Main()
-	{
-	LOG_MSG( "ENTER: Multi_agent E32Main ");
-	__UHEAP_MARK;
-
-	TInt ret = KErrNone;
-	RProcess::Rendezvous(KErrNone);
-	
-	CTrapCleanup* trap = CTrapCleanup::New();
-		
-	if (!trap)
-		return KErrNoMemory;
-	
-	CMultiAgent *runModeAgent = CMultiAgent::NewL();
-
-	if (runModeAgent != NULL)
-		{
-		TRAP(ret,runModeAgent->ClientAppL());
-		LOG_MSG2( "ClientAppL returned %d", ret );
-		delete runModeAgent;
-		}
-
-	delete trap;
-	__UHEAP_MARKEND;
-	LOG_MSG( "EXIT: Multi_agent E32Main ");
-	return ret;
-	}
-
--- a/debugsrv/runmodedebug/rmdebug_test/rm_debug/multi_agent_tests/t_multi_agent.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,110 +0,0 @@
-// Copyright (c) 2006-2009 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:
-//
-// Description:
-// Definitions for the run mode debug tests
-// 
-//
-
-/**
- @file
- @internalTechnology
- @released
-*/
-
-#ifndef RMDEBUG_MULTI_AGENT_H
-#define RMDEBUG_MULTI_AGENT_H
-
-#include <u32hal.h>
-#include <f32file.h>
-#include <rm_debug_api.h>
-
-using namespace Debug;
-
-_LIT(KLaunchSemaphoreName, "t_rmdebug_launch_semaphore");
-_LIT(KLaunchSemaphoreSearchString, "t_rmdebug_launch_semaphore*");
-
-// Currently the targets are instances of t_rmdebug_app.exe
-_LIT(KTargetExe,"z:\\sys\\bin\\t_rmdebug_app%d.exe");
-
-_LIT(KTargetOptions,"-f%d -a%d");
-
-// If changing this, make sure there are enough apps built/in the rom 
-const TInt KNumApps = 5;
-
-// Default CPU execution for Agent
-const TInt KAgentCpu = 0;
-
-// Workaround to ensure we have the same agent binary when running multiple agents
-const TInt KTargetOffset = 0;
-
-class CAgentAsyncEvent;
-
-/**
-  @Class CRunModeAgent
-  
-  The basic run mode agent
-  */
-class CMultiAgent : public CBase
-	{
-	public:
-	static CMultiAgent* NewL();
-	~CMultiAgent();
-	void ClientAppL();  
-	RSecuritySvrSession&  DebugDriver() { return iServSession; };	
-	void HandleEvent(TEventInfo& aSEventInfo);
-
-	public:
-	TInt GetLaunchCompleted() const { return iLaunchCompleted; }
-	TInt GetNumApps() const { return iNumApps; }
-	TInt GetTargetOffset() const { return iTargetNameOffset; }
-
-	private:
-	CMultiAgent();
-	void ConstructL();
-	TInt StartTest();
-	TInt LaunchProcess(RProcess& aProcess, const TDesC& aExeName, const TDesC& aCommandLine);
-	
-	private:
-
-	/**
-	 * CPU agent executes on; by default this is 0 
-	 */
-	TInt iAgentCpuNo;
-
-	/*
-	 * Offset for running multiple targets using the same agent
-	 */
-	TInt iTargetNameOffset;
-
-	/** 
-	 * Number of applications/targets per agent
-	 */
-	TInt iNumApps;
-
-	/**
-	 * Flag used for terminating the event handling for a target 
-	 */	
-	TInt iLaunchCompleted;
-
-	/*
-	 * Handle to DSS
-	 */
-	RSecuritySvrSession iServSession;
-	
-	/**
-	 * Array to target parameters required by the agent
-	 */	
-	RPointerArray<CAgentAsyncEvent> iTargetList;
-	};
-
-#endif // RMDEBUG_MULTI_AGENT_H
--- a/debugsrv/runmodedebug/rmdebug_test/rm_debug/multi_agent_tests/t_multi_agent_launcher.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,229 +0,0 @@
-// Copyright (c) 2007-2009 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:
-//
-// Description:
-// Helper app to launch debug targets
-//
-//
-
-#include "t_multi_agent_launcher.h"
-
-#include "t_debug_logging.h"
-
-/**
- * Launch a process
- * @param aProcess the RProcess object used for creating the process
- * @param aExeName the name of the executable to run 
- * @param aCommandLine command line parameters to pass when creating the process 
- * @return KErrNone on success, or one of the other system wide error codes
- */
-TInt LaunchProcess(RProcess& aProcess, TDesC& aExeName, TDesC& aCommandLine )    
-	{
-	LOG_MSG("ENTER: t_multi_agent_launcher: launchProcess"); 
-
-	LOG_MSG2("aExeName %S ", &TPtr8((TUint8*)aExeName.Ptr(), 2*aExeName.Length(), 2*aExeName.Length()));
-	LOG_MSG2("aCommandLine %S", &TPtr8((TUint8*)aCommandLine.Ptr(), 2*aCommandLine.Length(), 2*aCommandLine.Length()));
-
-	TInt err = aProcess.Create( aExeName, aCommandLine );
-	LOG_MSG2("t_multi_agent_launcher launchProcess, aProcess.Create err = %d", err); 
-
-	// check that there was no error raised
-	if(err != KErrNone)
-		{
-		return err;
-		}
-
-	// rendezvous with process
-	TRequestStatus status = KRequestPending;
-	aProcess.Rendezvous(status);
-
-	if(KRequestPending != status.Int())
-		{
-		// startup failed so kill the process
-		LOG_MSG2("t_multi_agent_launcher: launchProcess: RProcess Rendezvous() failed with %d. Killing process", status.Int());
-		aProcess.Kill(KErrNone);
-		return status.Int();
-		}
-	else
-		{
-		aProcess.Resume();
-		User::WaitForRequest(status);
-
-		LOG_MSG2("t_multi_agent_launcher: launchProcess: RProcess Resume() Rendezvous successful %d: ", status.Int());
-
-		if(KErrNone != status.Int())
-			{
-			LOG_MSG2("t_multi_agent_launcher: RProcess Resume() failed with %d. Killing process", status.Int());
-			aProcess.Kill(KErrNone);
-			}
-
-		LOG_MSG("EXIT: t_multi_agent_launcher launchProcess");
-		return status.Int();
-		}
-	}
-
-/**
- * Read command line parameters and control the launching of the agents. 
- */
-void MainL()
-	{	
-	LOG_MSG( "ENTER: t_multi_agent_launcher MainL()");
-
-	TInt ret = KErrNone;
-	TInt numAgents = KNumAgents;
-	TInt numTargets = KNumTargets;
-	TInt numTestRuns = KNumTestRuns;
-
-	TInt argc = User::CommandLineLength();
-	HBufC* commandLine = NULL;
-	LOG_MSG2("t_multi_agent_launcher: MainL(): argc=%d", argc);
-    
-	if(argc)
-		{
-		commandLine = HBufC::NewLC(argc);
-		TPtr commandLineBuffer = commandLine->Des();
-		User::CommandLine(commandLineBuffer);
-
-		RBuf printCommandLine;
-		CleanupClosePushL( printCommandLine );
-		printCommandLine.CreateL( commandLine->Des().Length() );
-		printCommandLine.Copy( commandLine->Des() );
-		printCommandLine.Collapse();
-		LOG_MSG2("t_multi_agent_launcher: command line = %S", &printCommandLine);
-		CleanupStack::PopAndDestroy( &printCommandLine );
- 
-		// create a lexer and read through the command line
-		TLex lex(*commandLine);
-		while (!lex.Eos())
-			{
-			// only look for options with first character '-'
-			if (lex.Get() == '-')
-				{
-					TChar arg = lex.Get();
-					switch ( arg )
-						{
-						case 'n':
-							lex.Val( numAgents );
-							LOG_MSG2("t_multi_agent_launcher: parsed numAgents as %d", numAgents);
-							break;
-						case 'm':
-							lex.Val( numTargets );
-							LOG_MSG2("t_multi_agent_launcher: parsed numTargets as %d", numTargets);                        
-							break;  
-						case 't':
-							lex.Val( numTestRuns );
-							LOG_MSG2("t_multi_agent_launcher: parsed numTestRuns as %d", numTestRuns);                        
-							break;                    
-						default:
-							LOG_MSG("t_multi_agent_launcher: unknown argument ignoring it");
-							break;                 
-						}
-				}
-			}
-		}
-
-	// Note: below is a workaround to overcome an issue with RTest server crashing 
-	// when writing to the windows console from different agents (on different CPUs 
-	// at the same time). To overcome this we get signaled by the agents when they have 
-	// completed their tests so that we can do a RTest complete
-	RSemaphore launchSemaphore;
-	CleanupClosePushL(launchSemaphore);
-	ret = launchSemaphore.CreateGlobal(KLaunchSemaphoreName, 0);
-	LOG_MSG2( ">Target Launcher : RSemaphore.CreateGlobal ret %d", ret);
-	User::LeaveIfError( ret );
-
-	ret = launchSemaphore.OpenGlobal(KLaunchSemaphoreName);
-	LOG_MSG2( ">Target Launcher : RSemaphore.OpenGlobal ret %d", ret);
-	User::LeaveIfError( ret );
-
-	//Now launch the requested number of apps for the requested number of test runs
-	for( TInt j = 0; j < numTestRuns; j++ )
-		{ 
-			for( TInt i = 0; i < numAgents; i++ )  
-				{
-					RBuf targetName;
-					targetName.CleanupClosePushL();
-					targetName.CreateL(KAgentExe());
-
-					RProcess aProc;
-					CleanupClosePushL(aProc); 
-					RBuf launcherOptions;
-					CleanupClosePushL(launcherOptions);
-				    const TInt additionalWords = 2;	
-					launcherOptions.CreateL( KAgentOptions().Length() + additionalWords );
-		
-					// Apply offset: launcherOptions.Format( .., .., i * numTargets, ..)
-					// workaround to ensure we have the same binary for multiple agents. 
-					// e.g. So if offset = 0, agent attaches to app1, app2, app3, app4, app5
-					// if offset = 5, agent attached to app6, app7, app8, app9, app10 etc.
-					// Note: apps need to be in rom otherwise the agent will fail on an assert 
-					// (with KErrNotFound)
-					launcherOptions.Format( KAgentOptions(), (TUint)numTargets, i * numTargets, 0);
-			
-					ret = LaunchProcess( aProc, targetName, launcherOptions );	
-					CleanupStack::PopAndDestroy(3,&targetName);
-					User::LeaveIfError(ret);
-				}
-		}
-
-	// Wait for all agents to do their testing before checking the semaphore
-	User::After(12000000);
-
-	LOG_MSG( ">Target Launcher:  Semaphore wait");
-
-	for (TInt i = 0; i < numAgents; i ++)
-		{
-		//We need this delay just in case an agent crashes and never signals the sem
-		ret = launchSemaphore.Wait(100000);
-		if( ret != KErrNone )
-			{
-			LOG_MSG3("launchSemaphore.Wait ret %d for agent %d", ret, i);
-			break;
-			}
-		}
-
-	LOG_MSG2( "testing for Semaphore ret %d", ret);
-
-	// We only want to have one RTest instance at any one time since otherwise RTest can panic
-	RTest test(_L("T_MULTI_AGENT_LAUNCHER"));
-	test.Start(_L("t_multi_agent_launcher Check for agents finishing correctly"));
-	test(ret == KErrNone);
-	test.End();
-	test.Close();
-
-	CleanupStack::PopAndDestroy(&launchSemaphore); // launchSemaphore
-
-	if( commandLine )
-	CleanupStack::PopAndDestroy(commandLine);
-	
-	LOG_MSG("EXIT: t_multi_agent_launcher MainL()");
-	}
- 
-GLDEF_C TInt E32Main()
-	{
-	LOG_MSG("ENTER: Multi_agent_launcher E32Main()");
-	__UHEAP_MARK;
-
-	CTrapCleanup* trap = CTrapCleanup::New();
-	if (!trap)
-		return KErrNoMemory;
-
-	TRAPD(err, MainL());
-	LOG_MSG2("Multi_agent_launcher: returning from MainL(), err = %d", err);
-	
-	delete trap;
-	LOG_MSG("EXIT: Multi_agent_launcher E32Main()");
-	__UHEAP_MARKEND;
-
-	return err;
-	}
-
--- a/debugsrv/runmodedebug/rmdebug_test/rm_debug/multi_agent_tests/t_multi_agent_launcher.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +0,0 @@
-// Copyright (c) 2009 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:
-//
-// Description:
-// Definitions for agent launcher
-// 
-//
-
-/**
- @file
- @internalTechnology
- @released
-*/
-
-#ifndef RMDEBUG_MULTI_AGENT_LAUNCHER_H
-#define RMDEBUG_MULTI_AGENT_LAUNCHER_H
-
-#include <e32test.h>
-
-// Default test runs
-const TInt KNumTestRuns = 1; 
-
-// Default number of targets per agent
-const TInt KNumTargets = 5;
-
-// Default number of agents, if changing this make sure there are enough apps being built 
-const TInt KNumAgents = 2; 
-
-_LIT(KAgentExe,"z:\\sys\\bin\\t_rmdebug_multi_agent.exe");
-_LIT(KAgentOptions,"-n%d -o%d -a%d");
-
-_LIT(KLaunchSemaphoreName, "t_rmdebug_launch_semaphore");
-_LIT(KLaunchSemaphoreSearchString, "t_rmdebug_launch_semaphore*");
-
-#endif // RMDEBUG_MULTI_AGENT_LAUNCHER_H
-
--- a/debugsrv/runmodedebug/rmdebug_test/rm_debug/multi_target_tests/t_multi_target.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,405 +0,0 @@
-// Copyright (c) 2006-2009 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:
-//
-// Description:
-// Test the ability of the debug system to handle events from several debug targets
-//
-//
-
-#include <e32base.h>
-#include <e32property.h>
-
-#include <hal.h>
-#include <e32test.h>
-
-#include "t_multi_target.h"
-#include "t_target_launcher.h"
-#include "t_rmdebug_app.h"
-
-#ifdef KERNEL_OOM_TESTING
-  #ifdef USER_OOM_TESTING
-    #error "Cannot define both KERNEL_OOM_TESTING and USER_OOM_TESTING"
-  #endif
-#endif
-
-
-using namespace Debug;
-
-const TVersion securityServerVersion(0,1,1);
-
-const TVersion testVersion(2,1,0);
-
-#ifdef NO_DEBUGTOKEN
-LOCAL_D RTest test(_L("T_RMDEBUG_MULTI_TARGET"));
-#endif
-
-#ifdef SOMECAPS_DEBUGTOKEN
-LOCAL_D RTest test(_L("T_RMDEBUG_MULTI_TARGET_OEM"));
-#endif
-
-#ifdef FEWCAPS_DEBUGTOKEN
-LOCAL_D RTest test(_L("T_RMDEBUG_MULTI_TARGET_OEM2"));
-#endif
-
-
-
-CMultiTargetAgent* CMultiTargetAgent::NewL()
-//
-// CMultiTargetAgent::NewL
-//
-  {
-  CMultiTargetAgent* self = new(ELeave) CMultiTargetAgent();
-
-  self->ConstructL();
-
-  return self;
-  }
-
-
-CMultiTargetAgent::~CMultiTargetAgent()
-//
-// CMultiTargetAgent destructor
-//
-    {
-    RDebug::Printf("~CMultiTargetAgent\n");
-    iServSession.Close();
-    }
-
-
-CMultiTargetAgent::CMultiTargetAgent() : 
-    iEventPtr( (TUint8*)&iEventInfo, sizeof(TEventInfo) )
-    {
-    }
-
-
-void CMultiTargetAgent::ConstructL()
-//
-// CMultiTargetAgent::ConstructL
-//
-  {
-  }
-
-/**
- * Helper code for the stepping tests. Returns the number of nanokernel ticks in one second.
- *
- * @return Number of nanokernel ticks. 0 if unsuccesful.
- */
-TInt CMultiTargetAgent::HelpTicksPerSecond(void)
-  {
-  TInt nanokernel_tick_period;
-  HAL::Get(HAL::ENanoTickPeriod, nanokernel_tick_period);
-
-  ASSERT(nanokernel_tick_period != 0);
-
-  static const TInt KOneMillion = 1000000;
-
-  return KOneMillion/nanokernel_tick_period;
-  }
-
-void CMultiTargetAgent::ClientAppL()
-//
-// Performs each test in turn
-//
-  {
-  test.Start(_L("ClientAppL"));
-  TInt err = iServSession.Connect(securityServerVersion);
-  if (err != KErrNone)
-      {
-      User::Panic(_L("Can't open server session"), err);
-      }
-  SetupDebugServerL();
-  LaunchTargetsInOrderL();
-  RDebug::Printf( "returning from CMultiTargetAgent::ClientAppL" );
-  test.End();
-  }
-
-/**
-  Launch a process
-
-  @param aProcess The RProcess object to use to create the process
-  @param aExeName File name of the executable to create the process from
-  @param aCommandLine The command line to pass to the new process
-  @return KErrNone on success, or one of the other system wide error codes
-  */
-TInt CMultiTargetAgent::LaunchProcess(RProcess& aProcess, TDesC & aExeName, TDesC & aCommandLine )
-    {    
-    TInt err = aProcess.Create( aExeName, aCommandLine );    
-    if(err != KErrNone)
-        {
-        RDebug::Printf( "aProcess.Create ret %d", err);
-        return err;
-        }
-
-    TRequestStatus status = KRequestPending;
-    aProcess.Rendezvous(status);
-    if(KRequestPending != status.Int())
-        {
-        // startup failed so kill the process
-        aProcess.Kill(KErrNone);
-        return status.Int();
-        }
-    else
-        {
-        // start up succeeded so resume the process
-        aProcess.Resume();
-        // Give the process a chance to run
-        User::After( 500000 );
-        return KErrNone;
-        }
-    }
-
-void CMultiTargetAgent::SetupDebugServerL()
-    {
-    RDebug::Printf( "CMultiTargetAgent::SetupDebugServerL" );
-    test.Next(_L("SetupDebugServerL\n"));
-    iTargets.ReserveL( KNumApps );
-
-    RBuf targetName;
-    CleanupClosePushL( targetName );
-
-    for( TInt numApps = 0; numApps < KNumApps; numApps++ )
-        {
-        iTargets.AppendL( targetName );
-        RDebug::Printf( "Attach to DSS for app %d ", numApps );
-
-        iTargets[numApps].CreateL( KTargetExe().Length() + 2 );
-        iTargets[numApps].Format( KTargetExe(), numApps+1 );
-
-        TInt ret = iServSession.AttachExecutable( iTargets[numApps], EFalse );
-        test( ret == KErrNone );
-
-        RDebug::Printf( ">SetEventAction app %d,  EEventsStartThread EActionSuspend", numApps );
-        ret = iServSession.SetEventAction( iTargets[numApps], EEventsStartThread, EActionSuspend );
-        test( ret == KErrNone );
-
-        RDebug::Printf( ">SetEventAction app %d,  EEventsAddProcess EActionContinue", numApps );
-        ret = iServSession.SetEventAction( iTargets[numApps], EEventsAddProcess, EActionContinue );
-        test( ret == KErrNone );
-
-        RDebug::Printf( ">SetEventAction app %d,  EEventsRemoveProcess EActionContinue", numApps );
-        ret = iServSession.SetEventAction( iTargets[numApps], EEventsRemoveProcess, EActionContinue );
-        test( ret == KErrNone );
-        }
-
-    CleanupStack::PopAndDestroy( &targetName ); // targetName
-
-    }
-
-
-
-TInt CMultiTargetAgent::LaunchTargetsInOrderL()
-    {
-    RDebug::Printf( "CMultiTargetAgent::LaunchTargetsInOrderL" );
-    
-    RBuf launcher;
-    CleanupClosePushL( launcher );
-    launcher.CreateL( KLauncherExe() );
-    
-    RBuf launcherOptions;
-    CleanupClosePushL( launcherOptions ); 
-    launcherOptions.CreateL( KTargetOptions().Length() + 2 );
-    launcherOptions.Format( KTargetOptions(), (TUint)ENormalExit );
-
-    RDebug::Printf( ">LaunchProcess()" );
-    RProcess launcherProc; 
-    CleanupClosePushL( launcherProc );
-    
-    TInt ret = LaunchProcess( launcherProc, launcher, launcherOptions );
-    RDebug::Printf( "<LaunchProcess() ret %d", ret );
-    
-    CleanupStack::PopAndDestroy( &launcherProc ); // launcherProc
-    CleanupStack::PopAndDestroy( &launcherOptions ); // launcherOptions
-    CleanupStack::PopAndDestroy( &launcher ); //launcher 
-
-    test( ret == KErrNone );
-    
-    RSemaphore launchSemaphore;   
-    CleanupClosePushL( launchSemaphore );
-            
-    TFindSemaphore launchSemFinder( KLaunchSemaphoreNameSearchString );
-    TFullName semaphoreResult;
-    ret = launchSemFinder.Next(semaphoreResult);
-    RDebug::Printf( ">  Find Launch Semaphote.Next ret=%d, %lS", ret, &semaphoreResult );
-    test( ret == KErrNone );   
-     
-    ret = launchSemaphore.OpenGlobal( semaphoreResult );
-    RDebug::Printf( "> OpenGlobal semaphore ret=%d", ret );         
-    test( ret == KErrNone );    
-    
-    TBool thisLaunchCompleted; 
-
-    test.Next(_L("LaunchTargetsInOrderL\n"));
-    for( TInt numLaunches = KNumLaunches; numLaunches > 0; numLaunches-- )
-        {
-        for( TInt numApps = KNumApps; numApps > 0; numApps-- )
-            {
-            thisLaunchCompleted = EFalse;
-            // This will trigger the launcher app to launch the next target
-            RDebug::Printf( " >Semaphore.Signal app=%d, launch=%d", numApps, numLaunches);
-            launchSemaphore.Signal();
-            
-            RBuf8 tgt8Name; 
-            CleanupClosePushL( tgt8Name );
-           
-            RBuf tgtCollapseName;
-            CleanupClosePushL( tgtCollapseName );
-                    
-            tgtCollapseName.CreateL( iTargets[numApps-1] );
-            tgt8Name.CreateL( tgtCollapseName.Collapse() );
-            
-
-            while( ! thisLaunchCompleted )
-                {
-                RDebug::Printf( ">GetEvent app %d for %S", numApps, &tgt8Name );
-                iServSession.GetEvent( iTargets[numApps-1], iStatus, iEventPtr );
-          
-                // Wait for the target to get started.
-                RDebug::Printf( " >Wait for event from target app=%d, launch=%d\n", numApps, numLaunches);
-                User::WaitForRequest( iStatus );
-                RDebug::Printf( " <Wait for request returned with status %d", iStatus.Int() );
-                test( iStatus==KErrNone );
-    
-                RDebug::Printf( " > Got iEventType =%d, app=%d", iEventInfo.iEventType, numApps );
-                switch( iEventInfo.iEventType )
-                    {
-                    case EEventsAddProcess:
-                        {
-                        RDebug::Printf( "Got EEventsAddProcess" );                        
-                        TPtrC8 exeNamePtr8( iEventInfo.iAddProcessInfo.iFileName, iEventInfo.iAddProcessInfo.iFileNameLength );
-                        
-                        RBuf8 exeName8;
-                        CleanupClosePushL( exeName8 );
-                        exeName8.CreateL( exeNamePtr8 );
-                        RDebug::Printf( " from event: exeName8=%S", &exeName8 );
-                        CleanupStack::PopAndDestroy( &exeName8 );
-                        
-                        RBuf8 compareName8;
-                        CleanupClosePushL( compareName8 );
-                        compareName8.CreateL( KTargetExeName().Length() + 10 );
-                        compareName8.Format( KTargetExeName(), numApps );
-                        RDebug::Printf( " comparing to: compareName8=%S", &compareName8 );
-                        
-                        test( compareName8.CompareC( exeNamePtr8 ) == 0 );
-                        CleanupStack::PopAndDestroy( &compareName8 );
-
-                        RDebug::Printf( "Testing if event process id is valid" );
-                        test( iEventInfo.iProcessIdValid );
-                        RDebug::Printf( "Got iEventInfo.iProcessId=%d", I64LOW( iEventInfo.iProcessId ) );
-                        
-                        RProcess targetProc;
-                        ret = targetProc.Open( TProcessId( iEventInfo.iProcessId ) );
-                        RDebug::Printf( "RProcess open ret=%d",ret );
-                        targetProc.Close();
-                        test( ret == KErrNone );
-                        
-                        break;
-                        }//EEventsAddProcess
-                        
-                    case EEventsStartThread:
-                        {
-                        RDebug::Printf( "Got EEventsStartThread" );
-                         
-                        TPtrC8 exeNamePtr8( iEventInfo.iStartThreadInfo.iFileName, iEventInfo.iStartThreadInfo.iFileNameLength );
-                        RBuf8 exe8Name;
-                        CleanupClosePushL( exe8Name );
-                        exe8Name.CreateL( exeNamePtr8 );
-                        RDebug::Printf( " from event: exeName8=%S", &exe8Name );
-                        CleanupStack::PopAndDestroy( &exe8Name );
-                        
-                        test( tgt8Name.CompareC( exeNamePtr8 ) == 0 );
-                        
-                        RDebug::Printf( "Testing if event process id is valid" );
-                        test( iEventInfo.iProcessIdValid );
-                        RDebug::Printf( "Got iEventInfo.iProcessId=%d", I64LOW( iEventInfo.iProcessId ) );
-                         
-                        RDebug::Printf( "Testing if event thread id is valid" );
-                        test( iEventInfo.iThreadIdValid );
-                        RDebug::Printf( "Got iEventInfo.iThreadId=%d", I64LOW( iEventInfo.iThreadId ) );
-                        
-                        RThread targetThread;
-                        CleanupClosePushL( targetThread );
-                        
-                        ret = targetThread.Open( TThreadId( iEventInfo.iThreadId ) );
-                        RDebug::Printf( "RThread open ret=%d", ret );
-                        test( ret == KErrNone ); 
-                         
-                        test( iEventInfo.iThreadId == targetThread.Id() );  
-
-                        RDebug::Printf( "Resuming thread for app=%d, id=%d", numApps, I64LOW( targetThread.Id() ));
-                        ret = iServSession.ResumeThread( iEventInfo.iThreadId );
-                        CleanupStack::PopAndDestroy( &targetThread );
-                        
-                        test( ret == KErrNone );
-                        
-                        ret = iServSession.ResumeThread( iEventInfo.iThreadId );
-                        break;                    
-                        }//case EEventsStartThread                        
-
-                    case ( EEventsRemoveProcess ):
-                        {
-                        RDebug::Printf( "*** Got EEventsRemoveProcess. app%d has exited. Moving on to next app", numApps );                        
-                        thisLaunchCompleted = ETrue;
-                        break;
-                        }
-                        
-                    default :   
-                        RDebug::Printf( "Got unknown event" );
-                        test( EFalse );
-                        break;
-                    }
-                }//while
-
-            CleanupStack::PopAndDestroy( &tgtCollapseName ); // tgtCollapseName
-            CleanupStack::PopAndDestroy( &tgt8Name ); // tgt8Name 
-            }
-        }    
-
-    launchSemaphore.Signal();
-    
-	CleanupStack::PopAndDestroy( &launchSemaphore ); // launchSemaphore
-  
-	for( TInt i = iTargets.Count()-1; i>=0; i-- )
-		{
-		RDebug::Printf( "Closing target %d", i );
-		iTargets[ i ].Close();
-		}
-
-	iTargets.Close();
-	
-	return KErrNone;
-    }
-
-
-GLDEF_C TInt E32Main()
-    {
-    TInt ret = KErrNone;
-   
-  
-    CTrapCleanup* trap = CTrapCleanup::New();
-    if (!trap)
-      return KErrNoMemory;
-    test.Title();
-   
-    CMultiTargetAgent *runModeAgent = CMultiTargetAgent::NewL();
-    if (runModeAgent != NULL)
-        {
-        __UHEAP_MARK;
-        TRAP(ret,runModeAgent->ClientAppL());
-        __UHEAP_MARKEND;
-        
-        RDebug::Printf( "ClientAppL returned %d", ret );
-        delete runModeAgent;
-        }
-
-    delete trap;
-    return ret;
-    }
--- a/debugsrv/runmodedebug/rmdebug_test/rm_debug/multi_target_tests/t_multi_target.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,93 +0,0 @@
-// Copyright (c) 2006-2009 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:
-//
-// Description:
-// Definitions for the run mode debug tests
-// 
-//
-
-/**
- @file
- @internalTechnology
- @released
-*/
-
-#ifndef RMDEBUG_MULTI_TARGET_H
-#define RMDEBUG_MULTI_TARGET_H
-
-#include "t_rmdebug_app.h"
-
-#include <rm_debug_api.h>
-
-class CMultiTargetAgent;
-
-//
-// class CRunModeAgent
-//
-// The basic run mode agent.
-//
-class CMultiTargetAgent : public CBase
-	{
-public:
-	static CMultiTargetAgent* NewL();
-	~CMultiTargetAgent();
-	void ClientAppL();
-	
-    TInt LaunchProcess(RProcess& aProcess, TDesC & aExeName, TDesC & aCommandLine );
-    
-private:
-	CMultiTargetAgent();
-	void ConstructL();
-
-	void ReportPerformance(void);
-
-	TInt HelpTicksPerSecond(void);
-
-	enum TTestMode 
-		{
-		//run all the tests
-		EModeAll = 1<<0,
-		//run the specified tests in reverse order
-		EModeReverse = 1<<1,
-		//print out help
-		EModeHelp = 1<<2,
-		//print out help
-		EModeVersion = 1<<3
-		};
-	
-	TInt LaunchTargetsInOrderL();
-	void SetupDebugServerL();
-
-private:
-
-#if defined(KERNEL_OOM_TESTING)
-	RKernelLowMemorySecuritySvrSession iServSession;
-#elif defined (USER_OOM_TESTING)
-	RUserLowMemorySecuritySvrSession iServSession;
-#else
-	Debug::RSecuritySvrSession iServSession;
-#endif
-	RSemaphore iAddressGlobSem;
-
-	TUid iMySid;
-
-	// Timing information
-	TInt iStartTick;
-	TInt iStopTick;
-
-	RArray<RBuf> iTargets;
-  TRequestStatus iStatus;
-  Debug::TEventInfo iEventInfo;
-  TPtr8 iEventPtr;
-	};
-
-#endif // RMDEBUG_MULTI_TARGET_H
--- a/debugsrv/runmodedebug/rmdebug_test/rm_debug/performance_test/t_rmdebug_performance_oemtoken.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
-// Copyright (c) 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:
-//
-// Description:
-//
-
-/**
- @file
- @internalTechnology
- @released
-*/
-
-#include <e32base.h>
-
-GLDEF_C TInt E32Main()
-	{
-	// No need to do anything, the only requirement is that
-	// this executable can be loaded and runs to completion
-	return 0;
-	}
-
-// End of file - t_rmdebug_performance_oemtoken.cpp
--- a/debugsrv/runmodedebug/rmdebug_test/rm_debug/performance_test/t_rmdebug_performance_test.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,599 +0,0 @@
-// Copyright (c) 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:
-//
-// Description:
-// Tests performance of run mode debug device component   
-//
-
-#include <e32base.h>
-#include <e32property.h>
-#include <e32test.h>
-#include <e32def.h>
-#include <e32const.h>
-#include <hal.h>
-
-#include "t_rmdebug_performance_test.h"
-#include "t_debug_logging.h"
-#include "t_rmdebug_app.h"
-
-const TVersion securityServerVersion(0,1,1);
-
-_LIT(KTestName, "T_RMDEBUG_PERFORMANCE_TEST");
-
-LOCAL_D RTest test(KTestName);
-
-using namespace Debug;
-
-CRunModeAgent* CRunModeAgent::NewL()
-    {
-    LOG_ENTRY();
-    CRunModeAgent* self = new(ELeave) CRunModeAgent();
-    self->ConstructL();
-    LOG_EXIT();
-    return self;
-    }
-
-void CRunModeAgent::ConstructL()
-    {
-    // ConstructL list does not match destruction list as R-Class member variables are implicitly open.
-    // DebugDriver().Connect() is conditionally set depending on the test case hence not part of this function.
-    LOG_ENTRY();
-    User::LeaveIfError(iIntegerProperty.Attach(RProcess().SecureId(), EPropertyTimeOfCrash, EOwnerThread));
-    LOG_EXIT(); 
-    }
-
-CRunModeAgent::~CRunModeAgent()
-    {
-    LOG_ENTRY();   
-    DebugDriver().Close();
-    iTimeDifs.Close();
-    iIntegerProperty.Close();
-    RProperty::Delete(EPropertyTimeOfCrash);
-    LOG_EXIT(); 
-    }
-
-
-void CRunModeAgent::ClientAppL()
-    {
-    LOG_ENTRY();   
-   
-    if ( ParseCommandLine() == EDisplayHelp )
-        {
-        DisplayUsage();
-        }
-    else
-        {
-        static _LIT_SECURITY_POLICY_PASS(KAllowAllPolicy);
-        RProperty::Define(RProcess().SecureId(), EPropertyTimeOfCrash, RProperty::EInt, KAllowAllPolicy, KAllowAllPolicy);        
-        StartTest();
-        }
-        
-    LOG_EXIT(); 
-    }
-
-TInt CRunModeAgent::GetTimeInMs()
-{
-    return User::NTickCount() * iTickPeriodMs;
-}
-
-void CRunModeAgent::GetStartTime()
-    {    
-    LOG_ENTRY();
-
-    test ( KErrNone == iIntegerProperty.Get(iParams.iCountStart) );    
-    LOG_MSG2("iParams.iCountStart %d", iParams.iCountStart);
-    
-    LOG_EXIT();
-    }
-
-void CRunModeAgent::GetNanoTickPeriod()
-    {
-    LOG_ENTRY();
-    
-    TInt period = 0;
-    User::LeaveIfError(HAL::Get(HALData::ENanoTickPeriod, period));
-    iTickPeriodMs = period / 1000;
-    LOG_MSG("iTickPeriodMs = %d\n", iTickPeriodMs);
-    
-    LOG_EXIT();
-    }
-
-void CRunModeAgent::StartTest()
-    {
-    LOG_ENTRY();
-    
-    GetNanoTickPeriod();
-    
-    if (iParams.iTestType == PerformanceTestParams::EBenchMarkTest)
-        {
-        RunBenchMarkTest();
-        }
-    else 
-        {
-        TestDriverPerformance();
-        }
-    
-    CalculatePerformance();
-    
-    LOG_EXIT();
-    }
-
-// This function allows us to provide a benchmark when comparing the performance with the 
-// old and new APIs using the TestDriverPerformance function below. The two possible 
-// configurations are as follows: 
-// 1. Run t_rmdebug_app with a prefetch abort configuration and measure the time from the 
-// point of crash to the logon request completion.
-// 2. Load the debug-system and then run the above configuration.  
-void CRunModeAgent::RunBenchMarkTest()
-    {
-    LOG_ENTRY();
-    
-    test.Start(_L("RunBenchMarkTest"));
-    
-    RProcess process;
-    TRequestStatus status; 
-    
-    if (iParams.iDriver)
-         {
-         RDebug::Printf("RunBenchMarkTest() - DebugDriver().Connect()");
-         test(KErrNone == DebugDriver().Connect(securityServerVersion));
-         }
- 
-    LOG_MSG("iParams.iNumOfTestRuns = %d", iParams.iNumOfTestRuns);
-    
-    for ( TUint i = 0; i < iParams.iNumOfTestRuns; i++ )
-        {
-        // Start test application
-        test( KErrNone == LaunchProcessL(process, KRMDebugTestApplication(), KTargetOptions()) );
-               
-        process.Logon(status);
-        User::WaitForRequest(status);
-
-        // Stop timer on logon request completion
-        iParams.iCountEnd = GetTimeInMs();
-        LOG_MSG("iParams.iCountEnd = %d", iParams.iCountEnd);
-        
-        LOG_MSG( "status.Int() = %d " , status.Int() );
-        
-        // prefetch abort should raise a KERN-EXEC 3
-        test(3 == status.Int());
-        
-        process.Close();
-        GetStartTime(); 
-       
-        // NTickCount shouldn't overflow, so no reason why this assertion should fail
-        test(iParams.iCountEnd > iParams.iCountStart);
-        iTimeDifs.Append( iParams.iCountEnd - iParams.iCountStart );
-       }
-    
-    LOG_EXIT();
-    }
-
-// This function can be used to compare the performance with the old (e.g. attachExe) and new 
-// (e.g. attachAll) APIs depending depending on the parameters passed in when running this test.  
-void CRunModeAgent::TestDriverPerformance()
-    {
-    LOG_ENTRY();    
-    test.Start(_L("TestDriverPerformance"));
-   
-    RProcess process;
-    
-    test(KErrNone == DebugDriver().Connect(securityServerVersion));
-    
-    LOG_MSG("iParams.iNumOfTestRuns = %d", iParams.iNumOfTestRuns);
-    for ( TUint i = 0; i < iParams.iNumOfTestRuns; i++ )
-        {
-        ilaunchCompleted = EFalse;
-     
-        Attach();
-        SetEventAction();
-        test(KErrNone == LaunchProcessL(process, KRMDebugTestApplication(), KTargetOptions));
-        
-        LOG_MSG("CRunModeAgent::TestDriverPerformance - process.Logon");
-        
-        while ( !ilaunchCompleted )
-            {
-            LOG_MSG("CRunModeAgent::TestDriverPerformance - DebugDriver().GetEvent");
-       
-            GetEvent();
-       
-            LOG_MSG("CRunModeAgent::TestDriverPerformance - User::WaitForRequest");
-
-            User::WaitForRequest(iStatus);
-            LOG_MSG( "iStatus.Int() = %d " , iStatus.Int() );
-            
-            LOG_MSG("CRunModeAgent::TestDriverPerformance - HandleEvent");
-            HandleEvent(iSEventInfo.iEventInfo);
-            }
-        
-        process.Logon(iStatus);
-        LOG_MSG("CRunModeAgent::TestDriverPerformance - process.Logon, User::WaitForRequest");
-        User::WaitForRequest(iStatus);
-        LOG_MSG( "iStatus.Int() = %d " , iStatus.Int() );
-        
-        // Stop timer on logon request completion as in benchmark performance test
-        iParams.iCountEnd = GetTimeInMs();
-                
-        // prefetch abort should raise a KERN-EXEC 3
-        test(3 == iStatus.Int());
-                    
-        Detach();
-        process.Close();       
-        GetStartTime();
- 
-        // NTickCount shouldn't overflow, so no reason why this assertion should fail
-        test(iParams.iCountEnd > iParams.iCountStart);
-        iTimeDifs.Append( iParams.iCountEnd - iParams.iCountStart );
-       }
-        
-       LOG_EXIT();
-    }
-
-void CRunModeAgent::CalculatePerformance()
-    {
-    LOG_ENTRY();
-
-    TUint median;
-    TUint arrayCount = iTimeDifs.Count();
-
-    for (TInt i = 0; i < arrayCount; i++)
-         {
-         RDebug::Printf("iTimeDifs[%d] = %d ",i,iTimeDifs[i]);
-         }
-    
-    // Sort in ascending order
-    iTimeDifs.Sort();
-            
-    //If the number of elements is odd, the middle element in the sorted array is the median. 
-    //If the number of elements is even, the median is the average of the two midmost elements.
-    if ( arrayCount%2  != 0 )
-        {
-        median = iTimeDifs[arrayCount/2];
-        }
-    else
-        {
-        median = (iTimeDifs[arrayCount/2] + iTimeDifs[arrayCount/2 -1])/2;
-        }
-    
-    RDebug::Printf("Median time %d ms", median );
-    
-    LOG_EXIT();
-    }
-
-/**
-  Launch a process
-  @param aExeName the executable used to create the process
-  @param aCommandLine the commandline parameters passed to the new process file name of the executable used to create the process
-  @return KErrNone on success, or one of the other system wide error codes
-  */
-TInt CRunModeAgent::LaunchProcessL( RProcess& aProcess, const TDesC& aExeName, const TDesC& aCommandLine )
-    {
-    LOG_ENTRY(); 
-    
-    RBuf launcherOptions;
-    launcherOptions.CleanupClosePushL();
-    const TInt additionalWords = 1; 
-    launcherOptions.CreateL( aCommandLine.Length() + additionalWords );
-    launcherOptions.Format( aCommandLine, iParams.iTestTargetPriority);
-   
-    LOG_DES(_L("launcherOptions %S"), &launcherOptions);
-    
-    TInt err = aProcess.Create( aExeName, launcherOptions );   
-    CleanupStack::PopAndDestroy();
-    
-    // check that there was no error raised
-    if (err != KErrNone)
-        return err;
-    
-    // rendezvous with process
-    TRequestStatus status = KRequestPending;
-    aProcess.Rendezvous(status);
-
-    // start the test target
-    aProcess.Resume();
-    User::WaitForRequest(status);
-  
-    if(KErrNone != status.Int())
-        {
-        aProcess.Kill(KErrNone);
-        }
-     LOG_EXIT(); 
-     return status.Int();
-
-    }
-
-void CRunModeAgent::SetEventAction()
-    {
-    LOG_ENTRY();
-    
-    if (iParams.iTestType == PerformanceTestParams::EAttachExe)
-        {
-        test(KErrNone == DebugDriver().SetEventAction( KRMDebugTestApplication(), EEventsKillThread, EActionContinue));
-             
-        if ( iParams.iEvents )
-            {
-            test(KErrNone == DebugDriver().SetEventAction( KRMDebugTestApplication(), EEventsAddLibrary, EActionContinue));
-            test(KErrNone == DebugDriver().SetEventAction( KRMDebugTestApplication(), EEventsUserTrace, EActionContinue));
-            test(KErrNone == DebugDriver().SetEventAction( KRMDebugTestApplication(), EEventsStartThread, EActionContinue));
-            test(KErrNone == DebugDriver().SetEventAction( KRMDebugTestApplication(), EEventsAddProcess, EActionContinue));
-            test(KErrNone == DebugDriver().SetEventAction( KRMDebugTestApplication(), EEventsRemoveProcess, EActionContinue));
-            }
-        }
-    else
-        {
-        test(KErrNone == DebugDriver().SetEventAction( EEventsKillThread, EActionContinue));
-             
-        if ( iParams.iEvents )
-            {
-            test(KErrNone == DebugDriver().SetEventAction( EEventsAddLibrary, EActionContinue));
-            test(KErrNone == DebugDriver().SetEventAction( EEventsUserTrace, EActionContinue));
-            test(KErrNone == DebugDriver().SetEventAction( EEventsStartThread, EActionContinue));
-            test(KErrNone == DebugDriver().SetEventAction( EEventsAddProcess, EActionContinue));
-            test(KErrNone == DebugDriver().SetEventAction( EEventsRemoveProcess, EActionContinue));
-            }
-        }
-    
-    LOG_EXIT();
-    }
-
-void CRunModeAgent::Attach()
-    {
-    LOG_ENTRY();
-    
-    if( iParams.iTestType == PerformanceTestParams::EAttachExe ) 
-        {
-        // Attach to process non-passively
-        test(KErrNone == DebugDriver().AttachExecutable( KRMDebugTestApplication(), EFalse));
-        LOG_MSG("DebugDriver().AttachExecutable");
-        }
-    else 
-        {
-        // Attach to all the processes on the system
-        test(KErrNone == DebugDriver().AttachAll());
-        LOG_MSG("DebugDriver().AttachAll()");
-        }
-    
-    LOG_EXIT();
-    }
-
-void CRunModeAgent::GetEvent()
-    {
-    LOG_ENTRY();
-
-    if( iParams.iTestType == PerformanceTestParams::EAttachExe ) 
-        {
-        DebugDriver().GetEvent( KRMDebugTestApplication(), iStatus, iSEventInfo.iEventInfoBuf );
-        }
-    else
-        {
-        DebugDriver().GetEvent( iStatus, iSEventInfo.iEventInfoBuf );
-        }
-    
-    LOG_EXIT();
-    }
-
-void CRunModeAgent::Detach()
-    {
-    LOG_ENTRY();
-    
-    if( iParams.iTestType == PerformanceTestParams::EAttachExe )
-        {
-        test (KErrNone == DebugDriver().DetachExecutable(KRMDebugTestApplication()));
-        }
-    else
-        {
-        test(KErrNone == DebugDriver().DetachAll());
-        }
-    
-    LOG_EXIT();
-    }
-
-void CRunModeAgent::HandleEvent(TEventInfo& aEventInfo)
-    {
-    LOG_ENTRY(); 
-
-    switch ( aEventInfo.iEventType )
-        {
-        case EEventsAddProcess:
-            {
-            LOG_MSG(">>> EEventsAddProcess");                        
-            break;
-            }
-    
-        case EEventsStartThread:
-            {
-            LOG_MSG(">>> EEventsStartThread");                
-            break;                    
-            }                       
-
-        case EEventsUserTrace:
-            {
-            LOG_MSG(">>> EEventsUserTrace");  
-            break;
-            }
-
-        case EEventsRemoveProcess:
-            {
-            LOG_MSG(">>> EEventsRemoveProcess");                        
-            break;
-            }
-    
-        case EEventsKillThread:
-            {
-            LOG_MSG(">>> EEventsKillThread");   
-            ilaunchCompleted = ETrue;          
-            break;
-            }
-            
-        default:   
-            {
-            LOG_MSG( ">>> Unknown event ");
-            break;
-            }   
-        }
-     
-    LOG_EXIT(); 
-    }
-
-void CRunModeAgent::SetDefaultParamValues()
-    {
-    LOG_ENTRY();
-    
-    iParams.iNumOfTestRuns = KNumOfTestRuns;
-    iParams.iTestType = PerformanceTestParams::EBenchMarkTest;
-    iParams.iTestTargetPriority = 0;
-    iParams.iEvents = 0;
-    iParams.iDriver = 0;
-    
-    LOG_EXIT();
-    }
-
-TInt CRunModeAgent::ParseCommandLine()
-    {
-    LOG_ENTRY();
-    
-    TBool ifDisplayHelp = EDontDisplayHelp;
-    SetDefaultParamValues();
-    
-    TInt argc = User::CommandLineLength();
-    LOG_MSG( "Launcher Process() argc=%d", argc );
-
-    if( argc )
-        {
-        HBufC* commandLine = NULL;
-        commandLine = HBufC::NewLC(argc);
-        TPtr commandLineBuffer = commandLine->Des();
-        User::CommandLine(commandLineBuffer);
-       
-        LOG_DES(_L("CommandLine = %S"), &commandLineBuffer);
-        
-        // create a lexer and read through the command line
-        TLex lex(*commandLine);
-        while (!lex.Eos())
-             {
-             // only look for options with first character '-', other switches are for the targets
-             if (lex.Get() == '-')
-                 {
-                 TChar arg = lex.Get();
-                 switch (arg)
-                     {
-                     case 'n':
-                         lex.Val( iParams.iNumOfTestRuns );
-                         LOG_MSG("Number of test runs %d", iParams.iNumOfTestRuns);
-                         break;
-                      case 't':
-                          lex.Val( iParams.iTestType );
-                          LOG_MSG("parsed testType as %d", iParams.iTestType );
-                          break;
-                      case 'p':
-                          lex.Val( iParams.iTestTargetPriority );
-                          LOG_MSG("parsed test target priority as %d", iParams.iTestTargetPriority );
-                          break;
-                      case 'e':
-                          lex.Val( iParams.iEvents );
-                          LOG_MSG("parsed events as %d", iParams.iEvents );
-                          break;
-                      case 'd':
-                          lex.Val( iParams.iDriver );
-                          LOG_MSG("parsed iDriver as %d", iParams.iDriver );
-                          break;
-                       case 'h':
-                          LOG_MSG( "Display help" );
-                          ifDisplayHelp = EDisplayHelp;
-                       default:
-                           LOG_MSG( "Default usage" );
-                           break;             
-                       }
-                  }
-              }
-            CleanupStack::PopAndDestroy(commandLine);
-        }
-    
-    LOG_EXIT();
-    return ifDisplayHelp;   
-    }
-
-void CRunModeAgent::DisplayUsage()
-    {
-    LOG_ENTRY();
-    test.Printf(_L("\nUsage: t_rmdebug_performance_test [options] \nOptions:\n"));
-    
-    test.Printf(_L("\t-t  \t\ttest type\n"));
-    test.Printf(_L("\t\t\t  0 - AttachAll\n"));
-    test.Printf(_L("\t\t\t  1 - AttachExe\n"));
-    test.Printf(_L("\t\t\t  2 - None\n"));
-           
-    test.Printf(_L("\t-n \t\tnumber of iterations\n"));
-    test.Printf(_L("\t-e \t\ttest with events\n"));
-    test.Printf(_L("\t\t\t  0 - No\n"));
-    test.Printf(_L("\t\t\t  1 - Yes\n"));
-    test.Printf(_L("\t-p \t\tpriority of test target thread\n"));
-    
-    test.Printf(_L("\t\t\t  %d - EPriorityAbsoluteVeryLow \n"), EPriorityAbsoluteVeryLow);
-    test.Printf(_L("\t\t\t  %d - EPriorityAbsoluteLowNormal \n"), EPriorityAbsoluteLowNormal);
-    test.Printf(_L("\t\t\t  %d - EPriorityAbsoluteLow \n"), EPriorityAbsoluteLow);
-    test.Printf(_L("\t\t\t  %d - EPriorityAbsoluteBackgroundNormal \n"), EPriorityAbsoluteBackgroundNormal);
-    test.Printf(_L("\t\t\t  %d - EPriorityAbsoluteBackground \n"), EPriorityAbsoluteBackground);
-    test.Printf(_L("\t\t\t  %d - EPriorityAbsoluteForegroundNormal \n"), EPriorityAbsoluteForegroundNormal);
-    test.Printf(_L("\t\t\t  %d - EPriorityAbsoluteForeground \n"), EPriorityAbsoluteForeground);
-    test.Printf(_L("\t\t\t  %d - EPriorityAbsoluteHighNormal \n"), EPriorityAbsoluteHighNormal);
-    test.Printf(_L("\t\t\t  %d - EPriorityAbsoluteHigh \n"), EPriorityAbsoluteHigh);
-    test.Printf(_L("\t\t\t  %d - EPriorityAbsoluteRealTime1 \n"), EPriorityAbsoluteRealTime1);
-    test.Printf(_L("\t\t\t  %d - EPriorityAbsoluteRealTime2 \n"), EPriorityAbsoluteRealTime2);
-    test.Printf(_L("\t\t\t  %d - EPriorityAbsoluteRealTime3 \n"), EPriorityAbsoluteRealTime3);
-    test.Printf(_L("\t\t\t  %d - EPriorityAbsoluteRealTime4 \n"), EPriorityAbsoluteRealTime4);
-    test.Printf(_L("\t\t\t  %d - EPriorityAbsoluteRealTime5 \n"), EPriorityAbsoluteRealTime5);
-    test.Printf(_L("\t\t\t  %d - EPriorityAbsoluteRealTime6 \n"), EPriorityAbsoluteRealTime6);
-    test.Printf(_L("\t\t\t  %d - EPriorityAbsoluteRealTime7 \n"), EPriorityAbsoluteRealTime7);
-    test.Printf(_L("\t\t\t  %d - EPriorityAbsoluteRealTime8 \n"), EPriorityAbsoluteRealTime8);
-    
-    test.Printf(_L("\t-d  \t\tload driver\n"));
-    test.Printf(_L("\t\t\t  0 - No\n"));
-    test.Printf(_L("\t\t\t  1 - Yes\n"));
-        
-    test.Printf(_L("\t-h \t\tdisplay usage information\n\n"));
-    
-    test.Printf(_L("Press any key...\n"));
-    test.Getch();
-    
-    LOG_EXIT();
-    }
-
-GLDEF_C TInt E32Main()
-    {
-    __UHEAP_MARK;
-
-    TInt ret = KErrNone;        
-    CTrapCleanup* trap = CTrapCleanup::New();
-        
-    if (!trap)
-        return KErrNoMemory;
-    
-    test.Start(KTestName);
-       
-    CRunModeAgent *runModeAgent = CRunModeAgent::NewL();
-
-    if (runModeAgent != NULL)
-        {
-        TRAP(ret,runModeAgent->ClientAppL());
-        LOG_MSG( "ClientAppL() returned %d", ret );
-        delete runModeAgent;
-        }
-    
-    test.End();
-    test.Close();
-
-    delete trap;
-    __UHEAP_MARKEND;
-    return ret;
-    }
-
--- a/debugsrv/runmodedebug/rmdebug_test/rm_debug/performance_test/t_rmdebug_performance_test.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,142 +0,0 @@
-// Copyright (c) 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:
-//
-// Description:
-// Tests performance of run mode debug device component   
-// 
-//
-
-#ifndef RMDEBUG_PERFORMANCE_H
-#define RMDEBUG_PERFORMANCE_H
-
-#include <u32hal.h>
-#include <f32file.h>
-#include <rm_debug_api.h>
-
-/* Config for t_rmdebug_app.exe: 
- * -f1: prefetch abort,
- * -d0: zero delay before crash
- * -p: priority of test target main thread
- */    
-_LIT(KTargetOptions,"-f1 -d0 -p%d");
-
-// Default number of test runs
-const TInt KNumOfTestRuns = 7;
-
-/**
- @Class TAgentEventInfo
- 
- Class for gathering event data from the run-mode driver
- */
-class TAgentEventInfo
-{
-public:
-    TAgentEventInfo() : iEventInfoBuf(iEventInfo) {}
-   
-public:
-    // This is the underlying class for event interaction with the Run Mode debug API 
-    Debug::TEventInfo          iEventInfo;
-    
-    TPckg<Debug::TEventInfo>  iEventInfoBuf; 
-};
-
-/**
-  @Class CRunModeAgent
-  
-  The basic run mode agent
-  */
-class CRunModeAgent : public CBase
-	{
-public:
-    
-    enum displayHelp {EDontDisplayHelp =0, EDisplayHelp };
-    
-	static CRunModeAgent* NewL();
-	~CRunModeAgent();
-	void ClientAppL();  
-	Debug::RSecuritySvrSession&  DebugDriver() { return iServSession; };	
-
-private:
-	void ConstructL();
-	void StartTest();
-	void TestDriverPerformance();
-	void RunBenchMarkTest();
-	TInt ParseCommandLine();
-	
-	void Attach();
-	void Detach();
-	    
-	void HandleEvent(Debug::TEventInfo& aEventInfo);
-	TInt LaunchProcessL(RProcess& aProcess, const TDesC& aExeName, const TDesC& aCommandLine);
-	void DisplayUsage();
-	void GetNanoTickPeriod();
-	void SetEventAction();
-	void SetDefaultParamValues();
-	
-	void CalculatePerformance();
-	void GetEvent();
-	void GetStartTime();
-	TInt GetTimeInMs();
-	
-private:
-	
-	/** 
-	  Used for test cases interacting with the RMDBG only
-	 */
-	TRequestStatus iStatus;   
-	
-	/**
-	  The nanokernel tick period in MS
-	*/
-	TInt iTickPeriodMs;
-
-	/*
-	 * Handle to DSS
-	 */
-	Debug::RSecuritySvrSession iServSession;
-	
-	/**
-	 Array to store tick counts between an iteration of a test run
-	*/
-	RArray<TUint> iTimeDifs;
-	
-	/**
-	 Object to gather event data from RMDBG
-	*/
-	TAgentEventInfo iSEventInfo;
-		
-	/**
-	  Flag to indicate test target has crashed
-	*/
-	TBool ilaunchCompleted;
-	
-	/*
-	 * RProperty to get counter value from test app
-	 */
-	RProperty iIntegerProperty;
-		
-	struct PerformanceTestParams
-	    {
-	    enum TestOptions {EAttachAll=0,EAttachExe, EBenchMarkTest };
-	    TUint iTestType;
-	    TUint iNumOfTestRuns;
-	    TUint iTestTargetPriority;
-	    TUint iEvents;
-	    TInt iCountEnd;
-	    TInt iCountStart;
-	    TUint iDriver;
-	    } iParams;
-	    
-	};
-
-#endif // RMDEBUG_PERFORMANCE_H
-
--- a/debugsrv/runmodedebug/rmdebug_test/rm_debug/scripts/tef_execute_rtests.script	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,59 +0,0 @@
-// Copyright (c) 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 "Symbian Foundation License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description: Script file for running Run-Mode Debug Tests (RTests) as TEF3 tests.
-// 		Please note, for a description of the tests please goto the RTests themselves.
-//		This file is a temporary measure, until the RTest component itself is updated.
-//		The problem is RTest does not produce logs when run on Sirocco, 
-//		so this wrapper allows us to do that.
-//
-//! @File
-//! @SYMTestSuiteName           tef_execute_rtests.script
-//! @SYMScriptTestEnvironment   RTEST as TEF3
-
-PRINT *** Running RTests as TEF3 tests ***
-
-START_TESTCASE                  KBASE-t_rmdebug2
-RUN_PROGRAM 120 t_rmdebug2
-END_TESTCASE                    KBASE-t_rmdebug2
-
-
-START_TESTCASE                  KBASE-t_rmdebug2_oem
-RUN_PROGRAM 120 t_rmdebug2_oem
-END_TESTCASE                    KBASE-t_rmdebug2_oem
-
-
-START_TESTCASE                  KBASE-t_rmdebug2_oem2
-RUN_PROGRAM 120 t_rmdebug2_oem2
-END_TESTCASE                    KBASE-t_rmdebug2_oem2
-
-
-START_TESTCASE                  KBASE-t_rmdebug2_allcaps
-RUN_PROGRAM 120 t_rmdebug2_allcaps
-END_TESTCASE                    KBASE-t_rmdebug2_allcaps
-
-
-START_TESTCASE                  KBASE-t_performance_test
-RUN_PROGRAM 120 t_performance_test
-END_TESTCASE                    KBASE-t_performance_test
-
-
-START_TESTCASE                  KBASE-t_rmdebug_multi_target
-RUN_PROGRAM 120 t_rmdebug_multi_target
-END_TESTCASE                    KBASE-t_rmdebug_multi_target
-
-
-START_TESTCASE                  KBASE-t_multi_agent_launcher
-RUN_PROGRAM 120 t_multi_agent_launcher
-END_TESTCASE                    KBASE-t_multi_agent_launcher
-
-PRINT *** Completed RTests as TEF3 tests ***
--- a/debugsrv/runmodedebug/rmdriver/group/bld.inf	Wed Sep 29 17:45:35 2010 +0300
+++ b/debugsrv/runmodedebug/rmdriver/group/bld.inf	Fri Oct 08 14:56:39 2010 +0300
@@ -1,7 +1,7 @@
 // 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"
+// under the terms of "Eclipse Public License v1.0"
 // which accompanies this distribution, and is available
 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
 //
@@ -16,10 +16,8 @@
 // 
 //
 
-/**
- @file
-*/
 
+#include <platform_paths.hrh>
 
 PRJ_PLATFORMS
 
@@ -27,8 +25,7 @@
 
 PRJ_EXPORTS
 
-../../securityServer/inc/rm_debug_api.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(rm_debug_api.h)
-rm_debug_svr.iby						/epoc32/rom/include/	// Run mode debug driver
+rm_debug_svr.iby							CORE_OS_LAYER_IBY_EXPORT_PATH(rm_debug_svr.iby)
 
 PRJ_MMPFILES
 
@@ -41,7 +38,7 @@
 
 
 rm_debug_kerneldriver
-../../securityServer/group/rm_debug_svr
+../../securityserver/group/rm_debug_svr
 
 #endif
 
--- a/debugsrv/runmodedebug/rmdriver/group/rm_debug_kerneldriver.mmh	Wed Sep 29 17:45:35 2010 +0300
+++ b/debugsrv/runmodedebug/rmdriver/group/rm_debug_kerneldriver.mmh	Fri Oct 08 14:56:39 2010 +0300
@@ -1,7 +1,7 @@
 // Copyright (c) 2009-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"
+// under the terms of "Eclipse Public License v1.0"
 // which accompanies this distribution, and is available
 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
 //
@@ -13,12 +13,15 @@
 // Description:
 //
 
+#include <platform_paths.hrh>
+
 OS_LAYER_SYSTEMINCLUDE
 
 #include <kernel/kern_ext.mmh>
 
 
 UID             0x100000AF 0x101F7157
+VENDORID 		VID_DEFAULT
 
 SOURCEPATH      ../src
 SOURCE          d_list_manager.cpp
@@ -40,8 +43,6 @@
 
 userinclude		../inc
 
-VENDORID 0x70000001
-
 //Specified to allow global data
 EPOCALLOWDLLDATA
 
--- a/debugsrv/runmodedebug/rmdriver/group/rm_debug_kerneldriver.mmp	Wed Sep 29 17:45:35 2010 +0300
+++ b/debugsrv/runmodedebug/rmdriver/group/rm_debug_kerneldriver.mmp	Fri Oct 08 14:56:39 2010 +0300
@@ -1,7 +1,7 @@
 // Copyright (c) 2009 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"
+// under the terms of "Eclipse Public License v1.0"
 // which accompanies this distribution, and is available
 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
 //
--- a/debugsrv/runmodedebug/rmdriver/group/rm_debug_svr.iby	Wed Sep 29 17:45:35 2010 +0300
+++ b/debugsrv/runmodedebug/rmdriver/group/rm_debug_svr.iby	Fri Oct 08 14:56:39 2010 +0300
@@ -1,8 +1,8 @@
 /*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009-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"
+* under the terms of "Eclipse Public License v1.0"
 * which accompanies this distribution, and is available
 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
 *
@@ -14,35 +14,13 @@
 * Description:
 *
 */
-#ifndef __RM_DEBUG_SVR_IBY__
-#define __RM_DEBUG_SVR_IBY__
+#ifndef __RM_DEBUG_SVR_2_IBY__
+#define __RM_DEBUG_SVR_2_IBY__
 
-#ifndef INST_ARM4
-#ifdef KMAIN
-
-// Debug Device Driver
-extension[VARID]=  \Epoc32\Release\##KMAIN##\##BUILD##\rm_debug.ldd		\sys\bin\rm_debug.ldd
+// Debug Driver
+extension[VARID]=KERNEL_DIR/DEBUG_DIR/rm_debug.ldd		/sys/bin/rm_debug.ldd
 
 // Debug Security Server
-file=			\Epoc32\Release\##MAIN##\##BUILD##\rm_debug_svr.exe		\sys\bin\rm_debug_svr.exe
-
-#endif
-
-#ifndef KMAIN
+file=ABI_DIR/DEBUG_DIR/rm_debug_svr.exe		/sys/bin/rm_debug_svr.exe
 
-// Debug Device Driver
-#ifdef STOP_MODE_DEBUGGING_V2
-extension[VARID]=KERNEL_DIR\DEBUG_DIR\rm_debug_ext.ldd		\sys\bin\rm_debug.ldd
-#else
-extension[VARID]=KERNEL_DIR\DEBUG_DIR\rm_debug.ldd		\sys\bin\rm_debug.ldd
-#endif
-
-// Debug Security Server
-file=KERNEL_DIR\DEBUG_DIR\rm_debug_svr.exe		\sys\bin\rm_debug_svr.exe
-
-#endif
-
-
-#endif	// INST_ARM4
-
-#endif	// __RM_DEBUG_SVR_IBY__
+#endif	// __RM_DEBUG_SVR_2_IBY__
--- a/debugsrv/runmodedebug/rmdriver/inc/d_debug_agent.h	Wed Sep 29 17:45:35 2010 +0300
+++ b/debugsrv/runmodedebug/rmdriver/inc/d_debug_agent.h	Fri Oct 08 14:56:39 2010 +0300
@@ -1,7 +1,7 @@
 // Copyright (c) 2006-2009 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"
+// under the terms of "Eclipse Public License v1.0"
 // which accompanies this distribution, and is available
 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
 //
--- a/debugsrv/runmodedebug/rmdriver/inc/d_debug_agent.inl	Wed Sep 29 17:45:35 2010 +0300
+++ b/debugsrv/runmodedebug/rmdriver/inc/d_debug_agent.inl	Fri Oct 08 14:56:39 2010 +0300
@@ -1,7 +1,7 @@
 // Copyright (c) 2009 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"
+// under the terms of "Eclipse Public License v1.0"
 // which accompanies this distribution, and is available
 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
 //
@@ -15,12 +15,6 @@
 //
 
 
-/**
- @file
- @internalComponent
- @released
-*/
-
 #ifndef D_DEBUG_AGENT_INL
 #define D_DEBUG_AGENT_INL
 
--- a/debugsrv/runmodedebug/rmdriver/inc/d_debug_functionality.h	Wed Sep 29 17:45:35 2010 +0300
+++ b/debugsrv/runmodedebug/rmdriver/inc/d_debug_functionality.h	Fri Oct 08 14:56:39 2010 +0300
@@ -1,7 +1,7 @@
 // Copyright (c) 2006-2009 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"
+// under the terms of "Eclipse Public License v1.0"
 // which accompanies this distribution, and is available
 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
 //
--- a/debugsrv/runmodedebug/rmdriver/inc/d_driver_event_info.h	Wed Sep 29 17:45:35 2010 +0300
+++ b/debugsrv/runmodedebug/rmdriver/inc/d_driver_event_info.h	Fri Oct 08 14:56:39 2010 +0300
@@ -1,7 +1,7 @@
 // Copyright (c) 2007-2009 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"
+// under the terms of "Eclipse Public License v1.0"
 // which accompanies this distribution, and is available
 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
 //
@@ -21,10 +21,6 @@
 #include <rm_debug_api.h>
 #include <kernel/kernel.h> 
 
-/**
-@file
-@internalComponent
-*/
 
 class TDriverEventInfo
 	{
--- a/debugsrv/runmodedebug/rmdriver/inc/d_list_manager.h	Wed Sep 29 17:45:35 2010 +0300
+++ b/debugsrv/runmodedebug/rmdriver/inc/d_list_manager.h	Fri Oct 08 14:56:39 2010 +0300
@@ -1,7 +1,7 @@
 // Copyright (c) 2007-2009 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"
+// under the terms of "Eclipse Public License v1.0"
 // which accompanies this distribution, and is available
 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
 //
@@ -22,11 +22,6 @@
 #include <kernel/kern_priv.h>
 #include <rm_debug_api.h>
 
-/**
-@file
-@internalComponent
-@released
-*/
 
 class TListManager
 {
--- a/debugsrv/runmodedebug/rmdriver/inc/d_process_tracker.h	Wed Sep 29 17:45:35 2010 +0300
+++ b/debugsrv/runmodedebug/rmdriver/inc/d_process_tracker.h	Fri Oct 08 14:56:39 2010 +0300
@@ -1,7 +1,7 @@
 // Copyright (c) 2006-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"
+// under the terms of "Eclipse Public License v1.0"
 // which accompanies this distribution, and is available
 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
 //
--- a/debugsrv/runmodedebug/rmdriver/inc/d_rmd_breakpoints.h	Wed Sep 29 17:45:35 2010 +0300
+++ b/debugsrv/runmodedebug/rmdriver/inc/d_rmd_breakpoints.h	Fri Oct 08 14:56:39 2010 +0300
@@ -1,7 +1,7 @@
 // Copyright (c) 2004-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"
+// under the terms of "Eclipse Public License v1.0"
 // which accompanies this distribution, and is available
 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
 //
@@ -14,14 +14,6 @@
 // Refactored class containing breakpoint related code from rm_debug_kerneldriver.cpp
 //
 
-
-
-/**
- @file
- @internalComponent
- @released
-*/
-
 #ifndef D_RMD_BREAKPOINTS_H
 #define D_RMD_BREAKPOINTS_H
 
@@ -125,7 +117,6 @@
 	TInt		iNumSteps;
 };
 /**
-@internalTechnology
 
 This class encapsulates all the data concerning run-mode and stop mode breakpoints
 as understood by the run-mode and stop-mode debug system.
--- a/debugsrv/runmodedebug/rmdriver/inc/d_rmd_breakpoints_debug.inl	Wed Sep 29 17:45:35 2010 +0300
+++ b/debugsrv/runmodedebug/rmdriver/inc/d_rmd_breakpoints_debug.inl	Fri Oct 08 14:56:39 2010 +0300
@@ -1,7 +1,7 @@
 // Copyright (c) 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"
+// under the terms of "Eclipse Public License v1.0"
 // which accompanies this distribution, and is available
 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
 //
--- a/debugsrv/runmodedebug/rmdriver/inc/d_rmd_stepping.h	Wed Sep 29 17:45:35 2010 +0300
+++ b/debugsrv/runmodedebug/rmdriver/inc/d_rmd_stepping.h	Fri Oct 08 14:56:39 2010 +0300
@@ -1,7 +1,7 @@
 // Copyright (c) 2004-2009 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"
+// under the terms of "Eclipse Public License v1.0"
 // which accompanies this distribution, and is available
 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
 //
--- a/debugsrv/runmodedebug/rmdriver/inc/d_rmd_stepping.inl	Wed Sep 29 17:45:35 2010 +0300
+++ b/debugsrv/runmodedebug/rmdriver/inc/d_rmd_stepping.inl	Fri Oct 08 14:56:39 2010 +0300
@@ -1,7 +1,7 @@
 // Copyright (c) 2004-2009 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"
+// under the terms of "Eclipse Public License v1.0"
 // which accompanies this distribution, and is available
 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
 //
@@ -13,14 +13,6 @@
 // Description:
 //
 
-
-
-/**
- @file
- @internalComponent
- @released
-*/
-
 #ifndef D_RMD_STEPPING_INL
 #define D_RMD_STEPPING_INL
 
--- a/debugsrv/runmodedebug/rmdriver/inc/d_target_process.h	Wed Sep 29 17:45:35 2010 +0300
+++ b/debugsrv/runmodedebug/rmdriver/inc/d_target_process.h	Fri Oct 08 14:56:39 2010 +0300
@@ -1,7 +1,7 @@
 // Copyright (c) 2006-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"
+// under the terms of "Eclipse Public License v1.0"
 // which accompanies this distribution, and is available
 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
 //
--- a/debugsrv/runmodedebug/rmdriver/inc/debug_logging.h	Wed Sep 29 17:45:35 2010 +0300
+++ b/debugsrv/runmodedebug/rmdriver/inc/debug_logging.h	Fri Oct 08 14:56:39 2010 +0300
@@ -1,7 +1,7 @@
 // Copyright (c) 2006-2009 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"
+// under the terms of "Eclipse Public License v1.0"
 // which accompanies this distribution, and is available
 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
 //
--- a/debugsrv/runmodedebug/rmdriver/inc/debug_utils.h	Wed Sep 29 17:45:35 2010 +0300
+++ b/debugsrv/runmodedebug/rmdriver/inc/debug_utils.h	Fri Oct 08 14:56:39 2010 +0300
@@ -1,7 +1,7 @@
 // Copyright (c) 2004-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"
+// under the terms of "Eclipse Public License v1.0"
 // which accompanies this distribution, and is available
 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
 //
@@ -14,11 +14,6 @@
 // Purpose: Static functions for use by debug driver classes
 //
 
-/**
- * @file
- * @internalComponent
- * @released
- */
 
 #ifndef DEBUG_UTILS_H
 #define DEBUG_UTILS_H
--- a/debugsrv/runmodedebug/rmdriver/inc/rm_debug_driver.h	Wed Sep 29 17:45:35 2010 +0300
+++ b/debugsrv/runmodedebug/rmdriver/inc/rm_debug_driver.h	Fri Oct 08 14:56:39 2010 +0300
@@ -1,7 +1,7 @@
 // Copyright (c) 2004-2009 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"
+// under the terms of "Eclipse Public License v1.0"
 // which accompanies this distribution, and is available
 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
 //
@@ -14,13 +14,6 @@
 //
 
 
-
-/**
- @file
- @internalTechnology
- @released
-*/
-
 #ifndef __RM_DEBUG_DRIVER_H__
 #define __RM_DEBUG_DRIVER_H__
 
--- a/debugsrv/runmodedebug/rmdriver/inc/rm_debug_eventhandler.h	Wed Sep 29 17:45:35 2010 +0300
+++ b/debugsrv/runmodedebug/rmdriver/inc/rm_debug_eventhandler.h	Fri Oct 08 14:56:39 2010 +0300
@@ -1,7 +1,7 @@
 // Copyright (c) 2004-2009 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"
+// under the terms of "Eclipse Public License v1.0"
 // which accompanies this distribution, and is available
 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
 //
--- a/debugsrv/runmodedebug/rmdriver/inc/rm_debug_kerneldriver.h	Wed Sep 29 17:45:35 2010 +0300
+++ b/debugsrv/runmodedebug/rmdriver/inc/rm_debug_kerneldriver.h	Fri Oct 08 14:56:39 2010 +0300
@@ -1,7 +1,7 @@
 // Copyright (c) 2004-2009 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"
+// under the terms of "Eclipse Public License v1.0"
 // which accompanies this distribution, and is available
 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
 //
@@ -14,13 +14,6 @@
 //
 
 
-
-/**
- @file
- @internalTechnology
- @released
-*/
-
 #ifndef __RM_DEBUG_KERNELDRIVER_H__
 #define __RM_DEBUG_KERNELDRIVER_H__
 
--- a/debugsrv/runmodedebug/rmdriver/src/d_debug_agent.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ b/debugsrv/runmodedebug/rmdriver/src/d_debug_agent.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -1,7 +1,7 @@
 // Copyright (c) 2006-2009 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"
+// under the terms of "Eclipse Public License v1.0"
 // which accompanies this distribution, and is available
 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
 //
--- a/debugsrv/runmodedebug/rmdriver/src/d_debug_functionality.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ b/debugsrv/runmodedebug/rmdriver/src/d_debug_functionality.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -1,7 +1,7 @@
 // Copyright (c) 2006-2009 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"
+// under the terms of "Eclipse Public License v1.0"
 // which accompanies this distribution, and is available
 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
 //
--- a/debugsrv/runmodedebug/rmdriver/src/d_driver_event_info.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ b/debugsrv/runmodedebug/rmdriver/src/d_driver_event_info.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -1,7 +1,7 @@
 // Copyright (c) 2007-2009 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"
+// under the terms of "Eclipse Public License v1.0"
 // which accompanies this distribution, and is available
 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
 //
--- a/debugsrv/runmodedebug/rmdriver/src/d_list_manager.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ b/debugsrv/runmodedebug/rmdriver/src/d_list_manager.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -1,7 +1,7 @@
 // Copyright (c) 2007-2009 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"
+// under the terms of "Eclipse Public License v1.0"
 // which accompanies this distribution, and is available
 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
 //
@@ -411,7 +411,6 @@
 				return err;
 				}
 			//calculate data values
-			TFileName fileName(codeSeg->iFileName->Ptr());
 			TBool isXip = (TBool)(codeSeg->iXIP);
 
 			//get the code seg type, can ignore error as have already checked codeSeg is not NULL
@@ -424,7 +423,7 @@
 
 			TUint32 uid3 = codeSeg->iUids.iUid[2].iUid;
 			//append data to buffer
-			err = AppendCodeSegData(aBuffer, aDataSize, memoryInfo, isXip, type, fileName, uid3);
+			err = AppendCodeSegData(aBuffer, aDataSize, memoryInfo, isXip, type, *codeSeg->iFileName, uid3);
 			if(err != KErrNone)
 				{
 				// Release the codeseglock mutex again
@@ -526,7 +525,6 @@
 			err = codeSeg->GetMemoryInfo(memoryInfo, NULL);
 			if (err) break;
 
-			TFileName fileName(codeSeg->iFileName->Ptr());
 			TBool isXip = (TBool)(codeSeg->iXIP);
 
 			//get the code seg type, can ignore error as have already checked codeSeg is not NULL
@@ -539,7 +537,7 @@
 
 			TUint32 uid3 = codeSeg->iUids.iUid[2].iUid;
 			//append data to buffer
-			err = AppendCodeSegData(aBuffer, aDataSize, memoryInfo, isXip, type, fileName, uid3);
+			err = AppendCodeSegData(aBuffer, aDataSize, memoryInfo, isXip, type, *codeSeg->iFileName, uid3);
 			if (err) break;
 			}
 		}
--- a/debugsrv/runmodedebug/rmdriver/src/d_process_tracker.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ b/debugsrv/runmodedebug/rmdriver/src/d_process_tracker.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -1,7 +1,7 @@
 // Copyright (c) 2006-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"
+// under the terms of "Eclipse Public License v1.0"
 // which accompanies this distribution, and is available
 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
 //
@@ -42,7 +42,6 @@
 /**
  * dtor
  * Go through forzen thread list and resume each one before clearing our structures
- * @internalTechnology
  */
 DProcessTracker::~DProcessTracker()
 	{
@@ -62,7 +61,6 @@
 	}
 
 /**
- * @internalTechnology
  *
  * Creates and stores an internal mapping of debug agent to debugged process.
  * Note that an individual process may be mapped to a number of debug agents.
@@ -162,7 +160,6 @@
 	}
 
 /**
- * @internalTechnology
  * 
  * Removes a previously created mapping between a debug agent and a debugged process,
  * as created by AttachProcess.
@@ -239,7 +236,6 @@
 	}
 
 /**
- * @internalTechnology
  *
  * Detachs a debug agent from every process being debugged. Used when a debug agent is being detached
  * from the debug security server and has not supplied a specific process name from which to detach.
@@ -287,7 +283,6 @@
 	}
 
 /**
- * @internalTechnology
  *
  * Returns a pointer to a DTargetProcess object representing the mapping of a debugged process
  * with all the relevant debug agents interested in that process, as determined
@@ -330,7 +325,6 @@
 	}
 
 /**
- * @internalTechnology
  *
  * Returns a pointer to a DTargetProcess object representing the mapping of a debugged process
  * with all the relevant debug agents interested in that process, as determined
--- a/debugsrv/runmodedebug/rmdriver/src/d_rmd_breakpoints.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ b/debugsrv/runmodedebug/rmdriver/src/d_rmd_breakpoints.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -1,7 +1,7 @@
 // Copyright (c) 2004-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"
+// under the terms of "Eclipse Public License v1.0"
 // which accompanies this distribution, and is available
 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
 //
@@ -39,7 +39,7 @@
 
 using namespace Debug;
 
-/* @internalTechnology
+/**
  *
  * Checks whether aAddress is correctly aligned for placing a breakpoint of
  * cpu architecture aMode.
@@ -89,7 +89,7 @@
 	return ETrue;
 	};
 
-/* @internalTechnology
+/**
  *
  * Returns the size of a breakpoint of architecture aMode in bytes
  * 
@@ -121,7 +121,7 @@
 		}
 	};
 
-/* @internalTechnology
+/**
  *
  * Checks whether two TBreakEntrys overlap
  *
@@ -163,7 +163,7 @@
 	return ETrue;
 	}
 
-/* @internalTechnology
+/**
  * 
  * Returns the breakpoint bitpattern to use for each architecture type
  *
--- a/debugsrv/runmodedebug/rmdriver/src/d_rmd_stepping.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ b/debugsrv/runmodedebug/rmdriver/src/d_rmd_stepping.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -1,7 +1,7 @@
 // Copyright (c) 2004-2009 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"
+// under the terms of "Eclipse Public License v1.0"
 // which accompanies this distribution, and is available
 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
 //
--- a/debugsrv/runmodedebug/rmdriver/src/d_target_process.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ b/debugsrv/runmodedebug/rmdriver/src/d_target_process.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -1,7 +1,7 @@
 // Copyright (c) 2006-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"
+// under the terms of "Eclipse Public License v1.0"
 // which accompanies this distribution, and is available
 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
 //
--- a/debugsrv/runmodedebug/rmdriver/src/debug_utils.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ b/debugsrv/runmodedebug/rmdriver/src/debug_utils.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -1,7 +1,7 @@
 // Copyright (c) 2004-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"
+// under the terms of "Eclipse Public License v1.0"
 // which accompanies this distribution, and is available
 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
 //
--- a/debugsrv/runmodedebug/rmdriver/src/rm_debug_eventhandler.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ b/debugsrv/runmodedebug/rmdriver/src/rm_debug_eventhandler.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -1,7 +1,7 @@
 // Copyright (c) 2004-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"
+// under the terms of "Eclipse Public License v1.0"
 // which accompanies this distribution, and is available
 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
 //
--- a/debugsrv/runmodedebug/rmdriver/src/rm_debug_kerneldriver.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ b/debugsrv/runmodedebug/rmdriver/src/rm_debug_kerneldriver.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -1,7 +1,7 @@
 // Copyright (c) 2004-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"
+// under the terms of "Eclipse Public License v1.0"
 // which accompanies this distribution, and is available
 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
 //
@@ -47,11 +47,11 @@
 
 using namespace Debug;
 
-/////////////////////////////////////////////////////////////////////////
+//
 //
 // DRM_DebugDriverFactory implementation
 //
-/////////////////////////////////////////////////////////////////////////
+//
 
 //
 // DRM_DebugDriverFactory constructor
@@ -93,11 +93,11 @@
 	Kern::InfoCopy(aDes,(TUint8*)&b,sizeof(b));
 	}
 
-/////////////////////////////////////////////////////////////////////////
+//
 //
 // DRM_DebugChannel implementation
 //
-/////////////////////////////////////////////////////////////////////////
+//
 
 //
 // DRM_DebugChannel constructor
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debugsrv/runmodedebug/runmodedebug_plat/group/bld.inf	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,22 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:  Intermediate build file for run mode debug api
+*
+*/
+
+
+PRJ_PLATFORMS
+DEFAULT
+
+#include "../run_mode_debug_api/group/bld.inf"
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debugsrv/runmodedebug/runmodedebug_plat/run_mode_debug_api/group/bld.inf	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,25 @@
+/*
+* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:  Build information file for project run_mode_debug_api
+*
+*/
+
+
+#include <platform_paths.hrh>
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXPORTS
+../inc/rm_debug_api.h			OS_LAYER_PLATFORM_EXPORT_PATH(rm_debug_api.h)
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debugsrv/runmodedebug/runmodedebug_plat/run_mode_debug_api/inc/rm_debug_api.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,2636 @@
+// Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+// Definitions for the run mode debug agent client side sessions.
+// 
+// WARNING: This file contains some APIs which are internal and are subject
+//          to change without notice. Such APIs should therefore not be used
+//          outside the Kernel and Hardware Services package.
+//
+
+#ifndef RM_DEBUG_API_H
+#define RM_DEBUG_API_H
+
+#include <e32cmn.h>
+#include <e32def_private.h>
+
+/**
+  The Debug namespace contains all API definitions used for on-target debugging.
+  */
+namespace Debug {
+
+/** This is the maximum size in bytes a user trace can be */
+const TInt TUserTraceSize = 256;
+
+/**
+  Information in the debug functionality block is represented as a concatenation
+  of pairs of TTagHeader structures and arrays of TTag objects.
+  @see TTagHeader
+  @see RSecuritySvrSession::GetDebugFunctionality
+  */
+struct TTag
+{
+	/** Tag ID, value identifying this tag. */
+	TUint32	iTagId;
+	/**
+	  Values correspond to TTagType enumerators.
+	  @see TTagType
+	  */
+	TUint16	iType;
+	/** Size of external data associated with this tag. */
+	TUint16 iSize;
+	/** Data associated with this tag. */
+	TUint32 iValue;
+};
+
+/**
+  Enumeration defining the supported tag types. These enumerators are used in TTag.iTagId.
+  @see TTag
+  */
+enum TTagType
+{
+	/** Indicates that the iValue field of a TTag structure will contain either ETrue or EFalse. */
+	ETagTypeBoolean = 0,
+	/** Indicates that the iValue field of a TTag structure will contain a value in the TUint32 range. */
+	ETagTypeTUint32 = 1,
+	/** Indicates that the iValue field of a TTag structure will contain values from an enumeration. */
+	ETagTypeEnum = 2,
+	/** Indicates that the iValue field of a TTag structure should be interpreted as a bit field. */
+	ETagTypeBitField = 3,
+	/** Indicates that the type of the iValue field of a TTag structure is unknown. */
+	ETagTypeUnknown = 4,
+	/** Indicates that the iValue field of a TTag structure will contain a pointer. */
+	ETagTypePointer = 5
+};
+
+/**
+  Information in the debug functionality block is represented as a concatenation
+  of pairs of TTagHeader structures and arrays of TTag objects.
+  @see TTag
+  @see RSecuritySvrSession::GetDebugFunctionality
+  */
+struct TTagHeader
+{
+	/** Value identifying the contents of this TTagHeader, should be interpreted as an enumerator from TTagHeaderId.
+	  @see TTagHeaderId
+	  */
+	TUint16	iTagHdrId;
+	/** The number of TTag elements in the array associated with this TTagHeader. */
+	TUint16 iNumTags;
+};
+
+/**
+  Enumeration used to identify TTagHeader structures, TTagHeader::iTagHdrId elements take these enumerators as values.
+  @see TTagHeader
+  */
+enum TTagHeaderId
+{
+	ETagHeaderIdCore = 0,            /**< Identifies a TTagHeader with associated TTag elements with iTagId values from TFunctionalityCore. */
+	ETagHeaderIdMemory = 1,          /**< Identifies a TTagHeader with associated TTag elements with iTagId values from TFunctionalityMemory. */
+	/**
+	  Identifies a TTagHeader with associated TTag elements with iTagId values from TFunctionalityRegister.
+	  These values are defined as in the document Symbian Core Dump File Format Appendix C
+	  (see SGL.TS0028.027 - Symbian Core Dump File Format v1.0.doc).
+	  The TTag objects in the associated array have an iSize value corresponding to the size of the register's data in bytes.
+	  */
+	ETagHeaderIdRegistersCore = 2,
+	/**
+	  Identifies a TTagHeader with associated TTag elements with iTagId values corresponding to coprocessor register identifiers.
+	  Coprocessor registers are defined as in the document Symbian Core Dump File Format Appendix C as follows
+	  (see SGL.TS0028.027 - Symbian Core Dump File Format v1.0.doc):
+
+	  For each 32-bit data word defining a co-pro register, the definition of the meaning of the bits follows
+	  the ARM Architecture Reference manual instruction coding
+
+	  Upper Halfword	Lower Halfword
+	  Opcode 2			CRm
+
+	  For example: The Domain Access Control Register is Register 3 of co-processor 15. The encoding is therefore
+	  CRm = 3
+	  Opcode2 = 0
+
+	  Therefore the functionality tag would be:
+	  TagID:  15			// co-processor number
+	  Type: ETagTypeTUint32
+	  Data: 0x00000003		// Opcode2 = 0, CRm = 3
+	  */
+	ETagHeaderIdCoProRegisters = 3,  /**< Identifies a TTagHeader with associated TTag elements with iTagId values from TFunctionalityRegister. */
+	ETagHeaderIdBreakpoints = 4,     /**< Identifies a TTagHeader with associated TTag elements with iTagId values from TFunctionalityBreakpoint. */
+	ETagHeaderIdStepping = 5,        /**< Identifies a TTagHeader with associated TTag elements with iTagId values from TFunctionalityStep. */
+	ETagHeaderIdExecution = 6,       /**< Identifies a TTagHeader with associated TTag elements with iTagId values from TFunctionalityExec. */
+	ETagHeaderIdEvents = 7,          /**< Identifies a TTagHeader with associated TTag elements with iTagId values from TEventType. */
+	ETagHeaderIdApiConstants = 8,    /**< Identifies a TTagHeader with associated TTag elements with iTagId values from TFunctionalityApiConstants.*/
+	ETagHeaderList = 9,              /**< Identifies a TTagHeader with associated TTag elements with iTagId values from TListId. */
+	ETagHeaderIdKillObjects = 10,    /**< Identifies a TTagHeader with associated TTag elements with iTagId values from TFunctionalityKillObject. */
+	ETagHeaderIdSecurity = 11,		 /**< Identifies a TTagHeader with associated TTag elements with iTagId values from TFunctionalitySecurity */
+	ETagHeaderIdBuffers = 12,        /**< Identifies a TTagHeader with associated TTag elements with iTagId values from TBufferType. */
+	ETagHeaderIdStopModeFunctions = 13, /**< Identifies a TTagHeader with associated TTag elements with iTagId values from TFunctionalityStopModeFunctions. */	
+};
+
+/**
+  This structure is not used in the run-mode debug API.
+  @deprecated
+  */
+struct TSubBlock
+{
+	/** Header to identify the TSubBlock. */
+	TTagHeader iHeader;
+	/** Pointer to array of TTag values associated with this TSubBlock. */
+	TTag* iTagArray;
+};
+
+/**
+  These tags define what kinds of core functionality are supported by the run-mode debug subsystem.
+  TTag structures associated with the ETagHeaderIdCore sub-block will have iTagId values from this enumeration.
+  See each enumerator for an explanation of how a TTag with that iTagId should be interpreted.
+  */
+enum TFunctionalityCore
+{
+	ECoreEvents = 0,        /**< Indicates whether events processing is supported. */
+	ECoreStartStop = 1,     /**< Indicates whether suspending and resuming threads is supported. */
+	ECoreMemory = 2,        /**< Indicates whether reading and writing memory is supported. */
+	ECoreRegister = 3,      /**< Indicates whether reading and writing register values is supported. */
+	ECoreBreakpoint = 4,    /**< Indicates whether breakpoints are supported. */
+	ECoreStepping = 5,      /**< Indicates whether stepping is supported. */
+	ECoreLists = 6,         /**< Indicates whether listings are supported. */
+	ECoreLogging = 7,       /**< Indicates whether logging is supported. */
+	ECoreHardware = 8,      /**< Indicates whether hardware support is supported. */
+	ECoreApiConstants = 9,  /**< Indicates whether the information in the ETagHeaderIdApiConstants sub-block is relevant. */
+	ECoreKillObjects = 10,  /**< Indicates whether killing objects (i.e. threads and processes) is supported. */
+	ECoreSecurity = 11,		/**< Indicates whether OEM Debug token support or other security info is supported. */
+	ECoreStopModeFunctions = 12, /**< Indicates whether Stop Mode function calling is supported. */
+	ECoreStopModeBuffers = 13, /**< Indicates whether Stop Mode buffers are supported. */
+	
+	/**
+	  A debug agent should find the number of core tags from the DFBlock rather than this enumerator.
+	  */
+	ECoreLast
+};
+
+/**
+  These tags define what kind of memory operations can be performed.
+  TTag structures associated with the ETagHeaderIdMemory sub-block will have iTagId values from this enumeration.
+  See each enumerator for an explanation of how a TTag with that iTagId should be interpreted.
+ */
+enum TFunctionalityMemory
+{
+	EMemoryRead = 0,          /**< Indicates whether reading memory is supported. */
+	EMemoryWrite = 1,         /**< Indicates whether writing memory is supported. */
+	EMemoryAccess64 = 2,      /**< Indicates whether 64 bit memory access is supported. */
+	EMemoryAccess32 = 3,      /**< Indicates whether 32 bit memory access is supported. */
+	EMemoryAccess16 = 4,      /**< Indicates whether 16 bit memory access is supported. */
+	EMemoryAccess8 = 5,       /**< Indicates whether 8 bit memory access is supported. */
+	EMemoryBE8 = 6,           /**< Indicates whether reading memory as 8 bit big-endian values is supported. */
+	EMemoryBE32 = 7,          /**< Indicates whether reading memory as 32 bit big-endian values is supported. */
+	EMemoryLE8 = 8,           /**< Indicates whether reading memory as 8 bit little-endian values is supported. */
+	EMemoryMaxBlockSize = 9,  /**< Corresponds to the maximum size of a block of memory which can be requested. */
+	/**
+	  A debug agent should find the number of memory tags from the DFBlock rather than this enumerator.
+	  */
+	EMemoryLast
+};
+
+/**
+  These tags define which objects can be killed by the device driver.
+  TTag structures associated with the ETagHeaderIdKillObjects sub-block will have iTagId values from this enumeration.
+  See each enumerator for an explanation of how a TTag with that iTagId should be interpreted.
+ */
+enum TFunctionalityKillObject
+{
+	EFunctionalityKillThread = 0,          /**< Indicates whether killing threads is supported. */
+	EFunctionalityKillProcess = 1,         /**< Indicates whether killing processes is supported. */
+	/**
+	  A debug agent should find the number of kill object tags from the DFBlock rather than this enumerator.
+	  */
+	EFunctionalityKillObjectLast
+};
+
+/**
+  A TTag with an id from the TFunctionalityRegister enum will have a value from this enumeration.
+  The values define how a register can be accessed, if at all.
+ */
+enum TFunctionalityAccess
+{
+	EAccessNone = 0,       /**< Indicates that a register cannot be accessed. */
+	EAccessReadOnly = 1,   /**< Indicates that a register can be read, but not written to. */
+	EAccessWriteOnly = 2,  /**< Indicates that a register can be written to, but not read. */
+	EAccessReadWrite = 3,  /**< Indicates that a register can be both read and written to. */
+	EAccessUnknown = 4,    /**< Indicates that it is unspecified whether reading or writing to a register is possible. */
+};
+
+/**
+  These enumerators act as core register identifiers.
+  TTag structures associated with the ETagHeaderIdRegistersCore sub-block will have iTagId values from this enumeration.
+  The numeric value of each enumerator identifies the register according to the definitions in the Symbian Core Dump File Format Appendix B
+  (see SGL.TS0028.027 - Symbian Core Dump File Format v1.0.doc).
+  */
+enum TFunctionalityRegister
+{
+	ERegisterR0 = 0x00000000,      /**< Identifier for user mode register R0. */
+	ERegisterR1 = 0x00000100,      /**< Identifier for user mode register R1. */
+	ERegisterR2 = 0x00000200,      /**< Identifier for user mode register R2. */
+	ERegisterR3 = 0x00000300,      /**< Identifier for user mode register R3. */
+	ERegisterR4 = 0x00000400,      /**< Identifier for user mode register R4. */
+	ERegisterR5 = 0x00000500,      /**< Identifier for user mode register R5. */
+	ERegisterR6 = 0x00000600,      /**< Identifier for user mode register R6. */
+	ERegisterR7 = 0x00000700,      /**< Identifier for user mode register R7. */
+	ERegisterR8 = 0x00000800,      /**< Identifier for user mode register R8. */
+	ERegisterR9 = 0x00000900,      /**< Identifier for user mode register R9. */
+	ERegisterR10 = 0x00000a00,     /**< Identifier for user mode register R10. */
+	ERegisterR11 = 0x00000b00,     /**< Identifier for user mode register R11. */
+	ERegisterR12 = 0x00000c00,     /**< Identifier for user mode register R12. */
+	ERegisterR13 = 0x00000d00,     /**< Identifier for user mode register R13. */
+	ERegisterR14 = 0x00000e00,     /**< Identifier for user mode register R14. */
+	ERegisterR15 = 0x00000f00,     /**< Identifier for user mode register R15. */
+	ERegisterCpsr = 0x00001000,    /**< Identifier for CPSR. */
+	ERegisterR13Svc = 0x00001100,  /**< Identifier for R13 supervisor mode banked register. */
+	ERegisterR14Svc = 0x00001200,  /**< Identifier for R14 supervisor mode banked register. */
+	ERegisterSpsrSvc = 0x00001300, /**< Identifier for SPSR supervisor mode banked register. */
+	ERegisterR13Abt = 0x00001400,  /**< Identifier for R13 Abort mode banked register. */
+	ERegisterR14Abt = 0x00001500,  /**< Identifier for R14 Abort mode banked register. */
+	ERegisterSpsrAbt = 0x00001600, /**< Identifier for SPSR Abort mode banked register. */
+	ERegisterR13Und = 0x00001700,  /**< Identifier for R13 Undefined mode banked register. */
+	ERegisterR14Und = 0x00001800,  /**< Identifier for R14 Undefined mode banked register. */
+	ERegisterSpsrUnd = 0x00001900, /**< Identifier for SPSR Undefined mode banked register. */
+	ERegisterR13Irq = 0x00001a00,  /**< Identifier for R13 Interrupt mode banked register. */
+	ERegisterR14Irq = 0x00001b00,  /**< Identifier for R14 Interrupt mode banked register. */
+	ERegisterSpsrIrq = 0x00001c00, /**< Identifier for SPSR Interrupt mode banked register. */
+	ERegisterR8Fiq = 0x00001d00,   /**< Identifier for R8 Fast Interrupt mode banked register. */
+	ERegisterR9Fiq = 0x00001e00,   /**< Identifier for R9 Fast Interrupt mode banked register. */
+	ERegisterR10Fiq = 0x00001f00,  /**< Identifier for R10 Fast Interrupt mode banked register. */
+	ERegisterR11Fiq = 0x00002000,  /**< Identifier for R11 Fast Interrupt mode banked register. */
+	ERegisterR12Fiq = 0x00002100,  /**< Identifier for R12 Fast Interrupt mode banked register. */
+	ERegisterR13Fiq = 0x00002200,  /**< Identifier for R13 Fast Interrupt mode banked register. */
+	ERegisterR14Fiq = 0x00002300,  /**< Identifier for R14 Fast Interrupt mode banked register. */
+	ERegisterSpsrFiq = 0x00002400, /**< Identifier for SPSR Fast Interrupt mode banked register. */
+	/**
+	  A debug agent should find the number of core registers from the DFBlock rather than this enumerator.
+	  */
+	ERegisterLast = 37
+};
+
+
+/**
+  These tags define the kind of breakpoints that are supported.
+  TTag structures associated with the ETagHeaderIdBreakpoints sub-block will have iTagId values from this enumeration.
+  See each enumerator for an explanation of how a TTag with that iTagId should be interpreted.
+ */
+enum TFunctionalityBreakpoint
+{
+	EBreakpointThread = 0,         /**< Indicates whether thread specific breakpoints are supported. */
+	EBreakpointProcess = 1,        /**< Indicates whether process specific breakpoints are supported. */
+	EBreakpointSystem = 2,         /**< Indicates whether system wide breakpoints are supported. */
+	EBreakpointArm = 3,            /**< Indicates whether ARM mode breakpoints are supported. */
+	EBreakpointThumb = 4,          /**< Indicates whether Thumb mode breakpoints are supported. */
+	EBreakpointT2EE = 5,           /**< Indicates whether Thumb2 mode breakpoints are supported. */
+	EBreakpointArmInst = 6,        /**< Reserved for future use. */
+	EBreakpointThumbInst = 7,      /**< Reserved for future use. */
+	EBreakpointT2EEInst = 8,       /**< Reserved for future use. */
+	EBreakpointSetArmInst = 9,     /**< Reserved for future use. */
+	EBreakpointSetThumbInst = 10,  /**< Reserved for future use. */
+	EBreakpointSetT2EEInst = 11,   /**< Reserved for future use. */
+	/**
+	  A debug agent should find the number of breakpoint tags from the DFBlock rather than this enumerator.
+	  */
+	EBreakpointLast
+};
+
+/**
+  These enumerators provide information about the stepping capabilities of the debug sub-system.
+  TTag structures associated with the ETagHeaderIdStepping sub-block will have iTagId values from this enumeration.
+  See each enumerator for an explanation of how a TTag with that iTagId should be interpreted.
+ */
+enum TFunctionalityStep
+{
+	EStep = 0, /**< Indicates whether instruction stepping is supported. */
+	/**
+	  A debug agent should find the number of stepping tags from the DFBlock rather than this enumerator.
+	  */
+	EStepLast
+};
+
+/**
+  These enumerators provide information about the execution control capabilities of the debug sub-system.
+  TTag structures associated with the ETagHeaderIdExecution sub-block will have iTagId values from this enumeration.
+  See each enumerator for an explanation of how a TTag with that iTagId should be interpreted.
+ */
+enum TFunctionalityExec
+{
+	EExecThreadSuspendResume = 0,  /**< Indicates whether suspending and resuming threads is supported. */
+	EExecProcessSuspendResume = 1, /**< Indicates whether suspending and resuming processes is supported. */
+	EExecSystemSuspendResume = 2,  /**< Indicates whether suspending and resuming the entire system is supported. */
+	/**
+	  A debug agent should find the number of execution control tags from the DFBlock rather than this enumerator.
+	  */
+	EExecLast
+};
+
+/**
+  This enumeration defines the event types supported by the debug sub-system.
+  TTag structures associated with the ETagHeaderIdEvents sub-block will have
+  iTagId values from this enumeration, and iValue values from the TKernelEventAction enumeration.
+
+  These enumerators are also used by the RSecuritySvrSession API to identify events.
+  @see RSecuritySvrSession
+  @see TKernelEventAction
+ */
+enum TEventType
+{
+	EEventsBreakPoint = 0,    /**< Identifies a breakpoint event. */
+	EEventsSwExc = 1,         /**< Identifies a software exception event. */
+	EEventsHwExc = 2,         /**< Identifies a hardware exception event. */
+	EEventsKillThread = 3,    /**< Identifies a kill thread event. */
+	EEventsAddLibrary = 4,    /**< Identifies an add library event. */
+	EEventsRemoveLibrary = 5, /**< Identifies a remove library event. */
+	/**
+	 If an event is generated and there is only a single space remaining in the events queue then
+	 an event of type EEventsBufferFull will be stored in the queue and the generated event will
+	 be discarded. If further events occur while the buffer is full the events will be discarded.
+	 As such an event of type EEventsBufferFull being returned signifies that one or more events
+	 were discarded. An event of this type has no valid data associated with it.
+	 */
+	EEventsBufferFull = 6,
+	EEventsUnknown = 7,       /**< Identifies an event of unknown type. */
+	EEventsUserTrace = 8,     /**< Identifies a user trace. */
+	EEventsProcessBreakPoint = 9, /**< Identifies a process breakpoint event. */
+	EEventsStartThread = 10, /**< Identifies a start thread event. */
+	EEventsUserTracesLost = 11, /**< Identifies user traces being lost. */
+	EEventsAddProcess = 12, /**< Identifies an AddProcess event */
+	EEventsRemoveProcess = 13, /**< Identifies a RemoveProcess event */
+	/**
+	  A debug agent should find the number of event types from the DFBlock rather than this enumerator.
+	  */
+	EEventsLast
+};
+
+/**
+  These enumerators provide information about constants which are used in the RSecuritySvrSession API.
+  TTag structures associated with the ETagHeaderIdApiConstants sub-block will have iTagId values from this enumeration.
+  See each enumerator for an explanation of how a TTag with that iTagId should be interpreted.
+ */
+enum TFunctionalityApiConstants
+	{
+	/**
+	  Corresponds to the size of a buffer required to store a TEventInfo.
+	  @see TEventInfo
+	  */
+	EApiConstantsTEventInfoSize = 0,
+	/**
+	  A debug agent should find the number of API constants tags from the DFBlock rather than this enumerator.
+	  */
+	EApiConstantsLast,
+	};
+
+/**
+  The set of possible actions which could be taken when a kernel event occurs.
+  Not all actions are possible for all events. The debug functionality sub-block with header id ETagHeaderIdEvents
+  indicates which values are permitted for each event. The value given for that event should be
+  considered as the most intrusive action the debugger may set: with the definition that EActionSuspend is more
+  intrusive than EActionContinue, which is more intrusive than EActionIgnore.
+  @see RSecuritySvrSession
+  */
+enum TKernelEventAction
+{
+	/** If an event action is set to this value then events of that type will be
+	  ignored, and not reported to the debugger. */
+	EActionIgnore = 0,
+	/** If an event action is set to this value then events of that type will be
+	  reported to the debugger and the thread which generated the event will be
+	  allowed to continue executing. */
+	EActionContinue = 1,
+	/** If an event action is set to this value then events of that type will be
+	  reported to the debugger and the thread which generated the event will be
+	  suspended. */
+	EActionSuspend = 2,
+	/**
+	  Count of event actions.
+	  */
+	EActionLast
+};
+
+/**
+  These enumerators provide information about the ability of the debug subsystem to support OEM Debug tokens.
+  TTag structures associated with the ETagHeaderIdSecurity sub-block will have iTagId values from this enumeration.
+  See each enumerator for an explanation of how a TTag with that iTagId should be interpreted.
+ */
+enum TFunctionalitySecurity
+{
+	ESecurityOEMDebugToken = 0,  /**< Indicates whether the DSS supports the use of OEM Debug Tokens. */
+
+	/**
+	  A debug agent should find the number of tags from the DFBlock rather than this enumerator.
+	  */
+	ESecurityLast
+};
+
+/**
+  Used for storing the contents of a 32 bit register
+  */
+typedef TUint32 TRegisterValue32;
+
+
+/**
+ * Processor mode
+ */
+enum TArmProcessorModes
+{
+	EUserMode=0x10,    	//!< EUserMode
+    EFiqMode=0x11,  	//!< EFiqMode
+    EIrqMode=0x12,  	//!< EIrqMode
+    ESvcMode=0x13,  	//!< ESvcMode
+    EAbortMode=0x17,	//!< EAbortMode
+    EUndefMode=0x1b,	//!< EUndefMode
+    EMaskMode=0x1f  	//!< EMaskMode
+};
+
+
+
+/**
+  Structure containing information about the state of the registers when a
+  hardware exception occurred
+  */
+class TRmdArmExcInfo
+	{
+public:
+	/** Enumeration detailing the types of exception which may occur. */
+	enum TExceptionType
+		{
+		/** Enumerator signifying that a prefetch abort error has occurred. */
+		EPrefetchAbort = 0,
+		/** Enumerator signifying that a data abort error has occurred. */
+		EDataAbort = 1,
+		/** Enumerator signifying that an undefined instruction error has occurred. */
+		EUndef =2
+		};
+
+	/** Value of CPSR. */
+	TRegisterValue32 iCpsr;
+	/** Type of exception which has occurred. */
+	TExceptionType iExcCode;
+	/** Value of R13 supervisor mode banked register. */
+	TRegisterValue32 iR13Svc;
+	/** Value of user mode register R4. */
+	TRegisterValue32 iR4;
+	/** Value of user mode register R5. */
+	TRegisterValue32 iR5;
+	/** Value of user mode register R6. */
+	TRegisterValue32 iR6;
+	/** Value of user mode register R7. */
+	TRegisterValue32 iR7;
+	/** Value of user mode register R8. */
+	TRegisterValue32 iR8;
+	/** Value of user mode register R9. */
+	TRegisterValue32 iR9;
+	/** Value of user mode register R10. */
+	TRegisterValue32 iR10;
+	/** Value of user mode register R11. */
+	TRegisterValue32 iR11;
+	/** Value of R14 supervisor mode banked register. */
+	TRegisterValue32 iR14Svc;
+	/** Address which caused exception (System Control Coprocessor Fault Address Register) */
+	TRegisterValue32 iFaultAddress;
+	/** Value of System Control Coprocessor Fault Status Register. */
+	TRegisterValue32 iFaultStatus;
+	/** Value of SPSR supervisor mode banked register. */
+	TRegisterValue32 iSpsrSvc;
+	/** Value of user mode register R13. */
+	TRegisterValue32 iR13;
+	/** Value of user mode register R14. */
+	TRegisterValue32 iR14;
+	/** Value of user mode register R0. */
+	TRegisterValue32 iR0;
+	/** Value of user mode register R1. */
+	TRegisterValue32 iR1;
+	/** Value of user mode register R2. */
+	TRegisterValue32 iR2;
+	/** Value of user mode register R3. */
+	TRegisterValue32 iR3;
+	/** Value of user mode register R12. */
+	TRegisterValue32 iR12;
+	/** Value of user mode register R15, points to instruction which caused exception. */
+	TRegisterValue32 iR15;
+	};
+
+/**
+  The maximum size, in bytes, of the panic category string returned as part of a
+  TEventInfo object.
+
+  @see TEventInfo
+  @see TThreadKillInfo
+  */
+const TInt KPanicCategoryMaxName = KMaxName;
+
+/**
+  Event specific information returned as part of a TEventInfo object when
+  an agent set breakpoint is hit.
+  */
+class TThreadBreakPointInfo
+	{
+public:
+	/** Identifies the type of exception. */
+	TExcType iExceptionNumber;
+	/** Structure containing information about the ARM register values. */
+	TRmdArmExcInfo iRmdArmExcInfo;
+	};
+
+/**
+  Event specific information returned as part of a TEventInfo object when
+  a software exception occurs.
+  */
+class TThreadSwExceptionInfo
+	{
+public:
+	/** The value of the program counter. */
+	TUint32 iCurrentPC;
+	/** Identifies the type of exception. */
+	TExcType iExceptionNumber;
+	};
+
+/**
+  Event specific information returned as part of a TEventInfo object when
+  a hardware exception occurs.
+  */
+class TThreadHwExceptionInfo
+	{
+public:
+	/** Identifies the type of exception. */
+	TExcType iExceptionNumber;
+	/** Structure containing information about the ARM register values. */
+	TRmdArmExcInfo iRmdArmExcInfo;
+	};
+
+/**
+  Event specific information returned as part of a TEventInfo object when
+  a thread kill event occurs.
+  */
+class TThreadKillInfo
+	{
+public:
+	/** The value of the program counter. */
+	TUint32 iCurrentPC;
+	/** Specifies the reason for the kill thread event, this value is specific to the killed thread and does not correspond to a standard Symbian enumeration. */
+	TInt iExitReason;
+	/** Specifies the type of the thread kill event, values correspond to elements of TExitType. */
+	TUint8 iExitType;
+	/** The panic category of the killed thread. */
+	TUint8 iPanicCategory[KPanicCategoryMaxName];
+	/** Contains the length in bytes of the initialised data in iPanicCategory. */
+	TInt iPanicCategoryLength;
+	};
+
+/**
+  Event specific information returned as part of a TEventInfo object when
+  a library load event occurs.
+  */
+class TLibraryLoadedInfo
+	{
+public:
+	/** The name of the file that the library was loaded from. */
+	TUint8 iFileName[KMaxName];
+	/** Contains the length in bytes of the initialised data in iFileName. */
+	TInt iFileNameLength;
+	/** The code base address (.text). */
+	TUint32 iCodeAddress;
+	/** The base address of the initialised data section (.data). */
+	TUint32 iDataAddress;
+	};
+
+/**
+  Event specific information returned as part of a TEventInfo object when
+  a thread is started
+  */
+class TStartThreadInfo
+	{
+public:
+	/** The name of the file that the process owning the thread was created from. */
+	TUint8 iFileName[KMaxName];
+	/** Contains the length in bytes of the initialised data in iFileName. */
+	TInt iFileNameLength;
+	};
+
+/**
+  Event specific information returned as part of a TEventInfo object when
+  a process is added. Note that the Process may not be fully constructed,
+  e.g. no threads.
+  */
+class TAddProcessInfo
+	{
+public:
+	/** The name of the file that the process was created from. */
+	TUint8 iFileName[KMaxName];
+	/** Contains the length in bytes of the initialised data in iFileName. */
+	TInt iFileNameLength;
+	/** The UID3 of this process */
+	TUint32 iUid3;  
+	/** Contains the CreatorThread ID if available: May be 0 */
+	TUint64 iCreatorThreadId;  
+	};
+
+/**
+  Event specific information returned as part of a TEventInfo object when
+  a process is removed. Note that the Process may not be fully destroyed,
+  so its resources should only be accessed if you already have a handle to it.
+  */
+class TRemoveProcessInfo
+	{
+public:
+	/** The name of the file that the process was created from. */
+	TUint8 iFileName[KMaxName];
+	/** Contains the length in bytes of the initialised data in iFileName. */
+	TInt iFileNameLength;
+	TUint32 iSpare1;	// Unused
+	};
+
+/**
+  Event specific information returned as part of a TEventInfo object when
+  a library unload event occurs.
+  */
+class TLibraryUnloadedInfo
+	{
+public:
+	/** The name of the file that the library was loaded from. */
+	TUint8 iFileName[KMaxName];
+	/** Contains the length in bytes of the initialised data in iFileName. */
+	TInt iFileNameLength;
+	};
+
+/**
+ * Enum to represent the context of a user trace message
+ */ 
+enum TUserTraceMessageContext 
+{
+	ESingleMessage = 0x1,   /** Indicates this message is the only one corresponding to a given user trace */ 
+	EMultiStart = 0x2, /** Indicates this message is the start of a user trace which consists of multiple messages */
+	EMultiMid = 0x3, /** Indicates this message is one in a series of user trace messages */
+	EMultiEnd = 0x4, /** Indicates this message is the last in a series of user trace messages */
+	/**
+	  A debug agent should find the number of core tags from the DFBlock rather than this enumerator.
+	  */
+	ELast = 0x5	
+};
+	
+/**
+ *   Event specific information returned as part of a TEventInfo object 
+ *   when a user trace event occurs.
+ */
+class TUserTraceInfo
+	{
+public:
+	/** The user trace text */
+	TUint8 iUserTraceText[TUserTraceSize];
+	
+	/** User trace text length */
+	TInt iUserTraceLength;
+	
+	/** The context of the message */
+	TUserTraceMessageContext iMessageStatus;
+	};
+	
+	
+/**
+  Structure used to store information about an event. An object of this type
+  is passed as an argument to the RSecuritySvrSession::GetEvent function,
+  and is filled in by the debug driver, and returned to the agent, when a
+  relevant event occurs.
+
+  The debug functionality block contains the size in bytes of the data that
+  the driver will return when a GetEvent call is issued. A debug agent should
+  ensure that this value equals the size of this TEventInfo object to ensure
+  that a compatible debug driver is being used. The value is stored as
+  EApiConstantsTEventInfoSize in the TFunctionalityApiConstants block.
+
+  @see RSecuritySvrSession::GetDebugFunctionality
+  @see RSecuritySvrSession::GetEvent
+  */
+class TEventInfo
+	{
+public:
+
+	/** Constructor sets all elements to default values. */
+	inline TEventInfo() { Reset(); };
+
+	/** Resets all values to default values. */
+	inline void Reset()
+		{
+		iProcessId = 0;
+		iProcessIdValid = EFalse;
+		iThreadId = 0;
+		iThreadIdValid = EFalse;
+		iEventType = (TEventType)NULL;
+		iActionTaken = EActionIgnore;
+		};
+
+public:
+
+	/** The process ID of the process which the event occurred in. */
+	TUint64 				iProcessId;
+	/** The thread ID of the thread which the event occurred in. */
+	TUint64 				iThreadId;
+	/** Has value ETrue if iProcessId is valid, EFalse otherwise. */
+	TUint8					iProcessIdValid;
+	/** Has value ETrue if iThreadId is valid, EFalse otherwise. */
+	TUint8					iThreadIdValid;
+	/** What action was taken by the debug system when it received the event. A TKernelEventAction */
+	TUint8					iActionTaken;
+	TUint8					iSpare;
+
+	/** Indicates the type of the event. This type should be used to determine
+	    the type of the information stored in the union which is part of this class. */
+	TEventType				iEventType;
+	union
+		{
+		/** Information which is specific to the break point event. */
+		TThreadBreakPointInfo iThreadBreakPointInfo;
+		/** Information which is specific to the software exception event. */
+		TThreadSwExceptionInfo iThreadSwExceptionInfo;
+		/** Information which is specific to the hardware exception event. */
+		TThreadHwExceptionInfo iThreadHwExceptionInfo;
+		/** Information which is specific to the thread kill event. */
+		TThreadKillInfo iThreadKillInfo;
+		/** Information which is specific to the library loaded event. */
+		TLibraryLoadedInfo iLibraryLoadedInfo;
+		/** Information which is specific to the library unloaded event. */
+		TLibraryUnloadedInfo iLibraryUnloadedInfo;
+		/** Information which is specific to the user trace event. */
+		TUserTraceInfo iUserTraceInfo;
+		/** Information which is specific to the start thread event. */
+		TStartThreadInfo iStartThreadInfo;
+		/** Information which is specific to the Add Process event. */
+		TAddProcessInfo iAddProcessInfo;
+		/** Information which is specific to the Remove Process event. */
+		TRemoveProcessInfo iRemoveProcessInfo;
+		};
+	};
+
+/**
+  @internalComponent
+  */
+class TProcessInfo
+	{
+	public:
+
+		inline TProcessInfo() { Reset(); }
+
+		inline TProcessInfo(TUint32 aId, TUint32 aCodeAddress, TUint32 aCodeSize, TUint32 aDataAddress)
+				: iId(aId),
+				  iCodeAddress(aCodeAddress),
+				  iCodeSize(aCodeSize),
+				  iDataAddress(aDataAddress) { }
+
+		inline void Reset()
+			{
+			iId = 0;
+			iCodeAddress = 0;
+			iCodeSize = 0;
+			iDataAddress = 0;
+			}
+
+	public:
+
+		TUint32 iId;
+		TUint32 iCodeAddress;
+		TUint32 iCodeSize;
+		TUint32 iDataAddress;
+	};
+
+/* Other functionality may be defined here later */
+
+/**
+Represents a register id value, in the terms of the Symbian ELF format:
+ - bits 0-7 define the class
+ - bits 8-15 define the rd_id
+ - bits 16-31 define the rd_sub_id
+
+Both the core registers (TFunctionalityRegister type) and the coprocessor registers
+follow this identifier scheme.
+*/
+typedef TUint32 TRegisterInfo;
+
+/**
+Enum representing the status flags which could be returned from a register
+access call.
+*/
+enum TRegisterFlag
+	{
+	/**
+	Default value, a register access call will never return this value
+	*/
+	ENotSet = 0,
+	/**
+	Would be returned if the register is supported by the debug driver but the kernel cannot access the register
+	*/
+	EInValid = 1,
+	/**
+	Would be returned if the register could be accessed correctly
+	*/
+	EValid = 2,
+	/**
+	Would be returned if the register is not supported by the debug driver
+	*/
+	ENotSupported = 3,
+	/**
+	Would be returned if a non-4 byte register value was requested
+	*/
+	EBadSize = 4
+	};
+
+/**
+Enum representing the different ARM CPU instruction set architectures.
+*/
+enum TArchitectureMode
+	{
+	/** Represents the ARM CPU architecture. */
+	EArmMode = 1,
+	/** Represents the Thumb CPU architecture. */
+	EThumbMode = 2,
+	/**
+	  Represents the Thumb2 CPU architecture.
+	  @prototype
+	  */
+	EThumb2EEMode = 3
+	};
+
+/**
+  Used as an identifier for breakpoints set by the RSecuritySvrSession::SetBreak function.
+  @see RSecuritySvrSession
+  */
+typedef TInt32 TBreakId;
+
+/**
+  Specifies the type of a code segment.
+  @see TCodeSegListEntry
+  */
+enum TCodeSegType
+	{
+	EUnknownCodeSegType = 0, /**< Signifies an unknown code segment type. */
+	EExeCodeSegType = 1,     /**< Signifies a code segment belonging to an executable. */
+	EDllCodeSegType = 2      /**< Signifies a code segment belonging to a library. */
+	};
+
+/**
+Structure used for extracting data from a descriptor returned by a call to
+RSecuritySvrSession::GetList() when GetList() is called with TListId::ECodeSegs
+as the first argument.
+
+@see RSecuritySvrSession::GetList()
+
+@code
+//buffer is a TDesC8 containing 4-byte aligned TCodeSegListEntry objects
+//create a pointer to the start of the data
+TUint8* ptr = (TUint8*)buffer.Ptr();
+//create a pointer to the end of the data
+const TUint8* ptrEnd = ptr + buffer.Length();
+while(ptr < ptrEnd)
+	{
+	//cast the pointer to be a TCodeSegListEntry object
+	TCodeSegListEntry& entry = *(TCodeSegListEntry*)ptr;
+	//use the TCodeSegListEntry pointer, i.e.
+	TUint16 nameLength = entry.iNameLength;
+	TPtr name(&(entry.iName[0]), nameLength, nameLength);
+	// move ptr on to point to the next TCodeSegListEntry object
+	ptr += Align4(entry.GetSize());
+	}
+@endcode
+*/
+class TCodeSegListEntry
+	{
+public:
+	TInt GetSize() const;
+public:
+	/**
+	  Address of the start of the code segment.
+	  */
+	TUint32 iCodeBase;
+	/**
+	  Size of the code segment.
+	  */
+	TUint32 iCodeSize;
+	/**
+	  Size of the const data segment
+	  */
+	TUint32 iConstDataSize;
+	/**
+	  Address of the initialised data
+	  */
+	TUint32 iInitialisedDataBase;
+	/**
+	  Size of the initialised data
+	  */
+	TUint32 iInitialisedDataSize;
+	/**
+	  Size of the uninitialised data
+	  */
+	TUint32 iUninitialisedDataSize;
+	/**
+	  Boolean indicating whether the code segment is execute in place
+	  */
+	TBool iIsXip;
+	/**
+	  Indicates whether the code segment is from an executable or a dll, or neither
+	  */
+	TCodeSegType iCodeSegType;
+	/** Uid3 of this segment. */
+	TUint32 iUid3;
+	/** Currently unused element. May be used in future to aid maintaining compatibility. */
+	TUint32 iSpare2;
+	/**
+	  Length of the code segment's name
+	  */
+	TUint16 iNameLength;
+	/**
+	  First two bytes of the code segment's name, the name should be considered to
+	  extend past the end of the TCodeSegListEntry structure to a length
+	  corresponding to iNameLength
+	  */
+	TUint16 iName[1];
+	};
+
+/**
+Returns the size of the TCodeSegListEntry, including the file name length
+
+@return the size, in bytes, of the TCodeSegListEntry and the code segment's
+file name
+*/
+inline TInt TCodeSegListEntry::GetSize() const
+	{
+	return sizeof(TCodeSegListEntry) - sizeof(iName) + (2 * iNameLength);
+	}
+
+/**
+Structure used for extracting data from a descriptor returned by a call to
+RSecuritySvrSession::GetList() when GetList() is called with TListId::EXipLibraries
+as the first argument.
+
+@see RSecuritySvrSession::GetList()
+
+@code
+//buffer is a TDesC8 containing 4-byte aligned TXipLibraryListEntry objects
+//create a pointer to the start of the data
+TUint8* ptr = (TUint8*)buffer.Ptr();
+//create a pointer to the end of the data
+const TUint8* ptrEnd = ptr + buffer.Length();
+while(ptr < ptrEnd)
+	{
+	//cast the pointer to be a TXipLibraryListEntry object
+	TXipLibraryListEntry& entry = *(TXipLibraryListEntry*)ptr;
+	//use the TXipLibraryListEntry pointer, i.e.
+	TUint16 nameLength = entry.iNameLength;
+	TPtr name(&(entry.iName[0]), nameLength, nameLength);
+	// move ptr on to point to the next TXipLibraryListEntry object
+	ptr += Align4(entry.GetSize());
+	}
+@endcode
+*/
+class TXipLibraryListEntry
+	{
+public:
+	TInt GetSize() const;
+public:
+	/**
+	  Address of the start of the library's code segment.
+	  */
+	TUint32 iCodeBase;
+	/**
+	  Size of the code segment.
+	  */
+	TUint32 iCodeSize;
+	/**
+	  Size of the const data segment
+	  */
+	TUint32 iConstDataSize;
+	/**
+	  Address of the initialised data
+	  */
+	TUint32 iInitialisedDataBase;
+	/**
+	  Size of the initialised data
+	  */
+	TUint32 iInitialisedDataSize;
+	/**
+	  Size of the uninitialised data
+	  */
+	TUint32 iUninitialisedDataSize;
+	/** Currently unused element. May be used in future to aid maintaining compatibility. */
+	TUint32 iSpare1;
+	/** Currently unused element. May be used in future to aid maintaining compatibility. */
+	TUint32 iSpare2;
+	/**
+	  Length of the library's name
+	  */
+	TUint16 iNameLength;
+	/**
+	  First two bytes of the code segment's name, the name should be considered to
+	  extend past the end of the TXipLibraryListEntry structure to a length
+	  corresponding to iNameLength
+	  */
+	TUint16 iName[1];
+	};
+
+/**
+Returns the size of the TXipLibraryListEntry, including the file name length
+
+@return the size, in bytes, of the TXipLibraryListEntry and the library's
+file name
+*/
+inline TInt TXipLibraryListEntry::GetSize() const
+	{
+	return sizeof(TXipLibraryListEntry) - sizeof(iName) + (2 * iNameLength);
+	}
+
+/**
+Structure used for extracting data from a descriptor returned by a call to
+RSecuritySvrSession::GetList() when GetList() is called with TListId::EExecutables
+as the first argument.
+
+@see RSecuritySvrSession::GetList()
+
+@code
+//buffer is a TDesC8 containing 4-byte aligned TExecutablesListEntry objects
+//create a pointer to the start of the data
+TUint8* ptr = (TUint8*)buffer.Ptr();
+//create a pointer to the end of the data
+const TUint8* ptrEnd = ptr + buffer.Length();
+while(ptr < ptrEnd)
+	{
+	//cast the pointer to be a TExecutablesListEntry object
+	TExecutablesListEntry& entry = *(TExecutablesListEntry*)ptr;
+	//use the TExecutablesListEntry pointer, i.e.
+	TUint16 nameLength = entry.iNameLength;
+	TPtr name(&(entry.iName[0]), nameLength, nameLength);
+	// move ptr on to point to the next TExecutablesListEntry object
+	ptr += Align4(entry.GetSize());
+	}
+@endcode
+*/
+class TExecutablesListEntry
+	{
+public:
+	TInt GetSize() const;
+public:
+	/**
+	  Indicates whether an agent has registered to actively debug the executable,
+	  a non-zero value indicates that an agent has attached.
+	  */
+	TUint8 iIsActivelyDebugged;
+	/**
+	  Indicates whether any agents have registered to passively debug the executable,
+	  a non-zero value indicates that at least one agent is attached passively
+	  */
+	TUint8 iIsPassivelyDebugged;
+	/** Currently unused element. May be used in future to aid maintaining compatibility. */
+	TUint32 iSpare1;
+	/** Currently unused element. May be used in future to aid maintaining compatibility. */
+	TUint32 iSpare2;
+	/**
+	  Length of the executable's name
+	  */
+	TUint16 iNameLength;
+	/**
+	  First two bytes of the executable's name, the name should be considered to
+	  extend past the end of the TExecutablesListEntry structure to a length
+	  corresponding to iNameLength
+	  */
+	TUint16 iName[1];
+	};
+
+/**
+Returns the size of the TExecutablesListEntry, including the file name length
+
+@return the size, in bytes, of the TExecutablesListEntry and the executable's
+file name
+*/
+inline TInt TExecutablesListEntry::GetSize() const
+	{
+	return sizeof(TExecutablesListEntry) - sizeof(iName) + (2*iNameLength);
+	}
+
+/**
+Structure used for extracting data from a descriptor returned by a call to
+RSecuritySvrSession::GetList() when GetList() is called with TListId::EProcesses
+as the first argument.
+
+@see RSecuritySvrSession::GetList()
+
+@code
+//buffer is a TDesC8 containing 4-byte aligned TProcessListEntry objects
+//create a pointer to the start of the data
+TUint8* ptr = (TUint8*)buffer.Ptr();
+//create a pointer to the end of the data
+const TUint8* ptrEnd = ptr + buffer.Length();
+while(ptr < ptrEnd)
+	{
+	//cast the pointer to be a TProcessListEntry object
+	TProcessListEntry& entry = *(TProcessListEntry*)ptr;
+	//use the TProcessListEntry pointer, i.e.
+	TUint16 fileNameLength = entry.iFileNameLength;
+	TPtr name(&(entry.iNames[0]), fileNameLength, fileNameLength);
+	// move ptr on to point to the next TProcessListEntry object
+	ptr += Align4(entry.GetSize());
+	}
+@endcode
+*/
+class TProcessListEntry
+	{
+	public:
+		TInt GetSize() const;
+
+	public:
+		/** Process ID */
+		TUint64 iProcessId;
+
+		/** The Uid3 of the process */
+		TUint32 iUid3;
+
+		/** 
+		 * Process Attributes
+		 * @see DProcess::TProcessAttributes
+		 */
+		TInt iAttributes;
+
+		/**
+		 * Length of fully qualified file name of the process in bytes. Note that this
+		 * entry may be 0 if the process is in the process of shutting down.
+		 */
+		TUint16 iFileNameLength;
+
+		/**
+		 * Length of current dynamic name of the process in bytes
+		 */
+		TUint16 iDynamicNameLength;
+
+		/**
+		 * First two bytes of the process' file name, the name should be considered to
+		 * extend past the end of the TProcessListEntry structure to a length
+		 * corresponding to iFileNameLength. Directly after the data corresponding to the
+		 * file name, the dynamic name is stored with a length of iDynamicNameLength characters.
+		 * Note that these names are not null terminated and are concatenated directly after each other.
+		 * 
+		 * @code
+		 * TProcessListEntry& entry; // entry is a reference to a TProcessListEntry
+		 *
+		 * //get the file name..
+		 * TPtr fileName(&(entry.iNames[0]), iFileNameLength, iFileNameLength);
+		 *
+		 * //get the dynamic name length..
+		 * TPtr dynamicName(&(entry.iNames[0]) + iFileNameLength, iDynamicNameLength, iDynamicNameLength);
+		 * @endcode
+		 */
+		TUint16 iNames[1];
+	};
+
+/**
+Returns the size of the TProcessListEntry, including the file name length and the
+dynamic name length
+
+@return the size, in bytes, of the TProcessListEntry and the executable's
+file name file name and dynamic name
+*/
+inline TInt TProcessListEntry::GetSize() const
+	{
+	return sizeof(TProcessListEntry) - sizeof(iNames) + (2 * (iFileNameLength + iDynamicNameLength));
+	}
+
+/**
+Structure used for extracting data from a descriptor returned by a call to
+RSecuritySvrSession::GetList() when GetList() is called with TListId::EThreads
+as the first argument.
+
+@see RSecuritySvrSession::GetList()
+
+@code
+//buffer is a TDesC8 containing 4-byte aligned TThreadListEntry objects
+//create a pointer to the start of the data
+TUint8* ptr = (TUint8*)buffer.Ptr();
+//create a pointer to the end of the data
+const TUint8* ptrEnd = ptr + buffer.Length();
+while(ptr < ptrEnd)
+	{
+	//cast the pointer to be a TThreadListEntry object
+	TThreadListEntry& entry = *(TThreadListEntry*)ptr;
+	//use the TThreadListEntry pointer, i.e.
+	TUint16 nameLength = entry.iNameLength;
+	TPtr name(&(entry.iName[0]), nameLength, nameLength);
+	// move ptr on to point to the next TThreadListEntry object
+	ptr += Align4(entry.GetSize());
+	}
+@endcode
+*/
+class TThreadListEntry
+	{
+public:
+	TInt GetSize() const;
+public:
+	/**
+	  Thread ID
+	  */
+	TUint64 iThreadId;
+	/**
+	  Process ID
+	  */
+	TUint64 iProcessId;
+	/**
+	  Address of the base of the supervisor stack
+	  */
+	TUint32 iSupervisorStackBase;
+	/**
+	  Size of the supervisor stack
+	  */
+	TUint32 iSupervisorStackSize;
+	/**
+	  Non-zero if iSupervisorStackBase has been set correctly
+	  */
+	TUint8 iSupervisorStackBaseValid;
+	/**
+	  Non-zero if iSupervisorStackSize has been set correctly
+	  */
+	TUint8 iSupervisorStackSizeValid;
+	/**
+	  Address of the thread's supervisor stack pointer
+	  */
+	TUint32 iSupervisorStackPtr;
+	/**
+	  Indicator of whether the value returned as iSupervisorStackPtr is valid.
+	  It is necessary, but not necessarily sufficient, that the thread be suspended
+	  for a valid value to be returned. This may be removed from the final API and
+	  the value would be extracted instead via the ReadRegisters type calls.
+	  */
+	TRegisterFlag iSupervisorStackPtrValid;
+	/** Currently unused element. May be used in future to aid maintaining compatibility. */
+	TUint32 iSpare1;
+	/** Currently unused element. May be used in future to aid maintaining compatibility. */
+	TUint32 iSpare2;
+	/**
+	  The length of the thread's name
+	  */
+	TUint16 iNameLength;
+	/**
+	  First two bytes of the thread's name, the name should be considered to
+	  extend past the end of the TThreadListEntry structure to a length
+	  corresponding to iNameLength
+	  */
+	TUint16 iName[1];
+	};
+
+/**
+Returns the size of the TThreadListEntry, including the name length
+
+@return the size, in bytes, of the TExecutablesListEntry and the thread's name
+*/
+inline TInt TThreadListEntry::GetSize() const
+	{
+	return sizeof(TThreadListEntry) - sizeof(iName) + (2 * iNameLength);
+	}
+
+/**
+Denotes which list type to return from a RSecuritySvrSession::GetList() call
+
+@see RSecuritySvrSession::GetList()
+*/
+enum TListId
+	{
+	/**
+	Indicates that the GetList() call should return a list of the processes in
+	the system. The returned buffer will contain an array of 4-byte aligned
+	TProcessListEntry objects.
+
+	@see TProcessListEntry
+	*/
+	EProcesses = 0,
+	/**
+	Indicates that the GetList() call should return a list of the threads in
+	the system. The returned buffer will contain an array of 4-byte aligned
+	TThreadListEntry objects.
+
+	@see TThreadListEntry
+	*/
+	EThreads = 1,
+	/**
+	Indicates that the GetList() call should return a list of the code segments in
+	the system. The returned buffer will contain an array of 4-byte aligned
+	TCodeSegListEntry objects.
+
+	@see TCodeSegListEntry
+	*/
+	ECodeSegs = 2,
+	/**
+	Indicates that the GetList() call should return a list of the XIP libraries in
+	the system. The returned buffer will contain an array of 4-byte aligned
+	EXipLibraries objects.
+
+	@see EXipLibraries
+	*/
+	EXipLibraries = 3,
+	/**
+	Indicates that the GetList() call should return a list of the executables in
+	the system. The returned buffer will contain an array of 4-byte aligned
+	EExecutables objects.
+
+	@see EExecutables
+	*/
+	EExecutables = 4,
+	/**
+	Indicates that the GetList() call should return a list of the logical devices in the system.
+	*/
+	ELogicalDevices = 5,
+	/**
+	Indicates that the GetList() call should return a list of the mutexes in the system.
+	*/
+	EMutexes = 6,
+	/**
+	Indicates that the GetList() call should return a list of the servers in the system.
+	*/
+	EServers = 7,
+	/**
+	Indicates that the GetList() call should return a list of the sessions in the system.
+	*/
+	ESessions = 8,
+	/**
+	Indicates that the GetList() call should return a list of the semaphores in the system.
+	*/
+	ESemaphores = 9,
+	/**
+	Indicates that the GetList() call should return a list of the chunks in the system.
+	*/
+	EChunks = 10,
+
+	/**
+	Provides a complete list of all the breakpoints in the system and their
+	current state.
+
+	@see EBreakpoints
+	*/
+	EBreakpoints = 11,
+
+	/** 
+	The following are for the possible use of kernel-side debug and SMP breakpoint
+	manipulation.
+	*/
+	ESetBreak = 12,
+	ERemoveBreak = 13,
+	EModifyBreak = 14,
+	
+	/**
+	 * Provides static information of the system
+	 */
+	EStaticInfo = 15,
+
+	/** Last listing enum. */
+	EListLast
+	};
+
+/**
+  Bit field values denoting the scope of a listing.
+
+  In the debug functionality block, the TTag::iValue element which is returned for a listing tag
+  should be considered as a union of the supported values from this enumeration for that listing.
+  */
+enum TListScope
+	{
+	EScopeNone = 0x0,             /**< Corresponds to no scope for a listing. equivalent to not supported */
+	EScopeGlobal= 0x1,            /**< Corresponds to a global scope for a listing. */
+	EScopeProcessSpecific = 0x2,  /**< Corresponds to a process specific scope for a listing. */
+	EScopeThreadSpecific = 0x4    /**< Corresponds to a thread specific scope for a listing. */
+	};
+
+/**
+@internalComponent
+
+Interface constructor for passing IPC data for the GetList call.
+*/
+class TListDetails
+	{
+public:
+	TListDetails(const TListId aListId, const TListScope aListScope, TUint64 aTargetId=0)
+		: iListId(aListId),
+		  iListScope(aListScope),
+		  iTargetId(aTargetId) {}
+public:
+	TListId iListId;
+	TListScope iListScope;
+	TUint64 iTargetId;
+	};
+
+/** Debug Security Server Secure ID */
+const TUid KUidDebugSecurityServer = { 0x102834E2 };
+
+} // end of Debug namespace declaration
+
+// the remaining functionality in this file is intended for use on user side only
+#ifndef __KERNEL_MODE__
+
+#include <e32std.h>
+
+// API definition for Debug namespace appears elsewhere in this file.
+namespace Debug {
+
+/** The name of the Debug Security Server. */
+_LIT(KSecurityServerName,"DebugSecurityServer");
+
+/** Wildcard used for attach all calls */
+_LIT(KStar, "*");
+
+// A version must be specified when creating a session with the server
+/** The Debug Security Server's major version number. */
+const TUint KDebugServMajorVersionNumber=2;
+/** The Debug Security Server's minor version number. */
+const TUint KDebugServMinorVersionNumber=5;
+/** The Debug Security Server's patch version number. */
+const TUint KDebugServPatchVersionNumber=0;
+
+/**
+Denotes how memory should be accessed
+*/
+enum TAccess
+	{
+	EAccess8 = 1,	/**< Currently unsupported, signifies 8 bit access. */
+	EAccess16 = 2,	/**< Currently unsupported, signifies 16 bit access. */
+	EAccess32 = 4	/**< Signifies 32 bit access. */
+	};
+
+/**
+Denotes how data should be interpreted
+*/
+enum TEndianess
+	{
+	EEndLE8 = 0,	/**< Signifies 8 bit little-endian. */
+	EEndBE8 = 1,	/**< Currently unsupported, signifies 8 bit big-endian. */
+	EEndBE32 = 2	/**< Currently unsupported, signifies 32 bit big-endian. */
+	};
+
+/**
+Structure used to store information about a memory operation
+
+@internalComponent
+*/
+class TMemoryInfo
+	{
+public:
+
+	TMemoryInfo(TUint32 aAddress=0, TUint32 aLength=0, TAccess aAccess=EAccess32, TEndianess aEndianess=EEndLE8)
+		: iAddress(aAddress),
+		  iSize(aLength),
+		  iAccess(aAccess),
+		  iEndianess(aEndianess)
+		{}
+
+public:
+
+	/**
+	Address to start reading/writing memory
+	*/
+	TUint32 iAddress;
+	/**
+	Number of bytes of memory to read/write
+	*/
+	TUint32	iSize;
+	/**
+	Access size for read/write
+	@see TAccess
+	*/
+	TAccess iAccess;
+	/**
+	Endianess to interpret data as
+	@see TEndianess
+	*/
+	TEndianess iEndianess;
+	};
+
+/**
+@internalComponent
+*/
+class TBreakInfo
+	{
+public:
+	TUint32 iAddress;
+	TArchitectureMode iArchitectureMode;
+	};
+
+/**
+@internalComponent
+
+Function codes (opcodes) used in message passing between client and server
+in this header file and what arguments should be passed with each of these
+*/
+enum TDebugServRqst
+	{
+	EDebugServOpen = 1,
+	EDebugServClose = 2,
+	EDebugServSuspendThread = 3,
+	EDebugServResumeThread = 4,
+	EDebugServReadMemory = 5,
+	EDebugServWriteMemory = 6,
+	EDebugServSetBreak = 7,
+	EDebugServClearBreak = 8,
+	EDebugServModifyBreak = 9,
+	EDebugServGetEvent = 10,
+	EDebugServCancelGetEvent = 11,
+	EDebugServAttachExecutable = 12,
+	EDebugServDetachExecutable = 13,
+	EDebugServGetDebugFunctionalityBufSize = 14,
+	EDebugServGetDebugFunctionality = 15,
+	EDebugServReadRegisters = 16,
+	EDebugServWriteRegisters = 17,
+	EDebugServSetEventAction = 18,
+	EDebugServBreakInfo = 19,
+	EDebugServGetList = 20,
+	EDebugServStep = 21,
+	EDebugServSetProcessBreak = 22,
+	EDebugServProcessBreakInfo = 23,
+	EDebugServKillProcess = 24,
+	EDebugServModifyProcessBreak = 25,
+	EDebugServReadCrashFlash = 26,
+	EDebugServWriteCrashFlash = 27,
+	EDebugServEraseCrashFlash = 28,
+	EDebugServEraseEntireCrashFlash = 29,
+	EDebugServAttachAll = 30,
+	EDebugServDetachAll = 31,
+	};
+
+/**
+Client side API to debug security server (DSS). Interaction with the DSS should
+be conducted through this class only.
+*/
+class RSecuritySvrSession : public RSessionBase
+	{
+public:
+	RSecuritySvrSession();
+	TVersion Version() const;
+
+	TInt AttachExecutable(const TDesC& aProcessName, TBool aPassive);
+	TInt DetachExecutable(const TDesC& aProcessName);
+
+	TInt GetDebugFunctionalityBufSize(TUint32* aBufSize);
+	TInt GetDebugFunctionality(TDes8& aBuffer);
+
+	TInt SuspendThread(const TThreadId aThreadId);
+	TInt ResumeThread(const TThreadId aThreadId);
+
+	TInt ReadMemory(const TThreadId aThreadId, const TUint32 aAddress, const TUint32 aLength, TDes8 &aData, const TAccess aAccessSize, const TEndianess aEndianess);
+	TInt WriteMemory(const TThreadId aThreadId, const TUint32 aAddress, const TUint32 aLength, const TDesC8 &aData, const TAccess aAccessSize, const TEndianess aEndianess);
+
+	TInt ReadRegisters(const TThreadId aThreadId, const TDesC8& aRegisterIds, TDes8& aRegisterValues, TDes8& aRegisterFlags);
+	TInt WriteRegisters(const TThreadId aThreadId, const TDesC8& aRegisterIds, const TDesC8& aRegisterValues, TDes8& aRegisterFlags);
+
+	void GetEvent(const TDesC& aExecutableName, TRequestStatus &aStatus, TDes8& aEventInfo);
+	TInt CancelGetEvent(const TDesC& aExecutableName);
+	
+	TInt SetEventAction(const TDesC& aExecutableName, TEventType aEvent, TKernelEventAction aEventAction);
+
+	TInt SetBreak( TBreakId &aId, const TThreadId aThreadId, const TUint32 aAddress, const TArchitectureMode aArchitectureMode);
+	TInt ClearBreak(const TBreakId aBreakId);
+	TInt ModifyBreak(const TBreakId aBreakId, const TThreadId aThreadId, const TUint32 aAddress, const TArchitectureMode aArchitectureMode);
+	TInt BreakInfo(const TBreakId aBreakId, TThreadId& aThreadId, TUint32& aAddress, TArchitectureMode& aMode);
+	TInt SetProcessBreak( TBreakId &aId, const TProcessId aProcessId, const TUint32 aAddress, const TArchitectureMode aArchitectureMode);
+	TInt ProcessBreakInfo(const TBreakId aBreakId, TProcessId& aProcessId, TUint32& aAddress, TArchitectureMode& aMode);
+	TInt ModifyProcessBreak(const TBreakId aBreakId, const TProcessId aProcessId, const TUint32 aAddress, const TArchitectureMode aArchitectureMode);
+
+	TInt GetList(const TListId aListId, TDes8& aListData, TUint32& aDataSize);
+	TInt GetList(const TThreadId aThreadId, const TListId aListId, TDes8& aListData, TUint32& aDataSize);
+	TInt GetList(const TProcessId aProcessId, const TListId aListId, TDes8& aListData, TUint32& aDataSize);
+	TInt Step(const TThreadId aThreadId, TUint32 aNumSteps);
+	TInt KillProcess(const TProcessId aProcessId, const TInt aReason);
+	TInt ReadCrashLog(const TUint32 aPos, TDes8& aData, const TUint32 aDataSize);	
+	TInt WriteCrashConfig(const TUint32 aPos, const TDesC8& aBuffer, TUint32& aSize);
+	TInt EraseCrashLog(const TUint32 aPos, const TUint32 aBlockNumber);
+	TInt EraseCrashFlashPartition();
+
+	TInt Connect(const TVersion aVersion);
+
+	// Added in version 2.5
+    TInt AttachAll();
+    TInt DetachAll();	
+    void GetEvent(TRequestStatus &aStatus, TDes8& aEventInfo);
+    TInt CancelGetEvent();
+    TInt SetEventAction(TEventType aEvent, TKernelEventAction aEventAction);
+
+private:
+	TInt StartServer(void);
+	};
+
+/**
+Server session constructor
+*/
+inline RSecuritySvrSession::RSecuritySvrSession()
+	{
+	}
+
+/**
+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.
+
+@param aVersion version of the DSS to connect to
+
+@return KErrNone if a connection was successfully created, or one of the other
+system wide error codes
+*/
+inline TInt RSecuritySvrSession::Connect(const TVersion aVersion)
+	{
+	// Default asynch outstanding message slots for the server. Not that these are 
+	// allocated from a system-wide pool of 255, so have to be careful with resources.
+	const TUint KDefaultMessageSlots = 8;
+	
+	TInt retry=2;
+	for (;;)
+		{
+		TInt r=CreateSession(KSecurityServerName, aVersion, KDefaultMessageSlots);
+		if (r!=KErrNotFound && r!=KErrServerTerminated)
+			{
+			return r;
+			}
+		if (--retry==0)
+			{
+			return r;
+			}
+		r=StartServer();
+		if (r!=KErrNone && r!=KErrAlreadyExists)
+			{
+			return r;
+			}
+		}
+	}
+
+/**
+  Start the server
+
+  @return KErrNone on success, or one of the other system wide error codes
+  */
+inline TInt RSecuritySvrSession::StartServer()
+	{
+	// constants for the server
+	_LIT(KSecurityServerProcessName, "rm_debug_svr");
+	const TUidType serverUid(KNullUid, KNullUid, KUidDebugSecurityServer);
+
+	RProcess server;
+	TInt err = server.Create(KSecurityServerProcessName, KNullDesC, serverUid);
+
+	if(KErrNone != err)
+		{
+		return err;
+		}
+
+	// Synchronise with the process to make sure it hasn't died straight away
+	TRequestStatus stat;
+	server.Rendezvous(stat);
+	if (stat != KRequestPending)
+		{
+		// logon failed - server is not yet running, so cannot have terminated
+		server.Kill(0);             // Abort startup
+		}
+	else
+		{
+		// logon OK - start the server
+		server.Resume();
+		}
+
+	// Wait to synchronise with server - if it dies in the meantime, it
+	// also gets completed
+	User::WaitForRequest(stat);
+
+	// We can't use the 'exit reason' if the server panicked as this
+	// is the panic 'reason' and may be '0' which cannot be distinguished
+	// from KErrNone
+	err = (server.ExitType()==EExitPanic) ? KErrGeneral : stat.Int();
+	server.Close();
+	return err;
+	}
+
+/**
+Get version of RSecuritySvrSession
+
+@return a TVersion object specifying the version
+*/
+inline TVersion RSecuritySvrSession::Version(void) const
+	{
+	return (TVersion(KDebugServMajorVersionNumber, KDebugServMinorVersionNumber, KDebugServPatchVersionNumber));
+	}
+
+/**
+Suspends execution of the specified thread.
+
+@param aThreadId thread ID of the thread to suspend
+
+@return KErrNone if there were no problems, KErrPermissionDenied if security 
+        check fails or KErrArgument if the thread does not exist
+*/
+inline TInt RSecuritySvrSession::SuspendThread(const TThreadId aThreadId)
+	{
+	TPckgBuf<TThreadId> threadIdPckg(aThreadId);
+	TIpcArgs args(&threadIdPckg);
+
+	return SendReceive(EDebugServSuspendThread, args);
+	}
+
+/**
+Resumes execution of the specified thread.
+
+@param aThreadId thread ID of the thread to resume
+
+@return KErrNone if there were no problems, KErrPermissionDenied if security 
+        check fails or KErrArgument if the thread does not exist
+*/
+inline TInt RSecuritySvrSession::ResumeThread(const TThreadId aThreadId)
+	{
+	TPckgBuf<TThreadId> threadIdPckg(aThreadId);
+	TIpcArgs args(&threadIdPckg);
+
+	return SendReceive(EDebugServResumeThread, args);
+	}
+
+/**
+Purpose:
+Set a thread-specific breakpoint in an attached process. 
+
+@pre Debug Agent must be connected to the debug security server
+@pre Debug Agent must be attached to a process.
+
+@param aThreadId The thread id to which the breakpoint will apply.
+@param aAddress The virtual memory address at which to place the breakpoint.
+@param aArchitectureMode The kind of breakpoint which is to be set (e.g. ARM/Thumb/Thumb2EE)
+@param aBreakId The address to which the assigned breakpoint ID will be written by this function
+@return Any error which may be returned by RSessionBase::SendReceive()
+*/
+inline TInt RSecuritySvrSession::SetBreak( TBreakId &aBreakId,const TThreadId aThreadId, const TUint32 aAddress, const TArchitectureMode aArchitectureMode)
+	{
+	TPtr8 breakIdPtr((TUint8*)&aBreakId, sizeof(aBreakId));
+
+	TPckgBuf<TThreadId> threadIdPckg(aThreadId);
+
+	TBreakInfo breakInfo;
+	breakInfo.iAddress = aAddress;
+	breakInfo.iArchitectureMode = aArchitectureMode;
+	TPckgBuf<TBreakInfo> breakInfoPckg(breakInfo);
+
+	//call driver to attempt to set break
+	TIpcArgs args(&threadIdPckg, &breakInfoPckg, &breakIdPtr);
+	return SendReceive(EDebugServSetBreak, args);
+	}
+
+/**
+Purpose:
+Clears a previously set thread-specific or process-specific breakpoint.
+
+@pre Debug Agent must be connected to the debug security server
+@pre Debug Agent must be attached to a process.
+
+@param aBreakId The TBreakId returned by a prior SetBreak call. Must have been set by the same Debug Agent.
+@return Any error which may be returned by RSessionBase::SendReceive()
+*/
+inline TInt RSecuritySvrSession::ClearBreak(const TBreakId aBreakId)
+	{
+	TIpcArgs args(aBreakId);
+	return SendReceive(EDebugServClearBreak, args);
+	}
+
+/**
+Purpose:
+Modifies the properties of a previously set breakpoint.
+
+@pre Debug Agent must be connected to the debug security server
+@pre Debug Agent must be attached to a process.
+
+@param aBreakId the TBreakId returned by a prior SetBreak() call. Must have been set by the same Debug Agent.
+@param aThreadId the thread id of the thread to move the breakpoint to
+@param aAddress the virtual memory address at which to place the breakpoint.
+@param aArchitectureMode the kind of breakpoint which is to be set (e.g. ARM/Thumb/Thumb2EE)
+@return Any error which may be returned by RSessionBase::SendReceive()
+*/
+inline TInt RSecuritySvrSession::ModifyBreak(const TBreakId aBreakId, const TThreadId aThreadId, const TUint32 aAddress, const TArchitectureMode aArchitectureMode)
+
+	{
+	TPckgBuf<TThreadId> threadIdPckg(aThreadId);
+	TIpcArgs args(aBreakId,&threadIdPckg,aAddress,aArchitectureMode);
+	return SendReceive(EDebugServModifyBreak, args);
+	}
+
+/**
+Purpose:
+Modifies the properties of a previously set process breakpoint.
+
+@pre Debug Agent must be connected to the debug security server
+@pre Debug Agent must be attached to a process.
+
+@param aBreakId the TBreakId returned by a prior SetBreak() call. Must have been set by the same Debug Agent.
+@param aProcessId the process id of the process to move the breakpoint to
+@param aAddress the virtual memory address at which to place the breakpoint.
+@param aArchitectureMode the kind of breakpoint which is to be set (e.g. ARM/Thumb/Thumb2EE)
+@return Any error which may be returned by RSessionBase::SendReceive()
+*/
+inline TInt RSecuritySvrSession::ModifyProcessBreak(const TBreakId aBreakId, const TProcessId aProcessId, const TUint32 aAddress, const TArchitectureMode aArchitectureMode)
+
+	{
+	TPckgBuf<TProcessId> processIdPckg(aProcessId);
+	TIpcArgs args(aBreakId,&processIdPckg,aAddress,aArchitectureMode);
+	return SendReceive(EDebugServModifyProcessBreak, args);
+	}
+
+/**
+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 Debug Agent must be connected to the debug security server
+@pre Debug Agent must be attached to a process.
+@pre The aBreakId must have been previously returned by a SetBreak() call and not subsequently cleared by ClearBreak().
+
+@param aBreakId the TBreakId returned by a prior SetBreak() call. Must have been set by the same Debug Agent.
+@param aAddress on return contains the virtual memory address of the breakpoint
+@param aThreadId on return contains the thread id of the thread that the breakpoint is set in
+@param aMode on return contains the type of this breakpoint (e.g. ARM/Thumb/Thumb2EE)
+@return Any error which may be returned by RSessionBase::SendReceive()
+*/
+inline TInt RSecuritySvrSession::BreakInfo(const TBreakId aBreakId, TThreadId& aThreadId, TUint32& aAddress, TArchitectureMode& aMode)
+	{
+	// temporary descriptors
+	TPtr8 threadId((TUint8*)&aThreadId,0,sizeof(TThreadId));
+	TPtr8 address((TUint8*)&aAddress,0,sizeof(TUint32));
+	TPtr8 mode((TUint8*)&aMode,0,sizeof(TArchitectureMode));
+
+	TIpcArgs args(aBreakId,&threadId,&address,&mode);
+	return SendReceive(EDebugServBreakInfo, args);
+	}
+
+/**
+Purpose:
+Set a process-specific breakpoint in an attached process. 
+
+@pre Debug Agent must be connected to the debug security server
+@pre Debug Agent must be attached to a process.
+
+@param aProcessId The process id to which the breakpoint will apply.
+@param aAddress The virtual memory address at which to place the breakpoint.
+@param aArchitectureMode The kind of breakpoint which is to be set (e.g. ARM/Thumb/Thumb2EE)
+@param aBreakId The address to which the assigned breakpoint ID will be written by this function
+@return Any error which may be returned by RSessionBase::SendReceive()
+*/
+inline TInt RSecuritySvrSession::SetProcessBreak( TBreakId &aBreakId, const TProcessId aProcessId, const TUint32 aAddress, const TArchitectureMode aArchitectureMode)
+	{
+	TPtr8 breakIdPtr((TUint8*)&aBreakId, sizeof(aBreakId));
+
+	TPckgBuf<TProcessId> threadIdPckg(aProcessId);
+
+	TBreakInfo breakInfo;
+	breakInfo.iAddress = aAddress;
+	breakInfo.iArchitectureMode = aArchitectureMode;
+	TPckgBuf<TBreakInfo> breakInfoPckg(breakInfo);
+
+	//call driver to attempt to set break
+	TIpcArgs args(&threadIdPckg, &breakInfoPckg, &breakIdPtr);
+	return SendReceive(EDebugServSetProcessBreak, args);
+	}
+
+/**
+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 Debug Agent must be connected to the debug security server
+@pre Debug Agent must be attached to a process.
+@pre The aBreakId must have been previously returned by a SetProcessBreak() call and not subsequently cleared by ClearBreak().
+
+@param aBreakId the TBreakId returned by a prior SetBreak() call. Must have been set by the same Debug Agent.
+@param aAddress on return contains the virtual memory address of the breakpoint
+@param aThreadId on return contains the thread id of the thread that the breakpoint is set in
+@param aMode on return contains the type of this breakpoint (e.g. ARM/Thumb/Thumb2EE)
+@return Any error which may be returned by RSessionBase::SendReceive()
+*/
+inline TInt RSecuritySvrSession::ProcessBreakInfo(const TBreakId aBreakId, TProcessId& aProcessId, TUint32& aAddress, TArchitectureMode& aMode)
+	{
+	// temporary descriptors
+	TPtr8 processId((TUint8*)&aProcessId,0,sizeof(TProcessId));
+	TPtr8 address((TUint8*)&aAddress,0,sizeof(TUint32));
+	TPtr8 mode((TUint8*)&aMode,0,sizeof(TArchitectureMode));
+
+	TIpcArgs args(aBreakId,&processId,&address,&mode);
+	return SendReceive(EDebugServProcessBreakInfo, args);
+	}
+
+/**
+Purpose:
+Wait for an event to occur to the target executable being debugged. When an event
+occurs, the TRequestStatus is completed.
+
+@pre Debug Agent must be connected to the debug security server
+@pre 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 the request is completed. 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: Errors are signalled by completing aStatus
+
+@param aExecutableName The name of any executable to which the Debug Agent is attached.
+@param aStatus Debug Agent request status variable.
+@param aEventInfo Descriptor containing a TEventInfo object. 
+
+*/
+inline void RSecuritySvrSession::GetEvent(const TDesC& aExecutableName, TRequestStatus &aStatus, TDes8& aEventInfo)
+	{
+	TIpcArgs args(&aExecutableName, &aEventInfo);
+
+	SendReceive(EDebugServGetEvent, args, aStatus );
+
+	}
+ 
+/**
+Purpose:
+Cancel a previously issued asynchronous RSecuritySvrSession::GetEvent call.
+
+@pre Debug Agent must be connected to the debug security server
+@pre Debug Agent should have called AttachExecutable and GetEvent for the same executable
+
+@param aExecutableName The name of the executable being debugged.
+@return Any error which may be returned by RSessionBase::SendReceive()
+*/
+inline TInt RSecuritySvrSession::CancelGetEvent(const TDesC& aExecutableName)
+{
+	TIpcArgs args(&aExecutableName);
+
+	return SendReceive(EDebugServCancelGetEvent,args);
+}
+
+
+/**
+Purpose:
+Wait for an event to occur from any process. When an event
+occurs, the TRequestStatus is completed.
+
+@pre Debug Agent must be connected to the debug security server
+@pre Debug Agent must have called AttachAll.
+
+Note 1: Events are reported on a FIFO basis
+
+Note 2: All the parameters must remain in scope until either CancelGetEvent is called, or
+until the request is completed. 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: Errors are signalled by completing aStatus
+
+@param aStatus Debug Agent request status variable.
+@param aEventInfo Descriptor containing a TEventInfo object.
+
+*/
+inline void RSecuritySvrSession::GetEvent(TRequestStatus &aStatus, TDes8& aEventInfo)
+    {
+	TIpcArgs args(&KStar, &aEventInfo);
+
+    SendReceive(EDebugServGetEvent, args, aStatus );
+    }
+ 
+/**
+Purpose:
+Cancel a previously issued asynchronous RSecuritySvrSession::GetEvent call.
+
+@pre Debug Agent must be connected to the debug security server
+@pre Debug Agent should have called AttachAll and GetEvent
+
+@return Any error which may be returned by RSessionBase::SendReceive()
+*/
+inline TInt RSecuritySvrSession::CancelGetEvent()
+    {
+    TIpcArgs args(&KStar);
+
+    return SendReceive(EDebugServCancelGetEvent,args);
+    }
+
+
+/**
+Called by a debug agent to request debug privileges for the executable with
+file name aExecutableName.
+
+@param aExecutableName a fully qualified file name of the executable to attach to
+@param aPassive if true then the agent has reduced debug rights.
+
+@return KErrNone if attached successfully, one of the other system wide error
+	codes otherwise
+*/
+inline TInt RSecuritySvrSession::AttachExecutable(const TDesC& aExecutableName, TBool aPassive)
+	{
+	TIpcArgs args((TInt)aPassive, &aExecutableName);
+	return SendReceive(EDebugServAttachExecutable, args);
+	}
+
+/**
+Called by a debug agent to detach from the executable with file
+name aExecutableName.
+
+@param aExecutableName the fully qualified file name of the executable to detach from
+
+@return KErrNone if detached successfully, one of the other system wide error
+	codes otherwise
+*/
+inline TInt RSecuritySvrSession::DetachExecutable(const TDesC& aExecutableName)
+	{
+	TIpcArgs args(&aExecutableName);
+	return SendReceive(EDebugServDetachExecutable, args);
+	}
+
+/**
+Called by a debug agent to attach to events from all processes
+
+@return KErrNone if attached successfully, one of the other system wide error
+    codes otherwise
+*/
+inline TInt RSecuritySvrSession::AttachAll()
+    {
+    return SendReceive(EDebugServAttachAll);
+    }
+
+/**
+Called by a debug agent to detach from all events from all processes
+
+@return KErrNone if detached successfully, one of the other system wide error
+    codes otherwise
+*/
+inline TInt RSecuritySvrSession::DetachAll()
+    {
+    return SendReceive(EDebugServDetachAll);
+    }
+
+/**
+Get buffer size required to contain Functionality text block.
+
+@see in-source documentation in rm_debug_api.h
+
+@param aBufSize function will fill this with the required buffer size
+
+@return KErrNone if the call succeeded, or one of the other system wide error
+        codes if the call failed
+*/
+inline TInt RSecuritySvrSession::GetDebugFunctionalityBufSize(TUint32 *aBufSize)
+	{	
+	TInt res = KErrNone;
+
+	TPtr8 stuff((TUint8*)aBufSize,4, 4);
+
+	TIpcArgs args(&stuff);
+
+	res = SendReceive(EDebugServGetDebugFunctionalityBufSize, args);
+	
+	return res;
+	}
+
+/**
+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:
+
+@code
+Sub-block 0
+Sub-block 1
+...
+Sub-block N-1
+@endcode
+
+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:
+
+@code
+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	/
+@endcode
+
+The following example DFBlock contains two sub-blocks (values taken from enums below):
+- ETagHeaderIdCore
+- ETagHeaderIdMemory
+
+@code
+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
+@endcode
+
+- 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 aBuffer.MaxLength() >= *aBufSize where aBufSize is set by a call to: 
+     RSecuritySvrSession::GetDebugFunctionalityBufSize(TUint32 *aBufSize)
+
+@param aBuffer buffer to store functionality block in
+
+@return KErrNone if call succeeded, 
+        KErrNoMemory if temporary memory could not be allocated, 
+        KErrGeneral if debug functionality block could not be accessed
+*/
+inline TInt RSecuritySvrSession::GetDebugFunctionality(TDes8& aBuffer)
+	{
+	TIpcArgs args(&aBuffer);
+
+	TInt res = KErrNone;
+
+	res = SendReceive(EDebugServGetDebugFunctionality, args);
+
+	return res;
+	}
+
+/**
+Read a block of memory from the target debug thread defined by aThreadId.
+
+@pre the client should attach to the process containing the target thread
+@pre aData.MaxLength() >= aLength
+
+@param aThreadId thread ID of the thread to read memory from
+@param aAddress address to start reading memory from
+@param aLength number of bytes of memory to read
+@param aData descriptor to read memory into
+@param aAccessSize access size for memory reads, default is TAccess::EAccess32
+@param aEndianess interpretation of endianess of target data, default is
+       TEndianess::EEndLE8
+
+@return KErrNone if memory read successfully, or one of the other system wide error codes
+*/
+inline TInt RSecuritySvrSession::ReadMemory(const TThreadId aThreadId, const TUint32 aAddress, const TUint32 aLength, TDes8 &aData, const TAccess aAccessSize, const TEndianess aEndianess)
+	{
+	TPckgBuf<TThreadId> threadIdPckg(aThreadId);
+	//set up memory info object
+	TMemoryInfo memoryInfo;
+	memoryInfo.iAddress = aAddress;
+	memoryInfo.iSize = aLength;
+	memoryInfo.iAccess = aAccessSize;
+	memoryInfo.iEndianess = aEndianess;
+
+	TPckgBuf<TMemoryInfo> pckg(memoryInfo);
+
+	TIpcArgs args(&threadIdPckg, &pckg, &aData);
+
+	return SendReceive(EDebugServReadMemory, args);
+	}
+
+/**
+Write a block of memory to the target debug thread defined by aThreadId.
+
+@pre the client should attach non-passively to the process containing the
+     target thread
+
+@param aThreadId thread ID of the thread to write memory to
+@param aAddress address to start writing memory at
+@param aLength number of bytes of memory to write
+@param aData descriptor to read memory from
+@param aAccessSize access size for memory writes, default is TAccess::EAccess32
+@param aEndianess interpretation of endianess of target data, default is
+       TEndianess::EEndLE8
+
+@return KErrNone if memory written successfully, or one of the other system wide error codes
+*/
+inline TInt RSecuritySvrSession::WriteMemory(const TThreadId aThreadId, const TUint32 aAddress, const TUint32 aLength, const TDesC8 &aData, const TAccess aAccessSize, const TEndianess aEndianess)
+	{
+	TPckgBuf<TThreadId> threadIdPckg(aThreadId);
+	//create memory info object
+	TMemoryInfo memoryInfo;
+	memoryInfo.iAddress = aAddress;
+	memoryInfo.iSize = aLength;
+	memoryInfo.iAccess = aAccessSize;
+	memoryInfo.iEndianess = aEndianess;
+
+	TPckgBuf<TMemoryInfo> pckg(memoryInfo);
+
+	TIpcArgs args(&threadIdPckg, &pckg, &aData);
+
+	return SendReceive(EDebugServWriteMemory, args);
+	}
+
+/**
+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 the client should attach to the process containing the target thread
+
+@see the register ID format is defined in: 
+     SGL.TS0028.027 - Symbian Core Dump File Format v1.0.doc
+
+@param aThreadId thread ID of the thread to read register values from
+@param aRegisterIds descriptor containing array of TFunctionalityRegister defined 
+       register IDs
+@param aRegisterValues descriptor to contain register values
+@param aRegisterFlags descriptor containing array of TUint8 flags, with values 
+       taken from TRegisterFlag
+
+@return KErrNone if registers were read successfully, or one of the other system wide error codes
+*/
+inline TInt RSecuritySvrSession::ReadRegisters(const TThreadId aThreadId, const TDesC8& aRegisterIds, TDes8& aRegisterValues, TDes8& aRegisterFlags)
+	{
+	TPckgBuf<TThreadId> threadIdPckg(aThreadId);
+	TIpcArgs args(&threadIdPckg, &aRegisterIds, &aRegisterValues, &aRegisterFlags);
+
+	return SendReceive(EDebugServReadRegisters, args);
+	}
+
+/**
+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 the client should attach non-passively to the process containing the 
+     target thread
+
+@see the register ID format is defined in: 
+     SGL.TS0028.027 - Symbian Core Dump File Format v1.0.doc
+
+@param aThreadId thread ID of the thread to write register values to
+@param aRegisterIds descriptor containing array of TFunctionalityRegister defined 
+       register IDs
+@param aRegisterValues descriptor containing array of register values
+@param aRegisterFlags descriptor containing array of TUint8 flags, with values 
+       taken from TRegisterFlag
+
+@return KErrNone if registers were written successfully, or one of the other system wide error codes
+*/
+inline TInt RSecuritySvrSession::WriteRegisters(const TThreadId aThreadId, const TDesC8& aRegisterIds, const TDesC8& aRegisterValues, TDes8& aRegisterFlags)
+	{
+	TPckgBuf<TThreadId> threadIdPckg(aThreadId);
+	TIpcArgs args(&threadIdPckg, &aRegisterIds, &aRegisterValues, &aRegisterFlags);
+
+	return SendReceive(EDebugServWriteRegisters, args);
+	}
+
+/**
+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 Debug Agent must be connected to the debug security server
+@pre 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.
+
+@param aExecutableName The name of the executable to which the Debug Agent is attached.
+@param aEvent A TEventType enum defined in rm_debug_api.h:Debug::TEventType
+@param aEventAction Any TKernelEventAction permitted by the DFBlock.
+@return Any error which may be returned by RSessionBase::SendReceive()
+*/
+inline TInt RSecuritySvrSession::SetEventAction(const TDesC& aExecutableName, TEventType aEvent, TKernelEventAction aEventAction)
+{
+	TInt res = KErrNone;
+
+	TIpcArgs args(&aExecutableName,aEvent,aEventAction);
+
+	res = SendReceive(EDebugServSetEventAction, args);
+	
+	return res;
+}
+ 
+/**
+Purpose:
+Set the requisite actions to be taken when a particular event occurs that is not 
+associated with any particular process or executable.
+
+The events are defined in Debug::TEventType and the
+actions are defined in Debug::TKernelEventAction.
+
+The default action for all events is EActionIgnore.
+
+@pre Debug Agent must be connected to the debug security server
+@pre Debug Agent must have called AttachAll.
+
+@param aEvent A TEventType enum defined in rm_debug_api.h:Debug::TEventType
+@param aEventAction Any TKernelEventAction permitted by the DFBlock.
+@return Any error which may be returned by RSessionBase::SendReceive()
+*/
+inline TInt RSecuritySvrSession::SetEventAction(TEventType aEvent, TKernelEventAction aEventAction)
+    {
+    TInt res = KErrNone;
+
+    TIpcArgs args(&KStar, aEvent, aEventAction);
+
+    res = SendReceive(EDebugServSetEventAction, args);
+
+    return res;
+    }
+
+/**
+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.
+
+@see TListId
+
+@param aListId enum from TListId signifying which type of listing to return
+@param aListData buffer provided by the debug agent in which data can be returned by the debug system
+@param 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
+
+@return KErrNone if data was returned successfully,
+        KErrTooBig if aListData is too small to hold the data,
+	one of the other system-wide error codes
+*/
+inline TInt RSecuritySvrSession::GetList(const TListId aListId, TDes8& aListData, TUint32& aDataSize)
+	{
+	//second argument of ETrue implies a global listing
+	TListDetails info(aListId, EScopeGlobal);
+	TPtr8 infoBuf((TUint8*)&info, sizeof(TListDetails), sizeof(TListDetails));
+	TPtr8 dataSizeBuf((TUint8*)&aDataSize, sizeof(TUint32), sizeof(TUint32));
+	TIpcArgs args(&infoBuf, &aListData, &dataSizeBuf);
+	return SendReceive(EDebugServGetList, args);
+	}
+
+/**
+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.
+
+@see TListId
+
+@param aThreadId thread to return the listing for
+@param aListId member of TListId signifying which type of listing to return
+@param aListData buffer provided by the debug agent in which data can be returned by the debug system.
+@param 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
+
+@return KErrNone if data was returned successfully,
+        KErrTooBig if aListData is too small to hold the data,
+	one of the other system-wide error codes
+*/
+inline TInt RSecuritySvrSession::GetList(const TThreadId aThreadId, const TListId aListId, TDes8& aListData, TUint32& aDataSize)
+	{
+	TListDetails info(aListId, EScopeThreadSpecific, aThreadId.Id());
+	TPtr8 infoBuf((TUint8*)&info, sizeof(TListDetails), sizeof(TListDetails));
+	TPtr8 dataSizeBuf((TUint8*)&aDataSize, sizeof(TUint32), sizeof(TUint32));
+	TIpcArgs args(&infoBuf, &aListData, &dataSizeBuf);
+	return SendReceive(EDebugServGetList, args);
+	}
+
+/**
+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.
+
+@see TListId
+
+@param aProcessId process to return the listing for
+@param aListId member of TListId signifying which type of listing to return
+@param aListData buffer provided by the debug agent in which data can be returned by the debug system.
+@param 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
+
+@return KErrNone if data was returned successfully,
+        KErrTooBig if aListData is too small to hold the data,
+	one of the other system-wide error codes
+*/
+inline TInt RSecuritySvrSession::GetList(const TProcessId aProcessId, const TListId aListId, TDes8& aListData, TUint32& aDataSize)
+	{
+	TListDetails info(aListId, EScopeProcessSpecific, aProcessId.Id());
+	TPtr8 infoBuf((TUint8*)&info, sizeof(TListDetails), sizeof(TListDetails));
+	TPtr8 dataSizeBuf((TUint8*)&aDataSize, sizeof(TUint32), sizeof(TUint32));
+	TIpcArgs args(&infoBuf, &aListData, &dataSizeBuf);
+	return SendReceive(EDebugServGetList, args);
+	}
+
+/**
+Purpose:
+Step one or more CPU instructions in the specified thread from the current PC.
+
+@pre Debug Agent must be connected to the debug security server
+@pre Debug Agent must be attached to a process.
+@pre The thread being stepped must be suspended by the Debug Agent.
+
+@param aThreadId the id of the thread which is to be stepped
+@param aNumSteps how many machine-level instructions are to be stepped.
+@return Any error which may be returned by RSessionBase::SendReceive()
+*/
+inline TInt RSecuritySvrSession::Step(const TThreadId aThreadId, const TUint32 aNumSteps)
+	{
+	TPckgBuf<TThreadId> threadIdPckg(aThreadId);
+	TInt res = KErrNone;
+
+	TIpcArgs args(&threadIdPckg,aNumSteps);
+
+	res = SendReceive(EDebugServStep,args);
+
+	return res;
+	}
+
+/**
+Purpose:
+Kill the specified process with the supplied reason. Reason codes are equivalent
+to those in RProcess.Kill().
+
+@pre Debug Agent must be connected to the debug security server
+@pre Debug Agent must be attached to a process.
+
+@param aProcessId the id of the process which is to be killed
+@param aReason The reason to be associated with the ending of this process
+@return Any error which may be returned by RSessionBase::SendReceive()
+*/
+inline TInt RSecuritySvrSession::KillProcess(const TProcessId aProcessId, const TInt aReason)
+	{
+	TPckgBuf<TProcessId> processIdPckg(aProcessId);
+	TInt res = KErrNone;
+
+	TIpcArgs args(&processIdPckg,aReason);
+
+	res = SendReceive(EDebugServKillProcess,args);
+
+	return res;
+	}
+
+/**
+Purpose
+Method to read data from the crash flash
+
+@pre aData buffer to retrieve the data from the crash flash
+@pre aDataSize Size of the data
+
+@return Any error which may be returned by RSessionBase::SendReceive()
+*/
+inline TInt RSecuritySvrSession::ReadCrashLog(const TUint32 aPos, TDes8& aData, const TUint32 aDataSize)
+	{		
+		TIpcArgs args(aPos, &aData, aDataSize);		
+		TInt res = SendReceive(EDebugServReadCrashFlash,args);
+		return res;
+	}
+
+/**
+Purpose:
+Method to write the crash flash config
+
+@return Any error which may be returned by RSessionBase::SendReceive()
+*/
+inline TInt RSecuritySvrSession::WriteCrashConfig(const TUint32 aPos, const TDesC8& aBuffer, TUint32& aSize)
+	{
+		TPtr8 sizePtr((TUint8*)&aSize,4, 4);
+		TIpcArgs args(aPos, &aBuffer, &sizePtr);
+		TInt res = SendReceive(EDebugServWriteCrashFlash, args);
+		return res;
+	}
+/**
+Purpose:
+Method to erase a block in the crash flash
+
+@return Any error which may be returned by RSessionBase::SendReceive()
+*/
+inline TInt RSecuritySvrSession::EraseCrashLog(const TUint32 aPos, const TUint32 aBlockNumber)
+	{	
+		TIpcArgs args(aPos, aBlockNumber);
+		TInt res = SendReceive(EDebugServEraseCrashFlash, args);
+		return res;
+	}
+
+/**
+Purpose:
+Method to erase entire flash partition
+
+@return Any error which may be returned by RSessionBase::SendReceive()
+*/
+inline TInt RSecuritySvrSession::EraseCrashFlashPartition()
+	{
+	TInt res = SendReceive(EDebugServEraseEntireCrashFlash);
+	return res;
+	}
+
+} // end of Debug namespace declaration
+
+#endif // #ifndef __KERNEL_MODE__
+
+#endif // RM_DEBUG_API_H
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debugsrv/runmodedebug/runmodedebug_plat/run_mode_debug_api/run_mode_debug_api.metaxml	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<api id="e057f0af34c6153438db9d7dbc71f1f2" dataversion="2.0">
+  <name>run_mode_debug_api</name>
+  <description>Run Mode Debug API</description>
+  <type>c++</type>
+  <collection>debugsrv</collection>
+  <libs/>
+  <release category="platform" sinceversion=""/>
+  <attributes>
+    <htmldocprovided>no</htmldocprovided>
+    <adaptation>no</adaptation>
+  </attributes>
+</api>
--- a/debugsrv/runmodedebug/securityserver/group/rm_debug_svr.mmp	Wed Sep 29 17:45:35 2010 +0300
+++ b/debugsrv/runmodedebug/securityserver/group/rm_debug_svr.mmp	Fri Oct 08 14:56:39 2010 +0300
@@ -1,7 +1,7 @@
 // Copyright (c) 2006-2009 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"
+// under the terms of "Eclipse Public License v1.0"
 // which accompanies this distribution, and is available
 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
 //
@@ -28,18 +28,17 @@
 
 library		euser.lib
 library         efsrv.lib
-library         btracec.lib
 
 userinclude ../inc
 userinclude ../../rmdriver/inc
 
 SYMBIAN_BASE_SYSTEMINCLUDE(nkern)
-OS_LAYER_SYSTEMINCLUDE_SYMBIAN
+OS_LAYER_SYSTEMINCLUDE
 
 
 UID            0x100039CE 0x102834E2
 SECUREID       0x102834E2
-VENDORID       0x70000001
+VENDORID       VID_DEFAULT
 
 
 // Enables UTrace logging of DSS public API calls
--- a/debugsrv/runmodedebug/securityserver/inc/c_process_pair.h	Wed Sep 29 17:45:35 2010 +0300
+++ b/debugsrv/runmodedebug/securityserver/inc/c_process_pair.h	Fri Oct 08 14:56:39 2010 +0300
@@ -1,7 +1,7 @@
 // Copyright (c) 2006-2009 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"
+// under the terms of "Eclipse Public License v1.0"
 // which accompanies this distribution, and is available
 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
 //
@@ -18,11 +18,6 @@
 #ifndef C_PROCESS_PAIR_H
 #define C_PROCESS_PAIR_H
 
-/**
-@file
-@internalTechnology
-@released
-*/
 
 /**
 CProcessPair is a mapping between a debug agent's process Id, and
--- a/debugsrv/runmodedebug/securityserver/inc/c_security_svr_async.h	Wed Sep 29 17:45:35 2010 +0300
+++ b/debugsrv/runmodedebug/securityserver/inc/c_security_svr_async.h	Fri Oct 08 14:56:39 2010 +0300
@@ -1,7 +1,7 @@
 // Copyright (c) 2006-2009 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"
+// under the terms of "Eclipse Public License v1.0"
 // which accompanies this distribution, and is available
 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
 //
--- a/debugsrv/runmodedebug/securityserver/inc/c_security_svr_server.h	Wed Sep 29 17:45:35 2010 +0300
+++ b/debugsrv/runmodedebug/securityserver/inc/c_security_svr_server.h	Fri Oct 08 14:56:39 2010 +0300
@@ -1,7 +1,7 @@
 // Copyright (c) 2006-2009 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"
+// under the terms of "Eclipse Public License v1.0"
 // which accompanies this distribution, and is available
 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
 //
@@ -18,12 +18,6 @@
 #ifndef C_SECURITY_SVR_SERVER_H
 #define C_SECURITY_SVR_SERVER_H
 
-/**
-@file
-@internalTechnology
-@released
-*/
-
 #include <rm_debug_api.h>
 #include "c_process_pair.h"
 #include "c_shutdown_timer.h"
--- a/debugsrv/runmodedebug/securityserver/inc/c_security_svr_session.h	Wed Sep 29 17:45:35 2010 +0300
+++ b/debugsrv/runmodedebug/securityserver/inc/c_security_svr_session.h	Fri Oct 08 14:56:39 2010 +0300
@@ -1,7 +1,7 @@
 // Copyright (c) 2006-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"
+// under the terms of "Eclipse Public License v1.0"
 // which accompanies this distribution, and is available
 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
 //
@@ -18,12 +18,6 @@
 #ifndef C_SECURITY_SVR_SESSION_H
 #define C_SECURITY_SVR_SESSION_H
 
-/**
-@file
-@internalTechnology
-@released
-*/
-
 // forward declaration
 class CSecuritySvrAsync;
 
--- a/debugsrv/runmodedebug/securityserver/inc/c_shutdown_timer.h	Wed Sep 29 17:45:35 2010 +0300
+++ b/debugsrv/runmodedebug/securityserver/inc/c_shutdown_timer.h	Fri Oct 08 14:56:39 2010 +0300
@@ -1,7 +1,7 @@
 // Copyright (c) 2007-2009 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"
+// under the terms of "Eclipse Public License v1.0"
 // which accompanies this distribution, and is available
 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
 //
@@ -18,12 +18,6 @@
 #ifndef C_SHUTDOWN_TIMER_H
 #define C_SHUTDOWN_TIMER_H
 
-/**
-@file
-@internalTechnology
-@released
-*/
-
 #include <e32base.h>
 
 const TInt KShutdownDelay = 5000000; // approx 5 seconds
--- a/debugsrv/runmodedebug/securityserver/inc/low_mem_requests.h	Wed Sep 29 17:45:35 2010 +0300
+++ b/debugsrv/runmodedebug/securityserver/inc/low_mem_requests.h	Fri Oct 08 14:56:39 2010 +0300
@@ -1,7 +1,7 @@
 // Copyright (c) 2007-2009 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"
+// under the terms of "Eclipse Public License v1.0"
 // which accompanies this distribution, and is available
 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
 //
@@ -18,12 +18,6 @@
 #ifndef LOW_MEM_REQUESTS_H
 #define LOW_MEM_REQUESTS_H
 
-/**
-@file
-@internalTechnology
-@released
-*/
-
 #ifdef _DEBUG
 // enumerators to use to call Debug Security Server in debug mode for low mem tests
 enum TLowMemDebugServRqst
--- a/debugsrv/runmodedebug/securityserver/inc/rm_debug_api.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,2657 +0,0 @@
-// Copyright (c) 2006-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:
-//
-// Description:
-// Definitions for the run mode debug agent client side sessions.
-// 
-// WARNING: This file contains some APIs which are internal and are subject
-//          to change without notice. Such APIs should therefore not be used
-//          outside the Kernel and Hardware Services package.
-//
-
-#ifndef RM_DEBUG_API_H
-#define RM_DEBUG_API_H
-
-/**
-@file
-@publishedPartner
-@released
-*/
-
-#include <e32cmn.h>
-#include <e32def_private.h>
-
-/**
-  The Debug namespace contains all API definitions used for on-target debugging.
-  */
-namespace Debug {
-
-/** This is the maximum size in bytes a user trace can be */
-const TInt TUserTraceSize = 256;
-
-/**
-  Information in the debug functionality block is represented as a concatenation
-  of pairs of TTagHeader structures and arrays of TTag objects.
-  @see TTagHeader
-  @see RSecuritySvrSession::GetDebugFunctionality
-  */
-struct TTag
-{
-	/** Tag ID, value identifying this tag. */
-	TUint32	iTagId;
-	/**
-	  Values correspond to TTagType enumerators.
-	  @see TTagType
-	  */
-	TUint16	iType;
-	/** Size of external data associated with this tag. */
-	TUint16 iSize;
-	/** Data associated with this tag. */
-	TUint32 iValue;
-};
-
-/**
-  Enumeration defining the supported tag types. These enumerators are used in TTag.iTagId.
-  @see TTag
-  */
-enum TTagType
-{
-	/** Indicates that the iValue field of a TTag structure will contain either ETrue or EFalse. */
-	ETagTypeBoolean = 0,
-	/** Indicates that the iValue field of a TTag structure will contain a value in the TUint32 range. */
-	ETagTypeTUint32 = 1,
-	/** Indicates that the iValue field of a TTag structure will contain values from an enumeration. */
-	ETagTypeEnum = 2,
-	/** Indicates that the iValue field of a TTag structure should be interpreted as a bit field. */
-	ETagTypeBitField = 3,
-	/** Indicates that the type of the iValue field of a TTag structure is unknown. */
-	ETagTypeUnknown = 4,
-	/** Indicates that the iValue field of a TTag structure will contain a pointer. */
-	ETagTypePointer = 5
-};
-
-/**
-  Information in the debug functionality block is represented as a concatenation
-  of pairs of TTagHeader structures and arrays of TTag objects.
-  @see TTag
-  @see RSecuritySvrSession::GetDebugFunctionality
-  */
-struct TTagHeader
-{
-	/** Value identifying the contents of this TTagHeader, should be interpreted as an enumerator from TTagHeaderId.
-	  @see TTagHeaderId
-	  */
-	TUint16	iTagHdrId;
-	/** The number of TTag elements in the array associated with this TTagHeader. */
-	TUint16 iNumTags;
-};
-
-/**
-  Enumeration used to identify TTagHeader structures, TTagHeader::iTagHdrId elements take these enumerators as values.
-  @see TTagHeader
-  */
-enum TTagHeaderId
-{
-	ETagHeaderIdCore = 0,            /**< Identifies a TTagHeader with associated TTag elements with iTagId values from TFunctionalityCore. */
-	ETagHeaderIdMemory = 1,          /**< Identifies a TTagHeader with associated TTag elements with iTagId values from TFunctionalityMemory. */
-	/**
-	  Identifies a TTagHeader with associated TTag elements with iTagId values from TFunctionalityRegister.
-	  These values are defined as in the document Symbian Core Dump File Format Appendix C
-	  (see SGL.TS0028.027 - Symbian Core Dump File Format v1.0.doc).
-	  The TTag objects in the associated array have an iSize value corresponding to the size of the register's data in bytes.
-	  */
-	ETagHeaderIdRegistersCore = 2,
-	/**
-	  Identifies a TTagHeader with associated TTag elements with iTagId values corresponding to coprocessor register identifiers.
-	  Coprocessor registers are defined as in the document Symbian Core Dump File Format Appendix C as follows
-	  (see SGL.TS0028.027 - Symbian Core Dump File Format v1.0.doc):
-
-	  For each 32-bit data word defining a co-pro register, the definition of the meaning of the bits follows
-	  the ARM Architecture Reference manual instruction coding
-
-	  Upper Halfword	Lower Halfword
-	  Opcode 2			CRm
-
-	  For example: The Domain Access Control Register is Register 3 of co-processor 15. The encoding is therefore
-	  CRm = 3
-	  Opcode2 = 0
-
-	  Therefore the functionality tag would be:
-	  TagID:  15			// co-processor number
-	  Type: ETagTypeTUint32
-	  Data: 0x00000003		// Opcode2 = 0, CRm = 3
-	  */
-	ETagHeaderIdCoProRegisters = 3,  /**< Identifies a TTagHeader with associated TTag elements with iTagId values from TFunctionalityRegister. */
-	ETagHeaderIdBreakpoints = 4,     /**< Identifies a TTagHeader with associated TTag elements with iTagId values from TFunctionalityBreakpoint. */
-	ETagHeaderIdStepping = 5,        /**< Identifies a TTagHeader with associated TTag elements with iTagId values from TFunctionalityStep. */
-	ETagHeaderIdExecution = 6,       /**< Identifies a TTagHeader with associated TTag elements with iTagId values from TFunctionalityExec. */
-	ETagHeaderIdEvents = 7,          /**< Identifies a TTagHeader with associated TTag elements with iTagId values from TEventType. */
-	ETagHeaderIdApiConstants = 8,    /**< Identifies a TTagHeader with associated TTag elements with iTagId values from TFunctionalityApiConstants.*/
-	ETagHeaderList = 9,              /**< Identifies a TTagHeader with associated TTag elements with iTagId values from TListId. */
-	ETagHeaderIdKillObjects = 10,    /**< Identifies a TTagHeader with associated TTag elements with iTagId values from TFunctionalityKillObject. */
-	ETagHeaderIdSecurity = 11,		 /**< Identifies a TTagHeader with associated TTag elements with iTagId values from TFunctionalitySecurity */
-	ETagHeaderIdBuffers = 12,        /**< Identifies a TTagHeader with associated TTag elements with iTagId values from TBufferType. */
-	ETagHeaderIdStopModeFunctions = 13, /**< Identifies a TTagHeader with associated TTag elements with iTagId values from TFunctionalityStopModeFunctions. */	
-};
-
-/**
-  This structure is not used in the run-mode debug API.
-  @deprecated
-  */
-struct TSubBlock
-{
-	/** Header to identify the TSubBlock. */
-	TTagHeader iHeader;
-	/** Pointer to array of TTag values associated with this TSubBlock. */
-	TTag* iTagArray;
-};
-
-/**
-  These tags define what kinds of core functionality are supported by the run-mode debug subsystem.
-  TTag structures associated with the ETagHeaderIdCore sub-block will have iTagId values from this enumeration.
-  See each enumerator for an explanation of how a TTag with that iTagId should be interpreted.
-  */
-enum TFunctionalityCore
-{
-	ECoreEvents = 0,        /**< Indicates whether events processing is supported. */
-	ECoreStartStop = 1,     /**< Indicates whether suspending and resuming threads is supported. */
-	ECoreMemory = 2,        /**< Indicates whether reading and writing memory is supported. */
-	ECoreRegister = 3,      /**< Indicates whether reading and writing register values is supported. */
-	ECoreBreakpoint = 4,    /**< Indicates whether breakpoints are supported. */
-	ECoreStepping = 5,      /**< Indicates whether stepping is supported. */
-	ECoreLists = 6,         /**< Indicates whether listings are supported. */
-	ECoreLogging = 7,       /**< Indicates whether logging is supported. */
-	ECoreHardware = 8,      /**< Indicates whether hardware support is supported. */
-	ECoreApiConstants = 9,  /**< Indicates whether the information in the ETagHeaderIdApiConstants sub-block is relevant. */
-	ECoreKillObjects = 10,  /**< Indicates whether killing objects (i.e. threads and processes) is supported. */
-	ECoreSecurity = 11,		/**< Indicates whether OEM Debug token support or other security info is supported. */
-	ECoreStopModeFunctions = 12, /**< Indicates whether Stop Mode function calling is supported. */
-	ECoreStopModeBuffers = 13, /**< Indicates whether Stop Mode buffers are supported. */
-	
-	/**
-	  @internalTechnology
-	  A debug agent should find the number of core tags from the DFBlock rather than this enumerator.
-	  */
-	ECoreLast
-};
-
-/**
-  These tags define what kind of memory operations can be performed.
-  TTag structures associated with the ETagHeaderIdMemory sub-block will have iTagId values from this enumeration.
-  See each enumerator for an explanation of how a TTag with that iTagId should be interpreted.
- */
-enum TFunctionalityMemory
-{
-	EMemoryRead = 0,          /**< Indicates whether reading memory is supported. */
-	EMemoryWrite = 1,         /**< Indicates whether writing memory is supported. */
-	EMemoryAccess64 = 2,      /**< Indicates whether 64 bit memory access is supported. */
-	EMemoryAccess32 = 3,      /**< Indicates whether 32 bit memory access is supported. */
-	EMemoryAccess16 = 4,      /**< Indicates whether 16 bit memory access is supported. */
-	EMemoryAccess8 = 5,       /**< Indicates whether 8 bit memory access is supported. */
-	EMemoryBE8 = 6,           /**< Indicates whether reading memory as 8 bit big-endian values is supported. */
-	EMemoryBE32 = 7,          /**< Indicates whether reading memory as 32 bit big-endian values is supported. */
-	EMemoryLE8 = 8,           /**< Indicates whether reading memory as 8 bit little-endian values is supported. */
-	EMemoryMaxBlockSize = 9,  /**< Corresponds to the maximum size of a block of memory which can be requested. */
-	/**
-	  @internalTechnology
-	  A debug agent should find the number of memory tags from the DFBlock rather than this enumerator.
-	  */
-	EMemoryLast
-};
-
-/**
-  These tags define which objects can be killed by the device driver.
-  TTag structures associated with the ETagHeaderIdKillObjects sub-block will have iTagId values from this enumeration.
-  See each enumerator for an explanation of how a TTag with that iTagId should be interpreted.
- */
-enum TFunctionalityKillObject
-{
-	EFunctionalityKillThread = 0,          /**< Indicates whether killing threads is supported. */
-	EFunctionalityKillProcess = 1,         /**< Indicates whether killing processes is supported. */
-	/**
-	  @internalTechnology
-	  A debug agent should find the number of kill object tags from the DFBlock rather than this enumerator.
-	  */
-	EFunctionalityKillObjectLast
-};
-
-/**
-  A TTag with an id from the TFunctionalityRegister enum will have a value from this enumeration.
-  The values define how a register can be accessed, if at all.
- */
-enum TFunctionalityAccess
-{
-	EAccessNone = 0,       /**< Indicates that a register cannot be accessed. */
-	EAccessReadOnly = 1,   /**< Indicates that a register can be read, but not written to. */
-	EAccessWriteOnly = 2,  /**< Indicates that a register can be written to, but not read. */
-	EAccessReadWrite = 3,  /**< Indicates that a register can be both read and written to. */
-	EAccessUnknown = 4,    /**< Indicates that it is unspecified whether reading or writing to a register is possible. */
-};
-
-/**
-  These enumerators act as core register identifiers.
-  TTag structures associated with the ETagHeaderIdRegistersCore sub-block will have iTagId values from this enumeration.
-  The numeric value of each enumerator identifies the register according to the definitions in the Symbian Core Dump File Format Appendix B
-  (see SGL.TS0028.027 - Symbian Core Dump File Format v1.0.doc).
-  */
-enum TFunctionalityRegister
-{
-	ERegisterR0 = 0x00000000,      /**< Identifier for user mode register R0. */
-	ERegisterR1 = 0x00000100,      /**< Identifier for user mode register R1. */
-	ERegisterR2 = 0x00000200,      /**< Identifier for user mode register R2. */
-	ERegisterR3 = 0x00000300,      /**< Identifier for user mode register R3. */
-	ERegisterR4 = 0x00000400,      /**< Identifier for user mode register R4. */
-	ERegisterR5 = 0x00000500,      /**< Identifier for user mode register R5. */
-	ERegisterR6 = 0x00000600,      /**< Identifier for user mode register R6. */
-	ERegisterR7 = 0x00000700,      /**< Identifier for user mode register R7. */
-	ERegisterR8 = 0x00000800,      /**< Identifier for user mode register R8. */
-	ERegisterR9 = 0x00000900,      /**< Identifier for user mode register R9. */
-	ERegisterR10 = 0x00000a00,     /**< Identifier for user mode register R10. */
-	ERegisterR11 = 0x00000b00,     /**< Identifier for user mode register R11. */
-	ERegisterR12 = 0x00000c00,     /**< Identifier for user mode register R12. */
-	ERegisterR13 = 0x00000d00,     /**< Identifier for user mode register R13. */
-	ERegisterR14 = 0x00000e00,     /**< Identifier for user mode register R14. */
-	ERegisterR15 = 0x00000f00,     /**< Identifier for user mode register R15. */
-	ERegisterCpsr = 0x00001000,    /**< Identifier for CPSR. */
-	ERegisterR13Svc = 0x00001100,  /**< Identifier for R13 supervisor mode banked register. */
-	ERegisterR14Svc = 0x00001200,  /**< Identifier for R14 supervisor mode banked register. */
-	ERegisterSpsrSvc = 0x00001300, /**< Identifier for SPSR supervisor mode banked register. */
-	ERegisterR13Abt = 0x00001400,  /**< Identifier for R13 Abort mode banked register. */
-	ERegisterR14Abt = 0x00001500,  /**< Identifier for R14 Abort mode banked register. */
-	ERegisterSpsrAbt = 0x00001600, /**< Identifier for SPSR Abort mode banked register. */
-	ERegisterR13Und = 0x00001700,  /**< Identifier for R13 Undefined mode banked register. */
-	ERegisterR14Und = 0x00001800,  /**< Identifier for R14 Undefined mode banked register. */
-	ERegisterSpsrUnd = 0x00001900, /**< Identifier for SPSR Undefined mode banked register. */
-	ERegisterR13Irq = 0x00001a00,  /**< Identifier for R13 Interrupt mode banked register. */
-	ERegisterR14Irq = 0x00001b00,  /**< Identifier for R14 Interrupt mode banked register. */
-	ERegisterSpsrIrq = 0x00001c00, /**< Identifier for SPSR Interrupt mode banked register. */
-	ERegisterR8Fiq = 0x00001d00,   /**< Identifier for R8 Fast Interrupt mode banked register. */
-	ERegisterR9Fiq = 0x00001e00,   /**< Identifier for R9 Fast Interrupt mode banked register. */
-	ERegisterR10Fiq = 0x00001f00,  /**< Identifier for R10 Fast Interrupt mode banked register. */
-	ERegisterR11Fiq = 0x00002000,  /**< Identifier for R11 Fast Interrupt mode banked register. */
-	ERegisterR12Fiq = 0x00002100,  /**< Identifier for R12 Fast Interrupt mode banked register. */
-	ERegisterR13Fiq = 0x00002200,  /**< Identifier for R13 Fast Interrupt mode banked register. */
-	ERegisterR14Fiq = 0x00002300,  /**< Identifier for R14 Fast Interrupt mode banked register. */
-	ERegisterSpsrFiq = 0x00002400, /**< Identifier for SPSR Fast Interrupt mode banked register. */
-	/**
-	  @internalTechnology
-	  A debug agent should find the number of core registers from the DFBlock rather than this enumerator.
-	  */
-	ERegisterLast = 37
-};
-
-
-/**
-  These tags define the kind of breakpoints that are supported.
-  TTag structures associated with the ETagHeaderIdBreakpoints sub-block will have iTagId values from this enumeration.
-  See each enumerator for an explanation of how a TTag with that iTagId should be interpreted.
- */
-enum TFunctionalityBreakpoint
-{
-	EBreakpointThread = 0,         /**< Indicates whether thread specific breakpoints are supported. */
-	EBreakpointProcess = 1,        /**< Indicates whether process specific breakpoints are supported. */
-	EBreakpointSystem = 2,         /**< Indicates whether system wide breakpoints are supported. */
-	EBreakpointArm = 3,            /**< Indicates whether ARM mode breakpoints are supported. */
-	EBreakpointThumb = 4,          /**< Indicates whether Thumb mode breakpoints are supported. */
-	EBreakpointT2EE = 5,           /**< Indicates whether Thumb2 mode breakpoints are supported. */
-	EBreakpointArmInst = 6,        /**< Reserved for future use. */
-	EBreakpointThumbInst = 7,      /**< Reserved for future use. */
-	EBreakpointT2EEInst = 8,       /**< Reserved for future use. */
-	EBreakpointSetArmInst = 9,     /**< Reserved for future use. */
-	EBreakpointSetThumbInst = 10,  /**< Reserved for future use. */
-	EBreakpointSetT2EEInst = 11,   /**< Reserved for future use. */
-	/**
-	  @internalTechnology
-	  A debug agent should find the number of breakpoint tags from the DFBlock rather than this enumerator.
-	  */
-	EBreakpointLast
-};
-
-/**
-  These enumerators provide information about the stepping capabilities of the debug sub-system.
-  TTag structures associated with the ETagHeaderIdStepping sub-block will have iTagId values from this enumeration.
-  See each enumerator for an explanation of how a TTag with that iTagId should be interpreted.
- */
-enum TFunctionalityStep
-{
-	EStep = 0, /**< Indicates whether instruction stepping is supported. */
-	/**
-	  @internalTechnology
-	  A debug agent should find the number of stepping tags from the DFBlock rather than this enumerator.
-	  */
-	EStepLast
-};
-
-/**
-  These enumerators provide information about the execution control capabilities of the debug sub-system.
-  TTag structures associated with the ETagHeaderIdExecution sub-block will have iTagId values from this enumeration.
-  See each enumerator for an explanation of how a TTag with that iTagId should be interpreted.
- */
-enum TFunctionalityExec
-{
-	EExecThreadSuspendResume = 0,  /**< Indicates whether suspending and resuming threads is supported. */
-	EExecProcessSuspendResume = 1, /**< Indicates whether suspending and resuming processes is supported. */
-	EExecSystemSuspendResume = 2,  /**< Indicates whether suspending and resuming the entire system is supported. */
-	/**
-	  @internalTechnology
-	  A debug agent should find the number of execution control tags from the DFBlock rather than this enumerator.
-	  */
-	EExecLast
-};
-
-/**
-  This enumeration defines the event types supported by the debug sub-system.
-  TTag structures associated with the ETagHeaderIdEvents sub-block will have
-  iTagId values from this enumeration, and iValue values from the TKernelEventAction enumeration.
-
-  These enumerators are also used by the RSecuritySvrSession API to identify events.
-  @see RSecuritySvrSession
-  @see TKernelEventAction
- */
-enum TEventType
-{
-	EEventsBreakPoint = 0,    /**< Identifies a breakpoint event. */
-	EEventsSwExc = 1,         /**< Identifies a software exception event. */
-	EEventsHwExc = 2,         /**< Identifies a hardware exception event. */
-	EEventsKillThread = 3,    /**< Identifies a kill thread event. */
-	EEventsAddLibrary = 4,    /**< Identifies an add library event. */
-	EEventsRemoveLibrary = 5, /**< Identifies a remove library event. */
-	/**
-	 If an event is generated and there is only a single space remaining in the events queue then
-	 an event of type EEventsBufferFull will be stored in the queue and the generated event will
-	 be discarded. If further events occur while the buffer is full the events will be discarded.
-	 As such an event of type EEventsBufferFull being returned signifies that one or more events
-	 were discarded. An event of this type has no valid data associated with it.
-	 */
-	EEventsBufferFull = 6,
-	EEventsUnknown = 7,       /**< Identifies an event of unknown type. */
-	EEventsUserTrace = 8,     /**< Identifies a user trace. */
-	EEventsProcessBreakPoint = 9, /**< Identifies a process breakpoint event. */
-	EEventsStartThread = 10, /**< Identifies a start thread event. */
-	EEventsUserTracesLost = 11, /**< Identifies user traces being lost. */
-	EEventsAddProcess = 12, /**< Identifies an AddProcess event */
-	EEventsRemoveProcess = 13, /**< Identifies a RemoveProcess event */
-	/**
-	  @internalTechnology
-	  A debug agent should find the number of event types from the DFBlock rather than this enumerator.
-	  */
-	EEventsLast
-};
-
-/**
-  These enumerators provide information about constants which are used in the RSecuritySvrSession API.
-  TTag structures associated with the ETagHeaderIdApiConstants sub-block will have iTagId values from this enumeration.
-  See each enumerator for an explanation of how a TTag with that iTagId should be interpreted.
- */
-enum TFunctionalityApiConstants
-	{
-	/**
-	  Corresponds to the size of a buffer required to store a TEventInfo.
-	  @see TEventInfo
-	  */
-	EApiConstantsTEventInfoSize = 0,
-	/**
-	  @internalTechnology
-	  A debug agent should find the number of API constants tags from the DFBlock rather than this enumerator.
-	  */
-	EApiConstantsLast,
-	};
-
-/**
-  The set of possible actions which could be taken when a kernel event occurs.
-  Not all actions are possible for all events. The debug functionality sub-block with header id ETagHeaderIdEvents
-  indicates which values are permitted for each event. The value given for that event should be
-  considered as the most intrusive action the debugger may set: with the definition that EActionSuspend is more
-  intrusive than EActionContinue, which is more intrusive than EActionIgnore.
-  @see RSecuritySvrSession
-  */
-enum TKernelEventAction
-{
-	/** If an event action is set to this value then events of that type will be
-	  ignored, and not reported to the debugger. */
-	EActionIgnore = 0,
-	/** If an event action is set to this value then events of that type will be
-	  reported to the debugger and the thread which generated the event will be
-	  allowed to continue executing. */
-	EActionContinue = 1,
-	/** If an event action is set to this value then events of that type will be
-	  reported to the debugger and the thread which generated the event will be
-	  suspended. */
-	EActionSuspend = 2,
-	/**
-	  @internalTechnology
-	  Count of event actions.
-	  */
-	EActionLast
-};
-
-/**
-  These enumerators provide information about the ability of the debug subsystem to support OEM Debug tokens.
-  TTag structures associated with the ETagHeaderIdSecurity sub-block will have iTagId values from this enumeration.
-  See each enumerator for an explanation of how a TTag with that iTagId should be interpreted.
- */
-enum TFunctionalitySecurity
-{
-	ESecurityOEMDebugToken = 0,  /**< Indicates whether the DSS supports the use of OEM Debug Tokens. */
-
-	/**
-	  @internalTechnology
-	  A debug agent should find the number of tags from the DFBlock rather than this enumerator.
-	  */
-	ESecurityLast
-};
-
-/**
-  Used for storing the contents of a 32 bit register
-  */
-typedef TUint32 TRegisterValue32;
-
-
-/**
- * Processor mode
- */
-enum TArmProcessorModes
-{
-	EUserMode=0x10,    	//!< EUserMode
-    EFiqMode=0x11,  	//!< EFiqMode
-    EIrqMode=0x12,  	//!< EIrqMode
-    ESvcMode=0x13,  	//!< ESvcMode
-    EAbortMode=0x17,	//!< EAbortMode
-    EUndefMode=0x1b,	//!< EUndefMode
-    EMaskMode=0x1f  	//!< EMaskMode
-};
-
-
-
-/**
-  Structure containing information about the state of the registers when a
-  hardware exception occurred
-  */
-class TRmdArmExcInfo
-	{
-public:
-	/** Enumeration detailing the types of exception which may occur. */
-	enum TExceptionType
-		{
-		/** Enumerator signifying that a prefetch abort error has occurred. */
-		EPrefetchAbort = 0,
-		/** Enumerator signifying that a data abort error has occurred. */
-		EDataAbort = 1,
-		/** Enumerator signifying that an undefined instruction error has occurred. */
-		EUndef =2
-		};
-
-	/** Value of CPSR. */
-	TRegisterValue32 iCpsr;
-	/** Type of exception which has occurred. */
-	TExceptionType iExcCode;
-	/** Value of R13 supervisor mode banked register. */
-	TRegisterValue32 iR13Svc;
-	/** Value of user mode register R4. */
-	TRegisterValue32 iR4;
-	/** Value of user mode register R5. */
-	TRegisterValue32 iR5;
-	/** Value of user mode register R6. */
-	TRegisterValue32 iR6;
-	/** Value of user mode register R7. */
-	TRegisterValue32 iR7;
-	/** Value of user mode register R8. */
-	TRegisterValue32 iR8;
-	/** Value of user mode register R9. */
-	TRegisterValue32 iR9;
-	/** Value of user mode register R10. */
-	TRegisterValue32 iR10;
-	/** Value of user mode register R11. */
-	TRegisterValue32 iR11;
-	/** Value of R14 supervisor mode banked register. */
-	TRegisterValue32 iR14Svc;
-	/** Address which caused exception (System Control Coprocessor Fault Address Register) */
-	TRegisterValue32 iFaultAddress;
-	/** Value of System Control Coprocessor Fault Status Register. */
-	TRegisterValue32 iFaultStatus;
-	/** Value of SPSR supervisor mode banked register. */
-	TRegisterValue32 iSpsrSvc;
-	/** Value of user mode register R13. */
-	TRegisterValue32 iR13;
-	/** Value of user mode register R14. */
-	TRegisterValue32 iR14;
-	/** Value of user mode register R0. */
-	TRegisterValue32 iR0;
-	/** Value of user mode register R1. */
-	TRegisterValue32 iR1;
-	/** Value of user mode register R2. */
-	TRegisterValue32 iR2;
-	/** Value of user mode register R3. */
-	TRegisterValue32 iR3;
-	/** Value of user mode register R12. */
-	TRegisterValue32 iR12;
-	/** Value of user mode register R15, points to instruction which caused exception. */
-	TRegisterValue32 iR15;
-	};
-
-/**
-  The maximum size, in bytes, of the panic category string returned as part of a
-  TEventInfo object.
-
-  @see TEventInfo
-  @see TThreadKillInfo
-  */
-const TInt KPanicCategoryMaxName = KMaxName;
-
-/**
-  Event specific information returned as part of a TEventInfo object when
-  an agent set breakpoint is hit.
-  */
-class TThreadBreakPointInfo
-	{
-public:
-	/** Identifies the type of exception. */
-	TExcType iExceptionNumber;
-	/** Structure containing information about the ARM register values. */
-	TRmdArmExcInfo iRmdArmExcInfo;
-	};
-
-/**
-  Event specific information returned as part of a TEventInfo object when
-  a software exception occurs.
-  */
-class TThreadSwExceptionInfo
-	{
-public:
-	/** The value of the program counter. */
-	TUint32 iCurrentPC;
-	/** Identifies the type of exception. */
-	TExcType iExceptionNumber;
-	};
-
-/**
-  Event specific information returned as part of a TEventInfo object when
-  a hardware exception occurs.
-  */
-class TThreadHwExceptionInfo
-	{
-public:
-	/** Identifies the type of exception. */
-	TExcType iExceptionNumber;
-	/** Structure containing information about the ARM register values. */
-	TRmdArmExcInfo iRmdArmExcInfo;
-	};
-
-/**
-  Event specific information returned as part of a TEventInfo object when
-  a thread kill event occurs.
-  */
-class TThreadKillInfo
-	{
-public:
-	/** The value of the program counter. */
-	TUint32 iCurrentPC;
-	/** Specifies the reason for the kill thread event, this value is specific to the killed thread and does not correspond to a standard Symbian enumeration. */
-	TInt iExitReason;
-	/** Specifies the type of the thread kill event, values correspond to elements of TExitType. */
-	TUint8 iExitType;
-	/** The panic category of the killed thread. */
-	TUint8 iPanicCategory[KPanicCategoryMaxName];
-	/** Contains the length in bytes of the initialised data in iPanicCategory. */
-	TInt iPanicCategoryLength;
-	};
-
-/**
-  Event specific information returned as part of a TEventInfo object when
-  a library load event occurs.
-  */
-class TLibraryLoadedInfo
-	{
-public:
-	/** The name of the file that the library was loaded from. */
-	TUint8 iFileName[KMaxName];
-	/** Contains the length in bytes of the initialised data in iFileName. */
-	TInt iFileNameLength;
-	/** The code base address (.text). */
-	TUint32 iCodeAddress;
-	/** The base address of the initialised data section (.data). */
-	TUint32 iDataAddress;
-	};
-
-/**
-  Event specific information returned as part of a TEventInfo object when
-  a thread is started
-  */
-class TStartThreadInfo
-	{
-public:
-	/** The name of the file that the process owning the thread was created from. */
-	TUint8 iFileName[KMaxName];
-	/** Contains the length in bytes of the initialised data in iFileName. */
-	TInt iFileNameLength;
-	};
-
-/**
-  Event specific information returned as part of a TEventInfo object when
-  a process is added. Note that the Process may not be fully constructed,
-  e.g. no threads.
-  */
-class TAddProcessInfo
-	{
-public:
-	/** The name of the file that the process was created from. */
-	TUint8 iFileName[KMaxName];
-	/** Contains the length in bytes of the initialised data in iFileName. */
-	TInt iFileNameLength;
-	/** The UID3 of this process */
-	TUint32 iUid3;  
-	/** Contains the CreatorThread ID if available: May be 0 */
-	TUint64 iCreatorThreadId;  
-	};
-
-/**
-  Event specific information returned as part of a TEventInfo object when
-  a process is removed. Note that the Process may not be fully destroyed,
-  so its resources should only be accessed if you already have a handle to it.
-  */
-class TRemoveProcessInfo
-	{
-public:
-	/** The name of the file that the process was created from. */
-	TUint8 iFileName[KMaxName];
-	/** Contains the length in bytes of the initialised data in iFileName. */
-	TInt iFileNameLength;
-	TUint32 iSpare1;	// Unused
-	};
-
-/**
-  Event specific information returned as part of a TEventInfo object when
-  a library unload event occurs.
-  */
-class TLibraryUnloadedInfo
-	{
-public:
-	/** The name of the file that the library was loaded from. */
-	TUint8 iFileName[KMaxName];
-	/** Contains the length in bytes of the initialised data in iFileName. */
-	TInt iFileNameLength;
-	};
-
-/**
- * Enum to represent the context of a user trace message
- */ 
-enum TUserTraceMessageContext 
-{
-	ESingleMessage = 0x1,   /** Indicates this message is the only one corresponding to a given user trace */ 
-	EMultiStart = 0x2, /** Indicates this message is the start of a user trace which consists of multiple messages */
-	EMultiMid = 0x3, /** Indicates this message is one in a series of user trace messages */
-	EMultiEnd = 0x4, /** Indicates this message is the last in a series of user trace messages */
-	/**
-	  @internalTechnology
-	  A debug agent should find the number of core tags from the DFBlock rather than this enumerator.
-	  */
-	ELast = 0x5	
-};
-	
-/**
- *   Event specific information returned as part of a TEventInfo object 
- *   when a user trace event occurs.
- */
-class TUserTraceInfo
-	{
-public:
-	/** The user trace text */
-	TUint8 iUserTraceText[TUserTraceSize];
-	
-	/** User trace text length */
-	TInt iUserTraceLength;
-	
-	/** The context of the message */
-	TUserTraceMessageContext iMessageStatus;
-	};
-	
-	
-/**
-  Structure used to store information about an event. An object of this type
-  is passed as an argument to the RSecuritySvrSession::GetEvent function,
-  and is filled in by the debug driver, and returned to the agent, when a
-  relevant event occurs.
-
-  The debug functionality block contains the size in bytes of the data that
-  the driver will return when a GetEvent call is issued. A debug agent should
-  ensure that this value equals the size of this TEventInfo object to ensure
-  that a compatible debug driver is being used. The value is stored as
-  EApiConstantsTEventInfoSize in the TFunctionalityApiConstants block.
-
-  @see RSecuritySvrSession::GetDebugFunctionality
-  @see RSecuritySvrSession::GetEvent
-  */
-class TEventInfo
-	{
-public:
-
-	/** Constructor sets all elements to default values. */
-	inline TEventInfo() { Reset(); };
-
-	/** Resets all values to default values. */
-	inline void Reset()
-		{
-		iProcessId = 0;
-		iProcessIdValid = EFalse;
-		iThreadId = 0;
-		iThreadIdValid = EFalse;
-		iEventType = (TEventType)NULL;
-		iActionTaken = EActionIgnore;
-		};
-
-public:
-
-	/** The process ID of the process which the event occurred in. */
-	TUint64 				iProcessId;
-	/** The thread ID of the thread which the event occurred in. */
-	TUint64 				iThreadId;
-	/** Has value ETrue if iProcessId is valid, EFalse otherwise. */
-	TUint8					iProcessIdValid;
-	/** Has value ETrue if iThreadId is valid, EFalse otherwise. */
-	TUint8					iThreadIdValid;
-	/** What action was taken by the debug system when it received the event. A TKernelEventAction */
-	TUint8					iActionTaken;
-	TUint8					iSpare;
-
-	/** Indicates the type of the event. This type should be used to determine
-	    the type of the information stored in the union which is part of this class. */
-	TEventType				iEventType;
-	union
-		{
-		/** Information which is specific to the break point event. */
-		TThreadBreakPointInfo iThreadBreakPointInfo;
-		/** Information which is specific to the software exception event. */
-		TThreadSwExceptionInfo iThreadSwExceptionInfo;
-		/** Information which is specific to the hardware exception event. */
-		TThreadHwExceptionInfo iThreadHwExceptionInfo;
-		/** Information which is specific to the thread kill event. */
-		TThreadKillInfo iThreadKillInfo;
-		/** Information which is specific to the library loaded event. */
-		TLibraryLoadedInfo iLibraryLoadedInfo;
-		/** Information which is specific to the library unloaded event. */
-		TLibraryUnloadedInfo iLibraryUnloadedInfo;
-		/** Information which is specific to the user trace event. */
-		TUserTraceInfo iUserTraceInfo;
-		/** Information which is specific to the start thread event. */
-		TStartThreadInfo iStartThreadInfo;
-		/** Information which is specific to the Add Process event. */
-		TAddProcessInfo iAddProcessInfo;
-		/** Information which is specific to the Remove Process event. */
-		TRemoveProcessInfo iRemoveProcessInfo;
-		};
-	};
-
-/**
-  @internalComponent
-  */
-class TProcessInfo
-	{
-	public:
-
-		inline TProcessInfo() { Reset(); }
-
-		inline TProcessInfo(TUint32 aId, TUint32 aCodeAddress, TUint32 aCodeSize, TUint32 aDataAddress)
-				: iId(aId),
-				  iCodeAddress(aCodeAddress),
-				  iCodeSize(aCodeSize),
-				  iDataAddress(aDataAddress) { }
-
-		inline void Reset()
-			{
-			iId = 0;
-			iCodeAddress = 0;
-			iCodeSize = 0;
-			iDataAddress = 0;
-			}
-
-	public:
-
-		TUint32 iId;
-		TUint32 iCodeAddress;
-		TUint32 iCodeSize;
-		TUint32 iDataAddress;
-	};
-
-/* Other functionality may be defined here later */
-
-/**
-Represents a register id value, in the terms of the Symbian ELF format:
- - bits 0-7 define the class
- - bits 8-15 define the rd_id
- - bits 16-31 define the rd_sub_id
-
-Both the core registers (TFunctionalityRegister type) and the coprocessor registers
-follow this identifier scheme.
-*/
-typedef TUint32 TRegisterInfo;
-
-/**
-Enum representing the status flags which could be returned from a register
-access call.
-*/
-enum TRegisterFlag
-	{
-	/**
-	Default value, a register access call will never return this value
-	*/
-	ENotSet = 0,
-	/**
-	Would be returned if the register is supported by the debug driver but the kernel cannot access the register
-	*/
-	EInValid = 1,
-	/**
-	Would be returned if the register could be accessed correctly
-	*/
-	EValid = 2,
-	/**
-	Would be returned if the register is not supported by the debug driver
-	*/
-	ENotSupported = 3,
-	/**
-	Would be returned if a non-4 byte register value was requested
-	*/
-	EBadSize = 4
-	};
-
-/**
-Enum representing the different ARM CPU instruction set architectures.
-*/
-enum TArchitectureMode
-	{
-	/** Represents the ARM CPU architecture. */
-	EArmMode = 1,
-	/** Represents the Thumb CPU architecture. */
-	EThumbMode = 2,
-	/**
-	  Represents the Thumb2 CPU architecture.
-	  @prototype
-	  */
-	EThumb2EEMode = 3
-	};
-
-/**
-  Used as an identifier for breakpoints set by the RSecuritySvrSession::SetBreak function.
-  @see RSecuritySvrSession
-  */
-typedef TInt32 TBreakId;
-
-/**
-  Specifies the type of a code segment.
-  @see TCodeSegListEntry
-  */
-enum TCodeSegType
-	{
-	EUnknownCodeSegType = 0, /**< Signifies an unknown code segment type. */
-	EExeCodeSegType = 1,     /**< Signifies a code segment belonging to an executable. */
-	EDllCodeSegType = 2      /**< Signifies a code segment belonging to a library. */
-	};
-
-/**
-Structure used for extracting data from a descriptor returned by a call to
-RSecuritySvrSession::GetList() when GetList() is called with TListId::ECodeSegs
-as the first argument.
-
-@see RSecuritySvrSession::GetList()
-
-@code
-//buffer is a TDesC8 containing 4-byte aligned TCodeSegListEntry objects
-//create a pointer to the start of the data
-TUint8* ptr = (TUint8*)buffer.Ptr();
-//create a pointer to the end of the data
-const TUint8* ptrEnd = ptr + buffer.Length();
-while(ptr < ptrEnd)
-	{
-	//cast the pointer to be a TCodeSegListEntry object
-	TCodeSegListEntry& entry = *(TCodeSegListEntry*)ptr;
-	//use the TCodeSegListEntry pointer, i.e.
-	TUint16 nameLength = entry.iNameLength;
-	TPtr name(&(entry.iName[0]), nameLength, nameLength);
-	// move ptr on to point to the next TCodeSegListEntry object
-	ptr += Align4(entry.GetSize());
-	}
-@endcode
-*/
-class TCodeSegListEntry
-	{
-public:
-	TInt GetSize() const;
-public:
-	/**
-	  Address of the start of the code segment.
-	  */
-	TUint32 iCodeBase;
-	/**
-	  Size of the code segment.
-	  */
-	TUint32 iCodeSize;
-	/**
-	  Size of the const data segment
-	  */
-	TUint32 iConstDataSize;
-	/**
-	  Address of the initialised data
-	  */
-	TUint32 iInitialisedDataBase;
-	/**
-	  Size of the initialised data
-	  */
-	TUint32 iInitialisedDataSize;
-	/**
-	  Size of the uninitialised data
-	  */
-	TUint32 iUninitialisedDataSize;
-	/**
-	  Boolean indicating whether the code segment is execute in place
-	  */
-	TBool iIsXip;
-	/**
-	  Indicates whether the code segment is from an executable or a dll, or neither
-	  */
-	TCodeSegType iCodeSegType;
-	/** Uid3 of this segment. */
-	TUint32 iUid3;
-	/** Currently unused element. May be used in future to aid maintaining compatibility. */
-	TUint32 iSpare2;
-	/**
-	  Length of the code segment's name
-	  */
-	TUint16 iNameLength;
-	/**
-	  First two bytes of the code segment's name, the name should be considered to
-	  extend past the end of the TCodeSegListEntry structure to a length
-	  corresponding to iNameLength
-	  */
-	TUint16 iName[1];
-	};
-
-/**
-Returns the size of the TCodeSegListEntry, including the file name length
-
-@return the size, in bytes, of the TCodeSegListEntry and the code segment's
-file name
-*/
-inline TInt TCodeSegListEntry::GetSize() const
-	{
-	return sizeof(TCodeSegListEntry) - sizeof(iName) + (2 * iNameLength);
-	}
-
-/**
-Structure used for extracting data from a descriptor returned by a call to
-RSecuritySvrSession::GetList() when GetList() is called with TListId::EXipLibraries
-as the first argument.
-
-@see RSecuritySvrSession::GetList()
-
-@code
-//buffer is a TDesC8 containing 4-byte aligned TXipLibraryListEntry objects
-//create a pointer to the start of the data
-TUint8* ptr = (TUint8*)buffer.Ptr();
-//create a pointer to the end of the data
-const TUint8* ptrEnd = ptr + buffer.Length();
-while(ptr < ptrEnd)
-	{
-	//cast the pointer to be a TXipLibraryListEntry object
-	TXipLibraryListEntry& entry = *(TXipLibraryListEntry*)ptr;
-	//use the TXipLibraryListEntry pointer, i.e.
-	TUint16 nameLength = entry.iNameLength;
-	TPtr name(&(entry.iName[0]), nameLength, nameLength);
-	// move ptr on to point to the next TXipLibraryListEntry object
-	ptr += Align4(entry.GetSize());
-	}
-@endcode
-*/
-class TXipLibraryListEntry
-	{
-public:
-	TInt GetSize() const;
-public:
-	/**
-	  Address of the start of the library's code segment.
-	  */
-	TUint32 iCodeBase;
-	/**
-	  Size of the code segment.
-	  */
-	TUint32 iCodeSize;
-	/**
-	  Size of the const data segment
-	  */
-	TUint32 iConstDataSize;
-	/**
-	  Address of the initialised data
-	  */
-	TUint32 iInitialisedDataBase;
-	/**
-	  Size of the initialised data
-	  */
-	TUint32 iInitialisedDataSize;
-	/**
-	  Size of the uninitialised data
-	  */
-	TUint32 iUninitialisedDataSize;
-	/** Currently unused element. May be used in future to aid maintaining compatibility. */
-	TUint32 iSpare1;
-	/** Currently unused element. May be used in future to aid maintaining compatibility. */
-	TUint32 iSpare2;
-	/**
-	  Length of the library's name
-	  */
-	TUint16 iNameLength;
-	/**
-	  First two bytes of the code segment's name, the name should be considered to
-	  extend past the end of the TXipLibraryListEntry structure to a length
-	  corresponding to iNameLength
-	  */
-	TUint16 iName[1];
-	};
-
-/**
-Returns the size of the TXipLibraryListEntry, including the file name length
-
-@return the size, in bytes, of the TXipLibraryListEntry and the library's
-file name
-*/
-inline TInt TXipLibraryListEntry::GetSize() const
-	{
-	return sizeof(TXipLibraryListEntry) - sizeof(iName) + (2 * iNameLength);
-	}
-
-/**
-Structure used for extracting data from a descriptor returned by a call to
-RSecuritySvrSession::GetList() when GetList() is called with TListId::EExecutables
-as the first argument.
-
-@see RSecuritySvrSession::GetList()
-
-@code
-//buffer is a TDesC8 containing 4-byte aligned TExecutablesListEntry objects
-//create a pointer to the start of the data
-TUint8* ptr = (TUint8*)buffer.Ptr();
-//create a pointer to the end of the data
-const TUint8* ptrEnd = ptr + buffer.Length();
-while(ptr < ptrEnd)
-	{
-	//cast the pointer to be a TExecutablesListEntry object
-	TExecutablesListEntry& entry = *(TExecutablesListEntry*)ptr;
-	//use the TExecutablesListEntry pointer, i.e.
-	TUint16 nameLength = entry.iNameLength;
-	TPtr name(&(entry.iName[0]), nameLength, nameLength);
-	// move ptr on to point to the next TExecutablesListEntry object
-	ptr += Align4(entry.GetSize());
-	}
-@endcode
-*/
-class TExecutablesListEntry
-	{
-public:
-	TInt GetSize() const;
-public:
-	/**
-	  Indicates whether an agent has registered to actively debug the executable,
-	  a non-zero value indicates that an agent has attached.
-	  */
-	TUint8 iIsActivelyDebugged;
-	/**
-	  Indicates whether any agents have registered to passively debug the executable,
-	  a non-zero value indicates that at least one agent is attached passively
-	  */
-	TUint8 iIsPassivelyDebugged;
-	/** Currently unused element. May be used in future to aid maintaining compatibility. */
-	TUint32 iSpare1;
-	/** Currently unused element. May be used in future to aid maintaining compatibility. */
-	TUint32 iSpare2;
-	/**
-	  Length of the executable's name
-	  */
-	TUint16 iNameLength;
-	/**
-	  First two bytes of the executable's name, the name should be considered to
-	  extend past the end of the TExecutablesListEntry structure to a length
-	  corresponding to iNameLength
-	  */
-	TUint16 iName[1];
-	};
-
-/**
-Returns the size of the TExecutablesListEntry, including the file name length
-
-@return the size, in bytes, of the TExecutablesListEntry and the executable's
-file name
-*/
-inline TInt TExecutablesListEntry::GetSize() const
-	{
-	return sizeof(TExecutablesListEntry) - sizeof(iName) + (2*iNameLength);
-	}
-
-/**
-Structure used for extracting data from a descriptor returned by a call to
-RSecuritySvrSession::GetList() when GetList() is called with TListId::EProcesses
-as the first argument.
-
-@see RSecuritySvrSession::GetList()
-
-@code
-//buffer is a TDesC8 containing 4-byte aligned TProcessListEntry objects
-//create a pointer to the start of the data
-TUint8* ptr = (TUint8*)buffer.Ptr();
-//create a pointer to the end of the data
-const TUint8* ptrEnd = ptr + buffer.Length();
-while(ptr < ptrEnd)
-	{
-	//cast the pointer to be a TProcessListEntry object
-	TProcessListEntry& entry = *(TProcessListEntry*)ptr;
-	//use the TProcessListEntry pointer, i.e.
-	TUint16 fileNameLength = entry.iFileNameLength;
-	TPtr name(&(entry.iNames[0]), fileNameLength, fileNameLength);
-	// move ptr on to point to the next TProcessListEntry object
-	ptr += Align4(entry.GetSize());
-	}
-@endcode
-*/
-class TProcessListEntry
-	{
-	public:
-		TInt GetSize() const;
-
-	public:
-		/** Process ID */
-		TUint64 iProcessId;
-
-		/** The Uid3 of the process */
-		TUint32 iUid3;
-
-		/** 
-		 * Process Attributes
-		 * @see DProcess::TProcessAttributes
-		 */
-		TInt iAttributes;
-
-		/**
-		 * Length of fully qualified file name of the process in bytes. Note that this
-		 * entry may be 0 if the process is in the process of shutting down.
-		 */
-		TUint16 iFileNameLength;
-
-		/**
-		 * Length of current dynamic name of the process in bytes
-		 */
-		TUint16 iDynamicNameLength;
-
-		/**
-		 * First two bytes of the process' file name, the name should be considered to
-		 * extend past the end of the TProcessListEntry structure to a length
-		 * corresponding to iFileNameLength. Directly after the data corresponding to the
-		 * file name, the dynamic name is stored with a length of iDynamicNameLength characters.
-		 * Note that these names are not null terminated and are concatenated directly after each other.
-		 * 
-		 * @code
-		 * TProcessListEntry& entry; // entry is a reference to a TProcessListEntry
-		 *
-		 * //get the file name..
-		 * TPtr fileName(&(entry.iNames[0]), iFileNameLength, iFileNameLength);
-		 *
-		 * //get the dynamic name length..
-		 * TPtr dynamicName(&(entry.iNames[0]) + iFileNameLength, iDynamicNameLength, iDynamicNameLength);
-		 * @endcode
-		 */
-		TUint16 iNames[1];
-	};
-
-/**
-Returns the size of the TProcessListEntry, including the file name length and the
-dynamic name length
-
-@return the size, in bytes, of the TProcessListEntry and the executable's
-file name file name and dynamic name
-*/
-inline TInt TProcessListEntry::GetSize() const
-	{
-	return sizeof(TProcessListEntry) - sizeof(iNames) + (2 * (iFileNameLength + iDynamicNameLength));
-	}
-
-/**
-Structure used for extracting data from a descriptor returned by a call to
-RSecuritySvrSession::GetList() when GetList() is called with TListId::EThreads
-as the first argument.
-
-@see RSecuritySvrSession::GetList()
-
-@code
-//buffer is a TDesC8 containing 4-byte aligned TThreadListEntry objects
-//create a pointer to the start of the data
-TUint8* ptr = (TUint8*)buffer.Ptr();
-//create a pointer to the end of the data
-const TUint8* ptrEnd = ptr + buffer.Length();
-while(ptr < ptrEnd)
-	{
-	//cast the pointer to be a TThreadListEntry object
-	TThreadListEntry& entry = *(TThreadListEntry*)ptr;
-	//use the TThreadListEntry pointer, i.e.
-	TUint16 nameLength = entry.iNameLength;
-	TPtr name(&(entry.iName[0]), nameLength, nameLength);
-	// move ptr on to point to the next TThreadListEntry object
-	ptr += Align4(entry.GetSize());
-	}
-@endcode
-*/
-class TThreadListEntry
-	{
-public:
-	TInt GetSize() const;
-public:
-	/**
-	  Thread ID
-	  */
-	TUint64 iThreadId;
-	/**
-	  Process ID
-	  */
-	TUint64 iProcessId;
-	/**
-	  Address of the base of the supervisor stack
-	  */
-	TUint32 iSupervisorStackBase;
-	/**
-	  Size of the supervisor stack
-	  */
-	TUint32 iSupervisorStackSize;
-	/**
-	  Non-zero if iSupervisorStackBase has been set correctly
-	  */
-	TUint8 iSupervisorStackBaseValid;
-	/**
-	  Non-zero if iSupervisorStackSize has been set correctly
-	  */
-	TUint8 iSupervisorStackSizeValid;
-	/**
-	  Address of the thread's supervisor stack pointer
-	  */
-	TUint32 iSupervisorStackPtr;
-	/**
-	  Indicator of whether the value returned as iSupervisorStackPtr is valid.
-	  It is necessary, but not necessarily sufficient, that the thread be suspended
-	  for a valid value to be returned. This may be removed from the final API and
-	  the value would be extracted instead via the ReadRegisters type calls.
-	  */
-	TRegisterFlag iSupervisorStackPtrValid;
-	/** Currently unused element. May be used in future to aid maintaining compatibility. */
-	TUint32 iSpare1;
-	/** Currently unused element. May be used in future to aid maintaining compatibility. */
-	TUint32 iSpare2;
-	/**
-	  The length of the thread's name
-	  */
-	TUint16 iNameLength;
-	/**
-	  First two bytes of the thread's name, the name should be considered to
-	  extend past the end of the TThreadListEntry structure to a length
-	  corresponding to iNameLength
-	  */
-	TUint16 iName[1];
-	};
-
-/**
-Returns the size of the TThreadListEntry, including the name length
-
-@return the size, in bytes, of the TExecutablesListEntry and the thread's name
-*/
-inline TInt TThreadListEntry::GetSize() const
-	{
-	return sizeof(TThreadListEntry) - sizeof(iName) + (2 * iNameLength);
-	}
-
-/**
-Denotes which list type to return from a RSecuritySvrSession::GetList() call
-
-@see RSecuritySvrSession::GetList()
-*/
-enum TListId
-	{
-	/**
-	Indicates that the GetList() call should return a list of the processes in
-	the system. The returned buffer will contain an array of 4-byte aligned
-	TProcessListEntry objects.
-
-	@see TProcessListEntry
-	*/
-	EProcesses = 0,
-	/**
-	Indicates that the GetList() call should return a list of the threads in
-	the system. The returned buffer will contain an array of 4-byte aligned
-	TThreadListEntry objects.
-
-	@see TThreadListEntry
-	*/
-	EThreads = 1,
-	/**
-	Indicates that the GetList() call should return a list of the code segments in
-	the system. The returned buffer will contain an array of 4-byte aligned
-	TCodeSegListEntry objects.
-
-	@see TCodeSegListEntry
-	*/
-	ECodeSegs = 2,
-	/**
-	Indicates that the GetList() call should return a list of the XIP libraries in
-	the system. The returned buffer will contain an array of 4-byte aligned
-	EXipLibraries objects.
-
-	@see EXipLibraries
-	*/
-	EXipLibraries = 3,
-	/**
-	Indicates that the GetList() call should return a list of the executables in
-	the system. The returned buffer will contain an array of 4-byte aligned
-	EExecutables objects.
-
-	@see EExecutables
-	*/
-	EExecutables = 4,
-	/**
-	Indicates that the GetList() call should return a list of the logical devices in the system.
-	*/
-	ELogicalDevices = 5,
-	/**
-	Indicates that the GetList() call should return a list of the mutexes in the system.
-	*/
-	EMutexes = 6,
-	/**
-	Indicates that the GetList() call should return a list of the servers in the system.
-	*/
-	EServers = 7,
-	/**
-	Indicates that the GetList() call should return a list of the sessions in the system.
-	*/
-	ESessions = 8,
-	/**
-	Indicates that the GetList() call should return a list of the semaphores in the system.
-	*/
-	ESemaphores = 9,
-	/**
-	Indicates that the GetList() call should return a list of the chunks in the system.
-	*/
-	EChunks = 10,
-
-	/**
-	Provides a complete list of all the breakpoints in the system and their
-	current state.
-
-	@see EBreakpoints
-	*/
-	EBreakpoints = 11,
-
-	/** 
-	The following are for the possible use of kernel-side debug and SMP breakpoint
-	manipulation.
-	*/
-	ESetBreak = 12,
-	ERemoveBreak = 13,
-	EModifyBreak = 14,
-	
-	/**
-	 * Provides static information of the system
-	 */
-	EStaticInfo = 15,
-
-	/** Last listing enum. */
-	EListLast
-	};
-
-/**
-  Bit field values denoting the scope of a listing.
-
-  In the debug functionality block, the TTag::iValue element which is returned for a listing tag
-  should be considered as a union of the supported values from this enumeration for that listing.
-  */
-enum TListScope
-	{
-	EScopeNone = 0x0,             /**< Corresponds to no scope for a listing. equivalent to not supported */
-	EScopeGlobal= 0x1,            /**< Corresponds to a global scope for a listing. */
-	EScopeProcessSpecific = 0x2,  /**< Corresponds to a process specific scope for a listing. */
-	EScopeThreadSpecific = 0x4    /**< Corresponds to a thread specific scope for a listing. */
-	};
-
-/**
-@internalComponent
-
-Interface constructor for passing IPC data for the GetList call.
-*/
-class TListDetails
-	{
-public:
-	TListDetails(const TListId aListId, const TListScope aListScope, TUint64 aTargetId=0)
-		: iListId(aListId),
-		  iListScope(aListScope),
-		  iTargetId(aTargetId) {}
-public:
-	TListId iListId;
-	TListScope iListScope;
-	TUint64 iTargetId;
-	};
-
-/** Debug Security Server Secure ID */
-const TUid KUidDebugSecurityServer = { 0x102834E2 };
-
-} // end of Debug namespace declaration
-
-// the remaining functionality in this file is intended for use on user side only
-#ifndef __KERNEL_MODE__
-
-#include <e32std.h>
-
-// API definition for Debug namespace appears elsewhere in this file.
-namespace Debug {
-
-/** The name of the Debug Security Server. */
-_LIT(KSecurityServerName,"DebugSecurityServer");
-
-/** Wildcard used for attach all calls */
-_LIT(KStar, "*");
-
-// A version must be specified when creating a session with the server
-/** The Debug Security Server's major version number. */
-const TUint KDebugServMajorVersionNumber=2;
-/** The Debug Security Server's minor version number. */
-const TUint KDebugServMinorVersionNumber=5;
-/** The Debug Security Server's patch version number. */
-const TUint KDebugServPatchVersionNumber=0;
-
-/**
-Denotes how memory should be accessed
-*/
-enum TAccess
-	{
-	EAccess8 = 1,	/**< Currently unsupported, signifies 8 bit access. */
-	EAccess16 = 2,	/**< Currently unsupported, signifies 16 bit access. */
-	EAccess32 = 4	/**< Signifies 32 bit access. */
-	};
-
-/**
-Denotes how data should be interpreted
-*/
-enum TEndianess
-	{
-	EEndLE8 = 0,	/**< Signifies 8 bit little-endian. */
-	EEndBE8 = 1,	/**< Currently unsupported, signifies 8 bit big-endian. */
-	EEndBE32 = 2	/**< Currently unsupported, signifies 32 bit big-endian. */
-	};
-
-/**
-Structure used to store information about a memory operation
-
-@internalComponent
-*/
-class TMemoryInfo
-	{
-public:
-
-	TMemoryInfo(TUint32 aAddress=0, TUint32 aLength=0, TAccess aAccess=EAccess32, TEndianess aEndianess=EEndLE8)
-		: iAddress(aAddress),
-		  iSize(aLength),
-		  iAccess(aAccess),
-		  iEndianess(aEndianess)
-		{}
-
-public:
-
-	/**
-	Address to start reading/writing memory
-	*/
-	TUint32 iAddress;
-	/**
-	Number of bytes of memory to read/write
-	*/
-	TUint32	iSize;
-	/**
-	Access size for read/write
-	@see TAccess
-	*/
-	TAccess iAccess;
-	/**
-	Endianess to interpret data as
-	@see TEndianess
-	*/
-	TEndianess iEndianess;
-	};
-
-/**
-@internalComponent
-*/
-class TBreakInfo
-	{
-public:
-	TUint32 iAddress;
-	TArchitectureMode iArchitectureMode;
-	};
-
-/**
-@internalComponent
-
-Function codes (opcodes) used in message passing between client and server
-in this header file and what arguments should be passed with each of these
-*/
-enum TDebugServRqst
-	{
-	EDebugServOpen = 1,
-	EDebugServClose = 2,
-	EDebugServSuspendThread = 3,
-	EDebugServResumeThread = 4,
-	EDebugServReadMemory = 5,
-	EDebugServWriteMemory = 6,
-	EDebugServSetBreak = 7,
-	EDebugServClearBreak = 8,
-	EDebugServModifyBreak = 9,
-	EDebugServGetEvent = 10,
-	EDebugServCancelGetEvent = 11,
-	EDebugServAttachExecutable = 12,
-	EDebugServDetachExecutable = 13,
-	EDebugServGetDebugFunctionalityBufSize = 14,
-	EDebugServGetDebugFunctionality = 15,
-	EDebugServReadRegisters = 16,
-	EDebugServWriteRegisters = 17,
-	EDebugServSetEventAction = 18,
-	EDebugServBreakInfo = 19,
-	EDebugServGetList = 20,
-	EDebugServStep = 21,
-	EDebugServSetProcessBreak = 22,
-	EDebugServProcessBreakInfo = 23,
-	EDebugServKillProcess = 24,
-	EDebugServModifyProcessBreak = 25,
-	EDebugServReadCrashFlash = 26,
-	EDebugServWriteCrashFlash = 27,
-	EDebugServEraseCrashFlash = 28,
-	EDebugServEraseEntireCrashFlash = 29,
-	EDebugServAttachAll = 30,
-	EDebugServDetachAll = 31,
-	};
-
-/**
-Client side API to debug security server (DSS). Interaction with the DSS should
-be conducted through this class only.
-*/
-class RSecuritySvrSession : public RSessionBase
-	{
-public:
-	RSecuritySvrSession();
-	TVersion Version() const;
-
-	TInt AttachExecutable(const TDesC& aProcessName, TBool aPassive);
-	TInt DetachExecutable(const TDesC& aProcessName);
-
-	TInt GetDebugFunctionalityBufSize(TUint32* aBufSize);
-	TInt GetDebugFunctionality(TDes8& aBuffer);
-
-	TInt SuspendThread(const TThreadId aThreadId);
-	TInt ResumeThread(const TThreadId aThreadId);
-
-	TInt ReadMemory(const TThreadId aThreadId, const TUint32 aAddress, const TUint32 aLength, TDes8 &aData, const TAccess aAccessSize, const TEndianess aEndianess);
-	TInt WriteMemory(const TThreadId aThreadId, const TUint32 aAddress, const TUint32 aLength, const TDesC8 &aData, const TAccess aAccessSize, const TEndianess aEndianess);
-
-	TInt ReadRegisters(const TThreadId aThreadId, const TDesC8& aRegisterIds, TDes8& aRegisterValues, TDes8& aRegisterFlags);
-	TInt WriteRegisters(const TThreadId aThreadId, const TDesC8& aRegisterIds, const TDesC8& aRegisterValues, TDes8& aRegisterFlags);
-
-	void GetEvent(const TDesC& aExecutableName, TRequestStatus &aStatus, TDes8& aEventInfo);
-	TInt CancelGetEvent(const TDesC& aExecutableName);
-	
-	TInt SetEventAction(const TDesC& aExecutableName, TEventType aEvent, TKernelEventAction aEventAction);
-
-	TInt SetBreak( TBreakId &aId, const TThreadId aThreadId, const TUint32 aAddress, const TArchitectureMode aArchitectureMode);
-	TInt ClearBreak(const TBreakId aBreakId);
-	TInt ModifyBreak(const TBreakId aBreakId, const TThreadId aThreadId, const TUint32 aAddress, const TArchitectureMode aArchitectureMode);
-	TInt BreakInfo(const TBreakId aBreakId, TThreadId& aThreadId, TUint32& aAddress, TArchitectureMode& aMode);
-	TInt SetProcessBreak( TBreakId &aId, const TProcessId aProcessId, const TUint32 aAddress, const TArchitectureMode aArchitectureMode);
-	TInt ProcessBreakInfo(const TBreakId aBreakId, TProcessId& aProcessId, TUint32& aAddress, TArchitectureMode& aMode);
-	TInt ModifyProcessBreak(const TBreakId aBreakId, const TProcessId aProcessId, const TUint32 aAddress, const TArchitectureMode aArchitectureMode);
-
-	TInt GetList(const TListId aListId, TDes8& aListData, TUint32& aDataSize);
-	TInt GetList(const TThreadId aThreadId, const TListId aListId, TDes8& aListData, TUint32& aDataSize);
-	TInt GetList(const TProcessId aProcessId, const TListId aListId, TDes8& aListData, TUint32& aDataSize);
-	TInt Step(const TThreadId aThreadId, TUint32 aNumSteps);
-	TInt KillProcess(const TProcessId aProcessId, const TInt aReason);
-	TInt ReadCrashLog(const TUint32 aPos, TDes8& aData, const TUint32 aDataSize);	
-	TInt WriteCrashConfig(const TUint32 aPos, const TDesC8& aBuffer, TUint32& aSize);
-	TInt EraseCrashLog(const TUint32 aPos, const TUint32 aBlockNumber);
-	TInt EraseCrashFlashPartition();
-
-	TInt Connect(const TVersion aVersion);
-
-	// Added in version 2.5
-    TInt AttachAll();
-    TInt DetachAll();	
-    void GetEvent(TRequestStatus &aStatus, TDes8& aEventInfo);
-    TInt CancelGetEvent();
-    TInt SetEventAction(TEventType aEvent, TKernelEventAction aEventAction);
-
-private:
-	TInt StartServer(void);
-	};
-
-/**
-Server session constructor
-*/
-inline RSecuritySvrSession::RSecuritySvrSession()
-	{
-	}
-
-/**
-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.
-
-@param aVersion version of the DSS to connect to
-
-@return KErrNone if a connection was successfully created, or one of the other
-system wide error codes
-*/
-inline TInt RSecuritySvrSession::Connect(const TVersion aVersion)
-	{
-	// Default asynch outstanding message slots for the server. Not that these are 
-	// allocated from a system-wide pool of 255, so have to be careful with resources.
-	const TUint KDefaultMessageSlots = 8;
-	
-	TInt retry=2;
-	for (;;)
-		{
-		TInt r=CreateSession(KSecurityServerName, aVersion, KDefaultMessageSlots);
-		if (r!=KErrNotFound && r!=KErrServerTerminated)
-			{
-			return r;
-			}
-		if (--retry==0)
-			{
-			return r;
-			}
-		r=StartServer();
-		if (r!=KErrNone && r!=KErrAlreadyExists)
-			{
-			return r;
-			}
-		}
-	}
-
-/**
-  Start the server
-
-  @return KErrNone on success, or one of the other system wide error codes
-  */
-inline TInt RSecuritySvrSession::StartServer()
-	{
-	// constants for the server
-	_LIT(KSecurityServerProcessName, "rm_debug_svr");
-	const TUidType serverUid(KNullUid, KNullUid, KUidDebugSecurityServer);
-
-	RProcess server;
-	TInt err = server.Create(KSecurityServerProcessName, KNullDesC, serverUid);
-
-	if(KErrNone != err)
-		{
-		return err;
-		}
-
-	// Synchronise with the process to make sure it hasn't died straight away
-	TRequestStatus stat;
-	server.Rendezvous(stat);
-	if (stat != KRequestPending)
-		{
-		// logon failed - server is not yet running, so cannot have terminated
-		server.Kill(0);             // Abort startup
-		}
-	else
-		{
-		// logon OK - start the server
-		server.Resume();
-		}
-
-	// Wait to synchronise with server - if it dies in the meantime, it
-	// also gets completed
-	User::WaitForRequest(stat);
-
-	// We can't use the 'exit reason' if the server panicked as this
-	// is the panic 'reason' and may be '0' which cannot be distinguished
-	// from KErrNone
-	err = (server.ExitType()==EExitPanic) ? KErrGeneral : stat.Int();
-	server.Close();
-	return err;
-	}
-
-/**
-Get version of RSecuritySvrSession
-
-@return a TVersion object specifying the version
-*/
-inline TVersion RSecuritySvrSession::Version(void) const
-	{
-	return (TVersion(KDebugServMajorVersionNumber, KDebugServMinorVersionNumber, KDebugServPatchVersionNumber));
-	}
-
-/**
-Suspends execution of the specified thread.
-
-@param aThreadId thread ID of the thread to suspend
-
-@return KErrNone if there were no problems, KErrPermissionDenied if security 
-        check fails or KErrArgument if the thread does not exist
-*/
-inline TInt RSecuritySvrSession::SuspendThread(const TThreadId aThreadId)
-	{
-	TPckgBuf<TThreadId> threadIdPckg(aThreadId);
-	TIpcArgs args(&threadIdPckg);
-
-	return SendReceive(EDebugServSuspendThread, args);
-	}
-
-/**
-Resumes execution of the specified thread.
-
-@param aThreadId thread ID of the thread to resume
-
-@return KErrNone if there were no problems, KErrPermissionDenied if security 
-        check fails or KErrArgument if the thread does not exist
-*/
-inline TInt RSecuritySvrSession::ResumeThread(const TThreadId aThreadId)
-	{
-	TPckgBuf<TThreadId> threadIdPckg(aThreadId);
-	TIpcArgs args(&threadIdPckg);
-
-	return SendReceive(EDebugServResumeThread, args);
-	}
-
-/**
-Purpose:
-Set a thread-specific breakpoint in an attached process. 
-
-@pre Debug Agent must be connected to the debug security server
-@pre Debug Agent must be attached to a process.
-
-@param aThreadId The thread id to which the breakpoint will apply.
-@param aAddress The virtual memory address at which to place the breakpoint.
-@param aArchitectureMode The kind of breakpoint which is to be set (e.g. ARM/Thumb/Thumb2EE)
-@param aBreakId The address to which the assigned breakpoint ID will be written by this function
-@return Any error which may be returned by RSessionBase::SendReceive()
-*/
-inline TInt RSecuritySvrSession::SetBreak( TBreakId &aBreakId,const TThreadId aThreadId, const TUint32 aAddress, const TArchitectureMode aArchitectureMode)
-	{
-	TPtr8 breakIdPtr((TUint8*)&aBreakId, sizeof(aBreakId));
-
-	TPckgBuf<TThreadId> threadIdPckg(aThreadId);
-
-	TBreakInfo breakInfo;
-	breakInfo.iAddress = aAddress;
-	breakInfo.iArchitectureMode = aArchitectureMode;
-	TPckgBuf<TBreakInfo> breakInfoPckg(breakInfo);
-
-	//call driver to attempt to set break
-	TIpcArgs args(&threadIdPckg, &breakInfoPckg, &breakIdPtr);
-	return SendReceive(EDebugServSetBreak, args);
-	}
-
-/**
-Purpose:
-Clears a previously set thread-specific or process-specific breakpoint.
-
-@pre Debug Agent must be connected to the debug security server
-@pre Debug Agent must be attached to a process.
-
-@param aBreakId The TBreakId returned by a prior SetBreak call. Must have been set by the same Debug Agent.
-@return Any error which may be returned by RSessionBase::SendReceive()
-*/
-inline TInt RSecuritySvrSession::ClearBreak(const TBreakId aBreakId)
-	{
-	TIpcArgs args(aBreakId);
-	return SendReceive(EDebugServClearBreak, args);
-	}
-
-/**
-Purpose:
-Modifies the properties of a previously set breakpoint.
-
-@pre Debug Agent must be connected to the debug security server
-@pre Debug Agent must be attached to a process.
-
-@param aBreakId the TBreakId returned by a prior SetBreak() call. Must have been set by the same Debug Agent.
-@param aThreadId the thread id of the thread to move the breakpoint to
-@param aAddress the virtual memory address at which to place the breakpoint.
-@param aArchitectureMode the kind of breakpoint which is to be set (e.g. ARM/Thumb/Thumb2EE)
-@return Any error which may be returned by RSessionBase::SendReceive()
-*/
-inline TInt RSecuritySvrSession::ModifyBreak(const TBreakId aBreakId, const TThreadId aThreadId, const TUint32 aAddress, const TArchitectureMode aArchitectureMode)
-
-	{
-	TPckgBuf<TThreadId> threadIdPckg(aThreadId);
-	TIpcArgs args(aBreakId,&threadIdPckg,aAddress,aArchitectureMode);
-	return SendReceive(EDebugServModifyBreak, args);
-	}
-
-/**
-Purpose:
-Modifies the properties of a previously set process breakpoint.
-
-@pre Debug Agent must be connected to the debug security server
-@pre Debug Agent must be attached to a process.
-
-@param aBreakId the TBreakId returned by a prior SetBreak() call. Must have been set by the same Debug Agent.
-@param aProcessId the process id of the process to move the breakpoint to
-@param aAddress the virtual memory address at which to place the breakpoint.
-@param aArchitectureMode the kind of breakpoint which is to be set (e.g. ARM/Thumb/Thumb2EE)
-@return Any error which may be returned by RSessionBase::SendReceive()
-*/
-inline TInt RSecuritySvrSession::ModifyProcessBreak(const TBreakId aBreakId, const TProcessId aProcessId, const TUint32 aAddress, const TArchitectureMode aArchitectureMode)
-
-	{
-	TPckgBuf<TProcessId> processIdPckg(aProcessId);
-	TIpcArgs args(aBreakId,&processIdPckg,aAddress,aArchitectureMode);
-	return SendReceive(EDebugServModifyProcessBreak, args);
-	}
-
-/**
-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 Debug Agent must be connected to the debug security server
-@pre Debug Agent must be attached to a process.
-@pre The aBreakId must have been previously returned by a SetBreak() call and not subsequently cleared by ClearBreak().
-
-@param aBreakId the TBreakId returned by a prior SetBreak() call. Must have been set by the same Debug Agent.
-@param aAddress on return contains the virtual memory address of the breakpoint
-@param aThreadId on return contains the thread id of the thread that the breakpoint is set in
-@param aMode on return contains the type of this breakpoint (e.g. ARM/Thumb/Thumb2EE)
-@return Any error which may be returned by RSessionBase::SendReceive()
-*/
-inline TInt RSecuritySvrSession::BreakInfo(const TBreakId aBreakId, TThreadId& aThreadId, TUint32& aAddress, TArchitectureMode& aMode)
-	{
-	// temporary descriptors
-	TPtr8 threadId((TUint8*)&aThreadId,0,sizeof(TThreadId));
-	TPtr8 address((TUint8*)&aAddress,0,sizeof(TUint32));
-	TPtr8 mode((TUint8*)&aMode,0,sizeof(TArchitectureMode));
-
-	TIpcArgs args(aBreakId,&threadId,&address,&mode);
-	return SendReceive(EDebugServBreakInfo, args);
-	}
-
-/**
-Purpose:
-Set a process-specific breakpoint in an attached process. 
-
-@pre Debug Agent must be connected to the debug security server
-@pre Debug Agent must be attached to a process.
-
-@param aProcessId The process id to which the breakpoint will apply.
-@param aAddress The virtual memory address at which to place the breakpoint.
-@param aArchitectureMode The kind of breakpoint which is to be set (e.g. ARM/Thumb/Thumb2EE)
-@param aBreakId The address to which the assigned breakpoint ID will be written by this function
-@return Any error which may be returned by RSessionBase::SendReceive()
-*/
-inline TInt RSecuritySvrSession::SetProcessBreak( TBreakId &aBreakId, const TProcessId aProcessId, const TUint32 aAddress, const TArchitectureMode aArchitectureMode)
-	{
-	TPtr8 breakIdPtr((TUint8*)&aBreakId, sizeof(aBreakId));
-
-	TPckgBuf<TProcessId> threadIdPckg(aProcessId);
-
-	TBreakInfo breakInfo;
-	breakInfo.iAddress = aAddress;
-	breakInfo.iArchitectureMode = aArchitectureMode;
-	TPckgBuf<TBreakInfo> breakInfoPckg(breakInfo);
-
-	//call driver to attempt to set break
-	TIpcArgs args(&threadIdPckg, &breakInfoPckg, &breakIdPtr);
-	return SendReceive(EDebugServSetProcessBreak, args);
-	}
-
-/**
-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 Debug Agent must be connected to the debug security server
-@pre Debug Agent must be attached to a process.
-@pre The aBreakId must have been previously returned by a SetProcessBreak() call and not subsequently cleared by ClearBreak().
-
-@param aBreakId the TBreakId returned by a prior SetBreak() call. Must have been set by the same Debug Agent.
-@param aAddress on return contains the virtual memory address of the breakpoint
-@param aThreadId on return contains the thread id of the thread that the breakpoint is set in
-@param aMode on return contains the type of this breakpoint (e.g. ARM/Thumb/Thumb2EE)
-@return Any error which may be returned by RSessionBase::SendReceive()
-*/
-inline TInt RSecuritySvrSession::ProcessBreakInfo(const TBreakId aBreakId, TProcessId& aProcessId, TUint32& aAddress, TArchitectureMode& aMode)
-	{
-	// temporary descriptors
-	TPtr8 processId((TUint8*)&aProcessId,0,sizeof(TProcessId));
-	TPtr8 address((TUint8*)&aAddress,0,sizeof(TUint32));
-	TPtr8 mode((TUint8*)&aMode,0,sizeof(TArchitectureMode));
-
-	TIpcArgs args(aBreakId,&processId,&address,&mode);
-	return SendReceive(EDebugServProcessBreakInfo, args);
-	}
-
-/**
-Purpose:
-Wait for an event to occur to the target executable being debugged. When an event
-occurs, the TRequestStatus is completed.
-
-@pre Debug Agent must be connected to the debug security server
-@pre 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 the request is completed. 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: Errors are signalled by completing aStatus
-
-@param aExecutableName The name of any executable to which the Debug Agent is attached.
-@param aStatus Debug Agent request status variable.
-@param aEventInfo Descriptor containing a TEventInfo object. 
-
-*/
-inline void RSecuritySvrSession::GetEvent(const TDesC& aExecutableName, TRequestStatus &aStatus, TDes8& aEventInfo)
-	{
-	TIpcArgs args(&aExecutableName, &aEventInfo);
-
-	SendReceive(EDebugServGetEvent, args, aStatus );
-
-	}
- 
-/**
-Purpose:
-Cancel a previously issued asynchronous RSecuritySvrSession::GetEvent call.
-
-@pre Debug Agent must be connected to the debug security server
-@pre Debug Agent should have called AttachExecutable and GetEvent for the same executable
-
-@param aExecutableName The name of the executable being debugged.
-@return Any error which may be returned by RSessionBase::SendReceive()
-*/
-inline TInt RSecuritySvrSession::CancelGetEvent(const TDesC& aExecutableName)
-{
-	TIpcArgs args(&aExecutableName);
-
-	return SendReceive(EDebugServCancelGetEvent,args);
-}
-
-
-/**
-Purpose:
-Wait for an event to occur from any process. When an event
-occurs, the TRequestStatus is completed.
-
-@pre Debug Agent must be connected to the debug security server
-@pre Debug Agent must have called AttachAll.
-
-Note 1: Events are reported on a FIFO basis
-
-Note 2: All the parameters must remain in scope until either CancelGetEvent is called, or
-until the request is completed. 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: Errors are signalled by completing aStatus
-
-@param aStatus Debug Agent request status variable.
-@param aEventInfo Descriptor containing a TEventInfo object.
-
-*/
-inline void RSecuritySvrSession::GetEvent(TRequestStatus &aStatus, TDes8& aEventInfo)
-    {
-	TIpcArgs args(&KStar, &aEventInfo);
-
-    SendReceive(EDebugServGetEvent, args, aStatus );
-    }
- 
-/**
-Purpose:
-Cancel a previously issued asynchronous RSecuritySvrSession::GetEvent call.
-
-@pre Debug Agent must be connected to the debug security server
-@pre Debug Agent should have called AttachAll and GetEvent
-
-@return Any error which may be returned by RSessionBase::SendReceive()
-*/
-inline TInt RSecuritySvrSession::CancelGetEvent()
-    {
-    TIpcArgs args(&KStar);
-
-    return SendReceive(EDebugServCancelGetEvent,args);
-    }
-
-
-/**
-Called by a debug agent to request debug privileges for the executable with
-file name aExecutableName.
-
-@param aExecutableName a fully qualified file name of the executable to attach to
-@param aPassive if true then the agent has reduced debug rights.
-
-@return KErrNone if attached successfully, one of the other system wide error
-	codes otherwise
-*/
-inline TInt RSecuritySvrSession::AttachExecutable(const TDesC& aExecutableName, TBool aPassive)
-	{
-	TIpcArgs args((TInt)aPassive, &aExecutableName);
-	return SendReceive(EDebugServAttachExecutable, args);
-	}
-
-/**
-Called by a debug agent to detach from the executable with file
-name aExecutableName.
-
-@param aExecutableName the fully qualified file name of the executable to detach from
-
-@return KErrNone if detached successfully, one of the other system wide error
-	codes otherwise
-*/
-inline TInt RSecuritySvrSession::DetachExecutable(const TDesC& aExecutableName)
-	{
-	TIpcArgs args(&aExecutableName);
-	return SendReceive(EDebugServDetachExecutable, args);
-	}
-
-/**
-Called by a debug agent to attach to events from all processes
-
-@return KErrNone if attached successfully, one of the other system wide error
-    codes otherwise
-*/
-inline TInt RSecuritySvrSession::AttachAll()
-    {
-    return SendReceive(EDebugServAttachAll);
-    }
-
-/**
-Called by a debug agent to detach from all events from all processes
-
-@return KErrNone if detached successfully, one of the other system wide error
-    codes otherwise
-*/
-inline TInt RSecuritySvrSession::DetachAll()
-    {
-    return SendReceive(EDebugServDetachAll);
-    }
-
-/**
-Get buffer size required to contain Functionality text block.
-
-@see in-source documentation in rm_debug_api.h
-
-@param aBufSize function will fill this with the required buffer size
-
-@return KErrNone if the call succeeded, or one of the other system wide error
-        codes if the call failed
-*/
-inline TInt RSecuritySvrSession::GetDebugFunctionalityBufSize(TUint32 *aBufSize)
-	{	
-	TInt res = KErrNone;
-
-	TPtr8 stuff((TUint8*)aBufSize,4, 4);
-
-	TIpcArgs args(&stuff);
-
-	res = SendReceive(EDebugServGetDebugFunctionalityBufSize, args);
-	
-	return res;
-	}
-
-/**
-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:
-
-@code
-Sub-block 0
-Sub-block 1
-...
-Sub-block N-1
-@endcode
-
-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:
-
-@code
-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	/
-@endcode
-
-The following example DFBlock contains two sub-blocks (values taken from enums below):
-- ETagHeaderIdCore
-- ETagHeaderIdMemory
-
-@code
-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
-@endcode
-
-- 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 aBuffer.MaxLength() >= *aBufSize where aBufSize is set by a call to: 
-     RSecuritySvrSession::GetDebugFunctionalityBufSize(TUint32 *aBufSize)
-
-@param aBuffer buffer to store functionality block in
-
-@return KErrNone if call succeeded, 
-        KErrNoMemory if temporary memory could not be allocated, 
-        KErrGeneral if debug functionality block could not be accessed
-*/
-inline TInt RSecuritySvrSession::GetDebugFunctionality(TDes8& aBuffer)
-	{
-	TIpcArgs args(&aBuffer);
-
-	TInt res = KErrNone;
-
-	res = SendReceive(EDebugServGetDebugFunctionality, args);
-
-	return res;
-	}
-
-/**
-Read a block of memory from the target debug thread defined by aThreadId.
-
-@pre the client should attach to the process containing the target thread
-@pre aData.MaxLength() >= aLength
-
-@param aThreadId thread ID of the thread to read memory from
-@param aAddress address to start reading memory from
-@param aLength number of bytes of memory to read
-@param aData descriptor to read memory into
-@param aAccessSize access size for memory reads, default is TAccess::EAccess32
-@param aEndianess interpretation of endianess of target data, default is
-       TEndianess::EEndLE8
-
-@return KErrNone if memory read successfully, or one of the other system wide error codes
-*/
-inline TInt RSecuritySvrSession::ReadMemory(const TThreadId aThreadId, const TUint32 aAddress, const TUint32 aLength, TDes8 &aData, const TAccess aAccessSize, const TEndianess aEndianess)
-	{
-	TPckgBuf<TThreadId> threadIdPckg(aThreadId);
-	//set up memory info object
-	TMemoryInfo memoryInfo;
-	memoryInfo.iAddress = aAddress;
-	memoryInfo.iSize = aLength;
-	memoryInfo.iAccess = aAccessSize;
-	memoryInfo.iEndianess = aEndianess;
-
-	TPckgBuf<TMemoryInfo> pckg(memoryInfo);
-
-	TIpcArgs args(&threadIdPckg, &pckg, &aData);
-
-	return SendReceive(EDebugServReadMemory, args);
-	}
-
-/**
-Write a block of memory to the target debug thread defined by aThreadId.
-
-@pre the client should attach non-passively to the process containing the
-     target thread
-
-@param aThreadId thread ID of the thread to write memory to
-@param aAddress address to start writing memory at
-@param aLength number of bytes of memory to write
-@param aData descriptor to read memory from
-@param aAccessSize access size for memory writes, default is TAccess::EAccess32
-@param aEndianess interpretation of endianess of target data, default is
-       TEndianess::EEndLE8
-
-@return KErrNone if memory written successfully, or one of the other system wide error codes
-*/
-inline TInt RSecuritySvrSession::WriteMemory(const TThreadId aThreadId, const TUint32 aAddress, const TUint32 aLength, const TDesC8 &aData, const TAccess aAccessSize, const TEndianess aEndianess)
-	{
-	TPckgBuf<TThreadId> threadIdPckg(aThreadId);
-	//create memory info object
-	TMemoryInfo memoryInfo;
-	memoryInfo.iAddress = aAddress;
-	memoryInfo.iSize = aLength;
-	memoryInfo.iAccess = aAccessSize;
-	memoryInfo.iEndianess = aEndianess;
-
-	TPckgBuf<TMemoryInfo> pckg(memoryInfo);
-
-	TIpcArgs args(&threadIdPckg, &pckg, &aData);
-
-	return SendReceive(EDebugServWriteMemory, args);
-	}
-
-/**
-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 the client should attach to the process containing the target thread
-
-@see the register ID format is defined in: 
-     SGL.TS0028.027 - Symbian Core Dump File Format v1.0.doc
-
-@param aThreadId thread ID of the thread to read register values from
-@param aRegisterIds descriptor containing array of TFunctionalityRegister defined 
-       register IDs
-@param aRegisterValues descriptor to contain register values
-@param aRegisterFlags descriptor containing array of TUint8 flags, with values 
-       taken from TRegisterFlag
-
-@return KErrNone if registers were read successfully, or one of the other system wide error codes
-*/
-inline TInt RSecuritySvrSession::ReadRegisters(const TThreadId aThreadId, const TDesC8& aRegisterIds, TDes8& aRegisterValues, TDes8& aRegisterFlags)
-	{
-	TPckgBuf<TThreadId> threadIdPckg(aThreadId);
-	TIpcArgs args(&threadIdPckg, &aRegisterIds, &aRegisterValues, &aRegisterFlags);
-
-	return SendReceive(EDebugServReadRegisters, args);
-	}
-
-/**
-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 the client should attach non-passively to the process containing the 
-     target thread
-
-@see the register ID format is defined in: 
-     SGL.TS0028.027 - Symbian Core Dump File Format v1.0.doc
-
-@param aThreadId thread ID of the thread to write register values to
-@param aRegisterIds descriptor containing array of TFunctionalityRegister defined 
-       register IDs
-@param aRegisterValues descriptor containing array of register values
-@param aRegisterFlags descriptor containing array of TUint8 flags, with values 
-       taken from TRegisterFlag
-
-@return KErrNone if registers were written successfully, or one of the other system wide error codes
-*/
-inline TInt RSecuritySvrSession::WriteRegisters(const TThreadId aThreadId, const TDesC8& aRegisterIds, const TDesC8& aRegisterValues, TDes8& aRegisterFlags)
-	{
-	TPckgBuf<TThreadId> threadIdPckg(aThreadId);
-	TIpcArgs args(&threadIdPckg, &aRegisterIds, &aRegisterValues, &aRegisterFlags);
-
-	return SendReceive(EDebugServWriteRegisters, args);
-	}
-
-/**
-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 Debug Agent must be connected to the debug security server
-@pre 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.
-
-@param aExecutableName The name of the executable to which the Debug Agent is attached.
-@param aEvent A TEventType enum defined in rm_debug_api.h:Debug::TEventType
-@param aEventAction Any TKernelEventAction permitted by the DFBlock.
-@return Any error which may be returned by RSessionBase::SendReceive()
-*/
-inline TInt RSecuritySvrSession::SetEventAction(const TDesC& aExecutableName, TEventType aEvent, TKernelEventAction aEventAction)
-{
-	TInt res = KErrNone;
-
-	TIpcArgs args(&aExecutableName,aEvent,aEventAction);
-
-	res = SendReceive(EDebugServSetEventAction, args);
-	
-	return res;
-}
- 
-/**
-Purpose:
-Set the requisite actions to be taken when a particular event occurs that is not 
-associated with any particular process or executable.
-
-The events are defined in Debug::TEventType and the
-actions are defined in Debug::TKernelEventAction.
-
-The default action for all events is EActionIgnore.
-
-@pre Debug Agent must be connected to the debug security server
-@pre Debug Agent must have called AttachAll.
-
-@param aEvent A TEventType enum defined in rm_debug_api.h:Debug::TEventType
-@param aEventAction Any TKernelEventAction permitted by the DFBlock.
-@return Any error which may be returned by RSessionBase::SendReceive()
-*/
-inline TInt RSecuritySvrSession::SetEventAction(TEventType aEvent, TKernelEventAction aEventAction)
-    {
-    TInt res = KErrNone;
-
-    TIpcArgs args(&KStar, aEvent, aEventAction);
-
-    res = SendReceive(EDebugServSetEventAction, args);
-
-    return res;
-    }
-
-/**
-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.
-
-@see TListId
-
-@param aListId enum from TListId signifying which type of listing to return
-@param aListData buffer provided by the debug agent in which data can be returned by the debug system
-@param 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
-
-@return KErrNone if data was returned successfully,
-        KErrTooBig if aListData is too small to hold the data,
-	one of the other system-wide error codes
-*/
-inline TInt RSecuritySvrSession::GetList(const TListId aListId, TDes8& aListData, TUint32& aDataSize)
-	{
-	//second argument of ETrue implies a global listing
-	TListDetails info(aListId, EScopeGlobal);
-	TPtr8 infoBuf((TUint8*)&info, sizeof(TListDetails), sizeof(TListDetails));
-	TPtr8 dataSizeBuf((TUint8*)&aDataSize, sizeof(TUint32), sizeof(TUint32));
-	TIpcArgs args(&infoBuf, &aListData, &dataSizeBuf);
-	return SendReceive(EDebugServGetList, args);
-	}
-
-/**
-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.
-
-@see TListId
-
-@param aThreadId thread to return the listing for
-@param aListId member of TListId signifying which type of listing to return
-@param aListData buffer provided by the debug agent in which data can be returned by the debug system.
-@param 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
-
-@return KErrNone if data was returned successfully,
-        KErrTooBig if aListData is too small to hold the data,
-	one of the other system-wide error codes
-*/
-inline TInt RSecuritySvrSession::GetList(const TThreadId aThreadId, const TListId aListId, TDes8& aListData, TUint32& aDataSize)
-	{
-	TListDetails info(aListId, EScopeThreadSpecific, aThreadId.Id());
-	TPtr8 infoBuf((TUint8*)&info, sizeof(TListDetails), sizeof(TListDetails));
-	TPtr8 dataSizeBuf((TUint8*)&aDataSize, sizeof(TUint32), sizeof(TUint32));
-	TIpcArgs args(&infoBuf, &aListData, &dataSizeBuf);
-	return SendReceive(EDebugServGetList, args);
-	}
-
-/**
-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.
-
-@see TListId
-
-@param aProcessId process to return the listing for
-@param aListId member of TListId signifying which type of listing to return
-@param aListData buffer provided by the debug agent in which data can be returned by the debug system.
-@param 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
-
-@return KErrNone if data was returned successfully,
-        KErrTooBig if aListData is too small to hold the data,
-	one of the other system-wide error codes
-*/
-inline TInt RSecuritySvrSession::GetList(const TProcessId aProcessId, const TListId aListId, TDes8& aListData, TUint32& aDataSize)
-	{
-	TListDetails info(aListId, EScopeProcessSpecific, aProcessId.Id());
-	TPtr8 infoBuf((TUint8*)&info, sizeof(TListDetails), sizeof(TListDetails));
-	TPtr8 dataSizeBuf((TUint8*)&aDataSize, sizeof(TUint32), sizeof(TUint32));
-	TIpcArgs args(&infoBuf, &aListData, &dataSizeBuf);
-	return SendReceive(EDebugServGetList, args);
-	}
-
-/**
-Purpose:
-Step one or more CPU instructions in the specified thread from the current PC.
-
-@pre Debug Agent must be connected to the debug security server
-@pre Debug Agent must be attached to a process.
-@pre The thread being stepped must be suspended by the Debug Agent.
-
-@param aThreadId the id of the thread which is to be stepped
-@param aNumSteps how many machine-level instructions are to be stepped.
-@return Any error which may be returned by RSessionBase::SendReceive()
-*/
-inline TInt RSecuritySvrSession::Step(const TThreadId aThreadId, const TUint32 aNumSteps)
-	{
-	TPckgBuf<TThreadId> threadIdPckg(aThreadId);
-	TInt res = KErrNone;
-
-	TIpcArgs args(&threadIdPckg,aNumSteps);
-
-	res = SendReceive(EDebugServStep,args);
-
-	return res;
-	}
-
-/**
-Purpose:
-Kill the specified process with the supplied reason. Reason codes are equivalent
-to those in RProcess.Kill().
-
-@pre Debug Agent must be connected to the debug security server
-@pre Debug Agent must be attached to a process.
-
-@param aProcessId the id of the process which is to be killed
-@param aReason The reason to be associated with the ending of this process
-@return Any error which may be returned by RSessionBase::SendReceive()
-*/
-inline TInt RSecuritySvrSession::KillProcess(const TProcessId aProcessId, const TInt aReason)
-	{
-	TPckgBuf<TProcessId> processIdPckg(aProcessId);
-	TInt res = KErrNone;
-
-	TIpcArgs args(&processIdPckg,aReason);
-
-	res = SendReceive(EDebugServKillProcess,args);
-
-	return res;
-	}
-
-/**
-Purpose
-Method to read data from the crash flash
-
-@pre aData buffer to retrieve the data from the crash flash
-@pre aDataSize Size of the data
-
-@return Any error which may be returned by RSessionBase::SendReceive()
-*/
-inline TInt RSecuritySvrSession::ReadCrashLog(const TUint32 aPos, TDes8& aData, const TUint32 aDataSize)
-	{		
-		TIpcArgs args(aPos, &aData, aDataSize);		
-		TInt res = SendReceive(EDebugServReadCrashFlash,args);
-		return res;
-	}
-
-/**
- * @internalTechnology
- * @prototype
- * 
-Purpose:
-Method to write the crash flash config
-
-@return Any error which may be returned by RSessionBase::SendReceive()
-*/
-inline TInt RSecuritySvrSession::WriteCrashConfig(const TUint32 aPos, const TDesC8& aBuffer, TUint32& aSize)
-	{
-		TPtr8 sizePtr((TUint8*)&aSize,4, 4);
-		TIpcArgs args(aPos, &aBuffer, &sizePtr);
-		TInt res = SendReceive(EDebugServWriteCrashFlash, args);
-		return res;
-	}
-/**
-Purpose:
-Method to erase a block in the crash flash
-
-@return Any error which may be returned by RSessionBase::SendReceive()
-*/
-inline TInt RSecuritySvrSession::EraseCrashLog(const TUint32 aPos, const TUint32 aBlockNumber)
-	{	
-		TIpcArgs args(aPos, aBlockNumber);
-		TInt res = SendReceive(EDebugServEraseCrashFlash, args);
-		return res;
-	}
-
-/**
-Purpose:
-Method to erase entire flash partition
-
-@return Any error which may be returned by RSessionBase::SendReceive()
-*/
-inline TInt RSecuritySvrSession::EraseCrashFlashPartition()
-	{
-	TInt res = SendReceive(EDebugServEraseEntireCrashFlash);
-	return res;
-	}
-
-} // end of Debug namespace declaration
-
-#endif // #ifndef __KERNEL_MODE__
-
-#endif // RM_DEBUG_API_H
-
-
-
--- a/debugsrv/runmodedebug/securityserver/inc/rm_debug_logging.h	Wed Sep 29 17:45:35 2010 +0300
+++ b/debugsrv/runmodedebug/securityserver/inc/rm_debug_logging.h	Fri Oct 08 14:56:39 2010 +0300
@@ -1,7 +1,7 @@
 // Copyright (c) 2006-2009 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"
+// under the terms of "Eclipse Public License v1.0"
 // which accompanies this distribution, and is available
 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
 //
--- a/debugsrv/runmodedebug/securityserver/src/c_process_pair.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ b/debugsrv/runmodedebug/securityserver/src/c_process_pair.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -1,7 +1,7 @@
 // Copyright (c) 2006-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"
+// under the terms of "Eclipse Public License v1.0"
 // which accompanies this distribution, and is available
 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
 //
--- a/debugsrv/runmodedebug/securityserver/src/c_security_svr_async.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ b/debugsrv/runmodedebug/securityserver/src/c_security_svr_async.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -1,7 +1,7 @@
 // Copyright (c) 2006-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"
+// under the terms of "Eclipse Public License v1.0"
 // which accompanies this distribution, and is available
 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
 //
--- a/debugsrv/runmodedebug/securityserver/src/c_security_svr_server.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ b/debugsrv/runmodedebug/securityserver/src/c_security_svr_server.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -1,7 +1,7 @@
 // Copyright (c) 2006-2009 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"
+// under the terms of "Eclipse Public License v1.0"
 // which accompanies this distribution, and is available
 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
 //
@@ -15,12 +15,6 @@
 // 
 //
 
-/**
- @file
- @internalTechnology
- @released
-*/
-
 #include <e32base.h>
 #include <e32base_private.h>
 #include <rm_debug_api.h>
--- a/debugsrv/runmodedebug/securityserver/src/c_security_svr_session.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ b/debugsrv/runmodedebug/securityserver/src/c_security_svr_session.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -1,7 +1,7 @@
 // Copyright (c) 2006-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"
+// under the terms of "Eclipse Public License v1.0"
 // which accompanies this distribution, and is available
 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
 //
@@ -15,18 +15,12 @@
 // 
 //
 
-/**
- @file
- @internalTechnology
- @released
-*/
 
 // Needed so we get the text strings for capabilities
 #define __INCLUDE_CAPABILITY_NAMES__
 
 #include <e32std.h>
 #include <e32std_private.h>
-#include <e32btrace.h>
 #include <d32btrace.h>
 #include <e32base.h>
 #include <e32base_private.h>
@@ -597,7 +591,6 @@
 	}
 
 /**
-@internalTechnology
 
 Notes: This call is used to set a thread specific breakpoint. Its input arguments
 are the thread id, address and architecture type of the breakpoint. It returns success
@@ -729,7 +722,6 @@
 	}
 
 /**
-@internalTechnology
 
 Modify a previously set breakpoint.
 
@@ -778,7 +770,6 @@
 	}
 
 /**
-@internalTechnology
 
 Notes: This call is used to set a process wide breakpoint. Its input arguments
 are the process id, address and architecture type of the breakpoint. It returns success
@@ -827,7 +818,6 @@
 	}
 
 /**
-@internalTechnology
 
 Modify a previously set process breakpoint.
 
@@ -1267,7 +1257,7 @@
 
 	CleanupClosePushL(debugAgentProcess);
 
-	debugAgentProcess.Open(iDebugAgentProcessId);
+	User::LeaveIfError(debugAgentProcess.Open(iDebugAgentProcessId));
 
 	// We have now obtained a process handle based on the token executable, so we can check its security properties.
 	TSecurityInfo secInfo(debugAgentProcess);
--- a/debugsrv/runmodedebug/securityserver/src/c_shutdown_timer.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ b/debugsrv/runmodedebug/securityserver/src/c_shutdown_timer.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -1,7 +1,7 @@
 // Copyright (c) 2007-2009 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"
+// under the terms of "Eclipse Public License v1.0"
 // which accompanies this distribution, and is available
 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
 //
@@ -15,12 +15,6 @@
 // 
 //
 
-/**
- @file
- @internalTechnology
- @released
-*/
-
 #include <rm_debug_api.h>
 #include "c_shutdown_timer.h"
 #include "rm_debug_logging.h"
--- a/debugsrv/runmodedebug/securityserver/src/rm_debug_svr.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ b/debugsrv/runmodedebug/securityserver/src/rm_debug_svr.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -1,7 +1,7 @@
 // Copyright (c) 2006-2009 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"
+// under the terms of "Eclipse Public License v1.0"
 // which accompanies this distribution, and is available
 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
 //
@@ -15,12 +15,6 @@
 // 
 //
 
-/**
- @file
- @internalTechnology
- @released
-*/
-
 #include <e32base.h>
 #include <e32base_private.h>
 #include <rm_debug_api.h>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debugsrv/runmodedebug/tsrc/eabi/t_rmdebug_dllu.def	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,3 @@
+EXPORTS
+	_Z9GetDSSUidv @ 1 NONAME
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debugsrv/runmodedebug/tsrc/group/bld.inf	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,19 @@
+// Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+// Kernel and User library test code
+// 
+//
+
+
+#include "../rm_debug/group/bld.inf"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debugsrv/runmodedebug/tsrc/group/e32test.bld	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,5 @@
+
+!EXPLICIT
+!INCREMENTAL
+
+e32test		e32test\group
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debugsrv/runmodedebug/tsrc/group/mk_rmdbg_test.bat	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,18 @@
+@rem
+@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description: 
+@rem
+
+makesis rmdbg_test.pkg
+signsis rmdbg_test.sis rmdbg_test.sisx  RDTest_02.der RDTest_02.key
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debugsrv/runmodedebug/tsrc/rm_debug/basic_tests/r_kernel_low_memory_security_svr_session.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,39 @@
+// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+// Implementation of RKernelLowMemorySecuritySvrSession
+// 
+//
+
+#include "r_kernel_low_memory_security_svr_session.h"
+
+void RKernelLowMemorySecuritySvrSession::FailAlloc(const TInt aCount)
+	{
+	__KHEAP_FAILNEXT(aCount);
+	}
+
+void RKernelLowMemorySecuritySvrSession::HeapReset()
+	{
+	__KHEAP_RESET;
+	}
+
+void RKernelLowMemorySecuritySvrSession::MarkHeap()
+	{
+	__KHEAP_MARK;
+	}
+
+void RKernelLowMemorySecuritySvrSession::MarkHeapEnd()
+	{
+	__KHEAP_MARKEND;
+	}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debugsrv/runmodedebug/tsrc/rm_debug/basic_tests/r_kernel_low_memory_security_svr_session.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,34 @@
+// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+// Version of security server session to enable testing of low memory conditions on kernel side
+// 
+//
+
+
+#ifndef R_KERNEL_LOW_MEMORY_SECURITY_SVR_SESSION_H
+#define R_KERNEL_LOW_MEMORY_SECURITY_SVR_SESSION_H
+
+#include "r_low_memory_security_svr_session.h"
+
+class RKernelLowMemorySecuritySvrSession : public RLowMemorySecuritySvrSession
+	{
+protected:
+	void FailAlloc(const TInt aCount);
+	void HeapReset();
+	void MarkHeap();
+	void MarkHeapEnd();
+	};
+
+#endif //R_KERNEL_LOW_MEMORY_SECURITY_SVR_SESSION_H
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debugsrv/runmodedebug/tsrc/rm_debug/basic_tests/r_low_memory_security_svr_session.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,86 @@
+// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+// Implementation of RLowMemorySecuritySvrSession
+// 
+//
+
+#include "r_low_memory_security_svr_session.h"
+#include <e32debug.h>
+
+// test the effects of heap failure on global RSecuritySvrSession::GetList() in debug mode,
+// in release mode normal call is made (heap checking not applicable)
+TInt RLowMemorySecuritySvrSession::GetList(const Debug::TListId aListId, TDes8& aListData, TUint32& aDataSize)
+	{
+	TInt failAt = 0;
+	TInt err = KErrNoMemory;
+	while(err == KErrNoMemory)
+		{
+		failAt++;
+		FailAlloc(failAt);
+		MarkHeap();
+		err = this->RSecuritySvrSession::GetList(aListId, aListData, aDataSize);
+		if(KErrNoMemory == err)
+			{
+			MarkHeapEnd();
+			}
+		HeapReset();
+		//RDebug::Printf("Debug::RLowMemorySecuritySvrSession::GetList(): failAt: %d, err: %d", failAt, err);
+		}
+	return err;
+	}
+
+// test the effects of heap failure on thread-specific RSecuritySvrSession::GetList() in debug mode,
+// in release mode normal call is made (heap checking not applicable)
+TInt RLowMemorySecuritySvrSession::GetList(const TThreadId aThreadId, const Debug::TListId aListId, TDes8& aListData, TUint32& aDataSize)
+	{
+	TInt failAt = 0;
+	TInt err = KErrNoMemory;
+	while(err == KErrNoMemory)
+		{
+		failAt++;
+		FailAlloc(failAt);
+		MarkHeap();
+		err = this->RSecuritySvrSession::GetList(aThreadId, aListId, aListData, aDataSize);
+		if(KErrNoMemory == err)
+			{
+			MarkHeapEnd();
+			}
+		HeapReset();
+		//RDebug::Printf("Debug::RLowMemorySecuritySvrSession::GetList(TThreadId): failAt: %d, err: %d", failAt, err);
+		}
+	return err;
+	}
+
+// test the effects of heap failure on process-specific RSecuritySvrSession::GetList() in debug mode,
+// in release mode normal call is made (heap checking not applicable)
+TInt RLowMemorySecuritySvrSession::GetList(const TProcessId aProcessId, const Debug::TListId aListId, TDes8& aListData, TUint32& aDataSize)
+	{
+	TInt failAt = 0;
+	TInt err = KErrNoMemory;
+	while(err == KErrNoMemory)
+		{
+		failAt++;
+		FailAlloc(failAt);
+		MarkHeap();
+		err = this->RSecuritySvrSession::GetList(aProcessId, aListId, aListData, aDataSize);
+		if(KErrNoMemory == err)
+			{
+			MarkHeapEnd();
+			}
+		HeapReset();
+		//RDebug::Printf("Debug::RLowMemorySecuritySvrSession::GetList(TProcessId): failAt: %d, err: %d", failAt, err);
+		}
+	return err;
+	}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debugsrv/runmodedebug/tsrc/rm_debug/basic_tests/r_low_memory_security_svr_session.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,38 @@
+// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+// Version of security server session to enable testing of low memory conditions
+// 
+//
+
+
+#ifndef R_LOW_MEMORY_SECURITY_SVR_SESSION_H
+#define R_LOW_MEMORY_SECURITY_SVR_SESSION_H
+
+#include <rm_debug_api.h>
+
+class RLowMemorySecuritySvrSession : public Debug::RSecuritySvrSession
+	{
+public:
+	TInt GetList(const Debug::TListId aListId, TDes8& aListData, TUint32& aDataSize);
+	TInt GetList(const TThreadId aThreadId, const Debug::TListId aListId, TDes8& aListData, TUint32& aDataSize);
+	TInt GetList(const TProcessId aProcessId, const Debug::TListId aListId, TDes8& aListData, TUint32& aDataSize);
+protected:
+	virtual void FailAlloc(const TInt aCount) = 0;
+	virtual void HeapReset() = 0;
+	virtual void MarkHeap() = 0;
+	virtual void MarkHeapEnd() = 0;
+	};
+
+#endif //R_LOW_MEMORY_SECURITY_SVR_SESSION_H
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debugsrv/runmodedebug/tsrc/rm_debug/basic_tests/r_user_low_memory_security_svr_session.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,54 @@
+// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+// r_kernel_low_memory_security_svr_session.cpp
+// Implementation of RUserLowMemorySecuritySvrSession
+// 
+//
+
+#include "r_user_low_memory_security_svr_session.h"
+#include <rm_debug_api.h>
+#ifdef _DEBUG
+#include "low_mem_requests.h"
+#endif
+
+void RUserLowMemorySecuritySvrSession::FailAlloc(const TInt aCount)
+	{
+#ifdef _DEBUG
+	TIpcArgs args(aCount);
+	SendReceive(EDebugServFailAlloc, args);
+#endif
+	}
+
+void RUserLowMemorySecuritySvrSession::HeapReset()
+	{
+#ifdef _DEBUG
+	TIpcArgs args(0);
+	SendReceive(EDebugServFailAlloc, args);
+#endif
+	}
+
+void RUserLowMemorySecuritySvrSession::MarkHeap()
+	{
+#ifdef _DEBUG
+	SendReceive(EDebugServMarkHeap);
+#endif
+	}
+
+void RUserLowMemorySecuritySvrSession::MarkHeapEnd()
+	{
+#ifdef _DEBUG
+	SendReceive(EDebugServMarkEnd);
+#endif
+	}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debugsrv/runmodedebug/tsrc/rm_debug/basic_tests/r_user_low_memory_security_svr_session.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,34 @@
+// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+// Version of security server session to enable testing of low memory conditions on user side
+// 
+//
+
+
+#ifndef R_USER_LOW_MEMORY_SECURITY_SVR_SESSION_H
+#define R_USER_LOW_MEMORY_SECURITY_SVR_SESSION_H
+
+#include "r_low_memory_security_svr_session.h"
+
+class RUserLowMemorySecuritySvrSession : public RLowMemorySecuritySvrSession
+	{
+protected:
+	void FailAlloc(const TInt aCount);
+	void HeapReset();
+	void MarkHeap();
+	void MarkHeapEnd();
+	};
+
+#endif //R_USER_LOW_MEMORY_SECURITY_SVR_SESSION_H
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debugsrv/runmodedebug/tsrc/rm_debug/basic_tests/t_rmdebug2.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,5001 @@
+// Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+// Tests the functionality of the run mode debug device driver.
+//
+//
+
+#include <e32base.h>
+#include <e32base_private.h>
+#include <e32cons.h>
+#include <e32test.h>
+#include <e32ldr.h>
+#include <e32cmn.h>
+#include <e32cmn_private.h>
+#include <f32dbg.h>
+#include <f32file.h>
+#include <hal.h>
+#include <u32hal.h>
+#include <e32property.h>
+
+#include "t_rmdebug_dll.h"
+
+#include <rm_debug_api.h>
+#include "d_rmdebugthread2.h"
+#include "t_rmdebug2.h"
+#include "t_rmdebug_app.h"
+
+#ifdef __MARM_ARMV4__
+#include "d_rmdebug_step_test_armv4.h"
+#endif
+
+#ifdef __MARM_ARMV5__
+#include "d_rmdebug_step_test.h"
+#include "d_rmdebug_bkpt_test.h"
+#endif
+
+#include "d_demand_paging.h"
+
+#ifdef KERNEL_OOM_TESTING
+	#ifdef USER_OOM_TESTING
+		#error "Cannot define both KERNEL_OOM_TESTING and USER_OOM_TESTING"
+	#endif
+#endif
+
+#if  defined (NO_DEBUGTOKEN)  || defined (SOMECAPS_DEBUGTOKEN) || defined (FEWCAPS_DEBUGTOKEN)
+_LIT8(KCrashDummyData, "This is a sample write");
+#endif
+
+using namespace Debug;
+
+const TVersion securityServerVersion(0,1,1);
+
+const TVersion testVersion(2,1,0);
+
+IMPORT_C TInt StartDebugThread(RThread& aServerThread, const TDesC& aDebugThreadName);
+ 
+extern TInt TestData;
+extern TTestFunction FunctionChooser;
+extern TBuf8<SYMBIAN_RMDBG_MEMORYSIZE> gMemoryAccessBytes;
+
+IMPORT_C TInt TestFunction();
+IMPORT_C void TestPagedCode();
+IMPORT_C extern TInt RMDebugDemandPagingTest();
+
+// Device driver name
+_LIT(KDebugDriverFileName,"rm_debug.ldd");
+_LIT(KRMDebugAppName, "t_rmdebug_app");
+
+
+#if defined(NO_DEBUGTOKEN)
+    _LIT(KTestName, "T_RMDEBUG2");
+#elif defined(SOMECAPS_DEBUGTOKEN)
+    _LIT(KTestName, "T_RMDEBUG2_OEM");
+#elif defined(FEWCAPS_DEBUGTOKEN)
+    _LIT(KTestName, "T_RMDEBUG2_OEM2");
+#elif defined(ALLCAPS_DEBUGTOKEN)
+    _LIT(KTestName, "T_RMDEBUG2_ALLCAPS");
+#endif
+
+#define TIMED_WAIT(request, timeoutInMs) CRunModeAgent::TimedWait(request, timeoutInMs, __LINE__)
+
+LOCAL_D RTest test(KTestName);
+
+TBool gUseDelay;
+
+CRunModeAgent::CRunModeAgent()
+//
+// CRunModeAgent constructor
+//
+	{
+	FillArray();
+	RProcess thisProcess;
+	iFileName = thisProcess.FileName();
+	thisProcess.Close();
+	}
+
+CRunModeAgent* CRunModeAgent::NewL()
+//
+// CRunModeAgent::NewL
+//
+	{
+	CRunModeAgent* self = new(ELeave) CRunModeAgent();
+
+  	self->ConstructL();
+
+	return self;
+	}
+
+CRunModeAgent::~CRunModeAgent()
+//
+// CRunModeAgent destructor
+//
+	{
+    iTimer.Close();
+    iRunCountSubscribe.Close();
+    
+	User::FreeLogicalDevice(KDebugDriverFileName);
+	iServSession.Close();
+	iDebugThread.Close();
+	}
+
+void CRunModeAgent::ConstructL()
+//
+// CRunModeAgent::ConstructL
+//
+	{
+	// nothing to do here
+	}
+
+void CRunModeAgent::SetupAndAttachToDSS()
+//
+// CRunModeAgent::SetupAndAttachToDSS
+//
+	{
+	TInt err = StartDebugThread(iDebugThread, KDebugThreadName);
+
+	// get the thread id for use in the tests
+	iThreadID = iDebugThread.Id();
+
+	if (err != KErrNone)
+		{
+		User::Panic(_L("Can't start debug thread"), err);
+		}
+
+    err = iRunCountSubscribe.Attach( RProcess().SecureId(), CDebugServThread::ERMDBGRunCountProperty);
+    if (err != KErrNone)
+        {
+        User::Panic(_L("Can't attach to RProperty iRunCountSubscribe"), err);
+        }
+
+    err = iTimer.CreateLocal(); 
+    if (err != KErrNone)
+        {
+        User::Panic(_L("Can't create RTimer::CreateLocal()"), err);
+        }
+    
+	err = iServSession.Connect(securityServerVersion);
+	if (err != KErrNone)
+		{
+		User::Panic(_L("Can't open server session"), err);
+		}
+	}
+
+CRunModeAgent *RunModeAgent;
+
+// helper function to check whether the listing of type aListId is supported for a scope of aListScope
+TBool CRunModeAgent::ListingSupported(const TListId aListId, const TListScope aListScope)
+	{
+	TTag tag = GetTag(ETagHeaderList, aListId);
+
+	return (tag.iValue) & aListScope;
+	}
+
+//---------------------------------------------
+//! @SYMTestCaseID KBase-T-RMDEBUG2-0426
+//! @SYMTestType
+//! @SYMPREQ PREQ1426
+//! @SYMTestCaseDesc Test getting the list of XIP libraries
+//! @SYMTestActions The XIP library list should be successfully obtained
+//! @SYMTestExpectedResults The specified ldd file should be present in the obtained listing
+//! @SYMTestPriority High
+//! @SYMTestStatus Implemented
+//---------------------------------------------
+void CRunModeAgent::TestGetXipLibrariesList()
+	{
+	test.Next(_L("TestGetXipLibrariesList\n"));
+
+	test(ListingSupported(EXipLibraries, EScopeGlobal));
+	test(!ListingSupported(EXipLibraries, EScopeProcessSpecific));
+	test(!ListingSupported(EXipLibraries, EScopeThreadSpecific));
+
+	//allocate a very small buffer so the GetList call initially fails
+	RBuf8 buffer;
+	test(KErrNone == buffer.Create(1));
+	TUint32 size = 0;
+
+	//get the list data
+	DoGetList(EXipLibraries, EScopeGlobal, buffer, size);
+
+	//search the buffer for entry corresponding to the debug kernel driver
+	//which should be in the rom
+	_LIT(KRmDebugLddName, "z:\\sys\\bin\\rm_debug.ldd");
+
+	//iterate through the buffer and set found to ETrue if we find the driver
+	TBool found = EFalse;
+	TUint8* ptr = (TUint8*)buffer.Ptr();
+	const TUint8* ptrEnd = ptr + size;
+	while(ptr < ptrEnd)
+		{
+		TXipLibraryListEntry& xipLibrary = *(TXipLibraryListEntry*)ptr;
+
+		//get the name of the library
+		TPtr name(&xipLibrary.iName[0], xipLibrary.iNameLength, xipLibrary.iNameLength);
+		if(name.CompareF(KRmDebugLddName()) == 0)
+			{
+			//found the library but continue reading the rest of the buffer to
+			//check nothing bad happens towards the end
+			found = ETrue;
+			}
+		//move pointer on to next library
+		ptr += Align4(xipLibrary.GetSize());
+		}
+	test(found);
+
+	//do cleanup
+	buffer.Close();
+	}
+
+//---------------------------------------------
+//! @SYMTestCaseID KBase-T-RMDEBUG2-0427
+//! @SYMTestType
+//! @SYMPREQ PREQ1426
+//! @SYMTestCaseDesc Test getting the list of executables
+//! @SYMTestActions The list of debuggable executable files should be obtained
+//! @SYMTestExpectedResults The client exe should appear in the list
+//! @SYMTestPriority High
+//! @SYMTestStatus Implemented
+//---------------------------------------------
+void CRunModeAgent::TestGetExecutablesList()
+	{
+	test.Next(_L("TestGetExecutablesList\n"));
+
+	test(ListingSupported(EExecutables, EScopeGlobal));
+	test(!ListingSupported(EExecutables, EScopeProcessSpecific));
+	test(!ListingSupported(EExecutables, EScopeThreadSpecific));
+
+	//allocate a very small buffer so the GetList call initially fails
+	RBuf8 buffer;
+	test(KErrNone == buffer.Create(1));
+	TUint32 size = 0;
+
+	test(KErrNone == iServSession.AttachExecutable(iFileName, EFalse));
+
+	//get the list data
+	DoGetList(EExecutables, EScopeGlobal, buffer, size);
+
+	//get this process' name
+	RProcess thisProcess;
+	TFileName thisProcessName = thisProcess.FileName();
+
+	//look through the buffer and check if the target debug thread is there
+	TBool found = EFalse;
+	TUint8* ptr = (TUint8*)buffer.Ptr();
+	const TUint8* ptrEnd = ptr + size;
+	while(ptr < ptrEnd)
+		{
+		TExecutablesListEntry& entry = *(TExecutablesListEntry*)ptr;
+		//get name
+		TPtr name(&entry.iName[0], entry.iNameLength, entry.iNameLength);
+		if( (entry.iIsActivelyDebugged != 0) && (0 == thisProcessName.CompareF(name)) )
+			{
+			//found this process and asserted it is being actively debugged
+			found = ETrue;
+			}
+		//move pointer on to next entry
+		ptr += Align4(entry.GetSize());
+		}
+	test(found);
+
+	//clean up
+	buffer.Close();
+
+	test(KErrNone == iServSession.DetachExecutable(iFileName));
+	}
+
+//---------------------------------------------
+//! @SYMTestCaseID KBase-T-RMDEBUG2-0428
+//! @SYMTestType
+//! @SYMPREQ PREQ1426
+//! @SYMTestCaseDesc Test error conditions for the GetList calls
+//! @SYMTestActions Multiple calls to test calling GetList with bad arguments
+//! @SYMTestExpectedResults All tests should fail with the appropriate error codes
+//! @SYMTestPriority High
+//! @SYMTestStatus Implemented
+//---------------------------------------------
+void CRunModeAgent::TestGetListInvalidData()
+	{
+	test.Next(_L("TestGetListInvalidData\n"));
+
+	//allocate a buffer, the size should not matter as expecting all calls to fail
+	RBuf8 buffer;
+	test(KErrNone == buffer.Create(1));
+	TUint32 size = 0;
+
+	//test what happens if we ask for an unsupported list type globally
+	test(KErrNotSupported == iServSession.GetList((TListId)1234, buffer, size));
+
+	//test what happens if we ask for an unsupported list type
+	test(KErrNotSupported == iServSession.GetList(RThread().Id(), (TListId)1234, buffer, size));
+
+	//test what happens if we try to get a non-global libraries list
+	test(KErrArgument == iServSession.GetList(RThread().Id(), EXipLibraries, buffer, size));
+
+	//test what happens if we try to get a non-global executables list
+	test(KErrArgument == iServSession.GetList(RThread().Id(), EExecutables, buffer, size));
+
+	//test what happens if we try to get a non-global process list
+	test(KErrArgument == iServSession.GetList(RThread().Id(), EProcesses, buffer, size));
+
+	//check that using a process id fails
+	test(KErrArgument == iServSession.GetList(RProcess().Id(), EProcesses, buffer, size));
+
+	//check that specifying a non-existant thread id fails
+	test(KErrArgument == iServSession.GetList((TThreadId)0x12345678, EThreads, buffer, size));
+
+	//check that specifying a non-existant process id fails
+	test(KErrArgument == iServSession.GetList((TProcessId)0x12345678, EThreads, buffer, size));
+
+	//check that specifying a non-existant thread id fails
+	test(KErrArgument == iServSession.GetList((TThreadId)0x12345678, ECodeSegs, buffer, size));
+
+	//check that specifying a non-existant process id fails
+	test(KErrArgument == iServSession.GetList((TProcessId)0x12345678, ECodeSegs, buffer, size));
+
+	//cleanup
+	buffer.Close();
+	}
+
+//---------------------------------------------
+//! @SYMTestCaseID KBase-T-RMDEBUG2-0429
+//! @SYMTestType
+//! @SYMPREQ PREQ1426
+//! @SYMTestCaseDesc Test getting the process list
+//! @SYMTestActions Get the process listing
+//! @SYMTestExpectedResults The process listing should be successfully obtained and the current process should be present in the list
+//! @SYMTestPriority High
+//! @SYMTestStatus Implemented
+//---------------------------------------------
+void CRunModeAgent::TestGetProcessList()
+	{
+	test.Next(_L("TestGetProcessList\n"));
+
+	test(ListingSupported(EProcesses, EScopeGlobal));
+	test(!ListingSupported(EProcesses, EScopeProcessSpecific));
+	test(!ListingSupported(EProcesses, EScopeThreadSpecific));
+
+	//allocate a very small buffer so the GetList call fails
+	RBuf8 buffer;
+	test(KErrNone == buffer.Create(1));
+	TUint32 size = 0;
+
+	//get the list data
+	DoGetList(EProcesses, EScopeGlobal, buffer, size);
+
+	//initialise data about the target debug thread to compare the kernel's data against
+	RProcess thisProcess;
+	TFileName thisProcessName = thisProcess.FileName();
+	TUint32 processId = thisProcess.Id().Id();
+
+	//look through the buffer and check if the target debug thread is there
+	TBool found = EFalse;
+	TUint8* ptr = (TUint8*)buffer.Ptr();
+	const TUint8* ptrEnd = ptr + size;
+	while(ptr < ptrEnd)
+		{
+		TProcessListEntry& entry = *(TProcessListEntry*)ptr;
+		if( (RProcess().Id().Id() == entry.iProcessId) &&
+			(0 == thisProcessName.CompareF(TPtr(&(entry.iNames[0]), entry.iFileNameLength, entry.iFileNameLength))) &&
+		 	(0 == thisProcess.FullName().CompareF(TPtr(&(entry.iNames[0]) + entry.iFileNameLength, entry.iDynamicNameLength, entry.iDynamicNameLength))) &&
+			0x4321bbbb /* Magic */ == entry.iUid3)
+			{
+			//if all match then we've found it
+			found = ETrue;
+			}
+		ptr += Align4(entry.GetSize());
+		}
+
+	//check whether the expected result happened
+	test(found);
+
+	//clean up
+	buffer.Close();
+	}
+
+//---------------------------------------------
+//! @SYMTestCaseID KBase-T-RMDEBUG2-0430
+//! @SYMTestType
+//! @SYMPREQ PREQ1426
+//! @SYMTestCaseDesc Test getting the thread list
+//! @SYMTestActions Get the thread listing globally and for a specified thread or process
+//! @SYMTestExpectedResults The thread listings should all be successfully obtained and the current thread should be present in all listings
+//! @SYMTestPriority High
+//! @SYMTestStatus Implemented
+//---------------------------------------------
+void CRunModeAgent::TestGetThreadList()
+	{
+	test.Next(_L("TestGetThreadList\n"));
+
+	test(ListingSupported(EThreads, EScopeGlobal));
+	test(ListingSupported(EThreads, EScopeProcessSpecific));
+	test(ListingSupported(EThreads, EScopeThreadSpecific));
+
+	test(KErrNone == iServSession.AttachExecutable(iFileName, EFalse));
+	test(KErrNone == iServSession.SuspendThread(iThreadID));
+
+	TBool found = EFalse;
+	
+	/* We need these loops because on some system the kernel run mode debugger does not 
+	 immediately present the thread in the thread list. 
+	 */
+	
+	for(TInt retryCount = 0; retryCount < 10 && !found; retryCount++ )
+		{
+		//test getting this process's thread list, ETrue as should find the target debug thread
+		User::After(50000);
+		found = DoTestGetThreadList(ETrue, EScopeProcessSpecific, RProcess().Id().Id());
+		}
+	test( found );
+	found = EFalse;
+
+	for(TInt retryCount = 0; retryCount < 10 && !found; retryCount++ )
+		{
+		//test getting the global list, ETrue as should find the target debug thread
+		User::After(50000);
+		found = DoTestGetThreadList(ETrue, EScopeGlobal);
+		}
+	test( found );
+
+	found = EFalse;
+	for(TInt retryCount = 0; retryCount < 10 && !found; retryCount++ )
+		{
+		//test getting this thread's thread list, ETrue as should find the target debug thread
+		User::After(50000);
+		found = DoTestGetThreadList(ETrue, EScopeThreadSpecific, RThread().Id().Id());
+		}
+	test( found );
+
+	test(KErrNone == iServSession.ResumeThread(iThreadID));
+	test(KErrNone == iServSession.DetachExecutable(iFileName));
+	}
+			
+TBool CRunModeAgent::DoTestGetThreadList(const TBool aShouldPass, const TListScope aListScope, const TUint64 aTargetId)
+	{
+	//create data to pass
+	RBuf8 buffer;
+	TUint32 size = 0;
+
+	//perform the call to get the thread list
+	DoGetList(EThreads, aListScope, buffer, size, aTargetId);
+
+	//initialise data about the target debug thread to compare the kernel's data against
+	TFileName name = iDebugThread.FullName();
+	RProcess thisProcess;
+	TUint64 processId = thisProcess.Id();
+	TUint64 threadId = iDebugThread.Id();
+
+	//look through the buffer and check if the target debug thread is there
+	TBool found = EFalse;
+	TUint8* ptr = (TUint8*)buffer.Ptr();
+	const TUint8* ptrEnd = ptr + size;
+	while(ptr < ptrEnd)
+		{
+		TThreadListEntry* entry = (TThreadListEntry*)ptr;
+		TPtr entryName(&(entry->iName[0]), entry->iNameLength, entry->iNameLength);
+
+		if( (threadId == entry->iThreadId) && (processId == entry->iProcessId) && (0 == name.CompareF(entryName)) )
+			{
+			test(entry->iSupervisorStackBaseValid);
+			test(entry->iSupervisorStackSizeValid);
+			//if all match then we've found it
+			found = ETrue;
+			break;
+			}
+
+		ptr += Align4(entry->GetSize());
+		}
+
+	//clean up
+	buffer.Close();
+	return found;
+
+	}
+
+//---------------------------------------------
+//! @SYMTestCaseID KBase-T-RMDEBUG2-0431
+//! @SYMTestType
+//! @SYMPREQ PREQ1426
+//! @SYMTestCaseDesc Test getting the code segment list
+//! @SYMTestActions Get the code segment list global and for a specified thread
+//! @SYMTestExpectedResults The listings should be returned successfully
+//! @SYMTestPriority High
+//! @SYMTestStatus Implemented
+//---------------------------------------------
+void CRunModeAgent::TestGetCodeSegsList()
+	{
+	test.Next(_L("TestGetCodeSegsList\n"));
+
+	test(ListingSupported(ECodeSegs, EScopeGlobal));
+	test(ListingSupported(ECodeSegs, EScopeProcessSpecific));
+	test(ListingSupported(ECodeSegs, EScopeThreadSpecific));
+
+	// Cannot perform this test with OEM2 debug token, as the t_rmdebug2 app
+	// needs AllFiles, and the OEM2 debug token does not authorise this.
+	// It seems reasonable to suppose that it would work anyway
+
+#ifndef FEWCAPS_DEBUGTOKEN
+	test(KErrNone == iServSession.AttachExecutable(iFileName, EFalse));
+
+ 	//test getting the global list, ETrue as should find this process' main codeSeg
+	DoTestGetCodeSegsList(ETrue, EScopeGlobal);
+
+	//test getting this process' codeSegs, ETrue as should find this process' main codeSeg
+	DoTestGetCodeSegsList(ETrue, EScopeProcessSpecific, RProcess().Id().Id());
+
+	//test getting this thread's codeSegs, ETrue as should find this process' main codeSeg
+	DoTestGetCodeSegsList(ETrue, EScopeThreadSpecific, RThread().Id().Id());
+
+	test(KErrNone == iServSession.DetachExecutable(iFileName));
+#endif // FEWCAPS_DEBUGTOKEN
+
+	}
+
+void CRunModeAgent::DoTestGetCodeSegsList(const TBool aShouldPass, const TListScope aListScope, const TUint64 aTargetId)
+	{
+	//create data to pass
+	RBuf8 buffer;
+	TUint32 size = 0;
+
+	RLibrary dll;
+	test (KErrNone == dll.Load(_L("esock.dll")));
+
+	//perform the call to get the Code segs
+	DoGetList(ECodeSegs, aListScope, buffer, size, aTargetId);
+
+	//create memoryInfo to contain info about this process
+	RProcess thisProcess;
+	TModuleMemoryInfo memoryInfo;
+	test(KErrNone == thisProcess.GetMemoryInfo(memoryInfo));
+
+	// check whether this process came from a file in ROM so we know whether to
+	// expect the code seg to be XIP or not.
+	RFs fs;
+	test(KErrNone == fs.Connect());
+	TBool thisFileIsInRom = EFalse;
+	if(fs.IsFileInRom(iFileName))
+		{
+		thisFileIsInRom = ETrue;
+		}
+
+	//look through the buffer to find this process' main code seg
+	TBool foundExe = EFalse;
+	TBool foundDLL = EFalse;
+	TUint8* ptr = (TUint8*)buffer.Ptr();
+	const TUint8* ptrEnd = ptr + size;
+	while(ptr < ptrEnd)
+		{
+		TCodeSegListEntry* codeSeg = (TCodeSegListEntry*)ptr;
+		
+        if (0 == dll.FileName().CompareF(TPtr(&(codeSeg->iName[0]), codeSeg->iNameLength, codeSeg->iNameLength ))) 
+           {               
+            //Run-Mode driver has correctly returned the name of the loaded DLL
+            foundDLL = ETrue;
+           }
+        
+		if( (codeSeg->iIsXip == thisFileIsInRom) && (0 == iFileName.CompareF(TPtr(&(codeSeg->iName[0]), codeSeg->iNameLength, codeSeg->iNameLength))) )
+			{
+			if( (memoryInfo.iCodeBase == codeSeg->iCodeBase) &&
+					(memoryInfo.iCodeSize == codeSeg->iCodeSize) &&
+					(memoryInfo.iConstDataSize == codeSeg->iConstDataSize) &&
+					(memoryInfo.iInitialisedDataBase == codeSeg->iInitialisedDataBase) &&
+					(memoryInfo.iInitialisedDataSize == codeSeg->iInitialisedDataSize) &&
+					(memoryInfo.iUninitialisedDataSize == codeSeg->iUninitialisedDataSize))
+				{
+				//all matched so means we've found the codeSeg we're looking for
+				foundExe = ETrue;
+				}
+			}
+		ptr += Align4(codeSeg->GetSize());
+		}
+
+	//check whether the loaded DLL name was as expected
+	test(foundDLL);
+	
+	//check whether the result was as expected
+	test(foundExe == aShouldPass);
+	
+	// Close handle and unload (unless someone else is using it)
+	dll.Close();
+
+	// only care about rm_debug.ldd if we have global scope (belongs to the system not this process)
+	if (aListScope == EScopeGlobal)
+	{
+		// Search for rm_debug.ldd library and check its UID3 is correct
+	    foundExe = EFalse;
+
+_LIT(KRMDebugDriverFileName,"Z:\\sys\bin\\rm_debug.ldd");
+
+		TFileName rmdebugFilename(KRMDebugDriverFileName);
+
+		// reset the Ptr
+		ptr = (TUint8*)buffer.Ptr();
+		ptrEnd = ptr+size;
+		while(ptr < ptrEnd)
+		{
+			TCodeSegListEntry* codeSeg = (TCodeSegListEntry*)ptr;
+
+			if( rmdebugFilename.CompareF(TPtr(&(codeSeg->iName[0]), codeSeg->iNameLength, codeSeg->iNameLength)))
+				{
+				if(codeSeg->iUid3 == 0x101f7157 /* Magic */)
+					{
+					//all matched so means we've found the codeSeg we're looking for
+				    foundExe = ETrue;
+					}
+				}
+			ptr += Align4(codeSeg->GetSize());
+		}
+		test((TUint32)foundExe == (TUint32)ETrue);
+	}
+
+	//clean up
+	buffer.Close();
+
+	}
+
+
+/**
+ * Get a list from the run mode debug system. Most list calls will initially return KErrTooBig, 
+ * since the initial size of the buffer is 0. However it is sometimes valid for a list to be empty
+ * given its filtering and scope. These calls should return KErrNone.
+ */
+void CRunModeAgent::DoGetList(const TListId aListId, const TListScope aListScope, RBuf8& aBuffer, TUint32& aSize, const TUint64 aTargetId)
+	{
+	//close the buffer in case there's stuff allocated in it
+	aBuffer.Close();
+	//initialise it to be one byte big, which will guarantee data won't fit in it
+	test(KErrNone == aBuffer.Create(1));
+	aSize = 0;
+	
+	TInt ret = KErrNone;
+	//should pass this test (assuming we've passed in sensible arguments above...)
+	if(EScopeGlobal == aListScope)
+		{
+		ret = iServSession.GetList(aListId, aBuffer, aSize);
+		}
+	else if(EScopeThreadSpecific == aListScope)
+		{
+		ret = iServSession.GetList((TThreadId)aTargetId, aListId, aBuffer, aSize);
+		}
+	else if(EScopeProcessSpecific == aListScope)
+		{
+		ret = iServSession.GetList((TProcessId)aTargetId, aListId, aBuffer, aSize);
+		}
+	else
+		{
+		// unknown list scope
+		test(0);
+		}
+
+	if( KErrNone == ret )
+		{
+		/* In the case that there is no data, just return and let the caller check
+		the buffer. It is valid for a caller to not expect any data to be returned.
+		*/
+		return;
+		}
+	
+	// The only other allowed return is KErrTooBig
+	test( ret == KErrTooBig );
+
+	//keep allocating larger buffers, beginning with the aSize returned by the above call,
+	//and hopefully we'll eventually make a large enough one
+	test(KErrNone == aBuffer.ReAlloc(aSize));
+
+	for(;;)
+		{
+		TInt err = KErrNone;
+		if(EScopeGlobal == aListScope)
+			{
+			err = iServSession.GetList(aListId, aBuffer, aSize);
+			}
+		else if(EScopeThreadSpecific == aListScope)
+			{
+			err = iServSession.GetList((TThreadId)aTargetId, aListId, aBuffer, aSize);
+			}
+		else if(EScopeProcessSpecific == aListScope)
+			{
+			err = iServSession.GetList((TProcessId)aTargetId, aListId, aBuffer, aSize);
+			}
+		else
+			{
+			// unknown list scope
+			test(0);
+			}
+		if(err == KErrTooBig)
+			{
+			//wasn't big enough so double it
+			aSize = aSize << 1;
+			err = aBuffer.ReAlloc(aSize);
+			if(err != KErrNone)
+				{
+				//print out a message if couldn't allocate memory and quit
+				test.Printf(_L("Out ot memory when attempting to allocate %d bytes."), aSize);
+				test(KErrNone == err);
+				}
+
+			RDebug::Printf(" List size =%d", aSize );
+			}
+		else
+			{
+			test(KErrNone == err);
+			test(aBuffer.Length() == aSize);
+			//break out of the loop if the list has been successfully read in
+			break;
+			}
+		}
+	}
+
+//---------------------------------------------
+//! @SYMTestCaseID KBase-T-RMDEBUG2-0432
+//! @SYMTestType
+//! @SYMPREQ PREQ1426
+//! @SYMTestCaseDesc Test reading and writing memory
+//! @SYMTestActions Multiple calls to read and write memory, with various sizes and at various locations.
+//!	Also test that bad input values cause appropriate errors to be returned.
+//! @SYMTestExpectedResults All tests should pass and the target process should be left unaffected
+//! @SYMTestPriority High
+//! @SYMTestStatus Implemented
+//---------------------------------------------
+void CRunModeAgent::TestMemoryAccess()
+{
+	TInt err;
+
+	test.Next(_L("TestMemoryAccess - Read Memory\n"));
+
+	//initialise buffer
+	gMemoryAccessBytes.SetLength(0);
+	for (TInt i=0; i<SYMBIAN_RMDBG_MEMORYSIZE; i++)
+		{
+		gMemoryAccessBytes.Append(i);
+		}
+
+	TUint32 address = (TUint32)(&gMemoryAccessBytes[0]);
+	TUint32 dataSize = SYMBIAN_RMDBG_MEMORYSIZE;
+
+	//create size for buffer that is rounded up to nearest 4 bytes if not
+	//already 4 byte aligned
+	TUint32 size = dataSize;
+	if(size % 4 != 0)
+		{
+		size += (4 - (size % 4));
+		}
+
+	RBuf8 dataBlock;
+	err = dataBlock.Create(size);
+	test(err==KErrNone);
+	test(KErrNone == iServSession.AttachExecutable(iFileName, EFalse));
+
+	//suspend the thread prior to memory operations
+	test(KErrNone == iServSession.SuspendThread(iThreadID));
+
+	err = iServSession.ReadMemory(iThreadID, address, size, dataBlock, EAccess32, EEndLE8);
+	test(err==KErrNone);
+
+	for (TInt i=0; i<dataSize; i++)
+		{
+		test(dataBlock.Ptr()[i] == gMemoryAccessBytes[i]);
+		}
+
+	test.Next(_L("TestMemoryAccess - Write Memory\n"));
+
+	// Now reset the buffer
+	for (TInt i=0; i<dataSize; i++)
+		{
+		gMemoryAccessBytes[i] = 0;
+		}
+
+	// Write our data into the buffer
+	err = iServSession.WriteMemory(iThreadID, address, size, dataBlock, EAccess32, EEndLE8);
+	test(err==KErrNone);
+
+	for (TInt i=0; i<dataSize; i++)
+		{
+		test(dataBlock.Ptr()[i] == gMemoryAccessBytes[i]);
+		}
+
+	//final test that everything's not been going wrong
+	test(gMemoryAccessBytes[5] != 0);
+
+	test.Next(_L("TestMemoryAccess - Invalid arguments\n"));
+	test.Printf(_L("This test may emit crash-like information. This is intended.\n"));
+
+	//test address that is not 32 bit aligned
+	err = iServSession.ReadMemory(iThreadID, address + 1, size, dataBlock, EAccess32, EEndLE8);
+	test(err == KErrArgument);
+
+	//test size that is not multiple of 4 bytes
+	err = iServSession.WriteMemory(iThreadID, address, size + 2, dataBlock, EAccess32, EEndLE8);
+	test(err == KErrArgument);
+
+	//test size > max block size
+	err = iServSession.ReadMemory(iThreadID, address, (1<<15), dataBlock, EAccess32, EEndLE8);
+	test(err == KErrArgument);
+
+	//test access size == 2 bytes
+	err = iServSession.ReadMemory(iThreadID, address, size, dataBlock, EAccess16, EEndLE8);
+	test(err == KErrNotSupported);
+
+	//test access size == 1 byte
+	err = iServSession.WriteMemory(iThreadID, address, size, dataBlock, EAccess8, EEndLE8);
+	test(err == KErrNotSupported);
+
+	//test endianess == EEndBE8
+	err = iServSession.ReadMemory(iThreadID, address, size, dataBlock, EAccess32, EEndBE8);
+	test(err == KErrNotSupported);
+
+	//test endianess == EEndBE32
+	err = iServSession.WriteMemory(iThreadID, address, size, dataBlock, EAccess32, EEndBE32);
+	test(err == KErrNotSupported);
+
+	//test reading off end of memory
+	err = iServSession.ReadMemory(iThreadID, 0xffffff00, 0x00000101, dataBlock, EAccess32, EEndLE8);
+	test(err == KErrArgument);
+
+	//The following three tests check that edge conditions in the range check are handled correctly.
+	err = iServSession.ReadMemory(iThreadID, 0xffffff00, 0x000000FF, dataBlock, EAccess32, EEndLE8);
+	test(err == KErrArgument);
+
+	err = iServSession.ReadMemory(iThreadID, 0xffffff00, 0x000000F0, dataBlock, EAccess32, EEndLE8);
+	test(err == KErrBadDescriptor);
+
+	//Third range check test. Check that range check is handled correctly even when base + size wraps to 0.
+	err = iServSession.ReadMemory(iThreadID, 0xffffff00, 0x00000100, dataBlock, EAccess32, EEndLE8);
+	test(err == KErrBadDescriptor);
+	//end of range check tests
+
+	//test size == 0
+	err = iServSession.WriteMemory(iThreadID, address, 0, dataBlock, EAccess32, EEndLE8);
+	test(err == KErrArgument);
+
+	//attempt to write to address outside of process data segments,
+	//this address corresponds to the vectors so shouldn't be able to write
+	err = iServSession.WriteMemory(iThreadID, 0xffff0000, size, dataBlock, EAccess32, EEndLE8);
+	test(err == KErrBadDescriptor);
+
+	//attempt to read and write to address in process code segment
+
+	//open a handle to the thread
+	RThread debugThread;
+	test(debugThread.Open(iThreadID) == KErrNone);
+
+	//get a reference to the debug process
+	RProcess debugProcess;
+	test(debugThread.Process(debugProcess) == KErrNone);
+
+	//get the memory info for the process
+	TProcessMemoryInfo info;
+	test(debugProcess.GetMemoryInfo(info) == KErrNone);
+
+	address = info.iCodeBase;
+	if(size <= info.iCodeSize)
+		{
+		test(KErrNone == iServSession.ReadMemory(iThreadID, address, size, dataBlock, EAccess32, EEndLE8));
+		test(KErrBadDescriptor == iServSession.WriteMemory(iThreadID, address, size, dataBlock, EAccess32, EEndLE8));
+		}
+
+	// Some performance tests now
+	TUint32 bytesRead = 0;
+
+	// Allocate a data buffer
+	TUint32* p = (TUint32*)User::Alloc(size);
+	test(p != 0);
+
+	TInt nanokernel_tick_period;
+	HAL::Get(HAL::ENanoTickPeriod, nanokernel_tick_period);
+	test (nanokernel_tick_period != 0);
+
+	static const TInt KOneMillion = 1000000;
+
+	TInt nkTicksPerSecond = KOneMillion/nanokernel_tick_period;
+
+	TUint32 stopTickCount = User::NTickCount() + nkTicksPerSecond;
+
+	while (User::NTickCount() < stopTickCount)
+		{
+		err = iServSession.ReadMemory(iThreadID, (TUint32)p, size, dataBlock, EAccess32, EEndLE8);
+		test(err==KErrNone);
+
+		// Increase the count of bytes read
+		bytesRead += size;
+		}
+
+	test(bytesRead != 0);
+	iMemoryReadKbytesPerSecond = bytesRead/1024;
+
+	// write memory test
+	TUint32 bytesWritten = 0;
+
+	stopTickCount = User::NTickCount() + nkTicksPerSecond;
+
+	while (User::NTickCount() < stopTickCount)
+		{
+		err = iServSession.WriteMemory(iThreadID, (TUint32)p, size, dataBlock, EAccess32, EEndLE8);
+		test(err==KErrNone);
+
+		// Increase the count of bytes read
+		bytesWritten += size;
+		}
+
+	test (bytesWritten != 0);
+	iMemoryWriteKbytesPerSecond = bytesWritten/1024;
+
+	User::Free(p);
+
+	//resume the thread
+	test(KErrNone == iServSession.ResumeThread(iThreadID));
+
+	debugThread.Close();
+	dataBlock.Close();
+
+	test(KErrNone == iServSession.DetachExecutable(iFileName));
+	}
+
+//---------------------------------------------
+//! @SYMTestCaseID KBase-T-RMDEBUG2-0433
+//! @SYMTestType
+//! @SYMPREQ PREQ1426
+//! @SYMTestCaseDesc Test suspending and resuming threads
+//! @SYMTestActions Multiple calls to suspend and resume threads with and without attaching to the thread
+//! @SYMTestExpectedResults All tests should pass and the target process should be left unaffected
+//! @SYMTestPriority High
+//! @SYMTestStatus Implemented
+//---------------------------------------------
+void CRunModeAgent::TestSuspendResume()
+	{
+	TInt err;
+
+	test.Next(_L("TestSuspendResume - Suspend\n"));
+
+	test(KErrNone == iServSession.AttachExecutable(iFileName, EFalse));
+
+	err = iServSession.SuspendThread(iThreadID);
+	test(err==KErrNone);
+	err = TestRunCountSame( iRunCountSubscribe, iTimer );
+	test( KErrNone == err );
+	
+	// Resume the thread
+	test.Next(_L("TestSuspendResume - Resume\n"));
+	err = iServSession.ResumeThread(iThreadID);
+	test(err==KErrNone);
+
+	test(KErrNone == iServSession.DetachExecutable(iFileName));
+
+	err = WaitForRunCountChange( iRunCountSubscribe, iTimer );
+	test(KErrNone == err );
+	
+	// check that agent can resume thread which it previously detached from
+	test(KErrNone == iServSession.AttachExecutable(iFileName, EFalse));
+	test(KErrNone == iServSession.SuspendThread(iThreadID));
+	test(KErrNone == iServSession.DetachExecutable(iFileName));
+
+	test(KErrNone == iServSession.AttachExecutable(iFileName, EFalse));
+	err = TestRunCountSame( iRunCountSubscribe, iTimer );
+	test( KErrNone == err );
+	test(KErrNone == iServSession.ResumeThread(iThreadID));
+	test(KErrNone == iServSession.DetachExecutable(iFileName));
+
+	err = WaitForRunCountChange( iRunCountSubscribe, iTimer );
+	test( KErrNone == err );
+	
+	test(KErrNone == iServSession.AttachExecutable(iFileName, EFalse));
+	test(KErrNone == iServSession.SuspendThread(iThreadID));
+	err = TestRunCountSame( iRunCountSubscribe, iTimer );
+	test( KErrNone == err );
+	test(KErrNone == iServSession.DetachExecutable(iFileName));
+	err = TestRunCountSame( iRunCountSubscribe, iTimer );
+	test( KErrNone == err );
+	    
+	test(KErrNone == iServSession.AttachExecutable(iFileName, EFalse));
+	err = TestRunCountSame( iRunCountSubscribe, iTimer );
+	test( KErrNone == err );
+	test(KErrNone == iServSession.ResumeThread(iThreadID));
+	test(KErrNone == iServSession.DetachExecutable(iFileName));
+	
+	err = WaitForRunCountChange( iRunCountSubscribe, iTimer );
+    test( KErrNone == err );
+	}
+
+//---------------------------------------------
+//! @SYMTestCaseID KBase-T-RMDEBUG2-0434
+//! @SYMTestType
+//! @SYMPREQ PREQ1426
+//! @SYMTestCaseDesc Test getting the debug functionality from the driver
+//! @SYMTestActions Get the size and contents of the debug functionality block
+//! @SYMTestExpectedResults All tests should pass and the expected data should appear in the functionality block
+//! @SYMTestPriority High
+//! @SYMTestStatus Implemented
+//---------------------------------------------
+void CRunModeAgent::TestDebugFunctionality()
+	{
+
+	TInt err;
+
+	test.Next(_L("TestDebugFunctionality - GetDebugFunctionalityBufSize\n"));
+
+	TUint32 bufsize = 0;	// Safe default size
+
+	// Get functionality block size
+	err = iServSession.GetDebugFunctionalityBufSize(&bufsize);
+	test(err==KErrNone);
+	test.Next(_L("TestDebugFunctionality - GetDebugFunctionality\n"));
+
+	// Ensure we have a finite buffer size
+	test(bufsize!=0);
+
+	// Allocate space for the functionality data
+	HBufC8* dftext = HBufC8::NewLC(bufsize);
+
+	// create an empty TPtr8 refering to dftext
+	TPtr8 dftextPtr(dftext->Des());
+
+	// Get the functionality block
+	err = iServSession.GetDebugFunctionality(dftextPtr);
+	test(err==KErrNone);
+
+	// Check that the first entry is correct
+	TTagHeader RefHdr =
+	{
+		ETagHeaderIdCore,ECoreLast,
+	};
+
+	// First header passed from rm_debug.ldd
+	TTagHeader* TestHdr = (TTagHeader*)dftextPtr.Ptr();
+
+	// Check
+	test(RefHdr.iTagHdrId==TestHdr->iTagHdrId);
+	// this test might fail if the agent is used with a Debug Security Server different from
+	// the one it was compiled against. So removing it for now.
+	//test(RefHdr.iNumTags==TestHdr->iNumTags);
+
+	// read a value from the data to check it has come through as expected
+	TTagHeader* header = GetTagHdr(dftext->Des(), ETagHeaderIdApiConstants);
+	test(header != NULL);
+	TTag* tag = GetTag(header, EApiConstantsTEventInfoSize);
+	test(tag != NULL);
+	// this test might fail if the agent is used with a Debug Security Server different from
+	// the one it was compiled against. So removing it for now.
+	//test(sizeof(TEventInfo) == tag->iValue);
+
+	// Remove our temporary buffer
+	CleanupStack::PopAndDestroy(dftext);
+	}
+
+//---------------------------------------------
+//! @SYMTestCaseID KBase-T-RMDEBUG2-0435
+//! @SYMTestType
+//! @SYMPREQ PREQ1426
+//! @SYMTestCaseDesc Test setting and clearing consecutive breakpoints
+//! @SYMTestActions Set and clear consecutive breakpoints of all combinations of breakpoint types
+//! @SYMTestExpectedResults All breakpoints should be set and cleared without error
+//! @SYMTestPriority High
+//! @SYMTestStatus Implemented
+//---------------------------------------------
+void CRunModeAgent::TestConsecutiveBreakPoints()
+	{
+	test.Next(_L("TestConsecutiveBreakPoints\n"));
+
+	test(KErrNone == iServSession.SuspendThread(iThreadID));
+
+	// just a temporary structure for storing info about a breakpoint
+	struct TBreakPoint
+		{
+	public:
+		TBreakPoint()
+			:iId(0),
+			iMode((TArchitectureMode)0),
+			iAddress(0)
+			{}
+		TBreakId iId;
+		TArchitectureMode iMode;
+		TUint32 iAddress;
+		inline TInt Size() { return (EArmMode == iMode) ? 4 : 2; }
+		};
+
+	//an address in the target debug thread
+	TUint32 address = (TUint32)(&TestFunction);
+
+	// there are six orders in which three breakpoints can be set, these are looped
+	// through below to check setting and clearing consecutive breakpoints works
+	TUint8 order[6][3] =
+		{
+			{0,1,2},
+			{0,2,1},
+			{1,0,2},
+			{1,2,0},
+			{2,0,1},
+			{2,1,0}
+		};
+
+	// The following code checks that setting and clearing consecutive breakpoints works correctly:
+	// It checks that setting all combinations of three arm and thumb breakpoints succeeds, and check that the
+	// breakpoints can be set in any order, and then cleared in any order
+
+	// the 3 least significant bits of i control whether each of the three breakpoints should be arm or thumb
+	for(TInt i=0; i<8; i++)
+		{
+		// controls the order in which the breakpoints should be set
+		for(TInt j=0; j<6; j++)
+			{
+			// create the three breakpoints and set their modes
+			TBreakPoint bp[3];
+			bp[0].iMode = (i&1) ? EArmMode : EThumbMode;
+			bp[1].iMode = (i&2) ? EArmMode : EThumbMode;
+			bp[2].iMode = (i&4) ? EArmMode : EThumbMode;
+
+			// set the address of each of the breakpoints
+			bp[0].iAddress = address;
+			if(EArmMode == bp[0].iMode)
+				{ // if an arm breakpoint then must be on a four byte boundary
+				bp[0].iAddress = Align4(bp[0].iAddress);
+				}
+			bp[1].iAddress = bp[0].iAddress + bp[0].Size();
+			if(EArmMode == bp[1].iMode)
+				{ // if an arm breakpoint then must be on a four byte boundary
+				bp[1].iAddress = Align4(bp[1].iAddress);
+				}
+			bp[2].iAddress = bp[1].iAddress + bp[1].Size();
+			if(EArmMode == bp[2].iMode)
+				{ // if an arm breakpoint then must be on a four byte boundary
+				bp[2].iAddress = Align4(bp[2].iAddress);
+				}
+			for(TInt k=0; k<6; k++)
+				{
+				// set the three breakpoints in the order defined by j and then clear them in the order defined by k
+				test(KErrNone==iServSession.SetBreak(bp[order[j][0]].iId, iThreadID, bp[order[j][0]].iAddress, bp[order[j][0]].iMode));
+				test(KErrNone==iServSession.SetBreak(bp[order[j][1]].iId, iThreadID, bp[order[j][1]].iAddress, bp[order[j][1]].iMode));
+				test(KErrNone==iServSession.SetBreak(bp[order[j][2]].iId, iThreadID, bp[order[j][2]].iAddress, bp[order[j][2]].iMode));
+				test(KErrNone==iServSession.ClearBreak(bp[order[k][0]].iId));
+				test(KErrNone==iServSession.ClearBreak(bp[order[k][1]].iId));
+				test(KErrNone==iServSession.ClearBreak(bp[order[k][2]].iId));
+				}
+			}
+		}
+
+	// resume the thread
+	test(KErrNone == iServSession.ResumeThread(iThreadID));
+	}
+
+//---------------------------------------------
+//! @SYMTestCaseID KBase-T-RMDEBUG2-0436
+//! @SYMTestType
+//! @SYMPREQ PREQ1426
+//! @SYMTestCaseDesc Test breakpoint functionality
+//! @SYMTestActions Multiple calls to set and clear breakpoints. Checking bad input produces appropriate errors.
+//! @SYMTestExpectedResults All tests should pass and the target debug thread should be left unaffected
+//! @SYMTestPriority High
+//! @SYMTestStatus Implemented
+//---------------------------------------------
+void CRunModeAgent::TestBreakPoints()
+	{
+	TInt err;
+
+	test.Next(_L("TestBreakPoints - Set\n"));
+
+	test(KErrNone == iServSession.AttachExecutable(iFileName, EFalse));
+
+	TestConsecutiveBreakPoints();
+
+	//an address in the target debug thread
+	TUint32 address = (TUint32)(&TestFunction);
+
+	/*
+	 * Ensure that breakpoint operations don't
+	 * affect memory read/write by checking that reads/writes
+	 * in locations containing breakpoints don't change behaviour
+	 * because of the breakpoints.
+	 */
+
+	TUint32 size = SYMBIAN_RMDBG_MEMORYSIZE;
+
+	RBuf8 originalDataBlock;
+	err = originalDataBlock.Create(size);
+	test(err==KErrNone);
+
+	//suspend the thread
+	test(KErrNone == iServSession.SuspendThread(iThreadID));
+
+	err = iServSession.ReadMemory(iThreadID, address, size, originalDataBlock, EAccess32, EEndLE8);
+	test(err==KErrNone);
+
+	// Test data block for comparison
+	RBuf8 testDataBlock;
+	err = testDataBlock.Create(size);
+	test(err==KErrNone);
+
+	/*
+	 * set an arm breakpoint
+	 */
+	test.Next(_L("TestBreakPoints - set an arm breakpoint1"));
+
+	TBreakId armBreakId = 0;
+	err = iServSession.SetBreak(armBreakId, iThreadID, address, EArmMode);
+	test(err == KErrNone);
+
+	// Ensure that memory read is not corrupted
+	test.Next(_L("TestBreakPoints - read mem 2"));
+	err = iServSession.ReadMemory(iThreadID, address, size, testDataBlock, EAccess32, EEndLE8);
+	test(err==KErrNone);
+
+	test (testDataBlock == originalDataBlock);
+
+	/*
+	 * set a thumb breakpoint
+	 */
+	test.Next(_L("TestBreak- set a thumb breakpoint1"));
+	TBreakId thumbBreakId = 0;
+	err = iServSession.SetBreak(thumbBreakId, iThreadID, address+4, EThumbMode);
+	test(err == KErrNone);
+
+	/*
+	 * set a thumb2EE breakpoint
+	 */
+	test.Next(_L("TestBreak- set a thumb2EE breakpoint"));
+
+	TBreakId thumb2EEBreakId = 0;
+	err = iServSession.SetBreak(thumb2EEBreakId, iThreadID, address+8, EThumb2EEMode);
+	test(err == KErrNotSupported);
+
+	/*
+	 * overlapping breakpoint (same address/threadId/mode)
+	 */
+	test.Next(_L("TestBreak- set overlapping breakpoint 1"));
+	TBreakId overlapBreakId = 0;
+	err = iServSession.SetBreak(overlapBreakId, iThreadID, address, EArmMode);
+	test(err == KErrAlreadyExists);
+
+	/*
+	 * overlapping breakpoint (different address/same threadId/different mode)
+	 *
+	 * address - EArmBreakpoint
+	 * address+2 - EThumbBreakpoint
+	 */
+	test.Next(_L("TestBreak- set overlapping breakpoint 2"));
+	TBreakId overlap2BreakId = 0;
+	err = iServSession.SetBreak(overlap2BreakId, iThreadID, address+2, EThumbMode);
+	test(err == KErrAlreadyExists);
+
+	/*
+	 * Un-aligned address (arm)
+	 */
+	test.Next(_L("TestBreak- set Un-aligned address (arm)"));
+	TBreakId armUnalignedBreakId = 0;
+	err = iServSession.SetBreak(armUnalignedBreakId, iThreadID, address+6, EArmMode);
+	test(err == KErrArgument);
+
+	/*
+	 * Un-aligned address (thumb)
+	 */
+	test.Next(_L("TestBreak- set Un-aligned address (thumb)"));
+	TBreakId thumbUnalignedBreakId = 0;
+	err = iServSession.SetBreak(thumbUnalignedBreakId, iThreadID, address+7, EThumbMode);
+	test(err == KErrArgument);
+
+	/*
+	 * Invalid address (arm)
+	 */
+	test.Next(_L("TestBreak- set Invalid address (arm)"));
+	TBreakId armBadAddressBreakId = 0;
+	err = iServSession.SetBreak(armBadAddressBreakId, iThreadID, 0 /* address */, EThumbMode);
+	test(err == KErrBadDescriptor);
+
+	/*
+	 * Different thread, same address. Should fail for the same process, but succeed
+	 * for a different process.
+	 */
+
+	/*
+	 * Invalid thread
+	 */
+	TBreakId invalidThreadBreakId = 0;
+	err = iServSession.SetBreak(invalidThreadBreakId, 0xbabababa, address, EThumbMode);
+	test(err == KErrPermissionDenied);
+
+	// Clear the ARM breakpoint
+	err = iServSession.ClearBreak(armBreakId);
+	test(err == KErrNone);
+
+	// Clear the Thumb breakpoint
+	err = iServSession.ClearBreak(thumbBreakId);
+	test(err == KErrNone);
+
+	// to do : two threads at the same address
+	// to do : two processes at the same address
+
+	// Ensure that memory read is not corrupted after clearing the breakpoints
+	err = iServSession.ReadMemory(iThreadID, address, size, testDataBlock, EAccess32, EEndLE8);
+	test(err==KErrNone);
+
+	test (testDataBlock == originalDataBlock);
+
+	/*
+	 * How fast can we set breakpoints?
+	 *
+	 * Measure the time by setting/clearing breakpoints for 1 second.
+     */
+	TInt nanokernel_tick_period;
+	HAL::Get(HAL::ENanoTickPeriod, nanokernel_tick_period);
+	test (nanokernel_tick_period != 0);
+
+	TInt nkTicksPerSecond = HelpTicksPerSecond();
+
+	TInt breaksPerSecond = 0;
+
+	TUint32 stopTickCount = User::NTickCount() + nkTicksPerSecond;
+
+	while (User::NTickCount() < stopTickCount)
+		{
+		// set the breakpoint
+		TBreakId armBreakId = 0;
+		err = iServSession.SetBreak(armBreakId, iThreadID, address, EArmMode);
+		test(err == KErrNone);
+
+		// Clear the breakpoint
+		err = iServSession.ClearBreak(armBreakId);
+		test(err == KErrNone);
+
+		// Update the count of breakpoints
+		breaksPerSecond++;
+
+		// Gone wrong if we wrap to negative breakpoints (cannot set 2billion/second!)
+		test(breaksPerSecond >0);
+		}
+
+	// Store the results for later
+	iBreakpointsPerSecond = breaksPerSecond;
+
+	/*
+	 * How many breakpoints can we set?
+	 */
+
+	TBool done = EFalse;
+
+	// We assume all the breakpoints id's are issued in ascending order
+	TInt maxBreakPoints = 0;
+
+	// Temporary buffer
+	RArray<TBreakId> breakIdList;
+
+	TUint32 testAddress = address;
+
+	while(!done)
+		{
+		TBreakId breakId = 0;
+
+		// set the breakpoint
+		testAddress += 4;	// ensure the addresses don't overlap
+
+		err = iServSession.SetBreak(breakId, iThreadID, testAddress, EArmMode);
+		test (err == KErrNone || err == KErrOverflow);
+		if (err != KErrNone)
+			{
+			// we've reached the limit of the number of breaks we can set
+			done = ETrue;
+			break;
+			}
+
+		// store the id of this breakpoint
+		breakIdList.Append(breakId);
+
+		// Increase the count of breakpoints
+		maxBreakPoints++;
+		test(maxBreakPoints > 0);
+		}
+
+	// How many breakpoints can we set?
+	iMaxBreakpoints = maxBreakPoints;
+
+	// now clear all those breakpoints again
+	while(breakIdList.Count() != 0)
+		{
+		// Place it into a TBreakId
+		TBreakId id = breakIdList[0];
+
+		err = iServSession.ClearBreak(id);
+		test(err == KErrNone);
+
+		// next id
+		breakIdList.Remove(0);
+		}
+
+	breakIdList.Close();
+
+	// close our temporary buffers
+	originalDataBlock.Close();
+	testDataBlock.Close();
+
+	err = iServSession.ResumeThread(iThreadID);
+	test (err == KErrNone);
+
+	test(KErrNone == iServSession.DetachExecutable(iFileName));
+	}
+
+//---------------------------------------------
+//! @SYMTestCaseID KBase-T-RMDEBUG2-0437
+//! @SYMTestType
+//! @SYMPREQ PREQ1426
+//! @SYMTestCaseDesc Test modifying breakpoints
+//! @SYMTestActions Several calls to modify breakpoints
+//! @SYMTestExpectedResults Valid requests should result in the breakpoints being changed, invalid requests should return errors
+//! @SYMTestPriority High
+//! @SYMTestStatus Implemented
+//---------------------------------------------
+void CRunModeAgent::TestModifyBreak()
+	{
+	test.Next(_L("TestModifyBreak\n"));
+
+	DoTestModifyBreak(ETrue);
+	DoTestModifyBreak(EFalse);
+	}
+
+void CRunModeAgent::DoTestModifyBreak(TBool aThreadSpecific)
+	{
+	test.Printf(_L("DoTestModifyBreak: aThreadSpecific: %d\n"), aThreadSpecific?1:0);
+
+	TInt err;
+
+	RProcess process;
+	TProcessId processId = process.Id();
+	process.Close();
+
+	test(KErrNone == iServSession.AttachExecutable(iFileName, EFalse));
+
+	//suspend the thread
+	test(KErrNone == iServSession.SuspendThread(iThreadID));
+
+	//an address in the target debug thread
+	TUint32 address = (TUint32)(&TestFunction);
+
+	//set an arm mode break point
+	TBreakId armBreakId = 0;
+	err = aThreadSpecific
+		? iServSession.SetBreak(armBreakId, iThreadID, address, EArmMode)
+		: iServSession.SetProcessBreak(armBreakId, processId, address, EArmMode);
+	test(err == KErrNone);
+
+	/*
+	 * Invalid thread
+	 */
+	err = aThreadSpecific
+		? iServSession.ModifyBreak(armBreakId, 0xbabababa, address, EArmMode)
+		: iServSession.ModifyProcessBreak(armBreakId, 0xbabababa, address, EArmMode);
+	test(err == KErrPermissionDenied);
+
+	/*
+	 * Valid address
+	 */
+	err = aThreadSpecific
+		? iServSession.ModifyBreak(armBreakId, iThreadID, address+4, EArmMode)
+		: iServSession.ModifyProcessBreak(armBreakId, processId, address+4, EArmMode);
+	test(err == KErrNone);
+
+	/*
+	 * Invalid address
+	 */
+	err = aThreadSpecific
+		? iServSession.ModifyBreak(armBreakId, iThreadID, 0, EArmMode)
+		: iServSession.ModifyProcessBreak(armBreakId, processId, 0, EArmMode);
+	test(err == KErrBadDescriptor);
+
+	/*
+	 * Thumb mode
+	 */
+	err = aThreadSpecific
+		? iServSession.ModifyBreak(armBreakId, iThreadID, address, EThumbMode)
+		: iServSession.ModifyProcessBreak(armBreakId, processId, address, EThumbMode);
+	test(err == KErrNone);
+
+	/*
+	 * Thumb2EE mode
+	 */
+	err = aThreadSpecific
+		? iServSession.ModifyBreak(armBreakId, iThreadID, address, EThumb2EEMode)
+		: iServSession.ModifyProcessBreak(armBreakId, processId, address, EThumb2EEMode);
+	test(err == KErrNotSupported);
+
+	/*
+	 * Arm mode
+	 */
+	err = aThreadSpecific
+		? iServSession.ModifyBreak(armBreakId, iThreadID, address, EArmMode)
+		: iServSession.ModifyProcessBreak(armBreakId, processId, address, EArmMode);
+	test(err == KErrNone);
+
+	// Finally, clear the breakpoint
+	err = iServSession.ClearBreak(armBreakId);
+	test(err == KErrNone);
+
+	//resume the thread
+	test(KErrNone == iServSession.ResumeThread(iThreadID));
+	test(KErrNone == iServSession.DetachExecutable(iFileName));
+	}
+
+//---------------------------------------------
+//! @SYMTestCaseID KBase-T-RMDEBUG2-0438
+//! @SYMTestType
+//! @SYMPREQ PREQ1426
+//! @SYMTestCaseDesc Test extracting information about breakpoints
+//! @SYMTestActions Several calls to get information about breakpoints
+//! @SYMTestExpectedResults All tests should pass and the target process should be left unaffected
+//! @SYMTestPriority High
+//! @SYMTestStatus Implemented
+//---------------------------------------------
+void CRunModeAgent::TestBreakInfo()
+	{
+	test.Next(_L("TestBreakInfo\n"));
+
+	DoTestBreakInfo(ETrue);
+	DoTestBreakInfo(EFalse);
+	}
+
+void CRunModeAgent::DoTestBreakInfo(TBool aThreadSpecific)
+	{
+	test.Printf(_L("DoTestModifyBreak: aThreadSpecific: %d\n"), aThreadSpecific?1:0);
+
+	TInt err;
+
+	RProcess process;
+	TProcessId processId = process.Id();
+	process.Close();
+
+	//an address in the target debug thread
+	TUint32 address = (TUint32)(&TestFunction);
+
+	test(KErrNone == iServSession.AttachExecutable(iFileName, EFalse));
+
+	//suspend thread
+	test(KErrNone == iServSession.SuspendThread(iThreadID));
+
+	//set an arm mode break point
+	TBreakId armBreakId = 0;
+	err = aThreadSpecific
+		? iServSession.SetBreak(armBreakId, iThreadID, address, EArmMode)
+		: iServSession.SetProcessBreak(armBreakId, processId, address, EArmMode);
+	test(err == KErrNone);
+
+	// Read back the information and check it is correct
+	TThreadId testThreadId = TThreadId(0);
+	TProcessId testProcessId = TProcessId(0);
+	TUint32 testAddress = 0;
+	TArchitectureMode testMode = EArmMode;
+
+	err = aThreadSpecific
+		? iServSession.BreakInfo(armBreakId,testThreadId,testAddress, testMode)
+		: iServSession.ProcessBreakInfo(armBreakId, testProcessId, testAddress, testMode);
+	test (err == KErrNone);
+	test (aThreadSpecific ? (testThreadId == iThreadID) : (testProcessId == processId));
+	test (testAddress == address);
+	test (testMode == EArmMode);
+
+	//change the address
+	TUint32 changeAddress = address + 64;
+	err = aThreadSpecific
+		? iServSession.ModifyBreak(armBreakId, iThreadID, changeAddress,EArmMode)
+		: iServSession.ModifyProcessBreak(armBreakId, processId, changeAddress, EArmMode);
+	test(err == KErrNone);
+
+	// Check the address has changed
+	err = aThreadSpecific
+		? iServSession.BreakInfo(armBreakId,testThreadId,testAddress, testMode)
+		: iServSession.ProcessBreakInfo(armBreakId, testProcessId, testAddress, testMode);
+	test (err == KErrNone);
+	test (testAddress == changeAddress);
+
+	// change the architecture type
+	TArchitectureMode checkMode = EThumbMode;
+	err = aThreadSpecific
+		? iServSession.ModifyBreak(armBreakId, iThreadID, address,checkMode)
+		: iServSession.ModifyProcessBreak(armBreakId, processId, address, checkMode);
+	test (err == KErrNone);
+
+	// Check the mode has changed
+	err = aThreadSpecific
+		? iServSession.BreakInfo(armBreakId,testThreadId,testAddress,testMode)
+		: iServSession.ProcessBreakInfo(armBreakId, testProcessId, testAddress, testMode);
+	test (err == KErrNone);
+	test (testMode == checkMode);
+
+	// clear the breakpoint again
+	err = iServSession.ClearBreak(armBreakId);
+	test (err == KErrNone);
+
+	//resume thread
+	test(KErrNone == iServSession.ResumeThread(iThreadID));
+	test(KErrNone == iServSession.DetachExecutable(iFileName));
+	}
+
+// Needed for the RunToBreak test
+IMPORT_C extern void RMDebug_BranchTst1();
+IMPORT_C extern void RMDebug_BranchTst2();
+
+//---------------------------------------------
+//! @SYMTestCaseID KBase-T-RMDEBUG2-0439
+//! @SYMTestType
+//! @SYMPREQ PREQ1426
+//! @SYMTestCaseDesc Test hitting various types of breakpoints
+//! @SYMTestActions Several calls to register to observe breakpoints and to hit breakpoints of different types
+//! @SYMTestExpectedResults All tests should pass and the target process should be left unaffected
+//! @SYMTestPriority High
+//! @SYMTestStatus Implemented
+//---------------------------------------------
+void CRunModeAgent::TestRunToBreak()
+	{
+	test.Next(_L("TestRunToBreak\n"));
+
+	DoTestRunToBreak(ETrue);
+	DoTestRunToBreak(EFalse);
+	}
+
+void CRunModeAgent::DoTestRunToBreak(TBool aThreadSpecific)
+	{
+	test.Printf(_L("DoTestRunToBreak: aThreadSpecific: %d\n"), aThreadSpecific?1:0);
+
+	TInt err = KErrNone;
+
+	RProcess process;
+	TProcessId processId = process.Id();
+	process.Close();
+
+	test(KErrNone == iServSession.AttachExecutable(iFileName, EFalse));
+	// we should suspend the thread first, then set the breakpoint
+	err = iServSession.SuspendThread(iThreadID);
+	test (err == KErrNone);
+
+	// Try to set the breakpoint
+	TBreakId armBreakId;
+	TUint32 address = (TUint32)(&RMDebug_BranchTst1);
+
+	err = aThreadSpecific
+		? iServSession.SetBreak(armBreakId,iThreadID,address,EArmMode)
+		: iServSession.SetProcessBreak(armBreakId, processId, address, EArmMode);
+	test(err == KErrNone);
+
+	err = aThreadSpecific
+		? iServSession.SetEventAction(iFileName,EEventsBreakPoint, EActionContinue)
+		: iServSession.SetEventAction(iFileName,EEventsProcessBreakPoint, EActionContinue);
+	test (err == KErrNone);
+
+	// Continue the thread
+	err = iServSession.ResumeThread(iThreadID);
+	test (err == KErrNone);
+
+	// wait for the breakpoint to be hit
+	TEventInfo info;
+	static TRequestStatus status;
+
+	TPtr8 infoPtr((TUint8*)&info,0,sizeof(TEventInfo));
+
+	iServSession.GetEvent(iFileName,status,infoPtr);
+
+	// Wait for notification of the breakpoint hit event
+	User::WaitForRequest(status);
+	test(status==KErrNone);
+
+	// info should now be filled with the details
+	test(info.iEventType == (aThreadSpecific ? EEventsBreakPoint : EEventsProcessBreakPoint));
+	test(info.iThreadBreakPointInfo.iRmdArmExcInfo.iR15 == address);
+	test(info.iProcessIdValid);
+	test(info.iThreadIdValid);
+
+	// Not interested in breakpoint events any more
+	err = aThreadSpecific
+		? iServSession.SetEventAction(iFileName,EEventsBreakPoint, EActionIgnore)
+		: iServSession.SetEventAction(iFileName, EEventsProcessBreakPoint, EActionIgnore);
+	test (err == KErrNone);
+
+	// Clear the breakpoint again
+	err = iServSession.ClearBreak(armBreakId);
+	test(err == KErrNone);
+
+	// continue the thread again
+	err = iServSession.ResumeThread(iThreadID);
+	test (err == KErrNone);
+	test(KErrNone == iServSession.DetachExecutable(iFileName));
+	}
+
+//---------------------------------------------
+//! @SYMTestCaseID KBASE-rmdebug2-2704
+//! @SYMTestType
+//! @SYMPREQ PREQ1426
+//! @SYMTestCaseDesc Test breakpoints in a loop
+//! @SYMTestActions Several calls to register to verify breakpoints are stopping at correct address
+//! @SYMTestExpectedResults All tests should pass and the target thread should be left unaffected
+//! @SYMTestPriority High
+//! @SYMTestStatus Implemented
+//---------------------------------------------
+void CRunModeAgent::TestBreakPointsInLoop()
+	{
+	test.Next(_L("TestBreakPointsInLoop\n"));
+
+	DoTestBreakPointsInLoop(ETrue);
+	DoTestBreakPointsInLoop(EFalse);
+	}
+
+void CRunModeAgent::DoTestBreakPointsInLoop(TBool aThreadSpecific)
+	{
+	test.Printf(_L("DoTestBreakPointsInLoop: aThreadSpecific: %d\n"), aThreadSpecific?1:0);
+
+	TInt err = KErrNone;
+	TProcessId processId = RProcess().Id(); 
+
+	test(KErrNone == iServSession.AttachExecutable(iFileName, EFalse));
+	
+	// We should suspend the thread first, then set the breakpoint
+	err = iServSession.SuspendThread(iThreadID);
+	test (err == KErrNone);
+
+	// 2 breakpoints are sufficient to find issues with hitting breakpoints in a loop
+	const TInt numOfBreakPointsInLoop = 2;
+
+	TBreakId armBreakId[numOfBreakPointsInLoop];
+	TUint32 address[numOfBreakPointsInLoop];
+   	
+	TUint32 entryAddress = (TUint32)(&RMDebug_Bkpt_Test_Entry);
+	TBreakId entryArmBreakId;
+
+	// Copy breakpoint address's in array
+	address[0] = (TUint32)(&RMDebug_Bkpt_Test_Loop_Break_1);
+	address[1] = (TUint32)(&RMDebug_Bkpt_Test_Loop_Break_2);
+
+	err = aThreadSpecific
+		? iServSession.SetBreak(entryArmBreakId,iThreadID,entryAddress,EArmMode)
+		: iServSession.SetProcessBreak(entryArmBreakId, processId, entryAddress, EArmMode);
+	test(err == KErrNone);
+
+	// Try to set the breakpoints inside loop
+	for (TInt i = 0; i < numOfBreakPointsInLoop; i++)
+		{
+		err = aThreadSpecific
+			? iServSession.SetBreak(armBreakId[i],iThreadID,address[i],EArmMode)
+			: iServSession.SetProcessBreak(armBreakId[i], processId, address[i], EArmMode);
+		test(err == KErrNone);
+		}
+
+	err = aThreadSpecific
+		? iServSession.SetEventAction(iFileName,EEventsBreakPoint, EActionSuspend)
+		: iServSession.SetEventAction(iFileName,EEventsProcessBreakPoint, EActionSuspend);
+	test (err == KErrNone);
+
+	// Continue the thread
+	err = iServSession.ResumeThread(iThreadID);
+	test (err == KErrNone);
+
+	// Wait for the breakpoint to be hit
+	TEventInfo info;
+	TRequestStatus status;
+
+	TPtr8 infoPtr((TUint8*)&info,0,sizeof(TEventInfo));
+	iServSession.GetEvent(iFileName,status,infoPtr);
+
+	// Wait for notification of breakpoint event
+	User::WaitForRequest(status);
+	test(status==KErrNone);
+
+	// Info should now be filled with the details
+	test(info.iEventType == (aThreadSpecific ? EEventsBreakPoint : EEventsProcessBreakPoint));
+
+	// Have we stopped at the correct breakpoint?
+	test(info.iThreadBreakPointInfo.iRmdArmExcInfo.iR15 == entryAddress);
+	test(info.iProcessIdValid);
+	test(info.iThreadIdValid);
+
+	// Don't require the entry breakpoint anymore
+	err = iServSession.ClearBreak(entryArmBreakId);
+	test(err == KErrNone);
+	
+	// Stress the system by setting loop count to 100
+	const TUint32 loopCount = 100;
+
+	for (TInt i = 0; i < loopCount; i++)
+		{
+		// Continue the thread
+		err = iServSession.ResumeThread(iThreadID);
+		test (err == KErrNone);
+
+		// Wait for the breakpoint to be hit
+		iServSession.GetEvent(iFileName,status,infoPtr);
+		
+		// Wait for notification of the breakpoint hit event
+		User::WaitForRequest(status);
+		test(status==KErrNone);
+		
+		// Info should now be filled with the details
+		test(info.iEventType == (aThreadSpecific ? EEventsBreakPoint : EEventsProcessBreakPoint));
+		
+		// Have we stopped at the correct breakpoint?
+		test(info.iThreadBreakPointInfo.iRmdArmExcInfo.iR15 == address[i%numOfBreakPointsInLoop]);
+		
+		// Check process and thread id too
+		test(info.iProcessIdValid);
+		test(info.iThreadIdValid);
+		}
+
+	// Not interested in breakpoint events any more
+	err = aThreadSpecific
+		? iServSession.SetEventAction(iFileName,EEventsBreakPoint, EActionIgnore)
+		: iServSession.SetEventAction(iFileName, EEventsProcessBreakPoint, EActionIgnore);
+	test (err == KErrNone);
+
+	// Clear breakpoints
+	for (TInt i = 0; i < numOfBreakPointsInLoop; i++)
+		{
+		err = iServSession.ClearBreak(armBreakId[i]);
+		test(err == KErrNone);
+		}
+	
+	// Continue the thread again
+	err = iServSession.ResumeThread(iThreadID);
+	test (err == KErrNone);
+	test(KErrNone == iServSession.DetachExecutable(iFileName));
+	}
+
+//----------------------------------------------------------------------------------------------
+//! @SYMTestCaseID      KBase-T-RMDEBUG2-0440
+//! @SYMTestType
+//! @SYMPREQ            PREQ1426
+//! @SYMTestCaseDesc    Test access to target user-side registers.
+//! @SYMTestActions     Suspends a target thread, and reads/writes target thread register contents
+//!
+//! @SYMTestExpectedResults KErrNone. Should access target registers without problems.
+//! @SYMTestPriority        High
+//! @SYMTestStatus          Implemented
+//----------------------------------------------------------------------------------------------
+
+void CRunModeAgent::TestRegisterAccess()
+	{
+	TInt err;
+
+	test.Next(_L("TestRegisterAccess - Read\n"));
+
+	test(KErrNone == iServSession.AttachExecutable(iFileName, EFalse));
+
+	//suspend the thread to read registers
+	err = iServSession.SuspendThread(iThreadID);
+	test(err==KErrNone);
+
+	//we'll try to read/write registers ERegisterR0 - ERegisterCPSR and ERegisterR13_IRQ
+	//this way should get valid register values back, invalid ones and not supported ones, and it
+	//means that the register IDs are not completely contiguous
+
+	TInt firstRegister = 0;
+	TInt lastRegister = 17;
+	TInt numberOfRegisters = (lastRegister - firstRegister) + 1;
+
+	RBuf8 ids;
+	err = ids.Create(numberOfRegisters * sizeof(TRegisterInfo));
+	test(err == KErrNone);
+
+	for(TInt i=0; i<numberOfRegisters - 1; i++)
+		{
+		TRegisterInfo reg = (TRegisterInfo)((i + firstRegister)<<8);
+		ids.Append(reinterpret_cast<const TUint8*>(&reg), sizeof(TRegisterInfo));
+		}
+
+	TRegisterInfo reg = ERegisterR13Irq;
+	ids.Append(reinterpret_cast<const TUint8*>(&reg), sizeof(TRegisterInfo));
+
+	//create a buffer to store the register values in
+	RBuf8 originalValues;
+	err = originalValues.Create(numberOfRegisters*sizeof(TUint32));
+	test(err == KErrNone);
+
+	//create a buffer to store the register flags in
+	RBuf8 originalFlags;
+	err = originalFlags.Create(numberOfRegisters*sizeof(TUint8));
+	test(err == KErrNone);
+
+	//read register values
+	err = iServSession.ReadRegisters(iThreadID, ids, originalValues, originalFlags);
+	test(err == KErrNone);
+
+	//create a buffer containing data to write into the registers
+	RBuf8 tempValues;
+	err = tempValues.Create(numberOfRegisters*sizeof(TUint32));
+	test(err == KErrNone);
+
+	TUint cpsrId = 16;
+	for(TUint8 i=0; i<numberOfRegisters*sizeof(TUint32); i++)
+		{
+		if(i/sizeof(TUint32) == cpsrId)
+			{
+			//For the CPSR we wish to write data that makes sense - for USR mode we are
+			//allowed change all except the mode, ie. we must stay in usr mode. We try that here
+			//(allowedCPSRValue[4:0] = 10000) thus not changing the mode.
+			TUint32 allowedCPSRValue = 0x50000010;
+			tempValues.Append((TUint8*)&allowedCPSRValue, 4);
+			i += 3;
+			}
+		else
+			{
+			tempValues.Append(&i, 1);
+			}
+		}
+
+	test.Next(_L("TestRegisterAccess - Write\n"));
+
+	//create a buffer to store the register flags in
+	RBuf8 tempWriteFlags;
+	err = tempWriteFlags.Create(numberOfRegisters*sizeof(TUint8));
+	test(err == KErrNone);
+
+	//write the temp data into the registers
+	err = iServSession.WriteRegisters(iThreadID, ids, tempValues, tempWriteFlags);
+	test(err == KErrNone);
+
+	//create another buffer to store the register flags in
+	RBuf8 tempReadFlags;
+	err = tempReadFlags.Create(numberOfRegisters*sizeof(TUint8));
+	test(err == KErrNone);
+
+	RBuf8 tempReadValues;
+	err = tempReadValues.Create(numberOfRegisters*sizeof(TUint32));
+	test(err == KErrNone);
+
+	//read the temp data out again
+	err = iServSession.ReadRegisters(iThreadID, ids, tempReadValues, tempReadFlags);
+	test(err == KErrNone);
+
+	//check values are correct
+	for(TInt i=0; i<numberOfRegisters; i++)
+		{
+		TRegisterFlag writeFlag;
+		err = GetFlag(tempWriteFlags, i, writeFlag);
+		test(err == KErrNone);
+
+		TRegisterFlag readFlag;
+		err = GetFlag(tempReadFlags, i, readFlag);
+		test(err == KErrNone);
+
+		if((writeFlag == EValid) && (readFlag == EValid))
+			{
+			TUint8 offset = i * sizeof(TUint32);
+			for(TUint j = offset; j< offset + sizeof(TUint32); j++)
+				{
+				test(tempValues.Ptr()[j] == tempReadValues.Ptr()[j]);
+				}
+			}
+		}
+
+	//write the original data into the registers
+	err = iServSession.WriteRegisters(iThreadID, ids, originalValues, originalFlags);
+	test(err == KErrNone);
+
+	//read the data out again
+	err = iServSession.ReadRegisters(iThreadID, ids, tempValues, tempReadFlags);
+	test(err == KErrNone);
+
+	//check values are correct
+	for(TInt i=0; i<numberOfRegisters; i++)
+		{
+		TRegisterFlag writeFlag;
+		err = GetFlag(originalFlags, i, writeFlag);
+		test(err == KErrNone);
+
+		TRegisterFlag readFlag;
+		err = GetFlag(tempReadFlags, i, readFlag);
+		test(err == KErrNone);
+
+		if((writeFlag == EValid) && (readFlag == EValid))
+			{
+			TUint8 offset = i * sizeof(TUint32);
+			for(TUint j = offset; j< offset + sizeof(TUint32); j++)
+				{
+				test(tempValues.Ptr()[j] == originalValues.Ptr()[j]);
+				}
+			}
+		}
+
+	test.Next(_L("TestRegisterAccess - Invalid data\n"));
+
+	//create a buffer of max size 1
+	RBuf8 emptyBuffer;
+	emptyBuffer.Create(1);
+
+	//test register IDs buffer not being a multiple of sizeof(TRegisterInfo)
+	err = iServSession.ReadRegisters(iThreadID, emptyBuffer, tempValues, tempReadFlags);
+	test(err == KErrArgument);
+
+	//test register values buffer not being a multiple of sizeof(TUint32)
+	err = iServSession.ReadRegisters(iThreadID, ids, emptyBuffer, tempReadFlags);
+	test(err == KErrArgument);
+
+	//test flags buffer being representing different number of registers from other two
+	err = iServSession.ReadRegisters(iThreadID, ids, tempValues, emptyBuffer);
+	test(err == KErrArgument);
+
+	//set max length to 0
+	emptyBuffer.ReAlloc(0);
+
+	//test ids buffer being of 0 max length
+	err = iServSession.ReadRegisters(iThreadID, emptyBuffer, tempValues, tempReadFlags);
+	test(err == KErrArgument);
+
+	//do cleanup
+	emptyBuffer.Close();
+	tempValues.Close();
+	tempWriteFlags.Close();
+	tempReadFlags.Close();
+	tempReadValues.Close();
+
+	test.Next(_L("TestRegisterAccess - Setting PC value\n"));
+
+	//create buffer containing PC register ID
+	RBuf8 pcId;
+	err = pcId.Create(sizeof(TRegisterInfo));
+	test(err == KErrNone);
+	TRegisterInfo reg1 = (TRegisterInfo)0x00000f00;
+	pcId.Append(reinterpret_cast<const TUint8*>(&reg1), sizeof(TRegisterInfo));
+
+	//create buffer containing desired PC value
+	RBuf8 pcValue;
+	err = pcValue.Create(sizeof(TUint32));
+	test(err == KErrNone);
+	TUint32 address = (TUint32)(&TestFunction);
+	pcValue.Append(reinterpret_cast<const TUint8*>(&address), sizeof(TUint32));
+
+	//craete buffer for PC flag value
+	RBuf8 pcFlag;
+	err = pcFlag.Create(sizeof(TUint8));
+
+	//write the new PC value
+	err = iServSession.WriteRegisters(iThreadID, pcId, pcValue, pcFlag);
+	test(err==KErrNone);
+
+	//get the flag and check the PC value was written ok
+	TRegisterFlag flag = ENotSupported;
+	err = GetFlag(pcFlag, 0, flag);
+	test(err==KErrNone);
+	test( flag == EValid);
+	if(flag == EValid)
+		{
+		/* The PC value was changed to execute the function TestFunction.
+		* TestFunction changes the value of TestData to a given value and 
+		* then calls RMDebug_BranchTst1.
+		* We place a breakpoint on RMDebug_BranchTst1 so that to we are able 
+		* to test the value of TestData.
+		*/
+
+		test(KErrNone == iServSession.SetEventAction(iFileName,EEventsBreakPoint, EActionSuspend));
+		TBreakId armBreakId;
+		TUint32 address = (TUint32)(&RMDebug_BranchTst1);
+		test(KErrNone == iServSession.SetBreak(armBreakId,iThreadID,address,EArmMode));
+
+		// Continue the thread
+		test(KErrNone == iServSession.ResumeThread(iThreadID));
+
+		// wait for the breakpoint to be hit
+		TEventInfo info;
+		static TRequestStatus status;
+
+		TPtr8 infoPtr((TUint8*)&info,0,sizeof(TEventInfo));
+		iServSession.GetEvent(iFileName,status,infoPtr);
+
+		// Wait for notification of the breakpoint hit event
+		User::WaitForRequest(status);
+		test(status==KErrNone);
+
+		// info should now be filled with the details
+		test(info.iEventType == EEventsBreakPoint);
+		test(info.iThreadBreakPointInfo.iRmdArmExcInfo.iR15 == address);
+		test(info.iProcessIdValid);
+		test(info.iThreadIdValid);
+
+		test(KErrNone == iServSession.ClearBreak(armBreakId));
+
+		// Finally test the value
+		test(TestData == 0xffeeddcc);
+		}
+
+	//Make sure we cannot change the CPSR
+	test.Next(_L("Verifying we cannot change the CPSR mode from USR Mode"));
+
+	TUint32 disallowedCpsr = 0x50000013;
+
+	RBuf8 cpsrRegId;
+	err = cpsrRegId.Create(sizeof(TUint32));
+	test(err == KErrNone);
+
+	TRegisterInfo cpsr = (TRegisterInfo)((cpsrId + firstRegister)<<8);
+	cpsrRegId.Append(reinterpret_cast<const TUint8*>(&cpsr), sizeof(TRegisterInfo));
+
+	RBuf8 cpsrRegFlags;
+	err = cpsrRegFlags.Create(sizeof(TUint8));
+	test(err == KErrNone);
+
+	RBuf8 cpsrVal;
+	err = cpsrVal.Create(sizeof(TUint32));
+	test(err == KErrNone);
+
+	cpsrVal.Append((TUint8*)&disallowedCpsr, 4);
+
+	//attempt to write disallowed CPSR in
+	err = iServSession.WriteRegisters(iThreadID, cpsrRegId, cpsrVal, cpsrRegFlags);
+	test(err == KErrNone);
+
+	RBuf8 cpsrReadVal;
+	err = cpsrReadVal.Create(sizeof(TUint32));
+	test(err == KErrNone);
+
+	//Read back the CPSR
+	err = iServSession.ReadRegisters(iThreadID, cpsrRegId, cpsrReadVal, cpsrRegFlags);
+	test(err == KErrNone);
+
+	//Make sure we havent switched modes ie. its not what we wrote
+	TUint32* readVal = (TUint32*)cpsrReadVal.Ptr();
+	test(*readVal != disallowedCpsr);
+
+	cpsrRegId.Close();
+	cpsrRegFlags.Close();
+	cpsrVal.Close();
+	cpsrReadVal.Close();
+
+	//write the original values back into here
+	err = iServSession.WriteRegisters(iThreadID, ids, originalValues, originalFlags);
+	test(err == KErrNone);
+	
+	test(KErrNone == SwitchTestFunction(EDefaultFunction));
+
+	// Resume the thread
+	err = iServSession.ResumeThread(iThreadID);
+	test(err==KErrNone);
+
+	test(KErrNone == iServSession.DetachExecutable(iFileName));
+
+	//do cleanup
+	pcId.Close();
+	pcValue.Close();
+	pcFlag.Close();
+	ids.Close();
+	originalValues.Close();
+	originalFlags.Close();
+	}
+
+//----------------------------------------------------------------------------------------------
+//! @SYMTestCaseID      KBase-T-RMDEBUG2-0441
+//! @SYMTestType
+//! @SYMPREQ            PREQ1426
+//! @SYMTestCaseDesc    Test registration/de-registration of debug interest in target exe with the Debug Security Server
+//! @SYMTestActions     As per description
+//!
+//! @SYMTestExpectedResults KErrNone.
+//! @SYMTestPriority        High
+//! @SYMTestStatus          Implemented
+//----------------------------------------------------------------------------------------------
+
+void CRunModeAgent::TestAttachExecutable()
+	{
+
+	test.Next(_L("TestAttachExecutable - Attach\n"));
+
+	//attach to process passively
+	test(KErrNone == iServSession.AttachExecutable(iFileName, ETrue));
+
+	//make a thread id for a non-existent thread
+	TThreadId threadId(0x12345678);
+
+	//get a handle to the target thread
+	RThread targetThread;
+	TInt err = targetThread.Open(threadId);
+	test(err != KErrNone);
+
+	//not registered for this thread's process (as it doesn't exist)
+	//so should fail security check
+	err = iServSession.ResumeThread(threadId);
+	test(err==KErrPermissionDenied || err==KErrNotFound); // newer DSS returns the more-descriptive KErrNotFound here
+
+	//try to attach to the same process (and fail)
+	test(KErrAlreadyExists == iServSession.AttachExecutable(iFileName, EFalse));
+
+	test.Next(_L("TestAttachExecutable - Detach\n"));
+
+	//detach from process
+	test(KErrNone == iServSession.DetachExecutable(iFileName));
+
+	//attach non-passively
+	test(KErrNone == iServSession.AttachExecutable(iFileName, EFalse));
+
+	//not registered for this thread's process (as it doesn't exist)
+	//so should fail security check
+	err = iServSession.ResumeThread(0x12345678);
+	test(err==KErrPermissionDenied || err==KErrNotFound); // newer DSS returns the more-descriptive KErrNotFound here
+	test(KErrNone == iServSession.DetachExecutable(iFileName));
+	}
+
+//----------------------------------------------------------------------------------------------
+//! @SYMTestCaseID      KBase-T-RMDEBUG2-0442
+//! @SYMTestType
+//! @SYMPREQ            PREQ1426
+//! @SYMTestCaseDesc    Tests single-stepping target threads.
+//! @SYMTestActions     Steps target thread assembly level instructions, mainly branch/change PC
+//!
+//! @SYMTestExpectedResults KErrNone.
+//! @SYMTestPriority        High
+//! @SYMTestStatus          Implemented
+//----------------------------------------------------------------------------------------------
+
+void CRunModeAgent::TestStep()
+	{
+	test.Next(_L("TestStep\n"));
+
+	DoTestStep(EFalse);
+	DoTestStep(ETrue);
+	}
+
+void CRunModeAgent::DoTestStep(TBool aThreadSpecific)
+	{
+	test.Printf(_L("DoTestStep: aThreadSpecific: %d\n"), aThreadSpecific?1:0);
+
+	TInt err = KErrNone;
+
+	RProcess process;
+	TProcessId processId = process.Id();
+	process.Close();
+
+	test(KErrNone == iServSession.AttachExecutable(iFileName, EFalse));
+	//set the target thread to execute the stepping functions
+	test(KErrNone == SwitchTestFunction(EStepFunction, EFalse));
+
+	
+	err = iServSession.SetEventAction(iFileName,EEventsBreakPoint, EActionContinue);
+	test (err == KErrNone);
+
+	if(!aThreadSpecific)
+		{
+		err = iServSession.SetEventAction(iFileName, EEventsProcessBreakPoint, EActionContinue);
+		test (err == KErrNone);
+		}
+
+	TUint32	startAddress;
+	TUint32	endAddress;
+
+	/*
+	 * RMDebug_StepTest_Non_PC_Modifying
+	 */
+	test.Next(_L("TestStep - Non-PC modifying\n"));
+
+	startAddress = (TUint32)(&RMDebug_StepTest_Non_PC_Modifying);
+
+	endAddress = (TUint32)(&RMDebug_StepTest_Non_PC_Modifying_OK);
+
+	err = aThreadSpecific
+		? HelpTestStep(iThreadID,startAddress,endAddress,EArmMode,1)
+		: HelpTestStep(iThreadID,startAddress,endAddress,EArmMode,1, EFalse, processId);
+	test(err==KErrNone);
+
+	/*
+	 * RMDebug_StepTest_Branch
+	 */
+	test.Next(_L("TestStep - Branch\n"));
+
+	startAddress = (TUint32)(&RMDebug_StepTest_Branch);
+
+	endAddress = (TUint32)(&RMDebug_StepTest_Branch_1);
+
+	err = aThreadSpecific
+		? HelpTestStep(iThreadID,startAddress,endAddress,EArmMode,1)
+		: HelpTestStep(iThreadID,startAddress,endAddress,EArmMode,1, EFalse, processId);
+	test(err==KErrNone);
+
+	/*
+	 * RMDebug_StepTest_Branch_And_Link
+	 */
+	test.Next(_L("TestStep - Branch_And_Link\n"));
+
+	startAddress = (TUint32)(&RMDebug_StepTest_Branch_And_Link_1);
+
+	endAddress = (TUint32)(&RMDebug_StepTest_Branch_And_Link_2);
+
+	err = aThreadSpecific
+		? HelpTestStep(iThreadID,startAddress,endAddress,EArmMode,1)
+		: HelpTestStep(iThreadID,startAddress,endAddress,EArmMode,1, EFalse, processId);
+	test(err==KErrNone);
+
+	/*
+	 * RMDebug_StepTest_MOV_PC
+	 */
+	test.Next(_L("TestStep - MOV PC,X\n"));
+
+	startAddress = (TUint32)(&RMDebug_StepTest_MOV_PC_1);
+
+	endAddress = (TUint32)(&RMDebug_StepTest_MOV_PC_2);
+
+	err = aThreadSpecific
+		? HelpTestStep(iThreadID,startAddress,endAddress,EArmMode,1)
+		: HelpTestStep(iThreadID,startAddress,endAddress,EArmMode,1, EFalse, processId);
+	test(err==KErrNone);
+
+	/*
+	 * RMDebug_StepTest_LDR_PC
+	 */
+	test.Next(_L("TestStep - LDR PC\n"));
+
+	startAddress = (TUint32)(&RMDebug_StepTest_LDR_PC);
+
+	endAddress = (TUint32)(&RMDebug_StepTest_LDR_PC_1);
+
+	err = aThreadSpecific
+		? HelpTestStep(iThreadID,startAddress,endAddress,EArmMode,1)
+		: HelpTestStep(iThreadID,startAddress,endAddress,EArmMode,1, EFalse, processId);
+	test(err==KErrNone);
+
+// thumb and interworking tests are not supported on armv4
+#ifdef __MARM_ARMV5__
+
+	/*
+	 * RMDebug_StepTest_Thumb_Non_PC_Modifying
+	 */
+	test.Next(_L("TestStep - Thumb Non PC-Modifying\n"));
+
+	startAddress = (TUint32)(&RMDebug_StepTest_Thumb_Non_PC_Modifying_1);
+
+	endAddress = (TUint32)(&RMDebug_StepTest_Thumb_Non_PC_Modifying_2);
+
+	err = aThreadSpecific
+		? HelpTestStep(iThreadID,startAddress,endAddress,EThumbMode,1)
+		: HelpTestStep(iThreadID,startAddress,endAddress,EThumbMode,1, EFalse, processId);
+	test(err==KErrNone);
+
+	/*
+	 * RMDebug_StepTest_Thumb_Branch
+	 */
+	test.Next(_L("TestStep - Thumb Branch\n"));
+
+	startAddress = (TUint32)(&RMDebug_StepTest_Thumb_Branch_1);
+
+	endAddress = (TUint32)(&RMDebug_StepTest_Thumb_Branch_2);
+
+	err = aThreadSpecific
+		? HelpTestStep(iThreadID,startAddress,endAddress,EThumbMode,1)
+		: HelpTestStep(iThreadID,startAddress,endAddress,EThumbMode,1, EFalse, processId);
+	test(err==KErrNone);
+
+	/*
+	 * RMDebug_StepTest_Thumb_Branch_And_Link
+	 */
+	test.Next(_L("TestStep - Thumb Branch_And_Link\n"));
+
+	startAddress = (TUint32)(&RMDebug_StepTest_Thumb_Branch_And_Link_2);
+
+	endAddress = (TUint32)(&RMDebug_StepTest_Thumb_Branch_And_Link_3);
+
+	TInt muid=0;
+    test(HAL::Get(HAL::EMachineUid, muid)==KErrNone);
+
+	// check if running on ARMv7 core
+	if(muid==HAL::EMachineUid_OmapH6 || muid==HAL::EMachineUid_OmapZoom || muid==HAL::EMachineUid_EmuBoard)
+        {
+        // Note: ARMv7 treats BL instructions as single 32-bit instructions
+        err = aThreadSpecific
+		? HelpTestStep(iThreadID,startAddress,endAddress,EThumbMode,1)
+		: HelpTestStep(iThreadID,startAddress,endAddress,EThumbMode,1, EFalse, processId);
+        }
+    else
+	    {
+        // Note: Due to the fact that the stepper treats BL instructions
+		// as two instructions (as the hardware does), then we must step
+		// the first half instruction first)
+
+		err = aThreadSpecific
+		? HelpTestStep(iThreadID,startAddress,startAddress+2,EThumbMode,1)
+		: HelpTestStep(iThreadID,startAddress,startAddress+2,EThumbMode,1, EFalse, processId);
+		test(err==KErrNone);
+
+	// Now we actually do the BL
+	err = aThreadSpecific
+		? HelpTestStep(iThreadID,startAddress+2,endAddress,EThumbMode,1)
+		: HelpTestStep(iThreadID,startAddress+2,endAddress,EThumbMode,1, EFalse, processId);
+        }
+	test(err==KErrNone);
+
+	/*
+	 * RMDebug_StepTest_Thumb_Back_Branch_And_Link
+	 */
+	test.Next(_L("TestStep - Thumb Back_Branch_And_Link\n"));
+
+	startAddress = (TUint32)(&RMDebug_StepTest_Thumb_Back_Branch_And_Link_2);
+
+	endAddress = (TUint32)(&RMDebug_StepTest_Thumb_Back_Branch_And_Link_3);
+
+	// check if running on ARMv7 core
+	if(muid==HAL::EMachineUid_OmapH6 || muid==HAL::EMachineUid_OmapZoom || muid==HAL::EMachineUid_EmuBoard)
+		{
+		// Note: ARMv7 treats BL instructions as single 32-bit instructions
+		err = aThreadSpecific
+			? HelpTestStep(iThreadID,startAddress,endAddress,EThumbMode,1)
+			: HelpTestStep(iThreadID,startAddress,endAddress,EThumbMode,1, EFalse, processId);
+		}
+	else
+		{
+		// Note: Due to the fact that the stepper treats BL instructions
+		// as two instructions (as the hardware does), then we must step
+		// the first half instruction first)
+
+		err = aThreadSpecific
+	   		? HelpTestStep(iThreadID,startAddress,startAddress+2,EThumbMode,1)
+			: HelpTestStep(iThreadID,startAddress,startAddress+2,EThumbMode,1, EFalse, processId);
+		test(err==KErrNone);
+
+	   	// Now we actually do the BL
+		err = aThreadSpecific
+   			? HelpTestStep(iThreadID,startAddress+2,endAddress,EThumbMode,1)
+			: HelpTestStep(iThreadID,startAddress+2,endAddress,EThumbMode,1, EFalse, processId);
+		}
+	test(err==KErrNone);
+
+	/*
+	 * RMDebug_StepTest_Thumb_AddPC
+	 */
+	test.Next(_L("TestStep - Thumb ADD PC, PC, R0\n"));
+
+	startAddress = (TUint32)(&RMDebug_StepTest_Thumb_AddPC_2);
+
+	endAddress = (TUint32)(&RMDebug_StepTest_Thumb_AddPC_3);
+
+	err = aThreadSpecific
+		? HelpTestStep(iThreadID,startAddress,endAddress,EThumbMode,1)
+		: HelpTestStep(iThreadID,startAddress,endAddress,EThumbMode,1, EFalse, processId);
+	test(err==KErrNone);
+
+	/*
+	 * RMDebug_StepTest_Interwork ARM to Thumb
+	 */
+	test.Next(_L("TestStep - Interworking ARM to Thumb - BLX \n"));
+
+	startAddress = (TUint32)(&RMDebug_StepTest_Interwork_1);
+
+	endAddress = (TUint32)(&RMDebug_StepTest_Interwork_2);
+
+	err = aThreadSpecific // nb initial breakpoint in ARM code
+		? HelpTestStep(iThreadID,startAddress,endAddress,EArmMode,1)
+		: HelpTestStep(iThreadID,startAddress,endAddress,EArmMode,1, EFalse, processId);
+
+	test(err==KErrNone);
+
+	/*
+	 * RMDebug_StepTest_Interwork Thumb to ARM
+	 */
+	test.Next(_L("TestStep - Interworking Thumb to ARM - BLX\n"));
+
+	startAddress = (TUint32)(&RMDebug_StepTest_Interwork_2);
+
+	endAddress = (TUint32)(&RMDebug_StepTest_Interwork_3);
+
+	// check if running on ARMv7 core
+	if(muid==HAL::EMachineUid_OmapH6 || muid==HAL::EMachineUid_OmapZoom || muid==HAL::EMachineUid_EmuBoard)
+        {
+        // ARMv7 treats BLX instructions as single 32-bit instructions
+        err = aThreadSpecific
+		? HelpTestStep(iThreadID,startAddress,endAddress,EThumbMode,1)
+		: HelpTestStep(iThreadID,startAddress,endAddress,EThumbMode,1, EFalse, processId);
+        }
+    else
+        {
+    	// Stepper treats this as a two-stage instruction (just like the hardware)
+	err = aThreadSpecific
+		? HelpTestStep(iThreadID,startAddress,startAddress+2,EThumbMode,1)
+		: HelpTestStep(iThreadID,startAddress,startAddress+2,EThumbMode,1, EFalse, processId);
+	test(err == KErrNone);
+
+	err = aThreadSpecific
+		? HelpTestStep(iThreadID,startAddress+2,endAddress,EThumbMode,1)
+		: HelpTestStep(iThreadID,startAddress+2,endAddress,EThumbMode,1, EFalse, processId);
+        }
+	test(err == KErrNone);
+
+#endif // __MARM_ARMV5__
+
+	/*
+	 * Test multiple-step of ARM code
+	 */
+	test.Next(_L("TestStep - ARM Multiple instruction step\n"));
+
+	startAddress = (TUint32)(&RMDebug_StepTest_ARM_Step_Multiple);
+
+	endAddress = (TUint32)(&RMDebug_StepTest_ARM_Step_Multiple_1);
+
+	err = aThreadSpecific
+		? HelpTestStep(iThreadID,startAddress,endAddress,EArmMode,5)
+		: HelpTestStep(iThreadID,startAddress,endAddress,EArmMode,5, EFalse, processId);
+	test(err == KErrNone);
+	// stepping performance
+	test.Next(_L("TestStep - Steps per second\n"));
+
+	// run until we reach RMDebug_StepTest_Count_1
+	TBreakId stepBreakId;
+	startAddress = (TUint32)(&RMDebug_StepTest_Count_1);
+	endAddress = (TUint32)(&RMDebug_StepTest_Count_2);
+
+	err = aThreadSpecific
+		? HelpTestStepSetBreak(stepBreakId,iThreadID,startAddress,EArmMode)
+		: HelpTestStepSetBreak(stepBreakId,iThreadID,startAddress,EArmMode,EFalse,processId);
+	test (err == KErrNone);
+
+	// wait until we hit the breakpoint
+	TEventInfo info;
+	err = HelpTestStepWaitForBreak(iFileName,info);
+	test (err == KErrNone);
+
+	// Now clear the breakpoint
+	err = iServSession.ClearBreak(stepBreakId);
+	test(err == KErrNone);
+
+	if(aThreadSpecific)
+		{
+		// now step the code
+		TInt stepsPerSecond = 0;
+
+		TUint32 stopTickCount = User::NTickCount() + HelpTicksPerSecond();
+
+		while (User::NTickCount() < stopTickCount)
+			{
+			err = iServSession.Step(iThreadID,1);
+			test (err == KErrNone);
+
+			// we need to wait now until the step completes before asking for the next step
+				{
+				TEventInfo info;
+				static TRequestStatus status;
+
+				TPtr8 infoPtr((TUint8*)&info,0,sizeof(TEventInfo));
+
+				iServSession.GetEvent(iFileName,status,infoPtr);
+
+				// Wait for notification of the breakpoint hit event
+				User::WaitForRequest(status);
+				test(status==KErrNone);
+				}
+
+			// Update the count of steps
+			stepsPerSecond += 1;
+
+			// Gone wrong if we do too many
+			test(stepsPerSecond < 10000);
+			}
+
+		iStepsPerSecond = stepsPerSecond;
+		test(iStepsPerSecond != 0);
+		}
+
+	// finally resume the thread
+	err = iServSession.ResumeThread(iThreadID);
+	test (err == KErrNone);
+
+	err = iServSession.SetEventAction(iFileName,EEventsBreakPoint, EActionIgnore);
+	test (err == KErrNone);
+
+	if(!aThreadSpecific)
+		{
+		err = iServSession.SetEventAction(iFileName, EEventsProcessBreakPoint, EActionIgnore);
+		test (err == KErrNone);
+		}
+
+	test(KErrNone == iServSession.DetachExecutable(iFileName));
+	}
+
+//----------------------------------------------------------------------------------------------
+//! @SYMTestCaseID      KBase-T-RMDEBUG2-0443
+//! @SYMTestType
+//! @SYMPREQ            PREQ1426
+//! @SYMTestCaseDesc    Tests registration and occurrence of target thread event (in this case panic)
+//! @SYMTestActions     Registers for a panic in the target thread, causes it, and catches the panic notification.
+//!
+//! @SYMTestExpectedResults KErrNone.
+//! @SYMTestPriority        High
+//! @SYMTestStatus          Implemented
+//----------------------------------------------------------------------------------------------
+
+void CRunModeAgent::TestEvents()
+	{
+	TInt err = KErrNone;
+
+	test.Next(_L("TestEvents\n"));
+
+	TInt panicReason = 12345;
+
+	test.Printf(_L("Thread t_rmdebug.exe::DebugThread should panic with reason %d.\n"), panicReason);
+
+	//attach non-passively
+	test(KErrNone == iServSession.AttachExecutable(iFileName, EFalse));
+
+	RThread threadToPanic;
+	test(KErrNone == StartDebugThread(threadToPanic, _L("EventsThread")));
+	TThreadId threadToPanicId = threadToPanic.Id();
+	TEventInfo info;
+
+	// Set things up to wait for a thread kill event
+	err = iServSession.SetEventAction(iFileName, EEventsKillThread, EActionContinue);
+	test(err==KErrNone);
+
+	// Wait for an event to occur in this process - nothing should have happened yet.
+	static TRequestStatus status;
+
+	TPtr8 infoPtr((TUint8*)&info,0,sizeof(TEventInfo));
+
+	iServSession.GetEvent(iFileName,status,infoPtr);
+
+	// Test Request cancellation
+	err = iServSession.CancelGetEvent(iFileName);
+	test (err==KErrNone);
+
+	// Again wait for an event to occur in our process - we will provoke the
+	// thread kill event by panic'ing the test thread.
+	iServSession.GetEvent(iFileName,status,infoPtr);
+
+	// Panic the debug thread to cause a thread kill event
+	threadToPanic.Panic(_L("t_rmdebug panic thread test"), panicReason);
+
+	// Wait for notification of the Thread Kill event
+	User::WaitForRequest(status);
+	test(status==KErrNone);
+
+	// Check we are really recieving information about the panic
+	test(info.iProcessIdValid);
+	test(info.iThreadIdValid);
+	test(info.iProcessId==RProcess().Id());
+	test(info.iThreadId==threadToPanicId);
+	test(info.iEventType==EEventsKillThread);
+	test(info.iThreadKillInfo.iExitType==EExitPanic);
+
+	// Ignore other panic events
+	err = iServSession.SetEventAction(iFileName, EEventsKillThread, EActionIgnore);
+	test(err==KErrNone);
+
+	test(KErrNone == iServSession.DetachExecutable(iFileName));
+	}
+
+//----------------------------------------------------------------------------------------------
+//! @SYMTestCaseID      KBase-T-RMDEBUG2-0444
+//! @SYMTestType
+//! @SYMPREQ            PREQ1426
+//! @SYMTestCaseDesc    Tests registration and occurence of target thread events in separate process.
+//! @SYMTestActions     Registers for a hardware exception and kill thread events, and receives them.
+//!
+//! @SYMTestExpectedResults KErrNone.
+//! @SYMTestPriority        High
+//! @SYMTestStatus          Implemented
+//----------------------------------------------------------------------------------------------
+void CRunModeAgent::TestEventsForExternalProcess()
+	{
+	test.Next(_L("TestEventsForExternalProcess\n"));
+
+	for(TInt main=0; main<3; main++)
+		{
+		for(TInt extra=0; extra<3; extra++)
+			{
+			TestEventsWithExtraThreads((TKernelEventAction)main, (TKernelEventAction)extra, 0);
+			TestEventsWithExtraThreads((TKernelEventAction)main, (TKernelEventAction)extra, 2);
+			}
+		}
+	}
+
+void CRunModeAgent::TestEventsWithExtraThreads(TKernelEventAction aActionMain, TKernelEventAction aActionExtra, TUint32 aExtraThreads)
+	{
+	const TInt KNumberOfTypes = 8;
+	struct TEventStruct
+		{
+		public:
+		TDebugFunctionType iDebugFunctionType;
+		TEventType iEventType;
+		};
+
+	TEventStruct type[KNumberOfTypes] =
+		{
+			{EStackOverflowFunction, EEventsHwExc},
+			{EUserPanicFunction, EEventsKillThread},
+			{EPrefetchAbortFunction, EEventsHwExc},
+			{EDataAbortFunction, EEventsHwExc},
+			{EUndefInstructionFunction, EEventsHwExc},
+			{EDataReadErrorFunction, EEventsHwExc},
+			{EDataWriteErrorFunction, EEventsHwExc},
+			{EUserExceptionFunction, EEventsSwExc},
+		};
+
+	for(TInt j=0; j<KNumberOfTypes; j++)
+		{
+		if( gUseDelay ) User::After(500000);
+
+		RDebug::Printf("CRunModeAgent::TestEventsWithExtraThreads type: %d, main action: %d, extra action: %d, extraThreads: %d", 
+			j, (TUint32)aActionMain, (TUint32)aActionExtra, aExtraThreads);
+
+		// do this check as it seems to hard to do these cases with the current set up
+		if(EEventsKillThread == type[j].iEventType)
+			{
+			if(EActionSuspend != aActionMain)
+				{
+				if(aActionMain != aActionExtra)
+					{
+					return;
+					}
+				}
+			}
+		// attach to KRMDebugTestApplication
+		test(KErrNone == iServSession.AttachExecutable(KRMDebugTestApplication, EFalse));
+
+		// Set things up to wait for the expected exception in KRMDebugTestApplication
+		test(KErrNone == iServSession.SetEventAction(KRMDebugTestApplication, type[j].iEventType, aActionMain));
+
+		if(EActionSuspend != aActionMain)
+			{
+			test(KErrNone == iServSession.SetEventAction(KRMDebugTestApplication, EEventsKillThread, aActionExtra));
+			}
+
+		// declare a TRequestStatus object for asynchronous calls
+		TRequestStatus status;
+
+		TEventInfo info;
+		TPtr8 infoBuffer = TPtr8((TUint8*)&info,0,sizeof(TEventInfo));
+		if(EActionIgnore != aActionMain)
+			{
+			iServSession.GetEvent(KRMDebugTestApplication(), status, infoBuffer);
+			}
+
+		// launch the target process to trigger the expected exception
+		RProcess targetProcess;
+		test(KErrNone == LaunchProcess(targetProcess, KRMDebugTestApplication(), type[j].iDebugFunctionType, 0, aExtraThreads));
+		TProcessId processId(targetProcess.Id());
+		targetProcess.Close();
+
+		if(EActionIgnore != aActionMain)
+			{
+			// wait for notification of the exception
+			User::WaitForRequest(status);
+			test(KErrNone == status.Int());
+
+			// check that this is the event we were expecting
+			test(info.iProcessIdValid);
+			test(info.iThreadIdValid);
+			test(info.iProcessId==processId);
+			test(info.iEventType==type[j].iEventType);
+			}
+
+		if(EActionSuspend == aActionMain)
+			{
+			//RDebug::Printf("CRunModeAgent::TestEventsWithExtraThreads EActionSuspend == aActionMain, j=%d", j);
+			// read the thread list, partly to check the call works, and partly to check the thread still exists
+			test(ThreadExistsForProcess(info.iThreadId, info.iProcessId));
+
+			// register to catch all the thread kills which will occur
+			test(KErrNone == iServSession.SetEventAction(KRMDebugTestApplication, EEventsKillThread, aActionExtra));
+			// we specified EActionSuspend earlier so need to call resume on this thread
+			test(KErrNone == iServSession.ResumeThread(info.iThreadId));
+			}
+
+		// find out how many threads there are in the process and catch all the thread kill events,
+		// the number of kill thread events should correspond to the number of extra threads launched,
+		// plus one if the main thread panicked with a Sw/Hw exception
+		if(EActionIgnore != aActionExtra)
+			{
+			TInt dyingThreads = aExtraThreads + ( (type[j].iEventType != EEventsKillThread) ? 1 : 0);
+			for(TInt k=0; k<dyingThreads; k++)
+				{
+				//RDebug::Printf("CRunModeAgent::TestEventsWithExtraThreads dyingThreads, k=%d, j=%d", k,j);
+				iServSession.GetEvent(KRMDebugTestApplication(), status, infoBuffer);
+
+				// wait for notification of the kill thread
+				User::WaitForRequest(status);
+				test(KErrNone == status.Int());
+
+				// check that this is the event we were expecting
+				test(info.iProcessIdValid);
+				test(info.iThreadIdValid);
+				test(info.iProcessId==processId);
+				test(info.iEventType==EEventsKillThread);
+				if(EActionSuspend == aActionExtra)
+					{
+					// do some calls to check listings work ok at this stage
+					test(ProcessExists(info.iProcessId));
+					test(ThreadExistsForProcess(info.iThreadId, info.iProcessId));
+					// we specified EActionSuspend earlier so need to call resume on this thread
+					test(KErrNone == iServSession.ResumeThread(info.iThreadId));
+					}
+				}
+			}
+
+		if( gUseDelay ) User::After(500000);
+
+		// reset the thread kill event
+		test(KErrNone == iServSession.SetEventAction(KRMDebugTestApplication(), EEventsKillThread, EActionIgnore));
+
+		// reset events for KRMDebugTestApplication
+		test(KErrNone == iServSession.SetEventAction(KRMDebugTestApplication(), type[j].iEventType, EActionIgnore));
+
+		// finished debugging KRMDebugTestApplication so detach
+		test(KErrNone == iServSession.DetachExecutable(KRMDebugTestApplication()));
+	
+		// want to validate that the process has really exited, i.e. we're not accidentally keeping a handle to it...
+		TInt waitCount = 100;
+		while((waitCount-- > 0) && ProcessExists(processId))
+			{
+			/* Wait a little while and try again, just in case the process is still being removed.
+			This can happen on a very busy system or when a popup for the events is still active
+			*/
+			RDebug::Printf("CRunModeAgent::TestEventsWithExtraThreads. ProcessExists(id=%d), waiting count exit=%d", 
+				I64LOW(processId), waitCount);
+			User::After(50000);
+			}
+		//test(!ProcessExists(processId));
+		}
+	}
+
+// helper function to check whether a thread with id aThreadId exists in the process with id aProcessId
+TBool CRunModeAgent::ThreadExistsForProcess(const TThreadId aThreadId, const TProcessId aProcessId)
+	{
+	RThread lThread;
+	TInt ret = lThread.Open( aThreadId.Id() );
+
+	if( ret != KErrNone )
+		{
+		RDebug::Printf("ThreadExistsForProcess: thread id=%d opening returned %d",
+			I64LOW( aThreadId.Id() ), ret );
+		lThread.Close();
+		return EFalse;
+		}
+
+	RProcess lProcess;
+	ret = lThread.Process( lProcess );
+
+	lThread.Close();
+
+	if( ret != KErrNone )
+		{
+		RDebug::Printf("ThreadExistsForProcess: proc opening returned %d", ret );
+		ret = KErrNotFound;
+		}
+	else if( lProcess.Id() != aProcessId )
+		{
+		RDebug::Printf("ThreadExistsForProcess: lProcess.Id()(%d)!= aProcessId(%d)",
+				I64LOW(lProcess.Id().Id()), I64LOW(aProcessId.Id()));
+		ret = KErrNotFound;
+		}
+
+	lProcess.Close();
+	
+	return ( ret == KErrNone );
+	}
+
+// helper function to check whether a process with id aProcessId exists
+TBool CRunModeAgent::ProcessExists(const TProcessId aProcessId)
+	{
+	TUint32 size;
+	RBuf8 buffer;
+	test(KErrNone == buffer.Create(1024));
+	TInt err = iServSession.GetList(EProcesses, buffer, size);
+	while(KErrTooBig == err)
+		{
+		size*=2;
+		test(size<=47*1024); // 256 TProcessListEntrys is about 46KB. (256 is max num processes)
+		test(KErrNone == buffer.ReAlloc(size));
+		err = iServSession.GetList(EProcesses, buffer, size);
+		}
+	test(KErrNone == err);
+
+	//look through the buffer and check if the target debug thread is there
+	TUint8* ptr = (TUint8*)buffer.Ptr();
+	const TUint8* ptrEnd = ptr + size;
+	while(ptr < ptrEnd)
+		{
+		TProcessListEntry& entry = *(TProcessListEntry*)ptr;
+		if(aProcessId.Id() == entry.iProcessId)
+			{
+			buffer.Close();
+			return ETrue;
+			}
+		ptr += Align4(entry.GetSize());
+		}
+	buffer.Close();
+	return EFalse;
+	}
+
+//----------------------------------------------------------------------------------------------
+//! @SYMTestCaseID      KBase-T-RMDEBUG2-0445
+//! @SYMTestType
+//! @SYMPREQ            PREQ1426
+//! @SYMTestCaseDesc    Tests basic debug functions work on demand-paged target threads
+//! @SYMTestActions     Checks it can r/w memory, set breakpoints etc in a demand paged target.
+//!
+//! @SYMTestExpectedResults KErrNone.
+//! @SYMTestPriority        High
+//! @SYMTestStatus          Implemented
+//----------------------------------------------------------------------------------------------
+
+void CRunModeAgent::TestDemandPaging(void)
+	{
+	test.Next(_L("TestDemandPaging\n"));
+
+	test(KErrNone == iServSession.AttachExecutable(iFileName, EFalse));
+	test(KErrNone == iServSession.SuspendThread(iThreadID));
+
+	// get the address of a function in code that will be paged in
+	TUint32 address = (TUint32)(&RMDebugDemandPagingTest);
+	const TUint32 armInstSize = 4;
+
+	// read the memory at &RMDebugDemandPagingTest to check that reading memory in demand paged code works
+	TUint32 demandPagedInst = 0;
+	TPtr8 demandPagedInstBuf((TUint8*)&demandPagedInst, armInstSize);
+	test(KErrNone == iServSession.ReadMemory(iThreadID, address, armInstSize, demandPagedInstBuf, EAccess32, EEndLE8));
+
+	// this is the MOVS instruction that we expect to find in RMDebugDemandPagingTest
+	TUint32 expectedDemandPagedInst = 0xe1b02000;
+
+	// check that the instruction we read is as expected
+	test(demandPagedInst == expectedDemandPagedInst);
+
+	// set event action for break points
+	test(KErrNone == iServSession.SetEventAction(RProcess().FileName(), EEventsBreakPoint, EActionContinue));
+
+	// set an arm breakpoint on RMDebugDemandPagingTest
+	TBreakId armBreakId = 0;
+	test(KErrNone == iServSession.SetBreak(armBreakId, iThreadID, address, EArmMode));
+
+	// Ensure that after setting the breakpoint the memory read returns the correct value
+	TUint32 demandPagedInstWithBreakPoint = 0;
+	TPtr8 spinForeverInstWithBreakPointBuf((TUint8*)&demandPagedInstWithBreakPoint, armInstSize);
+	test(KErrNone == iServSession.ReadMemory(iThreadID, address, armInstSize, spinForeverInstWithBreakPointBuf, EAccess32, EEndLE8));
+	test(demandPagedInst == demandPagedInstWithBreakPoint);
+
+	// switch the target thread to run the demand paging function
+	test(KErrNone == SwitchTestFunction(EDemandPagingFunction));
+
+	// set up event watcher to catch breakpoint being hit in demand paged code
+	TEventInfo info;
+	static TRequestStatus status;
+	TPtr8 infoPtr((TUint8*)&info,sizeof(TEventInfo));
+	iServSession.GetEvent(RProcess().FileName(), status, infoPtr);
+
+	// resume the thread
+	test(KErrNone == iServSession.ResumeThread(iThreadID));
+	// wait for notification of the breakpoint hit event
+	User::WaitForRequest(status);
+	test(status==KErrNone);
+
+	// info should now be filled with the details
+	test(info.iProcessIdValid);
+	test(info.iThreadIdValid);
+	test(info.iEventType == EEventsBreakPoint);
+	test(info.iThreadBreakPointInfo.iRmdArmExcInfo.iR15 == address);
+
+	// remove the break point and resume the thread
+	test(KErrNone == iServSession.ClearBreak(armBreakId));
+
+	// switch the target thread to run the default function
+	test(KErrNone == SwitchTestFunction(EDefaultFunction));
+
+	test(KErrNone == iServSession.ResumeThread(iThreadID));
+	test(KErrNone == iServSession.DetachExecutable(iFileName));
+	}
+
+// Names of some test programs used for testing security
+_LIT(KRMDebugSecurity0FileName,"z:\\sys\\bin\\t_rmdebug_security0.exe"); // Debuggable
+_LIT(KRMDebugSecurity1FileName,"z:\\sys\\bin\\t_rmdebug_security1.exe"); // Not debuggable
+
+#if defined (NO_DEBUGTOKEN) || defined (SOMECAPS_DEBUGTOKEN) || defined(FEWCAPS_DEBUGTOKEN)
+_LIT(KRMDebugSecurity2FileName,"z:\\sys\\bin\\t_rmdebug_security2.exe"); // AllFiles
+#endif
+
+_LIT(KRMDebugSecurity3FileName,"z:\\sys\\bin\\t_rmdebug_security3.exe"); // TCB AllFiles
+
+// include the test header file here
+#include "rm_debug_kerneldriver.h"
+
+//----------------------------------------------------------------------------------------------
+//! @SYMTestCaseID      KBase-T-RMDEBUG2-0446
+//! @SYMTestType
+//! @SYMPREQ            PREQ1426
+//! @SYMTestCaseDesc    Tests Debug Device Driver is locked to the SID of the Debug Security Svr.
+//! @SYMTestActions     Loads rm-debug.ldd and tries to open a handle to it. This should fail.
+//!
+//! @SYMTestExpectedResults KErrPermissionDenied.
+//! @SYMTestPriority        High
+//! @SYMTestStatus          Implemented
+//----------------------------------------------------------------------------------------------
+
+void CRunModeAgent::TestDriverSecurity(void)
+	{
+	test.Next(_L("TestDriverSecurity\n"));
+
+	RRM_DebugDriver kernelDriver;
+
+	// Load the debug device driver
+	TInt err = User::LoadLogicalDevice( KDebugDriverFileName );
+	test((KErrNone == err) || (KErrAlreadyExists == err));
+
+	// we were allowed to load the driver, or its already loaded.
+
+	// Try to open a handle to the driver - this should return KErrPermissionDenied as we don't have the DSS SID
+	TRM_DebugDriverInfo driverInfo;
+	driverInfo.iUserLibraryEnd = 0;
+	err = kernelDriver.Open(driverInfo);
+	test((err == KErrInUse) || (err == KErrPermissionDenied));
+
+	}
+
+//----------------------------------------------------------------------------------------------
+//! @SYMTestCaseID      KBase-T-RMDEBUG2-0447
+//! @SYMTestType
+//! @SYMPREQ            PREQ1426
+//! @SYMTestCaseDesc    Tests Debug driver can only be access via the DSS. Also tests DSS cannot
+//!						be subverted. Tests functionality of two representative OEM Debug Tokens.
+//! @SYMTestActions     Tries to open rm_debug.ldd (should fail). Tries to debug various processes
+//!						(only debuggable one should succeed). Checks that DSS behaves correctly
+//!						when different versions are passed in to Connect().
+//!
+//! @SYMTestExpectedResults KErrPermissionDenied.
+//! @SYMTestPriority        High
+//! @SYMTestStatus          Implemented
+//----------------------------------------------------------------------------------------------
+
+void CRunModeAgent::TestSecurity(void)
+	{
+	// Things to test
+	//
+	// try to use debug driver directly ( should have the wrong UID/SID value!)
+	test.Next(_L("TestSecurity - Bypass Debug Security Server to Debug Device Driver - DSS running\n"));
+
+	// Things to test
+	//
+	// Load the debug device driver
+	RRM_DebugDriver kernelDriver;
+	TInt err = User::LoadLogicalDevice( KDebugDriverFileName );
+	test((KErrNone == err) || (KErrAlreadyExists == err));
+
+	// we were allowed to load the driver, or its already loaded.
+
+	// Try to open handle a to the driver - this should return KErrPermission/KErrInUse as we don't have the DSS SID
+	// and we expect the DSS to already be using it.
+	TRM_DebugDriverInfo driverInfo;
+	driverInfo.iUserLibraryEnd = 0;
+	err = kernelDriver.Open(driverInfo);
+	test(err == KErrInUse);
+
+	// Try requesting an unsupported version of DSS
+	test.Next(_L("TestSecurity - requesting unsupported versions of DSS\n"));
+	RSecuritySvrSession dss;
+	err = dss.Connect(TVersion(999999, 0, 0));
+	test(err == KErrNotSupported); // Prior to DEF142018 this would crash, causing a KErrServerTerminated
+	err = dss.Connect(TVersion(KDebugServMajorVersionNumber, 999999, 0));
+	test(err == KErrNotSupported); // Explicitly asking for a minor version should give KErrNotSupported too if it's newer than what's running.
+	err = dss.Connect(TVersion(KDebugServMajorVersionNumber, 0, 0));
+	test(err == KErrNone); // But the correct major version and no explicit minor version should always succeed
+	dss.Close();
+	
+	//
+	// Attach to the Debug Security Server (passive)
+	//
+	test.Next(_L("TestSecurity - Attach to the Debug Security Server (passive)\n"));
+
+	_LIT(KSecurityServerProcessName, "z:\\sys\\bin\\rm_debug_svr.exe");
+
+	test(KErrPermissionDenied == iServSession.AttachExecutable(KSecurityServerProcessName, ETrue));
+
+	//
+	// Attach to the Debug Security Server (active)
+	//
+	test.Next(_L("TestSecurity - Attach to the Debug Security Server (active)\n"));
+
+	test(KErrPermissionDenied == iServSession.AttachExecutable(KSecurityServerProcessName, EFalse));
+
+	//
+	// Attach to Process 0
+	//
+	// Target: Debuggable
+	//
+	test.Next(_L("TestSecurity - Attach to test process 0\n"));
+
+	// Agent can debug the target app as it is marked debuggable - ie capabilities are ignored)
+	HelpTestSecurityAttachDetachExecutable(KRMDebugSecurity0FileName,ETrue);
+
+	//
+	// Attach to Process - 1
+	//
+	// Target: Non-debuggable for ordinary debug agent, debuggable for OEM/OEM2 token authorised agent
+	//
+	// Note: This target app has no PlatSec capabilities
+	//
+	// Agent cannot debug the app unless it has an OEM/OEM2 Debug Token
+
+
+#ifdef NO_DEBUGTOKEN
+	test.Next(_L("TestSecurity NO_DEBUGTOKEN - Attach to test process 1\n"));
+	HelpTestSecurityAttachDetachExecutable(KRMDebugSecurity1FileName,EFalse);
+#endif
+
+#ifdef SOMECAPS_DEBUGTOKEN
+	test.Next(_L("TestSecurity SOMECAPS_DEBUGTOKEN - Attach to test process 1\n"));
+	HelpTestSecurityAttachDetachExecutable(KRMDebugSecurity1FileName,ETrue);
+#endif
+
+#ifdef FEWCAPS_DEBUGTOKEN
+	test.Next(_L("TestSecurity FEWCAPS_DEBUGTOKEN - Attach to test process 1\n"));
+	HelpTestSecurityAttachDetachExecutable(KRMDebugSecurity1FileName,ETrue);
+#endif
+
+	//
+	// Attach to Process - 2
+	//
+	// Target: Non-debuggable for ordinary debug agent, non-debuggable for OEM2 authorised agent (insufficient caps)
+	//
+	// Note: This target app has AllFiles capability
+	//
+	// Agent cannot debug the app unless it has an OEM Debug Token
+
+
+#ifdef NO_DEBUGTOKEN
+	test.Next(_L("TestSecurity NO_DEBUGTOKEN - Attach to test process 2\n"));
+	HelpTestSecurityAttachDetachExecutable(KRMDebugSecurity2FileName,EFalse);
+#endif
+
+#ifdef SOMECAPS_DEBUGTOKEN
+	test.Next(_L("TestSecurity SOMECAPS_DEBUGTOKEN - Attach to test process 2\n"));
+	HelpTestSecurityAttachDetachExecutable(KRMDebugSecurity2FileName,ETrue);
+#endif
+
+#ifdef FEWCAPS_DEBUGTOKEN
+	test.Next(_L("TestSecurity FEWCAPS_DEBUGTOKEN - Attach to test process 2\n"));
+	HelpTestSecurityAttachDetachExecutable(KRMDebugSecurity2FileName,EFalse);
+#endif
+
+	//
+	// Attach to Process - 3
+	//
+	// Target: Non-debuggable for ordinary debug agent, non-debuggable for OEM authorised agent (insufficient caps)
+	//
+	// Note: This target app has AllFiles and TCB and NetworkControl capabilities
+	//
+
+#if  defined (NO_DEBUGTOKEN)  || defined (SOMECAPS_DEBUGTOKEN) || defined (FEWCAPS_DEBUGTOKEN)
+	test.Next(_L("TestSecurity - Attach to test process 3 : Should not be able to debug it\n"));
+	HelpTestSecurityAttachDetachExecutable(KRMDebugSecurity3FileName,EFalse);
+#else
+	test.Next(_L("TestSecurity - Attach to test process 3 : Should be able to debug it\n"));
+	HelpTestSecurityAttachDetachExecutable(KRMDebugSecurity3FileName,ETrue);
+#endif
+	}
+
+//----------------------------------------------------------------------------------------------
+//! @SYMTestCaseID      KBase-T-RMDEBUG2-0543
+//! @SYMTestType
+//! @SYMPREQ            PREQ1426
+//! @SYMTestCaseDesc    Validates that a dll can be built which #include's the rm_debug_api.h header, i.e. rm_debug_api.h contains no static data.
+//! @SYMTestActions     Calls a dummy function in t_rmdebug_dll.dll which implies the dll has been built correctly.
+//!
+//! @SYMTestExpectedResults KErrNone.
+//! @SYMTestPriority        High
+//! @SYMTestStatus          Implemented
+//----------------------------------------------------------------------------------------------
+void CRunModeAgent::TestDllUsage(void)
+	{
+	test.Next(_L("TestDllUsage\n"));
+	test(KUidDebugSecurityServer == GetDSSUid());
+	}
+
+//----------------------------------------------------------------------------------------------
+//! @SYMTestCaseID      KBase-T-RMDEBUG2-0812
+//! @SYMTestType
+//! @SYMPREQ            PREQ1700
+//! @SYMTestCaseDesc    Writes a known data to the crash flash and validates the data written
+//!						using the read operation and finally erase the data. In the absence
+//!						of an OEM debug token, access to the crash partition should not be allowed
+//! @SYMTestActions     Invoke the flash write method in DSS and call the read method in DSS
+//!						to validate the data is written correctly and then erase the written area
+//!
+//! @SYMTestExpectedResults KErrNone.
+//! @SYMTestPriority        High
+//! @SYMTestStatus          Implemented
+//----------------------------------------------------------------------------------------------
+void CRunModeAgent::TestCrashFlash(void)
+	{
+#if  defined (NO_DEBUGTOKEN)  || defined (FEWCAPS_DEBUGTOKEN)
+
+	test.Next(_L("@SYMTestCaseID:DT-debug-securityserver-006 Testing We cannot Erase the Crash Flash with insufficient privileges"));
+
+	TUint32 size = 0;
+	TInt err = iServSession.EraseCrashLog(0, 1);
+	test(KErrPermissionDenied == err);
+
+	test.Next(_L("@SYMTestCaseID:DT-debug-securityserver-005 Testing We can't Write to the Crash Flash with insufficient privileges"));
+
+	err = iServSession.WriteCrashConfig(0, KCrashDummyData, size);
+	test(KErrPermissionDenied == err);
+	test(size == 0);
+
+	test.Next(_L("@SYMTestCaseID:DT-debug-securityserver-008 Testing We can't Read from the Crash Flash with insufficient privileges"));
+
+	TUint32 readSize = 0x10;
+	RBuf8 buf;
+	buf.CleanupClosePushL();
+	err = buf.Create(readSize);
+
+	test(err == KErrNone);
+
+	err = iServSession.ReadCrashLog(0, buf, readSize);
+	test(KErrPermissionDenied == err);
+
+	test.Next(_L("@SYMTestCaseID:DT-debug-securityserver-004 Testing Writing To an invalid location"));
+
+	TUint32 writeSize = 0;
+	err = iServSession.WriteCrashConfig(0xFFFFFFFF, KCrashDummyData, writeSize);
+
+	test(err == KErrPermissionDenied);
+
+	test.Next(_L("@SYMTestCaseID:DT-debug-securityserver-003 Testing Reading from an invalid location"));
+
+	buf.FillZ();
+	err = iServSession.ReadCrashLog(0, buf, writeSize);
+
+	test(err == KErrPermissionDenied);
+
+	CleanupStack::PopAndDestroy(&buf);
+
+#endif
+
+#ifdef SOMECAPS_DEBUGTOKEN
+
+	TInt err = KErrNone;
+
+	test.Next(_L("@SYMTestCaseID:DT-debug-securityserver-007 Testing We can Erase the Crash Flash with sufficient privileges"));
+
+	err = iServSession.EraseCrashLog(0, 1);
+
+	// For platforms where NAND flash is not currently supported we get a KErrNotSupported - this is still a pass
+	if (KErrNotSupported == err)
+		{
+		test.Printf(_L("Nand flash not supported - continue"));
+		return;
+		}
+
+ 	//For platforms without a flash partition we get KErrNotFound - this is still a pass
+ 	if(KErrNotFound == err)
+ 		{
+ 		test.Printf(_L("Platform has no flash partition - continue"));
+ 		return;
+ 		}
+
+	test(KErrNone == err);
+
+	//Read back the start of the block to make sure its 0xFFFFFFFF
+	const TUint numBytesToCheck = 0x80;  //We dont know the block size
+	TBuf8<numBytesToCheck> eraseCheck;
+	eraseCheck.SetLength(numBytesToCheck);
+
+	err = iServSession.ReadCrashLog(0, eraseCheck, numBytesToCheck);
+	test(err == KErrNone);
+
+	TBool dataIsOk = ETrue;
+	for(TUint cnt = 0; cnt < numBytesToCheck; cnt++)
+		{
+		if(eraseCheck[cnt] != 0xFF)
+			{
+			dataIsOk = EFalse;
+			}
+		}
+
+	test(dataIsOk);
+
+	test.Next(_L("@SYMTestCaseID:DT-debug-securityserver-002 Testing We can Write to the Crash Flash with sufficient privileges"));
+
+	TUint32 writeSize = 0;
+	err = iServSession.WriteCrashConfig(0, KCrashDummyData, writeSize);
+
+	test(writeSize == KCrashDummyData().Length());
+
+	test.Next(_L("@SYMTestCaseID:DT-debug-securityserver-001 Testing We can Read from the Crash Flash with sufficient privileges"));
+
+	RBuf8 buf;
+	buf.CleanupClosePushL();
+	err = buf.Create(writeSize);
+
+	test(err == KErrNone);
+
+	buf.FillZ();
+
+	err = iServSession.ReadCrashLog(0, buf, writeSize);
+
+	test(0 == buf.Compare(KCrashDummyData));
+
+	test.Next(_L("@SYMTestCaseID:DT-debug-securityserver-004 Testing Writing To an invalid location"));
+
+	writeSize = 0;
+	err = iServSession.WriteCrashConfig(0xFFFFFFFF, KCrashDummyData, writeSize);
+
+	test(err == KErrArgument);
+
+	test.Next(_L("@SYMTestCaseID:DT-debug-securityserver-003 Testing Reading from an invalid location"));
+
+	buf.FillZ();
+	err = iServSession.ReadCrashLog(0xFFFFFFFF, buf, writeSize);
+
+	test(err == KErrArgument);
+
+	CleanupStack::PopAndDestroy(&buf);
+
+#endif
+	}
+//----------------------------------------------------------------------------------------------
+//! @SYMTestCaseID      KBase-T-RMDEBUG2-0735
+//! @SYMTestType
+//! @SYMPREQ            PREQ1426
+//! @SYMTestCaseDesc    Tests the Kill Process functionality. Only can kill a debuggable process.
+//! @SYMTestActions     Launches a debuggable and non-debuggable process and tries to kill both.
+//!
+//! @SYMTestExpectedResults KErrNone.
+//! @SYMTestPriority        High
+//! @SYMTestStatus          Implemented
+//----------------------------------------------------------------------------------------------
+void CRunModeAgent::TestKillProcess(void)
+	{
+	test.Next(_L("TestKillProcess\n"));
+
+	// Kill a debuggable process
+
+	// check that killing a process is supported
+	TTag tag = GetTag(ETagHeaderIdKillObjects, EFunctionalityKillProcess);
+	test(tag.iValue);
+	// check that killing a thread is not supported
+	tag = GetTag(ETagHeaderIdKillObjects, EFunctionalityKillThread);
+	test(!tag.iValue);
+
+	// attach first!
+	TInt err = iServSession.AttachExecutable(KRMDebugTestApplication, EFalse /* Active */);
+	test(err == KErrNone);
+
+	// first launch a debuggable process
+	RProcess process;
+	err = LaunchProcess(process, KRMDebugTestApplication(),ESpinForever, 0, 0);
+	test (err == KErrNone);
+
+	// try to find the process in the list
+_LIT(KRMDebugAppName, "t_rmdebug_app");
+
+	TBool found = ProcessExists(KRMDebugAppName);
+	test (found);
+
+	TInt processId = process.Id();
+	process.Close();
+
+	// program now running, so try to kill it
+	err = iServSession.KillProcess(processId, 0 /* kill reason */);
+	test(err == KErrNone);
+
+	User::After(2000000);	// should die within two seconds.
+
+	// can we still find it? Should be gone
+	found = ProcessExists(KRMDebugAppName);
+	test (!found);
+
+	// release the program again.
+	err = iServSession.DetachExecutable(KRMDebugTestApplication);
+	test(err == KErrNone);
+
+	// Try to kill a non-debuggable process and fail.
+
+	// first launch a non-debuggable process
+	RProcess process2;
+	err = LaunchProcess(process2, KRMDebugSecurity1FileName(),ESpinForever, 0, 0);
+	test (err == KErrNone);
+
+	// try to find the process in the list
+_LIT(KRMDebugAppName2, "t_rmdebug_security1");
+
+	TBool found2 = ProcessExists(KRMDebugAppName2);
+	test (found2);
+
+	TInt process2Id = process2.Id();
+	process2.Close();
+
+	// program now running, so try to kill it
+	err = iServSession.KillProcess(process2Id, 0 /* kill reason */);
+	test(err == KErrPermissionDenied);
+
+	User::After(2000000);	// should die within two seconds if it is going to die.
+
+	// can we still find it? Should be still around!
+	found2 = ProcessExists(KRMDebugAppName2);
+	test (found2);
+
+	}
+
+//----------------------------------------------------------------------------------------------
+//! @SYMTestCaseID      KBase-T-RMDEBUG2-1388
+//! @SYMTestType
+//! @SYMPREQ            PREQ1426
+//! @SYMTestCaseDesc    Tests the correct operation of the AddProcess and Remove Process
+//! @SYMTestActions     1. Registers for AddProcess and Remove Process events
+//!                     2. Starts a test process z:\sys\bin\t_rmdebug_security0.exe
+//!                     3. Wait for the AddProcess event to be reported
+//!                     4. Kill the newly started test process
+//!                     5. Wait for the RemoveProcess event to be reported
+//!                     6. Tell the DSS it is no longer interested in AddProcess and RemoveProcess events
+//!
+//! @SYMTestExpectedResults KErrNone.
+//! @SYMTestPriority        High
+//! @SYMTestStatus          Implemented
+//----------------------------------------------------------------------------------------------
+
+void CRunModeAgent::TestAddRemoveProcessEvents()
+	{
+	test.Next(_L("TestAddRemoveProcessEvents\n"));
+
+	// attach to a process (e.g. one of the simple security test programs)
+	// launch the security program
+	// wait for the add event
+	// continue the program.
+	// wait for the remove event
+	// detach process
+
+	test(KErrNone == iServSession.AttachExecutable(KRMDebugSecurity0FileName, EFalse));
+
+	test(KErrNone == iServSession.SetEventAction(KRMDebugSecurity0FileName,EEventsAddProcess, EActionContinue));
+
+	test(KErrNone == iServSession.SetEventAction(KRMDebugSecurity0FileName,EEventsRemoveProcess, EActionContinue));
+
+	// Creator thread ID of the current thread (to be creator of test application)
+	TInt creatorThreadId = RThread().Id();
+
+	RProcess process;
+	TInt err = process.Create(KRMDebugSecurity0FileName, KNullDesC, EOwnerProcess);
+	test (err == KErrNone);
+
+	// Rendezvous with process
+	TRequestStatus status;
+	process.Rendezvous(status);
+
+	// Start the test program
+	process.Resume();
+	User::WaitForRequest(status);
+	test(status==KErrNone);
+
+	// Wait for the addprocess event
+	TEventInfo info;
+	TPtr8 infoPtr((TUint8*)&info,0,sizeof(TEventInfo));
+
+	iServSession.GetEvent(KRMDebugSecurity0FileName,status,infoPtr);
+
+	// Wait for notification of the addprocess hit event
+	User::WaitForRequest(status);
+	test(status==KErrNone);
+
+	// Check this was the right kind of event
+	test(info.iEventType == EEventsAddProcess);
+
+	const TInt uid3offset = 2;
+
+	// Get UID3 for current process
+	TUint32 Uid3 = process.Type()[uid3offset].iUid;
+
+	// Check correct UID3 is returned from the driver
+    test(info.iAddProcessInfo.iUid3 == Uid3);
+
+    // Check correct creator ID for test application is returned from the driver
+    test(info.iAddProcessInfo.iCreatorThreadId == creatorThreadId);
+
+	// Kill the process, as we don't need it anymore
+	process.Kill(KErrNone);
+
+	// Wait for the remove process event
+	iServSession.GetEvent(KRMDebugSecurity0FileName,status,infoPtr);
+
+	// Wait for notification of the remove process hit event
+	User::WaitForRequest(status);
+	test(status==KErrNone);
+
+	// Check this was the right kind of event
+	test(info.iEventType == EEventsRemoveProcess);
+
+	test(KErrNone == iServSession.SetEventAction(KRMDebugSecurity0FileName,EEventsRemoveProcess, EActionIgnore));
+
+	test(KErrNone == iServSession.SetEventAction(KRMDebugSecurity0FileName,EEventsAddProcess, EActionIgnore));
+
+	test(KErrNone == iServSession.DetachExecutable(KRMDebugSecurity0FileName));
+
+	}
+
+//----------------------------------------------------------------------------------------------
+//! @SYMTestCaseID      KBase-T-RMDEBUG2-0736
+//! @SYMTestType
+//! @SYMPREQ            PREQ1426
+//! @SYMTestCaseDesc    Checks that process break points can be set, and that they can co-exist alongside thread breakpoints
+//! @SYMTestActions     Checks that process break points can be set, and that they can co-exist alongside thread breakpoints
+//!
+//! @SYMTestExpectedResults KErrNone.
+//! @SYMTestPriority        High
+//! @SYMTestStatus          Implemented
+//----------------------------------------------------------------------------------------------
+void CRunModeAgent::TestProcessBreakPoints(void)
+	{
+	test.Next(_L("TestProcessBreakPoints\n"));
+
+	// check that process breakpoints are supported
+	TTag tag = GetTag(ETagHeaderIdBreakpoints, EBreakpointProcess);
+	test(tag.iValue);
+
+	test(KErrNone == iServSession.AttachExecutable(iFileName, EFalse));
+	test(KErrNone == iServSession.SuspendThread(iThreadID));
+
+	// Try to set the breakpoint
+	TBreakId breakId;
+	TUint32 address = (TUint32)(&RMDebug_BranchTst1);
+	RProcess process;
+	TProcessId processId = process.Id();
+	process.Close();
+
+	test(KErrNone == iServSession.SetProcessBreak(breakId, processId, address, EArmMode));
+	test(KErrAlreadyExists == iServSession.SetBreak(breakId, iThreadID, address, EArmMode));
+	test(KErrAlreadyExists == iServSession.SetBreak(breakId, iThreadID, address, EThumbMode));
+	test(KErrAlreadyExists == iServSession.SetProcessBreak(breakId, processId, address, EArmMode));
+	test(KErrAlreadyExists == iServSession.SetProcessBreak(breakId, processId, address, EThumbMode));
+	test(KErrNone == iServSession.ClearBreak(breakId));
+
+	test(KErrNone == iServSession.SetBreak(breakId, iThreadID, address, EArmMode));
+	test(KErrAlreadyExists == iServSession.SetProcessBreak(breakId, processId, address, EArmMode));
+	test(KErrAlreadyExists == iServSession.SetProcessBreak(breakId, processId, address, EThumbMode));
+	test(KErrNone == iServSession.ClearBreak(breakId));
+
+	test(KErrNone == iServSession.ResumeThread(iThreadID));
+
+	test(KErrNone == iServSession.DetachExecutable(iFileName));
+	}
+
+//----------------------------------------------------------------------------------------------
+//! @SYMTestCaseID      KBase-T-RMDEBUG2-1309
+//! @SYMTestType
+//! @SYMPREQ            PREQ1426
+//! @SYMTestCaseDesc    Checks that in the case of multiple low priority events (user traces in this case) we can still receive higher
+//!				priority events should the buffer reach a critical level
+//! @SYMTestActions     Run to first breakpoint in our test code. Then multiple trace events are issued. We should still be able to hit
+//!				the second breakpoint
+//!
+//! @SYMTestExpectedResults KErrNone.
+//! @SYMTestPriority        High
+//! @SYMTestStatus          Implemented
+//----------------------------------------------------------------------------------------------
+
+void CRunModeAgent::TestMultipleTraceEvents(void)
+	{
+	test.Next(_L("TestMultipleTraceEvents\n"));
+
+	//attach to target debug process
+	test(KErrNone == iServSession.AttachExecutable(iFileName, EFalse));
+
+	//set the target thread to execute the trace test function
+	test(KErrNone == SwitchTestFunction(EMultipleTraceCalls, EFalse));
+	
+	
+
+	//register interest in BP's & trace events and trace ignored events
+	test(KErrNone == iServSession.SetEventAction(iFileName,EEventsBreakPoint, EActionSuspend));
+	test(KErrNone == iServSession.SetEventAction(iFileName,EEventsUserTrace, EActionContinue));
+	test(KErrNone == iServSession.SetEventAction(iFileName,EEventsUserTracesLost, EActionContinue));
+
+	// Try to set the breakpoints
+	TBreakId armBreakId;
+	TBreakId armBreakId2;
+	TUint32 address = (TUint32)(&RMDebug_BranchTst1);
+	TUint32 address2 = (TUint32)(&RMDebug_StepTest_Non_PC_Modifying);
+
+	test(KErrNone == iServSession.SetBreak(armBreakId,iThreadID,address,EArmMode));
+	test(KErrNone == iServSession.SetBreak(armBreakId2,iThreadID,address2,EArmMode));
+
+	// Continue the thread
+	test(KErrNone == iServSession.ResumeThread(iThreadID));
+
+	// wait for the breakpoint to be hit
+	TEventInfo info;
+	static TRequestStatus status;
+
+	TPtr8 infoPtr((TUint8*)&info,0,sizeof(TEventInfo));
+	iServSession.GetEvent(iFileName,status,infoPtr);
+
+	// Wait for notification of the 1st breakpoint hit event
+	User::WaitForRequest(status);
+	test(status==KErrNone);
+
+	// info should now be filled with the details
+	test(info.iEventType == EEventsBreakPoint);
+	test(info.iThreadBreakPointInfo.iRmdArmExcInfo.iR15 == address);
+	test(info.iProcessIdValid);
+	test(info.iThreadIdValid);
+
+	// Continue the thread
+	test(KErrNone == iServSession.ResumeThread(iThreadID));
+
+	//Now we try to hit the second breakpoint. This will occur after a number of trace calls. If we hit this breakpoint it
+	//means many trace calls are not preventing us hitting breakpoints.
+	iServSession.GetEvent(iFileName,status,infoPtr);
+
+	// Wait for notification of the 2nd breakpoint hit event
+	User::WaitForRequest(status);
+	test(status==KErrNone);
+
+	TBool receivedTracesLost = EFalse;
+
+	while(info.iEventType == EEventsUserTrace || info.iEventType == EEventsUserTracesLost)
+		{
+		//ensure we get told traces are being thrown away - we generate enough to flood the buffer
+		if(info.iEventType == EEventsUserTracesLost)
+			{
+			receivedTracesLost = ETrue;
+
+			// Now stop the target thread from generating trace events
+			test(KErrNone == SwitchTestFunction(EDoNothing, EFalse));
+			break;
+			}
+		else
+			{
+			// Its EEventsUserTrace, so delay us in getting the next event so that it will be more 
+			// likely to get a EEventsUserTracesLost next time. 
+			// This is important on SMP since the platform can process lots of events, and thus
+			// withouth the delay it is difficult for this test to reproduce the abnormal situation of 
+			// lost trace packets
+			User::After(200000);
+			}
+
+		iServSession.GetEvent(iFileName,status,infoPtr);
+
+		// Wait for notification of the 2nd breakpoint hit event
+		User::WaitForRequest(status);
+		test(status==KErrNone);
+		}
+
+	//make sure we got told traces were lost
+	test(receivedTracesLost != EFalse);
+
+	//dont care for breakpoints or trace events no more
+	test(KErrNone == iServSession.SetEventAction(iFileName,EEventsBreakPoint, EActionIgnore));
+	test(KErrNone == iServSession.SetEventAction(iFileName,EEventsUserTrace, EActionIgnore));
+	test(KErrNone == iServSession.SetEventAction(iFileName,EEventsUserTracesLost, EActionIgnore));
+
+	//clear the breaks we set
+	test(KErrNone == iServSession.ClearBreak(armBreakId));
+	test(KErrNone == iServSession.ClearBreak(armBreakId2));
+
+	// Continue the thread
+	test(KErrNone == iServSession.ResumeThread(iThreadID));
+
+	//attach to target debug process
+	test(KErrNone == iServSession.DetachExecutable(iFileName));
+
+	}
+
+//----------------------------------------------------------------------------------------------
+//! @SYMTestCaseID KBase-T-RMDEBUG2-2441
+//! @SYMTestType
+//! @SYMPREQ PREQ1426
+//! @SYMTestCaseDesc Test clearing of a process breakpoint once the process has been killed.
+//! @SYMTestActions Creates a new process then tries to set a process breakpoint and then kills the process which should clear the previously set breakpoint. Then repeat the step once again.
+//! @SYMTestExpectedResults KErrNone
+//! @SYMTestPriority High
+//! @SYMTestStatus Implemented
+//----------------------------------------------------------------------------------------------
+
+void CRunModeAgent::TestProcessKillBreakpoint(void)
+	{
+	test.Next(_L("TestProcessKillBreakpoint\n"));
+
+	DoTestProcessKillBreakpoint();
+	// called once again
+	// to check if we can set the breakpoint once again after the process gets killed
+	DoTestProcessKillBreakpoint();
+
+	// And do it a couple more times, there was a leaked process handle that didn't show up
+	// until the third or fourth time this code was run
+	DoTestProcessKillBreakpoint();
+	DoTestProcessKillBreakpoint();
+	}
+
+void CRunModeAgent::DoTestProcessKillBreakpoint()
+	{
+	test.Printf(_L("\nDoTestProcessKillBreakpoint\n"));
+
+	// check that killing a process is supported
+	TTag tag = GetTag(ETagHeaderIdKillObjects, EFunctionalityKillProcess);
+	test(tag.iValue);
+	// check that killing a thread is not supported
+	tag = GetTag(ETagHeaderIdKillObjects, EFunctionalityKillThread);
+	test(!tag.iValue);
+
+	// attach first!
+	test ( KErrNone == iServSession.AttachExecutable(KRMDebugTestApplication, EFalse/*  Active */));
+
+	RProcess processDebug;
+	TThreadId dontCare;
+	LaunchDebugProcessAndSetBreakpoint(processDebug, dontCare);
+
+	// Not interested in breakpoint events any more
+	test(KErrNone == iServSession.SetEventAction(KRMDebugTestApplication, EEventsProcessBreakPoint, EActionIgnore));
+
+	// program now running, so try to kill it which should clear all the breakpoints
+	test(KErrNone == iServSession.KillProcess(processDebug.Id(), 0  /* kill reason */ ));
+
+	TRequestStatus stat;
+	processDebug.NotifyDestruction(stat);
+	processDebug.Close();
+	TIMED_WAIT(stat, 1000);
+
+	// release the program again
+	test(KErrNone == iServSession.DetachExecutable(KRMDebugTestApplication));
+	}
+
+void CRunModeAgent::LaunchDebugProcessAndSetBreakpoint(RProcess& aResultProcess, TThreadId& aResultThread)
+	{
+	// define a property to pass on the address from the other process we would try to debug
+	static _LIT_SECURITY_POLICY_PASS(KAllowAllPolicy);
+	TInt err = RProperty::Define(RProcess().SecureId(), EMyPropertyInteger, RProperty::EInt, KAllowAllPolicy, KAllowAllPolicy);
+	test (err == KErrNone || err == KErrAlreadyExists);
+
+	RSemaphore addressGlobSem;
+	//define a global semaphore to synchronise with debuggable process publishing the property
+	err = addressGlobSem.CreateGlobal(_L("RMDebugGlobSem"), 0);
+	test (err == KErrNone);
+
+	// first launch a debuggable process
+	RProcess& processDebug(aResultProcess);
+	test ( KErrNone == LaunchProcess(processDebug, KRMDebugTestApplication(),ESpinForeverWithBreakPoint, 0, 0));
+
+	// try to find the process in the list
+	TBool found = ProcessExists(KRMDebugAppName);
+	test (found);
+
+	//search for the main thread created
+   _LIT(KThreadWildCard, "t_rmdebug_app*");
+	TProcessId processDebugId = processDebug.Id();
+	TThreadId& threadDebugId(aResultThread);
+
+   	TFindThread find(KThreadWildCard);
+	TFullName name;
+	found = EFalse;
+	while(find.Next(name)==KErrNone && !found)
+		{
+		RThread thread;
+		err = thread.Open(find);
+       	if (err == KErrNone)
+			{
+			RProcess process;
+			thread.Process(process);
+			if (((TUint32)process.Id() == processDebugId))
+				{
+				TFullName fullname = thread.FullName();
+				test.Printf(_L("Match Found Name: %S Process id: %ld Thread id: %ld\n"), &fullname, process.Id().Id(), thread.Id().Id());
+				found = ETrue;
+				threadDebugId = thread.Id();
+				}
+			process.Close();
+			}
+		thread.Close();
+   		}
+
+	test (found); //check if we actually found the thread we want to debug
+
+	//waiting on semaphore to be sure that the property is set
+	addressGlobSem.Wait();
+
+	//get the value(property) for the breakpoint address for the process to debug
+	TInt address;
+	test(KErrNone == RProperty::Get(RProcess().SecureId(), EMyPropertyInteger, address));
+
+	test.Printf(_L("Address retrieved to set breakpoint 0x%08x\n"), address);
+
+	//suspend the thread before we set a breakpoint
+	test (KErrNone == iServSession.SuspendThread(threadDebugId));
+
+	//set a process breakpoint
+	TBreakId breakId;
+	test(KErrNone == iServSession.SetProcessBreak(breakId, processDebugId, address, EArmMode));
+
+	test(KErrNone == iServSession.SetEventAction(KRMDebugTestApplication, EEventsProcessBreakPoint, EActionContinue));
+
+	//resume the thread now
+	test(KErrNone == iServSession.ResumeThread(threadDebugId));
+
+	// wait for the breakpoint to be hit
+	TRequestStatus status;
+	TEventInfo info;
+	TPtr8 infoPtr((TUint8*)&info,0,sizeof(TEventInfo));
+	iServSession.GetEvent(KRMDebugTestApplication,status,infoPtr);
+	// Wait for notification of the breakpoint hit event
+	TIMED_WAIT(status, 2000);
+	test(status==KErrNone);
+
+	// info should now be filled with the details
+	test(info.iEventType ==  EEventsProcessBreakPoint);
+	test(info.iThreadBreakPointInfo.iRmdArmExcInfo.iR15 == address);
+	test(info.iProcessIdValid);
+	test(info.iThreadIdValid);
+
+	addressGlobSem.Close();
+	}
+
+void CRunModeAgent::HelpTestSecurityAttachDetachExecutable(const TDesC& aProcessName, TBool aExpectSuccess)
+	{
+	RProcess process;
+	TInt err = process.Create(aProcessName, KNullDesC, EOwnerProcess);
+	test (err == KErrNone);
+
+	// rendezvous with process
+	TRequestStatus status;
+	process.Rendezvous(status);
+
+	// start the test program
+	process.Resume();
+	User::WaitForRequest(status);
+	test(status==KErrNone);
+
+	// attach to the program (passively)
+	err = iServSession.AttachExecutable(aProcessName, EFalse);
+
+	if( gUseDelay ) User::After(500000);
+
+	// Do we expect to successfully attach
+	if (aExpectSuccess)
+	{
+		// Yes
+		test(KErrNone == err);
+
+		// Now detach again
+		test(KErrNone == iServSession.DetachExecutable(aProcessName));
+		if( gUseDelay ) User::After(500000);
+	}
+	else
+	{
+		// No
+		test(KErrPermissionDenied == err);
+
+		// Just to be sure, try active attachment
+		test(KErrPermissionDenied == iServSession.AttachExecutable(aProcessName, ETrue));
+		if( gUseDelay ) User::After(500000);
+	}
+
+	// Kill the process, as we don't need it anymore
+	process.Kill(KErrNone);
+	if( gUseDelay ) User::After(500000);
+	}
+
+void CRunModeAgent::ReportPerformance(void)
+//
+// Reports performance metrics from all the tests
+//
+	{
+	test.Printf(_L("\nPerformance\n"));
+	test.Printf(_L("========================\n"));
+
+	// Memory
+	test.Printf(_L("Memory read: %d KBytes/sec\n"),iMemoryReadKbytesPerSecond);
+	test.Printf(_L("Memory write: %d KBytes/sec\n"),iMemoryWriteKbytesPerSecond);
+
+	// Registers
+	// to do
+
+	// events
+	// to do
+
+	// Breakpoints
+	test.Printf(_L("Breakpoint set/clear: %d/sec\n"),iBreakpointsPerSecond);
+	test.Printf(_L("Maximum number of breakpoints: %d\n"),iMaxBreakpoints);
+
+	// Stepping
+	test.Printf(_L("Stepping speed: %d/sec\n"),iStepsPerSecond);
+
+	// Runtime
+	TInt ticks = HelpGetTestTicks();
+	test (ticks != 0);
+
+	TInt nkTicksPerSecond = HelpTicksPerSecond();
+	test (nkTicksPerSecond != 0);
+
+	test.Printf(_L("Total test runtime: %d seconds\n"),ticks/nkTicksPerSecond);
+
+	// Final sizes of executables/rom/ram etc
+	// to do
+
+	test.Printf(_L("\n"));
+	}
+
+/**
+ * Helper code for the stepping tests. Sets a breakpoint in a running thread.
+ * It suspends the thread, sets the breakpoint, and resumes the thread.
+ *
+ * @param aBreakId - Reference to a TBreakId which will be set when the breakpoint is set
+ * @param aThreadId - The thread id for which we should set the breakpoint.
+ * @param aBreakAddress - The address to set the breakpoint
+ * @param aMode - The architecture of the breakpoint to be set (ARM/Thumb/Thumb2EE)
+ * @return KErrNone if successful. One of the other system wide error codes otherwise.
+ */
+TInt CRunModeAgent::HelpTestStepSetBreak(TBreakId& aBreakId, TThreadId aThreadId, const TUint32 aBreakAddress, TArchitectureMode aMode, TBool aThreadSpecific, TProcessId aProcessId)
+	{
+	TInt err = KErrNone;
+
+
+	// Set the breakpoint
+	err = aThreadSpecific
+		? iServSession.SetBreak(aBreakId,aThreadId,aBreakAddress,aMode)
+		: iServSession.SetProcessBreak(aBreakId, aProcessId, aBreakAddress, aMode);
+	if (err != KErrNone)
+		{
+		test.Printf(_L("HelpTestStepSetBreak - Failed to set breakpoint\n"));
+		return err;
+		}
+
+	// Continue the thread
+	err = iServSession.ResumeThread(aThreadId);
+	if (err != KErrNone)
+		{
+		test.Printf(_L("HelpTestStepSetBreak - Failed to resume thread\n"));
+		return err;
+		}
+
+	return KErrNone;
+	}
+
+/**
+ * Helper code for the stepping tests. Clears a breakpoint in a running thread.
+ * It suspends the thread, clears the breakpoint, and resumes the thread.
+ *
+ * @param aBreakId - Reference to a TBreakId which will be set when the breakpoint is set
+ * @return KErrNone if successful. One of the other system wide error codes otherwise.
+ */
+TInt CRunModeAgent::HelpTestStepClearBreak(TBreakId aBreakId, const TThreadId aThreadId, TBool aThreadSpecific)
+	{
+	TInt err = KErrNone;
+
+	// Find out what thread id we need to suspend
+	TThreadId threadId;
+	TProcessId processId;
+	TUint32 address;
+	TArchitectureMode mode;
+
+	err = aThreadSpecific
+		? iServSession.BreakInfo(aBreakId, threadId, address, mode)
+		: iServSession.ProcessBreakInfo(aBreakId, processId, address, mode);
+	if (err != KErrNone )
+		{
+		test.Printf(_L("HelpTestStepClearBreak - failed to obtain information for breakpoint\n"));
+		return err;
+		}
+	if(aThreadSpecific && aThreadId != threadId)
+		{
+		test.Printf(_L("HelpTestStepClearBreak - mismatched thread Ids\n"));
+		return KErrGeneral;
+		}
+
+	// Clear the breakpoint
+	err = iServSession.ClearBreak(aBreakId);
+	if (err != KErrNone)
+		{
+		test.Printf(_L("HelpTestStepClearBreak - failed to clear breakpoint\n"));
+		return err;
+		}
+
+	return KErrNone;
+	}
+
+/**
+ * Helper code for the stepping tests. Waits for a previously set breakpoint to be hit.
+ *
+ * @param aProcessName - The name of the process in which the breakpoint is set. E.g. z:\sys\bin\app.exe
+ * @param aEventInfo - The event information block which is filled in when the breakpoint is hit.
+ * @return KErrNone if successful. One of the other system wide error codes otherwise.
+ */
+TInt CRunModeAgent::HelpTestStepWaitForBreak(const TDesC& aProcessName, TEventInfo& aEventInfo)
+	{
+	static TRequestStatus status;
+
+	TPtr8 infoPtr((TUint8*)&aEventInfo,0,sizeof(TEventInfo));
+
+	iServSession.GetEvent(aProcessName,status,infoPtr);
+
+	// Wait for notification of the breakpoint hit event
+	User::WaitForRequest(status);
+	if (status == KErrNone)
+		{
+		return KErrNone;
+		}
+	else
+		{
+		return KErrGeneral;
+		}
+	}
+
+/**
+ * Helper code for the stepping tests. Reads the current target PC for a given thread.
+ *
+ * @param aThreadId - Thread id for which to read the current target PC.
+ * @param aPc - Reference to a TUint32 which will be set to the current target PC.
+ * @return KErrNone if successful. One of the other system wide error codes otherwise.
+ */
+TInt CRunModeAgent::HelpTestStepReadPC(TThreadId aThreadId, TUint32& aPC)
+	{
+	TInt err = KErrNone;
+
+	//create buffer containing PC register ID
+	RBuf8 pcId;
+	err = pcId.Create(sizeof(TRegisterInfo));
+	if (err != KErrNone)
+		{
+		return err;
+		}
+
+	TRegisterInfo reg1 = (TRegisterInfo)0x00000f00;
+	pcId.Append(reinterpret_cast<const TUint8*>(&reg1), sizeof(TRegisterInfo));
+
+	//create buffer containing desired PC value
+	TPtr8 pcValue((TUint8*)&aPC,4,4);
+
+	//create buffer for PC flag value
+	RBuf8 pcFlag;
+	err = pcFlag.Create(sizeof(TUint8));
+
+	//read the new PC value
+	err = iServSession.ReadRegisters(aThreadId, pcId, pcValue, pcFlag);
+	if (err != KErrNone)
+		{
+		//delete temporary buffers
+		pcId.Close();
+		pcFlag.Close();
+		return err;
+		}
+
+	//get the flag and check the PC value was read ok
+	TRegisterFlag flag = ENotSupported;
+	err = GetFlag(pcFlag, 0, flag);
+	if (err != KErrNone)
+		{
+		//delete temporary buffers
+		pcId.Close();
+		pcFlag.Close();
+		return err;
+		}
+
+	if (flag == EValid)
+		{
+		//delete temporary buffers
+		pcId.Close();
+		pcFlag.Close();
+		return KErrNone;
+		}
+	else
+		{
+		//delete temporary buffers
+		pcId.Close();
+		pcFlag.Close();
+		return err;
+		}
+	}
+
+/**
+ * Helper code for the stepping tests. Single steps a given thread from aStartAddress to aEndAddress. Note
+ * that it reaches aStartAddress by setting a breakpoint at that address and waiting until it is hit.
+ *
+ * @param aThreadId - Thread id for which to read the current target PC.
+ * @param aStartAddress - The target address at which stepping will start.
+ * @param aEndAddress - The target address at which stepping will end.
+ * @param aMode - The architecture of the breakpoint which must be set at the start address (ARM/Thumb/Thumb2EE).
+ * @return KErrNone if successful. One of the other system wide error codes otherwise.
+ */
+TInt CRunModeAgent::HelpTestStep(TThreadId aThreadId, TUint32 aStartAddress, TUint32 aEndAddress, TArchitectureMode aMode, TUint aNumSteps, TBool aThreadSpecific, TProcessId aProcessId)
+	{
+	TInt err = KErrNone;
+
+	// Ensure that the supplied addresses are word/half-word aligned as appropriate.
+	if (aMode == EArmMode)
+		{
+		// ARM breakpoints must be word-aligned (2 lsb must be zero)
+		aStartAddress &= 0xFFFFFFFC;
+		aEndAddress &= 0xFFFFFFFC;
+		}
+	else if (aMode == EThumbMode)
+		{
+		// Thumb breakpoints must be half-word aligned (lsb must be zero)
+		aStartAddress &= 0xFFFFFFFE;
+		aEndAddress	 &= 0xFFFFFFFE;
+		}
+	else if (aMode == EThumb2EEMode)
+	{
+		// Thumb2EE breakpoints are not currently supported
+		return KErrNotSupported;
+	}
+
+	// Set breakpoint at the start address
+	TBreakId tempBreakId;
+	TEventInfo info;
+
+	err = HelpTestStepSetBreak(tempBreakId,aThreadId,aStartAddress,aMode,aThreadSpecific,aProcessId);
+	if (err != KErrNone)
+		{
+		test.Printf(_L("HelpTestStep - Failed to set breakpoint at aStartAddress 0x%08x\n"),aStartAddress);
+		return err;
+		}
+
+	// wait for the breakpoint to be hit
+	err = HelpTestStepWaitForBreak(iFileName,info);
+	if (err != KErrNone)
+		{
+		test.Printf(_L("HelpTestStep - Failed to hit the breakpoint at aStartAddress 0x%08x\n"),aStartAddress);
+		return err;
+		}
+
+	// Check the PC == aStartAddress
+	TUint32 pc = 0;
+	err = HelpTestStepReadPC(aThreadId,pc);
+	if (err != KErrNone)
+		{
+		test.Printf(_L("HelpTestStep - Failed to read the PC after hitting breakpoint at aStartAddress 0x%08x\n"),aStartAddress);
+		return err;
+		}
+
+	if (pc != aStartAddress)
+		{
+		test.Printf(_L("HelpTestStep - Incorrect PC value after hitting breakpoint (expected 0x%08x actual 0x%08x)\n"),aStartAddress,pc);
+		return KErrGeneral;
+		}
+
+	err = iServSession.Step(aThreadId,aNumSteps);
+	if (err != KErrNone)
+		{
+		test.Printf(_L("HelpTestStep - Failed to do step from 0x%08x to 0x%08x\n"),aStartAddress,aEndAddress,aNumSteps);
+		return err;
+		}
+
+	// only one 'completed step' event in the buffer.
+	err = HelpTestStepWaitForBreak(iFileName,info);
+	if (err != KErrNone)
+		{
+		test.Printf(_L("HelpTestStep - Could not read breakpoint event info after stepping"));
+		return err;
+		}
+	// end
+
+	// Check PC == aEndAddress
+	err = HelpTestStepReadPC(aThreadId,pc);
+	if (err != KErrNone)
+		{
+		test.Printf(_L("HelpTestStep - failed read the PC after stepping\n"));
+		return err;
+		}
+	if (pc != aEndAddress)
+		{
+		test.Printf(_L("HelpTestStep - Incorrect PC value after stepping (expected 0x%08x actual 0x%08x)\n"),aEndAddress,pc);
+		return KErrGeneral;
+		}
+
+	// Clear the breakpoint
+	err = HelpTestStepClearBreak(tempBreakId, aThreadId, aThreadSpecific);
+	if (err != KErrNone)
+		{
+		test.Printf(_L("HelpTestStep - failed to clear temporary breakpoint\n"));
+		return err;
+		}
+
+	return KErrNone;
+	}
+
+/**
+ * Helper code for the stepping tests. Returns the number of nanokernel ticks in one second.
+ *
+ * @return Number of nanokernel ticks. 0 if unsuccesful.
+ */
+TInt CRunModeAgent::HelpTicksPerSecond(void)
+	{
+	TInt nanokernel_tick_period;
+	HAL::Get(HAL::ENanoTickPeriod, nanokernel_tick_period);
+
+	ASSERT(nanokernel_tick_period != 0);
+
+	static const TInt KOneMillion = 1000000;
+
+	return KOneMillion/nanokernel_tick_period;
+	}
+
+/**
+  Given aTestNumber runs the appropriate test inside heap markers
+
+  @param aTestNumber test to run, corresponds to an entry in iTestArray
+
+  @panic Panic if aTestNumber is not in valid range
+  */
+void CRunModeAgent::RunTest(TInt aTestNumber)
+	{
+	if( (aTestNumber<0) || (aTestNumber>=KMaxTests) )
+		{
+		User::Panic(_L("Test number out of range"), aTestNumber);
+		}
+	__UHEAP_MARK;
+	(this->*(iTestArray[aTestNumber].iFunctionPtr))();
+	__UHEAP_MARKEND;
+	}
+
+void CRunModeAgent::PrintVersion()
+	{
+	test.Printf(_L("\nt_rmdebug2.exe\nVersion: %S\n"), &(testVersion.Name()));
+	test.Printf(_L("Press any key...\n"));
+	test.Getch();
+	}
+
+void CRunModeAgent::PrintUsage()
+	{
+	test.Printf(_L("Invoke with arguments:\n"));
+	test.Printf(_L("-r: run specified tests in reverse order\n"));
+	test.Printf(_L("-h: display usage information\n"));
+	test.Printf(_L("-v: display version\n"));
+	test.Printf(_L("-d: use delays\n"));
+	test.Printf(_L("<number>: test number to run, can specify more than one from the following list:\n"));
+	test.Printf(_L("Press any key for list...\n"));
+	test.Getch();
+	// if there are too many of these they won't fit on the screen! Stick another Getch() in if there get too many
+	for(TInt i=0; i<KMaxTests; i++)
+		{
+		test.Printf(_L("%2d: %S\n"), i, &(iTestArray[i].iFunctionName));
+		}
+	test.Printf(_L("Press any key...\n"));
+	test.Getch();
+	}
+
+/**
+  Parse the command line, see CRunModeAgent::PrintUsage for syntax
+  */
+void CRunModeAgent::ParseCommandLineL(TUint32& aMode, RArray<TInt>& aTests)
+	{
+	// get the length of the command line arguments
+	TInt argc = User::CommandLineLength();
+
+	// allocate a buffer for the command line arguments and extract the data to it
+	HBufC* commandLine = HBufC::NewLC(argc);
+	TPtr commandLineBuffer = commandLine->Des();
+	User::CommandLine(commandLineBuffer);
+
+	// reset mode
+	aMode = (TTestMode)0;
+
+	// create a lexer and read through the command line
+	TLex lex(*commandLine);
+	while (!lex.Eos())
+		{
+		// expecting the first character to be a '-'
+		if (lex.Get() == '-')
+			{
+			TChar arg = lex.Get();
+			switch (arg)
+				{
+				case 'v':
+					//print out the help
+					aMode |= EModeVersion;
+					break;
+				case 'h':
+					//print out the help
+					aMode |= EModeHelp;
+					break;
+				case 'r':
+					//store the fact that we want to run in reverse
+					aMode |= EModeReverse;
+					break;
+				case 'd':
+					//store the fact that we want to run in reverse
+					gUseDelay = EFalse;
+					RDebug::Printf("Not using delays");
+					break;
+				default:
+					// unknown argument so leave
+					User::Leave(KErrArgument);
+				}
+			}
+		else
+			{
+			lex.UnGet();
+			TInt testNumber;
+			User::LeaveIfError(lex.Val(testNumber));
+			if( (testNumber<0) || (testNumber>=KMaxTests) )
+				{
+				User::Leave(KErrArgument);
+				}
+			aTests.AppendL(testNumber);
+			}
+		lex.SkipSpace();
+		}
+	// if no tests specified then run them all
+	if(aTests.Count() == 0)
+		{
+		aMode |= EModeAll;
+		}
+
+	// do clean up
+	CleanupStack::PopAndDestroy(commandLine);
+	}
+
+void CRunModeAgent::ClientAppL()
+//
+// Performs each test in turn
+//
+	{
+	test.Start(_L("ClientAppL"));
+
+	RArray<TInt> testsToRun;
+	TUint32 testMode = 0;
+	ParseCommandLineL(testMode, testsToRun);
+
+	//if help or version mode specified then just print out the relevant stuff and quit
+	if((testMode & EModeHelp) || (testMode & EModeVersion))
+		{
+		if(testMode & EModeHelp)
+			{
+			PrintUsage();
+			}
+		if(testMode & EModeVersion)
+			{
+			PrintVersion();
+			}
+		test.End();
+		return;
+		}
+
+	if(testMode & EModeAll)
+		{
+		for(TInt i=0; i<KMaxTests; i++)
+			{
+			testsToRun.AppendL(i);
+			}
+		}
+
+	// if EModeReverse specified then reverse the array elements
+	TInt numberOfTests = testsToRun.Count();
+	if(testMode & EModeReverse)
+		{
+		for(TInt i=0; i<(numberOfTests>>1); i++)
+			{
+			TInt temp = testsToRun[i];
+			testsToRun[i] = testsToRun[numberOfTests - (i+1)];
+			testsToRun[numberOfTests - (i+1)] = temp;
+			}
+		}
+
+	__UHEAP_MARK;
+	SetupAndAttachToDSS();
+	__UHEAP_MARKEND;
+
+	HelpStartTestTimer();
+	for(TInt i=0; i<numberOfTests; i++)
+		{
+		RunTest(testsToRun[i]);
+		if( gUseDelay ) User::After(500000);
+		}
+	testsToRun.Close();
+
+	HelpStopTestTimer();
+
+	ReportPerformance();
+
+	test.End();
+	}
+
+/**
+  Fill the test array with pointers to each test.
+  */
+void CRunModeAgent::FillArray()
+	{
+	iTestArray[0].iFunctionPtr = &CRunModeAgent::TestDriverSecurity;
+	iTestArray[0].iFunctionName = _L("TestDriverSecurity");
+	iTestArray[1].iFunctionPtr = &CRunModeAgent::TestDllUsage;
+	iTestArray[1].iFunctionName = _L("TestDllUsage");
+	iTestArray[2].iFunctionPtr = &CRunModeAgent::TestSecurity;
+	iTestArray[2].iFunctionName = _L("TestSecurity");
+	iTestArray[3].iFunctionPtr = &CRunModeAgent::TestAttachExecutable;
+	iTestArray[3].iFunctionName = _L("TestAttachExecutable");
+	iTestArray[4].iFunctionPtr = &CRunModeAgent::TestGetExecutablesList;
+	iTestArray[4].iFunctionName = _L("TestGetExecutablesList");
+	iTestArray[5].iFunctionPtr = &CRunModeAgent::TestGetProcessList;
+	iTestArray[5].iFunctionName = _L("TestGetProcessList");
+	iTestArray[6].iFunctionPtr = &CRunModeAgent::TestGetXipLibrariesList;
+	iTestArray[6].iFunctionName = _L("TestGetXipLibrariesList");
+	iTestArray[7].iFunctionPtr = &CRunModeAgent::TestGetThreadList;
+	iTestArray[7].iFunctionName = _L("TestGetThreadList");
+	iTestArray[8].iFunctionPtr = &CRunModeAgent::TestGetCodeSegsList;
+	iTestArray[8].iFunctionName = _L("TestGetCodeSegsList");
+	iTestArray[9].iFunctionPtr = &CRunModeAgent::TestGetListInvalidData;
+	iTestArray[9].iFunctionName = _L("TestGetListInvalidData");
+	iTestArray[10].iFunctionPtr = &CRunModeAgent::TestMemoryAccess;
+	iTestArray[10].iFunctionName = _L("TestMemoryAccess");
+	iTestArray[11].iFunctionPtr = &CRunModeAgent::TestDebugFunctionality;
+	iTestArray[11].iFunctionName = _L("TestDebugFunctionality");
+	iTestArray[12].iFunctionPtr = &CRunModeAgent::TestSuspendResume;
+	iTestArray[12].iFunctionName = _L("TestSuspendResume");
+	iTestArray[13].iFunctionPtr = &CRunModeAgent::TestBreakPoints;
+	iTestArray[13].iFunctionName = _L("TestBreakPoints");
+	iTestArray[14].iFunctionPtr = &CRunModeAgent::TestModifyBreak;
+	iTestArray[14].iFunctionName = _L("TestModifyBreak");
+	iTestArray[15].iFunctionPtr = &CRunModeAgent::TestBreakInfo;
+	iTestArray[15].iFunctionName = _L("TestBreakInfo");
+	iTestArray[16].iFunctionPtr = &CRunModeAgent::TestRunToBreak;
+	iTestArray[16].iFunctionName = _L("TestRunToBreak");
+	iTestArray[17].iFunctionPtr = &CRunModeAgent::TestBreakPointsInLoop;
+	iTestArray[17].iFunctionName = _L("TestBreakPointsInLoop");
+	iTestArray[18].iFunctionPtr = &CRunModeAgent::TestRegisterAccess;
+	iTestArray[18].iFunctionName = _L("TestRegisterAccess");
+	iTestArray[19].iFunctionPtr = &CRunModeAgent::TestStep;
+	iTestArray[19].iFunctionName = _L("TestStep");
+	iTestArray[20].iFunctionPtr = &CRunModeAgent::TestDemandPaging;
+	iTestArray[20].iFunctionName = _L("TestDemandPaging");
+	iTestArray[21].iFunctionPtr = &CRunModeAgent::TestEventsForExternalProcess;
+	iTestArray[21].iFunctionName = _L("TestEventsForExternalProcess");
+	iTestArray[22].iFunctionPtr = &CRunModeAgent::TestEvents;
+	iTestArray[22].iFunctionName = _L("TestEvents");
+	iTestArray[23].iFunctionPtr = &CRunModeAgent::TestKillProcess;
+	iTestArray[23].iFunctionName = _L("TestKillProcess");
+	iTestArray[24].iFunctionPtr = &CRunModeAgent::TestProcessBreakPoints;
+	iTestArray[24].iFunctionName = _L("TestProcessBreakPoints");
+	iTestArray[25].iFunctionPtr = &CRunModeAgent::TestMultipleTraceEvents;
+	iTestArray[25].iFunctionName = _L("TestMultipleTraceEvents");
+	iTestArray[26].iFunctionPtr = &CRunModeAgent::TestAddRemoveProcessEvents;
+	iTestArray[26].iFunctionName = _L("TestAddRemoveProcessEvents");
+	iTestArray[27].iFunctionPtr = &CRunModeAgent::TestCrashFlash;
+	iTestArray[27].iFunctionName = _L("TestCrashFlash");
+	iTestArray[28].iFunctionPtr = &CRunModeAgent::TestProcessKillBreakpoint;
+	iTestArray[28].iFunctionName = _L("TestProcessKillBreakpoint");
+	iTestArray[29].iFunctionPtr = &CRunModeAgent::TestAttachToAll;
+	iTestArray[29].iFunctionName = _L("TestAttachToAll");
+	iTestArray[30].iFunctionPtr = &CRunModeAgent::TestResumeBreakpointsRepeatedly;
+	iTestArray[30].iFunctionName = _L("TestResumeBreakpointsRepeatedly");
+
+	};
+
+GLDEF_C TInt E32Main()
+//
+// Entry point for run mode debug driver test
+//
+	{
+   TInt ret = KErrNone;
+
+	// client
+	CTrapCleanup* trap = CTrapCleanup::New();
+	if (!trap)
+		return KErrNoMemory;
+   	test.Title();
+   RunModeAgent = CRunModeAgent::NewL();
+   if (RunModeAgent != NULL)
+       {
+        __UHEAP_MARK;
+	    TRAP(ret,RunModeAgent->ClientAppL());
+	    __UHEAP_MARKEND;
+
+	    delete RunModeAgent;
+       }
+
+	delete trap;
+
+	return ret;
+	}
+
+/**
+Helper function to get the aOffset'th value from aFlags
+
+@param aFlags descriptor containing TRegisterFlag type flags
+@param aOffset index of flag value to extract from aFlags
+@param aFlagValue the flag value if function returned successfully
+
+@return KErrNone if value was read successfully, KErrTooBig if aOffset is
+        greater than aFlags.Length()
+*/
+TInt CRunModeAgent::GetFlag(const TDes8& aFlags, const TUint aOffset, TRegisterFlag &aFlagValue) const
+	{
+	//get pointer to data
+	const TUint8 *ptr = aFlags.Ptr();
+
+	//check aOffset is valid
+	TUint length = aFlags.Length();
+	if(aOffset >= length)
+		return KErrTooBig;
+
+	//get flag value
+	aFlagValue = (TRegisterFlag)ptr[aOffset];
+	return KErrNone;
+	}
+
+/**
+  Helper function to set the value of FunctionChooser in the target debug thread.
+
+  @param aTestFunction TTestFunction enum to set FunctionChooser to
+
+  @return KErrNone if the value was set correctly, or one of the other system wide error codes
+  */
+TInt CRunModeAgent::SwitchTestFunction(TTestFunction aTestFunction, const TBool aResume)
+	{
+	//suspend the target thread
+	TInt suspendError = iServSession.SuspendThread(iThreadID);
+	if(! ( (suspendError == KErrNone) || (suspendError == KErrAlreadyExists) ) )
+		{
+		//the thread is not suspended so exit
+		return suspendError;
+		}
+
+	//get the address of FunctionChooser
+	TUint32 functionChooserAddress = (TUint32)&FunctionChooser;
+	//put the new value for FunctionChooser into a descriptor
+	TPtr8 functionBuf((TUint8*)&aTestFunction, sizeof(TTestFunction), sizeof(TTestFunction));
+	//write the new value into the target thread
+	TInt writeError = iServSession.WriteMemory(iThreadID, functionChooserAddress, sizeof(TTestFunction), functionBuf, EAccess32, EEndLE8);
+
+	if( (KErrNone == suspendError) && aResume )
+		{
+		//if this function suspended the target thread then we need to resume it
+		TInt resumeError = iServSession.ResumeThread(iThreadID);
+		if(KErrNone != resumeError)
+			{
+			//resuming failed so return the error
+			return resumeError;
+			}
+		}
+
+	//suspending and resuming was successful so return the error code from the WriteMemory call
+	return writeError;
+	}
+
+/**
+  Launch a separate process to debug.
+
+  @param aProcess the RProcess object to use to create the process
+  @param aFileName file name of the executable to create the process from
+  @param aFunctionType function that the target process should call on execution
+  @param aDelay delay before the new process should call the function represented by aFunctionType
+  @param aExtraThreads number of extra threads to create in the child process
+
+  @return KErrNone on success, or one of the other system wide error codes
+  */
+TInt CRunModeAgent::LaunchProcess(RProcess& aProcess, const TDesC& aFileName, TDebugFunctionType aFunctionType, TUint32 aDelay, TUint32 aExtraThreads)
+	{
+	// at the moment we support two arguments, this number might have to be increased to support arguments
+	const TUint KMaxCommandLineLength = 32;
+
+	// create a command line buffer
+	RBuf commandLine;
+	commandLine.Create(KMaxCommandLineLength);
+
+	// append the command line arguments to the buffer
+	_LIT(KFArg, "-f");
+	commandLine.Append(KFArg());
+	commandLine.AppendNum(aFunctionType);
+
+	_LIT(KSpace, " ");
+	commandLine.Append(KSpace());
+
+	_LIT(KDArg, "-d");
+	commandLine.Append(KDArg());
+	commandLine.AppendNum(aDelay);
+
+	commandLine.Append(KSpace());
+
+	_LIT(KEArg, "-e");
+	commandLine.Append(KEArg());
+	commandLine.AppendNum(aExtraThreads);
+
+	// create the new process, matching on file name only, not specifying uid values
+	TInt err = aProcess.Create(aFileName, commandLine);	// owned by the process
+
+	// check that there was no error raised
+	if(err != KErrNone)
+		{
+		commandLine.Close();
+		return err;
+		}
+
+	TRequestStatus status = KRequestPending;
+	aProcess.Rendezvous(status);
+
+	commandLine.Close();	// after target thread starts
+
+	if(KRequestPending != status.Int())
+		{
+		// startup failed so kill the process
+		aProcess.Kill(KErrNone);
+		return status.Int();
+		}
+	else
+		{
+		// start up succeeded so resume the process
+		aProcess.Resume();
+		User::WaitForRequest(status);
+		if(KErrNone != status.Int())
+			{
+			aProcess.Kill(KErrNone);
+			}
+		return status.Int();
+		}
+	}
+
+/**
+  Helper function to read a tag header from a debug functionality block
+
+  @param aDebugFunctionalityBlock block to read header from
+  @param aTagHdrId header type to find
+
+  @return pointer to the header, or NULL if not available
+  */
+TTagHeader* CRunModeAgent::GetTagHdr(const TDesC8& aDebugFunctionalityBlock, const TTagHeaderId aTagHdrId) const
+	{
+	TUint8* ptr = (TUint8*) aDebugFunctionalityBlock.Ptr();
+	TUint8* blockEnd = ptr + aDebugFunctionalityBlock.Size();
+
+	while(ptr < blockEnd)
+		{
+		TTagHeader* header = (TTagHeader*)ptr;
+		if(header->iTagHdrId == aTagHdrId)
+			{
+			return header;
+			}
+		ptr += sizeof(TTagHeader) + (header->iNumTags * sizeof(TTag));
+		}
+	return NULL;
+	}
+
+/**
+  Helper function to read a tag from a debug functionality block
+
+  @param aTagHdr pointer to a tag header in a debug functionality block
+  @param aElement element to return from the header's data
+
+  @return pointer to the tag, or NULL if not available
+  */
+TTag* CRunModeAgent::GetTag(const TTagHeader* aTagHdr, const TInt aElement) const
+	{
+	TUint8* ptr = (TUint8*)aTagHdr + sizeof(TTagHeader);
+	TUint8* blockEnd = ptr + (aTagHdr->iNumTags * sizeof(TTag));
+
+	while(ptr < blockEnd)
+		{
+		TTag* tag = (TTag*)ptr;
+		if(tag->iTagId == aElement)
+			{
+			return tag;
+			}
+		ptr += sizeof(TTag);
+		}
+	return NULL;
+	}
+
+TTag CRunModeAgent::GetTag(const TTagHeaderId aTagHdrId, const TInt aElement)
+	{
+	TUint32 bufsize = 0;	// Safe default size
+
+	// Get functionality block size
+	test(KErrNone == iServSession.GetDebugFunctionalityBufSize(&bufsize));
+
+	// Ensure we have a finite buffer size
+	test(bufsize!=0);
+
+	// Allocate space for the functionality data
+	HBufC8* dftext = HBufC8::NewLC(bufsize);
+
+	// create an empty TPtr8 refering to dftext
+	TPtr8 dftextPtr(dftext->Des());
+
+	// Get the functionality block
+	test(KErrNone == iServSession.GetDebugFunctionality(dftextPtr));
+
+	// read a value from the data to check it has come through as expected
+	TTagHeader* header = GetTagHdr(dftext->Des(), aTagHdrId);
+	test(header != NULL);
+	TTag* tag = GetTag(header, aElement);
+	test(tag != NULL);
+
+	TTag tagToReturn = *tag;
+
+	// Remove our temporary buffer
+	CleanupStack::PopAndDestroy(dftext);
+
+	return tagToReturn;
+	}
+
+/**
+  Helper function which returns a Boolean indicating with a process with the
+  specified name is currently running.
+
+  @param aProcessName - Name of the process to find
+  @return ETrue if found, EFalse otherwise
+  */
+TBool CRunModeAgent::ProcessExists(const TDesC& aProcessName)
+	{
+	TInt    err=KErrNone;
+	TBool	found = FALSE;
+
+_LIT(KWildCard,"*");
+
+	TFindProcess find(KWildCard);
+	TFullName name;
+	while(find.Next(name)==KErrNone)
+		{
+		RProcess process;
+		err = process.Open(find);
+		if (err == KErrNone)
+			{
+			if (name.Find(aProcessName) != KErrNotFound)
+				{
+					found = TRUE;
+				}
+			process.Close();
+			}
+	   }
+
+	return found;
+	}
+
+TInt PanicFn(TAny*)
+	{
+	User::Panic(_L("trmdebug_dummy"), 123);
+	return 0;
+	}
+
+void CRunModeAgent::TestAttachToAll()
+	{
+	test.Next(_L("TestAttachToAll - Attach\n"));
+
+#ifdef ALLCAPS_DEBUGTOKEN
+	test.Next(_L("---- First AttachAll \n"));
+	test(iServSession.AttachAll() == KErrNone);
+	test.Next(_L("---- Second AttachAll \n"));	
+	test(iServSession.AttachAll() == KErrAlreadyExists); // Don't think an agent should be allowed to AttachToAll more than once
+	
+	test.Next(_L("---- DetachAll\n"));
+	test(iServSession.DetachAll() == KErrNone);
+	test.Next(_L("---- AttachAll again\n"));
+	test(iServSession.AttachAll() == KErrNone);
+	
+	test.Next(_L("---- Suspend thread\n"));
+	test( iServSession.SuspendThread(iThreadID) == KErrNone);
+
+	// Check that AttachAll picks up thread crashes without needing to be explicitly attached
+	test.Next(_L("---- Attach all SetEventAction\n"));
+	TInt err = iServSession.SetEventAction(EEventsKillThread, EActionSuspend);
+	test(err == KErrNone);
+
+	test.Next(_L("---- Create DebugThread2\n"));
+	// Set up the thread
+	RThread threadToPanic;
+	err = threadToPanic.Create(_L("DebugThread2"), &PanicFn, 8192, NULL, NULL);
+	test(err == KErrNone);
+	TRequestStatus undertakerStat;
+	threadToPanic.Logon(undertakerStat);
+	test(undertakerStat.Int() == KRequestPending);
+
+	// Start listening for events
+	TRequestStatus stat;
+	TEventInfo info;
+	TPckg<TEventInfo> infoPkg(info);
+	test.Next(_L("Attach all get event and then resume thread DebugThread2\n"));
+	
+	iServSession.GetEvent(stat, infoPkg);
+	
+	threadToPanic.Resume();
+	
+	test.Printf(_L("Waiting for DebugThread2 panic event to be picked up by AttachToAll\n"));
+	User::WaitForRequest(stat);
+	test(stat.Int() == KErrNone);
+	test(info.iThreadId == threadToPanic.Id());
+	test(info.iEventType == EEventsKillThread);
+	test(info.iThreadKillInfo.iExitType == EExitPanic);
+
+	test(undertakerStat.Int() == KRequestPending); // This shouldn't get completed until after we call iServSession.ResumeThread below
+
+	// Now resume the thread and wait for the Logon to complete
+	test.Next(_L("---- Attach all resume panic thread and then wait for event after DSS has handled it\n"));
+	err = iServSession.ResumeThread(threadToPanic.Id());
+	test(err == KErrNone);
+	User::WaitForRequest(undertakerStat);
+	test(undertakerStat.Int() == 123); // The panic reason set in PanicFn is 123
+
+	// And clean up, 
+	ResetAttachToAll(threadToPanic);
+	//still attached to all
+	
+	// Test that an explicit attach eclipses an AttachAll, and the AttachAll session 
+	// doesn't see the events for specifically attached executables
+	test.Next(_L(" ---- ExplicitAttachBeatsAttachAll\n"));
+
+	// We shouldn't see this event because of sess2
+	err = iServSession.SetEventAction(EEventsStartThread, EActionContinue); 
+	test(err == KErrNone);
+	iServSession.GetEvent(stat, infoPkg);
+	test(stat.Int() == KRequestPending);
+
+	test.Next(_L("---- New sec session\n"));
+	RSecuritySvrSession sess2;
+	test(sess2.Connect(securityServerVersion) == KErrNone);
+	test.Next(_L("---- New sec session Attach executable \n"));
+	test(sess2.AttachExecutable(iFileName, EFalse) == KErrNone);
+	err = sess2.SetEventAction(iFileName, EEventsKillThread, EActionSuspend);
+	test(err == KErrNone);
+	// The EActionSuspend above should trump this EActionContinue
+	err = iServSession.SetEventAction(EEventsKillThread, EActionContinue); 
+	test(err == KErrNone);
+
+	test.Next(_L("---- New sec session create DebugThread3\n"));
+	err = threadToPanic.Create(_L("DebugThread3"), &PanicFn, 8192, NULL, NULL);
+	test(err == KErrNone);
+	
+	// The attach executable above leads the DSS to launch the token, which results 
+	// in a start thread event, and since we have done an attach all and a get event, 
+	// the TReqStat will be completed accordingly for this token start event. 
+	
+	threadToPanic.Logon(undertakerStat);
+	test(undertakerStat.Int() == KRequestPending); 
+
+	TRequestStatus sess2stat;
+	TEventInfo sess2event;
+	TPckg<TEventInfo> sess2eventPkg(sess2event);
+	test.Next(_L("---- New sec session get event, TReqStat\n") );
+	RDebug::Printf(" undertakerStat=0x%x, sess2stat = 0x%x, Pkg=0x%x", 
+			&undertakerStat, &sess2stat, &sess2eventPkg);
+	
+	sess2.GetEvent(iFileName, sess2stat, sess2eventPkg);
+	// sess2 didn't ask for EEventsStartThread so we should still be pending at this point	
+	test(sess2stat == KRequestPending); 
+
+	test.Next(_L("---- New sec session resume thread and wait for kill event\n"));
+	threadToPanic.Resume();
+	User::WaitForRequest(sess2stat);
+
+	test(sess2stat.Int() == KErrNone);
+	test(sess2event.iThreadId == threadToPanic.Id());
+	test(sess2event.iEventType == EEventsKillThread);
+	test(sess2event.iThreadKillInfo.iExitType == EExitPanic);
+
+	// the EActionSuspend that sess2 specified should ensure this doesn't get completed
+	test(undertakerStat == KRequestPending);
+
+	// Now resume the thread and wait for the Logon to complete
+	test.Next(_L("---- ExplicitAttachBeatsAttachAll resume thread 3 after kill\n"));
+	err = sess2.ResumeThread(threadToPanic.Id());
+	test(err == KErrNone);
+	User::WaitForRequest(undertakerStat);
+	test(undertakerStat.Int() == 123); // The panic reason set in PanicFn is 123
+
+	// And clean up
+	ResetAttachToAll(threadToPanic, &stat, &sess2);
+	test.Next(_L("---- Finishing ExplicitAttachBeatsAttachAll > sess2.Close\n"));
+	
+	sess2.Close();
+#if 0
+	//TODO allow this by changing from agent pid to session ids in DSS.
+	// This will allow a client to have more than one session and call attachall
+	
+	// Test that a second AttachAll eclipses the first
+	// Commented out since not sure we require this
+
+	test.Next(_L("SecondAttachAllBeatsAttachAll"));
+	
+	//TODO fix detachall in ResetAttachToAll
+	test(iServSession.AttachAll() == KErrNone);
+	test(sess2.AttachAll() == KErrNone);
+	err = iServSession.SetEventAction(EEventsKillThread, EActionSuspend);
+	test(err == KErrNone);
+	err = sess2.SetEventAction(EEventsKillThread, EActionSuspend);
+	test(err == KErrNone);
+	err = threadToPanic.Create(_L("DebugThread4"), &PanicFn, 8192, NULL, NULL);
+	test(err == KErrNone);
+	iServSession.GetEvent(stat, infoPkg);
+	test(stat.Int() == KRequestPending);
+	sess2.GetEvent(sess2stat, sess2eventPkg);
+	test(sess2stat.Int() == KRequestPending);
+
+	threadToPanic.Resume();
+	User::WaitForRequest(sess2stat);
+	test(sess2event.iThreadId == threadToPanic.Id());
+	test(sess2event.iEventType == EEventsKillThread);
+	test(sess2event.iThreadKillInfo.iExitType == EExitPanic);
+	test(stat.Int() == KRequestPending); // Shouldn't see the killthread event because of sess2
+
+	// And cleanup
+	ResetAttachToAll(threadToPanic, &stat, &sess2);
+	//TODO fixme test(sess2.DetachAll() == KErrNone);
+#endif
+
+#else
+	test(iServSession.AttachAll() == KErrPermissionDenied);
+#endif
+	}
+
+void CRunModeAgent::ResetAttachToAll(RThread& aTestThread, TRequestStatus* aFirstSessionStat, RSecuritySvrSession* aSecondSession)
+	{
+	
+	aTestThread.Close();
+
+	RDebug::Printf("---- ResetAttachToAll : > iServSession.SetEventAction Ignore for Kill and StartThread");
+	TInt err = iServSession.SetEventAction(EEventsKillThread, EActionIgnore);
+	test(err == KErrNone);
+	err = iServSession.SetEventAction(EEventsStartThread, EActionIgnore);
+	test(err == KErrNone);
+
+
+	if (aFirstSessionStat)
+		{
+		RDebug::Printf("---- ResetAttachToAll : > iServSession.CancelGetEvent");
+		iServSession.CancelGetEvent();
+		
+		RDebug::Printf("---- ResetAttachToAll : > User::WaitForRequest(*aFirstSessionStat);");
+		User::WaitForRequest(*aFirstSessionStat);
+		
+		User::After(1000000);
+		RDebug::Printf("---- ResetAttachToAll : > iServSession.DetachAll");
+		test(iServSession.DetachAll() == KErrNone);
+		}
+
+	if (aSecondSession != NULL)
+		{
+		User::After(1000000);
+		RDebug::Printf("---- ResetAttachToAll : > aSecondSession.SetEventAction kill ignore");
+		err = aSecondSession->SetEventAction(iFileName, EEventsKillThread, EActionIgnore);
+		User::After(1000000);
+		test(err == KErrNone);
+		RDebug::Printf("---- ResetAttachToAll : > aSecondSession.SetEventAction start thrd ignore");
+		err = aSecondSession->SetEventAction(iFileName, EEventsStartThread, EActionIgnore);
+		User::After(1000000);
+		test(err == KErrNone);
+		RDebug::Printf("---- ResetAttachToAll : > aSecondSession.DetachExecutable");
+		err = aSecondSession->DetachExecutable(iFileName);
+		User::After(1000000);
+		test( err == KErrNone);
+		}
+	}
+
+void CRunModeAgent::TestResumeBreakpointsRepeatedly()
+	{
+	test.Next(_L("TestResumeBreakpointsRepeatedly\n"));
+	test(iServSession.AttachExecutable(KRMDebugTestApplication, EFalse/*  Active */) == KErrNone);
+
+	RProcess debugProcess;
+	TThreadId debugThreadId;
+	LaunchDebugProcessAndSetBreakpoint(debugProcess, debugThreadId);
+	test(iServSession.ResumeThread(debugThreadId) == KErrNone);
+	
+	// Let the thread die naturally (at least from DSS's point of view)
+	debugProcess.Kill(0);
+	debugProcess.Close();
+
+	test.Printf(_L("Closing iServSession\n"));
+	iServSession.Close();
+	//User::After(1000000); // I hate myself...
+	test(iServSession.Connect(securityServerVersion) == KErrNone);
+	test(iServSession.AttachExecutable(KRMDebugTestApplication, EFalse/*  Active */) == KErrNone);
+
+	test.Printf(_L("Launching process for second time\n"));
+
+	LaunchDebugProcessAndSetBreakpoint(debugProcess, debugThreadId);
+	test(iServSession.ResumeThread(debugThreadId) == KErrNone);
+	debugProcess.Kill(0);
+	debugProcess.Close();
+
+	/*test.Printf(_L("Launching process for third time\n"));
+	debugProcess.Kill(0);
+	debugProcess.Close();
+	iServSession.Close();
+	User::After(1000000); // I hate myself...
+	test(iServSession.Connect(securityServerVersion) == KErrNone);
+	test(iServSession.AttachExecutable(KRMDebugTestApplication, EFalse/ *  Active * /) == KErrNone);
+	*/
+
+	test(KErrNone == iServSession.DetachExecutable(KRMDebugTestApplication));
+	}
+
+void CRunModeAgent::TimedWait(TRequestStatus& aStatus, TInt aTimeoutInMs, TInt aLineNumber)
+	{
+	RTimer timer;
+	TInt err = timer.CreateLocal();
+	test(err == KErrNone);
+
+	TRequestStatus timerstat;
+	timer.After(timerstat, aTimeoutInMs*1000);
+	User::WaitForRequest(aStatus, timerstat);
+	if (timerstat != KRequestPending)
+		{
+		test.Panic(_L("Timed out at line %d\n"), aLineNumber);
+		}
+	else
+		{
+		timer.Cancel();
+		User::WaitForRequest(timerstat);
+		}
+	timer.Close();
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debugsrv/runmodedebug/tsrc/rm_debug/basic_tests/t_rmdebug2.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,197 @@
+// Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+// Definitions for the run mode debug tests
+// 
+//
+
+
+#ifndef RMDEBUG_H
+#define RMDEBUG_H
+
+#include "t_rmdebug_app.h"
+#include "r_user_low_memory_security_svr_session.h"
+#include "r_kernel_low_memory_security_svr_session.h"
+
+
+class CRunModeAgent;
+
+// Create a pointer to function type
+typedef void (CRunModeAgent::*testFunction)();
+
+class TFunctionData
+	{
+public:
+	testFunction iFunctionPtr;
+	TBuf<40> iFunctionName;
+	};
+
+//number of test functions that we have
+const TInt KMaxTests = 31; 
+
+//
+// class CRunModeAgent
+//
+// The basic run mode agent.
+//
+class CRunModeAgent : public CBase
+	{
+public:
+	static CRunModeAgent* NewL();
+	~CRunModeAgent();
+	void ClientAppL();
+
+private:
+	CRunModeAgent();
+	void ConstructL();
+	void SetupAndAttachToDSS();
+
+	TInt TestStartup();
+	TInt TestShutdown();
+
+	void TestGetExecutablesList();
+	void TestGetProcessList();
+	void TestGetThreadList();
+	void TestGetCodeSegsList();
+	void TestGetXipLibrariesList();
+	void TestGetListInvalidData();
+
+	TBool DoTestGetThreadList(const TBool aShouldPass, const Debug::TListScope aListScope, const TUint64 aTargetId=0);
+	void DoTestGetCodeSegsList(const TBool aShouldPass, const Debug::TListScope aListScope, const TUint64 aTargetId=0);
+
+	void DoGetList(const Debug::TListId aListId, const Debug::TListScope aListScope, RBuf8& aBuffer, TUint32& aSize, const TUint64 aTargetId=0);
+
+	void TestMemoryAccess();
+	void TestSuspendResume();
+	void TestBreakPoints();
+	void TestConsecutiveBreakPoints();
+	void TestModifyBreak();
+	void DoTestModifyBreak(TBool aThreadSpecific);
+	void TestBreakInfo();
+	void DoTestBreakInfo(TBool aThreadSpecific);
+	void TestRunToBreak();
+	void DoTestRunToBreak(TBool aThreadSpecific);
+	void TestBreakPointsInLoop();
+	void DoTestBreakPointsInLoop(TBool aThreadSpecific);
+	void TestRegisterAccess();
+	void TestAttachExecutable();
+	void TestDebugFunctionality();
+	void TestStep();
+	void DoTestStep(TBool aThreadSpecific);
+	void TestDriverSecurity();
+	void TestSecurity();
+	void TestEvents();
+	void TestEventsForExternalProcess();
+	void TestDemandPaging();
+	void TestTraceSecurity();
+	void TestDllUsage();
+	void TestKillProcess();
+	void TestProcessBreakPoints();
+	void TestMultipleTraceEvents();
+	void TestAddRemoveProcessEvents();
+	void TestProcessKillBreakpoint();
+	void DoTestProcessKillBreakpoint();
+	void TestAttachToAll();
+	void ResetAttachToAll(RThread& aTestThread, TRequestStatus* aFirstSessionStat=NULL, Debug::RSecuritySvrSession* aSecondSession=NULL);
+	void LaunchDebugProcessAndSetBreakpoint(RProcess& aResultProcess, TThreadId& aResultThread);
+	void TestResumeBreakpointsRepeatedly();
+
+	//crash flash test functions
+	void TestCrashFlash();
+		
+	TInt GetFlag(const TDes8 &aFlags, const TUint aOffset, Debug::TRegisterFlag &aFlagValue) const;
+
+	void ReportPerformance(void);
+
+	// helper functions
+	void HelpTestSecurityAttachDetachExecutable(const TDesC& aProcessName, TBool aExpectSuccess);
+
+	TInt HelpTestStepSetBreak(Debug::TBreakId& aBreakId, TThreadId aThreadId, const TUint32 aBreakAddress, Debug::TArchitectureMode aMode, TBool aThreadSpecific=ETrue, TProcessId aProcessId=0);
+	TInt HelpTestStepClearBreak(const Debug::TBreakId aBreakId, const TThreadId aThreadId, TBool aThreadSpecific);
+	TInt HelpTestStepWaitForBreak(const TDesC& aProcessName, Debug::TEventInfo& aEventInfo);
+	TInt HelpTestStepReadPC(TThreadId aThreadId, TUint32& aPC);
+	TInt HelpTestStep(TThreadId aThreadId, TUint32 aStartAddress, TUint32 aEndAddress, Debug::TArchitectureMode aMode, TUint aNumSteps, TBool aThreadSpecific=ETrue, TProcessId=0);
+
+	TInt HelpTicksPerSecond(void);
+
+	// helper functions
+	void HelpStartTestTimer(void) { iStartTick = User::NTickCount(); iStopTick = 0; };
+	void HelpStopTestTimer(void) { iStopTick = User::NTickCount(); };
+	TInt HelpGetTestTicks(void) { return (iStopTick - iStartTick); };
+	TInt SwitchTestFunction(TTestFunction aTestFunction, const TBool aResume = ETrue);
+	TInt LaunchProcess(RProcess& aProcess, const TDesC& aFileName, TDebugFunctionType aFunctionType, TUint32 aDelay=0, TUint32 aExtraThreads=0);
+	Debug::TTagHeader* GetTagHdr(const TDesC8& aDebugFunctionalityBlock, const Debug::TTagHeaderId aTagHdrId) const;
+	Debug::TTag* GetTag(const Debug::TTagHeader* aTagHdr, const TInt aElement) const;
+	Debug::TTag GetTag(const Debug::TTagHeaderId aTagHdrId, const TInt aElement);
+	TBool ProcessExists(const TProcessId aProcessId);
+	TBool ThreadExistsForProcess(const TThreadId aThreadId, const TProcessId aProcessId);
+	TBool ListingSupported(const Debug::TListId aListId, const Debug::TListScope aListScope);
+	void TestEventsWithExtraThreads(Debug::TKernelEventAction aActionMain, Debug::TKernelEventAction aActionExtra, TUint32 aExtraThreads);
+	void FillArray();
+	void PrintUsage();
+	void PrintVersion();
+
+	enum TTestMode 
+		{
+		//run all the tests
+		EModeAll = 1<<0,
+		//run the specified tests in reverse order
+		EModeReverse = 1<<1,
+		//print out help
+		EModeHelp = 1<<2,
+		//print out help
+		EModeVersion = 1<<3
+		};
+
+	void RunTest(TInt aTestNumber);
+	void ParseCommandLineL(TUint32& aMode, RArray<TInt>& aTests);
+
+	TBool ProcessExists(const TDesC& aProcessName);
+	static void TimedWait(TRequestStatus& aStatus, TInt aTimeoutInMs, TInt aLineNumber);
+
+
+private:
+
+	TFunctionData iTestArray[KMaxTests];
+#if defined(KERNEL_OOM_TESTING)
+	RKernelLowMemorySecuritySvrSession iServSession;
+#elif defined (USER_OOM_TESTING)
+	RUserLowMemorySecuritySvrSession iServSession;
+#else
+	Debug::RSecuritySvrSession iServSession;
+#endif
+	RThread	iDebugThread;
+	
+	//Set by test thread, used to check its run state
+	RProperty iRunCountSubscribe;
+	
+	// Used for timeouts when checking the run state
+	RTimer iTimer;
+	
+	RProcess iDSSProcess;
+	TThreadId iThreadID;
+	TFileName iFileName;
+
+	// Performance data
+	TInt iMemoryReadKbytesPerSecond;	
+	TInt iMemoryWriteKbytesPerSecond;	
+	TInt iBreakpointsPerSecond;
+	TInt iMaxBreakpoints;
+	TInt iStepsPerSecond;
+
+	// Timing information
+	TInt iStartTick;
+	TInt iStopTick;
+	};
+
+#endif // RMDEBUG_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debugsrv/runmodedebug/tsrc/rm_debug/basic_tests/t_rmdebug2_oemtoken.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,27 @@
+// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+//
+
+
+#include <e32base.h>
+#include <e32base_private.h>
+
+GLDEF_C TInt E32Main()
+	{
+	// No need to do anything, the only requirement is that
+	// this executable can be loaded and runs to completion
+	return 0;
+	}
+
+// End of file - t_rmdebug2_oemtoken.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debugsrv/runmodedebug/tsrc/rm_debug/common/t_debug_logging.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,68 @@
+// Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+// Logging macros for use in debug subsystem
+// 
+//
+
+#ifndef RMDEBUG_LOGGING_H
+#define RMDEBUG_LOGGING_H
+
+/* Debug messages
+ * 
+ * Debug messages are only generated for debug builds.
+ * 
+ * As user mode use RDebug::Printf(). 
+ * 
+ */
+
+// Uncomment if logging of required
+//#define RMDEBUG_LOGGING 
+
+#ifdef RMDEBUG_LOGGING
+
+   #include <e32debug.h>
+
+    #define LOG_MSG(args...)            RDebug::Printf(args)
+    #define LOG_DES(args...)            RDebug::Print(args) // For wide descriptors
+    #define LOG_ENTRY()                 RDebug::Printf("+%s", __PRETTY_FUNCTION__)
+    #define LOG_EXIT()                  RDebug::Printf("-%s", __PRETTY_FUNCTION__)
+    #define LOG_ARGS(fmt, args...)      RDebug::Printf("+%s " fmt, __PRETTY_FUNCTION__, args)
+    #define LOG_RETURN(x)               RDebug::Printf("Returning %d from [%s]", x, __PRETTY_FUNCTION__)
+
+    // Kept for compatibility
+    #define LOG_MSG2( a, b )            RDebug::Printf( a, b )
+    #define LOG_MSG3( a, b, c )         RDebug::Printf( a, b, c )
+    #define LOG_MSG4( a, b, c, d )      RDebug::Printf( a, b, c, d )
+    #define LOG_MSG5( a, b, c, d, e )   RDebug::Printf( a, b, c, d, e )
+
+#else
+
+   #include <e32debug.h>
+
+    #define LOG_MSG(args...)            
+    #define LOG_DES(args...)           
+    #define LOG_ENTRY()                 
+    #define LOG_EXIT()                 
+    #define LOG_ARGS(fmt, args...)      
+    #define LOG_RETURN(x)               
+
+    // Kept for compatibility
+    #define LOG_MSG2( a, b )            
+    #define LOG_MSG3( a, b, c )         
+    #define LOG_MSG4( a, b, c, d )     
+    #define LOG_MSG5( a, b, c, d, e )  
+
+#endif 
+
+#endif //RMDEBUG_LOGGING
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debugsrv/runmodedebug/tsrc/rm_debug/common/t_target_launcher.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,224 @@
+// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+// Helper app to launch debug targets. Uses command-line parameters as follows using a + sign:
+//  +n<number of applications to launch>
+//  +m<number of times to launch each application>
+//  +o<order of launch, 1 means launch in reverse order>
+//
+
+#include <e32base.h>
+#include <e32base_private.h>
+#include <e32cons.h>
+#include <e32test.h>
+#include <e32ldr.h>
+#include <e32cmn.h>
+#include <e32cmn_private.h>
+#include <f32dbg.h>
+#include <f32file.h>
+#include <hal.h>
+#include <u32hal.h>
+#include <e32property.h>
+
+#include "t_target_launcher.h"
+
+
+/**
+  Launch a process
+
+  @param aProcess The RProcess object to use to create the process
+  @param aExeName File name of the executable to create the process from
+  @param aCommandLine The command line to pass to the new process
+  @return KErrNone on success, or one of the other system wide error codes
+  */
+TInt LaunchProcess(RProcess& aProcess, TDesC & aExeName, TPtr & aCommandLine )
+    {
+
+    TPtrC commandLine( aCommandLine );
+
+    TInt err = aProcess.Create( aExeName, commandLine );
+
+    // check that there was no error raised
+    if(err != KErrNone)
+        {
+        return err;
+        }
+
+    TRequestStatus status = KRequestPending;
+    aProcess.Rendezvous(status);
+
+    if(KRequestPending != status.Int())
+        {
+        // startup failed so kill the process
+        RDebug::Printf( "> RProcess Rendezvous() failed with %d. Killing process", status.Int() );
+        aProcess.Kill(KErrNone);
+        return status.Int();
+        }
+    else
+        {
+        // start up succeeded so resume the process
+        aProcess.Resume();
+        User::WaitForRequest(status);
+        if(KErrNone != status.Int())
+            {
+            RDebug::Printf( "> RProcess Resume() failed with %d. Killing process", status.Int() );
+            aProcess.Kill(KErrNone);
+            }
+        return status.Int();
+        }
+    }
+
+/**
+ * Read command line parameters and control the launching of targets. 
+ * Create global launch semaphore KLaunchSemaphoreName
+ */
+void MainL()
+    {
+
+    TInt numApps = KNumApps;
+    TInt numLaunches = KNumLaunches;
+    TInt launchControl = 0;
+
+    TInt argc = User::CommandLineLength();
+    HBufC* commandLine = NULL;
+    RDebug::Printf( ">Launcher Process() argc=%d", argc );
+
+    if( argc )
+        {
+        commandLine = HBufC::NewLC(argc);
+        TPtr commandLineBuffer = commandLine->Des();
+        User::CommandLine(commandLineBuffer);
+
+        RBuf printCommandLine;
+        CleanupClosePushL( printCommandLine );
+        printCommandLine.CreateL( commandLine->Des().Length() );
+        printCommandLine.Copy( commandLine->Des() );
+        printCommandLine.Collapse();
+        RDebug::Printf( ">command line = %S", &printCommandLine );
+        CleanupStack::PopAndDestroy( &printCommandLine );
+
+        // create a lexer and read through the command line
+        TLex lex(*commandLine);
+        while (!lex.Eos())
+            {
+            // only look for options with first character '+', other switches are for the targets
+            if (lex.Get() == '+')
+                {
+                TChar arg = lex.Get();
+                switch (arg)
+                    {
+                    case 'n':
+                        lex.Val( numApps );
+                        RDebug::Printf("parsed numApps as %d", numApps);
+                        break;
+                    case 'm':
+                        lex.Val( numLaunches );
+                        RDebug::Printf("parsed numLaunches as %d", numLaunches );
+                        break;
+                    case 'o':
+                        lex.Val( launchControl );
+                        RDebug::Printf("parsed launchControl as %d", launchControl);
+                        break;
+                    default:
+                        // unknown argument ignore it
+                        break;             
+                    }//switch
+                }// if +
+            }//while
+        }//if argc
+
+   RSemaphore launchSemaphore;
+   TInt ret = KErrNone;
+   CleanupClosePushL( launchSemaphore );
+   ret = launchSemaphore.CreateGlobal( KLaunchSemaphoreName, 0 );
+   RDebug::Printf( ">Target Launcher : RSemaphore.CreateGlobal ret %d", ret);
+   User::LeaveIfError( ret );
+
+   ret = launchSemaphore.OpenGlobal( KLaunchSemaphoreName );
+   RDebug::Printf( ">Target Launcher : RSemaphore.OpenGlobal ret %d", ret);
+   User::LeaveIfError( ret );
+   
+   //Only now indicate to the launcher that we have fully started, so they can find and open the semaphore
+   RProcess::Rendezvous(KErrNone);
+
+   //Now launch the requested number of apps for the requested number of launches
+   for( ; numLaunches > 0; numLaunches-- )
+       { 
+       for( TInt launchIndex = numApps; launchIndex > 0; launchIndex-- )  
+           {
+           RDebug::Printf( ">Target Launcher:  Semaphore wait app %d, launch %d", launchIndex, numLaunches );
+           launchSemaphore.Wait();
+
+           RBuf targetName;
+           CleanupClosePushL( targetName );
+           RDebug::Printf( ">Target Launcher:  targetName.Create %d, launch %d", launchIndex, numLaunches );
+           targetName.Create( KTargetExe().Length() + 2 );
+
+           if( launchControl == 1 )
+               {
+               // Reverse the order of the apps launched by reversing the index in the name
+               RDebug::Printf( ">Target Launcher:  targetName.Format %d, launch %d", numApps - launchIndex + 1, numLaunches );
+               targetName.Format( KTargetExe(), numApps - launchIndex + 1 );
+               }
+           else
+               {
+               RDebug::Printf( ">Target Launcher:  targetName.Format %d, launch %d", launchIndex, numLaunches );
+               targetName.Format( KTargetExe(), launchIndex );
+               }
+
+           RProcess aProc;
+           CleanupClosePushL( aProc ); 
+    
+           RDebug::Printf( ">Target Launcher: LaunchProcess %d, launch %d", launchIndex, numLaunches );
+           RDebug::Printf( ">LaunchProcess %lS", &targetName );
+           TPtr cmdLinePtr( commandLine->Des() );
+           ret = LaunchProcess( aProc, targetName, cmdLinePtr );
+           CleanupStack::PopAndDestroy( &aProc );
+
+           RDebug::Printf( "<Target Launcher: LaunchProcess returned %d", ret );
+           CleanupStack::PopAndDestroy( &targetName );
+
+           User::LeaveIfError( ret );
+
+           //By now the add proc event should have been delivered to the
+           //test app agent.
+           }
+       }
+
+    launchSemaphore.Wait( 500000 );
+
+    CleanupStack::PopAndDestroy( &launchSemaphore );
+
+    if( commandLine )
+       CleanupStack::PopAndDestroy( commandLine );
+ 
+    }
+
+
+GLDEF_C TInt E32Main()
+	{
+	RProcess thisProcess;
+	thisProcess.Rendezvous(KErrNone);
+	RDebug::Printf( ">Launcher Process()" );
+
+	CTrapCleanup* trap = CTrapCleanup::New();
+	if (!trap)
+		return KErrNoMemory;
+
+	TRAPD(err, MainL());
+	RDebug::Printf( "< Target launching returned %d", err);
+	
+	delete trap;
+	
+	return err;
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debugsrv/runmodedebug/tsrc/rm_debug/common/t_target_launcher.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,43 @@
+// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+// Definitions for target launcher
+// 
+//
+
+
+#ifndef RMDEBUG_TARGET_LAUNCHER_H
+#define RMDEBUG_TARGET_LAUNCHER_H
+
+// Controls how many times the target applications are launched
+const TInt KNumLaunches = 3;
+
+// Controls how many applications are attached and launched
+// If changing this, need to make sure there are enough apps
+// being built. see KTargetExe and t_rmdebug_app*
+const TInt KNumApps = 4;  
+
+_LIT(KLaunchSemaphoreName, "t_rmdebug_launch_semaphore");
+_LIT(KLaunchSemaphoreNameSearchString, "t_rmdebug_launch_semaphore*");
+_LIT(KTargetExe,"z:\\sys\\bin\\t_rmdebug_app%d.exe");
+_LIT8(KTargetExeName,"t_rmdebug_app%d.exe");
+_LIT(KProcessFinder,"*t_rmdebug_app%d*");
+_LIT(KTargetOptions,"-f%d");
+
+_LIT(KZSysBin,"z:\\sys\\bin\\");
+
+_LIT(KLauncherExe,"t_rmdebug_target_launcher.exe");
+
+_LIT_SECURITY_POLICY_PASS(KAllowAllPolicy);
+
+#endif // RMDEBUG_TARGET_LAUNCHER_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debugsrv/runmodedebug/tsrc/rm_debug/debug_targets/d_demand_paging.cia	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,57 @@
+// 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 "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:
+//
+// Description:
+// 
+//
+
+
+#include <u32std.h>
+
+// unused function that contains enough padding that the test function
+// RMDebugDemandPagingTest starts in a new page.
+__NAKED__ TInt RMDebugDemandPagingPaddingBefore()
+	{
+	asm("movs       r2,r0");
+	asm("adds       r0,r2,r1");
+	asm("bx         lr");
+	// add padding to make this function 4kb in size.
+	// The 4084 corresponds to 2^12 (=4096) - 12,
+	// the 12 being the total size of the movs, adds and bx instructions.
+	asm(".space     4084");
+	}
+
+// test function which is in a page by itself
+__NAKED__ TInt RMDebugDemandPagingTest()
+	{
+	asm("movs       r2,r0");
+	asm("adds       r0,r2,r1");
+	asm("bx         lr");
+	// add padding to make this function 4kb in size.
+	// The 4084 corresponds to 2^12 (=4096) - 12,
+	// the 12 being the total size of the movs, adds and bx instructions.
+	asm(".space     4084");
+	}
+
+// unused function that contains enough padding to ensure that no used code
+// is in the same page as RMDebugDemandPagingTest
+__NAKED__ TInt RMDebugDemandPagingPaddingAfter()
+	{
+	asm("movs       r2,r0");
+	asm("adds       r0,r2,r1");
+	asm("bx         lr");
+	// add padding to make this function 4kb in size.
+	// The 4084 corresponds to 2^12 (=4096) - 12,
+	// the 12 being the total size of the movs, adds and bx instructions.
+	asm(".space     4084");
+	}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debugsrv/runmodedebug/tsrc/rm_debug/debug_targets/d_demand_paging.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,22 @@
+// 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 "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:
+//
+// Description:
+// definitions of functions in d_demand_paging.cia
+//
+
+#ifndef D_DEMAND_PAGING_H
+#define D_DEMAND_PAGING_H
+
+TInt RMDebugDemandPagingTest();
+
+#endif // D_DEMAND_PAGING_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debugsrv/runmodedebug/tsrc/rm_debug/debug_targets/d_rmdebug_bkpt_test.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,28 @@
+// Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+//
+
+// definitions of functions in d_rmdebug_bkpt_test.s
+
+#ifndef D_RMDEBUG_BKPT_TESTS_H
+#define D_RMDEBUG_BKPT_TESTS_H
+
+extern "C"
+{
+	// Breakpoints in loop test
+	unsigned int RMDebug_Bkpt_Test_Entry(void);
+	unsigned int RMDebug_Bkpt_Test_Loop_Break_1(void);
+	unsigned int RMDebug_Bkpt_Test_Loop_Break_2(void);
+}
+#endif // D_RMDEBUG_BKPT_TESTS_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debugsrv/runmodedebug/tsrc/rm_debug/debug_targets/d_rmdebug_bkpt_test.s	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,52 @@
+; Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "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:
+;
+; Description:
+;
+
+        AREA |d-rmdebug-bkpt$$Code|, CODE, READONLY, ALIGN=6
+
+	CODE32
+
+;
+; Breakpoints in loop test
+; 
+; This function initialises some variables and then performs some basic operations 
+; within the for loop. This allows us to set multiple breakpoints within the loop 
+; to test and see whether they are being hit. 
+;
+
+	EXPORT RMDebug_Bkpt_Test_Entry
+	EXPORT RMDebug_Bkpt_Test_Loop_Break_1
+	EXPORT RMDebug_Bkpt_Test_Loop_Break_2
+	
+RMDebug_Bkpt_Test_Entry
+    mov r2,#10
+    mov r0,#20    
+    mov r3,#0
+    mov r1,#1
+    b COMPARE
+LOOP      
+    add r3,r2,r0   
+RMDebug_Bkpt_Test_Loop_Break_1    
+    mov r2,r0
+RMDebug_Bkpt_Test_Loop_Break_2  
+    mov r0,r3 
+    add r1,r1,#1
+COMPARE
+    cmp r1,#30
+    ble LOOP 
+    bx lr
+ 
+	END
+
+; End of file - d_rmdebug_bkpt_test.s
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debugsrv/runmodedebug/tsrc/rm_debug/debug_targets/d_rmdebug_step_test.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,81 @@
+// 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 "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:
+//
+// Description:
+// 
+// definitions of functions in d_rmdebug_step_tests.s
+//
+
+#ifndef D_RMDEBUG_STEP_TESTS_H
+#define D_RMDEBUG_STEP_TESTS_H
+
+extern "C"
+{
+	// ARM tests
+	unsigned int RMDebug_StepTest_Non_PC_Modifying(void);
+	unsigned int RMDebug_StepTest_Non_PC_Modifying_OK(void);
+	
+	unsigned int RMDebug_StepTest_Branch(void);
+	unsigned int RMDebug_StepTest_Branch_1(void);
+
+	unsigned int RMDebug_StepTest_Branch_And_Link(void);
+	unsigned int RMDebug_StepTest_Branch_And_Link_1(void);
+	unsigned int RMDebug_StepTest_Branch_And_Link_2(void);
+	
+	unsigned int RMDebug_StepTest_MOV_PC(void);
+	unsigned int RMDebug_StepTest_MOV_PC_1(void);
+	unsigned int RMDebug_StepTest_MOV_PC_2(void);
+	
+	unsigned int RMDebug_StepTest_LDR_PC(void);
+	unsigned int RMDebug_StepTest_LDR_PC_1(void);
+
+	// Thumb tests
+	unsigned int RMDebug_StepTest_Thumb_Non_PC_Modifying(void);
+	unsigned int RMDebug_StepTest_Thumb_Non_PC_Modifying_1(void);
+	unsigned int RMDebug_StepTest_Thumb_Non_PC_Modifying_2(void);
+
+	unsigned int RMDebug_StepTest_Thumb_Branch(void);
+	unsigned int RMDebug_StepTest_Thumb_Branch_1(void);
+	unsigned int RMDebug_StepTest_Thumb_Branch_2(void);
+	
+	unsigned int RMDebug_StepTest_Thumb_Branch_And_Link(void);
+	unsigned int RMDebug_StepTest_Thumb_Branch_And_Link_1(void);
+	unsigned int RMDebug_StepTest_Thumb_Branch_And_Link_2(void);
+	unsigned int RMDebug_StepTest_Thumb_Branch_And_Link_3(void);
+
+	unsigned int RMDebug_StepTest_Thumb_Back_Branch_And_Link(void);
+	unsigned int RMDebug_StepTest_Thumb_Back_Branch_And_Link_1(void);
+	unsigned int RMDebug_StepTest_Thumb_Back_Branch_And_Link_2(void);
+	unsigned int RMDebug_StepTest_Thumb_Back_Branch_And_Link_3(void);
+
+	unsigned int RMDebug_StepTest_Thumb_AddPC(void);
+	unsigned int RMDebug_StepTest_Thumb_AddPC_1(void);
+	unsigned int RMDebug_StepTest_Thumb_AddPC_2(void);
+	unsigned int RMDebug_StepTest_Thumb_AddPC_3(void);
+
+	// ARM<->Thumb interworking tests
+	unsigned int RMDebug_StepTest_Interwork(void);
+	unsigned int RMDebug_StepTest_Interwork_1(void);
+	unsigned int RMDebug_StepTest_Interwork_2(void);
+	unsigned int RMDebug_StepTest_Interwork_3(void);
+
+	// Stepping performance test
+	unsigned int RMDebug_StepTest_Count(void);
+	unsigned int RMDebug_StepTest_Count_1(void);
+	unsigned int RMDebug_StepTest_Count_2(void);
+
+	// Multiple step test
+	unsigned int RMDebug_StepTest_ARM_Step_Multiple(void);
+	unsigned int RMDebug_StepTest_ARM_Step_Multiple_1(void);
+
+}
+#endif // D_RMDEBUG_STEP_TESTS_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debugsrv/runmodedebug/tsrc/rm_debug/debug_targets/d_rmdebug_step_test.s	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,268 @@
+; 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 "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:
+;
+; Description:
+; 
+;
+
+        
+		AREA |d-rmdebug-step$$Code|, CODE, READONLY, ALIGN=6
+
+	CODE32
+
+	; ARM tests
+	
+; 
+; Non-PC modifying
+;
+	EXPORT RMDebug_StepTest_Non_PC_Modifying
+	EXPORT RMDebug_StepTest_Non_PC_Modifying_OK
+ 
+RMDebug_StepTest_Non_PC_Modifying
+	mov		r0,r0		; nop
+RMDebug_StepTest_Non_PC_Modifying_OK
+	bx		lr			; should return to normal execution of the test thread
+
+;
+; Branch
+;
+	EXPORT RMDebug_StepTest_Branch
+	EXPORT RMDebug_StepTest_Branch_1
+
+RMDebug_StepTest_Branch
+	b		RMDebug_StepTest_Branch_1		
+	mov		r0, #2		; if the pc ends up here, we know its gone wrong
+RMDebug_StepTest_Branch_1
+	bx		lr			; return
+
+;
+; Branch and Link
+;
+	EXPORT RMDebug_StepTest_Branch_And_Link
+	EXPORT RMDebug_StepTest_Branch_And_Link_1
+	EXPORT RMDebug_StepTest_Branch_And_Link_2
+
+RMDebug_StepTest_Branch_And_Link		
+	mov		r0, lr		; preserve lr for the moment
+RMDebug_StepTest_Branch_And_Link_1
+	bl		RMDebug_StepTest_Branch_And_Link_2
+	mov		r1, #1		; insert a gap in the instruction stream so we know we branched.
+RMDebug_StepTest_Branch_And_Link_2
+	mov		lr, r0		; restore lr			
+	bx		lr			; should return to normal execution of the test thread
+
+;
+; MOV PC
+;
+	EXPORT RMDebug_StepTest_MOV_PC
+	EXPORT RMDebug_StepTest_MOV_PC_1
+	EXPORT RMDebug_StepTest_MOV_PC_2
+
+RMDebug_StepTest_MOV_PC
+	mov		r0, #4
+RMDebug_StepTest_MOV_PC_1
+	add		pc, pc, r0	; should be a jump (bear in mind reading pc = current inst + 8bytes for arm)
+	mov		r0, #1		; Simple instructions which allow us to test where the PC really is
+	mov		r0, #2		; just by reading r0.
+RMDebug_StepTest_MOV_PC_2
+	mov		r0, #3		; 
+	mov		r0, #4		; 
+	bx		lr			; should return to normal execution of the test thread
+
+; 
+; LDR PC
+;
+	EXPORT RMDebug_StepTest_LDR_PC
+	EXPORT RMDebug_StepTest_LDR_PC_1
+
+RMDebug_StepTest_LDR_PC
+	ldr		pc, =RMDebug_StepTest_LDR_PC_1
+	mov		r0, #1		;  separate the branch target so we can prove it works
+RMDebug_StepTest_LDR_PC_1
+	bx		lr			; should return to normal execution of the test thread
+	
+;
+; ARM -> Thumb -> ARM interworking test
+;
+; Note: We always start and finish this test
+; in ARM mode.
+	EXPORT RMDebug_StepTest_Interwork
+	EXPORT RMDebug_StepTest_Interwork_1
+	EXPORT RMDebug_StepTest_Interwork_2
+	EXPORT RMDebug_StepTest_Interwork_3	
+RMDebug_StepTest_Interwork
+	mov		r0, lr	; preserve lr
+RMDebug_StepTest_Interwork_1
+	blx		RMDebug_StepTest_Interwork_2
+
+	CODE16
+RMDebug_StepTest_Interwork_2
+	blx		RMDebug_StepTest_Interwork_3
+
+	CODE32
+
+RMDebug_StepTest_Interwork_3
+	bx		r0
+
+;
+; Stepping performance tests
+;
+; This counts down from 100000 to 0
+; This means that for all practical purposes
+; we can single-step as much as we like
+; in less than one second and have some likelyhood
+; that we will not step too far from our loop
+
+	EXPORT RMDebug_StepTest_Count
+	EXPORT RMDebug_StepTest_Count_1
+	EXPORT RMDebug_StepTest_Count_2
+
+RMDebug_StepTest_Count
+	ldr		r2, =100000
+RMDebug_StepTest_Count_1
+	subs	r2, r2, #1
+RMDebug_StepTest_Count_2
+	bne		RMDebug_StepTest_Count_1
+	bx		lr
+
+; Thumb tests
+
+; Thumb non-pc modifying
+;
+;
+RMDebug_StepTest_Thumb_Non_PC_Modifying
+	mov		r0, lr	; preserve lr
+	blx		RMDebug_StepTest_Thumb_Non_PC_Modifying_1
+	bx		r0
+
+;
+; Thumb Branch
+;
+RMDebug_StepTest_Thumb_Branch
+	mov		r0, lr	; preserve lr
+	blx		RMDebug_StepTest_Thumb_Branch_1
+	bx		r0		
+
+;
+; Thumb Branch and link
+;
+RMDebug_StepTest_Thumb_Branch_And_Link
+	mov		r0, lr	; preserve lr
+	blx		RMDebug_StepTest_Thumb_Branch_And_Link_1
+	bx		r0 
+
+;
+; Thumb Back Branch and link
+;
+RMDebug_StepTest_Thumb_Back_Branch_And_Link
+	mov		r0, lr	; preserve lr
+	blx		RMDebug_StepTest_Thumb_Back_Branch_And_Link_1
+	bx		r0 
+
+;
+; Thumb ADD PC,PC, #0
+;
+RMDebug_StepTest_Thumb_AddPC
+	mov		r0, lr	; preserve lr
+	blx		RMDebug_StepTest_Thumb_AddPC_1
+	bx		r0 
+
+	CODE16
+
+	; Thumb tests
+	EXPORT RMDebug_StepTest_Thumb_Non_PC_Modifying
+	EXPORT RMDebug_StepTest_Thumb_Non_PC_Modifying_1
+	EXPORT RMDebug_StepTest_Thumb_Non_PC_Modifying_2
+
+	EXPORT RMDebug_StepTest_Thumb_Branch
+	EXPORT RMDebug_StepTest_Thumb_Branch_1
+	EXPORT RMDebug_StepTest_Thumb_Branch_2
+
+	EXPORT RMDebug_StepTest_Thumb_Branch_And_Link
+	EXPORT RMDebug_StepTest_Thumb_Branch_And_Link_1
+	EXPORT RMDebug_StepTest_Thumb_Branch_And_Link_2
+	EXPORT RMDebug_StepTest_Thumb_Branch_And_Link_3
+
+	EXPORT RMDebug_StepTest_Thumb_Back_Branch_And_Link
+	EXPORT RMDebug_StepTest_Thumb_Back_Branch_And_Link_1
+	EXPORT RMDebug_StepTest_Thumb_Back_Branch_And_Link_2
+	EXPORT RMDebug_StepTest_Thumb_Back_Branch_And_Link_3
+
+RMDebug_StepTest_Thumb_Non_PC_Modifying_1
+	mov		r0, r0	; nop
+RMDebug_StepTest_Thumb_Non_PC_Modifying_2
+	bx		lr	
+
+RMDebug_StepTest_Thumb_Branch_1
+	b		RMDebug_StepTest_Thumb_Branch_2
+	mov		r0, r0
+RMDebug_StepTest_Thumb_Branch_2
+	bx		lr
+
+RMDebug_StepTest_Thumb_Branch_And_Link_1
+	mov		r1, lr
+RMDebug_StepTest_Thumb_Branch_And_Link_2
+	bl		RMDebug_StepTest_Thumb_Branch_And_Link_3
+	mov		r0, r0
+RMDebug_StepTest_Thumb_Branch_And_Link_3
+	bx		r1
+
+RMDebug_StepTest_Thumb_Back_Branch_And_Link_3
+	bx		r1
+
+RMDebug_StepTest_Thumb_Back_Branch_And_Link_1
+	mov		r1, lr
+RMDebug_StepTest_Thumb_Back_Branch_And_Link_2
+	bl		RMDebug_StepTest_Thumb_Back_Branch_And_Link_3
+	bx		r1
+
+;
+; ADD PC
+;
+	EXPORT RMDebug_StepTest_Thumb_AddPC
+	EXPORT RMDebug_StepTest_Thumb_AddPC_1
+	EXPORT RMDebug_StepTest_Thumb_AddPC_2
+	EXPORT RMDebug_StepTest_Thumb_AddPC_3
+
+RMDebug_StepTest_Thumb_AddPC_1
+	mov		r1, lr
+	mov		r2, #4
+RMDebug_StepTest_Thumb_AddPC_2
+	add		pc, pc, r2	; should arrive at RMDebug_StepTest_Thumb_AddPC_3
+	mov		r0, r0
+	mov		r0, r0
+	mov		r0, r0
+RMDebug_StepTest_Thumb_AddPC_3
+	bx		r1
+
+	ALIGN 4
+
+	CODE32
+
+;
+; ARM multiple-step ( 5 steps )
+;
+	EXPORT RMDebug_StepTest_ARM_Step_Multiple
+	EXPORT RMDebug_StepTest_ARM_Step_Multiple_1
+
+RMDebug_StepTest_ARM_Step_Multiple
+	mov		r0,r0		; nop
+	mov		r0,r0		; nop
+	mov		r0,r0		; nop
+	mov		r0,r0		; nop
+	mov		r0,r0		; nop
+RMDebug_StepTest_ARM_Step_Multiple_1
+	bx		lr
+
+	END
+
+; End of file - d_rmdebug_step_test.s
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debugsrv/runmodedebug/tsrc/rm_debug/debug_targets/d_rmdebug_step_test_armv4.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,50 @@
+// 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 "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:
+//
+// Description:
+// definitions of functions in d_rmdebug_step_tests_armv4.s
+//
+
+#ifndef D_RMDEBUG_STEP_TESTS_H
+#define D_RMDEBUG_STEP_TESTS_H
+
+extern "C"
+{
+	// ARM tests
+	unsigned int RMDebug_StepTest_Non_PC_Modifying(void);
+	unsigned int RMDebug_StepTest_Non_PC_Modifying_OK(void);
+	
+	unsigned int RMDebug_StepTest_Branch(void);
+	unsigned int RMDebug_StepTest_Branch_1(void);
+
+	unsigned int RMDebug_StepTest_Branch_And_Link(void);
+	unsigned int RMDebug_StepTest_Branch_And_Link_1(void);
+	unsigned int RMDebug_StepTest_Branch_And_Link_2(void);
+	
+	unsigned int RMDebug_StepTest_MOV_PC(void);
+	unsigned int RMDebug_StepTest_MOV_PC_1(void);
+	unsigned int RMDebug_StepTest_MOV_PC_2(void);
+	
+	unsigned int RMDebug_StepTest_LDR_PC(void);
+	unsigned int RMDebug_StepTest_LDR_PC_1(void);
+
+	// Stepping performance test
+	unsigned int RMDebug_StepTest_Count(void);
+	unsigned int RMDebug_StepTest_Count_1(void);
+	unsigned int RMDebug_StepTest_Count_2(void);
+
+	// Multiple step test
+	unsigned int RMDebug_StepTest_ARM_Step_Multiple(void);
+	unsigned int RMDebug_StepTest_ARM_Step_Multiple_1(void);
+
+}
+#endif // D_RMDEBUG_STEP_TESTS_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debugsrv/runmodedebug/tsrc/rm_debug/debug_targets/d_rmdebug_step_test_armv4.s	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,130 @@
+; 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 "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:
+;
+; Description:
+; 
+;
+
+        AREA |d-rmdebug-bkpt$$Code|, CODE, READONLY, ALIGN=6
+
+	CODE32
+
+	; ARM tests
+	
+; 
+; Non-PC modifying
+;
+	EXPORT RMDebug_StepTest_Non_PC_Modifying
+	EXPORT RMDebug_StepTest_Non_PC_Modifying_OK
+ 
+RMDebug_StepTest_Non_PC_Modifying
+	mov		r0,r0		; nop
+RMDebug_StepTest_Non_PC_Modifying_OK
+	bx		lr			; should return to normal execution of the test thread
+
+;
+; Branch
+;
+	EXPORT RMDebug_StepTest_Branch
+	EXPORT RMDebug_StepTest_Branch_1
+
+RMDebug_StepTest_Branch
+	b		RMDebug_StepTest_Branch_1		
+	mov		r0, #2		; if the pc ends up here, we know its gone wrong
+RMDebug_StepTest_Branch_1
+	bx		lr			; return
+
+;
+; Branch and Link
+;
+	EXPORT RMDebug_StepTest_Branch_And_Link
+	EXPORT RMDebug_StepTest_Branch_And_Link_1
+	EXPORT RMDebug_StepTest_Branch_And_Link_2
+
+RMDebug_StepTest_Branch_And_Link		
+	mov		r0, lr		; preserve lr for the moment
+RMDebug_StepTest_Branch_And_Link_1
+	bl		RMDebug_StepTest_Branch_And_Link_2
+	mov		r1, #1		; insert a gap in the instruction stream so we know we branched.
+RMDebug_StepTest_Branch_And_Link_2
+	mov		lr, r0		; restore lr			
+	bx		lr			; should return to normal execution of the test thread
+
+;
+; MOV PC
+;
+	EXPORT RMDebug_StepTest_MOV_PC
+	EXPORT RMDebug_StepTest_MOV_PC_1
+	EXPORT RMDebug_StepTest_MOV_PC_2
+
+RMDebug_StepTest_MOV_PC
+	mov		r0, #4
+RMDebug_StepTest_MOV_PC_1
+	add		pc, pc, r0	; should be a jump (bear in mind reading pc = current inst + 8bytes for arm)
+	mov		r0, #1		; Simple instructions which allow us to test where the PC really is
+	mov		r0, #2		; just by reading r0.
+RMDebug_StepTest_MOV_PC_2
+	mov		r0, #3		; 
+	mov		r0, #4		; 
+	bx		lr			; should return to normal execution of the test thread
+
+; 
+; LDR PC
+;
+	EXPORT RMDebug_StepTest_LDR_PC
+	EXPORT RMDebug_StepTest_LDR_PC_1
+
+RMDebug_StepTest_LDR_PC
+	ldr		pc, =RMDebug_StepTest_LDR_PC_1
+	mov		r0, #1		;  separate the branch target so we can prove it works
+RMDebug_StepTest_LDR_PC_1
+	bx		lr			; should return to normal execution of the test thread
+	
+;
+; Stepping performance tests
+;
+; This counts down from 100000 to 0
+; This means that for all practical purposes
+; we can single-step as much as we like
+; in less than one second and have some likelyhood
+; that we will not step too far from our loop
+
+	EXPORT RMDebug_StepTest_Count
+	EXPORT RMDebug_StepTest_Count_1
+	EXPORT RMDebug_StepTest_Count_2
+
+RMDebug_StepTest_Count
+	ldr		r2, =100000
+RMDebug_StepTest_Count_1
+	subs	r2, r2, #1
+RMDebug_StepTest_Count_2
+	bne		RMDebug_StepTest_Count_1
+	bx		lr
+
+;
+; ARM multiple-step ( 5 steps )
+;
+	EXPORT RMDebug_StepTest_ARM_Step_Multiple
+	EXPORT RMDebug_StepTest_ARM_Step_Multiple_1
+
+RMDebug_StepTest_ARM_Step_Multiple
+	mov		r0,r0		; nop
+	mov		r0,r0		; nop
+	mov		r0,r0		; nop
+	mov		r0,r0		; nop
+	mov		r0,r0		; nop
+RMDebug_StepTest_ARM_Step_Multiple_1
+	bx		lr
+
+	END
+
+; End of file - d_rmdebug_step_test_armv4.s
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debugsrv/runmodedebug/tsrc/rm_debug/debug_targets/d_rmdebugthread.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,106 @@
+// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+// Implements a debug thread for testing.
+// 
+//
+
+#include <e32base.h>
+#include <e32base_private.h>
+#include <e32cons.h>
+#include "d_rmdebugthread.h"
+
+EXPORT_C TBuf8<SYMBIAN_RMDBG_MEMORYSIZE> gMemoryAccessBytes;
+extern void RMDebug_BranchTst1();
+
+EXPORT_C TInt TestData;
+
+CDebugServThread::CDebugServThread()
+//
+// Empty constructor
+//
+	{
+	}
+
+GLDEF_C TInt CDebugServThread::ThreadFunction(TAny*)
+//
+// Generic thread function for testing
+//
+	{
+	CTrapCleanup* cleanup=CTrapCleanup::New();
+	if (cleanup == NULL)
+		{
+		User::Leave(KErrNoMemory);
+		}
+
+	RThread::Rendezvous(KErrNone);
+
+	TestData = 1;
+
+	while(1)
+		{
+		RMDebug_BranchTst1();
+
+		TestData++;                   
+
+		// Wait half a second (suspends this thread)
+		User::After(500000);
+
+		if (TestData == 0xFFFFFFFF)
+			{
+			break;
+			}
+		}
+
+	delete cleanup;
+
+	return (KErrNone);
+	}
+
+EXPORT_C TInt StartDebugThread(RThread& aDebugThread)
+//
+// Starts the test thread
+//
+{
+	TInt res=KErrNone;
+
+	// Create the thread
+	res = aDebugThread.Create(	KDebugThreadName,
+								CDebugServThread::ThreadFunction,
+								KDefaultStackSize,
+								KDebugThreadDefaultHeapSize,
+								KDebugThreadDefaultHeapSize,
+								NULL
+								);
+
+	// Check that the creation worked
+	if (res == KErrNone)
+		{
+		TRequestStatus rendezvousStatus;
+
+		aDebugThread.SetPriority(EPriorityNormal);
+		// Make a request for a rendezvous
+		aDebugThread.Rendezvous(rendezvousStatus);
+		// Set the thread as ready for execution
+		aDebugThread.Resume();
+		// Wait for the resumption
+		User::WaitForRequest(rendezvousStatus);
+		}                                 
+	else
+		{
+		// Close the handle.
+		aDebugThread.Close();
+		}
+
+	return res;
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debugsrv/runmodedebug/tsrc/rm_debug/debug_targets/d_rmdebugthread.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,38 @@
+// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+// t_rmdebugthread.h
+// Definitions for the run mode debug test thread.
+// 
+//
+
+#ifndef RMDEBUGSVRTHRD_H
+#define RMDEBUGSVRTHRD_H
+
+#define SYMBIAN_RMDBG_MEMORYSIZE    1024*4
+
+// Thread name
+_LIT(KDebugThreadName,"DebugThread");
+
+const TUint KDebugThreadDefaultHeapSize=0x10000;
+
+class CDebugServThread : public CBase
+	{
+	public:
+		CDebugServThread();
+		static TInt ThreadFunction(TAny* aStarted);    
+
+	public:
+	};
+
+#endif // RMDEBUGSVRTHRD_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debugsrv/runmodedebug/tsrc/rm_debug/debug_targets/d_rmdebugthread2.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,318 @@
+// Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+// Implements a debug thread for testing.
+// 
+//
+
+#include <e32base.h>
+#include <e32base_private.h>
+#include <e32cons.h>
+#include <e32debug.h>
+#include "d_rmdebugthread2.h"
+
+#include "d_rmdebug_step_test.h"
+#include "d_rmdebug_bkpt_test.h"
+#include "d_demand_paging.h"
+
+TBuf8<SYMBIAN_RMDBG_MEMORYSIZE> gMemoryAccessBytes;
+IMPORT_C extern void RMDebug_BranchTst1();
+IMPORT_C extern TInt RMDebugDemandPagingTest();
+
+TInt TestData;
+TTestFunction FunctionChooser;
+
+const TInt 	KNumberOfTraceCalls = 50;
+
+EXPORT_C TInt TestFunction()
+	{
+	// Set TestData to an arbitrary value that can be checked by a tester
+	TestData = 0xffeeddcc;
+	RMDebug_BranchTst1();
+	
+	// Code here may not be executed because tests can change the PC value
+	// at any time, typically once the test passes
+	return 0;
+	}
+
+/**
+  Wrapper around RMDebugDemandPagingTest, need to pause for a short time to
+  allow time in t_rmdebug.cpp to issue a User::WaitForRequest to catch the break point
+  */
+EXPORT_C void TestPagedCode()
+	{
+	User::After(100000);
+
+	// call the function in paged code
+	RMDebugDemandPagingTest();
+	}
+
+EXPORT_C void TestMultipleTraceCalls()
+	{
+	//arbitrary function to set a BP on
+	RMDebug_BranchTst1();
+
+	// The tester will change FunctionChooser once it gets what it needs out of the test
+	for(TInt cnt = KNumberOfTraceCalls; cnt>0 && (FunctionChooser==EMultipleTraceCalls); cnt--)
+		{
+		RDebug::Printf("T");
+		RDebug::Printf("R");
+		RDebug::Printf("A");
+		RDebug::Printf("C");
+		RDebug::Printf("E");
+		}
+	
+	//another arbitrary function to set a BP on
+	RMDebug_StepTest_Non_PC_Modifying();
+	}
+
+CDebugServThread::~CDebugServThread()
+    {
+    }
+
+CDebugServThread::CDebugServThread()
+//
+// Empty constructor
+//
+	{
+	}
+
+
+/**
+ * Check that the RProperty argument does not change within the given amount of time.
+ * If the property does change, the error KErrInUse is returned.
+ * 
+ */
+EXPORT_C TInt TestRunCountSame( RProperty & aProperty, RTimer & aTimer, TTimeIntervalMicroSeconds32 aTimeOut )
+    {
+    TRequestStatus propertyStatus;
+    TRequestStatus timerStatus;
+    TInt propertyValueBefore = 0;
+    TInt propertyValueAfter = 0;
+
+    aProperty.Subscribe( propertyStatus );
+    aProperty.Get( propertyValueBefore );
+    aTimer.After( timerStatus, aTimeOut );
+
+    User::WaitForRequest( propertyStatus, timerStatus );
+    if (propertyStatus != KRequestPending)
+        {
+        RDebug::Printf(" CDebugServThread::TestRunCountSame: Property has been set. Returning KErrInUse");
+        aTimer.Cancel();
+        // Wait for the KErrCancel
+        User::WaitForRequest( timerStatus );
+        return KErrInUse;
+        }
+
+    aProperty.Cancel();
+    //This will wait for the KErrCancel to be issued by the property.
+    User::WaitForRequest( propertyStatus );
+    
+    aProperty.Get( propertyValueAfter );
+    if( propertyValueAfter != propertyValueBefore )
+        {
+        RDebug::Printf(" CDebugServThread::TestRunCountSame: Change in property value. Returning KErrInUse");
+        return KErrInUse;
+        }
+        
+    return KErrNone;
+    }
+
+
+/**
+ * Check that the RProperty argument changes within the given amount of time.
+ * If the property does not change, the error KErrTimedOut is returned.
+ * If the values before and after are the same, the error KErrNotReady is returned
+ */
+EXPORT_C TInt WaitForRunCountChange( RProperty & aProperty, RTimer & aTimer, TTimeIntervalMicroSeconds32 aTimeOut )
+    {
+    TRequestStatus propertyStatus;
+    TRequestStatus timerStatus;
+    TInt propertyValueBefore = 0;
+    TInt propertyValueAfter = 0;
+    
+    aProperty.Get( propertyValueBefore );
+    aProperty.Subscribe( propertyStatus );
+
+    aTimer.After( timerStatus, aTimeOut );
+
+    User::WaitForRequest( propertyStatus, timerStatus );
+    if (timerStatus != KRequestPending)
+        {
+        RDebug::Printf(" CDebugServThread::WaitForRunCountChange: timeout. Returning KErrTimedOut");
+        aProperty.Cancel();
+        // Wait for the KErrCancel
+        User::WaitForRequest( propertyStatus );
+        return KErrTimedOut;
+        }
+    
+    aTimer.Cancel();
+    //This will wait for the KErrCancel to be issued by the timer.
+    User::WaitForRequest( timerStatus );
+    
+    aProperty.Get( propertyValueAfter );
+    if( propertyValueAfter == propertyValueBefore )
+        {
+        RDebug::Printf(" CDebugServThread::WaitForRunCountChange: No change in property value. Returning KErrNotReady");
+        return KErrNotReady;
+        }
+        
+    return KErrNone;
+    }
+
+GLDEF_C TInt CDebugServThread::ThreadFunction(TAny*)
+//
+// Generic thread function for testing
+//
+	{
+	// set FunctionChooser to run the default function
+	FunctionChooser = EDefaultFunction;
+
+	CTrapCleanup* cleanup=CTrapCleanup::New();
+	if (cleanup == NULL)
+		{
+		User::Leave(KErrNoMemory);
+		}
+    
+	TInt err = RProperty::Define( RProcess().SecureId(), ERMDBGRunCountProperty, RProperty::EInt );
+    if( (err != KErrAlreadyExists) && (err != KErrNone) )
+        {
+        RDebug::Printf("CDebugServThread::ThreadFunction - unable to create 'ERunCount' property. err:%d", err);
+        }
+    
+	RThread::Rendezvous(KErrNone);
+
+	TestData = 1;
+
+	/* Beware of adding printf or other debug-generating events in this loop because
+	* they interfere with the tests
+	*/
+	while(TestData != 0xFFFFFFFF)
+		{
+        //iRunCountPublish.Set( TestData );
+        RProperty::Set( RProcess().SecureId(), ERMDBGRunCountProperty, TestData );
+        
+		switch(FunctionChooser)
+			{
+			case EDemandPagingFunction:
+				TestPagedCode();
+				break;
+			case EDefaultFunction:
+				// the default function is the stepping test functions
+			case EStepFunction:
+				{
+				RMDebug_BranchTst1();
+
+				// Single stepping test support code
+
+				// ARM tests
+				RMDebug_StepTest_Non_PC_Modifying();
+
+				RMDebug_StepTest_Branch();
+
+				RMDebug_StepTest_Branch_And_Link();
+
+				RMDebug_StepTest_MOV_PC();
+
+				RMDebug_StepTest_LDR_PC();
+ 
+// thumb/interworking tests not supported on armv4
+#ifdef __MARM_ARMV5__
+
+				// Thumb tests
+				RMDebug_StepTest_Thumb_Non_PC_Modifying();
+
+				RMDebug_StepTest_Thumb_Branch();
+
+				RMDebug_StepTest_Thumb_Branch_And_Link();
+
+				RMDebug_StepTest_Thumb_Back_Branch_And_Link();
+
+				// ARM <-> Thumb interworking tests
+				RMDebug_StepTest_Interwork();
+
+				RMDebug_StepTest_Thumb_AddPC();
+
+#endif	// __MARM_ARMV5__
+				
+				// Single-stepping performance
+				RMDebug_StepTest_Count();
+
+				// multiple step test
+				RMDebug_StepTest_ARM_Step_Multiple();
+
+				// Breakpoints in loop test
+				RMDebug_Bkpt_Test_Entry();
+
+				TestData++;
+				
+				RDebug::Printf("** TestData=%d", TestData) ;
+
+				// Wait 50mSecs. // (suspends this thread)
+				User::After(50000);
+
+				break;
+				}
+			case EMultipleTraceCalls:
+				TestMultipleTraceCalls();
+				break;
+			default:
+				//do nothing
+				break;
+			}
+		}
+
+	RProperty::Delete( RProcess().SecureId(), ERMDBGRunCountProperty );
+	        
+	delete cleanup;
+
+	return (KErrNone);
+	}
+
+EXPORT_C TInt StartDebugThread(RThread& aDebugThread, const TDesC& aDebugThreadName)
+//
+// Starts a test thread
+//
+{
+	TInt res=KErrNone;
+
+	// Create the thread
+	res = aDebugThread.Create(	aDebugThreadName,
+								CDebugServThread::ThreadFunction,
+								KDefaultStackSize,
+								KDebugThreadDefaultHeapSize,
+								KDebugThreadDefaultHeapSize,
+								NULL
+								);
+
+	// Check that the creation worked
+	if (res == KErrNone)
+		{
+		TRequestStatus rendezvousStatus;
+
+		aDebugThread.SetPriority(EPriorityNormal);
+		// Make a request for a rendezvous
+		aDebugThread.Rendezvous(rendezvousStatus);
+		// Set the thread as ready for execution
+		aDebugThread.Resume();
+		// Wait for the resumption
+		User::WaitForRequest(rendezvousStatus);
+		}                                 
+	else
+		{
+		// Close the handle.
+		aDebugThread.Close();
+		}
+	        
+	return res;
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debugsrv/runmodedebug/tsrc/rm_debug/debug_targets/d_rmdebugthread2.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,71 @@
+// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+// Definitions for the run mode debug test thread.
+// 
+//
+
+#ifndef RMDEBUGSVRTHRD_H
+#define RMDEBUGSVRTHRD_H
+
+#include <e32property.h>
+
+#define SYMBIAN_RMDBG_MEMORYSIZE    1024*4
+
+// Thread name
+_LIT(KDebugThreadName,"DebugThread");
+
+
+IMPORT_C TInt TestRunCountSame( 
+            RProperty & aProperty, 
+            RTimer & aTimer, 
+            TTimeIntervalMicroSeconds32 aTimeOut = 500000 );
+
+
+IMPORT_C TInt WaitForRunCountChange( 
+            RProperty & aProperty, 
+            RTimer & aTimer, 
+            TTimeIntervalMicroSeconds32 aTimeOut = 500000 );
+
+const TUint KDebugThreadDefaultHeapSize=0x10000;
+
+// enumeration of functions which the target debug thread can call, the
+// debugger can choose to switch the thread to a different function by
+// writing the appropriate enumeration value into FunctionChooser, the
+// target thread will finish executing the function it is currently running
+// then execute the chosen function.
+enum TTestFunction
+	{
+	EDefaultFunction = 0,
+	EStepFunction = 1,
+	EDemandPagingFunction = 2,
+	EMultipleTraceCalls = 3,
+	EDoNothing = 4
+	};
+
+class CDebugServThread : public CBase
+	{
+	public:
+		CDebugServThread();
+		~CDebugServThread();
+		static TInt ThreadFunction(TAny* aStarted);    
+		
+
+	//Enums for all the properties used by this class
+	enum TRMDebugProperties 
+            { 
+            ERMDBGRunCountProperty = 3
+            };
+	};
+
+#endif // RMDEBUGSVRTHRD_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debugsrv/runmodedebug/tsrc/rm_debug/debug_targets/d_rmdebugthreadasm.cia	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,32 @@
+// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+// d_rmdebugthreadasm.h
+// Assembler file for debug thread testing.
+// 
+//
+
+//#include <e32cia.h>
+//#include <e32base.h>
+//#include <e32cons.h>
+//#include "d_rmdebugthread.h"
+
+EXPORT_C __NAKED__ void RMDebug_BranchTst1( void )
+//
+// 
+//
+{
+	asm("mov r0, #0 ");			// aResult==KErrNone
+	asm("bx  lr ");             // Return
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debugsrv/runmodedebug/tsrc/rm_debug/debug_targets/d_rmdebugthreadasm2.cia	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,35 @@
+// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+// d_rmdebugthreadasm2.h
+// Assembler file for debug thread testing.
+// 
+//
+
+EXPORT_C __NAKED__ void RMDebug_BranchTst1( void )
+//
+// 
+//
+{
+	asm("mov r0, #0 ");			// aResult==KErrNone
+	asm("bx  lr ");             // Return
+}
+
+EXPORT_C __NAKED__ void RMDebug_BranchTst2( void )
+//
+// 
+//
+{
+	asm("mov r0, #0 ");			// aResult==KErrNone
+	asm("bx  lr ");             // Return
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debugsrv/runmodedebug/tsrc/rm_debug/debug_targets/t_rmdebug_app.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,415 @@
+// 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 "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:
+//
+// Description:
+//
+
+#include <e32base.h>
+#include <e32base_private.h>
+#include <e32cmn.h>
+#include <e32cmn_private.h>
+#include <e32debug.h>
+#include <e32property.h> 
+#include <u32hal.h>
+#include <hal.h>
+#include <f32file.h>
+#include <e32svr.h>
+#include <e32const.h>
+
+
+#include "t_rmdebug_app.h"
+
+IMPORT_C extern void RMDebug_BranchTst2();
+
+LOCAL_C void ParseCommandLineL(TInt32& aFunctionType, TUint& aDelay, TUint& aExtraThreads, TInt32& aCpuNumber, TInt32& aThreadPriority)
+	{
+
+	// get the length of the command line arguments
+	TInt argc = User::CommandLineLength();
+	RDebug::Printf(" t_rmdebug_app: ParseCommandLineL argc=%d", argc);
+
+	// allocate a buffer for the command line arguments and extract the data to it
+	HBufC* commandLine = HBufC::NewLC(argc);
+	TPtr commandLineBuffer = commandLine->Des();
+	User::CommandLine(commandLineBuffer);
+
+	// create a lexer and read through the command line
+	TLex lex(*commandLine);
+	while (!lex.Eos())
+		{
+		// expecting the first character to be a '-'
+		if (lex.Get() == '-')
+			{
+			TChar arg = lex.Get();
+			switch (arg)
+				{
+				case 'f':
+					// the digits following '-f' give the function type
+					User::LeaveIfError(lex.Val(aFunctionType));
+					RDebug::Printf(" t_rmdebug_app: setting aFunctionType=%d", aFunctionType);
+					break;
+				case 'd':
+					// the digits following '-d' give the delay
+					User::LeaveIfError(lex.Val(aDelay));
+					RDebug::Printf(" t_rmdebug_app: setting aDelay=%d", aDelay);
+					break;
+				case 'e':
+					// the digits following '-e' give the number of extra threads to launch
+					User::LeaveIfError(lex.Val(aExtraThreads));
+					RDebug::Printf(" t_rmdebug_app: setting aExtraThreads=%d", aExtraThreads);
+					break;
+
+				case 'p':
+					// the digits following '-p' gives the value to set for the main thread priority
+					User::LeaveIfError(lex.Val(aThreadPriority));
+					RDebug::Printf(" t_rmdebug_app: aThreadPriority =%d", aThreadPriority);
+					break;
+
+				case 'a':
+					// the digits following '-a' gives the cpu on which this thread will execute on
+					User::LeaveIfError(lex.Val(aCpuNumber));
+					RDebug::Printf(" t_rmdebug_app: CPU Number =%d", aCpuNumber );
+					break;
+
+				default:
+					// unknown argument so leave
+					User::Leave(KErrArgument);
+				}
+			lex.SkipSpace();
+			}
+		else
+			{
+			// unknown argument so leave
+			User::Leave(KErrArgument);
+			}
+		}
+
+	// do clean up
+	CleanupStack::PopAndDestroy(commandLine);
+	}
+
+typedef void (*TPfun)();
+
+// test function to call corresponding to EPrefetchAbortFunction
+void PrefetchAbort()
+	{
+	TPfun f = NULL;
+	f();
+	}
+
+// test function to call corresponding to EUserPanicFunction
+void UserPanic()
+	{
+	User::Panic(KUserPanic, KUserPanicCode);
+	}
+
+// calls self repeatedly until stack is used up. Slightly convoluted to prevent UREL optimising this out...
+TUint32 StackOverFlowFunction(TUint32 aInt=0)
+	{
+	TUint32 unusedArray[150];
+	for(TInt i=0; i<150; i++)
+		{
+		unusedArray[i] = StackOverFlowFunction(i);
+		}
+	return unusedArray[0];
+	}
+
+void DataAbort()
+	{
+	TInt* r = (TInt*) 0x1000;
+	*r = 0x42;              
+	}
+
+void UndefInstruction()
+	{
+	TUint32 undef = 0xE6000010;
+	TPfun f = (TPfun) &undef;
+	f();
+	}
+
+TInt DataRead()
+	{
+	TInt* r = (TInt*) 0x1000;
+	TInt rr = (TInt)*r;
+	//include the following line to ensure that rr doesn't get optimised out
+	RDebug::Printf("Shouldn't see this being printed out: %d", rr);
+
+	// Stop compilation warning. Should not get here anyway.
+	rr++;
+	return rr;
+	}
+
+void DataWrite()
+	{
+	TInt* r = (TInt*) 0x1000;
+	*r = 0x42;                
+	}
+
+void UserException()
+	{
+	User::RaiseException(EExcGeneral);
+	}
+
+void SpinForeverWithBreakPoint()
+	{
+
+    // finding the process t_rmdebug2/t_rmdebug2_oem/t_rmdebug2_oem2
+    // we find the process.SID to attach to the property
+	_LIT(KThreadWildCard, "t_rmdebug2*");
+
+	TInt err = KErrNone;
+	TUid propertySid = KNullUid;
+	TFindThread find(KThreadWildCard);
+	TFullName name;
+	TBool found = EFalse;
+	while(find.Next(name)==KErrNone && !found)
+		{
+		RThread thread;
+		err = thread.Open(find);
+		if (err == KErrNone)
+			{
+			RProcess process;
+			thread.Process(process);
+			TFullName fullname = thread.FullName();
+		    //RDebug::Printf("SID Search Match Found Name %lS Process ID%ld Thread Id %ld", &fullname, process.Id().Id(), thread.Id().Id());
+			found = ETrue;
+			//SID saved so that the property can be attached to
+			propertySid = process.SecureId();
+			process.Close();
+			}
+		thread.Close();
+	}
+
+    // publish the address of the RMDebug_BranchTst2 with the correct SID value
+	TInt address = (TInt)&RMDebug_BranchTst2;
+	err = RProperty::Set(propertySid, EMyPropertyInteger, address);
+	if(KErrNone != err)
+		RDebug::Printf("Error Set of the property %d", err);
+	
+	//open semaphore to signal the fact we have reached the point where we have to set the property
+	RSemaphore globsem;
+	globsem.OpenGlobal(_L("RMDebugGlobSem"));
+	globsem.Signal();
+	globsem.Close();
+
+	RProcess thisProcess;
+	TFileName thisProcessName = thisProcess.FileName();
+	RDebug::Print(_L("App Process Name %S process id %ld thread id %ld"), &thisProcessName, thisProcess.Id().Id(), RThread().Id().Id());
+
+	TInt i=0;
+	RThread::Rendezvous(KErrNone);
+	while(i<0xffffffff)
+		{
+		RMDebug_BranchTst2();
+		User::After(10000);
+		}
+	}
+
+void SpinForever()
+	{
+	TInt i=0;
+	RThread::Rendezvous(KErrNone);
+	while(i<0xffffffff)
+		{
+		User::After(10000);
+		}
+	}
+
+void NormalExit()
+    {
+    RDebug::Printf("Target app: NormalExit() function. Returning to MainL" );
+    }
+
+void LaunchThreads(TUint aNumber)
+	{
+	_LIT(KDebugThreadName, "DebugThread");
+	const TUint KDebugThreadDefaultHeapSize=0x10000;
+	for(TInt i=0; i<aNumber; i++)
+		{
+		RThread thread;
+		RBuf threadName;
+		threadName.Create(KDebugThreadName().Length()+10); // the 10 is for appending i to the end of the name
+		threadName.Append(KDebugThreadName());
+		threadName.AppendNum(i);
+		TInt err = thread.Create(threadName, (TThreadFunction)SpinForever, KDefaultStackSize, KDebugThreadDefaultHeapSize, KDebugThreadDefaultHeapSize, NULL);
+		if(err != KErrNone)
+			{
+			RDebug::Printf("Couldn't create thread %d", err);
+			threadName.Close();
+			thread.Close();
+			break;
+			}
+		thread.SetPriority(EPriorityNormal);
+		TRequestStatus status;
+		thread.Rendezvous(status);
+		thread.Resume();
+		User::WaitForRequest(status);
+		thread.Close();
+		threadName.Close();
+		}
+	}
+
+void WaitFiveSecondsThenExit(void)
+	{
+	// wait for 5 seconds
+	User::After(5000000);
+	}
+
+TInt NumberOfCpus()
+	{
+	TInt r = UserSvr::HalFunction(EHalGroupKernel, EKernelHalNumLogicalCpus, 0, 0);
+	return r;
+	}
+
+TInt SetCpuAffinity(TInt aCpuNumber)
+	{
+    TInt TestCpuCount = NumberOfCpus();
+	RDebug::Printf("SetCpuAffinity --> TestCpuCount = %d\n", TestCpuCount);		
+	TUint32 cpu = 0;
+
+	if ((aCpuNumber % TestCpuCount) != 0)
+	cpu = (TUint32)(aCpuNumber % TestCpuCount);
+
+	RDebug::Printf("SetCpuAffinity --> Setting cpu %3d\n", cpu);
+	TInt r = UserSvr::HalFunction(EHalGroupKernel, EKernelHalLockThreadToCpu, (TAny *)cpu, 0);
+	return r;
+	}
+
+void SetCurrentThreadPriority(TInt aThreadPriority)
+    {
+     RDebug::Printf("SetCurrentThreadPriority  aThreadPriority =%d\n", aThreadPriority);
+     RThread().SetPriority((TThreadPriority) aThreadPriority);
+     RDebug::Printf("SetCurrentThreadPriority Crashapp RThread Priority() = %d", (TInt) RThread().Priority()) ;
+    }
+
+TInt GetTimeInMs()
+{
+    TInt period = 0;
+    User::LeaveIfError(HAL::Get(HALData::ENanoTickPeriod, period));
+    TInt periodInMs = period / 1000;
+    return User::NTickCount() * periodInMs;
+}
+
+void SetNanoTickTime()
+    {
+    TUid t_performance_test_Sid;
+    t_performance_test_Sid.iUid = 0x102831E5;
+    RProperty::Set(t_performance_test_Sid, EPropertyTimeOfCrash, GetTimeInMs());    
+    }
+
+// call the function corresponding to aFunctionType
+LOCAL_C void CallFunction(TDebugFunctionType aFunctionType, TUint aDelay, TUint aExtraThreads, TInt32 aCpuNumber, TUint aThreadPriority )
+	{
+
+	// pause for aDelay microseconds
+	User::After(aDelay);
+
+	// set cpu on which this thread should execute on
+	if ( aCpuNumber )
+		SetCpuAffinity(aCpuNumber);
+	
+	if ( aThreadPriority )
+	    SetCurrentThreadPriority(aThreadPriority);
+
+	// launch the extra threads
+	LaunchThreads(aExtraThreads);
+	
+	// Publish Nano tick count time for RMDBG performance testing
+	SetNanoTickTime();
+	    
+	// call appropriate function
+	switch( aFunctionType )
+		{
+		case EPrefetchAbortFunction:
+			PrefetchAbort();
+			break;
+		case EUserPanicFunction:
+			UserPanic();
+			break;
+		case EStackOverflowFunction:
+			StackOverFlowFunction();
+			break;
+		case EDataAbortFunction:
+			DataAbort();
+			break;
+		case EUndefInstructionFunction:
+			UndefInstruction();
+			break;
+		case EDataReadErrorFunction:
+			DataRead();
+			break;
+		case EDataWriteErrorFunction:
+			DataWrite();
+			break;
+		case EUserExceptionFunction:
+			UserException();
+			break;
+		case EWaitFiveSecondsThenExit:
+			WaitFiveSecondsThenExit();
+			break;
+		case ESpinForever:
+			SpinForever();
+			break;
+		case ESpinForeverWithBreakPoint:
+			SpinForeverWithBreakPoint();
+			break;
+        case ENormalExit:
+            NormalExit();
+            break;			
+		case EDefaultDebugFunction:
+		default:
+			break;
+		}
+	}
+
+void PrintHelp()
+	{
+	RDebug::Printf("Invoke with arguments:\n");
+	RDebug::Printf("\t-d<delay>\n\t: delay in microseconds before calling target function\n");
+	RDebug::Printf("\t-f<function-number>\n\t: enumerator from TDebugFunctionType representing function to call\n");
+	RDebug::Printf("\t-e<number>\n\t: number of extra threads to launch, these threads run endlessly\n");
+	}
+
+TInt E32Main()
+	{
+    
+    RDebug::Printf("<<<<< E32Main() RThread Priority() = %d, RProcess Priority() = %d", (TInt) RThread().Priority(), (TInt) RProcess().Priority()) ;   
+	RDebug::Printf("t_rmdebug_app tid=%d,pid=%d", I64LOW(RThread().Id().Id()), I64LOW(RProcess().Id().Id()) ) ;
+	// setup heap checking and clean up trap
+	__UHEAP_MARK;
+	CTrapCleanup* cleanup=CTrapCleanup::New();
+	RThread().SetPriority(EPriorityNormal);
+	RProcess::Rendezvous(KErrNone);
+	
+	// read arguments from command line
+	TUint delay = 0;
+	TInt32 functionTypeAsTInt32 = (TInt32)EDefaultDebugFunction;
+	TUint extraThreads = 0;
+	TInt32 aCpuNumber = 0;
+	TInt32 aThreadPriority = 0;
+
+	TRAPD(err, ParseCommandLineL(functionTypeAsTInt32, delay, extraThreads, aCpuNumber, aThreadPriority));
+
+	RDebug::Printf("E32Main :: aThreadPriority=%d", aThreadPriority ) ;
+	
+	if(KErrNone == err)
+		{
+		// if the command line arguments were successfully read then call the appropriate function
+		CallFunction((TDebugFunctionType)functionTypeAsTInt32, delay, extraThreads, aCpuNumber, aThreadPriority);
+		}
+
+	// perform clean up and return any error which was recorded
+	delete cleanup;
+	__UHEAP_MARKEND;
+	return err;
+	}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debugsrv/runmodedebug/tsrc/rm_debug/debug_targets/t_rmdebug_app.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,46 @@
+// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+//
+
+#ifndef T_RMDEBUG_APP_H
+#define T_RMDEBUG_APP_H
+
+_LIT(KRMDebugTestApplication, "z:\\sys\\bin\\t_rmdebug_app.exe");
+_LIT(KUserPanic, "UserPanic");
+const TInt KUserPanicCode = 0x1234ABCD;
+
+enum TMyPropertyKeys {EMyPropertyInteger};
+enum TPropertyTimeKeys {EPropertyTimeOfCrash};
+
+
+// enumeration of functions to call in test debug application
+enum TDebugFunctionType
+	{
+	EDefaultDebugFunction,
+	EPrefetchAbortFunction,
+	EUserPanicFunction,
+	EStackOverflowFunction,
+	EDataAbortFunction,
+	EUndefInstructionFunction,
+	EDataReadErrorFunction,
+	EDataWriteErrorFunction,
+	EUserExceptionFunction,
+	EWaitFiveSecondsThenExit,
+	ESpinForever,
+	ESpinForeverWithBreakPoint,
+	ENormalExit
+	};
+
+#endif //T_RMDEBUG_APP_H
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debugsrv/runmodedebug/tsrc/rm_debug/debug_targets/t_rmdebug_dll.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,25 @@
+// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+//
+
+#include <e32std.h>
+#include <e32std_private.h>
+#include <rm_debug_api.h>
+#include "t_rmdebug_dll.h"
+
+EXPORT_C TUid GetDSSUid()
+	{
+	return Debug::KUidDebugSecurityServer;
+	}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debugsrv/runmodedebug/tsrc/rm_debug/debug_targets/t_rmdebug_dll.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,23 @@
+// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+//
+
+#include <e32std.h>
+
+/**
+  This is a simple function that uses an element from rm_debug_api.h.
+  If the e32tests can be built and run then this is 'proof' that the
+  rm_debug_api.h header file can be #include'd into a dll
+  */
+IMPORT_C TUid GetDSSUid();
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debugsrv/runmodedebug/tsrc/rm_debug/debug_targets/t_rmdebug_security.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,100 @@
+// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+// Target application to be debugged by t_rmdebug.exe when testing
+// security restrictions. This application is built with various
+// capabilities by the t_rmdebug_securityX.mmp files. This allows
+// the t_rmdebug2 program to ensure that security restrictions are
+// properly enforced by the DSS/DDD subsystem.
+// 
+//
+
+#include <e32base.h>
+#include <e32base_private.h>
+#include <e32cons.h>
+#include <e32test.h>
+#include <e32ldr.h>
+#include <e32cmn.h>
+#include <e32cmn_private.h>
+#include "t_rmdebug_security.h"
+
+CRunModeApp* CRunModeApp::NewL()
+//
+// CRunModeApp::NewL
+//
+	{
+	CRunModeApp* self = new(ELeave) CRunModeApp();
+
+  	self->ConstructL();
+   
+	return self;
+	}
+
+CRunModeApp::CRunModeApp()
+//
+// CRunModeApp constructor
+//
+	{
+	}
+
+CRunModeApp::~CRunModeApp()
+//
+// CRunModeApp destructor
+//
+	{
+	}
+
+void CRunModeApp::ConstructL()
+//
+// CRunModeApp::ConstructL
+//
+	{
+	}
+
+void CRunModeApp::TestWaitDebug()
+//
+// CRunModeApp::TestWaitDebug
+//
+	{
+	RProcess::Rendezvous(KErrNone);
+
+	// Wait a 3secs then quit (long enough to test, but not hang around forever)
+	User::After(3000000);
+	}
+
+GLDEF_C TInt E32Main()
+//
+// Entry point for run mode debug app test program
+//
+	{
+   TInt ret = KErrNone;
+   
+	// client
+	CTrapCleanup* trap = CTrapCleanup::New();
+	if (!trap)
+		return KErrNoMemory;
+
+   CRunModeApp* myApp = CRunModeApp::NewL();
+   if (myApp != NULL)
+       {
+        __UHEAP_MARK;
+	    TRAP(ret,myApp->TestWaitDebug());
+	    __UHEAP_MARKEND;
+
+	    delete myApp;
+       }
+       
+	delete trap;
+
+	return ret;
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debugsrv/runmodedebug/tsrc/rm_debug/debug_targets/t_rmdebug_security.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,39 @@
+// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+// Target application to be debugged by t_rmdebug2.exe when testing
+// security restrictions. This application is built with various
+// capabilities by the t_rmdebug_securityX.mmp files. This allows
+// the t_rmdebug2 program to ensure that security restrictions are
+// properly enforced by the DSS/DDD subsystem.
+// 
+//
+
+
+#ifndef T_RMDEBUG_SECURITY_H
+#define T_RMDEBUG_SECURITY_H
+
+class CRunModeApp : public CBase
+{
+public:
+	static CRunModeApp* NewL();
+	~CRunModeApp();
+
+	void TestWaitDebug();
+
+private:
+	CRunModeApp();
+	void ConstructL();
+};
+
+#endif // T_RMDEBUG_SECURITY_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debugsrv/runmodedebug/tsrc/rm_debug/group/bld.inf	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,90 @@
+// Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+// e32test/group/bld.inf
+// Kernel and User library test code
+// 
+//
+
+
+PRJ_PLATFORMS
+
+BASEDEFAULT
+
+PRJ_TESTEXPORTS
+
+./t_rmdebug_tests.iby            CORE_IBY_EXPORT_PATH(tools,t_rmdebug_tests.iby)
+./mytraces_rm_debug_ekern.txt    +/rombuild/mytraces_rm_debug_ekern.txt
+./mytraces_rm_debug.txt          +/rombuild/mytraces_rm_debug.txt
+
+../scripts/tef_execute_rtests.script	z:/scripts/tef_execute_rtests.script
+./testexecute.ini						+/data/z/system/data/testexecute.ini   
+
+
+PRJ_TESTMMPFILES
+
+/******************************************************************************
+ Put all device drivers here. These build both SMP and non-SMP variants.
+ User side code builds a single variant for both.
+ *NOTE: Base BTB will build properly any kernel-side test code embedded within 
+ positive check ( #ifdef SMP ), however these binaries will not be included in BTB 
+ autotest images for SMP platforms. Refer to DTW-KHS BTB00055 for more details.
+ ******************************************************************************/
+
+/******************************************************************************
+ User side code here - builds a single variant for both SMP and non-SMP.
+ ******************************************************************************/
+
+#if defined(MARM_ARMV5)
+./t_rmdebug_app support
+./t_rmdebug_app1 support
+./t_rmdebug_app2 support
+./t_rmdebug_app3 support
+./t_rmdebug_app4 support
+./t_rmdebug_app5 support
+./t_rmdebug_app6 support
+./t_rmdebug_app7 support
+./t_rmdebug_app8 support
+./t_rmdebug_app9 support
+./t_rmdebug_app10 support
+
+./t_rmdebug_dll support
+
+./t_rmdebug_security0 support
+./t_rmdebug_security1 support
+./t_rmdebug_security2 support
+./t_rmdebug_security3 support
+
+./t_rmdebug2.mmp
+
+./t_rmdebug2_oem.mmp
+./t_rmdebug2_oemtoken support
+
+./t_rmdebug2_oem2.mmp
+./t_rmdebug2_oemtoken2 support
+
+./t_rmdebug2_allcaps.mmp
+./t_rmdebug2_allcapstoken support
+
+./t_rmdebug_target_launcher support
+./t_rmdebug_multi_target.mmp
+
+./t_rmdebug_multi_agent support
+./t_multi_agent_launcher.mmp
+
+./t_rmdebug_performance_allcapstoken
+./t_performance_test.mmp
+
+#endif
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debugsrv/runmodedebug/tsrc/rm_debug/group/mytraces_rm_debug.txt	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,36 @@
+_fh4hrp_scmonitornor.dll
+_h4hrp_scmonitornor.dll
+OEMDebug_102831E5.exe
+OEMDebug_F1234567.exe
+OEMDebug_F123ABCD.exe
+OEMDebug_F123ABCE.exe
+rm_debug.ldd
+rm_debug_svr.exe
+scmonitor_serial.dll
+t_crashmonitor_lib.exe
+t_performance_test.exe
+t_rmdebug_app.exe
+t_rmdebug_app1.exe
+t_rmdebug_app10.exe
+t_rmdebug_app2.exe
+t_rmdebug_app3.exe
+t_rmdebug_app4.exe
+t_rmdebug_app5.exe
+t_rmdebug_app6.exe
+t_rmdebug_app7.exe
+t_rmdebug_app8.exe
+t_rmdebug_app9.exe
+t_rmdebug_attachall.exe
+t_rmdebug_dll.dll
+t_rmdebug_multi_agent.exe
+t_rmdebug_multi_target.exe
+t_rmdebug_security0.exe
+t_rmdebug_security1.exe
+t_rmdebug_security2.exe
+t_rmdebug_security3.exe
+t_rmdebug_target_launcher.exe
+t_rmdebug2.exe
+t_rmdebug2_allcaps.exe
+t_rmdebug2_oem.exe
+t_rmdebug2_oem2.exe
+t_trkdummyapp.exe
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debugsrv/runmodedebug/tsrc/rm_debug/group/mytraces_rm_debug_ekern.txt	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,48 @@
+_34xx_sdp_ekern.exe
+_8500_ekern.exe
+_f34xx_sdp_ekern.exe
+_fh4hrp_ekern.exe
+_fne1_tb_ekern.exe
+_h4hrp_ekern.exe
+_lab_ekern.exe
+_ne1_tb_ekern.exe
+_rapu_ekern.exe
+_rapu_fmm_ekern.exe
+_template_ekern.exe
+
+_fh4hrp_scmonitornor.dll
+_h4hrp_scmonitornor.dll
+OEMDebug_102831E5.exe
+OEMDebug_F1234567.exe
+OEMDebug_F123ABCD.exe
+OEMDebug_F123ABCE.exe
+rm_debug.ldd
+rm_debug_svr.exe
+scmonitor_serial.dll
+t_crashmonitor_lib.exe
+t_performance_test.exe
+t_rmdebug_app.exe
+t_rmdebug_app1.exe
+t_rmdebug_app10.exe
+t_rmdebug_app2.exe
+t_rmdebug_app3.exe
+t_rmdebug_app4.exe
+t_rmdebug_app5.exe
+t_rmdebug_app6.exe
+t_rmdebug_app7.exe
+t_rmdebug_app8.exe
+t_rmdebug_app9.exe
+t_rmdebug_attachall.exe
+t_rmdebug_dll.dll
+t_rmdebug_multi_agent.exe
+t_rmdebug_multi_target.exe
+t_rmdebug_security0.exe
+t_rmdebug_security1.exe
+t_rmdebug_security2.exe
+t_rmdebug_security3.exe
+t_rmdebug_target_launcher.exe
+t_rmdebug2.exe
+t_rmdebug2_allcaps.exe
+t_rmdebug2_oem.exe
+t_rmdebug2_oem2.exe
+t_trkdummyapp.exe
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debugsrv/runmodedebug/tsrc/rm_debug/group/rmdbg_test.pkg	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,64 @@
+// Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description: 
+//
+
+// BINARIES NEEDED BY TESTS BELOW
+//"\epoc32\release\armv5\udeb\t_rmdebug_app.exe"-"c:\sys\bin\t_rmdebug_app.exe"
+//"\epoc32\release\armv5\udeb\t_rmdebug_app1.exe"-"c:\sys\bin\t_rmdebug_app1.exe"
+//"\epoc32\release\armv5\udeb\t_rmdebug_app2.exe"-"c:\sys\bin\t_rmdebug_app2.exe"
+//"\epoc32\release\armv5\udeb\t_rmdebug_app3.exe"-"c:\sys\bin\t_rmdebug_app3.exe"
+//"\epoc32\release\armv5\udeb\t_rmdebug_app4.exe"-"c:\sys\bin\t_rmdebug_app4.exe"
+//"\epoc32\release\armv5\udeb\t_rmdebug_app5.exe"-"c:\sys\bin\t_rmdebug_app5.exe"
+//"\epoc32\release\armv5\udeb\t_rmdebug_app6.exe"-"c:\sys\bin\t_rmdebug_app6.exe"
+//"\epoc32\release\armv5\udeb\t_rmdebug_app7.exe"-"c:\sys\bin\t_rmdebug_app7.exe"
+//"\epoc32\release\armv5\udeb\t_rmdebug_app8.exe"-"c:\sys\bin\t_rmdebug_app8.exe"
+//"\epoc32\release\armv5\udeb\t_rmdebug_app9.exe"-"c:\sys\bin\t_rmdebug_app9.exe"
+//"\epoc32\release\armv5\udeb\t_rmdebug_app10.exe"-"c:\sys\bin\t_rmdebug_app10.exe"
+
+//"\epoc32\release\armv5\udeb\t_rmdebug_dll.dll"-"c:\sys\bin\t_rmdebug_dll.dll"
+
+//"\epoc32\release\armv5\udeb\t_rmdebug_security0.exe"-"c:\sys\bin\t_rmdebug_security0.exe"
+//"\epoc32\release\armv5\udeb\t_rmdebug_security1.exe"-"c:\sys\bin\t_rmdebug_security1.exe"
+//"\epoc32\release\armv5\udeb\t_rmdebug_security2.exe"-"c:\sys\bin\t_rmdebug_security2.exe"
+//"\epoc32\release\armv5\udeb\t_rmdebug_security3.exe"-"c:\sys\bin\t_rmdebug_security3.exe"
+
+
+//RUN_RTESTS_AS_TEF
+"\epoc32\data\z\scripts\tef_execute_rtests.script"-"c:\scripts\tef_execute_rtests.script"
+
+
+//No token required
+//"\epoc32\release\armv5\udeb\t_rmdebug2.exe"-"c:\sys\bin\t_rmdebug2.exe"
+
+//SOMECAPS_DEBUGTOKEN
+//"\epoc32\release\armv5\udeb\t_rmdebug2_oem.exe"-"c:\sys\bin\t_rmdebug2_oem.exe"
+//"\epoc32\release\armv5\udeb\OEMDebug_F123ABCD.exe"-"c:\sys\bin\OEMDebug_F123ABCD.exe"
+
+//FEWCAPS_DEBUGTOKEN
+//"\epoc32\release\armv5\udeb\t_rmdebug2_oem2.exe"-"c:\sys\bin\t_rmdebug2_oem2.exe"
+//"\epoc32\release\armv5\udeb\OEMDebug_F1234567.exe"-"c:\sys\bin\OEMDebug_F1234567.exe"
+
+//ALLCAPS_DEBUGTOKEN
+//"\epoc32\release\armv5\udeb\t_rmdebug2_allcaps.exe"-"c:\sys\bin\t_rmdebug2_allcaps.exe"
+//"\epoc32\release\armv5\udeb\OEMDebug_F123ABCE.exe"-"c:\sys\bin\OEMDebug_F123ABCE.exe"
+
+//"\epoc32\release\armv5\udeb\t_rmdebug_target_launcher.exe"-"c:\sys\bin\t_rmdebug_target_launcher.exe"
+//"\epoc32\release\armv5\udeb\t_rmdebug_multi_target.exe"-"c:\sys\bin\t_rmdebug_multi_target.exe"
+
+//"\epoc32\release\armv5\udeb\t_rmdebug_multi_agent.exe"-"c:\sys\bin\t_rmdebug_multi_agent.exe"
+//"\epoc32\release\armv5\udeb\t_multi_agent_launcher.exe"-"c:\sys\bin\t_multi_agent_launcher.exe"
+
+//PERFORMANCE TEST DEBUGTOKEN
+//"\epoc32\release\armv5\udeb\t_performance_test.exe"-"c:\sys\bin\t_performance_test.exe"
+//"\epoc32\release\armv5\udeb\OEMDebug_102831E5.exe"-"c:\sys\bin\OEMDebug_102831E5.exe"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debugsrv/runmodedebug/tsrc/rm_debug/group/rmdebug.iby	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,18 @@
+// Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+// Build configuration file for Sirocco
+//
+
+extension[VARID]=KERNEL_DIR/DEBUG_DIR/rm_debug.ldd		/sys/bin/rm_debug.ldd
+file=KERNEL_DIR/DEBUG_DIR/rm_debug_svr.exe		/sys/bin/rm_debug_svr.exe
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debugsrv/runmodedebug/tsrc/rm_debug/group/t_multi_agent_launcher.mmp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,44 @@
+// Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+// Application that launches multiple agents which in-turn test the ability of 
+// the run mode debug component to debug several targets
+// 
+//
+
+// This is an RTest configured to run on Sirocco, hence the testexecuteutils linked in lib below.
+
+targettype     exe
+target         t_multi_agent_launcher.exe
+
+library		euser.lib hal.lib
+library		testexecuteutils.lib // for Sirocco
+
+OS_LAYER_SYSTEMINCLUDE
+
+userinclude    ../debug_targets
+userinclude    ../common
+userinclude    ../multi_agent_tests
+
+sourcepath	   ../multi_agent_tests
+source         t_multi_agent_launcher.cpp 
+
+UID            0x0 0x4321bbbc
+SECUREID       0x1234aaab
+VENDORID       VID_DEFAULT
+
+DEBUGGABLE
+
+macro NO_DEBUGTOKEN
+
+SMPSAFE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debugsrv/runmodedebug/tsrc/rm_debug/group/t_performance_test.mmp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,40 @@
+// Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+// 
+//
+
+// This is an RTest configured to run on Sirocco, hence the testexecuteutils linked in lib below.
+
+TARGET        t_performance_test.exe
+TARGETTYPE    exe
+UID			  0x1000008D 0x102831E5
+VENDORID	  VID_DEFAULT
+
+ 
+USERINCLUDE   ../common
+USERINCLUDE   ../performance_test
+USERINCLUDE   ../debug_targets
+SOURCEPATH    ../performance_test
+
+OS_LAYER_SYSTEMINCLUDE
+
+library       euser.lib
+library       hal.lib
+library       testexecuteutils.lib // for Sirocco
+
+DEBUGGABLE
+
+MACRO SYMBIAN_TRACE_ENABLE
+
+SOURCE t_rmdebug_performance_test.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debugsrv/runmodedebug/tsrc/rm_debug/group/t_rmdebug2.mmh	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,66 @@
+// Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+// 
+//
+
+ALWAYS_BUILD_AS_ARM
+
+targettype     exe
+
+sourcepath	   	..\debug_targets
+
+source        	d_rmdebugthread2.cpp 
+source			d_rmdebugthreadasm2.cia
+
+#if defined(MARM_ARMV5)
+source			d_rmdebug_step_test.s
+source			d_rmdebug_bkpt_test.s
+#endif
+
+#if defined(MARM_ARMV4)
+source			d_rmdebug_step_test_armv4.s
+#endif
+
+source			d_demand_paging.cia
+
+library		euser.lib
+library         hal.lib
+library         efsrv.lib
+library         t_rmdebug_dll.lib
+
+userinclude    ..\..\..\rmdriver\inc
+userinclude    ..\..\..\securityserver\inc
+userinclude    ..\debug_targets
+
+
+#ifdef SYMBIAN_OLD_EXPORT_LOCATION
+SYMBIAN_BASE_SYSTEMINCLUDE(drivers)
+SYMBIAN_BASE_SYSTEMINCLUDE(kernel)
+#endif
+SYMBIAN_BASE_SYSTEMINCLUDE(nkern)
+OS_LAYER_SYSTEMINCLUDE
+
+PAGED
+
+// To test heap allocation failure uncomment one or other of the following macros.
+// NOTE: Do not uncomment both, the tests will panic if both are defined!
+
+// To test heap allocation failure in the Debug Device Driver uncomment this macro
+//macro KERNEL_OOM_TESTING
+
+// To test heap allocation failure in the Debug Security Server uncomment this macro
+//macro USER_OOM_TESTING
+
+
+SMPSAFE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debugsrv/runmodedebug/tsrc/rm_debug/group/t_rmdebug2.mmp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,39 @@
+// Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+// 
+//
+
+// This is an RTest configured to run on Sirocco, hence the testexecuteutils linked in lib below.
+
+#include "t_rmdebug2.mmh"
+
+target         t_rmdebug2.exe
+
+sourcepath	   	../basic_tests
+source        	t_rmdebug2.cpp 
+source		r_low_memory_security_svr_session.cpp
+source		r_kernel_low_memory_security_svr_session.cpp
+source		r_user_low_memory_security_svr_session.cpp
+
+library		testexecuteutils.lib // for Sirocco
+
+UID            0x0 0x4321bbbb
+SECUREID       0x1234aaaa
+VENDORID       VID_DEFAULT
+
+CAPABILITY 	READUSERDATA POWERMGMT ALLFILES
+
+DEBUGGABLE
+
+macro NO_DEBUGTOKEN
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debugsrv/runmodedebug/tsrc/rm_debug/group/t_rmdebug2_allcaps.mmp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,42 @@
+// Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+// Same tests as t_rmdebug2.mmp but with OEM rights conferred
+// by the OEMDebug_F123ABCD.exe token file.
+// 
+//
+
+// This is an RTest configured to run on Sirocco, hence the testexecuteutils linked in lib below.
+
+#include "t_rmdebug2.mmh"
+
+target         t_rmdebug2_allcaps.exe
+
+sourcepath	   	../basic_tests
+source        	t_rmdebug2.cpp 
+source		r_low_memory_security_svr_session.cpp
+source		r_kernel_low_memory_security_svr_session.cpp
+source		r_user_low_memory_security_svr_session.cpp
+
+library		testexecuteutils.lib // for Sirocco
+
+UID            0x0 0x4321bbbb
+SECUREID       0xF123abce
+VENDORID       VID_DEFAULT
+
+CAPABILITY 	READUSERDATA POWERMGMT ALLFILES
+
+// Used when compiling tests to work in the presence of an
+// OEM Debug Token
+macro ALLCAPS_DEBUGTOKEN
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debugsrv/runmodedebug/tsrc/rm_debug/group/t_rmdebug2_allcapstoken.mmp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,36 @@
+// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+// 
+//
+
+ALWAYS_BUILD_AS_ARM
+
+target         OEMDebug_F123ABCE.exe
+targettype     exe
+
+sourcepath	   	../basic_tests
+
+source        	t_rmdebug2_oemtoken.cpp 
+
+library		euser.lib
+
+OS_LAYER_SYSTEMINCLUDE
+
+capability All
+
+UID            0x0 0x0
+SECUREID       0x0
+VENDORID       VID_DEFAULT
+
+SMPSAFE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debugsrv/runmodedebug/tsrc/rm_debug/group/t_rmdebug2_oem.mmp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,42 @@
+// Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+// Same tests as t_rmdebug2.mmp but with OEM rights conferred
+// by the OEMDebug_F123ABCD.exe token file.
+// 
+//
+
+// This is an RTest configured to run on Sirocco, hence the testexecuteutils linked in lib below.
+
+#include "t_rmdebug2.mmh"
+
+target         t_rmdebug2_oem.exe
+
+sourcepath	   	../basic_tests
+source        	t_rmdebug2.cpp 
+source		r_low_memory_security_svr_session.cpp
+source		r_kernel_low_memory_security_svr_session.cpp
+source		r_user_low_memory_security_svr_session.cpp
+
+library		testexecuteutils.lib // for Sirocco
+
+UID            0x0 0x4321bbbb
+SECUREID       0xF123abcd
+VENDORID       VID_DEFAULT
+
+CAPABILITY 	READUSERDATA POWERMGMT ALLFILES
+
+// Used when compiling tests to work in the presence of an
+// OEM Debug Token
+macro SOMECAPS_DEBUGTOKEN
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debugsrv/runmodedebug/tsrc/rm_debug/group/t_rmdebug2_oem2.mmp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,42 @@
+// Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+// Same tests as t_rmdebug2.mmp but with some OEM rights conferred
+// by the OEMDebug_F1234567.exe token file.
+// 
+//
+
+//RTEST
+
+#include "t_rmdebug2.mmh"
+
+target         t_rmdebug2_oem2.exe
+
+sourcepath	   	../basic_tests
+source        	t_rmdebug2.cpp 
+source		r_low_memory_security_svr_session.cpp
+source		r_kernel_low_memory_security_svr_session.cpp
+source		r_user_low_memory_security_svr_session.cpp
+
+library		testexecuteutils.lib // for Sirocco
+
+UID            0x0 0x4321bbbb
+SECUREID       0xF1234567
+VENDORID       VID_DEFAULT
+
+CAPABILITY 	READUSERDATA POWERMGMT
+
+// Used when compiling tests to work in the presence of an
+// OEM Debug Token with AllFiles only capability
+macro FEWCAPS_DEBUGTOKEN
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debugsrv/runmodedebug/tsrc/rm_debug/group/t_rmdebug2_oemtoken.mmp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,36 @@
+// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+// 
+//
+
+ALWAYS_BUILD_AS_ARM
+
+target         OEMDebug_F123ABCD.exe
+targettype     exe
+
+sourcepath	   	../basic_tests
+
+source        	t_rmdebug2_oemtoken.cpp 
+
+library		euser.lib
+
+OS_LAYER_SYSTEMINCLUDE
+
+capability PowerMgmt AllFiles Tcb ReadUserData WriteUserData
+
+UID            0x0 0x0
+SECUREID       0x0
+VENDORID       VID_DEFAULT
+
+SMPSAFE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debugsrv/runmodedebug/tsrc/rm_debug/group/t_rmdebug2_oemtoken2.mmp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,37 @@
+// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+// 
+//
+
+ALWAYS_BUILD_AS_ARM
+
+target         OEMDebug_F1234567.exe
+targettype     exe
+
+sourcepath	   	../basic_tests
+
+source        	t_rmdebug2_oemtoken.cpp 
+
+library		euser.lib
+
+OS_LAYER_SYSTEMINCLUDE
+
+// Token requires AllFiles
+capability AllFiles ReadUserData PowerMgmt
+
+UID            0x0 0x0
+SECUREID       0x0
+VENDORID       VID_DEFAULT
+
+SMPSAFE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debugsrv/runmodedebug/tsrc/rm_debug/group/t_rmdebug_app.mmp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,36 @@
+// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+// 
+//
+
+target             t_rmdebug_app.exe
+targettype         exe
+
+sourcepath         ../debug_targets
+source             t_rmdebug_app.cpp 
+source			   d_rmdebugthreadasm2.cia
+
+OS_LAYER_SYSTEMINCLUDE
+library            euser.lib hal.lib
+
+uid                0x0 0x0
+VENDORID           VID_DEFAULT
+capability         none
+
+always_build_as_arm
+pagedcode
+
+DEBUGGABLE
+
+SMPSAFE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debugsrv/runmodedebug/tsrc/rm_debug/group/t_rmdebug_app1.mmp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,37 @@
+// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+// Target application to be debugged
+// 
+//
+
+target             t_rmdebug_app1.exe
+targettype         exe
+
+sourcepath         ../debug_targets
+source             t_rmdebug_app.cpp 
+source             d_rmdebugthreadasm2.cia
+
+OS_LAYER_SYSTEMINCLUDE
+library            euser.lib hal.lib
+
+uid                0x0 0x0
+VENDORID           VID_DEFAULT
+capability         none
+
+always_build_as_arm
+pagedcode
+
+DEBUGGABLE
+
+SMPSAFE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debugsrv/runmodedebug/tsrc/rm_debug/group/t_rmdebug_app10.mmp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,37 @@
+// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+// Target application to be debugged
+// 
+//
+
+target             t_rmdebug_app10.exe
+targettype         exe
+
+sourcepath         ../debug_targets
+source             t_rmdebug_app.cpp 
+source             d_rmdebugthreadasm2.cia
+
+OS_LAYER_SYSTEMINCLUDE
+library            euser.lib hal.lib
+
+uid                0x0 0x0
+VENDORID           VID_DEFAULT
+capability         none
+
+always_build_as_arm
+pagedcode
+
+DEBUGGABLE
+
+SMPSAFE
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debugsrv/runmodedebug/tsrc/rm_debug/group/t_rmdebug_app2.mmp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,37 @@
+// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+// Target application to be debugged
+// 
+//
+
+target             t_rmdebug_app2.exe
+targettype         exe
+
+sourcepath         ../debug_targets
+source             t_rmdebug_app.cpp 
+source             d_rmdebugthreadasm2.cia
+
+OS_LAYER_SYSTEMINCLUDE
+library            euser.lib hal.lib
+
+uid                0x0 0x0
+VENDORID           VID_DEFAULT
+capability         none
+
+always_build_as_arm
+pagedcode
+
+DEBUGGABLE
+
+SMPSAFE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debugsrv/runmodedebug/tsrc/rm_debug/group/t_rmdebug_app3.mmp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,37 @@
+// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+// Target application to be debugged
+// 
+//
+
+target             t_rmdebug_app3.exe
+targettype         exe
+
+sourcepath         ../debug_targets
+source             t_rmdebug_app.cpp 
+source             d_rmdebugthreadasm2.cia
+
+OS_LAYER_SYSTEMINCLUDE
+library            euser.lib hal.lib
+
+uid                0x0 0x0
+VENDORID           VID_DEFAULT
+capability         none
+
+always_build_as_arm
+pagedcode
+
+DEBUGGABLE
+
+SMPSAFE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debugsrv/runmodedebug/tsrc/rm_debug/group/t_rmdebug_app4.mmp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,37 @@
+// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+// Target application to be debugged
+// 
+//
+
+target             t_rmdebug_app4.exe
+targettype         exe
+
+sourcepath         ../debug_targets
+source             t_rmdebug_app.cpp 
+source             d_rmdebugthreadasm2.cia
+
+OS_LAYER_SYSTEMINCLUDE
+library            euser.lib hal.lib
+
+uid                0x0 0x0
+VENDORID           VID_DEFAULT
+capability         none
+
+always_build_as_arm
+pagedcode
+
+DEBUGGABLE
+
+SMPSAFE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debugsrv/runmodedebug/tsrc/rm_debug/group/t_rmdebug_app5.mmp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,37 @@
+// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+// Target application to be debugged
+// 
+//
+
+target             t_rmdebug_app5.exe
+targettype         exe
+
+sourcepath         ../debug_targets
+source             t_rmdebug_app.cpp 
+source             d_rmdebugthreadasm2.cia
+
+OS_LAYER_SYSTEMINCLUDE
+library            euser.lib hal.lib
+
+uid                0x0 0x0
+VENDORID           VID_DEFAULT
+capability         none
+
+always_build_as_arm
+pagedcode
+
+DEBUGGABLE
+
+SMPSAFE
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debugsrv/runmodedebug/tsrc/rm_debug/group/t_rmdebug_app6.mmp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,37 @@
+// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+// Target application to be debugged
+// 
+//
+
+target             t_rmdebug_app6.exe
+targettype         exe
+
+sourcepath         ../debug_targets
+source             t_rmdebug_app.cpp 
+source             d_rmdebugthreadasm2.cia
+
+OS_LAYER_SYSTEMINCLUDE
+library            euser.lib hal.lib
+
+uid                0x0 0x0
+VENDORID           VID_DEFAULT
+capability         none
+
+always_build_as_arm
+pagedcode
+
+DEBUGGABLE
+
+SMPSAFE
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debugsrv/runmodedebug/tsrc/rm_debug/group/t_rmdebug_app7.mmp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,37 @@
+// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+// Target application to be debugged
+// 
+//
+
+target             t_rmdebug_app7.exe
+targettype         exe
+
+sourcepath         ../debug_targets
+source             t_rmdebug_app.cpp 
+source             d_rmdebugthreadasm2.cia
+
+OS_LAYER_SYSTEMINCLUDE
+library            euser.lib hal.lib
+
+uid                0x0 0x0
+VENDORID           VID_DEFAULT
+capability         none
+
+always_build_as_arm
+pagedcode
+
+DEBUGGABLE
+
+SMPSAFE
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debugsrv/runmodedebug/tsrc/rm_debug/group/t_rmdebug_app8.mmp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,37 @@
+// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+// Target application to be debugged
+// 
+//
+
+target             t_rmdebug_app8.exe
+targettype         exe
+
+sourcepath         ../debug_targets
+source             t_rmdebug_app.cpp 
+source             d_rmdebugthreadasm2.cia
+
+OS_LAYER_SYSTEMINCLUDE
+library            euser.lib hal.lib
+
+uid                0x0 0x0
+VENDORID           VID_DEFAULT
+capability         none
+
+always_build_as_arm
+pagedcode
+
+DEBUGGABLE
+
+SMPSAFE
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debugsrv/runmodedebug/tsrc/rm_debug/group/t_rmdebug_app9.mmp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,37 @@
+// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+// Target application to be debugged
+// 
+//
+
+target             t_rmdebug_app9.exe
+targettype         exe
+
+sourcepath         ../debug_targets
+source             t_rmdebug_app.cpp 
+source             d_rmdebugthreadasm2.cia
+
+OS_LAYER_SYSTEMINCLUDE
+library            euser.lib hal.lib
+
+uid                0x0 0x0
+VENDORID           VID_DEFAULT
+capability         none
+
+always_build_as_arm
+pagedcode
+
+DEBUGGABLE
+
+SMPSAFE
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debugsrv/runmodedebug/tsrc/rm_debug/group/t_rmdebug_dll.mmp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,38 @@
+// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+// 
+//
+
+ALWAYS_BUILD_AS_ARM
+
+target         t_rmdebug_dll.dll
+targettype     dll
+
+DEFFILE        ../../~/t_rmdebug_dll.def
+
+sourcepath	   	../debug_targets
+
+source        	t_rmdebug_dll.cpp 
+
+library		euser.lib
+
+OS_LAYER_SYSTEMINCLUDE
+
+capability PowerMgmt AllFiles ReadUserData
+
+UID            0x0 0x0
+SECUREID       0x0
+VENDORID       VID_DEFAULT
+
+SMPSAFE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debugsrv/runmodedebug/tsrc/rm_debug/group/t_rmdebug_multi_agent.mmp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,41 @@
+// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+// Application that tests the ability of the run mode debug component 
+// to debug multiple targets 
+// 
+//
+
+targettype     exe
+target         t_rmdebug_multi_agent.exe
+
+library		euser.lib hal.lib
+
+OS_LAYER_SYSTEMINCLUDE
+
+userinclude    ../debug_targets
+userinclude    ../common
+userinclude    ../multi_agent_tests
+
+sourcepath	   ../multi_agent_tests
+source         t_multi_agent.cpp t_agent_eventhandler.cpp 
+
+UID            0x0 0x4321bbbc
+SECUREID       0x1234aaab
+VENDORID       VID_DEFAULT
+
+DEBUGGABLE
+
+macro NO_DEBUGTOKEN
+
+SMPSAFE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debugsrv/runmodedebug/tsrc/rm_debug/group/t_rmdebug_multi_target.mmp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,46 @@
+// Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+// Application that tests the ability of the run mode debug component 
+// to debug several targets
+// 
+//
+
+// This is an RTest configured to run on Sirocco, hence the testexecuteutils linked in lib below.
+
+ALWAYS_BUILD_AS_ARM
+
+targettype     exe
+target         t_rmdebug_multi_target.exe
+
+library		euser.lib hal.lib
+library		testexecuteutils.lib // for Sirocco
+
+OS_LAYER_SYSTEMINCLUDE
+
+userinclude    ../debug_targets
+userinclude    ../common
+userinclude    ../multi_target_tests
+
+sourcepath	   ../multi_target_tests
+source         t_multi_target.cpp 
+
+UID            0x0 0x4321bbbc
+SECUREID       0x1234aaab
+VENDORID       VID_DEFAULT
+
+DEBUGGABLE
+
+macro NO_DEBUGTOKEN
+
+SMPSAFE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debugsrv/runmodedebug/tsrc/rm_debug/group/t_rmdebug_performance_allcapstoken.mmp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,36 @@
+// Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+// 
+//
+
+ALWAYS_BUILD_AS_ARM
+
+target         OEMDebug_102831E5.exe
+targettype     exe
+
+sourcepath	   	../performance_test
+
+source        	t_rmdebug_performance_oemtoken.cpp 
+
+library		euser.lib
+
+OS_LAYER_SYSTEMINCLUDE
+
+capability All
+
+UID            0x0 0x0
+SECUREID       0x0
+VENDORID       VID_DEFAULT
+
+SMPSAFE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debugsrv/runmodedebug/tsrc/rm_debug/group/t_rmdebug_security0.mmp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,36 @@
+// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+// 
+//
+
+ALWAYS_BUILD_AS_ARM
+
+target         t_rmdebug_security0.exe
+targettype     exe
+
+sourcepath	   	../debug_targets
+source        	t_rmdebug_security.cpp 
+
+library		euser.lib hal.lib
+               
+SYMBIAN_BASE_SYSTEMINCLUDE(nkern)
+OS_LAYER_SYSTEMINCLUDE
+
+UID            0x100039CE 0xbaaaf00d
+SECUREID       0x101F7159
+VENDORID       VID_DEFAULT
+
+DEBUGGABLE
+
+SMPSAFE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debugsrv/runmodedebug/tsrc/rm_debug/group/t_rmdebug_security1.mmp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,35 @@
+// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+// 
+//
+
+ALWAYS_BUILD_AS_ARM
+
+target         t_rmdebug_security1.exe
+targettype     exe
+
+sourcepath	   	../debug_targets
+source        	t_rmdebug_security.cpp 
+
+library		euser.lib hal.lib
+               
+SYMBIAN_BASE_SYSTEMINCLUDE(nkern)
+OS_LAYER_SYSTEMINCLUDE
+
+UID            0x100039CE 0xdeadbaaa
+SECUREID       0x101F7159
+VENDORID       VID_DEFAULT
+
+
+SMPSAFE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debugsrv/runmodedebug/tsrc/rm_debug/group/t_rmdebug_security2.mmp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,37 @@
+// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+// 
+//
+
+ALWAYS_BUILD_AS_ARM
+
+target         t_rmdebug_security2.exe
+targettype     exe
+
+sourcepath	   	../debug_targets
+source        	t_rmdebug_security.cpp 
+
+library		euser.lib hal.lib
+               
+SYMBIAN_BASE_SYSTEMINCLUDE(nkern)
+OS_LAYER_SYSTEMINCLUDE
+
+capability AllFiles
+
+UID            0x100039CE 0xdeadbaaa
+SECUREID       0x101F7159
+VENDORID       VID_DEFAULT
+
+
+SMPSAFE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debugsrv/runmodedebug/tsrc/rm_debug/group/t_rmdebug_security3.mmp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,37 @@
+// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+// 
+//
+
+ALWAYS_BUILD_AS_ARM
+
+target         t_rmdebug_security3.exe
+targettype     exe
+
+sourcepath	   	../debug_targets
+source        	t_rmdebug_security.cpp 
+
+library		euser.lib hal.lib
+               
+SYMBIAN_BASE_SYSTEMINCLUDE(nkern)
+OS_LAYER_SYSTEMINCLUDE
+
+capability TCB AllFiles NetworkControl
+
+UID            0x100039CE 0xdeadbaaa
+SECUREID       0x101F7159
+VENDORID       VID_DEFAULT
+
+
+SMPSAFE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debugsrv/runmodedebug/tsrc/rm_debug/group/t_rmdebug_target_launcher.mmp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,38 @@
+// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+// Application that test the ability of the run mode debug component 
+// to handle several target applications
+// 
+//
+
+target         t_rmdebug_target_launcher.exe
+targettype     exe
+
+library		     euser.lib
+
+OS_LAYER_SYSTEMINCLUDE
+
+userinclude    ../common
+sourcepath	   ../common
+source         t_target_launcher.cpp 
+
+UID            0x0 0x4321bbbd
+SECUREID       0x1234aaac
+VENDORID       VID_DEFAULT
+
+DEBUGGABLE
+
+macro NO_DEBUGTOKEN
+
+SMPSAFE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debugsrv/runmodedebug/tsrc/rm_debug/group/t_rmdebug_tests.iby	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,63 @@
+// Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+// Run Mode Debug Tests ROM include file
+
+
+file=ABI_DIR/BUILD_DIR/t_rmdebug_app.exe	Sys/Bin/t_rmdebug_app.exe
+file=ABI_DIR/BUILD_DIR/t_rmdebug_app1.exe	Sys/Bin/t_rmdebug_app1.exe
+file=ABI_DIR/BUILD_DIR/t_rmdebug_app2.exe	Sys/Bin/t_rmdebug_app2.exe
+file=ABI_DIR/BUILD_DIR/t_rmdebug_app3.exe	Sys/Bin/t_rmdebug_app3.exe
+file=ABI_DIR/BUILD_DIR/t_rmdebug_app4.exe	Sys/Bin/t_rmdebug_app4.exe
+file=ABI_DIR/BUILD_DIR/t_rmdebug_app5.exe	Sys/Bin/t_rmdebug_app5.exe
+file=ABI_DIR/BUILD_DIR/t_rmdebug_app6.exe	Sys/Bin/t_rmdebug_app6.exe
+file=ABI_DIR/BUILD_DIR/t_rmdebug_app7.exe	Sys/Bin/t_rmdebug_app7.exe
+file=ABI_DIR/BUILD_DIR/t_rmdebug_app8.exe	Sys/Bin/t_rmdebug_app8.exe
+file=ABI_DIR/BUILD_DIR/t_rmdebug_app9.exe	Sys/Bin/t_rmdebug_app9.exe
+file=ABI_DIR/BUILD_DIR/t_rmdebug_app10.exe	Sys/Bin/t_rmdebug_app10.exe
+
+file=ABI_DIR/BUILD_DIR/t_rmdebug_dll.dll	Sys/Bin/t_rmdebug_dll.dll
+
+file=ABI_DIR/BUILD_DIR/t_rmdebug_security0.exe Sys/Bin/t_rmdebug_security0.exe
+file=ABI_DIR/BUILD_DIR/t_rmdebug_security1.exe Sys/Bin/t_rmdebug_security1.exe
+file=ABI_DIR/BUILD_DIR/t_rmdebug_security2.exe Sys/Bin/t_rmdebug_security2.exe
+file=ABI_DIR/BUILD_DIR/t_rmdebug_security3.exe Sys/Bin/t_rmdebug_security3.exe
+
+// This script wraps RTests as TEF3 tests.
+data=DATAZ_/scripts/tef_execute_rtests.script		scripts/tef_execute_rtests.script
+
+
+//No token required
+file=ABI_DIR/BUILD_DIR/t_rmdebug2.exe	Sys/Bin/t_rmdebug2.exe
+
+//SOMECAPS_DEBUGTOKEN
+file=ABI_DIR/BUILD_DIR/t_rmdebug2_oem.exe 		Sys/Bin/t_rmdebug2_oem.exe
+file=ABI_DIR/BUILD_DIR/OEMDebug_F123ABCD.exe Sys/Bin/OEMDebug_F123ABCD.exe
+
+//FEWCAPS_DEBUGTOKEN
+file=ABI_DIR/BUILD_DIR/t_rmdebug2_oem2.exe 		Sys/Bin/t_rmdebug2_oem2.exe
+file=ABI_DIR/BUILD_DIR/OEMDebug_F1234567.exe	Sys/Bin/OEMDebug_F1234567.exe
+
+//ALLCAPS_DEBUGTOKEN
+file=ABI_DIR/BUILD_DIR/t_rmdebug2_allcaps.exe 		Sys/Bin/t_rmdebug2_allcaps.exe
+file=ABI_DIR/BUILD_DIR/OEMDebug_F123ABCE.exe Sys/Bin/OEMDebug_F123ABCE.exe
+
+file=ABI_DIR/BUILD_DIR/t_rmdebug_target_launcher.exe	Sys/Bin/t_rmdebug_target_launcher.exe
+file=ABI_DIR/BUILD_DIR/t_rmdebug_multi_target.exe Sys/Bin/t_rmdebug_multi_target.exe
+
+file=ABI_DIR/BUILD_DIR/t_rmdebug_multi_agent.exe Sys/Bin/t_rmdebug_multi_agent.exe
+file=ABI_DIR/BUILD_DIR/t_multi_agent_launcher.exe Sys/Bin/t_multi_agent_launcher.exe
+
+//PERFORMANCE TEST DEBUGTOKEN
+file=ABI_DIR/BUILD_DIR/OEMDebug_102831E5.exe Sys/Bin/OEMDebug_102831E5.exe
+file=ABI_DIR/BUILD_DIR/t_performance_test.exe Sys/Bin/t_performance_test.exe
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debugsrv/runmodedebug/tsrc/rm_debug/group/testexecute.ini	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,11 @@
+[TestExecute]
+HTML     	 	= c:\logs\testexecute\
+XML      	 	= c:\logs\testexecute\
+LogLevel   	 	= FULL
+//DefaultScriptDir 	= z:\sampletest\
+JustInTimeDebug	 	= 0
+LogMode		 	= HTML
+RemotePanicDetection 	= OFF
+EnableIniAccessLog	= ON
+EnableTestsCountLog	= ON
+SystemStarter		= OFF
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debugsrv/runmodedebug/tsrc/rm_debug/multi_agent_tests/t_agent_eventhandler.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,124 @@
+// 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 "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:
+//
+// Description:
+// Implements the handling of run mode events for a particular target executable
+// 
+
+#include <e32base.h>
+#include <e32property.h>
+#include <e32test.h>
+
+#include "t_rmdebug_app.h"
+#include "t_agent_eventhandler.h"
+#include "t_multi_agent.h"
+#include "t_debug_logging.h" 
+
+using namespace Debug;
+
+CAgentAsyncEvent::CAgentAsyncEvent(CMultiAgent& aDriver, const TDesC& aExeName, const TDesC& aExeConfig):
+	CActive(EPriorityStandard), iDriver(aDriver)
+	{
+	}
+
+CAgentAsyncEvent* CAgentAsyncEvent::NewLC(CMultiAgent& aDriver, const TDesC& aExeName, const TDesC& aExeConfig)
+	{
+	CAgentAsyncEvent* self = new(ELeave) CAgentAsyncEvent(aDriver, aExeName, aExeConfig);
+	CleanupStack::PushL(self);
+	self->ConstructL(aExeName, aExeConfig);
+	return self;
+	}
+
+CAgentAsyncEvent* CAgentAsyncEvent::NewL(CMultiAgent& aDriver, const TDesC& aExeName, const TDesC& aExeConfig)
+	{
+	CAgentAsyncEvent* self = CAgentAsyncEvent::NewLC(aDriver, aExeName, aExeConfig);
+	CleanupStack::Pop(); // self
+	return self;
+	}
+
+void CAgentAsyncEvent::ConstructL(const TDesC& aExeName, const TDesC& aExeConfig)
+	{
+	iExeName.CreateL(aExeName);
+	iExeConfig.CreateL(aExeConfig);
+	CActiveScheduler::Add(this);
+	}
+
+CAgentAsyncEvent::~CAgentAsyncEvent()
+	{
+	LOG_MSG2("~CAgentAsyncEvent(), this = 0x%08x", this);
+
+	iSEventInfo.iEventInfoBuf.Delete(0, sizeof(TEventInfo));
+	iExeName.Close();
+	iExeConfig.Close();
+	iProc.Close();
+	Cancel(); // Cancel any request, if outstanding
+	}
+
+/*
+ * Issue request to DSS and notify the active scheduler
+ */
+void CAgentAsyncEvent::Watch()
+	{
+	LOG_MSG2("ENTER: CAgentAsyncEvent::Watch, this = 0x%08x", this);
+	iDriver.DebugDriver().GetEvent(GetExecutable(), iStatus, iSEventInfo.iEventInfoBuf);
+
+	if (!IsActive())
+		{
+		LOG_MSG("CAgentAsyncEvent::Watch(): SetActive()");
+		SetActive();
+		}
+
+	LOG_MSG("EXIT: CAgentAsyncEvent::Watch");
+	}
+
+void CAgentAsyncEvent::RunL()
+	{
+	LOG_MSG4("ENTER: CAgentAsyncEvent::RunL iDebugType=%d, iStatus.Int() %d, this 0x%x08", 
+			 iSEventInfo.iEventInfo.iEventType, iStatus.Int(), this);
+	
+    LOG_MSG2("%S", &TPtr8((TUint8*)GetExecutable().Ptr(), 2*GetExecutable().Length(), 2*GetExecutable().Length()));	
+	iDriver.HandleEvent(iSEventInfo.iEventInfo);
+
+	LOG_MSG2("iDriver.GetNumApps() %d: ", iDriver.GetNumApps());
+	LOG_MSG2("iDriver.iLaunchCompleted  %d: ", iDriver.GetLaunchCompleted());
+
+	if (iDriver.GetLaunchCompleted() < iDriver.GetNumApps())
+		{
+		// Do not call Watch() if target has run to completion but test is still on going
+		if (iSEventInfo.iEventInfo.iEventType != EEventsRemoveProcess)
+			{
+			LOG_MSG("CAgentAsyncEvent::RunL Setting Watch()");
+			Watch();
+			}
+		}
+	else
+		{
+		// Stop event handling for all targets
+		LOG_MSG("CAgentAsyncEvent::RunL CActiveScheduler::Stop() & Cancel");
+		CActiveScheduler::Stop();
+		}
+
+	LOG_MSG2("EXIT: CAgentAsyncEvent::RunL", KNullDesC);
+	}
+
+void CAgentAsyncEvent::DoCancel()
+	{
+	LOG_MSG("CAgentAsyncEvent::DoCancel");
+	}
+
+TInt CAgentAsyncEvent::RunError(TInt aError)
+	{
+	LOG_MSG3(" RunL() has left with error %d, this 0x%08X", aError, this);
+	return aError; 
+	// Can we handle this error? Not at the moment!
+	}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debugsrv/runmodedebug/tsrc/rm_debug/multi_agent_tests/t_agent_eventhandler.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,90 @@
+// 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 "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:
+//
+// Description:
+// Definitions for event handling via the DSS and target specific information
+//
+//
+
+#ifndef RMDEBUG_AGENT_EVENTHANDLER_H
+#define RMDEBUG_AGENT_EVENTHANDLER_H
+
+#include "t_multi_agent.h"
+
+using namespace Debug;
+
+class CMultiAgent;
+
+/**
+ Class for gathering event data from the run-mode driver
+ */
+class TAgentEventInfo
+{
+public:
+	TAgentEventInfo() : 
+	iEventInfoBuf((TUint8*)&iEventInfo, sizeof(TEventInfo), sizeof(TEventInfo))
+	{ 	
+	}
+
+public:
+	// This is the underlying class for event interaction with the Run Mode debug API 
+	TEventInfo			iEventInfo;
+	
+	// A convenience handle for iEventInfo used across the Debug::GetEvent() method 
+	TPtr8				iEventInfoBuf;
+};
+
+/**
+  Active object class used to trap asynchronous events
+  Also, contains target specific parameters
+  */
+class CAgentAsyncEvent : public CActive
+	{
+public:
+	// Close buffers and Cancel and destroy
+	~CAgentAsyncEvent();	
+
+	// Two-phased constructor
+	static CAgentAsyncEvent* NewLC(CMultiAgent& aDriver, const TDesC& aExeName, const TDesC& aExeConfig);
+
+	// Two-phased constructor
+	static CAgentAsyncEvent* NewL(CMultiAgent& aDriver, const TDesC& aExeName, const TDesC& aExeConfig);
+
+	// set up ASP and issue another request	
+	void Watch();
+
+	TDesC& GetExecutable() { return iExeName; }
+ 	TDesC& GetExeConfig() { return iExeConfig; }
+	RProcess& GetProcHandle() { return iProc; }
+
+protected:
+	// from CActive
+	virtual void RunL();
+	virtual void DoCancel();
+	virtual TInt RunError(TInt aError);
+
+private:
+	CAgentAsyncEvent(CMultiAgent& aDriver, const TDesC& aExeName, const TDesC& aExeConfig);
+	void ConstructL(const TDesC& aExeName, const TDesC& aExeConfig);
+
+private:
+	RBuf iExeName;
+	RBuf iExeConfig;
+	RProcess iProc;
+
+	CMultiAgent& iDriver;
+	TAgentEventInfo iSEventInfo;
+	};
+
+#endif // RMDEBUG_AGENT_EVENTHANDLER_H
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debugsrv/runmodedebug/tsrc/rm_debug/multi_agent_tests/t_multi_agent.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,434 @@
+// 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 "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:
+//
+// Description:
+// Tests the run mode debug device component by launching multiple targets 
+// on different CPUs. On a single core the targets run on the same CPU.  
+//
+
+#include <e32base.h>
+#include <e32property.h>
+#include <hal.h>
+#include <e32test.h>
+#include <e32def.h>
+#include <e32svr.h>
+
+
+#include "t_rmdebug_app.h"
+#include "t_multi_agent.h"
+#include "t_agent_eventhandler.h"
+#include "t_debug_logging.h"
+
+const TVersion securityServerVersion(0,1,1);
+
+/**
+ * First phase constructor
+ */
+CMultiAgent* CMultiAgent::NewL()
+	{
+	CMultiAgent* self = new(ELeave) CMultiAgent();
+	self->ConstructL();
+	return self;
+	}
+
+/**
+  * Destructor
+  */
+CMultiAgent::~CMultiAgent()
+	{
+	LOG_MSG("~CMultiTargetAgent\n");
+	iServSession.Close();
+	}
+
+/**
+ * Constructor
+ */
+CMultiAgent::CMultiAgent() 
+	{
+	}
+
+/**
+ * Second phase constructor
+ */
+void CMultiAgent::ConstructL()
+	{
+	}
+
+/**
+  Parse the command line, set agent cpu affinity and call main test function
+  */
+void CMultiAgent::ClientAppL()
+	{
+	LOG_MSG("ENTER: CMultiTargetAgent::ClientAppL"); 
+
+	iNumApps = KNumApps;
+	iAgentCpuNo = KAgentCpu;
+	iTargetNameOffset = KTargetOffset;
+
+	TInt argc = User::CommandLineLength();
+	HBufC* commandLine = NULL;
+	LOG_MSG2(">Launcher Process() argc=%d", argc);
+	
+	if(argc)
+		{
+		commandLine = HBufC::NewLC(argc);
+		TPtr commandLineBuffer = commandLine->Des();
+		User::CommandLine(commandLineBuffer);
+
+		RBuf printCommandLine;
+		CleanupClosePushL(printCommandLine);
+		printCommandLine.CreateL(commandLine->Des().Length());
+		printCommandLine.Copy(commandLine->Des());
+		printCommandLine.Collapse();
+		LOG_MSG2(">command line = %S", &printCommandLine );
+		CleanupStack::PopAndDestroy( &printCommandLine );
+
+		// create a lexer and read through the command line
+		TLex lex(*commandLine);
+	
+		while (!lex.Eos())
+		{
+			// only look for options with first character '-'
+			if (lex.Get() == '-')
+			{
+			TChar arg = lex.Get();
+			
+				switch ( arg )
+				{
+				case 'n':
+					lex.Val( iNumApps );
+					LOG_MSG2("parsed numApps as %d", iNumApps); 
+					break;
+		
+				case 'a':
+					lex.Val( iAgentCpuNo );
+					LOG_MSG2("parsed agentCpuNo as %d", iAgentCpuNo);                        
+					break;
+
+				case 'o':
+					lex.Val( iTargetNameOffset );
+					LOG_MSG2("parsed iTargetNameOffset as %d", iTargetNameOffset);        
+					break;
+
+				default:
+					LOG_MSG("Bad argument from user"); 
+					break;                 
+				}
+			}
+		}
+	}
+	// Create active scheduler (to run active objects)
+	CActiveScheduler* scheduler = new (ELeave) CActiveScheduler();
+	CleanupStack::PushL(scheduler);
+	CActiveScheduler::Install(scheduler);
+	
+	if (iAgentCpuNo)
+		{
+		LOG_MSG2("CMultiAgent::ClientAppL() - setting agent to cpu %d", iAgentCpuNo);
+		UserSvr::HalFunction(EHalGroupKernel, EKernelHalLockThreadToCpu, (TAny *)iAgentCpuNo, 0);
+		}
+
+	TInt err = iServSession.Connect(securityServerVersion);
+	
+	if (err != KErrNone)
+		{
+		User::Panic(_L("Can't open server session"), err);
+		}
+
+	StartTest();
+
+	// Note: below is a workaround to overcome an issue with RTest server crashing 
+	// when writing to the windows console from different agents (on different CPUs 
+	// at the same time). To overcome this we signal the launcher using a global 
+	// semaphore to indicate a RTest complete instead
+	RSemaphore launchSemaphore;
+	CleanupClosePushL(launchSemaphore);
+            
+	TFindSemaphore launchSemFinder(KLaunchSemaphoreSearchString);
+	TFullName semaphoreResult;
+	TInt ret = launchSemFinder.Next(semaphoreResult);
+	LOG_MSG3( "> Find Launch Semaphote.Next ret=%d, %lS", ret, &semaphoreResult);
+         
+	ret = launchSemaphore.OpenGlobal(semaphoreResult);
+	LOG_MSG2( ">OpenGlobal semaphore ret=%d", ret );         
+    
+	LOG_MSG( ">Signalling semaphore" );
+	launchSemaphore.Signal();
+	CleanupStack::PopAndDestroy(&launchSemaphore); // launchSemaphore
+
+	// Delete active scheduler
+	CleanupStack::PopAndDestroy(scheduler);
+
+	if (commandLine)
+	CleanupStack::PopAndDestroy(commandLine);
+	
+	LOG_MSG( "EXIT: CMultiTargetAgent::ClientAppL"); 
+	}
+
+/**
+  Launch a process
+  @param aProcess the RProcess object used to create the process
+  @param aFileName file name of the executable used to create the process
+  @return KErrNone on success, or one of the other system wide error codes
+  */
+TInt CMultiAgent::LaunchProcess(RProcess& aProcess, const TDesC& aExeName, const TDesC& aCommandLine)    
+	{
+	LOG_MSG( "ENTER: CMultiAgent::LaunchProcess");
+    LOG_MSG2("%S", &TPtr8((TUint8*)aExeName.Ptr(), 2*aExeName.Length(), 2*aExeName.Length()));	
+	
+	// wait for 0.5 seconds due to issue with creating several processes in smp quickly
+	User::After(500000);
+	
+	TInt err = aProcess.Create( aExeName, aCommandLine );
+	LOG_MSG2( "CMultiAgent::LaunchProcess, aProcess.Create err = %d", err); 
+
+	// check that there was no error raised
+	if (err != KErrNone)
+		return err;
+	
+	// rendezvous with process
+	TRequestStatus status = KRequestPending;
+	aProcess.Rendezvous(status);
+
+	if (KRequestPending != status.Int())
+		{
+		// startup failed so kill the process
+		LOG_MSG2( "> RProcess Rendezvous() failed with %d. Killing process", status.Int() );
+		aProcess.Kill(KErrNone);
+		LOG_MSG( "EXIT: CMultiAgent::LaunchProcess");
+		return status.Int();
+		}
+	else
+		{
+		// start the test target
+		aProcess.Resume();
+		User::WaitForRequest(status);
+	
+		LOG_MSG2( "> CMultiAgent::LaunchProcess: RProcess Resume() Rendezvous successful %d: ", status.Int() );
+
+		if(KErrNone != status.Int())
+			{
+			LOG_MSG2( "> RProcess Resume() failed with %d. Killing process", status.Int() );
+			aProcess.Kill(KErrNone);
+			}
+
+		LOG_MSG( "EXIT: CMultiAgent::LaunchProcess");
+		return status.Int();
+		}
+	}
+
+/**
+  Handle Event
+  @param aEventInfo object containing event information from the DSS 
+  */
+void CMultiAgent::HandleEvent(TEventInfo& aEventInfo)
+	{
+	LOG_MSG( "ENTER: CMultiAgent::HandleEvent" ); 
+	TInt ret = KErrNone;
+	const TInt idValid = 1;
+	
+	switch ( aEventInfo.iEventType )
+		{
+		case EEventsAddProcess:
+			{
+			LOG_MSG(">> EEventsAddProcess");                        
+			TPtrC8 exeNamePtr8(aEventInfo.iAddProcessInfo.iFileName, aEventInfo.iAddProcessInfo.iFileNameLength);
+	
+			RBuf8 exeName8;
+			CleanupClosePushL(exeName8);
+			exeName8.CreateL(exeNamePtr8);
+			LOG_MSG2("From event: exeName8=%S", &exeName8);
+			CleanupStack::PopAndDestroy(&exeName8);
+			LOG_MSG("Testing if event process id is valid");
+
+			LOG_MSG2("Got aEventInfo.iProcessId=%d", I64LOW( aEventInfo.iProcessId));
+			__ASSERT_ALWAYS((aEventInfo.iProcessIdValid==idValid), User::Panic(_L("ProcessId Invalid"), aEventInfo.iProcessIdValid));
+	
+			RProcess targetProc;
+			ret = targetProc.Open(TProcessId(aEventInfo.iProcessId));
+			LOG_MSG2("RProcess open ret=%d", ret);
+			targetProc.Close();
+
+			__ASSERT_ALWAYS((ret == KErrNone), User::Panic(_L("ProcessId Invalid"), aEventInfo.iProcessIdValid));
+			break;
+			}
+	
+		case EEventsStartThread:
+			{
+			LOG_MSG(">> EEventsStartThread");                
+			TPtrC8 exeNamePtr8(aEventInfo.iStartThreadInfo.iFileName, aEventInfo.iStartThreadInfo.iFileNameLength);
+			RBuf8 exe8Name;
+			CleanupClosePushL(exe8Name);
+			exe8Name.CreateL(exeNamePtr8);
+			LOG_MSG2("From event: exeName8=%S", &exe8Name);
+			CleanupStack::PopAndDestroy(&exe8Name);
+	
+			LOG_MSG("Testing if event process id is valid" );
+
+			__ASSERT_ALWAYS((aEventInfo.iProcessIdValid==idValid), User::Panic(_L("ProcessId Invalid"), aEventInfo.iProcessIdValid));
+
+			LOG_MSG2("Got aEventInfo.iProcessId=%d", I64LOW(aEventInfo.iProcessId));
+
+			LOG_MSG("Testing if event thread id is valid");
+
+			__ASSERT_ALWAYS((aEventInfo.iThreadIdValid==idValid), User::Panic(_L("ThreadId Invalid"), aEventInfo.iThreadIdValid));
+
+			LOG_MSG2("Got aEventInfo.iThreadId=%d", I64LOW(aEventInfo.iThreadId));
+			break;                    
+			}                       
+
+		case EEventsUserTrace:
+			{
+			LOG_MSG(">> EEventsUserTrace");  
+			break;
+			}
+
+		case EEventsRemoveProcess:
+			{
+			LOG_MSG( ">> EEventsRemoveProcess");                        
+			iLaunchCompleted++; 
+			break;
+			}
+	
+		default:   
+			{
+			LOG_MSG( ">> Unknown event - probably due to DSS busy?");
+			break;
+			}	
+		}
+ 	 
+	LOG_MSG("EXIT: CMultiAgent::HandleEvent"); 
+	}
+
+/**
+ * Main test function which launches several targets and stresses the DSS 
+ */
+TInt CMultiAgent::StartTest()
+	{
+	LOG_MSG("ENTER: CMultiTargetAgent::StartTest");
+
+	for( TInt i = 0; i < iNumApps; i++ )
+		{
+		RBuf targetName;
+		RBuf launcherOptions;
+
+		CleanupClosePushL(targetName); 
+		CleanupClosePushL(launcherOptions); 
+
+		targetName.CreateL( KTargetExe().Length() + 2 );
+		targetName.Format( KTargetExe(), i + iTargetNameOffset + 1 );
+
+		LOG_MSG2("App %d: ", i+1);
+		LOG_MSG2("%S", &TPtr8((TUint8*)targetName.Ptr(), 2*targetName.Length(), 2*targetName.Length()));	
+
+		launcherOptions.CreateL( KTargetOptions().Length() + 2 );
+		launcherOptions.Format( KTargetOptions(), (TUint)ENormalExit, (i+1) );
+
+		LOG_MSG( "AppOptions : ");
+		LOG_MSG2("%S", &TPtr8((TUint8*)launcherOptions.Ptr(), 2*launcherOptions.Length(), 2*launcherOptions.Length()));	
+		
+		// Add each test target to array
+		iTargetList.AppendL(CAgentAsyncEvent::NewL(*this, targetName, launcherOptions));
+		CleanupStack::PopAndDestroy(2, &targetName );
+		}
+	
+	iLaunchCompleted = 0;
+	TInt err = KErrNone;
+		
+	for (TInt i = 0; i < iNumApps; i++)
+		{
+		// Attach to process non-passively
+		LOG_MSG2( ">AttachExecutable app %d ", i + iTargetNameOffset + 1 );
+		LOG_MSG2("%S", &TPtr8((TUint8*)iTargetList[i]->GetExecutable().Ptr(), 2*iTargetList[i]->GetExecutable().Length(), 
+					2*iTargetList[i]->GetExecutable().Length()));
+
+		err = iServSession.AttachExecutable( iTargetList[i]->GetExecutable(), EFalse);
+		__ASSERT_ALWAYS((err == KErrNone), User::Panic(_L("DSS Attach failed"), err));
+
+		// Continue on interested event actions
+		LOG_MSG2( ">SetEventAction app %d,  EEventsStartThread EAcionContinue", i + iTargetNameOffset + 1);
+
+		err = iServSession.SetEventAction( iTargetList[i]->GetExecutable(), EEventsStartThread, EActionContinue);
+		__ASSERT_ALWAYS((err==KErrNone), User::Panic(_L("SetEventAction Error"), err));
+	
+		LOG_MSG2(">SetEventAction app %d,  EEventsAddProcess EActionContinue", i + iTargetNameOffset + 1);
+		err = iServSession.SetEventAction( iTargetList[i]->GetExecutable(), EEventsAddProcess, EActionContinue);
+		__ASSERT_ALWAYS((err==KErrNone), User::Panic(_L("SetEventAction Error"), err));
+
+		LOG_MSG2(">SetEventAction app %d,  EEventsUserTrace EActionContinue", i + iTargetNameOffset + 1);
+		err = iServSession.SetEventAction( iTargetList[i]->GetExecutable(), EEventsUserTrace, EActionContinue);
+		__ASSERT_ALWAYS((err==KErrNone), User::Panic(_L("SetEventAction Error"), err));
+	
+		LOG_MSG2(">SetEventAction app %d,  EEventsRemoveProcess EActionContinue", i + iTargetNameOffset + 1);
+		err = iServSession.SetEventAction( iTargetList[i]->GetExecutable(), EEventsRemoveProcess, EActionContinue);
+		__ASSERT_ALWAYS((err==KErrNone), User::Panic(_L("SetEventAction Error"), err));
+
+		// Add target object to active schedular
+		iTargetList[i]->Watch();
+		}
+
+	for (TInt i= 0; i< iNumApps; i++)
+		{
+		LOG_MSG( ">Calling LaunchProcess function");
+		err = LaunchProcess(iTargetList[i]->GetProcHandle(), iTargetList[i]->GetExecutable(), iTargetList[i]->GetExeConfig());
+		__ASSERT_ALWAYS((err==KErrNone), User::Panic(_L("LaunchProcess failed"), err));
+		}
+
+	LOG_MSG( ">CActiveScheduler::Start()");
+	CActiveScheduler::Start();
+
+	for (TInt i= 0; i < iNumApps; i++)
+		{
+		// Now detach again
+		LOG_MSG( "Before iServSession.DetachExecutable" );
+		err = iServSession.DetachExecutable(iTargetList[i]->GetExecutable());
+		__ASSERT_ALWAYS((err==KErrNone), User::Panic(_L("DetachExecutable failed"), err));
+		}
+	
+	// Free all the memory
+	iTargetList.ResetAndDestroy();
+	LOG_MSG( "EXIT: CMultiTargetAgent::StartTest" );
+
+	return KErrNone;
+	}
+
+/**
+  * Entry point for run mode debug driver test
+  */
+GLDEF_C TInt E32Main()
+	{
+	LOG_MSG( "ENTER: Multi_agent E32Main ");
+	__UHEAP_MARK;
+
+	TInt ret = KErrNone;
+	RProcess::Rendezvous(KErrNone);
+	
+	CTrapCleanup* trap = CTrapCleanup::New();
+		
+	if (!trap)
+		return KErrNoMemory;
+	
+	CMultiAgent *runModeAgent = CMultiAgent::NewL();
+
+	if (runModeAgent != NULL)
+		{
+		TRAP(ret,runModeAgent->ClientAppL());
+		LOG_MSG2( "ClientAppL returned %d", ret );
+		delete runModeAgent;
+		}
+
+	delete trap;
+	__UHEAP_MARKEND;
+	LOG_MSG( "EXIT: Multi_agent E32Main ");
+	return ret;
+	}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debugsrv/runmodedebug/tsrc/rm_debug/multi_agent_tests/t_multi_agent.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,105 @@
+// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+// Definitions for the run mode debug tests
+// 
+//
+
+
+#ifndef RMDEBUG_MULTI_AGENT_H
+#define RMDEBUG_MULTI_AGENT_H
+
+#include <u32hal.h>
+#include <f32file.h>
+#include <rm_debug_api.h>
+
+using namespace Debug;
+
+_LIT(KLaunchSemaphoreName, "t_rmdebug_launch_semaphore");
+_LIT(KLaunchSemaphoreSearchString, "t_rmdebug_launch_semaphore*");
+
+// Currently the targets are instances of t_rmdebug_app.exe
+_LIT(KTargetExe,"z:\\sys\\bin\\t_rmdebug_app%d.exe");
+
+_LIT(KTargetOptions,"-f%d -a%d");
+
+// If changing this, make sure there are enough apps built/in the rom 
+const TInt KNumApps = 5;
+
+// Default CPU execution for Agent
+const TInt KAgentCpu = 0;
+
+// Workaround to ensure we have the same agent binary when running multiple agents
+const TInt KTargetOffset = 0;
+
+class CAgentAsyncEvent;
+
+/**
+  @Class CRunModeAgent
+  
+  The basic run mode agent
+  */
+class CMultiAgent : public CBase
+	{
+	public:
+	static CMultiAgent* NewL();
+	~CMultiAgent();
+	void ClientAppL();  
+	RSecuritySvrSession&  DebugDriver() { return iServSession; };	
+	void HandleEvent(TEventInfo& aSEventInfo);
+
+	public:
+	TInt GetLaunchCompleted() const { return iLaunchCompleted; }
+	TInt GetNumApps() const { return iNumApps; }
+	TInt GetTargetOffset() const { return iTargetNameOffset; }
+
+	private:
+	CMultiAgent();
+	void ConstructL();
+	TInt StartTest();
+	TInt LaunchProcess(RProcess& aProcess, const TDesC& aExeName, const TDesC& aCommandLine);
+	
+	private:
+
+	/**
+	 * CPU agent executes on; by default this is 0 
+	 */
+	TInt iAgentCpuNo;
+
+	/*
+	 * Offset for running multiple targets using the same agent
+	 */
+	TInt iTargetNameOffset;
+
+	/** 
+	 * Number of applications/targets per agent
+	 */
+	TInt iNumApps;
+
+	/**
+	 * Flag used for terminating the event handling for a target 
+	 */	
+	TInt iLaunchCompleted;
+
+	/*
+	 * Handle to DSS
+	 */
+	RSecuritySvrSession iServSession;
+	
+	/**
+	 * Array to target parameters required by the agent
+	 */	
+	RPointerArray<CAgentAsyncEvent> iTargetList;
+	};
+
+#endif // RMDEBUG_MULTI_AGENT_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debugsrv/runmodedebug/tsrc/rm_debug/multi_agent_tests/t_multi_agent_launcher.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,229 @@
+// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+// Helper app to launch debug targets
+//
+//
+
+#include "t_multi_agent_launcher.h"
+
+#include "t_debug_logging.h"
+
+/**
+ * Launch a process
+ * @param aProcess the RProcess object used for creating the process
+ * @param aExeName the name of the executable to run 
+ * @param aCommandLine command line parameters to pass when creating the process 
+ * @return KErrNone on success, or one of the other system wide error codes
+ */
+TInt LaunchProcess(RProcess& aProcess, TDesC& aExeName, TDesC& aCommandLine )    
+	{
+	LOG_MSG("ENTER: t_multi_agent_launcher: launchProcess"); 
+
+	LOG_MSG2("aExeName %S ", &TPtr8((TUint8*)aExeName.Ptr(), 2*aExeName.Length(), 2*aExeName.Length()));
+	LOG_MSG2("aCommandLine %S", &TPtr8((TUint8*)aCommandLine.Ptr(), 2*aCommandLine.Length(), 2*aCommandLine.Length()));
+
+	TInt err = aProcess.Create( aExeName, aCommandLine );
+	LOG_MSG2("t_multi_agent_launcher launchProcess, aProcess.Create err = %d", err); 
+
+	// check that there was no error raised
+	if(err != KErrNone)
+		{
+		return err;
+		}
+
+	// rendezvous with process
+	TRequestStatus status = KRequestPending;
+	aProcess.Rendezvous(status);
+
+	if(KRequestPending != status.Int())
+		{
+		// startup failed so kill the process
+		LOG_MSG2("t_multi_agent_launcher: launchProcess: RProcess Rendezvous() failed with %d. Killing process", status.Int());
+		aProcess.Kill(KErrNone);
+		return status.Int();
+		}
+	else
+		{
+		aProcess.Resume();
+		User::WaitForRequest(status);
+
+		LOG_MSG2("t_multi_agent_launcher: launchProcess: RProcess Resume() Rendezvous successful %d: ", status.Int());
+
+		if(KErrNone != status.Int())
+			{
+			LOG_MSG2("t_multi_agent_launcher: RProcess Resume() failed with %d. Killing process", status.Int());
+			aProcess.Kill(KErrNone);
+			}
+
+		LOG_MSG("EXIT: t_multi_agent_launcher launchProcess");
+		return status.Int();
+		}
+	}
+
+/**
+ * Read command line parameters and control the launching of the agents. 
+ */
+void MainL()
+	{	
+	LOG_MSG( "ENTER: t_multi_agent_launcher MainL()");
+
+	TInt ret = KErrNone;
+	TInt numAgents = KNumAgents;
+	TInt numTargets = KNumTargets;
+	TInt numTestRuns = KNumTestRuns;
+
+	TInt argc = User::CommandLineLength();
+	HBufC* commandLine = NULL;
+	LOG_MSG2("t_multi_agent_launcher: MainL(): argc=%d", argc);
+    
+	if(argc)
+		{
+		commandLine = HBufC::NewLC(argc);
+		TPtr commandLineBuffer = commandLine->Des();
+		User::CommandLine(commandLineBuffer);
+
+		RBuf printCommandLine;
+		CleanupClosePushL( printCommandLine );
+		printCommandLine.CreateL( commandLine->Des().Length() );
+		printCommandLine.Copy( commandLine->Des() );
+		printCommandLine.Collapse();
+		LOG_MSG2("t_multi_agent_launcher: command line = %S", &printCommandLine);
+		CleanupStack::PopAndDestroy( &printCommandLine );
+ 
+		// create a lexer and read through the command line
+		TLex lex(*commandLine);
+		while (!lex.Eos())
+			{
+			// only look for options with first character '-'
+			if (lex.Get() == '-')
+				{
+					TChar arg = lex.Get();
+					switch ( arg )
+						{
+						case 'n':
+							lex.Val( numAgents );
+							LOG_MSG2("t_multi_agent_launcher: parsed numAgents as %d", numAgents);
+							break;
+						case 'm':
+							lex.Val( numTargets );
+							LOG_MSG2("t_multi_agent_launcher: parsed numTargets as %d", numTargets);                        
+							break;  
+						case 't':
+							lex.Val( numTestRuns );
+							LOG_MSG2("t_multi_agent_launcher: parsed numTestRuns as %d", numTestRuns);                        
+							break;                    
+						default:
+							LOG_MSG("t_multi_agent_launcher: unknown argument ignoring it");
+							break;                 
+						}
+				}
+			}
+		}
+
+	// Note: below is a workaround to overcome an issue with RTest server crashing 
+	// when writing to the windows console from different agents (on different CPUs 
+	// at the same time). To overcome this we get signaled by the agents when they have 
+	// completed their tests so that we can do a RTest complete
+	RSemaphore launchSemaphore;
+	CleanupClosePushL(launchSemaphore);
+	ret = launchSemaphore.CreateGlobal(KLaunchSemaphoreName, 0);
+	LOG_MSG2( ">Target Launcher : RSemaphore.CreateGlobal ret %d", ret);
+	User::LeaveIfError( ret );
+
+	ret = launchSemaphore.OpenGlobal(KLaunchSemaphoreName);
+	LOG_MSG2( ">Target Launcher : RSemaphore.OpenGlobal ret %d", ret);
+	User::LeaveIfError( ret );
+
+	//Now launch the requested number of apps for the requested number of test runs
+	for( TInt j = 0; j < numTestRuns; j++ )
+		{ 
+			for( TInt i = 0; i < numAgents; i++ )  
+				{
+					RBuf targetName;
+					targetName.CleanupClosePushL();
+					targetName.CreateL(KAgentExe());
+
+					RProcess aProc;
+					CleanupClosePushL(aProc); 
+					RBuf launcherOptions;
+					CleanupClosePushL(launcherOptions);
+				    const TInt additionalWords = 2;	
+					launcherOptions.CreateL( KAgentOptions().Length() + additionalWords );
+		
+					// Apply offset: launcherOptions.Format( .., .., i * numTargets, ..)
+					// workaround to ensure we have the same binary for multiple agents. 
+					// e.g. So if offset = 0, agent attaches to app1, app2, app3, app4, app5
+					// if offset = 5, agent attached to app6, app7, app8, app9, app10 etc.
+					// Note: apps need to be in rom otherwise the agent will fail on an assert 
+					// (with KErrNotFound)
+					launcherOptions.Format( KAgentOptions(), (TUint)numTargets, i * numTargets, 0);
+			
+					ret = LaunchProcess( aProc, targetName, launcherOptions );	
+					CleanupStack::PopAndDestroy(3,&targetName);
+					User::LeaveIfError(ret);
+				}
+		}
+
+	// Wait for all agents to do their testing before checking the semaphore
+	User::After(12000000);
+
+	LOG_MSG( ">Target Launcher:  Semaphore wait");
+
+	for (TInt i = 0; i < numAgents; i ++)
+		{
+		//We need this delay just in case an agent crashes and never signals the sem
+		ret = launchSemaphore.Wait(100000);
+		if( ret != KErrNone )
+			{
+			LOG_MSG3("launchSemaphore.Wait ret %d for agent %d", ret, i);
+			break;
+			}
+		}
+
+	LOG_MSG2( "testing for Semaphore ret %d", ret);
+
+	// We only want to have one RTest instance at any one time since otherwise RTest can panic
+	RTest test(_L("T_MULTI_AGENT_LAUNCHER"));
+	test.Start(_L("t_multi_agent_launcher Check for agents finishing correctly"));
+	test(ret == KErrNone);
+	test.End();
+	test.Close();
+
+	CleanupStack::PopAndDestroy(&launchSemaphore); // launchSemaphore
+
+	if( commandLine )
+	CleanupStack::PopAndDestroy(commandLine);
+	
+	LOG_MSG("EXIT: t_multi_agent_launcher MainL()");
+	}
+ 
+GLDEF_C TInt E32Main()
+	{
+	LOG_MSG("ENTER: Multi_agent_launcher E32Main()");
+	__UHEAP_MARK;
+
+	CTrapCleanup* trap = CTrapCleanup::New();
+	if (!trap)
+		return KErrNoMemory;
+
+	TRAPD(err, MainL());
+	LOG_MSG2("Multi_agent_launcher: returning from MainL(), err = %d", err);
+	
+	delete trap;
+	LOG_MSG("EXIT: Multi_agent_launcher E32Main()");
+	__UHEAP_MARKEND;
+
+	return err;
+	}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debugsrv/runmodedebug/tsrc/rm_debug/multi_agent_tests/t_multi_agent_launcher.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,40 @@
+// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+// Definitions for agent launcher
+// 
+//
+
+
+#ifndef RMDEBUG_MULTI_AGENT_LAUNCHER_H
+#define RMDEBUG_MULTI_AGENT_LAUNCHER_H
+
+#include <e32test.h>
+
+// Default test runs
+const TInt KNumTestRuns = 1; 
+
+// Default number of targets per agent
+const TInt KNumTargets = 5;
+
+// Default number of agents, if changing this make sure there are enough apps being built 
+const TInt KNumAgents = 2; 
+
+_LIT(KAgentExe,"z:\\sys\\bin\\t_rmdebug_multi_agent.exe");
+_LIT(KAgentOptions,"-n%d -o%d -a%d");
+
+_LIT(KLaunchSemaphoreName, "t_rmdebug_launch_semaphore");
+_LIT(KLaunchSemaphoreSearchString, "t_rmdebug_launch_semaphore*");
+
+#endif // RMDEBUG_MULTI_AGENT_LAUNCHER_H
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debugsrv/runmodedebug/tsrc/rm_debug/multi_target_tests/t_multi_target.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,405 @@
+// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+// Test the ability of the debug system to handle events from several debug targets
+//
+//
+
+#include <e32base.h>
+#include <e32property.h>
+
+#include <hal.h>
+#include <e32test.h>
+
+#include "t_multi_target.h"
+#include "t_target_launcher.h"
+#include "t_rmdebug_app.h"
+
+#ifdef KERNEL_OOM_TESTING
+  #ifdef USER_OOM_TESTING
+    #error "Cannot define both KERNEL_OOM_TESTING and USER_OOM_TESTING"
+  #endif
+#endif
+
+
+using namespace Debug;
+
+const TVersion securityServerVersion(0,1,1);
+
+const TVersion testVersion(2,1,0);
+
+#ifdef NO_DEBUGTOKEN
+LOCAL_D RTest test(_L("T_RMDEBUG_MULTI_TARGET"));
+#endif
+
+#ifdef SOMECAPS_DEBUGTOKEN
+LOCAL_D RTest test(_L("T_RMDEBUG_MULTI_TARGET_OEM"));
+#endif
+
+#ifdef FEWCAPS_DEBUGTOKEN
+LOCAL_D RTest test(_L("T_RMDEBUG_MULTI_TARGET_OEM2"));
+#endif
+
+
+
+CMultiTargetAgent* CMultiTargetAgent::NewL()
+//
+// CMultiTargetAgent::NewL
+//
+  {
+  CMultiTargetAgent* self = new(ELeave) CMultiTargetAgent();
+
+  self->ConstructL();
+
+  return self;
+  }
+
+
+CMultiTargetAgent::~CMultiTargetAgent()
+//
+// CMultiTargetAgent destructor
+//
+    {
+    RDebug::Printf("~CMultiTargetAgent\n");
+    iServSession.Close();
+    }
+
+
+CMultiTargetAgent::CMultiTargetAgent() : 
+    iEventPtr( (TUint8*)&iEventInfo, sizeof(TEventInfo) )
+    {
+    }
+
+
+void CMultiTargetAgent::ConstructL()
+//
+// CMultiTargetAgent::ConstructL
+//
+  {
+  }
+
+/**
+ * Helper code for the stepping tests. Returns the number of nanokernel ticks in one second.
+ *
+ * @return Number of nanokernel ticks. 0 if unsuccesful.
+ */
+TInt CMultiTargetAgent::HelpTicksPerSecond(void)
+  {
+  TInt nanokernel_tick_period;
+  HAL::Get(HAL::ENanoTickPeriod, nanokernel_tick_period);
+
+  ASSERT(nanokernel_tick_period != 0);
+
+  static const TInt KOneMillion = 1000000;
+
+  return KOneMillion/nanokernel_tick_period;
+  }
+
+void CMultiTargetAgent::ClientAppL()
+//
+// Performs each test in turn
+//
+  {
+  test.Start(_L("ClientAppL"));
+  TInt err = iServSession.Connect(securityServerVersion);
+  if (err != KErrNone)
+      {
+      User::Panic(_L("Can't open server session"), err);
+      }
+  SetupDebugServerL();
+  LaunchTargetsInOrderL();
+  RDebug::Printf( "returning from CMultiTargetAgent::ClientAppL" );
+  test.End();
+  }
+
+/**
+  Launch a process
+
+  @param aProcess The RProcess object to use to create the process
+  @param aExeName File name of the executable to create the process from
+  @param aCommandLine The command line to pass to the new process
+  @return KErrNone on success, or one of the other system wide error codes
+  */
+TInt CMultiTargetAgent::LaunchProcess(RProcess& aProcess, TDesC & aExeName, TDesC & aCommandLine )
+    {    
+    TInt err = aProcess.Create( aExeName, aCommandLine );    
+    if(err != KErrNone)
+        {
+        RDebug::Printf( "aProcess.Create ret %d", err);
+        return err;
+        }
+
+    TRequestStatus status = KRequestPending;
+    aProcess.Rendezvous(status);
+    if(KRequestPending != status.Int())
+        {
+        // startup failed so kill the process
+        aProcess.Kill(KErrNone);
+        return status.Int();
+        }
+    else
+        {
+        // start up succeeded so resume the process
+        aProcess.Resume();
+        // Give the process a chance to run
+        User::After( 500000 );
+        return KErrNone;
+        }
+    }
+
+void CMultiTargetAgent::SetupDebugServerL()
+    {
+    RDebug::Printf( "CMultiTargetAgent::SetupDebugServerL" );
+    test.Next(_L("SetupDebugServerL\n"));
+    iTargets.ReserveL( KNumApps );
+
+    RBuf targetName;
+    CleanupClosePushL( targetName );
+
+    for( TInt numApps = 0; numApps < KNumApps; numApps++ )
+        {
+        iTargets.AppendL( targetName );
+        RDebug::Printf( "Attach to DSS for app %d ", numApps );
+
+        iTargets[numApps].CreateL( KTargetExe().Length() + 2 );
+        iTargets[numApps].Format( KTargetExe(), numApps+1 );
+
+        TInt ret = iServSession.AttachExecutable( iTargets[numApps], EFalse );
+        test( ret == KErrNone );
+
+        RDebug::Printf( ">SetEventAction app %d,  EEventsStartThread EActionSuspend", numApps );
+        ret = iServSession.SetEventAction( iTargets[numApps], EEventsStartThread, EActionSuspend );
+        test( ret == KErrNone );
+
+        RDebug::Printf( ">SetEventAction app %d,  EEventsAddProcess EActionContinue", numApps );
+        ret = iServSession.SetEventAction( iTargets[numApps], EEventsAddProcess, EActionContinue );
+        test( ret == KErrNone );
+
+        RDebug::Printf( ">SetEventAction app %d,  EEventsRemoveProcess EActionContinue", numApps );
+        ret = iServSession.SetEventAction( iTargets[numApps], EEventsRemoveProcess, EActionContinue );
+        test( ret == KErrNone );
+        }
+
+    CleanupStack::PopAndDestroy( &targetName ); // targetName
+
+    }
+
+
+
+TInt CMultiTargetAgent::LaunchTargetsInOrderL()
+    {
+    RDebug::Printf( "CMultiTargetAgent::LaunchTargetsInOrderL" );
+    
+    RBuf launcher;
+    CleanupClosePushL( launcher );
+    launcher.CreateL( KLauncherExe() );
+    
+    RBuf launcherOptions;
+    CleanupClosePushL( launcherOptions ); 
+    launcherOptions.CreateL( KTargetOptions().Length() + 2 );
+    launcherOptions.Format( KTargetOptions(), (TUint)ENormalExit );
+
+    RDebug::Printf( ">LaunchProcess()" );
+    RProcess launcherProc; 
+    CleanupClosePushL( launcherProc );
+    
+    TInt ret = LaunchProcess( launcherProc, launcher, launcherOptions );
+    RDebug::Printf( "<LaunchProcess() ret %d", ret );
+    
+    CleanupStack::PopAndDestroy( &launcherProc ); // launcherProc
+    CleanupStack::PopAndDestroy( &launcherOptions ); // launcherOptions
+    CleanupStack::PopAndDestroy( &launcher ); //launcher 
+
+    test( ret == KErrNone );
+    
+    RSemaphore launchSemaphore;   
+    CleanupClosePushL( launchSemaphore );
+            
+    TFindSemaphore launchSemFinder( KLaunchSemaphoreNameSearchString );
+    TFullName semaphoreResult;
+    ret = launchSemFinder.Next(semaphoreResult);
+    RDebug::Printf( ">  Find Launch Semaphote.Next ret=%d, %lS", ret, &semaphoreResult );
+    test( ret == KErrNone );   
+     
+    ret = launchSemaphore.OpenGlobal( semaphoreResult );
+    RDebug::Printf( "> OpenGlobal semaphore ret=%d", ret );         
+    test( ret == KErrNone );    
+    
+    TBool thisLaunchCompleted; 
+
+    test.Next(_L("LaunchTargetsInOrderL\n"));
+    for( TInt numLaunches = KNumLaunches; numLaunches > 0; numLaunches-- )
+        {
+        for( TInt numApps = KNumApps; numApps > 0; numApps-- )
+            {
+            thisLaunchCompleted = EFalse;
+            // This will trigger the launcher app to launch the next target
+            RDebug::Printf( " >Semaphore.Signal app=%d, launch=%d", numApps, numLaunches);
+            launchSemaphore.Signal();
+            
+            RBuf8 tgt8Name; 
+            CleanupClosePushL( tgt8Name );
+           
+            RBuf tgtCollapseName;
+            CleanupClosePushL( tgtCollapseName );
+                    
+            tgtCollapseName.CreateL( iTargets[numApps-1] );
+            tgt8Name.CreateL( tgtCollapseName.Collapse() );
+            
+
+            while( ! thisLaunchCompleted )
+                {
+                RDebug::Printf( ">GetEvent app %d for %S", numApps, &tgt8Name );
+                iServSession.GetEvent( iTargets[numApps-1], iStatus, iEventPtr );
+          
+                // Wait for the target to get started.
+                RDebug::Printf( " >Wait for event from target app=%d, launch=%d\n", numApps, numLaunches);
+                User::WaitForRequest( iStatus );
+                RDebug::Printf( " <Wait for request returned with status %d", iStatus.Int() );
+                test( iStatus==KErrNone );
+    
+                RDebug::Printf( " > Got iEventType =%d, app=%d", iEventInfo.iEventType, numApps );
+                switch( iEventInfo.iEventType )
+                    {
+                    case EEventsAddProcess:
+                        {
+                        RDebug::Printf( "Got EEventsAddProcess" );                        
+                        TPtrC8 exeNamePtr8( iEventInfo.iAddProcessInfo.iFileName, iEventInfo.iAddProcessInfo.iFileNameLength );
+                        
+                        RBuf8 exeName8;
+                        CleanupClosePushL( exeName8 );
+                        exeName8.CreateL( exeNamePtr8 );
+                        RDebug::Printf( " from event: exeName8=%S", &exeName8 );
+                        CleanupStack::PopAndDestroy( &exeName8 );
+                        
+                        RBuf8 compareName8;
+                        CleanupClosePushL( compareName8 );
+                        compareName8.CreateL( KTargetExeName().Length() + 10 );
+                        compareName8.Format( KTargetExeName(), numApps );
+                        RDebug::Printf( " comparing to: compareName8=%S", &compareName8 );
+                        
+                        test( compareName8.CompareC( exeNamePtr8 ) == 0 );
+                        CleanupStack::PopAndDestroy( &compareName8 );
+
+                        RDebug::Printf( "Testing if event process id is valid" );
+                        test( iEventInfo.iProcessIdValid );
+                        RDebug::Printf( "Got iEventInfo.iProcessId=%d", I64LOW( iEventInfo.iProcessId ) );
+                        
+                        RProcess targetProc;
+                        ret = targetProc.Open( TProcessId( iEventInfo.iProcessId ) );
+                        RDebug::Printf( "RProcess open ret=%d",ret );
+                        targetProc.Close();
+                        test( ret == KErrNone );
+                        
+                        break;
+                        }//EEventsAddProcess
+                        
+                    case EEventsStartThread:
+                        {
+                        RDebug::Printf( "Got EEventsStartThread" );
+                         
+                        TPtrC8 exeNamePtr8( iEventInfo.iStartThreadInfo.iFileName, iEventInfo.iStartThreadInfo.iFileNameLength );
+                        RBuf8 exe8Name;
+                        CleanupClosePushL( exe8Name );
+                        exe8Name.CreateL( exeNamePtr8 );
+                        RDebug::Printf( " from event: exeName8=%S", &exe8Name );
+                        CleanupStack::PopAndDestroy( &exe8Name );
+                        
+                        test( tgt8Name.CompareC( exeNamePtr8 ) == 0 );
+                        
+                        RDebug::Printf( "Testing if event process id is valid" );
+                        test( iEventInfo.iProcessIdValid );
+                        RDebug::Printf( "Got iEventInfo.iProcessId=%d", I64LOW( iEventInfo.iProcessId ) );
+                         
+                        RDebug::Printf( "Testing if event thread id is valid" );
+                        test( iEventInfo.iThreadIdValid );
+                        RDebug::Printf( "Got iEventInfo.iThreadId=%d", I64LOW( iEventInfo.iThreadId ) );
+                        
+                        RThread targetThread;
+                        CleanupClosePushL( targetThread );
+                        
+                        ret = targetThread.Open( TThreadId( iEventInfo.iThreadId ) );
+                        RDebug::Printf( "RThread open ret=%d", ret );
+                        test( ret == KErrNone ); 
+                         
+                        test( iEventInfo.iThreadId == targetThread.Id() );  
+
+                        RDebug::Printf( "Resuming thread for app=%d, id=%d", numApps, I64LOW( targetThread.Id() ));
+                        ret = iServSession.ResumeThread( iEventInfo.iThreadId );
+                        CleanupStack::PopAndDestroy( &targetThread );
+                        
+                        test( ret == KErrNone );
+                        
+                        ret = iServSession.ResumeThread( iEventInfo.iThreadId );
+                        break;                    
+                        }//case EEventsStartThread                        
+
+                    case ( EEventsRemoveProcess ):
+                        {
+                        RDebug::Printf( "*** Got EEventsRemoveProcess. app%d has exited. Moving on to next app", numApps );                        
+                        thisLaunchCompleted = ETrue;
+                        break;
+                        }
+                        
+                    default :   
+                        RDebug::Printf( "Got unknown event" );
+                        test( EFalse );
+                        break;
+                    }
+                }//while
+
+            CleanupStack::PopAndDestroy( &tgtCollapseName ); // tgtCollapseName
+            CleanupStack::PopAndDestroy( &tgt8Name ); // tgt8Name 
+            }
+        }    
+
+    launchSemaphore.Signal();
+    
+	CleanupStack::PopAndDestroy( &launchSemaphore ); // launchSemaphore
+  
+	for( TInt i = iTargets.Count()-1; i>=0; i-- )
+		{
+		RDebug::Printf( "Closing target %d", i );
+		iTargets[ i ].Close();
+		}
+
+	iTargets.Close();
+	
+	return KErrNone;
+    }
+
+
+GLDEF_C TInt E32Main()
+    {
+    TInt ret = KErrNone;
+   
+  
+    CTrapCleanup* trap = CTrapCleanup::New();
+    if (!trap)
+      return KErrNoMemory;
+    test.Title();
+   
+    CMultiTargetAgent *runModeAgent = CMultiTargetAgent::NewL();
+    if (runModeAgent != NULL)
+        {
+        __UHEAP_MARK;
+        TRAP(ret,runModeAgent->ClientAppL());
+        __UHEAP_MARKEND;
+        
+        RDebug::Printf( "ClientAppL returned %d", ret );
+        delete runModeAgent;
+        }
+
+    delete trap;
+    return ret;
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debugsrv/runmodedebug/tsrc/rm_debug/multi_target_tests/t_multi_target.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,88 @@
+// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+// Definitions for the run mode debug tests
+// 
+//
+
+
+#ifndef RMDEBUG_MULTI_TARGET_H
+#define RMDEBUG_MULTI_TARGET_H
+
+#include "t_rmdebug_app.h"
+
+#include <rm_debug_api.h>
+
+class CMultiTargetAgent;
+
+//
+// class CRunModeAgent
+//
+// The basic run mode agent.
+//
+class CMultiTargetAgent : public CBase
+	{
+public:
+	static CMultiTargetAgent* NewL();
+	~CMultiTargetAgent();
+	void ClientAppL();
+	
+    TInt LaunchProcess(RProcess& aProcess, TDesC & aExeName, TDesC & aCommandLine );
+    
+private:
+	CMultiTargetAgent();
+	void ConstructL();
+
+	void ReportPerformance(void);
+
+	TInt HelpTicksPerSecond(void);
+
+	enum TTestMode 
+		{
+		//run all the tests
+		EModeAll = 1<<0,
+		//run the specified tests in reverse order
+		EModeReverse = 1<<1,
+		//print out help
+		EModeHelp = 1<<2,
+		//print out help
+		EModeVersion = 1<<3
+		};
+	
+	TInt LaunchTargetsInOrderL();
+	void SetupDebugServerL();
+
+private:
+
+#if defined(KERNEL_OOM_TESTING)
+	RKernelLowMemorySecuritySvrSession iServSession;
+#elif defined (USER_OOM_TESTING)
+	RUserLowMemorySecuritySvrSession iServSession;
+#else
+	Debug::RSecuritySvrSession iServSession;
+#endif
+	RSemaphore iAddressGlobSem;
+
+	TUid iMySid;
+
+	// Timing information
+	TInt iStartTick;
+	TInt iStopTick;
+
+	RArray<RBuf> iTargets;
+  TRequestStatus iStatus;
+  Debug::TEventInfo iEventInfo;
+  TPtr8 iEventPtr;
+	};
+
+#endif // RMDEBUG_MULTI_TARGET_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debugsrv/runmodedebug/tsrc/rm_debug/performance_test/t_rmdebug_performance_oemtoken.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,26 @@
+// Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+//
+
+
+#include <e32base.h>
+
+GLDEF_C TInt E32Main()
+	{
+	// No need to do anything, the only requirement is that
+	// this executable can be loaded and runs to completion
+	return 0;
+	}
+
+// End of file - t_rmdebug_performance_oemtoken.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debugsrv/runmodedebug/tsrc/rm_debug/performance_test/t_rmdebug_performance_test.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,599 @@
+// Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+// Tests performance of run mode debug device component   
+//
+
+#include <e32base.h>
+#include <e32property.h>
+#include <e32test.h>
+#include <e32def.h>
+#include <e32const.h>
+#include <hal.h>
+
+#include "t_rmdebug_performance_test.h"
+#include "t_debug_logging.h"
+#include "t_rmdebug_app.h"
+
+const TVersion securityServerVersion(0,1,1);
+
+_LIT(KTestName, "T_RMDEBUG_PERFORMANCE_TEST");
+
+LOCAL_D RTest test(KTestName);
+
+using namespace Debug;
+
+CRunModeAgent* CRunModeAgent::NewL()
+    {
+    LOG_ENTRY();
+    CRunModeAgent* self = new(ELeave) CRunModeAgent();
+    self->ConstructL();
+    LOG_EXIT();
+    return self;
+    }
+
+void CRunModeAgent::ConstructL()
+    {
+    // ConstructL list does not match destruction list as R-Class member variables are implicitly open.
+    // DebugDriver().Connect() is conditionally set depending on the test case hence not part of this function.
+    LOG_ENTRY();
+    User::LeaveIfError(iIntegerProperty.Attach(RProcess().SecureId(), EPropertyTimeOfCrash, EOwnerThread));
+    LOG_EXIT(); 
+    }
+
+CRunModeAgent::~CRunModeAgent()
+    {
+    LOG_ENTRY();   
+    DebugDriver().Close();
+    iTimeDifs.Close();
+    iIntegerProperty.Close();
+    RProperty::Delete(EPropertyTimeOfCrash);
+    LOG_EXIT(); 
+    }
+
+
+void CRunModeAgent::ClientAppL()
+    {
+    LOG_ENTRY();   
+   
+    if ( ParseCommandLine() == EDisplayHelp )
+        {
+        DisplayUsage();
+        }
+    else
+        {
+        static _LIT_SECURITY_POLICY_PASS(KAllowAllPolicy);
+        RProperty::Define(RProcess().SecureId(), EPropertyTimeOfCrash, RProperty::EInt, KAllowAllPolicy, KAllowAllPolicy);        
+        StartTest();
+        }
+        
+    LOG_EXIT(); 
+    }
+
+TInt CRunModeAgent::GetTimeInMs()
+{
+    return User::NTickCount() * iTickPeriodMs;
+}
+
+void CRunModeAgent::GetStartTime()
+    {    
+    LOG_ENTRY();
+
+    test ( KErrNone == iIntegerProperty.Get(iParams.iCountStart) );    
+    LOG_MSG2("iParams.iCountStart %d", iParams.iCountStart);
+    
+    LOG_EXIT();
+    }
+
+void CRunModeAgent::GetNanoTickPeriod()
+    {
+    LOG_ENTRY();
+    
+    TInt period = 0;
+    User::LeaveIfError(HAL::Get(HALData::ENanoTickPeriod, period));
+    iTickPeriodMs = period / 1000;
+    LOG_MSG("iTickPeriodMs = %d\n", iTickPeriodMs);
+    
+    LOG_EXIT();
+    }
+
+void CRunModeAgent::StartTest()
+    {
+    LOG_ENTRY();
+    
+    GetNanoTickPeriod();
+    
+    if (iParams.iTestType == PerformanceTestParams::EBenchMarkTest)
+        {
+        RunBenchMarkTest();
+        }
+    else 
+        {
+        TestDriverPerformance();
+        }
+    
+    CalculatePerformance();
+    
+    LOG_EXIT();
+    }
+
+// This function allows us to provide a benchmark when comparing the performance with the 
+// old and new APIs using the TestDriverPerformance function below. The two possible 
+// configurations are as follows: 
+// 1. Run t_rmdebug_app with a prefetch abort configuration and measure the time from the 
+// point of crash to the logon request completion.
+// 2. Load the debug-system and then run the above configuration.  
+void CRunModeAgent::RunBenchMarkTest()
+    {
+    LOG_ENTRY();
+    
+    test.Start(_L("RunBenchMarkTest"));
+    
+    RProcess process;
+    TRequestStatus status; 
+    
+    if (iParams.iDriver)
+         {
+         RDebug::Printf("RunBenchMarkTest() - DebugDriver().Connect()");
+         test(KErrNone == DebugDriver().Connect(securityServerVersion));
+         }
+ 
+    LOG_MSG("iParams.iNumOfTestRuns = %d", iParams.iNumOfTestRuns);
+    
+    for ( TUint i = 0; i < iParams.iNumOfTestRuns; i++ )
+        {
+        // Start test application
+        test( KErrNone == LaunchProcessL(process, KRMDebugTestApplication(), KTargetOptions()) );
+               
+        process.Logon(status);
+        User::WaitForRequest(status);
+
+        // Stop timer on logon request completion
+        iParams.iCountEnd = GetTimeInMs();
+        LOG_MSG("iParams.iCountEnd = %d", iParams.iCountEnd);
+        
+        LOG_MSG( "status.Int() = %d " , status.Int() );
+        
+        // prefetch abort should raise a KERN-EXEC 3
+        test(3 == status.Int());
+        
+        process.Close();
+        GetStartTime(); 
+       
+        // NTickCount shouldn't overflow, so no reason why this assertion should fail
+        test(iParams.iCountEnd > iParams.iCountStart);
+        iTimeDifs.Append( iParams.iCountEnd - iParams.iCountStart );
+       }
+    
+    LOG_EXIT();
+    }
+
+// This function can be used to compare the performance with the old (e.g. attachExe) and new 
+// (e.g. attachAll) APIs depending depending on the parameters passed in when running this test.  
+void CRunModeAgent::TestDriverPerformance()
+    {
+    LOG_ENTRY();    
+    test.Start(_L("TestDriverPerformance"));
+   
+    RProcess process;
+    
+    test(KErrNone == DebugDriver().Connect(securityServerVersion));
+    
+    LOG_MSG("iParams.iNumOfTestRuns = %d", iParams.iNumOfTestRuns);
+    for ( TUint i = 0; i < iParams.iNumOfTestRuns; i++ )
+        {
+        ilaunchCompleted = EFalse;
+     
+        Attach();
+        SetEventAction();
+        test(KErrNone == LaunchProcessL(process, KRMDebugTestApplication(), KTargetOptions));
+        
+        LOG_MSG("CRunModeAgent::TestDriverPerformance - process.Logon");
+        
+        while ( !ilaunchCompleted )
+            {
+            LOG_MSG("CRunModeAgent::TestDriverPerformance - DebugDriver().GetEvent");
+       
+            GetEvent();
+       
+            LOG_MSG("CRunModeAgent::TestDriverPerformance - User::WaitForRequest");
+
+            User::WaitForRequest(iStatus);
+            LOG_MSG( "iStatus.Int() = %d " , iStatus.Int() );
+            
+            LOG_MSG("CRunModeAgent::TestDriverPerformance - HandleEvent");
+            HandleEvent(iSEventInfo.iEventInfo);
+            }
+        
+        process.Logon(iStatus);
+        LOG_MSG("CRunModeAgent::TestDriverPerformance - process.Logon, User::WaitForRequest");
+        User::WaitForRequest(iStatus);
+        LOG_MSG( "iStatus.Int() = %d " , iStatus.Int() );
+        
+        // Stop timer on logon request completion as in benchmark performance test
+        iParams.iCountEnd = GetTimeInMs();
+                
+        // prefetch abort should raise a KERN-EXEC 3
+        test(3 == iStatus.Int());
+                    
+        Detach();
+        process.Close();       
+        GetStartTime();
+ 
+        // NTickCount shouldn't overflow, so no reason why this assertion should fail
+        test(iParams.iCountEnd > iParams.iCountStart);
+        iTimeDifs.Append( iParams.iCountEnd - iParams.iCountStart );
+       }
+        
+       LOG_EXIT();
+    }
+
+void CRunModeAgent::CalculatePerformance()
+    {
+    LOG_ENTRY();
+
+    TUint median;
+    TUint arrayCount = iTimeDifs.Count();
+
+    for (TInt i = 0; i < arrayCount; i++)
+         {
+         RDebug::Printf("iTimeDifs[%d] = %d ",i,iTimeDifs[i]);
+         }
+    
+    // Sort in ascending order
+    iTimeDifs.Sort();
+            
+    //If the number of elements is odd, the middle element in the sorted array is the median. 
+    //If the number of elements is even, the median is the average of the two midmost elements.
+    if ( arrayCount%2  != 0 )
+        {
+        median = iTimeDifs[arrayCount/2];
+        }
+    else
+        {
+        median = (iTimeDifs[arrayCount/2] + iTimeDifs[arrayCount/2 -1])/2;
+        }
+    
+    RDebug::Printf("Median time %d ms", median );
+    
+    LOG_EXIT();
+    }
+
+/**
+  Launch a process
+  @param aExeName the executable used to create the process
+  @param aCommandLine the commandline parameters passed to the new process file name of the executable used to create the process
+  @return KErrNone on success, or one of the other system wide error codes
+  */
+TInt CRunModeAgent::LaunchProcessL( RProcess& aProcess, const TDesC& aExeName, const TDesC& aCommandLine )
+    {
+    LOG_ENTRY(); 
+    
+    RBuf launcherOptions;
+    launcherOptions.CleanupClosePushL();
+    const TInt additionalWords = 1; 
+    launcherOptions.CreateL( aCommandLine.Length() + additionalWords );
+    launcherOptions.Format( aCommandLine, iParams.iTestTargetPriority);
+   
+    LOG_DES(_L("launcherOptions %S"), &launcherOptions);
+    
+    TInt err = aProcess.Create( aExeName, launcherOptions );   
+    CleanupStack::PopAndDestroy();
+    
+    // check that there was no error raised
+    if (err != KErrNone)
+        return err;
+    
+    // rendezvous with process
+    TRequestStatus status = KRequestPending;
+    aProcess.Rendezvous(status);
+
+    // start the test target
+    aProcess.Resume();
+    User::WaitForRequest(status);
+  
+    if(KErrNone != status.Int())
+        {
+        aProcess.Kill(KErrNone);
+        }
+     LOG_EXIT(); 
+     return status.Int();
+
+    }
+
+void CRunModeAgent::SetEventAction()
+    {
+    LOG_ENTRY();
+    
+    if (iParams.iTestType == PerformanceTestParams::EAttachExe)
+        {
+        test(KErrNone == DebugDriver().SetEventAction( KRMDebugTestApplication(), EEventsKillThread, EActionContinue));
+             
+        if ( iParams.iEvents )
+            {
+            test(KErrNone == DebugDriver().SetEventAction( KRMDebugTestApplication(), EEventsAddLibrary, EActionContinue));
+            test(KErrNone == DebugDriver().SetEventAction( KRMDebugTestApplication(), EEventsUserTrace, EActionContinue));
+            test(KErrNone == DebugDriver().SetEventAction( KRMDebugTestApplication(), EEventsStartThread, EActionContinue));
+            test(KErrNone == DebugDriver().SetEventAction( KRMDebugTestApplication(), EEventsAddProcess, EActionContinue));
+            test(KErrNone == DebugDriver().SetEventAction( KRMDebugTestApplication(), EEventsRemoveProcess, EActionContinue));
+            }
+        }
+    else
+        {
+        test(KErrNone == DebugDriver().SetEventAction( EEventsKillThread, EActionContinue));
+             
+        if ( iParams.iEvents )
+            {
+            test(KErrNone == DebugDriver().SetEventAction( EEventsAddLibrary, EActionContinue));
+            test(KErrNone == DebugDriver().SetEventAction( EEventsUserTrace, EActionContinue));
+            test(KErrNone == DebugDriver().SetEventAction( EEventsStartThread, EActionContinue));
+            test(KErrNone == DebugDriver().SetEventAction( EEventsAddProcess, EActionContinue));
+            test(KErrNone == DebugDriver().SetEventAction( EEventsRemoveProcess, EActionContinue));
+            }
+        }
+    
+    LOG_EXIT();
+    }
+
+void CRunModeAgent::Attach()
+    {
+    LOG_ENTRY();
+    
+    if( iParams.iTestType == PerformanceTestParams::EAttachExe ) 
+        {
+        // Attach to process non-passively
+        test(KErrNone == DebugDriver().AttachExecutable( KRMDebugTestApplication(), EFalse));
+        LOG_MSG("DebugDriver().AttachExecutable");
+        }
+    else 
+        {
+        // Attach to all the processes on the system
+        test(KErrNone == DebugDriver().AttachAll());
+        LOG_MSG("DebugDriver().AttachAll()");
+        }
+    
+    LOG_EXIT();
+    }
+
+void CRunModeAgent::GetEvent()
+    {
+    LOG_ENTRY();
+
+    if( iParams.iTestType == PerformanceTestParams::EAttachExe ) 
+        {
+        DebugDriver().GetEvent( KRMDebugTestApplication(), iStatus, iSEventInfo.iEventInfoBuf );
+        }
+    else
+        {
+        DebugDriver().GetEvent( iStatus, iSEventInfo.iEventInfoBuf );
+        }
+    
+    LOG_EXIT();
+    }
+
+void CRunModeAgent::Detach()
+    {
+    LOG_ENTRY();
+    
+    if( iParams.iTestType == PerformanceTestParams::EAttachExe )
+        {
+        test (KErrNone == DebugDriver().DetachExecutable(KRMDebugTestApplication()));
+        }
+    else
+        {
+        test(KErrNone == DebugDriver().DetachAll());
+        }
+    
+    LOG_EXIT();
+    }
+
+void CRunModeAgent::HandleEvent(TEventInfo& aEventInfo)
+    {
+    LOG_ENTRY(); 
+
+    switch ( aEventInfo.iEventType )
+        {
+        case EEventsAddProcess:
+            {
+            LOG_MSG(">>> EEventsAddProcess");                        
+            break;
+            }
+    
+        case EEventsStartThread:
+            {
+            LOG_MSG(">>> EEventsStartThread");                
+            break;                    
+            }                       
+
+        case EEventsUserTrace:
+            {
+            LOG_MSG(">>> EEventsUserTrace");  
+            break;
+            }
+
+        case EEventsRemoveProcess:
+            {
+            LOG_MSG(">>> EEventsRemoveProcess");                        
+            break;
+            }
+    
+        case EEventsKillThread:
+            {
+            LOG_MSG(">>> EEventsKillThread");   
+            ilaunchCompleted = ETrue;          
+            break;
+            }
+            
+        default:   
+            {
+            LOG_MSG( ">>> Unknown event ");
+            break;
+            }   
+        }
+     
+    LOG_EXIT(); 
+    }
+
+void CRunModeAgent::SetDefaultParamValues()
+    {
+    LOG_ENTRY();
+    
+    iParams.iNumOfTestRuns = KNumOfTestRuns;
+    iParams.iTestType = PerformanceTestParams::EBenchMarkTest;
+    iParams.iTestTargetPriority = 0;
+    iParams.iEvents = 0;
+    iParams.iDriver = 0;
+    
+    LOG_EXIT();
+    }
+
+TInt CRunModeAgent::ParseCommandLine()
+    {
+    LOG_ENTRY();
+    
+    TBool ifDisplayHelp = EDontDisplayHelp;
+    SetDefaultParamValues();
+    
+    TInt argc = User::CommandLineLength();
+    LOG_MSG( "Launcher Process() argc=%d", argc );
+
+    if( argc )
+        {
+        HBufC* commandLine = NULL;
+        commandLine = HBufC::NewLC(argc);
+        TPtr commandLineBuffer = commandLine->Des();
+        User::CommandLine(commandLineBuffer);
+       
+        LOG_DES(_L("CommandLine = %S"), &commandLineBuffer);
+        
+        // create a lexer and read through the command line
+        TLex lex(*commandLine);
+        while (!lex.Eos())
+             {
+             // only look for options with first character '-', other switches are for the targets
+             if (lex.Get() == '-')
+                 {
+                 TChar arg = lex.Get();
+                 switch (arg)
+                     {
+                     case 'n':
+                         lex.Val( iParams.iNumOfTestRuns );
+                         LOG_MSG("Number of test runs %d", iParams.iNumOfTestRuns);
+                         break;
+                      case 't':
+                          lex.Val( iParams.iTestType );
+                          LOG_MSG("parsed testType as %d", iParams.iTestType );
+                          break;
+                      case 'p':
+                          lex.Val( iParams.iTestTargetPriority );
+                          LOG_MSG("parsed test target priority as %d", iParams.iTestTargetPriority );
+                          break;
+                      case 'e':
+                          lex.Val( iParams.iEvents );
+                          LOG_MSG("parsed events as %d", iParams.iEvents );
+                          break;
+                      case 'd':
+                          lex.Val( iParams.iDriver );
+                          LOG_MSG("parsed iDriver as %d", iParams.iDriver );
+                          break;
+                       case 'h':
+                          LOG_MSG( "Display help" );
+                          ifDisplayHelp = EDisplayHelp;
+                       default:
+                           LOG_MSG( "Default usage" );
+                           break;             
+                       }
+                  }
+              }
+            CleanupStack::PopAndDestroy(commandLine);
+        }
+    
+    LOG_EXIT();
+    return ifDisplayHelp;   
+    }
+
+void CRunModeAgent::DisplayUsage()
+    {
+    LOG_ENTRY();
+    test.Printf(_L("\nUsage: t_rmdebug_performance_test [options] \nOptions:\n"));
+    
+    test.Printf(_L("\t-t  \t\ttest type\n"));
+    test.Printf(_L("\t\t\t  0 - AttachAll\n"));
+    test.Printf(_L("\t\t\t  1 - AttachExe\n"));
+    test.Printf(_L("\t\t\t  2 - None\n"));
+           
+    test.Printf(_L("\t-n \t\tnumber of iterations\n"));
+    test.Printf(_L("\t-e \t\ttest with events\n"));
+    test.Printf(_L("\t\t\t  0 - No\n"));
+    test.Printf(_L("\t\t\t  1 - Yes\n"));
+    test.Printf(_L("\t-p \t\tpriority of test target thread\n"));
+    
+    test.Printf(_L("\t\t\t  %d - EPriorityAbsoluteVeryLow \n"), EPriorityAbsoluteVeryLow);
+    test.Printf(_L("\t\t\t  %d - EPriorityAbsoluteLowNormal \n"), EPriorityAbsoluteLowNormal);
+    test.Printf(_L("\t\t\t  %d - EPriorityAbsoluteLow \n"), EPriorityAbsoluteLow);
+    test.Printf(_L("\t\t\t  %d - EPriorityAbsoluteBackgroundNormal \n"), EPriorityAbsoluteBackgroundNormal);
+    test.Printf(_L("\t\t\t  %d - EPriorityAbsoluteBackground \n"), EPriorityAbsoluteBackground);
+    test.Printf(_L("\t\t\t  %d - EPriorityAbsoluteForegroundNormal \n"), EPriorityAbsoluteForegroundNormal);
+    test.Printf(_L("\t\t\t  %d - EPriorityAbsoluteForeground \n"), EPriorityAbsoluteForeground);
+    test.Printf(_L("\t\t\t  %d - EPriorityAbsoluteHighNormal \n"), EPriorityAbsoluteHighNormal);
+    test.Printf(_L("\t\t\t  %d - EPriorityAbsoluteHigh \n"), EPriorityAbsoluteHigh);
+    test.Printf(_L("\t\t\t  %d - EPriorityAbsoluteRealTime1 \n"), EPriorityAbsoluteRealTime1);
+    test.Printf(_L("\t\t\t  %d - EPriorityAbsoluteRealTime2 \n"), EPriorityAbsoluteRealTime2);
+    test.Printf(_L("\t\t\t  %d - EPriorityAbsoluteRealTime3 \n"), EPriorityAbsoluteRealTime3);
+    test.Printf(_L("\t\t\t  %d - EPriorityAbsoluteRealTime4 \n"), EPriorityAbsoluteRealTime4);
+    test.Printf(_L("\t\t\t  %d - EPriorityAbsoluteRealTime5 \n"), EPriorityAbsoluteRealTime5);
+    test.Printf(_L("\t\t\t  %d - EPriorityAbsoluteRealTime6 \n"), EPriorityAbsoluteRealTime6);
+    test.Printf(_L("\t\t\t  %d - EPriorityAbsoluteRealTime7 \n"), EPriorityAbsoluteRealTime7);
+    test.Printf(_L("\t\t\t  %d - EPriorityAbsoluteRealTime8 \n"), EPriorityAbsoluteRealTime8);
+    
+    test.Printf(_L("\t-d  \t\tload driver\n"));
+    test.Printf(_L("\t\t\t  0 - No\n"));
+    test.Printf(_L("\t\t\t  1 - Yes\n"));
+        
+    test.Printf(_L("\t-h \t\tdisplay usage information\n\n"));
+    
+    test.Printf(_L("Press any key...\n"));
+    test.Getch();
+    
+    LOG_EXIT();
+    }
+
+GLDEF_C TInt E32Main()
+    {
+    __UHEAP_MARK;
+
+    TInt ret = KErrNone;        
+    CTrapCleanup* trap = CTrapCleanup::New();
+        
+    if (!trap)
+        return KErrNoMemory;
+    
+    test.Start(KTestName);
+       
+    CRunModeAgent *runModeAgent = CRunModeAgent::NewL();
+
+    if (runModeAgent != NULL)
+        {
+        TRAP(ret,runModeAgent->ClientAppL());
+        LOG_MSG( "ClientAppL() returned %d", ret );
+        delete runModeAgent;
+        }
+    
+    test.End();
+    test.Close();
+
+    delete trap;
+    __UHEAP_MARKEND;
+    return ret;
+    }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debugsrv/runmodedebug/tsrc/rm_debug/performance_test/t_rmdebug_performance_test.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,142 @@
+// Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+// Tests performance of run mode debug device component   
+// 
+//
+
+#ifndef RMDEBUG_PERFORMANCE_H
+#define RMDEBUG_PERFORMANCE_H
+
+#include <u32hal.h>
+#include <f32file.h>
+#include <rm_debug_api.h>
+
+/* Config for t_rmdebug_app.exe: 
+ * -f1: prefetch abort,
+ * -d0: zero delay before crash
+ * -p: priority of test target main thread
+ */    
+_LIT(KTargetOptions,"-f1 -d0 -p%d");
+
+// Default number of test runs
+const TInt KNumOfTestRuns = 7;
+
+/**
+ @Class TAgentEventInfo
+ 
+ Class for gathering event data from the run-mode driver
+ */
+class TAgentEventInfo
+{
+public:
+    TAgentEventInfo() : iEventInfoBuf(iEventInfo) {}
+   
+public:
+    // This is the underlying class for event interaction with the Run Mode debug API 
+    Debug::TEventInfo          iEventInfo;
+    
+    TPckg<Debug::TEventInfo>  iEventInfoBuf; 
+};
+
+/**
+  @Class CRunModeAgent
+  
+  The basic run mode agent
+  */
+class CRunModeAgent : public CBase
+	{
+public:
+    
+    enum displayHelp {EDontDisplayHelp =0, EDisplayHelp };
+    
+	static CRunModeAgent* NewL();
+	~CRunModeAgent();
+	void ClientAppL();  
+	Debug::RSecuritySvrSession&  DebugDriver() { return iServSession; };	
+
+private:
+	void ConstructL();
+	void StartTest();
+	void TestDriverPerformance();
+	void RunBenchMarkTest();
+	TInt ParseCommandLine();
+	
+	void Attach();
+	void Detach();
+	    
+	void HandleEvent(Debug::TEventInfo& aEventInfo);
+	TInt LaunchProcessL(RProcess& aProcess, const TDesC& aExeName, const TDesC& aCommandLine);
+	void DisplayUsage();
+	void GetNanoTickPeriod();
+	void SetEventAction();
+	void SetDefaultParamValues();
+	
+	void CalculatePerformance();
+	void GetEvent();
+	void GetStartTime();
+	TInt GetTimeInMs();
+	
+private:
+	
+	/** 
+	  Used for test cases interacting with the RMDBG only
+	 */
+	TRequestStatus iStatus;   
+	
+	/**
+	  The nanokernel tick period in MS
+	*/
+	TInt iTickPeriodMs;
+
+	/*
+	 * Handle to DSS
+	 */
+	Debug::RSecuritySvrSession iServSession;
+	
+	/**
+	 Array to store tick counts between an iteration of a test run
+	*/
+	RArray<TUint> iTimeDifs;
+	
+	/**
+	 Object to gather event data from RMDBG
+	*/
+	TAgentEventInfo iSEventInfo;
+		
+	/**
+	  Flag to indicate test target has crashed
+	*/
+	TBool ilaunchCompleted;
+	
+	/*
+	 * RProperty to get counter value from test app
+	 */
+	RProperty iIntegerProperty;
+		
+	struct PerformanceTestParams
+	    {
+	    enum TestOptions {EAttachAll=0,EAttachExe, EBenchMarkTest };
+	    TUint iTestType;
+	    TUint iNumOfTestRuns;
+	    TUint iTestTargetPriority;
+	    TUint iEvents;
+	    TInt iCountEnd;
+	    TInt iCountStart;
+	    TUint iDriver;
+	    } iParams;
+	    
+	};
+
+#endif // RMDEBUG_PERFORMANCE_H
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debugsrv/runmodedebug/tsrc/rm_debug/scripts/tef_execute_rtests.script	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,59 @@
+// Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description: Script file for running Run-Mode Debug Tests (RTests) as TEF3 tests.
+// 		Please note, for a description of the tests please goto the RTests themselves.
+//		This file is a temporary measure, until the RTest component itself is updated.
+//		The problem is RTest does not produce logs when run on Sirocco, 
+//		so this wrapper allows us to do that.
+//
+//! @File
+//! @SYMTestSuiteName           tef_execute_rtests.script
+//! @SYMScriptTestEnvironment   RTEST as TEF3
+
+PRINT *** Running RTests as TEF3 tests ***
+
+START_TESTCASE                  KBASE-t_rmdebug2
+RUN_PROGRAM 120 t_rmdebug2
+END_TESTCASE                    KBASE-t_rmdebug2
+
+
+START_TESTCASE                  KBASE-t_rmdebug2_oem
+RUN_PROGRAM 120 t_rmdebug2_oem
+END_TESTCASE                    KBASE-t_rmdebug2_oem
+
+
+START_TESTCASE                  KBASE-t_rmdebug2_oem2
+RUN_PROGRAM 120 t_rmdebug2_oem2
+END_TESTCASE                    KBASE-t_rmdebug2_oem2
+
+
+START_TESTCASE                  KBASE-t_rmdebug2_allcaps
+RUN_PROGRAM 120 t_rmdebug2_allcaps
+END_TESTCASE                    KBASE-t_rmdebug2_allcaps
+
+
+START_TESTCASE                  KBASE-t_performance_test
+RUN_PROGRAM 120 t_performance_test
+END_TESTCASE                    KBASE-t_performance_test
+
+
+START_TESTCASE                  KBASE-t_rmdebug_multi_target
+RUN_PROGRAM 120 t_rmdebug_multi_target
+END_TESTCASE                    KBASE-t_rmdebug_multi_target
+
+
+START_TESTCASE                  KBASE-t_multi_agent_launcher
+RUN_PROGRAM 120 t_multi_agent_launcher
+END_TESTCASE                    KBASE-t_multi_agent_launcher
+
+PRINT *** Completed RTests as TEF3 tests ***
--- a/layers.sysdef.xml	Wed Sep 29 17:45:35 2010 +0300
+++ b/layers.sysdef.xml	Fri Oct 08 14:56:39 2010 +0300
@@ -8,8 +8,11 @@
     <layer name="os_layer">
       <module name="osrndtools">
         <component name="tracecompiler">
-          <unit unitID="tools.tracecompiler" mrp="" bldFile="&layer_real_source_path;/tracefw/tracecompiler/group" name="tracecompiler" />
+          <unit unitID="tools.tracecompiler" mrp="" bldFile="&layer_real_source_path;/tracesrv/tracecompiler/group" name="tracecompiler" />
         </component>
+        <component name="tracecore">
+        	<unit unitID="tools.tracecore" mrp="" bldFile="&layer_real_source_path;/tracesrv/tracecore/group" name="tracecore" />
+      	</component>
         <component name="runmodedebug">
           <unit unitID="tools.runmodedebug" mrp="" bldFile="&layer_real_source_path;/debugsrv/runmodedebug/group" name="runmodedebug" />
         </component>       
--- a/package_definition.xml	Wed Sep 29 17:45:35 2010 +0300
+++ b/package_definition.xml	Fri Oct 08 14:56:39 2010 +0300
@@ -17,9 +17,12 @@
         <unit bldFile="perfsrv/piprofiler/group"/>
       </component>
     </collection>
-    <collection id="tracefw" name="Trace Framework" level="trace">
-      <component id="tracecompiler" filter="s60" name="TraceCompiler" purpose="development">
-        <unit bldFile="tracefw/tracecompiler/group"/>
+    <collection id="tracesrv" name="Trace Services" level="trace">
+      <component id="tracecompiler" filter="s60" name="Trace Compiler" purpose="development">
+        <unit bldFile="tracesrv/tracecompiler/group"/>
+      </component>
+      <component id="tracecore" filter="s60" name="Trace Core" purpose="development">
+        <unit bldFile="tracesrv/tracecore/group"/>
       </component>
     </collection>
   </package>
--- a/tracefw/tracecompiler/group/bld.inf	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-* TraceCompiler
-*/
-
-PRJ_PLATFORMS
-TOOLS2
-
-PRJ_EXPORTS
-../tracecompiler/tracecompiler.pl 			+/tools/ //
-../tracecompiler/tracecompiler.pm 			+/tools/ //
-../tracecompiler/tracecompiler_parse_mmp.pl 		+/tools/ //
-../tracecompiler/tracecompiler_mmp_data.pm		+/tools/ //
-	
-
-:zip ../tracecompiler/tracecompiler.zip +/tools/tracecompiler overwrite//
-
--- a/tracefw/tracecompiler/group/build.xml	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,119 +0,0 @@
-<!--
-#
-# Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "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:
-#
-# Description: 
-#
--->
-<project name="OstTraceCompiler" default="build" basedir="..">
-
-<condition property="isLinux">
-    <os name="linux"/>
-</condition>
-
-<condition property="isWindows">
-	<not>
-		<os name="linux"/>
-	</not>
-</condition>
-	
-<condition property="isRel">
-	<matches string="${epoc.rel}" pattern="^.*rel$"/>
-</condition>
-	
-<condition property="isDeb">
-	<matches string="${epoc.rel}" pattern="^.*deb$"/>
-</condition>
-
-	
-<target name="init" >
-	<property environment="env" />
-	<property name="epoc.root" value="${env.EPOCROOT}/" />
-	<property name="src.dir" value="src" />
-	<property name="jar.dir" value="jar" />
-	<property name="dest.dir" value="${tools.rel}/tracecompiler" />
-	<property name="build.dir" value="${epoc.root}epoc32/build/ost/tracecompiler" />
-</target>
-
-
-<target name="clean" depends="init" if="isRel">
-	<echo>Cleaning the ${build.dir}</echo>
-	<delete dir="${build.dir}"/>
-	<echo>Creating the build directory</echo>
-	<mkdir dir="${build.dir}"/>
-	
-	<echo>Deleting *.xml_ files</echo>
-	<delete>
-		<fileset dir="${epoc.root}epoc32/build" includes="**/*.xml_"/>
-	</delete>
-    <delete dir="${dest.dir}"/>
-    <delete file="tracecompiler/tracecompiler.zip"/>
-</target>
-
-	
-<target name="what" depends="init" description="Prints out all releasables">
-	<pathconvert pathsep="${line.separator}" property="output">
-		<fileset dir="${dest.dir}" casesensitive="no"/>
-	</pathconvert>
-	<echo message="${output}" />
-</target>
-
-
-<target name="build" if="isRel" depends="clean">	
-	<javac srcdir="${src.dir}" destdir="${build.dir}" debug="true" target="1.5"></javac>
-
-	<echo> Copying html and properties files from src/com.nokia.tracecompiler/src to ${build.dir} </echo>
-	<copy todir="${build.dir}">
-		<fileset dir="src/com.nokia.tracecompiler/src" includes="**/*.properties"/>
-		<fileset dir="src/com.nokia.tracecompiler/src" includes="**/*.html"/>
-        <fileset dir="src/com.nokia.tracecompiler/src" includes="**/*.lic"/>
-	</copy>
-
-	<antcall target="change_windows_file_attributes"></antcall>
-
-	<antcall target="change_linux_file_attributes"></antcall>
-
-	<echo>Zip TraceCompiler binaries</echo>
-	<zip destfile="tracecompiler/tracecompiler.zip" update="true">
-		<zipfileset dir="${build.dir}"/> 
-	</zip>
-	
-	<echo>Unzip recompiled TraceCompiler binaries intop epoc32/tools/tracecompiler</echo>
-	<unzip src="tracecompiler/tracecompiler.zip" dest="${dest.dir}" overwrite="true"/>
-
-	<mkdir dir="${jar.dir}"/>
-       	<jar destfile="${jar.dir}/tracecompiler.jar" basedir="${build.dir}">
-       		<fileset dir="src/com.nokia.tracecompiler/src" includes="**/*.properties"/>
-       		<manifest>
-       			<attribute name="Main-Class" value="com.nokia.tracecompiler.TraceCompilerMain"/>
-       		</manifest>
-        </jar>
-</target>
-
-<target name="change_windows_file_attributes" if="isWindows">
-	<echo message="Change tracecompiler.zip file attributes in Windows"/>
-	<exec executable="attrib">
-		<arg value="-r"/>
-		<arg value="tracecompiler/tracecompiler.zip"/>
-	</exec>
-</target>
-
-<target name="change_linux_file_attributes" if="isLinux">
-	<echo message="Change tracecompiler.zip file attributes in Linux"/>
-	<exec executable="chmod">
-		<arg value="777"/>
-		<arg value="tracecompiler/tracecompiler.zip"/>
-	</exec>
-</target>
-
-</project>
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/.classpath	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
-	<classpathentry kind="src" path="src"/>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
-	<classpathentry kind="output" path="bin"/>	
-</classpath>
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/.project	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-	<name>com.nokia.tracecompiler</name>
-	<comment></comment>
-	<projects>
-	</projects>
-	<buildSpec>
-		<buildCommand>
-			<name>org.eclipse.jdt.core.javabuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-		<buildCommand>
-			<name>org.eclipse.pde.ManifestBuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-		<buildCommand>
-			<name>org.eclipse.pde.SchemaBuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-	</buildSpec>
-	<natures>
-		<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
-		<nature>org.eclipse.pde.PluginNature</nature>
-		<nature>org.eclipse.jdt.core.javanature</nature>
-		<nature>org.eclipse.jem.beaninfo.BeanInfoNature</nature>
-	</natures>
-</projectDescription>
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/.settings/org.eclipse.core.resources.prefs	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,8 +0,0 @@
-#Fri Sep 04 14:04:36 BST 2009
-eclipse.preferences.version=1
-encoding//src/com/nokia/tracecompiler/autogen/messages.properties=8859_1
-encoding//src/com/nokia/tracecompiler/dictionary/messages.properties=8859_1
-encoding//src/com/nokia/tracecompiler/engine/header/messages.properties=8859_1
-encoding//src/com/nokia/tracecompiler/engine/messages.properties=8859_1
-encoding//src/com/nokia/tracecompiler/engine/project/messages.properties=8859_1
-encoding//src/com/nokia/tracecompiler/engine/rules/messages.properties=8859_1
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/.settings/org.eclipse.jdt.core.prefs	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-#Tue Apr 14 13:07:47 EEST 2009
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.source=1.5
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/.settings/org.eclipse.jdt.ui.prefs	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-#Tue Apr 14 13:07:47 EEST 2009
-eclipse.preferences.version=1
-internal.default.compliance=default
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/about.html	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,20 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<title>About</title>
-<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
-</head>
-<body>
-
-<h2>About This Content</h2>
- 
-<p>February 4, 2009</p>	
-
-<h3>Copyright</h3>
-<p>Copyright &copy; 2007-2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.<br>
-This component and the accompanying materials are made available under the <br/>
-terms of the License "Symbian Foundation License v1.0" which accompanies this <br/>
-distribution, and is available at the URL: <a href="http://www.symbianfoundation.org/legal/sfl-v10.html">http://www.symbianfoundation.org/legal/sfl-v10.html</a>.<p>
-
-</body>
-</html>
\ No newline at end of file
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/build.properties	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,2 +0,0 @@
-source.. = src/
-output.. = bin/
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/Messages.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-/*
- * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of "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:
- *
- * Description:
- *
- ** Localization for tracecompiler package
- *
- */
-package com.nokia.tracecompiler;
-
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-@SuppressWarnings("all")
-public final class Messages {
-
-	/**
-	 * Bundle name
-	 */
-	private static final String BUNDLE_NAME = "com.nokia.tracecompiler.messages"; //$NON-NLS-1$
-
-	/**
-	 * Bundle
-	 */
-	private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
-			.getBundle(BUNDLE_NAME);
-
-	/**
-	 * Prevents construction
-	 */
-	private Messages() {
-	}
-
-	/**
-	 * Gets localized string based on key
-	 * 
-	 * @param key
-	 *            the resource key
-	 * @return the localized resource
-	 */
-	public static String getString(String key) {
-		try {
-			return RESOURCE_BUNDLE.getString(key);
-		} catch (MissingResourceException e) {
-			return '!' + key + '!';
-		}
-	}
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/TraceCompiler.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,758 +0,0 @@
-/*
- * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of "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:
- *
- * Description:
- *
- * TraceCompiler command-line main class
- *
- */
-package com.nokia.tracecompiler;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import com.nokia.tracecompiler.document.FileDocumentMonitor;
-import com.nokia.tracecompiler.document.StringDocumentFactory;
-import com.nokia.tracecompiler.engine.TraceCompilerEngineEvents;
-import com.nokia.tracecompiler.engine.TraceCompilerEngineGlobals;
-import com.nokia.tracecompiler.engine.TraceCompilerEngineInterface;
-import com.nokia.tracecompiler.engine.TraceLocationList;
-import com.nokia.tracecompiler.engine.project.ProjectEngine;
-import com.nokia.tracecompiler.engine.utils.TraceUtils;
-import com.nokia.tracecompiler.model.TraceCompilerException;
-import com.nokia.tracecompiler.model.TraceModel;
-import com.nokia.tracecompiler.plugin.TraceCompilerPlugin;
-import com.nokia.tracecompiler.project.GroupNames;
-import com.nokia.tracecompiler.source.SourceConstants;
-import com.nokia.tracecompiler.source.SymbianConstants;
-import com.nokia.tracecompiler.utils.DocumentFactory;
-import com.nokia.tracecompiler.utils.TraceCompilerVersion;
-
-/**
- * TraceCompiler command-line main class
- * 
- */
-public class TraceCompiler {
-	
-	private static String LINE_SEPARATOR =  System.getProperty("line.separator"); //$NON-NLS-1$
-
-	/**
-	 * Index of third character
-	 */
-	private static final int INDEX_OF_THIRD_CHARACTER = 2;
-
-	/**
-	 * Index of first character
-	 */
-	private static final int INDEX_OF_FIRST_CHARACTER = 0;
-
-	/**
-	 * Version option
-	 */
-	private static final String VERSION_OPTION = "--version"; //$NON-NLS-1$
-	private static final String LEGACY_VERSION_OPTION = "-version"; //$NON-NLS-1$
-	private static final String VERSION_OPTION_SF = "-v"; //$NON-NLS-1$
-	/**
-	 * Version option instruction text
-	 */
-	private static final String VERSION_OPTION_INSTRUCTION_TEXT = "print TraceCompiler version"; //$NON-NLS-1$
-
-	
-	/**
-	 * help option
-	 */
-	private static final String HELP_OPTION = "--help"; //$NON-NLS-1$
-	private static final String HELP_OPTION_SF = "-h"; //$NON-NLS-1$
-	private static final String HELP_OPTION_INSTRUCTION_TEXT = "print help"; //$NON-NLS-1$
-	
-	/**
-	 * Verbose option
-	 */
-	private static final String VERBOSE_OPTION = "--verbose"; //$NON-NLS-1$
-	private static final String VERBOSE_OPTION_SF = "-vb"; //$NON-NLS-1$
-	/**
-	 * Verbose option instruction text
-	 */
-	private static final String VERBOSE_OPTION_INSTRUCTION_TEXT = "print info messages."; //$NON-NLS-1$
-
-	/**
-	 * keep going option
-	 */
-	private static final String STOP_ON_ERROR_OPTION = "--stopOnError"; //$NON-NLS-1$
-	private static final String STOP_ON_ERROR_OPTION_SF = "-soe"; //$NON-NLS-1$
-	/**
-	 * keep going option instruction text
-	 */
-	private static final String STOP_ON_ERROR_OPTION_INSTRUCTION_TEXT = "On error, stop at the end of the compilation unit."; //$NON-NLS-1$
-
-	
-
-	/**
-	 * Version text
-	 */
-	private static final String VERSION_TEXT = "TraceCompiler version "; //$NON-NLS-1$
-
-	/**
-	 * Option instruction text
-	 */
-	private static final String OPTION_INSTRUCTION_TEXT = "Options:"; //$NON-NLS-1$
-
-	
-	private static final String USAGE = "Usage: " + LINE_SEPARATOR + //$NON-NLS-1$
-										"tracecompiler [options] Component_UID [Component_name MMP_path source_file...]" + LINE_SEPARATOR + //$NON-NLS-1$
-										"\t" + OPTION_INSTRUCTION_TEXT + LINE_SEPARATOR + //$NON-NLS-1$
-										"\t" + HELP_OPTION_SF  + ", " + HELP_OPTION + ", " + HELP_OPTION_INSTRUCTION_TEXT + LINE_SEPARATOR +   //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
-										"\t" + VERSION_OPTION_SF + ", " + VERSION_OPTION + ", " + LEGACY_VERSION_OPTION + "\t" +  VERSION_OPTION_INSTRUCTION_TEXT + LINE_SEPARATOR +   //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$ //$NON-NLS-4$
-										"\t" + VERBOSE_OPTION_SF + ", " + VERBOSE_OPTION + "\t\t" + VERBOSE_OPTION_INSTRUCTION_TEXT + LINE_SEPARATOR +  //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
-										"\t" + STOP_ON_ERROR_OPTION_SF + ", " + STOP_ON_ERROR_OPTION + "\t" + STOP_ON_ERROR_OPTION_INSTRUCTION_TEXT + LINE_SEPARATOR;  //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
-
-
-
-	/**
-	 * End of source files tag
-	 */
-	private static final String ENDOFSOURCEFILES = "*ENDOFSOURCEFILES*"; //$NON-NLS-1$
-	
-
-	/**
-	 * Offset to UID
-	 */
-	private static final int COMPONENT_UID_ARG = 0;
-
-	/**
-	 * Offset to component name
-	 */
-	private static final int COMPONENT_NAME_ARG = 1;
-
-	/**
-	 * Offset to MMP path
-	 */
-	private static final int COMPONENT_MMP_PATH_ARG = 2; // CodForChk_Dis_Magic
-
-	/**
-	 * Offset to source files
-	 */
-	private static final int SOURCE_FILE_START_OFFSET = 3; // CodForChk_Dis_Magic
-
-	/**
-	 * Number of arguments
-	 */
-	private static final int MANDATORY_ARGUMENT_COUNT = 1;
-
-	/**
-	 * MMP file extension
-	 */
-	private static final String MMP = ".mmp"; //$NON-NLS-1$
-
-	/**
-	 * Underscore character
-	 */
-	private static final String UNDERSCORE = "_"; //$NON-NLS-1$
-
-	/**
-	 * Name of the trace folder that include component name
-	 */
-	private String traceFolderName;
-
-	/**
-	 * Decode plugins path
-	 */
-	private String DECODE_PLUGINS_PATH = "com/nokia/tracecompiler/decodeplugins"; //$NON-NLS-1$
-
-	/**
-	 * Decode plugin name tag
-	 */
-	private String DECODE_PLUGIN_NAME_TAG = "<DECODE_PLUGIN_NAME>"; //$NON-NLS-1$
-
-	/**
-	 * Decode plugin class name tag
-	 */
-	private String DECODE_PLUGIN_CLASS_NAME_TAG = "<DECODE_PLUGIN_CLASS_NAME>"; //$NON-NLS-1$
-
-	/**
-	 * Decode plugin engine class name template
-	 */
-	private String ENGINE_CLASS_NAME_TEMPLATE = DECODE_PLUGIN_NAME_TAG
-			+ "Engine"; //$NON-NLS-1$
-
-	/**
-	 * Decode plugin engine file name template
-	 */
-	private String ENGINE_FILE_NAME_TEMPLATE = DECODE_PLUGIN_CLASS_NAME_TAG
-			+ ".class"; //$NON-NLS-1$
-
-	/**
-	 * Decode plugins class template
-	 */
-	private String CLASS_TEMPLATE = "com.nokia.tracecompiler.decodeplugins." + DECODE_PLUGIN_NAME_TAG + "." + DECODE_PLUGIN_CLASS_NAME_TAG; //$NON-NLS-1$ //$NON-NLS-2$	
-
-	/**
-	 * Main function
-	 * 
-	 * @param args
-	 *            the command line arguments
-	 */
-	public static void main(String[] args) {
-		ArrayList<String> list = new ArrayList<String>(Arrays.asList(args));
-		long startTime = System.currentTimeMillis();
-		//create a new session of TraceCompiler
-		TraceCompiler console = new TraceCompiler();
-		
-		try {
-			console.parseCommandLine(list);
-		} catch (Exception e) { //should cover IOException and TraceCompilerIllegalArgumentsException
-			//There is no point to continue if there are problems with the arguments.
-			TraceCompilerLogger.printError(e.getMessage());
-			printUsage();
-			System.exit(1);
-		}
-		
-		boolean error = false;
-		try {
-			if(list.size() != 0) {
-				console.createPlugins();
-				console.start();
-				console.buildTraceFiles();
-				
-			}
-		} catch (Exception e) {
-			if (e instanceof TraceCompilerRootException) {
-				TraceCompilerLogger.printError(e.getMessage()); 
-			} //else the error should have been reported earlier
-			error = true;
-		} finally {
-			try {
-				if (!error) { //check if errors have been logged by EventEngine
-					TraceCompilerEngineEvents events = TraceCompilerEngineGlobals.getEvents();
-					if (events != null && events.hasErrorHappened()) {
-						error = true;
-					}
-				}
-				console.shutdown();
-			} catch (TraceCompilerException e) {
-				error = true;
-			}
-		}
-
-		if (console.componentName != null) {
-			TraceCompilerLogger.printMessage(console.componentName + " took " //$NON-NLS-1$
-					+ (System.currentTimeMillis() - startTime) + " ms"); //$NON-NLS-1$
-		}
-		if (error) {
-			System.exit(1);
-		} else {
-			System.exit(0);
-		}	
-	}
-
-	/**
-	 * With Eclipse, the plug-ins are loaded by Eclipse framework. Here they
-	 * must be manually created and started
-	 */
-	private ArrayList<TraceCompilerPlugin> plugIns = new ArrayList<TraceCompilerPlugin>();
-
-	/**
-	 * Model listener
-	 */
-	private TraceCompilerModelListener modelListener;
-
-	/**
-	 * Name of the component
-	 */
-	private String componentName;
-
-	/**
-	 * UID of the component
-	 */
-	private long componentUID;
-
-	/**
-	 * Component path
-	 */
-	private String componentPath;
-
-	/**
-	 * MMP file path
-	 */
-	private File mmpPath;
-
-	/**
-	 * Constructor
-	 */
-	TraceCompiler() {
-
-		// Creates listeners and preferences
-		modelListener = new TraceCompilerModelListener();
-	}
-
-	/**
-	 * Creates the plug-ins to be registered with TraceCompiler
-	 * @throws TraceCompilerRootException if fail to create a valid plugins
-	 */
-	private void createPlugins() throws TraceCompilerRootException {
-		
-		// Get location of the TraceCompiler
-		URL path = getClass().getProtectionDomain().getCodeSource()
-				.getLocation();
-		String decodePluginsPath = path.getPath();
-
-		// If first character is forward slash and it is located before drive
-		// letter remove it
-		if (decodePluginsPath.charAt(INDEX_OF_FIRST_CHARACTER) == SourceConstants.FORWARD_SLASH_CHAR
-				&& decodePluginsPath.charAt(INDEX_OF_THIRD_CHARACTER) == SourceConstants.COLON_CHAR) {
-			decodePluginsPath = decodePluginsPath.substring(1);
-		}
-		
-		// Concatenate decode plugins path
-		decodePluginsPath = decodePluginsPath.concat(DECODE_PLUGINS_PATH);
-		
-		// Replace slashes with correct separator character
-		decodePluginsPath = decodePluginsPath.replace(
-				SourceConstants.FORWARD_SLASH_CHAR, File.separatorChar);
-		decodePluginsPath = decodePluginsPath.replace(
-				SourceConstants.BACKSLASH_CHAR, File.separatorChar);
-		File decodePluginsDir = new File(decodePluginsPath);
-		String[] decodePlugins = decodePluginsDir.list();
-		if (decodePlugins != null) {
-			for (int i = 0; i < decodePlugins.length; i++) {
-
-				// Get decode plugin name
-				String decodePluginName = decodePlugins[i];
-
-				// Get decode plugin path
-				String decodePluginPath = decodePluginsPath
-						+ File.separatorChar + decodePluginName;
-
-				// Decode plugin must be in own directory
-				Boolean isDirectory = (new File(decodePluginPath))
-						.isDirectory();
-				if (isDirectory) {
-
-					// Construct decode plugin engine class name
-					String engineClassName = ENGINE_CLASS_NAME_TEMPLATE
-							.replaceFirst(DECODE_PLUGIN_NAME_TAG,
-									decodePluginName.substring(0, 1)
-											.toUpperCase()
-											+ decodePluginName.substring(1));
-
-					// Construct decode plugin engine file name
-					String engineFileName = ENGINE_FILE_NAME_TEMPLATE
-							.replaceFirst(DECODE_PLUGIN_CLASS_NAME_TAG,
-									engineClassName);
-					String engineFileFullName = decodePluginPath
-							+ File.separatorChar + engineFileName;
-
-					// Check does engine file exist
-					Boolean exists = (new File(engineFileFullName)).exists();
-					if (exists) {
-						String engineClassFullName = CLASS_TEMPLATE
-								.replaceFirst(DECODE_PLUGIN_NAME_TAG,
-										decodePluginName).replaceFirst(
-										DECODE_PLUGIN_CLASS_NAME_TAG,
-										engineClassName);
-						try {
-							Class<?> engineClass = Class
-									.forName(engineClassFullName);
-							TraceCompilerPlugin engine = (TraceCompilerPlugin) engineClass
-									.newInstance();
-							plugIns.add(engine);
-							TraceCompilerLogger.printInfo("Decode plugin " + engineClassFullName + " added"); //$NON-NLS-1$ //$NON-NLS-2$
-						} catch (Exception e) {
-							String msg = "Decode plugin " + engineClassFullName + " adding failed"; //$NON-NLS-1$ //$NON-NLS-2$
-							throw new TraceCompilerRootException(msg, e); 
-						}
-					} else {
-						String msg = "Decode plugin file " + engineFileFullName + " does not exist"; //$NON-NLS-1$ //$NON-NLS-2$
-						throw new TraceCompilerRootException(msg, null);
-					}
-				}
-			}
-		}
-	}
-
-	/**
-	 * Parses the command line
-	 * 
-	 * @param args
-	 *            the arguments
-	 * @throws TraceCompilerRootException if arguments are invalid
-	 * @throws IOException 
-	 */
-	private void parseCommandLine(ArrayList<String> list) throws TraceCompilerIllegalArgumentsException, IOException {
-		TraceCompilerLogger.printInfo("Building traces..."); //$NON-NLS-1$
-		if (list.size() == 0) {
-			printUsage();
-			System.exit(0);
-		}
-		List<String> switches = new ArrayList<String>();
-
-		// version, verbose, keepgoing if available could be anywhere, so process them and remove them from the list
-		for (String element : list) {
-			if (element.equalsIgnoreCase(HELP_OPTION) || element.equalsIgnoreCase(HELP_OPTION_SF)) {
-				printUsage();
-				System.exit(0);
-			}
-			if (element.equalsIgnoreCase(VERBOSE_OPTION) || element.equalsIgnoreCase(VERBOSE_OPTION_SF)) {
-				TraceCompilerGlobals.setVerbose(true);
-				switches.add(element);
-			}
-			if (element.equalsIgnoreCase(LEGACY_VERSION_OPTION) || element.equalsIgnoreCase(VERSION_OPTION) || element.equalsIgnoreCase(VERSION_OPTION_SF)) {
-				TraceCompilerLogger.printMessage(VERSION_TEXT + TraceCompilerVersion.getVersion());
-				System.exit(0);
-			}
-			if (element.equalsIgnoreCase(STOP_ON_ERROR_OPTION) || element.equalsIgnoreCase(STOP_ON_ERROR_OPTION_SF)) {
-				TraceCompilerGlobals.setKeepGoing(false);
-				switches.add(element);
-			}
-		}
-		
-		//remove switches from the list
-		for (String string : switches) {
-			list.remove(string);
-		}
-		
-		switches = null;
-		
-		if (list.size() < MANDATORY_ARGUMENT_COUNT) {
-			throw new TraceCompilerIllegalArgumentsException(Messages.getString("TraceCompiler.invalidTraceCompilerArgumetsExceptionText"), null); //$NON-NLS-1$
-		}
-		
-		
-		//the rest of elements must be in the order COMPONENT_UID, COMPONENT_NAME, COMPONENT_MMP_PATH, source...
-		//COMPONENT_UID must be on the command line, the rest can either be on the command line or stdin
-
-		try {
-			componentUID = Long.parseLong(list.get(COMPONENT_UID_ARG),
-					TraceCompilerConstants.HEX_RADIX);
-			TraceCompilerLogger.printInfo("Component UID: 0x" + Long.toHexString(componentUID)); //$NON-NLS-1$
-
-		} catch (NumberFormatException e) {
-			String msg = Messages.getString("TraceCompiler.componentUidIsNotValidExceptionText") + componentUID; //$NON-NLS-1$
-			throw new TraceCompilerIllegalArgumentsException(msg, null);
-		}
-		if (componentUID > 0) {
-
-			// Arguments are given as a parameter
-			if (list.size() > MANDATORY_ARGUMENT_COUNT + 1) {
-				parseParameters(list);
-
-				// Otherwise, read arguments from STDIN
-			} else {
-				readFromStdin();
-			}
-		} else {
-			String msg = Messages.getString("TraceCompiler.componentUidIsNotValidExceptionText") + componentUID; //$NON-NLS-1$
-			throw new TraceCompilerIllegalArgumentsException(msg, null);
-		}
-	}
-
-
-	private static void printUsage() {
-		TraceCompilerLogger.printMessage(VERSION_TEXT + TraceCompilerVersion.getVersion());
-		TraceCompilerLogger.printMessage(USAGE);
-	}
-
-	/**
-	 * Parses parameters
-	 * 
-	 * @param args
-	 *            the parameters
-	 * @throws TraceCompilerRootException if arguments are not valid
-	 */
-	private void parseParameters(List<String> args) throws TraceCompilerIllegalArgumentsException {
-		//index is safe, already checked by the caller
-		componentName = args.get(COMPONENT_NAME_ARG);
-		traceFolderName = 	TraceCompilerConstants.TRACES_DIRECTORY + UNDERSCORE
-							+ componentName;
-		
-		mmpPath = new File(args.get(COMPONENT_MMP_PATH_ARG));
-
-		if (isMmpValid()) {
-
-			// Move the files from args array to source file list
-				ArrayList<String> sources = new ArrayList<String>();
-				for (int i = 0; i < args.size() - SOURCE_FILE_START_OFFSET; i++) {
-					sources.add(args.get(SOURCE_FILE_START_OFFSET + i));
-				}
-
-				registerFiles(sources);
-		} else {
-			throw new TraceCompilerIllegalArgumentsException(Messages.getString("TraceCompiler.invalidMmpExceptionText") + mmpPath, null); //$NON-NLS-1$
-		}
-		
-	}
-
-	/**
-	 * Read information from STDIN
-	 * @throws IOException if fails to read the input
-	 * @throws TraceCompilerRootException if the list of files is empty
-	 */
-	private void readFromStdin() throws IOException, TraceCompilerIllegalArgumentsException {
-		ArrayList<String> files = new ArrayList<String>();
-
-		// Create reader
-		BufferedReader stdin = new BufferedReader(
-				new InputStreamReader(System.in));
-		
-			int numberOfReceivedLines = 1;
-
-			String line = stdin.readLine();
-						
-			while (line != null) {
-
-				// End of source files received
-				if (line.equals(ENDOFSOURCEFILES)) {
-					break;
-				}
-
-				// Component name
-				if (numberOfReceivedLines == COMPONENT_NAME_ARG) {
-					componentName = line;
-					traceFolderName = TraceCompilerConstants.TRACES_DIRECTORY
-							+ UNDERSCORE + componentName;
-
-					// MMP path
-				} else if (numberOfReceivedLines == COMPONENT_MMP_PATH_ARG) {
-					mmpPath = new File(line);
-					if (!isMmpValid()) {
-						stdin.close();
-						throw new TraceCompilerIllegalArgumentsException(Messages.getString("TraceCompiler.invalidMmpExceptionText") + mmpPath, null); //$NON-NLS-1$
-					}
-
-					// Source files
-				} else {
-					// Add to the files list
-					File file = new File(line);
-					files.add(file.getAbsolutePath());
-				}
-
-				numberOfReceivedLines++;
-
-				// Read new line from STDIN
-				line = stdin.readLine();				
-			}
-		stdin.close();
-		registerFiles(files);
-	}
-
-	/**
-	 * Registers files to document monitor.
-	 * 
-	 * @param sources
-	 *            sources
-	 * @throws TraceCompilerRootException 
-	 */
-	private void registerFiles(ArrayList<String> sources) throws TraceCompilerIllegalArgumentsException {
-
-		if (sources.size() == 0) {
-			throw new TraceCompilerIllegalArgumentsException(Messages.getString("TraceCompiler.noSourceFilesExceptionText"), null); //$NON-NLS-1$
-		}
-		File parent = mmpPath.getParentFile();
-		boolean found = false;
-
-		componentPath = parent.getAbsolutePath();
-
-		ProjectEngine.traceFolderName = TraceCompilerConstants.TRACES_DIRECTORY;
-
-		// Find location of "traces" or "traces_<component name>" -folder. If
-		// "traces" or "traces_<component name>" -folder does not
-		// exist, "traces" -folder will be add to same level than "group" or
-		// "mmpfiles" -folder. If "group" or "mmpfiles" -folder does not exist
-		// then "traces" -folder will be added to same level than source file.
-		while (!found && parent != null) {
-			File[] children = parent.listFiles();
-			if (children != null) {
-				for (int i = 0; i < children.length; i++) {
-					File child = children[i];
-					String childName = child.getName();
-					if (child.isDirectory() && isProjectRoot(childName)) {
-						componentPath = parent.getAbsolutePath();
-						found = true;
-
-						// Check that does subdirectory that name is
-						// "traces_<component name>" exist in this directory. If
-						// it exist use that as traces directory name.
-						for (i = 0; i < children.length; i++) {
-							child = children[i];
-							childName = child.getName();
-							if (child.isDirectory()
-									&& childName
-											.equalsIgnoreCase(traceFolderName)) {
-								ProjectEngine.traceFolderName = traceFolderName;
-								break;
-							}
-						}
-						break;
-					}
-				}
-			}
-
-			if (found == false) {
-				parent = parent.getParentFile();
-			}
-		}
-
-		registerSourceFiles(sources);
-	}
-
-	/**
-	 * Checks if this folder is the project root
-	 * 
-	 * @param name
-	 *            name of the folder
-	 * @return true if this folder is the project root
-	 */
-	private boolean isProjectRoot(String name) {
-		boolean retval = false;
-		if (name.equalsIgnoreCase(traceFolderName)
-				|| name.equalsIgnoreCase(SymbianConstants.GROUP_DIRECTORY)
-				|| name.equalsIgnoreCase(SymbianConstants.MMPFILES_DIRECTORY)
-				|| name
-						.equalsIgnoreCase(TraceCompilerConstants.TRACES_DIRECTORY)) {
-			retval = true;
-		}
-		return retval;
-	}
-
-	/**
-	 * Registers source files
-	 * 
-	 * @param files
-	 */
-	private void registerSourceFiles(ArrayList<String> files) {
-		if (files.size() > 0) {
-			String[] fileArr = new String[files.size()];
-			files.toArray(fileArr);
-
-			// Sets the source files to the TraceCompiler document
-			// factory. It will create a document from each source in the array
-			FileDocumentMonitor.setFiles(fileArr);
-			DocumentFactory.registerDocumentFramework(
-					new FileDocumentMonitor(), StringDocumentFactory.class);
-		}
-	}
-
-	/**
-	 * Initializes TraceCompiler
-	 * @throws TraceCompilerRootException if fail to initialize the plugins
-	 * @throws TraceCompilerException 
-	 */
-	private void start() throws TraceCompilerRootException, TraceCompilerException {
-
-		// Starts TraceCompiler. This is normally called from the Eclipse
-		// plug-in
-		// activator, but in console case that does not exist
-		TraceCompilerEngineGlobals.start();
-				
-		
-		//Reads the GroupId values from opensystemtrace_types.h
-		//If this fails a message is logged and trace compiler stops
-		GroupNames.initialiseGroupName();
-
-		
-		// Registers a view to TraceCompiler
-		TraceCompilerEngineGlobals
-				.setView(new TraceCompilerView(componentPath));
-
-		// Registers all plug-in components
-		for (TraceCompilerPlugin plugin : plugIns) {
-			TraceCompilerEngineGlobals.registerPlugin(plugin);
-		}
-		// Adds a model event listener
-		TraceCompilerEngineGlobals.getTraceModel().addModelListener(
-				modelListener);
-		TraceCompilerEngineGlobals.getTraceModel().addExtensionListener(
-				modelListener);
-		TraceCompilerEngineGlobals.getTraceModel().getExtension(
-				TraceLocationList.class).addLocationListListener(modelListener);
-		TraceCompilerEngineGlobals.getTraceModel().addProcessingListener(modelListener);
-	}
-
-	/**
-	 * Parses the sources and generates trace files
-	 * @throws Exception 
-	 */
-	private void buildTraceFiles() throws Exception {
-		TraceCompilerEngineInterface tbi = TraceCompilerEngineGlobals
-				.getTraceCompiler();
-		try {
-			// Opens a trace project
-			componentName = TraceUtils.convertName(componentName);
-
-			// Set project path before opening project
-			TraceCompilerEngineGlobals.setProjectPath(componentPath);
-			tbi.openProject(componentName);
-			TraceModel model = TraceCompilerEngineGlobals.getTraceModel();
-			if (model.isValid()) {
-				model.setID((int) componentUID);
-
-				// Location errors are printed after a file changes, but the
-				// last file is not detected by the listener
-				if (modelListener.getErrors().size() > 0) {
-					modelListener.printLocationErrors();
-					tbi.closeProject();
-					throw new TraceCompilerRootException(null, null);
-				}
-				tbi.exportProject();
-				tbi.closeProject();
-			} else {
-				String msg = "Project creation was cancelled"; //$NON-NLS-1$
-				throw new TraceCompilerRootException(msg, null);
-			}
-		} catch (TraceCompilerException e) {
-			TraceCompilerEngineGlobals.getEvents().postError(e);
-			throw new TraceCompilerRootException("Build trace files failed.", e); //$NON-NLS-1$
-		}
-	}
-
-	/**
-	 * Shuts down TraceCompiler
-	 * @throws TraceCompilerException 
-	 */
-	private void shutdown() throws TraceCompilerException {
-		for (TraceCompilerPlugin plugin : plugIns) {
-			TraceCompilerEngineGlobals.unregisterPlugin(plugin);
-		}
-		TraceCompilerEngineGlobals.shutdown();
-	}
-
-	/**
-	 * Checks if the MMP file is valid
-	 * 
-	 * @return true if MMP file is valid
-	 */
-	private boolean isMmpValid() {
-		boolean valid = false;
-		String pathStr = mmpPath.getAbsolutePath();
-
-		if (mmpPath.exists() && pathStr.length() > MMP.length()) {
-			String end = pathStr.substring(pathStr.length() - MMP.length());
-			if (end.equalsIgnoreCase(MMP)) {
-				valid = true;
-			} else {
-				TraceCompilerLogger.printError("Invalid MMP file: " + mmpPath.getAbsolutePath()); //$NON-NLS-1$
-			}
-		} else {
-			TraceCompilerLogger.printError("Missing or can not access MMP path: " + mmpPath.getAbsolutePath()); //$NON-NLS-1$
-		}
-		return valid;
-		
-	}
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/TraceCompilerConfiguration.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,153 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Configuration for the console UI
-*
-*/
-package com.nokia.tracecompiler;
-
-import com.nokia.tracecompiler.engine.TraceCompilerEngineConfiguration;
-import com.nokia.tracecompiler.engine.TraceCompilerEngineConfigurationListener;
-
-/**
- * Configuration for the TraceCompiler UI
- * 
- */
-final class TraceCompilerConfiguration implements TraceCompilerEngineConfiguration {
-
-	/**
-	 * Export path
-	 */
-	private String exportPath;
-
-	/**
-	 * Constructor
-	 * 
-	 * @param exportPath
-	 *            the export path for decode files
-	 */
-	TraceCompilerConfiguration(String exportPath) {
-		this.exportPath = exportPath;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engine.TraceCompilerConfiguration#
-	 *      addConfigurationListener(com.nokia.tracecompiler.engine.TraceCompilerConfigurationListener)
-	 */
-	public void addConfigurationListener(
-			TraceCompilerEngineConfigurationListener configurationListener) {
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engine.TraceCompilerConfiguration#
-	 *      getFlag(java.lang.String)
-	 */
-	public boolean getFlag(String flagName) {
-		boolean retval;
-		if (flagName.equals(TraceCompilerEngineConfiguration.CONSOLE_UI_MODE)) {
-			retval = true;
-		} else {
-			retval = false;
-		}
-		return retval;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engine.TraceCompilerConfiguration#
-	 *      getText(java.lang.String)
-	 */
-	public String getText(String textName) {
-		String retval;
-		if (textName.equals(TraceCompilerEngineConfiguration.ENVIRONMENT_ROOT)) {
-			retval = exportPath;
-		} else {
-			retval = ""; //$NON-NLS-1$
-		}
-		return retval;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engine.TraceCompilerConfiguration#
-	 *      getValue(java.lang.String)
-	 */
-	public int getValue(String valueName) {
-		return 0;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engine.TraceCompilerConfiguration#
-	 *      hasEntry(java.lang.String)
-	 */
-	public boolean hasEntry(String entryName) {
-		return false;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engine.TraceCompilerConfiguration#isAvailable()
-	 */
-	public boolean isAvailable() {
-		return true;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engine.TraceCompilerConfiguration#
-	 *      removeConfigurationListener(com.nokia.tracecompiler.engine.TraceCompilerConfigurationListener)
-	 */
-	public void removeConfigurationListener(
-			TraceCompilerEngineConfigurationListener configurationListener) {
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engine.TraceCompilerConfiguration#setFlag(java.lang.String,
-	 *      boolean)
-	 */
-	public void setFlag(String flagName, boolean flag) {
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engine.TraceCompilerConfiguration#setText(java.lang.String,
-	 *      java.lang.String)
-	 */
-	public void setText(String textName, String text) {
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engine.TraceCompilerConfiguration#setValue(java.lang.String,
-	 *      int)
-	 */
-	public void setValue(String valueName, int value) {
-	}
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/TraceCompilerConstants.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Constants for console UI
-*
-*/
-package com.nokia.tracecompiler;
-
-
-/**
- * Constants for TraceCompiler UI
- *
- */
-public interface TraceCompilerConstants {
-
-	/**
-	 * Default UID if component does not have one
-	 */
-	int DEFAULT_UID = 0x0;
-
-	/**
-	 * Traces directory
-	 */
-	String TRACES_DIRECTORY = "traces"; //$NON-NLS-1$
-
-	/**
-	 * Radix for hex numbers
-	 */
-	int HEX_RADIX = 16; // CodForChk_Dis_Magic
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/TraceCompilerGlobals.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,73 +0,0 @@
-/*
- * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of "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:
- *
- * Description:
- *
- * TraceCompilerGlobals global constants
- *
- */
-package com.nokia.tracecompiler;
-
-/**
- * TraceCompiler Global constants
- *
- */
-public class TraceCompilerGlobals {
-
-	/**
-	 * Verbose output. Verbose is usually checked to print Infos
-	 */
-	private static boolean VERBOSE = false;
-	
-	/**
-	 * KepGoing is used to decide whether we continue processing on errors
-	 */
-	private static boolean KEEPGOING =  true;
-	
-	//disallow instances
-	private TraceCompilerGlobals() {
-		// singleton
-	}
-
-	/**
-	 * set verbose mode
-	 * @param verbose
-	 */
-	public static void setVerbose(boolean verbose) {
-		VERBOSE = verbose;
-	}
-	
-	/**
-	 * is vebose mode on/off
-	 * @return boolean
-	 */
-	public static boolean isVebose() {
-		return VERBOSE;
-	}
-	
-	/**
-	 * set keep going mode
-	 * @param keepgoing
-	 */
-	public static void setKeepGoing(boolean keepgoing) {
-		KEEPGOING = keepgoing;
-	}
-	
-	/**
-	 * is keepgoing mode on/off
-	 * @return boolean
-	 */
-	public static boolean keepGoing() {
-		return KEEPGOING;
-	}
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/TraceCompilerIllegalArgumentsException.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-/*
- * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of "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:
- *
- * Description:
- *
- * TraceCompilerIllegalArgumentsException thrown when tracecompiler can not process its arguments
- *
- */
-package com.nokia.tracecompiler;
-
-/**
- * TraceCompilerIllegalArgumentsException thrown when tracecompiler can not process its arguments
- *
- */
-public class TraceCompilerIllegalArgumentsException extends TraceCompilerRootException {
-
-	/**
-	 * 
-	 */
-	private static final long serialVersionUID = 1387782275931306398L;
-
-	public TraceCompilerIllegalArgumentsException(String message, Throwable cause) {
-		super(message, cause);
-	}
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/TraceCompilerLogger.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,70 +0,0 @@
-/*
- * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of "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:
- *
- * Description:
- *
- * Simple Logger
- *
- */
-package com.nokia.tracecompiler;
-
-
-
-/**
- * Simple logger for errors warnings and infos
- *
- */
-public class TraceCompilerLogger {
-
-	/**
-	 * Prints errors message to STDERR.
-	 * 
-	 * @param msg
-	 *            the message
-	 */
-	static public void printError(String msg) {
-		if (msg != null) {
-			System.err.println(Messages.getString("TraceCompilerLogger.errorPrefix") + msg); //$NON-NLS-1$
-			System.err.flush();
-		}
-	}
-	
-	/**
-	 * Prints warning message to STDERR.
-	 * @param msg
-	 */
-	static public void printWarning(String msg) {
-			System.err.println(Messages.getString("TraceCompilerLogger.warningPrefix") + msg); //$NON-NLS-1$
-			System.err.flush();
-	}
-
-	/**
-	 * Prints warning message to STDOUT if verbose is on.
-	 * @param msg
-	 */
-	static public void printInfo(String msg) {
-		if (TraceCompilerGlobals.isVebose()) {
-			System.out.println(Messages.getString("TraceCompilerLogger.infoPrefix") + msg); //$NON-NLS-1$
-			System.out.flush();
-		}
-	}
-	
-	/**
-	 * Prints warning message to STDOUT.
-	 * @param msg
-	 */
-	static public void printMessage(String msg) {
-			System.out.println(msg);
-			System.out.flush();
-	}
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/TraceCompilerMain.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,766 +0,0 @@
-/*
- * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of "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:
- *
- * Description:
- *
- * TraceCompiler command-line main class
- *
- */
-package com.nokia.tracecompiler;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Iterator;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import com.nokia.tracecompiler.document.FileDocumentMonitor;
-import com.nokia.tracecompiler.document.StringDocumentFactory;
-import com.nokia.tracecompiler.engine.TraceCompilerEngineEvents;
-import com.nokia.tracecompiler.engine.TraceCompilerEngineGlobals;
-import com.nokia.tracecompiler.engine.TraceCompilerEngineInterface;
-import com.nokia.tracecompiler.engine.TraceLocationList;
-import com.nokia.tracecompiler.engine.project.ProjectEngine;
-import com.nokia.tracecompiler.file.FileUtils;
-import com.nokia.tracecompiler.model.TraceCompilerException;
-import com.nokia.tracecompiler.model.TraceModel;
-import com.nokia.tracecompiler.plugin.TraceCompilerPlugin;
-import com.nokia.tracecompiler.project.GroupNames;
-import com.nokia.tracecompiler.source.SourceConstants;
-import com.nokia.tracecompiler.utils.DocumentFactory;
-import com.nokia.tracecompiler.utils.TraceCompilerVersion;
-
-/**
- * TraceCompiler command-line main class
- * 
- */
-public class TraceCompilerMain {
-	
-	/** line separator */
-	private static String LINE_SEPARATOR =  System.getProperty("line.separator"); //$NON-NLS-1$
-	
-	/**
-	 * Index of third character
-	 */
-	private static final int INDEX_OF_THIRD_CHARACTER = 2;
-
-	/**
-	 * Index of first character
-	 */
-	private static final int INDEX_OF_FIRST_CHARACTER = 0;
-	
-	/**
-	 * TraceCompiler options
-	 */
-	
-	/**
-	 * UID : it is used to create the dictionary file
-	 */
-	private static final String UID_SWITCH = Messages.getString("TraceCompiler.UidStwich"); //$NON-NLS-1$
-	private static final String UID_SWITCH_TEXT = Messages.getString("TraceCompiler.UidText"); //$NON-NLS-1$
-	/**
-	 * project name : it is used to create the dictionary file
-	 */
-	private static final String PRJ_NAME_SWITCH = Messages.getString("TraceCompiler.ProjectSwitch");//$NON-NLS-1$
-	private static final String PRJ_NAME_SWITCH_TEXT = Messages.getString("TraceCompiler.ProjectText"); //$NON-NLS-1$
-	/**
-	 * mmp file path:  may be used to compute the traces folder
-	 */
-	private static final String MMP_PATH_SWITCH = Messages.getString("TraceCompiler.MmpSwitch");//$NON-NLS-1$
-	private static final String MMP_PATH_SWITCH_TEXT = Messages.getString("TraceCompiler.MmpText"); //$NON-NLS-1$
-	/**
-	 * traces folder: absolute or relative to the mmp folder
-	 */
-	private static final String TRACES_PATH_SWITCH = Messages.getString("TraceCompiler.TracesSwitch");//$NON-NLS-1$
-	private static final String TRACES_PATH_SWITCH_TEXT = Messages.getString("TraceCompiler.TracesText"); //$NON-NLS-1$
-	
-
-	/**
-	 * Version option
-	 */
-	private static final String VERSION_OPTION = Messages.getString("TraceCompiler.VersionSwitchLong"); //$NON-NLS-1$
-	private static final String VERSION_OPTION_SF = Messages.getString("TraceCompiler.VersionSwitchShort"); //$NON-NLS-1$
-	private static final String VERSION_OPTION_INSTRUCTION_TEXT = Messages.getString("TraceCompiler.VersionText"); //$NON-NLS-1$
-
-	
-	/**
-	 * help option
-	 */
-	private static final String HELP_OPTION = Messages.getString("TraceCompiler.HelpSwicthLong"); //$NON-NLS-1$
-	private static final String HELP_OPTION_SF = Messages.getString("TraceCompiler.HelpSwitchShort"); //$NON-NLS-1$
-	private static final String HELP_OPTION_INSTRUCTION_TEXT = Messages.getString("TraceCompiler.HelpText"); //$NON-NLS-1$
-	
-	/**
-	 * Verbose option
-	 */
-	private static final String VERBOSE_OPTION = Messages.getString("TraceCompiler.VerboseSwitchLong"); //$NON-NLS-1$
-	private static final String VERBOSE_OPTION_SF = Messages.getString("TraceCompiler.VerboseSwitchShort"); //$NON-NLS-1$
-	private static final String VERBOSE_OPTION_INSTRUCTION_TEXT = Messages.getString("TraceCompiler.VerboseText"); //$NON-NLS-1$
-
-	/**
-	 * keep going option
-	 */
-	private static final String STOP_ON_ERROR_OPTION = Messages.getString("TraceCompiler.StopSwitchLong"); //$NON-NLS-1$
-	private static final String STOP_ON_ERROR_OPTION_SF = Messages.getString("TraceCompiler.StopSwitchShort"); //$NON-NLS-1$
-	private static final String STOP_ON_ERROR_OPTION_INSTRUCTION_TEXT = Messages.getString("TraceCompiler.StopText"); //$NON-NLS-1$
-
-	
-
-	/**
-	 * Version text
-	 */
-	private static final String VERSION_TEXT = Messages.getString("TraceCompiler.DisplayVersionText"); //$NON-NLS-1$
-
-	/**
-	 * Option instruction text
-	 */
-	private static final String OPTION_INSTRUCTION_TEXT = Messages.getString("TraceCompiler.Options"); //$NON-NLS-1$
-	private static final String VALUE=Messages.getString("TraceCompiler.Value"); //$NON-NLS-1$
-	
-
-	
-	private static final String USAGE = Messages.getString("TraceCompiler.Usage") + LINE_SEPARATOR + //$NON-NLS-1$
-	Messages.getString("TraceCompiler.UsageText") + LINE_SEPARATOR + //$NON-NLS-1$
-										"\t" + OPTION_INSTRUCTION_TEXT + LINE_SEPARATOR + //$NON-NLS-1$
-										"\t" + HELP_OPTION_SF  + ", " + HELP_OPTION + ", " + HELP_OPTION_INSTRUCTION_TEXT + LINE_SEPARATOR +   //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
-										"\t" + VERSION_OPTION_SF + ", " + VERSION_OPTION + "\t" +  VERSION_OPTION_INSTRUCTION_TEXT + LINE_SEPARATOR +   //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
-										"\t" + VERBOSE_OPTION_SF + ", " + VERBOSE_OPTION + "\t\t" + VERBOSE_OPTION_INSTRUCTION_TEXT + LINE_SEPARATOR +  //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
-										"\t" + STOP_ON_ERROR_OPTION_SF + ", " + STOP_ON_ERROR_OPTION + "\t" + STOP_ON_ERROR_OPTION_INSTRUCTION_TEXT + LINE_SEPARATOR +  //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
-										"\t" + UID_SWITCH + "=" + VALUE + "\t" + UID_SWITCH_TEXT +  LINE_SEPARATOR + //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
-										"\t" + PRJ_NAME_SWITCH + "=" + VALUE + "\t" + PRJ_NAME_SWITCH_TEXT +  LINE_SEPARATOR + //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
-										"\t" + MMP_PATH_SWITCH + "=" + VALUE + "\t" + MMP_PATH_SWITCH_TEXT +  LINE_SEPARATOR + //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
-										"\t" + TRACES_PATH_SWITCH + "=" + VALUE + "\t" + TRACES_PATH_SWITCH_TEXT; //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
-
-
-
-	/**
-	 * End of source files tag
-	 */
-	private static final String ENDOFSOURCEFILES = Messages.getString("TraceCompiler.EndOfList"); //$NON-NLS-1$
-
-	/**
-	 * MMP file extension
-	 */
-	private static final String MMP_FILE_TYPE = Messages.getString("TraceCompiler.MmpExtension"); //$NON-NLS-1$
-
-	/**
-	 * Decode plugins path
-	 */
-	private String DECODE_PLUGINS_PATH = Messages.getString("TraceCompiler.PluginPath"); //$NON-NLS-1$
-
-	/**
-	 * Decode plugin name tag
-	 */
-	private String DECODE_PLUGIN_NAME_TAG = Messages.getString("TraceCompiler.DecodeText1"); //$NON-NLS-1$
-
-	/**
-	 * Decode plugin class name tag
-	 */
-	private String DECODE_PLUGIN_CLASS_NAME_TAG = Messages.getString("TraceCompiler.DecodeText2"); //$NON-NLS-1$
-
-	/**
-	 * Decode plugin engine class name template
-	 */
-	private String ENGINE_CLASS_NAME_TEMPLATE = DECODE_PLUGIN_NAME_TAG
-			+ "Engine"; //$NON-NLS-1$
-
-	/**
-	 * Decode plugin engine file name template
-	 */
-	private String ENGINE_FILE_NAME_TEMPLATE = DECODE_PLUGIN_CLASS_NAME_TAG
-			+ ".class"; //$NON-NLS-1$
-
-	/**
-	 * Decode plugins class template
-	 */
-	private String CLASS_TEMPLATE = Messages.getString("TraceCompiler.DecodePluginsNameSpace") + DECODE_PLUGIN_NAME_TAG + "." + DECODE_PLUGIN_CLASS_NAME_TAG; //$NON-NLS-1$ //$NON-NLS-2$	
-	
-	//switch with value such as --uid=value
-	private Pattern valueSwitchPattern = Pattern.compile("(--\\S+)=(\\S+)"); //$NON-NLS-1$
-	//switches with no values such -v, --version
-	private Pattern singleSwitchPattern = Pattern.compile("-{1,2}([^=]+)"); //$NON-NLS-1$
-	
-	/**
-	 * list of source files
-	 */
-	private ArrayList<String> sources = new ArrayList<String>();
-	/**
-	 * traces path
-	 */
-	private String traces_path = null;
-	
-	
-	
-	
-	/**
-	 * Main function
-	 * 
-	 * @param args
-	 *            the command line arguments
-	 */
-	public static void main(String[] args) {
-		if (args.length == 0) {
-			printUsage();
-			return;
-		}
-		
-		ArrayList<String> list = null;
-		
-		//support spaces in switches, build a long string, clean it and convert it back to array - a bit expensive
-		String tmpString = "";  //$NON-NLS-1$
-		for (int i = 0; i < args.length; i++) {
-			tmpString = tmpString + " " + args[i];  //$NON-NLS-1$
-		}
-		tmpString = tmpString.replaceAll("\\s*=\\s*", "="); //$NON-NLS-1$ //$NON-NLS-2$
-		tmpString = tmpString.replaceAll("\\s+", " "); //$NON-NLS-1$ //$NON-NLS-2$
-		String[] split = tmpString.trim().split(" "); //$NON-NLS-1$
-		tmpString = null; // not needed anymore
-		
-		//rebuild array of arguments
-		if (split.length > 0) {
-			list = new ArrayList<String>(Arrays.asList(split));
-		}
-				
-		long startTime = System.currentTimeMillis();
-		//create a new session of TraceCompiler
-		TraceCompilerMain console = new TraceCompilerMain();
-		
-		try {
-			console.parseCommandLine(list);
-		} catch (Exception e) { //should cover IOException and TraceCompilerIllegalArgumentsException
-			//There is no point to continue if there are problems with the arguments.
-			TraceCompilerLogger.printError(e.getMessage());
-			printUsage();
-			System.exit(1);
-		}
-		
-		boolean error = false;
-		try {
-			if(list.size() != 0) {
-				console.createPlugins();
-				console.start();
-				console.buildTraceFiles();				
-			}
-		} catch (Exception e) {
-			if (e instanceof TraceCompilerRootException) {
-				TraceCompilerLogger.printError(e.getMessage()); 
-			} //else the error should have been reported earlier
-			error = true;
-		} finally {
-			try {
-				if (!error) { //check if errors have been logged by EventEngine
-					TraceCompilerEngineEvents events = TraceCompilerEngineGlobals.getEvents();
-					if (events != null && events.hasErrorHappened()) {
-						error = true;
-					}
-				}
-				console.shutdown();
-			} catch (TraceCompilerException e) {
-				error = true;
-			}
-		}
-
-		if (console.projectName != null) {
-			TraceCompilerLogger.printMessage(console.projectName + Messages.getString("TraceCompiler.Took") //$NON-NLS-1$
-					+ (System.currentTimeMillis() - startTime) + Messages.getString("TraceCompiler.MS")); //$NON-NLS-1$
-		}
-		if (error) {
-			System.exit(1);
-		} else {
-			System.exit(0);
-		}	
-	}
-
-	/**
-	 * With Eclipse, the plug-ins are loaded by Eclipse framework. Here they
-	 * must be manually created and started
-	 */
-	private ArrayList<TraceCompilerPlugin> plugIns = new ArrayList<TraceCompilerPlugin>();
-
-	/**
-	 * Model listener
-	 */
-	private TraceCompilerModelListener modelListener;
-
-	/**
-	 * Name of the component
-	 */
-	private String projectName = null;
-	
-
-	/**
-	 * UID of the component
-	 */
-	private long componentUID = 0L;
-
-	/**
-	 * Component path
-	 */
-	private String componentPath = null;
-
-	/**
-	 * MMP file path
-	 */
-	private File mmpPath = null;
-
-	/**
-	 * Constructor
-	 */
-	TraceCompilerMain() {
-
-		// Creates listeners and preferences
-		modelListener = new TraceCompilerModelListener();
-	}
-
-	/**
-	 * Creates the plug-ins to be registered with TraceCompiler
-	 * @throws TraceCompilerRootException if fail to create a valid plugins
-	 */
-	private void createPlugins() throws TraceCompilerRootException {
-		
-		// Get location of the TraceCompiler
-		URL path = getClass().getProtectionDomain().getCodeSource()
-				.getLocation();
-		String decodePluginsPath = path.getPath();
-
-		// If first character is forward slash and it is located before drive
-		// letter remove it
-		if (decodePluginsPath.charAt(INDEX_OF_FIRST_CHARACTER) == SourceConstants.FORWARD_SLASH_CHAR
-				&& decodePluginsPath.charAt(INDEX_OF_THIRD_CHARACTER) == SourceConstants.COLON_CHAR) {
-			decodePluginsPath = decodePluginsPath.substring(1);
-		}
-		
-		// Concatenate decode plugins path
-		decodePluginsPath = decodePluginsPath.concat(DECODE_PLUGINS_PATH);
-		
-		// Replace slashes with correct separator character
-		decodePluginsPath = decodePluginsPath.replace(
-				SourceConstants.FORWARD_SLASH_CHAR, File.separatorChar);
-		decodePluginsPath = decodePluginsPath.replace(
-				SourceConstants.BACKSLASH_CHAR, File.separatorChar);
-		File decodePluginsDir = new File(decodePluginsPath);
-		String[] decodePlugins = decodePluginsDir.list();
-		if (decodePlugins != null) {
-			for (int i = 0; i < decodePlugins.length; i++) {
-
-				// Get decode plugin name
-				String decodePluginName = decodePlugins[i];
-
-				// Get decode plugin path
-				String decodePluginPath = decodePluginsPath
-						+ File.separatorChar + decodePluginName;
-
-				// Decode plugin must be in own directory
-				Boolean isDirectory = (new File(decodePluginPath))
-						.isDirectory();
-				if (isDirectory) {
-
-					// Construct decode plugin engine class name
-					String engineClassName = ENGINE_CLASS_NAME_TEMPLATE
-							.replaceFirst(DECODE_PLUGIN_NAME_TAG,
-									decodePluginName.substring(0, 1)
-											.toUpperCase()
-											+ decodePluginName.substring(1));
-
-					// Construct decode plugin engine file name
-					String engineFileName = ENGINE_FILE_NAME_TEMPLATE
-							.replaceFirst(DECODE_PLUGIN_CLASS_NAME_TAG,
-									engineClassName);
-					String engineFileFullName = decodePluginPath
-							+ File.separatorChar + engineFileName;
-
-					// Check does engine file exist
-					Boolean exists = (new File(engineFileFullName)).exists();
-					if (exists) {
-						String engineClassFullName = CLASS_TEMPLATE
-								.replaceFirst(DECODE_PLUGIN_NAME_TAG,
-										decodePluginName).replaceFirst(
-										DECODE_PLUGIN_CLASS_NAME_TAG,
-										engineClassName);
-						try {
-							Class<?> engineClass = Class
-									.forName(engineClassFullName);
-							TraceCompilerPlugin engine = (TraceCompilerPlugin) engineClass
-									.newInstance();
-							plugIns.add(engine);
-							TraceCompilerLogger.printInfo(Messages.getString(Messages.getString("TraceCompiler.DecodePlugin") + engineClassFullName + Messages.getString("TraceCompiler.Added"))); //$NON-NLS-1$ //$NON-NLS-2$
-						} catch (Exception e) {
-							String msg = Messages.getString("TraceCompiler.DecodePlugin" + engineClassFullName + Messages.getString("TraceCompiler.AddingFailed")); //$NON-NLS-1$ //$NON-NLS-2$
-							throw new TraceCompilerRootException(msg, e); 
-						}
-					} else {
-						String msg = Messages.getString("TraceCompiler.DecodePluginFile") + Messages.getString("TraceCompiler.EngineFullName") + engineFileFullName + Messages.getString("TraceCompiler.DoesNotExist"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-						throw new TraceCompilerRootException(msg, null);
-					}
-				}
-			}
-		}
-	}
-
-	/**
-	 * Parses the command line
-	 * 
-	 * @param args
-	 *            the arguments
-	 * @throws TraceCompilerRootException if arguments are invalid
-	 * @throws IOException 
-	 */
-	private void parseCommandLine(ArrayList<String> list) throws TraceCompilerIllegalArgumentsException, IOException {
-		TraceCompilerLogger.printInfo(Messages.getString("TraceCompiler.BuildingTracesMess")); //$NON-NLS-1$
-		Iterator<String> argIterator = list.iterator();
-		
-		if (list.size() == 0) {
-			printUsage();
-			System.exit(0);
-		}
-		while (argIterator.hasNext()) {
-			String element = argIterator.next().trim();
-			Matcher m = singleSwitchPattern.matcher(element);
-
-			if (m.matches()) { //it's one of the single switches 
-				if (element.equalsIgnoreCase(HELP_OPTION) || element.equalsIgnoreCase(HELP_OPTION_SF)) {
-					printUsage();
-					System.exit(0);
-				}
-				if (element.equalsIgnoreCase(VERBOSE_OPTION) || element.equalsIgnoreCase(VERBOSE_OPTION_SF)) {
-					TraceCompilerGlobals.setVerbose(true);
-					TraceCompilerLogger.printInfo(Messages.getString("TraceCompiler.veboseEnabled")); //$NON-NLS-1$
-					continue;
-				}
-				if ( element.equalsIgnoreCase(VERSION_OPTION) || element.equalsIgnoreCase(VERSION_OPTION_SF)) {
-					TraceCompilerLogger.printMessage(VERSION_TEXT + TraceCompilerVersion.getVersion());
-					System.exit(0);
-				}
-				if (element.equalsIgnoreCase(STOP_ON_ERROR_OPTION) || element.equalsIgnoreCase(STOP_ON_ERROR_OPTION_SF)) {
-					TraceCompilerGlobals.setKeepGoing(false);
-					TraceCompilerLogger.printInfo(Messages.getString("TraceCompiler.StopOnErrorEnabled")); //$NON-NLS-1$
-					continue;
-				}
-				TraceCompilerLogger.printMessage(Messages.getString("TraceCompiler.UnsupportedSwitch")  + element); //$NON-NLS-1$
-			} else {
-				m = valueSwitchPattern.matcher(element.trim());
-				if (m.matches()) { //it's one of the swithes with values
-					if (m.group(1).equalsIgnoreCase(UID_SWITCH)) {
-						// UID
-						try {
-							componentUID = Long.parseLong(m.group(2),TraceCompilerConstants.HEX_RADIX);	
-							TraceCompilerLogger.printInfo("Component UID: 0x" + Long.toHexString(componentUID)); //$NON-NLS-1$
-							if (componentUID <= 0L) {
-								String msg = Messages.getString("TraceCompiler.componentUidIsNotValidExceptionText") + componentUID; //$NON-NLS-1$
-								throw new TraceCompilerIllegalArgumentsException(msg, null);
-							}
-						} catch (NumberFormatException e) {
-							String msg = Messages.getString("TraceCompiler.componentUidIsNotValidExceptionText") + componentUID; //$NON-NLS-1$
-							throw new TraceCompilerIllegalArgumentsException(msg, null);
-						}
-					} else {
-						if (m.group(1).equalsIgnoreCase(PRJ_NAME_SWITCH)) {
-							// project name
-							projectName = m.group(2);
-							TraceCompilerLogger.printInfo(Messages.getString("TraceCompiler.CompNameSet") + projectName); //$NON-NLS-1$
-						} else {
-							if (m.group(1).equalsIgnoreCase(MMP_PATH_SWITCH)) {
-								//mmp path. for the moment only the mmp folder is used.
-								mmpPath = new File(m.group(2));
-								TraceCompilerLogger.printInfo(Messages.getString("TraceCompiler.MMPPathSet") + mmpPath); //$NON-NLS-1$
-							} else {
-								if (m.group(1).equalsIgnoreCase(TRACES_PATH_SWITCH)) {
-									//traces path
-									traces_path = m.group(2);
-								} else {
-									//unsupported switch
-									TraceCompilerLogger.printMessage(Messages.getString("TraceCompiler.UnsupportedSwitch") + element); //$NON-NLS-1$
-								}
-							}
-						}
-					}
-
-				} else {
-					//it must be a file name
-					//it's a good time to stop TC here if the file does not exist
-					if (!(new File(element)).exists()) {
-						throw new TraceCompilerIllegalArgumentsException(Messages.getString("TraceCompiler.sourceFileDoesNotExist") + element, null); //$NON-NLS-1$
-					}
-					sources.add(element);				
-				}	
-			}
-		}
-		
-		// by now, if the user wanted just help or version they would have got it and TC stopped
-		
-		if (componentUID <= 0L) {
-			String msg = Messages.getString("TraceCompiler.componentUidIsNotValidExceptionText") + componentUID; //$NON-NLS-1$
-			throw new TraceCompilerIllegalArgumentsException(msg, null);
-		}
-		
-		if (projectName == null) {
-			throw new TraceCompilerIllegalArgumentsException(Messages.getString("TraceCompiler.projectNameMissing"), null); //$NON-NLS-1$
-		}
-		
-		//if files have not been provided , get them from stdin
-		if (sources.size() == 0) {
-			//get them from the stdin
-			readFromStdin();
-		}
-		
-		if (mmpPath == null ) {
-			throw new TraceCompilerIllegalArgumentsException(Messages.getString("TraceCompiler.mmpPathMissing"), null); //$NON-NLS-1$
-		} else if (!isMmpValid()) {
-			throw new TraceCompilerIllegalArgumentsException(Messages.getString("TraceCompiler.invalidMmpExceptionText") + mmpPath, null); //$NON-NLS-1$
-		}
-		
-		if (traces_path == null ) {
-			throw new TraceCompilerIllegalArgumentsException(Messages.getString("TraceCompiler.tracesPathMissing"), null); //$NON-NLS-1$
-		} else {
-			computeTracesPath(traces_path);
-		}
-		
-		if (sources.size() == 0 ) {
-			throw new TraceCompilerIllegalArgumentsException(Messages.getString("TraceCompiler.fileListMissing"), null); //$NON-NLS-1$
-		}
-		
-		//we have all parameters input and validated, register files.
-		registerSourceFiles(sources);		
-	}
-	
-	
-	/**
-	 * If traces path is relative, work out the full path relative to the location of the mmp file
-	 * @param path
-	 * @throws TraceCompilerIllegalArgumentsException
-	 */
-	private void computeTracesPath(String path) throws TraceCompilerIllegalArgumentsException {
-		String traces_pathString = path;
-		traces_pathString = traces_pathString.replace('/', File.separatorChar);
-		traces_pathString = traces_pathString.replace('\\', File.separatorChar);
-
-		File traces_path = new File(traces_pathString);
-
-		Pattern p = Pattern.compile("(([a-zA-Z]:[\\\\/])|([\\\\/])).*"); //$NON-NLS-1$
-		Matcher m = p.matcher(traces_pathString);
-
-		if (!m.matches() /*  workaround for isAbsolute in java */) {
-			//traces path is relative to mmp location
-			traces_pathString = mmpPath.getAbsoluteFile().getParent() + File.separator + traces_pathString;
-		}
-
-		traces_path = new File(traces_pathString);
-
-		if (traces_path.isDirectory() && !traces_path.canWrite()) {
-			throw new TraceCompilerIllegalArgumentsException(Messages.getString("TraceCompiler.TracesPathWriteProtected") + traces_path, null); //$NON-NLS-1$
-		}
-
-		boolean dirExists = true;
-		if (!traces_path.exists()) {
-			dirExists = FileUtils.createDirectories(traces_path);
-		}
-		if (!dirExists) {
-			throw new TraceCompilerIllegalArgumentsException(Messages.getString("TraceCompiler.mkdirFailed") + traces_path, null); //$NON-NLS-1$
-		}
-
-		//set component path and trace folder
-		componentPath = traces_path.getParent();
-		ProjectEngine.traceFolderName = traces_path.getName();
-		TraceCompilerLogger.printInfo(Messages.getString("TraceCompiler.settingComponentPath") + componentPath); //$NON-NLS-1$
-		TraceCompilerLogger.printInfo(Messages.getString("TraceCompiler.settingTracesPath") + ProjectEngine.traceFolderName); //$NON-NLS-1$
-	}
-
-	private static void printUsage() {
-		TraceCompilerLogger.printMessage(VERSION_TEXT + TraceCompilerVersion.getVersion());
-		TraceCompilerLogger.printMessage(USAGE);
-	}
-
-	/**
-	 * Read information from STDIN
-	 * @throws IOException if fails to read the input
-	 * @throws TraceCompilerRootException if the list of files is empty
-	 */
-	private void readFromStdin() throws IOException, TraceCompilerIllegalArgumentsException {
-		TraceCompilerLogger.printInfo(Messages.getString("TraceCompiler.ReadingFilesMess")  + ENDOFSOURCEFILES); //$NON-NLS-1$
-		// Create reader
-		BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in));
-
-			String line = stdin.readLine();
-						
-			while (line != null) {
-				line = line.trim();
-				if (line.length() > 0) {
-					// End of source files received
-					if (line.equals(ENDOFSOURCEFILES)) {
-						break;
-					}
-					line = line.replaceAll("\\s+", ""); //$NON-NLS-1$ //$NON-NLS-2$
-					Matcher m = valueSwitchPattern.matcher(line.trim());
-					//because mmp path and traces path can be very long, we should allow them to be input'ed through stdin too.
-					if (m.matches()) { //it's one of the swithes with values
-						if (m.group(1).equalsIgnoreCase(MMP_PATH_SWITCH)) {
-							//mmp path. for the moment only the mmp folder is used.
-							mmpPath = new File(m.group(2));
-							TraceCompilerLogger.printInfo(Messages.getString("TraceCompiler.MMPPathSet") + mmpPath); //$NON-NLS-1$
-						} else {
-							if (m.group(1).equalsIgnoreCase(TRACES_PATH_SWITCH)) {
-								//traces path
-								traces_path = m.group(2);
-							} else {
-								//unsupported switch
-								TraceCompilerLogger.printMessage(Messages.getString("TraceCompiler.UnsupportedSwitch") + line); //$NON-NLS-1$
-							}
-						}
-					} else {
-
-						//it must be a file name
-						//it's a good time to stop TC here if the file does not exist
-						if (!(new File(line)).exists()) {
-							throw new TraceCompilerIllegalArgumentsException(Messages.getString("TraceCompiler.sourceFileDoesNotExist") + line, null); //$NON-NLS-1$
-						}
-						sources.add(line);
-					}
-				}
-				// Read new line from STDIN
-				line = stdin.readLine();				
-			}
-		stdin.close();
-	}
-
-	/**
-	 * Registers source files
-	 * 
-	 * @param files
-	 */
-	private void registerSourceFiles(ArrayList<String> files) throws TraceCompilerIllegalArgumentsException {
-		if (sources.size() == 0) {
-			throw new TraceCompilerIllegalArgumentsException(Messages.getString("TraceCompiler.noSourceFilesExceptionText"), null); //$NON-NLS-1$
-		}
-		if (files.size() > 0) {
-			String[] fileArr = new String[files.size()];
-			files.toArray(fileArr);
-
-			// Sets the source files to the TraceCompiler document
-			// factory. It will create a document from each source in the array
-			FileDocumentMonitor.setFiles(fileArr);
-			DocumentFactory.registerDocumentFramework(
-					new FileDocumentMonitor(), StringDocumentFactory.class);
-		}
-	}
-
-	/**
-	 * Initializes TraceCompiler
-	 * @throws TraceCompilerRootException if fail to initialize the plugins
-	 * @throws TraceCompilerException 
-	 */
-	private void start() throws TraceCompilerRootException, TraceCompilerException {
-
-		// Starts TraceCompiler. This is normally called from the Eclipse
-		// plug-in
-		// activator, but in console case that does not exist
-		TraceCompilerEngineGlobals.start();
-						
-		//Reads the GroupId values from opensystemtrace_types.h
-		//If this fails a message is logged and trace compiler stops
-		GroupNames.initialiseGroupName();
-
-		
-		// Registers a view to TraceCompiler
-		TraceCompilerEngineGlobals
-				.setView(new TraceCompilerView(componentPath));
-
-		// Registers all plug-in components
-		for (TraceCompilerPlugin plugin : plugIns) {
-			TraceCompilerEngineGlobals.registerPlugin(plugin);
-		}
-		// Adds a model event listener
-		TraceCompilerEngineGlobals.getTraceModel().addModelListener(
-				modelListener);
-		TraceCompilerEngineGlobals.getTraceModel().addExtensionListener(
-				modelListener);
-		TraceCompilerEngineGlobals.getTraceModel().getExtension(
-				TraceLocationList.class).addLocationListListener(modelListener);
-		TraceCompilerEngineGlobals.getTraceModel().addProcessingListener(modelListener);
-	}
-
-	/**
-	 * Parses the sources and generates trace files
-	 * @throws Exception 
-	 */
-	private void buildTraceFiles() throws Exception {
-		TraceCompilerEngineInterface tbi = TraceCompilerEngineGlobals
-				.getTraceCompiler();
-		try {
-			// Opens a trace project
-
-			// Set project path before opening project
-			TraceCompilerEngineGlobals.setProjectPath(componentPath);
-			tbi.openProject(projectName);
-			TraceModel model = TraceCompilerEngineGlobals.getTraceModel();
-			if (model.isValid()) {
-				model.setID((int) componentUID);
-
-				// Location errors are printed after a file changes, but the
-				// last file is not detected by the listener
-				if (modelListener.getErrors().size() > 0) {
-					modelListener.printLocationErrors();
-					tbi.closeProject();
-					throw new TraceCompilerRootException(null, null);
-				}
-				tbi.exportProject();
-				tbi.closeProject();
-			} else {
-				String msg = Messages.getString("TraceCompiler.ProjectCancelledMess"); //$NON-NLS-1$
-				throw new TraceCompilerRootException(msg, null);
-			}
-		} catch (TraceCompilerException e) {
-			TraceCompilerEngineGlobals.getEvents().postError(e);
-			throw new TraceCompilerRootException(Messages.getString("TraceCompiler.BuildFailed"), e); //$NON-NLS-1$
-		}
-	}
-
-	/**
-	 * Shuts down TraceCompiler
-	 * @throws TraceCompilerException 
-	 */
-	private void shutdown() throws TraceCompilerException {
-		for (TraceCompilerPlugin plugin : plugIns) {
-			TraceCompilerEngineGlobals.unregisterPlugin(plugin);
-		}
-		TraceCompilerEngineGlobals.shutdown();
-	}
-
-	/**
-	 * Checks if the MMP file is valid
-	 * 
-	 * @return true if MMP file is valid
-	 */
-	private boolean isMmpValid() {
-		boolean valid = false;
-		String pathStr = mmpPath.getAbsolutePath();
-
-		if (mmpPath.exists() && pathStr.length() > MMP_FILE_TYPE.length()) {
-			String end = pathStr.substring(pathStr.length() - MMP_FILE_TYPE.length());
-			if (end.equalsIgnoreCase(MMP_FILE_TYPE)) {
-				valid = true;
-			} else {
-				TraceCompilerLogger.printError(Messages.getString("TraceCompiler.invalidMmpExceptionText") + mmpPath.getAbsolutePath()); //$NON-NLS-1$
-			}
-		} else {
-			TraceCompilerLogger.printError(Messages.getString("TraceCompiler.InvalidMMP2") + mmpPath.getAbsolutePath()); //$NON-NLS-1$
-		}
-		return valid;
-		
-	}
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/TraceCompilerModelListener.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,246 +0,0 @@
-/*
- * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of "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:
- *
- * Description:
- *
- * Model extension listener for console UI
- *
- */
-package com.nokia.tracecompiler;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-
-import com.nokia.tracecompiler.engine.TraceCompilerEngineErrorMessages;
-import com.nokia.tracecompiler.engine.TraceCompilerEngineGlobals;
-import com.nokia.tracecompiler.engine.TraceLocation;
-import com.nokia.tracecompiler.engine.TraceLocationList;
-import com.nokia.tracecompiler.engine.TraceLocationListListener;
-import com.nokia.tracecompiler.engine.TraceCompilerEngineErrorCodes.TraceCompilerErrorCode;
-import com.nokia.tracecompiler.model.TraceModelExtension;
-import com.nokia.tracecompiler.model.TraceModelExtensionListener;
-import com.nokia.tracecompiler.model.TraceModelListener;
-import com.nokia.tracecompiler.model.TraceObject;
-import com.nokia.tracecompiler.model.TraceProcessingListener;
-import com.nokia.tracecompiler.source.SourceConstants;
-import com.nokia.tracecompiler.source.SourceLocationListener;
-
-/**
- * Model extension listener for TraceCompiler UI
- * 
- */
-final class TraceCompilerModelListener implements TraceModelListener,
-		TraceModelExtensionListener, TraceLocationListListener,
-		SourceLocationListener, TraceProcessingListener {
-
-	/**
-	 * List of errors for a source
-	 */
-	private ArrayList<TraceLocation> errorList = new ArrayList<TraceLocation>();
-
-	/**
-	 * Name of the file being processed
-	 */
-	private String currentFileName;
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.model.TraceModelListener#
-	 * objectAdded(com.nokia.tracecompiler.model.TraceObject,
-	 * com.nokia.tracecompiler.model.TraceObject)
-	 */
-	public void objectAdded(TraceObject owner, TraceObject object) {
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.model.TraceModelListener#
-	 * objectCreationComplete(com.nokia.tracecompiler.model.TraceObject)
-	 */
-	public void objectCreationComplete(TraceObject object) {
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.model.TraceModelListener#
-	 * objectRemoved(com.nokia.tracecompiler.model.TraceObject,
-	 * com.nokia.tracecompiler.model.TraceObject)
-	 */
-	public void objectRemoved(TraceObject owner, TraceObject object) {
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.model.TraceModelListener#
-	 * propertyUpdated(com.nokia.tracecompiler.model.TraceObject, int)
-	 */
-	public void propertyUpdated(TraceObject object, int property) {
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.model.TraceModelExtensionListener#
-	 * extensionAdded(com.nokia.tracecompiler.model.TraceObject,
-	 * com.nokia.tracecompiler.model.TraceModelExtension)
-	 */
-	public void extensionAdded(TraceObject object, TraceModelExtension extension) {
-		if (extension instanceof TraceLocationList) {
-			((TraceLocationList) extension).addLocationListListener(this);
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.model.TraceModelExtensionListener#
-	 * extensionRemoved(com.nokia.tracecompiler.model.TraceObject,
-	 * com.nokia.tracecompiler.model.TraceModelExtension)
-	 */
-	public void extensionRemoved(TraceObject object,
-			TraceModelExtension extension) {
-		if (extension instanceof TraceLocationList) {
-			((TraceLocationList) extension).removeLocationListListener(this);
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.source.TraceLocationListListener#
-	 * locationAdded(com.nokia.tracecompiler.engine.TraceLocation)
-	 */
-	public void locationAdded(TraceLocation location) {
-		location.addLocationListener(this);
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.source.TraceLocationListListener#
-	 * locationRemoved(com.nokia.tracecompiler.engine.TraceLocation)
-	 */
-	public void locationRemoved(TraceLocation location) {
-		location.removeLocationListener(this);
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.source.SourceLocationListener#
-	 * locationValidityChanged(com.nokia.tracecompiler.engine.TraceLocation)
-	 */
-	public void locationValidityChanged(TraceLocation location) {
-		String fileName = location.getFileName();
-		if (currentFileName != null) {
-			if (!fileName.equals(currentFileName)) {
-				currentFileName = fileName;
-				printLocationErrors();
-			}
-		} else {
-			currentFileName = fileName;
-		}
-		TraceCompilerErrorCode code = location.getValidityCode();
-		if (code != TraceCompilerErrorCode.OK
-				&& code != TraceCompilerErrorCode.TRACE_DOES_NOT_EXIST) {
-			if (!errorList.contains(location)) {
-				errorList.add(location);
-				location.reference();
-			}
-		} else {
-			if (errorList.remove(location)) {
-				location.dereference();
-			}
-		}
-	}
-
-	/**
-	 * Prints the errors from the error list
-	 */
-	void printLocationErrors() {
-		Collections.sort(errorList, new Comparator<TraceLocation>() {
-
-			/**
-			 * Sorts the array by line number
-			 * 
-			 * @param o1
-			 *            location 1
-			 * @param o2
-			 *            location 2
-			 * @return the result
-			 */
-			public int compare(TraceLocation o1, TraceLocation o2) {
-				int line1 = o1.getLineNumber();
-				int line2 = o2.getLineNumber();
-				return line1 > line2 ? 1 : line1 == line2 ? 0 : -1;
-			}
-
-		});
-		for (TraceLocation location : errorList) {
-			printLocationError(location);
-		}
-		errorList.clear();
-	}
-
-	/**
-	 * Prints a location error
-	 * 
-	 * @param location
-	 *            the location
-	 */
-	private void printLocationError(TraceLocation location) {
-		TraceCompilerEngineGlobals.getEvents().postErrorMessage(
-				location.getFileName()
-						+ Messages.getString("TraceCompilerModelListener.lineNumberPrefix") //$NON-NLS-1$
-						+ location.getLineNumber()
-						+ SourceConstants.COLON
-						+ SourceConstants.SPACE
-						+ TraceCompilerEngineErrorMessages.getErrorMessage(
-								location.getValidityCode(), location
-										.getValidityParameters()), null, true);
-	}
-
-	/**
-	 * get list of cumulated erros.
-	 * 
-	 * @return list of TaceLocaion
-	 */
-	public ArrayList<TraceLocation> getErrors() {
-		return errorList;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see
-	 * com.nokia.tracecompiler.model.TraceProcessingListener#processingComplete
-	 * (boolean)
-	 */
-	public void processingComplete(boolean changed) {
-		printLocationErrors();
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see
-	 * com.nokia.tracecompiler.model.TraceProcessingListener#processingStarted()
-	 */
-	public void processingStarted() {
-	}
-}
\ No newline at end of file
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/TraceCompilerRootException.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-/*
- * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of "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:
- *
- * Description:
- *
- * Command-line based view implementation
- *
- */
-package com.nokia.tracecompiler;
-
-
-public class TraceCompilerRootException extends Exception {
-	// Serial version UID, as required for all Exceptions
-	private static final long serialVersionUID = 2126996710246333574L;
-	
-
-	/**
-	 * Constructs a TraceCompilerRootException with the given detail message and
-	 * cause.
-	 * @param message the detail message
-	 * @param cause the Exception that caused this Exception
-	 */
-	public TraceCompilerRootException(String message, Throwable cause)
-	{
-		super(message, cause);
-	}
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/TraceCompilerView.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,84 +0,0 @@
-/*
- * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of "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:
- *
- * Description:
- *
- * Console view implementation
- *
- */
-package com.nokia.tracecompiler;
-
-import java.io.File;
-
-import com.nokia.tracecompiler.engine.TraceCompilerEngineConfiguration;
-import com.nokia.tracecompiler.engine.ViewAdapter;
-
-/**
- * TraceCompiler view implementation
- * 
- */
-class TraceCompilerView extends ViewAdapter {
-
-	/**
-	 * Epoc root name in environment variables
-	 */
-	private static final String EPOCROOT = "EPOCROOT"; //$NON-NLS-1$
-
-	/**
-	 * Export path
-	 */
-	private String exportPath;
-
-	/**
-	 * Configuration
-	 */
-	private TraceCompilerConfiguration configuration;
-
-	/**
-	 * Constructor
-	 * 
-	 * @param projectPath
-	 *            the project path
-	 */
-	TraceCompilerView(String projectPath) {
-		// First try to get EPOCROOT from environment
-		exportPath = System.getenv(EPOCROOT);
-
-		// Windows substed drive
-		if (exportPath == null) {
-			int index = projectPath.indexOf(':');
-			if (index >= 0) {
-				exportPath = projectPath.substring(0, index + 2); // CodForChk_Dis_Magic
-			} else {
-				exportPath = File.separator;
-			}
-
-			// Check if it ends with a file separator, if not add one at the end
-		} else if (!exportPath.endsWith(File.separator)) {
-			exportPath = exportPath + File.separator;
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engine.ViewAdapter#getConfiguration()
-	 */
-	@Override
-	public TraceCompilerEngineConfiguration getConfiguration() {
-		if (configuration == null) {
-			configuration = new TraceCompilerConfiguration(exportPath);
-		}
-		return configuration;
-	}
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/DictionaryDefRef.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Reference to a trace definition
-*
-*/
-package com.nokia.tracecompiler.decodeplugins.dictionary;
-
-/**
- * Reference to a trace definition
- * 
- */
-final class DictionaryDefRef extends DictionaryRef {
-
-	/**
-	 * Constructor
-	 * 
-	 * @param refid
-	 *            the reference id
-	 */
-	DictionaryDefRef(int refid) {
-		super(refid);
-	}
-
-}
\ No newline at end of file
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/DictionaryEngine.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,100 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* TraceCompilerExport implementation for Symbian dictionary files
-*
-*/
-package com.nokia.tracecompiler.decodeplugins.dictionary;
-
-import com.nokia.tracecompiler.model.TraceCompilerException;
-import com.nokia.tracecompiler.model.TraceModel;
-import com.nokia.tracecompiler.plugin.TraceCompilerExport;
-
-/**
- * TraceCompilerExport implementation for Symbian dictionary files
- * 
- */
-public final class DictionaryEngine implements TraceCompilerExport {
-
-	/**
-	 * The trace model
-	 */
-	private TraceModel model;
-
-	/**
-	 * Dictionary instance
-	 */
-	private static DictionaryEngine instance;
-
-	/**
-	 * Gets the shared instance
-	 * 
-	 * @return the instance
-	 */
-	static DictionaryEngine getInstance() {
-		return instance;
-	}
-
-	/**
-	 * Constructor
-	 */
-	public DictionaryEngine() {
-		instance = this;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engine.TraceCompilerPlugin#
-	 *      traceProjectOpened(com.nokia.tracecompiler.model.TraceModel)
-	 */
-	public void traceProjectOpened(TraceModel model) {
-		this.model = model;
-		DictionaryFile file = model.getExtension(DictionaryFile.class);
-		if (file == null) {
-			file = new DictionaryFile(DictionaryFileExport
-					.getPathForDictionary(model));
-			model.addExtension(file);
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engine.TraceCompilerPlugin#traceProjectClosed()
-	 */
-	public void traceProjectClosed() {
-		if (model != null && model.isValid()) {
-			model.removeExtensions(DictionaryFile.class);
-		}
-		model = null;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engine.TraceCompilerExport#exportTraceProject()
-	 */
-	public void exportTraceProject() throws TraceCompilerException {
-		if (model != null && model.isValid()) {
-			DictionaryFile df = model.getExtension(DictionaryFile.class);
-			if (df != null) {
-				DictionaryFileExport export = new DictionaryFileExport(df);
-				export.exportDictionary();
-			}
-		}
-	}
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/DictionaryFile.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,65 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Project file for Dictionary format
-*
-*/
-package com.nokia.tracecompiler.decodeplugins.dictionary;
-
-import com.nokia.tracecompiler.project.TraceProjectFile;
-
-/**
- * Project file for Dictionary format
- * 
- */
-final class DictionaryFile extends TraceProjectFile {
-
-	/**
-	 * Title shown in UI
-	 */
-	private static final String TITLE = Messages
-			.getString("DictionaryFile.Title"); //$NON-NLS-1$
-
-	/**
-	 * Constructor
-	 * 
-	 * @param absolutePath
-	 *            the path to the dictionary file
-	 */
-	DictionaryFile(String absolutePath) {
-		super(absolutePath, true);
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.project.TraceProjectFile#getFileExtension()
-	 */
-	@Override
-	protected String getFileExtension() {
-		return DictionaryFileConstants.DICTIONARY_FILE_EXTENSION;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.project.TraceProjectFile#getTitle()
-	 */
-	@Override
-	public String getTitle() {
-		return TITLE;
-	}
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/DictionaryFileConstants.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Constants related to dictionary file
-*
-*/
-package com.nokia.tracecompiler.decodeplugins.dictionary;
-
-/**
- * Constants related to dictionary file
- * 
- */
-interface DictionaryFileConstants {
-
-	/**
-	 * Dictionary file extension
-	 */
-	String DICTIONARY_FILE_EXTENSION = "Dictionary.xml"; //$NON-NLS-1$
-
-	/**
-	 * Search depth for dictionary file
-	 */
-	int DICTIONARY_SEARCH_DEPTH = 3; // CodForChk_Dis_Magic
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/DictionaryFileExport.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,102 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Exporter for dictionary file
-*
-*/
-package com.nokia.tracecompiler.decodeplugins.dictionary;
-
-import java.io.File;
-
-import com.nokia.tracecompiler.engine.TraceCompilerEngineConfiguration;
-import com.nokia.tracecompiler.engine.TraceCompilerEngineGlobals;
-import com.nokia.tracecompiler.file.FileUtils;
-import com.nokia.tracecompiler.model.TraceModel;
-import com.nokia.tracecompiler.source.SourceConstants;
-
-/**
- * Exporter for dictionary file
- * 
- */
-final class DictionaryFileExport {
-
-	/**
-	 * The dictionary file properties
-	 */
-	private DictionaryFile dictionaryFile;
-
-	/**
-	 * Constructor
-	 * 
-	 * @param dictionary
-	 *            the dictionary file
-	 */
-	DictionaryFileExport(DictionaryFile dictionary) {
-		this.dictionaryFile = dictionary;
-	}
-
-	/**
-	 * Exports the dictionary file
-	 */
-	void exportDictionary() {
-		String exportPath = getExportPath(File.separatorChar);
-		String exportFile = dictionaryFile.getFileName();
-		String envRoot = TraceCompilerEngineGlobals.getConfiguration().getText(
-				TraceCompilerEngineConfiguration.ENVIRONMENT_ROOT);
-		if (envRoot != null) {
-			File target = new File(envRoot + exportPath + exportFile);
-			// The dictionary file is updated with the new environment root
-			dictionaryFile.updatePath(target.getAbsolutePath());
-			DictionaryFileWriter writer = new DictionaryFileWriter(
-					dictionaryFile);
-			writer.write();
-			dictionaryFile.postFileWrittenEvent(dictionaryFile
-					.getAbsolutePathWithID());
-		}
-	}
-
-	/**
-	 * Returns the export path for dictionary files
-	 * 
-	 * @param separator
-	 *            the file separator to use
-	 * @return the export path
-	 */
-	private static String getExportPath(char separator) {
-		String exportPath = DictionaryPreferences.DEFAULT_EXPORT_PATH;
-
-		// Accepts both types of separators, ends with separator
-		exportPath = FileUtils.convertSeparators(separator, exportPath, true);
-		return exportPath;
-	}
-
-	/**
-	 * Gets the default path to the dictionary file
-	 * 
-	 * @param model
-	 *            trace model
-	 * @return the file
-	 */
-	static String getPathForDictionary(TraceModel model) {
-		String fileName = model.getName()
-				+ DictionaryFileConstants.DICTIONARY_FILE_EXTENSION;
-		String exportPath = getExportPath(File.separatorChar);
-		String envRoot = TraceCompilerEngineGlobals.getConfiguration().getText(
-				TraceCompilerEngineConfiguration.ENVIRONMENT_ROOT);
-		return FileUtils.convertSeparators(SourceConstants.FORWARD_SLASH_CHAR,
-				envRoot + exportPath + fileName, false);
-	}
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/DictionaryFileRef.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,60 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Reference to a file
-*
-*/
-package com.nokia.tracecompiler.decodeplugins.dictionary;
-
-/**
- * Reference to a file
- * 
- */
-final class DictionaryFileRef extends DictionaryRef {
-
-	/**
-	 * File name
-	 */
-	String file;
-
-	/**
-	 * File path
-	 */
-	String path;
-
-	/**
-	 * Trace
-	 */
-	com.nokia.tracecompiler.model.Trace trace;
-
-	/**
-	 * Constructor
-	 * 
-	 * @param file
-	 *            the file name
-	 * @param path
-	 *            the file path
-	 * @param trace
-	 *            the trace
-	 */
-	DictionaryFileRef(String file, String path,
-			com.nokia.tracecompiler.model.Trace trace) {
-		super(0);
-		this.file = file;
-		this.path = path;
-		this.trace = trace;
-	}
-
-}
\ No newline at end of file
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/DictionaryFileWriter.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,586 +0,0 @@
-/*
-* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Writer for dictionary file
-*
-*/
-package com.nokia.tracecompiler.decodeplugins.dictionary;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.Iterator;
-
-import com.nokia.tracecompiler.decodeplugins.dictionary.encoder.DataType;
-import com.nokia.tracecompiler.decodeplugins.dictionary.encoder.Dictionary;
-import com.nokia.tracecompiler.decodeplugins.dictionary.encoder.LocationStore;
-import com.nokia.tracecompiler.decodeplugins.dictionary.encoder.TraceComponent;
-import com.nokia.tracecompiler.decodeplugins.dictionary.encoder.TraceDataStore;
-import com.nokia.tracecompiler.decodeplugins.dictionary.encoder.TraceDictionaryEncoder;
-import com.nokia.tracecompiler.decodeplugins.dictionary.encoder.TypeDef;
-import com.nokia.tracecompiler.decodeplugins.dictionary.encoder.TypeDefStore;
-import com.nokia.tracecompiler.engine.LocationListBase;
-import com.nokia.tracecompiler.engine.LocationProperties;
-import com.nokia.tracecompiler.file.FileUtils;
-import com.nokia.tracecompiler.model.Trace;
-import com.nokia.tracecompiler.model.TraceConstantTable;
-import com.nokia.tracecompiler.model.TraceConstantTableEntry;
-import com.nokia.tracecompiler.model.TraceGroup;
-import com.nokia.tracecompiler.model.TraceModel;
-import com.nokia.tracecompiler.model.TraceObjectUtils;
-import com.nokia.tracecompiler.model.TraceParameter;
-import com.nokia.tracecompiler.project.FormattingUtils;
-import com.nokia.tracecompiler.project.PropertyNames;
-import com.nokia.tracecompiler.project.TraceProjectAPI;
-import com.nokia.tracecompiler.project.TraceProjectAPI.TraceFormatFlags;
-import com.nokia.tracecompiler.rules.FillerParameterRule;
-import com.nokia.tracecompiler.rules.HiddenTraceObjectRule;
-import com.nokia.tracecompiler.source.SourceConstants;
-import com.nokia.tracecompiler.source.SourceUtils;
-
-/**
- * Writer for dictionary file
- * 
- */
-final class DictionaryFileWriter {
-
-	/**
-	 * Comparator for file references
-	 */
-	private final class FileRefComparator implements
-			Comparator<DictionaryFileRef> {
-		public int compare(DictionaryFileRef o1, DictionaryFileRef o2) {
-			int val = o1.path.compareTo(o2.path);
-			if (val == 0) {
-				val = o1.file.compareTo(o2.file);
-			}
-			return val;
-		}
-	}
-
-	/**
-	 * Dictionary file
-	 */
-	private DictionaryFile dictionaryFile;
-
-	/**
-	 * Sequential number for trace definitions
-	 */
-	private int defref;
-
-	/**
-	 * Sequential number for file definitions
-	 */
-	private int fileref;
-
-	/**
-	 * Constructor
-	 * 
-	 * @param dictionaryFile
-	 *            the dictionary file
-	 */
-	DictionaryFileWriter(DictionaryFile dictionaryFile) {
-		this.dictionaryFile = dictionaryFile;
-	}
-
-	/**
-	 * Writes the dictionary file
-	 */
-	void write() {
-		defref = 0;
-		fileref = 0;
-		File file = new File(dictionaryFile.getAbsolutePathWithID());
-		// Delete removes possible read-only flags
-		if (file.exists()) {
-			file.delete();
-		}
-
-		TraceDictionaryEncoder encoder = new TraceDictionaryEncoder();
-		File path = file.getParentFile();
-		if (!path.exists()) {
-			FileUtils.createDirectories(path);
-		}
-		encoder.createNewDictionary(file.getAbsolutePath());
-		Dictionary.startDictionary();
-		createTypedefs();
-		createDefs();
-		createLocations();
-		createComponent();
-		Dictionary.endDictionary();
-	}
-
-	/**
-	 * Creates the type definitions
-	 */
-	private void createTypedefs() {
-		TypeDefStore.startTypeDefs();
-		ArrayList<String> typeList = buildTypeList();
-		writeTypeDefinitions(typeList);
-		TypeDefStore.endTypeDefs();
-	}
-
-	/**
-	 * Builds the list of parameter types
-	 * 
-	 * @return the list of types found from the model
-	 */
-	private ArrayList<String> buildTypeList() {
-		TraceModel model = dictionaryFile.getOwner().getModel();
-		ArrayList<String> typeList = new ArrayList<String>();
-		for (TraceGroup group : model) {
-			for (Trace trace : group) {
-				for (TraceParameter parameter : trace) {
-					if ((parameter.getExtension(HiddenTraceObjectRule.class) == null)
-							|| (parameter
-									.getExtension(FillerParameterRule.class) != null)) {
-						String type = parameter.getType();
-						if (!typeList.contains(type)) {
-							typeList.add(type);
-						}
-					}
-				}
-			}
-		}
-		return typeList;
-	}
-
-	/**
-	 * Writes the data type definitions
-	 * 
-	 * @param typeList
-	 *            the list of data types
-	 */
-	private void writeTypeDefinitions(ArrayList<String> typeList) {
-		for (String type : typeList) {
-			DataType dt = mapTypeToDataType(type);
-			if (dt != null) {
-				// Normal parameters
-				int size = mapParameterTypeToSize(type);
-				String formatChar = SourceUtils.mapNormalTypeToFormat(type);
-				if (formatChar != null && formatChar.length() > 1
-						&& formatChar.charAt(0) == '%') {
-					formatChar = formatChar.substring(1);
-					TypeDefStore.writeTypeDef(type, size, formatChar, dt);
-
-					// Write alternative format characters
-					writeAlternativeFormatChars(formatChar, type, size, dt);
-
-				} else {
-					TypeDefStore.writeTypeDef(type, size, null, dt);
-				}
-			} else {
-				// Enum parameters
-				TraceModel model = dictionaryFile.getOwner().getModel();
-				TraceConstantTable table = model.findConstantTableByName(type);
-				if (table != null) {
-					TypeDefStore.startTypeDef(table.getName(),
-							mapParameterTypeToSize(table.getType()), null,
-							DataType.ENUM);
-					for (TraceConstantTableEntry entry : table) {
-						TypeDef.writeTypeMember(entry.getID(), entry.getName(),
-								null);
-					}
-					TypeDefStore.endTypeDef();
-				}
-			}
-		}
-	}
-
-	/**
-	 * Writes alternative format characters to the Dictionary
-	 * 
-	 * @param formatChar
-	 *            formatchar
-	 * @param type
-	 *            parameter type
-	 * @param size
-	 *            parameter size
-	 * @param dt
-	 *            data type
-	 */
-	private void writeAlternativeFormatChars(String formatChar, String type,
-			int size, DataType dt) {
-
-		// If there's big L, write also 'll' type
-		if (formatChar.indexOf('L') != -1) {
-
-			// Double small l
-			String newFormatChar = formatChar.replace("L", "ll"); //$NON-NLS-1$ //$NON-NLS-2$
-			TypeDefStore.writeTypeDef(type, size, newFormatChar, dt);
-			writeCapitalHexType(newFormatChar, type, size, dt);
-
-		}
-
-		// Write alternative option to float types
-		else if (formatChar.equals("f") || formatChar.equals("e") //$NON-NLS-1$//$NON-NLS-2$
-				|| formatChar.equals("g")) { //$NON-NLS-1$
-
-			String newFormatChar = 'L' + formatChar;
-			TypeDefStore.writeTypeDef(type, size, newFormatChar, dt);
-		}
-
-		else {
-			// If length is one, add also formatchar with "l"
-			if (formatChar.length() == 1) {
-				String newFormatChar = "l" + formatChar; //$NON-NLS-1$
-				TypeDefStore.writeTypeDef(type, size, newFormatChar, dt);
-				writeCapitalHexType(newFormatChar, type, size, dt);
-			}
-
-			// Check capital hex need
-			writeCapitalHexType(formatChar, type, size, dt);
-		}
-	}
-
-	/**
-	 * Writes capital hex type
-	 * 
-	 * @param formatChar
-	 *            formatchar
-	 * @param type
-	 *            parameter type
-	 * @param size
-	 *            parameter size
-	 * @param dt
-	 *            data type
-	 */
-	private void writeCapitalHexType(String formatChar, String type, int size,
-			DataType dt) {
-
-		// Write also capital X if there are hex values
-		if (formatChar.indexOf('x') != -1) {
-			type = type.toUpperCase();
-			TypeDefStore.writeTypeDef(type, size, formatChar.replace('x', 'X'),
-					dt);
-		}
-	}
-
-	/**
-	 * Gets the parameter size from type
-	 * 
-	 * @param type
-	 *            the type
-	 * @return the size in bytes
-	 */
-	private int mapParameterTypeToSize(String type) {
-		int size = SourceUtils.mapParameterTypeToSize(type);
-		if (size == 0) {
-			if (type.equals(TraceParameter.ASCII)) {
-				size = 1;
-			} else if (type.equals(TraceParameter.UNICODE)) {
-				size = 2; // CodForChk_Dis_Magic
-			}
-		}
-		return size;
-	}
-
-	/**
-	 * Creates the trace definitions
-	 */
-	private void createDefs() {
-		// This should check for duplicates
-		TraceDataStore.startDataStore();
-		TraceModel model = dictionaryFile.getOwner().getModel();
-		TraceProjectAPI api = model.getExtension(TraceProjectAPI.class);
-		for (TraceGroup group : model) {
-			for (Trace trace : group) {
-				trace.addExtension(new DictionaryDefRef(++defref));
-				TraceFormatFlags flags = new TraceFormatFlags();
-				flags.isFormattingSupported = true;
-				String data = api.formatTraceForExport(trace, flags);
-				data = replaceUnescapeQuotes(data);
-				TraceDataStore.writeData(defref, DataType.STRING, data);
-			}
-		}
-		TraceDataStore.endDataStore();
-	}
-
-	/**
-	 * Replaces unescape quates
-	 * 
-	 * @param data
-	 *            the data
-	 * @return the new string
-	 */
-	private String replaceUnescapeQuotes(String data) {
-		data = data.replace("\\\"", "\""); //$NON-NLS-1$ //$NON-NLS-2$
-		return data;
-	}
-
-	/**
-	 * Maps a basic type to a Dictionary data type
-	 * 
-	 * @param type
-	 *            the type
-	 * @return the data type
-	 */
-	private DataType mapTypeToDataType(String type) { // CodForChk_Dis_ComplexFunc
-		DataType retval;
-		// Unsigned is not supported in Dictionary
-		if (type.equals(TraceParameter.SDEC32)) {
-			retval = DataType.INTEGER;
-		} else if (type.equals(TraceParameter.HEX32)) {
-			retval = DataType.HEX;
-		} else if (type.equals(TraceParameter.UDEC32)) {
-			retval = DataType.INTEGER;
-		} else if (type.equals(TraceParameter.OCT32)) {
-			retval = DataType.OCTAL;
-		} else if (type.equals(TraceParameter.SDEC16)) {
-			retval = DataType.INTEGER;
-		} else if (type.equals(TraceParameter.HEX16)) {
-			retval = DataType.HEX;
-		} else if (type.equals(TraceParameter.UDEC16)) {
-			retval = DataType.INTEGER;
-		} else if (type.equals(TraceParameter.OCT16)) {
-			retval = DataType.OCTAL;
-		} else if (type.equals(TraceParameter.SDEC8)) {
-			retval = DataType.INTEGER;
-		} else if (type.equals(TraceParameter.HEX8)) {
-			retval = DataType.HEX;
-		} else if (type.equals(TraceParameter.UDEC8)) {
-			retval = DataType.INTEGER;
-		} else if (type.equals(TraceParameter.OCT8)) {
-			retval = DataType.OCTAL;
-		} else if (type.equals(TraceParameter.SDEC64)) {
-			retval = DataType.INTEGER;
-		} else if (type.equals(TraceParameter.HEX64)) {
-			retval = DataType.HEX;
-		} else if (type.equals(TraceParameter.UDEC64)) {
-			retval = DataType.INTEGER;
-		} else if (type.equals(TraceParameter.OCT64)) {
-			retval = DataType.OCTAL;
-		} else if (type.equals(TraceParameter.ASCII)) {
-			retval = DataType.STRING;
-		} else if (type.equals(TraceParameter.UNICODE)) {
-			retval = DataType.STRING;
-		} else if (type.equals(TraceParameter.FLOAT_FIX)) {
-			retval = DataType.FLOAT;
-		} else if (type.equals(TraceParameter.FLOAT_EXP)) {
-			retval = DataType.FLOAT;
-		} else if (type.equals(TraceParameter.FLOAT_OPT)) {
-			retval = DataType.FLOAT;
-		} else if (type.equals(TraceParameter.POINTER)) {
-			retval = DataType.HEX;
-		} else {
-			retval = null;
-		}
-		return retval;
-	}
-
-	/**
-	 * Creates the location definitions
-	 */
-	private void createLocations() {
-		ArrayList<DictionaryFileRef> files = new ArrayList<DictionaryFileRef>();
-		LocationStore.startLocations();
-		for (TraceGroup group : dictionaryFile.getOwner().getModel()) {
-			for (Trace trace : group) {
-				writeLocation(files, trace);
-			}
-		}
-		// Build XML and assign ID's to refs
-		Collections.sort(files, new FileRefComparator());
-		String lastpath = null;
-		for (DictionaryFileRef ref : files) {
-			if (!ref.path.equals(lastpath)) {
-				if (lastpath != null) {
-					LocationStore.endPath();
-				}
-				LocationStore.startPath(ref.path);
-				lastpath = ref.path;
-			}
-			LocationStore.writeFile(++fileref, ref.file);
-			ref.refid = fileref;
-		}
-		if (lastpath != null) {
-			LocationStore.endPath();
-		}
-		LocationStore.endLocations();
-	}
-
-	/**
-	 * Writes the location of a trace
-	 * 
-	 * @param files
-	 *            file references
-	 * @param trace
-	 *            trace to be written
-	 */
-	private void writeLocation(ArrayList<DictionaryFileRef> files, Trace trace) {
-		LocationProperties loc = findFirstLocation(trace);
-		if (loc != null) {
-			String path = loc.getFilePath();
-			String file = loc.getFileName();
-			if (path != null) {
-				path = FileUtils.convertSeparators(
-						SourceConstants.FORWARD_SLASH_CHAR, path, true);
-				// TODO: Remove drive letter. Actually cannot remove drive
-				// letter because EPOCROOT might not be in the root of the drive
-			}
-			DictionaryFileRef ref = getRef(files, file, path);
-			if (ref == null) {
-				ref = new DictionaryFileRef(file, path, trace);
-				files.add(ref);
-				trace.addExtension(ref);
-			} else {
-				trace.addExtension(ref);
-			}
-		}
-	}
-
-	/**
-	 * Finds the first location from trace
-	 * 
-	 * @param trace
-	 *            the trace
-	 * @return the location
-	 */
-	private LocationProperties findFirstLocation(Trace trace) {
-		Iterator<LocationListBase> itr = trace
-				.getExtensions(LocationListBase.class);
-		LocationProperties loc = null;
-		while (itr.hasNext() && loc == null) {
-			Iterator<LocationProperties> locs = itr.next().iterator();
-			if (locs.hasNext()) {
-				loc = locs.next();
-			}
-		}
-		return loc;
-	}
-
-	/**
-	 * Gets a file reference
-	 * 
-	 * @param files
-	 *            the list of file references
-	 * @param file
-	 *            file name
-	 * @param path
-	 *            file path
-	 * @return the file reference
-	 */
-	private DictionaryFileRef getRef(ArrayList<DictionaryFileRef> files,
-			String file, String path) {
-		DictionaryFileRef retval = null;
-		for (int i = 0; i < files.size() && retval == null; i++) {
-			DictionaryFileRef ref = files.get(i);
-			if (ref.file.equals(file) && ref.path.equals(path)) {
-				retval = ref;
-			}
-		}
-		return retval;
-	}
-
-	/**
-	 * Creates the component definition
-	 */
-	private void createComponent() {
-		TraceModel model = dictionaryFile.getOwner().getModel();
-		int compid = model.getID();
-		// Component prefix and suffix are in property file.
-		// If not there, the default values are used
-		String prefix = TraceObjectUtils.findProperty(model,
-				PropertyNames.PREFIX);
-		if (prefix == null || prefix.length() == 0) {
-			prefix = FormattingUtils.getDefaultComponentPrefix(model);
-		}
-		String suffix = TraceObjectUtils.findProperty(model,
-				PropertyNames.SUFFIX);
-		if (suffix == null || suffix.length() == 0) {
-			suffix = FormattingUtils.getDefaultComponentSuffix(model);
-		}
-		Dictionary.startComponent(compid, dictionaryFile.getProjectName(),
-				prefix, suffix);
-		for (TraceGroup group : model) {
-			createGroup(group);
-		}
-		Dictionary.endComponent();
-	}
-
-	/**
-	 * Creates a group definition
-	 * 
-	 * @param group
-	 *            the group
-	 */
-	private void createGroup(TraceGroup group) {
-		String prefix = TraceObjectUtils.findProperty(group,
-				PropertyNames.PREFIX);
-		if (prefix == null || prefix.length() == 0) {
-			prefix = FormattingUtils.getDefaultGroupPrefix(group);
-		}
-		String suffix = TraceObjectUtils.findProperty(group,
-				PropertyNames.SUFFIX);
-		if (suffix == null || suffix.length() == 0) {
-			suffix = FormattingUtils.getDefaultGroupSuffix(group);
-		}
-		TraceComponent.startGroup(group.getID(), group.getName(), prefix,
-				suffix);
-		for (Trace trace : group) {
-			createTrace(trace);
-		}
-		TraceComponent.endGroup();
-	}
-
-	/**
-	 * Creates a trace definition
-	 * 
-	 * @param trace
-	 *            the trace
-	 */
-	private void createTrace(Trace trace) {
-		DictionaryDefRef defref = trace.getExtension(DictionaryDefRef.class);
-		if (defref != null) {
-			DictionaryFileRef fileref = trace
-					.getExtension(DictionaryFileRef.class);
-			com.nokia.tracecompiler.decodeplugins.dictionary.encoder.TraceGroup.startTrace(defref
-					.getRefId(), trace.getName());
-			if (fileref != null) {
-				writeTraceWithLocation(fileref.getRefId(), trace);
-			} else {
-				com.nokia.tracecompiler.decodeplugins.dictionary.encoder.Trace.writeInstance(trace
-						.getID(), 0, 0, "", //$NON-NLS-1$
-						""); //$NON-NLS-1$
-			}
-			com.nokia.tracecompiler.decodeplugins.dictionary.encoder.TraceGroup.endTrace();
-		}
-		trace.removeExtensions(DictionaryRef.class);
-
-	}
-
-	/**
-	 * Writes a trace which has a source location
-	 * 
-	 * @param refId
-	 *            file reference number
-	 * @param trace
-	 *            the trace
-	 */
-	private void writeTraceWithLocation(int refId, Trace trace) {
-		LocationProperties loc = findFirstLocation(trace);
-		int line = 0;
-		String className = ""; //$NON-NLS-1$
-		String functionName = ""; //$NON-NLS-1$
-		if (loc != null) {
-			line = loc.getLineNumber();
-			className = loc.getClassName();
-			functionName = loc.getFunctionName();
-		}
-		com.nokia.tracecompiler.decodeplugins.dictionary.encoder.Trace.writeInstance(trace.getID(),
-				refId, line, functionName, className);
-	}
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/DictionaryPreferences.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,46 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Preferences for dictionary
-*
-*/
-package com.nokia.tracecompiler.decodeplugins.dictionary;
-
-/**
- * Preferences for dictionary
- * 
- */
-public interface DictionaryPreferences {
-
-	/**
-	 * Export path for dictionary files
-	 */
-	String EXPORT_PATH = "Dictionary.exportPath"; //$NON-NLS-1$
-
-	/**
-	 * Default path where to export dictionary files
-	 */
-	String DEFAULT_EXPORT_PATH = "epoc32/ost_dictionaries"; //$NON-NLS-1$
-
-	/**
-	 * Gets a property from preferences
-	 * 
-	 * @param name
-	 *            the property name
-	 * @return the property value
-	 */
-	public String getString(String name);
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/DictionaryRef.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,72 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Reference base class
-*
-*/
-package com.nokia.tracecompiler.decodeplugins.dictionary;
-
-import com.nokia.tracecompiler.model.TraceModelExtension;
-import com.nokia.tracecompiler.model.TraceObject;
-
-/**
- * Reference base class
- * 
- */
-class DictionaryRef implements TraceModelExtension {
-
-	/**
-	 * Reference id
-	 */
-	int refid;
-
-	/**
-	 * Constructor
-	 * 
-	 * @param refid
-	 *            the reference id
-	 */
-	DictionaryRef(int refid) {
-		this.refid = refid;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.model.TraceModelExtension#getOwner()
-	 */
-	public TraceObject getOwner() {
-		return null;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.model.TraceModelExtension#
-	 *      setOwner(com.nokia.tracecompiler.model.TraceObject)
-	 */
-	public void setOwner(TraceObject owner) {
-	}
-
-	/**
-	 * Gets the reference id
-	 * 
-	 * @return ID
-	 */
-	int getRefId() {
-		return refid;
-	}
-
-}
\ No newline at end of file
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/Messages.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,64 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Localization for dictionary package
-*
-*/
-package com.nokia.tracecompiler.decodeplugins.dictionary;
-
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-/**
- * Localization for dictionary package
- * 
- */
-class Messages {
-
-	/**
-	 * Bundle name
-	 */
-	private static final String BUNDLE_NAME = "com.nokia.tracecompiler.decodeplugins.dictionary.messages"; //$NON-NLS-1$
-
-	/**
-	 * Bundle
-	 */
-	private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
-			.getBundle(BUNDLE_NAME);
-
-	/**
-	 * Prevents construction
-	 */
-	private Messages() {
-
-	}
-
-	/**
-	 * Gets localized string based on key
-	 * 
-	 * @param key
-	 *            the resource key
-	 * @return the localized resource
-	 */
-	public static String getString(String key) {
-		String value;
-		try {
-			value = RESOURCE_BUNDLE.getString(key);
-		} catch (MissingResourceException e) {
-			value = '!' + key + '!';
-		}
-		return value;
-	}
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/encoder/DataType.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,96 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* DataType enumeration
-*
-*/
-package com.nokia.tracecompiler.decodeplugins.dictionary.encoder;
-
-/**
- * DataType enumeration
- * 
- */
-public enum DataType {
-
-	/**
-	 * String type
-	 */
-	STRING("string"), //$NON-NLS-1$
-
-	/**
-	 * Integer type
-	 */
-	INTEGER("integer"), //$NON-NLS-1$
-
-	/**
-	 * Float type
-	 */
-	FLOAT("float"), //$NON-NLS-1$
-
-	/**
-	 * Hex type
-	 */
-	HEX("hex"), //$NON-NLS-1$
-
-	/**
-	 * Binary type
-	 */
-	BINARY("binary"), //$NON-NLS-1$
-
-	/**
-	 * Octal type
-	 */
-	OCTAL("octal"), //$NON-NLS-1$
-
-	/**
-	 * Enum type
-	 */
-	ENUM("enum"), //$NON-NLS-1$
-
-	/**
-	 * Raw type
-	 */
-	RAW("raw"), //$NON-NLS-1$
-
-	/**
-	 * Compound type
-	 */
-	COMPOUND("compound"); //$NON-NLS-1$
-
-	/**
-	 * Data type
-	 */
-	private final String type;
-
-	/**
-	 * Constructor
-	 * 
-	 * @param type
-	 *            the type
-	 */
-	private DataType(String type) {
-		this.type = type;
-	}
-
-	/**
-	 * Gets the type as string
-	 * 
-	 * @return type
-	 */
-	public String getType() {
-		return type;
-	}
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/encoder/Dictionary.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,101 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Dictionary tag
-*
-*/
-package com.nokia.tracecompiler.decodeplugins.dictionary.encoder;
-
-/**
- * Dictionary tag
- * 
- */
-public class Dictionary {
-
-	/**
-	 * Writes start of the XML file and starts &lt;tracedictionary&gt; structure
-	 */
-	public static void startDictionary() {
-		TagWriter.write(TagWriter.XML_START, TagWriter.INDENT_0);
-		TagWriter.write(TagWriter.DICTIONARY_START, TagWriter.INDENT_0);
-	}
-
-	/**
-	 * Writes &lt;/tracedictionary&gt;
-	 */
-	public static void endDictionary() {
-		TagWriter.write(TagWriter.DICTIONARY_END, TagWriter.INDENT_0);
-		TagWriter.close();
-	}
-
-	/**
-	 * Starts &lt;component id="", name="" prefix="" suffix=""&gt; structure
-	 * 
-	 * @param id
-	 *            unique component id within dictionary
-	 * @param name
-	 *            name of the component
-	 * @param prefix
-	 *            optional prefix for the component
-	 * @param suffix
-	 *            optional suffix for the component
-	 */
-	public static void startComponent(int id, String name, String prefix,
-			String suffix) {
-		TraceComponent.startComponent(id, name, prefix, suffix);
-
-	}
-
-	/**
-	 * Writes &lt;/component&gt;
-	 */
-	public static void endComponent() {
-		TraceComponent.endComponent();
-	}
-
-	/**
-	 * Starts &lt;metadata&gt; structure
-	 */
-	public static void startMetaData() {
-		TagWriter.write(TagWriter.METADATA_START, TagWriter.INDENT_1);
-	}
-
-	/**
-	 * Writes user defined tags &lt;mytagXXX&gt;value&lt;/mytagXXX&gt;
-	 * 
-	 * @param name
-	 *            tag
-	 * @param value
-	 *            value of the tag
-	 */
-	public static void writeMetaData(String name, String value) {
-		StringBuffer sb = new StringBuffer();
-		sb.append(TagWriter.START_TAG_OPEN);
-		sb.append(name);
-		sb.append(TagWriter.TAG_CLOSE);
-		sb.append(XMLDataFilter.changeData(value));
-		sb.append(TagWriter.END_TAG_OPEN);
-		sb.append(name);
-		sb.append(TagWriter.TAG_CLOSE);
-		TagWriter.write(sb.toString(), TagWriter.INDENT_2);
-	}
-
-	/**
-	 * Writes &lt;/metadata&gt;
-	 */
-	public static void endMetaData() {
-		TagWriter.write(TagWriter.METADATA_END, TagWriter.INDENT_1);
-	}
-}
\ No newline at end of file
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/encoder/LocationStore.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,81 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Location store
-*
-*/
-package com.nokia.tracecompiler.decodeplugins.dictionary.encoder;
-
-/**
- * Location store
- * 
- */
-public class LocationStore {
-
-	/**
-	 * Writes &lt;locations&gt;
-	 */
-	public static void startLocations() {
-		TagWriter.write(TagWriter.LOCATIONS_START, TagWriter.INDENT_1);
-	}
-
-	/**
-	 * Starts &lt;path val=""&gt; structure
-	 * 
-	 * @param path
-	 *            relative or absolute path to some directory
-	 */
-	public static void startPath(String path) {
-		StringBuffer sb = new StringBuffer();
-		sb.append(TagWriter.PATH_START_OPEN);
-		TagWriter.appendAttribute(sb, TagWriter.VAL_ATTR, path, false);
-		sb.append(TagWriter.TAG_CLOSE);
-		TagWriter.write(sb.toString(), TagWriter.INDENT_2);
-	}
-
-	/**
-	 * Writes &lt;file id=""&gt;fileName&lt;/file&gt; structure
-	 * 
-	 * @param id
-	 *            unique number within &lt;locations&gt; structure
-	 * @param fileName
-	 *            value of the file element
-	 */
-	public static void writeFile(int id, String fileName) {
-		StringBuffer sb = new StringBuffer();
-		sb.append(TagWriter.FILE_START_OPEN);
-		TagWriter.appendAttribute(sb, TagWriter.ID_ATTR, String.valueOf(id),
-				false);
-		sb.append(TagWriter.TAG_CLOSE);
-		sb.append(XMLDataFilter.changeData(fileName));
-		sb.append(TagWriter.FILE_END);
-		TagWriter.write(sb.toString(), TagWriter.INDENT_3);
-	}
-
-	/**
-	 * Writes &lt;/path&gt;
-	 */
-	public static void endPath() {
-		TagWriter.write(TagWriter.PATH_END, TagWriter.INDENT_2);
-	}
-
-	/**
-	 * Writes &lt;/locations&gt;
-	 */
-	public static void endLocations() {
-		TagWriter.write(TagWriter.LOCATIONS_END, TagWriter.INDENT_1);
-	}
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/encoder/Options.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,69 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Options
-*
-*/
-package com.nokia.tracecompiler.decodeplugins.dictionary.encoder;
-
-/**
- * Options
- * 
- */
-public class Options {
-
-	/**
-	 * Writes &lt;options&gt;
-	 * 
-	 * @param indent
-	 *            amount of tabs for indent
-	 */
-	static void startOptions(int indent) {
-		TagWriter.write(TagWriter.OPTIONS_START, indent);
-	}
-
-	/**
-	 * Writes &lt;/options&gt;
-	 * 
-	 * @param indent
-	 *            amount of tabs for indent
-	 */
-	static void endOptions(int indent) {
-		TagWriter.write(TagWriter.OPTIONS_END, indent);
-	}
-
-	/**
-	 * Writes user defined tags &lt;mytagXXX&gt;value&lt;/mytagXXX&gt;
-	 * 
-	 * @param tag
-	 *            user defined tag
-	 * @param value
-	 *            value of the tag
-	 * @param indent
-	 *            amount of tabs for indent
-	 */
-	static void writeOptions(String tag, String value, int indent) {
-		StringBuffer sb = new StringBuffer();
-		sb.append(TagWriter.START_TAG_OPEN);
-		sb.append(tag);
-		sb.append(TagWriter.TAG_CLOSE);
-		sb.append(XMLDataFilter.changeData(value));
-		sb.append(TagWriter.END_TAG_OPEN);
-		sb.append(tag);
-		sb.append(TagWriter.TAG_CLOSE);
-		TagWriter.write(sb.toString(), indent);
-	}
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/encoder/TagWriter.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,489 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Tag writer
-*
-*/
-package com.nokia.tracecompiler.decodeplugins.dictionary.encoder;
-
-import java.io.BufferedOutputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-
-/**
- * Tag writer
- * 
- */
-class TagWriter {
-
-	/**
-	 * 
-	 */
-	private static final String OUTPUT_FORMAT_UTF8 = "UTF-8"; //$NON-NLS-1$
-
-	/**
-	 * 
-	 */
-	private static OutputStreamWriter m_writer = null;
-
-	/**
-	 * 
-	 */
-	static final String XML_START = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"; //$NON-NLS-1$
-
-	/**
-	 * 
-	 */
-	static final String CLASSIFICATION_ATTR = "classification="; //$NON-NLS-1$
-
-	/**
-	 * 
-	 */
-	static final String CLASSNAME_ATTR = "classname="; //$NON-NLS-1$
-
-	/**
-	 * 
-	 */
-	static final String COMPONENT_START_OPEN = "<component "; //$NON-NLS-1$
-
-	/**
-	 * 
-	 */
-	static final String COMPONENT_END = "</component>"; //$NON-NLS-1$
-
-	/**
-	 * 
-	 */
-	static final String DATA_REF_ATTR = "data-ref="; //$NON-NLS-1$
-
-	/**
-	 * 
-	 */
-	static final String DATASTORE_START = "<datastore>"; //$NON-NLS-1$
-
-	/**
-	 * 
-	 */
-	static final String DATASTORE_END = "<datastore>"; //$NON-NLS-1$
-
-	/**
-	 * 
-	 */
-	static final String DEF_END = "</def>"; //$NON-NLS-1$
-
-	/**
-	 * 
-	 */
-	static final String DEF_START_OPEN = "<def "; //$NON-NLS-1$
-
-	/**
-	 * 
-	 */
-	static final String DICTIONARY_START = "<tracedictionary xmlns:xsi=" + //$NON-NLS-1$
-			"\"http://www.w3.org/2001/XMLSchema-instance\" " + //$NON-NLS-1$
-			"xsi:noNamespaceSchemaLocation=\"DictionarySchema.xsd\">";//$NON-NLS-1$
-
-	/**
-	 * 
-	 */
-	static final String DICTIONARY_END = "</tracedictionary>"; //$NON-NLS-1$
-
-	/**
-	 * 
-	 */
-	static final String END_TAG_OPEN = "</"; //$NON-NLS-1$
-
-	/**
-	 * 
-	 */
-	static final String EXTERNAL_DEF_END = "</external-def>"; //$NON-NLS-1$
-
-	/**
-	 * 
-	 */
-	static final String EXTERNAL_DEF_START = "<external-def>"; //$NON-NLS-1$
-
-	/**
-	 * 
-	 */
-	static final String FILE_START_OPEN = "<file "; //$NON-NLS-1$
-
-	/**
-	 * 
-	 */
-	static final String FILE_END = "</file>"; //$NON-NLS-1$
-
-	/**
-	 * 
-	 */
-	static final String FORMATCHAR_ATTR = "formatchar="; //$NON-NLS-1$
-
-	/**
-	 * 
-	 */
-	static final String GROUP_END = "</group>"; //$NON-NLS-1$
-
-	/**
-	 * 
-	 */
-	static final String GROUP_START_OPEN = "<group "; //$NON-NLS-1$
-
-	/**
-	 * 
-	 */
-	static final String ID_ATTR = "id="; //$NON-NLS-1$
-
-	/**
-	 * 
-	 */
-	static final String INSTANCE_START_OPEN = "<instance "; //$NON-NLS-1$
-
-	/**
-	 * 
-	 */
-	static final String INSTANCE_END = "</instance>"; //$NON-NLS-1$
-
-	/**
-	 * 
-	 */
-	static final String LINE_ATTR = "line="; //$NON-NLS-1$
-
-	/**
-	 * 
-	 */
-	static final String LOC_REF_ATTR = "loc-ref="; //$NON-NLS-1$
-
-	/**
-	 * 
-	 */
-	static final String LOCATIONS_START = "<locations>"; //$NON-NLS-1$
-
-	/**
-	 * 
-	 */
-	static final String LOCATIONS_END = "</locations>"; //$NON-NLS-1$
-
-	/**
-	 * 
-	 */
-	static final String METHODNAME_ATTR = "methodname="; //$NON-NLS-1$
-
-	/**
-	 * 
-	 */
-	static final String METADATA_START = "<metadata>"; //$NON-NLS-1$
-
-	/**
-	 * 
-	 */
-	static final String METADATA_END = "</metadata>"; //$NON-NLS-1$
-
-	/**
-	 * 
-	 */
-	static final String NAME_ATTR = "name="; //$NON-NLS-1$
-
-	/**
-	 * 
-	 */
-	static final String NAME_START = "<name>"; //$NON-NLS-1$
-
-	/**
-	 * 
-	 */
-	static final String NAME_END = "</name>"; //$NON-NLS-1$
-
-	/**
-	 * 
-	 */
-	static final String OBJECT_END = "</object>"; //$NON-NLS-1$
-
-	/**
-	 * 
-	 */
-	static final String OBJECT_START = "<object>"; //$NON-NLS-1$
-
-	/**
-	 * 
-	 */
-	static final String OBJECT_START_OPEN = "<object "; //$NON-NLS-1$
-
-	/**
-	 * 
-	 */
-	static final String OPTIONS_START = "<options>"; //$NON-NLS-1$
-
-	/**
-	 * 
-	 */
-	static final String OPTIONS_START_OPEN = "<options "; //$NON-NLS-1$
-
-	/**
-	 * 
-	 */
-	static final String OPTIONS_END = "</options>"; //$NON-NLS-1$
-
-	/**
-	 * 
-	 */
-	static final String PATH_START_OPEN = "<path "; //$NON-NLS-1$
-
-	/**
-	 * 
-	 */
-	static final String PATH_END = "</path>"; //$NON-NLS-1$
-
-	/**
-	 * 
-	 */
-	static final String PREFIX_ATTR = "prefix="; //$NON-NLS-1$
-
-	/**
-	 * 
-	 */
-	static final String QUOTE = "\""; //$NON-NLS-1$
-
-	/**
-	 * 
-	 */
-	static final String ROW_CHANGE = "\n"; //$NON-NLS-1$
-
-	/**
-	 * 
-	 */
-	static final String SIZE_ATTR = "size="; //$NON-NLS-1$
-
-	/**
-	 * 
-	 */
-	static final String SPACE = " "; //$NON-NLS-1$
-
-	/**
-	 * 
-	 */
-	static final String START_TAG_OPEN = "<"; //$NON-NLS-1$
-
-	/**
-	 * 
-	 */
-	static final String SUFFIX_ATTR = "suffix="; //$NON-NLS-1$
-
-	/**
-	 * 
-	 */
-	static final String TAB = "\t"; //$NON-NLS-1$
-
-	/**
-	 * 
-	 */
-	static final String TAG_CLOSE = ">"; //$NON-NLS-1$
-
-	/**
-	 * 
-	 */
-	static final String TAG_END = "/>"; //$NON-NLS-1$
-
-	/**
-	 * 
-	 */
-	static final String TRACE_END = "</trace>"; //$NON-NLS-1$
-
-	/**
-	 * 
-	 */
-	static final String TRACE_START = "<trace>"; //$NON-NLS-1$
-
-	/**
-	 * 
-	 */
-	static final String TRACE_START_OPEN = "<trace "; //$NON-NLS-1$
-
-	/**
-	 * 
-	 */
-	static final String TRACE_DATA_END = "</data>"; //$NON-NLS-1$
-
-	/**
-	 * 
-	 */
-	static final String TRACE_DATA_START = "<data>"; //$NON-NLS-1$
-
-	/**
-	 * 
-	 */
-	static final String TYPE_ATTR = "type="; //$NON-NLS-1$
-
-	/**
-	 * 
-	 */
-	static final String TYPEDEFS_START = "<typedefs>"; //$NON-NLS-1$
-
-	/**
-	 * 
-	 */
-	static final String TYPEDEFS_END = "</typedefs>"; //$NON-NLS-1$
-
-	/**
-	 * 
-	 */
-	static final String TYPEMEMBER_END = "</typemember>"; //$NON-NLS-1$
-
-	/**
-	 * 
-	 */
-	static final String TYPEMEMBER_START = "<typemember>"; //$NON-NLS-1$
-
-	/**
-	 * 
-	 */
-	static final String TYPEMEMBER_START_OPEN = "<typemember "; //$NON-NLS-1$
-
-	/**
-	 * 
-	 */
-	static final String VAL_ATTR = "val="; //$NON-NLS-1$
-
-	/**
-	 * 
-	 */
-	static final String VALUE_ATTR = "value="; //$NON-NLS-1$
-
-	/**
-	 * 
-	 */
-	static final String VALUE_START = "<value>"; //$NON-NLS-1$
-
-	/**
-	 * 
-	 */
-	static final String VALUE_END = "</value>"; //$NON-NLS-1$
-
-	/**
-	 * 
-	 */
-	static final int INDENT_0 = 0;
-
-	/**
-	 * 
-	 */
-	static final int INDENT_1 = 1;
-
-	/**
-	 * 
-	 */
-	static final int INDENT_2 = 2; // CodForChk_Dis_Magic
-
-	/**
-	 * 
-	 */
-	static final int INDENT_3 = 3;// CodForChk_Dis_Magic
-
-	/**
-	 * 
-	 */
-	static final int INDENT_4 = 4;// CodForChk_Dis_Magic
-
-	/**
-	 * 
-	 */
-	static final int INDENT_5 = 5;// CodForChk_Dis_Magic
-
-	/**
-	 * 
-	 */
-	static final int INDENT_6 = 6;// CodForChk_Dis_Magic
-
-	/**
-	 * Initializes TagWriter
-	 * 
-	 * @param filePath
-	 *            name of the output file
-	 */
-	static void initialize(String filePath) {
-		try {
-			OutputStream fout = new FileOutputStream(filePath);
-			OutputStream bout = new BufferedOutputStream(fout);
-			m_writer = new OutputStreamWriter(bout, OUTPUT_FORMAT_UTF8);
-		} catch (java.io.IOException e) {
-			e.printStackTrace();
-		}
-	}
-
-	/**
-	 * Writes tag to XML file
-	 * 
-	 * @param tag
-	 *            name of the tag
-	 * @param indent
-	 *            amount of tabs for indent
-	 */
-	static void write(String tag, int indent) {
-		try {
-			StringBuffer sb = new StringBuffer();
-			for (int i = 0; i < indent; i++) {
-				sb.append(TAB);
-			}
-			sb.append(tag);
-			sb.append(ROW_CHANGE);
-			m_writer.write(sb.toString());
-		} catch (IOException e) {
-			e.printStackTrace();
-		}
-	}
-
-	/**
-	 * Appends attribute to given StringBuffer
-	 * 
-	 * @param sb
-	 *            buffer to be updated
-	 * @param attribute
-	 *            attribute to append
-	 * @param value
-	 *            value of the attribute
-	 * @param withSpace
-	 *            is there leading space before attribute
-	 */
-	static void appendAttribute(StringBuffer sb, String attribute,
-			String value, boolean withSpace) {
-		if (value != null) {
-			if (withSpace) {
-				sb.append(SPACE);
-			}
-			sb.append(attribute);
-			sb.append(QUOTE);
-			sb.append(value);
-			sb.append(QUOTE);
-		}
-	}
-
-	/**
-	 * Closes TagWriter
-	 */
-	static void close() {
-		try {
-			m_writer.flush();
-		} catch (IOException e) {
-			e.printStackTrace();
-		}
-
-		try {
-			m_writer.close();
-		} catch (IOException e) {
-			e.printStackTrace();
-		}
-	}
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/encoder/TestEncoder.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,133 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Testing class for Encoder
-*
-*/
-package com.nokia.tracecompiler.decodeplugins.dictionary.encoder;
-
-/**
- * Testing class for Encoder
- * 
- */
-public class TestEncoder {
-
-	/**
-	 * 
-	 */
-	private static final String DICTIONARY1 = "c:\\Temp\\traces.xml"; //$NON-NLS-1$
-
-	/**
-	 * 
-	 */
-	private static final String DICTIONARY2 = "c:\\Temp\\traces2.xml"; //$NON-NLS-1$
-
-	/**
-	 * @param args
-	 */
-	public static void main(String[] args) {
-		TraceDictionaryEncoder encoder = new TraceDictionaryEncoder();
-		encoder.createNewDictionary(DICTIONARY1);
-		Dictionary.startDictionary();
-		Dictionary.startMetaData();
-		Dictionary.writeMetaData("name", "<Metadata>"); //$NON-NLS-1$ //$NON-NLS-2$
-		Dictionary.writeMetaData("id", "1"); //$NON-NLS-1$ //$NON-NLS-2$
-		Dictionary.endMetaData();
-		TypeDefStore.startTypeDefs();
-		TypeDefStore.writeExternalDefFile("<?xml version=\"1.0\" encoding=" //$NON-NLS-1$
-				+ "\"UTF-8\"?> <external>c:\\Temp\\ExternalDef.xml</external>"); //$NON-NLS-1$
-		TypeDefStore.startTypeDef("TBool", 1, null, DataType.BINARY); //$NON-NLS-1$
-		TypeDef.writeTypeMember(0, "EFalse", "BOOL"); //$NON-NLS-1$ //$NON-NLS-2$
-		TypeDef.writeTypeMember(-1, "iX", "TInt"); //$NON-NLS-1$ //$NON-NLS-2$
-		TypeDef.writeTypeMember(0, "EFalse", null); //$NON-NLS-1$
-		TypeDefStore.endTypeDef();
-		TypeDefStore.startTypeDef("TPoint", -1, null, DataType.COMPOUND); //$NON-NLS-1$
-		TypeDef.writeTypeMember(-1, "iX", "TInt"); //$NON-NLS-1$ //$NON-NLS-2$
-		TypeDef.writeTypeMember(-1, "iY", "TInt"); //$NON-NLS-1$ //$NON-NLS-2$
-		TypeDefStore.endTypeDef();
-		TypeDefStore.writeTypeDef("TPixel", 1, "u", DataType.RAW); //$NON-NLS-1$ //$NON-NLS-2$
-		TypeDefStore.endTypeDefs();
-		TraceDataStore.startDataStore();
-		TraceDataStore.writeData(3, DataType.HEX, "<hex> value is 0xFF"); //$NON-NLS-1$ CodForChk_Dis_Magic
-		TraceDataStore.writeData(2, DataType.OCTAL, "<octal> value is 8"); //$NON-NLS-1$ CodForChk_Dis_Magic
-		TraceDataStore.writeData(1, DataType.BINARY, "<binary> value is 0"); //$NON-NLS-1$
-		TraceDataStore.endDataStore();
-		LocationStore.startLocations();
-		LocationStore.startPath("<?xml version=\"1.0\" encoding=" //$NON-NLS-1$
-				+ "\"UTF-8\"?><file>C:\\Temp\\</file>"); //$NON-NLS-1$
-		LocationStore.writeFile(1, "<?xml version=\"1.0\" encoding=" //$NON-NLS-1$
-				+ "\"UTF-8\"?><file>C:\\Temp\\file1.txt</file>"); //$NON-NLS-1$
-		LocationStore.writeFile(2, "<?xml version=\"1.0\" encoding=" //$NON-NLS-1$ CodForChk_Dis_Magic
-				+ "\"UTF-8\"?><file>C:\\Temp\\file2.txt</file>"); //$NON-NLS-1$
-		LocationStore.endPath();
-		LocationStore.endLocations();
-		Dictionary.startComponent(666, "Satan", null, null); //$NON-NLS-1$ CodForChk_Dis_Magic
-		TraceComponent.startOptions();
-		TraceComponent.writeOption("background", "red"); //$NON-NLS-1$ //$NON-NLS-2$
-		TraceComponent.startGroup(1, "Group UNO", "pre", "suf"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-		TraceGroup.startOptions();
-		TraceGroup.writeOption("JeesTag", "<Tampura>"); //$NON-NLS-1$ //$NON-NLS-2$
-		TraceGroup.writeOption("NoTag", "<Ilkves>"); //$NON-NLS-1$ //$NON-NLS-2$
-		TraceGroup.endOptions();
-		TraceGroup.startTrace(-1, null);
-		Trace.startOptions();
-		Trace.writeOption("MyTag", "Value"); //$NON-NLS-1$ //$NON-NLS-2$
-		Trace.endOptions();
-		Trace.writeInstance(99, 1, 22, "testMethod", "testClass"); //$NON-NLS-1$ //$NON-NLS-2$ CodForChk_Dis_Magic
-		TraceGroup.endTrace();
-		TraceGroup.startTrace(-1, null);
-		Trace.writeInstance(100, 1, 235, "heyBabe", "auts"); //$NON-NLS-1$ //$NON-NLS-2$ CodForChk_Dis_Magic
-		Trace.writeInstance(100, 2, 291, "heyBabe2", "auts2"); //$NON-NLS-1$ //$NON-NLS-2$ CodForChk_Dis_Magic
-		TraceGroup.endTrace();
-		TraceComponent.endGroup();
-		Dictionary.endComponent();
-		Dictionary.endDictionary();
-
-		TraceDictionaryEncoder encoder2 = new TraceDictionaryEncoder();
-		encoder2.createNewDictionary(DICTIONARY2);
-		Dictionary.startDictionary();
-		Dictionary.startMetaData();
-		Dictionary.writeMetaData("id", "1"); //$NON-NLS-1$ //$NON-NLS-2$
-		Dictionary.writeMetaData("name", "Metadata Example"); //$NON-NLS-1$ //$NON-NLS-2$
-		Dictionary.endMetaData();
-		TypeDefStore.startTypeDefs();
-		TypeDefStore.writeExternalDefFile("StandardTypeDefs.xml"); //$NON-NLS-1$
-		TypeDefStore.writeTypeDef("TUint", 4, "u", DataType.ENUM); //$NON-NLS-1$ //$NON-NLS-2$ CodForChk_Dis_Magic
-		TypeDefStore.startTypeDef("TBool", 1, null, DataType.ENUM); //$NON-NLS-1$
-		TypeDef.writeTypeMember(0, "EFalse", null); //$NON-NLS-1$
-		TypeDef.writeTypeMember(1, "ETrue", null); //$NON-NLS-1$
-		TypeDefStore.endTypeDef();
-		TraceDataStore.startDataStore();
-		TraceDataStore.writeData(1, DataType.STRING, "My integer value: %d"); //$NON-NLS-1$
-		TraceDataStore.endDataStore();
-		LocationStore.startLocations();
-		LocationStore.startPath("../src"); //$NON-NLS-1$
-		LocationStore.writeFile(1, "foo.cpp"); //$NON-NLS-1$
-		LocationStore.writeFile(2, "foo2.cpp"); //$NON-NLS-1$ CodForChk_Dis_Magic
-		LocationStore.endPath();
-		LocationStore.endLocations();
-		Dictionary.startComponent(12345678, "ComName", "ComPrefix", null); //$NON-NLS-1$ //$NON-NLS-2$ CodForChk_Dis_Magic
-		TraceComponent.startGroup(1, "Flow", "GroupPrefix", "GroupSuffix"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-		TraceGroup.startTrace(1, null);
-		Trace.writeInstance(1, 1, 14, "MyGlobalMethodL", null); //$NON-NLS-1$ CodForChk_Dis_Magic
-		Trace.writeInstance(2, 1, 214, "MyClassMethod", null); //$NON-NLS-1$ CodForChk_Dis_Magic
-		TraceGroup.endTrace();
-		TraceComponent.endGroup();
-		Dictionary.endComponent();
-		Dictionary.endDictionary();
-
-	}
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/encoder/Trace.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,120 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Writes Trace objects
-*
-*/
-package com.nokia.tracecompiler.decodeplugins.dictionary.encoder;
-
-/**
- * Writes Trace objects
- * 
- */
-public class Trace {
-
-	/**
-	 * Starts &lt;trace data-ref=""&gt; structure
-	 * 
-	 * @param dataRef
-	 *            reference to actual data stored in &lt;data&gt; structure
-	 * @param name
-	 *            name of the trace. Can be null if trace doesn't have name
-	 */
-	static void startTrace(int dataRef, String name) {
-		StringBuffer sb = new StringBuffer();
-		sb.append(TagWriter.TRACE_START_OPEN);
-		if (dataRef >= 0) {
-			TagWriter.appendAttribute(sb, TagWriter.DATA_REF_ATTR, String
-					.valueOf(dataRef), false);
-
-			if (name != null && name != "") { //$NON-NLS-1$
-				TagWriter.appendAttribute(sb, TagWriter.NAME_ATTR, name, true);
-			}
-		}
-		sb.append(TagWriter.TAG_CLOSE);
-		TagWriter.write(sb.toString(), TagWriter.INDENT_3);
-
-	}
-
-	/**
-	 * Writes &lt;/trace&gt;
-	 */
-	static void endTrace() {
-		TagWriter.write(TagWriter.TRACE_END, TagWriter.INDENT_3);
-	}
-
-	/**
-	 * Writes &lt;options&gt;
-	 */
-	public static void startOptions() {
-		Options.startOptions(TagWriter.INDENT_4);
-	}
-
-	/**
-	 * Writes &lt;/options&gt;
-	 */
-	public static void endOptions() {
-		Options.endOptions(TagWriter.INDENT_4);
-	}
-
-	/**
-	 * Writes user defined tags &lt;mytagXXX&gt;value&lt;/mytagXXX&gt;
-	 * 
-	 * @param tag
-	 *            user defined tag
-	 * @param value
-	 *            value of the tag
-	 */
-	public static void writeOption(String tag, String value) {
-		Options.writeOptions(tag, value, TagWriter.INDENT_5);
-	}
-
-	/**
-	 * Writes &lt;instance id="" locRef="" line="" methodName=""
-	 * className=""/&gt; structure
-	 * 
-	 * @param id
-	 *            unique id number for this instance in current group structure
-	 * @param locRef
-	 *            unique location reference for instance (reference to
-	 *            &lt;locations&gt; structure
-	 * @param line
-	 *            positive number of line where data were founded in source file
-	 * @param methodName
-	 *            name of the function from which trace was generated
-	 * @param className
-	 *            this is class name or namespace name for method described in
-	 *            methodname attribute
-	 */
-	public static void writeInstance(int id, int locRef, int line,
-			String methodName, String className) {
-		StringBuffer sb = new StringBuffer();
-		sb.append(TagWriter.INSTANCE_START_OPEN);
-		TagWriter.appendAttribute(sb, TagWriter.ID_ATTR, String.valueOf(id),
-				false);
-		TagWriter.appendAttribute(sb, TagWriter.LOC_REF_ATTR, String
-				.valueOf(locRef), true);
-		TagWriter.appendAttribute(sb, TagWriter.LINE_ATTR,
-				String.valueOf(line), true);
-		TagWriter.appendAttribute(sb, TagWriter.METHODNAME_ATTR, methodName,
-				true);
-		if (className != null) {
-			TagWriter.appendAttribute(sb, TagWriter.CLASSNAME_ATTR, className,
-					true);
-		}
-		sb.append(TagWriter.TAG_END);
-		TagWriter.write(sb.toString(), TagWriter.INDENT_4);
-	}
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/encoder/TraceComponent.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,111 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Writes component objects
-*
-*/
-package com.nokia.tracecompiler.decodeplugins.dictionary.encoder;
-
-/**
- * Writes component objects
- * 
- */
-public class TraceComponent {
-
-	/**
-	 * Starts &lt;component id="", name="" prefix="" suffix=""&gt; structure
-	 * 
-	 * @param id
-	 *            unique component id within dictionary
-	 * @param name
-	 *            name of the component
-	 * @param prefix
-	 *            optional prefix for the component
-	 * @param suffix
-	 *            optional suffix for the component
-	 */
-	static void startComponent(int id, String name, String prefix, String suffix) {
-		StringBuffer sb = new StringBuffer();
-		sb.append(TagWriter.COMPONENT_START_OPEN);
-		TagWriter.appendAttribute(sb, TagWriter.ID_ATTR, String.valueOf(id),
-				false);
-		TagWriter.appendAttribute(sb, TagWriter.NAME_ATTR, name, true);
-		if (prefix != null) {
-			TagWriter.appendAttribute(sb, TagWriter.PREFIX_ATTR, prefix, true);
-		}
-		if (suffix != null) {
-			TagWriter.appendAttribute(sb, TagWriter.SUFFIX_ATTR, suffix, true);
-		}
-		sb.append(TagWriter.TAG_CLOSE);
-		TagWriter.write(sb.toString(), TagWriter.INDENT_1);
-	}
-
-	/**
-	 * Writes &lt;/component&gt;
-	 */
-	static void endComponent() {
-		TagWriter.write(TagWriter.COMPONENT_END, TagWriter.INDENT_1);
-	}
-
-	/**
-	 * Writes &lt;options&gt;
-	 */
-	public static void startOptions() {
-		Options.startOptions(TagWriter.INDENT_2);
-	}
-
-	/**
-	 * Writes user defined tags &lt;mytagXXX&gt;value&lt;/mytagXXX&gt;
-	 * 
-	 * @param tag
-	 *            user defined tag
-	 * @param value
-	 *            value of the tag
-	 */
-	public static void writeOption(String tag, String value) {
-		Options.writeOptions(tag, value, TagWriter.INDENT_3);
-	}
-
-	/**
-	 * Writes &lt;/options&gt;
-	 */
-	public static void endOptions() {
-		Options.endOptions(TagWriter.INDENT_2);
-	}
-
-	/**
-	 * Starts &lt;group id="", name="" prefix="" suffix=""&gt; structure
-	 * 
-	 * @param id
-	 *            unique group identifier within dictionary
-	 * @param name
-	 *            group name
-	 * @param prefix
-	 *            optional prefix for the group
-	 * @param suffix
-	 *            optional suffix for the group
-	 */
-	public static void startGroup(int id, String name, String prefix,
-			String suffix) {
-		TraceGroup.startGroup(id, name, prefix, suffix);
-	}
-
-	/**
-	 * Writes &lt;/group&gt;
-	 */
-	public static void endGroup() {
-		TraceGroup.endGroup();
-	}
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/encoder/TraceDataStore.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,66 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Writes Data objects
-*
-*/
-package com.nokia.tracecompiler.decodeplugins.dictionary.encoder;
-
-/**
- * Writes Data objects
- * 
- */
-public class TraceDataStore {
-
-	/**
-	 * Writes &lt;data&gt;
-	 */
-	public static void startDataStore() {
-		TagWriter.write(TagWriter.TRACE_DATA_START, TagWriter.INDENT_1);
-	}
-
-	/**
-	 * Writes &lt;def id="" dataType=""&gt;value&lt;/def&gt; structure
-	 * 
-	 * @param id
-	 *            unique number in &lt;data&gt; structure, it is data identifier
-	 * @param dataType
-	 *            data type, defaults to string
-	 * @param value
-	 *            the value
-	 * 
-	 */
-	public static void writeData(int id, DataType dataType, String value) {
-		StringBuffer sb = new StringBuffer();
-		sb.append(TagWriter.DEF_START_OPEN);
-		TagWriter.appendAttribute(sb, TagWriter.ID_ATTR, String.valueOf(id),
-				false);
-		if (dataType != null) {
-			TagWriter.appendAttribute(sb, TagWriter.TYPE_ATTR, dataType
-					.getType(), true);
-		}
-		sb.append(TagWriter.TAG_CLOSE);
-		sb.append(XMLDataFilter.changeData(value));
-		sb.append(TagWriter.DEF_END);
-		TagWriter.write(sb.toString(), TagWriter.INDENT_2);
-	}
-
-	/**
-	 * Writes &lt;/data&gt;
-	 */
-	public static void endDataStore() {
-		TagWriter.write(TagWriter.TRACE_DATA_END, TagWriter.INDENT_1);
-	}
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/encoder/TraceDictionaryEncoder.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Dictionary encoder class
-*
-*/
-package com.nokia.tracecompiler.decodeplugins.dictionary.encoder;
-
-/**
- * Dictionary encoder class
- * 
- */
-public class TraceDictionaryEncoder {
-
-	/**
-	 * Constructor
-	 */
-	public TraceDictionaryEncoder() {
-	}
-
-	/**
-	 * Creates a new dictionary XML file to given path
-	 * 
-	 * @param filePath
-	 *            the path
-	 */
-	public void createNewDictionary(String filePath) {
-		TagWriter.initialize(filePath);
-	}
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/encoder/TraceGroup.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,107 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Writes groups objects
-*
-*/
-package com.nokia.tracecompiler.decodeplugins.dictionary.encoder;
-
-/**
- * Writes groups objects
- * 
- */
-public class TraceGroup {
-
-	/**
-	 * Writes &lt;options&gt;
-	 */
-	public static void startOptions() {
-		Options.startOptions(TagWriter.INDENT_3);
-	}
-
-	/**
-	 * Writes user defined tags &lt;mytagXXX&gt;value&lt;/mytagXXX&gt;
-	 * 
-	 * @param tag
-	 *            user defined tag
-	 * @param value
-	 *            value of the tag
-	 */
-	public static void writeOption(String tag, String value) {
-		Options.writeOptions(tag, value, TagWriter.INDENT_4);
-	}
-
-	/**
-	 * Writes &lt;/options&gt;
-	 */
-	public static void endOptions() {
-		Options.endOptions(TagWriter.INDENT_3);
-	}
-
-	/**
-	 * Starts &lt;trace data-ref=""&gt; structure
-	 * 
-	 * @param dataRef
-	 *            reference to actual data stored in &lt;data&gt; structure
-	 * @param name
-	 *            name of the trace. Can be null if trace doesn't have name            
-	 */
-	public static void startTrace(int dataRef, String name) {
-		Trace.startTrace(dataRef, name);
-	}
-
-	/**
-	 * Writes &lt;/trace&gt;
-	 */
-	public static void endTrace() {
-		Trace.endTrace();
-	}
-
-	/**
-	 * Starts &lt;group id="", name="" prefix="" suffix=""&gt; structure
-	 * 
-	 * @param id
-	 *            unique group identifier within dictionary
-	 * @param name
-	 *            group name
-	 * @param prefix
-	 *            optional prefix for the group
-	 * @param suffix
-	 *            optional suffix for the group
-	 */
-	static void startGroup(int id, String name, String prefix, String suffix) {
-		StringBuffer sb = new StringBuffer();
-		sb.append(TagWriter.GROUP_START_OPEN);
-		TagWriter.appendAttribute(sb, TagWriter.ID_ATTR, String.valueOf(id),
-				false);
-		TagWriter.appendAttribute(sb, TagWriter.NAME_ATTR, name, true);
-		if (prefix != null) {
-			TagWriter.appendAttribute(sb, TagWriter.PREFIX_ATTR, prefix, true);
-		}
-		if (suffix != null) {
-			TagWriter.appendAttribute(sb, TagWriter.SUFFIX_ATTR, suffix, true);
-		}
-		sb.append(TagWriter.TAG_CLOSE);
-		TagWriter.write(sb.toString(), TagWriter.INDENT_2);
-
-	}
-
-	/**
-	 * Writes &lt;/group&gt;
-	 */
-	static void endGroup() {
-		TagWriter.write(TagWriter.GROUP_END, TagWriter.INDENT_2);
-	}
-}
\ No newline at end of file
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/encoder/TypeDef.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,52 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Writes type def objects
-*
-*/
-package com.nokia.tracecompiler.decodeplugins.dictionary.encoder;
-
-/**
- * Writes type def objects
- * 
- */
-public class TypeDef {
-
-	/**
-	 * Writes &lt;typemember value="" name="" type=""/&gt; structure
-	 * 
-	 * @param value
-	 *            value which will be assigned to name attribute in case where
-	 *            object have classification equals enum
-	 * @param name
-	 *            text which is assigned to value attribute or to type attribute
-	 * @param type
-	 *            name of data type that will be assigned to name attribute in
-	 *            case where object classification equals compound
-	 */
-	public static void writeTypeMember(int value, String name, String type) {
-		StringBuffer sb = new StringBuffer();
-		sb.append(TagWriter.TYPEMEMBER_START_OPEN);
-		TagWriter.appendAttribute(sb, TagWriter.VALUE_ATTR, String
-				.valueOf(value), false);
-		TagWriter.appendAttribute(sb, TagWriter.NAME_ATTR, name, true);
-		if (type != null) { // optional attribute
-			TagWriter.appendAttribute(sb, TagWriter.TYPE_ATTR, type, true);
-		}
-		sb.append(TagWriter.TAG_END);
-		TagWriter.write(sb.toString(), TagWriter.INDENT_3);
-	}
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/encoder/TypeDefStore.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,128 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Writes type definition objects
-*
-*/
-package com.nokia.tracecompiler.decodeplugins.dictionary.encoder;
-
-/**
- * Writes type definition objects
- * 
- */
-public class TypeDefStore {
-
-	/**
-	 * Writes &lt;typedef&gt;
-	 */
-	public static void startTypeDefs() {
-		TagWriter.write(TagWriter.TYPEDEFS_START, TagWriter.INDENT_1);
-	}
-
-	/**
-	 * Writes &lt;external-def&gt;path&lt;/external-def&gt; structure
-	 * 
-	 * @param path
-	 *            path to external dictionary file
-	 */
-	public static void writeExternalDefFile(String path) {
-		StringBuffer sb = new StringBuffer();
-		sb.append(TagWriter.EXTERNAL_DEF_START);
-		sb.append(XMLDataFilter.changeData(path));
-		sb.append(TagWriter.EXTERNAL_DEF_END);
-		TagWriter.write(sb.toString(), TagWriter.INDENT_2);
-	}
-
-	/**
-	 * Starts &lt;object type="" size="" formatChar="" dataType=""&gt; structure
-	 * 
-	 * @param type
-	 *            original type name
-	 * @param size
-	 *            size of typical object, it’s optional because dictionary user
-	 *            can calculate size for compound types by sum size of each
-	 *            member. Give -1 if not used.
-	 * @param formatChar
-	 *            used for formatting
-	 * @param dataType
-	 *            one value form &lt;datatype&gt; enumeration
-	 */
-	public static void startTypeDef(String type, int size, String formatChar,
-			DataType dataType) {
-		StringBuffer sb = new StringBuffer();
-		sb.append(TagWriter.OBJECT_START_OPEN);
-		TagWriter.appendAttribute(sb, TagWriter.TYPE_ATTR, type, false);
-		if (size >= 0) { // optional attribute
-			TagWriter.appendAttribute(sb, TagWriter.SIZE_ATTR, String
-					.valueOf(size), true);
-		}
-		if (formatChar != null) { // optional attribute
-			TagWriter.appendAttribute(sb, TagWriter.FORMATCHAR_ATTR,
-					formatChar, true);
-		}
-		TagWriter.appendAttribute(sb, TagWriter.CLASSIFICATION_ATTR, dataType
-				.getType(), true);
-		sb.append(TagWriter.TAG_CLOSE);
-		TagWriter.write(sb.toString(), TagWriter.INDENT_2);
-	}
-
-	/**
-	 * Writes &lt;object type="" size="" formatChar="" dataType=""/&gt;
-	 * structure
-	 * 
-	 * @param type
-	 *            original type name
-	 * @param size
-	 *            size of typical object, it’s optional because dictionary user
-	 *            can calculate size for compound types by sum size of each
-	 *            member. Give -1 if not used.
-	 * @param formatChar
-	 *            used for formatting
-	 * @param dataType
-	 *            one value form &lt;datatype&gt; enumeration
-	 */
-	public static void writeTypeDef(String type, int size, String formatChar,
-			DataType dataType) {
-		StringBuffer sb = new StringBuffer();
-		sb.append(TagWriter.OBJECT_START_OPEN);
-		TagWriter.appendAttribute(sb, TagWriter.TYPE_ATTR, type, false);
-		if (size >= 0) {
-			TagWriter.appendAttribute(sb, TagWriter.SIZE_ATTR, String
-					.valueOf(size), true);
-		}
-		if (formatChar != null) {
-			TagWriter.appendAttribute(sb, TagWriter.FORMATCHAR_ATTR,
-					formatChar, true);
-		}
-		TagWriter.appendAttribute(sb, TagWriter.CLASSIFICATION_ATTR, dataType
-				.getType(), true);
-		sb.append(TagWriter.TAG_END);
-		TagWriter.write(sb.toString(), TagWriter.INDENT_2);
-	}
-
-	/**
-	 * Writes &lt;/object&gt;
-	 */
-	public static void endTypeDef() {
-		TagWriter.write(TagWriter.OBJECT_END, TagWriter.INDENT_2);
-	}
-
-	/**
-	 * Writes &lt;/typedef&gt;
-	 */
-	public static void endTypeDefs() {
-		TagWriter.write(TagWriter.TYPEDEFS_END, TagWriter.INDENT_1);
-	}
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/encoder/XMLDataFilter.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,85 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Replaces special characters with escape sequences 
-*
-*/
-package com.nokia.tracecompiler.decodeplugins.dictionary.encoder;
-
-/**
- * Replaces special characters with escape sequences
- * 
- */
-class XMLDataFilter {
-
-	/**
-	 * XML start tag
-	 */
-	private static final String LEFT_ARROW = "<"; //$NON-NLS-1$
-
-	/**
-	 * XML end tag
-	 */
-	private static final String RIGHT_ARROW = ">"; //$NON-NLS-1$
-
-	/**
-	 * XML entity tag
-	 */
-	private static final String AMPERSAND = "&"; //$NON-NLS-1$
-
-	/**
-	 * XML start tag escaped
-	 */
-	private static final String LEFT_ARROW_SUBST = "&lt;"; //$NON-NLS-1$
-
-	/**
-	 * XML end tag escaped
-	 */
-	private static final String RIGHT_ARROW_SUBST = "&gt;"; //$NON-NLS-1$
-
-	/**
-	 * XML entity tag escaped
-	 */
-	private static final String AMPERSAND_SUBST = "&amp;"; //$NON-NLS-1$
-
-	/**
-	 * Not found result
-	 */
-	private static final int NOT_FOUND = -1;
-
-	/**
-	 * Changes XML data
-	 * 
-	 * @param data
-	 *            data to be changed
-	 * @return changed data
-	 */
-	static String changeData(String data) {
-
-		// This must be before any other that will add & marks to the text.
-		// Otherwise those will be replaced also.
-		if (data.indexOf(AMPERSAND) != NOT_FOUND) {
-			data = data.replaceAll(AMPERSAND, AMPERSAND_SUBST);
-		}
-		if (data.indexOf(LEFT_ARROW) != NOT_FOUND) {
-			data = data.replaceAll(LEFT_ARROW, LEFT_ARROW_SUBST);
-		}
-		if (data.indexOf(RIGHT_ARROW) != NOT_FOUND) {
-			data = data.replaceAll(RIGHT_ARROW, RIGHT_ARROW_SUBST);
-		}
-
-		return data;
-	}
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/encoder/package.html	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-<html><body>
-Dictionary encoder is used to create dictionary XML files
-</body></html>
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/messages.properties	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-DictionaryFile.Title=Dictionary File
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/package.html	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-<html><body>
-TraceCompiler plug-in implementation to export the project to Symbian Dictionary format
-</body></html>
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/document/FileDocument.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,89 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* File-based implementation of the document interface
-*
-*/
-package com.nokia.tracecompiler.document;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-
-import com.nokia.tracecompiler.file.FileUtils;
-import com.nokia.tracecompiler.source.SourceConstants;
-import com.nokia.tracecompiler.source.SourcePropertyProvider;
-
-/**
- * File-based implementation of the document interface. This extends the string
- * document with SourcePropertyProvider implementation which can provide the
- * file name to TraceCompiler source framework
- * 
- */
-final class FileDocument extends StringDocument implements
-		SourcePropertyProvider {
-
-	/**
-	 * The file
-	 */
-	private File file;
-
-	/**
-	 * Constructor
-	 * 
-	 * @param file
-	 *            the document file
-	 * @throws IOException
-	 *             if processing fails
-	 */
-	FileDocument(File file) throws IOException {
-		this.file = file;
-		byte[] buf = new byte[(int) file.length()];
-		FileInputStream fis = new FileInputStream(file);
-		fis.read(buf);
-		fis.close();
-		setSourceData(new String(buf));
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.utils.DocumentAdapter#getPropertyProvider()
-	 */
-	@Override
-	public SourcePropertyProvider getPropertyProvider() {
-		return this;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.source.SourcePropertyProvider#getFileName()
-	 */
-	public String getFileName() {
-		return file.getName();
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.source.SourcePropertyProvider#getFilePath()
-	 */
-	public String getFilePath() {
-		return FileUtils.convertSeparators(
-				SourceConstants.FORWARD_SLASH_CHAR, file.getParent(), true);
-	}
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/document/FileDocumentMonitor.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,135 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Document monitor implementation which reads all files from a directory
-*
-*/
-package com.nokia.tracecompiler.document;
-
-import java.io.File;
-import java.util.ArrayList;
-
-import com.nokia.tracecompiler.TraceCompilerGlobals;
-import com.nokia.tracecompiler.engine.TraceCompilerEngineErrorMessages;
-import com.nokia.tracecompiler.engine.TraceCompilerEngineGlobals;
-import com.nokia.tracecompiler.engine.TraceCompilerEngineErrorCodes.TraceCompilerErrorCode;
-import com.nokia.tracecompiler.engine.source.SourceEngine;
-import com.nokia.tracecompiler.file.FileUtils;
-import com.nokia.tracecompiler.source.SourceDocumentFactory;
-import com.nokia.tracecompiler.source.SourceDocumentProcessor;
-import com.nokia.tracecompiler.utils.DocumentMonitorBase;
-
-/**
- * Document monitor implementation which reads files
- * 
- */
-public final class FileDocumentMonitor extends DocumentMonitorBase {
-
-	/**
-	 * Document factory
-	 */
-	private StringDocumentFactory documentFactory;
-
-	/**
-	 * Files to be processed
-	 */
-	private static String[] files;
-
-	/**
-	 * Sets the files to be used by the document monitor
-	 * 
-	 * @param files
-	 *            the files
-	 */
-	public static void setFiles(String[] files) {
-		FileDocumentMonitor.files = files;
-	}
-
-	/**
-	 * Constructor
-	 */
-	public FileDocumentMonitor() {
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.utils.DocumentMonitorBase#getFactory()
-	 */
-	@Override
-	public SourceDocumentFactory getFactory() {
-		if (documentFactory == null) {
-			documentFactory = new StringDocumentFactory();
-		}
-		return documentFactory;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.utils.DocumentMonitorAdapter#
-	 *      startMonitor(com.nokia.tracecompiler.source.SourceDocumentProcessor)
-	 */
-	@Override
-	public void startMonitor(SourceDocumentProcessor processor) throws Exception {
-		
-		// Put source files and non-source files to same list
-		SourceEngine sourceEngine = TraceCompilerEngineGlobals.getSourceEngine();
-		ArrayList<String> list = sourceEngine.getNonSourceFiles();
-		for (int i=0; i < files.length; i++) {
-			String fileName = files[i];
-			if (!list.contains(fileName)) {
-				list.add(fileName);
-			}
-		}		
-		String[] fileArr = new String[list.size()];
-		list.toArray(fileArr);
-		String err = ""; //$NON-NLS-1$
-		
-		for (String fileName : fileArr) {
-			File file = new File(fileName);
-			if (file.exists() && !file.isDirectory()
-					&& FileUtils.isFileAllowed(file.getName())) {
-				try {
-					TraceCompilerEngineGlobals.getEvents().postInfoMessage(Messages.getString("FileDocumentMonitor.processingSourceFileText") + file.getAbsolutePath(), null); //$NON-NLS-1$
-					processor.sourceOpened(new FileDocument(file));
-				} catch (Exception e) {
-					// Error after processing one file
-					String msg = TraceCompilerEngineErrorMessages
-							.getErrorMessage(
-									TraceCompilerErrorCode.CANNOT_OPEN_SOURCE_FILE,
-									null);
-					TraceCompilerEngineGlobals.getEvents().postErrorMessage(msg,
-							file.getAbsolutePath(),true);
-					err = e.getMessage();
-				} finally {
-					if (TraceCompilerEngineGlobals.getEvents().hasErrorHappened() && !TraceCompilerGlobals.keepGoing())  {
-						throw new Exception("TraceCompiler stopping on error. " + err); //$NON-NLS-1$
-					}
-				}
-			}
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.utils.DocumentMonitorAdapter#stopMonitor()
-	 */
-	@Override
-	public void stopMonitor() {
-	}
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/document/Messages.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,57 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Localized strings for engine package
-*
-*/
-package com.nokia.tracecompiler.document;
-
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-public class Messages {
-
-	/**
-	 * Bundle name
-	 */
-	private static final String BUNDLE_NAME = "com.nokia.tracecompiler.document.messages"; //$NON-NLS-1$
-
-	/**
-	 * Bundle
-	 */
-	private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
-			.getBundle(BUNDLE_NAME);
-
-	/**
-	 * Prevents construction
-	 */
-	private Messages() {
-	}
-
-	/**
-	 * Gets localized string based on key
-	 * 
-	 * @param key
-	 *            the resource key
-	 * @return the localized resource
-	 */
-	public static String getString(String key) {
-		try {
-			return RESOURCE_BUNDLE.getString(key);
-		} catch (MissingResourceException e) {
-			return '!' + key + '!';
-		}
-	}
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/document/StringDocument.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,126 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* String-based document object
-*
-*/
-package com.nokia.tracecompiler.document;
-
-import java.util.ArrayList;
-
-import com.nokia.tracecompiler.source.SourceParserException;
-import com.nokia.tracecompiler.utils.DocumentAdapter;
-
-/**
- * String-based document object
- * 
- */
-class StringDocument extends DocumentAdapter {
-
-	/**
-	 * The document data
-	 */
-	private String sourceData;
-
-	/**
-	 * Line information
-	 */
-	private ArrayList<Integer> lines = new ArrayList<Integer>();
-
-	/**
-	 * Constructor
-	 */
-	StringDocument() {
-	}
-
-	/**
-	 * Constructor
-	 * 
-	 * @param data
-	 *            the document data
-	 */
-	StringDocument(String data) {
-		setSourceData(data);
-	}
-
-	/**
-	 * Sets the source data
-	 * 
-	 * @param data
-	 *            the source data
-	 */
-	void setSourceData(String data) {
-		this.sourceData = data;
-		if (data.length() > 0) {
-			lines.add(0);
-		}
-		for (int i = 0; i < data.length(); i++) {
-			if (data.charAt(i) == '\n') {
-				lines.add(i + 1);
-			}
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.utils.DocumentAdapter#get(int, int)
-	 */
-	@Override
-	public String get(int start, int length) throws SourceParserException {
-		return sourceData.substring(start, start + length);
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.utils.DocumentAdapter#getChar(int)
-	 */
-	@Override
-	public char getChar(int offset) throws SourceParserException {
-		return sourceData.charAt(offset);
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.utils.DocumentAdapter#getLength()
-	 */
-	@Override
-	public int getLength() {
-		return sourceData.length();
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.utils.DocumentAdapter#getLineOfOffset(int)
-	 */
-	@Override
-	public int getLineOfOffset(int offset) throws SourceParserException {
-		int retval = -1;
-		if (offset >= 0 && offset < sourceData.length()) {
-			for (int i = 0; i < lines.size(); i++) {
-				int lineStart = lines.get(i);
-				if (lineStart > offset) {
-					retval = i - 1;
-					i = lines.size();
-				}
-			}
-		}
-		return retval;
-	}
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/document/StringDocumentFactory.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Document factory for file-based documents
-*
-*/
-package com.nokia.tracecompiler.document;
-
-import com.nokia.tracecompiler.source.SourceDocumentInterface;
-import com.nokia.tracecompiler.utils.DocumentFactoryBase;
-
-/**
- * Document factory for string-based documents and simple locations which do not
- * support changes or selections.
- * 
- */
-public final class StringDocumentFactory extends DocumentFactoryBase {
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.utils.DocumentFactoryBase#createDocument(java.lang.String)
-	 */
-	@Override
-	public SourceDocumentInterface createDocument(String sourceData) {
-		return new StringDocument(sourceData);
-	}
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/document/messages.properties	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-FileDocumentMonitor.processingSourceFileText=Processing source file : 
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/ConfigurationDelegate.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,204 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Delegate to configuration of the view
-*
-*/
-package com.nokia.tracecompiler.engine;
-
-import java.util.ArrayList;
-
-/**
- * Delegate to configuration of the view
- * 
- */
-final class ConfigurationDelegate implements TraceCompilerEngineConfiguration {
-
-	/**
-	 * Configuration from view
-	 */
-	private TraceCompilerEngineConfiguration configuration;
-
-	/**
-	 * Temporary list of configuration listeners
-	 */
-	private ArrayList<TraceCompilerEngineConfigurationListener> tempListeners;
-
-	/**
-	 * Sets the configuration delegate
-	 * 
-	 * @param configuration
-	 *            the configuration
-	 */
-	void setConfiguration(TraceCompilerEngineConfiguration configuration) {
-		this.configuration = configuration;
-		if (configuration != null && tempListeners != null) {
-			for (int i = 0; i < tempListeners.size(); i++) {
-				TraceCompilerEngineConfigurationListener listener = tempListeners
-						.get(i);
-				configuration.addConfigurationListener(listener);
-				listener.configurationCreated();
-			}
-			tempListeners.clear();
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engine.TraceCompilerConfiguration#isAvailable()
-	 */
-	public boolean isAvailable() {
-		boolean retval;
-		if (configuration != null) {
-			retval = configuration.isAvailable();
-		} else {
-			retval = false;
-		}
-		return retval;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engine.TraceCompilerConfiguration#
-	 *      addConfigurationListener(com.nokia.tracecompiler.engine.TraceCompilerConfigurationListener)
-	 */
-	public void addConfigurationListener(
-			TraceCompilerEngineConfigurationListener configurationListener) {
-		if (configuration != null) {
-			configuration.addConfigurationListener(configurationListener);
-		} else {
-			if (tempListeners == null) {
-				tempListeners = new ArrayList<TraceCompilerEngineConfigurationListener>();
-			}
-			tempListeners.add(configurationListener);
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engine.TraceCompilerConfiguration#
-	 *      removeConfigurationListener(com.nokia.tracecompiler.engine.TraceCompilerConfigurationListener)
-	 */
-	public void removeConfigurationListener(
-			TraceCompilerEngineConfigurationListener configurationListener) {
-		if (configuration != null) {
-			configuration.removeConfigurationListener(configurationListener);
-		} else {
-			if (tempListeners != null) {
-				tempListeners.remove(configurationListener);
-			}
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engine.TraceCompilerConfiguration#getFlag(java.lang.String)
-	 */
-	public boolean getFlag(String flagName) {
-		boolean retval;
-		if (configuration != null) {
-			retval = configuration.getFlag(flagName);
-		} else {
-			retval = false;
-		}
-		return retval;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engine.TraceCompilerConfiguration#getText(java.lang.String)
-	 */
-	public String getText(String textName) {
-		String retval;
-		if (configuration != null) {
-			retval = configuration.getText(textName);
-		} else {
-			retval = ""; //$NON-NLS-1$
-		}
-		return retval;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engine.TraceCompilerConfiguration#getValue(java.lang.String)
-	 */
-	public int getValue(String valueName) {
-		int retval;
-		if (configuration != null) {
-			retval = configuration.getValue(valueName);
-		} else {
-			retval = 0;
-		}
-		return retval;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engine.TraceCompilerConfiguration#hasEntry(java.lang.String)
-	 */
-	public boolean hasEntry(String entryName) {
-		boolean retval;
-		if (configuration != null) {
-			retval = configuration.hasEntry(entryName);
-		} else {
-			retval = false;
-		}
-		return retval;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engine.TraceCompilerConfiguration#
-	 *      setFlag(java.lang.String, boolean)
-	 */
-	public void setFlag(String flagName, boolean flag) {
-		if (configuration != null) {
-			configuration.setFlag(flagName, flag);
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engine.TraceCompilerConfiguration#
-	 *      setText(java.lang.String, java.lang.String)
-	 */
-	public void setText(String textName, String text) {
-		if (configuration != null) {
-			configuration.setText(textName, text);
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engine.TraceCompilerConfiguration#setValue(java.lang.String,
-	 *      int)
-	 */
-	public void setValue(String valueName, int value) {
-		if (configuration != null) {
-			configuration.setValue(valueName, value);
-		}
-	}
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/LocationListBase.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,121 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Base class for TraceLocationList and PersistentLocationList
-*
-*/
-package com.nokia.tracecompiler.engine;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-
-import com.nokia.tracecompiler.model.TraceModelExtension;
-import com.nokia.tracecompiler.model.TraceObject;
-
-/**
- * Base class for TraceLocationList and PersistentLocationList
- * 
- */
-public class LocationListBase implements TraceModelExtension,
-		Iterable<LocationProperties> {
-
-	/**
-	 * List of locations
-	 */
-	private ArrayList<LocationProperties> locations = new ArrayList<LocationProperties>();
-
-	/**
-	 * Owning trace object
-	 */
-	private TraceObject owner;
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.model.TraceModelExtension#getOwner()
-	 */
-	public TraceObject getOwner() {
-		return owner;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.model.TraceModelExtension#setOwner(com.nokia.tracecompiler.model.TraceObject)
-	 */
-	public void setOwner(TraceObject owner) {
-		this.owner = owner;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see java.lang.Iterable#iterator()
-	 */
-	public Iterator<LocationProperties> iterator() {
-		return locations.iterator();
-	}
-
-	/**
-	 * Gets the location count of this list
-	 * 
-	 * @return the count
-	 */
-	public final int getLocationCount() {
-		return locations.size();
-	}
-
-	/**
-	 * Checks if there are locations in this list
-	 * 
-	 * @return true if list has locations
-	 */
-	public final boolean hasLocations() {
-		return !locations.isEmpty();
-	}
-
-	/**
-	 * Adds a location to this list
-	 * 
-	 * @param location
-	 *            the location to be added
-	 */
-	void add(LocationProperties location) {
-		locations.add(location);
-	}
-
-	/**
-	 * Removes a location from this list
-	 * 
-	 * @param location
-	 *            the location to be removed
-	 * @return true if removed
-	 */
-	boolean remove(LocationProperties location) {
-		return locations.remove(location);
-	}
-
-	/**
-	 * Checks if location exists
-	 * 
-	 * @param location
-	 *            the location
-	 * @return true if exists
-	 */
-	boolean contains(LocationProperties location) {
-		return locations.contains(location);
-	}
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/LocationMapModelListener.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,113 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Model listener for trace location mapper
-*
-*/
-package com.nokia.tracecompiler.engine;
-
-import com.nokia.tracecompiler.model.Trace;
-import com.nokia.tracecompiler.model.TraceCompilerException;
-import com.nokia.tracecompiler.model.TraceGroup;
-import com.nokia.tracecompiler.model.TraceModelListener;
-import com.nokia.tracecompiler.model.TraceObject;
-import com.nokia.tracecompiler.model.TraceParameter;
-
-/**
- * Model listener for trace location mapper
- * 
- */
-final class LocationMapModelListener implements TraceModelListener {
-
-	/**
-	 * Trace location mapper
-	 */
-	private final TraceLocationMap locationMap;
-
-	/**
-	 * Constructor
-	 * 
-	 * @param map
-	 *            the location mapper
-	 */
-	LocationMapModelListener(TraceLocationMap map) {
-		locationMap = map;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.model.TraceModelListener#
-	 *      objectAdded(com.nokia.tracecompiler.model.TraceObject,
-	 *      com.nokia.tracecompiler.model.TraceObject)
-	 */
-	public void objectAdded(TraceObject owner, TraceObject object) {
-		// A trace does not have a name yet, so this does nothing
-		// The locations are assigned to the trace in propertyChanged
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.model.TraceModelListener#
-	 *      objectRemoved(com.nokia.tracecompiler.model.TraceObject,
-	 *      com.nokia.tracecompiler.model.TraceObject)
-	 */
-	public void objectRemoved(TraceObject owner, TraceObject object) throws TraceCompilerException {
-		if (object instanceof Trace) {
-			locationMap.moveToUnrelated((Trace) object);
-		} else if (object instanceof TraceGroup) {
-			// Moves locations to unrelated list
-			for (Trace trace : (TraceGroup) object) {
-				locationMap.moveToUnrelated(trace);
-			}
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.model.TraceModelListener#
-	 *      propertiesUpdated(com.nokia.tracecompiler.model.TraceObject)
-	 */
-	public void propertyUpdated(TraceObject object, int property) throws TraceCompilerException {
-		if (object instanceof Trace && property == NAME && object.isComplete()) {
-			Trace trace = (Trace) object;
-			locationMap.moveFromUnrelated(trace);
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.model.TraceModelListener#
-	 *      objectCreationComplete(com.nokia.tracecompiler.model.TraceObject)
-	 */
-	public void objectCreationComplete(TraceObject object) throws TraceCompilerException {
-		if (object instanceof Trace) {
-			Trace trace = (Trace) object;
-			locationMap.moveFromUnrelated(trace);
-		} else if (object instanceof TraceParameter) {
-			// If a parameter is added, the validity needs to be checked
-			TraceLocationList list = ((TraceParameter) object).getTrace()
-					.getExtension(TraceLocationList.class);
-			if (list != null) {
-				for (LocationProperties loc : list) {
-					((TraceLocation) loc).runValidityCheck();
-				}
-			}
-		}
-	}
-}
\ No newline at end of file
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/LocationProperties.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,62 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Common properties of locations
-*
-*/
-package com.nokia.tracecompiler.engine;
-
-/**
- * Common properties of locations
- * 
- */
-public interface LocationProperties {
-
-	/**
-	 * Gets the file path
-	 * 
-	 * @return the file path
-	 */
-	public String getFilePath();
-
-	/**
-	 * Gets the file name
-	 * 
-	 * @return the file name
-	 */
-	public String getFileName();
-
-	/**
-	 * Gets the line number
-	 * 
-	 * @return the line number
-	 */
-	public int getLineNumber();
-
-	/**
-	 * Gets the name of the class which owns this location
-	 * 
-	 * @return the class name
-	 */
-	public String getClassName();
-
-	/**
-	 * Gets the name of function which owns this location
-	 * 
-	 * @return the function name
-	 */
-	public String getFunctionName();
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/Messages.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,63 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Localized strings for engine package
-*
-*/
-package com.nokia.tracecompiler.engine;
-
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-/**
- * Messages for engine package
- * 
- */
-public class Messages {
-
-	/**
-	 * Bundle name
-	 */
-	private static final String BUNDLE_NAME = "com.nokia.tracecompiler.engine.messages"; //$NON-NLS-1$
-
-	/**
-	 * Bundle
-	 */
-	private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
-			.getBundle(BUNDLE_NAME);
-
-	/**
-	 * Prevents construction
-	 */
-	private Messages() {
-	}
-
-	/**
-	 * Gets localized string based on key
-	 * 
-	 * @param key
-	 *            the resource key
-	 * @return the localized resource
-	 */
-	public static String getString(String key) {
-		String value;
-		try {
-			value = RESOURCE_BUNDLE.getString(key);
-		} catch (MissingResourceException e) {
-			value = '!' + key + '!';
-		}
-		return value;
-	}
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/SourceContextManager.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,59 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Interface to change the currently active source context
-*
-*/
-package com.nokia.tracecompiler.engine;
-
-import com.nokia.tracecompiler.source.SourceContext;
-
-/**
- * Interface to the currently active source context
- * 
- */
-public interface SourceContextManager {
-
-	/**
-	 * Gets the active source context
-	 * 
-	 * @return the context
-	 */
-	public SourceContext getContext();
-
-	/**
-	 * Sets the active source context
-	 * 
-	 * @param context
-	 *            the context
-	 */
-	public void setContext(SourceContext context);
-
-	/**
-	 * Checks if the auto-converter is running
-	 * 
-	 * @return true if converter is running, false otherwise
-	 */
-	public boolean isConverting();
-
-	/**
-	 * Sets the auto-converter flag
-	 * 
-	 * @param flag
-	 *            the new flag value
-	 */
-	public void setConverting(boolean flag);
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/SourceContextManagerImpl.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,84 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* SourceContextManager interface implementation
-*
-*/
-package com.nokia.tracecompiler.engine;
-
-import com.nokia.tracecompiler.source.SourceContext;
-
-/**
- * SourceContextManager interface implementation
- * 
- */
-final class SourceContextManagerImpl implements SourceContextManager {
-
-	/**
-	 * Active context
-	 */
-	private SourceContext activeContext;
-
-	/**
-	 * Converting flag
-	 */
-	private boolean isConverting;
-
-	/**
-	 * Constructor
-	 * 
-	 * @param sourceEngine
-	 *            the source engine
-	 */
-	SourceContextManagerImpl() {
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engine.SourceContextManager#getContext()
-	 */
-	public SourceContext getContext() {
-		return activeContext;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engine.SourceContextManager#
-	 *      setContext(com.nokia.tracecompiler.source.SourceContext)
-	 */
-	public void setContext(SourceContext context) {
-		activeContext = context;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engine.SourceContextManager#isConverting()
-	 */
-	public boolean isConverting() {
-		return isConverting;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engine.SourceContextManager#setConverting(boolean)
-	 */
-	public void setConverting(boolean flag) {
-		this.isConverting = flag;
-	}
-}
\ No newline at end of file
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/TraceCompilerEngine.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,393 +0,0 @@
-/*
- * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of "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:
- *
- * Description:
- *
- * A singleton access point to functionality of Trace Compiler
- *
- */
-package com.nokia.tracecompiler.engine;
-
-import java.util.ArrayList;
-
-import com.nokia.tracecompiler.engine.TraceCompilerEngineErrorCodes.TraceCompilerErrorCode;
-import com.nokia.tracecompiler.engine.event.EventEngine;
-import com.nokia.tracecompiler.engine.header.HeaderEngine;
-import com.nokia.tracecompiler.engine.plugin.PluginEngine;
-import com.nokia.tracecompiler.engine.project.ProjectEngine;
-import com.nokia.tracecompiler.engine.propertyfile.PropertyFileEngine;
-import com.nokia.tracecompiler.engine.rules.RulesEngine;
-import com.nokia.tracecompiler.engine.source.SourceEngine;
-import com.nokia.tracecompiler.engine.source.SourceListener;
-import com.nokia.tracecompiler.engine.source.SourceProperties;
-import com.nokia.tracecompiler.model.TraceCompilerException;
-import com.nokia.tracecompiler.model.TraceModel;
-import com.nokia.tracecompiler.plugin.TraceCompilerPlugin;
-
-/**
- * A singleton access point to functionality of Trace Compiler
- * 
- */
-final class TraceCompilerEngine implements SourceListener, TraceCompilerEngineInterface {
-
-	/**
-	 * TraceCompiler plug-in engine
-	 */
-	private PluginEngine pluginEngine;
-
-	/**
-	 * Event handler interface implementation
-	 */
-	private TraceCompilerEngineEvents eventEngine;
-
-	/**
-	 * Source editor engine
-	 */
-	private SourceEngine sourceEngine;
-
-	/**
-	 * Trace header engine
-	 */
-	private HeaderEngine headerEngine;
-
-	/**
-	 * Trace project engine
-	 */
-	private ProjectEngine projectEngine;
-
-	/**
-	 * Rule engine
-	 */
-	private RulesEngine rulesEngine;
-
-	/**
-	 * Trace property file engine
-	 */
-	private PropertyFileEngine propertyFileEngine;
-
-	/**
-	 * Source context manager
-	 */
-	private SourceContextManager contextManager;
-
-	/**
-	 * Location map
-	 */
-	private TraceLocationMap locationMap;
-
-	/**
-	 * Location converter
-	 */
-	private TraceLocationConverter locationConverter;
-
-	/**
-	 * Trace model
-	 */
-	private TraceModel model;
-
-	/**
-	 * Interface to the view
-	 */
-	private TraceCompilerEngineView view = new ViewAdapter();
-
-	/**
-	 * Configuration
-	 */
-	private ConfigurationDelegate configurationDelegate;
-
-	/**
-	 * List of engines that need project open / export / close notifications
-	 */
-	private ArrayList<TraceCompilerEngineBase> engines = new ArrayList<TraceCompilerEngineBase>();
-
-	/**
-	 * View has been registered flag
-	 */
-	private boolean isViewRegistered = false;
-
-	/**
-	 * Project path is stored in case the view unregisters and re-registers
-	 */
-	private String currentProjectPath;
-
-	/**
-	 * Gets the configuration of TraceCompiler
-	 * 
-	 * @return the configuration
-	 */
-	TraceCompilerEngineConfiguration getConfiguration() {
-		return configurationDelegate;
-	}
-
-	/**
-	 * Gets the trace compiler interface
-	 * 
-	 * @return this object
-	 */
-	TraceCompilerEngineInterface getTraceCompiler() {
-		return this;
-	}
-
-	/**
-	 * Gets the trace model
-	 * 
-	 * @return the trace model
-	 */
-	TraceModel getModel() {
-		return model;
-	}
-
-	/**
-	 * Gets the source engine
-	 * 
-	 * @return the source engine
-	 */
-	SourceEngine getSourceEngine() {
-		return sourceEngine;
-	}
-
-	/**
-	 * Gets the events interface
-	 * 
-	 * @return the events interface
-	 */
-	TraceCompilerEngineEvents getEvents() {
-		return eventEngine;
-	}
-
-	/**
-	 * Adds a plug-in
-	 * 
-	 * @param plugin
-	 *            the plugin
-	 */
-	void registerPlugin(TraceCompilerPlugin plugin) {
-		pluginEngine.add(plugin);
-	}
-
-	/**
-	 * Removes an existing plug-in
-	 * 
-	 * @param plugin
-	 *            the plugin
-	 */
-	void unregisterPlugin(TraceCompilerPlugin plugin) {
-		pluginEngine.remove(plugin);
-	}
-
-	/**
-	 * Gets the source context manager
-	 * 
-	 * @return the context manager
-	 */
-	public SourceContextManager getSourceContextManager() {
-		return contextManager;
-	}
-
-	/**
-	 * Starts TraceCompiler.
-	 * @throws TraceCompilerException 
-	 */
-	void start() throws TraceCompilerException {
-		configurationDelegate = new ConfigurationDelegate();
-		rulesEngine = new RulesEngine();
-		pluginEngine = new PluginEngine();
-		model = new TraceModel(rulesEngine, pluginEngine.getVerifier());
-		pluginEngine.setModel(model);
-		projectEngine = new ProjectEngine(model);
-		propertyFileEngine = new PropertyFileEngine(model);
-		eventEngine = new EventEngine(model);
-		sourceEngine = new SourceEngine(model);
-		locationMap = new TraceLocationMap(model);
-		locationConverter = new TraceLocationConverter(model);
-		sourceEngine.addSourceListener(this);
-		contextManager = new SourceContextManagerImpl();
-		headerEngine = new HeaderEngine(model);
-		// Keep this order -> Exports need to be in correct order
-		// Property file engine manages the ID cache so it needs to be run
-		// before plug-in's and header
-		engines.add(projectEngine);
-		engines.add(propertyFileEngine);
-		engines.add(headerEngine);
-		engines.add(pluginEngine);
-	}
-
-	/**
-	 * Shuts down TraceCompiler
-	 * @throws TraceCompilerException 
-	 */
-	void shutdown() throws TraceCompilerException {
-		closeProject();
-	}
-
-	/**
-	 * Registers the view
-	 * 
-	 * @param view
-	 *            the view
-	 * @throws TraceCompilerException 
-	 */
-	void setView(TraceCompilerEngineView view) throws TraceCompilerException {
-		if (view == null) {
-			// Closes the project, but leaves the currentProjectName and
-			// currentProjectPath variables. When view re-registers the project
-			// is opened back
-			internalCloseProject();
-			this.view = new ViewAdapter();
-			isViewRegistered = false;
-		} else {
-			this.view = view;
-			isViewRegistered = true;
-		}
-		configurationDelegate.setConfiguration(this.view.getConfiguration());
-	}
-
-	/**
-	 * Checks that model is valid
-	 * 
-	 * @throws TraceCompilerException
-	 *             if model is not valid
-	 */
-	private void checkIsModelValid() throws TraceCompilerException {
-		if (!model.isValid()) {
-			throw new TraceCompilerException(
-					TraceCompilerErrorCode.MODEL_NOT_READY);
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engine.TraceCompilerEngineInterface#openProject(java.lang.String,
-	 *      java.lang.String)
-	 */
-	public void openProject(String modelName) throws Exception {
-		try {
-			if (view != null && isViewRegistered && !model.isValid()) {
-				projectEngine.openTraceProject(currentProjectPath, modelName);
-				for (TraceCompilerEngineBase engine : engines) {
-					engine.projectOpened();
-				}
-				model.setValid(true);
-				sourceEngine.start();
-			}
-		} catch (TraceCompilerException e) {
-			closeModel();
-			throw e;
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engine.TraceCompilerEngineInterface#exportProject()
-	 */
-	public void exportProject() throws TraceCompilerException {
-		checkIsModelValid();
-		if (model.getID() != 0) {
-			for (TraceCompilerEngineBase engine : engines) {
-					engine.exportProject();
-			}
-		} else {
-			throw new TraceCompilerException(
-					TraceCompilerErrorCode.INVALID_MODEL_PROPERTIES_FOR_EXPORT);
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engine.TraceCompilerEngineInterface#closeProject()
-	 */
-	public void closeProject() throws TraceCompilerException {
-		internalCloseProject();
-		currentProjectPath = null;
-	}
-
-	/**
-	 * Closes the project
-	 * @throws TraceCompilerException 
-	 */
-	private void internalCloseProject() throws TraceCompilerException {
-		if (model.isValid()) {
-			if (!TraceCompilerEngineGlobals.getConfiguration().getFlag(
-					TraceCompilerEngineConfiguration.CONSOLE_UI_MODE)) {
-				try {
-					// Plug-in's are not exported when project is closed
-					// They can do cleanup in traceProjectClosed call
-					for (TraceCompilerEngineBase engine : engines) {
-						if (engine != pluginEngine) {
-							engine.exportProject();
-						}
-					}
-				} catch (TraceCompilerException e) {
-					getEvents().postError(e);
-						throw e;
-				}
-			}
-			// Engines are closed in reverse order
-			for (int i = engines.size() - 1; i >= 0; i--) {
-				engines.get(i).projectClosed();
-			}
-			sourceEngine.shutdown();
-			closeModel();
-		}
-	}
-
-	/**
-	 * Closes the trace model
-	 */
-	private void closeModel() {
-		try {
-			if (model != null) {
-				model.reset();
-				model.setValid(false);
-			}
-		} catch (Exception e) {
-			if (TraceCompilerEngineConfiguration.ASSERTIONS_ENABLED) {
-				getEvents().postAssertionFailed("Failed to close model", e); //$NON-NLS-1$
-			}
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engine.SourceListener#
-	 *      sourceOpened(com.nokia.tracecompiler.engine.SourceProperties)
-	 */
-	public void sourceOpened(SourceProperties properties) throws TraceCompilerException {
-		locationMap.addSource(properties);
-		locationConverter.sourceOpened(properties);
-	}
-
-	/**
-	 * Get project path
-	 * 
-	 * @return project path
-	 */
-	public String getProjectPath() {
-		return currentProjectPath;
-	}
-
-	/**
-	 * Set project path
-	 * 
-	 * @param path
-	 *            the path
-	 */
-	public void setProjectPath(String path) {
-		currentProjectPath = path;
-	}
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/TraceCompilerEngineActions.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Action interface
-*
-*/
-package com.nokia.tracecompiler.engine;
-
-/**
- * Action interface
- * 
- */
-public interface TraceCompilerEngineActions {
-
-	/**
-	 * Enables actions based on selected object
-	 * 
-	 * @param object
-	 *            the object that has been selected
-	 */
-	public void enableActions(Object object);
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/TraceCompilerEngineBase.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Base class for all engine classes
-*
-*/
-package com.nokia.tracecompiler.engine;
-
-import com.nokia.tracecompiler.model.TraceCompilerException;
-
-/**
- * Base class for all engine classes
- * 
- */
-public abstract class TraceCompilerEngineBase {
-
-	/**
-	 * Called after trace project has been opened
-	 * @throws TraceCompilerException 
-	 */
-	public abstract void projectOpened() throws TraceCompilerException;
-
-	/**
-	 * Called when trace project is closed
-	 */
-	public abstract void projectClosed();
-
-	/**
-	 * Called when exporting the project
-	 * 
-	 * @throws TraceCompilerException
-	 *             if export fails
-	 */
-	public abstract void exportProject() throws TraceCompilerException;
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/TraceCompilerEngineConfiguration.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,188 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Access to configuration of TraceCompiler
-*
-*/
-package com.nokia.tracecompiler.engine;
-
-/**
- * Access to configuration of TraceCompiler
- * 
- */
-public interface TraceCompilerEngineConfiguration {
-
-	/**
-	 * Name of the currently selected source formatter
-	 */
-	public String FORMATTER_NAME = "TraceCompiler.sourceFormatter"; //$NON-NLS-1$
-
-	/**
-	 * Environment root
-	 */
-	public String ENVIRONMENT_ROOT = "TraceCompiler.environmentRoot"; //$NON-NLS-1$
-
-	/**
-	 * Printf support flag
-	 */
-	public String PRINTF_SUPPORT = "TraceCompiler.printfSupport"; //$NON-NLS-1$
-
-	/**
-	 * Printf extension macro
-	 */
-	public String PRINTF_EXTENSION = "TraceCompiler.printfMacro"; //$NON-NLS-1$
-
-	/**
-	 * Console UI mode flag
-	 */
-	public String CONSOLE_UI_MODE = "TraceCompiler.consoleUI"; //$NON-NLS-1$
-
-	/**
-	 * Flag to show the project files in view
-	 */
-	public boolean SHOW_PROJECT_FILES = false;
-
-	/**
-	 * Compiler flag to show hidden parameters in view
-	 */
-	public boolean SHOW_HIDDEN_PARAMETERS_IN_VIEW = false;
-
-	/**
-	 * Compiler flag to show location tag in view
-	 */
-	public boolean SHOW_LOCATION_TAG_IN_VIEW = false;
-
-	/**
-	 * Assertions events are enabled
-	 */
-	public boolean ASSERTIONS_ENABLED = true;
-
-	/**
-	 * Trace location assertions are enabled
-	 */
-	public boolean GLOBAL_LOCATION_ASSERTS = false;
-
-	/**
-	 * Traces the view state
-	 */
-	public boolean TRACE_VIEW_STATE = false;
-
-	/**
-	 * Allow changes to source formatter
-	 */
-	public boolean ALLOW_FORMAT_CHANGE = false;
-
-	/**
-	 * Comment after trace
-	 */
-	public String COMMENT_POSITION_AFTER_TRACE = "before"; //$NON-NLS-1$
-
-	/**
-	 * Comment before trace
-	 */
-	public String COMMENT_POSITION_BEFORE_TRACE = "after"; //$NON-NLS-1$
-
-	/**
-	 * Flag which determines if the configuration is available
-	 * 
-	 * @return true if available, false if not
-	 */
-	public boolean isAvailable();
-
-	/**
-	 * Stores a boolean flag into properties
-	 * 
-	 * @param flagName
-	 *            name for the flag
-	 * @param flag
-	 *            flag to be stored
-	 */
-	public void setFlag(String flagName, boolean flag);
-
-	/**
-	 * Gets a configuration flag based on flag name
-	 * 
-	 * @param flagName
-	 *            the confiugration flag name
-	 * @return the flag value
-	 */
-	public boolean getFlag(String flagName);
-
-	/**
-	 * Stores an integer value into properties
-	 * 
-	 * @param valueName
-	 *            name for the value
-	 * @param value
-	 *            value to be stored
-	 */
-	public void setValue(String valueName, int value);
-
-	/**
-	 * Gets a configuration value based on value name
-	 * 
-	 * @param valueName
-	 *            configuration value name
-	 * @return the value
-	 */
-	public int getValue(String valueName);
-
-	/**
-	 * Stores text into properties
-	 * 
-	 * @param textName
-	 *            name for the text
-	 * @param text
-	 *            text to be stored
-	 */
-	public void setText(String textName, String text);
-
-	/**
-	 * Gets a text entry based on property name
-	 * 
-	 * @param textName
-	 *            configuration value name
-	 * @return the text
-	 */
-	public String getText(String textName);
-
-	/**
-	 * Checks if the given entry exists in configuration.
-	 * 
-	 * @param entryName
-	 *            the name of the entry
-	 * @return true if entry exists, false otherwise
-	 */
-	public boolean hasEntry(String entryName);
-
-	/**
-	 * Adds a configuration listener to this configuration
-	 * 
-	 * @param configurationListener
-	 *            the listener to be added
-	 */
-	public void addConfigurationListener(
-			TraceCompilerEngineConfigurationListener configurationListener);
-
-	/**
-	 * Removes an existing configuration listener
-	 * 
-	 * @param configurationListener
-	 *            the listener to be removed
-	 */
-	public void removeConfigurationListener(
-			TraceCompilerEngineConfigurationListener configurationListener);
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/TraceCompilerEngineConfigurationListener.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Configuration listener interface
-*
-*/
-package com.nokia.tracecompiler.engine;
-
-/**
- * Configuration listener interface
- * 
- */
-public interface TraceCompilerEngineConfigurationListener {
-
-	/**
-	 * Configuration creation notification
-	 */
-	public void configurationCreated();
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/TraceCompilerEngineErrorCodes.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,489 +0,0 @@
-/*
- * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of "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:
- *
- * Description:
- *
- * Error codes for TraceCompiler
- *
- */
-package com.nokia.tracecompiler.engine;
-
-import com.nokia.tracecompiler.model.TraceCompilerErrorParameters;
-import com.nokia.tracecompiler.model.TraceCompilerException.TraceCompilerExceptionCode;
-
-/**
- * Error codes for TraceCompiler
- * 
- */
-public interface TraceCompilerEngineErrorCodes {
-
-	/**
-	 * Error parameters for a file-related errors
-	 */
-	public class FileErrorParameters extends TraceCompilerErrorParameters {
-
-		/**
-		 * Path to the file
-		 */
-		public String file;
-
-	}
-
-	/**
-	 * Error parameters for errors related to names, titles etc.
-	 */
-	public class StringErrorParameters extends TraceCompilerErrorParameters {
-
-		/**
-		 * String
-		 */
-		public String string;
-
-	}
-
-	/**
-	 * Error parameters for integer values that must be between two values
-	 */
-	public class RangeErrorParameters extends TraceCompilerErrorParameters {
-
-		/**
-		 * Start of range
-		 */
-		public int start;
-
-		/**
-		 * End of range
-		 */
-		public int end;
-
-		/**
-		 * Hex / decimal flag
-		 */
-		public boolean isHex;
-
-	}
-
-	/**
-	 * Error codes for TraceCompiler
-	 */
-	public enum TraceCompilerErrorCode implements TraceCompilerExceptionCode {
-
-		/**
-		 * Success
-		 */
-		OK,
-
-		/**
-		 * Trace ID was duplicate
-		 */
-		DUPLICATE_TRACE_ID,
-
-		/**
-		 * Group ID was duplicate
-		 */
-		DUPLICATE_GROUP_ID,
-
-		/**
-		 * Trace name was duplicate
-		 */
-		DUPLICATE_TRACE_NAME,
-
-		/**
-		 * Trace name was duplicate
-		 */
-		DUPLICATE_GROUP_NAME,
-
-		/**
-		 * Trace ID was not valid. Parameters for this error are either
-		 * RangeErrorParameters or null (no range)
-		 */
-		INVALID_TRACE_ID,
-
-		/**
-		 * Group ID was not valid. Parameters for this error are either
-		 * RangeErrorParameters or null (no range)
-		 */
-		INVALID_GROUP_ID,
-
-		/**
-		 * Name was not valid
-		 */
-		INVALID_TRACE_NAME,
-
-		/**
-		 * Name was not valid
-		 */
-		INVALID_GROUP_NAME,
-
-		/**
-		 * Trace string was not valid
-		 */
-		INVALID_TRACE_DATA,
-
-		/**
-		 * Cannot edit source file
-		 */
-		SOURCE_NOT_EDITABLE,
-
-		/**
-		 * Source location was not valid
-		 */
-		INVALID_SOURCE_LOCATION,
-
-		/**
-		 * Unreachable trace location
-		 */
-		UNREACHABLE_TRACE_LOCATION,
-
-		/**
-		 * Tried to perform group operation when group was not selected
-		 */
-		GROUP_NOT_SELECTED,
-
-		/**
-		 * Tried to perform trace operation when trace was not selected
-		 */
-		TRACE_NOT_SELECTED,
-
-		/**
-		 * Not enough parameters in trace
-		 */
-		NOT_ENOUGH_PARAMETERS,
-
-		/**
-		 * Unexpected exception occurred
-		 */
-		UNEXPECTED_EXCEPTION,
-
-		/**
-		 * Trace model is not ready
-		 */
-		MODEL_NOT_READY,
-
-		/**
-		 * No trace groups
-		 */
-		NO_TRACE_GROUPS,
-
-		/**
-		 * Parameter name is not valid
-		 */
-		INVALID_PARAMETER_NAME,
-
-		/**
-		 * Model properties are not valid
-		 */
-		INVALID_MODEL_PROPERTIES_FOR_EXPORT,
-
-		/**
-		 * Model name is not valid
-		 */
-		INVALID_MODEL_NAME,
-
-		/**
-		 * Trace project file cannot be parsed
-		 */
-		INVALID_PROJECT_FILE,
-
-		/**
-		 * File was not found. This error is related to FileErrorParameters
-		 * class
-		 */
-		FILE_NOT_FOUND,
-
-		/**
-		 * Path was not valid. This is related to FileErrorParameters class
-		 */
-		INVALID_PATH,
-
-		/**
-		 * Constant value was duplicate
-		 */
-		DUPLICATE_CONSTANT_VALUE,
-
-		/**
-		 * Constant name was already in use
-		 */
-		DUPLICATE_CONSTANT_TABLE_NAME,
-
-		/**
-		 * Constant table name was not valid
-		 */
-		INVALID_CONSTANT_TABLE_NAME,
-
-		/**
-		 * Constant table not part of project
-		 */
-		CONSTANT_TABLE_NOT_PART_OF_PROJECT,
-
-		/**
-		 * Constant ID was already in use
-		 */
-		DUPLICATE_CONSTANT_ID,
-
-		/**
-		 * Constant value was not valid
-		 */
-		INVALID_CONSTANT_VALUE,
-
-		/**
-		 * Parameter name was already in use
-		 */
-		DUPLICATE_PARAMETER_NAME,
-
-		/**
-		 * Parameter type was not supported
-		 */
-		INVALID_PARAMETER_TYPE,
-
-		/**
-		 * Parameters cannot be added
-		 */
-		PARAMETER_ADD_NOT_ALLOWED,
-
-		/**
-		 * Parameters cannot be removed
-		 */
-		PARAMETER_REMOVE_NOT_ALLOWED,
-
-		/**
-		 * Parameter name was empty. This is generated when automatically adding
-		 * function parameters to new trace and a parameter does not have a name
-		 * in the declaration.
-		 */
-		EMPTY_PARAMETER_NAME,
-
-		/**
-		 * Parameter template was already used by another parameter
-		 */
-		PARAMETER_TEMPLATE_ALREADY_IN_USE,
-
-		/**
-		 * Tried to remove trace location when one was not selected
-		 */
-		LOCATION_NOT_SELECTED,
-
-		/**
-		 * Cannot add a constant, since constant table was not selected
-		 */
-		CONSTANT_TABLE_NOT_SELECTED,
-
-		/**
-		 * The selected object was not valid target for delete operation
-		 */
-		CANNOT_DELETE_SELECTED_OBJECT,
-
-		/**
-		 * Trace text format is not valid
-		 */
-		INVALID_TRACE_TEXT_FORMAT,
-
-		/**
-		 * Trace name format is not valid
-		 */
-		INVALID_TRACE_NAME_FORMAT,
-
-		/**
-		 * Missing function name from trace name format
-		 */
-		TRACE_NAME_FORMAT_MISSING_FUNCTION,
-
-		/**
-		 * No traces to delete
-		 */
-		NO_TRACES_TO_DELETE,
-
-		/**
-		 * Source file is not open
-		 */
-		SOURCE_NOT_OPEN,
-
-		/**
-		 * Failed to parse a constant table from source
-		 */
-		CONSTANT_TABLE_PARSE_FAILED,
-
-		/**
-		 * Cannot open project file
-		 */
-		CANNOT_OPEN_PROJECT_FILE,
-
-		/**
-		 * Cannot write project file
-		 */
-		CANNOT_WRITE_PROJECT_FILE,
-
-		/**
-		 * Parameter ID was already in use
-		 */
-		DUPLICATE_PARAMETER_ID,
-
-		/**
-		 * Constant table ID was already in use
-		 */
-		DUPLICATE_CONSTANT_TABLE_ID,
-
-		/**
-		 * Instrumenter function list was empty
-		 */
-		NO_FUNCTIONS_TO_INSTRUMENT,
-
-		/**
-		 * Instrumenter function list was empty. Related to
-		 * StringErrorParameters
-		 */
-		NO_FUNCTIONS_TO_INSTRUMENT_WITH_TEMPLATE,
-
-		/**
-		 * Multiple errors during an operation
-		 */
-		MULTIPLE_ERRORS_IN_OPERATION,
-
-		/**
-		 * Printf parameter parameter format specification did not match the
-		 * parameter count
-		 */
-		PARAMETER_FORMAT_MISMATCH,
-
-		/**
-		 * A trace does not exist
-		 */
-		TRACE_DOES_NOT_EXIST,
-
-		/**
-		 * Trace needs to be converted to correct API
-		 */
-		TRACE_NEEDS_CONVERSION,
-
-		/**
-		 * Parameter count of location and trace do not match
-		 */
-		PARAMETER_COUNT_MISMATCH,
-
-		/**
-		 * Parameter count in location does not match the API macro
-		 */
-		PARAMETER_COUNT_DOES_NOT_MATCH_API,
-
-		/**
-		 * Location parser failed
-		 */
-		LOCATION_PARSER_FAILED,
-
-		/**
-		 * Trace is not referenced from source files
-		 */
-		TRACE_HAS_NO_LOCATIONS,
-
-		/**
-		 * Trace is used from multiple locations in source files
-		 */
-		TRACE_HAS_MULTIPLE_LOCATIONS,
-
-		/**
-		 * Project was empty when export was called
-		 */
-		NO_TRACES_TO_EXPORT,
-
-		/**
-		 * Source file cannot be opened
-		 */
-		CANNOT_OPEN_SOURCE_FILE,
-
-		/**
-		 * Trace in source cannot be updated
-		 */
-		CANNOT_UPDATE_TRACE_INTO_SOURCE,
-
-		/**
-		 * Parameter format is not supported
-		 */
-		PARAMETER_FORMAT_NOT_SUPPORTED,
-
-		/**
-		 * Parameter format is not supported by default macros
-		 */
-		PARAMETER_FORMAT_NEEDS_EXT_MACRO,
-
-		/**
-		 * Ext macro usage is not necessary with
-		 */
-		PARAMETER_FORMAT_UNNECESSARY_EXT_MACRO,
-
-		/**
-		 * Parameter format cannot be used as an array
-		 */
-		PARAMETER_FORMAT_NOT_SUPPORTED_IN_ARRAY,
-
-		/**
-		 * Property file element was unknown
-		 */
-		PROPERTY_FILE_ELEMENT_NOT_SUPPORTED,
-
-		/**
-		 * Property file element was in wrong place
-		 */
-		PROPERTY_FILE_ELEMENT_MISPLACED,
-
-		/**
-		 * Property file attribute was not valid
-		 */
-		PROPERTY_FILE_ATTRIBUTE_INVALID,
-
-		/**
-		 * Inserting a trace into source will produce incorrect results
-		 */
-		INSERT_TRACE_DOES_NOT_WORK,
-
-		/**
-		 * Trace found from source is not in valid source context
-		 */
-		NO_CONTEXT_FOR_LOCATION,
-
-		/**
-		 * Function parameters could not be parsed
-		 */
-		CANNOT_PARSE_FUNCTION_PARAMETERS,
-
-		/**
-		 * Parameter name is not valid exit trace return parameter name
-		 */
-		INVALID_PARAMETER_NAME_IN_RETURN_VALUE,
-
-		/**
-		 * Run out of Group IDs
-		 */
-		RUN_OUT_OF_GROUP_IDS,
-
-		/**
-		 * Run out of Trace IDs
-		 */
-		RUN_OUT_OF_TRACE_IDS,
-
-		/**
-		 * Cannot add function parameters if there is var arg list
-		 */
-		VAR_ARG_LIST_PARAMETER_FOUND,
-
-		/**
-		 * TRACE_STATE group name was used in non state trace
-		 */
-		INVALID_USAGE_OF_TRACE_STATE_GROUP_NAME,
-
-		/**
-		 * TRACE_PERFORMANCE group name was used in non performance trace
-		 */
-		INVALID_USAGE_OF_TRACE_PERFORMACE_GROUP_NAME
-	}
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/TraceCompilerEngineErrorMessages.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,722 +0,0 @@
-/*
- * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of "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:
- *
- * Description:
- *
- * Error code to error message mapper
- *
- */
-package com.nokia.tracecompiler.engine;
-
-import java.io.File;
-
-import com.nokia.tracecompiler.engine.TraceCompilerEngineErrorCodes.FileErrorParameters;
-import com.nokia.tracecompiler.engine.TraceCompilerEngineErrorCodes.RangeErrorParameters;
-import com.nokia.tracecompiler.engine.TraceCompilerEngineErrorCodes.StringErrorParameters;
-import com.nokia.tracecompiler.engine.TraceCompilerEngineErrorCodes.TraceCompilerErrorCode;
-import com.nokia.tracecompiler.model.TraceCompilerErrorParameters;
-import com.nokia.tracecompiler.model.TraceCompilerException;
-import com.nokia.tracecompiler.source.SourceConstants;
-import com.nokia.tracecompiler.source.SourceUtils;
-
-/**
- * Error code to error message mapper
- * 
- */
-public final class TraceCompilerEngineErrorMessages {
-
-	/**
-	 * Maps an exception to error message
-	 * 
-	 * @param e
-	 *            the exception
-	 * @return the message
-	 */
-	public static String getErrorMessage(TraceCompilerException e) {
-		return TraceCompilerEngineErrorMessages.getErrorMessage(
-				(TraceCompilerErrorCode) e.getErrorCode(), e
-						.getErrorParameters());
-	}
-
-	/**
-	 * Maps error code to error message
-	 * 
-	 * @param error
-	 *            the error code
-	 * @param parameters
-	 *            the parameters of the error
-	 * @return the message
-	 */
-	public static String getErrorMessage(TraceCompilerErrorCode error,
-			TraceCompilerErrorParameters parameters) {
-		// CodForChk_Dis_LengthyFunc
-		// CodForChk_Dis_ComplexFunc
-		String s;
-		StringBuffer sb = new StringBuffer();
-		switch (error) {
-		case DUPLICATE_GROUP_ID:
-			sb.append(Messages
-					.getString("TraceCompilerErrorMessages.DuplicateGroupID")); //$NON-NLS-1$
-			break;
-		case DUPLICATE_GROUP_NAME:
-			sb.append(Messages
-					.getString("TraceCompilerErrorMessages.DuplicateGroupName")); //$NON-NLS-1$
-			break;
-		case DUPLICATE_TRACE_ID:
-			sb.append(Messages
-					.getString("TraceCompilerErrorMessages.DuplicateTraceID")); //$NON-NLS-1$
-			break;
-		case DUPLICATE_TRACE_NAME:
-			sb.append(Messages
-					.getString("TraceCompilerErrorMessages.DuplicateTraceName")); //$NON-NLS-1$
-			break;
-		case DUPLICATE_PARAMETER_ID:
-			s = Messages
-					.getString("TraceCompilerErrorMessages.DuplicateParameterID"); //$NON-NLS-1$
-			sb.append(s);
-			break;
-		case DUPLICATE_CONSTANT_VALUE:
-			s = Messages
-					.getString("TraceCompilerErrorMessages.DuplicateConstantValue"); //$NON-NLS-1$
-			sb.append(s);
-			break;
-		case DUPLICATE_CONSTANT_ID:
-			s = Messages
-					.getString("TraceCompilerErrorMessages.DuplicateConstantID"); //$NON-NLS-1$
-			sb.append(s);
-			break;
-		case DUPLICATE_CONSTANT_TABLE_NAME:
-			s = Messages
-					.getString("TraceCompilerErrorMessages.DuplicateConstantTableName"); //$NON-NLS-1$
-			sb.append(s);
-			break;
-		case DUPLICATE_CONSTANT_TABLE_ID:
-			s = Messages
-					.getString("TraceCompilerErrorMessages.DuplicateConstantTableID"); //$NON-NLS-1$
-			sb.append(s);
-			break;
-		case DUPLICATE_PARAMETER_NAME:
-			s = Messages
-					.getString("TraceCompilerErrorMessages.DuplicateParameterName"); //$NON-NLS-1$
-			sb.append(s);
-			break;
-		case INVALID_GROUP_ID:
-			createInvalidGroupIDMessage(parameters, sb);
-			break;
-		case INVALID_TRACE_ID:
-			createInvalidTraceIDMessage(parameters, sb);
-			break;
-		case INVALID_MODEL_PROPERTIES_FOR_EXPORT:
-			s = Messages
-					.getString("TraceCompilerErrorMessages.InvalidModelPropertiesForExport"); //$NON-NLS-1$
-			sb.append(s);
-			break;
-		case INVALID_MODEL_NAME:
-			sb.append(Messages
-					.getString("TraceCompilerErrorMessages.InvalidProjectName")); //$NON-NLS-1$
-			break;
-		case INVALID_GROUP_NAME:
-			sb.append(Messages
-					.getString("TraceCompilerErrorMessages.InvalidGroupName")); //$NON-NLS-1$
-			break;
-		case INVALID_TRACE_NAME:
-			sb.append(Messages
-					.getString("TraceCompilerErrorMessages.InvalidTraceName")); //$NON-NLS-1$
-			break;
-		case INVALID_PARAMETER_NAME:
-			s = Messages
-					.getString("TraceCompilerErrorMessages.InvalidParameterName"); //$NON-NLS-1$
-			sb.append(s);
-			break;
-		case EMPTY_PARAMETER_NAME:
-			sb.append(Messages
-					.getString("TraceCompilerErrorMessages.EmptyParameterName")); //$NON-NLS-1$
-			break;
-		case INVALID_CONSTANT_TABLE_NAME:
-			s = Messages
-					.getString("TraceCompilerErrorMessages.InvalidConstantTableName"); //$NON-NLS-1$
-			sb.append(s);
-			break;
-		case CONSTANT_TABLE_NOT_PART_OF_PROJECT:
-			s = Messages
-					.getString("TraceCompilerErrorMessages.ConstantTableNotPartOfProject"); //$NON-NLS-1$
-			sb.append(s);
-			break;
-		case INVALID_TRACE_DATA:
-			sb.append(Messages
-					.getString("TraceCompilerErrorMessages.InvalidTraceData")); //$NON-NLS-1$
-			break;
-		case INVALID_PARAMETER_TYPE:
-			createInvalidParameterTypeMessage(parameters, sb);
-			break;
-		case INVALID_CONSTANT_VALUE:
-			s = Messages
-					.getString("TraceCompilerErrorMessages.InvalidConstantValue"); //$NON-NLS-1$
-			sb.append(s);
-			break;
-		case SOURCE_NOT_EDITABLE:
-			s = Messages
-					.getString("TraceCompilerErrorMessages.SourceNotEditable"); //$NON-NLS-1$
-			sb.append(s);
-			break;
-		case INVALID_SOURCE_LOCATION:
-			s = Messages
-					.getString("TraceCompilerErrorMessages.InvalidSourceLocation"); //$NON-NLS-1$
-			sb.append(s);
-			break;
-		case UNREACHABLE_TRACE_LOCATION:
-			s = Messages
-					.getString("TraceCompilerErrorMessages.UnreachableTraceLocation"); //$NON-NLS-1$
-			sb.append(s);
-			break;
-		case INVALID_PROJECT_FILE:
-			sb.append(Messages
-					.getString("TraceCompilerErrorMessages.InvalidTraceFile")); //$NON-NLS-1$
-			break;
-		case FILE_NOT_FOUND:
-			createFileNotFoundMessage((FileErrorParameters) parameters, sb);
-			break;
-		case INVALID_PATH:
-			createInvalidPathMessage((FileErrorParameters) parameters, sb);
-			break;
-		case SOURCE_NOT_OPEN:
-			sb.append(Messages
-					.getString("TraceCompilerErrorMessages.SourceNotOpen")); //$NON-NLS-1$
-			break;
-		case CANNOT_OPEN_PROJECT_FILE:
-			s = Messages
-					.getString("TraceCompilerErrorMessages.CannotOpenProjectFile"); //$NON-NLS-1$
-			sb.append(s);
-			break;
-		case CANNOT_WRITE_PROJECT_FILE:
-			s = Messages
-					.getString("TraceCompilerErrorMessages.CannotWriteProjectFile"); //$NON-NLS-1$
-			sb.append(s);
-			break;
-		case PARAMETER_FORMAT_MISMATCH:
-			s = Messages
-					.getString("TraceCompilerErrorMessages.ParameterFormatMismatch"); //$NON-NLS-1$
-			sb.append(s);
-			break;
-		case GROUP_NOT_SELECTED:
-			sb.append(Messages
-					.getString("TraceCompilerErrorMessages.GroupNotSelected")); //$NON-NLS-1$
-			break;
-		case TRACE_NOT_SELECTED:
-			sb.append(Messages
-					.getString("TraceCompilerErrorMessages.TraceNotSelected")); //$NON-NLS-1$
-			break;
-		case CONSTANT_TABLE_NOT_SELECTED:
-			s = Messages
-					.getString("TraceCompilerErrorMessages.ConstantTableNotSelected"); //$NON-NLS-1$
-			sb.append(s);
-			break;
-		case LOCATION_NOT_SELECTED:
-			s = Messages
-					.getString("TraceCompilerErrorMessages.TraceLocationNotSelected"); //$NON-NLS-1$
-			sb.append(s);
-			break;
-		case CANNOT_DELETE_SELECTED_OBJECT:
-			s = Messages
-					.getString("TraceCompilerErrorMessages.CannotDeleteSelectedObject"); //$NON-NLS-1$
-			sb.append(s);
-			break;
-		case MODEL_NOT_READY:
-			s = Messages
-					.getString("TraceCompilerErrorMessages.TraceProjectNotOpen"); //$NON-NLS-1$
-			sb.append(s);
-			break;
-		case NO_TRACE_GROUPS:
-			sb.append(Messages
-					.getString("TraceCompilerErrorMessages.NoTraceGroups")); //$NON-NLS-1$
-			break;
-		case NOT_ENOUGH_PARAMETERS:
-			s = Messages
-					.getString("TraceCompilerErrorMessages.NotEnoughParameters"); //$NON-NLS-1$
-			sb.append(s);
-			break;
-		case PARAMETER_ADD_NOT_ALLOWED:
-			s = Messages
-					.getString("TraceCompilerErrorMessages.ParameterAddNotAllowed"); //$NON-NLS-1$
-			sb.append(s);
-			break;
-		case PARAMETER_REMOVE_NOT_ALLOWED:
-			s = Messages
-					.getString("TraceCompilerErrorMessages.ParameterRemoveNotAllowed"); //$NON-NLS-1$
-			sb.append(s);
-			break;
-		case PARAMETER_TEMPLATE_ALREADY_IN_USE:
-			s = Messages
-					.getString("TraceCompilerErrorMessages.ParameterTemplateInUse"); //$NON-NLS-1$
-			sb.append(s);
-			break;
-		case CONSTANT_TABLE_PARSE_FAILED:
-			s = Messages
-					.getString("TraceCompilerErrorMessages.ConstantTableParseFailed"); //$NON-NLS-1$
-			sb.append(s);
-			break;
-		case UNEXPECTED_EXCEPTION:
-			s = Messages
-					.getString("TraceCompilerErrorMessages.UnexpectedException"); //$NON-NLS-1$
-			sb.append(s);
-			break;
-		case TRACE_NAME_FORMAT_MISSING_FUNCTION:
-			s = Messages
-					.getString("TraceCompilerErrorMessages.NameFormatMissingFunction"); //$NON-NLS-1$
-			sb.append(s);
-			break;
-		case INVALID_TRACE_TEXT_FORMAT:
-			s = Messages
-					.getString("TraceCompilerErrorMessages.InvalidTraceTextFormat"); //$NON-NLS-1$
-			sb.append(s);
-			break;
-		case INVALID_TRACE_NAME_FORMAT:
-			s = Messages
-					.getString("TraceCompilerErrorMessages.InvalidTraceNameFormat"); //$NON-NLS-1$
-			sb.append(s);
-			break;
-		case NO_FUNCTIONS_TO_INSTRUMENT_WITH_TEMPLATE:
-			s = Messages
-					.getString("TraceCompilerErrorMessages.NoFunctionsToInstrumentPrefix"); //$NON-NLS-1$
-			sb.append(s);
-			sb.append(((StringErrorParameters) parameters).string);
-			s = Messages
-					.getString("TraceCompilerErrorMessages.NoFunctionsToInstrumentPostfix"); //$NON-NLS-1$
-			sb.append(s);
-			break;
-		case NO_FUNCTIONS_TO_INSTRUMENT:
-			s = Messages
-					.getString("TraceCompilerErrorMessages.NoFunctionsToInstrument"); //$NON-NLS-1$
-			sb.append(s);
-			break;
-		case MULTIPLE_ERRORS_IN_OPERATION:
-			s = Messages
-					.getString("TraceCompilerErrorMessages.MultipleErrorsInOperation"); //$NON-NLS-1$
-			sb.append(s);
-			break;
-		case NO_TRACES_TO_DELETE:
-			sb.append(Messages
-					.getString("TraceCompilerErrorMessages.NoTracesToDelete")); //$NON-NLS-1$
-			break;
-		case TRACE_DOES_NOT_EXIST:
-			s = Messages
-					.getString("TraceCompilerErrorMessages.TraceDoesNotExist"); //$NON-NLS-1$
-			sb.append(s);
-			break;
-		case TRACE_NEEDS_CONVERSION:
-			s = Messages
-					.getString("TraceCompilerErrorMessages.TraceNeedsConversionPrefix"); //$NON-NLS-1$
-			sb.append(s);
-			break;
-		case PARAMETER_COUNT_MISMATCH:
-			s = Messages
-					.getString("TraceCompilerErrorMessages.ParameterCountMismatch"); //$NON-NLS-1$
-			sb.append(s);
-			break;
-		case PARAMETER_COUNT_DOES_NOT_MATCH_API:
-			s = Messages
-					.getString("TraceCompilerErrorMessages.ParameterCountDoesNotMatchApi"); //$NON-NLS-1$
-			sb.append(s);
-			break;
-		case TRACE_HAS_NO_LOCATIONS:
-			s = Messages
-					.getString("TraceCompilerErrorMessages.TraceHasNoLocations"); //$NON-NLS-1$
-			sb.append(s);
-			break;
-		case TRACE_HAS_MULTIPLE_LOCATIONS:
-			s = Messages
-					.getString("TraceCompilerErrorMessages.TraceHasMultipleLocations"); //$NON-NLS-1$
-			sb.append(s);
-			break;
-		case LOCATION_PARSER_FAILED:
-			s = Messages
-					.getString("TraceCompilerErrorMessages.LocationCouldNotBeParsed"); //$NON-NLS-1$
-			sb.append(s);
-			break;
-		case NO_TRACES_TO_EXPORT:
-			s = Messages
-					.getString("TraceCompilerErrorMessages.NoTracesToExport"); //$NON-NLS-1$
-			sb.append(s);
-			break;
-		case CANNOT_OPEN_SOURCE_FILE:
-			s = Messages
-					.getString("TraceCompilerErrorMessages.CannotOpenSourceFile"); //$NON-NLS-1$
-			sb.append(s);
-			break;
-		case CANNOT_UPDATE_TRACE_INTO_SOURCE:
-			s = Messages
-					.getString("TraceCompilerErrorMessages.CannotUpdateTraceIntoSource"); //$NON-NLS-1$
-			sb.append(s);
-			break;
-		case PARAMETER_FORMAT_NOT_SUPPORTED:
-			createParameterFormatNotSupportedMessage(parameters, sb);
-			break;
-		case PARAMETER_FORMAT_NEEDS_EXT_MACRO:
-			createParameterFormatNotSupportedInMacroMessage(parameters, sb);
-			break;
-		case PARAMETER_FORMAT_NOT_SUPPORTED_IN_ARRAY:
-			createParameterFormatNotSupportedInArrayMessage(parameters, sb);
-			break;
-		case PARAMETER_FORMAT_UNNECESSARY_EXT_MACRO:
-			s = Messages
-					.getString("TraceCompilerErrorMessages.ParameterFormatUnnecessaryExtMacro"); //$NON-NLS-1$
-			sb.append(s);
-			break;
-		case PROPERTY_FILE_ELEMENT_NOT_SUPPORTED:
-			s = Messages
-					.getString("TraceCompilerErrorMessages.PropertyFileElementNotSupportedPrefix"); //$NON-NLS-1$ CodForChk_Dis_LengthyLine
-			sb.append(s);
-			sb.append(((StringErrorParameters) parameters).string);
-			s = Messages
-					.getString("TraceCompilerErrorMessages.PropertyFileElementNotSupportedPostfix"); //$NON-NLS-1$ CodForChk_Dis_LengthyLine
-			sb.append(s);
-			break;
-		case PROPERTY_FILE_ELEMENT_MISPLACED:
-			s = Messages
-					.getString("TraceCompilerErrorMessages.PropertyFileElementMisplacedPrefix"); //$NON-NLS-1$
-			sb.append(s);
-			sb.append(((StringErrorParameters) parameters).string);
-			s = Messages
-					.getString("TraceCompilerErrorMessages.PropertyFileElementMisplacedPostfix"); //$NON-NLS-1$
-			sb.append(s);
-			break;
-		case PROPERTY_FILE_ATTRIBUTE_INVALID:
-			s = Messages
-					.getString("TraceCompilerErrorMessages.PropertyFileAttributeInvalidPrefix"); //$NON-NLS-1$
-			sb.append(s);
-			sb.append(((StringErrorParameters) parameters).string);
-			s = Messages
-					.getString("TraceCompilerErrorMessages.PropertyFileAttributeInvalidPostfix"); //$NON-NLS-1$
-			sb.append(s);
-			break;
-		case INSERT_TRACE_DOES_NOT_WORK:
-			s = Messages
-					.getString("TraceCompilerErrorMessages.InsertTraceDoesNotWork"); //$NON-NLS-1$
-			sb.append(s);
-			break;
-		case NO_CONTEXT_FOR_LOCATION:
-			s = Messages
-					.getString("TraceCompilerErrorMessages.NoContextForLocation"); //$NON-NLS-1$
-			sb.append(s);
-			break;
-		case CANNOT_PARSE_FUNCTION_PARAMETERS:
-			s = Messages
-					.getString("TraceCompilerErrorMessages.CannotParseFunctionParameters"); //$NON-NLS-1$
-			sb.append(s);
-			break;
-		case INVALID_PARAMETER_NAME_IN_RETURN_VALUE:
-			s = Messages
-					.getString("TraceCompilerErrorMessages.InvalidParameterNameInReturnValue"); //$NON-NLS-1$
-			sb.append(s);
-			break;
-		case RUN_OUT_OF_GROUP_IDS:
-			sb.append(Messages
-					.getString("TraceCompilerErrorMessages.RunOutOfGroupIDs")); //$NON-NLS-1$
-			break;
-		case RUN_OUT_OF_TRACE_IDS:
-			sb.append(Messages
-					.getString("TraceCompilerErrorMessages.RunOutOfTraceIDs")); //$NON-NLS-1$
-			break;
-		case VAR_ARG_LIST_PARAMETER_FOUND:
-			sb.append(Messages
-					.getString("TraceCompilerErrorMessages.VarArgListParameterFound")); //$NON-NLS-1$
-			break;
-		case INVALID_USAGE_OF_TRACE_STATE_GROUP_NAME:
-			sb.append(Messages
-					.getString("TraceCompilerErrorMessages.InvalidUsageOfTraceStateGroupName")); //$NON-NLS-1$
-			break;
-		case INVALID_USAGE_OF_TRACE_PERFORMACE_GROUP_NAME:
-			sb.append(Messages
-					.getString("TraceCompilerErrorMessages.InvalidUsageOfTracePerformanceGroupName")); //$NON-NLS-1$
-			break;
-		default:
-			break;
-		}
-		return sb.toString();
-	}
-
-	/**
-	 * Creates invalid parameter type message
-	 * 
-	 * @param parameters
-	 *            the parameters
-	 * @param sb
-	 *            the message buffer
-	 */
-	private static void createInvalidParameterTypeMessage(
-			TraceCompilerErrorParameters parameters, StringBuffer sb) {
-		String s;
-		if (parameters instanceof StringErrorParameters) {
-			s = Messages
-					.getString("TraceCompilerErrorMessages.InvalidParameterTypePrefix"); //$NON-NLS-1$
-			sb.append(s);
-			sb.append(((StringErrorParameters) parameters).string);
-			String format = SourceUtils
-					.mapNormalTypeToFormat(((StringErrorParameters) parameters).string);
-			if (format != null) {
-				sb.append(" "); //$NON-NLS-1$
-				sb.append(format);
-			}
-			s = Messages
-					.getString("TraceCompilerErrorMessages.InvalidParameterTypePostfix"); //$NON-NLS-1$
-			sb.append(s);
-		} else {
-			s = Messages
-					.getString("TraceCompilerErrorMessages.InvalidParameterType"); //$NON-NLS-1$
-			sb.append(s);
-		}
-	}
-
-	/**
-	 * Creates parameter format not supported message
-	 * 
-	 * @param parameters
-	 *            the parameters
-	 * @param sb
-	 *            the message buffer
-	 */
-	private static void createParameterFormatNotSupportedMessage(
-			TraceCompilerErrorParameters parameters, StringBuffer sb) {
-		String s;
-		if (parameters instanceof StringErrorParameters) {
-			s = Messages
-					.getString("TraceCompilerErrorMessages.ParameterFormatNotSupportedPrefix"); //$NON-NLS-1$
-			sb.append(s);
-			sb.append(((StringErrorParameters) parameters).string);
-			s = Messages
-					.getString("TraceCompilerErrorMessages.ParameterFormatNotSupportedPostfix"); //$NON-NLS-1$
-			sb.append(s);
-		} else {
-			s = Messages
-					.getString("TraceCompilerErrorMessages.ParameterFormatNotSupported"); //$NON-NLS-1$
-			sb.append(s);
-		}
-	}
-
-	/**
-	 * Creates parameter not supported in macro message
-	 * 
-	 * @param parameters
-	 *            the parameters
-	 * @param sb
-	 *            the message buffer
-	 */
-	private static void createParameterFormatNotSupportedInMacroMessage(
-			TraceCompilerErrorParameters parameters, StringBuffer sb) {
-		String s;
-		if (parameters instanceof StringErrorParameters) {
-			s = Messages
-					.getString("TraceCompilerErrorMessages.ParameterFormatNotSupportedInMacroPrefix"); //$NON-NLS-1$ CodForChk_Dis_LengthyLine
-			sb.append(s);
-			sb.append(((StringErrorParameters) parameters).string);
-			s = Messages
-					.getString("TraceCompilerErrorMessages.ParameterFormatNotSupportedInMacroPostfix"); //$NON-NLS-1$ CodForChk_Dis_LengthyLine
-			sb.append(s);
-		} else {
-			s = Messages
-					.getString("TraceCompilerErrorMessages.ParameterFormatNotSupportedInMacro"); //$NON-NLS-1$
-			sb.append(s);
-		}
-	}
-
-	/**
-	 * Creates parameter not supported in array message
-	 * 
-	 * @param parameters
-	 *            the parameters
-	 * @param sb
-	 *            the message buffer
-	 */
-	private static void createParameterFormatNotSupportedInArrayMessage(
-			TraceCompilerErrorParameters parameters, StringBuffer sb) {
-		String s;
-		if (parameters instanceof StringErrorParameters) {
-			s = Messages
-					.getString("TraceCompilerErrorMessages.ParameterFormatNotSupportedInArrayPrefix"); //$NON-NLS-1$ CodForChk_Dis_LengthyLine
-			sb.append(s);
-			sb.append(((StringErrorParameters) parameters).string);
-			s = Messages
-					.getString("TraceCompilerErrorMessages.ParameterFormatNotSupportedInArrayPostfix"); //$NON-NLS-1$ CodForChk_Dis_LengthyLine
-			sb.append(s);
-		} else {
-			s = Messages
-					.getString("TraceCompilerErrorMessages.ParameterFormatNotSupportedInArray"); //$NON-NLS-1$
-			sb.append(s);
-		}
-	}
-
-	/**
-	 * Creates invalid trace ID message
-	 * 
-	 * @param parameters
-	 *            the parameters
-	 * @param sb
-	 *            the message buffer
-	 */
-	private static void createInvalidTraceIDMessage(
-			TraceCompilerErrorParameters parameters, StringBuffer sb) {
-		String s;
-		if (parameters instanceof RangeErrorParameters) {
-			s = Messages
-					.getString("TraceCompilerErrorMessages.InvalidTraceIDStart"); //$NON-NLS-1$
-			sb.append(s);
-			s = Messages
-					.getString("TraceCompilerErrorMessages.InvalidTraceIDMiddle"); //$NON-NLS-1$
-			addRangeParameter((RangeErrorParameters) parameters, sb, s);
-			sb.append(Messages
-					.getString("TraceCompilerErrorMessages.InvalidTraceIDEnd")); //$NON-NLS-1$
-		} else {
-			sb.append(Messages
-					.getString("TraceCompilerErrorMessages.InvalidTraceID")); //$NON-NLS-1$
-		}
-	}
-
-	/**
-	 * Creates invalid group ID message
-	 * 
-	 * @param parameters
-	 *            the parameters
-	 * @param sb
-	 *            the message buffer
-	 */
-	private static void createInvalidGroupIDMessage(
-			TraceCompilerErrorParameters parameters, StringBuffer sb) {
-		String s;
-		if (parameters instanceof RangeErrorParameters) {
-			s = Messages
-					.getString("TraceCompilerErrorMessages.InvalidGroupIDStart"); //$NON-NLS-1$
-			sb.append(s);
-			s = Messages
-					.getString("TraceCompilerErrorMessages.InvalidGroupIDMiddle"); //$NON-NLS-1$
-			addRangeParameter((RangeErrorParameters) parameters, sb, s);
-			sb.append(Messages
-					.getString("TraceCompilerErrorMessages.InvalidGroupIDEnd")); //$NON-NLS-1$
-		} else {
-			sb.append(Messages
-					.getString("TraceCompilerErrorMessages.InvalidGroupID")); //$NON-NLS-1$
-		}
-	}
-
-	/**
-	 * Adds a range parameter to error buffer
-	 * 
-	 * @param parameters
-	 *            the range
-	 * @param sb
-	 *            the buffer
-	 * @param middleText
-	 *            the text between the range
-	 */
-	private static void addRangeParameter(RangeErrorParameters parameters,
-			StringBuffer sb, String middleText) {
-		if (parameters.isHex) {
-			sb.append(SourceConstants.HEX_PREFIX);
-			sb.append(Integer.toHexString(parameters.start));
-		} else {
-			sb.append(parameters.start);
-		}
-		sb.append(middleText);
-		if (parameters.isHex) {
-			sb.append(SourceConstants.HEX_PREFIX);
-			sb.append(Integer.toHexString(parameters.end));
-		} else {
-			sb.append(parameters.end);
-		}
-	}
-
-	/**
-	 * Creates "Invalid directory" message
-	 * 
-	 * @param parameters
-	 *            the message parameters
-	 * @param sb
-	 *            the string buffer where the message is stored
-	 */
-	private static void createInvalidPathMessage(
-			FileErrorParameters parameters, StringBuffer sb) {
-		String s;
-		if (parameters != null) {
-			s = Messages
-					.getString("TraceCompilerErrorMessages.InvalidDirectoryPrefix"); //$NON-NLS-1$
-			sb.append(s);
-			sb.append(convertPath(parameters.file));
-			s = Messages
-					.getString("TraceCompilerErrorMessages.InvalidDirectoryPostfix"); //$NON-NLS-1$
-			sb.append(s);
-		} else {
-			sb.append(Messages
-					.getString("TraceCompilerErrorMessages.InvalidDirectory")); //$NON-NLS-1$
-		}
-	}
-
-	/**
-	 * Creates "File not found" message
-	 * 
-	 * @param parameters
-	 *            the message parameters
-	 * @param sb
-	 *            the string buffer where the message is stored
-	 */
-	private static void createFileNotFoundMessage(
-			FileErrorParameters parameters, StringBuffer sb) {
-		String s;
-		if (parameters != null) {
-			s = Messages
-					.getString("TraceCompilerErrorMessages.FileDoesNotExistPrefix"); //$NON-NLS-1$
-			sb.append(s);
-			sb.append(convertPath(parameters.file));
-			s = Messages
-					.getString("TraceCompilerErrorMessages.FileDoesNotExistPostfix"); //$NON-NLS-1$
-			sb.append(s);
-		} else {
-			sb.append(Messages
-					.getString("TraceCompilerErrorMessages.FileDoesNotExist")); //$NON-NLS-1$
-		}
-	}
-
-	/**
-	 * Adds some spaces to path string to allow folding
-	 * 
-	 * @param path
-	 *            the path
-	 * @return the converted path
-	 */
-	public static String convertPath(String path) {
-		StringBuffer sb = new StringBuffer();
-		int strIndex = -1;
-		do {
-			strIndex++;
-			int lastIndex = strIndex;
-			strIndex = path.indexOf(File.separatorChar, strIndex);
-			if (strIndex != -1) {
-				String sub = path.substring(lastIndex, strIndex);
-				if (sub.length() > 0) {
-					sb.append(sub);
-					sb.append(' ');
-					sb.append(File.separatorChar);
-					sb.append(' ');
-				}
-			} else {
-				// If the data ends with file separator, lastIndex points to
-				// end-of-data. If not, the rest of the data is appended without
-				// further white spaces
-				if (lastIndex < path.length()) {
-					String sub = path.substring(lastIndex);
-					sb.append(sub);
-				}
-			}
-		} while (strIndex != -1);
-		return sb.toString();
-	}
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/TraceCompilerEngineEvents.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,98 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Event listener interface
-*
-*/
-package com.nokia.tracecompiler.engine;
-
-import com.nokia.tracecompiler.model.TraceCompilerException;
-
-/**
- * Event listener interface
- * 
- */
-public interface TraceCompilerEngineEvents {
-
-	/**
-	 * Posts an error event to TraceCompiler
-	 * 
-	 * @param exception
-	 *            the error data
-	 */
-	public void postError(TraceCompilerException exception);
-
-	/**
-	 * Posts an error event to TraceCompiler
-	 * 
-	 * @param message
-	 *            the error message
-	 * @param source
-	 *            the error source
-	 * @param postEvent
-	 *            defines is error event also posted to trace event view
-	 */
-	public void postErrorMessage(String message, Object source, boolean postEvent);
-
-	/**
-	 * Posts a warning event to TraceCompiler
-	 * 
-	 * @param message
-	 *            the warning message
-	 * @param source
-	 *            the warning source
-	 */
-	public void postWarningMessage(String message, Object source);
-
-	/**
-	 * Posts an info event to TraceCompiler
-	 * 
-	 * @param message
-	 *            the info message
-	 * @param source
-	 *            the info source
-	 */
-	public void postInfoMessage(String message, Object source);
-
-	/**
-	 * Posts a critical assertion failed event
-	 * 
-	 * @param message
-	 *            the message
-	 * @param source
-	 *            the source of the assertion
-	 * @throws TraceCompilerException 
-	 */
-	public void postCriticalAssertionFailed(String message, Object source) throws TraceCompilerException;
-
-	/**
-	 * Posts an assertion failed event
-	 * 
-	 * @param message
-	 *            the message
-	 * @param source
-	 *            the source of the assertion
-	 */
-	public void postAssertionFailed(String message, Object source);
-
-	/**
-	 * Gets the processing error
-	 * 
-	 * @return the error
-	 */
-	public boolean hasErrorHappened();
-
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/TraceCompilerEngineGlobals.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,255 +0,0 @@
-/*
-* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Access point to the exported interfaces of TraceCompiler engine
-*
-*/
-package com.nokia.tracecompiler.engine;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-
-import com.nokia.tracecompiler.TraceCompilerLogger;
-import com.nokia.tracecompiler.engine.source.SourceEngine;
-import com.nokia.tracecompiler.model.TraceCompilerException;
-import com.nokia.tracecompiler.model.TraceModel;
-import com.nokia.tracecompiler.plugin.TraceCompilerPlugin;
-import com.nokia.tracecompiler.source.SourceConstants;
-
-/**
- * Access point to the exported interfaces of TraceCompiler engine
- * 
- */
-public class TraceCompilerEngineGlobals {
-
-	/**
-	 * Max group ID
-	 */
-	public static final int MAX_GROUP_ID = 65535; // CodForChk_Dis_Magic
-
-	/**
-	 * Max trace ID
-	 */
-	public static final int MAX_TRACE_ID = 65535; // CodForChk_Dis_Magic
-
-	/**
-	 * TraceCompiler engine instance
-	 */
-	private static TraceCompilerEngine instance;
-	
-	/**
-	 * default licence
-	 */
-	static String defaultLicence;
-	
-	/**
-	 * default licence
-	 */
-	static String defaultLicenceWithHash;
-	
-	/**
-	 * Constructor is hidden
-	 */
-	private TraceCompilerEngineGlobals() {
-	}
-
-	/**
-	 * Starts TraceCompiler engine.
-	 * @throws TraceCompilerException 
-	 */
-	public static void start() throws TraceCompilerException {
-		if (instance == null) {
-			instance = new TraceCompilerEngine();
-			instance.start();
-		}
-	}
-
-	/**
-	 * Shuts down the TraceCompiler instance
-	 * @throws TraceCompilerException 
-	 */
-	public static void shutdown() throws TraceCompilerException {
-		if (instance != null) {
-			instance.shutdown();
-			instance = null;
-		}
-	}
-
-	/**
-	 * Gets the configuration interface. The configuration interface is not
-	 * available until view has been registered.
-	 * 
-	 * @return the configuration
-	 */
-	public static TraceCompilerEngineConfiguration getConfiguration() {
-		return instance.getConfiguration();
-	}
-
-	/**
-	 * Gets the trace model
-	 * 
-	 * @return the model
-	 */
-	public static TraceModel getTraceModel() {
-		return instance.getModel();
-	}
-
-	/**
-	 * Gets the source engine
-	 * 
-	 * @return the source engine
-	 */
-	public static SourceEngine getSourceEngine() {
-		return instance.getSourceEngine();
-	}
-
-	/**
-	 * Gets the trace compiler interface
-	 * 
-	 * @return trace compiler
-	 */
-	public static TraceCompilerEngineInterface getTraceCompiler() {
-		return instance.getTraceCompiler();
-	}
-
-	/**
-	 * Gets the events interface
-	 * 
-	 * @return the events interface
-	 */
-	public static TraceCompilerEngineEvents getEvents() {
-		if (instance != null) {
-			return instance.getEvents();
-		} else {
-			return null;
-		}
-	}
-
-	/**
-	 * Called by a plug-in to register itself
-	 * 
-	 * @param plugin
-	 *            the plugin to be registered
-	 */
-	public static void registerPlugin(TraceCompilerPlugin plugin) {
-		instance.registerPlugin(plugin);
-	}
-
-	/**
-	 * Called by a plug-in to unregister itself
-	 * 
-	 * @param plugin
-	 *            the plugin to be unregistered
-	 */
-	public static void unregisterPlugin(TraceCompilerPlugin plugin) {
-		if (instance != null) {
-			instance.unregisterPlugin(plugin);
-		}
-	}
-
-	/**
-	 * Called by the view plug-in to register the view
-	 * 
-	 * @param view
-	 *            the view
-	 * @throws TraceCompilerException 
-	 */
-	public static void setView(TraceCompilerEngineView view) throws TraceCompilerException {
-		instance.setView(view);
-	}
-
-	/**
-	 * Gets the source context manager
-	 * 
-	 * @return the context manager
-	 */
-	public static SourceContextManager getSourceContextManager() {
-		return instance.getSourceContextManager();
-	}
-
-	/**
-	 * Get project path
-	 * 
-	 * @return project path
-	 */
-	public static String getProjectPath() {
-		String projetcPath = instance.getProjectPath();
-		return projetcPath;
-	}
-
-	/**
-	 * Set project path
-	 * 
-	 * @param path
-	 *            the path
-	 */
-	public static void setProjectPath(String path) {
-		instance.setProjectPath(path);
-	}
-	
-	/**
-	 * get default licence from com/nokia/tracecompiler/licence.lic
-	 * c++ comment format
-	 * @param boolean cppCommented
-	 *  if true, it returns the licence in cpp comment \/** ... **\/
-	 *  else it retuen the licence in a # comment ## ... ##
-	 * @return String licence
-	 */
-	public static String getDefaultLicence(boolean cppCommented) {
-		String licenceResourceName;
-		if (cppCommented) {
-			if (defaultLicence == null) {
-				licenceResourceName = "/com/nokia/tracecompiler/licence.lic"; //$NON-NLS-1$
-				defaultLicence = readLicence(licenceResourceName);
-			}
-			return defaultLicence;
-		} else {
-			if (defaultLicenceWithHash == null) {
-				licenceResourceName = "/com/nokia/tracecompiler/licence_hash.lic"; //$NON-NLS-1$
-				defaultLicenceWithHash = readLicence(licenceResourceName);
-			}
-			return defaultLicenceWithHash;
-		}
-	}
-
-	/**
-	 * read the provided resource file and return the text in it.
-	 */
-	private static String readLicence(String aLicenceResourceName) {
-		String licenceText = null;
-		InputStream is = instance.getClass().getResourceAsStream(aLicenceResourceName); 
-		if (is != null) {
-			InputStreamReader isr = new InputStreamReader(is);
-			BufferedReader br = new BufferedReader(isr);
-			StringBuffer sb = new StringBuffer();
-			String line;
-			try {
-				while ((line = br.readLine()) != null) {
-					sb.append(line + SourceConstants.LINE_FEED);
-				}
-				licenceText = sb.toString();
-				br.close();
-				isr.close();
-				is.close();
-			} catch (IOException e) {
-				TraceCompilerLogger.printWarning(Messages.getString("TraceCompilerErrorMessages.LicenceFileError") + e.getMessage()); //$NON-NLS-1$
-			}
-		}
-		return licenceText;
-	}
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/TraceCompilerEngineInterface.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,55 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* TraceCompiler interface
-*
-*/
-package com.nokia.tracecompiler.engine;
-
-import com.nokia.tracecompiler.model.TraceCompilerException;
-
-/**
- * TraceCompiler interface
- * 
- */
-public interface TraceCompilerEngineInterface {
-
-	/**
-	 * Opens the trace project related to given source file
-	 * 
-	 * @param modelName
-	 *            the name for the model
-	 * @throws TraceCompilerException
-	 *             if startup fails
-	 * @throws Exception 
-	 */
-	public void openProject(String modelName)
-			throws Exception; //this include TraceCompilerException
-
-	/**
-	 * Exports the trace project
-	 * 
-	 * @throws TraceCompilerException
-	 *             if export fails
-	 */
-	public void exportProject() throws TraceCompilerException;
-
-	/**
-	 * Closes the trace project
-	 * @throws TraceCompilerException 
-	 */
-	public void closeProject() throws TraceCompilerException;
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/TraceCompilerEngineView.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Interface implemented by the view of TraceCompiler
-*
-*/
-package com.nokia.tracecompiler.engine;
-
-/**
- * Interface implemented by the view of TraceCompiler. The view is implemented
- * as a separate plug-in, which is registered via
- * {@link TraceCompilerEngineGlobals#setView(TraceCompilerView)}
- * 
- * @see com.nokia.tracecompiler.engine.TraceCompilerEngineGlobals#setView(TraceCompilerView)
- */
-public interface TraceCompilerEngineView {
-
-	/**
-	 * Gets the configuration interface
-	 * 
-	 * @return the configuration interface
-	 */
-	public TraceCompilerEngineConfiguration getConfiguration();
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/TraceLocation.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,491 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Represents a location of a trace within a source document
-*
-*/
-package com.nokia.tracecompiler.engine;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-
-import com.nokia.tracecompiler.engine.TraceCompilerEngineErrorCodes.TraceCompilerErrorCode;
-import com.nokia.tracecompiler.engine.source.SourceParserResult;
-import com.nokia.tracecompiler.engine.source.SourceParserRule;
-import com.nokia.tracecompiler.engine.source.SourceProperties;
-import com.nokia.tracecompiler.model.Trace;
-import com.nokia.tracecompiler.model.TraceCompilerErrorParameters;
-import com.nokia.tracecompiler.model.TraceCompilerException;
-import com.nokia.tracecompiler.model.TraceObject;
-import com.nokia.tracecompiler.source.SourceConstants;
-import com.nokia.tracecompiler.source.SourceLocation;
-import com.nokia.tracecompiler.source.SourceLocationListener;
-
-/**
- * Represents a location of a trace within a source document. The locations of a
- * document are updated by TraceLocationUpdater when document is changed
- * 
- */
-public class TraceLocation extends SourceLocation implements LocationProperties {
-
-	/**
-	 * Source which owns this location
-	 */
-	private SourceProperties source;
-
-	/**
-	 * Name of the trace as parsed from source
-	 */
-	private String originalName;
-
-	/**
-	 * Name after conversion to valid trace name
-	 */
-	private String convertedName;
-
-	/**
-	 * Text of the trace as parsed from source
-	 */
-	private String traceText;
-
-	/**
-	 * The tag of the parser that found this trace location
-	 */
-	private String tag;
-
-	/**
-	 * Content changed flag
-	 */
-	private boolean contentChanged;
-
-	/**
-	 * Name changed flag
-	 */
-	private boolean nameChanged;
-
-	/**
-	 * The location list
-	 */
-	private TraceLocationList list;
-
-	/**
-	 * The parameters
-	 */
-	private List<String> parameters;
-
-	/**
-	 * Parser-specific data associated with this location
-	 */
-	private List<String> parserData;
-
-	/**
-	 * Rule which defines how the parameters found from source are interpreted
-	 */
-	private SourceParserRule parserRule;
-
-	/**
-	 * Flag, which determines if this location has changed after last convert
-	 * operation
-	 */
-	private boolean changedAfterConvert = true;
-
-	/**
-	 * Last notified validity code
-	 */
-	private TraceCompilerErrorCode notifiedValidity = TraceCompilerErrorCode.OK;
-
-	/**
-	 * Last notified validity parameters
-	 */
-	private TraceCompilerErrorParameters notifiedValidityParameters;
-
-	/**
-	 * Parser error code
-	 */
-	private TraceCompilerErrorCode parserErrorCode = TraceCompilerErrorCode.OK;
-
-	/**
-	 * Parser error parameters
-	 */
-	private TraceCompilerErrorParameters parserErrorParameters;
-
-	/**
-	 * Converter error code
-	 */
-	private TraceCompilerErrorCode converterErrorCode = TraceCompilerErrorCode.OK;
-
-	/**
-	 * Converter error parameters
-	 */
-	private TraceCompilerErrorParameters converterErrorParameters;
-
-	/**
-	 * Creates a new location
-	 * 
-	 * @param source
-	 *            the source where the location is associated
-	 * @param offset
-	 *            the offset to the trace within the source document
-	 * @param length
-	 *            the length of the trace
-	 */
-	public TraceLocation(SourceProperties source, int offset, int length) {
-		super(source.getSourceParser(), offset, length);
-		this.source = source;
-	}
-
-	/**
-	 * Sets the content changed flag. If <i>changed</i> is false this also sets
-	 * the name changed flag to false
-	 * 
-	 * @param changed
-	 *            the new changed flag
-	 */
-	public void setContentChanged(boolean changed) {
-		this.contentChanged = changed;
-		if (!changed) {
-			nameChanged = false;
-		}
-	}
-
-	/**
-	 * Checks if the content has changed.
-	 * 
-	 * @return the content changed flag
-	 */
-	public boolean isContentChanged() {
-		return contentChanged;
-	}
-
-	/**
-	 * Checks if the name has changed.
-	 * 
-	 * @return the name changed flag
-	 */
-	public boolean isNameChanged() {
-		return contentChanged && nameChanged;
-	}
-
-	/**
-	 * Gets the trace this location is associated to or null if unrelated
-	 * 
-	 * @return the trace
-	 */
-	public Trace getTrace() {
-		Trace retval = null;
-		if (list != null) {
-			TraceObject object = list.getOwner();
-			if (object instanceof Trace) {
-				retval = (Trace) object;
-			}
-		}
-		return retval;
-	}
-
-	/**
-	 * Gets the name of the trace as parsed from source
-	 * 
-	 * @return the name of the trace
-	 */
-	public String getOriginalName() {
-		return originalName;
-	}
-
-	/**
-	 * Gets the name of the trace after conversion to valid name
-	 * 
-	 * @return the name of the trace
-	 */
-	public String getConvertedName() {
-		return convertedName;
-	}
-
-	/**
-	 * Gets the text of the trace
-	 * 
-	 * @return the text of the trace
-	 */
-	public String getTraceText() {
-		return traceText;
-	}
-
-	/**
-	 * Returns the source properties this location belongs to
-	 * 
-	 * @return source properties
-	 */
-	public SourceProperties getSource() {
-		return source;
-	}
-
-	/**
-	 * Sets the location list which owns this location
-	 * 
-	 * @param list
-	 *            the location list
-	 */
-	public void setLocationList(TraceLocationList list) {
-		this.list = list;
-	}
-
-	/**
-	 * Gets the location list this location belongs to
-	 * 
-	 * @return the list
-	 */
-	public TraceLocationList getLocationList() {
-		return list;
-	}
-
-	/**
-	 * Sets the parser rule that will be used to parse the data of this
-	 * location. Must be called before setData
-	 * 
-	 * @param rule
-	 *            the rule used to parse the data
-	 */
-	public void setParserRule(SourceParserRule rule) {
-		parserRule = rule;
-	}
-
-	/**
-	 * Gets the parser rule that found this location
-	 * 
-	 * @return the parser rule
-	 */
-	public SourceParserRule getParserRule() {
-		return parserRule;
-	}
-
-	/**
-	 * Sets the trace tag that was found from source
-	 * 
-	 * @param tag
-	 *            the trace tag
-	 */
-	public void setTag(String tag) {
-		this.tag = tag;
-	}
-
-	/**
-	 * Gets the trace tag
-	 * 
-	 * @return the tag
-	 */
-	public String getTag() {
-		return tag;
-	}
-
-	/**
-	 * Sets the trace data
-	 * 
-	 * @param list
-	 *            the list of parameters
-	 */
-	public void setData(ArrayList<String> list) {
-		try {
-			SourceParserResult result = parserRule.parseParameters(tag, list);
-			setData(result.originalName, result.convertedName,
-					result.traceText, result.parameters, result.parserData);
-			parserRule.getLocationParser().processNewLocation(this);
-			parserErrorCode = TraceCompilerErrorCode.OK;
-			parserErrorParameters = null;
-			converterErrorCode = TraceCompilerErrorCode.OK;
-			converterErrorParameters = null;
-		} catch (TraceCompilerException e) {
-			parserErrorCode = (TraceCompilerErrorCode) e.getErrorCode();
-			parserErrorParameters = e.getErrorParameters();
-		}
-	}
-
-	/**
-	 * Sets the trace name and parameter list
-	 * 
-	 * @param originalName
-	 *            the name parsed from source
-	 * @param convertedName
-	 *            the name after conversion
-	 * @param traceText
-	 *            the text parsed from source
-	 * @param parameters
-	 *            the list of parameters parsed from source
-	 * @param parserData
-	 *            list of parser-specific data
-	 */
-	private void setData(String originalName, String convertedName,
-			String traceText, List<String> parameters, List<String> parserData) {
-		if (!convertedName.equals(this.convertedName)) {
-			this.convertedName = convertedName;
-			nameChanged = true;
-		}
-		this.originalName = originalName;
-		//remove line feed if the trace text spans multiple lines.
-		if (traceText != null ) {
-			this.traceText = traceText.replaceAll(SourceConstants.LINE_FEED, ""); //$NON-NLS-1$ //$NON-NLS-2$
-		}
-		this.parameters = parameters;
-		this.parserData = parserData;
-	}
-
-	/**
-	 * Removes the parameter at given index
-	 * 
-	 * @param index
-	 *            the index
-	 */
-	public void removeParameterAt(int index) {
-		// NOTE: Does not cause validity callbacks
-		// This is currently only used temporarily when removing a parameter
-		// from trace. This is needed to correctly update the source code
-		if (parameters != null && index >= 0 && index < parameters.size()) {
-			parameters.remove(index);
-		}
-	}
-
-	/**
-	 * Gets the number of parameters found from the source code
-	 * 
-	 * @return the number of parameters
-	 */
-	public int getParameterCount() {
-		return parameters != null ? parameters.size() : 0;
-	}
-
-	/**
-	 * Gets the parameter at given index
-	 * 
-	 * @param index
-	 *            the parameter index
-	 * @return the parameter at the index
-	 */
-	public String getParameter(int index) {
-		return parameters.get(index);
-	}
-
-	/**
-	 * Gets the parameters
-	 * 
-	 * @return iterator over the parameters
-	 */
-	public Iterator<String> getParameters() {
-		List<String> list = null;
-		if (parameters != null) {
-			list = parameters;
-		} else {
-			list = Collections.emptyList();
-		}
-		return list.iterator();
-	}
-
-	/**
-	 * Gets the parser-specific data
-	 * 
-	 * @return the parser data
-	 */
-	public List<String> getParserData() {
-		return parserData;
-	}
-
-	/**
-	 * Gets the current location validity code.
-	 * 
-	 * @return the validity code
-	 */
-	public TraceCompilerErrorCode getValidityCode() {
-		return notifiedValidity;
-	}
-
-	/**
-	 * Gets the parameters associated with the current location validity code.
-	 * 
-	 * @return the validity code
-	 */
-	public TraceCompilerErrorParameters getValidityParameters() {
-		return notifiedValidityParameters;
-	}
-
-	/**
-	 * Creates a notification if validity has changed. This is initially called
-	 * from the location list when a location is added to it and after that from
-	 * notifyLocationChanged.
-	 */
-	void runValidityCheck() {
-		TraceCompilerErrorCode code;
-		TraceCompilerErrorParameters parameters;
-		if (parserErrorCode != TraceCompilerErrorCode.OK) {
-			code = parserErrorCode;
-			parameters = parserErrorParameters;
-		} else if (converterErrorCode != TraceCompilerErrorCode.OK) {
-			code = converterErrorCode;
-			parameters = converterErrorParameters;
-		} else {
-			code = TraceCompilerErrorCode.TRACE_DOES_NOT_EXIST;
-			parameters = null;
-			if (parserRule != null) {
-				code = parserRule.getLocationParser().checkLocationValidity(
-						this);
-			}
-		}
-		if (code != notifiedValidity) {
-			notifiedValidity = code;
-			notifiedValidityParameters = parameters;
-			Iterator<SourceLocationListener> itr = getListeners();
-			while (itr.hasNext()) {
-				SourceLocationListener listener = itr.next();
-				if (listener instanceof SourceLocationListener) {
-					((SourceLocationListener) listener)
-							.locationValidityChanged(this);
-				}
-			}
-		}
-	}
-
-	/**
-	 * Sets the converter error code and runs the validity check to notify
-	 * listeners about change in error code
-	 * 
-	 * @param errorCode
-	 *            the new error code
-	 * @param parameters
-	 *            the error parameters
-	 */
-	void setConverterErrorCode(TraceCompilerErrorCode errorCode,
-			TraceCompilerErrorParameters parameters) {
-		converterErrorCode = errorCode;
-		converterErrorParameters = parameters;
-		runValidityCheck();
-	}
-
-	/**
-	 * Flag, which determines if the location has changed since last convert
-	 * operation
-	 * 
-	 * @return the flag
-	 */
-	public boolean hasChangedAfterConvert() {
-		return changedAfterConvert;
-	}
-
-	/**
-	 * Called when the location has been converted. Sets the changed after
-	 * convert flag to false
-	 */
-	public void locationConverted() {
-		changedAfterConvert = false;
-	}
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/TraceLocationConverter.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,679 +0,0 @@
-/*
- * Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). 
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of "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:
- *
- * Description:
- *
- * Location converter monitors locations and converts them to traces if necessary.
- *
- */
-package com.nokia.tracecompiler.engine;
-
-import java.io.*;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Properties;
-
-import com.nokia.tracecompiler.TraceCompilerConstants;
-import com.nokia.tracecompiler.TraceCompilerLogger;
-import com.nokia.tracecompiler.engine.TraceCompilerEngineErrorCodes.TraceCompilerErrorCode;
-import com.nokia.tracecompiler.engine.project.ProjectConstants;
-import com.nokia.tracecompiler.engine.project.ProjectEngine;
-import com.nokia.tracecompiler.engine.project.SortedProperties;
-import com.nokia.tracecompiler.engine.project.TraceIDCache;
-import com.nokia.tracecompiler.engine.rules.PerformanceEventRuleBase;
-import com.nokia.tracecompiler.engine.rules.StateTraceRule;
-import com.nokia.tracecompiler.engine.source.SourceParserRule;
-import com.nokia.tracecompiler.engine.source.SourceProperties;
-import com.nokia.tracecompiler.engine.source.SourceParserRule.ParameterConversionResult;
-import com.nokia.tracecompiler.engine.source.SourceParserRule.TraceConversionResult;
-import com.nokia.tracecompiler.model.Trace;
-import com.nokia.tracecompiler.model.TraceCompilerException;
-import com.nokia.tracecompiler.model.TraceGroup;
-import com.nokia.tracecompiler.model.TraceModel;
-import com.nokia.tracecompiler.model.TraceModelExtension;
-import com.nokia.tracecompiler.model.TraceModelPersistentExtension;
-import com.nokia.tracecompiler.model.TraceParameter;
-import com.nokia.tracecompiler.project.FormattingUtils;
-import com.nokia.tracecompiler.project.GroupNames;
-import com.nokia.tracecompiler.project.ProjectUtils;
-import com.nokia.tracecompiler.source.SourceConstants;
-
-/**
- * Location converter monitors locations and converts them to traces if
- * necessary.
- * 
- */
-public final class TraceLocationConverter {
-
-	/**
-	 * Number of deprecated groups
-	 */
-	final static int NUMBER_OF_DEPRECATED_GROUPS = 3;
-
-	/**
-	 * Deprecated group name map
-	 */
-	Map<String, String> deprecatedGroupNameMap = new HashMap<String, String>(
-			NUMBER_OF_DEPRECATED_GROUPS);
-
-	/**
-	 * Trace model
-	 */
-	private TraceModel model;
-
-	/**
-	 * Constructor
-	 * 
-	 * @param model
-	 *            the trace model
-	 */
-	TraceLocationConverter(TraceModel model) {
-		this.model = model;
-		initializeDeprecatedGroupNameMap();
-	}
-
-	/**
-	 * Initialize deprecated group name map
-	 */
-	private void initializeDeprecatedGroupNameMap() {
-		deprecatedGroupNameMap.put(GroupNames.TRACE_API,
-				GroupNames.TRACE_BORDER);
-		deprecatedGroupNameMap.put(GroupNames.TRACE_DEBUG,
-				GroupNames.TRACE_DUMP);
-		deprecatedGroupNameMap.put(GroupNames.TRACE_DETAILED,
-				GroupNames.TRACE_INTERNALS);
-	}
-
-	/**
-	 * Source opened notification
-	 * 
-	 * @param properties
-	 *            the source properties
-	 * @throws TraceCompilerException 
-	 */
-	void sourceOpened(SourceProperties properties) throws TraceCompilerException {
-		//make sure all errors are reported AFTER processing a file
-		TraceCompilerEngineGlobals.getSourceContextManager()
-				.setConverting(true);
-		model.startProcessing();
-		try {
-			// Load fixed group and trace ids from definition file to model
-			//no errors are reported here 
-			if (model.getFixedIds() == null) {
-				loadFixedIdsFromDefinitionFileToModel();
-			}
-
-			for (TraceLocation loc : properties) {
-				autoConvertLocation(loc);
-			}
-			// If there are duplicates or unused traces, they are removed
-			// Note that this will work across source files although this
-			// function is processing only one file.
-			// If a trace is created, all locations from all open source files
-			// are linked to that trace and thus it will be removed as
-			// duplicate.
-			removeDuplicateTraces();
-
-		} finally {
-			model.processingComplete();
-			SourceContextManager manager = TraceCompilerEngineGlobals
-					.getSourceContextManager();
-			manager.setConverting(false);
-			manager.setContext(null);
-		}
-	}
-
-	/**
-	 * Load fixed Ids from definiton file to properties
-	 * 
-	 */
-	private void loadFixedIdsFromDefinitionFileToModel() {
-		TraceIDCache cache = model.getExtension(TraceIDCache.class);
-
-		// Create trace Id cache if it does not exist
-		try {
-			if (cache == null) {
-				String path;
-				path = ProjectUtils.getLocationForFile(model,
-						ProjectEngine.traceFolderName,
-						ProjectConstants.FIXED_ID_DEFINITIONS_FILE_NAME, false);
-				if (path != null) {
-					cache = new TraceIDCache(new File(path).getParent());
-					model.addExtension(cache);
-				}
-			}
-			if (cache != null) {
-				File cacheFile = new File(cache.getAbsolutePath());
-				// Try to load Ids from trace Id cache file
-				try {
-					SortedProperties fixedIds = new SortedProperties();
-					if (cacheFile.exists()) {
-						String thisLine;
-						boolean allOldFixedIdsAreValid = true;
-						String group = model.GROUP_PROPERTY_PREFIX;
-						FileInputStream fis = new FileInputStream(cacheFile);
-						BufferedReader myInput = new BufferedReader(
-								new InputStreamReader(fis));
-						// Read the old fixed id definition file
-						while ((thisLine = myInput.readLine()) != null) {
-							if (thisLine.indexOf(group) != -1) {
-								thisLine = thisLine.substring(group.length(),
-										thisLine.length());
-								if (!searchForOldGroupIds(thisLine)) {						
-									String msg  = Messages.getString("TraceLocationConverter.GroupIdValueError"); //$NON-NLS-1$
-									TraceCompilerEngineGlobals.getEvents().postWarningMessage(msg, null);
-									// We need only one old invalid id to make all of them invalid
-									allOldFixedIdsAreValid = false;
-									break;
-								}
-							}
-						}
-						fis.close();
-						
-						if (allOldFixedIdsAreValid) {
-							// Create file input stream again
-							FileInputStream newFis = new FileInputStream(cacheFile);
-							fixedIds.load(newFis);
-							// Load fixed Ids from properties to model
-							model.setFixedIds(fixedIds);
-							newFis.close();
-						}
-						
-					}
-				} catch (IOException e) {
-					// If there is a problem with the cache file, just delete it
-					// make sure the model fixed ids is null
-					model.setFixedIds(null);
-					cacheFile.delete();
-					// We do not raise an exception but we need to report a info
-					TraceCompilerLogger.printWarning(Messages.getString("TraceLocationConverter.FixedIdProblemWarningBeginText") + cacheFile.toString() + Messages.getString("TraceLocationConverter.FixedIdProblemWarningMiddleText") + e.getMessage()); //$NON-NLS-1$ //$NON-NLS-2$
-				}
-			}
-		} catch (TraceCompilerException e) {
-			// This exception can probably be ignored
-			TraceCompilerLogger.printWarning("Could not create ID cache : " + e.getMessage()); //$NON-NLS-1$
-		}
-	}
-
-	/**
-	 * Searches the fixed_id file to see if there are any old definitions
-	 * 
-	 * @param string
-	 *            of text from the fixed_id files
-	 * @return boolean 
-	 */
-	public static boolean searchForOldGroupIds(String str) {
-		
-		boolean oldGroupIdValid = true;
-
-		//get group name from the string
-		int index = str.indexOf(SourceConstants.ASSIGN_WITH_OUT_SPACES);
-		if (index == -1) {
-			//not valid string, so ignore it, just return success
-			return true;
-		}
-
-		String groupName = str.substring(0, index);
-
-		//get group id
-		str = str.substring(str.indexOf(SourceConstants.HEX_PREFIX) + 2, str
-				.length());
-
-		int groupId = -1;
-
-		try {
-			groupId = Integer.parseInt(str.trim(),
-					TraceCompilerConstants.HEX_RADIX);
-		} catch (NumberFormatException e) {
-			//it's not an hex number so fail
-			oldGroupIdValid = false;
-		}
-
-		//get group id from ost header file
-		int fileGroupId = GroupNames.getIdByName(groupName);
-
-		if (fileGroupId != 0) {
-			//found 1
-			if (fileGroupId != groupId) //group id has changed, so old one can't be used
-				oldGroupIdValid = false;
-		} else {
-			if ((GroupNames.USER_GROUP_ID_FIRST > groupId)
-					|| (groupId > GroupNames.USER_GROUP_ID_LAST)) //not within new user defined Ids
-				oldGroupIdValid = false;
-		}
-
-		return oldGroupIdValid;
-	}
-
-	/**
-	 * Converts the given location to trace if parser supports auto-conversion
-	 * 
-	 * @param location
-	 *            the location
-	 */
-	private void autoConvertLocation(TraceLocation location) {
-		// Stores the context of the location to the context manager.
-		TraceCompilerEngineGlobals.getSourceContextManager().setContext(
-				location.getParser().getContext(location.getOffset()));
-		Trace trace = location.getTrace();
-		if (trace == null) {
-			// If the trace does not exist, the parser determines if the
-			// location can be converted
-			if (location.getParserRule().getLocationParser()
-					.isLocationConverted(location)) {
-				try {
-					convertLocation(location, null, true);
-				} catch (TraceCompilerException e) {
-					// If converter fails, the error code is stored into the
-					// location. The location notifies all validity listeners
-					// about the change
-					location.setConverterErrorCode((TraceCompilerErrorCode) e
-							.getErrorCode(), e.getErrorParameters());
-				}
-			}
-		} else {
-			// If the trace already exists in the model, it is updated
-			// based on the source file contents
-			updateLocation(location);
-		}
-	}
-
-	/**
-	 * Recreates the trace from changed location when source is saved
-	 * 
-	 * @param location
-	 *            the location to be checked
-	 */
-	private void updateLocation(TraceLocation location) {
-		// Parser determines if the location can be converted
-		if (location.getParserRule().getLocationParser().isLocationConverted(
-				location)) {
-			try {
-				Trace trace = location.getTrace();
-				// If a location has changed, the old trace is removed
-				// and a new one created. Persistent extensions are moved to the
-				// new trace
-				Iterator<TraceModelPersistentExtension> extensions = null;
-				if (trace != null) {
-					extensions = trace
-							.getExtensions(TraceModelPersistentExtension.class);
-					trace.getGroup().removeTrace(trace);
-				}
-				convertLocation(location, extensions, true);
-
-				// Check that the location is inside a function. Otherwise throw
-				// an error because the code is unreachable
-				if (location.getFunctionName() == null) {
-					throw new TraceCompilerException(
-							TraceCompilerErrorCode.UNREACHABLE_TRACE_LOCATION);
-				}
-
-			} catch (TraceCompilerException e) {
-				// If converter fails, the error code is stored into the
-				// location. The location notifies all validity listeners about
-				// the change
-				location.setConverterErrorCode((TraceCompilerErrorCode) e
-						.getErrorCode(), e.getErrorParameters());
-			}
-		}
-	}
-
-	/**
-	 * Removes all duplicate traces from the model
-	 * @throws TraceCompilerException 
-	 */
-	private void removeDuplicateTraces() throws TraceCompilerException {
-		boolean groupRemoved = true;
-		while (groupRemoved) {
-			groupRemoved = false;
-			for (TraceGroup group : model) {
-				removeDuplicateTracesFromGroup(group);
-				if (!group.hasTraces()) {
-					model.removeGroup(group);
-					groupRemoved = true;
-					break;
-				}
-			}
-		}
-	}
-
-	/**
-	 * Removes duplicate traces from a trace group
-	 * 
-	 * @param group
-	 *            the group
-	 * @throws TraceCompilerException 
-	 */
-	private void removeDuplicateTracesFromGroup(TraceGroup group) throws TraceCompilerException {
-		boolean traceRemoved = true;
-		while (traceRemoved) {
-			traceRemoved = false;
-			for (Trace trace : group) {
-				TraceLocationList list = trace
-						.getExtension(TraceLocationList.class);
-				if (list != null) {
-					if (list.getLocationCount() > 1) {
-						// All the locations are marked as duplicates and the
-						// trace is deleted
-						TraceCompilerErrorCode code = TraceCompilerErrorCode.TRACE_HAS_MULTIPLE_LOCATIONS;
-						for (LocationProperties loc : list) {
-							((TraceLocation) loc).setConverterErrorCode(code,
-									null);
-						}
-						group.removeTrace(trace);
-						traceRemoved = true;
-						break;
-					}
-				}
-			}
-		}
-	}
-
-	/**
-	 * Converts a location to a Trace object.
-	 * 
-	 * @param location
-	 *            the location to be converted
-	 * @param extensions
-	 *            persistent extensions to be added to the new trace
-	 * @param autoConvert
-	 *            true if converting without user interaction
-	 * @return the new trace
-	 * @throws TraceCompilerException
-	 *             if conversion fails
-	 */
-	private Trace convertLocation(TraceLocation location,
-			Iterator<TraceModelPersistentExtension> extensions,
-			boolean autoConvert) throws TraceCompilerException {
-		Trace trace = null;
-		// If the parser has failed, the validity code is not OK and the
-		// location cannot be converted. Traces marked with no-trace error code
-		// have not yet been converted, so that is OK. Traces that have
-		// duplicate ID's error code can be parsed, since the duplicates might
-		// no longer exist.
-		if (!autoConvert
-				|| location.getValidityCode() == TraceCompilerErrorCode.OK
-				|| location.getValidityCode() == TraceCompilerErrorCode.TRACE_DOES_NOT_EXIST
-				|| location.getValidityCode() == TraceCompilerErrorCode.TRACE_HAS_MULTIPLE_LOCATIONS) {
-			// The parser does the actual conversion
-			SourceParserRule rule = location.getParserRule();
-			TraceConversionResult result = rule.getLocationParser()
-					.convertLocation(location);
-			// After parser has finished, the trace is created.
-			trace = convertWithoutUI(result, extensions);
-
-			if (trace != null) {
-				model.startProcessing();
-				try {
-					createParametersFromConversionResult(location, result,
-							trace);
-					// Runs a location validity check and notifies listeners
-					// that location is now OK
-					location.setConverterErrorCode(TraceCompilerErrorCode.OK,
-							null);
-				} catch (TraceCompilerException e) {
-					// If parameters cannot be created, the trace is removed
-					TraceGroup group = trace.getGroup();
-					trace.getGroup().removeTrace(trace);
-					if (!group.hasTraces()) {
-						group.getModel().removeGroup(group);
-					}
-					throw e;
-				} finally {
-					model.processingComplete();
-				}
-			}
-		}
-		return trace;
-	}
-
-	/**
-	 * Converts a location to trace without UI
-	 * 
-	 * @param result
-	 *            the conversion result from parser
-	 * @param extensions
-	 *            persistent extensions to be added to the new trace
-	 * @return the converted trace
-	 * @throws TraceCompilerException
-	 *             if location properties are not valid
-	 */
-	private Trace convertWithoutUI(TraceConversionResult result,
-			Iterator<TraceModelPersistentExtension> extensions)
-			throws TraceCompilerException {
-		Trace trace = null;
-		if (result.group != null) {
-			String groupName = result.group;
-			TraceGroup group = handleGroup(groupName);
-			trace = handleTrace(result, extensions, group);
-		} else {
-			throw new TraceCompilerException(
-					TraceCompilerErrorCode.GROUP_NOT_SELECTED);
-		}
-		return trace;
-	}
-
-	/**
-	 * Handle trace
-	 * 
-	 * @param result
-	 *            the conversion result from parser
-	 * @param extensions
-	 *            persistent extensions to be added to the new trace
-	 * @param group
-	 *            the group where trace belongs to
-	 * @return the trace
-	 * @throws TraceCompilerException
-	 */
-	private Trace handleTrace(TraceConversionResult result,
-			Iterator<TraceModelPersistentExtension> extensions, TraceGroup group)
-			throws TraceCompilerException {
-		// First try to find Id to trace from fixed Ids
-		Trace trace = null;
-		Properties fixedIds = model.getFixedIds();
-		String groupName = result.group;
-		String traceName = result.name;
-		int groupId = group.getID();
-		String groupIdString = SourceConstants.HEX_PREFIX
-				+ Integer.toString(groupId, model.HEX_RADIX).toUpperCase();
-		int traceId = 0;
-		if (fixedIds != null) {
-			String tracePropertyName = groupName + model.GROUP_ID_PREFIX
-					+ groupIdString + model.GROUP_ID_SUFFIX
-					+ SourceConstants.UNDERSCORE + traceName;
-			String value = fixedIds.getProperty(model.TRACE_PROPERTY_PREFIX
-					+ tracePropertyName);
-			if (value != null) {
-				try {
-					traceId = Integer.decode(value).intValue();
-				} catch (NumberFormatException e) {
-					// Corrupted, assign a proper Id later on
-					traceId = 0;
-				}
-			}
-		}
-		// If there was no fixed Id to this trace, get Id from model
-		if (traceId == 0) {
-			traceId = model.getNextTraceId(group);
-		}
-
-		String text = result.text;
-		model.getVerifier().checkTraceProperties(group, null, traceId,
-				traceName, text);
-		TraceModelExtension[] extArray = createExtensionArray(result,
-				extensions);
-		trace = model.getFactory().createTrace(group, traceId, traceName, text,
-				extArray);
-
-		if ((trace.getExtension(StateTraceRule.class) == null)
-				&& (group.getName()
-						.equals("TRACE_STATE"))) { //$NON-NLS-1$
-			throw new TraceCompilerException(
-					TraceCompilerErrorCode.INVALID_USAGE_OF_TRACE_STATE_GROUP_NAME);
-		} else if ((trace.getExtension(PerformanceEventRuleBase.class) == null)
-				&& (group.getName()
-						.equals("TRACE_PERFORMANCE"))) { //$NON-NLS-1$
-			throw new TraceCompilerException(
-					TraceCompilerErrorCode.INVALID_USAGE_OF_TRACE_PERFORMACE_GROUP_NAME);
-		}
-
-		return trace;
-	}
-
-	/**
-	 * Handle group. Try to fnd group from model. If it does not exist then
-	 * create new group.
-	 * 
-	 * @param groupName
-	 *            the name of the group
-	 * @return the handled group
-	 * @throws TraceCompilerException
-	 */
-	private TraceGroup handleGroup(String groupName)
-			throws TraceCompilerException {
-		String deprecatedGroupName = null;
-		
-		// Convert deprecated group name to valid group name if needed
-		if (deprecatedGroupNameMap.containsKey(groupName)) {
-			deprecatedGroupName = groupName;
-			groupName = deprecatedGroupNameMap.get(groupName);
-		}
-
-		// If auto-convert flag is set, the location is converted without
-		// user interaction. A new trace group is created if not found
-		TraceGroup group = model.findGroupByName(groupName);
-		if (group == null) {
-			
-			// Print warning related to deprecated group name change if needed
-			if (deprecatedGroupName != null) {
-				String message = Messages
-						.getString("TraceLocationConverter.DeprecatedGroupIdWarningStart");//$NON-NLS-1$
-				message += SourceConstants.SPACE + deprecatedGroupName
-						+ SourceConstants.SPACE;
-				message += Messages
-						.getString("TraceLocationConverter.DeprecatedGroupIdWarningMiddle");//$NON-NLS-1$
-				message += SourceConstants.SPACE + groupName
-						+ SourceConstants.SPACE;
-				message += Messages
-						.getString("TraceLocationConverter.DeprecatedGroupIdWarningEnd");//$NON-NLS-1$
-				TraceCompilerLogger.printWarning(message);
-			}
-
-			int groupId = 0;
-			Properties fixedIds = model.getFixedIds();
-
-			// First try to find Id to group from fixed Ids
-			if (fixedIds != null) {
-				String value = fixedIds.getProperty(model.GROUP_PROPERTY_PREFIX
-						+ groupName);
-				if (value != null) {
-					try {
-						groupId = Integer.decode(value).intValue();
-					} catch (NumberFormatException e) {
-						// Corrupted, assign a proper Id later on
-						groupId = 0;
-					}
-				}
-			}
-			// If there was no fixed Id to this group, get Id from model
-			if (groupId == 0) {
-				groupId = FormattingUtils.getGroupID(model, groupName);
-			}
-			model.getVerifier().checkTraceGroupProperties(model, null, groupId,
-					groupName);
-			group = model.getFactory().createTraceGroup(groupId, groupName,
-					null);
-		}
-
-		return group;
-	}
-
-	/**
-	 * Combines extensions into one array
-	 * 
-	 * @param result
-	 *            the conversion result
-	 * @param extensions
-	 *            the persistent extensions from old trace
-	 * @return the combined array of extensions
-	 */
-	private TraceModelExtension[] createExtensionArray(
-			TraceConversionResult result,
-			Iterator<TraceModelPersistentExtension> extensions) {
-		TraceModelExtension[] extArray = null;
-		ArrayList<TraceModelExtension> ext = null;
-		if (result.extensions != null) {
-			ext = new ArrayList<TraceModelExtension>();
-			ext.addAll(result.extensions);
-		}
-		if (extensions != null) {
-			if (ext == null) {
-				ext = new ArrayList<TraceModelExtension>();
-			}
-			while (extensions.hasNext()) {
-				ext.add(extensions.next());
-			}
-		}
-		if (ext != null) {
-			extArray = new TraceModelExtension[ext.size()];
-			ext.toArray(extArray);
-		}
-		return extArray;
-	}
-
-	/**
-	 * Creates the trace parameters based on trace conversion result
-	 * 
-	 * @param converted
-	 *            the location that was converted
-	 * @param result
-	 *            the conversion result
-	 * @param trace
-	 *            the trace
-	 * @throws TraceCompilerException
-	 *             if parameters cannot be created
-	 */
-	private void createParametersFromConversionResult(TraceLocation converted,
-			TraceConversionResult result, Trace trace)
-			throws TraceCompilerException {
-		if (result.parameters != null) {
-			for (int i = 0; i < result.parameters.size(); i++) {
-				int id = trace.getNextParameterID();
-				ParameterConversionResult res = result.parameters.get(i);
-				boolean warning = false;
-				if (res.type == null) {
-					warning = true;
-					res.type = TraceParameter.HEX32;
-				}
-				model.getVerifier().checkTraceParameterProperties(trace, null,
-						id, res.name, res.type);
-				TraceModelExtension[] extArray = null;
-				if (res.extensions != null) {
-					extArray = new TraceModelExtension[res.extensions.size()];
-					res.extensions.toArray(extArray);
-				}
-				TraceParameter param = model.getFactory().createTraceParameter(
-						trace, id, res.name, res.type, extArray);
-				if (warning) {
-					String msg = Messages
-							.getString("TraceCompiler.UnknownTypeWarning"); //$NON-NLS-1$
-					TraceCompilerEngineGlobals.getEvents().postWarningMessage(
-							msg, param);
-				}
-			}
-		}
-	}
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/TraceLocationList.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,146 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* List of trace locations
-*
-*/
-package com.nokia.tracecompiler.engine;
-
-import java.util.ArrayList;
-
-import com.nokia.tracecompiler.model.TraceCompilerException;
-
-/**
- * List of trace locations.
- * 
- */
-public class TraceLocationList extends LocationListBase {
-
-	/**
-	 * Location list listeners
-	 */
-	private ArrayList<TraceLocationListListener> listeners = new ArrayList<TraceLocationListListener>();
-
-	/**
-	 * List title, returned by getTitle
-	 */
-	private String listTitle;
-
-	/**
-	 * Constructor
-	 */
-	TraceLocationList() {
-	}
-
-	/**
-	 * Constructor
-	 * 
-	 * @param listTitle
-	 *            the title of this location list
-	 */
-	TraceLocationList(String listTitle) {
-		this.listTitle = listTitle;
-	}
-
-	/**
-	 * Adds a location to this list.
-	 * 
-	 * @param location
-	 *            the location to be added
-	 * @throws TraceCompilerException 
-	 */
-	void addLocation(TraceLocation location) throws TraceCompilerException {
-		if (TraceCompilerEngineConfiguration.ASSERTIONS_ENABLED) {
-			if (contains(location)) {
-				//this can only happen if there is a programming error
-				TraceCompilerEngineGlobals.getEvents().postCriticalAssertionFailed(
-						"Duplicate trace location", //$NON-NLS-1$
-						location.getConvertedName());
-				throw new TraceCompilerException(null);
-			}
-		}
-		location.setLocationList(this);
-		add(location);
-		fireLocationAdded(location);
-		location.runValidityCheck();
-	}
-
-	/**
-	 * Removes a location from this list.
-	 * 
-	 * @param location
-	 *            the location to be removed
-	 */
-	void removeLocation(TraceLocation location) {
-		if (remove(location)) {
-			fireLocationRemoved(location);
-			location.setLocationList(null);
-		}
-	}
-
-	/**
-	 * Adds a location list listener to this object
-	 * 
-	 * @param listener
-	 *            the listener interface
-	 */
-	public void addLocationListListener(TraceLocationListListener listener) {
-		listeners.add(listener);
-	}
-
-	/**
-	 * Removes the location list listener
-	 * 
-	 * @param listener
-	 *            the listener interface
-	 */
-	public void removeLocationListListener(TraceLocationListListener listener) {
-		listeners.remove(listener);
-	}
-
-	/**
-	 * Creates locationAdded event to location list listeners
-	 * 
-	 * @param location
-	 *            the location that was added
-	 */
-	private void fireLocationAdded(TraceLocation location) {
-		for (TraceLocationListListener l : listeners) {
-			l.locationAdded(location);
-		}
-	}
-
-	/**
-	 * Creates locationRemoved event to location list listeners
-	 * 
-	 * @param location
-	 *            the location that was added
-	 */
-	void fireLocationRemoved(TraceLocation location) {
-		for (TraceLocationListListener l : listeners) {
-			l.locationRemoved(location);
-		}
-	}
-
-	/**
-	 * Gets the list title or null
-	 * 
-	 * @return the list title
-	 */
-	public String getListTitle() {
-		return listTitle;
-	}
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/TraceLocationListListener.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Listener for trace location lists
-*
-*/
-package com.nokia.tracecompiler.engine;
-
-/**
- * Listener for trace location lists
- * 
- */
-public interface TraceLocationListListener {
-
-	/**
-	 * Location was added to this list
-	 * 
-	 * @param location
-	 *            the new location
-	 */
-	public void locationAdded(TraceLocation location);
-
-	/**
-	 * Location was removed from this list
-	 * 
-	 * @param location
-	 *            the location that was removed
-	 */
-	public void locationRemoved(TraceLocation location);
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/TraceLocationMap.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,174 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Maps trace locations into traces and vice versa
-*
-*/
-package com.nokia.tracecompiler.engine;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-
-import com.nokia.tracecompiler.engine.source.SourceProperties;
-import com.nokia.tracecompiler.model.Trace;
-import com.nokia.tracecompiler.model.TraceCompilerException;
-import com.nokia.tracecompiler.model.TraceModel;
-
-/**
- * Maps trace locations into traces and vice versa.
- * 
- */
-final class TraceLocationMap {
-
-	/**
-	 * List of unrelated traces
-	 */
-	private TraceLocationList unrelated = new TraceLocationList();
-
-	/**
-	 * Parser groups
-	 */
-	private HashMap<String, TraceLocationList> parserGroups = new HashMap<String, TraceLocationList>();
-
-	/**
-	 * The trace model
-	 */
-	private TraceModel model;
-
-	/**
-	 * Global list of locations, used for verification purposes with
-	 * GLOBAL_LOCATION_ASSERTS configuration flag
-	 */
-	private ArrayList<TraceLocation> globalList;
-
-	/**
-	 * Creates a location mapper
-	 * 
-	 * @param model
-	 *            the trace model
-	 */
-	public TraceLocationMap(TraceModel model) {
-		if (TraceCompilerEngineConfiguration.GLOBAL_LOCATION_ASSERTS) {
-			globalList = new ArrayList<TraceLocation>();
-		}
-		this.model = model;
-		model.addModelListener(new LocationMapModelListener(this));
-		model.addExtension(unrelated);
-	}
-
-	/**
-	 * Adds the locations from the source file to the map
-	 * 
-	 * @param source
-	 *            properties of the source to be added
-	 * @throws TraceCompilerException 
-	 */
-	void addSource(SourceProperties source) throws TraceCompilerException {
-		for (TraceLocation location : source) {
-			if (TraceCompilerEngineConfiguration.GLOBAL_LOCATION_ASSERTS) {
-				if (globalList.contains(location)) {
-					TraceCompilerEngineGlobals.getEvents().postAssertionFailed(
-							"Location already in global list", //$NON-NLS-1$
-							location.getConvertedName());
-				} else {
-					globalList.add(location);
-				}
-			}
-			// Generates locationAdded event via TraceLocationListListener
-			addNewLocationToTrace(location);
-		}
-	}
-
-	/**
-	 * Adds a location to trace or to the unrelated list if a trace cannot be
-	 * found.
-	 * 
-	 * @param location
-	 *            the location to be added
-	 * @throws TraceCompilerException 
-	 */
-	private void addNewLocationToTrace(TraceLocation location) throws TraceCompilerException {
-		TraceLocationList list;
-		Trace trace = model.findTraceByName(location.getOriginalName());
-		if (trace != null) {
-			list = trace.getExtension(TraceLocationList.class);
-			if (list == null) {
-				list = new TraceLocationList();
-				trace.addExtension(list);
-			}
-		} else {
-			String name = location.getParserRule().getLocationParser()
-					.getLocationGroup();
-			if (name == null) {
-				list = unrelated;
-			} else {
-				list = parserGroups.get(name);
-				if (list == null) {
-					list = new TraceLocationList(name);
-					model.addExtension(list);
-					parserGroups.put(name, list);
-				}
-			}
-		}
-		list.addLocation(location);
-	}
-
-	/**
-	 * Moves the locations from trace to unrelated list
-	 * 
-	 * @param trace
-	 *            the trace
-	 * @throws TraceCompilerException 
-	 */
-	void moveToUnrelated(Trace trace) throws TraceCompilerException {
-		TraceLocationList list = trace.getExtension(TraceLocationList.class);
-		if (list != null) {
-			trace.removeExtension(list);
-			for (LocationProperties loc : list) {
-				unrelated.addLocation((TraceLocation) loc);
-			}
-		}
-	}
-
-	/**
-	 * Moves locations from unrelated to the given trace
-	 * 
-	 * @param trace
-	 *            the trace
-	 * @throws TraceCompilerException 
-	 */
-	void moveFromUnrelated(Trace trace) throws TraceCompilerException {
-		String name = trace.getName();
-		TraceLocationList list = null;
-		Iterator<LocationProperties> itr = unrelated.iterator();
-		while (itr.hasNext()) {
-			TraceLocation location = (TraceLocation) itr.next();
-			if (name.equals(location.getOriginalName())) {
-				list = trace.getExtension(TraceLocationList.class);
-				if (list == null) {
-					list = new TraceLocationList();
-					trace.addExtension(list);
-				}
-				// NOTE: This must replicate the behavior of
-				// TraceLocationList.removeLocation
-				itr.remove();
-				unrelated.fireLocationRemoved(location);
-				list.addLocation(location);
-			}
-		}
-	}
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/ViewAdapter.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* View adapter
-*
-*/
-package com.nokia.tracecompiler.engine;
-
-
-/**
- * View adapter implements the view interface.
- * 
- */
-public class ViewAdapter implements TraceCompilerEngineView {
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engi.TraceCompilerEngineView#getConfiguration()
-	 */
-	public TraceCompilerEngineConfiguration getConfiguration() {
-		// This can be null, the configuration delegate checks it
-		return null;
-	}
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/event/EventEngine.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,239 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Implements TraceCompilerEvents to forward events to the event router plug-in
-*
-*/
-package com.nokia.tracecompiler.engine.event;
-
-import com.nokia.tracecompiler.TraceCompilerGlobals;
-import com.nokia.tracecompiler.TraceCompilerLogger;
-import com.nokia.tracecompiler.engine.TraceCompilerEngineErrorMessages;
-import com.nokia.tracecompiler.engine.TraceCompilerEngineEvents;
-import com.nokia.tracecompiler.engine.TraceCompilerEngineGlobals;
-import com.nokia.tracecompiler.model.TraceCompilerException;
-import com.nokia.tracecompiler.model.TraceModel;
-import com.nokia.tracecompiler.source.SourceConstants;
-import com.nokia.tracecompiler.source.SourceLocationBase;
-
-/**
- * Implements TraceCompilerEvents to forward events to the event router plug-in
- * 
- */
-public final class EventEngine implements TraceCompilerEngineEvents {
-
-	/**
-	 * Info event type
-	 */
-	public final static int INFO = 1; // CodForChk_Dis_Magic
-
-	/**
-	 * Warning event type
-	 */
-	public final static int WARNING = 2; // CodForChk_Dis_Magic
-
-	/**
-	 * Error event type
-	 */
-	public final static int ERROR = 3; // CodForChk_Dis_Magic
-
-	/**
-	 * Critical assertion failure event type
-	 */
-	public final static int ASSERT_CRITICAL = 4; // CodForChk_Dis_Magic
-
-	/**
-	 * Non-critical assertion failure event type
-	 */
-	public final static int ASSERT_NORMAL = 5; // CodForChk_Dis_Magic
-	
-
-	/**
-	 * indicates if an error happened for all files
-	 */
-	private boolean globalProcessingError = false;
-	
-
-
-	/**
-	 * Constructor
-	 * 
-	 * @param model
-	 *            the trace model
-	 */
-	public EventEngine(TraceModel model) {
-	}
-
-	/**
-	 * check if an error happened
-	 * 
-	 * @return the error
-	 */
-	public boolean hasErrorHappened() {
-		return globalProcessingError;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engine.TraceCompilerEvents#
-	 *      postError(com.nokia.tracecompiler.engine.TraceCompilerException)
-	 */
-	public void postError(TraceCompilerException exception) {
-		String message = TraceCompilerEngineErrorMessages.getErrorMessage(exception);
-		if (message != null && message.length() > 0) {
-			postErrorMessage(message, exception.getErrorSource(), exception.isEventWantedToPost());
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engine.TraceCompilerEvents#postErrorMessage(java.lang.String, java.lang.Object, boolean)
-	 */
-	public void postErrorMessage(String message, Object source, boolean postEvent) {
-		
-		if (postEvent) {
-			postEvent(ERROR, message, source);
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engine.TraceCompilerEvents#
-	 *      postWarningMessage(java.lang.String, java.lang.Object)
-	 */
-	public void postWarningMessage(String message, Object source) {
-		postEvent(WARNING, message, source);
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engine.TraceCompilerEvents#
-	 *      postInfoMessage(java.lang.String, java.lang.Object)
-	 */
-	public void postInfoMessage(String message, Object source) {
-		postEvent(INFO, message, source);
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engine.TraceCompilerEvents#
-	 *      postAssertionFailed(java.lang.String, java.lang.Object)
-	 */
-	public void postAssertionFailed(String message, Object source) {
-		message = "Assertion failed. Reason: " //$NON-NLS-1$
-				+ message;
-		postEvent(ASSERT_NORMAL, message, source);
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engine.TraceCompilerEvents#
-	 *      postCriticalAssertionFailed(java.lang.String, java.lang.Object)
-	 */
-	public void postCriticalAssertionFailed(String message, Object source) throws TraceCompilerException {
-		message = "Critical assertion failure, the project has been closed. Reason: " //$NON-NLS-1$
-				+ message;
-		// Closes the trace project and shows an error message
-		TraceCompilerEngineGlobals.getTraceCompiler().closeProject();
-		postEvent(ASSERT_CRITICAL, message, source);
-	}
-
-
-	/**
-	 * Print an event to console
-	 * @param type
-	 *            event type
-	 * @param message
-	 *            event message
-	 * @param source
-	 *            event source
-	 */
-	private void postEvent(int type, String message, Object source) {
-		switch (type) {
-		case INFO:
-				if (TraceCompilerGlobals.isVebose()) {
-					printEvent(type, message, source);
-
-					// This means that the component has been processed. Let's
-					// print one space to ensure that parse_mmp.pl will print
-					// out something.
-				} else if (message.contains(
-						"Dictionary File written")) { //$NON-NLS-1$
-					System.out.print(" "); //$NON-NLS-1$
-				} else if (!message
-						.contains("No files were written")) { //$NON-NLS-1$
-					// If we get "no files written" message, let's dismiss it ->
-					// parse_mmp.pl won't print out anything
-					printEvent(type, message, source);
-				}
-			break;
-		case WARNING:
-		case ERROR:
-		case ASSERT_NORMAL:
-		case ASSERT_CRITICAL:
-			printEvent(type, message, source);
-			break;
-		}		
-	}
-
-	/**
-	 * Prints event
-	 * @param type error type
-	 * @param message
-	 *            event message
-	 * @param source
-	 *            event source
-	 */
-	private void printEvent(int type, String message, Object source) {
-		if (message == null) {
-			message = Messages.getString("EventEngine.unknowError"); //$NON-NLS-1$
-		}
-		String fullMessage = ""; //$NON-NLS-1$
-
-		
-		if (source instanceof SourceLocationBase) {
-			SourceLocationBase location = (SourceLocationBase) source;
-			fullMessage = location.getFileName() + Messages.getString("EventEngine.lineNumberPrefix") + location.getLineNumber() + SourceConstants.COLON + SourceConstants.SPACE; //$NON-NLS-1$
-		} else if (source instanceof String) {
-			message = (String) source;
-		}
-		fullMessage = fullMessage + message;
-		
-		switch (type) {
-		case INFO:
-			TraceCompilerLogger.printInfo(fullMessage);
-			break;
-		case WARNING:
-		case ASSERT_NORMAL:
-			TraceCompilerLogger.printWarning(fullMessage);
-			break;
-		case ERROR:
-		case ASSERT_CRITICAL:
-			globalProcessingError = true;
-			TraceCompilerLogger.printError(fullMessage);
-			break;
-		default:
-			break;
-		}
-	}
-	
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/event/Messages.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,57 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Localized strings for engine package
-*
-*/
-package com.nokia.tracecompiler.engine.event;
-
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-public class Messages {
-
-	/**
-	 * Bundle name
-	 */
-	private static final String BUNDLE_NAME = "com.nokia.tracecompiler.engine.event.messages"; //$NON-NLS-1$
-
-	/**
-	 * Bundle
-	 */
-	private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
-			.getBundle(BUNDLE_NAME);
-
-	/**
-	 * Prevents construction
-	 */
-	private Messages() {
-	}
-	
-	/**
-	 * Gets localized string based on key
-	 * 
-	 * @param key
-	 *            the resource key
-	 * @return the localized resource
-	 */
-	public static String getString(String key) {
-		try {
-			return RESOURCE_BUNDLE.getString(key);
-		} catch (MissingResourceException e) {
-			return '!' + key + '!';
-		}
-	}
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/event/messages.properties	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,2 +0,0 @@
-EventEngine.lineNumberPrefix=, line 
-EventEngine.unknowError=Unknown error happened, Please report to trace team.
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/event/package.html	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-<html><body>
-TraceCompiler event router implementation
-</body></html>
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/header/CheckFormattedTraceExists.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Kernel #endif flag check
-*
-*/
-package com.nokia.tracecompiler.engine.header;
-
-/**
- * Trace activation length check template element
- * 
- */
-public final class CheckFormattedTraceExists extends TemplateCheckBase {
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engine.header.TemplateCheckBase#check()
-	 */
-	@Override
-	boolean check() {
-		return writer.getCurrentTraceFormatted().length() > 0;
-	}
-
-}
\ No newline at end of file
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/header/CheckIsBufferSizeDynamic.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Dynamic buffer size check
-*
-*/
-package com.nokia.tracecompiler.engine.header;
-
-/**
- * Dynamic buffer size check
- * 
- */
-public final class CheckIsBufferSizeDynamic extends TemplateCheckBase {
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engine.header.TemplateCheckBase#check()
-	 */
-	@Override
-	boolean check() {
-		return writer.isBufferSizeDynamic();
-	}
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/header/CheckIsKernelModeEndifNeeded.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Kernel #endif flag check
-*
-*/
-package com.nokia.tracecompiler.engine.header;
-
-/**
- * __KERNEL_MODE__ #endif flag check
- * 
- */
-public final class CheckIsKernelModeEndifNeeded extends TemplateCheckBase {
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engine.header.TemplateCheckBase#check()
-	 */
-	@Override
-	boolean check() {
-		return writer.isKernelModeEndifNeeded();
-	}
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/header/CheckIsKernelModeFlagNeeded.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Kernel #endif flag check
-*
-*/
-package com.nokia.tracecompiler.engine.header;
-
-import com.nokia.tracecompiler.source.SymbianConstants;
-
-/**
- * Check if __KERNEL_MODE__ flags needs to be added
- * 
- */
-public final class CheckIsKernelModeFlagNeeded extends TemplateCheckBase {
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engine.header.TemplateCheckBase#check()
-	 */
-	@Override
-	boolean check() {
-		boolean retval;
-		if (writer.getCurrentTraceFormatted().contains(
-				SymbianConstants.CONST_TDESC16_REF)) {
-			retval = true;
-			writer.setKernelModeEndifNeeded(true);
-		} else {
-			retval = false;
-			writer.setKernelModeEndifNeeded(false);
-		}
-		return retval;
-	}
-}
\ No newline at end of file
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/header/CheckIsTraceBufferBuilt.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Trace buffer flag check
-*
-*/
-package com.nokia.tracecompiler.engine.header;
-
-/**
- * Trace buffer flag check
- * 
- */
-public final class CheckIsTraceBufferBuilt extends TemplateCheckBase {
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engine.header.TemplateCheckBase#check()
-	 */
-	@Override
-	boolean check() {
-		return writer.isTraceBufferBuilt();
-	}
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/header/CheckIsTraceFormatDuplicate.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Checks if a trace format exists
-*
-*/
-package com.nokia.tracecompiler.engine.header;
-
-/**
- * Checks if a trace format exists
- * 
- */
-public final class CheckIsTraceFormatDuplicate extends TemplateCheckBase {
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engine.header.TemplateCheckBase#check()
-	 */
-	@Override
-	boolean check() {
-		return writer.isTraceFormatDuplicate();
-	}
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/header/CheckParameterNeedsAlignment.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Checks if parameter needs 32-bit alignment
-*
-*/
-package com.nokia.tracecompiler.engine.header;
-
-/**
- * Checks if parameter needs 32-bit alignment
- * 
- */
-final class CheckParameterNeedsAlignment extends TemplateCheckBase {
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engine.header.TemplateCheckBase#check()
-	 */
-	@Override
-	boolean check() {
-		return writer.isParameterAlignmentNeeded();
-	}
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/header/ComplexHeaderRule.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Rule which specifies that a trace cannot be represented by the normal trace API macros
-*
-*/
-package com.nokia.tracecompiler.engine.header;
-
-import com.nokia.tracecompiler.model.TraceObjectRule;
-
-/**
- * Rule which specifies that a trace cannot be represented by the normal trace
- * API macros
- * 
- */
-public interface ComplexHeaderRule extends TraceObjectRule {
-
-	/**
-	 * Returns true if an ext-function needs to be written for this trace
-	 * 
-	 * @return function flag
-	 */
-	public boolean needsFunction();
-
-	/**
-	 * Gets an extension to be added to the trace ID define
-	 * 
-	 * @return the extension
-	 */
-	public String getTraceIDDefineExtension();
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/header/HeaderConstants.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Constants for header engine package
-*
-*/
-package com.nokia.tracecompiler.engine.header;
-
-/**
- * Constants for header engine package
- * 
- */
-interface HeaderConstants {
-
-	/**
-	 * Number of parent paths to check when locating include directory
-	 */
-	int INC_SEARCH_DEPTH = 3; // CodForChk_Dis_Magic
-
-	/**
-	 * Trace header extension
-	 */
-	String TRACE_HEADER_EXTENSION = "Traces.h"; //$NON-NLS-1$
-
-	/**
-	 * Main trace header name
-	 */
-	String TRACE_HEADER_NAME = "OstTraceDefinitions.h"; //$NON-NLS-1$
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/header/HeaderEngine.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,289 +0,0 @@
-/*
-* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Header engine manages the trace header file that is included into source code
-*
-*/
-package com.nokia.tracecompiler.engine.header;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Iterator;
-
-import com.nokia.tracecompiler.engine.LocationListBase;
-import com.nokia.tracecompiler.engine.LocationProperties;
-import com.nokia.tracecompiler.engine.TraceCompilerEngineBase;
-import com.nokia.tracecompiler.engine.TraceCompilerEngineEvents;
-import com.nokia.tracecompiler.engine.TraceCompilerEngineGlobals;
-import com.nokia.tracecompiler.engine.TraceCompilerEngineErrorCodes.TraceCompilerErrorCode;
-import com.nokia.tracecompiler.engine.project.ProjectEngine;
-import com.nokia.tracecompiler.file.FileCompareOutputStream;
-import com.nokia.tracecompiler.model.Trace;
-import com.nokia.tracecompiler.model.TraceCompilerException;
-import com.nokia.tracecompiler.model.TraceGroup;
-import com.nokia.tracecompiler.model.TraceModel;
-import com.nokia.tracecompiler.plugin.TraceHeaderContribution;
-import com.nokia.tracecompiler.plugin.TraceHeaderContribution.TraceHeaderContributionType;
-import com.nokia.tracecompiler.project.ProjectUtils;
-import com.nokia.tracecompiler.project.TraceProjectAPI;
-import com.nokia.tracecompiler.source.SourceUtils;
-
-/**
- * Header engine manages the trace header file that is included into source
- * code. This implements the plug-in interface to get notifications about
- * project file opening and closing
- * 
- */
-public final class HeaderEngine extends TraceCompilerEngineBase {
-
-	/**
-	 * Trace model
-	 */
-	private TraceModel model;
-
-	/**
-	 * Constructor
-	 * 
-	 * @param model
-	 *            trace model
-	 */
-	public HeaderEngine(TraceModel model) {
-		this.model = model;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engine.TraceCompilerEngine#projectOpened()
-	 */
-	@Override
-	public void projectOpened() {
-		TraceHeader header = model.getExtension(TraceHeader.class);
-		if (header == null) {
-			String fileName = null;
-			try {
-				fileName = ProjectUtils.getLocationForFile(model,
-						ProjectEngine.traceFolderName,
-						HeaderConstants.TRACE_HEADER_NAME, false);
-			} catch (TraceCompilerException e) {
-				// Model should always be open when traceProjectOpened is called
-			}
-			if (fileName != null) {
-				header = new TraceHeader(fileName, false);
-				model.addExtension(header);
-			} else {
-				String msg = Messages
-						.getString("HeaderEngine.FailedToAttachHeader"); //$NON-NLS-1$
-				TraceCompilerEngineGlobals.getEvents().postErrorMessage(msg, null, true);
-			}
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engin.TraceCompilererEngine#projectClosing()
-	 */
-	@Override
-	public void projectClosed() {
-		model.removeExtensions(TraceHeader.class);
-	}
-
-	/**
-	 * Gets the name for the trace header file based on given source
-	 * 
-	 * @param sourceFile
-	 *            the source file name
-	 * @return the header file name
-	 */
-	public String getHeaderFileName(String sourceFile) {
-		String retval = null;
-		if (model != null) {
-			// The header file name is the source file name with extension
-			// replaced by Traces.h
-			File f = new File(sourceFile);
-			retval = removeFileExtension(f.getName())
-					+ HeaderConstants.TRACE_HEADER_EXTENSION;
-		}
-		return retval;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engi.TraceCompilerlerEngine#projectExporting()
-	 */
-	@Override
-	public void exportProject() throws TraceCompilerException {
-		if (model.isValid() && model.hasTraces()) {
-			TraceHeader header = model.getExtension(TraceHeader.class);
-			if (header != null) {
-				// Headers for each source are written first
-				String path = header.getPath();
-				ArrayList<String> fileNames = new ArrayList<String>();
-				collectSourceFilesFromTraces(fileNames);
-				for (String fileName : fileNames) {
-					String target = path + File.separator + fileName;
-					writeHeaderFile(target);
-				}
-				// The main header is written after everything else succeeds
-				writeMainHeaderFile(header);
-			}
-		}
-	}
-
-	/**
-	 * Collects the source file names from traces
-	 * 
-	 * @param fileNames
-	 *            the file names
-	 */
-	private void collectSourceFilesFromTraces(ArrayList<String> fileNames) {
-		for (TraceGroup group : model) {
-			for (Trace trace : group) {
-				Iterator<LocationListBase> itr = trace
-						.getExtensions(LocationListBase.class);
-				while (itr.hasNext()) {
-					LocationListBase base = itr.next();
-					for (LocationProperties loc : base) {
-						String locFileName = loc.getFileName();
-						if (locFileName != null) {
-							addFileToList(fileNames, locFileName);
-						}
-					}
-				}
-			}
-		}
-	}
-
-	/**
-	 * Adds a file to list if it does not exist
-	 * 
-	 * @param fileNames
-	 *            the list
-	 * @param locFileName
-	 *            the file
-	 */
-	private void addFileToList(ArrayList<String> fileNames, String locFileName) {
-		locFileName = removeFileExtension(locFileName);
-		if (!fileNames.contains(locFileName)) {
-			fileNames.add(locFileName);
-		}
-	}
-
-	/**
-	 * Removes the file extension from file name
-	 * 
-	 * @param fileName
-	 *            the file name
-	 * @return name without extension
-	 */
-	private String removeFileExtension(String fileName) {
-		int index = fileName.lastIndexOf('.');
-		int sep1 = fileName.lastIndexOf('/');
-		int sep2 = fileName.lastIndexOf('\\');
-		if (index > sep1 && index > sep2) {
-			fileName = fileName.substring(0, index);
-		}
-		return fileName;
-	}
-
-	/**
-	 * Writes the header to given target
-	 * 
-	 * @param target
-	 *            the target file
-	 * @throws TraceCompilerException
-	 *             if writing fails
-	 */
-	private void writeHeaderFile(String target) throws TraceCompilerException {
-		// The TraceHeader stored into the model is not used when writing
-		// headers, since a separate header is written for each source file
-		TraceHeader header = new TraceHeader(target, true);
-		try {
-			header.setOwner(model);
-			TraceHeaderWriter writer = new TraceHeaderWriter(header);
-			TraceCompilerEngineEvents events = TraceCompilerEngineGlobals.getEvents();
-			if (writer.write()) {
-				header.postFileWrittenEvent(header.getAbsolutePath());
-			} else {
-				String msg = Messages
-						.getString("HeaderEngine.TraceHeaderNotChangedPrefix"); //$NON-NLS-1$
-				events.postInfoMessage(msg + header.getAbsolutePath(), null);
-			}
-		} finally {
-			// The header owner must be reset to null, since that makes
-			// unregisters it from the model
-			header.setOwner(null);
-		}
-	}
-
-	/**
-	 * Writes the main header file to given target
-	 * 
-	 * @param header
-	 *            the header
-	 * @throws TraceCompilerException
-	 *             if writing fails
-	 */
-	private void writeMainHeaderFile(TraceHeader header)
-			throws TraceCompilerException {
-		// The TraceHeader stored into the model is not used when writing
-		// headers, since a separate header is written for each source file
-		TraceCompilerEngineEvents events = TraceCompilerEngineGlobals.getEvents();
-		String path = header.getAbsolutePath();
-		try {
-			if (writeMainHeader(path)) {
-				header.postFileWrittenEvent(path);
-			} else {
-				String msg = Messages
-						.getString("HeaderEngine.TraceHeaderNotChangedPrefix"); //$NON-NLS-1$
-				events.postInfoMessage(msg + path, null);
-			}
-		} catch (IOException e) {
-			throw new TraceCompilerException(
-					TraceCompilerErrorCode.CANNOT_WRITE_PROJECT_FILE, e);
-		}
-	}
-
-	/**
-	 * Writes the main header to given target
-	 * 
-	 * @param target
-	 *            the target
-	 * @return true if written, false if the file already had the same content
-	 * @throws IOException
-	 *             if writing fails
-	 */
-	private boolean writeMainHeader(String target) throws IOException {
-		File f = new File(target);
-		FileCompareOutputStream stream = new FileCompareOutputStream(f);
-		String licence = TraceCompilerEngineGlobals.getDefaultLicence(true);
-		if (licence != null) {
-			stream.write(licence.getBytes());
-		}
-		stream.write(SourceUtils.createHeaderGuard(f.getName()).getBytes());
-		TraceProjectAPI api = model.getExtension(TraceProjectAPI.class);
-		if (api instanceof TraceHeaderContribution) {
-			String[] content = ((TraceHeaderContribution) api)
-					.getContribution(TraceHeaderContributionType.MAIN_HEADER_CONTENT);
-			if (content != null && content.length == 1) {
-				stream.write(content[0].getBytes());
-			}
-		}
-		return stream.writeFile();
-	}
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/header/HeaderTemplate.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,443 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Header file template definition
-*
-*/
-package com.nokia.tracecompiler.engine.header;
-
-import com.nokia.tracecompiler.engine.header.TraceHeaderWriter.HeaderTemplateElementType;
-import com.nokia.tracecompiler.plugin.TraceAPIFormatter.TraceFormatType;
-import com.nokia.tracecompiler.plugin.TraceHeaderContribution.TraceHeaderContributionType;
-import com.nokia.tracecompiler.source.SymbianConstants;
-
-/**
- * Header file template definition
- * 
- */
-interface HeaderTemplate {
-	
-	/**
-	 * Tag written to trace header
-	 */
-	String HEADER_COMMENT_CREATED_BY = "// Created by TraceCompiler"; //$NON-NLS-1$
-	
-	/**
-	 * Empty template
-	 */
-	Object[] EMPTY_TEMPLATE = {};
-
-	/**
-	 * Sets line count to 1
-	 */
-	Object SET_LINES_PACKED = new SetNewLineCount(1);
-
-	/**
-	 * Sets line count to 2
-	 */
-	Object SET_LINES_MIDDLE = new SetNewLineCount(2); // CodForChk_Dis_Magic
-
-	/**
-	 * Sets line count to 3
-	 */
-	Object SET_LINES_LOOSE = new SetNewLineCount(3); // CodForChk_Dis_Magic
-
-	/**
-	 * Template for empty trace macros
-	 */
-	Object[] EMPTY_TRACE_FUNCTION_EXISTS_TEMPLATE = {
-			HeaderTemplateElementType.NEW_LINE, "#define ", //$NON-NLS-1$
-			HeaderTemplateElementType.FORMATTED_TRACE };
-
-	/**
-	 * Empty trace macro template switch. This formats the trace using
-	 * TraceFormatType.EmptyPreprocessorDefinition and checks if the definition
-	 * has already been written using CheckIsTraceFormatDuplicate switch
-	 */
-	Object[] EMPTY_TRACE_FUNCTION_TEMPLATE = {
-			TraceFormatType.EMPTY_MACRO,
-			new TemplateChoice(CheckIsTraceFormatDuplicate.class,
-					EMPTY_TEMPLATE, EMPTY_TRACE_FUNCTION_EXISTS_TEMPLATE), };
-
-	/**
-	 * Template for trace activation check
-	 */
-	Object[] TRACE_FUNCTION_ACTIVATION_CHECK = {
-			"TBool retval = ", //$NON-NLS-1$
-			TraceFormatType.TRACE_ACTIVATION,
-			// Checks if the TraceActivation format exists
-			new TemplateChoice(CheckFormattedTraceExists.class, new Object[] {
-					HeaderTemplateElementType.FORMATTED_TRACE, ";", //$NON-NLS-1$
-					HeaderTemplateElementType.NEW_LINE, "if ( retval )", //$NON-NLS-1$
-					HeaderTemplateElementType.OPEN_BRACE }, new Object[] {
-					"EFalse;", HeaderTemplateElementType.NEW_LINE }), //$NON-NLS-1$
-	};
-
-	/**
-	 * Template if no activation check is needed
-	 */
-	Object[] TRACE_FUNCTION_NO_ACTIVATION_CHECK = { "TBool retval;", //$NON-NLS-1$
-			HeaderTemplateElementType.NEW_LINE };
-
-	/**
-	 * Template for trace functions
-	 */
-	Object[] TRACE_FUNCTION_EXISTS_TEMPLATE = {
-			SET_LINES_PACKED,
-			HeaderTemplateElementType.BUILD_TRACE_BUFFER_CHECK,
-			// If the trace contains TDesC16 parameter, __KERNEL_MODE__ flag is
-			// added to it
-			new TemplateChoice(CheckIsKernelModeFlagNeeded.class, new Object[] {
-					"#ifndef __KERNEL_MODE__", //$NON-NLS-1$
-					HeaderTemplateElementType.NEW_LINE }, EMPTY_TEMPLATE),
-			"inline TBool ", //$NON-NLS-1$
-			HeaderTemplateElementType.FORMATTED_TRACE,
-			HeaderTemplateElementType.OPEN_BRACE,
-			// If the trace is buffered activation check is written
-			new TemplateChoice(CheckIsTraceBufferBuilt.class,
-					TRACE_FUNCTION_ACTIVATION_CHECK,
-					TRACE_FUNCTION_NO_ACTIVATION_CHECK),
-			HeaderTemplateElementType.TRACE_FUNCTION_BODY, // Parameters + API
-			HeaderTemplateElementType.CLOSE_EXTRA_BRACES,
-			"return retval;", //$NON-NLS-1$
-			HeaderTemplateElementType.NEW_LINE,
-			HeaderTemplateElementType.CLOSE_BRACE,
-			// The __KERNEL_MODE__ #ifdef added above needs to be closed
-			new TemplateChoice(
-					CheckIsKernelModeEndifNeeded.class,
-					new Object[] { "#endif", HeaderTemplateElementType.NEW_LINE }, //$NON-NLS-1$
-					EMPTY_TEMPLATE), SET_LINES_LOOSE,
-			HeaderTemplateElementType.NEW_LINE };
-
-	/**
-	 * Trace function template switch. This formats the trace using
-	 * TraceFormatType.Header and checks if the definition has already been
-	 * written using TRACE_FORMAT_EXISTS_TEMPLATE_INDEX switch
-	 */
-	Object[] TRACE_FUNCTION_TEMPLATE = {
-			TraceFormatType.HEADER,
-			new TemplateChoice(CheckIsTraceFormatDuplicate.class,
-					EMPTY_TEMPLATE, TRACE_FUNCTION_EXISTS_TEMPLATE) };
-
-	/**
-	 * Template for trace ID's
-	 */
-	Object[] TRACE_ID_TEMPLATE = {
-			"#define ", //$NON-NLS-1$
-			HeaderTemplateElementType.TRACE_NAME,
-			" 0x", //$NON-NLS-1$
-			HeaderTemplateElementType.TRACE_ID_HEX,
-			HeaderTemplateElementType.NEW_LINE };
-
-	/**
-	 * Main header template
-	 */
-	Object[] HEADER_TEMPLATE = {
-			SET_LINES_PACKED,
-			HeaderTemplateElementType.LICENCE_TEXT,
-			HeaderTemplateElementType.NEW_LINE,
-			HEADER_COMMENT_CREATED_BY, " ", //$NON-NLS-1$
-			HeaderTemplateElementType.TRACE_COMPILER_VERSION,
-			HeaderTemplateElementType.NEW_LINE,
-			"// DO NOT EDIT, CHANGES WILL BE LOST", //$NON-NLS-1$
-			SET_LINES_MIDDLE,
-			HeaderTemplateElementType.NEW_LINE,
-			HeaderTemplateElementType.HEADER_GUARD,
-			HeaderTemplateElementType.NEW_LINE,
-			SET_LINES_PACKED,
-			TraceHeaderContributionType.GLOBAL_DEFINES,
-			SET_LINES_MIDDLE,
-			HeaderTemplateElementType.NEW_LINE,
-			SET_LINES_PACKED,
-			TraceHeaderContributionType.GLOBAL_INCLUDES,
-			SET_LINES_MIDDLE,
-			HeaderTemplateElementType.NEW_LINE,
-			SET_LINES_PACKED,
-			new TemplateIterator(IteratorTraces.class, TRACE_ID_TEMPLATE),
-			SET_LINES_LOOSE,
-			HeaderTemplateElementType.NEW_LINE,
-			// Trace functions
-			new TemplateIterator(IteratorComplexTraces.class,
-					TRACE_FUNCTION_TEMPLATE),
-			// End of header guard
-			SET_LINES_MIDDLE, "#endif", HeaderTemplateElementType.NEW_LINE, //$NON-NLS-1$
-			HeaderTemplateElementType.NEW_LINE, "// End of file", //$NON-NLS-1$
-			HeaderTemplateElementType.NEW_LINE };
-
-	/**
-	 * Template for parameter with fixed size
-	 */
-	Object[] FIXED_PARAMETER_TEMPLATE = { "*( ( ", //$NON-NLS-1$
-			HeaderTemplateElementType.PARAMETER_TYPE, "* )ptr ) = ", //$NON-NLS-1$
-			HeaderTemplateElementType.PARAMETER_NAME, ";", //$NON-NLS-1$
-			HeaderTemplateElementType.NEW_LINE, "ptr += sizeof ( ", //$NON-NLS-1$
-			HeaderTemplateElementType.PARAMETER_TYPE, " );", //$NON-NLS-1$
-			HeaderTemplateElementType.NEW_LINE };
-
-	/**
-	 * Template for parameter with fixed size and length check
-	 */
-	Object[] FIXED_PARAMETER_TEMPLATE_WITH_LENGTH_CHECK = {
-			"// Check that there are enough space to next parameter", //$NON-NLS-1$
-			HeaderTemplateElementType.NEW_LINE,
-			"if ((length + sizeof ( ", //$NON-NLS-1$
-			HeaderTemplateElementType.PARAMETER_TYPE,
-			" )) <= KOstMaxDataLength)", //$NON-NLS-1$
-			HeaderTemplateElementType.OPEN_BRACE,
-			FIXED_PARAMETER_TEMPLATE,
-			"length += sizeof ( ", //$NON-NLS-1$
-			HeaderTemplateElementType.PARAMETER_TYPE,
-			" );", //$NON-NLS-1$
-			HeaderTemplateElementType.NEW_LINE,
-			HeaderTemplateElementType.CLOSE_BRACE};	
-	
-	/**
-	 * Template for writing 32-bit alignment for parameters
-	 */
-	Object[] DYNAMIC_PARAMETER_ALIGNMENT_TEMPLATE = {
-			"// Fillers are written to get 32-bit alignment", //$NON-NLS-1$
-			HeaderTemplateElementType.NEW_LINE,
-			"while ( length", //$NON-NLS-1$
-			HeaderTemplateElementType.PARAMETER_INDEX,
-			"++ < lengthAligned", //$NON-NLS-1$
-			HeaderTemplateElementType.PARAMETER_INDEX,
-			" )", //$NON-NLS-1$
-			HeaderTemplateElementType.OPEN_BRACE,
-			"*ptr++ = 0;", //$NON-NLS-1$
-			HeaderTemplateElementType.NEW_LINE,
-			HeaderTemplateElementType.CLOSE_BRACE };
-
-	/**
-	 * Template for parameter with dynamic size
-	 */
-	Object[] DYNAMIC_PARAMETER_TEMPLATE = {
-			"if (length", //$NON-NLS-1$
-			HeaderTemplateElementType.PARAMETER_INDEX,
-			" > 0)", //$NON-NLS-1$
-			HeaderTemplateElementType.OPEN_BRACE,
-			"// Number of elements is written before data", //$NON-NLS-1$
-			HeaderTemplateElementType.NEW_LINE,
-			"// In case of Unicode string, number of elements is half of length", //$NON-NLS-1$
-			HeaderTemplateElementType.NEW_LINE,
-			"*( ( TUint32* )ptr ) = length", //$NON-NLS-1$
-			HeaderTemplateElementType.PARAMETER_INDEX,
-			" / (", //$NON-NLS-1$
-			HeaderTemplateElementType.PARAMETER_NAME,
-			".Size() / ", //$NON-NLS-1$
-			HeaderTemplateElementType.PARAMETER_NAME,
-			".Length());", //$NON-NLS-1$
-			HeaderTemplateElementType.NEW_LINE,
-			"ptr += sizeof ( TUint32 );", //$NON-NLS-1$
-			HeaderTemplateElementType.NEW_LINE,
-			"memcpy( ptr, ", //$NON-NLS-1$
-			HeaderTemplateElementType.PARAMETER_NAME,
-			".Ptr(), length", //$NON-NLS-1$
-			HeaderTemplateElementType.PARAMETER_INDEX,
-			" );", //$NON-NLS-1$
-			HeaderTemplateElementType.NEW_LINE,
-			"ptr += length", //$NON-NLS-1$
-			HeaderTemplateElementType.PARAMETER_INDEX,
-			";", //$NON-NLS-1$
-			HeaderTemplateElementType.NEW_LINE,
-			new TemplateChoice(CheckParameterNeedsAlignment.class,
-					DYNAMIC_PARAMETER_ALIGNMENT_TEMPLATE, EMPTY_TEMPLATE),
-			HeaderTemplateElementType.NEW_LINE,
-			"length += sizeof ( TUint32 ) + lengthAligned", //$NON-NLS-1$
-			HeaderTemplateElementType.PARAMETER_INDEX,
-			";", //$NON-NLS-1$
-			HeaderTemplateElementType.NEW_LINE,			
-			HeaderTemplateElementType.CLOSE_BRACE,
-			"else if (length + sizeof ( TUint32 ) <= KOstMaxDataLength)",  //$NON-NLS-1$
-			HeaderTemplateElementType.OPEN_BRACE,
-			HeaderTemplateElementType.NEW_LINE,
-			"*( ( TUint32* )ptr ) = 0;",  //$NON-NLS-1$
-			HeaderTemplateElementType.NEW_LINE,
-			"ptr += sizeof ( TUint32 );",  //$NON-NLS-1$
-			HeaderTemplateElementType.NEW_LINE,
-			"length += sizeof ( TUint32 );",  //$NON-NLS-1$
-			HeaderTemplateElementType.NEW_LINE,
-			HeaderTemplateElementType.CLOSE_BRACE};
-
-	/**
-	 * Template to allocate the buffer for parameters if buffer size is fixed
-	 */
-	Object[] FIXED_BUFFER_ALLOCATION_TEMPLATE = { "TUint8 data[ ", //$NON-NLS-1$
-			HeaderTemplateElementType.FIXED_BUFFER_SIZE, " ];", //$NON-NLS-1$
-			HeaderTemplateElementType.NEW_LINE, "TUint8* ptr = data;", //$NON-NLS-1$
-			HeaderTemplateElementType.NEW_LINE};
-
-	/**
-	 * Template to allocate the buffer for parameters if buffer size is dynamic
-	 */
-	Object[] DYNAMIC_BUFFER_ALLOCATION_TEMPLATE = {
-			// KOstMaxDataLength is defined in opensystemtrace.h
-			"TUint8 data[ KOstMaxDataLength ];", //$NON-NLS-1$
-			HeaderTemplateElementType.NEW_LINE, "TUint8* ptr = data;", //$NON-NLS-1$
-			HeaderTemplateElementType.NEW_LINE, "// Set length to zero and calculate it againg", //$NON-NLS-1$
-			HeaderTemplateElementType.NEW_LINE, "// when adding parameters", //$NON-NLS-1$
-			HeaderTemplateElementType.NEW_LINE, "length = 0;", //$NON-NLS-1$
-			HeaderTemplateElementType.NEW_LINE };
-
-	/**
-	 * Template to allocate buffer for trace data
-	 */
-	Object[] BUFFER_ALLOCATION_TEMPLATE = { new TemplateChoice(
-			CheckIsBufferSizeDynamic.class, DYNAMIC_BUFFER_ALLOCATION_TEMPLATE,
-			FIXED_BUFFER_ALLOCATION_TEMPLATE) };
-
-	/**
-	 * Template to length variable definition
-	 */
-	Object[] LENGTH_VARIABLE_DEFINITION_TEMPLATE = {	
-			"TInt length = 0;", //$NON-NLS-1$
-			HeaderTemplateElementType.NEW_LINE };
-
-	/**
-	 * Beging template to length variable increase
-	 */
-	Object[] LENGTH_VARIABLE_INCREASE_TEMPLATE_BEGIN = {
-			"// Increase length because of fixed size parameters", //$NON-NLS-1$
-			HeaderTemplateElementType.NEW_LINE,
-			"length += "};	 //$NON-NLS-1$
-
-	/**
-	 * End template to length variable increase
-	 */
-	Object[] LENGTH_VARIABLE_INCREASE_TEMPLATE_END = {	
-			";",	 //$NON-NLS-1$	
-			HeaderTemplateElementType.NEW_LINE };
-	
-	/**
-	 * Template to calculate the length for a dynamic parameter
-	 */
-	Object[] DYNAMIC_PARAMETER_LENGTH_TEMPLATE = {
-	"// Check that parameter lenght is not too long", //$NON-NLS-1$
-	HeaderTemplateElementType.NEW_LINE,
-	"TInt length", //$NON-NLS-1$
-	HeaderTemplateElementType.PARAMETER_INDEX,
-	" = ", //$NON-NLS-1$
-	SymbianConstants.PARAMETER_DECLARATION_PREFIX,
-	HeaderTemplateElementType.PARAMETER_INDEX, ".Size();", //$NON-NLS-1$
-	HeaderTemplateElementType.NEW_LINE,
-		"if ((length + length", //$NON-NLS-1$
-	HeaderTemplateElementType.PARAMETER_INDEX,
-	" + sizeof ( TUint32 )) > KOstMaxDataLength)", //$NON-NLS-1$
-	HeaderTemplateElementType.OPEN_BRACE,
-	"length", //$NON-NLS-1$
-	HeaderTemplateElementType.PARAMETER_INDEX,	
-	" = KOstMaxDataLength - (length + sizeof ( TUint32 ));", //$NON-NLS-1$	
-	HeaderTemplateElementType.NEW_LINE,
-	HeaderTemplateElementType.CLOSE_BRACE,
-	HeaderTemplateElementType.NEW_LINE,
-	"TInt lengthAligned", //$NON-NLS-1$
-	HeaderTemplateElementType.PARAMETER_INDEX,
-	" = ( length", //$NON-NLS-1$
-	HeaderTemplateElementType.PARAMETER_INDEX,
-	" + 3 ) & ~3;", //$NON-NLS-1$
-	HeaderTemplateElementType.NEW_LINE,	
-	"if (lengthAligned", //$NON-NLS-1$
-	HeaderTemplateElementType.PARAMETER_INDEX,
-	" > 0)", //$NON-NLS-1$
-	HeaderTemplateElementType.OPEN_BRACE,
-	"length = length + sizeof ( TUint32 ) + lengthAligned", //$NON-NLS-1$
-	HeaderTemplateElementType.PARAMETER_INDEX,
-	";", //$NON-NLS-1$
-	HeaderTemplateElementType.NEW_LINE,
-	HeaderTemplateElementType.CLOSE_BRACE,
-	HeaderTemplateElementType.NEW_LINE };
-
-	/**
-	 * Template for the optimized single dynamic parameter case, where buffer is
-	 * not needed
-	 */
-	Object[] SINGLE_DYNAMIC_PARAMETER_TEMPLATE = {
-			"TInt size = ", //$NON-NLS-1$
-		    SymbianConstants.PARAMETER_DECLARATION_PREFIX, "1.Size();", //$NON-NLS-1$
-		    HeaderTemplateElementType.NEW_LINE,
-		    "// BTrace assumes that parameter size is atleast 4 bytes", //$NON-NLS-1$
-		    HeaderTemplateElementType.NEW_LINE,
-		    "if (size % 4 == 0)", //$NON-NLS-1$
-		    HeaderTemplateElementType.OPEN_BRACE,
-		    "TUint8* ptr = ( TUint8* )aParam1.Ptr();", //$NON-NLS-1$
-		    HeaderTemplateElementType.NEW_LINE,
-		    "// Data is written directly and length is determined from trace message length", //$NON-NLS-1$
-		    HeaderTemplateElementType.NEW_LINE,
-		    "retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, size );", //$NON-NLS-1$
-		    HeaderTemplateElementType.NEW_LINE,
-		    HeaderTemplateElementType.CLOSE_BRACE,
-		    HeaderTemplateElementType.NEW_LINE,
-		    "else", //$NON-NLS-1$
-		    HeaderTemplateElementType.OPEN_BRACE,
-		    "TUint8 data[ KOstMaxDataLength ];", //$NON-NLS-1$
-		    HeaderTemplateElementType.NEW_LINE,
-		    "TUint8* ptr = data;", //$NON-NLS-1$
-		    HeaderTemplateElementType.NEW_LINE,
-		    "if (size > KOstMaxDataLength)", //$NON-NLS-1$
-		    HeaderTemplateElementType.OPEN_BRACE,
-		    "size = KOstMaxDataLength;", //$NON-NLS-1$
-		    HeaderTemplateElementType.NEW_LINE,
-		    HeaderTemplateElementType.CLOSE_BRACE,
-		    HeaderTemplateElementType.NEW_LINE,
-		    "TInt sizeAligned = ( size + 3 ) & ~3;", //$NON-NLS-1$
-		    HeaderTemplateElementType.NEW_LINE,		    
-		    "memcpy( ptr, ", //$NON-NLS-1$
-		    SymbianConstants.PARAMETER_DECLARATION_PREFIX, "1.Ptr(), size );", //$NON-NLS-1$
-		    HeaderTemplateElementType.NEW_LINE,
-		    "ptr += size;", //$NON-NLS-1$
-		    HeaderTemplateElementType.NEW_LINE,
-		    "// Fillers are written to get 32-bit alignment", //$NON-NLS-1$
-		    HeaderTemplateElementType.NEW_LINE,
-		    "while ( size++ < sizeAligned )", //$NON-NLS-1$
-		    HeaderTemplateElementType.OPEN_BRACE,
-		    "*ptr++ = 0;", //$NON-NLS-1$
-		    HeaderTemplateElementType.NEW_LINE,
-		    HeaderTemplateElementType.CLOSE_BRACE,
-			HeaderTemplateElementType.NEW_LINE,
-		    "ptr -= sizeAligned;", //$NON-NLS-1$
-		    HeaderTemplateElementType.NEW_LINE,
-		    "size = sizeAligned;", //$NON-NLS-1$
-		    HeaderTemplateElementType.NEW_LINE,
-		    "// Data is written directly and length is determined from trace message length", //$NON-NLS-1$
-		    HeaderTemplateElementType.NEW_LINE,
-		    "retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, size );", //$NON-NLS-1$
-		    HeaderTemplateElementType.NEW_LINE,
-		    HeaderTemplateElementType.CLOSE_BRACE,
-			HeaderTemplateElementType.NEW_LINE};
-
-	/**
-	 * Template for buffered parameters
-	 */
-	Object[] BUFFERED_PARAMETERS_TEMPLATE = { HeaderTemplateElementType.TRACE_FUNCTION_PARAMETERS };
-
-	/**
-	 * Template when the trace buffer needs to be allocated
-	 */
-	Object[] BUILD_TRACE_BUFFER_TEMPLATE = {
-			new TemplateIterator(IteratorParameters.class,
-					BUFFERED_PARAMETERS_TEMPLATE),
-			"ptr -= ", //$NON-NLS-1$
-			new TemplateChoice(CheckIsBufferSizeDynamic.class,
-					new Object[] { "length;" }, new Object[] { //$NON-NLS-1$
-					HeaderTemplateElementType.FIXED_BUFFER_SIZE, ";" }), //$NON-NLS-1$
-			HeaderTemplateElementType.NEW_LINE };
-
-	/**
-	 * Template for trace parameters.
-	 */
-	Object[] PARAMETERS_TEMPLATE = { new TemplateChoice(
-			CheckIsTraceBufferBuilt.class, BUILD_TRACE_BUFFER_TEMPLATE,
-			SINGLE_DYNAMIC_PARAMETER_TEMPLATE) };
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/header/IteratorComplexTraces.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,55 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Iterator for complex traces
-*
-*/
-package com.nokia.tracecompiler.engine.header;
-
-import java.io.IOException;
-
-import com.nokia.tracecompiler.model.Trace;
-import com.nokia.tracecompiler.model.TraceGroup;
-import com.nokia.tracecompiler.model.TraceModel;
-
-/**
- * Iterator for complex traces
- * 
- */
-public final class IteratorComplexTraces extends TemplateIteratorEntry {
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engine.header.TemplateIteratorEntry#
-	 *      iterate(java.lang.Object[])
-	 */
-	@Override
-	void iterate(Object[] template) throws IOException {
-		TraceModel model = writer.getHeader().getOwner().getModel();
-		for (TraceGroup group : model) {
-			for (Trace trace : group) {
-				ComplexHeaderRule rule = trace
-						.getExtension(ComplexHeaderRule.class);
-				if (rule != null && rule.needsFunction()) {
-					if (writer.startTrace(trace)) {
-						writer.writeTemplate(template);
-					}
-				}
-			}
-		}
-	}
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/header/IteratorParameters.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,46 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Parameter iterator
-*
-*/
-package com.nokia.tracecompiler.engine.header;
-
-import java.io.IOException;
-import java.util.Iterator;
-
-import com.nokia.tracecompiler.model.TraceParameter;
-
-/**
- * Parameter iterator
- * 
- */
-public final class IteratorParameters extends TemplateIteratorEntry {
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engine.header.TemplateIteratorEntry#iterate()
-	 */
-	@Override
-	public void iterate(Object[] template) throws IOException {
-		Iterator<TraceParameter> itr = writer.getCurrentTrace().getParameters();
-		while (itr.hasNext()) {
-			writer.startParameter(itr.next());
-			writer.writeTemplate(template);
-		}
-	}
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/header/IteratorTraces.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,51 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Iterator for all traces
-*
-*/
-package com.nokia.tracecompiler.engine.header;
-
-import java.io.IOException;
-
-import com.nokia.tracecompiler.model.Trace;
-import com.nokia.tracecompiler.model.TraceGroup;
-import com.nokia.tracecompiler.model.TraceModel;
-
-/**
- * Iterator for all traces
- * 
- */
-public final class IteratorTraces extends TemplateIteratorEntry {
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engine.header.TemplateIteratorEntry#
-	 *      iterate(java.lang.Object[])
-	 */
-	@Override
-	void iterate(Object[] template) throws IOException {
-		TraceModel model = writer.getHeader().getOwner().getModel();
-		for (TraceGroup group : model) {
-			for (Trace trace : group) {
-				if (writer.startTrace(trace)) {
-					writer.writeTemplate(template);
-				}
-			}
-		}
-	}
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/header/Messages.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,63 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Localization for header package
-*
-*/
-package com.nokia.tracecompiler.engine.header;
-
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-/**
- * Localization for header package
- * 
- */
-class Messages {
-
-	/**
-	 * Bundle name
-	 */
-	private static final String BUNDLE_NAME = "com.nokia.tracecompiler.engine.header.messages"; //$NON-NLS-1$
-
-	/**
-	 * Bundle
-	 */
-	private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
-			.getBundle(BUNDLE_NAME);
-
-	/**
-	 * Prevents construction
-	 */
-	private Messages() {
-	}
-
-	/**
-	 * Gets localized string based on key
-	 * 
-	 * @param key
-	 *            the resource key
-	 * @return the localized resource
-	 */
-	public static String getString(String key) {
-		String value;
-		try {
-			value = RESOURCE_BUNDLE.getString(key);
-		} catch (MissingResourceException e) {
-			value = '!' + key + '!';
-		}
-		return value;
-	}
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/header/SetNewLineCount.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,51 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Changes the new line count
-*
-*/
-package com.nokia.tracecompiler.engine.header;
-
-/**
- * Changes the new line count
- * 
- */
-public final class SetNewLineCount {
-
-	/**
-	 * Line feed count
-	 */
-	private int count;
-
-	/**
-	 * Constructor
-	 * 
-	 * @param count
-	 *            the line feed count
-	 */
-	SetNewLineCount(int count) {
-		this.count = count;
-	}
-
-	/**
-	 * Gets the count
-	 * 
-	 * @return the count
-	 */
-	final int getLineCount() {
-		return count;
-	}
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/header/TemplateCheckBase.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Template iterator
-*
-*/
-package com.nokia.tracecompiler.engine.header;
-
-/**
- * Check function for TemplateChoice
- * 
- */
-abstract class TemplateCheckBase {
-
-	/**
-	 * Header writer
-	 */
-	protected TraceHeaderWriter writer;
-
-	/**
-	 * Sets the writer
-	 * 
-	 * @param writer
-	 *            the writer to set
-	 */
-	final void setWriter(TraceHeaderWriter writer) {
-		this.writer = writer;
-	}
-
-	/**
-	 * Runs the check
-	 * 
-	 * @return the result
-	 */
-	abstract boolean check();
-
-}
\ No newline at end of file
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/header/TemplateChoice.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,86 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Template iterator
-*
-*/
-package com.nokia.tracecompiler.engine.header;
-
-/**
- * If-check in template
- * 
- */
-class TemplateChoice {
-
-	/**
-	 * Templates to be used if check is true
-	 */
-	private Object[] templateTrue;
-
-	/**
-	 * Templates to be used if check is false
-	 */
-	private Object[] templateFalse;
-
-	/**
-	 * Choice class
-	 */
-	private Class<? extends TemplateCheckBase> choiceClass;
-
-	/**
-	 * Constructors
-	 * 
-	 * @param choiceClass
-	 *            the class which does the check
-	 * @param templateTrue
-	 *            the template to be used if check is true
-	 * @param templateFalse
-	 *            the template to be used if check is false
-	 */
-	TemplateChoice(Class<? extends TemplateCheckBase> choiceClass,
-			Object[] templateTrue, Object[] templateFalse) {
-		this.choiceClass = choiceClass;
-		this.templateTrue = templateTrue;
-		this.templateFalse = templateFalse;
-	}
-
-	/**
-	 * Gets the choice class
-	 * 
-	 * @return the class
-	 */
-	Class<? extends TemplateCheckBase> getChoiceClass() {
-		return choiceClass;
-	}
-
-	/**
-	 * Gets the template if choice returns true
-	 * 
-	 * @return the template
-	 */
-	Object[] getTrueTemplate() {
-		return templateTrue;
-	}
-
-	/**
-	 * Gets the template if choice returns false
-	 * 
-	 * @return the template
-	 */
-	Object[] getFalseTemplate() {
-		return templateFalse;
-	}
-
-}
\ No newline at end of file
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/header/TemplateIterator.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,69 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Template iterator
-*
-*/
-package com.nokia.tracecompiler.engine.header;
-
-/**
- * Template iterator
- * 
- */
-final class TemplateIterator {
-
-	/**
-	 * Iterator class
-	 */
-	private Class<? extends TemplateIteratorEntry> iteratorClass;
-
-	/**
-	 * Template to be run by the iterator
-	 */
-	private Object[] template;
-
-	/**
-	 * Constructor
-	 * 
-	 * @param iteratorClass
-	 *            the iterator class
-	 * @param template
-	 *            the template
-	 */
-	TemplateIterator(Class<? extends TemplateIteratorEntry> iteratorClass,
-			Object[] template) {
-		this.iteratorClass = iteratorClass;
-		this.template = template;
-	}
-
-	/**
-	 * Gets the iterator class
-	 * 
-	 * @return the class
-	 */
-	final Class<? extends TemplateIteratorEntry> getIteratorClass() {
-		return iteratorClass;
-	}
-
-	/**
-	 * Gets the template
-	 * 
-	 * @return the template
-	 */
-	final Object[] getTemplate() {
-		return template;
-	}
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/header/TemplateIteratorEntry.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,54 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Iterator base class
-*
-*/
-package com.nokia.tracecompiler.engine.header;
-
-import java.io.IOException;
-
-/**
- * Iterator base class
- * 
- */
-abstract class TemplateIteratorEntry {
-
-	/**
-	 * Header writer
-	 */
-	protected TraceHeaderWriter writer;
-
-	/**
-	 * Sets the writer
-	 * 
-	 * @param writer
-	 *            the writer to set
-	 */
-	final void setWriter(TraceHeaderWriter writer) {
-		this.writer = writer;
-	}
-
-	/**
-	 * Runs the iterator on given template
-	 * 
-	 * @param template
-	 *            the template
-	 * @throws IOException
-	 *             if operation fails
-	 */
-	abstract void iterate(Object[] template) throws IOException;
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/header/TraceHeader.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,73 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Representation of a header file that gets included into sources
-*
-*/
-package com.nokia.tracecompiler.engine.header;
-
-import com.nokia.tracecompiler.project.TraceProjectFile;
-
-/**
- * Representation of a header file that gets included into sources when traces
- * are added.
- * 
- */
-final class TraceHeader extends TraceProjectFile {
-
-	/**
-	 * Title shown in UI
-	 */
-	private static final String TITLE = Messages.getString("TraceHeader.Title"); //$NON-NLS-1$
-
-	/**
-	 * Constructor
-	 * 
-	 * @param target
-	 *            target path
-	 * @param hasModelName
-	 *            true if model name should be used with the file
-	 */
-	TraceHeader(String target, boolean hasModelName) {
-		super(target, hasModelName);
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.project.TraceProjectFile#getFileExtension()
-	 */
-	@Override
-	protected String getFileExtension() {
-		String retval;
-		if (hasModelName) {
-			retval = HeaderConstants.TRACE_HEADER_EXTENSION;
-		} else {
-			retval = ""; //$NON-NLS-1$
-		}
-		return retval;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.project.TraceProjectFile#getTitle()
-	 */
-	@Override
-	public String getTitle() {
-		return TITLE;
-	}
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/header/TraceHeaderWriter.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1401 +0,0 @@
-/*
- * Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies). 
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of "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:
- *
- * Description:
- *
- * Writes the TraceHeader to a file
- *
- */
-package com.nokia.tracecompiler.engine.header;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import com.nokia.tracecompiler.TraceCompilerLogger;
-import com.nokia.tracecompiler.engine.LocationListBase;
-import com.nokia.tracecompiler.engine.LocationProperties;
-import com.nokia.tracecompiler.engine.TraceCompilerEngineGlobals;
-import com.nokia.tracecompiler.engine.TraceLocation;
-import com.nokia.tracecompiler.engine.TraceCompilerEngineErrorCodes.TraceCompilerErrorCode;
-import com.nokia.tracecompiler.engine.source.SourceFormatter;
-import com.nokia.tracecompiler.engine.source.TraceFormattingRule;
-import com.nokia.tracecompiler.engine.source.TraceParameterFormattingRule;
-import com.nokia.tracecompiler.file.FileCompareOutputStream;
-import com.nokia.tracecompiler.file.FileUtils;
-import com.nokia.tracecompiler.model.Trace;
-import com.nokia.tracecompiler.model.TraceCompilerException;
-import com.nokia.tracecompiler.model.TraceGroup;
-import com.nokia.tracecompiler.model.TraceModel;
-import com.nokia.tracecompiler.model.TraceParameter;
-import com.nokia.tracecompiler.plugin.TraceFormatConstants;
-import com.nokia.tracecompiler.plugin.TraceHeaderContribution;
-import com.nokia.tracecompiler.plugin.TraceAPIFormatter.TraceFormatType;
-import com.nokia.tracecompiler.plugin.TraceHeaderContribution.TraceHeaderContributionType;
-import com.nokia.tracecompiler.rules.FillerParameterRule;
-import com.nokia.tracecompiler.source.SourceConstants;
-import com.nokia.tracecompiler.source.SourceExcludedArea;
-import com.nokia.tracecompiler.source.SourceParser;
-import com.nokia.tracecompiler.source.SourceUtils;
-import com.nokia.tracecompiler.source.SymbianConstants;
-import com.nokia.tracecompiler.utils.TraceCompilerVersion;
-
-/**
- * Writes the TraceHeader to a file
- * 
- */
-final class TraceHeaderWriter {
-
-	/**
-	 * return type text of a generated OstTraceGenx function.
-	 */
-	private static final String INLINE_TBOOL = "inline TBool";
-
-	/**
-	 * open bracket in a type cast
-	 */
-	private static final String BEGINCAST = "OBR"; //$NON-NLS-1$
-	
-	/**
-	 * closing bracket in a type cast
-	 */
-	private static final String ENDCAST = "CBR"; //$NON-NLS-1$
-
-	/**
-	 * REF replaces & in a function guard
-	 */
-	private static final String REF = "REF"; //$NON-NLS-1$
-
-	/**
-	 * & character
-	 */
-	private static final String AMPERSANT = "&"; //$NON-NLS-1$
-
-	/**
-	 * closing bracket
-	 */
-	private static final String CLOSING_BRACKET = ")"; //$NON-NLS-1$
-
-	/**
-	 * open bracket
-	 */
-	private static final String OPEN_BRACKET = "("; //$NON-NLS-1$
-
-	/**
-	 * TUint32 definition
-	 */
-	private static final String TUINT32_DEF = "TUint32 "; //$NON-NLS-1$
-
-	/**
-	 * TInt32 definition
-	 */
-	private static final String TINT32_DEF = "TInt32 "; //$NON-NLS-1$
-
-	/**
-	 * TUint definition
-	 */
-	private static final String TUINT_DEF = "TUint "; //$NON-NLS-1$
-
-	/**
-	 * TInt definition
-	 */
-	private static final String TINT_DEF = "TInt "; //$NON-NLS-1$
-
-	/**
-	 * Length variable defined flag
-	 */
-	private boolean lenghtVariableDefined = false;
-	
-	
-	/**
-	 * List of dynamic elements that can be used from the templates
-	 * 
-	 */
-	enum HeaderTemplateElementType {
-
-		/**
-		 * Licence text
-		 */
-		LICENCE_TEXT,
-		
-		/**
-		 * TraceCompiler version number
-		 */
-		TRACE_COMPILER_VERSION,
-
-		/**
-		 * Header guard based on file name
-		 */
-		HEADER_GUARD,
-
-		/**
-		 * Opening brace
-		 */
-		OPEN_BRACE,
-
-		/**
-		 * Closing brace
-		 */
-		CLOSE_BRACE,
-
-		/**
-		 * New line and indent based on open brace count
-		 */
-		NEW_LINE,
-
-		/**
-		 * Writes currentTraceFormatted
-		 */
-		FORMATTED_TRACE,
-
-		/**
-		 * Adds all closing braces except the one that closes the function
-		 */
-		CLOSE_EXTRA_BRACES,
-
-		/**
-		 * Type of current parameter
-		 */
-		PARAMETER_TYPE,
-
-		/**
-		 * Name of current parameter
-		 */
-		PARAMETER_NAME,
-
-		/**
-		 * Name of current trace
-		 */
-		TRACE_NAME,
-
-		/**
-		 * ID of current trace
-		 */
-		TRACE_ID_HEX,
-
-		/**
-		 * Calls a function to add the trace buffer initialization code
-		 */
-		BUILD_TRACE_BUFFER_CHECK,
-
-		/**
-		 * Calls a function to add the function body
-		 */
-		TRACE_FUNCTION_BODY,
-
-		/**
-		 * Calls a function to add function parameters
-		 */
-		TRACE_FUNCTION_PARAMETERS,
-
-		/**
-		 * Writes the fixedBufferSize member variable
-		 */
-		FIXED_BUFFER_SIZE,
-
-		/**
-		 * Writes the dynamicBufferSize member variable
-		 */
-		DYNAMIC_BUFFER_SIZE,
-
-		/**
-		 * Index of the parameter being processed
-		 */
-		PARAMETER_INDEX
-	}
-
-	/**
-	 * Group ID shift bits
-	 */
-	private static final int GROUP_SHIFT = 16; // CodForChk_Dis_Magic
-
-	/**
-	 * Number of bytes in parameter
-	 */
-	private static final int BYTES_IN_PARAMETER = 4; // CodForChk_Dis_Magic
-
-	/**
-	 * Indent
-	 */
-	private static final String INDENT = "    "; //$NON-NLS-1$
-
-	/**
-	 * The header file to be updated
-	 */
-	private TraceHeader header;
-
-	/**
-	 * Output stream for the header
-	 */
-	private OutputStream headerOutput;
-
-	/**
-	 * Temporary flag that specifies if a trace requires a trace buffer or it
-	 * can be represented by the default trace macros
-	 */
-	private boolean buildTraceBuffer;
-
-	/**
-	 * Temporary variable for fixed size
-	 */
-	private int fixedBufferSize;
-
-	/**
-	 * Dynamic size flag
-	 */
-	private boolean dynamicBufferSizeFlag;
-
-	/**
-	 * Flag which is set it trace needs #endif for __KERNEL_MODE__
-	 */
-	private boolean needsKernelEndif;
-
-	/**
-	 * Used via HeaderTemplateElementType.FORMATTED_TRACE
-	 */
-	private String currentTraceFormatted;
-
-	/**
-	 * Type of current parameter
-	 */
-	private String currentParameterType;
-
-	/**
-	 * Name of current parameter
-	 */
-	private String currentParameterName;
-
-	/**
-	 * Index of current parameter
-	 */
-	private int currentParameterIndex;
-
-	/**
-	 * Number of opened brackets
-	 */
-	private int openBraceCount;
-
-	/**
-	 * Trace being processed
-	 */
-	private Trace currentTrace;
-
-	/**
-	 * Parameter being processed
-	 */
-	private TraceParameter currentParameter;
-
-	/**
-	 * List of trace functions already in the header
-	 */
-	private ArrayList<String> traceDeclarations = new ArrayList<String>();
-
-	/**
-	 * Number of sequential new lines
-	 */
-	private int newLineCount;
-
-	/**
-	 * Number of allowed sequential new lines
-	 */
-	private int maxNewLines;
-
-	/**
-	 * Indicates that writing a function to the header file is going
-	 */
-	private boolean firstOpenBraceFound;
-	
-	/**
-	 * boolean indication that we are buffering a function text
-	 */
-	private boolean bufferingFunction;
-
-	/**
-	 * While writing a function to the header file, it's gathered to this
-	 * member. The member is then checked if the function parameters contain
-	 * TInt or TUint values. If so, the function is replicated so that TInt is
-	 * replaced by TInt32 and TUint with TUint32.
-	 */
-	private StringBuilder functionText = new StringBuilder();
-
-	/**
-	 * Number of brackets seen when writing a function. When it gets to 0, the
-	 * function in previousFunction variable is complete and can be written.
-	 */
-	private int numberOfBrackets;
-		
-	/**
-	 * string to hold the function guard
-	 */
-	private String ostTraceGenxFunGuard;
-
-	/**
-	 * Creates a new header writer
-	 * 
-	 * @param header
-	 *            the header to be written
-	 */
-	TraceHeaderWriter(TraceHeader header) {
-		this.header = header;
-	}
-
-	/**
-	 * Writes the header
-	 * 
-	 * @return true if header was written, false if it matched the existing
-	 *         header
-	 * @throws TraceCompilerException
-	 *             if writing fails
-	 */
-	boolean write() throws TraceCompilerException {
-		boolean headerWritten = false;
-		try {
-			openBraceCount = 0;
-			createHeader();
-			writeTemplate(HeaderTemplate.HEADER_TEMPLATE);
-			headerWritten = closeHeader();
-		} catch (IOException e) {
-			e.printStackTrace();
-			throw new TraceCompilerException(
-					TraceCompilerErrorCode.CANNOT_WRITE_PROJECT_FILE, e);
-		} finally {
-			traceDeclarations.clear();
-			if (headerOutput != null) {
-				try {
-					headerOutput.close();
-				} catch (IOException e) {
-				}
-			}
-			headerOutput = null;
-		}
-		return headerWritten;
-	}
-
-	/**
-	 * Creates the header file
-	 * 
-	 * @throws IOException
-	 *             if creation fails
-	 */
-	private void createHeader() throws IOException {
-		File file = new File(header.getAbsolutePath());
-		if (file.exists()) {
-			// If header exists, data is written to a byte array and compared
-			// with existing file. If they are the same, the file is not
-			// updated.
-			headerOutput = new FileCompareOutputStream(file);
-		} else {
-			// If header does not exist, the data is written directly to file
-			headerOutput = FileUtils.createOutputStream(file);
-		}
-	}
-
-	/**
-	 * Closes the header file. If data was written to a byte buffer this
-	 * compares the contents of the buffer with the existing file and re-writes
-	 * the file if contents do not match.
-	 * 
-	 * @return true if header was written, false if it matched the existing
-	 *         header
-	 * @throws IOException
-	 *             if closing fails
-	 */
-	private boolean closeHeader() throws IOException {
-		boolean headerWritten = true;
-		if (headerOutput instanceof FileCompareOutputStream) {
-			headerWritten = ((FileCompareOutputStream) headerOutput)
-					.writeFile();
-		}
-		headerOutput.close();
-		headerOutput = null;
-		return headerWritten;
-	}
-
-	/**
-	 * Writes a template to the stream
-	 * 
-	 * @param template
-	 *            the template
-	 * @throws IOException
-	 *             if writing fails
-	 */
-	void writeTemplate(Object[] template) throws IOException {
-		for (Object o : template) {
-			if (o instanceof String) {
-				write((String) o);
-			} else if (o instanceof TraceHeaderContributionType) {
-				writeHeaderContributions((TraceHeaderContributionType) o);
-			} else if (o instanceof HeaderTemplateElementType) {
-				writeTemplateElement((HeaderTemplateElementType) o);
-			} else if (o instanceof Object[]) {
-				// Template within template
-				writeTemplate((Object[]) o);
-			} else if (o instanceof TemplateChoice) {
-				TemplateChoice choice = (TemplateChoice) o;
-				// Gets the array index from template
-				Class<? extends TemplateCheckBase> c = choice.getChoiceClass();
-				try {
-					// Creates a switch-case object based on array index
-					TemplateCheckBase check = c.newInstance();
-					check.setWriter(this);
-					// Gets the case from the switch-case object and uses it to
-					// get the correct template
-					if (check.check()) {
-						writeTemplate(choice.getTrueTemplate());
-					} else {
-						writeTemplate(choice.getFalseTemplate());
-					}
-				} catch (InstantiationException e) {
-				} catch (IllegalAccessException e) {
-				}
-			} else if (o instanceof TemplateIterator) {
-				Class<? extends TemplateIteratorEntry> c = ((TemplateIterator) o)
-						.getIteratorClass();
-				try {
-					// Creates an iterator object based on array index
-					TemplateIteratorEntry itr = c.newInstance();
-					itr.setWriter(this);
-					itr.iterate(((TemplateIterator) o).getTemplate());
-				} catch (InstantiationException e) {
-				} catch (IllegalAccessException e) {
-				}
-			} else if (o instanceof SetNewLineCount) {
-				maxNewLines = ((SetNewLineCount) o).getLineCount();
-			} else if (o instanceof TraceFormatType) {
-				// Stores the formatted trace, but does not write anything
-				// HeaderTemplateElementType.FORMATTED_TRACE writes the trace
-				currentTraceFormatted = SourceFormatter.formatTrace(
-						currentTrace, (TraceFormatType) o);
-			}
-		}
-	}
-
-	/**
-	 * Writes an element from the HeaderTemplateElementType enumeration
-	 * 
-	 * @param type
-	 *            the element type
-	 * @throws IOException
-	 *             if writing fails
-	 */
-	private void writeTemplateElement(HeaderTemplateElementType type)
-			throws IOException { // CodForChk_Dis_ComplexFunc
-		switch (type) {
-		case NEW_LINE:
-			writeNewLine();
-			break;
-		case OPEN_BRACE:
-			writeOpenBrace();
-			break;
-		case CLOSE_BRACE:
-			writeCloseBrace();
-			break;
-		case PARAMETER_INDEX:
-			write(String.valueOf(currentParameterIndex));
-			break;
-		case PARAMETER_TYPE:
-			write(currentParameterType);
-			break;
-		case PARAMETER_NAME:
-			write(currentParameterName);
-			break;
-		case FORMATTED_TRACE:
-			writeFormattedTrace(currentTraceFormatted);
-			break;
-		case TRACE_NAME:
-			write(currentTrace.getName());
-			break;
-		case TRACE_ID_HEX:
-			writeTraceID();
-			break;
-		case FIXED_BUFFER_SIZE:
-			write(String.valueOf(fixedBufferSize));
-			break;
-		case TRACE_FUNCTION_BODY:
-			writeFunctionBody(currentTrace);
-			break;
-		case TRACE_FUNCTION_PARAMETERS:
-			writeParameter(currentParameter);
-			break;
-		case BUILD_TRACE_BUFFER_CHECK:
-			buildTraceBuffer = traceNeedsBuffer(currentTrace);
-			break;
-		case HEADER_GUARD:
-			write(SourceUtils.createHeaderGuard(header.getFileName()));
-			break;
-		case TRACE_COMPILER_VERSION:
-			write(TraceCompilerVersion.getVersion());
-			break;
-		case CLOSE_EXTRA_BRACES:
-			while (openBraceCount > 1) {
-				writeCloseBrace();
-			}
-			break;
-		case LICENCE_TEXT:
-		    writeLicence();
-		    break;
-		}
-	}
-
-	/**
-	 * Writes the trace ID to header
-	 * 
-	 * @throws IOException
-	 *             if writing fails
-	 */
-	private void writeTraceID() throws IOException {
-		int gid = currentTrace.getGroup().getID() << GROUP_SHIFT;
-		write(Integer.toHexString(gid | currentTrace.getID()));
-		ComplexHeaderRule rule = currentTrace
-				.getExtension(ComplexHeaderRule.class);
-		if (rule != null) {
-			String ext = rule.getTraceIDDefineExtension();
-			if (ext != null) {
-				write(ext);
-			}
-		}
-	}
-
-	/**
-	 * Writes the header contributions from plug-in's
-	 * 
-	 * @param type
-	 *            the contribution type
-	 * @throws IOException
-	 *             if writing fails
-	 */
-	private void writeHeaderContributions(TraceHeaderContributionType type)
-			throws IOException {
-		Iterator<String> contributions = getContributions(type);
-		boolean written = false;
-		while (contributions.hasNext()) {
-			writeContribution(contributions.next(), type);
-			written = true;
-		}
-		if (written) {
-			writeNewLine();
-		}
-	}
-
-	/**
-	 * Gets a list of contributions from plug-in's
-	 * 
-	 * @param type
-	 *            the contribution type
-	 * @return the contributions
-	 */
-	private Iterator<String> getContributions(TraceHeaderContributionType type) {
-		Iterator<TraceHeaderContribution> contributions = header.getOwner()
-				.getExtensions(TraceHeaderContribution.class);
-		ArrayList<String> list = new ArrayList<String>();
-		while (contributions.hasNext()) {
-			String[] s = contributions.next().getContribution(type);
-			if (s != null) {
-				for (String element : s) {
-					list.add(element);
-				}
-			}
-		}
-		return list.iterator();
-	}
-
-	/**
-	 * Writes a contribution to the stream
-	 * 
-	 * @param contribution
-	 *            the contribution
-	 * @param type
-	 *            the contribution type
-	 * @throws IOException
-	 *             if writing fails
-	 */
-	private void writeContribution(String contribution,
-			TraceHeaderContributionType type) throws IOException {
-		switch (type) {
-		case GLOBAL_DEFINES:
-			writeDefine(contribution);
-			break;
-		case GLOBAL_INCLUDES:
-			writeSystemInclude(contribution);
-			break;
-		case MAIN_HEADER_CONTENT:
-			// Handled by HeaderEngine
-			break;
-		}
-	}
-	
-	/**
-	 * write start of function guard
-	 * @throws IOException
-	 */
-	private void writeStartFunctionGuard() throws IOException {
-		Pattern p = Pattern.compile("inline\\s+TBool\\s+([^\\(]+)\\s*\\((.*)\\)\\s*\\{"); //$NON-NLS-1$
-		String guard = null;
-		String functionName = null;
-		
-		// Get the function definition line
-		int startIndex = functionText.indexOf(SourceConstants.OPENING_BRACE) + 1;
-		String funcDef = functionText.substring(0, startIndex);
-		
-		Matcher m = p.matcher(funcDef);
-		if (m.matches()) {
-			//get function name
-			functionName = m.group(1);
-			if (functionName == null || functionName.length() == 0) {
-				throw new IOException(Messages.getString("TraceHeader.internalError1")); //$NON-NLS-1$
-			}
-			//get raw parameters
-			String parameters = m.group(2);
-			if (parameters == null || parameters.length() == 0) {//there must be at least TraceID
-				throw new IOException(Messages.getString("TraceHeader.internalError2")); //$NON-NLS-1$
-			}
-			
-			functionName = functionName.trim();
-			parameters = parameters.trim();
-			//remove parameters names
-			guard = parameters.replaceAll("(\\S+,)|(\\S+\\s*$)", ""); //$NON-NLS-1$ //$NON-NLS-2$
-			//replace repeated spaces by one space
-			guard = guard.replaceAll("\\s+", SourceConstants.SPACE).trim(); //$NON-NLS-1$
-			//replace space by underscore
-			guard = guard.replace(SourceConstants.SPACE, SourceConstants.UNDERSCORE);
-			//replace ampersant by REF
-			guard = guard.replace(AMPERSANT, REF);
-			//replace ( by OBR
-			guard = guard.replace(OPEN_BRACKET, BEGINCAST);
-			//replace ) by CBR
-			guard = guard.replace(CLOSING_BRACKET, ENDCAST);
-		} else {
-			throw new IOException(Messages.getString("TraceHeader.internalError3")); //$NON-NLS-1$
-		}
-		
-		guard = SourceConstants.DOUBLE_UNDERSCORE 
-				+ functionName.toUpperCase()
-				+ SourceConstants.UNDERSCORE
-				+ guard.toUpperCase()
-				+ SourceConstants.DOUBLE_UNDERSCORE;
-		
-		ostTraceGenxFunGuard = guard;
-		write( SourceConstants.IFNDEF + SourceConstants.SPACE_CHAR + ostTraceGenxFunGuard);
-		write(SourceConstants.LINE_FEED);
-		write( SourceConstants.DEFINE +SourceConstants.SPACE_CHAR + ostTraceGenxFunGuard);
-		write(SourceConstants.LINE_FEED);
-		write(SourceConstants.LINE_FEED);
-	}
-
-	/**
-	 * write end of function guard
-	 * @throws IOException
-	 */
-	private void writeEndFunctionGuard() throws IOException {
-		if (ostTraceGenxFunGuard != null) {
-			write(SourceConstants.LINE_FEED);
-			write(SourceConstants.LINE_FEED);
-			write(SourceConstants.ENDIF 
-					+ SourceConstants.SPACE_CHAR
-					+ SourceConstants.FORWARD_SLASH_CHAR
-					+ SourceConstants.FORWARD_SLASH_CHAR
-					+ SourceConstants.SPACE_CHAR
-					+ ostTraceGenxFunGuard);
-			write(SourceConstants.LINE_FEED);
-		}
-	}
-	/**
-	 * Writes the function body to the stream
-	 * 
-	 * @param trace
-	 *            the trace to be written
-	 * @throws IOException
-	 *             if writing fails
-	 */
-	private void writeFunctionBody(Trace trace) throws IOException {
-		writeTraceBufferAllocation(trace);
-		writeTemplate(HeaderTemplate.PARAMETERS_TEMPLATE);
-		// If buffer is not used (single descriptor parameter), trace line is
-		// already written in template
-		if (isTraceBufferBuilt()) {
-			writeTraceLine(trace);
-		}
-	}
-
-	/**
-	 * Writes trace buffer allocation code to the function
-	 * 
-	 * @param trace
-	 *            the trace to be written
-	 * @throws IOException
-	 *             if writing fails
-	 */
-	private void writeTraceBufferAllocation(Trace trace) throws IOException {
-		// If buffer is not used (single descriptor parameter), this function
-		// does nothing
-		if (isTraceBufferBuilt()) {
-			Iterator<TraceParameter> parameters = trace.getParameters();
-			lenghtVariableDefined = false;
-			int fixedSizeParametersTotalSize = 0;
-			while (parameters.hasNext()) {
-				TraceParameter parameter = parameters.next();
-				TraceParameterFormattingRule sourceRule = parameter
-						.getExtension(TraceParameterFormattingRule.class);
-				if (sourceRule == null || sourceRule.isShownInSource()
-						|| sourceRule instanceof FillerParameterRule) {
-					// Fillers do not increment parameter index
-					if (!(sourceRule instanceof FillerParameterRule)) {
-						currentParameterIndex++;
-					}
-					int paramSize = SourceUtils
-							.mapParameterTypeToSize(parameter);
-					// calculateParameterSize returns 0 for dynamic parameters,
-					// but 4 extra bytes need to be reserved for the length
-					if (paramSize == 0) {
-						paramSize = BYTES_IN_PARAMETER;
-					}
-					fixedBufferSize += paramSize;
-					fixedSizeParametersTotalSize += paramSize;
-					if (SourceUtils.isParameterSizeDynamic(parameter)) {
-
-						// Define length variable only once
-						if (lenghtVariableDefined == false) {
-							writeTemplate(HeaderTemplate.LENGTH_VARIABLE_DEFINITION_TEMPLATE);
-							lenghtVariableDefined = true;
-						}
-
-						// Increase length variable if needed
-						// This is needed in case that there has been fixed size
-						// parameter
-						// before dynamic parameter
-						if (fixedSizeParametersTotalSize - paramSize > 0) {
-							fixedSizeParametersTotalSize -= paramSize;
-							writeTemplate(HeaderTemplate.LENGTH_VARIABLE_INCREASE_TEMPLATE_BEGIN);
-							write(String.valueOf(fixedSizeParametersTotalSize));
-							writeTemplate(HeaderTemplate.LENGTH_VARIABLE_INCREASE_TEMPLATE_END);
-						}
-
-						fixedSizeParametersTotalSize = 0;
-
-						writeTemplate(HeaderTemplate.DYNAMIC_PARAMETER_LENGTH_TEMPLATE);
-						dynamicBufferSizeFlag = true;
-					}
-				}
-			}
-			writeTemplate(HeaderTemplate.BUFFER_ALLOCATION_TEMPLATE);
-			currentParameterIndex = 0;
-		}
-	}
-
-	/**
-	 * Writes the given parameter to the header
-	 * 
-	 * @param parameter
-	 *            the parameter
-	 * @throws IOException
-	 *             if writing fails
-	 */
-	void writeParameter(TraceParameter parameter) throws IOException {
-		TraceParameterFormattingRule sourceRule = parameter
-				.getExtension(TraceParameterFormattingRule.class);
-		if (sourceRule == null || sourceRule.isShownInSource()
-				|| sourceRule instanceof FillerParameterRule) {
-			String paramType = SourceUtils
-					.mapParameterTypeToSymbianType(parameter);
-			if (SourceUtils.isParameterSizeDynamic(parameter)) {
-				currentParameterIndex++;
-				currentParameterName = SymbianConstants.PARAMETER_DECLARATION_PREFIX
-						+ currentParameterIndex;
-				writeTemplate(HeaderTemplate.DYNAMIC_PARAMETER_TEMPLATE);
-			} else {
-				currentParameterType = paramType;
-				if (sourceRule instanceof FillerParameterRule) {
-					currentParameterName = "0"; //$NON-NLS-1$
-					writeTemplate(HeaderTemplate.FIXED_PARAMETER_TEMPLATE);
-				} else {
-					currentParameterIndex++;
-					currentParameterName = SymbianConstants.PARAMETER_DECLARATION_PREFIX
-							+ currentParameterIndex;
-					if (lenghtVariableDefined == true) {
-						writeTemplate(HeaderTemplate.FIXED_PARAMETER_TEMPLATE_WITH_LENGTH_CHECK);
-					} else {
-						writeTemplate(HeaderTemplate.FIXED_PARAMETER_TEMPLATE);
-					}
-				}
-			}
-		}
-	}
-
-	/**
-	 * Writes the trace line to the function
-	 * 
-	 * @param trace
-	 *            the trace to be written
-	 * @throws IOException
-	 *             if writing fails
-	 */
-	private void writeTraceLine(Trace trace) throws IOException {
-		StringBuffer sb;
-		StringBuffer bufferData = new StringBuffer();
-		StringBuffer lengthData = new StringBuffer();
-		if (isBufferSizeDynamic()) {
-			sb = writeBufferedTraceLine(trace, bufferData, lengthData);
-		} else {
-			// If buffer size is 4, the buffer can be traced using the
-			// the 32-bit parameter trace macro instead of data macro
-			if (fixedBufferSize / BYTES_IN_PARAMETER == 1) {
-				sb = writePackedTraceLine(trace, bufferData);
-			} else {
-				sb = writeBufferedTraceLine(trace, bufferData, lengthData);
-			}
-		}
-		int index = sb.indexOf(TraceFormatConstants.DATA_BUFFER_FORMAT);
-		if (index >= 0) {
-			sb.replace(index, index
-					+ TraceFormatConstants.DATA_BUFFER_FORMAT.length(),
-					bufferData.toString());
-		}
-		index = sb.indexOf(TraceFormatConstants.DATA_LENGTH_FORMAT);
-		if (index >= 0) {
-			sb.replace(index, index
-					+ TraceFormatConstants.DATA_LENGTH_FORMAT.length(),
-					lengthData.toString());
-		}
-		String s = sb.toString();
-		write("retval = "); //$NON-NLS-1$
-		writeFormattedTrace(s);
-		writeNewLine();
-	}
-
-	/**
-	 * Writes a trace line when the parameters can be fitted into a direct API
-	 * call
-	 * 
-	 * @param trace
-	 *            the trace
-	 * @param bufferData
-	 *            the buffer
-	 * @return formatted trace
-	 */
-	private StringBuffer writePackedTraceLine(Trace trace,
-			StringBuffer bufferData) {
-		StringBuffer sb;
-		// The formatting rule is used to get the API macro
-		sb = new StringBuffer(SourceFormatter.formatTrace(trace,
-				TraceFormatType.TRACE_PACKED));
-		TraceFormattingRule rule = trace
-				.getExtension(TraceFormattingRule.class);
-		if (rule == null) {
-			rule = trace.getModel().getExtension(TraceFormattingRule.class);
-		}
-		int index = sb.indexOf(TraceFormatConstants.PARAM_COUNT_FORMAT);
-		if (index >= 0) {
-			// Single parameter is supported
-			sb.replace(index, index
-					+ TraceFormatConstants.PARAM_COUNT_FORMAT.length(), rule
-					.mapParameterCountToSource(trace, 1));
-		}
-		bufferData.append("*( ( TUint32* )ptr )"); //$NON-NLS-1$
-		return sb;
-	}
-
-	/**
-	 * Writes a trace line when the trace contains more data that the API
-	 * supports
-	 * 
-	 * @param trace
-	 *            the trace
-	 * @param bufferData
-	 *            the trace buffer
-	 * @param lengthData
-	 *            the trace length buffer
-	 * @return the formatted trace
-	 */
-	private StringBuffer writeBufferedTraceLine(Trace trace,
-			StringBuffer bufferData, StringBuffer lengthData) {
-		StringBuffer sb;
-		// Buffer parameter
-		// *( ( TUint32* )ptr ), *( ( TUint32* )( ptr + 4 ) ), ..., ptr + x
-		sb = new StringBuffer(SourceFormatter.formatTrace(trace,
-				TraceFormatType.TRACE_BUFFER));
-		if (isTraceBufferBuilt()) {
-			bufferData.append("ptr"); //$NON-NLS-1$
-			if (isBufferSizeDynamic()) {
-				// In case of dynamic buffer, the length has been calculated
-				// into length variable
-				lengthData.append("length"); //$NON-NLS-1$
-			} else {
-				// Fixed size case
-				lengthData.append(String.valueOf(fixedBufferSize));
-			}
-		} else {
-			// In case of no-buffer, the size variable contain the data size
-			bufferData.append("ptr"); //$NON-NLS-1$
-			lengthData.append("size"); //$NON-NLS-1$
-		}
-		return sb;
-	}
-
-	/**
-	 * Writes a formatted trace to the stream. This removes the newline from the
-	 * trace if it exists
-	 * 
-	 * @param trace
-	 *            the trace
-	 * @throws IOException
-	 *             if writing fails
-	 */
-	private void writeFormattedTrace(String trace) throws IOException {
-		if (trace.endsWith(SourceConstants.LINE_FEED)) {
-			write(trace.substring(0, trace.length()
-					- SourceConstants.LINE_FEED.length()));
-		} else {
-			write(trace);
-		}
-	}
-
-	/**
-	 * Increases indent and writes a new line, brace, new line combination
-	 * 
-	 * @throws IOException
-	 *             if writing fails
-	 */
-	private void writeOpenBrace() throws IOException {
-		openBraceCount++;
-		writeNewLine();
-		write(SourceConstants.OPENING_BRACE);
-		writeNewLine();
-	}
-
-	/**
-	 * Write brace, decreases indent and writes a new line
-	 * 
-	 * @throws IOException
-	 *             if writing fails
-	 */
-	private void writeCloseBrace() throws IOException {
-		write(SourceConstants.CLOSING_BRACE);
-		openBraceCount--;
-		writeNewLine();
-	}
-	
-	/**
-	 * write licence Text
-	 * @throws IOException if write fails
-	 */
-	private void writeLicence() throws IOException {
-		String licence = null;
-		SourceParser parser = null;
-		//first get any of the traces belonging to this header
-		TraceModel model = header.getOwner().getModel();
-		for (TraceGroup group : model) {
-			for (Trace trace : group) {
-				Iterator<LocationListBase> itr = trace.getExtensions(LocationListBase.class);
-				// The trace must have at least one location that belong to this header
-				while (itr.hasNext() && parser == null) {
-					LocationListBase list = itr.next();
-					for (LocationProperties loc : list) {
-						if (isValidTraceForHeader(loc.getFileName())) {
-								parser = ((TraceLocation)loc).getParser();
-								break;
-						}
-					}
-				}
-				if (parser!= null)  {
-					break;
-				}
-			}
-			if (parser != null) {
-				break;
-			}
-		}
-		
-		if (parser!= null) {
-		List<SourceExcludedArea> excludedAreas = parser.getExcludedAreas();
-		//try to find licence from the source
-		if (!excludedAreas.isEmpty()) {
-			SourceExcludedArea sourceExcludedArea = excludedAreas.get(0);
-			int offset = sourceExcludedArea.getOffset();
-			int type = sourceExcludedArea.getType();
-			int length = sourceExcludedArea.getLength();
-			if (offset == 0 && type == SourceExcludedArea.MULTILINE_COMMENT) {
-				String data = sourceExcludedArea.getParser().getData(offset, length);
-				if (data.contains("Copyright")) { //$NON-NLS-1$
-					// licence found write it
-					TraceCompilerLogger.printInfo("Add Licence text from: " + sourceExcludedArea.getFileName() + " to : " + header.getAbsolutePath()); //$NON-NLS-1$
-					licence = data;
-					write(licence);
-				}
-			}	
-		}
-		}
-		
-		if (licence == null) {
-			//get default licence from the licence file
-			licence = TraceCompilerEngineGlobals.getDefaultLicence(true);
-			
-			if(licence != null) {
-				TraceCompilerLogger.printInfo("Add default EPL Licence to : " + header.getAbsolutePath()); //$NON-NLS-1$
-				write(licence);
-			}
-		}
-	}
-
-	/**
-	 * Writes a new line and indent to the stream
-	 * 
-	 * @throws IOException
-	 *             if writing fails
-	 */
-	private void writeNewLine() throws IOException {
-		int newLines = newLineCount;
-		while (newLines < maxNewLines) {
-			write(SourceConstants.LINE_FEED);
-			for (int i = 0; i < openBraceCount; i++) {
-				write(INDENT);
-			}
-			newLines++;
-		}
-		newLineCount = maxNewLines;
-	}
-
-	/**
-	 * Writes a define to stream
-	 * 
-	 * @param name
-	 *            the name for the define
-	 * @throws IOException
-	 *             if writing fails
-	 */
-	private void writeDefine(String name) throws IOException {
-		write(SourceConstants.DEFINE);
-		write(SourceConstants.SPACE);
-		write(name);
-		writeNewLine();
-	}
-
-	/**
-	 * Writes include to header
-	 * 
-	 * @param name
-	 *            the header name
-	 * @throws IOException
-	 *             if writing fails
-	 */
-	private void writeSystemInclude(String name) throws IOException {
-		write(SourceConstants.INCLUDE);
-		write(SourceConstants.SPACE);
-		write("<"); //$NON-NLS-1$
-		write(name);
-		write(">"); //$NON-NLS-1$
-		writeNewLine();
-	}
-
-	/**
-	 * Writes data to a stream
-	 * 
-	 * @param data
-	 *            the string of data
-	 * @throws IOException
-	 *             if writing fails
-	 */
-	private void write(String data) throws IOException {
-		// Check if function starts
-		if (data.contains(INLINE_TBOOL) || bufferingFunction) {
-			bufferingFunction = true;
-			functionText.append(data);
-		} else {
-			headerOutput.write(data.getBytes());
-		}
-			newLineCount = 0;
-
-		//try to duplicate function if the current function processing is complete and duplicate is needed.
-		writeAndDuplicateFunction(data);
-	}
-
-	/**
-	 * Duplicates the function if needed
-	 * 
-	 * @param data
-	 *            data String
-	 * @throws IOException
-	 *             if writing fails
-	 */
-	private void writeAndDuplicateFunction(String data) throws IOException {
-			// This assumes there is only one start or end bracket in one line!
-			if (data.contains(SourceConstants.OPENING_BRACE)) {
-				firstOpenBraceFound = true;
-				numberOfBrackets++;
-			} else if (data.contains(SourceConstants.CLOSING_BRACE)) {
-				numberOfBrackets--;
-
-				// Function ends
-				if (numberOfBrackets == 0 && firstOpenBraceFound) {
-					firstOpenBraceFound = false;
-					bufferingFunction = false;
-					//write start function guard
-					writeStartFunctionGuard();
-					//write the function
-					headerOutput.write(functionText.toString().getBytes());
-					//write end function guard
-					writeEndFunctionGuard();
-
-					//process duplicate if needed
-					// Get the function definition line
-					int startIndex = functionText.indexOf(SourceConstants.OPENING_BRACE);
-					String funcDef = functionText.substring(0, startIndex);
-
-					// Replace TInt with TInt32 and TUint with TUint32 from the
-					// header and write the function back again
-					if (funcDef.contains(TINT_DEF)
-							|| funcDef.contains(TUINT_DEF)) {
-						//replace and duplicate
-						funcDef = funcDef.replace(TINT_DEF, TINT32_DEF);
-						funcDef = funcDef.replace(TUINT_DEF, TUINT32_DEF);
-						functionText.replace(0, startIndex, funcDef);
-						
-						//write start function guard for duplicate
-						write(SourceConstants.LINE_FEED);
-						write(SourceConstants.LINE_FEED);
-						writeStartFunctionGuard();
-						
-						//write duplicate function
-						headerOutput.write(functionText.toString().getBytes());
-						
-						//write end function guard for duplicate
-						writeEndFunctionGuard();
-					}
-
-					functionText.setLength(0);
-				}
-			}
-	}
-
-	/**
-	 * Checks if a trace needs a buffer or it can be represented with regular
-	 * trace macros.
-	 * 
-	 * @param trace
-	 *            the trace
-	 * @return true if trace needs a buffer
-	 */
-	private boolean traceNeedsBuffer(Trace trace) {
-		// A single dynamic parameter can be passed through the regular
-		// API macros. In that case the parameter length is determined
-		// by the trace message length
-		Iterator<TraceParameter> parameters = trace.getParameters();
-		boolean needsBuffer = false;
-		boolean dynamicFound = false;
-		while (parameters.hasNext() && !needsBuffer) {
-			TraceParameter parameter = parameters.next();
-			if (isParameterVisible(parameter)) {
-				if (SourceUtils.isParameterSizeDynamic(parameter)) {
-					if (dynamicFound) {
-						needsBuffer = true;
-					} else {
-						dynamicFound = true;
-					}
-				} else {
-					needsBuffer = true;
-				}
-			}
-		}
-		return needsBuffer;
-	}
-
-	/**
-	 * Checks if a parameter is visible
-	 * 
-	 * @param parameter
-	 *            the parameter to be checked
-	 * @return true if visible, false if not
-	 */
-	private boolean isParameterVisible(TraceParameter parameter) {
-		boolean retval;
-		TraceParameterFormattingRule sourceRule = parameter
-				.getExtension(TraceParameterFormattingRule.class);
-		if (sourceRule == null || sourceRule.isShownInSource()) {
-			retval = true;
-		} else {
-			retval = false;
-		}
-		return retval;
-	}
-
-	/**
-	 * Gets the formatted trace
-	 * 
-	 * @return the trace
-	 */
-	String getCurrentTraceFormatted() {
-		return currentTraceFormatted;
-	}
-
-	/**
-	 * Checks if trace is already formatted to header
-	 * 
-	 * @return true if formatted
-	 */
-	boolean isTraceFormatDuplicate() {
-		boolean retval;
-		if (traceDeclarations.contains(currentTraceFormatted)) {
-			retval = true;
-		} else {
-			traceDeclarations.add(currentTraceFormatted);
-			retval = false;
-		}
-		return retval;
-	}
-
-	/**
-	 * Checks if the buffer size for current trace is fixed
-	 * 
-	 * @return the flag
-	 */
-	boolean isTraceBufferFixed() {
-		return fixedBufferSize != 0;
-	}
-
-	/**
-	 * Checks if the buffer is built
-	 * 
-	 * @return the flag
-	 */
-	boolean isTraceBufferBuilt() {
-		return buildTraceBuffer;
-	}
-
-	/**
-	 * Gets the current trace
-	 * 
-	 * @return the trace
-	 */
-	Trace getCurrentTrace() {
-		return currentTrace;
-	}
-
-	/**
-	 * Gets the header
-	 * 
-	 * @return the header
-	 */
-	TraceHeader getHeader() {
-		return header;
-	}
-
-	/**
-	 * Starts writing a trace
-	 * 
-	 * @param trace
-	 *            the trace
-	 * @return true if trace can be written, false if not
-	 */
-	boolean startTrace(Trace trace) {
-		boolean validTrace = false;
-		Iterator<LocationListBase> itr = trace
-				.getExtensions(LocationListBase.class);
-		// The trace must have at least one location that belong to this header
-		while (itr.hasNext() && !validTrace) {
-			LocationListBase list = itr.next();
-			for (LocationProperties loc : list) {
-				validTrace = isValidTraceForHeader(loc.getFileName());
-				if (validTrace) {
-					break;
-				}
-			}
-		}
-		if (validTrace) {
-			currentTrace = trace;
-			fixedBufferSize = 0;
-			dynamicBufferSizeFlag = false;
-			buildTraceBuffer = false;
-			currentTraceFormatted = null;
-			currentParameterName = null;
-			currentParameterType = null;
-			currentParameterIndex = 0;
-		}
-		return validTrace;
-	}
-
-	/**
-	 * Checks if the location belongs to this header
-	 * 
-	 * @param locFileName
-	 *            the location
-	 * @return true if location belongs here
-	 */
-	private boolean isValidTraceForHeader(String locFileName) {
-		boolean valid = false;
-		if (locFileName != null) {
-			int index = locFileName.lastIndexOf('.');
-			if (index >= 0) {
-				locFileName = locFileName.substring(0, index);
-			}
-			if (locFileName.equals(header.getProjectName())) {
-				valid = true;
-			}
-		}
-		return valid;
-	}
-
-	/**
-	 * Starts writing a parameter
-	 * 
-	 * @param parameter
-	 *            the parameter
-	 */
-	void startParameter(TraceParameter parameter) {
-		currentParameterName = null;
-		currentParameterType = null;
-		currentParameter = parameter;
-	}
-
-	/**
-	 * Sets the kernel mode #endif needed flag
-	 * 
-	 * @param flag
-	 *            the flag
-	 */
-	void setKernelModeEndifNeeded(boolean flag) {
-		needsKernelEndif = flag;
-	}
-
-	/**
-	 * Gets the kernel mode endif needed flag
-	 * 
-	 * @return the flag
-	 */
-	boolean isKernelModeEndifNeeded() {
-		return needsKernelEndif;
-	}
-
-	/**
-	 * Returns the dynamic buffer size flag
-	 * 
-	 * @return true if buffer size is dynamic
-	 */
-	boolean isBufferSizeDynamic() {
-		return dynamicBufferSizeFlag;
-	}
-
-	/**
-	 * Checks if current parameter needs alignment
-	 * 
-	 * @return true if needed
-	 */
-	boolean isParameterAlignmentNeeded() {
-		return SourceUtils.isParameterAlignementNeeded(currentParameter
-				.getType());
-	}
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/header/messages.properties	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,8 +0,0 @@
-TraceHeader.Title=Trace Header
-HeaderEngine.TraceHeaderNotChangedPrefix=No changes were made to 
-HeaderEngine.FailedToAttachHeader=Failed to attach trace header to project
-TraceHeader.internalError1=TraceCompiler internal: Error parsing OstTraceGenx function name.
-TraceHeader.internalError2=TraceCompiler internal: Error parsing OstTraceGenx function parameters.
-TraceHeader.internalError3=TraceCompiler internal: TraceCompiler could not identify OstTraceGenx function.
-
-
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/header/package.html	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,4 +0,0 @@
-<html><body>
-Maintains the trace header, which contains inline functions 
-for traces that cannot be represented by the normal trace API.
-</body></html>
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/messages.properties	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,110 +0,0 @@
-TraceCompiler.UnknownTypeWarning=Parameter type is unknown. Hex, 32-bit used
-TraceLocationConverter.GroupIdValueError=TC has detected a fixed_id.defintions using different Group Id values. This file will be regenerated with the correct values.
-TraceLocationConverter.DeprecatedGroupIdWarningStart=Deprecated group
-TraceLocationConverter.DeprecatedGroupIdWarningMiddle=detected. Updating to
-TraceLocationConverter.DeprecatedGroupIdWarningEnd=in dictionary. Please update source code!
-TraceLocationConverter.FixedIdProblemWarningBeginText=Found problems with the old fixed id message : 
-TraceLocationConverter.FixedIdProblemWarningMiddleText=. Therfore deleting it.
-TraceLocationMap.SourceWithTraceRemoved=Source file with traces was removed
-TraceCompilerErrorMessages.SourceNotEditable=Source cannot be edited
-TraceCompilerErrorMessages.DuplicateGroupID=Group ID conflict. Please close all the source files, delete traceid and tracecompiler cache files. Then reopen source file.
-TraceCompilerErrorMessages.DuplicateTraceID=Trace ID is already in use
-TraceCompilerErrorMessages.DuplicateGroupName=Group name is already in use
-TraceCompilerErrorMessages.DuplicateTraceName=Trace name is already in use
-TraceCompilerErrorMessages.DuplicateConstantValue=Enum text is already in use
-TraceCompilerErrorMessages.DuplicateConstantID=Enum value is already in use
-TraceCompilerErrorMessages.DuplicateConstantTableName=Enum type is already in use
-TraceCompilerErrorMessages.DuplicateConstantTableID=Enum ID is already in use
-TraceCompilerErrorMessages.DuplicateParameterName=Parameter name is already in use
-TraceCompilerErrorMessages.DuplicateParameterID=Parameter ID is already in use
-TraceCompilerErrorMessages.InvalidGroupName=Invalid group name
-TraceCompilerErrorMessages.InvalidTraceName=Invalid trace name
-TraceCompilerErrorMessages.InvalidGroupID=Invalid group ID
-TraceCompilerErrorMessages.InvalidGroupIDStart=Group ID must be between 
-TraceCompilerErrorMessages.InvalidGroupIDMiddle=\ and 
-TraceCompilerErrorMessages.InvalidGroupIDEnd=
-TraceCompilerErrorMessages.InvalidTraceID=Invalid trace ID
-TraceCompilerErrorMessages.InvalidTraceIDStart=Trace ID must be between 
-TraceCompilerErrorMessages.InvalidTraceIDMiddle=\ and 
-TraceCompilerErrorMessages.InvalidTraceIDEnd=
-TraceCompilerErrorMessages.InvalidModelPropertiesForExport=Before exporting, the trace compiler needs to be run once to generate UID and name for the component.
-TraceCompilerErrorMessages.InvalidProjectName=Project name is not valid
-TraceCompilerErrorMessages.InvalidSourceLocation=Cursor location is not valid
-TraceCompilerErrorMessages.InvalidParameterName=Parameter name is not valid
-TraceCompilerErrorMessages.InvalidParameterNameInReturnValue=Return parameter name is not valid. Parameter was not added to exit trace.
-TraceCompilerErrorMessages.InvalidConstantValue=Enum text is not valid
-TraceCompilerErrorMessages.InvalidParameterType=Parameter type is not supported
-TraceCompilerErrorMessages.InvalidParameterTypePrefix=Parameter type 
-TraceCompilerErrorMessages.InvalidParameterTypePostfix=\ is not supported
-TraceCompilerErrorMessages.InvalidDirectoryPrefix=
-TraceCompilerErrorMessages.InvalidDirectoryPostfix=\ is not a valid directory
-TraceCompilerErrorMessages.InvalidDirectory=Directory is not valid
-TraceCompilerErrorMessages.InvalidConstantTableName=Enum type is not valid. Please select a valid enum from the source code and try again.
-TraceCompilerErrorMessages.ConstantTableNotPartOfProject=The file where enum exist is not part of project. You can parse enums only from files that are part of the project. If you want parse enum from external file, you can copy and paste that enum to some file in your project and parse it from there. After you have parsed enum you can delete it from your project.  
-TraceCompilerErrorMessages.FileDoesNotExistPrefix=
-TraceCompilerErrorMessages.FileDoesNotExistPostfix=\ does not exist
-TraceCompilerErrorMessages.InvalidTraceData=Invalid trace text
-TraceCompilerErrorMessages.InvalidTraceFile=Trace project file is not valid
-TraceCompilerErrorMessages.GroupNotSelected=Group was not selected
-TraceCompilerErrorMessages.NoFunctionsToInstrumentPrefix=None of the functions from open files could be instrumented with 
-TraceCompilerErrorMessages.NoFunctionsToInstrument=Currently open files do not have any functions that can be instrumented
-TraceCompilerErrorMessages.NoFunctionsToInstrumentPostfix=\ template
-TraceCompilerErrorMessages.ParameterFormatMismatch=Parameter count does not match the format specification
-TraceCompilerErrorMessages.ParameterFormatNotSupported=Parameter format is not supported
-TraceCompilerErrorMessages.ParameterFormatNotSupportedPrefix=Parameter format 
-TraceCompilerErrorMessages.ParameterFormatNotSupportedPostfix=\ is not supported
-TraceCompilerErrorMessages.MultipleErrorsInOperation=Multiple errors during operation. See event viewer for details
-TraceCompilerErrorMessages.ParameterAddNotAllowed=Parameters cannot be added to the trace
-TraceCompilerErrorMessages.EmptyParameterName=Parameter did not have a name and was not added to trace
-TraceCompilerErrorMessages.SourceNotOpen=Source file needs to be opened first
-TraceCompilerErrorMessages.ParameterRemoveNotAllowed=The parameter cannot be removed
-TraceCompilerErrorMessages.ConstantTableNotSelected=Enum was not selected
-TraceCompilerErrorMessages.ConstantTableParseFailed=Failed to parse enum
-TraceCompilerErrorMessages.CannotDeleteSelectedObject=The selected object cannot be deleted
-TraceCompilerErrorMessages.CannotUpdateTraceIntoSource=Trace could not be updated to source code
-TraceCompilerErrorMessages.CannotParseFunctionParameters=None of the function parameters could be added to the function entry trace
-TraceCompilerErrorMessages.CannotOpenProjectFile=Cannot open project file. Check that the directory is not read-only
-TraceCompilerErrorMessages.CannotWriteProjectFile=Cannot write project file. Check that the directory is not read-only
-TraceCompilerErrorMessages.CannotOpenSourceFile=Source file could not be opened
-TraceCompilerErrorMessages.ParameterTemplateInUse=Another parameter already uses the selected template
-TraceCompilerErrorMessages.InvalidTraceTextFormat=Trace text format is not valid
-TraceCompilerErrorMessages.InvalidTraceNameFormat=Trace name format is not valid
-TraceCompilerErrorMessages.InsertTraceDoesNotWork=Data traces cannot be inserted to source
-TraceCompilerErrorMessages.TraceLocationNotSelected=Source location was not selected
-TraceCompilerErrorMessages.TraceHasMultipleLocations=Trace is used from multiple places
-TraceCompilerErrorMessages.LocationCouldNotBeParsed=Location could not be parsed
-TraceCompilerErrorMessages.UnreachableTraceLocation=Trace is in unreachable part of the code
-TraceCompilerErrorMessages.NameFormatMissingFunction=Missing function name tag {$FN} from trace name
-TraceCompilerErrorMessages.TraceNotSelected=Trace was not selected
-TraceCompilerErrorMessages.TraceProjectNotOpen=Trace project is not open
-TraceCompilerErrorMessages.TraceHasNoLocations=Trace is not used from source files and will be removed when a source is saved
-TraceCompilerErrorMessages.NoTracesToDelete=No traces to delete
-TraceCompilerErrorMessages.NoTracesToExport=Project does not have any traces -> No files were written
-TraceCompilerErrorMessages.FileDoesNotExist=File does not exist
-TraceCompilerErrorMessages.NoTraceGroups=Cannot add a new trace before a trace group has been created
-TraceCompilerErrorMessages.UnexpectedException=Unknown error occurred
-TraceCompilerErrorMessages.NotEnoughParameters=Trace does not have enough parameters
-TraceCompilerErrorMessages.NoContextForLocation=Class / function name for trace could not be determined
-TraceCompilerErrorMessages.TraceDoesNotExist=Trace will be created when the source file is saved
-TraceCompilerErrorMessages.TraceNeedsConversionPrefix=Trace needs conversion
-TraceCompilerErrorMessages.ParameterCountMismatch=Parameter count in source does not match the parameter count in trace
-TraceCompilerErrorMessages.ParameterCountDoesNotMatchApi=The number of parameters in source does not match the API macro
-TraceCompilerErrorMessages.ParameterFormatNotSupportedInMacro=Extension macro needs to be used with this parameter format type
-TraceCompilerErrorMessages.ParameterFormatUnnecessaryExtMacro=Trace does not need to use extension macro
-TraceCompilerErrorMessages.ParameterFormatNotSupportedInMacroPrefix=Extension macro needs to be used with parameter 
-TraceCompilerErrorMessages.ParameterFormatNotSupportedInMacroPostfix=
-TraceCompilerErrorMessages.ParameterFormatNotSupportedInArrayPrefix=Parameter format 
-TraceCompilerErrorMessages.ParameterFormatNotSupportedInArrayPostfix=\ cannot be used as an array
-TraceCompilerErrorMessages.ParameterFormatNotSupportedInArray=Parameter format cannot be used as an array
-TraceCompilerErrorMessages.PropertyFileElementNotSupportedPrefix=Property file element 
-TraceCompilerErrorMessages.PropertyFileElementNotSupportedPostfix=\ is not supported and was ignored
-TraceCompilerErrorMessages.PropertyFileElementMisplacedPrefix=Property file element 
-TraceCompilerErrorMessages.PropertyFileElementMisplacedPostfix=\ was unexpected
-TraceCompilerErrorMessages.PropertyFileAttributeInvalidPrefix=Property file attribute 
-TraceCompilerErrorMessages.PropertyFileAttributeInvalidPostfix=\ did not have a valid value
-TraceCompilerErrorMessages.RunOutOfGroupIDs=Run out of Group IDs. You can try to reuse unused group ids by deleting fixed id definition file.
-TraceCompilerErrorMessages.RunOutOfTraceIDs=Run out of Trace IDs. You can try to reuse unused trace ids by deleting fixed id definition file.
-TraceCompilerErrorMessages.VarArgListParameterFound=Parameters were not added to the trace because one of the variables is a variable argument list.
-TraceCompilerErrorMessages.InvalidUsageOfTraceStateGroupName=Invalid group name. TRACE_STATE group name is reserved for state traces only.
-TraceCompilerErrorMessages.InvalidUsageOfTracePerformanceGroupName=Invalid group name. TRACE_PERFORMANCE group name is reserved for performance traces only.
-TraceCompilerErrorMessages.LicenceFileError=Failed to read licence file. 
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/package.html	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-<html><body>
-Contains the main control logic of TraceCompiler.
-</body></html>
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/plugin/PluginEngine.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,198 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Export plugin manager, which delegates calls to plug-ins
-*
-*/
-package com.nokia.tracecompiler.engine.plugin;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-
-import com.nokia.tracecompiler.engine.TraceCompilerEngineBase;
-import com.nokia.tracecompiler.engine.TraceCompilerEngineConfiguration;
-import com.nokia.tracecompiler.engine.TraceCompilerEngineErrorMessages;
-import com.nokia.tracecompiler.engine.TraceCompilerEngineGlobals;
-import com.nokia.tracecompiler.engine.TraceCompilerEngineErrorCodes.TraceCompilerErrorCode;
-import com.nokia.tracecompiler.model.TraceCompilerException;
-import com.nokia.tracecompiler.model.TraceModel;
-import com.nokia.tracecompiler.model.TraceObjectPropertyVerifier;
-import com.nokia.tracecompiler.plugin.TraceAPIPlugin;
-import com.nokia.tracecompiler.plugin.TraceCompilerExport;
-import com.nokia.tracecompiler.plugin.TraceCompilerPlugin;
-
-/**
- * Plugin engine, which delegates calls to plug-ins
- * 
- */
-public final class PluginEngine extends TraceCompilerEngineBase {
-
-	/**
-	 * List of plug-ins
-	 */
-	private ArrayList<TraceCompilerPlugin> plugins = new ArrayList<TraceCompilerPlugin>();
-
-	/**
-	 * Property verifier
-	 */
-	private PluginTracePropertyVerifier verifier = new PluginTracePropertyVerifier(
-			this);
-
-	/**
-	 * Trace model
-	 */
-	private TraceModel model;
-
-	/**
-	 * Project open flag
-	 */
-	private boolean projectOpen;
-
-	/**
-	 * Sets the trace model. This is not set in constructor, since plug-in
-	 * engine is created before the model
-	 * 
-	 * @param model
-	 *            the trace model
-	 */
-	public void setModel(TraceModel model) {
-		this.model = model;
-	}
-
-	/**
-	 * Gets the started flag
-	 * 
-	 * @return true if started, false if not
-	 */
-	public boolean isProjectOpen() {
-		return projectOpen;
-	}
-
-	/**
-	 * Adds a plugin
-	 * 
-	 * @param plugin
-	 *            the plugin to be added
-	 */
-	public void add(TraceCompilerPlugin plugin) {
-		plugins.add(plugin);
-		if (plugin instanceof TraceAPIPlugin) {
-			TraceAPIPlugin api = (TraceAPIPlugin) plugin;
-			TraceAPIPluginManager manager = model
-					.getExtension(TraceAPIPluginManager.class);
-			manager.addFormatters(api.getFormatters());
-			manager.addParsers(api.getParsers());
-		}
-	}
-
-	/**
-	 * Removes a plugin
-	 * 
-	 * @param plugin
-	 *            the plugin to be removed
-	 */
-	public void remove(TraceCompilerPlugin plugin) {
-		// Formatters / parsers are not removed. Currently this is not a
-		// problem since plug-in's are removed only on shutdown
-		plugins.remove(plugin);
-	}
-
-	/**
-	 * Gets the property verifier interface
-	 * 
-	 * @return the verifier
-	 */
-	public TraceObjectPropertyVerifier getVerifier() {
-		return verifier;
-	}
-
-	/**
-	 * Checks if there are plug-ins
-	 * 
-	 * @return true if plug-ins exist
-	 */
-	public boolean hasPlugins() {
-		return !plugins.isEmpty();
-	}
-
-	/**
-	 * Gets the plug-ins
-	 * 
-	 * @return the plug-ins
-	 */
-	Iterator<TraceCompilerPlugin> getPlugins() {
-		return plugins.iterator();
-	}
-
-	/* (non-Javadoc)
-	 * @see com.nokia.tracecompiler.engine.TraceCompilerEngineBase#exportProject()
-	 */
-	@Override
-	public void exportProject() throws TraceCompilerException {
-		if (model.hasTraces()) {
-			for (TraceCompilerPlugin plugin : plugins) {
-				if (plugin instanceof TraceCompilerExport) {
-					try {
-						((TraceCompilerExport) plugin).exportTraceProject();
-					} catch (TraceCompilerException e) {
-						TraceCompilerEngineGlobals.getEvents().postError(e);
-							throw e;
-					}
-				}
-			}
-		} else {
-			TraceCompilerEngineGlobals.getEvents().postInfoMessage(
-					TraceCompilerEngineErrorMessages.getErrorMessage(
-							TraceCompilerErrorCode.NO_TRACES_TO_EXPORT, null),
-					null);
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engine.TraceCompilerEngine#projectOpened()
-	 */
-	@Override
-	public void projectOpened() {
-		if (!projectOpen) {
-			for (TraceCompilerPlugin plugin : plugins) {
-				plugin.traceProjectOpened(model);
-			}
-			projectOpen = true;
-		} else {
-			if (TraceCompilerEngineConfiguration.ASSERTIONS_ENABLED) {
-				TraceCompilerEngineGlobals.getEvents().postAssertionFailed(
-						"PluginEngine.traceProjectOpened", null); //$NON-NLS-1$
-			}
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engine.TraceCompilerEngine#projectClosing()
-	 */
-	@Override
-	public void projectClosed() {
-		if (projectOpen) {
-			for (TraceCompilerPlugin plugin : plugins) {
-				plugin.traceProjectClosed();
-			}
-			projectOpen = false;
-		}
-	}
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/plugin/PluginTracePropertyVerifier.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,336 +0,0 @@
-/*
-* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Property verifier for trace objects
-*
-*/
-package com.nokia.tracecompiler.engine.plugin;
-
-import java.util.Iterator;
-
-import com.nokia.tracecompiler.engine.TraceCompilerEngineGlobals;
-import com.nokia.tracecompiler.engine.TraceCompilerEngineErrorCodes.RangeErrorParameters;
-import com.nokia.tracecompiler.engine.TraceCompilerEngineErrorCodes.TraceCompilerErrorCode;
-import com.nokia.tracecompiler.model.Trace;
-import com.nokia.tracecompiler.model.TraceCompilerException;
-import com.nokia.tracecompiler.model.TraceConstantTable;
-import com.nokia.tracecompiler.model.TraceConstantTableEntry;
-import com.nokia.tracecompiler.model.TraceGroup;
-import com.nokia.tracecompiler.model.TraceModel;
-import com.nokia.tracecompiler.model.TraceObjectPropertyVerifier;
-import com.nokia.tracecompiler.model.TraceParameter;
-import com.nokia.tracecompiler.plugin.TraceCompilerPlugin;
-import com.nokia.tracecompiler.source.SourceConstants;
-import com.nokia.tracecompiler.source.SourceUtils;
-import com.nokia.tracecompiler.project.*;
-
-/**
- * Property verifier for trace objects
- * 
- */
-public final class PluginTracePropertyVerifier implements TraceObjectPropertyVerifier {
-
-	/**
-	 * Valid data character range start
-	 */
-	private static final int DATA_CHAR_START = 0x20; // CodForChk_Dis_Magic
-
-	/**
-	 * Valid data character range end
-	 */
-	private static final int DATA_CHAR_END = 0x7E; // CodForChk_Dis_Magic
-	/**
-	 * TAB character
-	 */
-	private static final int TAB =  0x9;  // CodForChk_Dis_Magic
-
-	/**
-	 * Plugin engine
-	 */
-	private PluginEngine pluginEngine;
-
-	/**
-	 * Constructor. Empty public constructor is needed by test class.
-	 */
-	public PluginTracePropertyVerifier() {
-		
-	}
-	
-	/**
-	 * Constructor
-	 * 
-	 * @param engine
-	 *            plug-in engine
-	 */
-	PluginTracePropertyVerifier(PluginEngine engine) {
-		this.pluginEngine = engine;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.model.TraceObjectPropertyVerifier#
-	 *      checkConstantProperties(com.nokia.tracecompiler.model.TraceConstantTable,
-	 *      com.nokia.tracecompiler.model.TraceConstantTableEntry, int,
-	 *      java.lang.String)
-	 */
-	public void checkConstantProperties(TraceConstantTable table,
-			TraceConstantTableEntry entry, int id, String value)
-			throws TraceCompilerException {
-		if (!SourceUtils.isValidName(value)) {
-			throw new TraceCompilerException(
-					TraceCompilerErrorCode.INVALID_CONSTANT_VALUE);
-		}
-		if (table != null) {
-			// If table exists, the value and ID must be unique
-			TraceConstantTableEntry old = table.findEntryByID(id);
-			if (old != null && old != entry) {
-				throw new TraceCompilerException(
-						TraceCompilerErrorCode.DUPLICATE_CONSTANT_ID);
-			}
-			old = table.findEntryByName(value);
-			if (old != null && old != entry) {
-				throw new TraceCompilerException(
-						TraceCompilerErrorCode.DUPLICATE_CONSTANT_VALUE);
-			}
-		}
-		Iterator<TraceCompilerPlugin> itr = pluginEngine.getPlugins();
-		while (itr.hasNext()) {
-			TraceCompilerPlugin provider = itr.next();
-			if (provider instanceof TraceObjectPropertyVerifier) {
-				((TraceObjectPropertyVerifier) provider)
-						.checkConstantProperties(table, entry, id, value);
-			}
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.model.TraceObjectPropertyVerifier#
-	 *      checkConstantTableProperties(com.nokia.tracecompiler.model.TraceModel,
-	 *      com.nokia.tracecompiler.model.TraceConstantTable, int,
-	 *      java.lang.String)
-	 */
-	public void checkConstantTableProperties(TraceModel model,
-			TraceConstantTable table, int id, String tableName)
-			throws TraceCompilerException {
-		if (!SourceUtils.isValidName(tableName)) {
-			 throw new TraceCompilerException(
-			 TraceCompilerErrorCode.INVALID_CONSTANT_TABLE_NAME, false);
-		}
-		TraceConstantTable old = model.findConstantTableByID(id);
-		if (old != null && old != table) {
-			throw new TraceCompilerException(
-					TraceCompilerErrorCode.DUPLICATE_CONSTANT_TABLE_ID);
-		}
-		old = model.findConstantTableByName(tableName);
-		if (old != null && old != table) {
-			throw new TraceCompilerException(
-					TraceCompilerErrorCode.DUPLICATE_CONSTANT_TABLE_NAME);
-		}
-		Iterator<TraceCompilerPlugin> itr = pluginEngine.getPlugins();
-		while (itr.hasNext()) {
-			TraceCompilerPlugin provider = itr.next();
-			if (provider instanceof TraceObjectPropertyVerifier) {
-				((TraceObjectPropertyVerifier) provider)
-						.checkConstantTableProperties(model, table, id,
-								tableName);
-			}
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.model.TraceObjectPropertyVerifier#
-	 *      checkTraceGroupProperties(com.nokia.tracecompiler.model.TraceModel,
-	 *      com.nokia.tracecompiler.model.TraceGroup, int, java.lang.String)
-	 */
-	public void checkTraceGroupProperties(TraceModel model, TraceGroup group,
-			int id, String name) throws TraceCompilerException {
-		if (!SourceUtils.isValidName(name)) {
-			throw new TraceCompilerException(
-					TraceCompilerErrorCode.INVALID_GROUP_NAME);
-		} else if ((id < 0) || (id > TraceCompilerEngineGlobals.MAX_GROUP_ID)) {
-			RangeErrorParameters params = new RangeErrorParameters();
-			params.start = 0;
-			params.end = TraceCompilerEngineGlobals.MAX_GROUP_ID;
-			params.isHex = true;
-			throw new TraceCompilerException(
-					TraceCompilerErrorCode.INVALID_GROUP_ID, params);
-		} else {
-			TraceGroup old = model.findGroupByID(id);
-			// this condition is to check that user defined group ids are unique.
-			// system defined group ids at present are not required to be unique.
-			if ((old != null) && (old != group) && (id >= GroupNames.USER_GROUP_ID_FIRST  ) && (id <= GroupNames.USER_GROUP_ID_LAST )) {
-				throw new TraceCompilerException(
-						TraceCompilerErrorCode.DUPLICATE_GROUP_ID);
-			}
-			old = model.findGroupByName(name);
-			if (old != null && old != group) {
-				throw new TraceCompilerException(
-						TraceCompilerErrorCode.DUPLICATE_GROUP_NAME);
-			}
-		}
-		Iterator<TraceCompilerPlugin> itr = pluginEngine.getPlugins();
-		while (itr.hasNext()) {
-			TraceCompilerPlugin provider = itr.next();
-			if (provider instanceof TraceObjectPropertyVerifier) {
-				((TraceObjectPropertyVerifier) provider)
-						.checkTraceGroupProperties(model, group, id, name);
-			}
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.model.TraceObjectPropertyVerifier#
-	 *      checkTraceModelProperties(com.nokia.tracecompiler.model.TraceModel,
-	 *      int, java.lang.String, java.lang.String)
-	 */
-	public void checkTraceModelProperties(TraceModel model, int id,
-			String name, String path) throws TraceCompilerException {
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.model.TraceObjectPropertyVerifier#
-	 *      checkTraceParameterProperties(com.nokia.tracecompiler.model.Trace,
-	 *      com.nokia.tracecompiler.model.TraceParameter, int, java.lang.String,
-	 *      java.lang.String)
-	 */
-	public void checkTraceParameterProperties(Trace owner,
-			TraceParameter parameter, int id, String name, String type)
-			throws TraceCompilerException {
-		if (!SourceUtils.isValidParameterName(name)) {
-			throw new TraceCompilerException(
-					TraceCompilerErrorCode.INVALID_PARAMETER_NAME);
-		}
-		TraceParameter old = owner.findParameterByID(id);
-		if (old != null && old != parameter) {
-			throw new TraceCompilerException(
-					TraceCompilerErrorCode.DUPLICATE_PARAMETER_ID);
-		}
-		old = owner.findParameterByName(name);
-		if (old != null && old != parameter) {
-			throw new TraceCompilerException(
-					TraceCompilerErrorCode.DUPLICATE_PARAMETER_NAME);
-		}
-		Iterator<TraceCompilerPlugin> itr = pluginEngine.getPlugins();
-		while (itr.hasNext()) {
-			TraceCompilerPlugin provider = itr.next();
-			if (provider instanceof TraceObjectPropertyVerifier) {
-				((TraceObjectPropertyVerifier) provider)
-						.checkTraceParameterProperties(owner, parameter, id,
-								name, type);
-			}
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.model.TraceObjectPropertyVerifier#
-	 *      checkTraceProperties(com.nokia.tracecompiler.model.TraceGroup,
-	 *      com.nokia.tracecompiler.model.Trace, int, java.lang.String,
-	 *      java.lang.String)
-	 */
-	public void checkTraceProperties(TraceGroup group, Trace trace, int id,
-			String name, String data) throws TraceCompilerException {
-		if (!isValidData(data)) {
-			throw new TraceCompilerException(
-					TraceCompilerErrorCode.INVALID_TRACE_DATA);
-		} else if (!SourceUtils.isValidName(name)) {
-			throw new TraceCompilerException(
-					TraceCompilerErrorCode.INVALID_TRACE_NAME);
-		} else if ((id < 0) || (id > TraceCompilerEngineGlobals.MAX_TRACE_ID)) {
-			RangeErrorParameters params = new RangeErrorParameters();
-			params.start = 0;
-			params.end = TraceCompilerEngineGlobals.MAX_TRACE_ID;
-			params.isHex = true;
-			throw new TraceCompilerException(
-					TraceCompilerErrorCode.INVALID_TRACE_ID, params);
-		} else {
-			// Verifies the trace name is globally unique
-			Trace old = TraceCompilerEngineGlobals.getTraceModel().findTraceByName(
-					name);
-			if (old != trace && old != null) {
-				throw new TraceCompilerException(
-						TraceCompilerErrorCode.DUPLICATE_TRACE_NAME);
-			}
-			if (group != null) {
-				// If group exists, the trace ID and text must be unique within
-				// the group
-				old = group.findTraceByID(id);
-				if (old != trace && old != null) {
-					// Trace ID's must be unique within group
-					throw new TraceCompilerException(
-							TraceCompilerErrorCode.DUPLICATE_TRACE_ID);
-				}
-			}
-		}
-		Iterator<TraceCompilerPlugin> itr = pluginEngine.getPlugins();
-		while (itr.hasNext()) {
-			TraceCompilerPlugin provider = itr.next();
-			if (provider instanceof TraceObjectPropertyVerifier) {
-				((TraceObjectPropertyVerifier) provider).checkTraceProperties(
-						group, trace, id, name, data);
-			}
-		}
-	}
-
-	/**
-	 * Checks the validity of data
-	 * 
-	 * @param data
-	 *            the data
-	 * @return true if valid
-	 */
-	private boolean isValidData(String data) {
-		boolean retval;
-		if (data != null) {
-			retval = true;
-			for (int i = 0; i < data.length() && retval; i++) {
-				char c = data.charAt(i);
-				// Unescaped quotes are not allowed
-				if (c == SourceConstants.QUOTE_CHAR
-						&& (i == 0 || data.charAt(i - 1) != SourceConstants.BACKSLASH_CHAR)) {
-					retval = false;
-				} else {
-					retval = isValidDataChar(c);
-				}
-			}
-		} else {
-			retval = false;
-		}
-		return retval;
-	}
-
-	/**
-	 * Checks data character validity
-	 * 
-	 * @param c
-	 *            character
-	 * @return true if valid
-	 */
-	private boolean isValidDataChar(char c) {
-		// Special and extended characters are not allowed, except TAB
-		return c >= DATA_CHAR_START && c <= DATA_CHAR_END || c == TAB;
-	}
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/plugin/TraceAPIPluginManager.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,52 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Trace API plug-in manager interface
-*
-*/
-package com.nokia.tracecompiler.engine.plugin;
-
-import com.nokia.tracecompiler.model.TraceModelExtension;
-import com.nokia.tracecompiler.plugin.TraceAPIFormatter;
-import com.nokia.tracecompiler.plugin.TraceAPIParser;
-
-/**
- * Trace API plug-in manager interface
- * 
- */
-public interface TraceAPIPluginManager extends TraceModelExtension {
-
-	/**
-	 * Adds the formatter API's from the plug-in
-	 * 
-	 * @param formatters
-	 *            the formatters
-	 */
-	public void addFormatters(TraceAPIFormatter[] formatters);
-
-	/**
-	 * Adds the parser API's from the plug-in
-	 * 
-	 * @param parsers
-	 *            the parsers
-	 */
-	public void addParsers(TraceAPIParser[] parsers);
-
-	/**
-	 * Sets the default API to the model.
-	 */
-	public void createDefaultAPI();
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/plugin/package.html	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-<html><body>
-Plug-in manager and related classes
-</body></html>
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/project/Messages.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,63 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Localization for project package
-*
-*/
-package com.nokia.tracecompiler.engine.project;
-
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-/**
- * Localization for project package
- * 
- */
-class Messages {
-
-	/**
-	 * Bundle name
-	 */
-	private static final String BUNDLE_NAME = "com.nokia.tracecompiler.engine.project.messages"; //$NON-NLS-1$
-
-	/**
-	 * Bundle
-	 */
-	private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
-			.getBundle(BUNDLE_NAME);
-
-	/**
-	 * Prevents construction
-	 */
-	private Messages() {
-	}
-
-	/**
-	 * Gets localized string based on key
-	 * 
-	 * @param key
-	 *            the resource key
-	 * @return the localized resource
-	 */
-	public static String getString(String key) {
-		String value;
-		try {
-			value = RESOURCE_BUNDLE.getString(key);
-		} catch (MissingResourceException e) {
-			value = '!' + key + '!';
-		}
-		return value;
-	}
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/project/ProjectConstants.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,168 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Constant values related to project files
-*
-*/
-package com.nokia.tracecompiler.engine.project;
-
-/**
- * Constant values related to project files
- * 
- */
-public interface ProjectConstants {
-
-	/**
-	 * Title of the cache file
-	 */
-	String FIXED_ID_DEFINITION_FILE_TITLE = Messages
-			.getString("ProjectConstants.FixedIdDefinitionFileTitle"); //$NON-NLS-1$
-
-	/**
-	 * Cache file extension
-	 */
-	String CACHE_FILE_NAME = "tracecompiler.cache"; //$NON-NLS-1$
-
-	/**
-	 * Fixed ID file extension
-	 */
-	String FIXED_ID_DEFINITIONS_FILE_NAME = "fixed_id.definitions"; //$NON-NLS-1$
-
-	/**
-	 * Extension for the file within zip file
-	 */
-	String FILE_EXTENSION = ".xml"; //$NON-NLS-1$
-
-	/**
-	 * Less than escape sequence
-	 */
-	String LT = "&lt;"; //$NON-NLS-1$
-
-	/**
-	 * Greater than escape sequence
-	 */
-	String GT = "&gt;"; //$NON-NLS-1$
-
-	/**
-	 * Indent
-	 */
-	String INDENT = "  "; //$NON-NLS-1$
-
-	/**
-	 * End a tag
-	 */
-	String END_TAG = ">"; //$NON-NLS-1$
-
-	/**
-	 * Start of end tag
-	 */
-	String START_END_TAG = "</"; //$NON-NLS-1$
-
-	/**
-	 * End tag with line feed
-	 */
-	String END_TAG_LF = ">\r\n"; //$NON-NLS-1$
-
-	/**
-	 * Start a tag
-	 */
-	String START_TAG = "<"; //$NON-NLS-1$
-
-	/**
-	 * Extension tag
-	 */
-	String EXTENSION_TAG = "extension"; //$NON-NLS-1$
-
-	/**
-	 * Data tag
-	 */
-	String DATA_TAG = "data"; //$NON-NLS-1$
-
-	/**
-	 * Name tag
-	 */
-	String NAME_TAG = "name"; //$NON-NLS-1$
-
-	/**
-	 * Object ID tag
-	 */
-	String ID_TAG = "id"; //$NON-NLS-1$
-
-	/**
-	 * Constant table entry tag
-	 */
-	String CONSTANT_TABLE_ENTRY_TAG = "entry"; //$NON-NLS-1$
-
-	/**
-	 * Parameter tag
-	 */
-	String PARAMETER_TAG = "parameter"; //$NON-NLS-1$
-
-	/**
-	 * Trace text tag
-	 */
-	String TRACE_TEXT_TAG = "text"; //$NON-NLS-1$
-
-	/**
-	 * Trace tag
-	 */
-	String TRACE_TAG = "trace"; //$NON-NLS-1$
-
-	/**
-	 * Parameter type tag
-	 */
-	String PARAMETER_TYPE_TAG = "type"; //$NON-NLS-1$
-
-	/**
-	 * Constant table tag
-	 */
-	String CONSTANT_TABLE_TAG = "table"; //$NON-NLS-1$
-
-	/**
-	 * Group tag
-	 */
-	String GROUP_TAG = "group"; //$NON-NLS-1$
-
-	/**
-	 * Model tag
-	 */
-	String MODEL_TAG = "model"; //$NON-NLS-1$
-
-	/**
-	 * Location tag
-	 */
-	String LOCATION_TAG = "location"; //$NON-NLS-1$
-
-	/**
-	 * File tag
-	 */
-	String LOCATION_FILE_TAG = "file"; //$NON-NLS-1$
-
-	/**
-	 * Line tag
-	 */
-	String LOCATION_LINE_TAG = "line"; //$NON-NLS-1$
-
-	/**
-	 * Class name tag
-	 */
-	String LOCATION_CLASS_NAME_TAG = "class"; //$NON-NLS-1$
-
-	/**
-	 * Function name tag
-	 */
-	String LOCATION_FUNCTION_NAME_TAG = "function"; //$NON-NLS-1$
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/project/ProjectEngine.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,294 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Trace project file manager
-*
-*/
-package com.nokia.tracecompiler.engine.project;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.util.Enumeration;
-
-import com.nokia.tracecompiler.engine.TraceCompilerEngineBase;
-import com.nokia.tracecompiler.engine.TraceCompilerEngineErrorCodes.TraceCompilerErrorCode;
-import com.nokia.tracecompiler.engine.plugin.TraceAPIPluginManager;
-import com.nokia.tracecompiler.file.FileUtils;
-import com.nokia.tracecompiler.model.TraceCompilerException;
-import com.nokia.tracecompiler.model.TraceModel;
-import com.nokia.tracecompiler.project.GroupNames;
-import com.nokia.tracecompiler.project.ProjectUtils;
-
-/**
- * Trace project engine
- * 
- */
-public final class ProjectEngine extends TraceCompilerEngineBase {
-
-	/**
-	 * Parameters for create project
-	 */
-	private class CreateProjectParameters {
-
-		/**
-		 * Trace project path
-		 */
-		String traceProjectPath;
-
-		/**
-		 * Trace project name
-		 */
-		String traceProjectName;
-
-		/**
-		 * Trace project ID
-		 */
-		int traceProjectID;
-
-	}
-
-	/**
-	 * Default project ID
-	 */
-	private static final int DEFAULT_PROJECT_ID = 0x0; // CodForChk_Dis_Magic
-
-	/**
-	 * Trace model
-	 */
-	private TraceModel model;
-
-	/**
-	 * Trace directory name
-	 */
-	public static String traceFolderName;
-
-	/**
-	 * Constructor
-	 * 
-	 * @param model
-	 *            the trace model
-	 */
-	public ProjectEngine(TraceModel model) {
-		this.model = model;
-	}
-
-	/**
-	 * Opens trace project
-	 * 
-	 * @param projectPath
-	 *            the path to the project to be opened
-	 * @param modelName
-	 *            the name for the model or null to use directory name
-	 * @throws TraceCompilerException
-	 *             if opening fails
-	 */
-	public void openTraceProject(String projectPath, String modelName)
-			throws TraceCompilerException {
-		if (projectPath != null) {
-			CreateProjectParameters parameters = createParameters(projectPath,
-					modelName);
-
-			// Create empty project
-			if (model.getExtension(TraceCompilerProject.class) == null) {
-				createEmptyProjectFile(parameters);
-			}
-		} else {
-			
-			// If fileName is null, there's no open source files. In
-			// that the project cannot be created
-			throw new TraceCompilerException(
-					TraceCompilerErrorCode.SOURCE_NOT_OPEN);
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engine.TraceCompilerEngine#projectOpened()
-	 */
-	@Override
-	public void projectOpened() {
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engine.TraceCompilerEngine#projectClosed()
-	 */
-	@Override
-	public void projectClosed() {
-		model.removeExtensions(TraceCompilerProject.class);
-		model.removeExtensions(TraceIDCache.class);
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engine.TraceCompilerEngine#exportProject()
-	 */
-	@Override
-	public void exportProject() {
-		try {
-
-			// The fixed id definitions file is updated even there are no traces
-			// in case that old fixed id definitions file exist
-			syncFixedIdDefinitionsFile();
-		} catch (TraceCompilerException e) {
-		}
-	}
-
-	/**
-	 * Updated fixed id definitions file
-	 * 
-	 * @throws TraceCompilerException
-	 *             if update fails
-	 */
-	private void syncFixedIdDefinitionsFile() throws TraceCompilerException {
-		TraceIDCache cache = model.getExtension(TraceIDCache.class);
-		// Create trace Id cache if it does not exist
-		if (cache == null) {
-			String path = ProjectUtils.getLocationForFile(model,
-					ProjectEngine.traceFolderName,
-					ProjectConstants.FIXED_ID_DEFINITIONS_FILE_NAME, false);
-			if (path != null) {
-				cache = new TraceIDCache(new File(path).getParent());
-				model.addExtension(cache);
-			}
-		}
-		if (cache != null) {
-			File cacheFile = new File(cache.getAbsolutePath());
-
-			// The fixed id definitions file is updated in case that there are
-			// traces in model
-			if (model.hasTraces()) {
-				// Try to save Ids to fixed Id definition file
-				try {
-					SortedProperties ids = new SortedProperties();
-					// Save Ids from model to fixed Id properties
-					model.saveIDs(ids);
-
-					// If there are some fixed Ids in that are not used anymore,
-					// keep also those Ids in defininiton file, but mark those
-					// ids as obsolete
-					ids = handleObsoleteIds(ids);
-
-					// Rewrites the trace Id cache file
-					OutputStream fos = FileUtils.createOutputStream(cacheFile);
-					ids.store(fos,
-							ProjectConstants.FIXED_ID_DEFINITION_FILE_TITLE);
-					fos.close();
-					cache.postFileWrittenEvent(cache.getAbsolutePath());
-				} catch (IOException e) {
-					cacheFile.delete();
-				}
-			}
-		}
-	}
-
-	/**
-	 * Handle obsolete Ids
-	 * 
-	 * @param ids
-	 *            Ids
-	 */
-	private SortedProperties handleObsoleteIds(SortedProperties ids) {
-		SortedProperties fixedIds = model.getFixedIds();
-		if (fixedIds != null) {
-			Enumeration<Object> fixedIdKeys = fixedIds.keys();
-			while (fixedIdKeys.hasMoreElements()) {
-				String fixedIdKey = (String) fixedIdKeys.nextElement();
-				if (!ids.containsKey(fixedIdKey)) {
-					String value = fixedIds.getProperty(fixedIdKey);
-					boolean markAsObsolete = true;
-					// In case of groups we only mark user defined
-					// groups as obsolete
-					if (fixedIdKey.startsWith(model.GROUP_PROPERTY_PREFIX)) {
-						int valueAsInt = 0;
-						try {
-							valueAsInt = Integer.decode(value).intValue();
-						} catch (NumberFormatException e) {
-							// Corrupted.
-							valueAsInt = 0;
-						}
-						if (valueAsInt < GroupNames.USER_GROUP_ID_FIRST) {
-							markAsObsolete = false;
-						}
-					}
-					if (markAsObsolete) {
-						// If OBSOLETE tag text already exit, do not
-						// add that again
-						if (fixedIdKey
-								.startsWith(model.OBSOLETE_PROPERTY_PREFIX)) {
-							ids.setProperty(fixedIdKey, value);
-						} else {
-							ids.setProperty(model.OBSOLETE_PROPERTY_PREFIX
-									+ fixedIdKey, value);
-						}
-					}
-				}
-			}
-		}
-		return ids;
-	}
-
-	/**
-	 * Creates the parameters for new project
-	 * 
-	 * @param projectPath
-	 *            the project path
-	 * @param projectName
-	 *            the name for the project
-	 * @return the parameters
-	 */
-	private CreateProjectParameters createParameters(String projectPath,
-			String projectName) {
-		CreateProjectParameters queryData = new CreateProjectParameters();
-		queryData.traceProjectPath = projectPath + File.separator
-				+ ProjectEngine.traceFolderName;
-		queryData.traceProjectName = projectName;
-		queryData.traceProjectID = DEFAULT_PROJECT_ID;
-		return queryData;
-	}
-
-	/**
-	 * Creates the project file from query results
-	 * 
-	 * @param queryData
-	 *            the query result
-	 * @throws TraceCompilerException 
-	 */
-	private void createEmptyProjectFile(CreateProjectParameters queryData) throws TraceCompilerException {
-		model.setName(queryData.traceProjectName);
-		model.setID(queryData.traceProjectID);
-		String componentName = model.getName();
-		TraceCompilerProject file = new TraceCompilerProject(
-				queryData.traceProjectPath, componentName);
-		createAPI(file);
-	}
-
-	/**
-	 * Creates the project API
-	 * 
-	 * @param file
-	 *            the project file
-	 */
-	private void createAPI(TraceCompilerProject file) {
-		model.addExtension(file);
-		TraceAPIPluginManager plugin = model
-				.getExtension(TraceAPIPluginManager.class);
-		plugin.createDefaultAPI();
-	}
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/project/SortedProperties.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,198 +0,0 @@
-/*
-* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Sorted properties
-*
-*/
-package com.nokia.tracecompiler.engine.project;
-
-import java.io.BufferedWriter;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-import java.util.Collections;
-import java.util.Enumeration;
-import java.util.Properties;
-import java.util.Vector;
-
-import com.nokia.tracecompiler.engine.TraceCompilerEngineGlobals;
-
-/**
- * Sorted properties
- * 
- */
-public final class SortedProperties extends Properties {
-
-	/**
-	 * UID
-	 */
-	private static final long serialVersionUID = 746540919659257261L;
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see java.util.Hashtable#keys()
-	 */
-	@Override
-	@SuppressWarnings("unchecked")
-	public synchronized Enumeration<Object> keys() {
-		Enumeration<Object> keysEnum = super.keys();
-		Vector keyList = new Vector();
-		while (keysEnum.hasMoreElements()) {
-			keyList.add(keysEnum.nextElement());
-		}
-		Collections.sort(keyList);
-		return keyList.elements();
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see java.util.Properties#store(java.io.OutputStream, java.lang.String)
-	 */
-	@Override
-	public synchronized void store(OutputStream out, String comments)
-			throws IOException {
-		BufferedWriter awriter;
-		awriter = new BufferedWriter(new OutputStreamWriter(out, "8859_1")); //$NON-NLS-1$
-		String licence = TraceCompilerEngineGlobals.getDefaultLicence(false);
-		if (licence != null) {
-			out.write(licence.getBytes());
-		}
-		if (comments != null)
-			writeln(awriter, "#" + comments); //$NON-NLS-1$
-
-		for (Enumeration<Object> e = keys(); e.hasMoreElements();) {
-			String key = (String) e.nextElement();
-			String val = (String) get(key);
-			key = saveConvert(key, true);
-
-			/*
-			 * No need to escape embedded and trailing spaces for value, hence
-			 * pass false to flag.
-			 */
-			val = saveConvert(val, false);
-			writeln(awriter, key + "=" + val); //$NON-NLS-1$
-		}
-		awriter.flush();
-	}
-
-	/**
-	 * Converts unicodes to encoded &#92;uxxxx and escapes special characters
-	 * with a preceding slash
-	 * 
-	 * @param theString
-	 *            the string to be convert
-	 * @param escapeSpace
-	 *            the escape space flag
-	 * @return the coverted string
-	 */
-	private String saveConvert(String theString, boolean escapeSpace) { // CodForChk_Dis_ComplexFunc
-		int len = theString.length();
-		int bufLen = len * 2; // CodForChk_Dis_Magic
-		if (bufLen < 0) {
-			bufLen = Integer.MAX_VALUE;
-		}
-		StringBuffer outBuffer = new StringBuffer(bufLen);
-
-		for (int x = 0; x < len; x++) {
-			char aChar = theString.charAt(x);
-			// Handle common case first, selecting largest block that
-			// avoids the specials below
-			if ((aChar > 61) && (aChar < 127)) { // CodForChk_Dis_Magic
-				if (aChar == '\\') {
-					outBuffer.append('\\');
-					outBuffer.append('\\');
-					continue;
-				}
-				outBuffer.append(aChar);
-				continue;
-			}
-			switch (aChar) {
-			case ' ':
-				if (x == 0 || escapeSpace)
-					outBuffer.append('\\');
-				outBuffer.append(' ');
-				break;
-			case '\t':
-				outBuffer.append('\\');
-				outBuffer.append('t');
-				break;
-			case '\n':
-				outBuffer.append('\\');
-				outBuffer.append('n');
-				break;
-			case '\r':
-				outBuffer.append('\\');
-				outBuffer.append('r');
-				break;
-			case '\f':
-				outBuffer.append('\\');
-				outBuffer.append('f');
-				break;
-			case '=': // Fall through
-			case ':': // Fall through
-			case '#': // Fall through
-			case '!':
-				outBuffer.append('\\');
-				outBuffer.append(aChar);
-				break;
-			default:
-				if ((aChar < 0x0020) || (aChar > 0x007e)) { // CodForChk_Dis_Magic
-					outBuffer.append('\\');
-					outBuffer.append('u');
-					outBuffer.append(toHex((aChar >> 12) & 0xF)); // CodForChk_Dis_Magic
-					outBuffer.append(toHex((aChar >> 8) & 0xF)); // CodForChk_Dis_Magic
-					outBuffer.append(toHex((aChar >> 4) & 0xF)); // CodForChk_Dis_Magic
-					outBuffer.append(toHex(aChar & 0xF)); // CodForChk_Dis_Magic
-				} else {
-					outBuffer.append(aChar);
-				}
-			}
-		}
-		return outBuffer.toString();
-	}
-
-	/**
-	 * Convert a nibble to a hex character
-	 * 
-	 * @param nibble
-	 *            the nibble to convert
-	 * @return the hex character
-	 */
-	private static char toHex(int nibble) {
-		return hexDigit[(nibble & 0xF)]; // CodForChk_Dis_Magic
-	}
-
-	/**
-	 * A table of hex digits
-	 */
-	private static final char[] hexDigit = { '0', '1', '2', '3', '4', '5', '6',
-			'7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' };
-
-	/**
-	 * Write line
-	 * 
-	 * @param bw
-	 *            the buffered writer that used to write
-	 * @param s
-	 *            the string what to write
-	 * @throws IOException
-	 */
-	private static void writeln(BufferedWriter bw, String s) throws IOException {
-		bw.write(s);
-		bw.newLine();
-	}
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/project/TraceCompilerProject.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,77 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* TraceCompiler project file properties
-*
-*/
-package com.nokia.tracecompiler.engine.project;
-
-import com.nokia.tracecompiler.project.TraceProjectFile;
-
-/**
- * TraceCompiler project file properties
- * 
- */
-final class TraceCompilerProject extends TraceProjectFile {
-
-	/**
-	 * Title shown in UI
-	 */
-	private static final String TITLE = Messages
-			.getString("TraceCompilerProject.Title"); //$NON-NLS-1$
-
-	/**
-	 * Constructor
-	 * 
-	 * @param absolutePath
-	 *            the path to the file, including file name
-	 */
-	TraceCompilerProject(String absolutePath) {
-		super(absolutePath, true);
-	}
-
-	/**
-	 * Constructor
-	 * 
-	 * @param path
-	 *            the path to the file
-	 * @param name
-	 *            the file name
-	 */
-	TraceCompilerProject(String path, String name) {
-		super(path, name);
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.project.TraceProjectFile#getFileExtension()
-	 */
-	@Override
-	protected String getFileExtension() {
-		return null;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.project.TraceProjectFile#getTitle()
-	 */
-	@Override
-	public String getTitle() {
-		return TITLE;
-	}
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/project/TraceIDCache.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,65 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Cache file for storing trace and group identifiers
-*
-*/
-package com.nokia.tracecompiler.engine.project;
-
-import com.nokia.tracecompiler.project.TraceProjectFile;
-
-/**
- * Cache file for storing trace and group identifiers
- * 
- */
-public final class TraceIDCache extends TraceProjectFile {
-
-	/**
-	 * Title shown in UI
-	 */
-	private static final String TITLE = Messages
-			.getString("TraceIDCache.Title"); //$NON-NLS-1$
-
-	/**
-	 * Constructor
-	 * 
-	 * @param cachePath
-	 *            path to the cache file
-	 */
-	public TraceIDCache(String cachePath) {
-		super(cachePath, ""); //$NON-NLS-1$
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.project.TraceProjectFile#getFileExtension()
-	 */
-	@Override
-	protected String getFileExtension() {
-		return ProjectConstants.FIXED_ID_DEFINITIONS_FILE_NAME;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.project.TraceProjectFile#getTitle()
-	 */
-	@Override
-	public String getTitle() {
-		return TITLE;
-	}
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/project/messages.properties	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
-ProjectFileParser.SourceFileDoesNotExist=Source file referenced by traces does not exist
-ProjectFileParser.ErrorWhileProcessing=An error occurred while processing the project file
-TraceCompilerProject.Title=Project File
-TraceIDCache.Title=Trace ID Cache File
-ProjectConstants.FixedIdDefinitionFileTitle=Fixed group and trace id definitions. If this file is removed, the identifiers are rebuilt.
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/project/package.html	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-<html><body>
-TraceCompiler project file management
-</body></html>
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/propertyfile/DocumentElementWrapper.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,64 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Extension wrapper for XML document element
-*
-*/
-package com.nokia.tracecompiler.engine.propertyfile;
-
-import org.w3c.dom.Element;
-
-import com.nokia.tracecompiler.model.TraceModelExtension;
-import com.nokia.tracecompiler.model.TraceObject;
-
-/**
- * Extension wrapper for XML document element
- * 
- */
-final class DocumentElementWrapper implements TraceModelExtension {
-
-	/**
-	 * Owner
-	 */
-	private TraceObject owner;
-
-	/**
-	 * Constructor
-	 * 
-	 * @param element
-	 *            the document element
-	 */
-	DocumentElementWrapper(Element element) {
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.model.TraceModelExtension#getOwner()
-	 */
-	public TraceObject getOwner() {
-		return owner;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.model.TraceModelExtension#setOwner(com.nokia.tracecompiler.model.TraceObject)
-	 */
-	public void setOwner(TraceObject owner) {
-		this.owner = owner;
-	}
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/propertyfile/EnumElementParser.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,70 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Parser for enum element
-*
-*/
-package com.nokia.tracecompiler.engine.propertyfile;
-
-import org.w3c.dom.Element;
-
-import com.nokia.tracecompiler.engine.TraceCompilerEngineGlobals;
-import com.nokia.tracecompiler.model.TraceCompilerException;
-import com.nokia.tracecompiler.model.TraceConstantTable;
-import com.nokia.tracecompiler.model.TraceModel;
-import com.nokia.tracecompiler.model.TraceModelExtension;
-
-/**
- * Parser for enum element
- * 
- */
-final class EnumElementParser implements PropertyFileElementParser {
-
-	/**
-	 * Property file parser
-	 */
-	private final PropertyFileParser propertyFileParser;
-
-	/**
-	 * Constructor
-	 * 
-	 * @param propertyFileParser
-	 *            the parser
-	 */
-	EnumElementParser(PropertyFileParser propertyFileParser) {
-		this.propertyFileParser = propertyFileParser;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engine.propertyfile.PropertyFileElementParser#
-	 *      parse(java.lang.Object, org.w3c.dom.Element)
-	 */
-	public void parse(Object owner, Element element)
-			throws TraceCompilerException {
-		TraceModel model = TraceCompilerEngineGlobals.getTraceModel();
-		String name = element
-				.getAttribute(PropertyFileConstants.NAME_ATTRIBUTE);
-		int id = model.getNextConstantTableID();
-		model.getVerifier().checkConstantTableProperties(model, null, id, name);
-		// Document element reference is stored to the model
-		TraceModelExtension[] exts = new TraceModelExtension[] { new DocumentElementWrapper(
-				element) };
-		TraceConstantTable table = model.getFactory().createConstantTable(id,
-				name, exts);
-		propertyFileParser.parseChildren(table, element);
-	}
-}
\ No newline at end of file
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/propertyfile/FileElementParser.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,65 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* FIle element parser
-*
-*/
-package com.nokia.tracecompiler.engine.propertyfile;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-
-import org.w3c.dom.Element;
-
-import com.nokia.tracecompiler.engine.TraceCompilerEngineGlobals;
-import com.nokia.tracecompiler.engine.project.ProjectEngine;
-import com.nokia.tracecompiler.engine.source.SourceEngine;
-import com.nokia.tracecompiler.model.TraceCompilerException;
-
-/**
- * File element parser
- * 
- */
-final class FileElementParser implements PropertyFileElementParser {
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engine.propertyfile.PropertyFileElementParser#
-	 *      parse(java.lang.Object, org.w3c.dom.Element)
-	 */
-	public void parse(Object owner, Element element)
-			throws TraceCompilerException {
-		String filePath = element.getTextContent();
-		SourceEngine sourceEngine = TraceCompilerEngineGlobals.getSourceEngine();
-		ArrayList<String> list = sourceEngine.getNonSourceFiles();
-
-		String projectPath = TraceCompilerEngineGlobals.getProjectPath();
-
-		File file = new File(projectPath + File.separatorChar
-				+ ProjectEngine.traceFolderName + File.separatorChar + filePath);
-
-		try {
-			filePath = file.getCanonicalPath();
-		} catch (IOException e) {
-			e.printStackTrace();
-		}
-
-		if (!list.contains(filePath)) {
-			sourceEngine.addNonSourceFile(filePath);
-		}
-	}
-}
\ No newline at end of file
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/propertyfile/Messages.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,63 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Localization for property file package
-*
-*/
-package com.nokia.tracecompiler.engine.propertyfile;
-
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-/**
- * Localization for property file package
- * 
- */
-class Messages {
-
-	/**
-	 * Bundle name
-	 */
-	private static final String BUNDLE_NAME = "com.nokia.tracecompiler.engine.propertyfile.messages"; //$NON-NLS-1$
-
-	/**
-	 * Bundle
-	 */
-	private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
-			.getBundle(BUNDLE_NAME);
-
-	/**
-	 * Prevents construction
-	 */
-	private Messages() {
-	}
-
-	/**
-	 * Gets localized string based on key
-	 * 
-	 * @param key
-	 *            the resource key
-	 * @return the localized resource
-	 */
-	public static String getString(String key) {
-		String value;
-		try {
-			value = RESOURCE_BUNDLE.getString(key);
-		} catch (MissingResourceException e) {
-			value = '!' + key + '!';
-		}
-		return value;
-	}
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/propertyfile/PropertyFileConstants.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,118 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Constants for property file engine
-*
-*/
-package com.nokia.tracecompiler.engine.propertyfile;
-
-
-/**
- * Constants for property file engine
- * 
- */
-public interface PropertyFileConstants {
-
-	/**
-	 * File name
-	 */
-	String PROPERTY_FILE_NAME = "trace.properties"; //$NON-NLS-1$
-
-	/**
-	 * Number of backup files to keep
-	 */
-	int BACKUP_COUNT = 10; // CodForChk_Dis_Magic
-
-	/**
-	 * Last of the backup headers
-	 */
-	String LAST_BACKUP = "9.properties.bak"; //$NON-NLS-1$
-
-	/**
-	 * Backup extension
-	 */
-	String BACKUP_EXTENSION = ".bak"; //$NON-NLS-1$
-
-	/**
-	 * Root element name
-	 */
-	String ROOT_ELEMENT = "trace_properties"; //$NON-NLS-1$
-
-	/**
-	 * Enum element name
-	 */
-	String ENUM_ELEMENT = "enum"; //$NON-NLS-1$
-
-	/**
-	 * Struct element name
-	 */
-	String STRUCT_ELEMENT = "struct"; //$NON-NLS-1$
-
-	/**
-	 * Component element name
-	 */
-	String COMPONENT_ELEMENT = "component"; //$NON-NLS-1$
-
-	/**
-	 * Component element name
-	 */
-	String GROUP_ELEMENT = "group"; //$NON-NLS-1$
-
-	/**
-	 * Trace element name
-	 */
-	String TRACE_ELEMENT = "trace"; //$NON-NLS-1$
-
-	/**
-	 * Value element name
-	 */
-	String VALUE_ELEMENT = "value"; //$NON-NLS-1$
-
-	/**
-	 * Property element name
-	 */
-	String PROPERTY_ELEMENT = "property"; //$NON-NLS-1$
-
-	/**
-	 * File element name
-	 */
-	String FILE_ELEMENT = "file"; //$NON-NLS-1$
-	
-	/**
-	 * Name attribute
-	 */
-	String NAME_ATTRIBUTE = "name"; //$NON-NLS-1$
-
-	/**
-	 * Format attribute
-	 */
-	String FORMAT_ATTRIBUTE = "format"; //$NON-NLS-1$
-
-	/**
-	 * ID attribute
-	 */
-	String ID_ATTRIBUTE = "id"; //$NON-NLS-1$
-
-	/**
-	 * Type attribute
-	 */
-	String TYPE_ATTRIBUTE = "type"; //$NON-NLS-1$
-
-	/**
-	 * Size attribute
-	 */
-	String SIZE_ATTRIBUTE = "size"; //$NON-NLS-1$
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/propertyfile/PropertyFileElementParser.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Property file element parser interface
-*
-*/
-package com.nokia.tracecompiler.engine.propertyfile;
-
-import org.w3c.dom.Element;
-
-import com.nokia.tracecompiler.model.TraceCompilerException;
-
-/**
- * Property file element parser interface
- * 
- */
-interface PropertyFileElementParser {
-
-	/**
-	 * Parses the given element
-	 * 
-	 * @param owner
-	 *            the owning object
-	 * @param element
-	 *            the element to be parsed
-	 * @throws TraceCompilerException
-	 *             if parser fails
-	 */
-	void parse(Object owner, Element element) throws TraceCompilerException;
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/propertyfile/PropertyFileEngine.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,192 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Property file management engine
-*
-*/
-package com.nokia.tracecompiler.engine.propertyfile;
-
-import java.io.File;
-
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-
-import com.nokia.tracecompiler.engine.TraceCompilerEngineBase;
-import com.nokia.tracecompiler.engine.TraceCompilerEngineGlobals;
-import com.nokia.tracecompiler.engine.project.ProjectEngine;
-import com.nokia.tracecompiler.file.FileUtils;
-import com.nokia.tracecompiler.model.TraceCompilerException;
-import com.nokia.tracecompiler.model.TraceModel;
-import com.nokia.tracecompiler.project.ProjectUtils;
-import com.nokia.tracecompiler.source.SourceConstants;
-
-/**
- * Property file management engine
- * 
- */
-public final class PropertyFileEngine extends TraceCompilerEngineBase {
-
-	/**
-	 * Trace model
-	 */
-	private TraceModel model;
-
-	/**
-	 * Constructor
-	 * 
-	 * @param model
-	 *            the trace model
-	 */
-	public PropertyFileEngine(TraceModel model) {
-		this.model = model;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engine.TraceCompilerEngine#projectOpened()
-	 */
-	@Override
-	public void projectOpened() throws TraceCompilerException {
-		TracePropertyFile propertyFile = model
-				.getExtension(TracePropertyFile.class);
-		if (propertyFile == null) {
-			String fileName = null;
-			try {
-				fileName = ProjectUtils.getLocationForFile(model,
-						ProjectEngine.traceFolderName,
-						PropertyFileConstants.PROPERTY_FILE_NAME, false);
-			} catch (TraceCompilerException e) {
-				// Model should always be open when traceProjectOpened is
-				// called
-			}
-			if (fileName != null) {
-				propertyFile = parsePropertyFile(fileName);
-			}
-		}
-		if (propertyFile == null) {
-			String msg = Messages
-					.getString("PropertyFileEngine.FailedToAttachFile"); //$NON-NLS-1$
-			TraceCompilerEngineGlobals.getEvents().postErrorMessage(msg, null, true);
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engine.TraceCompilerEngine#projectClosing()
-	 */
-	@Override
-	public void projectClosed() {
-		model.removeExtensions(TracePropertyFile.class);
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engine.TraceCompilerEngine#exportProject()
-	 */
-	@Override
-	public void exportProject() {
-	}
-
-	/**
-	 * Parses the property file
-	 * 
-	 * @param fileName
-	 *            the file path
-	 * @return the property file
-	 */
-	private TracePropertyFile parsePropertyFile(String fileName) {
-		DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
-		factory.setValidating(false);
-		DocumentBuilder builder;
-		TracePropertyFile propertyFile = null;
-		try {
-			builder = factory.newDocumentBuilder();
-			File file = new File(fileName);
-			if (file.exists()) {
-				try {
-					PropertyFileParser parser = new PropertyFileParser(model,
-							fileName, builder);
-					parser.parse();
-					propertyFile = new TracePropertyFile(file.getParent(),
-							parser.getDocument());
-				} catch (TraceCompilerException e) {
-					// Problem parsing document -> Backup and create new
-					TraceCompilerEngineGlobals.getEvents().postError(e);
-					createBackup(fileName);
-				}
-			}
-			if (propertyFile == null) {
-				propertyFile = new TracePropertyFile(file.getParent(), builder
-						.newDocument());
-			}
-			model.addExtension(propertyFile);
-		} catch (ParserConfigurationException e) {
-		}
-		return propertyFile;
-	}
-
-	/**
-	 * Creates a backup of the property file
-	 * 
-	 * @param path
-	 *            the file to be backed up
-	 */
-	private void createBackup(String path) {
-		boolean backup = false;
-		File file = new File(path);
-		if (file.exists()) {
-			boolean allexist = true;
-			// Checks the existing backup files and renames the old file to
-			// largest available number starting from 0
-			File f = null;
-			for (int i = 0; i < PropertyFileConstants.BACKUP_COUNT && allexist; i++) {
-				f = new File(path + i + PropertyFileConstants.BACKUP_EXTENSION);
-				if (!f.exists()) {
-					backup = FileUtils.copyFile(file, f);
-					allexist = false;
-				}
-			}
-			if (allexist) {
-				// If all backups from 0 to 9 exist, the old ones are moved
-				// back 1 step. The new file is renamed to *9.h
-				for (int i = 0; i < PropertyFileConstants.BACKUP_COUNT; i++) {
-					f = new File(path + i
-							+ PropertyFileConstants.BACKUP_EXTENSION);
-					if (i == 0) {
-						f.delete();
-					} else {
-						f.renameTo(new File(path + (i - 1)
-								+ PropertyFileConstants.BACKUP_EXTENSION));
-					}
-				}
-				f = new File(path + PropertyFileConstants.LAST_BACKUP);
-				backup = FileUtils.copyFile(file, f);
-			}
-			if (f != null && backup) {
-				String msg = Messages
-						.getString("PropertyFileEngine.PropertyFileBackUpPrefix") //$NON-NLS-1$
-						+ FileUtils.convertSeparators(
-								SourceConstants.FORWARD_SLASH_CHAR, f
-										.getAbsolutePath(), false);
-				TraceCompilerEngineGlobals.getEvents().postInfoMessage(msg, null);
-			}
-		}
-	}
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/propertyfile/PropertyFileParser.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,183 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Parser for trace property files
-*
-*/
-package com.nokia.tracecompiler.engine.propertyfile;
-
-import java.util.HashMap;
-
-import javax.xml.parsers.DocumentBuilder;
-
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-import com.nokia.tracecompiler.engine.TraceCompilerEngineErrorMessages;
-import com.nokia.tracecompiler.engine.TraceCompilerEngineGlobals;
-import com.nokia.tracecompiler.engine.TraceCompilerEngineErrorCodes.StringErrorParameters;
-import com.nokia.tracecompiler.engine.TraceCompilerEngineErrorCodes.TraceCompilerErrorCode;
-import com.nokia.tracecompiler.model.TraceCompilerException;
-import com.nokia.tracecompiler.model.TraceModel;
-import com.nokia.tracecompiler.project.ProjectFileParser;
-
-/**
- * Parser for trace property files
- * 
- */
-final class PropertyFileParser extends ProjectFileParser {
-
-	/**
-	 * DOM document representing the property file
-	 */
-	private Document document;
-
-	/**
-	 * Parsers for document elements
-	 */
-	private HashMap<String, PropertyFileElementParser> elementParsers = new HashMap<String, PropertyFileElementParser>();
-
-	/**
-	 * Document builder
-	 */
-	private DocumentBuilder builder;
-
-	/**
-	 * Constructor
-	 * 
-	 * @param model
-	 *            the trace model
-	 * @param fileName
-	 *            the property file name
-	 * @param builder
-	 *            document builder
-	 * @throws TraceCompilerException
-	 *             if parser cannot be created
-	 */
-	protected PropertyFileParser(TraceModel model, String fileName,
-			DocumentBuilder builder) throws TraceCompilerException {
-		super(model, fileName);
-		this.builder = builder;
-		elementParsers.put(PropertyFileConstants.ENUM_ELEMENT,
-				new EnumElementParser(this));
-		elementParsers.put(PropertyFileConstants.VALUE_ELEMENT,
-				new ValueElementParser());
-		elementParsers.put(PropertyFileConstants.FILE_ELEMENT,
-				new FileElementParser());
-
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.project.ProjectFileParser#createParser()
-	 */
-	@Override
-	protected void createParser() throws TraceCompilerException {
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.project.ProjectFileParser#parse()
-	 */
-	@Override
-	public void parse() throws TraceCompilerException {
-		try {
-			document = builder.parse(projectFile);
-			Element rootElement = PropertyFileUtils.findRoot(document);
-			if (rootElement != null) {
-				parseChildren(model, rootElement);
-			} else {
-				throw new TraceCompilerException(
-						TraceCompilerErrorCode.INVALID_PROJECT_FILE);
-			}
-		} catch (TraceCompilerException e) {
-			throw e;
-		} catch (Exception e) {
-			throw new TraceCompilerException(
-					TraceCompilerErrorCode.INVALID_PROJECT_FILE, e);
-		}
-	}
-
-	/**
-	 * Parses child elements of given element
-	 * 
-	 * @param owner
-	 *            the owning object
-	 * @param element
-	 *            the element
-	 */
-	void parseChildren(Object owner, Element element) {
-		NodeList list;
-		list = element.getChildNodes();
-		for (int i = 0; i < list.getLength(); i++) {
-			Node node = list.item(i);
-			if (node.getNodeType() == Node.ELEMENT_NODE) {
-				parseElement(owner, (Element) node);
-			}
-		}
-	}
-
-	/**
-	 * Parses an element
-	 * 
-	 * @param owner
-	 *            the owning trace object
-	 * @param element
-	 *            the element to be parsed
-	 */
-	private void parseElement(Object owner, Element element) {
-		String name = element.getNodeName();
-		PropertyFileElementParser parser = elementParsers.get(name);
-		if (parser != null) {
-			try {
-				parser.parse(owner, element);
-			} catch (TraceCompilerException e) {
-				String msg = TraceCompilerEngineErrorMessages.getErrorMessage(e);
-				TraceCompilerEngineGlobals.getEvents().postWarningMessage(msg,
-						e.getErrorSource());
-			}
-		} else {
-			postElementNotSupportedWarning(name);
-		}
-	}
-
-	/**
-	 * Posts element not supported warning
-	 * 
-	 * @param name
-	 *            the element name
-	 */
-	private void postElementNotSupportedWarning(String name) {
-		StringErrorParameters parameter = new StringErrorParameters();
-		parameter.string = name;
-		String msg = TraceCompilerEngineErrorMessages.getErrorMessage(
-				TraceCompilerErrorCode.PROPERTY_FILE_ELEMENT_NOT_SUPPORTED,
-				parameter);
-		TraceCompilerEngineGlobals.getEvents().postWarningMessage(msg, null);
-	}
-
-	/**
-	 * Gets the document representing the property file
-	 * 
-	 * @return the document
-	 */
-	Document getDocument() {
-		return document;
-	}
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/propertyfile/PropertyFileUtils.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,54 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Utility functions for property file
-*
-*/
-package com.nokia.tracecompiler.engine.propertyfile;
-
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-/**
- * Utility functions for property file
- * 
- */
-final class PropertyFileUtils {
-
-	/**
-	 * Finds the root element from property file document
-	 * 
-	 * @param document
-	 *            the document
-	 * @return the root element
-	 */
-	static Element findRoot(Document document) {
-		NodeList list = document.getChildNodes();
-		Element rootElement = null;
-		for (int i = 0; i < list.getLength(); i++) {
-			Node root = list.item(i);
-			if (root.getNodeType() == Node.ELEMENT_NODE) {
-				if (root.getNodeName().equalsIgnoreCase(
-						PropertyFileConstants.ROOT_ELEMENT)) {
-					rootElement = (Element) root;
-				}
-			}
-		}
-		return rootElement;
-	}
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/propertyfile/TracePropertyFile.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,68 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Trace property file properties
-*
-*/
-package com.nokia.tracecompiler.engine.propertyfile;
-
-import org.w3c.dom.Document;
-
-import com.nokia.tracecompiler.project.TraceProjectFile;
-
-/**
- * Trace property file properties
- * 
- */
-final class TracePropertyFile extends TraceProjectFile {
-
-	/**
-	 * Title shown in UI
-	 */
-	private static final String PROPERTY_FILE = Messages
-			.getString("TracePropertyFile.Title"); //$NON-NLS-1$
-
-	/**
-	 * Creates a new property file
-	 * 
-	 * @param filePath
-	 *            path to the file
-	 * @param document
-	 *            the document representing the property file
-	 */
-	TracePropertyFile(String filePath, Document document) {
-		super(filePath, ""); //$NON-NLS-1$
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.project.TraceProjectFile#getFileExtension()
-	 */
-	@Override
-	protected String getFileExtension() {
-		return PropertyFileConstants.PROPERTY_FILE_NAME;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.project.TraceProjectFile#getTitle()
-	 */
-	@Override
-	public String getTitle() {
-		return PROPERTY_FILE;
-	}
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/propertyfile/ValueElementParser.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,89 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Value element parser
-*
-*/
-package com.nokia.tracecompiler.engine.propertyfile;
-
-import org.w3c.dom.Element;
-
-import com.nokia.tracecompiler.engine.TraceCompilerEngineErrorCodes.StringErrorParameters;
-import com.nokia.tracecompiler.engine.TraceCompilerEngineErrorCodes.TraceCompilerErrorCode;
-import com.nokia.tracecompiler.model.TraceCompilerException;
-import com.nokia.tracecompiler.model.TraceConstantTable;
-import com.nokia.tracecompiler.model.TraceModelExtension;
-
-/**
- * Value element parser
- * 
- */
-final class ValueElementParser implements PropertyFileElementParser {
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engine.propertyfile.PropertyFileElementParser#
-	 *      parse(java.lang.Object, org.w3c.dom.Element)
-	 */
-	public void parse(Object owner, Element element)
-			throws TraceCompilerException {
-		// Value element must be parsed within context of TraceConstantTable
-		// Struct has not yet been implemented
-		if (owner instanceof TraceConstantTable) {
-			parseConstantTableEntry((TraceConstantTable) owner, element);
-		} else {
-			StringErrorParameters parameter = new StringErrorParameters();
-			parameter.string = PropertyFileConstants.VALUE_ELEMENT;
-			throw new TraceCompilerException(
-					TraceCompilerErrorCode.PROPERTY_FILE_ELEMENT_MISPLACED,
-					parameter, null);
-		}
-	}
-
-	/**
-	 * Parses a constant table entry
-	 * 
-	 * @param table
-	 *            the constant table
-	 * @param element
-	 *            the table entry
-	 * @throws TraceCompilerException
-	 *             if entry is not valid
-	 */
-	private void parseConstantTableEntry(TraceConstantTable table,
-			Element element) throws TraceCompilerException {
-		String idstr = element.getAttribute(PropertyFileConstants.ID_ATTRIBUTE);
-		if (idstr != null) {
-			try {
-				int id = Integer.parseInt(idstr);
-				String value = element.getTextContent();
-				table.getModel().getVerifier().checkConstantProperties(table,
-						null, id, value);
-				// Document element reference is stored to the model
-				TraceModelExtension[] exts = new TraceModelExtension[] { new DocumentElementWrapper(
-						element) };
-				table.getModel().getFactory().createConstantTableEntry(table,
-						id, value, exts);
-			} catch (NumberFormatException e) {
-				StringErrorParameters parameter = new StringErrorParameters();
-				parameter.string = PropertyFileConstants.ID_ATTRIBUTE;
-				throw new TraceCompilerException(
-						TraceCompilerErrorCode.PROPERTY_FILE_ATTRIBUTE_INVALID,
-						parameter, null);
-			}
-		}
-	}
-}
\ No newline at end of file
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/propertyfile/messages.properties	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
-TracePropertyFile.Title=Property File
-PropertyFileEngine.FailedToAttachFile=Failed to attach property file to project
-PropertyFileEngine.PropertyFileBackUpPrefix=Property file back-up created to 
-TraceObjectPropertyList.Title=Properties
-TraceObjectPropertyImpl.NameValueSeparator=: 
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/ArrayParameterRuleImpl.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,63 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Rule which defines a parameter as array type
-*
-*/
-package com.nokia.tracecompiler.engine.rules;
-
-import com.nokia.tracecompiler.model.TraceModelPersistentExtension;
-import com.nokia.tracecompiler.rules.ArrayParameterRule;
-
-/**
- * Rule which defines a parameter as array type
- * 
- */
-final class ArrayParameterRuleImpl extends RuleBase implements
-		ArrayParameterRule, TraceModelPersistentExtension {
-
-	/**
-	 * Storage name for array parameter
-	 */
-	static final String STORAGE_NAME = "Array"; //$NON-NLS-1$
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.model.TraceModelPersistentExtension#getData()
-	 */
-	public String getData() {
-		return ""; //$NON-NLS-1$
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.model.TraceModelPersistentExtension#getStorageName()
-	 */
-	public String getStorageName() {
-		return STORAGE_NAME;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.model.TraceModelPersistentExtension#
-	 *      setData(java.lang.String)
-	 */
-	public boolean setData(String data) {
-		return true;
-	}
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/AutoAddFunctionParametersRule.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,298 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Trace rule for automatically adding function parameters to a trace
-*
-*/
-package com.nokia.tracecompiler.engine.rules;
-
-import java.util.ArrayList;
-
-import com.nokia.tracecompiler.engine.TraceCompilerEngineErrorMessages;
-import com.nokia.tracecompiler.engine.TraceCompilerEngineGlobals;
-import com.nokia.tracecompiler.engine.TraceCompilerEngineErrorCodes.StringErrorParameters;
-import com.nokia.tracecompiler.engine.TraceCompilerEngineErrorCodes.TraceCompilerErrorCode;
-import com.nokia.tracecompiler.engine.header.ComplexHeaderRule;
-import com.nokia.tracecompiler.engine.source.TraceParameterFormattingRule;
-import com.nokia.tracecompiler.model.Trace;
-import com.nokia.tracecompiler.model.TraceCompilerException;
-import com.nokia.tracecompiler.model.TraceConstantTable;
-import com.nokia.tracecompiler.model.TraceObjectRuleCreateObject;
-import com.nokia.tracecompiler.model.TraceObjectRuleRemoveOnCreate;
-import com.nokia.tracecompiler.model.TraceParameter;
-import com.nokia.tracecompiler.source.SourceConstants;
-import com.nokia.tracecompiler.source.SourceContext;
-import com.nokia.tracecompiler.source.SourceParameter;
-import com.nokia.tracecompiler.source.SourceParserException;
-import com.nokia.tracecompiler.source.SourceUtils;
-import com.nokia.tracecompiler.source.TypeMapping;
-
-/**
- * Trace rule for automatically adding function parameters to a trace
- * 
- */
-public final class AutoAddFunctionParametersRule extends RuleBase implements
-		TraceObjectRuleCreateObject, TraceObjectRuleRemoveOnCreate {
-
-	/**
-	 * Warning about value-to-pointer conversion
-	 */
-	private static final String VALUE_TO_POINTER_WARNING = Messages
-			.getString("AutoAddFunctionParametersRule.UnrecognizedTypeWarning"); //$NON-NLS-1$
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see
-	 * com.nokia.tracecompiler.model.TraceObjectRuleCreateObject#createObject()
-	 */
-	public void createObject() throws TraceCompilerException {
-		SourceContext context = TraceCompilerEngineGlobals.getSourceContextManager()
-				.getContext();
-		Trace trace = (Trace) getOwner();
-		if (context != null) {
-			boolean valid = false;
-			ArrayList<SourceParameter> list = tokenizeParameters(context);
-
-			trace.getModel().startProcessing();
-			try {
-				createParameters(trace, list);
-			} finally {
-				trace.getModel().processingComplete();
-			}
-			// At least one parameter must be parsed from source except for function entry extension
-			valid = trace.getParameterCount() > 0 || trace.getExtension(EntryTraceRule.class) != null;
-
-			if (!valid) {
-				String msg = TraceCompilerEngineErrorMessages.getErrorMessage(
-						TraceCompilerErrorCode.CANNOT_PARSE_FUNCTION_PARAMETERS,
-						null);
-				TraceCompilerEngineGlobals.getEvents().postWarningMessage(msg, trace);
-				// Removes the complex rule -> Function is not generated and
-				// source does not compile
-				trace.removeExtensions(ComplexHeaderRule.class);
-			}
-		} else {
-			String msg = TraceCompilerEngineErrorMessages.getErrorMessage(
-					TraceCompilerErrorCode.NO_CONTEXT_FOR_LOCATION, null);
-			TraceCompilerEngineGlobals.getEvents().postErrorMessage(msg, null, true);
-			// Removes the complex rule -> Function is not generated and
-			// source does not compile
-			trace.removeExtensions(ComplexHeaderRule.class);
-		}
-	}
-
-	/**
-	 * Creates the parameters to the trace
-	 * 
-	 * @param owner
-	 *            the trace
-	 * @param list
-	 *            the parameter list parsed from source
-	 * @throws TraceCompilerException 
-	 */
-	private void createParameters(Trace owner, ArrayList<SourceParameter> list) throws TraceCompilerException {
-
-		// If any of the parameters is "...", clear the whole parameter list
-		for (SourceParameter param : list) {
-			String type = param.getType();
-			if (type != null
-					&& type.equals(SourceConstants.VARIABLE_ARG_LIST_INDICATOR)) {
-				list.clear();
-				
-				
-				String msg = TraceCompilerEngineErrorMessages.getErrorMessage(
-						TraceCompilerErrorCode.VAR_ARG_LIST_PARAMETER_FOUND,
-						null);
-				TraceCompilerEngineGlobals.getEvents().postWarningMessage(msg, owner);
-				break;
-			}
-		}
-
-		StringBuilder str = new StringBuilder();
-		for (SourceParameter param : list) {
-			TraceParameter parameter = createParameter(owner, param);
-			if (parameter != null) {
-				str.append(SourceConstants.PARAMETER_SEPARATOR);
-				TraceParameterFormattingRule rule = parameter
-						.getExtension(TraceParameterFormattingRule.class);
-				if (rule != null) {
-					str.append(rule.mapNameToSource(param.getName()));
-				} else {
-					str.append(param.getName());
-				}
-			}
-			// The location will be referenced by event handlers if
-			// they need it. Otherwise it will be removed from the
-			// source
-			param.getSourceLocation().dereference();
-		}
-		// The header extension is stored in case of complex function entry
-		// trace
-		EntryTraceRule entryRule = owner.getExtension(EntryTraceRule.class);
-		ComplexHeaderRuleImpl complex = owner
-				.getExtension(ComplexHeaderRuleImpl.class);
-		if (entryRule != null && complex != null) {
-			complex.setTraceIDDefineExtension(str.toString());
-		}
-	}
-
-	/**
-	 * Processes the parameters of given source context
-	 * 
-	 * @param context
-	 *            the context
-	 * @return list of parameters
-	 * @throws TraceCompilerException 
-	 */
-	private ArrayList<SourceParameter> tokenizeParameters(SourceContext context) throws TraceCompilerException {
-		ArrayList<SourceParameter> list = new ArrayList<SourceParameter>();
-		try {
-			context.parseParameters(list);
-		} catch (SourceParserException e) {
-			TraceCompilerException exception = new TraceCompilerException(
-					TraceCompilerErrorCode.UNEXPECTED_EXCEPTION, e);
-			TraceCompilerEngineGlobals.getEvents().postError(
-					exception);
-			list = null;
-		}
-		return list;
-	}
-
-	/**
-	 * Creates a TraceParameter based on parameter parsed from source
-	 * 
-	 * @param owner
-	 *            the owning trace object
-	 * @param param
-	 *            the parameter found from source
-	 * @return the parameter
-	 */
-	private TraceParameter createParameter(Trace owner, SourceParameter param) {
-		TraceConstantTable foundTable = RuleUtils.findConstantTableByType(owner
-				.getModel(), param);
-		TraceParameter parameter = null;
-		if (foundTable == null) {
-			TypeMapping type = SourceUtils.mapSymbianTypeToParameterType(param);
-			if (type != null) {
-				if (!type.isVoid()) {
-					parameter = createParameter(owner, param, type);
-				}
-			} else {
-				StringErrorParameters params = new StringErrorParameters();
-				params.string = param.getType();
-				TraceCompilerException exception = new TraceCompilerException(
-						TraceCompilerErrorCode.INVALID_PARAMETER_TYPE,
-						params, param.getSourceLocation());
-				TraceCompilerEngineGlobals.getEvents().postError(
-						exception);
-			}
-		} else {
-			parameter = createParameter(owner, param, foundTable);
-		}
-		return parameter;
-	}
-
-	/**
-	 * Processes a non-void parameter type that was not associated with a
-	 * constant table
-	 * 
-	 * @param owner
-	 *            the owner for the parameter
-	 * @param param
-	 *            the parameter found from source
-	 * @param type
-	 *            the parameter type as parsed by source package
-	 * @return the parameter
-	 */
-	private TraceParameter createParameter(Trace owner, SourceParameter param,
-			TypeMapping type) {
-		String name = param.getName();
-		TraceParameter retval = null;
-		if (name == null || name.length() == 0) {
-			String s = TraceCompilerEngineErrorMessages.getErrorMessage(
-					TraceCompilerErrorCode.EMPTY_PARAMETER_NAME, null);
-			TraceCompilerEngineGlobals.getEvents().postWarningMessage(s,
-					param.getSourceLocation());
-		} else {
-			try {
-				retval = RuleUtils.createParameterFromType(owner, name, type);
-				if (retval != null && type.valueToPointer) {
-					// Posts a warning about value-to-pointer conversion
-					TraceCompilerEngineGlobals.getEvents()
-							.postWarningMessage(VALUE_TO_POINTER_WARNING,
-									param.getSourceLocation());
-				}
-			} catch (TraceCompilerException e) {
-				// Changes the source of the error to the location that failed
-				TraceCompilerException exception = new TraceCompilerException(e.getErrorCode(), e
-						.getErrorParameters(), param
-						.getSourceLocation());
-				TraceCompilerEngineGlobals.getEvents().postError(
-						exception);
-			}
-		}
-		return retval;
-	}
-
-	/**
-	 * Processes a non-void parameter type that was associated with a constant
-	 * table
-	 * 
-	 * @param owner
-	 *            the owner for the parameter
-	 * @param param
-	 *            the parameter found from source
-	 * @param table
-	 *            the constant table the parameter was associated to
-	 * @return the parameter
-	 */
-	private TraceParameter createParameter(Trace owner, SourceParameter param,
-			TraceConstantTable table) {
-		String name = param.getName();
-		TraceParameter retval = null;
-		if (name == null || name.length() == 0) {
-			String s = TraceCompilerEngineErrorMessages.getErrorMessage(
-					TraceCompilerErrorCode.EMPTY_PARAMETER_NAME, null);
-			TraceCompilerEngineGlobals.getEvents().postWarningMessage(s,
-					param.getSourceLocation());
-		} else {
-			try {
-				retval = RuleUtils.createParameterFromConstantTable(owner,
-						name, table);
-			} catch (TraceCompilerException e) {
-				// Changes the source of the error to the location that failed
-				TraceCompilerException exception = new TraceCompilerException(e.getErrorCode(), e
-						.getErrorParameters(), param
-						.getSourceLocation());
-				TraceCompilerEngineGlobals.getEvents().postError(
-						exception);
-			}
-		}
-		return retval;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see
-	 * com.nokia.tracecompiler.model.TraceObjectRuleRemoveOnCreate#canBeRemoved()
-	 */
-	public boolean canBeRemoved() {
-		// This is not copied to exit trace -> Can be removed
-		return true;
-	}
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/AutoAddParameterRuleBase.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,97 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Base class for the auto-add parameter rules
-*
-*/
-package com.nokia.tracecompiler.engine.rules;
-
-import com.nokia.tracecompiler.engine.TraceCompilerEngineGlobals;
-import com.nokia.tracecompiler.engine.utils.TraceMultiplierRule;
-import com.nokia.tracecompiler.model.Trace;
-import com.nokia.tracecompiler.model.TraceCompilerException;
-import com.nokia.tracecompiler.model.TraceModelExtension;
-import com.nokia.tracecompiler.model.TraceObjectRule;
-import com.nokia.tracecompiler.model.TraceObjectRuleCreateObject;
-import com.nokia.tracecompiler.model.TraceObjectRuleRemoveOnCreate;
-import com.nokia.tracecompiler.model.TraceObjectUtils;
-
-/**
- * Base class for the auto-add parameter rules
- * 
- */
-abstract class AutoAddParameterRuleBase extends RuleBase implements
-		TraceObjectRuleCreateObject, TraceObjectRuleRemoveOnCreate {
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.model.TraceObjectRuleCreateObject#createObject()
-	 */
-	public void createObject() throws TraceCompilerException {
-		TraceObjectRule rule = getRule();
-		TraceModelExtension[] extensions = null;
-		if (rule != null) {
-			extensions = new TraceModelExtension[] { rule };
-		}
-		Trace owner = (Trace) getOwner();
-		int id = owner.getNextParameterID();
-		String name = TraceObjectUtils.modifyDuplicateParameterName(owner,
-				getName()).getData();
-		String type = getType();
-		try {
-			owner.getModel().getVerifier().checkTraceParameterProperties(owner,
-					null, id, name, type);
-			owner.getModel().getFactory().createTraceParameter(owner, id, name,
-					type, extensions);
-		} catch (TraceCompilerException e) {
-			TraceCompilerEngineGlobals.getEvents().postError(e);
-				throw e;
-		}
-	}
-
-	/**
-	 * Gets the name for the new parameter
-	 * 
-	 * @return the parameter name
-	 */
-	protected abstract String getName();
-
-	/**
-	 * Gets the new parameter type
-	 * 
-	 * @return the type
-	 */
-	protected abstract String getType();
-
-	/**
-	 * Gets the rule for the parameter
-	 * 
-	 * @return the rule
-	 */
-	protected abstract TraceObjectRule getRule();
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.model.TraceObjectRuleRemoveOnCreate#canBeRemoved()
-	 */
-	public boolean canBeRemoved() {
-		// If the owner has a multiplier, this needs to be moved to it using the
-		// CopyAndRemoveExtensionRule
-		return getOwner().getExtension(TraceMultiplierRule.class) == null;
-	}
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/AutoAddReturnParameterRule.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,188 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Trace rule for automatically adding function return value to exit trace
-*
-*/
-package com.nokia.tracecompiler.engine.rules;
-
-import java.util.ArrayList;
-
-import com.nokia.tracecompiler.engine.TraceCompilerEngineErrorMessages;
-import com.nokia.tracecompiler.engine.TraceCompilerEngineGlobals;
-import com.nokia.tracecompiler.engine.TraceCompilerEngineErrorCodes.TraceCompilerErrorCode;
-import com.nokia.tracecompiler.engine.utils.TraceMultiplierRule;
-import com.nokia.tracecompiler.model.Trace;
-import com.nokia.tracecompiler.model.TraceCompilerException;
-import com.nokia.tracecompiler.model.TraceConstantTable;
-import com.nokia.tracecompiler.model.TraceObjectRuleCreateObject;
-import com.nokia.tracecompiler.model.TraceObjectRuleRemoveOnCreate;
-import com.nokia.tracecompiler.model.TraceParameter;
-import com.nokia.tracecompiler.source.SourceContext;
-import com.nokia.tracecompiler.source.SourceParserException;
-import com.nokia.tracecompiler.source.SourceReturn;
-import com.nokia.tracecompiler.source.SourceUtils;
-import com.nokia.tracecompiler.source.TypeMapping;
-
-/**
- * Trace rule for automatically adding function return value to exit trace
- * 
- */
-public final class AutoAddReturnParameterRule extends RuleBase implements
-		TraceObjectRuleCreateObject, TraceObjectRuleRemoveOnCreate {
-
-	/**
-	 * Parameter name
-	 */
-	static final String PARAMETER_NAME = "retval"; //$NON-NLS-1$
-
-	/**
-	 * The number of handled return statements
-	 */
-	private static int numberOfHandledReturnStatements = 0;
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.model.TraceObjectRuleCreateObject#
-	 *      createObject(com.nokia.tracecompiler.model.TraceObject)
-	 */
-	public void createObject() throws TraceCompilerException {
-		// If owner has a multiplier (entry trace), the trace is not added to it
-		Trace owner = (Trace) getOwner();
-		if (owner.getExtension(TraceMultiplierRule.class) == null) {
-			SourceContext context = TraceCompilerEngineGlobals
-					.getSourceContextManager().getContext();
-			if (!context.isVoid()) {
-				TraceConstantTable table = RuleUtils.findConstantTableByType(
-						owner.getModel(), context);
-				if (table != null) {
-					createParameter(owner, table);
-				} else {
-					createParameter(owner, context);
-				}
-			}
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.model.TraceObjectRuleRemoveOnCreate#canBeRemoved()
-	 */
-	public boolean canBeRemoved() {
-		// If the owner has a multiplier, this needs to be moved to it using the
-		// CopyAndRemoveExtensionRule
-		return getOwner().getExtension(TraceMultiplierRule.class) == null;
-	}
-
-	/**
-	 * Creates a return parameter that was not associated with a constant table
-	 * 
-	 * @param owner
-	 *            the owner for the parameter
-	 * @param context
-	 *            the context specifying the parameter type 
-	 */
-	private void createParameter(Trace owner, SourceContext context) {
-		TypeMapping type = SourceUtils.mapSymbianTypeToParameterType(context);
-		String return_value_name = PARAMETER_NAME;
-		ArrayList<SourceReturn> returnList = new ArrayList<SourceReturn>();
-
-		// Find out return value name
-		try {
-			context.parseReturnValues(returnList);
-			if (numberOfHandledReturnStatements <= (returnList.size() - 1)) {
-				return_value_name = returnList.get(
-						numberOfHandledReturnStatements).getReturnStatement();
-			}
-
-			numberOfHandledReturnStatements++;
-		} catch (SourceParserException e) {
-			String msg = Messages
-					.getString("RuleUtils.FailedToParseReturnValues"); //$NON-NLS-1$
-			String cname = context.getClassName();
-			String source;
-			if (cname != null) {
-				source = cname + "::" + context.getFunctionName(); //$NON-NLS-1$;
-			} else {
-				source = context.getFunctionName();
-			}
-			TraceCompilerEngineGlobals.getEvents().postErrorMessage(msg, source, true);
-		}
-
-		try {
-			if (!type.needsCasting) {
-				// If an extension header is generated, the parameter needs to
-				// be cast, since the return statement may contain anything.
-				type.needsCasting = type.type != TraceParameter.HEX32
-						&& type.type != TraceParameter.SDEC32
-						&& type.type != TraceParameter.UDEC32;
-			}
-			RuleUtils.createParameterFromType(owner, return_value_name, type);
-
-		} catch (TraceCompilerException e) {
-
-			if (e.getErrorCode() == TraceCompilerErrorCode.INVALID_PARAMETER_NAME) {
-				String msg = TraceCompilerEngineErrorMessages
-						.getErrorMessage(
-								TraceCompilerErrorCode.INVALID_PARAMETER_NAME_IN_RETURN_VALUE,
-								null);
-
-				TraceCompilerEngineGlobals.getEvents().postWarningMessage(msg, owner);
-			} else {
-				TraceCompilerException exception = new TraceCompilerException(e.getErrorCode(), e
-						.getErrorParameters(), null);
-				TraceCompilerEngineGlobals.getEvents().postError(
-						exception);
-			}
-		}
-	}
-
-	/**
-	 * Creates a return parameter that was associated with a constant table
-	 * 
-	 * @param owner
-	 *            the owner for the parameter
-	 * @param table
-	 *            the constant table the parameter was associated to
-	 */
-	private void createParameter(Trace owner, TraceConstantTable table) {
-		try {
-			RuleUtils.createParameterFromConstantTable(owner, PARAMETER_NAME,
-					table);
-		} catch (TraceCompilerException e) {
-			TraceCompilerException exception = new TraceCompilerException(e.getErrorCode(), e
-					.getErrorParameters(), null);
-			TraceCompilerEngineGlobals.getEvents().postError(
-					exception);
-		}
-	}
-
-	/**
-	 * Reset static variables
-	 */
-	static void resetNumberOfHandledReturnStatements() {
-		numberOfHandledReturnStatements = 0;
-	}
-
-	/**
-	 * Increase number of handled return statements
-	 */
-	static void increaseNumberOfHandledReturnStatements() {
-		numberOfHandledReturnStatements++;
-	}
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/AutoAddThisPtrRule.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,77 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Creation rule for this parameter
-*
-*/
-package com.nokia.tracecompiler.engine.rules;
-
-import com.nokia.tracecompiler.engine.TraceCompilerEngineGlobals;
-import com.nokia.tracecompiler.model.TraceCompilerException;
-import com.nokia.tracecompiler.model.TraceObjectRule;
-import com.nokia.tracecompiler.model.TraceParameter;
-import com.nokia.tracecompiler.source.SourceContext;
-
-/**
- * Creation rule for "this pointer" parameter
- * 
- */
-public final class AutoAddThisPtrRule extends AutoAddParameterRuleBase {
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engine.rules.AutoAddParameterRuleBase#createObject()
-	 */
-	@Override
-	public void createObject() throws TraceCompilerException {
-		SourceContext context = TraceCompilerEngineGlobals.getSourceContextManager()
-				.getContext();
-		if (context != null && !RuleUtils.isStaticFunction(context)) {
-			super.createObject();
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engine.rules.AutoAddParameterRuleBase#getName()
-	 */
-	@Override
-	protected String getName() {
-		return ThisPointerParameterTemplate.PARAMETER_NAME;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engine.rules.AutoAddParameterRuleBase#getRule()
-	 */
-	@Override
-	protected TraceObjectRule getRule() {
-		return null;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engine.rules.AutoAddParameterRuleBase#getType()
-	 */
-	@Override
-	protected String getType() {
-		return TraceParameter.HEX32;
-	}
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/AutoAddValueRule.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,77 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Creation rule for value parameter
-*
-*/
-package com.nokia.tracecompiler.engine.rules;
-
-import com.nokia.tracecompiler.engine.TraceCompilerEngineGlobals;
-import com.nokia.tracecompiler.model.TraceCompilerException;
-import com.nokia.tracecompiler.model.TraceObjectRule;
-import com.nokia.tracecompiler.model.TraceParameter;
-import com.nokia.tracecompiler.source.SourceContext;
-
-/**
- * Creation rule for "value" parameter
- * 
- */
-public final class AutoAddValueRule extends AutoAddParameterRuleBase {
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engine.rules.AutoAddParameterRuleBase#createObject()
-	 */
-	@Override
-	public void createObject() throws TraceCompilerException {
-		SourceContext context = TraceCompilerEngineGlobals.getSourceContextManager()
-				.getContext();
-		if (context != null) {
-			super.createObject();
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engine.rules.AutoAddParameterRuleBase#getName()
-	 */
-	@Override
-	protected String getName() {
-		return ValueParameterTemplate.PARAMETER_NAME;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engine.rules.AutoAddParameterRuleBase#getRule()
-	 */
-	@Override
-	protected TraceObjectRule getRule() {
-		return null;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engine.rules.AutoAddParameterRuleBase#getType()
-	 */
-	@Override
-	protected String getType() {
-		return TraceParameter.SDEC32;
-	}
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/AutomaticTraceTextRule.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,38 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Rule which specifies that trace does not have user-defined text
-*
-*/
-package com.nokia.tracecompiler.engine.rules;
-
-import com.nokia.tracecompiler.source.SourceContext;
-
-/**
- * Rule which specifies that trace does not have user-defined text
- * 
- */
-public abstract class AutomaticTraceTextRule extends RuleBase {
-
-	/**
-	 * Formats a trace according to given source context
-	 * 
-	 * @param context
-	 *            the context
-	 * @return the trace
-	 */
-	public abstract String formatTrace(SourceContext context);
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/ClassNameWrapper.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,53 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Wrapper for Class and name
-*
-*/
-package com.nokia.tracecompiler.engine.rules;
-
-import com.nokia.tracecompiler.model.TraceModelPersistentExtension;
-
-/**
- * Wrapper for persistent extension class and name
- * 
- */
-class ClassNameWrapper {
-
-	/**
-	 * Constructor
-	 * 
-	 * @param name
-	 *            the name
-	 * @param clasz
-	 *            the class
-	 */
-	ClassNameWrapper(String name,
-			Class<? extends TraceModelPersistentExtension> clasz) {
-		this.name = name;
-		this.clasz = clasz;
-	}
-
-	/**
-	 * Name for the class
-	 */
-	String name;
-
-	/**
-	 * The class
-	 */
-	Class<? extends TraceModelPersistentExtension> clasz;
-
-}
\ No newline at end of file
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/ComplexHeaderRuleImpl.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,62 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Implementation of ComplexHeaderRule
-*
-*/
-package com.nokia.tracecompiler.engine.rules;
-
-import com.nokia.tracecompiler.engine.header.ComplexHeaderRule;
-
-/**
- * Implementation of ComplexHeaderRule
- * 
- */
-public final class ComplexHeaderRuleImpl extends RuleBase implements
-		ComplexHeaderRule {
-
-	/**
-	 * Trace ID define extension
-	 */
-	private String traceIDDefineExtension;
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engine.header.ComplexHeaderRule#needsFunction()
-	 */
-	public boolean needsFunction() {
-		return true;
-	}
-
-	/**
-	 * Sets the data to be added to the trace ID define statement after the ID
-	 * 
-	 * @param traceIDDefineExtension
-	 *            the extension
-	 */
-	void setTraceIDDefineExtension(String traceIDDefineExtension) {
-		this.traceIDDefineExtension = traceIDDefineExtension;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engine.header.ComplexHeaderRule#getTraceIDDefineExtension()
-	 */
-	public String getTraceIDDefineExtension() {
-		return traceIDDefineExtension;
-	}
-}
\ No newline at end of file
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/EndOfFunctionLocationRule.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,62 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Location rule for end of function
-*
-*/
-package com.nokia.tracecompiler.engine.rules;
-
-import com.nokia.tracecompiler.engine.source.SourceLocationRule;
-
-/**
- * Location rule for end of function
- * 
- */
-public final class EndOfFunctionLocationRule extends RuleBase implements
-		SourceLocationRule {
-
-	/**
-	 * Location rule offset. Should be large enough to cover a function
-	 */
-	private static final int OFFSET = 100000; // CodForChk_Dis_Magic
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engine.source.SourceLocationRule#getType()
-	 */
-	public int getLocationType() {
-		return SourceLocationRule.CONTEXT_RELATIVE;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engine.source.SourceLocationRule#getOffset()
-	 */
-	public int getLocationOffset() {
-		return OFFSET;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engine.source.SourceLocationRule#isRemovedAfterInsert()
-	 */
-	public boolean isRemovedAfterInsert() {
-		return true;
-	}
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/EntryTraceRule.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Rule for entry traces
-*
-*/
-package com.nokia.tracecompiler.engine.rules;
-
-import com.nokia.tracecompiler.engine.utils.TraceUtils;
-import com.nokia.tracecompiler.source.SourceContext;
-
-/**
- * Rule for entry traces
- * 
- */
-public class EntryTraceRule extends AutomaticTraceTextRule {
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engine.rules.AutomaticTraceTextRule#
-	 *      formatTrace(com.nokia.tracecompiler.source.SourceContext)
-	 */
-	@Override
-	public String formatTrace(SourceContext context) {
-		return TraceUtils.formatTrace(RuleUtils.TEXT_FORMAT_BASE, context
-				.getClassName(), context.getFunctionName());
-	}
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/ExitTracePropertyBuilder.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Creates exit traces from entry traces
-*
-*/
-package com.nokia.tracecompiler.engine.rules;
-
-/**
- * Creates exit traces from entry traces
- * 
- */
-interface ExitTracePropertyBuilder {
-
-	/**
-	 * Gets the name for exit trace
-	 * 
-	 * @param entryName
-	 *            name of the entry trace
-	 * @return the name for exit trace
-	 */
-	String createExitName(String entryName);
-
-	/**
-	 * Gets the exit trace text based on entry trace
-	 * 
-	 * @param entryText
-	 *            entry trace text
-	 * @return the text for exit trace
-	 */
-	String createExitText(String entryText);
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/ExitTraceRule.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Rule for exit traces
-*
-*/
-package com.nokia.tracecompiler.engine.rules;
-
-import com.nokia.tracecompiler.engine.utils.TraceUtils;
-import com.nokia.tracecompiler.source.SourceContext;
-
-/**
- * Rule for exit traces
- * 
- */
-public class ExitTraceRule extends AutomaticTraceTextRule {
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engine.rules.AutomaticTraceTextRule#
-	 *      formatTrace(com.nokia.tracecompiler.source.SourceContext)
-	 */
-	@Override
-	public String formatTrace(SourceContext context) {
-		return TraceUtils.formatTrace(RuleUtils.TEXT_FORMAT_BASE, context
-				.getClassName(), context.getFunctionName());
-	}
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/ExtensionBase.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,54 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Base class for model extensions
-*
-*/
-package com.nokia.tracecompiler.engine.rules;
-
-import com.nokia.tracecompiler.model.TraceModelExtension;
-import com.nokia.tracecompiler.model.TraceObject;
-
-/**
- * Base class for model extensions
- * 
- */
-public class ExtensionBase implements TraceModelExtension {
-
-	/**
-	 * The owning trace object
-	 */
-	private TraceObject owner;
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.model.TraceModelExtension#
-	 *      setOwner(com.nokia.tracecompiler.model.TraceObject)
-	 */
-	public void setOwner(TraceObject owner) {
-		this.owner = owner;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.model.TraceModelExtension#getOwner()
-	 */
-	public TraceObject getOwner() {
-		return owner;
-	}
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/FillerParameterRuleImpl.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Filler parameter rule implementation
-*
-*/
-package com.nokia.tracecompiler.engine.rules;
-
-import com.nokia.tracecompiler.rules.FillerParameterRule;
-
-/**
- * Filler parameter rule implementation. This returns false from isShownInSource
- * 
- */
-final class FillerParameterRuleImpl extends TraceParameterFormattingRuleBase
-		implements FillerParameterRule {
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engine.source.TraceParameterFormattingRule#isShownInSource()
-	 */
-	@Override
-	public boolean isShownInSource() {
-		return false;
-	}
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/Messages.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,64 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Localized strings for rules package
-*
-*/
-package com.nokia.tracecompiler.engine.rules;
-
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-/**
- * Localized strings for rules package
- * 
- */
-class Messages {
-
-	/**
-	 * Bundle name
-	 */
-	private static final String BUNDLE_NAME = "com.nokia.tracecompiler.engine.rules.messages"; //$NON-NLS-1$
-
-	/**
-	 * Bundle
-	 */
-	private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
-			.getBundle(BUNDLE_NAME);
-
-	/**
-	 * Prevents construction
-	 */
-	private Messages() {
-
-	}
-
-	/**
-	 * Gets localized string based on key
-	 * 
-	 * @param key
-	 *            the resource key
-	 * @return the localized resource
-	 */
-	public static String getString(String key) {
-		String value;
-		try {
-			value = RESOURCE_BUNDLE.getString(key);
-		} catch (MissingResourceException e) {
-			value = '!' + key + '!';
-		}
-		return value;
-	}
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/ParameterTypeMappingRule.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,145 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Trace parameter rule for adding casting and pointer operations to source code
-*
-*/
-package com.nokia.tracecompiler.engine.rules;
-
-import com.nokia.tracecompiler.model.TraceModelPersistentExtension;
-import com.nokia.tracecompiler.model.TraceParameter;
-import com.nokia.tracecompiler.source.SourceConstants;
-import com.nokia.tracecompiler.source.SourceUtils;
-import com.nokia.tracecompiler.source.TypeMapping;
-
-/**
- * Trace parameter rule for adding casting and pointer operations to source code
- * 
- */
-final class ParameterTypeMappingRule extends TraceParameterFormattingRuleBase
-		implements TraceModelPersistentExtension {
-
-	/**
-	 * TTime.Int64() function
-	 */	
-	private static final String INT64_FUNCTION = ".Int64()"; //$NON-NLS-1$
-
-	/**
-	 * The type mapping
-	 */
-	private TypeMapping typeMapping;
-
-	/**
-	 * Storage name for this parameter
-	 */
-	static String STORAGE_NAME = "TypeMapping"; //$NON-NLS-1$
-
-	/**
-	 * Constructor for reflection
-	 */
-	ParameterTypeMappingRule() {
-		typeMapping = new TypeMapping(null);
-	}
-
-	/**
-	 * Creates a new type mapping rule
-	 * 
-	 * @param mapping
-	 *            the type mapping to be used
-	 */
-	ParameterTypeMappingRule(TypeMapping mapping) {
-		this.typeMapping = mapping;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engine.rules.TraceParameterFormattingRuleBase#
-	 *      mapNameToSource(java.lang.String)
-	 */
-	@Override
-	public String mapNameToSource(String originalName) {
-		StringBuffer source = new StringBuffer();
-		if (typeMapping.type.equals(TraceParameter.TIME)) {
-			source.append(originalName);
-			source.append(INT64_FUNCTION);
-		} else {
-			if (typeMapping.needsCasting) {
-				source.append(SourceConstants.START_PARAMETERS);
-				TraceParameter param = (TraceParameter) getOwner();
-				source.append(SourceUtils.mapParameterTypeToSymbianType(param));
-				source.append(SourceConstants.END_PARAMETERS);
-			}
-			if (typeMapping.valueToPointer) {
-				source.append('&');
-			}
-			source.append(SourceConstants.START_PARAMETERS);
-			source.append(originalName);
-			source.append(SourceConstants.END_PARAMETERS);
-		}
-		return source.toString();
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.model.TraceModelPersistentExtension#getData()
-	 */
-	public String getData() {
-		StringBuffer sb = new StringBuffer();
-		if (typeMapping.needsCasting) {
-			sb.append('C');
-		}
-		if (typeMapping.valueToPointer) {
-			sb.append('V');
-		}
-		return sb.toString();
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.model.TraceModelPersistentExtension#getStorageName()
-	 */
-	public String getStorageName() {
-		return STORAGE_NAME;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.model.TraceModelPersistentExtension#setData(java.lang.String)
-	 */
-	public boolean setData(String data) {
-		boolean retval = false;
-		if (data != null) {
-			for (int i = 0; i < data.length(); i++) {
-				char c = data.charAt(i);
-				switch (c) {
-				case 'C':
-					typeMapping.needsCasting = true;
-					retval = true;
-					break;
-				case 'V':
-					typeMapping.valueToPointer = true;
-					retval = true;
-					break;
-				}
-			}
-		}
-		return retval;
-	}
-
-}
\ No newline at end of file
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/PerformanceEventRuleBase.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Base class for performance event rules
-*
-*/
-package com.nokia.tracecompiler.engine.rules;
-
-
-/**
- * Base class for performance event rules
- * 
- */
-public class PerformanceEventRuleBase extends RuleBase {
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/PerformanceEventStartRule.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Rule for performance timer entry trace
-*
-*/
-package com.nokia.tracecompiler.engine.rules;
-
-
-/**
- * Rule for performance timer entry trace
- * 
- */
-public class PerformanceEventStartRule extends PerformanceEventRuleBase {
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/PerformanceEventStopRule.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,26 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Performance timer exit trace rule
-*
-*/
-package com.nokia.tracecompiler.engine.rules;
-
-/**
- * Performance timer exit trace rule
- * 
- */
-public final class PerformanceEventStopRule extends PerformanceEventRuleBase {
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/ReadOnlyObjectRuleImpl.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Read-only rule implementation
-*
-*/
-package com.nokia.tracecompiler.engine.rules;
-
-import com.nokia.tracecompiler.rules.ReadOnlyObjectRule;
-
-/**
- * Read-only rule implementation
- * 
- */
-public final class ReadOnlyObjectRuleImpl extends RuleBase implements
-		ReadOnlyObjectRule {
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/RuleBase.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Base class for rules
-*
-*/
-package com.nokia.tracecompiler.engine.rules;
-
-import com.nokia.tracecompiler.model.TraceObjectRule;
-
-/**
- * Base class for rules
- * 
- */
-public class RuleBase extends ExtensionBase implements TraceObjectRule {
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/RuleUtils.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,320 +0,0 @@
-/*
- * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of "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:
- *
- * Description:
- *
- * Utility functions for rules package
- *
- */
-package com.nokia.tracecompiler.engine.rules;
-
-import java.util.Iterator;
-import java.util.List;
-
-import com.nokia.tracecompiler.engine.TraceCompilerEngineConfiguration;
-import com.nokia.tracecompiler.engine.TraceCompilerEngineGlobals;
-import com.nokia.tracecompiler.model.Trace;
-import com.nokia.tracecompiler.model.TraceCompilerException;
-import com.nokia.tracecompiler.model.TraceConstantTable;
-import com.nokia.tracecompiler.model.TraceModel;
-import com.nokia.tracecompiler.model.TraceModelExtension;
-import com.nokia.tracecompiler.model.TraceObjectUtils;
-import com.nokia.tracecompiler.model.TraceParameter;
-import com.nokia.tracecompiler.source.ParsedType;
-import com.nokia.tracecompiler.source.SourceContext;
-import com.nokia.tracecompiler.source.SourceParserException;
-import com.nokia.tracecompiler.source.SourceReturn;
-import com.nokia.tracecompiler.source.TypeMapping;
-
-/**
- * Utility functions for rules package
- * 
- */
-public final class RuleUtils {
-
-	/**
-	 * Entry-exit template
-	 */
-	public static final int TYPE_ENTRY_EXIT = 0; // CodForChk_Dis_Magic
-
-	/**
-	 * Start-stop event template
-	 */
-	public static final int TYPE_PERF_EVENT = 1; // CodForChk_Dis_Magic
-
-	/**
-	 * State trace template
-	 */
-	public static final int TYPE_STATE_TRACE = 2; // CodForChk_Dis_Magic
-
-	/**
-	 * Trace name format base
-	 */
-	static final String NAME_FORMAT_BASE = "{$CN}_{$FN}"; //$NON-NLS-1$
-
-	/**
-	 * Trace text format base
-	 */
-	static final String TEXT_FORMAT_BASE = "{$cn}::{$fn}"; //$NON-NLS-1$
-
-	/**
-	 * Template titles
-	 */
-	private static final String[] ENTRY_TEMPLATE_TITLES = {
-			Messages.getString("RuleUtils.FunctionEntryTitle"), //$NON-NLS-1$
-			Messages.getString("RuleUtils.PerformanceEventTitle"), //$NON-NLS-1$
-			Messages.getString("RuleUtils.StateTraceTitle"), //$NON-NLS-1$
-	};
-
-	/**
-	 * Entry name prefixes
-	 */
-	public static final String[] ENTRY_NAME_PREFIXES = { "", //$NON-NLS-1$
-			"EVENT_", //$NON-NLS-1$
-			"STATE_" //$NON-NLS-1$
-	};
-
-	/**
-	 * Entry name suffixes
-	 */
-	public static final String[] ENTRY_NAME_SUFFIXES = { "_ENTRY", //$NON-NLS-1$
-			"_START", //$NON-NLS-1$
-			"" //$NON-NLS-1$
-	};
-
-	/**
-	 * Exit name prefixes
-	 */
-	private static final String[] EXIT_NAME_PREFIXES = { "", //$NON-NLS-1$
-			"EVENT_", //$NON-NLS-1$
-			"" //$NON-NLS-1$
-	};
-
-	/**
-	 * Exit name suffixes
-	 */
-	public static final String[] EXIT_NAME_SUFFIXES = { "_EXIT", //$NON-NLS-1$
-			"_STOP", //$NON-NLS-1$
-			"" //$NON-NLS-1$
-	};
-
-	/**
-	 * Gets an entry template title
-	 * 
-	 * @param type
-	 *            the template type
-	 * @return the template title
-	 */
-	static String getEntryTemplateTitle(int type) {
-		return ENTRY_TEMPLATE_TITLES[type];
-	}
-
-	/**
-	 * Creates exit name from entry name
-	 * 
-	 * @param entryName
-	 *            the entry name
-	 * @param type
-	 *            the type of entry
-	 * @return the exit name
-	 */
-	static String createExitName(String entryName, int type) {
-		// Strips the duplicate modifier from the name
-		entryName = TraceObjectUtils.removeDuplicateModifier(entryName);
-		StringBuffer sb = new StringBuffer();
-		if (entryName.startsWith(ENTRY_NAME_PREFIXES[type])) {
-			entryName = entryName.substring(ENTRY_NAME_PREFIXES[type].length());
-		}
-		if (entryName.endsWith(ENTRY_NAME_SUFFIXES[type])) {
-			entryName = entryName.substring(0, entryName.length()
-					- ENTRY_NAME_SUFFIXES[type].length());
-		}
-		sb.append(EXIT_NAME_PREFIXES[type]);
-		sb.append(entryName);
-		sb.append(EXIT_NAME_SUFFIXES[type]);
-		return sb.toString();
-	}
-
-	/**
-	 * Creates an entry trace name format from type
-	 * 
-	 * @param type
-	 *            the trace format type
-	 * @return the trace name format
-	 */
-	public static String createEntryTraceNameFormat(int type) {
-		StringBuffer sb = new StringBuffer();
-		if (type == TYPE_PERF_EVENT || type == TYPE_STATE_TRACE) {
-			sb.append(NAME_FORMAT_BASE);
-		} else {
-			sb.append(ENTRY_NAME_PREFIXES[type]);
-			sb.append(NAME_FORMAT_BASE);
-			sb.append(ENTRY_NAME_SUFFIXES[type]);
-		}
-		return sb.toString();
-	}
-
-	/**
-	 * Creates an exit trace name format based on type
-	 * 
-	 * @param type
-	 *            the format type
-	 * @return the trace name format
-	 */
-	public static String createExitTraceNameFormat(int type) {
-		StringBuffer sb = new StringBuffer();
-		sb.append(EXIT_NAME_PREFIXES[type]);
-		sb.append(NAME_FORMAT_BASE);
-		sb.append(EXIT_NAME_SUFFIXES[type]);
-		return sb.toString();
-	}
-
-	/**
-	 * Gets the return statements from current context from the context manager.
-	 * 
-	 * @param returnStatements
-	 *            the list where the return statements are stored
-	 */
-	static void getCurrentContextReturns(List<SourceReturn> returnStatements) {
-		SourceContext context = TraceCompilerEngineGlobals.getSourceContextManager()
-				.getContext();
-		if (context != null) {
-			try {
-				context.parseReturnValues(returnStatements);
-			} catch (SourceParserException e) {
-				String msg = Messages
-						.getString("RuleUtils.FailedToParseReturnValues"); //$NON-NLS-1$
-				String cname = context.getClassName();
-				String source;
-				if (cname != null) {
-					source = cname + "::" + context.getFunctionName(); //$NON-NLS-1$;
-				} else {
-					source = context.getFunctionName();
-				}
-				TraceCompilerEngineGlobals.getEvents().postErrorMessage(msg, source,
-						true);
-			}
-		} else {
-			if (TraceCompilerEngineConfiguration.ASSERTIONS_ENABLED) {
-				TraceCompilerEngineGlobals.getEvents().postAssertionFailed(
-						"Function return not in function", null); //$NON-NLS-1$
-			}
-		}
-	}
-
-	/**
-	 * Checks if the function is static. Currently this is just dummy, checking
-	 * that the class name exists and the function name is not New / NewL /
-	 * NewLC
-	 * 
-	 * @param context
-	 *            the context to be checked
-	 * @return true if static, false if not
-	 */
-	static boolean isStaticFunction(SourceContext context) {
-		boolean retval;
-		if (context.getClassName() == null) {
-			retval = true;
-		} else {
-			String fname = context.getFunctionName();
-			if (fname.equals("New") //$NON-NLS-1$
-					|| fname.equals("NewL") //$NON-NLS-1$
-					|| fname.equals("NewLC") //$NON-NLS-1$
-			) {
-				retval = true;
-			} else {
-				retval = false;
-			}
-		}
-		return retval;
-	}
-
-	/**
-	 * Locates a constant table based on type definition parsed from source
-	 * 
-	 * @param model
-	 *            the trace model
-	 * @param type
-	 *            the parameter type
-	 * @return the constant table or null if not found
-	 */
-	static TraceConstantTable findConstantTableByType(TraceModel model,
-			ParsedType type) {
-		Iterator<TraceConstantTable> tables = model.getConstantTables();
-		TraceConstantTable foundTable = null;
-		while (tables.hasNext() && foundTable == null) {
-			TraceConstantTable table = tables.next();
-			if (type.typeEquals(table.getName())) {
-				foundTable = table;
-			}
-		}
-		return foundTable;
-	}
-
-	/**
-	 * Creates a parameter based on TypeMapping definition
-	 * 
-	 * @param owner
-	 *            the parameter owner
-	 * @param name
-	 *            the parameter name
-	 * @param type
-	 *            the type mapping
-	 * @return the parameter
-	 * @throws TraceCompilerException
-	 *             if parameter cannot be created
-	 */
-	static TraceParameter createParameterFromType(Trace owner, String name,
-			TypeMapping type) throws TraceCompilerException {
-		int id = owner.getNextParameterID();
-		owner.getModel().getVerifier().checkTraceParameterProperties(owner,
-				null, id, name, type.type);
-		TraceModelExtension[] extensions = null;
-		if (type.needsCasting || type.valueToPointer
-				|| type.type.equals(TraceParameter.TIME)) {
-			extensions = new TraceModelExtension[1];
-			extensions[0] = new ParameterTypeMappingRule(type);
-		}
-		TraceParameter parameter = owner.getModel().getFactory()
-				.createTraceParameter(owner, id, name, type.type, extensions);
-		return parameter;
-	}
-
-	/**
-	 * Creates a parameter object from constant table
-	 * 
-	 * @param owner
-	 *            the parameter owner
-	 * @param name
-	 *            the name for the parameter
-	 * @param table
-	 *            the constant table
-	 * @return the parameter
-	 * @throws TraceCompilerException
-	 *             if parameter cannot be created
-	 */
-	static TraceParameter createParameterFromConstantTable(Trace owner,
-			String name, TraceConstantTable table) throws TraceCompilerException {
-		int id = owner.getNextParameterID();
-		owner.getModel().getVerifier().checkTraceParameterProperties(owner,
-				null, id, name, table.getType());
-		// Constant tables need a cast to constant table type
-		TypeMapping type = new TypeMapping(table.getType());
-		type.needsCasting = true;
-		TraceModelExtension[] extensions = new TraceModelExtension[1];
-		extensions[0] = new ParameterTypeMappingRule(type);
-		return owner.getModel().getFactory().createTraceParameter(owner, id,
-				name, table.getName(), extensions);
-	}
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/RulesEngine.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,383 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Implementation of TraceObjectRuleFactory interface
-*
-*/
-package com.nokia.tracecompiler.engine.rules;
-
-import java.util.Iterator;
-
-import com.nokia.tracecompiler.engine.TraceCompilerEngineConfiguration;
-import com.nokia.tracecompiler.engine.TraceCompilerEngineConfigurationListener;
-import com.nokia.tracecompiler.engine.TraceCompilerEngineGlobals;
-import com.nokia.tracecompiler.engine.header.ComplexHeaderRule;
-import com.nokia.tracecompiler.engine.rules.osttrace.OstTraceFormatRule;
-import com.nokia.tracecompiler.engine.source.SourceParserRule;
-import com.nokia.tracecompiler.engine.source.TraceParameterFormattingRule;
-import com.nokia.tracecompiler.model.Trace;
-import com.nokia.tracecompiler.model.TraceCompilerException;
-import com.nokia.tracecompiler.model.TraceModel;
-import com.nokia.tracecompiler.model.TraceModelExtension;
-import com.nokia.tracecompiler.model.TraceModelListener;
-import com.nokia.tracecompiler.model.TraceModelPersistentExtension;
-import com.nokia.tracecompiler.model.TraceModelResetListener;
-import com.nokia.tracecompiler.model.TraceObject;
-import com.nokia.tracecompiler.model.TraceObjectRuleFactory;
-import com.nokia.tracecompiler.model.TraceParameter;
-import com.nokia.tracecompiler.project.TraceProjectAPI;
-import com.nokia.tracecompiler.rules.FillerParameterRule;
-import com.nokia.tracecompiler.source.SourceUtils;
-
-/**
- * Provides rules for trace objects.
- * 
- */
-public class RulesEngine implements TraceObjectRuleFactory {
-
-	/**
-	 * Number of parameters in a simple trace
-	 */
-	private static final int SIMPLE_TRACE_MAX_PARAMETER_COUNT = 1;
-
-	/**
-	 * Trace model listener updates the fillers and complex type flagging when
-	 * traces and parameters are modified
-	 */
-	private TraceModelListener modelListener;
-
-	/**
-	 * Trace model reset listener uses modelValid to update the complex header
-	 * rules
-	 */
-	private TraceModelResetListener resetListener;
-
-	/**
-	 * Manager for plug-in API's
-	 */
-	private RulesEnginePluginManager pluginManager;
-
-	/**
-	 * Configuration listener for source format changes
-	 */
-	private TraceCompilerEngineConfigurationListener configurationListener = new RulesEngineConfigurationListener(
-			this);
-
-	/**
-	 * Trace model
-	 */
-	private TraceModel model;
-
-	/**
-	 * Constructor
-	 */
-	public RulesEngine() {
-		TraceCompilerEngineGlobals.getConfiguration().addConfigurationListener(
-				configurationListener);
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.model.TraceObjectRuleFactory#
-	 *      createExtension(com.nokia.tracecompiler.model.TraceObject,
-	 *      java.lang.String)
-	 */
-	public TraceModelPersistentExtension createExtension(TraceObject target,
-			String name) {
-		TraceModelPersistentExtension retval = null;
-		ClassNameWrapper[] table = RulesEngineConstants.PERSISTENT_EXTENSIONS;
-		for (int i = 0; i < table.length && retval == null; i++) {
-			if (name.equals(table[i].name)) {
-				retval = createPersistentExtensionAt(target, i);
-			}
-		}
-		return retval;
-	}
-
-	/**
-	 * Creates a persistent extension
-	 * 
-	 * @param target
-	 *            the target object
-	 * @param i
-	 *            index to the persistent extensions array
-	 * @return the extension
-	 */
-	private TraceModelPersistentExtension createPersistentExtensionAt(
-			TraceObject target, int i) {
-		ClassNameWrapper wrapper = RulesEngineConstants.PERSISTENT_EXTENSIONS[i];
-		TraceModelPersistentExtension retval = null;
-		TraceModelPersistentExtension o = target.getExtension(wrapper.clasz);
-		if (o == null) {
-			try {
-				retval = wrapper.clasz.newInstance();
-			} catch (Exception e) {
-				if (TraceCompilerEngineConfiguration.ASSERTIONS_ENABLED) {
-					TraceCompilerEngineGlobals.getEvents().postAssertionFailed(
-							"Invalid extension - " + wrapper.name, null); //$NON-NLS-1$
-				}
-			}
-		}
-		return retval;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.model.TraceObjectRuleFactory#
-	 *      preProcessNewRules(com.nokia.tracecompiler.model.TraceObject)
-	 */
-	public void preProcessNewRules(TraceObject object) {
-		if (object instanceof TraceModel) {
-			// NOTE: This is only called once when builder is started
-			// There is no cleanup code
-			this.model = (TraceModel) object;
-			modelListener = new RulesEngineModelListener(this);
-			resetListener = new RulesEngineResetListener(this, model);
-			model.addModelListener(modelListener);
-			model.addResetListener(resetListener);
-			// Adds the plug-in trace parser / formatter manager to the model as
-			// extension. The plug-in manager delegates the formatters and
-			// parsers to this object when plug-in components register to
-			// TraceCompiler.
-			pluginManager = new RulesEnginePluginManager(this);
-			model.addExtension(pluginManager);
-			createTraceParsers();
-			createTraceAPIs();
-		}
-	}
-
-	/**
-	 * Creates the trace parsers and stores them to the model
-	 */
-	private void createTraceParsers() {
-		for (SourceParserRule element : RulesEngineConstants.TRACE_PARSERS) {
-			// Creates all source parsers specified in the constants
-			model.addExtension(element);
-		}
-	}
-
-	/**
-	 * Creates the default trace API's and adds them to the plug-in manager
-	 */
-	private void createTraceAPIs() {
-		for (TraceProjectAPI api : RulesEngineConstants.TRACE_APIS) {
-			pluginManager.addAPI(api);
-		}
-	}
-
-	/**
-	 * Creates the trace formatter and stores it to the model
-	 */
-	void setDefaultTraceAPI() {
-		// If the formatter did not exist in the project file, it is added based
-		// on the configuration default
-		if (model.getExtension(TraceProjectAPI.class) == null) {
-			String api = TraceCompilerEngineGlobals.getConfiguration().getText(
-					TraceCompilerEngineConfiguration.FORMATTER_NAME);
-			traceAPIChanged(api);
-		}
-	}
-
-	/**
-	 * API change notification
-	 * 
-	 * @param apiName
-	 *            the name of new api
-	 */
-	void traceAPIChanged(String apiName) {
-		TraceProjectAPI api = model.getExtension(TraceProjectAPI.class);
-		boolean found = false;
-		if (api != null) {
-			if (api.getName().equals(apiName)) {
-				found = true;
-			} else {
-				model.removeExtension(api);
-			}
-		}
-		if (!found) {
-			changeTraceAPI(apiName);
-		}
-	}
-
-	/**
-	 * Creates a trace API
-	 * 
-	 * @param apiName
-	 *            the name of the API to be created
-	 */
-	void changeTraceAPI(String apiName) {
-		if (apiName == null || apiName.length() == 0) {
-			apiName = OstTraceFormatRule.STORAGE_NAME;
-		}
-		Iterator<TraceProjectAPI> apis = pluginManager.getAPIs();
-		boolean apifound = false;
-		while (apis.hasNext()) {
-			TraceProjectAPI api = apis.next();
-			if (api.getName().equals(apiName)) {
-				model.addExtension(api);
-				apifound = true;
-			}
-		}
-		if (!apifound) {
-			// If API from configuration was not found, the first one is used
-			apis = pluginManager.getAPIs();
-			if (apis.hasNext()) {
-				model.addExtension(apis.next());
-			}
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.model.TraceObjectRuleFactory#
-	 *      postProcessNewRules(com.nokia.tracecompiler.model.TraceObject)
-	 */
-	public void postProcessNewRules(TraceObject object) {
-	}
-
-	/**
-	 * Checks the count and types of parameters of given trace and flags it with
-	 * ComplexParameterRule if necessary
-	 * 
-	 * @param trace
-	 *            the trace
-	 */
-	void checkParameterTypes(Trace trace) {
-		// When converting traces from source, the converter takes care of
-		// flagging the traces as complex. The complex flag needs to be checked
-		// when trace are modified via UI
-		if (!TraceCompilerEngineGlobals.getSourceContextManager().isConverting()) {
-			boolean complex = false;
-			int count = trace.getParameterCount();
-			Iterator<TraceParameter> itr = trace.getParameters();
-			while (itr.hasNext() && !complex) {
-				TraceParameter parameter = itr.next();
-				TraceParameterFormattingRule rule = parameter
-						.getExtension(TraceParameterFormattingRule.class);
-				boolean isShown = true;
-				if (rule != null && !rule.isShownInSource()) {
-					isShown = false;
-				}
-				if (isShown) {
-					complex = !SourceUtils.isSimpleType(parameter);
-				} else {
-					count--;
-				}
-			}
-			// Any trace with more than one parameter is a complex trace
-			if (!complex && count > SIMPLE_TRACE_MAX_PARAMETER_COUNT) {
-				complex = true;
-			}
-			ComplexHeaderRule rule = trace
-					.getExtension(ComplexHeaderRule.class);
-			if (complex && rule == null) {
-				trace.addExtension(new ComplexHeaderRuleImpl());
-			} else if (!complex && rule != null) {
-				trace.removeExtension(rule);
-			}
-		}
-	}
-
-	/**
-	 * Adds fillers to align trace parameters to 32-bit boundaries.
-	 * 
-	 * @param trace
-	 *            the trace to be updated
-	 * @throws TraceCompilerException 
-	 */
-	void checkFillerParameters(Trace trace) throws TraceCompilerException {
-		// Flags the model so listeners don't perform intermediate updates
-		trace.getModel().startProcessing();
-		try {
-			// Removes all existing fillers
-			for (int i = 0; i < trace.getParameterCount(); i++) {
-				TraceParameter parameter = trace.getParameter(i);
-				if (parameter.getExtension(FillerParameterRule.class) != null) {
-					trace.removeParameterAt(i);
-					i--;
-				}
-			}
-			int bytesInBlock = 0;
-			int parameterIndex = 0;
-			for (; parameterIndex < trace.getParameterCount(); parameterIndex++) {
-				TraceParameter parameter = trace.getParameter(parameterIndex);
-				int paramSize = SourceUtils.mapParameterTypeToSize(parameter);
-				// Parameters are aligned to 32 bits. Parameter after
-				// end-of-string is aligned dynamically and thus no filler is
-				// created for it
-				if (paramSize == 0 || paramSize == 4 || paramSize == 8) { // CodForChk_Dis_Magic
-					if (bytesInBlock > 0) {
-						int fillerCount = 4 - bytesInBlock; // CodForChk_Dis_Magic
-						for (int i = 0; i < fillerCount; i++) {
-							createFillerParameter(trace, parameterIndex++);
-						}
-						bytesInBlock = 0;
-					}
-				} else if (paramSize == 2) { // CodForChk_Dis_Magic
-					if (bytesInBlock == 1 || bytesInBlock == 3) { // CodForChk_Dis_Magic
-						createFillerParameter(trace, parameterIndex++);
-						// If there was 1 existing byte and filler was added,
-						// the number of bytes in the block is now 4 including
-						// the 2-byte parameter. If there was 3 bytes, the
-						// filler brings it to 4 and the 16-bit parameter
-						// changes it to 2
-						bytesInBlock += 3; // CodForChk_Dis_Magic
-					} else {
-						bytesInBlock += 2; // CodForChk_Dis_Magic
-					}
-					if (bytesInBlock >= 4) { // CodForChk_Dis_Magic
-						bytesInBlock -= 4; // CodForChk_Dis_Magic
-					}
-				} else {
-					bytesInBlock++;
-					if (bytesInBlock == 4) { // CodForChk_Dis_Magic
-						bytesInBlock = 0;
-					}
-				}
-			}
-			// Adds fillers also the the end of the parameter list
-			if (bytesInBlock > 0) {
-				int fillerCount = 4 - bytesInBlock; // CodForChk_Dis_Magic
-				for (int i = 0; i < fillerCount; i++) {
-					createFillerParameter(trace, parameterIndex++);
-				}
-				bytesInBlock = 0;
-			}
-		} finally {
-			trace.getModel().processingComplete();
-		}
-	}
-
-	/**
-	 * Creates a filler parameter
-	 * 
-	 * @param trace
-	 *            the trace for the parameter
-	 * @param parameterIndex
-	 *            the index where the filler is inserted
-	 * @throws TraceCompilerException 
-	 */
-	private void createFillerParameter(Trace trace, int parameterIndex) throws TraceCompilerException {
-		trace.getModel().getFactory().createTraceParameter(parameterIndex,
-				trace, trace.getParameterCount(),
-				"Filler", //$NON-NLS-1$
-				TraceParameter.HEX8,
-				new TraceModelExtension[] { new FillerParameterRuleImpl() });
-	}
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/RulesEngineConfigurationListener.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Configuration listener
-*
-*/
-package com.nokia.tracecompiler.engine.rules;
-
-import com.nokia.tracecompiler.engine.TraceCompilerEngineConfiguration;
-import com.nokia.tracecompiler.engine.TraceCompilerEngineConfigurationListener;
-import com.nokia.tracecompiler.engine.TraceCompilerEngineGlobals;
-
-/**
- * Configuration listener for rule engine monitors the trace formatting
- * 
- */
-final class RulesEngineConfigurationListener implements
-		TraceCompilerEngineConfigurationListener {
-
-	/**
-	 * Rules engine
-	 */
-	private RulesEngine engine;
-
-	/**
-	 * Constructor
-	 * 
-	 * @param engine
-	 *            the rules engine
-	 */
-	RulesEngineConfigurationListener(RulesEngine engine) {
-		this.engine = engine;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engine.TraceCompilerConfigurationListener#configurationCreated()
-	 */
-	public void configurationCreated() {
-		if (TraceCompilerEngineConfiguration.ALLOW_FORMAT_CHANGE) {
-			engine.traceAPIChanged(TraceCompilerEngineGlobals.getConfiguration()
-					.getText(TraceCompilerEngineConfiguration.FORMATTER_NAME));
-		}
-	}
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/RulesEngineConstants.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Properties associated with formatting rules
-*
-*/
-package com.nokia.tracecompiler.engine.rules;
-
-import com.nokia.tracecompiler.engine.rules.osttrace.OstTraceFormatRule;
-import com.nokia.tracecompiler.engine.rules.osttrace.OstTraceParserRule;
-import com.nokia.tracecompiler.engine.source.SourceParserRule;
-import com.nokia.tracecompiler.project.TraceProjectAPI;
-
-/**
- * Constants for rules engine
- * 
- */
-interface RulesEngineConstants {
-
-	/**
-	 * Trace parsers
-	 */
-	SourceParserRule[] TRACE_PARSERS = { new OstTraceParserRule() };
-
-	/**
-	 * Printf parsers
-	 */
-	String[] PRINTF_PARSERS = { "RDebug::Print", //$NON-NLS-1$
-			"Kern::Printf" //$NON-NLS-1$
-	};
-
-	/**
-	 * List of supported API's
-	 */
-	TraceProjectAPI[] TRACE_APIS = { new OstTraceFormatRule() };
-
-	/**
-	 * Persistent extensions
-	 */
-	ClassNameWrapper[] PERSISTENT_EXTENSIONS = {
-			new ClassNameWrapper(ParameterTypeMappingRule.STORAGE_NAME,
-					ParameterTypeMappingRule.class),
-			new ClassNameWrapper(ArrayParameterRuleImpl.STORAGE_NAME,
-					ArrayParameterRuleImpl.class) };
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/RulesEngineModelListener.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,119 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Trace model listener
-*
-*/
-package com.nokia.tracecompiler.engine.rules;
-
-import com.nokia.tracecompiler.model.Trace;
-import com.nokia.tracecompiler.model.TraceCompilerException;
-import com.nokia.tracecompiler.model.TraceModelListener;
-import com.nokia.tracecompiler.model.TraceObject;
-import com.nokia.tracecompiler.model.TraceParameter;
-import com.nokia.tracecompiler.rules.FillerParameterRule;
-
-/**
- * Trace model listener
- * 
- */
-final class RulesEngineModelListener implements TraceModelListener {
-
-	/**
-	 * Rules engine
-	 */
-	private final RulesEngine engine;
-
-	/**
-	 * Constructor
-	 * 
-	 * @param engine
-	 *            rules engine
-	 */
-	RulesEngineModelListener(RulesEngine engine) {
-		this.engine = engine;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.model.TraceModelListener#
-	 *      objectAdded(com.nokia.tracecompiler.model.TraceObject,
-	 *      com.nokia.tracecompiler.model.TraceObject)
-	 */
-	public void objectAdded(TraceObject owner, TraceObject object) {
-		// Updated in objectCreationComplete
-	}
-
-
-	/* (non-Javadoc)
-	 * @see com.nokia.tracecompiler.model.TraceModelListener#objectRemoved(com.nokia.tracecompiler.model.TraceObject, com.nokia.tracecompiler.model.TraceObject)
-	 */
-	public void objectRemoved(TraceObject owner, TraceObject object) throws TraceCompilerException {
-		if (owner instanceof Trace && object instanceof TraceParameter) {
-			engine.checkParameterTypes((Trace) owner);
-			if (object.getExtension(FillerParameterRule.class) == null) {
-				engine.checkFillerParameters((Trace) owner);
-			}
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.model.TraceModelListener#
-	 *      propertyUpdated(com.nokia.tracecompiler.model.TraceObject, int)
-	 */
-	public void propertyUpdated(TraceObject object, int property) throws TraceCompilerException {
-		if (object.getModel().isValid() && object.isComplete()
-				&& object instanceof TraceParameter
-				&& property == TraceModelListener.TYPE) {
-			Trace owner = ((TraceParameter) object).getTrace();
-			if (owner.isComplete()) {
-				engine.checkParameterTypes(owner);
-				engine.checkFillerParameters(owner);
-			}
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.model.TraceModelListener#
-	 *      objectCreationComplete(com.nokia.tracecompiler.model.TraceObject)
-	 */
-	public void objectCreationComplete(TraceObject object) throws TraceCompilerException {
-		if (object.getModel().isValid()) {
-			if (object instanceof TraceParameter) {
-				Trace owner = ((TraceParameter) object).getTrace();
-				if (owner.isComplete()) {
-					engine.checkParameterTypes(owner);
-					// When adding fillers, the check is not done
-					if (object.getExtension(FillerParameterRule.class) == null) {
-						engine.checkFillerParameters(owner);
-					}
-				}
-			} else if (object instanceof Trace) {
-				// When a trace with multiple parameters is created, the
-				// above branch does not get entered since the trace is not
-				// yet complete. Check is made after trace is complete
-				if (((Trace) object).getParameterCount() > 0) {
-					engine.checkParameterTypes((Trace) object);
-					engine.checkFillerParameters((Trace) object);
-				}
-			}
-		}
-	}
-}
\ No newline at end of file
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/RulesEnginePluginManager.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,129 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Plug-in formatter / parser management
-*
-*/
-package com.nokia.tracecompiler.engine.rules;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-
-import com.nokia.tracecompiler.engine.plugin.TraceAPIPluginManager;
-import com.nokia.tracecompiler.model.TraceModel;
-import com.nokia.tracecompiler.model.TraceObject;
-import com.nokia.tracecompiler.plugin.TraceAPIFormatter;
-import com.nokia.tracecompiler.plugin.TraceAPIParser;
-import com.nokia.tracecompiler.project.TraceProjectAPI;
-import com.nokia.tracecompiler.project.TraceProjectAPIList;
-
-/**
- * Plug-in formatter / parser management
- * 
- */
-final class RulesEnginePluginManager implements TraceAPIPluginManager,
-		TraceProjectAPIList {
-
-	/**
-	 * Rules engine
-	 */
-	private RulesEngine engine;
-
-	/**
-	 * Trace model
-	 */
-	private TraceModel model;
-
-	/**
-	 * List of API's
-	 */
-	private ArrayList<TraceProjectAPI> apis = new ArrayList<TraceProjectAPI>();
-
-	/**
-	 * Constructor
-	 * 
-	 * @param engine
-	 *            the plug-in engine
-	 */
-	RulesEnginePluginManager(RulesEngine engine) {
-		this.engine = engine;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engine.plugin.TraceAPIPluginManager#
-	 *      addFormatters(com.nokia.tracecompiler.plugin.TraceAPIFormatter[])
-	 */
-	public void addFormatters(TraceAPIFormatter[] formatters) {
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engine.plugin.TraceAPIPluginManager#
-	 *      addParsers(com.nokia.tracecompiler.plugin.TraceAPIParser[])
-	 */
-	public void addParsers(TraceAPIParser[] parsers) {
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engine.plugin.TraceAPIPluginManager#createDefaultAPI()
-	 */
-	public void createDefaultAPI() {
-		engine.setDefaultTraceAPI();
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.model.TraceModelExtension#getOwner()
-	 */
-	public TraceObject getOwner() {
-		return model;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.model.TraceModelExtension#
-	 *      setOwner(com.nokia.tracecompiler.model.TraceObject)
-	 */
-	public void setOwner(TraceObject owner) {
-		model = (TraceModel) owner;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.project.TraceProjectAPIList#getAPIs()
-	 */
-	public Iterator<TraceProjectAPI> getAPIs() {
-		return apis.iterator();
-	}
-
-	/**
-	 * Adds an API to the list
-	 * 
-	 * @param api
-	 *            the API
-	 */
-	void addAPI(TraceProjectAPI api) {
-		apis.add(api);
-	}
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/RulesEngineResetListener.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,96 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Model reset listener
-*
-*/
-package com.nokia.tracecompiler.engine.rules;
-
-import com.nokia.tracecompiler.model.Trace;
-import com.nokia.tracecompiler.model.TraceCompilerException;
-import com.nokia.tracecompiler.model.TraceGroup;
-import com.nokia.tracecompiler.model.TraceModel;
-import com.nokia.tracecompiler.model.TraceModelResetListener;
-import com.nokia.tracecompiler.project.TraceProjectAPI;
-
-/**
- * Model reset listener
- * 
- */
-final class RulesEngineResetListener implements TraceModelResetListener {
-
-	/**
-	 * Rule engine
-	 */
-	private final RulesEngine engine;
-
-	/**
-	 * Trace model
-	 */
-	private final TraceModel model;
-
-	/**
-	 * Constructor
-	 * 
-	 * @param engine
-	 *            rule engine
-	 * @param model
-	 *            the trace model
-	 */
-	RulesEngineResetListener(RulesEngine engine, TraceModel model) {
-		this.engine = engine;
-		this.model = model;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.model.TraceModelResetListener#modelResetting()
-	 */
-	public void modelResetting() {
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.model.TraceModelResetListener#modelReset()
-	 */
-	public void modelReset() {
-		model.removeExtensions(TraceProjectAPI.class);
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.model.TraceModelResetListener#modelValid(boolean)
-	 */
-	public void modelValid(boolean valid) throws TraceCompilerException {
-		if (valid) {
-			model.startProcessing();
-			try {
-				// Creates the trace API if it does not exist yet
-				engine.setDefaultTraceAPI();
-				// Adds filler parameters to correct places
-				for (TraceGroup group : model) {
-					for (Trace trace : group) {
-						engine.checkFillerParameters(trace);
-					}
-				}
-			} finally {
-				model.processingComplete();
-			}
-		}
-	}
-}
\ No newline at end of file
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/SourceParserRuleBase.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,565 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Implementation of parser rule
-*
-*/
-package com.nokia.tracecompiler.engine.rules;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import com.nokia.tracecompiler.engine.TraceLocation;
-import com.nokia.tracecompiler.engine.TraceCompilerEngineErrorCodes.StringErrorParameters;
-import com.nokia.tracecompiler.engine.TraceCompilerEngineErrorCodes.TraceCompilerErrorCode;
-import com.nokia.tracecompiler.engine.source.SourceParserResult;
-import com.nokia.tracecompiler.engine.source.SourceParserRule;
-import com.nokia.tracecompiler.engine.utils.TraceUtils;
-import com.nokia.tracecompiler.model.Trace;
-import com.nokia.tracecompiler.model.TraceCompilerException;
-import com.nokia.tracecompiler.model.TraceModelExtension;
-import com.nokia.tracecompiler.project.TraceLocationParser;
-import com.nokia.tracecompiler.project.TraceProjectAPI;
-import com.nokia.tracecompiler.source.FormatMapping;
-import com.nokia.tracecompiler.source.SourceConstants;
-import com.nokia.tracecompiler.source.SourceExcludedArea;
-import com.nokia.tracecompiler.source.SourceIterator;
-import com.nokia.tracecompiler.source.SourceParser;
-import com.nokia.tracecompiler.source.SourceParserException;
-import com.nokia.tracecompiler.source.SourceUtils;
-
-/**
- * Base class for parser rules. Instances of this class are added to the trace
- * model. The source engine uses the parses it finds from the model to find
- * trace locations from source files
- * 
- */
-public abstract class SourceParserRuleBase extends RuleBase implements
-		SourceParserRule, TraceLocationParser {
-
-	/**
-	 * Tag to be searched from source
-	 */
-	private String tag;
-
-	/**
-	 * Allowed tag suffixes
-	 */
-	private ArrayList<String> tagSuffixes = new ArrayList<String>();
-
-	/**
-	 * Default name for a parameter
-	 */
-	public static final String DEFAULT_PARAMETER_NAME = "arg"; //$NON-NLS-1$
-
-	/**
-	 * Pattern for trimming c++ cast operator away from trace parameters
-	 */
-	private Pattern cppCastTrimPattern = Pattern.compile("\\s*(.+<.+>)\\s*"); //$NON-NLS-1$
-
-	/**
-	 * Pattern for trimming c cast operator away from trace parameters
-	 */
-	private Pattern cCastTrimPattern = Pattern.compile("(\\([^(]+?\\))"); //$NON-NLS-1$
-
-	/**
-	 * Pattern for getting a valid token from parameter data
-	 */
-	private Pattern parameterNamePattern = Pattern
-			.compile("[a-zA-Z][a-zA-Z\\d]*"); //$NON-NLS-1$
-
-	/**
-	 * Symbian literal tags
-	 */
-	private String[] TRACE_TEXT_TAGS = { "_L8", //$NON-NLS-1$
-			"_T8", //$NON-NLS-1$
-			"_L", //$NON-NLS-1$
-			"_T" //$NON-NLS-1$
-	};	
-	
-	
-	/**
-	 * Constructor
-	 * 
-	 * @param tag
-	 *            the tag to be searched from source
-	 * @param tagSuffixes
-	 *            the list of allowed suffixes to the tag
-	 */
-	protected SourceParserRuleBase(String tag, String[] tagSuffixes) {
-		this.tag = tag;
-		// Adds the sub-formats to the parsers
-		if (tagSuffixes != null) {
-			int len = tagSuffixes.length;
-			for (int i = 0; i < len; i++) {
-				this.tagSuffixes.add(tagSuffixes[i]);
-			}
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engine.source.SourceParserRule#getSearchTag()
-	 */
-	public String getSearchTag() {
-		return tag;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engine.source.SourceParserRule#
-	 *      isAllowedTagSuffix(java.lang.String)
-	 */
-	public boolean isAllowedTagSuffix(String tag) {
-		boolean retval = false;
-		if (tag != null) {
-			if (tag.length() == 0 && tagSuffixes.isEmpty()) {
-				retval = true;
-			} else {
-				for (int i = 0; i < tagSuffixes.size() && !retval; i++) {
-					String s = tagSuffixes.get(i);
-					if (s.length() == tag.length()) {
-						retval = true;
-						for (int j = 0; j < s.length() && retval; j++) {
-							char c1 = s.charAt(j);
-							// '?' can be any character
-							if (c1 != '?') {
-								retval = tag.charAt(j) == c1;
-							}
-						}
-					}
-				}
-			}
-		}
-		return retval;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engine.source.SourceParserRule#getName()
-	 */
-	public String getName() {
-		return null;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engine.source.SourceParserRule#
-	 *      parseParameters(java.util.List)
-	 */
-	public SourceParserResult parseParameters(String tag, List<String> list)
-			throws TraceCompilerException {
-		SourceParserResult result = new SourceParserResult();
-		result.traceText = trimTraceText(list.get(0));
-		result.originalName = result.traceText;
-		result.convertedName = TraceUtils.convertName(
-				SourceUtils.removePrintfFormatting(result.traceText))
-				.toUpperCase();
-		result.parameters = list.subList(1, list.size());
-		return result;
-	}
-
-	/**
-	 * Converts a location to trace
-	 * 
-	 * @param location
-	 *            the location to be converted
-	 * @return the conversion result
-	 * @throws TraceCompilerException
-	 *             if conversion fails
-	 */
-	public TraceConversionResult convertLocation(TraceLocation location)
-			throws TraceCompilerException {
-		// All parameter types are supported by default -> false is passed to
-		// buildParameterTypeList.
-		List<FormatMapping> types = buildParameterTypeList(location
-				.getTraceText(), false);
-		// Parameter count must match the number of format elements in trace
-		// text -> true is passed to convertLocation by default
-		return convertLocation(location, true, types);
-	}
-	
-	/**
-	 * Converts a location to trace
-	 * 
-	 * @param location
-	 *            the location to be converted
-	 * @param useParametersFromLocation
-	 *            true if location parameters need to be checked
-	 * @param types
-	 *            the parameter types list
-	 * @return the conversion result
-	 * @throws TraceCompilerException
-	 *             if conversion fails
-	 */
-	protected TraceConversionResult convertLocation(TraceLocation location,
-			boolean useParametersFromLocation, List<FormatMapping> types)
-			throws TraceCompilerException {
-		TraceConversionResult result = new TraceConversionResult();
-		result.text = location.getTraceText();
-
-		// If trace text is in multiple lines, remove extra characters
-		int removableAreaBeging = -1;
-		for (int i = 0; i < result.text.length(); i++) {
-			char c = result.text.charAt(i);
-			if (c == SourceConstants.QUOTE_CHAR
-					&& (i == 0 || result.text.charAt(i - 1) != SourceConstants.BACKSLASH_CHAR)) {
-				if (removableAreaBeging != -1) {
-					String startString = result.text.substring(0,
-							removableAreaBeging);
-					String endString = result.text.substring(i + 1, result.text
-							.length());
-					result.text = startString + endString;
-					i = removableAreaBeging;
-					removableAreaBeging = -1;
-				} else {
-					removableAreaBeging = i;
-				}
-			}
-		}
-
-		result.name = location.getConvertedName();
-
-		// If location parameters are used, the count must match the number of
-		// formats parsed from the trace string.
-		if (!useParametersFromLocation
-				|| (types.size() == location.getParameterCount() && numberOfParametersInTagMatchSize(
-						location.getTag(), types.size()))) {
-			result.parameters = new ArrayList<ParameterConversionResult>(types
-					.size());
-			Iterator<String> itr = location.getParameters();
-			// The FormatMapping objects are converted to
-			// ParameterConversionResult objects:
-			// - Name is associated to the parameter
-			// - Extensions are created
-			for (int i = 0; i < types.size(); i++) {
-				FormatMapping mapping = types.get(i);
-				String name;
-				if (useParametersFromLocation) {
-					name = TraceUtils.convertName(trimParameter(itr.next(), i));
-				} else {
-					name = DEFAULT_PARAMETER_NAME + (i + 1);
-				}
-				ParameterConversionResult param = mapFormatToConversionResult(mapping);
-				param.name = modifyDuplicateName(result.parameters, name);
-				result.parameters.add(param);
-			}
-		} else {
-			throw new TraceCompilerException(
-					TraceCompilerErrorCode.PARAMETER_FORMAT_MISMATCH, null,
-					location);
-		}
-		return result;
-	}
-
-	
-	
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engine.source.SourceParserRule#
-	 *      processNewLocation(com.nokia.tracecompiler.engine.TraceLocation)
-	 */
-	public void processNewLocation(TraceLocation location) {
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.project.TraceLocationParser#getLocationGroup()
-	 */
-	public String getLocationGroup() {
-		return null;
-	}
-
-	/**
-	 * Maps a format to conversion result
-	 * 
-	 * @param mapping
-	 *            the mapping
-	 * @return the conversion result
-	 */
-	protected ParameterConversionResult mapFormatToConversionResult(
-			FormatMapping mapping) {
-		ParameterConversionResult param = new ParameterConversionResult();
-		param.type = mapping.type;
-		if (mapping.isArray) {
-			param.extensions = new ArrayList<TraceModelExtension>();
-			param.extensions.add(new ArrayParameterRuleImpl());
-		}
-		return param;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engine.source.SourceParserRule#
-	 *      findLocationComment(com.nokia.tracecompiler.engine.TraceLocation)
-	 */
-	public SourceExcludedArea findLocationComment(TraceLocation location) {
-		SourceParser parser = location.getParser();
-		SourceExcludedArea excludedArea = null;
-		if (parser != null) {
-			try {
-				int offset = location.getOffset() + location.getLength();
-				SourceIterator itr = parser.createIterator(offset,
-						SourceParser.SKIP_WHITE_SPACES);
-				char c = itr.next();
-				if (c == ';') {
-					offset = itr.currentIndex();
-					c = itr.next();
-				}
-				boolean skippedReturn = false;
-				int commentStart = itr.currentIndex();
-				for (int i = offset; i < commentStart; i++) {
-					c = parser.getData(i);
-					if (c == '\n') {
-						skippedReturn = true;
-					}
-				}
-				// Comment must be on same line
-				if (!skippedReturn) {
-					excludedArea = parser.getExcludedArea(commentStart);
-				}
-				if (excludedArea == null) {
-					// If comment is not on same line, the previous line is
-					// checked
-					offset = parser.findStartOfLine(location.getOffset(), true,
-							true);
-					excludedArea = parser.getExcludedArea(offset - 1);
-				}
-			} catch (SourceParserException e) {
-			}
-		}
-		return excludedArea;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engine.source.SourceParserRule#getLocationParser()
-	 */
-	public TraceLocationParser getLocationParser() {
-		return this;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.project.TraceLocationParser#
-	 *      isLocationConverted(com.nokia.tracecompiler.engine.TraceLocation)
-	 */
-	public boolean isLocationConverted(TraceLocation location) {
-		return false;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.project.TraceLocationParser#
-	 *      checkLocationValidity(com.nokia.tracecompiler.engine.TraceLocation)
-	 */
-	public TraceCompilerErrorCode checkLocationValidity(TraceLocation location) {
-		Trace trace = location.getTrace();
-		TraceCompilerErrorCode retval = TraceCompilerErrorCode.TRACE_DOES_NOT_EXIST;
-		if (trace != null) {
-			retval = TraceCompilerErrorCode.OK;
-		} else {
-			// If the API does not match the parser, the needs conversion flag
-			// is set
-			TraceProjectAPI api = getOwner().getModel().getExtension(
-					TraceProjectAPI.class);
-			if (!api.getName().equals(location.getParserRule().getName())) {
-				retval = TraceCompilerErrorCode.TRACE_NEEDS_CONVERSION;
-			}
-		}
-		return retval;
-	}
-
-	/**
-	 * Checks if the number of the parameters in the trace tag matches the size
-	 * of parameter list
-	 * 
-	 * @param tag
-	 *            the trace tag
-	 * @param size
-	 *            size of the parameter list
-	 * @return true is parameter count matches, false otherwise
-	 */
-	private boolean numberOfParametersInTagMatchSize(String tag, int size) {
-		boolean matches = true;
-		// Parse the last character of the tag to a integer
-		if (tag != null) {
-			try {
-
-				// Check the tag parameter count and compare it to the size of
-				// the parameter list
-				String tagParamStr = tag.substring(tag.length() - 1);
-				int tagParamCount = Integer.parseInt(tagParamStr);
-
-				if (tagParamCount != size) {
-					matches = false;
-				}
-			} catch (NumberFormatException e) {
-			}
-		}
-		return matches;
-	}
-
-	/**
-	 * Builds the parameter type array which is passed to convertLocation
-	 * 
-	 * @param text
-	 *            the trace text
-	 * @param simpleParameters
-	 *            true if only simple types are supported
-	 * @return the list of types
-	 * @throws TraceCompilerException
-	 *             if parser fails
-	 */
-	protected List<FormatMapping> buildParameterTypeList(String text,
-			boolean simpleParameters) throws TraceCompilerException {
-		Matcher matcher = SourceUtils.traceTextPattern.matcher(text);
-		ArrayList<FormatMapping> types = new ArrayList<FormatMapping>();
-		boolean found = true;
-		do {
-			found = matcher.find();
-			if (found) {
-				String tag = matcher.group();
-				FormatMapping mapping = SourceUtils
-						.mapFormatToParameterType(tag);
-				if (simpleParameters && !mapping.isSimple) {
-					StringErrorParameters param = new StringErrorParameters();
-					param.string = tag;
-					throw new TraceCompilerException(
-							TraceCompilerErrorCode.PARAMETER_FORMAT_NEEDS_EXT_MACRO,
-							param, null);
-				}
-				types.add(mapping);
-			}
-		} while (found);
-		return types;
-	}
-
-	/**
-	 * Changes a duplicate parameter name to unique
-	 * 
-	 * @param parameters
-	 *            the list of existing parameters
-	 * @param name
-	 *            the name
-	 * @return the modified name
-	 */
-	private String modifyDuplicateName(
-			List<ParameterConversionResult> parameters, String name) {
-		String retval = name;
-		for (ParameterConversionResult result : parameters) {
-			if (result.name.equals(name)) {
-				retval = name + (parameters.size() + 1);
-				break;
-			}
-		}
-		return retval;
-	}
-
-	/**
-	 * Trims extra stuff away from trace text
-	 * 
-	 * @param data
-	 *            the data to be trimmed
-	 * @return trimmed text
-	 */
-	protected String trimTraceText(String data) {
-		// Removes literal macros
-		for (String element : TRACE_TEXT_TAGS) {
-			if (data.startsWith(element)) {
-				data = data.substring(element.length());
-			}
-		}
-		data = data.trim();
-		// Removes the opening bracket and quotes
-		data = removeBrackets(data);
-		if (data.startsWith("\"") //$NON-NLS-1$
-				&& data.length() >= 2) { // CodForChk_Dis_Magic
-			data = data.substring(1, data.length() - 1);
-		}
-		return data;
-	}
-
-	/**
-	 * Removes the brackets around the given data
-	 * 
-	 * @param data
-	 *            the data
-	 * @return the modified data
-	 */
-	protected String removeBrackets(String data) {
-		boolean canRemove = true;
-		while (data.startsWith("(") //$NON-NLS-1$
-				&& data.endsWith(")") //$NON-NLS-1$
-				&& canRemove) {
-			// If closing bracket is found first, the first bracket cannot be
-			// removed.
-			// TODO: Does not work with for example ((Cast)abc).Func()
-			// -> (Cast)abc).Func(
-			for (int i = 1; i < data.length() - 1 && canRemove; i++) {
-				if (data.charAt(i) == '(') {
-					i = data.length();
-				} else if (data.charAt(i) == ')') {
-					canRemove = false;
-				}
-			}
-			if (canRemove) {
-				data = data.substring(1, data.length() - 1).trim();
-			}
-		}
-		return data;
-	}
-
-	/**
-	 * Trims extra stuff away from a parameter to create a parameter label
-	 * 
-	 * @param data
-	 *            the parameter data
-	 * @param index
-	 *            the parameter index. The index will be used as label if the
-	 *            label cannot be parsed
-	 * @return the parameter label
-	 */
-	protected String trimParameter(String data, int index) {
-		// Removes possible literal macros
-		data = trimTraceText(data);
-		// Removes casting operations.
-		Matcher matcher = cppCastTrimPattern.matcher(data);
-		data = removeBrackets(matcher.replaceFirst("")); //$NON-NLS-1$
-		matcher = cCastTrimPattern.matcher(data);
-		data = matcher.replaceFirst(""); //$NON-NLS-1$
-		// Finds the next valid token from the data
-		matcher = parameterNamePattern.matcher(data);
-		if (matcher.find()) {
-			data = matcher.group();
-		} else {
-			data = DEFAULT_PARAMETER_NAME + (index + 1);
-		}
-		return data;
-	}	
-}
\ No newline at end of file
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/StartOfFunctionLocationRule.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,62 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Location rule for start of function
-*
-*/
-package com.nokia.tracecompiler.engine.rules;
-
-import com.nokia.tracecompiler.engine.source.SourceLocationRule;
-
-/**
- * Location rule for start of function
- * 
- */
-final class StartOfFunctionLocationRule extends RuleBase implements
-		SourceLocationRule {
-
-	/**
-	 * Location rule offset. Should be large enough to cover a function
-	 */
-	private static final int OFFSET = -100000; // CodForChk_Dis_Magic
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engine.source.SourceLocationRule#getType()
-	 */
-	public int getLocationType() {
-		return SourceLocationRule.CONTEXT_RELATIVE;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engine.source.SourceLocationRule#getOffset()
-	 */
-	public int getLocationOffset() {
-		return OFFSET;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engine.source.SourceLocationRule#isRemovedAfterInsert()
-	 */
-	public boolean isRemovedAfterInsert() {
-		return true;
-	}
-
-}
\ No newline at end of file
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/StateTraceRule.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Rule for state traces
-*
-*/
-package com.nokia.tracecompiler.engine.rules;
-
-import com.nokia.tracecompiler.engine.utils.TraceUtils;
-import com.nokia.tracecompiler.source.SourceContext;
-
-/**
- * Rule for state traces
- * 
- */
-public class StateTraceRule extends AutomaticTraceTextRule {
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engine.rules.AutomaticTraceTextRule#
-	 *      formatTrace(com.nokia.tracecompiler.source.SourceContext)
-	 */
-	@Override
-	public String formatTrace(SourceContext context) {
-		return TraceUtils.formatTrace(RuleUtils.TEXT_FORMAT_BASE, context
-				.getClassName(), context.getFunctionName());
-	}
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/ThisPointerParameterTemplate.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Template for "this" pointer parameter.
-*
-*/
-package com.nokia.tracecompiler.engine.rules;
-
-
-/**
- * Template for "this" pointer parameter.
- * 
- */
-final class ThisPointerParameterTemplate  {
-
-	/**
-	 * Parameter name
-	 */
-	static final String PARAMETER_NAME = "this"; //$NON-NLS-1$
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/TraceFormatRuleBase.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,53 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Implementation of formatting rule
-*
-*/
-package com.nokia.tracecompiler.engine.rules;
-
-import com.nokia.tracecompiler.engine.source.TraceFormattingRule;
-import com.nokia.tracecompiler.model.Trace;
-import com.nokia.tracecompiler.project.TraceProjectAPI;
-
-/**
- * Base class for project API's. Instance of this is added to the model and
- * affect all traces which do not have their own formatter.
- * 
- */
-public abstract class TraceFormatRuleBase extends RuleBase implements
-		TraceFormattingRule, TraceProjectAPI {
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engine.source.TraceFormattingRule#
-	 *      mapNameToSource(com.nokia.tracecompiler.model.Trace)
-	 */
-	public String mapNameToSource(Trace trace) {
-		return trace.getName();
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engine.source.TraceFormattingRule#
-	 *      mapParameterCountToSource(com.nokia.tracecompiler.model.Trace, int)
-	 */
-	public String mapParameterCountToSource(Trace trace, int count) {
-		return String.valueOf(count);
-	}
-
-}
\ No newline at end of file
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/TraceParameterFormattingRuleBase.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Base class for parameter formatting rules
-*
-*/
-package com.nokia.tracecompiler.engine.rules;
-
-import com.nokia.tracecompiler.engine.source.TraceParameterFormattingRule;
-
-/**
- * Base class for parameter formatting rules
- * 
- */
-class TraceParameterFormattingRuleBase extends RuleBase implements
-		TraceParameterFormattingRule {
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engine.source.TraceParameterFormattingRule#
-	 *      isShownInSource()
-	 */
-	public boolean isShownInSource() {
-		return true;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engine.source.TraceParameterFormattingRule#
-	 *      mapNameToSource(java.lang.String)
-	 */
-	public String mapNameToSource(String originalName) {
-		return originalName;
-	}
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/ValueParameterTemplate.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Template for "value" parameter.
-*
-*/
-package com.nokia.tracecompiler.engine.rules;
-
-
-/**
- * Template for "value" parameter.
- * 
- */
-final class ValueParameterTemplate {
-
-	/**
-	 * Parameter name
-	 */
-	static final String PARAMETER_NAME = "value"; //$NON-NLS-1$
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/messages.properties	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
-AddFunctionParametersFlag.Title=Add function parameters
-AddThisPtrFlag.Title=Add "this" pointer parameter
-AddReturnParameterFlag.Title=Add return value to exit traces
-ArrayParameterFlag.Title=Array Parameter
-RuleUtils.FunctionEntryTitle=Function Entry-Exit
-RuleUtils.PerformanceEventTitle=Performance Event Entry-Exit
-RuleUtils.StateTraceTitle=State Trace
-FunctionReturnLocationMultiplierRule.InvalidReturnStatement=Exit trace was not added to source, since it might produce unwanted side effects
-RuleUtils.FailedToParseReturnValues=Failed to parse return values
-AutoAddFunctionParametersRule.UnrecognizedTypeWarning=Unrecognized type -> Traced as pointer
-AddMatchingTraceFlag.Title=Add exit traces
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/osttrace/OstConstants.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,67 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Constants for OST parser and formatter
-*
-*/
-package com.nokia.tracecompiler.engine.rules.osttrace;
-
-/**
- * Constants for OST parser and formatter
- * 
- */
-interface OstConstants {
-
-	/**
-	 * API tag for macros which have the preprocessor level parameter
-	 */
-	String PREPROCESSOR_LEVEL_TAG = "Def"; //$NON-NLS-1$
-
-	/**
-	 * API tag for function entry traces
-	 */
-	String FUNCTION_ENTRY_TAG = "FunctionEntry"; //$NON-NLS-1$
-
-	/**
-	 * API tag for function exit traces
-	 */
-	String FUNCTION_EXIT_TAG = "FunctionExit"; //$NON-NLS-1$
-
-	/**
-	 * API tag for performance event start
-	 */
-	String PERFORMANCE_EVENT_START_TAG = "EventStart"; //$NON-NLS-1$
-
-	/**
-	 * API tag for performance event stop
-	 */
-	String PERFORMANCE_EVENT_STOP_TAG = "EventStop"; //$NON-NLS-1$
-
-	/**
-	 * API tag for traces with user-defined data format
-	 */
-	String DATA_TRACE_TAG = "Data"; //$NON-NLS-1$
-	
-	/**
-	 * API tag for state traces
-	 */
-	String STATE_TRACE_TAG = "State"; //$NON-NLS-1$
-
-	/**
-	 * API tag for traces with extension parameters
-	 */
-	String EXTENSION_TRACE_TAG = "Ext"; //$NON-NLS-1$
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/osttrace/OstTraceFormatRule.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,348 +0,0 @@
-/*
- * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of "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:
- *
- * Description:
- *
- * Formatting rule for OST traces
- *
- */
-package com.nokia.tracecompiler.engine.rules.osttrace;
-
-import com.nokia.tracecompiler.engine.header.ComplexHeaderRule;
-import com.nokia.tracecompiler.engine.rules.AutomaticTraceTextRule;
-import com.nokia.tracecompiler.engine.rules.EntryTraceRule;
-import com.nokia.tracecompiler.engine.rules.ExitTraceRule;
-import com.nokia.tracecompiler.engine.rules.PerformanceEventRuleBase;
-import com.nokia.tracecompiler.engine.rules.PerformanceEventStartRule;
-import com.nokia.tracecompiler.engine.rules.PerformanceEventStopRule;
-import com.nokia.tracecompiler.engine.rules.StateTraceRule;
-import com.nokia.tracecompiler.engine.rules.TraceFormatRuleBase;
-import com.nokia.tracecompiler.model.Trace;
-import com.nokia.tracecompiler.model.TraceModelListener;
-import com.nokia.tracecompiler.model.TraceObject;
-import com.nokia.tracecompiler.model.TraceParameter;
-import com.nokia.tracecompiler.plugin.TraceFormatConstants;
-import com.nokia.tracecompiler.plugin.TraceHeaderContribution;
-import com.nokia.tracecompiler.plugin.TraceAPIFormatter.TraceFormatType;
-import com.nokia.tracecompiler.source.SourceUtils;
-
-/**
- * Formatting rule for OST traces.
- * 
- */
-public final class OstTraceFormatRule extends TraceFormatRuleBase implements
-		TraceHeaderContribution, TraceModelListener {
-
-	/**
-	 * Separator for parameters within trace text
-	 */
-	private static final String PARAMETER_VALUE_SEPARATOR = "="; //$NON-NLS-1$
-
-	/**
-	 * Separator for parameter name value
-	 */
-	private static final String PARAMETER_SEPARATOR = ";"; //$NON-NLS-1$
-
-	/**
-	 * String parameter tag
-	 */
-	private static final String STRING_PARAMETER_TAG = "%s"; //$NON-NLS-1$
-
-	/**
-	 * Hex parameter tag
-	 */
-	private static final String HEX_PARAMETER_TAG = "0x%x"; //$NON-NLS-1$
-
-	/**
-	 * SDEC parameter tag
-	 */
-	private static final String SDEC_PARAMETER_TAG = "%d"; //$NON-NLS-1$
-
-	/**
-	 * UDEC parameter tag
-	 */
-	private static final String UDEC_PARAMETER_TAG = "%u"; //$NON-NLS-1$	
-
-	/**
-	 * Category for traces
-	 */
-	private static final String TRACE_CATEGORY = "EXTRACT_GROUP_ID(aTraceID)"; //$NON-NLS-1$
-
-	/**
-	 * Name for storage
-	 */
-	public static final String STORAGE_NAME = "OstTraceFormat"; //$NON-NLS-1$
-
-	/**
-	 * OstTraceEventStart tag
-	 */
-	public static final String OST_TRACE_EVENT_START_TAG = "OstTraceEventStart"; //$NON-NLS-1$
-
-	/**
-	 * OstTraceEventStop tag
-	 */
-	public static final String OST_TRACE_EVENT_STOP_TAG = "OstTraceEventStop"; //$NON-NLS-1$
-
-	/**
-	 * Ext-function declaration format
-	 */
-	private static final String HEADER_FORMAT = "OstTraceGen" //$NON-NLS-1$
-			+ TraceFormatConstants.PARAM_COUNT_FORMAT // Number of parameters
-			+ "( TUint32 aTraceID" //$NON-NLS-1$
-			+ TraceFormatConstants.PARAMETERS_FORMAT // Trace parameters
-			+ " )"; //$NON-NLS-1$
-
-	/**
-	 * Activation query formatting
-	 */
-	private static final String ACTIVATION_FORMAT = "BTraceFiltered8( " //$NON-NLS-1$
-			+ TRACE_CATEGORY + ", " //$NON-NLS-1$
-			+ "EOstTraceActivationQuery, KOstTraceComponentID, aTraceID )"; //$NON-NLS-1$
-
-	/**
-	 * Buffered trace format
-	 */
-	private static final String TRACE_BUFFER_FORMAT = "OstSendNBytes( " //$NON-NLS-1$
-			+ TRACE_CATEGORY + ", " //$NON-NLS-1$
-			+ "EOstTrace, KOstTraceComponentID, aTraceID, " //$NON-NLS-1$
-			+ TraceFormatConstants.DATA_BUFFER_FORMAT // Trace data
-			+ ", " //$NON-NLS-1$
-			+ TraceFormatConstants.DATA_LENGTH_FORMAT // Trace data length
-			+ " );"; //$NON-NLS-1$
-
-	/**
-	 * Packed trace format
-	 */
-	private static final String TRACE_PACKED_FORMAT = "BTraceFilteredContext12( " //$NON-NLS-1$
-			+ TRACE_CATEGORY + ", " //$NON-NLS-1$
-			+ "EOstTrace, KOstTraceComponentID, aTraceID, " //$NON-NLS-1$
-			+ TraceFormatConstants.DATA_BUFFER_FORMAT // Trace data
-			+ " );"; //$NON-NLS-1$
-
-	/**
-	 * Template for the OstTraceDefinitions.h header file
-	 */
-	private static final String[] MAIN_HEADER_TEMPLATE = { "\r\n" //$NON-NLS-1$
-			+ "// OST_TRACE_COMPILER_IN_USE flag has been added by Trace Compiler\r\n" //$NON-NLS-1$
-			+ "// REMOVE BEFORE CHECK-IN TO VERSION CONTROL\r\n" //$NON-NLS-1$
-			+ "#define OST_TRACE_COMPILER_IN_USE\r\n" //$NON-NLS-1$
-			+ "#include <opensystemtrace.h>\r\n#endif\r\n" }; //$NON-NLS-1$
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.project.TraceProjectAPI#getName()
-	 */
-	public String getName() {
-		return STORAGE_NAME;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engine.source.TraceFormattingRule#
-	 * getFormat(com.nokia.tracecompiler.model.Trace,
-	 * com.nokia.tracecompiler.plugin.TraceAPIFormatter.TraceFormatType)
-	 */
-	public String getFormat(Trace trace, TraceFormatType formatType) { // CodForChk_Dis_ComplexFunc
-		String retval;
-		if (formatType == TraceFormatType.HEADER) {
-			retval = HEADER_FORMAT;
-		} else if (formatType == TraceFormatType.TRACE_BUFFER) {
-			retval = TRACE_BUFFER_FORMAT;
-		} else if (formatType == TraceFormatType.TRACE_PACKED) {
-			retval = TRACE_PACKED_FORMAT;
-		} else if (formatType == TraceFormatType.TRACE_ACTIVATION) {
-			retval = ACTIVATION_FORMAT;
-		} else {
-			retval = null;
-		}
-
-		return retval;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engine.source.SourceFormatRule#
-	 * mapParameterCountToSource(com.nokia.tracecompiler.model.Trace, int)
-	 */
-	@Override
-	public String mapParameterCountToSource(Trace trace, int count) {
-		String retval;
-		ComplexHeaderRule rule = trace.getExtension(ComplexHeaderRule.class);
-		if (rule != null && rule.getTraceIDDefineExtension() != null || trace.getExtension(EntryTraceRule.class)!= null) {
-			// Uses the extension tag with extension headers
-			retval = OstConstants.EXTENSION_TRACE_TAG;
-		} else {
-			retval = String.valueOf(count);
-		}
-		return retval;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.project.TraceHeaderContribution#
-	 * getContribution(com.nokia.tracecompiler.project.TraceHeaderContribution.
-	 * TraceHeaderContributionType)
-	 */
-	public String[] getContribution(TraceHeaderContributionType type) {
-		String[] retval = null;
-		if (type == TraceHeaderContributionType.GLOBAL_DEFINES) {
-			retval = new String[] { "KOstTraceComponentID 0x" //$NON-NLS-1$
-					+ Integer.toHexString(getOwner().getModel().getID()) };
-		} else if (type == TraceHeaderContributionType.MAIN_HEADER_CONTENT) {
-			retval = MAIN_HEADER_TEMPLATE;
-		}
-		return retval;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see
-	 * com.nokia.tracecompiler.engine.rules.ExtensionBase#setOwner(com.nokia
-	 * .tracecompiler.model.TraceObject)
-	 */
-	@Override
-	public void setOwner(TraceObject owner) {
-		if (getOwner() != null) {
-			getOwner().getModel().removeModelListener(this);
-		}
-		super.setOwner(owner);
-		if (owner != null) {
-			owner.getModel().addModelListener(this);
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.model.TraceModelListener#
-	 * objectAdded(com.nokia.tracecompiler.model.TraceObject,
-	 * com.nokia.tracecompiler.model.TraceObject)
-	 */
-	public void objectAdded(TraceObject owner, TraceObject object) {
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.model.TraceModelListener#
-	 * objectCreationComplete(com.nokia.tracecompiler.model.TraceObject)
-	 */
-	public void objectCreationComplete(TraceObject object) {
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.model.TraceModelListener#
-	 * objectRemoved(com.nokia.tracecompiler.model.TraceObject,
-	 * com.nokia.tracecompiler.model.TraceObject)
-	 */
-	public void objectRemoved(TraceObject owner, TraceObject object) {
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.model.TraceModelListener#
-	 * propertyUpdated(com.nokia.tracecompiler.model.TraceObject, int)
-	 */
-	public void propertyUpdated(TraceObject object, int property) {
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.project.TraceProjectAPI#
-	 * formatTraceForExport(com.nokia.tracecompiler.model.Trace,
-	 * com.nokia.tracecompiler.project.TraceProjectAPI.TraceFormatFlags)
-	 */
-	public String formatTraceForExport(Trace trace, TraceFormatFlags flags) {
-		// TODO: This uses default formats
-		// -> Should be configurable
-		// > for entry traces
-		// < for exit traces
-		// Logic analyzer format for performance traces
-		String retval = trace.getTrace();
-		AutomaticTraceTextRule rule = trace
-				.getExtension(AutomaticTraceTextRule.class);
-		int parameterCount = trace.getParameterCount();
-		if (rule != null) {
-			if (rule instanceof EntryTraceRule) {
-				retval = "> " //$NON-NLS-1$
-						+ retval;
-			} else if (rule instanceof ExitTraceRule) {
-				retval = "< " //$NON-NLS-1$
-						+ retval;
-			} else if (rule instanceof StateTraceRule) {
-				if (parameterCount == 2) { // CodForChk_Dis_Magic
-					retval = retval + "Machine" + PARAMETER_VALUE_SEPARATOR //$NON-NLS-1$
-							+ STRING_PARAMETER_TAG + PARAMETER_SEPARATOR
-							+ "State" + PARAMETER_VALUE_SEPARATOR //$NON-NLS-1$
-							+ STRING_PARAMETER_TAG;
-				} else {
-					retval = retval
-							+ "Machine" + PARAMETER_VALUE_SEPARATOR //$NON-NLS-1$
-							+ STRING_PARAMETER_TAG + PARAMETER_SEPARATOR
-							+ "State" + PARAMETER_VALUE_SEPARATOR //$NON-NLS-1$
-							+ STRING_PARAMETER_TAG + PARAMETER_SEPARATOR
-							+ "Instance" + PARAMETER_VALUE_SEPARATOR //$NON-NLS-1$
-							+ HEX_PARAMETER_TAG;
-				}
-			}
-
-			if (parameterCount >= 1 && !(rule instanceof StateTraceRule)) {
-				TraceParameter param;
-				for (int i = 0; i < parameterCount; i++) {
-					param = trace.getParameter(i);
-					retval += PARAMETER_SEPARATOR + param.getName()
-							+ PARAMETER_VALUE_SEPARATOR
-							+ SourceUtils.mapParameterTypeToFormat(param);
-				}
-			}
-		} else {
-			PerformanceEventRuleBase perf = trace
-					.getExtension(PerformanceEventRuleBase.class);
-			if (perf != null) {
-				if (perf instanceof PerformanceEventStartRule) {
-					retval = retval + ">" + PARAMETER_SEPARATOR //$NON-NLS-1$
-							+ "Value" + PARAMETER_VALUE_SEPARATOR //$NON-NLS-1$
-							+ SDEC_PARAMETER_TAG;
-				} else if (perf instanceof PerformanceEventStopRule) {
-					retval = retval
-							+ "<" //$NON-NLS-1$
-							+ PARAMETER_SEPARATOR
-							+ "Value" + PARAMETER_VALUE_SEPARATOR //$NON-NLS-1$
-							+ SDEC_PARAMETER_TAG
-							+ PARAMETER_SEPARATOR
-							+ "Start Event Trace ID" + PARAMETER_VALUE_SEPARATOR //$NON-NLS-1$
-							+ UDEC_PARAMETER_TAG;
-				}
-			}
-		}
-		// If formatting is not supported the format characters and parameters
-		// are removed.
-		if (!flags.isFormattingSupported) {
-			int index = retval.indexOf(PARAMETER_SEPARATOR);
-			if (index > 0) {
-				retval = retval.substring(0, index);
-			}
-			retval = SourceUtils.removePrintfFormatting(retval).trim();
-		}
-		return retval;
-	}
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/osttrace/OstTraceParserRule.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,645 +0,0 @@
-/*
- * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of "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:
- *
- * Description:
- *
- * OST trace parser rule
- *
- */
-package com.nokia.tracecompiler.engine.rules.osttrace;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import com.nokia.tracecompiler.engine.TraceLocation;
-import com.nokia.tracecompiler.engine.TraceCompilerEngineErrorCodes.TraceCompilerErrorCode;
-import com.nokia.tracecompiler.engine.rules.AutoAddFunctionParametersRule;
-import com.nokia.tracecompiler.engine.rules.AutoAddReturnParameterRule;
-import com.nokia.tracecompiler.engine.rules.AutoAddThisPtrRule;
-import com.nokia.tracecompiler.engine.rules.AutoAddValueRule;
-import com.nokia.tracecompiler.engine.rules.AutomaticTraceTextRule;
-import com.nokia.tracecompiler.engine.rules.ComplexHeaderRuleImpl;
-import com.nokia.tracecompiler.engine.rules.EntryTraceRule;
-import com.nokia.tracecompiler.engine.rules.ExitTraceRule;
-import com.nokia.tracecompiler.engine.rules.PerformanceEventStartRule;
-import com.nokia.tracecompiler.engine.rules.PerformanceEventStopRule;
-import com.nokia.tracecompiler.engine.rules.ReadOnlyObjectRuleImpl;
-import com.nokia.tracecompiler.engine.rules.SourceParserRuleBase;
-import com.nokia.tracecompiler.engine.rules.StateTraceRule;
-import com.nokia.tracecompiler.engine.source.SourceParserResult;
-import com.nokia.tracecompiler.model.TraceCompilerException;
-import com.nokia.tracecompiler.model.TraceModelExtension;
-import com.nokia.tracecompiler.model.TraceParameter;
-import com.nokia.tracecompiler.source.FormatMapping;
-import com.nokia.tracecompiler.source.SourceContext;
-import com.nokia.tracecompiler.source.SourceParser;
-
-/**
- * OST trace parser rule
- * 
- */
-public final class OstTraceParserRule extends SourceParserRuleBase {
-
-	/**
-	 * PERFORMANCE group name
-	 */
-	private static final String PERFORMANCE_GROUP_NAME = "TRACE_PERFORMANCE"; //$NON-NLS-1$
-
-	/**
-	 * STATE group name
-	 */
-	private static final String STATE_GROUP_NAME = "TRACE_STATE"; //$NON-NLS-1$
-
-	/**
-	 * FLOW group name
-	 */
-	private static final String FLOW_GROUP_NAME = "TRACE_FLOW"; //$NON-NLS-1$
-
-	/**
-	 * Data trace parameter count
-	 */
-	private static final int DATA_PARAMETER_COUNT = 2; // CodForChk_Dis_Magic
-
-	/**
-	 * Entry Ext trace parameter count
-	 */
-	private static final int ENTRY_EXT_PARAMETER_COUNT = 1; // CodForChk_Dis_Magic
-
-	/**
-	 * Exit Ext trace parameter count
-	 */
-	private static final int EXIT_EXT_PARAMETER_COUNT = 2; // CodForChk_Dis_Magic
-
-	/**
-	 * Trace parameter index list
-	 */
-	class TraceParameterIndexList {
-
-		/**
-		 * Minimum number of parameters needed to decode traces
-		 */
-		int minParamCount;
-
-		/**
-		 * Preprocessor level index
-		 */
-		int levelIndex;
-
-		/**
-		 * Trace name index
-		 */
-		int nameIndex;
-
-		/**
-		 * Trace text index
-		 */
-		int textIndex;
-
-		/**
-		 * Trace group index in case group name is free-form
-		 */
-		int groupIndex;
-
-		/**
-		 * Trace group name in case group name is pre-determined by rules
-		 */
-		String groupName;
-	}
-
-	/**
-	 * List of flags related to OST API macro
-	 */
-	class TraceParameterFlagList {
-
-		/**
-		 * Data tag
-		 */
-		boolean hasDataTag;
-
-		/**
-		 * State tag
-		 */
-		boolean hasStateTag;
-
-		/**
-		 * Ext tag
-		 */
-		boolean hasExtTag;
-
-		/**
-		 * Event start tag
-		 */
-		boolean hasEventStartTag;
-
-		/**
-		 * Event stop
-		 */
-		boolean hasEventStopTag;
-
-		/**
-		 * Function entry
-		 */
-		boolean hasFunctionEntryTag;
-
-		/**
-		 * Function exit
-		 */
-		boolean hasFunctionExitTag;
-
-		/**
-		 * Constructor
-		 * 
-		 * @param tag
-		 *            the trace tag
-		 */
-		TraceParameterFlagList(String tag) {
-			hasDataTag = tag.indexOf(OstConstants.DATA_TRACE_TAG) > 0;
-			hasStateTag = tag.indexOf(OstConstants.STATE_TRACE_TAG) > 0;
-			hasExtTag = tag.indexOf(OstConstants.EXTENSION_TRACE_TAG) > 0;
-			hasEventStartTag = tag
-					.indexOf(OstConstants.PERFORMANCE_EVENT_START_TAG) > 0;
-			hasEventStopTag = tag
-					.indexOf(OstConstants.PERFORMANCE_EVENT_STOP_TAG) > 0;
-			hasFunctionEntryTag = tag.indexOf(OstConstants.FUNCTION_ENTRY_TAG) > 0;
-			hasFunctionExitTag = tag.indexOf(OstConstants.FUNCTION_EXIT_TAG) > 0;
-		}
-
-		/**
-		 * Checks if any of the flags is set
-		 * 
-		 * @return true if flag is set
-		 */
-		boolean hasFlags() {
-			return hasDataTag || hasStateTag || hasExtTag || hasEventStartTag
-					|| hasEventStopTag || hasFunctionEntryTag
-					|| hasFunctionExitTag;
-		}
-
-	}
-
-	/**
-	 * Offset to preprocessor level
-	 */
-	private static final int PREPROCESSOR_LEVEL_OFFSET = 0; // CodForChk_Dis_Magic
-
-	/**
-	 * Offset to group name if preprocessor level is not in use
-	 */
-	private static final int GROUP_NAME_OFFSET = 0; // CodForChk_Dis_Magic
-
-	/**
-	 * Offset to trace name if preprocessor level is not in use
-	 */
-	private static final int TRACE_NAME_OFFSET = 1; // CodForChk_Dis_Magic
-
-	/**
-	 * Offset to trace text if preprocessor level is not in use
-	 */
-	private static final int TRACE_TEXT_OFFSET = 2; // CodForChk_Dis_Magic
-
-	/**
-	 * Minimum number of parameters if preprocessor level is not in use
-	 */
-	private static final int MIN_PARAMETER_COUNT = 3; // CodForChk_Dis_Magic
-
-	/**
-	 * Parser tag
-	 */
-	private static final String OST_TRACE_PARSER_TAG = "OstTrace"; //$NON-NLS-1$
-
-	/**
-	 * OstTrace parser formats
-	 */
-	private final static String[] OST_TRACE_PARSER_FORMATS = { "0", //$NON-NLS-1$
-			"1", //$NON-NLS-1$
-			"Data", //$NON-NLS-1$
-			"Ext?", //$NON-NLS-1$
-			"FunctionEntry0", //$NON-NLS-1$
-			"FunctionEntry1", //$NON-NLS-1$
-			"FunctionEntryExt", //$NON-NLS-1$
-			"FunctionExit0", //$NON-NLS-1$
-			"FunctionExit1", //$NON-NLS-1$
-			"FunctionExitExt", //$NON-NLS-1$
-			"EventStart0", //$NON-NLS-1$
-			"EventStart1", //$NON-NLS-1$
-			"EventStop", //$NON-NLS-1$
-			"Def0", //$NON-NLS-1$
-			"Def1", //$NON-NLS-1$
-			"DefData", //$NON-NLS-1$
-			"DefExt?", //$NON-NLS-1$
-			"State0", //$NON-NLS-1$
-			"State1" //$NON-NLS-1$
-	};
-
-	/**
-	 * Creates a new OstTrace parser rule
-	 */
-	public OstTraceParserRule() {
-		super(OST_TRACE_PARSER_TAG, OST_TRACE_PARSER_FORMATS);
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engine.source.SourceParserRule#getName()
-	 */
-	@Override
-	public String getName() {
-		return OstTraceFormatRule.STORAGE_NAME;
-	}
-
-	/* (non-Javadoc)
-	 * @see com.nokia.tracecompiler.engine.rules.SourceParserRuleBase#parseParameters(java.lang.String, java.util.List)
-	 */
-	@Override
-	public SourceParserResult parseParameters(String tag, List<String> list)
-			throws TraceCompilerException {
-		SourceParserResult result = new SourceParserResult();
-		TraceParameterIndexList indexList = getIndexList(tag);
-		if (list.size() >= indexList.minParamCount) {
-			// Name must exist
-			result.originalName = list.get(indexList.nameIndex);
-			result.convertedName = result.originalName;
-			// Text is optional
-			if (indexList.textIndex >= 0) {
-				result.traceText = trimTraceText(list.get(indexList.textIndex));
-			} else {
-				result.traceText = ""; //$NON-NLS-1$
-			}
-			// Group ID and preprocessor level are stored into the
-			// parser-specific data
-			result.parserData = new ArrayList<String>();
-			if (indexList.levelIndex >= 0) {
-				result.parserData.add(list.get(indexList.levelIndex));
-			}
-			if (indexList.groupIndex >= 0) {
-				result.parserData.add(list.get(indexList.groupIndex));
-			} else if (indexList.groupName != null) {
-				result.parserData.add(indexList.groupName);
-			}
-
-			// Extra parameters are converted to trace parameters
-			result.parameters = new ArrayList<String>();
-			for (int i = indexList.minParamCount; i < list.size(); i++) {
-				result.parameters.add(list.get(i));
-			}
-		} else {
-			throw new TraceCompilerException(
-					TraceCompilerErrorCode.NOT_ENOUGH_PARAMETERS);
-		}
-		return result;
-	}
-
-	/**
-	 * Gets the parameter index list based on trace tag
-	 * 
-	 * @param tag
-	 *            the trace tag
-	 * @return the index list
-	 */
-	private TraceParameterIndexList getIndexList(String tag) {
-		TraceParameterIndexList indexes = new TraceParameterIndexList();
-		indexes.levelIndex = -1;
-		if (tag.indexOf(OstConstants.FUNCTION_ENTRY_TAG) > 0
-				|| tag.indexOf(OstConstants.FUNCTION_EXIT_TAG) > 0) {
-			indexes.minParamCount = 1; // Name is mandatory
-			indexes.textIndex = -1; // No trace text
-			indexes.nameIndex = 0; // Trace name at index 0
-			indexes.groupIndex = -1; // Group is fixed to TRACE_FLOW
-			indexes.groupName = FLOW_GROUP_NAME;
-		} else if (tag.indexOf(OstConstants.STATE_TRACE_TAG) > 0) {
-			indexes.minParamCount = 1; // Name is mandatory
-			indexes.textIndex = -1; // No trace text
-			indexes.nameIndex = 0; // Trace name at index 0
-			indexes.groupIndex = -1; // Group is fixed to TRACE_STATE
-			indexes.groupName = STATE_GROUP_NAME;
-		} else if (tag.indexOf(OstConstants.PERFORMANCE_EVENT_START_TAG) > 0) {
-			// Name and event name are mandatory
-			indexes.minParamCount = 2; // CodForChk_Dis_Magic
-			indexes.textIndex = 1; // Trace text at index 1
-			indexes.nameIndex = 0; // Trace name at index 0
-			indexes.groupIndex = -1; // Group is fixed to TRACE_PERFORMANCE
-			indexes.groupName = PERFORMANCE_GROUP_NAME;
-		} else if (tag.indexOf(OstConstants.PERFORMANCE_EVENT_STOP_TAG) > 0) {
-			// Name and event name are mandatory
-			indexes.minParamCount = 2; // CodForChk_Dis_Magic
-			indexes.textIndex = 1; // Trace text at index 1
-			indexes.nameIndex = 0; // Trace name at index 0
-			indexes.groupIndex = -1; // Group is fixed to TRACE_PERFORMANCE
-			indexes.groupName = PERFORMANCE_GROUP_NAME;
-		} else {
-			indexes.minParamCount = MIN_PARAMETER_COUNT;
-			indexes.textIndex = TRACE_TEXT_OFFSET;
-			indexes.nameIndex = TRACE_NAME_OFFSET;
-			indexes.groupIndex = GROUP_NAME_OFFSET;
-		}
-		// If the trace macro contains preprocessor level, the offsets are
-		// incremented by one
-		if (tag.indexOf(OstConstants.PREPROCESSOR_LEVEL_TAG) > 0) {
-			indexes.minParamCount++;
-			if (indexes.textIndex >= 0) {
-				indexes.textIndex++;
-			}
-			if (indexes.nameIndex >= 0) {
-				indexes.nameIndex++;
-			}
-			if (indexes.groupIndex >= 0) {
-				indexes.groupIndex++;
-			}
-			indexes.levelIndex = PREPROCESSOR_LEVEL_OFFSET;
-		}
-		return indexes;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engine.source.SourceParserRule#
-	 *      convertLocation(com.nokia.tracecompiler.engine.TraceLocation)
-	 */
-	@Override
-	public TraceConversionResult convertLocation(TraceLocation location)
-			throws TraceCompilerException { // CodForChk_Dis_ComplexFunc
-		TraceParameterFlagList flags = checkParameterCount(location);
-
-		// Data tag does not have parameters
-		boolean checkParameters = !flags.hasDataTag;
-
-		List<FormatMapping> typeList;
-		if (flags.hasExtTag
-				&& (flags.hasFunctionEntryTag || flags.hasFunctionExitTag)) {
-			// Parameters are generated by AutoAdd rules
-			typeList = new ArrayList<FormatMapping>();
-			checkParameters = false;
-		} else if (!flags.hasFlags() || flags.hasDataTag || flags.hasExtTag) {
-			// If the Ext, Data or EventStart tag is present, all formats
-			// are supported. If no flags is set, only 32-bit formats are
-			// supported.
-			typeList = buildParameterTypeList(location.getTraceText(),
-					!flags.hasDataTag && !flags.hasExtTag);
-		} else if (flags.hasEventStartTag) {
-			// In case of Start1 tag value parameter is supported
-			typeList = new ArrayList<FormatMapping>();
-			// Check that does optional value exist
-			if (location.getParameterCount() == 1) {
-				FormatMapping mapping = new FormatMapping(TraceParameter.SDEC32);
-				mapping.isSimple = true;
-				typeList.add(mapping);
-			}
-			checkParameters = false;
-		} else if (flags.hasEventStopTag) {
-			// If the Event stop tag is presented, start event trace
-			// id parameter is supported
-			typeList = new ArrayList<FormatMapping>();
-			FormatMapping mapping = new FormatMapping(TraceParameter.UDEC32);
-			mapping.isSimple = true;
-			typeList.add(mapping);
-			checkParameters = false;
-
-		} else if (flags.hasStateTag) {
-			// If the State tag is presented, two ascii parameters are supported
-			// in case of State0 tag (parameter count = 2). In case of State1
-			// tag (parameter count = 3) two ascii and one 32-bit hex parameters
-			// are supported
-			typeList = new ArrayList<FormatMapping>();
-			FormatMapping mapping = new FormatMapping(TraceParameter.ASCII);
-			mapping.isSimple = true;
-			typeList.add(mapping);
-			mapping = new FormatMapping(TraceParameter.ASCII);
-			mapping.isSimple = true;
-			typeList.add(mapping);
-
-			// Check that does optional instance identifier exist
-			if (location.getParameterCount() == 3) { // CodForChk_Dis_Magic
-				mapping = new FormatMapping(TraceParameter.HEX32);
-				mapping.isSimple = true;
-				typeList.add(mapping);
-			}
-			checkParameters = false;
-		} else {
-			// If some other flag than Data, State, Ext or EventStart is set,
-			// only one 32-bit hex parameter is supported
-			typeList = new ArrayList<FormatMapping>();
-			if (location.getParameterCount() == 1) {
-				FormatMapping mapping = new FormatMapping(TraceParameter.HEX32);
-				mapping.isSimple = true;
-				typeList.add(mapping);
-			}
-		}
-		// If no flags or Ext flag is present, the parameter count needs to be
-		// verified
-		TraceConversionResult result = super.convertLocation(location,
-				checkParameters, typeList);
-		// If the extension or state tag is present, zero parameters or a single
-		// 32-bit parameter is not accepted because they do not need to generate
-		// a function into the header
-		if (((flags.hasExtTag && !flags.hasFunctionExitTag && !flags.hasFunctionEntryTag) || (flags.hasStateTag))
-				&& (typeList.size() == 0 || (typeList.size() == 1 && typeList
-						.get(0).isSimple))) {
-			throw new TraceCompilerException(
-					TraceCompilerErrorCode.PARAMETER_FORMAT_UNNECESSARY_EXT_MACRO);
-		}
-		// Ext-macros are tagged with the complex header rule, so the header
-		// gets written when traces are exported. Data-macros are tagged with
-		// read-only rule, so they are not updated via UI. Other special cases
-		// are flagged with corresponding rule.
-		// If trace text does not exist, it is created based on context
-		AutomaticTraceTextRule rule = null;
-		if (flags.hasDataTag) {
-			addRule(result, new ReadOnlyObjectRuleImpl());
-		} else if (flags.hasStateTag) {
-			addRule(result, new StateTraceRule());
-			addRule(result, new ComplexHeaderRuleImpl());
-		} else if (flags.hasEventStartTag) {
-			addRule(result, new PerformanceEventStartRule());
-			// If event value is not defined then event value 1 is automatically
-			// added to event start macros
-			if (location.getParameterCount() == 0) {
-				addRule(result, new AutoAddValueRule());
-			}
-		} else if (flags.hasEventStopTag) {
-			addRule(result, new PerformanceEventStopRule());
-			addRule(result, new ComplexHeaderRuleImpl());
-			// Event value 0 is automatically added to event stop macros
-			addRule(result, new AutoAddValueRule());
-		} else if (flags.hasFunctionEntryTag) {
-			if (flags.hasExtTag) {
-				// Entry trace may contain Ext tag. In that case the trace
-				// parameters are an instance variable and function parameters
-				// parsed from source. It is also flagged as complex, so the
-				// function gets generated to the trace header
-				addRule(result, new ComplexHeaderRuleImpl());
-				addRule(result, new AutoAddFunctionParametersRule());
-				addRule(result, new AutoAddThisPtrRule());
-			}
-			rule = new EntryTraceRule();
-			addRule(result, rule);
-		} else if (flags.hasFunctionExitTag) {
-			if (flags.hasExtTag) {
-				// Exit trace may contain Ext tag. In that case the trace has
-				// two parameters: instance variable and return statement
-				// It is also flagged as complex, so the function gets generated
-				// to the trace header
-				addRule(result, new ComplexHeaderRuleImpl());
-				addRule(result, new AutoAddThisPtrRule());
-				addRule(result, new AutoAddReturnParameterRule());
-			}
-			rule = new ExitTraceRule();
-			addRule(result, rule);
-		} else if (flags.hasExtTag) {
-			addRule(result, new ComplexHeaderRuleImpl());
-		}
-		if (rule != null) {
-			setAutoTextToTrace(location, result, rule);
-		}
-		List<String> parserData = location.getParserData();
-		result.group = parserData.get(parserData.size() - 1);
-		// The convert flag is reset to prevent further conversions
-		location.locationConverted();
-		return result;
-	}
-
-	/**
-	 * Uses the auto-text rule to create trace text
-	 * 
-	 * @param location
-	 *            the location
-	 * @param result
-	 *            the conversion result
-	 * @param rule
-	 *            the auto-text rule
-	 * @throws TraceCompilerException
-	 *             if update fails
-	 */
-	private void setAutoTextToTrace(TraceLocation location,
-			TraceConversionResult result, AutomaticTraceTextRule rule)
-			throws TraceCompilerException {
-		// The trace text comes from the auto-text rule
-		SourceParser parser = location.getParser();
-		SourceContext context = parser.getContext(location.getOffset());
-		if (context != null) {
-			result.text = rule.formatTrace(context);
-		} else {
-			throw new TraceCompilerException(
-					TraceCompilerErrorCode.NO_CONTEXT_FOR_LOCATION);
-		}
-	}
-
-	/**
-	 * Checks parameter count
-	 * 
-	 * @param location
-	 *            the location
-	 * @return the location tag flags
-	 * @throws TraceCompilerException
-	 *             if parameter count is not valid
-	 */
-	private TraceParameterFlagList checkParameterCount(TraceLocation location)
-			throws TraceCompilerException {
-		TraceParameterFlagList flags = new TraceParameterFlagList(location
-				.getTag());
-
-		// If the trace has some tag, the parameter count is fixed
-		// Data has 2 parameters
-		// State has 2 or 3 parameters
-		// Function entry-exit has 0 or 1 parameters
-		// Event start has 0 or 1 parameters
-		// Event stop has 1 parameters
-		int parameterCount = location.getParameterCount();
-
-		// Entry trace may have zero or one parameter
-		// In case of Ext, it must have one parameter
-		if (flags.hasFunctionEntryTag
-				&& ((parameterCount > 1) || (flags.hasExtTag && (parameterCount != ENTRY_EXT_PARAMETER_COUNT)))) {
-			throw new TraceCompilerException(
-					TraceCompilerErrorCode.PARAMETER_COUNT_DOES_NOT_MATCH_API);
-		}
-
-		// Exit trace may have zero or one parameter
-		// In case of Ext, it must have two parameters
-		if (flags.hasFunctionExitTag
-				&& ((!flags.hasExtTag && (parameterCount > 1)) || (flags.hasExtTag && parameterCount != EXIT_EXT_PARAMETER_COUNT))) { // CodForChk_Dis_LengthyLine
-			throw new TraceCompilerException(
-					TraceCompilerErrorCode.PARAMETER_COUNT_DOES_NOT_MATCH_API);
-		}
-
-		// Event start may have zero or one parameter
-		if (flags.hasEventStartTag && (parameterCount > 1)) {
-			throw new TraceCompilerException(
-					TraceCompilerErrorCode.PARAMETER_COUNT_DOES_NOT_MATCH_API);
-		}
-
-		// Event stop have one parameters
-		if (flags.hasEventStopTag && (parameterCount != 1)) {
-			throw new TraceCompilerException(
-					TraceCompilerErrorCode.PARAMETER_COUNT_DOES_NOT_MATCH_API);
-		}
-
-		// Data trace has two parameters
-		if ((flags.hasDataTag && (parameterCount != DATA_PARAMETER_COUNT))) {
-			throw new TraceCompilerException(
-					TraceCompilerErrorCode.PARAMETER_COUNT_DOES_NOT_MATCH_API);
-		}
-
-		// State trace may have two or three parameter
-		if (flags.hasStateTag && (parameterCount < 2 || parameterCount > 3)) { // CodForChk_Dis_Magic
-			throw new TraceCompilerException(
-					TraceCompilerErrorCode.PARAMETER_COUNT_DOES_NOT_MATCH_API);
-		}
-
-		return flags;
-	}
-
-	/**
-	 * Adds a rule to result
-	 * 
-	 * @param result
-	 *            the result
-	 * @param rule
-	 *            the rule
-	 */
-	private void addRule(TraceConversionResult result, TraceModelExtension rule) {
-		if (result.extensions == null) {
-			result.extensions = new ArrayList<TraceModelExtension>();
-		}
-		result.extensions.add(rule);
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.engine.rules.SourceParserRuleBase#
-	 * isLocationConverted(com.nokia.tracecompiler.engine.TraceLocation)
-	 */
-	@Override
-	public boolean isLocationConverted(TraceLocation location) {
-		boolean retval = location.hasChangedAfterConvert();
-		if (!retval) {
-			// Duplicate-location conversions need to be retried in case the
-			// location is no longer a duplicate
-			retval = (location.getValidityCode() == TraceCompilerErrorCode.TRACE_HAS_MULTIPLE_LOCATIONS);
-		}
-		return retval;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @seecom.nokia.tracecompiler.engine.rules.printf.PrintfTraceParserRule#
-	 * getLocationGroup()
-	 */
-	@Override
-	public String getLocationGroup() {
-		return null;
-	}
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/osttrace/package.html	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-<html><body>
-Implementation for OST format specific rules
-</body></html>
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/package.html	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,9 +0,0 @@
-<html><body>
-Provides compile-time configuration of TraceCompiler behavior. 
-The features that can be adjusted via this package are:
-<ul>
-<li>Dialog templates</li>
-<li>Trace object rules</li>
-<li>Dialog flags</li>
-</ul>
-</body></html>
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/source/Messages.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,57 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Localized strings for engine package
-*
-*/
-package com.nokia.tracecompiler.engine.source;
-
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-public class Messages {
-
-	/**
-	 * Bundle name
-	 */	
-	private static final String BUNDLE_NAME = "com.nokia.tracecompiler.engine.source.messages"; //$NON-NLS-1$
-
-	/**
-	 * Bundle
-	 */
-	private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
-			.getBundle(BUNDLE_NAME);
-
-	/**
-	 * Prevents construction
-	 */
-	private Messages() {
-	}
-
-	/**
-	 * Gets localized string based on key
-	 * 
-	 * @param key
-	 *            the resource key
-	 * @return the localized resource
-	 */
-	public static String getString(String key) {
-		try {
-			return RESOURCE_BUNDLE.getString(key);
-		} catch (MissingResourceException e) {
-			return '!' + key + '!';
-		}
-	}
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/source/SourceEngine.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,220 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Source engine manages source documents that are opened to Eclipse UI
-*
-*/
-package com.nokia.tracecompiler.engine.source;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-
-import com.nokia.tracecompiler.model.TraceCompilerException;
-import com.nokia.tracecompiler.model.TraceModel;
-import com.nokia.tracecompiler.source.SourceDocumentInterface;
-import com.nokia.tracecompiler.source.SourceDocumentMonitor;
-import com.nokia.tracecompiler.source.SourceDocumentProcessor;
-import com.nokia.tracecompiler.utils.DocumentFactory;
-
-/**
- * Source engine manages source documents that are opened to Eclipse UI.
- * 
- */
-public class SourceEngine implements SourceDocumentProcessor,
-		Iterable<SourceProperties> {
-
-	/**
-	 * Document monitor
-	 */
-	private SourceDocumentMonitor documentMonitor;
-
-	/**
-	 * Trace model listener implementation
-	 */
-	private SourceEngineModelListener modelListener = new SourceEngineModelListener(
-			this);
-
-	/**
-	 * Trace model extension listener
-	 */
-	private SourceEngineModelExtensionListener extensionListener = new SourceEngineModelExtensionListener(
-			this);
-
-	/**
-	 * The callback interfaces are notified about source file changes
-	 */
-	private ArrayList<SourceListener> listeners = new ArrayList<SourceListener>();
-
-	/**
-	 * Running flag
-	 */
-	private boolean running;
-
-	/**
-	 * Trace model
-	 */
-	private TraceModel model;
-
-	/**
-	 * Source list
-	 */
-	private ArrayList<SourceProperties> tempList = new ArrayList<SourceProperties>();
-
-	/**
-	 * Read-only files
-	 */
-	private String[] READ_ONLY = { ".h" //$NON-NLS-1$
-	};
-
-	/**
-	 * Non-source file list
-	 */
-	private ArrayList<String> nonSourceFiles = new ArrayList<String>();
-
-	/**
-	 * Constructor
-	 * 
-	 * @param model
-	 *            the trace model
-	 */
-	public SourceEngine(TraceModel model) {
-		this.model = model;
-	}
-
-	/**
-	 * Starts this engine. Does nothing if already running
-	 * @throws Exception 
-	 */
-	public void start() throws Exception {
-		if (!running) {
-			documentMonitor = DocumentFactory.getDocumentMonitor();
-			documentMonitor.startMonitor(this);
-			running = true;
-			model.addModelListener(modelListener);
-			model.addExtensionListener(extensionListener);
-		}
-	}
-
-	/**
-	 * Shuts down the source engine. Does nothing if already stopped
-	 */
-	public void shutdown() {
-		if (running) {
-			documentMonitor.stopMonitor();
-			documentMonitor = null;
-			running = false;
-			model.removeModelListener(modelListener);
-			model.removeExtensionListener(extensionListener);
-		}
-	}
-
-	/**
-	 * Adds source listener callback interface
-	 * 
-	 * @param listener
-	 *            the new listener
-	 */
-	public void addSourceListener(SourceListener listener) {
-		listeners.add(listener);
-	}
-
-	/**
-	 * Removes a source listener
-	 * 
-	 * @param listener
-	 *            the listener to be removed
-	 */
-	public void removeSourceListener(SourceListener listener) {
-		listeners.remove(listener);
-	}
-
-	/**
-	 * Gets the sources
-	 * 
-	 * @return the sources
-	 */
-	public Iterator<SourceProperties> getSources() {
-		tempList.clear();
-		for (SourceDocumentInterface doc : documentMonitor) {
-			tempList.add((SourceProperties) doc.getOwner());
-		}
-		return tempList.iterator();
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see java.lang.Iterable#iterator()
-	 */
-	public Iterator<SourceProperties> iterator() {
-		return getSources();
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.source.SourceDocumentProcessor#
-	 *      sourceOpened(com.nokia.tracecompiler.source.SourceDocumentInterface)
-	 */
-	public void sourceOpened(SourceDocumentInterface source) throws TraceCompilerException {
-		SourceProperties properties = new SourceProperties(model,
-				documentMonitor.getFactory(), source);
-		// Headers are marked read-only
-		for (String s : READ_ONLY) {
-			String fileName = properties.getFileName();
-			if (fileName != null && fileName.endsWith(s)) {
-				properties.setReadOnly(true);
-				break;
-			}
-		}
-		properties.sourceOpened();
-		source.setOwner(properties);
-		for (SourceListener l : listeners) {
-			l.sourceOpened(properties);
-		}
-	}
-
-	/**
-	 * Adds a non-source file to this list.
-	 * 
-	 * @param filePath
-	 *            the non-source file path to added
-	 */
-	public void addNonSourceFile(String filePath) {
-		nonSourceFiles.add(filePath);
-	}
-
-	/**
-	 * Removes a non-source file from this list
-	 * 
-	 * @param filePath
-	 *            the non-source file path to be removed
-	 * @return true if removed
-	 */
-	public boolean removeNonSourceFile(String filePath) {
-		boolean retVal = nonSourceFiles.remove(filePath);
-		return retVal;
-	}
-
-	/**
-	 * Gets list of non-source files
-	 * 
-	 * @return the list of non-source file paths
-	 */
-	public ArrayList<String> getNonSourceFiles() {
-		return nonSourceFiles;
-	}
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/source/SourceEngineModelExtensionListener.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,62 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Trace model extension listener implementation for SourceEngine
-*
-*/
-package com.nokia.tracecompiler.engine.source;
-
-import com.nokia.tracecompiler.model.TraceModelExtension;
-import com.nokia.tracecompiler.model.TraceModelExtensionListener;
-import com.nokia.tracecompiler.model.TraceObject;
-
-/**
- * Trace model extension listener implementation for SourceEngine
- * 
- */
-final class SourceEngineModelExtensionListener implements
-		TraceModelExtensionListener {
-
-	/**
-	 * Constructor
-	 * 
-	 * @param engine
-	 *            the source engine
-	 */
-	SourceEngineModelExtensionListener(SourceEngine engine) {
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.model.TraceModelListener#
-	 *      extensionAdded(com.nokia.tracecompiler.model.TraceObject,
-	 *      com.nokia.tracecompiler.model.TraceModelExtension)
-	 */
-	public void extensionAdded(TraceObject object, TraceModelExtension extension) {
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.model.TraceModelListener#
-	 *      extensionRemoved(com.nokia.tracecompiler.model.TraceObject,
-	 *      com.nokia.tracecompiler.model.TraceModelExtension)
-	 */
-	public void extensionRemoved(TraceObject object,
-			TraceModelExtension extension) {
-	}
-
-}
\ No newline at end of file
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/source/SourceEngineModelListener.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,77 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Trace model listener implementation for SourceEngine
-*
-*/
-package com.nokia.tracecompiler.engine.source;
-
-import com.nokia.tracecompiler.model.TraceModelListener;
-import com.nokia.tracecompiler.model.TraceObject;
-
-/**
- * Trace model listener implementation for SourceEngine
- * 
- */
-final class SourceEngineModelListener implements TraceModelListener {
-
-	/**
-	 * Constructor
-	 * 
-	 * @param engine
-	 *            the source engine
-	 */
-	SourceEngineModelListener(SourceEngine engine) {
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.model.TraceModelListener#
-	 *      objectAdded(com.nokia.tracecompiler.model.TraceObject,
-	 *      com.nokia.tracecompiler.model.TraceObject)
-	 */
-	public void objectAdded(TraceObject owner, TraceObject object) {
-		// Update is called from TraceCompiler engine
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.model.TraceModelListener#
-	 *      objectRemoved(com.nokia.tracecompiler.model.TraceObject,
-	 *      com.nokia.tracecompiler.model.TraceObject)
-	 */
-	public void objectRemoved(TraceObject owner, TraceObject object) {
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.model.TraceModelListener#
-	 *      objectCreationComplete(com.nokia.tracecompiler.model.TraceObject)
-	 */
-	public void objectCreationComplete(TraceObject object) {
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.model.TraceModelListener#
-	 *      propertyUpdated(com.nokia.tracecompiler.model.TraceObject, int)
-	 */
-	public void propertyUpdated(TraceObject object, int property) {
-	}
-}
\ No newline at end of file
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/source/SourceFormatter.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,305 +0,0 @@
-/*
- * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of "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:
- *
- * Description:
- *
- * Formatting rules are provided by Trace objects
- *
- */
-package com.nokia.tracecompiler.engine.source;
-
-import java.util.Iterator;
-
-import com.nokia.tracecompiler.engine.TraceCompilerEngineGlobals;
-import com.nokia.tracecompiler.engine.rules.StateTraceRule;
-import com.nokia.tracecompiler.model.Trace;
-import com.nokia.tracecompiler.model.TraceParameter;
-import com.nokia.tracecompiler.plugin.TraceFormatConstants;
-import com.nokia.tracecompiler.plugin.TraceAPIFormatter.TraceFormatType;
-import com.nokia.tracecompiler.source.SourceConstants;
-import com.nokia.tracecompiler.source.SourceUtils;
-import com.nokia.tracecompiler.source.SymbianConstants;
-
-/**
- * Static functions for source formatting
- * 
- */
-public class SourceFormatter {
-
-	/**
-	 * Value parameter name
-	 */
-	public static final String VALUE_PARAMETER_NAME = "value"; //$NON-NLS-1$	
-
-	/**
-	 * Event start trace id parameter name
-	 */
-	public static final String EVENT_START_TRACE_ID_PARAMETER_NAME = "linkToStart"; //$NON-NLS-1$		
-
-	/**
-	 * Constructor is hidden
-	 */
-	private SourceFormatter() {
-	}
-
-	/**
-	 * Formats a trace to string format using the formatting rule from the trace
-	 * 
-	 * @param trace
-	 *            the trace
-	 * @param formatType
-	 *            the type of format
-	 * @return the trace string
-	 */
-	public static String formatTrace(Trace trace, TraceFormatType formatType) {
-		return formatTrace(trace, null, formatType, null, false);
-	}
-
-	/**
-	 * Formats a trace to string format
-	 * 
-	 * @param trace
-	 *            the trace
-	 * @param traceRule
-	 *            the formatting rule to be used
-	 * @param formatType
-	 *            the type of format
-	 * @param tags
-	 *            the tags for parameters or null if parameter names are used
-	 * @param fixedTags
-	 *            true if the <i>tags</i> iterator is fixed, false if the
-	 *            contents of <i>tags</i> should go through
-	 *            <code>SourceRule.mapNameToSource</code>
-	 * @return the trace string
-	 */
-	static String formatTrace(Trace trace, TraceFormattingRule traceRule,
-			TraceFormatType formatType, Iterator<String> tags, boolean fixedTags) {
-		StringBuffer data = new StringBuffer();
-		String format = null;
-		if (traceRule == null) {
-
-			// If rule is not explicitly provided, it is fetched from the trace
-			traceRule = trace.getExtension(TraceFormattingRule.class);
-			if (traceRule == null) {
-
-				// If trace does not have a formatting rule, the project API's
-				// should implement default rule
-				traceRule = trace.getModel().getExtension(
-						TraceFormattingRule.class);
-			}
-		}
-		if (traceRule != null) {
-			format = traceRule.getFormat(trace, formatType);
-		}
-		if (format != null && traceRule != null) {
-			data.append(format);
-			data.append(SourceConstants.LINE_FEED);
-			buildParameterList(trace, traceRule, data, formatType, tags,
-					fixedTags);
-
-			String traceName = traceRule.mapNameToSource(trace);
-			String traceGroupName = trace.getGroup().getName();
-
-			// %NAME% is replaced with rule-mapped trace name
-			replaceData(data, traceName, TraceFormatConstants.NAME_FORMAT);
-
-			// %GROUP% is replaced with group name
-			replaceData(data, traceGroupName, TraceFormatConstants.GROUP_FORMAT);
-
-			// %TEXT% is replaced with trace text
-			replaceData(data, "\"" + trace.getTrace() //$NON-NLS-1$
-					+ "\"", TraceFormatConstants.TEXT_FORMAT); //$NON-NLS-1$
-
-			// %FORMATTED_TRACE% is replaced with trace data
-			replaceData(data, trace.getTrace(),
-					TraceFormatConstants.FORMATTED_TRACE);
-
-			// Comment is inserted before the trace
-			int index = data.indexOf(TraceFormatConstants.COMMENT_FORMAT);
-			if (index >= 0) {
-				String comment = data.substring(index + 1);
-				data.delete(index, data.length());
-				data.insert(0, comment);
-				data.append(SourceConstants.LINE_FEED);
-			}
-		}
-
-		// If trace does not have formatting, it is not shown in source
-		return data.toString();
-	}
-
-	/**
-	 * Adds the parameters to the data buffer
-	 * 
-	 * @param trace
-	 *            the trace
-	 * @param format
-	 *            the formatter from trace
-	 * @param data
-	 *            the data buffer where the formatted data is stored
-	 * @param formatType
-	 *            the format type to be applied
-	 * @param tags
-	 *            the tags for parameters or null if parameter names are used
-	 * @param fixedTags
-	 *            true if the <i>tags</i> iterator is fixed, false if the
-	 *            contents of <i>tags</i> should go through
-	 *            <code>SourceRule.mapNameToSource</code>
-	 */
-	private static void buildParameterList(Trace trace,
-			TraceFormattingRule format, StringBuffer data,
-			TraceFormatType formatType, Iterator<String> tags, boolean fixedTags) {
-
-		int count = trace.getParameterCount();
-
-		Iterator<TraceParameter> itr = trace.getParameters();
-		StringBuffer paramList = new StringBuffer();
-		// Index is incremented by one for each parameter that has been added to
-		// source
-		int parameterIndex = 0;
-		while (itr.hasNext()) {
-			TraceParameter param = itr.next();
-			TraceParameterFormattingRule rule = param
-					.getExtension(TraceParameterFormattingRule.class);
-			String name;
-			// Count and name may be adjusted by rules provided by parameters
-			if (rule != null) {
-				boolean isInSource = rule.isShownInSource();
-				// If the parameter iterator is explicitly provided, the
-				// parameter name is fetched from it. If the parameter list does
-				// not have enough tags (for example when a new parameter is
-				// added to trace) the name of the parameter is used. The source
-				// rule is used to map the parameter name to correct format
-				if (isInSource) {
-					name = getTagWithoutMapping(tags, param);
-					addParameter(paramList, param, name, ++parameterIndex,
-							formatType);
-				} else {
-					// If the parameter is not shown in source, it is skipped
-					count--;
-				}
-			} else {
-				// If the parameter is not associated with a source rule, it is
-				// added without mapping
-				name = getTagWithoutMapping(tags, param);
-				addParameter(paramList, param, name, ++parameterIndex,
-						formatType);
-			}
-		}
-		// %PC% is replaced with adjusted parameter count
-		// In case of packed trace, the header engine does the count mapping
-		if (formatType != TraceFormatType.TRACE_PACKED) {
-			String val = format.mapParameterCountToSource(trace, count);
-
-			if (trace.getExtension(StateTraceRule.class) != null
-					&& data.toString().startsWith("OstTraceState")) { //$NON-NLS-1$
-
-				// In case of State Trace macro value in trace macro is
-				// parameter count - 2
-				if (count > 1) {
-					val = String.valueOf(count - 2); // CodForChk_Dis_Magic
-				} else {
-					val = String.valueOf(count);
-				}
-			}
-			replaceData(data, val, TraceFormatConstants.PARAM_COUNT_FORMAT);
-		}
-		// %PARAMETERS% is replaced with parameter names
-		replaceData(data, paramList.toString(),
-				TraceFormatConstants.PARAMETERS_FORMAT);
-	}
-
-	/**
-	 * Gets the name for a parameter without source rule mapping. If the tags
-	 * iterator contains a valid entry, the name is fetched from it. If not, the
-	 * parameter name is used instead.
-	 * 
-	 * @param tags
-	 *            the list of tags
-	 * @param param
-	 *            the parameter
-	 * @return the parameter name
-	 */
-	private static String getTagWithoutMapping(Iterator<String> tags,
-			TraceParameter param) {
-		String name;
-		// If the parameter iterator is explicitly provided, the
-		// parameter name is fetched from it
-		if (tags != null && tags.hasNext()) {
-			name = tags.next();
-			// The list may contain 0-length items to represent
-			// that that parameter name should be used instead
-			if (name == null || name.length() == 0) {
-				name = param.getName();
-			}
-		} else {
-			name = param.getName();
-		}
-		return name;
-	}
-
-	/**
-	 * Adds a parameter to the parameter list
-	 * 
-	 * @param paramList
-	 *            the parameter list
-	 * @param param
-	 *            the parameter to be added
-	 * @param name
-	 *            a name replacement for the parameter
-	 * @param parameterIndex
-	 *            the index of the parameter
-	 * @param formatType
-	 *            the type of the format
-	 */
-	private static void addParameter(StringBuffer paramList,
-			TraceParameter param, String name, int parameterIndex,
-			TraceFormatType formatType) {
-		paramList.append(SourceConstants.PARAMETER_SEPARATOR);
-		if (formatType == TraceFormatType.HEADER) {
-			paramList.append(SourceUtils.mapParameterTypeToSymbianType(param));
-			paramList.append(SourceConstants.SPACE_CHAR);
-			paramList.append(SymbianConstants.PARAMETER_DECLARATION_PREFIX);
-			paramList.append(parameterIndex);
-		} else if (formatType == TraceFormatType.EMPTY_MACRO) {
-			paramList.append(SymbianConstants.PARAMETER_DECLARATION_PREFIX);
-			paramList.append(parameterIndex);
-		}
-	}
-
-	/**
-	 * Replaces data from the stringbuffer
-	 * 
-	 * @param data
-	 *            the data
-	 * @param replaceData
-	 *            the data to be used
-	 * @param replaceFormat
-	 *            the format to be replaced
-	 */
-	private static void replaceData(StringBuffer data, String replaceData,
-			String replaceFormat) {
-		TraceCompilerEngineGlobals.getEvents().postInfoMessage(Messages.getString("SourceFormatter.replaceAllBeginText") + replaceFormat + Messages.getString("SourceFormatter.replaceAllMiddleText") + replaceData , null); //$NON-NLS-1$ //$NON-NLS-2$
-
-		int replaceOffset = 0;
-		do {
-			replaceOffset = data.indexOf(replaceFormat, replaceOffset);
-			if (replaceOffset >= 0) {
-				data.replace(replaceOffset, replaceOffset
-						+ replaceFormat.length(), replaceData);
-				replaceOffset += replaceData.length();
-			}
-		} while (replaceOffset != -1);
-	}
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/source/SourceListener.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Interface that is notified about changes in source documents
-*
-*/
-package com.nokia.tracecompiler.engine.source;
-
-import com.nokia.tracecompiler.model.TraceCompilerException;
-
-
-/**
- * Interface that is notified about changes in source documents managed by
- * {@link SourceEngine}
- * 
- */
-public interface SourceListener {
-
-	/**
-	 * Event that is fired when a source is opened
-	 * 
-	 * @param properties
-	 *            the source properties
-	 * @throws TraceCompilerException 
-	 */
-	public void sourceOpened(SourceProperties properties) throws TraceCompilerException;
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/source/SourceLocationRule.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,65 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Rules for mapping trace model entries into source code
-*
-*/
-package com.nokia.tracecompiler.engine.source;
-
-import com.nokia.tracecompiler.model.TraceObjectRule;
-
-/**
- * Rules for relocating traces in source code
- * 
- */
-public interface SourceLocationRule extends TraceObjectRule {
-
-	/**
-	 * Rule type for context-relative location
-	 */
-	int CONTEXT_RELATIVE = 1;
-
-	/**
-	 * Rule type for absolute location
-	 */
-	int ABSOLUTE = 2;
-
-	/**
-	 * Gets the rule type
-	 * 
-	 * @return rule type
-	 */
-	public int getLocationType();
-
-	/**
-	 * Gets the offset where the trace is inserted
-	 * 
-	 * @return the offset
-	 */
-	public int getLocationOffset();
-
-	/**
-	 * Flag which determines whether this locator should be removed from the
-	 * trace after the trace has been inserted to source. If this is left to the
-	 * trace, the trace is relocated every time it is inserted.
-	 * <p>
-	 * Note that if this returns false, the extension should also be persistent
-	 * so that the relocations work over TraceCompiler restarts.
-	 * 
-	 * @return true if this should be removed after insertion
-	 */
-	public boolean isRemovedAfterInsert();
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/source/SourceParserResult.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,54 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Result from parameter parsing
-*
-*/
-package com.nokia.tracecompiler.engine.source;
-
-import java.util.List;
-
-/**
- * Result from parameter parsing
- * 
- */
-public class SourceParserResult {
-
-	/**
-	 * Trace name as parsed from source
-	 */
-	public String originalName;
-
-	/**
-	 * Parsed name after conversion to valid name
-	 */
-	public String convertedName;
-
-	/**
-	 * Trace text as parsed from source
-	 */
-	public String traceText;
-
-	/**
-	 * Parameters parsed from source
-	 */
-	public List<String> parameters;
-
-	/**
-	 * List of parser-specific data
-	 */
-	public List<String> parserData;
-
-}
\ No newline at end of file
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/source/SourceParserRule.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,131 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Rule interface for tags to be searched from source files
-*
-*/
-package com.nokia.tracecompiler.engine.source;
-
-import java.util.List;
-
-import com.nokia.tracecompiler.model.TraceCompilerException;
-import com.nokia.tracecompiler.model.TraceModelExtension;
-import com.nokia.tracecompiler.model.TraceObjectRule;
-import com.nokia.tracecompiler.project.TraceLocationParser;
-
-/**
- * Rule interface for tags to be searched from source files
- * 
- */
-public interface SourceParserRule extends TraceObjectRule {
-
-	/**
-	 * Parameter conversion result
-	 */
-	public class ParameterConversionResult {
-
-		/**
-		 * Parameter name
-		 */
-		public String name;
-
-		/**
-		 * Parameter type
-		 */
-		public String type;
-
-		/**
-		 * Parameter extensions
-		 */
-		public List<TraceModelExtension> extensions;
-	}
-
-	/**
-	 * Trace location conversion result
-	 */
-	public class TraceConversionResult {
-
-		/**
-		 * Name of the group where the trace goes to
-		 */
-		public String group;
-
-		/**
-		 * Name for the trace
-		 */
-		public String name;
-
-		/**
-		 * Text for the trace
-		 */
-		public String text;
-
-		/**
-		 * List of parameters
-		 */
-		public List<ParameterConversionResult> parameters;
-
-		/**
-		 * Extensions for the trace
-		 */
-		public List<TraceModelExtension> extensions;
-
-	}
-
-	/**
-	 * Gets the name of this parser
-	 * 
-	 * @return the name
-	 */
-	public String getName();
-
-	/**
-	 * Gets the source tag to be located from source
-	 * 
-	 * @return the tag name
-	 */
-	public String getSearchTag();
-
-	/**
-	 * Checks if the trace tag suffix is allowed
-	 * 
-	 * @param tagSuffix
-	 *            the tag to be checked
-	 * @return true if allowed, false if not
-	 */
-	public boolean isAllowedTagSuffix(String tagSuffix);
-
-	/**
-	 * Parses a parameter list found from source
-	 * 
-	 * @param tag
-	 *            the location tag
-	 * @param list
-	 *            list of parameters
-	 * @return the parameter list
-	 * @throws TraceCompilerException
-	 *             if parameter list is not valid
-	 */
-	public SourceParserResult parseParameters(String tag, List<String> list)
-			throws TraceCompilerException;
-
-	/**
-	 * Gets the location parser interface
-	 * 
-	 * @return the location parser
-	 */
-	public TraceLocationParser getLocationParser();
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/source/SourceProperties.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,471 +0,0 @@
-/*
- * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of "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:
- *
- * Description:
- *
- * Properties of a source document opened to Eclipse editor
- *
- */
-package com.nokia.tracecompiler.engine.source;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-
-import com.nokia.tracecompiler.engine.TraceCompilerEngineConfiguration;
-import com.nokia.tracecompiler.engine.TraceCompilerEngineGlobals;
-import com.nokia.tracecompiler.engine.TraceLocation;
-import com.nokia.tracecompiler.model.TraceModel;
-import com.nokia.tracecompiler.source.SourceDocumentFactory;
-import com.nokia.tracecompiler.source.SourceDocumentInterface;
-import com.nokia.tracecompiler.source.SourceIterator;
-import com.nokia.tracecompiler.source.SourceParser;
-import com.nokia.tracecompiler.source.SourceParserException;
-import com.nokia.tracecompiler.source.SourcePropertyProvider;
-import com.nokia.tracecompiler.source.SourceStringSearch;
-
-/**
- * Properties of a source document which contains trace locations
- * 
- */
-public class SourceProperties implements Iterable<TraceLocation> {
-
-	/**
-	 * Trace locations within the source
-	 */
-	private ArrayList<TraceLocation> locations = new ArrayList<TraceLocation>();
-
-	/**
-	 * Source parser
-	 */
-	private SourceParser sourceParser;
-
-	/**
-	 * Offset is stored in preProcess and reset in postProcess.
-	 */
-	private int firstChangedLocation = -1;
-
-	/**
-	 * Offset is stored in preProcess and reset in postProcess.
-	 */
-	private int firstUnchangedLocation = -1;
-
-	/**
-	 * The searchers for trace identifiers
-	 */
-	private ArrayList<SourceStringSearch> searchers = new ArrayList<SourceStringSearch>();
-
-	/**
-	 * Start index for calls to parseTrace
-	 */
-	private int searchStartIndex;
-
-	/**
-	 * Read-only flag
-	 */
-	private boolean readOnly;
-
-	/**
-	 * Creates source properties for given source document
-	 * 
-	 * @param model
-	 *            the trace model
-	 * @param framework
-	 *            the document framework
-	 * @param document
-	 *            the document
-	 */
-	SourceProperties(TraceModel model, SourceDocumentFactory framework,
-			SourceDocumentInterface document) {
-		sourceParser = new SourceParser(framework, document);
-		Iterator<SourceParserRule> parsers = model
-				.getExtensions(SourceParserRule.class);
-		while (parsers.hasNext()) {
-			// The rule defines what to search and how to interpret the
-			// parameters. It is stored into the searcher as search data
-			addParserRule(parsers.next());
-		}
-	}
-
-	/**
-	 * Gets the source parser
-	 * 
-	 * @return the parser
-	 */
-	public SourceParser getSourceParser() {
-		return sourceParser;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see java.lang.Iterable#iterator()
-	 */
-	public Iterator<TraceLocation> iterator() {
-		return locations.iterator();
-	}
-
-	/**
-	 * Gets the file name of this source
-	 * 
-	 * @return the name
-	 */
-	public String getFileName() {
-		String retval = null;
-		if (sourceParser != null) {
-			SourceDocumentInterface source = sourceParser.getSource();
-			if (source != null) {
-				SourcePropertyProvider provider = source.getPropertyProvider();
-				if (provider != null) {
-					retval = provider.getFileName();
-				}
-			}
-		}
-		return retval;
-	}
-
-	/**
-	 * Sets the read-only flag for this source. Traces cannot be added to
-	 * read-only sources, but they can be parsed for data
-	 * 
-	 * @param readOnly
-	 *            the read-only flag
-	 */
-	void setReadOnly(boolean readOnly) {
-		this.readOnly = readOnly;
-	}
-
-	/**
-	 * Gets the read-only flag
-	 * 
-	 * @return read-only flag
-	 */
-	public boolean isReadOnly() {
-		return readOnly;
-	}
-
-	/**
-	 * Source opened notification
-	 */
-	void sourceOpened() {
-		updateTraces(0, sourceParser.getDataLength());
-	}
-
-	/**
-	 * Parses the document starting from given offset and locates the trace
-	 * entries from it. The first unchanged trace entry stops the search
-	 * 
-	 * @param startOffset
-	 *            the offset where to start the search
-	 * @param endOffset
-	 *            the offset where to end the search
-	 */
-	private void updateTraces(int startOffset, int endOffset) {
-		Iterator<SourceStringSearch> itr = searchers.iterator();
-		while (itr.hasNext()) {
-			SourceStringSearch searcher = itr.next();
-			searcher.resetSearch(startOffset, endOffset);
-			updateTraces(endOffset, searcher);
-		}
-	}
-
-	/**
-	 * Uses the given SourceSearch to parse traces
-	 * 
-	 * @param end
-	 *            the offset where parser should stop
-	 * @param searcher
-	 *            the searcher
-	 */
-	private void updateTraces(int end, SourceStringSearch searcher) {
-		int offset;
-		searchStartIndex = 0;
-		// If not updating, the entries contents are processed
-		do {
-			offset = searcher.findNext();
-			try {
-				if (offset != -1 && offset < end) {
-					String tag = isValidTrace(offset, searcher
-							.getSearchString().length(), searcher, false);
-					if (tag != null) {
-						parseTrace(offset, (SourceParserRule) searcher
-								.getSearchData(), tag);
-					}
-				}
-			} catch (SourceParserException e) {
-				TraceLocation location = new TraceLocation(this, offset,
-						offset + 80);
-				TraceCompilerEngineGlobals
-						.getEvents()
-						.postErrorMessage(
-								Messages
-										.getString("SourceProperties.parsingArrowAtBeginText") + location.getFilePath() + location.getFileName() + Messages.getString("SourceProperties.parsingArrownAtMiddleText") + location.getLineNumber(), null, true); //$NON-NLS-1$ //$NON-NLS-2$
-				// If the parameters cannot be parsed, the trace is
-				// not added to the array
-			}
-		} while (offset != -1 && offset < end);
-	}
-
-	/**
-	 * Parses a trace found from the document and adds it to the document's list
-	 * of positions. The position updater keeps the trace location up-to-date.
-	 * 
-	 * @param offset
-	 *            the offset to the trace
-	 * @param parserRule
-	 *            the parser to be attached to the location
-	 * @param locationTag
-	 *            the tag of the location
-	 * @throws SourceParserException
-	 *             if trace cannot be parsed
-	 */
-	private void parseTrace(int offset, SourceParserRule parserRule,
-			String locationTag) throws SourceParserException {
-		int arrayIndex = -1;
-		// Checks the changed locations. If a matching offset if found, the
-		// location is an existing one. In that case the location is not
-		// added to the array. If an offset larger than the new offset is
-		// found from the array, the location is inserted into that slot. If
-		// all locations within the array are smaller than the new offset,
-		// the new location is inserted before the first unchanged location.
-		// Since the locations in the array are ordered, the checking can
-		// always start from the latest location that has been found from
-		// the array. The caller of this function must set
-		// parseTraceStartIndex to 0 before starting a loop where this
-		// function is called. If firstUnchangedLocation is -1, this is the
-		// first time the file is being parsed and thus all locations are
-		// checked
-		boolean found = false;
-		int searchEndIndex;
-		int newSearchStartIndex = -1;
-		if (firstUnchangedLocation >= 0) {
-			searchEndIndex = firstUnchangedLocation;
-		} else {
-			searchEndIndex = locations.size();
-		}
-		for (int i = searchStartIndex; i < searchEndIndex && !found; i++) {
-			TraceLocation location = locations.get(i);
-			// Deleted locations are ignored. If a trace was replaced, the
-			// new offset will match the offset of the deleted one.
-			if (!location.isDeleted()) {
-				// If the offset of the trace matches an existing offset,
-				// the trace is old one. If the offset within the array is
-				// larger than the source offset, the trace found from
-				// source is new.
-				if (location.getOffset() == offset) {
-					found = true;
-					// Starts the next search from the value following the
-					// trace that was found
-					searchStartIndex = i + 1;
-					arrayIndex = -1;
-				} else if (location.getOffset() > offset) {
-					found = true;
-					// A new trace will be added into the current index, so
-					// the next search will start from the same location as
-					// was checked now. The index is updated after the trace has
-					// succesfully been created
-					newSearchStartIndex = i + 1;
-					arrayIndex = i;
-				}
-			}
-		}
-		// If trace was not found from the list, the trace is new and all
-		// traces following it are also new. The start index is set to point
-		// past the first unchanged location and thus the next search will
-		// ignore the above loop.
-		if (!found) {
-			arrayIndex = searchEndIndex;
-			searchStartIndex = firstUnchangedLocation + 1;
-		}
-		if (arrayIndex >= 0) {
-			// Creates a new location if it was not found
-			ArrayList<String> list = new ArrayList<String>();
-			int endOfTrace = sourceParser
-					.tokenizeParameters(offset, list, true);
-
-			TraceLocation location = new TraceLocation(this, offset, endOfTrace
-					- offset);
-
-			// The parser rules have been associated with the searchers. The
-			// parser rule that found the location is associated with the
-			// location and used to process its parameters
-			location.setTag(locationTag);
-			location.setParserRule(parserRule);
-			location.setData(list);
-
-			TraceCompilerEngineGlobals
-					.getEvents()
-					.postInfoMessage(
-							Messages
-									.getString("SourceProperties.newTraceLocationFoundBeginText") + location.getFilePath() + location.getFileName() + Messages.getString("SourceProperties.newTraceLocationFoundMiddleText") + location.getLineNumber() + Messages.getString("SourceProperties.newTraceLocationFoundEndText") + location.getTraceText(), null); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-
-			locations.add(arrayIndex, location);
-			// The changed flag is set to newly added traces. If a location
-			// is added prior to the first changed location, the index of first
-			// changed location needs to be adjusted so that the flag gets
-			// cleared in postprocessing. Also the index of first unchanged
-			// location needs to be updated to reflect the changed array
-			if (firstUnchangedLocation >= 0) {
-				location.setContentChanged(true);
-				if (arrayIndex < firstChangedLocation) {
-					firstChangedLocation = arrayIndex;
-				}
-				firstUnchangedLocation++;
-			}
-			// Updates the search start index if trace creation was succesful
-			if (newSearchStartIndex >= 0) {
-				searchStartIndex = newSearchStartIndex;
-			}
-		}
-	}
-
-	/**
-	 * Checks that a trace is valid
-	 * 
-	 * @param offset
-	 *            offset to trace identifier
-	 * @param length
-	 *            length of trace
-	 * @param searcher
-	 *            the source searcher
-	 * @param checkMainTag
-	 *            true if the main search tag needs to be checked, false if only
-	 *            the tag suffix is checked
-	 * @return the trace tag or null if trace is not valid
-	 */
-	private String isValidTrace(int offset, int length,
-			SourceStringSearch searcher, boolean checkMainTag) {
-		String retval = null;
-		try {
-			int idlen = searcher.getSearchString().length();
-			int idend = offset + idlen;
-			if (checkMainTag) {
-				if (length >= idlen
-						&& searcher.isSearchStringMatch(sourceParser.getData(
-								offset, idlen))) {
-					// The previous character must be a separator or white space
-					if (offset == 0
-							|| !Character.isJavaIdentifierPart(sourceParser
-									.getData(offset - 1))) {
-						retval = getSearchTag(offset, idend);
-					}
-				}
-			} else {
-				// If main tag is not checked
-				retval = getSearchTag(offset, idend);
-			}
-			retval = verifyTag(searcher, retval, idlen);
-		} catch (Exception e) {
-			if (TraceCompilerEngineConfiguration.ASSERTIONS_ENABLED) {
-				TraceCompilerEngineGlobals.getEvents().postAssertionFailed(
-						"Trace validity check failed", e); //$NON-NLS-1$
-			}
-		}
-		return retval;
-	}
-
-	/**
-	 * Verifies the tag against tag suffixes from parser
-	 * 
-	 * @param searcher
-	 *            the searcher
-	 * @param tag
-	 *            the tag include main tag and suffix
-	 * @param idlen
-	 *            the length of the main tag
-	 * @return the tag if it is valid, null if not
-	 */
-	private String verifyTag(SourceStringSearch searcher, String tag, int idlen) {
-		if (tag != null) {
-			// The trace suffix is verified by the parser. For example, if
-			// search data is "SymbianTrace" and the tag found from source
-			// is "SymbianTraceData1", the parser checks if "Data1" is a
-			// valid trace tag suffix.
-			if (!((SourceParserRule) searcher.getSearchData())
-					.isAllowedTagSuffix(tag.substring(idlen))) {
-				tag = null;
-			}
-		}
-		return tag;
-	}
-
-	/**
-	 * Gets the search tag between offset and next '(' character
-	 * 
-	 * @param offset
-	 *            the start of tag
-	 * @param idend
-	 *            the end of tag
-	 * @return the tag
-	 * @throws SourceParserException
-	 *             if parser fails
-	 */
-	private String getSearchTag(int offset, int idend)
-			throws SourceParserException {
-		// Locates the parameters starting from trace identifier
-		String retval = null;
-		SourceIterator srcitr = sourceParser.createIterator(idend - 1,
-				SourceParser.SKIP_ALL);
-		boolean found = false;
-		while (srcitr.hasNext() && !found) {
-			char c = srcitr.next();
-			if (c == ';') {
-				// Trace must have parameters
-				found = true;
-			} else if (c == '(') {
-				found = true;
-				// Stores the tag into location
-				retval = sourceParser.getData(offset, srcitr.previousIndex()
-						- offset + 1);
-			} else if (srcitr.hasSkipped()) {
-				// White spaces are not allowed within trace tag
-				found = true;
-			}
-		}
-		return retval;
-	}
-
-	/**
-	 * Checks if a trace can be inserted into given location
-	 * 
-	 * @param offset
-	 *            the offset to the location
-	 * @return true if location is valid
-	 */
-	boolean checkInsertLocation(int offset) {
-		boolean retval = true;
-		try {
-			offset = sourceParser.findStartOfLine(offset, false, true);
-			if (sourceParser.isInExcludedArea(offset)) {
-				retval = false;
-			}
-		} catch (SourceParserException e) {
-			retval = false;
-		}
-		return retval;
-	}
-
-	/**
-	 * Adds a new parser
-	 * 
-	 * @param rule
-	 *            the new parser rule
-	 */
-	void addParserRule(SourceParserRule rule) {
-		SourceStringSearch searcher = sourceParser.startStringSearch(rule
-				.getSearchTag(), 0, -1, SourceParser.MATCH_WORD_BEGINNING
-				| SourceParser.SKIP_ALL);
-		searcher.setSearchData(rule);
-		searchers.add(searcher);
-	}
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/source/TraceFormattingRule.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,64 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Formatting rules are provided by Trace objects
-*
-*/
-package com.nokia.tracecompiler.engine.source;
-
-import com.nokia.tracecompiler.model.Trace;
-import com.nokia.tracecompiler.model.TraceObjectRule;
-import com.nokia.tracecompiler.plugin.TraceAPIFormatter.TraceFormatType;
-
-/**
- * Formatting rules are stored into traces as extension. When inserting a trace
- * to source the formatting rules are used to convert the trace into source file
- * representation.
- * 
- */
-public interface TraceFormattingRule extends TraceObjectRule {
-
-	/**
-	 * Gets the format for given trace
-	 * 
-	 * @param trace
-	 *            the trace
-	 * @param formatType
-	 *            the type of the format requested
-	 * @return the format
-	 */
-	public String getFormat(Trace trace, TraceFormatType formatType);
-
-	/**
-	 * Maps the trace name to name shown in source
-	 * 
-	 * @param trace
-	 *            the trace to be mapped
-	 * @return the name shown in source
-	 */
-	public String mapNameToSource(Trace trace);
-
-	/**
-	 * Maps the parameter count to source.
-	 * 
-	 * @param trace
-	 *            the trace
-	 * @param count
-	 *            the parameter count
-	 * @return mapped parameter count
-	 */
-	public String mapParameterCountToSource(Trace trace, int count);
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/source/TraceParameterFormattingRule.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Rule interface for parameters
-*
-*/
-package com.nokia.tracecompiler.engine.source;
-
-import com.nokia.tracecompiler.model.TraceObjectRule;
-
-/**
- * Rule interface for parameters. Each parameter may provide replacement text
- * for the %EXT% formatting.
- * 
- */
-public interface TraceParameterFormattingRule extends TraceObjectRule {
-
-	/**
-	 * Determines if this object should be shown in source
-	 * 
-	 * @return true if shown in source, false otherwise
-	 */
-	public boolean isShownInSource();
-
-	/**
-	 * Maps parameter name to name shown in source. Note that the original name
-	 * passed to this function is not necessarily the name returned by
-	 * getOwner().getName()
-	 * 
-	 * @param originalName
-	 *            the original name to be inserted to source
-	 * @return the name shown in source
-	 */
-	public String mapNameToSource(String originalName);
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/source/messages.properties	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,7 +0,0 @@
-SourceFormatter.replaceAllBeginText=Replacing all : 
-SourceFormatter.replaceAllMiddleText=\ by 
-SourceProperties.newTraceLocationFoundBeginText=New TraceLocation found : 
-SourceProperties.newTraceLocationFoundEndText=. Trace text: 
-SourceProperties.newTraceLocationFoundMiddleText=. Line : 
-SourceProperties.parsingArrowAtBeginText=Parsing arror at 
-SourceProperties.parsingArrownAtMiddleText=. Line : 
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/source/package.html	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-<html><body>
-Source engine monitors the source editors opened into Eclipse UI
-</body></html>
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/utils/TraceMultiplierRule.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Rule which can be used to create copies of new traces
-*
-*/
-package com.nokia.tracecompiler.engine.utils;
-
-import java.util.Iterator;
-
-import com.nokia.tracecompiler.model.Trace;
-import com.nokia.tracecompiler.model.TraceObjectRule;
-
-/**
- * Rule which can be used to create copies of new traces
- * 
- */
-public interface TraceMultiplierRule extends TraceObjectRule {
-
-	/**
-	 * Gets copies of the given trace which is about to be inserted into given
-	 * context. The new trace is added first and the the copies will be inserted
-	 * after it in the order they are received from the iterator.
-	 * 
-	 * @param trace
-	 *            the new trace
-	 * @return a list of copies
-	 */
-	public Iterator<Trace> createCopies(Trace trace);
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/utils/TraceUtils.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,147 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Utility functions related to traces
-*
-*/
-package com.nokia.tracecompiler.engine.utils;
-
-import com.nokia.tracecompiler.plugin.TraceFormatConstants;
-
-/**
- * Utility functions related to traces
- * 
- */
-public final class TraceUtils {
-
-	/**
-	 * Underscore character
-	 */
-	private static final String UNDERSCORE = "_"; //$NON-NLS-1$
-
-	/**
-	 * Underscore character
-	 */
-	private static final char UNDERSCORE_CHAR = '_';
-
-	/**
-	 * Cannot be constructed
-	 */
-	private TraceUtils() {
-	}
-
-	/**
-	 * Formats a trace
-	 * 
-	 * @param format
-	 *            the format specification
-	 * @param cname
-	 *            the class name
-	 * @param fname
-	 *            the function name
-	 * @return the formatted trace
-	 */
-	public static String formatTrace(String format, String cname, String fname) {
-		StringBuffer sb = new StringBuffer(format);
-		int cnindex = sb
-				.indexOf(TraceFormatConstants.FORMAT_CLASS_NAME_NORMAL_CASE);
-		if (cnindex >= 0) {
-			if (cname != null) {
-				sb.replace(cnindex, cnindex
-						+ TraceFormatConstants.FORMAT_CLASS_NAME_NORMAL_CASE
-								.length(), cname);
-			} else {
-				sb.replace(cnindex, cnindex
-						+ TraceFormatConstants.FORMAT_CLASS_NAME_NORMAL_CASE
-								.length(), ""); //$NON-NLS-1$
-			}
-		}
-		int cnup = sb
-				.indexOf(TraceFormatConstants.FORMAT_CLASS_NAME_UPPER_CASE);
-		if (cnup >= 0) {
-			if (cname != null) {
-				sb.replace(cnup, cnup
-						+ TraceFormatConstants.FORMAT_CLASS_NAME_UPPER_CASE
-								.length(), cname.toUpperCase());
-			} else {
-				sb.replace(cnup, cnup
-						+ TraceFormatConstants.FORMAT_CLASS_NAME_UPPER_CASE
-								.length(), ""); //$NON-NLS-1$
-			}
-		}
-		int fnindex = sb
-				.indexOf(TraceFormatConstants.FORMAT_FUNCTION_NAME_NORMAL_CASE);
-		if (fnindex >= 0) {
-			sb.replace(fnindex, fnindex
-					+ TraceFormatConstants.FORMAT_FUNCTION_NAME_NORMAL_CASE
-							.length(), fname);
-		}
-		int fnup = sb
-				.indexOf(TraceFormatConstants.FORMAT_FUNCTION_NAME_UPPER_CASE);
-		if (fnup >= 0) {
-			sb.replace(fnup, fnup
-					+ TraceFormatConstants.FORMAT_FUNCTION_NAME_UPPER_CASE
-							.length(), fname.toUpperCase());
-		}
-		return sb.toString();
-	}
-
-	/**
-	 * Replaces invalid characters with '_'
-	 * 
-	 * @param name
-	 *            name to be converted
-	 * @return the converted name
-	 */
-	public static String convertName(String name) {
-		StringBuffer sb;
-		if (name.length() > 0) {
-			boolean underscore = false;
-			sb = new StringBuffer(name);
-			if (Character.isDigit(name.charAt(0))) {
-				sb.insert(0, UNDERSCORE_CHAR);
-			}
-			for (int i = 0; i < sb.length(); i++) {
-				char c = sb.charAt(i);
-				if (!Character.isLetterOrDigit(c)) {
-					if (!underscore) {
-						sb.setCharAt(i, UNDERSCORE_CHAR);
-						underscore = true;
-					} else {
-						sb.deleteCharAt(i);
-						i--;
-					}
-				} else {
-					underscore = false;
-				}
-			}
-			if (sb.length() > 0) {
-				if (sb.charAt(sb.length() - 1) == UNDERSCORE_CHAR) {
-					sb.deleteCharAt(sb.length() - 1);
-				}
-			} else {
-				sb.append(UNDERSCORE);
-			}
-		} else {
-			sb = new StringBuffer();
-		}
-		// If parameter value is NULL, it would be used as name
-		String s = sb.toString();
-		if (s.equals("NULL")) { //$NON-NLS-1$
-			s = "_NULL"; //$NON-NLS-1$
-		}
-		return s;
-	}
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/utils/package.html	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-<html><body>
-Miscellaneus utility functions and interfaces that should not be in the public API
-</body></html>
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/file/FileCompareOutputStream.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,82 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Output stream which compares the data to existing file before writing
-*
-*/
-package com.nokia.tracecompiler.file;
-
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-
-/**
- * Output stream which writes to a byte array. When writing is complete, the
- * array contents are compared to existing file and the file is written only if
- * there are changes
- * 
- */
-public class FileCompareOutputStream extends ByteArrayOutputStream {
-
-	/**
-	 * The header file
-	 */
-	private File file;
-
-	/**
-	 * Creates a new stream
-	 * 
-	 * @param file
-	 *            the header file
-	 */
-	public FileCompareOutputStream(File file) {
-		this.file = file;
-	}
-
-	/**
-	 * Writes the buffer to file if it has changed
-	 * 
-	 * @return true if header was written, false if it matched the existing
-	 *         header
-	 * @throws IOException
-	 *             if writing fails
-	 */
-	public boolean writeFile() throws IOException {
-		// Compares the file length to number of bytes in array
-		boolean writeHeader = true;
-		if (file.length() == count) {
-			FileInputStream fis = new FileInputStream(file);
-			byte[] temp = new byte[count];
-			fis.read(temp);
-			fis.close();
-			writeHeader = false;
-			// Compares the file content
-			for (int i = 0; i < count; i++) {
-				if (temp[i] != buf[i]) {
-					writeHeader = true;
-					i = count;
-				}
-			}
-		}
-		if (writeHeader) {
-			OutputStream fos = FileUtils.createOutputStream(file);
-			writeTo(fos);
-			fos.close();
-		}
-		return writeHeader;
-	}
-}
\ No newline at end of file
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/file/FileUtils.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,218 +0,0 @@
-/*
-* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* File utility functions
-*
-*/
-package com.nokia.tracecompiler.file;
-
-import java.io.BufferedOutputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-
-import com.nokia.tracecompiler.source.SourceConstants;
-
-/**
- * File utility functions
- * 
- */
-public final class FileUtils {
-
-	/**
-	 * File copy buffer size
-	 */
-	private static final int COPY_BUFFER_SIZE = 4096; // CodForChk_Dis_Magic
-
-	/**
-	 * cpp extension
-	 */
-	public final static String CPP_EXTENSION = "cpp"; //$NON-NLS-1$	
-
-	/**
-	 * c extension
-	 */
-	public final static String C_EXTENSION = "c"; //$NON-NLS-1$	
-
-	/**
-	 * Allowed files
-	 */
-	private final static String[] FILE_FILTERS = { ".cpp", //$NON-NLS-1$
-			".c", //$NON-NLS-1$
-			".inl", //$NON-NLS-1$
-			".h" //$NON-NLS-1$
-	};
-
-	/**
-	 * MMP file extension
-	 */
-	public static final String MMP = ".mmp"; //$NON-NLS-1$
-
-	/**
-	 * number of times trying to create a directy(ies)
-	 */
-	private static final int MAX_DIRECTORY_CREATION_TRIES = 5;
-	
-	/**
-	 * Time to sleep between tries to create a directory(ies)
-	 */
-	private static final int SLEEP_TIME_BETWEEN_DIRECTORY_CREATION_TRIES = 100;
-
-	
-	/**
-	 * Creates a file output stream. This creates directories and overwriting
-	 * possible read-only flag
-	 * 
-	 * @param file
-	 *            the file
-	 * @return the file output stream
-	 * @throws FileNotFoundException
-	 *             if file cannot be created
-	 */
-	public static OutputStream createOutputStream(File file)
-			throws FileNotFoundException {
-		File parent = file.getParentFile();
-		if (!parent.exists()) {
-			createDirectories(parent);
-		}
-		FileOutputStream fos;
-		try {
-			fos = new FileOutputStream(file);
-		} catch (IOException e) {
-			if (file.exists()) {
-				file.delete();
-			}
-			fos = new FileOutputStream(file);
-		}
-		return new BufferedOutputStream(fos);
-	}
-
-	/**
-	 * Creates a copy of a file
-	 * 
-	 * @param source
-	 *            the source file
-	 * @param target
-	 *            the target file
-	 * @return true if written successfully
-	 */
-	public static boolean copyFile(File source, File target) {
-		boolean backup = true;
-		try {
-			byte[] buf = new byte[COPY_BUFFER_SIZE];
-			FileInputStream fis = new FileInputStream(source);
-			OutputStream fos = createOutputStream(target);
-			int len;
-			do {
-				len = fis.read(buf);
-				if (len > 0) {
-					fos.write(buf, 0, len);
-				}
-			} while (len > 0);
-			fis.close();
-			fos.close();
-		} catch (Exception e) {
-			backup = false;
-		}
-		return backup;
-	}
-
-	/**
-	 * Converts file separator characters
-	 * 
-	 * @param separator
-	 *            separator to be used
-	 * @param path
-	 *            string to be converted
-	 * @param addLast
-	 *            true if the converted string should end with a separator
-	 * @return the converted string
-	 */
-	public static String convertSeparators(char separator, String path,
-			boolean addLast) {
-		path = path.replace(SourceConstants.FORWARD_SLASH_CHAR, separator);
-		path = path.replace(SourceConstants.BACKSLASH_CHAR, separator);
-		String sepStr = String.valueOf(separator);
-		if (addLast && !path.endsWith(sepStr)) {
-			path += separator;
-		} else if (!addLast && path.endsWith(sepStr)) {
-			path = path.substring(0, path.length() - 1);
-		}
-		return path;
-	}
-
-	/**
-	 * Checks if given file is allowed to be opened into TraceCompiler
-	 * 
-	 * @param fileName
-	 *            the file to be checked
-	 * @return true if filtered, false if not
-	 */
-	public static boolean isFileAllowed(String fileName) {
-		boolean allowed = false;
-		fileName = fileName.toLowerCase();
-		for (String filter : FILE_FILTERS) {
-			if (fileName.endsWith(filter)) {
-				allowed = true;
-				break;
-			}
-		}
-		return allowed;
-	}
-
-	/**
-	 * Create directories safely in a multiple instances case
-	 * @param path
-	 * @param access
-	 * @return boolean pass/fail
-	 */
-	public static boolean createDirectories(File path) {
-
-		boolean retVal = true;
-
-		int tries = 0;
-
-		if (path.exists()) {
-			return retVal;
-		}
-
-		// try few times
-		while (tries < MAX_DIRECTORY_CREATION_TRIES) {
-
-			retVal = path.mkdirs();
-			// mkdirs can fail for a number of reasons including the case where
-			// the directory is open by another process. The API does not make
-			// any difference so we assume the latter case (worst case)
-			if (!retVal) { // sleep for moment and try again.
-
-				tries++;
-
-				try {
-					Thread.sleep(SLEEP_TIME_BETWEEN_DIRECTORY_CREATION_TRIES);
-				} catch (InterruptedException e) {
-					// Do nothing
-				}
-			} else { // pass
-				break;
-			}
-		}
-
-		return retVal;
-
-	}
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/licence.lic	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,17 +0,0 @@
-/*
-* This is Default Licence added by TraceCompiler
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
\ No newline at end of file
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/licence_hash.lic	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,17 +0,0 @@
-##
-# This is Default Licence added by TraceCompiler
-# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "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:
-#
-# Description: 
-#
-##
\ No newline at end of file
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/messages.properties	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,65 +0,0 @@
-TraceCompiler.componentUidIsNotValidExceptionText=Component UID is not valid : 
-TraceCompiler.invalidMmpExceptionText=Invalid mmp file : 
-TraceCompiler.invalidTraceCompilerArgumetsExceptionText=Invalid trace compiler arguments
-TraceCompiler.noSourceFilesExceptionText=No source files provided.
-TraceCompiler.settingComponentPath=Component path set to : 
-TraceCompiler.settingTracesPath=Traces path set to : 
-TraceCompiler.mkdirFailed=Failed to create directory/ies :
-TraceCompiler.TracesPathWriteProtected=Traces path is write protected :
-TraceCompilerLogger.errorPrefix=error: 
-TraceCompilerLogger.infoPrefix=info: 
-TraceCompilerLogger.warningPrefix=warning: 
-TraceCompilerModelListener.lineNumberPrefix=, line 
-TraceCompiler.UnsupportedSwitch=Unsupported switch : 
-TraceCompiler.projectNameMissing=Project name missing.
-TraceCompiler.mmpPathMissing=MMP path missing.
-TraceCompiler.tracesPathMissing=Traces path missing.
-TraceCompiler.fileListMissing=Input file list empty.
-TraceCompiler.sourceFileDoesNotExist=Source file does not exist : 
-TraceCompiler.veboseEnabled=Verbose mode enabled.
-TraceCompiler.StopOnErrorEnabled=Stop On Error enabled.
-TraceCompiler.CompNameSet=Project name set to : 
-TraceCompiler.MMPPathSet=MMP path set to : 
-TraceCompiler.UidStwich=--uid
-TraceCompiler.UidText=component uid.
-TraceCompiler.ProjectSwitch=--project
-TraceCompiler.ProjectText=project name.
-TraceCompiler.MmpSwitch= --mmp
-TraceCompiler.MmpText=mmp path
-TraceCompiler.TracesSwitch=--traces
-TraceCompiler.TracesText=traces folder path.
-TraceCompiler.VersionSwitchLong=--version
-TraceCompiler.VersionSwitchShort=-v
-TraceCompiler.VersionText=print TraceCompiler version.
-TraceCompiler.HelpSwicthLong=--help
-TraceCompiler.HelpSwitchShort=-h
-TraceCompiler.HelpText=print help
-TraceCompiler.VerboseSwitchLong=--verbose
-TraceCompiler.VerboseSwitchShort=-d
-TraceCompiler.VerboseText=print info messages.
-TraceCompiler.StopSwitchLong=--stopOnError
-TraceCompiler.StopSwitchShort=-s
-TraceCompiler.StopText=On error, stop at the end of the compilation unit.
-TraceCompiler.DisplayVersionText=TraceCompiler version 
-TraceCompiler.Options=Options:
-TraceCompiler.Value=value
-TraceCompiler.Usage=Usage: 
-TraceCompiler.UsageText=tracecompiler [options] source_file...]
-TraceCompiler.EndOfList=*ENDOFSOURCEFILES*
-TraceCompiler.MmpExtension=.mmp
-TraceCompiler.PluginPath=com/nokia/tracecompiler/decodeplugins
-TraceCompiler.DecodeText1=<DECODE_PLUGIN_NAME>
-TraceCompiler.DecodeText2=<DECODE_PLUGIN_CLASS_NAME>
-TraceCompiler.DecodePluginsNameSpace=com.nokia.tracecompiler.decodeplugins.
-TraceCompiler.Took= took 
-TraceCompiler.MS= ms
-TraceCompiler.DecodePlugin=Decode plugin 
-TraceCompiler.AddingFailed= adding failed
-TraceCompiler.Added= added
-TraceCompiler.DecodePluginFile=Decode plugin file
-TraceCompiler.DoesNotExist= does not exist
-TraceCompiler.BuildingTracesMess=Building traces...
-TraceCompiler.ReadingFilesMess=parameters read from stdin (empty lines allowed) ending with 
-TraceCompiler.ProjectCancelledMess=Project creation was cancelled
-TraceCompiler.BuildFailed=Build trace files failed.
-TraceCompiler.InvalidMMP2=Missing or can not access MMP path: 
\ No newline at end of file
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/DuplicateParameterNameModifier.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,61 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Parameter name modifier
-*
-*/
-package com.nokia.tracecompiler.model;
-
-/**
- * Parameter name modifier
- * 
- */
-final class DuplicateParameterNameModifier extends DuplicateValueModifier {
-
-	/**
-	 * The parameter owner
-	 */
-	private Trace owner;
-
-	/**
-	 * Constructor
-	 * 
-	 * @param owner
-	 *            the owner of the parameter
-	 * @param name
-	 *            the parameter name
-	 */
-	DuplicateParameterNameModifier(Trace owner, String name) {
-		super(name);
-		this.owner = owner;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.model.TraceObjectUtils.DuplicateValueModifier#
-	 *      findObject(java.lang.String)
-	 */
-	@Override
-	TraceObject findObject(String name) {
-		TraceObject retval;
-		if (owner != null) {
-			retval = owner.findParameterByName(name);
-		} else {
-			retval = null;
-		}
-		return retval;
-	}
-}
\ No newline at end of file
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/DuplicateValueModifier.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,183 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Base class for value modifiers
-*
-*/
-package com.nokia.tracecompiler.model;
-
-/**
- * Base class for value modifiers
- * 
- */
-abstract class DuplicateValueModifier implements TraceObjectModifier {
-
-	/**
-	 * Duplicate tag for values
-	 */
-	private static final String DUPLICATE_TAG = "DUP"; //$NON-NLS-1$
-
-	/**
-	 * Duplicate tag separator
-	 */
-	private static final char DUPLICATE_SEPARATOR = '_';
-
-	/**
-	 * Value
-	 */
-	private String value;
-
-	/**
-	 * Changed flag
-	 */
-	private boolean changed;
-
-	/**
-	 * Constructor
-	 * 
-	 * @param value
-	 *            the value
-	 */
-	DuplicateValueModifier(String value) {
-		this.value = value;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.model.TraceObjectUtils.TraceObjectModifier#getData()
-	 */
-	public String getData() {
-		return value;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.model.TraceObjectUtils.TraceObjectModifier#hasChanged()
-	 */
-	public boolean hasChanged() {
-		return changed;
-	}
-
-	/**
-	 * Gets the separator character
-	 * 
-	 * @return the char
-	 */
-	protected char getSeparator() {
-		return DUPLICATE_SEPARATOR;
-	}
-
-	/**
-	 * Processes the name and modifies if there are duplicates
-	 */
-	void processName() {
-		int index = getStartIndex(value);
-		TraceObject object;
-		do {
-			object = findObject(value);
-			if (object != null) {
-				changed = true;
-				value = appendIndexToString(value, index);
-				index++;
-			}
-		} while (object != null);
-	}
-
-	/**
-	 * Gets the start index from given text
-	 * 
-	 * @param value
-	 *            the value to be parsed
-	 * @return the start index
-	 */
-	private int getStartIndex(String value) {
-		String valueStr = null;
-		if (value.startsWith(DUPLICATE_TAG)) {
-			for (int i = DUPLICATE_TAG.length(); i < value.length(); i++) {
-				char c = value.charAt(i);
-				if (!Character.isDigit(c)) {
-					valueStr = value.substring(DUPLICATE_TAG.length(), i);
-					i = value.length();
-				}
-			}
-		}
-		int retval = -1;
-		if (valueStr != null && valueStr.length() > 0) {
-			retval = Integer.parseInt(valueStr);
-		}
-		return retval;
-	}
-
-	/**
-	 * Appends an index value to given string replacing existing index if it
-	 * exists
-	 * 
-	 * @param value
-	 *            the string
-	 * @param index
-	 *            the index
-	 * @return the changed string
-	 */
-	private String appendIndexToString(String value, int index) {
-		StringBuffer newValue = new StringBuffer();
-		if (index >= 0) {
-			String indexStr = String.valueOf(index);
-			newValue.append(DUPLICATE_TAG);
-			newValue.append(String.valueOf(index + 1));
-			newValue.append(getSeparator());
-			newValue.append(value.substring(DUPLICATE_TAG.length()
-					+ indexStr.length() + 1)); // Add separator
-		} else {
-			newValue.append(DUPLICATE_TAG);
-			newValue.append("1"); //$NON-NLS-1$
-			newValue.append(getSeparator());
-			newValue.append(value);
-		}
-		return newValue.toString();
-	}
-
-	/**
-	 * Gets the duplicate modifier from beginning of given text
-	 * 
-	 * @param text
-	 *            the text
-	 * @return the modifier
-	 */
-	static String getModifier(String text) {
-		String retval = null;
-		if (text.startsWith(DUPLICATE_TAG)) {
-			for (int i = DUPLICATE_TAG.length(); i < text.length(); i++) {
-				char c = text.charAt(i);
-				if (!Character.isDigit(c)) {
-					retval = text.substring(0, i + 1); // Add separator
-					i = text.length();
-				}
-			}
-		}
-		return retval;
-	}
-
-	/**
-	 * Finds the object from model
-	 * 
-	 * @param value
-	 *            the value
-	 * @return the object or null if not found
-	 */
-	abstract TraceObject findObject(String value);
-
-}
\ No newline at end of file
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/Trace.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,273 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Represents the mapping of a trace ID into actual trace string
-*
-*/
-package com.nokia.tracecompiler.model;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-
-/**
- * Represents the mapping of a trace ID into actual trace string. When a trace
- * is decoded, the trace ID found from the binary trace file is converted to the
- * text stored in this trace.
- * 
- */
-public class Trace extends TraceObject implements Iterable<TraceParameter> {
-
-	/**
-	 * The trace string
-	 */
-	private String trace = ""; //$NON-NLS-1$
-
-	/**
-	 * List of TraceParameter objects.
-	 */
-	private ArrayList<TraceParameter> parameters = new ArrayList<TraceParameter>();
-
-	/**
-	 * The trace group this trace belongs to
-	 */
-	private TraceGroup group;
-
-	/**
-	 * Creates a new trace and associates it with given TraceGroup
-	 * 
-	 * @param group
-	 *            the trace group
-	 */
-	Trace(TraceGroup group) {
-		setModel(group.getModel());
-		this.group = group;
-		group.addTrace(this);
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.model.TraceObject#reset()
-	 */
-	@Override
-	void reset() {
-		super.reset();
-		for (TraceParameter parameter : parameters) {
-			// Model listeners are not notified on reset, but if the
-			// parameter itself implements a delete notification interface,
-			// it must be called to do appropriate cleanup
-			notifyOnDelete(parameter);
-			parameter.reset();
-		}
-		parameters.clear();
-	}
-
-	/**
-	 * Sets the trace string. Generates propertyUpdated event to model listeners
-	 * if the string changes
-	 * 
-	 * @see TraceModelListener#propertyUpdated(TraceObject, int)
-	 * @param trace
-	 *            the trace string
-	 * @throws TraceCompilerException 
-	 */
-	public void setTrace(String trace) throws TraceCompilerException {
-		if (trace == null) {
-			trace = ""; //$NON-NLS-1$
-		}
-		if (!trace.equals(this.trace)) {
-			this.trace = trace;
-			getModel().notifyPropertyUpdated(this, TraceModelListener.TRACE);
-		}
-	}
-
-	/**
-	 * Returns the trace string. This never returns null
-	 * 
-	 * @return the trace string
-	 */
-	public String getTrace() {
-		return trace;
-	}
-
-	/**
-	 * Returns the group to which this trace belongs
-	 * 
-	 * @return trace group
-	 */
-	public TraceGroup getGroup() {
-		return group;
-	}
-
-	/**
-	 * Adds a new parameter to the end of parameter list. Generates objectAdded
-	 * event to model listeners
-	 * 
-	 * @see TraceModelListener#objectAdded(TraceObject, TraceObject)
-	 * @param parameter
-	 *            the new parameter
-	 */
-	public void addParameter(TraceParameter parameter) {
-		parameters.add(parameter);
-		getModel().notifyObjectAdded(this, parameter);
-	}
-
-	/**
-	 * Inserts a new parameter to the given location. Generates objectAdded
-	 * event to model listeners
-	 * 
-	 * @see TraceModelListener#objectAdded(TraceObject, TraceObject)
-	 * @param index
-	 *            the index for new parameter
-	 * @param parameter
-	 *            the new parameter
-	 */
-	void insertParameter(int index, TraceParameter parameter) {
-		parameters.add(index, parameter);
-		getModel().notifyObjectAdded(this, parameter);
-	}
-
-	/**
-	 * Removes a parameter from this trace object. Generates a objectRemoved
-	 * event to model listeners if the parameter is actually removed
-	 * 
-	 * @see TraceModelListener#objectRemoved(TraceObject, TraceObject)
-	 * @param parameter
-	 *            the parameter to be removed
-	 * @throws TraceCompilerException 
-	 */
-	public void removeParameter(TraceParameter parameter) throws TraceCompilerException {
-		if (parameters.remove(parameter)) {
-			getModel().notifyObjectRemoved(this, parameter);
-			parameter.reset();
-		}
-	}
-
-	/**
-	 * Removes parameter at given index
-	 * 
-	 * @param index
-	 *            the index of the parameter
-	 * @throws TraceCompilerException 
-	 */
-	public void removeParameterAt(int index) throws TraceCompilerException {
-		if (index >= 0 && index < parameters.size()) {
-			TraceParameter parameter = parameters.get(index);
-			parameters.remove(index);
-			getModel().notifyObjectRemoved(this, parameter);
-			parameter.reset();
-		}
-	}
-
-	/**
-	 * Determines if this object has parameters.
-	 * 
-	 * @return true if this object has parameters
-	 */
-	public boolean hasParameters() {
-		return !parameters.isEmpty();
-	}
-
-	/**
-	 * Gets the number of parameters
-	 * 
-	 * @return the number of parameters
-	 */
-	public int getParameterCount() {
-		return parameters.size();
-	}
-
-	/**
-	 * Returns highest parameter ID + 1. Can be used to create an unique ID for
-	 * a new parameter.
-	 * 
-	 * @return the next parameter ID
-	 */
-	public int getNextParameterID() {
-		int max = 0;
-		for (TraceParameter parameter : parameters) {
-			int id = parameter.getID();
-			if (id > max) {
-				max = id;
-			}
-		}
-		return max + 1;
-	}
-
-	/**
-	 * Gets the parameter at given index
-	 * 
-	 * @param index
-	 *            the parameter index
-	 * @return the parameter at the index
-	 */
-	public TraceParameter getParameter(int index) {
-		return parameters.get(index);
-	}
-
-	/**
-	 * Returns the parameters of this object
-	 * 
-	 * @return iterator over the parameters
-	 */
-	public Iterator<TraceParameter> getParameters() {
-		return parameters.iterator();
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see java.lang.Iterable#iterator()
-	 */
-	public Iterator<TraceParameter> iterator() {
-		return parameters.iterator();
-	}
-
-	/**
-	 * Gets a parameter by ID
-	 * 
-	 * @param id
-	 *            the parameter ID
-	 * @return the parameter or null
-	 */
-	public TraceParameter findParameterByID(int id) {
-		TraceParameter retval = null;
-		for (TraceParameter parameter : parameters) {
-			if (parameter.getID() == id) {
-				retval = parameter;
-				break;
-			}
-		}
-		return retval;
-	}
-
-	/**
-	 * Gets a parameter by name
-	 * 
-	 * @param name
-	 *            the name of a parameter
-	 * @return the parameter or null
-	 */
-	public TraceParameter findParameterByName(String name) {
-		TraceParameter retval = null;
-		for (TraceParameter parameter : parameters) {
-			if (parameter.getName().equals(name)) {
-				retval = parameter;
-				break;
-			}
-		}
-		return retval;
-	}
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceCompilerErrorParameters.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Parameters for errors
-*
-*/
-package com.nokia.tracecompiler.model;
-
-/**
- * Parameters for errors
- * 
- */
-public class TraceCompilerErrorParameters {
-
-}
\ No newline at end of file
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceCompilerException.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,164 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Exceptions thrown by TraceCompiler engine
-*
-*/
-package com.nokia.tracecompiler.model;
-
-/**
- * Exceptions thrown by TraceCompiler engine
- * 
- */
-public class TraceCompilerException extends Exception {
-
-	/**
-	 * Error codes for TraceCompiler exceptions
-	 * 
-	 */
-	public interface TraceCompilerExceptionCode {
-	}
-
-	/**
-	 * UID
-	 */
-	private static final long serialVersionUID = -2991616409482985157L; // CodForChk_Dis_Magic
-
-	/**
-	 * Error code
-	 */
-	private TraceCompilerExceptionCode errorCode;
-
-	/**
-	 * Error parameters
-	 */
-	private TraceCompilerErrorParameters parameters;
-
-	/**
-	 * Source object
-	 */
-	private Object source;
-
-	/**
-	 * Flag that defines will event related to exception posted to trace event view
-	 */
-	private boolean postEvent = true;
-	
-	/**
-	 * Constructor with error code
-	 * 
-	 * @param errorCode
-	 *            the error code
-	 */
-	public TraceCompilerException(TraceCompilerExceptionCode errorCode) {
-		this.errorCode = errorCode;
-	}
-	
-	/**
-	 * Constructor with error code and postEvent flag
-	 * 
-	 * @param errorCode
-	 *            the error code
-	 * @param postEvent
-	 *            flag that defines will event related to exception posted to trace event view   
-	 */
-	public TraceCompilerException(TraceCompilerExceptionCode errorCode, boolean postEvent) {
-		this.errorCode = errorCode;
-		this.postEvent = postEvent;
-	}
-
-	/**
-	 * Constructor with error code and parameters
-	 * 
-	 * @param errorCode
-	 *            the error code
-	 * @param parameters
-	 *            the error parameters
-	 */
-	public TraceCompilerException(TraceCompilerExceptionCode errorCode,
-			TraceCompilerErrorParameters parameters) {
-		this.errorCode = errorCode;
-		this.parameters = parameters;
-	}
-
-	/**
-	 * Constructor with error code, parameters and source object
-	 * 
-	 * @param errorCode
-	 *            the error code
-	 * @param parameters
-	 *            the error parameters
-	 * @param source
-	 *            the source object
-	 */
-	public TraceCompilerException(TraceCompilerExceptionCode errorCode,
-			TraceCompilerErrorParameters parameters, Object source) {
-		this.errorCode = errorCode;
-		this.parameters = parameters;
-		this.source = source;
-	}
-	
-	/**
-	 * Constructor with error code and root cause
-	 * 
-	 * @param errorCode
-	 *            the error code
-	 * @param cause
-	 *            the reason for this exception
-	 */
-	public TraceCompilerException(TraceCompilerExceptionCode errorCode,
-			Throwable cause) {
-		super(cause);
-		this.errorCode = errorCode;
-	}
-
-	/**
-	 * Gets the error code
-	 * 
-	 * @return error code
-	 */
-	public TraceCompilerExceptionCode getErrorCode() {
-		return errorCode;
-	}
-
-	/**
-	 * Gets the parameters related to the error
-	 * 
-	 * @return the parameters
-	 */
-	public TraceCompilerErrorParameters getErrorParameters() {
-		return parameters;
-	}
-
-	/**
-	 * Gets the source of this error
-	 * 
-	 * @return the source
-	 */
-	public Object getErrorSource() {
-		return source;
-	}
-
-	/**
-	 * Is event related to exception wanted to post to trace event view
-	 * 
-	 * @return true is event is wanted to post trace event view
-	 *         false is event is not wanted to post trace event view
-	 */
-	public boolean isEventWantedToPost() {
-		return postEvent;
-	}
-	
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceConstantTable.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,253 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Integer-to-string mapping table for parameters
-*
-*/
-package com.nokia.tracecompiler.model;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-
-/**
- * Integer-to-string mapping table for parameters
- * 
- */
-public class TraceConstantTable extends TraceObject implements
-		Iterable<TraceConstantTableEntry> {
-
-	/**
-	 * Table entries
-	 */
-	private ArrayList<TraceConstantTableEntry> entries = new ArrayList<TraceConstantTableEntry>();
-
-	/**
-	 * Table type
-	 */
-	private String type = TraceParameter.UDEC32;
-
-	/**
-	 * Parameter reference count
-	 */
-	private ArrayList<TraceParameter> parameterReferences = new ArrayList<TraceParameter>();
-
-	/**
-	 * Creates a new constant table
-	 * 
-	 * @param model
-	 *            the trace model
-	 */
-	TraceConstantTable(TraceModel model) {
-		setModel(model);
-		model.addConstantTable(this);
-	}
-
-	/**
-	 * Gets the type
-	 * 
-	 * @return the type
-	 */
-	public String getType() {
-		return type;
-	}
-
-	/**
-	 * Sets the constant type
-	 * 
-	 * @param type
-	 *            the parameter type
-	 */
-	public void setType(String type) {
-		this.type = type;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.model.TraceObject#setName(java.lang.String)
-	 */
-	@Override
-	public void setName(String name) throws TraceCompilerException {
-		super.setName(name);
-		// Note: Currently name changes are disabled when a table is referenced
-		// by parameters. If enabled at some point, a notification about this
-		// needs to be sent to the parameters
-	}
-
-	/**
-	 * Adds a constant table entry to this table. This is called from the
-	 * constant table entry constructor, to this is not public. Generates a
-	 * objectAdded event to model listeners
-	 * 
-	 * @see TraceModelListener#objectAdded(TraceObject, TraceObject)
-	 * @param entry
-	 *            the table entry
-	 */
-	void addEntry(TraceConstantTableEntry entry) {
-		entries.add(entry);
-		getModel().notifyObjectAdded(this, entry);
-	}
-
-	/**
-	 * Removes the given constant table entry. Creates a objectRemoved event to
-	 * the model listeners
-	 * 
-	 * @see TraceModelListener#objectRemoved(TraceObject, TraceObject)
-	 * @param entry
-	 *            the entry to be removed
-	 * @throws TraceCompilerException 
-	 */
-	public void removeEntry(TraceConstantTableEntry entry) throws TraceCompilerException {
-		if (entries.remove(entry)) {
-			getModel().notifyObjectRemoved(this, entry);
-			entry.reset();
-		}
-	}
-
-	/**
-	 * Gets the entry which has given ID
-	 * 
-	 * @param id
-	 *            the id
-	 * @return the entry or null
-	 */
-	public TraceConstantTableEntry findEntryByID(int id) {
-		TraceConstantTableEntry retval = null;
-		for (TraceConstantTableEntry entry : entries) {
-			if (entry.getID() == id) {
-				retval = entry;
-				break;
-			}
-		}
-		return retval;
-	}
-
-	/**
-	 * Gets the entry which has the given name
-	 * 
-	 * @param name
-	 *            the name
-	 * @return the entry or null
-	 */
-	public TraceConstantTableEntry findEntryByName(String name) {
-		TraceConstantTableEntry retval = null;
-		for (TraceConstantTableEntry entry : entries) {
-			if (entry.getName().equals(name)) {
-				retval = entry;
-				break;
-			}
-		}
-		return retval;
-	}
-
-	/**
-	 * Gets the constant table entries
-	 * 
-	 * @return the entries iterator
-	 */
-	public Iterator<TraceConstantTableEntry> getEntries() {
-		return entries.iterator();
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see java.lang.Iterable#iterator()
-	 */
-	public Iterator<TraceConstantTableEntry> iterator() {
-		return entries.iterator();
-	}
-
-	/**
-	 * Determines if there are any entries in this table
-	 * 
-	 * @return true if there are entries
-	 */
-	public boolean hasEntries() {
-		return !entries.isEmpty();
-	}
-
-	/**
-	 * Adds a parameter reference
-	 * 
-	 * @param parameter
-	 *            the parameter to be added
-	 */
-	void addParameterReference(TraceParameter parameter) {
-		parameterReferences.add(parameter);
-	}
-
-	/**
-	 * Removes a parameter reference
-	 * 
-	 * @param parameter
-	 *            the reference to be removed
-	 */
-	void removeParameterReference(TraceParameter parameter) {
-		parameterReferences.remove(parameter);
-	}
-
-	/**
-	 * Checks if there are parameter references
-	 * 
-	 * @return true if this table is referenced from parameters
-	 */
-	public boolean hasParameterReferences() {
-		return !parameterReferences.isEmpty();
-	}
-
-	/**
-	 * Gets the parameter references
-	 * 
-	 * @return the iterator of the references
-	 */
-	public Iterator<TraceParameter> getParameterReferences() {
-		return parameterReferences.iterator();
-	}
-
-	/**
-	 * Gets the largest constant ID + 1
-	 * 
-	 * @return the ID
-	 */
-	public int getNextEntryID() {
-		int max = 0;
-		for (TraceConstantTableEntry entry : entries) {
-			int id = entry.getID();
-			if (id > max) {
-				max = id;
-			}
-		}
-		return max + 1;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.model.TraceObject#reset()
-	 */
-	@Override
-	void reset() {
-		for (TraceConstantTableEntry entry : entries) {
-			// Model listeners are not notified on reset, but if the
-			// entry itself implements a delete notification interface,
-			// it must be called to do appropriate cleanup
-			notifyOnDelete(entry);
-			entry.reset();
-		}
-		super.reset();
-	}
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceConstantTableEntry.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,53 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* One entry in the integer-to-string mapping table
-*
-*/
-package com.nokia.tracecompiler.model;
-
-/**
- * One entry in the integer-to-string mapping table
- * 
- */
-public class TraceConstantTableEntry extends TraceObject {
-
-	/**
-	 * Constant table that owns this parameter
-	 */
-	private TraceConstantTable table;
-
-	/**
-	 * Constructor
-	 * 
-	 * @param table
-	 *            the constant table that owns this entry
-	 */
-	TraceConstantTableEntry(TraceConstantTable table) {
-		setModel(table.getModel());
-		this.table = table;
-		table.addEntry(this);
-	}
-
-	/**
-	 * Gets the table that owns this entry
-	 * 
-	 * @return the table
-	 */
-	public TraceConstantTable getTable() {
-		return table;
-	}
-
-}
\ No newline at end of file
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceGroup.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,205 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Represents a logical collection of traces somehow related to each other
-*
-*/
-package com.nokia.tracecompiler.model;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Iterator;
-
-/**
- * Represents a logical collection of traces somehow related to each other. Each
- * trace group specifies a prefix that is attached to all trace lines made
- * within that group.
- * 
- */
-public class TraceGroup extends TraceObject implements Iterable<Trace> {
-
-	/**
-	 * List of traces, sorted by ID
-	 */
-	private ArrayList<Trace> tracesByID = new ArrayList<Trace>();
-
-	/**
-	 * List of traces, sorted by name
-	 */
-	private ArrayList<Trace> tracesByName = new ArrayList<Trace>();
-
-	/**
-	 * Creates a new trace group and associates it with given trace model.
-	 * 
-	 * @param model
-	 *            the trace model
-	 */
-	TraceGroup(TraceModel model) {
-		setModel(model);
-		model.addGroup(this);
-	}
-
-	/**
-	 * Adds a trace to this group. Creates objectAdded event to model listeners
-	 * 
-	 * @see TraceModelListener#objectAdded(TraceObject, TraceObject)
-	 * @param trace
-	 *            the trace to be added
-	 */
-	void addTrace(Trace trace) {
-		// Sorted when ID is set to trace
-		tracesByID.add(trace);
-		// Sorted when name is set to trace
-		tracesByName.add(trace);
-		getModel().notifyObjectAdded(this, trace);
-	}
-
-	/**
-	 * Removes a trace from this group. Creates objectRemoved event to model
-	 * listeners
-	 * 
-	 * @see TraceModelListener#objectRemoved(TraceObject, TraceObject)
-	 * @param trace
-	 *            the trace to be removed
-	 * @throws TraceCompilerException 
-	 */
-	public void removeTrace(Trace trace) throws TraceCompilerException {
-		int index = Collections.binarySearch(tracesByID, trace,
-				TraceObjectUtils.traceObjectIDComparator);
-		if (index >= 0) {
-			tracesByID.remove(index);
-			index = Collections.binarySearch(tracesByName, trace,
-					TraceObjectUtils.traceObjectNameComparator);
-			tracesByName.remove(index);
-			getModel().notifyObjectRemoved(this, trace);
-			trace.reset();
-		}
-	}
-
-	/**
-	 * Determines if this group has traces.
-	 * 
-	 * @return true if the group contains traces
-	 */
-	public boolean hasTraces() {
-		return !tracesByID.isEmpty();
-	}
-
-	/**
-	 * Gets the number of traces in this group.
-	 * 
-	 * @return the number of traces
-	 */
-	public int getTraceCount() {
-		return tracesByID.size();
-	}
-
-	/**
-	 * Returns an iterator over the traces within this group.
-	 * 
-	 * @return the iterator
-	 */
-	public Iterator<Trace> getTraces() {
-		return tracesByID.iterator();
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see java.lang.Iterable#iterator()
-	 */
-	public Iterator<Trace> iterator() {
-		return tracesByID.iterator();
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.model.TraceObject#reset()
-	 */
-	@Override
-	void reset() {
-		// Reset removes constant table references
-		for (Trace trace : tracesByID) {
-			// Model listeners are not notified on reset, but if the
-			// trace itself implements a delete notification interface,
-			// it must be called to do appropriate cleanup
-			notifyOnDelete(trace);
-			trace.reset();
-		}
-		tracesByID.clear();
-		tracesByName.clear();
-		super.reset();
-	}
-
-	/**
-	 * Returns highest trace ID + 1. Can be used to create an unique ID for a
-	 * new trace.
-	 * 
-	 * @return the next trace ID
-	 */
-	public int getNextTraceID() {
-		int ret;
-		if (tracesByID.size() > 0) {
-			ret = tracesByID.get(tracesByID.size() - 1).getID() + 1;
-		} else {
-			ret = 1;
-		}
-		return ret;
-	}
-
-	/**
-	 * Gets the trace which has given ID
-	 * 
-	 * @param id
-	 *            the trace ID
-	 * @return the trace or null
-	 */
-	public Trace findTraceByID(int id) {
-		int index = Collections.binarySearch(tracesByID, id,
-				TraceObjectUtils.traceToIDComparator);
-		Trace retval;
-		if (index >= 0) {
-			retval = tracesByID.get(index);
-		} else {
-			retval = null;
-		}
-		return retval;
-	}
-
-	/**
-	 * Called by the model when a trace property is updated
-	 * 
-	 * @param source
-	 *            the trace that was changed
-	 * @param property
-	 *            the property that was changed
-	 */
-	void tracePropertyUpdated(TraceObject source, int property) {
-		if (property == TraceModelListener.NAME) {
-			Collections.sort(tracesByName,
-					TraceObjectUtils.traceObjectNameComparator);
-		} else if (property == TraceModelListener.ID) {
-			traceIDsUpdated();
-		}
-	}
-
-	/**
-	 * Sorts the trace array based on new ID configuration
-	 */
-	void traceIDsUpdated() {
-		Collections.sort(tracesByID, TraceObjectUtils.traceObjectIDComparator);
-	}
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceModel.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,997 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Trace model is a collection of trace groups
-*
-*/
-package com.nokia.tracecompiler.model;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Enumeration;
-import java.util.Iterator;
-import java.util.Properties;
-
-import com.nokia.tracecompiler.engine.TraceCompilerEngineGlobals;
-import com.nokia.tracecompiler.engine.TraceCompilerEngineErrorCodes.TraceCompilerErrorCode;
-import com.nokia.tracecompiler.engine.project.SortedProperties;
-import com.nokia.tracecompiler.project.FormattingUtils;
-import com.nokia.tracecompiler.source.SourceConstants;
-
-/**
- * Trace model is a collection of trace groups. Listener interfaces can be
- * attached to a trace model to receive change notifications when traces are
- * added, removed or modified.
- * 
- */
-public class TraceModel extends TraceObject implements Iterable<TraceGroup> {
-
-	/**
-	 * Group property prefix
-	 */
-	public final String GROUP_PROPERTY_PREFIX = "[GROUP]"; //$NON-NLS-1$
-
-	/**
-	 * Trace property prefix
-	 */
-	public final String TRACE_PROPERTY_PREFIX = "[TRACE]"; //$NON-NLS-1$
-
-	/**
-	 * Obsolete property prefix
-	 */
-	public final String OBSOLETE_PROPERTY_PREFIX = "[[OBSOLETE]]"; //$NON-NLS-1$
-
-	/**
-	 * Group Id prefix
-	 */
-	public final String GROUP_ID_PREFIX = "["; //$NON-NLS-1$
-
-	/**
-	 * Group Id suffix
-	 */
-	public final String GROUP_ID_SUFFIX = "]"; //$NON-NLS-1$	
-
-	/**
-	 * Factory object for creating other trace objects
-	 */
-	private TraceObjectFactory factory;
-
-	/**
-	 * Property verifier interface
-	 */
-	private TraceObjectPropertyVerifier verifier;
-
-	/**
-	 * List of trace groups
-	 */
-	private ArrayList<TraceGroup> groups = new ArrayList<TraceGroup>();
-
-	/**
-	 * List of traces, sorted by name
-	 */
-	private ArrayList<Trace> tracesByName = new ArrayList<Trace>();
-
-	/**
-	 * List of model listeners
-	 */
-	private ArrayList<TraceModelListener> modelListeners = new ArrayList<TraceModelListener>();
-
-	/**
-	 * List of extension listeners
-	 */
-	private ArrayList<TraceModelExtensionListener> extensionListeners = new ArrayList<TraceModelExtensionListener>();
-
-	/**
-	 * List of reset listeners
-	 */
-	private ArrayList<TraceModelResetListener> resetListeners = new ArrayList<TraceModelResetListener>();
-
-	/**
-	 * Processing listeners
-	 */
-	private ArrayList<TraceProcessingListener> processingListeners = new ArrayList<TraceProcessingListener>();
-
-	/**
-	 * List of constant tables
-	 */
-	private ArrayList<TraceConstantTable> constantTables = new ArrayList<TraceConstantTable>();
-
-	/**
-	 * Validity flag
-	 */
-	private boolean valid;
-
-	/**
-	 * Number of nested calls to startProcessing
-	 */
-	private int isProcessing;
-
-	/**
-	 * Model was changed during processing
-	 */
-	private boolean modelChangedDuringProcessing;
-
-	/**
-	 * Fixed Ids from fixed Ids definition file
-	 */
-	private SortedProperties fixedIds;
-
-	/**
-	 * Hex radix
-	 */
-	public int HEX_RADIX = 16; // CodForChk_Dis_Magic
-
-	/**
-	 * Constructor
-	 * 
-	 * @param factory
-	 *            the rule factory
-	 * @param verifier
-	 *            the property verifier
-	 * @throws TraceCompilerException 
-	 */
-	public TraceModel(TraceObjectRuleFactory factory,
-			TraceObjectPropertyVerifier verifier) throws TraceCompilerException {
-		// Stored for callback purposes
-		setModel(this);
-		this.factory = new TraceObjectFactory(this, factory);
-		this.verifier = verifier;
-	}
-
-	/**
-	 * Adds a new trace model listener to this model
-	 * 
-	 * @param listener
-	 *            the new listener
-	 */
-	public void addModelListener(TraceModelListener listener) {
-		modelListeners.add(listener);
-	}
-
-	/**
-	 * Removes a trace model listener. Does nothing if the listener is not found
-	 * 
-	 * @param listener
-	 *            the listener to be removed
-	 */
-	public void removeModelListener(TraceModelListener listener) {
-		modelListeners.remove(listener);
-	}
-
-	/**
-	 * Adds a new trace model extension listener to this model
-	 * 
-	 * @param listener
-	 *            the new listener
-	 */
-	public void addExtensionListener(TraceModelExtensionListener listener) {
-		extensionListeners.add(listener);
-	}
-
-	/**
-	 * Removes a trace model extension listener. Does nothing if the listener is
-	 * not found
-	 * 
-	 * @param listener
-	 *            the listener to be removed
-	 */
-	public void removeExtensionListener(TraceModelExtensionListener listener) {
-		extensionListeners.remove(listener);
-	}
-
-	/**
-	 * Adds a new trace model reset listener to this model
-	 * 
-	 * @param listener
-	 *            the new listener
-	 */
-	public void addResetListener(TraceModelResetListener listener) {
-		resetListeners.add(listener);
-	}
-
-	/**
-	 * Removes a trace model reset listener. Does nothing if the listener is not
-	 * found
-	 * 
-	 * @param listener
-	 *            the listener to be removed
-	 */
-	public void removeResetListener(TraceModelResetListener listener) {
-		resetListeners.remove(listener);
-	}
-
-	/**
-	 * Adds a new trace model listener to this model
-	 * 
-	 * @param listener
-	 *            the new listener
-	 */
-	public void addProcessingListener(TraceProcessingListener listener) {
-		processingListeners.add(listener);
-	}
-
-	/**
-	 * Removes a processing listener. Does nothing if the listener is not found
-	 * 
-	 * @param listener
-	 *            the listener to be removed
-	 */
-	public void removeProcessingListener(TraceProcessingListener listener) {
-		processingListeners.remove(listener);
-	}
-
-	/**
-	 * Returns highest group ID + 1. Can be used to create an unique ID for a
-	 * new trace group.
-	 * 
-	 * @return the next trace group ID
-	 * @throws TraceCompilerException
-	 */
-	public int getNextGroupID() throws TraceCompilerException {
-		int currentMaxGroupId = 0;
-		int nextGroupId = 0;
-		// Check if there are some fixed Ids
-		if (fixedIds != null) {
-			Enumeration<Object> keys = this.fixedIds.keys();
-			// Go through fixed Ids and check if there are fixed group Ids
-			while (keys.hasMoreElements()) {
-				String key = (String) keys.nextElement();
-				if (key.startsWith(GROUP_PROPERTY_PREFIX)
-						|| key.startsWith(OBSOLETE_PROPERTY_PREFIX
-								+ GROUP_PROPERTY_PREFIX)) {
-					// Fixed group Id found. Try to covert it to int value.
-					String value = fixedIds.getProperty(key);
-					int fixedId = 0;
-					try {
-						fixedId = Integer.decode(value).intValue();
-					} catch (NumberFormatException e) {
-						// Corrupted. Get next group Id later on.
-						currentMaxGroupId = 0;
-						break;
-					}
-					// Check if found fixed Id is bigger than current max group
-					// Id
-					if (fixedId > currentMaxGroupId) {
-						currentMaxGroupId = fixedId;
-					}
-				}
-			}
-		}
-
-		// If there were fixed group Ids. Set next group Id to be current max
-		// group Id + 1
-		if (currentMaxGroupId != 0) {
-			nextGroupId = currentMaxGroupId + 1;
-		}
-
-		// Get current max group id in model
-		int maxGroupIdInModel = 0;
-		for (TraceGroup group : groups) {
-			int groupIdInModel = group.getID();
-			if (groupIdInModel > maxGroupIdInModel) {
-				maxGroupIdInModel = groupIdInModel;
-			}
-		}
-
-		// If next group Id is zero or smaller than current max group id in
-		// model + 1. Set it be same as current max group id in model + 1. This
-		// is done in case that we have added more than one new group after last
-		// fixed Id update
-		if (nextGroupId == 0 || nextGroupId < maxGroupIdInModel + 1) {
-			nextGroupId = maxGroupIdInModel + 1;
-		}
-
-		// Check that next group Id is not bigger than max group Id
-		if (nextGroupId > TraceCompilerEngineGlobals.MAX_GROUP_ID) {
-			throw new TraceCompilerException(
-					TraceCompilerErrorCode.RUN_OUT_OF_GROUP_IDS);
-		}
-
-		return nextGroupId;
-	}
-
-	/**
-	 * Returns highest constant table ID + 1. Can be used to create an unique ID
-	 * for a new constant table.
-	 * 
-	 * @return the next constant table ID
-	 */
-	public int getNextConstantTableID() {
-		int max = 0;
-		for (TraceConstantTable table : constantTables) {
-			int id = table.getID();
-			if (id > max) {
-				max = id;
-			}
-		}
-		return max + 1;
-	}
-
-	/**
-	 * Removes a trace group from this model. Create groupRemoved event to model
-	 * listeners
-	 * 
-	 * @param group
-	 *            the group to be removed
-	 * @throws TraceCompilerException 
-	 */
-	public void removeGroup(TraceGroup group) throws TraceCompilerException {
-		if (groups.remove(group)) {
-			notifyObjectRemoved(this, group);
-			group.reset();
-		}
-	}
-
-	/**
-	 * Determines if this model contains any trace groups
-	 * 
-	 * @return true if there are trace groups
-	 */
-	public boolean hasGroups() {
-		return !groups.isEmpty();
-	}
-
-	/**
-	 * Gets the number of trace groups
-	 * 
-	 * @return trace group count
-	 */
-	public int getGroupCount() {
-		return groups.size();
-	}
-
-	/**
-	 * Returns the trace groups of this model
-	 * 
-	 * @return the iterator over the groups
-	 */
-	public Iterator<TraceGroup> getGroups() {
-		return groups.iterator();
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see java.lang.Iterable#iterator()
-	 */
-	public Iterator<TraceGroup> iterator() {
-		return groups.iterator();
-	}
-
-	/**
-	 * Removes all trace groups and parameters from this model. Extensions are
-	 * not removed. Notifies the reset listeners with modelResetting and
-	 * modelReset
-	 * 
-	 * @see TraceModelResetListener#modelResetting
-	 * @see TraceModelResetListener#modelReset
-	 */
-	@Override
-	public void reset() {
-		notifyModelResetting();
-		// Properties are removed, other extensions are left
-		removeExtensions(TraceObjectPropertyList.class);
-		groups.clear();
-		tracesByName.clear();
-		constantTables.clear();
-		fixedIds = null;
-		super.reset();
-		notifyModelReset();
-	}
-
-	/**
-	 * Gets the group which has given ID
-	 * 
-	 * @param id
-	 *            the id
-	 * @return group or null
-	 */
-	public TraceGroup findGroupByID(int id) {
-		TraceGroup retval = null;
-		for (TraceGroup group : groups) {
-			if (group.getID() == id) {
-				retval = group;
-				break;
-			}
-		}
-		return retval;
-	}
-
-	/**
-	 * Locates a trace group which has the given name.
-	 * 
-	 * @param name
-	 *            the name of the trace group
-	 * @return the group or null if not found
-	 * @see TraceObject#getName
-	 */
-	public TraceGroup findGroupByName(String name) {
-		TraceGroup retval = null;
-		for (TraceGroup group : groups) {
-			if (group.getName().equals(name)) {
-				retval = group;
-				break;
-			}
-		}
-		return retval;
-	}
-
-	/**
-	 * Locates a trace which has the given name.
-	 * 
-	 * @param name
-	 *            the name of the trace
-	 * @return the trace or null if not found
-	 * @see TraceObject#getName
-	 */
-	public Trace findTraceByName(String name) {
-		Trace retval;
-		int index = Collections.binarySearch(tracesByName, name,
-				TraceObjectUtils.traceToNameComparator);
-		if (index >= 0) {
-			retval = tracesByName.get(index);
-		} else {
-			retval = null;
-		}
-		return retval;
-	}
-
-	/**
-	 * Returns the group at given index
-	 * 
-	 * @param index
-	 *            the group index
-	 * @return the group
-	 */
-	public TraceGroup getGroupAt(int index) {
-		return groups.get(index);
-	}
-
-	/**
-	 * Removes a constant table from this model. Creates objectRemoved event to
-	 * model listeners
-	 * 
-	 * @see TraceModelListener#objectRemoved(TraceObject, TraceObject)
-	 * @param table
-	 *            the table to be removed
-	 * @throws TraceCompilerException 
-	 */
-	public void removeConstantTable(TraceConstantTable table) throws TraceCompilerException {
-		if (constantTables.remove(table)) {
-			notifyObjectRemoved(this, table);
-			table.reset();
-		}
-	}
-
-	/**
-	 * Gets the constant tables of this model
-	 * 
-	 * @return the tables iterator
-	 */
-	public Iterator<TraceConstantTable> getConstantTables() {
-		return constantTables.iterator();
-	}
-
-	/**
-	 * Gets a constant table by ID
-	 * 
-	 * @param id
-	 *            the ID
-	 * @return the table or null
-	 */
-	public TraceConstantTable findConstantTableByID(int id) {
-		TraceConstantTable retval = null;
-		for (TraceConstantTable table : constantTables) {
-			if (table.getID() == id) {
-				retval = table;
-				break;
-			}
-		}
-		return retval;
-	}
-
-	/**
-	 * Gets a constant table by name
-	 * 
-	 * @param tableName
-	 *            the name
-	 * @return the table or null
-	 */
-	public TraceConstantTable findConstantTableByName(String tableName) {
-		TraceConstantTable retval = null;
-		for (TraceConstantTable table : constantTables) {
-			if (table.getName().equals(tableName)) {
-				retval = table;
-				break;
-			}
-		}
-		return retval;
-	}
-
-	/**
-	 * Checks if this model contains constant tables
-	 * 
-	 * @return true if there are constant tables
-	 */
-	public boolean hasConstantTables() {
-		return !constantTables.isEmpty();
-	}
-
-	/**
-	 * Returns the constant table at given index
-	 * 
-	 * @param index
-	 *            the group index
-	 * @return the group
-	 */
-	public TraceConstantTable getConstantTableAt(int index) {
-		return constantTables.get(index);
-	}
-
-	/**
-	 * Adds a new trace group to this model. Creates objectAdded event to model
-	 * listeners. This is only intended to be called from TraceGroup
-	 * constructor, so this is not public.
-	 * 
-	 * @see TraceModelListener#objectAdded(TraceObject, TraceObject)
-	 * @param group
-	 *            the group to be added
-	 */
-	void addGroup(TraceGroup group) {
-		groups.add(group);
-		notifyObjectAdded(this, group);
-	}
-
-	/**
-	 * Adds a constant table to this model. Created objectAdded event to model
-	 * listeners. This is only intended to be called from constant table
-	 * constructor, so this is not public
-	 * 
-	 * @see TraceModelListener#objectAdded(TraceObject, TraceObject)
-	 * @param table
-	 *            the constant table
-	 */
-	void addConstantTable(TraceConstantTable table) {
-		constantTables.add(table);
-		notifyObjectAdded(this, table);
-	}
-
-	/**
-	 * Fires propertiesUpdated event. Called from trace objects when their
-	 * properties change.
-	 * 
-	 * @see TraceModelListener#propertyUpdated(TraceObject, int)
-	 * @param source
-	 *            the object that changed
-	 * @param property
-	 *            the property that changed
-	 * @throws TraceCompilerException 
-	 */
-	void notifyPropertyUpdated(TraceObject source, int property) throws TraceCompilerException {
-		if (source instanceof Trace) {
-			if (property == TraceModelListener.NAME) {
-				Collections.sort(tracesByName,
-						TraceObjectUtils.traceObjectNameComparator);
-			}
-			((Trace) source).getGroup().tracePropertyUpdated(source, property);
-		}
-		for (TraceModelListener l : modelListeners) {
-			l.propertyUpdated(source, property);
-		}
-		modelChangedDuringProcessing = true;
-	}
-
-	/**
-	 * Fires objectAdded event to listeners
-	 * 
-	 * @see TraceModelListener#objectAdded(TraceObject, TraceObject)
-	 * @param owner
-	 *            the owner object
-	 * @param object
-	 *            the object that was added
-	 */
-	void notifyObjectAdded(TraceObject owner, TraceObject object) {
-		// List is sorted when the name is set to the trace
-		if (object instanceof Trace) {
-			tracesByName.add((Trace) object);
-		}
-		for (TraceModelListener l : modelListeners) {
-			l.objectAdded(owner, object);
-		}
-		modelChangedDuringProcessing = true;
-	}
-
-	/**
-	 * Fires objectRemoved event to listeners
-	 * 
-	 * @see TraceModelListener#objectRemoved(TraceObject, TraceObject)
-	 * @param owner
-	 *            the owner object
-	 * @param object
-	 *            the object that was removed
-	 * @throws TraceCompilerException 
-	 */
-	void notifyObjectRemoved(TraceObject owner, TraceObject object) throws TraceCompilerException {
-		if (object instanceof Trace) {
-			int index = Collections.binarySearch(tracesByName, (Trace) object,
-					TraceObjectUtils.traceObjectNameComparator);
-			tracesByName.remove(index);
-		}
-		notifyOnDelete(object);
-		for (TraceModelListener l : modelListeners) {
-			l.objectRemoved(owner, object);
-		}
-		modelChangedDuringProcessing = true;
-	}
-
-	/**
-	 * Notifies that an object creation is complete
-	 * 
-	 * @see TraceModelListener#objectCreationComplete(TraceObject)
-	 * @param object
-	 *            the object
-	 * @throws TraceCompilerException 
-	 */
-	void notifyObjectCreationComplete(TraceObject object) throws TraceCompilerException {
-		for (TraceModelListener l : modelListeners) {
-			l.objectCreationComplete(object);
-		}
-	}
-
-	/**
-	 * Fires modelResetting event to all listeners
-	 * 
-	 * @see TraceModelResetListener#modelResetting()
-	 */
-	private void notifyModelResetting() {
-		for (TraceModelResetListener l : resetListeners) {
-			l.modelResetting();
-		}
-	}
-
-	/**
-	 * Fires modelReset event to all listeners
-	 * 
-	 * @see TraceModelResetListener#modelReset()
-	 */
-	private void notifyModelReset() {
-		for (TraceModelResetListener l : resetListeners) {
-			l.modelReset();
-		}
-	}
-
-	/**
-	 * Fires extensionAdded event. Called from TraceObject when extension is
-	 * added to it
-	 * 
-	 * @see TraceModelExtensionListener#extensionAdded(TraceObject,
-	 *      TraceModelExtension)
-	 * @param object
-	 *            the trace object
-	 * @param extension
-	 *            the new extension
-	 */
-	void notifyExtensionAdded(TraceObject object, TraceModelExtension extension) {
-		for (TraceModelExtensionListener l : extensionListeners) {
-			l.extensionAdded(object, extension);
-		}
-		modelChangedDuringProcessing = true;
-	}
-
-	/**
-	 * Fires extensionRemoved event. Called from TraceObject when extension is
-	 * removed from it
-	 * 
-	 * @see TraceModelExtensionListener#extensionRemoved(TraceObject,
-	 *      TraceModelExtension)
-	 * @param object
-	 *            the object
-	 * @param extension
-	 *            the removed extension
-	 */
-	void notifyExtensionRemoved(TraceObject object,
-			TraceModelExtension extension) {
-		for (TraceModelExtensionListener l : extensionListeners) {
-			l.extensionRemoved(object, extension);
-		}
-		modelChangedDuringProcessing = true;
-	}
-
-	/**
-	 * Gets the validity flag of this model
-	 * 
-	 * @return the validity flag
-	 */
-	public boolean isValid() {
-		return valid;
-	}
-
-	/**
-	 * Sets the validity flag
-	 * 
-	 * @param valid
-	 *            new flag value
-	 * @throws TraceCompilerException 
-	 */
-	public void setValid(boolean valid) throws TraceCompilerException {
-		if (valid != this.valid) {
-			this.valid = valid;
-			for (TraceModelResetListener l : resetListeners) {
-				l.modelValid(valid);
-			}
-		}
-	}
-
-	/**
-	 * Gets the trace object factory
-	 * 
-	 * @return the factory
-	 */
-	public TraceObjectFactory getFactory() {
-		return factory;
-	}
-
-	/**
-	 * Gets the object verifier interface. The verifier should be used before
-	 * updating object properties
-	 * 
-	 * @return the verifier
-	 */
-	public TraceObjectPropertyVerifier getVerifier() {
-		return verifier;
-	}
-
-	/**
-	 * Notifies the process listeners that a process the results in multiple
-	 * listener updates is about to start
-	 */
-	public void startProcessing() {
-		isProcessing++;
-		if (isProcessing == 1) {
-			modelChangedDuringProcessing = false;
-			for (TraceProcessingListener l : processingListeners) {
-				l.processingStarted();
-			}
-		}
-	}
-
-	/**
-	 * Notifies the process listeners that a process the results in multiple
-	 * listener updates has finished
-	 */
-	public void processingComplete() {
-		isProcessing--;
-		if (isProcessing == 0) {
-			for (TraceProcessingListener l : processingListeners) {
-				l.processingComplete(modelChangedDuringProcessing);
-			}
-			modelChangedDuringProcessing = false;
-		}
-	}
-
-	/**
-	 * Checks the state of the processing flag
-	 * 
-	 * @return the processing flag
-	 */
-	public boolean isProcessing() {
-		return isProcessing > 0;
-	}
-
-	/**
-	 * Checks if model has traces
-	 * 
-	 * @return true if there's traces, false if not
-	 */
-	public boolean hasTraces() {
-		boolean retval = false;
-		for (TraceGroup group : groups) {
-			if (group.hasTraces()) {
-				retval = true;
-				break;
-			}
-		}
-		return retval;
-	}
-
-	/**
-	 * Gets group ID from properties
-	 * 
-	 * @param properties
-	 *            the properties
-	 * @param group
-	 *            the group
-	 * @return the group ID
-	 * @throws TraceCompilerException
-	 */
-	public int getGroupID(Properties properties, TraceGroup group)
-			throws TraceCompilerException {
-		String value = properties.getProperty(GROUP_PROPERTY_PREFIX
-				+ group.getName());
-		int id;
-		if (value == null) {
-			// Not found, assign a proper ID
-			id = getNewIdForGroup(group);
-
-		} else {
-			try {
-				id = Integer.decode(value).intValue();
-				TraceGroup traceGroup = findGroupByID(id);
-				if (traceGroup != null && !traceGroup.equals(group)) {
-					// Id already in use, assign a proper ID
-					id = getNewIdForGroup(group);
-				}
-			} catch (NumberFormatException e) {
-				// Corrupted, assign a proper ID
-				id = getNewIdForGroup(group);
-			}
-		}
-		group.internalSetID(id);
-		return id;
-	}
-
-	/**
-	 * Gets a new ID for this group
-	 * 
-	 * @param group
-	 *            the group
-	 * @return a new ID for this group
-	 * @throws TraceCompilerException
-	 */
-	private int getNewIdForGroup(TraceGroup group) throws TraceCompilerException {
-		int id = FormattingUtils.getGroupID(group.getModel(), group.getName());
-		return id;
-	}
-
-	/**
-	 * Saves trace and group identifiers to given properties.
-	 * 
-	 * @param properties
-	 *            the properties to use
-	 */
-	public void saveIDs(Properties properties) {
-		properties.clear();
-		StringBuffer sb = new StringBuffer();
-		for (TraceGroup group : this) {
-			int groupId = group.getID();
-			properties.setProperty(GROUP_PROPERTY_PREFIX + group.getName(),
-					SourceConstants.HEX_PREFIX + Integer.toHexString(groupId));
-			for (Trace trace : group) {
-				int traceId = trace.getID();
-				properties.setProperty(TRACE_PROPERTY_PREFIX
-						+ createTraceName(sb, group, trace),
-						SourceConstants.HEX_PREFIX
-								+ Integer.toHexString(traceId));
-			}
-		}
-	}
-
-	/**
-	 * Merges the group and trace names together
-	 * 
-	 * @param sb
-	 *            the buffer where name is stored
-	 * @param group
-	 *            group
-	 * @param trace
-	 *            trace
-	 * @return the trace name
-	 */
-	public String createTraceName(StringBuffer sb, TraceGroup group, Trace trace) {
-		sb.setLength(0);
-		sb.append(group.getName());
-		sb.append(GROUP_ID_PREFIX);
-		int groupId = group.getID();
-		String groupIdString = SourceConstants.HEX_PREFIX
-				+ Integer.toString(groupId, HEX_RADIX).toUpperCase();
-		sb.append(groupIdString);
-		sb.append(GROUP_ID_SUFFIX);
-		sb.append(SourceConstants.UNDERSCORE);
-		sb.append(trace.getName());
-		return sb.toString();
-	}
-
-	/**
-	 * Gets fixed group and trace ids
-	 * 
-	 * @return fixed Ids
-	 */
-	public SortedProperties getFixedIds() {
-		return fixedIds;
-	}
-
-	/**
-	 * Set fixed group and trace ids
-	 * 
-	 * @param fixedIds
-	 *            fixed Ids
-	 */
-	public void setFixedIds(SortedProperties fixedIds) {
-		this.fixedIds = fixedIds;
-	}
-
-	/**
-	 * Gets next trace ID
-	 * 
-	 * @param group
-	 *            the group
-	 * @return the trace ID
-	 * @throws TraceCompilerException
-	 */
-	public int getNextTraceId(TraceGroup group) throws TraceCompilerException {
-		int currentMaxTraceID = 0;
-		int nextTraceId = 0;
-		// Check if there are some fixed Ids
-		if (fixedIds != null) {
-			Enumeration<Object> keys = this.fixedIds.keys();
-			String groupName = group.getName();
-			int groupId = group.getID();
-			String groupIdString = SourceConstants.HEX_PREFIX
-					+ Integer.toString(groupId, HEX_RADIX).toUpperCase();
-			// Go through fixed Ids and check if there are fixed trace Ids to
-			// this group
-			while (keys.hasMoreElements()) {
-				String key = (String) keys.nextElement();
-				if (key.startsWith(TRACE_PROPERTY_PREFIX + groupName
-						+ GROUP_ID_PREFIX + groupIdString + GROUP_ID_SUFFIX
-						+ SourceConstants.UNDERSCORE)
-						|| key.startsWith(OBSOLETE_PROPERTY_PREFIX
-								+ TRACE_PROPERTY_PREFIX + groupName
-								+ GROUP_ID_PREFIX + groupIdString
-								+ GROUP_ID_SUFFIX + SourceConstants.UNDERSCORE)) {
-					// Fixed trace Id to in this group found. Try to covert it
-					// to int value.
-					String value = fixedIds.getProperty(key);
-					int fixedId = 0;
-					try {
-						fixedId = Integer.decode(value).intValue();
-					} catch (NumberFormatException e) {
-						// Corrupted. Get next trace Id later on.
-						nextTraceId = 0;
-						break;
-					}
-					// Check if found fixed Id is bigger than current max trace
-					// Id in this group
-					if (fixedId > currentMaxTraceID) {
-						currentMaxTraceID = fixedId;
-					}
-				}
-			}
-			// If there were fixed trace Ids to this group. Set next trace Id to
-			// be current max trace Id + 1
-			if (currentMaxTraceID != 0) {
-				nextTraceId = currentMaxTraceID + 1;
-			}
-			// If next trace Id is zero or smaller than trace Id that group
-			// suggest. Set it be same as group suggest. This is done in case
-			// that we have added more than one new trace to same group after
-			// last fixed Id update
-			if (nextTraceId == 0 || nextTraceId < group.getNextTraceID()) {
-				nextTraceId = group.getNextTraceID();
-			}
-		} else {
-			// No fixed Ids. Get next trace Id from group
-			nextTraceId = group.getNextTraceID();
-		}
-		// Check that next trace Id is not bigger than max trace Id
-		if (nextTraceId > TraceCompilerEngineGlobals.MAX_TRACE_ID) {
-			throw new TraceCompilerException(
-					TraceCompilerErrorCode.RUN_OUT_OF_TRACE_IDS);
-		}
-
-		return nextTraceId;
-	}
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceModelExtension.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Interface implemented by trace model extensions
-*
-*/
-package com.nokia.tracecompiler.model;
-
-/**
- * Interface implemented by trace model extensions
- * 
- */
-public interface TraceModelExtension {
-
-	/**
-	 * Sets the owner of this extension. Called when extension is added to a
-	 * trace object and called with null when removed from trace object
-	 * 
-	 * @param owner
-	 *            the owning object
-	 */
-	public void setOwner(TraceObject owner);
-
-	/**
-	 * Gets the owner of this extension
-	 * 
-	 * @return the owner
-	 */
-	public TraceObject getOwner();
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceModelExtensionListener.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Listener interface for trace model extension notifications
-*
-*/
-package com.nokia.tracecompiler.model;
-
-/**
- * Listener interface for trace model extension notifications
- * 
- */
-public interface TraceModelExtensionListener {
-
-	/**
-	 * Notifies that an extension was added to the trace object
-	 * 
-	 * @param object
-	 *            the object where the extension was added
-	 * @param extension
-	 *            the new extension object
-	 */
-	public void extensionAdded(TraceObject object, TraceModelExtension extension);
-
-	/**
-	 * Notifies that an extension was removed from the trace object
-	 * 
-	 * @param object
-	 *            the object from where the extension was removed
-	 * @param extension
-	 *            the removed extension object
-	 */
-	public void extensionRemoved(TraceObject object,
-			TraceModelExtension extension);
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceModelListener.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,87 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Listener interface for trace model change notifications
-*
-*/
-package com.nokia.tracecompiler.model;
-
-/**
- * Listener interface for trace model change notifications
- * 
- */
-public interface TraceModelListener {
-
-	/**
-	 * Object name has been updated
-	 */
-	int NAME = 1;
-
-	/**
-	 * Object ID has been updated
-	 */
-	int ID = 2;
-
-	/**
-	 * Trace text has been updated
-	 */
-	int TRACE = 3;
-
-	/**
-	 * Parameter type has been updated
-	 */
-	int TYPE = 4;
-
-	/**
-	 * Notification which is fired when a trace object has been added
-	 * 
-	 * @param owner
-	 *            the owner of the object
-	 * @param object
-	 *            the object
-	 */
-	public void objectAdded(TraceObject owner, TraceObject object);
-
-	/**
-	 * Notification that is fired a trace object is removed from the model
-	 * 
-	 * @param owner
-	 *            the owner of the object
-	 * @param object
-	 *            the removed object
-	 * @throws TraceCompilerException 
-	 */
-	public void objectRemoved(TraceObject owner, TraceObject object) throws TraceCompilerException;
-
-	/**
-	 * Notifies that the one of the properties of an object have been updated
-	 * 
-	 * @param object
-	 *            the object which was updated
-	 * @param property
-	 *            the property that was updated
-	 * @throws TraceCompilerException 
-	 */
-	public void propertyUpdated(TraceObject object, int property) throws TraceCompilerException;
-
-	/**
-	 * Notifies that object creation is complete
-	 * 
-	 * @param object
-	 *            the object
-	 * @throws TraceCompilerException 
-	 */
-	public void objectCreationComplete(TraceObject object) throws TraceCompilerException;
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceModelPersistentExtension.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Interface implemented by trace model extensions that need to store themselves 
-* into persistent storage along with other model elements
-*
-*/
-package com.nokia.tracecompiler.model;
-
-/**
- * Interface implemented by trace model extensions that need to store themselves
- * into persistent storage along with other model elements. The storage format
- * is left to the implementation. When loading, the trace provider calls
- * TraceObjectFactory.createExtension with the storage name. The object factory
- * returns an instance of this interface and the provider calls setData to
- * initialize this.
- * 
- */
-public interface TraceModelPersistentExtension extends TraceModelExtension {
-
-	/**
-	 * Gets the name used when storing this extension
-	 * 
-	 * @return the storage name
-	 */
-	public String getStorageName();
-
-	/**
-	 * Gets the data of this extension
-	 * 
-	 * @return the extension data
-	 */
-	public String getData();
-
-	/**
-	 * Sets the data of this extension
-	 * 
-	 * @param data
-	 *            the data
-	 * @return true if extension should be added to model, false if not
-	 */
-	public boolean setData(String data);
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceModelResetListener.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,46 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Listener interface for trace model reset notifications
-*
-*/
-package com.nokia.tracecompiler.model;
-
-/**
- * Listener interface for trace model reset notifications
- * 
- */
-public interface TraceModelResetListener {
-
-	/**
-	 * Notification that is fired before the model is reset.
-	 */
-	public void modelResetting();
-
-	/**
-	 * Notification that is fired after the model is reset.
-	 */
-	public void modelReset();
-
-	/**
-	 * Validity changed notification
-	 * 
-	 * @param valid
-	 *            the validity changed flag
-	 * @throws TraceCompilerException 
-	 */
-	public void modelValid(boolean valid) throws TraceCompilerException;
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceObject.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,273 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Base class for all trace model objects
-*
-*/
-package com.nokia.tracecompiler.model;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-
-/**
- * Base class for all trace model objects
- * 
- */
-public abstract class TraceObject {
-
-	/**
-	 * The extensions can be used by trace providers to associate extra data to
-	 * the object.
-	 */
-	private ArrayList<TraceModelExtension> extensions = new ArrayList<TraceModelExtension>();
-
-	/**
-	 * Object ID.
-	 */
-	private int id;
-
-	/**
-	 * Object name.
-	 */
-	private String name = ""; //$NON-NLS-1$
-
-	/**
-	 * The trace model.
-	 */
-	private TraceModel model;
-
-	/**
-	 * Complete flag
-	 */
-	private boolean complete;
-
-	/**
-	 * Associates this object to a trace model.
-	 * 
-	 * @param model
-	 *            the model where this object belongs to
-	 */
-	void setModel(TraceModel model) {
-		this.model = model;
-	}
-
-	/**
-	 * Returns the trace model this object is associated to.
-	 * 
-	 * @return the trace model
-	 */
-	public TraceModel getModel() {
-		return model;
-	}
-
-	/**
-	 * Sets the ID of this object. Generates propertyUpdated event to model
-	 * listeners if the ID changes
-	 * 
-	 * @see TraceModelListener#propertyUpdated(TraceObject, int)
-	 * @param id
-	 *            the new ID
-	 * @throws TraceCompilerException 
-	 */
-	public void setID(int id) throws TraceCompilerException {
-		if (this.id != id) {
-			this.id = id;
-			model.notifyPropertyUpdated(this, TraceModelListener.ID);
-		}
-	}
-
-	/**
-	 * Sets the ID of this object but does not generate any notifications
-	 * 
-	 * @param id
-	 *            the new ID
-	 */
-	void internalSetID(int id) {
-		this.id = id;
-	}
-
-	/**
-	 * Returns the ID of this object.
-	 * 
-	 * @return the ID
-	 */
-	public int getID() {
-		return id;
-	}
-
-	/**
-	 * Sets the name of this object. Generates propertyUpdated event to model
-	 * listeners if the name changes
-	 * 
-	 * @see TraceModelListener#propertyUpdated(TraceObject, int)
-	 * @param name
-	 *            the new name
-	 * @throws TraceCompilerException 
-	 */
-	public void setName(String name) throws TraceCompilerException {
-		if (name == null) {
-			name = ""; //$NON-NLS-1$
-		}
-		if (!name.equals(this.name)) {
-			this.name = name;
-			model.notifyPropertyUpdated(this, TraceModelListener.NAME);
-		}
-	}
-
-	/**
-	 * Returns the name of this object. This never returns null
-	 * 
-	 * @return the name
-	 */
-	public String getName() {
-		return name;
-	}
-
-	/**
-	 * Adds an extension to this object. Generates extensionAdded event to model
-	 * listeners
-	 * 
-	 * @param extension
-	 *            the new extension
-	 */
-	public void addExtension(TraceModelExtension extension) {
-		if (extension == null) {
-			throw new NullPointerException();
-		}
-		extensions.add(extension);
-		extension.setOwner(this);
-		model.notifyExtensionAdded(this, extension);
-	}
-
-	/**
-	 * Removes an extension from this object. Generates extensionRemoved event
-	 * to model listeners if the extension was actually removed
-	 * 
-	 * @param extension
-	 *            the extension to be removed
-	 */
-	public void removeExtension(TraceModelExtension extension) {
-		if (extensions.remove(extension)) {
-			extension.setOwner(null);
-			model.notifyExtensionRemoved(this, extension);
-		}
-	}
-
-	/**
-	 * Removes all extensions which are of given type
-	 * 
-	 * @param <T>
-	 *            the type of the extension
-	 * @param extClass
-	 *            the extension type
-	 */
-	public <T extends TraceModelExtension> void removeExtensions(
-			Class<T> extClass) {
-		Iterator<TraceModelExtension> itr = extensions.iterator();
-		while (itr.hasNext()) {
-			TraceModelExtension ext = itr.next();
-			if (extClass.isAssignableFrom(ext.getClass())) {
-				itr.remove();
-				ext.setOwner(null);
-				model.notifyExtensionRemoved(this, ext);
-			}
-		}
-	}
-
-	/**
-	 * Returns the first extension which is of given type. The extensions are
-	 * stored in a list in the order they have been added. This returns the
-	 * first instance found from the list.
-	 * 
-	 * @param <T>
-	 *            the type of the extension
-	 * @param extClass
-	 *            the extension type
-	 * @return the extension or null if not found
-	 */
-	@SuppressWarnings("unchecked")
-	public <T extends TraceModelExtension> T getExtension(Class<T> extClass) {
-		T ret = null;
-		for (TraceModelExtension ext : extensions) {
-			if (extClass.isAssignableFrom(ext.getClass())) {
-				ret = (T) ext;
-				break;
-			}
-		}
-		return ret;
-	}
-
-	/**
-	 * Returns the extensions which are of given type.
-	 * 
-	 * @param <T>
-	 *            the type of the extension
-	 * @param extClass
-	 *            the extension type
-	 * @return iterator over the list of extension
-	 */
-	@SuppressWarnings("unchecked")
-	public <T extends TraceModelExtension> Iterator<T> getExtensions(
-			Class<T> extClass) {
-		ArrayList<T> list = new ArrayList<T>();
-		for (TraceModelExtension ext : extensions) {
-			if (extClass.isAssignableFrom(ext.getClass())) {
-				list.add((T) ext);
-			}
-		}
-		return list.iterator();
-	}
-
-	/**
-	 * Resets the ID and name
-	 */
-	void reset() {
-		id = 0;
-		name = ""; //$NON-NLS-1$
-	}
-
-	/**
-	 * Sets the complete flag and fires complete event
-	 * @throws TraceCompilerException 
-	 */
-	void setComplete() throws TraceCompilerException {
-		complete = true;
-		model.notifyObjectCreationComplete(this);
-	}
-
-	/**
-	 * Calls OnDelete rules if the object owns them
-	 * 
-	 * @param object
-	 *            the object that was removed
-	 */
-	protected void notifyOnDelete(TraceObject object) {
-		Iterator<TraceObjectRuleOnDelete> rules = object
-				.getExtensions(TraceObjectRuleOnDelete.class);
-		while (rules.hasNext()) {
-			rules.next().objectDeleted();
-		}
-	}
-
-	/**
-	 * Gets the complete flag
-	 * 
-	 * @return the flag
-	 */
-	public boolean isComplete() {
-		return complete;
-	}
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceObjectFactory.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,319 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Creates trace objects and provides configurable rules for trace object creation
-*
-*/
-package com.nokia.tracecompiler.model;
-
-import java.util.Iterator;
-
-/**
- * Creates trace objects and provides configurable rules for trace object
- * creation
- * 
- */
-public class TraceObjectFactory {
-
-	/**
-	 * The trace model
-	 */
-	private TraceModel model;
-
-	/**
-	 * Rule factory
-	 */
-	private TraceObjectRuleFactory ruleFactory;
-
-	/**
-	 * Creates a new factory
-	 * 
-	 * @param model
-	 *            the model
-	 * @param factory
-	 *            the rule factory
-	 * @throws TraceCompilerException 
-	 */
-	TraceObjectFactory(TraceModel model, TraceObjectRuleFactory factory) throws TraceCompilerException {
-		this.model = model;
-		this.ruleFactory = factory;
-		processNewObjectRules(model);
-		model.setComplete();
-	}
-
-	/**
-	 * Gets the rule factory
-	 * 
-	 * @return the rule factory
-	 */
-	public TraceObjectRuleFactory getRuleFactory() {
-		return ruleFactory;
-	}
-
-	/**
-	 * Creates a new trace group
-	 * 
-	 * @param id
-	 *            the group ID
-	 * @param name
-	 *            the name for the group
-	 * @param extensions
-	 *            list of extensions to be added to the group
-	 * @return the new group
-	 * @throws TraceCompilerException 
-	 */
-	public TraceGroup createTraceGroup(int id, String name,
-			TraceModelExtension[] extensions) throws TraceCompilerException {
-		TraceGroup group = new TraceGroup(model);
-		group.setID(id);
-		group.setName(name);
-		setExtensions(group, extensions);
-		processNewObjectRules(group);
-		group.setComplete();
-		return group;
-	}
-
-	/**
-	 * Creates a new trace
-	 * 
-	 * @param group
-	 *            the trace group
-	 * @param id
-	 *            the id for the trace
-	 * @param name
-	 *            the trace name
-	 * @param traceText
-	 *            the trace text
-	 * @param extensions
-	 *            list of extensions to be added to the trace
-	 * @return the new trace
-	 * @throws TraceCompilerException 
-	 */
-	public Trace createTrace(TraceGroup group, int id, String name,
-			String traceText, TraceModelExtension[] extensions) throws TraceCompilerException {
-		Trace trace = new Trace(group);
-		trace.setID(id);
-		trace.setName(name);
-		trace.setTrace(traceText);
-		setExtensions(trace, extensions);
-		processNewObjectRules(trace);
-		trace.setComplete();
-		return trace;
-	}
-
-	/**
-	 * Creates a new trace parameter
-	 * 
-	 * @param trace
-	 *            the trace the parameter is associated to
-	 * @param id
-	 *            the parameter ID
-	 * @param name
-	 *            the parameter name
-	 * @param type
-	 *            parameter type
-	 * @param extensions
-	 *            list of extensions to be added to the parameter
-	 * @return the new parameter
-	 * @throws TraceCompilerException 
-	 */
-	public TraceParameter createTraceParameter(Trace trace, int id,
-			String name, String type, TraceModelExtension[] extensions) throws TraceCompilerException {
-		TraceParameter parameter = new TraceParameter(trace);
-		initializeParameter(parameter, id, name, type, extensions);
-		return parameter;
-	}
-
-	/**
-	 * Creates a new trace parameter inserting it into the specified index
-	 * 
-	 * @param objectIndex
-	 *            the index for the object
-	 * @param trace
-	 *            the trace the parameter is associated to
-	 * @param id
-	 *            the parameter ID
-	 * @param name
-	 *            the parameter name
-	 * @param type
-	 *            parameter type
-	 * @param extensions
-	 *            list of extensions to be added to the parameter
-	 * @return the new parameter
-	 * @throws TraceCompilerException 
-	 */
-	public TraceParameter createTraceParameter(int objectIndex, Trace trace,
-			int id, String name, String type, TraceModelExtension[] extensions) throws TraceCompilerException {
-		TraceParameter parameter = new TraceParameter(trace, objectIndex);
-		initializeParameter(parameter, id, name, type, extensions);
-		return parameter;
-	}
-
-	/**
-	 * Initializes a parameter
-	 * 
-	 * @param parameter
-	 *            the parameter
-	 * @param id
-	 *            the parameter ID
-	 * @param name
-	 *            the parameter name
-	 * @param type
-	 *            parameter type
-	 * @param extensions
-	 *            list of extensions to be added to the parameter
-	 * @throws TraceCompilerException 
-	 */
-	private void initializeParameter(TraceParameter parameter, int id,
-			String name, String type, TraceModelExtension[] extensions) throws TraceCompilerException {
-		parameter.setID(id);
-		parameter.setName(name);
-		parameter.setType(type);
-		setExtensions(parameter, extensions);
-		processNewObjectRules(parameter);
-		parameter.setComplete();
-	}
-
-	/**
-	 * Creates a new constant table
-	 * 
-	 * @param id
-	 *            id for the table
-	 * @param typeName
-	 *            the name for the table
-	 * @param extensions
-	 *            list of extensions to be added to the table
-	 * @return the constant table
-	 * @throws TraceCompilerException 
-	 */
-	public TraceConstantTable createConstantTable(int id, String typeName,
-			TraceModelExtension[] extensions) throws TraceCompilerException {
-		TraceConstantTable table = new TraceConstantTable(model);
-		table.setID(id);
-		table.setName(typeName);
-		setExtensions(table, extensions);
-		processNewObjectRules(table);
-		table.setComplete();
-		for (TraceGroup group : model) {
-			for (Trace trace : group) {
-				for (TraceParameter param : trace) {
-					if (param.getType().equals(typeName)) {
-						table.addParameterReference(param);
-					}
-				}
-			}
-		}
-		return table;
-	}
-
-	/**
-	 * Creates a new constant table entry
-	 * 
-	 * @param table
-	 *            constant table
-	 * @param id
-	 *            id for the entry
-	 * @param value
-	 *            value for the entry
-	 * @param extensions
-	 *            list of extensions to be added to the constant
-	 * @return the constant table entry
-	 * @throws TraceCompilerException 
-	 */
-	public TraceConstantTableEntry createConstantTableEntry(
-			TraceConstantTable table, int id, String value,
-			TraceModelExtension[] extensions) throws TraceCompilerException {
-		TraceConstantTableEntry entry = new TraceConstantTableEntry(table);
-		entry.setID(id);
-		entry.setName(value);
-		setExtensions(entry, extensions);
-		processNewObjectRules(entry);
-		entry.setComplete();
-		return entry;
-	}
-
-	/**
-	 * Creates an extension based on its name. This does not add the extension
-	 * to the object, since the setData method should be called first
-	 * 
-	 * @param object
-	 *            the target object for the extension
-	 * @param name
-	 *            the extension name
-	 * @return the created extension
-	 */
-	public TraceModelPersistentExtension createExtension(TraceObject object,
-			String name) {
-		return ruleFactory.createExtension(object, name);
-	}
-
-	/**
-	 * Adds extensions to given object
-	 * 
-	 * @param object
-	 *            the object
-	 * @param extensions
-	 *            extensions to be added
-	 */
-	private void setExtensions(TraceObject object,
-			TraceModelExtension[] extensions) {
-		if (extensions != null) {
-			for (TraceModelExtension element : extensions) {
-				object.addExtension(element);
-			}
-		}
-	}
-
-	/**
-	 * Processes the rules of a new object
-	 * 
-	 * @param object
-	 *            the object to be processed
-	 * @throws TraceCompilerException 
-	 */
-	private void processNewObjectRules(TraceObject object) throws TraceCompilerException {
-		// Calls the factory to preprocess the extensions passed to
-		// create-function
-		ruleFactory.preProcessNewRules(object);
-		// The rules may contain object creation rules
-		Iterator<TraceObjectRule> rules = object
-				.getExtensions(TraceObjectRule.class);
-		while (rules.hasNext()) {
-			TraceObjectRule rule = rules.next();
-			if (rule instanceof TraceObjectRuleCreateObject) {
-				TraceObjectRuleCreateObject createRule = (TraceObjectRuleCreateObject) rule;
-				createRule.createObject();
-			}
-		}
-		// Some rules are removed after the objects have been created
-		Iterator<TraceObjectRuleRemoveOnCreate> itr;
-		boolean changed;
-		do {
-			changed = false;
-			itr = object.getExtensions(TraceObjectRuleRemoveOnCreate.class);
-			while (itr.hasNext() && !changed) {
-				TraceObjectRuleRemoveOnCreate ext = itr.next();
-				if (ext.canBeRemoved()) {
-					object.removeExtension(ext);
-					changed = true;
-				}
-			}
-		} while (changed);
-		// After processing is complete, the rule factory is used to do
-		// post-processing
-		ruleFactory.postProcessNewRules(object);
-	}
-
-}
\ No newline at end of file
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceObjectModifier.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Modifier properties is returned by one of the TraceObjectUtils.modify methods
-*
-*/
-package com.nokia.tracecompiler.model;
-
-/**
- * Modifier properties is returned by one of the TraceObjectUtils.modify
- * methods.
- * 
- */
-public interface TraceObjectModifier {
-
-	/**
-	 * Gets the data
-	 * 
-	 * @return the data
-	 */
-	public String getData();
-
-	/**
-	 * Checks if the data was changed during the modify call
-	 * 
-	 * @return true if data was changed
-	 */
-	public boolean hasChanged();
-
-}
\ No newline at end of file
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceObjectProperty.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Property associated with a trace object
-*
-*/
-package com.nokia.tracecompiler.model;
-
-/**
- * Property associated with a trace object
- * 
- */
-public interface TraceObjectProperty {
-
-	/**
-	 * Gets the name of the property
-	 * 
-	 * @return the name
-	 */
-	public String getName();
-
-	/**
-	 * Gets the value of the property
-	 * 
-	 * @return the value
-	 */
-	public String getValue();
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceObjectPropertyList.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* List of properties associated to a trace object
-*
-*/
-package com.nokia.tracecompiler.model;
-
-/**
- * List of properties associated to a trace object
- * 
- */
-public interface TraceObjectPropertyList extends TraceModelExtension,
-		Iterable<TraceObjectProperty> {
-
-	/**
-	 * Gets a property by name
-	 * 
-	 * @param name
-	 *            the property name
-	 * @return the property
-	 */
-	public TraceObjectProperty getProperty(String name);
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceObjectPropertyVerifier.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,143 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Content verifier interface for trace objects
-*
-*/
-package com.nokia.tracecompiler.model;
-
-/**
- * Content verifier interface for trace objects
- * 
- */
-public interface TraceObjectPropertyVerifier {
-
-	/**
-	 * Checks the properties of a trace before it is created or modified
-	 * 
-	 * @param group
-	 *            the group for the trace
-	 * @param trace
-	 *            trace to be modified. If creating new, this is null
-	 * @param id
-	 *            the trace ID
-	 * @param name
-	 *            the name of the trace
-	 * @param data
-	 *            the trace data
-	 * @throws TraceCompilerException
-	 *             if properties are not valid. The error code from the
-	 *             exception is used to create an error dialog
-	 */
-	public void checkTraceProperties(TraceGroup group, Trace trace, int id,
-			String name, String data) throws TraceCompilerException;
-
-	/**
-	 * Checks the properties of a trace group before it is created or modified
-	 * 
-	 * @param owner
-	 *            the model owning the trace group
-	 * @param group
-	 *            group to be modified. If creating new, this is null
-	 * @param id
-	 *            the trace ID
-	 * @param name
-	 *            the name of the trace
-	 * @throws TraceCompilerException
-	 *             if properties are not valid. The error code from the
-	 *             exception is used to create an error dialog
-	 */
-	public void checkTraceGroupProperties(TraceModel owner, TraceGroup group,
-			int id, String name) throws TraceCompilerException;
-
-	/**
-	 * Checks the properties of a parameter before it is created or modified
-	 * 
-	 * @param owner
-	 *            the parameter owner
-	 * @param parameter
-	 *            parameter to be modified. If creating new, this is null
-	 * @param id
-	 *            the parameter ID
-	 * @param name
-	 *            the name of the parameter
-	 * @param type
-	 *            the type of the parameter
-	 * @throws TraceCompilerException
-	 *             if properties are not valid. The error code from the
-	 *             exception is used to create an error dialog
-	 */
-	public void checkTraceParameterProperties(Trace owner,
-			TraceParameter parameter, int id, String name, String type)
-			throws TraceCompilerException;
-
-	/**
-	 * Checks the properties of a constant table before it is created or
-	 * modified
-	 * 
-	 * @param owner
-	 *            the model owning the constant table
-	 * @param table
-	 *            the table to be changed. If creating new, this is null
-	 * @param id
-	 *            the ID of the table
-	 * @param tableName
-	 *            the name of the table
-	 * @throws TraceCompilerException
-	 *             if properties are not valid. The error code from the
-	 *             exception is used to create an error dialog
-	 */
-	public void checkConstantTableProperties(TraceModel owner,
-			TraceConstantTable table, int id, String tableName)
-			throws TraceCompilerException;
-
-	/**
-	 * Checks the properties of a constant table entry before it is created
-	 * 
-	 * @param table
-	 *            the constant table
-	 * @param entry
-	 *            the entry to be modified. If creating new, this is null
-	 * @param id
-	 *            the ID for the new entry
-	 * @param value
-	 *            the value for the new entry
-	 * @throws TraceCompilerException
-	 *             if properties are not valid. The error code from the
-	 *             exception is used to create an error dialog
-	 */
-	public void checkConstantProperties(TraceConstantTable table,
-			TraceConstantTableEntry entry, int id, String value)
-			throws TraceCompilerException;
-
-	/**
-	 * Checks the properties of trace model before it is modified
-	 * 
-	 * @param model
-	 *            the trace model
-	 * @param id
-	 *            the model ID
-	 * @param name
-	 *            the model name
-	 * @param path
-	 *            the model path
-	 * @throws TraceCompilerException
-	 *             if properties are not valid. The error code from the
-	 *             exception is used to create an error dialog
-	 */
-	public void checkTraceModelProperties(TraceModel model, int id,
-			String name, String path) throws TraceCompilerException;
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceObjectRule.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,26 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Base interface for trace model object processing rules
-*
-*/
-package com.nokia.tracecompiler.model;
-
-/**
- * Base interface for trace model object processing rules
- * 
- */
-public interface TraceObjectRule extends TraceModelExtension {
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceObjectRuleCreateObject.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Rule for automatic object creation
-*
-*/
-package com.nokia.tracecompiler.model;
-
-/**
- * Rule for automatic object creation
- * 
- */
-public interface TraceObjectRuleCreateObject extends TraceObjectRule {
-
-	/**
-	 * Called to create a new object into the owner of this rule
-	 * @throws TraceCompilerException 
-	 */
-	public void createObject() throws TraceCompilerException;
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceObjectRuleFactory.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,55 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Creates trace objects and provides configurable rules for trace object creation
-*
-*/
-package com.nokia.tracecompiler.model;
-
-/**
- * Allows registration of rules into the trace object factory
- * 
- */
-public interface TraceObjectRuleFactory {
-
-	/**
-	 * Called before the rules of a new object are processed by object factory
-	 * 
-	 * @param object
-	 *            new object
-	 */
-	public void preProcessNewRules(TraceObject object);
-
-	/**
-	 * Called after the rules of a new object are processed by object factory
-	 * 
-	 * @param object
-	 *            new object
-	 */
-	public void postProcessNewRules(TraceObject object);
-
-	/**
-	 * Creates an extension based on extension name
-	 * 
-	 * @param object
-	 *            the target object
-	 * @param name
-	 *            the name of the extension
-	 * @return the new extension
-	 */
-	public TraceModelPersistentExtension createExtension(TraceObject object,
-			String name);
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceObjectRuleOnDelete.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Rule to perform processing when object is deleted
-*
-*/
-package com.nokia.tracecompiler.model;
-
-/**
- * Rule to perform processing when object is deleted
- * 
- */
-public interface TraceObjectRuleOnDelete extends TraceObjectRule {
-
-	/**
-	 * Called when the object that owns this rule is deleted
-	 */
-	public void objectDeleted();
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceObjectRuleRemoveOnCreate.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Extension that is removed from the object after it has been created
-*
-*/
-package com.nokia.tracecompiler.model;
-
-/**
- * Extension that is removed from the object after it has been created
- * 
- */
-public interface TraceObjectRuleRemoveOnCreate extends TraceObjectRule {
-
-	/**
-	 * Returns true if this rule can be removed
-	 * 
-	 * @return true if remove, false otherwise
-	 */
-	public boolean canBeRemoved();
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceObjectUtils.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,224 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Utility functions for checking properties of trace objects
-*
-*/
-package com.nokia.tracecompiler.model;
-
-import java.util.Comparator;
-
-/**
- * Utility functions for checking properties of trace objects.
- * 
- */
-public class TraceObjectUtils {
-
-	/**
-	 * Compares a trace to trace ID
-	 */
-	static Comparator<Object> traceToIDComparator = new Comparator<Object>() {
-
-		/**
-		 * Compares a trace to trace name
-		 * 
-		 * @param t1
-		 *            the trace
-		 * @param t2
-		 *            the trace name
-		 * @return the comparison result
-		 */
-		public int compare(Object t1, Object t2) {
-			int n1 = ((Trace) t1).getID();
-			int n2 = (Integer) t2;
-			return n1 > n2 ? 1 : n1 < n2 ? -1 : 0;
-		}
-
-	};
-
-	/**
-	 * Compares a trace to trace name
-	 */
-	static Comparator<Object> traceToNameComparator = new Comparator<Object>() {
-
-		/**
-		 * Compares a trace to trace name
-		 * 
-		 * @param t1
-		 *            the trace
-		 * @param t2
-		 *            the trace name
-		 * @return the comparison result
-		 */
-		public int compare(Object t1, Object t2) {
-			String n1 = ((Trace) t1).getName();
-			String n2 = (String) t2;
-			if (n1 == null) {
-				n1 = ""; //$NON-NLS-1$
-			}
-			if (n2 == null) {
-				n2 = ""; //$NON-NLS-1$
-			}
-			return n1.compareTo(n2);
-		}
-
-	};
-
-	/**
-	 * Compares a trace to trace text
-	 */
-	static Comparator<Object> traceToTextComparator = new Comparator<Object>() {
-
-		/**
-		 * Compares a trace to trace text
-		 * 
-		 * @param t1
-		 *            the trace
-		 * @param t2
-		 *            the trace text
-		 * @return the comparison result
-		 */
-		public int compare(Object t1, Object t2) {
-			String n1 = ((Trace) t1).getTrace();
-			String n2 = (String) t2;
-			if (n1 == null) {
-				n1 = ""; //$NON-NLS-1$
-			}
-			if (n2 == null) {
-				n2 = ""; //$NON-NLS-1$
-			}
-			return n1.compareTo(n2);
-		}
-
-	};
-
-	/**
-	 * Compares trace objects by ID
-	 */
-	static Comparator<TraceObject> traceObjectIDComparator = new Comparator<TraceObject>() {
-
-		/**
-		 * Compares ID's of trace objects
-		 * 
-		 * @param t1
-		 *            trace 1
-		 * @param t2
-		 *            trace 2
-		 * @return the comparison result
-		 */
-		public int compare(TraceObject t1, TraceObject t2) {
-			int n1 = t1.getID();
-			int n2 = t2.getID();
-			return n1 > n2 ? 1 : n1 < n2 ? -1 : 0;
-		}
-
-	};
-
-	/**
-	 * Compares trace objects by name
-	 */
-	static Comparator<TraceObject> traceObjectNameComparator = new Comparator<TraceObject>() {
-
-		/**
-		 * Compares names of trace objects
-		 * 
-		 * @param t1
-		 *            trace 1
-		 * @param t2
-		 *            trace 2
-		 * @return the comparison result
-		 */
-		public int compare(TraceObject t1, TraceObject t2) {
-			String n1 = t1.getName();
-			String n2 = t2.getName();
-			if (n1 == null) {
-				n1 = ""; //$NON-NLS-1$
-			}
-			if (n2 == null) {
-				n2 = ""; //$NON-NLS-1$
-			}
-			return n1.compareTo(n2);
-		}
-
-	};
-
-	/**
-	 * Prevents construction
-	 */
-	private TraceObjectUtils() {
-	}
-
-	/**
-	 * Checks if trace parameter name is already in use and changes if it is.
-	 * 
-	 * @param owner
-	 *            the owner of the parameter
-	 * @param name
-	 *            the parameter name
-	 * @return the modifier interface
-	 */
-	public static TraceObjectModifier modifyDuplicateParameterName(Trace owner,
-			String name) {
-		DuplicateParameterNameModifier modifier = new DuplicateParameterNameModifier(
-				owner, name);
-		modifier.processName();
-		return modifier;
-	}
-
-	/**
-	 * Gets the duplicate modifier from given text
-	 * 
-	 * @param text
-	 *            the text
-	 * @return the duplicate modifier
-	 */
-	public static String removeDuplicateModifier(String text) {
-		String retval;
-		String s = DuplicateValueModifier.getModifier(text);
-		if (s != null) {
-			retval = text.substring(s.length());
-		} else {
-			retval = text;
-		}
-		return retval;
-	}
-
-	/**
-	 * Finds a property from a trace object. This returns an empty string if not
-	 * found
-	 * 
-	 * @param object
-	 *            the object
-	 * @param name
-	 *            the property name
-	 * @return the property value
-	 */
-	public static String findProperty(TraceObject object, String name) {
-		String retval = null;
-		TraceObjectPropertyList propertyList = object
-				.getExtension(TraceObjectPropertyList.class);
-		if (propertyList != null) {
-			TraceObjectProperty property = propertyList.getProperty(name);
-			if (property != null) {
-				retval = property.getValue();
-			}
-		}
-		if (retval == null) {
-			retval = ""; //$NON-NLS-1$
-		}
-		return retval;
-	}
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceParameter.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,249 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* All trace objects may contain parameters
-*
-*/
-package com.nokia.tracecompiler.model;
-
-/**
- * Traces may contain parameters
- * 
- */
-public class TraceParameter extends TraceObject {
-
-	/**
-	 * The type of this parameter
-	 */
-	private String type;
-
-	/**
-	 * Hexadecimal (%p), pointer type
-	 */
-	public static final String POINTER = "void*"; //$NON-NLS-1$
-	
-	/**
-	 * Signed decimal (%d), 32-bit type
-	 */
-	public static final String SDEC32 = "int32"; //$NON-NLS-1$
-
-	/**
-	 * Hexadecimal (%x), 32-bit type
-	 */
-	public static final String HEX32 = "hex32"; //$NON-NLS-1$
-
-	/**
-	 * Unsigned decimal (%u), 32-bit type
-	 */
-	public static final String UDEC32 = "uint32"; //$NON-NLS-1$
-	
-	/**
-	 * Octal (%o), 32-bit type
-	 */
-	public static final String OCT32 = "oct32"; //$NON-NLS-1$	
-
-	/**
-	 * Signed decimal (%hd), 16-bit type
-	 */
-	public static final String SDEC16 = "int16"; //$NON-NLS-1$
-
-	/**
-	 * Hexadecimal (%hx), 16-bit type
-	 */
-	public static final String HEX16 = "hex16"; //$NON-NLS-1$
-
-	/**
-	 * Unsigned decimal (%hu), 16-bit type
-	 */
-	public static final String UDEC16 = "uint16"; //$NON-NLS-1$
-	
-	/**
-	 * Octal (%ho), 16-bit type
-	 */
-	public static final String OCT16 = "oct16"; //$NON-NLS-1$	
-
-	/**
-	 * Signed decimal (%hhd), 8-bit type
-	 */
-	public static final String SDEC8 = "int8"; //$NON-NLS-1$
-
-	/**
-	 * Hexadecimal (%hhx), 8-bit type
-	 */
-	public static final String HEX8 = "hex8"; //$NON-NLS-1$
-
-	/**
-	 * Unsigned decimal (%hhu), 8-bit type
-	 */
-	public static final String UDEC8 = "uint8"; //$NON-NLS-1$
-	
-	/**
-	 * Octal (%hho), 8-bit type
-	 */
-	public static final String OCT8 = "oct8"; //$NON-NLS-1$
-
-	/**
-	 * Signed decimal (%ld), 64-bit type
-	 */
-	public static final String SDEC64 = "int64"; //$NON-NLS-1$
-
-	/**
-	 * Time, 64-bit type
-	 */
-	public static final String TIME = "time"; //$NON-NLS-1$	
-	
-	/**
-	 * Hexadecimal (%lx), 64-bit type
-	 */
-	public static final String HEX64 = "hex64"; //$NON-NLS-1$
-
-	/**
-	 * Unsigned decimal (%lu), 64-bit type
-	 */
-	public static final String UDEC64 = "uint64"; //$NON-NLS-1$
-	
-	/**
-	 * Octal (%lo), 64-bit type
-	 */
-	public static final String OCT64 = "oct64"; //$NON-NLS-1$	
-
-	/**
-	 * Ascii string (%s) type
-	 */
-	public static final String ASCII = "ascii"; //$NON-NLS-1$
-
-	/**
-	 * Unicode string (%S) type
-	 */
-	public static final String UNICODE = "unicode"; //$NON-NLS-1$
-
-	/**
-	 * Fixed floating point (%f), 64-bit
-	 */
-	public static final String FLOAT_FIX = "ffix"; //$NON-NLS-1$
-
-	/**
-	 * Exponent floating point (%e), 64-bit
-	 */
-	public static final String FLOAT_EXP = "fexp"; //$NON-NLS-1$
-
-	/**
-	 * Fixed / exponential floating point (%g), 64-bit
-	 */
-	public static final String FLOAT_OPT = "fopt"; //$NON-NLS-1$
-
-	/**
-	 * The trace this parameter belongs to
-	 */
-	private Trace owner;
-
-	/**
-	 * Constructor
-	 * 
-	 * @param owner
-	 *            the object owning this parameter
-	 */
-	public TraceParameter(Trace owner) {
-		setModel(owner.getModel());
-		owner.addParameter(this);
-		this.owner = owner;
-	}
-
-	/**
-	 * Constructor, which inserts the parameter into specified index
-	 * 
-	 * @param owner
-	 *            the object owning this parameter
-	 * @param index
-	 *            the parameter index
-	 */
-	TraceParameter(Trace owner, int index) {
-		setModel(owner.getModel());
-		owner.insertParameter(index, this);
-		this.owner = owner;
-	}
-
-	/**
-	 * Gets the trace this parameter is associated to.
-	 * 
-	 * @return the trace
-	 */
-	public Trace getTrace() {
-		return owner;
-	}
-
-	/**
-	 * Sets the parameter type. Generates propertyUpdated event to model
-	 * listeners if type changes
-	 * 
-	 * @see TraceModelListener#propertyUpdated(TraceObject, int)
-	 * @param type
-	 *            the parameter type
-	 * @throws TraceCompilerException 
-	 */
-	public void setType(String type) throws TraceCompilerException {
-		if (!type.equals(this.type)) {
-			removeTableReference();
-			this.type = type;
-			addTableReference();
-			getModel().notifyPropertyUpdated(this, TraceModelListener.TYPE);
-		}
-	}
-
-	/**
-	 * Gets the parameter type
-	 * 
-	 * @return the parameter type
-	 */
-	public String getType() {
-		return type;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.model.TraceObject#reset()
-	 */
-	@Override
-	void reset() {
-		removeTableReference();
-		super.reset();
-	}
-
-	/**
-	 * Adds a constant table reference
-	 */
-	private void addTableReference() {
-		if (type != null) {
-			TraceConstantTable table = getModel().findConstantTableByName(type);
-			if (table != null) {
-				table.addParameterReference(this);
-			}
-		}
-	}
-
-	/**
-	 * Removes the constant table reference
-	 */
-	private void removeTableReference() {
-		if (type != null) {
-			TraceConstantTable table = getModel().findConstantTableByName(type);
-			if (table != null) {
-				table.removeParameterReference(this);
-			}
-		}
-	}
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceProcessingListener.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Multi-update optimization
-*
-*/
-package com.nokia.tracecompiler.model;
-
-/**
- * Callback interface which should be notified when performing multiple updates
- * to the trace model. The implementation of TraceModelListener can also
- * implement this interface to avoid performing unnecessary updates.
- * 
- */
-public interface TraceProcessingListener {
-
-	/**
-	 * Called when a sequence of trace model updates is about to start
-	 */
-	public void processingStarted();
-
-	/**
-	 * Called when a sequence of trace model updates has finished
-	 * 
-	 * @param changed
-	 *            true if the model was changed while processing, false if not
-	 */
-	public void processingComplete(boolean changed);
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/package.html	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-<html><body>
-Contains the model of TraceCompiler.
-</body></html>
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/package.html	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-<html><body>
-TraceCompiler implementation.
-</body></html>
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/plugin/TraceAPIFormatter.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,86 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Trace API formatter plug-in
-*
-*/
-package com.nokia.tracecompiler.plugin;
-
-/**
- * Trace API formatter plug-in
- * 
- */
-public interface TraceAPIFormatter {
-
-	/**
-	 * Formatting types for traces
-	 */
-	public enum TraceFormatType {
-
-		/**
-		 * Format for extension function header
-		 */
-		HEADER,
-
-		/**
-		 * Format for trace buffer function. Added to extension function
-		 * definition if trace contains more data than is supported by the API
-		 */
-		TRACE_BUFFER,
-
-		/**
-		 * Format for trace function if the extension function parameters can be
-		 * packed into normal trace API call. For example, if the extension
-		 * function takes 4 8-bit arguments, they are packed into a single
-		 * 32-bit parameter
-		 */
-		TRACE_PACKED,
-
-		/**
-		 * Format for trace activation check function. Added to extension
-		 * function definition
-		 */
-		TRACE_ACTIVATION,
-
-		/**
-		 * Empty declaration for an extension function header
-		 */
-		EMPTY_MACRO
-	}
-
-	/**
-	 * Gets the name of this formatter
-	 * 
-	 * @return the name
-	 */
-	public String getName();
-
-	/**
-	 * Gets the title shown in the API selection preferences dialog
-	 * 
-	 * @return the title
-	 */
-	public String getTitle();
-
-	/**
-	 * Gets the trace format based on format type
-	 * 
-	 * @param type
-	 *            the format type
-	 * @return the trace format
-	 */
-	public String getTraceFormat(TraceFormatType type);
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/plugin/TraceAPIParser.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,60 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Trace API parser plug-in
-*
-*/
-package com.nokia.tracecompiler.plugin;
-
-import com.nokia.tracecompiler.engine.TraceLocation;
-import com.nokia.tracecompiler.engine.TraceCompilerEngineErrorCodes.TraceCompilerErrorCode;
-
-/**
- * Trace API parser plug-in
- * 
- */
-public interface TraceAPIParser {
-
-	/**
-	 * Gets the tag to be located from source
-	 * 
-	 * @return the tag
-	 */
-	public String getSourceTag();
-
-	/**
-	 * Gets the list of suffixes that are allowed with the source tag
-	 * 
-	 * @return the suffixes
-	 */
-	public String[] getTagSuffixes();
-
-	/**
-	 * Verifies the validity of given location
-	 * 
-	 * @param location
-	 *            the location to be checked
-	 * @return error code from TraceCompilerErrorCodes
-	 */
-	public TraceCompilerErrorCode checkLocationValidity(TraceLocation location);
-
-	/**
-	 * Gets the name of the group where locations created by this parser belong
-	 * 
-	 * @return the location group
-	 */
-	public String getLocationGroup();
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/plugin/TraceAPIPlugin.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Plug-in which provides trace API extensions
-*
-*/
-package com.nokia.tracecompiler.plugin;
-
-/**
- * Plug-in which provides trace API extensions
- * 
- */
-public interface TraceAPIPlugin extends TraceCompilerPlugin {
-
-	/**
-	 * Gets the list of trace API formatters
-	 * 
-	 * @return the formatters
-	 */
-	public TraceAPIFormatter[] getFormatters();
-
-	/**
-	 * Gets the list of trace API parsers
-	 * 
-	 * @return the parsers
-	 */
-	public TraceAPIParser[] getParsers();
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/plugin/TraceCompilerExport.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Export plug-in interface for trace projects
-*
-*/
-package com.nokia.tracecompiler.plugin;
-
-import com.nokia.tracecompiler.model.TraceCompilerException;
-
-/**
- * Export plug-in interface for trace projects.
- * 
- */
-public interface TraceCompilerExport extends TraceCompilerPlugin {
-
-	/**
-	 * Exports the trace project. This is called when the user selects the
-	 * export action from the menu
-	 * 
-	 * @throws TraceCompilerException
-	 *             if export fails
-	 */
-	public void exportTraceProject() throws TraceCompilerException;
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/plugin/TraceCompilerPlugin.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* TraceCompiler plug-in interface
-*
-*/
-package com.nokia.tracecompiler.plugin;
-
-import com.nokia.tracecompiler.model.TraceModel;
-
-/**
- * TraceCompiler plug-in interface
- * 
- */
-public interface TraceCompilerPlugin {
-
-	/**
-	 * Notification that the trace project has been opened. Provides the model
-	 * to this plug-in. The model is not changed until closeTraceProject and
-	 * thus no null-checks are needed.
-	 * 
-	 * @param model
-	 *            the trace model
-	 */
-	public void traceProjectOpened(TraceModel model);
-
-	/**
-	 * Notification that the trace project has been closed
-	 */
-	public void traceProjectClosed();
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/plugin/TraceFormatConstants.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,123 +0,0 @@
-/*
- * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of "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:
- *
- * Description:
- *
- * Formatting constants for traces
- *
- */
-package com.nokia.tracecompiler.plugin;
-
-/**
- * Formatting constants for traces
- * 
- */
-public interface TraceFormatConstants {
-
-	/**
-	 * Function name in upper case
-	 */
-	String FORMAT_FUNCTION_NAME_UPPER_CASE = "{$FN}"; //$NON-NLS-1$
-
-	/**
-	 * Function name in normal case
-	 */
-	String FORMAT_FUNCTION_NAME_NORMAL_CASE = "{$fn}"; //$NON-NLS-1$
-
-	/**
-	 * Class name in upper case
-	 */
-	String FORMAT_CLASS_NAME_UPPER_CASE = "{$CN}"; //$NON-NLS-1$
-
-	/**
-	 * Class name in normal case
-	 */
-	String FORMAT_CLASS_NAME_NORMAL_CASE = "{$cn}"; //$NON-NLS-1$
-
-	/**
-	 * Tag which is replaced by trace text when inserting a trace to source
-	 */
-	String FORMATTED_TRACE = "%FORMATTED_TRACE%"; //$NON-NLS-1$
-
-	/**
-	 * Tag which is replaced by parameters when inserting a trace to source
-	 */
-	String PARAMETERS_FORMAT = "%PARAMETERS%"; //$NON-NLS-1$
-
-	/**
-	 * Insert format for include header
-	 */
-	String INCLUDE_FORMAT = "%INCLUDE%"; //$NON-NLS-1$
-
-	/**
-	 * Tag which is replaced by parameter count when inserting a trace to source
-	 */
-	String PARAM_COUNT_FORMAT = "%PC%"; //$NON-NLS-1$
-
-	/**
-	 * Tag which is replaced by group name when inserting a trace to source
-	 */
-	String GROUP_FORMAT = "%GROUP%"; //$NON-NLS-1$
-
-	/**
-	 * Tag which is replaced by trace name when inserting a trace to source
-	 */
-	String NAME_FORMAT = "%NAME%"; //$NON-NLS-1$
-
-	/**
-	 * Tag which is replaced by state machine name when inserting a trace to
-	 * source
-	 */
-	String STATE_MACHINE_NAME_FORMAT = "%STATE_MACHINE_NAME%"; //$NON-NLS-1$
-
-	/**
-	 * Tag which is replaced by state machine state when inserting a trace to
-	 * source
-	 */
-	String STATE_MACHINE_STATE_FORMAT = "%STATE_MACHINE_STATE%"; //$NON-NLS-1$
-
-	/**
-	 * Tag which is replaced by event name when inserting a trace to source
-	 */
-	String EVENT_NAME_FORMAT = "%EVENT_NAME%"; //$NON-NLS-1$
-
-	/**
-	 * Tag which is replaced by event start trace name when inserting a trace to
-	 * source
-	 */
-	String EVENT_START_TRACE_NAME_FORMAT = "%EVENT_START_TRACE_NAME%"; //$NON-NLS-1$
-
-	/**
-	 * Tag which is replaced by trace text when inserting a trace to source
-	 */
-	String TEXT_FORMAT = "%TEXT%"; //$NON-NLS-1$
-
-	/**
-	 * Tag which is replaced with the data buffer pointer when formatting
-	 * complex traces into the trace header
-	 */
-	String DATA_BUFFER_FORMAT = "%DATA%"; //$NON-NLS-1$
-
-	/**
-	 * Tag which is replaced with the data buffer length when formatting complex
-	 * traces into the trace header
-	 */
-	String DATA_LENGTH_FORMAT = "%LENGTH%"; //$NON-NLS-1$
-
-	/**
-	 * Comment format which needs to be used. Otherwise the comment before /
-	 * after trace configuration will not work
-	 */
-	String COMMENT_FORMAT = " //"; //$NON-NLS-1$
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/plugin/TraceHeaderContribution.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,61 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Trace header contribution
-*
-*/
-package com.nokia.tracecompiler.plugin;
-
-import com.nokia.tracecompiler.model.TraceModelExtension;
-
-/**
- * Interface which can be added to model by plug-in's to contribute data to the
- * trace header
- * 
- */
-public interface TraceHeaderContribution extends TraceModelExtension {
-
-	/**
-	 * List of possible contributions to the trace header file
-	 */
-	public enum TraceHeaderContributionType {
-
-		/**
-		 * #define statements to be added to the header
-		 */
-		GLOBAL_DEFINES,
-
-		/**
-		 * #include statements to be added to the header
-		 */
-		GLOBAL_INCLUDES,
-
-		/**
-		 * Content for the main header file
-		 */
-		MAIN_HEADER_CONTENT
-
-	}
-
-	/**
-	 * Gets data to be added to the trace header
-	 * 
-	 * @param type
-	 *            the contribution type
-	 * @return the data to be added, depends on type
-	 */
-	public String[] getContribution(TraceHeaderContributionType type);
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/plugin/package.html	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-<html><body>
-Interfaces for TraceCompiler plug-ins
-</body></html>
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/project/FormattingUtils.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,122 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Utilities for trace formatting
-*
-*/
-package com.nokia.tracecompiler.project;
-
-//import java.util.*;
-import com.nokia.tracecompiler.engine.TraceCompilerEngineGlobals;
-import com.nokia.tracecompiler.engine.TraceCompilerEngineErrorCodes.TraceCompilerErrorCode;
-import com.nokia.tracecompiler.model.TraceCompilerException;
-import com.nokia.tracecompiler.model.TraceGroup;
-import com.nokia.tracecompiler.model.TraceModel;
-
-
-/**
- * Utilities for trace formatting
- * 
- */
-public final class FormattingUtils {
-
-	/**
-	 * Separator for prefix
-	 */
-	private static final String PREFIX_SEPARATOR = ": "; //$NON-NLS-1$
-
-	/**
-	 * Gets a group ID based on group name
-	 * 
-	 * @param model
-	 *            the trace model
-	 * @param name
-	 *            the group name
-	 * @return the group ID
-	 * @throws TraceCompilerException
-	 */
-	public static int getGroupID(TraceModel model, String name)
-			throws TraceCompilerException {
-
-		// First check that is group one of the default groups
-		int retval = GroupNames.getIdByName(name);
-		// If group was not one of the default groups then get next group Id from model
-		if (retval == 0) {
-			retval = model.getNextGroupID();
-			if (retval < GroupNames.USER_GROUP_ID_FIRST) {
-				retval = GroupNames.USER_GROUP_ID_FIRST;
-			}
-			else if(retval > GroupNames.USER_GROUP_ID_LAST){
-				String msg = "You have exceeded the number of Group IDs you have allocated."; //$NON-NLS-1$
-				TraceCompilerEngineGlobals.getEvents().postErrorMessage(msg, null, true);
-				throw new TraceCompilerException(
-						TraceCompilerErrorCode.RUN_OUT_OF_GROUP_IDS);		
-			}
-		}
-		return retval;
-	}
-
-	/**
-	 * Gets the default component prefix
-	 * 
-	 * @param model
-	 *            the model
-	 * @return the prefix
-	 */
-	public static String getDefaultComponentPrefix(TraceModel model) {
-		return model.getName() + PREFIX_SEPARATOR;
-	}
-
-	/**
-	 * Gets the default component suffix
-	 * 
-	 * @param model
-	 *            the model
-	 * @return the suffix
-	 */
-	public static String getDefaultComponentSuffix(TraceModel model) {
-		return ""; //$NON-NLS-1$
-	}
-
-	/**
-	 * Gets the default group prefix
-	 * 
-	 * @param group
-	 *            the group
-	 * @return the prefix
-	 */
-	public static String getDefaultGroupPrefix(TraceGroup group) {
-		String name = group.getName();
-		if (name.startsWith(GroupNames.DEFAULT_GROUP_PREFIX)) {
-			int start = GroupNames.DEFAULT_GROUP_PREFIX.length();
-			// First character retains case, others are converted to lower case
-			name = name.charAt(start) + name.substring(start + 1).toLowerCase();
-		}
-		name += PREFIX_SEPARATOR;
-		return name;
-	}
-
-	/**
-	 * Gets the default group suffix
-	 * 
-	 * @param group
-	 *            the group
-	 * @return the suffix
-	 */
-	public static String getDefaultGroupSuffix(TraceGroup group) {
-		return ""; //$NON-NLS-1$
-	}
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/project/GroupNameIdPair.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,62 +0,0 @@
-/*
- * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of "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:
- *
- * Description:
- *
- * Class that include group name and id pair
- *
- */
-package com.nokia.tracecompiler.project;
-
-public class GroupNameIdPair {
-
-	// class associates a group name with an integer id
-	String name;
-	int id;
-
-	/**
-	 * Conctructor
-	 * 
-	 * @param name
-	 *            name of the group
-	 * @param id
-	 *            id of the group
-	 */
-	public GroupNameIdPair(String name, int id) {
-		if (name == null) {
-			this.name = ""; //$NON-NLS-1$
-			this.id = -1; // TODO - what is appropriate value here ?
-		} else {
-			this.name = name;
-			this.id = id;
-		}
-	}
-
-	/**
-	 * Get ID
-	 * 
-	 * @return id of the group
-	 */
-	public int Id() {
-		return this.id;
-	}
-
-	/**
-	 * Get name
-	 * 
-	 * @return name of the group
-	 */
-	public String Name() {
-		return this.name;
-	}
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/project/GroupNames.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,291 +0,0 @@
-/*
- * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of "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:
- *
- * Description:
- *
- * Default names for trace groups
- *
- */
-package com.nokia.tracecompiler.project;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileReader;
-import java.io.IOException;
-import java.util.Enumeration;
-import java.util.Vector;
-
-import com.nokia.tracecompiler.TraceCompilerLogger;
-import com.nokia.tracecompiler.TraceCompilerRootException;
-import com.nokia.tracecompiler.engine.TraceCompilerEngineGlobals;
-import com.nokia.tracecompiler.model.TraceCompilerException;
-
-/**
- * Default names for trace groups
- * 
- */
-public class GroupNames {
-
-	public static Vector<GroupNameIdPair> DEFAULT_GROUPS;
-
-	/**
-	 * epoc32 directory
-	 */
-	private static final String EPOC32_DIRECTORY = "epoc32"; //$NON-NLS-1$	
-	
-	/**
-	 * Start of user-defined groups
-	 */
-	public static int USER_GROUP_ID_FIRST = -1;
-
-	/**
-	 * end of user-defined groups
-	 */
-	public static int USER_GROUP_ID_LAST = -1;
-
-	/**
-	 * Constant to be used for EPOCROOT
-	 */
-	public static String EPOCROOT = "EPOCROOT"; //$NON-NLS-1$
-
-	/**
-	 * Constant to be used for the location of opensystemtrace_types.h
-	 */
-	public static String OST_TYPES = "epoc32" + File.separator + "include" + File.separator + "platform" + File.separator + "opensystemtrace_types.h"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-
-	/**
-	 * Prefix for all default groups
-	 */
-	public static String DEFAULT_GROUP_PREFIX = "TRACE_"; //$NON-NLS-1$
-
-	/**
-	 * TRACE_BORDER group name
-	 */
-	public static final String TRACE_BORDER = "TRACE_BORDER"; //$NON-NLS-1$
-
-	/**
-	 * TRACE_API group name
-	 */
-	public static final String TRACE_API = "TRACE_API"; //$NON-NLS-1$
-
-	/**
-	 * TRACE_DUMP group name
-	 */
-	public static final String TRACE_DUMP = "TRACE_DUMP"; //$NON-NLS-1$
-
-	/**
-	 * TRACE_DEBUG group name
-	 */
-	public static final String TRACE_DEBUG = "TRACE_DEBUG"; //$NON-NLS-1$
-
-	/**
-	 * TRACE_DETAILED group name
-	 */
-	public static final String TRACE_DETAILED = "TRACE_DETAILED"; //$NON-NLS-1$
-
-	/**
-	 * TRACE_INTERNALS group name
-	 */
-	public static final String TRACE_INTERNALS = "TRACE_INTERNALS"; //$NON-NLS-1$
-
-	/**
-	 * Calculates location of opensystemtrace_types.h Calls getGroupName Returns
-	 * false if there have been any errors
-	 * 
-	 * @throws TraceCompilerRootException
-	 */
-	public static void initialiseGroupName() throws TraceCompilerRootException {
-
-		String e32 = System.getenv(EPOCROOT);
-		TraceCompilerLogger.printInfo(e32);
-		if (e32 == null || (e32.length() == 0)) {
-			String msg = Messages.getString("GroupNames.0"); //$NON-NLS-1$
-			throw new TraceCompilerRootException(msg, null);
-		}
-
-		// need to check that e32 ends in a file separator
-		if (!e32.endsWith(File.separator)) {
-			TraceCompilerLogger.printInfo(Messages.getString("GroupNames.2")); //$NON-NLS-1$
-			e32 += File.separator;
-		}
-
-		// Check that EPOCROOT is valid
-		File epocRoot = new File(e32 + EPOC32_DIRECTORY);
-		if (epocRoot.exists() == false) {
-			throw new TraceCompilerRootException(Messages.getString("GroupNames.invalidEpocRoot"), null); //$NON-NLS-1$
-		}
-		
-		// tests parsing the opensystemtrace_types.h for expected values
-		String ostHeaderFilename = e32 + OST_TYPES;
-
-		// add the predefined names / ids
-		// this was changed from the previous mechanism to break array indexing
-		// dependency
-		// for linking group names to group ids
-		DEFAULT_GROUPS = new Vector<GroupNameIdPair>();
-
-		// The testing ranges are being hardcoded as the values are linked to
-		// e32btrace.h
-		// The TC would have to be redesigned to read in the values from this
-		// file, which would impact performance
-
-		DEFAULT_GROUPS.add(new GroupNameIdPair("TRACE_TESTING1", 254)); //$NON-NLS-1$
-		TraceCompilerLogger.printInfo(Messages.getString("GroupNames.1")); //$NON-NLS-1$
-		DEFAULT_GROUPS.add(new GroupNameIdPair("TRACE_TESTING2", 255)); //$NON-NLS-1$
-		TraceCompilerLogger.printInfo(Messages.getString("GroupNames.3")); //$NON-NLS-1$
-		try {
-			getGroupName(ostHeaderFilename);
-		} catch (Exception e) {
-			throw new TraceCompilerRootException(
-					Messages.getString("GroupNames.failedToProcessOstHeaderText"), e); //$NON-NLS-1$
-		}
-	}
-
-	/**
-	 * Reads opensystemtrace_types.h and extracts the GroupIds
-	 * 
-	 * @throws IOException
-	 *             if fail to read the header file
-	 * @throws TraceCompilerException
-	 */
-
-	private static void getGroupName(String headerFilename) throws Exception {
-		// TODO this method is buggy as it could process group ids even if there
-		// are commented out
-		// should use regular expression or better parser.
-
-		TraceCompilerLogger
-				.printInfo(Messages.getString("GroupNames.8") + headerFilename); //$NON-NLS-1$
-
-		BufferedReader in = new BufferedReader(new FileReader(headerFilename));
-		try {
-			String str;
-			while ((str = in.readLine()) != null) {
-				if (str.length() != 0) {
-					if (((str.indexOf("EUserDefinedRangeFirst")) != -1) && (USER_GROUP_ID_FIRST == -1)) { //$NON-NLS-1$
-						int val = getGroupIdFromString(str);
-						if (val != -1) {
-							// set user group id first
-							USER_GROUP_ID_FIRST = val;
-							TraceCompilerLogger.printInfo(Messages
-									.getString("GroupNames.4") + val); //$NON-NLS-1$
-						}
-					}
-
-					if (((str.indexOf("EUserDefinedRangeLast")) != -1) && (USER_GROUP_ID_LAST == -1)) { //$NON-NLS-1$
-						int val = getGroupIdFromString(str);
-						if (val != -1) {
-							// set user group id last
-							USER_GROUP_ID_LAST = val;
-							TraceCompilerLogger.printInfo(Messages
-									.getString("GroupNames.12") + val); //$NON-NLS-1$
-						}
-					}
-
-					if ((str.indexOf("enum TGroupIdReserved")) != -1) { //$NON-NLS-1$
-						// search for reserved
-						while ((str.indexOf("};") < 1) && (str.indexOf("} ;") < 1)) { //$NON-NLS-1$//$NON-NLS-2$
-
-							str = in.readLine();
-							if (((str.indexOf("=")) != -1) && ((str.indexOf("*")) < 1)) { //$NON-NLS-1$ //$NON-NLS-2$
-								String groupName = str.substring(0, (str
-										.indexOf("="))); //$NON-NLS-1$
-								groupName = groupName.trim();
-								String substr = str
-										.substring(
-												(str.indexOf("=")) + 1, (str.indexOf(','))); //$NON-NLS-1$
-								int groupId = -1;
-								String trim = substr.trim();
-								try {
-									groupId = Integer.parseInt(trim);
-								} catch (NumberFormatException e) {
-									// not an Int so could be a renaming
-									groupId = getIdByName(trim);
-									if (groupId == 0) {
-										TraceCompilerEngineGlobals
-												.getEvents()
-												.postErrorMessage(
-														Messages.getString("GroupNames.canNotresolveGroupIdPrefix") + trim, null, true); //$NON-NLS-1$
-										// not resolved to an existing name
-										throw new TraceCompilerException(null,
-												true);
-									}
-								}
-								DEFAULT_GROUPS.add(new GroupNameIdPair(
-										groupName, groupId));
-								TraceCompilerLogger.printInfo(groupName
-										+ " = " + groupId); //$NON-NLS-1$
-							}
-						}
-					}
-				}
-			}
-		} catch (Exception e) {
-			TraceCompilerEngineGlobals.getEvents().postErrorMessage(
-					e.getMessage(), null, true);
-			throw e;
-		} finally {
-			in.close();
-		}
-	}
-
-	/**
-	 * Reads opensystemtrace_types.h and extracts the GroupIds value from a
-	 * string containing GroupId name and value. 
-	 * Returns GroupId value, returns -1 if not found or resolved in case of group renaming
-	 */
-
-	private static int getGroupIdFromString(String str) {
-		int groupId = -1;
-		if ((str.indexOf("=")) != -1) { //$NON-NLS-1$
-			String substr = str.substring(
-					(str.indexOf("=")) + 1, (str.indexOf(','))); //$NON-NLS-1$
-
-			try {
-				// try to read the id from the header file
-				groupId = Integer.parseInt(substr.trim());
-			} catch (NumberFormatException e) {
-				// it's probably a rename, so get the id for the old name if
-				// there is one
-				groupId = getIdByName(substr.trim());
-				if (groupId == 0) {
-					// return -1 because we could not resolve it
-					groupId = -1;
-				}
-			}
-		}
-		return groupId;
-	}
-
-	/**
-	 * Searches all known GroupIds for name and then returns value. 
-	 * Returns GroupId value, 0 if not found in DEFAULT_GROUPS
-	 */
-
-	public static int getIdByName(String name) {
-		TraceCompilerLogger
-				.printInfo(Messages.getString("GroupNames.23") + name); //$NON-NLS-1$
-		for (Enumeration<GroupNameIdPair> e = GroupNames.DEFAULT_GROUPS
-				.elements(); e.hasMoreElements();) {
-			GroupNameIdPair gnidp = e.nextElement();
-			if (name.equals(gnidp.Name())) {
-				TraceCompilerLogger.printInfo(Messages
-						.getString("GroupNames.24") + gnidp.Id()); //$NON-NLS-1$
-				return gnidp.Id();
-			}
-		}
-		// the caller should decide what to do with value 0
-		return 0;
-	}
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/project/Messages.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,63 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Localized strings for project package
-*
-*/
-package com.nokia.tracecompiler.project;
-
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-/**
- * Localized strings for project package
- * 
- */
-class Messages {
-
-	/**
-	 * Bundle name
-	 */
-	private static final String BUNDLE_NAME = "com.nokia.tracecompiler.project.messages"; //$NON-NLS-1$
-
-	/**
-	 * Bundle
-	 */
-	private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
-			.getBundle(BUNDLE_NAME);
-
-	/**
-	 * Prevents construction
-	 */
-	private Messages() {
-	}
-
-	/**
-	 * Gets localized string based on key
-	 * 
-	 * @param key
-	 *            the resource key
-	 * @return the localized resource
-	 */
-	public static String getString(String key) {
-		String value;
-		try {
-			value = RESOURCE_BUNDLE.getString(key);
-		} catch (MissingResourceException e) {
-			value = '!' + key + '!';
-		}
-		return value;
-	}
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/project/ProjectFileParser.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,85 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Base class for project file parsers
-*
-*/
-package com.nokia.tracecompiler.project;
-
-import java.io.File;
-
-import com.nokia.tracecompiler.engine.TraceCompilerEngineErrorCodes.FileErrorParameters;
-import com.nokia.tracecompiler.engine.TraceCompilerEngineErrorCodes.TraceCompilerErrorCode;
-import com.nokia.tracecompiler.model.TraceCompilerException;
-import com.nokia.tracecompiler.model.TraceModel;
-
-/**
- * Base class for project file parsers
- * 
- */
-public abstract class ProjectFileParser {
-
-	/**
-	 * Trace model
-	 */
-	protected TraceModel model;
-
-	/**
-	 * Project file to be parsed
-	 */
-	protected File projectFile;
-
-	/**
-	 * Constructor
-	 * 
-	 * @param model
-	 *            the trace model
-	 * @param fileName
-	 *            the project file name
-	 * @throws TraceCompilerException
-	 *             if file does not exist
-	 */
-	protected ProjectFileParser(TraceModel model, String fileName)
-			throws TraceCompilerException {
-		File file = new File(fileName);
-		if (file.exists()) {
-			this.model = model;
-			this.projectFile = file;
-			createParser();
-		} else {
-			FileErrorParameters params = new FileErrorParameters();
-			params.file = fileName;
-			throw new TraceCompilerException(
-					TraceCompilerErrorCode.FILE_NOT_FOUND, params);
-		}
-	}
-
-	/**
-	 * Creates the file parser
-	 * 
-	 * @throws TraceCompilerException
-	 *             if creation fails
-	 */
-	protected abstract void createParser() throws TraceCompilerException;
-
-	/**
-	 * Parses the project file
-	 * 
-	 * @throws TraceCompilerException
-	 *             if parser fails
-	 */
-	public abstract void parse() throws TraceCompilerException;
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/project/ProjectUtils.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,271 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Project file utilities
-*
-*/
-package com.nokia.tracecompiler.project;
-
-import java.io.File;
-import java.util.ArrayList;
-
-import com.nokia.tracecompiler.engine.TraceCompilerEngineGlobals;
-import com.nokia.tracecompiler.engine.TraceCompilerEngineErrorCodes.TraceCompilerErrorCode;
-import com.nokia.tracecompiler.engine.project.ProjectEngine;
-import com.nokia.tracecompiler.model.TraceCompilerException;
-import com.nokia.tracecompiler.model.TraceModel;
-import com.nokia.tracecompiler.source.SymbianConstants;
-
-/**
- * Project file utilities
- *
- */
-public final class ProjectUtils {
-
-
-	/**
-	 * Tries to locate existing file with given extension and if not found,
-	 * proposes a new location for that file. The new location will be
-	 * <i>createPath</i> or if that is null, the directory where the trace
-	 * project file (.tbprj) resides. Trace project must be open before this can
-	 * be called
-	 *
-	 * @param model
-	 *            the trace model
-	 * @param createPath
-	 *            the path to create if existing file is not found
-	 * @param fileName
-	 *            the name for the new file
-	 * @param appendProjectName
-	 *            true if the name is appended to end of model name
-	 * @return the project file path for the new file
-	 * @throws TraceCompilerException
-	 *             if the model does not have any project files
-	 */
-	public static String getLocationForFile(TraceModel model,
-			String createPath, String fileName, boolean appendProjectName)
-			throws TraceCompilerException {
-		TraceProjectFile projectFile = model
-				.getExtension(TraceProjectFile.class);
-		if (projectFile == null) {
-			throw new TraceCompilerException(
-					TraceCompilerErrorCode.MODEL_NOT_READY);
-		}
-		String projectName = ""; //$NON-NLS-1$
-		if (appendProjectName) {
-			projectName = projectFile.getProjectName();
-		}
-		return getLocationForFile(projectFile.getPath(), projectName,
-				createPath, fileName);
-	}
-
-	/**
-	 * Tries to locate existing file with given extension and if not found,
-	 * proposes a new location for that file. The new location will be
-	 * <i>createPath</i> or if that is null, the directory where the trace
-	 * project file resides. Trace project must be open before this can
-	 * be called
-	 *
-	 * @param projectPath
-	 *            path to the project
-	 * @param projectName
-	 *            name of the project
-	 * @param createPath
-	 *            the path to create if existing file is not found
-	 * @param extension
-	 *            the file extension for the new file
-	 * @return the project file path for the new file
-	 */
-	public static String getLocationForFile(String projectPath,
-			String projectName, String createPath, String extension) {
-		ArrayList<String> searchPaths = new ArrayList<String>();
-		if (createPath != null && createPath.length() > 0) {
-			// If create path is explicitly specified, it is added to the search
-			// path list
-			searchPaths.add(createPath);
-		}
-		// Default directories are always included into search
-		searchPaths.add(ProjectEngine.traceFolderName);
-		searchPaths.add(SymbianConstants.GROUP_DIRECTORY);
-		searchPaths.add(SymbianConstants.INCLUDE_DIRECTORY);
-		String[] pathArr = new String[searchPaths.size()];
-		searchPaths.toArray(pathArr);
-		return getLocationForFile(projectPath, projectName, pathArr,
-				createPath, extension);
-	}
-
-	/**
-	 * Tries to locate existing file and if not found, proposes a new location
-	 * for that file. The search starts from <i>projectPath</i>. If
-	 * <i>checkParents</i> is true, the parent directories are also checked if
-	 * the file is not found
-	 *
-	 * @param projectPath
-	 *            path where to start the search
-	 * @param projectName
-	 *            the name of the project
-	 * @param searchPaths
-	 *            the sub-paths to be searched
-	 * @param createPath
-	 *            the sub-path to create if file is not found
-	 * @param fileName
-	 *            extension of the file to be located
-	 * @return the project file path for the new file
-	 */
-	private static String getLocationForFile(String projectPath,
-			String projectName, String[] searchPaths, String createPath,
-			String fileName) {
-		// If the project file is in one of the search paths, the path is
-		// changed to its parent
-		File projectPathFile = new File(projectPath);
-		String projectPathName = projectPathFile.getName();
-		for (int i = 0; i < searchPaths.length; i++) {
-			if (searchPaths[i].equals(projectPathName)) {
-				projectPath = projectPathFile.getParent();
-				i = searchPaths.length;
-			}
-		}
-		// Tries to find an existing file based on project path and project name
-		String filePath = findProjectFile(projectPath, projectName,
-				searchPaths, fileName, false);
-		if (filePath == null) {
-			// If file is not found, this returns a new path
-			filePath = projectPath + File.separator + createPath
-					+ File.separator + projectName + fileName;
-		}
-		return filePath;
-	}
-
-	/**
-	 * Finds a project file or directory based on a file or directory
-	 *
-	 * @param startPath
-	 *            the file name or path where to start search
-	 * @param projectName
-	 *            the name of the project file
-	 * @param searchDirectories
-	 *            the directories to search
-	 * @param fileExtension
-	 *            the file extension to be located or null if locating one of
-	 *            the search directories
-	 * @param checkParents
-	 *            true if parent directories should be checked
-	 * @return the file or directory path if found or null if not
-	 */
-	private static String findProjectFile(String startPath, String projectName,
-			String[] searchDirectories, String fileExtension,
-			boolean checkParents) {
-		String foundFile = null;
-		if (startPath != null) {
-			File file = new File(startPath);
-			if (!file.isDirectory()) {
-				file = file.getParentFile();
-			}
-			if (file != null) {
-				do {
-					for (int i = 0; i < searchDirectories.length
-							&& foundFile == null; i++) {
-						foundFile = findProjectFile(searchDirectories[i],
-								projectName, fileExtension, file);
-					}
-					file = file.getParentFile();
-				} while (file != null && foundFile == null && checkParents);
-			}
-		}
-		return foundFile;
-	}
-
-	/**
-	 * Searches a single directory for a project file
-	 *
-	 * @param searchDirectory
-	 *            the directory to search
-	 * @param fileExtension
-	 *            the file extension to be located or null if locating one of
-	 *            the search directories
-	 * @param projectName
-	 *            the name of the project file
-	 * @param file
-	 *            the current file
-	 * @return the file or directory path if found or null if not
-	 */
-	private static String findProjectFile(String searchDirectory,
-			String projectName, String fileExtension, File file) {
-		String foundFile = null;
-		File projectPath = new File(file.getAbsolutePath() + File.separator
-				+ searchDirectory + File.separator);
-		if (projectPath.exists()) {
-			if (fileExtension == null) {
-				foundFile = projectPath.getAbsolutePath();
-			} else {
-				foundFile = findProjectFileFromDirectory(projectPath,
-					projectName, fileExtension);
-			}
-		}
-		return foundFile;
-	}
-
-	/**
-	 * Gets the first file with given extension from given directory
-	 *
-	 * @param path
-	 *            the path to search
-	 * @param projectName
-	 *            the name of the project file
-	 * @param fileExtension
-	 *            the file extension
-	 * @return the file name if found or null if not
-	 */
-	private static String findProjectFileFromDirectory(File path,
-			String projectName, String fileExtension) {
-		String proposal = null;
-		File[] files = path.listFiles();
-		if (projectName != null) {
-			// If project name is specified, only the file that matches the name
-			// is returned
-			String nameFromProjectFile = projectName + fileExtension;
-
-			// Check does user have access rights to the traces folder
-			if (path.canWrite() == false) {
-				TraceCompilerEngineGlobals
-						.getEvents()
-						.postErrorMessage(
-								Messages
-										.getString("ProjectUtils.accesRightErrorText"), null, true); //$NON-NLS-1$
-				System.exit(1);
-			}
-			
-			for (int i = 0; i < files.length && proposal == null; i++) {
-				String fname = files[i].getName();
-				if (fname.equals(nameFromProjectFile)) {
-					proposal = files[i].getAbsolutePath();
-				}
-			}
-		} else {
-			// If project name is not specified, this proposes the first file
-			// which ends with the file extension
-			for (int i = 0; i < files.length && proposal == null; i++) {
-				String fname = files[i].getName();
-				if (fname.length() > fileExtension.length()) {
-					int extstart = fname.length() - fileExtension.length();
-					if (fname.substring(extstart).equals(fileExtension)) {
-						proposal = files[i].getAbsolutePath();
-					}
-				}
-			}
-		}
-		return proposal;
-	}
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/project/PropertyNames.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* List of supported property names
-*
-*/
-package com.nokia.tracecompiler.project;
-
-/**
- * List of supported property names
- * 
- */
-public interface PropertyNames {
-
-	/**
-	 * Group / component prefix
-	 */
-	public String PREFIX = "prefix"; //$NON-NLS-1$
-
-	/**
-	 * Group / component suffix
-	 */
-	public String SUFFIX = "suffix"; //$NON-NLS-1$
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/project/TraceLocationParser.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,91 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Interface to location parser
-*
-*/
-package com.nokia.tracecompiler.project;
-
-import com.nokia.tracecompiler.engine.TraceLocation;
-import com.nokia.tracecompiler.engine.TraceCompilerEngineErrorCodes.TraceCompilerErrorCode;
-import com.nokia.tracecompiler.engine.source.SourceParserRule.TraceConversionResult;
-import com.nokia.tracecompiler.model.TraceCompilerException;
-import com.nokia.tracecompiler.source.SourceExcludedArea;
-
-/**
- * Interface to location parser. The parser is implemented into the project API
- * 
- */
-public interface TraceLocationParser {
-
-	/**
-	 * Processes a newly parsed location. The location has not yet been
-	 * associated with a trace.
-	 * 
-	 * @param location
-	 *            the new location
-	 */
-	public void processNewLocation(TraceLocation location);
-
-	/**
-	 * Gets the group where locations created by this parser belong
-	 * 
-	 * @return the location group
-	 */
-	public String getLocationGroup();
-
-	/**
-	 * Converts a location to trace
-	 * 
-	 * @param location
-	 *            the location to be parsed
-	 * @return properties for new trace
-	 * @throws TraceCompilerException
-	 *             if the location cannot be converted
-	 */
-	public TraceConversionResult convertLocation(TraceLocation location)
-			throws TraceCompilerException;
-
-	/**
-	 * Finds the comment related to given location
-	 * 
-	 * @param location
-	 *            the location to be checked
-	 * @return the comment related to the location or null if not found
-	 */
-	public SourceExcludedArea findLocationComment(TraceLocation location);
-
-	/**
-	 * Determines if a location parsed from source should be automatically
-	 * converted to a trace. This is called only if
-	 * isLocationAutoConvertSupported has returned true
-	 * 
-	 * @param location
-	 *            the location to be checked
-	 * 
-	 * @return true if automatically converted, false if not
-	 */
-	public boolean isLocationConverted(TraceLocation location);
-
-	/**
-	 * Checks if a location matches its trace
-	 * 
-	 * @param location
-	 *            the location to be checked
-	 * @return error code from TraceCompilerErrorCodes
-	 */
-	public TraceCompilerErrorCode checkLocationValidity(TraceLocation location);
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/project/TraceProjectAPI.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,60 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Interface to the properties of the trace API used by the currently open trace project
-*
-*/
-package com.nokia.tracecompiler.project;
-
-import com.nokia.tracecompiler.model.Trace;
-import com.nokia.tracecompiler.model.TraceModelExtension;
-
-/**
- * Interface to the properties of the trace API used by the currently open trace
- * project
- * 
- */
-public interface TraceProjectAPI extends TraceModelExtension {
-
-	/**
-	 * Formatting flags for formatTraceForExport
-	 */
-	public class TraceFormatFlags {
-
-		/**
-		 * Formatting characters supported flag
-		 */
-		public boolean isFormattingSupported;
-	}
-
-	/**
-	 * Gets the name of this API
-	 * 
-	 * @return the name
-	 */
-	public String getName();
-
-	/**
-	 * Formats a trace for into a string suitable for export
-	 * 
-	 * @param trace
-	 *            the trace to be formatted
-	 * @param flags
-	 *            the formatting flags
-	 * @return the formatted text
-	 */
-	public String formatTraceForExport(Trace trace, TraceFormatFlags flags);
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/project/TraceProjectAPIList.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,38 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Interface to the list of trace project API's registered to TraceCompiler
-*
-*/
-package com.nokia.tracecompiler.project;
-
-import java.util.Iterator;
-
-import com.nokia.tracecompiler.model.TraceModelExtension;
-
-/**
- * Interface to the list of trace project API's registered to TraceCompiler
- * 
- */
-public interface TraceProjectAPIList extends TraceModelExtension {
-
-	/**
-	 * Gets the list of API's
-	 * 
-	 * @return the list
-	 */
-	public Iterator<TraceProjectAPI> getAPIs();
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/project/TraceProjectFile.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,291 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Generic trace project file properties
-*
-*/
-package com.nokia.tracecompiler.project;
-
-import java.io.File;
-
-import com.nokia.tracecompiler.engine.TraceCompilerEngineGlobals;
-import com.nokia.tracecompiler.file.FileUtils;
-import com.nokia.tracecompiler.model.TraceModel;
-import com.nokia.tracecompiler.model.TraceModelExtension;
-import com.nokia.tracecompiler.model.TraceModelListener;
-import com.nokia.tracecompiler.model.TraceObject;
-import com.nokia.tracecompiler.source.SourceConstants;
-
-/**
- * Generic trace project file properties
- * 
- */
-public abstract class TraceProjectFile implements TraceModelExtension,
-		TraceModelListener {
-
-	/**
-	 * The trace model
-	 */
-	private TraceModel owner;
-
-	/**
-	 * Name of the project file
-	 */
-	private String name;
-
-	/**
-	 * Project file path
-	 */
-	private String path;
-
-	/**
-	 * Project file name is based on model name and updated when model changes
-	 */
-	protected boolean hasModelName;
-
-	/**
-	 * Constructor
-	 * 
-	 * @param path
-	 *            the path to the file
-	 * @param name
-	 *            the name of the project or empty if this file does not use the
-	 *            project name
-	 */
-	protected TraceProjectFile(String path, String name) {
-		this.path = path;
-		this.name = name;
-		if (name == null || name.length() == 0) {
-			this.hasModelName = false;
-		} else {
-			this.hasModelName = true;
-		}
-	}
-
-	/**
-	 * Constructor
-	 * 
-	 * @param absolutePath
-	 *            the absolute path to the file
-	 * @param hasModelName
-	 *            flag, which tells to update the project file name if model
-	 *            name changes
-	 */
-	protected TraceProjectFile(String absolutePath, boolean hasModelName) {
-		this.hasModelName = hasModelName;
-		updatePath(absolutePath);
-	}
-
-	/**
-	 * Gets the file extension of this project file
-	 * 
-	 * @return the extension
-	 */
-	protected abstract String getFileExtension();
-
-	/**
-	 * Gets the title to be shown in UI
-	 * 
-	 * @return the title
-	 */
-	public abstract String getTitle();
-
-	/**
-	 * Gets the name of the project
-	 * 
-	 * @return the project name
-	 */
-	public final String getProjectName() {
-		return name;
-	}
-
-	/**
-	 * Gets the path of this project file
-	 * 
-	 * @return the project file path
-	 */
-	public final String getPath() {
-		return path;
-	}
-
-	/**
-	 * Gets the name of this project file
-	 * 
-	 * @return the file name
-	 */
-	public final String getFileName() {
-		StringBuffer sb = new StringBuffer();
-		addFileName(sb, false);
-		return sb.toString();
-	}
-
-	/**
-	 * Checks if this file is valid
-	 * 
-	 * @return true if valid, false if not
-	 */
-	public boolean isValid() {
-		return path != null && name != null;
-	}
-
-	/**
-	 * Posts a project file written event
-	 * 
-	 * @param path
-	 *            the path where file was written
-	 */
-	public void postFileWrittenEvent(String path) {
-		String msg = Messages
-				.getString("TraceProjectFile.ProjectFileWrittenMiddle"); //$NON-NLS-1$
-		TraceCompilerEngineGlobals.getEvents().postInfoMessage(
-				getTitle() + msg + path, null);
-	}
-
-	/**
-	 * Updates the project file name and path
-	 * 
-	 * @param absolutePath
-	 *            the new path including the file name
-	 */
-	public void updatePath(String absolutePath) {
-		File file = new File(absolutePath);
-		path = file.getParent();
-		name = file.getName();
-		String ext = getFileExtension();
-		if (name.endsWith(ext)) {
-			name = name.substring(0, name.length() - ext.length());
-		}
-	}
-
-	/**
-	 * Gets the path including file name
-	 * 
-	 * @return the path
-	 */
-	public final String getAbsolutePath() {
-		String retval;
-		if (isValid()) {
-			StringBuffer sb = new StringBuffer();
-			sb.append(FileUtils.convertSeparators(
-					SourceConstants.FORWARD_SLASH_CHAR, path, true));
-			addFileName(sb, false);
-			retval = sb.toString();
-		} else {
-			retval = null;
-		}
-		return retval;
-	}
-
-	/**
-	 * Gets the absolute path to this file, including the model ID in file name
-	 * 
-	 * @return the path
-	 */
-	public final String getAbsolutePathWithID() {
-		String retval;
-		if (isValid()) {
-			StringBuffer sb = new StringBuffer();
-			sb.append(FileUtils.convertSeparators(
-					SourceConstants.FORWARD_SLASH_CHAR, path, true));
-			addFileName(sb, true);
-			retval = sb.toString();
-		} else {
-			retval = null;
-		}
-		return retval;
-	}
-
-	/**
-	 * Adds the file name to the given buffer
-	 * 
-	 * @param sb
-	 *            the buffer
-	 * @param addID
-	 *            true if ID needs to be added to name
-	 */
-	private void addFileName(StringBuffer sb, boolean addID) {
-		sb.append(name);
-		if (addID) {
-			sb.append("_0x"); //$NON-NLS-1$
-			sb.append(Integer.toHexString(getOwner().getModel().getID()));
-			sb.append("_"); //$NON-NLS-1$
-		}
-		sb.append(getFileExtension());
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.model.TraceModelExtension#getOwner()
-	 */
-	public TraceObject getOwner() {
-		return owner;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.model.TraceModelExtension#
-	 *      setOwner(com.nokia.tracecompiler.model.TraceObject)
-	 */
-	public void setOwner(TraceObject owner) {
-		if (this.owner != null) {
-			this.owner.removeModelListener(this);
-		}
-		if (owner instanceof TraceModel) {
-			this.owner = (TraceModel) owner;
-			this.owner.addModelListener(this);
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.model.TraceModelListener#
-	 *      objectAdded(com.nokia.tracecompiler.model.TraceObject,
-	 *      com.nokia.tracecompiler.model.TraceObject)
-	 */
-	public void objectAdded(TraceObject owner, TraceObject object) {
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.model.TraceModelListener#
-	 *      objectCreationComplete(com.nokia.tracecompiler.model.TraceObject)
-	 */
-	public void objectCreationComplete(TraceObject object) {
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.model.TraceModelListener#
-	 *      objectRemoved(com.nokia.tracecompiler.model.TraceObject,
-	 *      com.nokia.tracecompiler.model.TraceObject)
-	 */
-	public void objectRemoved(TraceObject owner, TraceObject object) {
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.model.TraceModelListener#
-	 *      propertyUpdated(com.nokia.tracecompiler.model.TraceObject, int)
-	 */
-	public void propertyUpdated(TraceObject object, int property) {
-	}
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/project/messages.properties	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-GroupNames.0=Need to set EPOCROOT env variable
-GroupNames.1=TRACE_TESTING1 = 254
-GroupNames.12=USER_GROUP_ID_LAST = 
-GroupNames.2=Appending file separator to EPOCROOT
-GroupNames.23=GetIdByName called name = 
-GroupNames.24=GetIdByName returning 
-GroupNames.25=getIdByName NOT FOUND returning 0
-GroupNames.26=GetNameById called id = 
-GroupNames.27=GetNameById returning 
-GroupNames.28=getNameById NOT FOUND  returning empty string 
-GroupNames.29=
-GroupNames.3=TRACE_TESTING2 = 255
-GroupNames.30=TC:
-GroupNames.4=USER_GROUP_ID_FIRST = 
-GroupNames.8=getGroupName() header name
-GroupNames.canNotresolveGroupIdPrefix=Can not resolve Group Id for 
-GroupNames.failedToProcessOstHeaderText=failed to process ost header.
-GroupNames.invalidEpocRoot=Invalid EPOCROOT
-ProjectUtils.accesRightErrorText=Trace compiler does not have access rights to the traces folder
-TraceProjectFile.ProjectFileRenamedPrefix=\ renamed from 
-TraceProjectFile.ProjectFileRenamedMiddle=\ to 
-TraceProjectFile.NotValid=Not Valid
-TraceProjectFile.ProjectFileWrittenMiddle=\ written to 
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/project/package.html	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-<html><body>
-Interface to the trace project management
-</body></html>
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/rules/ArrayParameterRule.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Rule interface for parameters that represent array types
-*
-*/
-package com.nokia.tracecompiler.rules;
-
-import com.nokia.tracecompiler.model.TraceObjectRule;
-
-/**
- * Rule interface for parameters that represent array types
- * 
- */
-public interface ArrayParameterRule extends TraceObjectRule {
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/rules/FillerParameterRule.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Rule that defines a filler parameter
-*
-*/
-package com.nokia.tracecompiler.rules;
-
-/**
- * Rule that defines a filler parameter. A filler does not have a source or view
- * representation, but does have a representation in the header and decoder
- * files. It aligns trace parameters to 32-bit boundaries.
- * 
- */
-public interface FillerParameterRule extends HiddenTraceObjectRule {
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/rules/HiddenTraceObjectRule.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Rule that allows an object to be marked as hidden
-*
-*/
-package com.nokia.tracecompiler.rules;
-
-import com.nokia.tracecompiler.model.TraceObjectRule;
-
-/**
- * Rule that allows an object to be marked as hidden in the view
- * 
- */
-public interface HiddenTraceObjectRule extends TraceObjectRule {
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/rules/ReadOnlyObjectRule.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Rule which marks an object "read-only"
-*
-*/
-package com.nokia.tracecompiler.rules;
-
-import com.nokia.tracecompiler.model.TraceObjectRule;
-
-/**
- * Rule which marks an object "read-only". Read-only objects cannot be updated
- * via UI
- * 
- */
-public interface ReadOnlyObjectRule extends TraceObjectRule {
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/rules/package.html	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-<html><body>
-Rules for trace objects
-</body></html>
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/ContextAreaParser.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,521 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Parser for source contexts
-*
-*/
-package com.nokia.tracecompiler.source;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-
-/**
- * Parser for source contexts
- * 
- */
-class ContextAreaParser {
-
-	/**
-	 * Source parser
-	 */
-	private SourceParser parser;
-
-	/**
-	 * List of source file contexts
-	 */
-	protected ArrayList<SourceContext> contextAreas = new ArrayList<SourceContext>();
-
-	/**
-	 * Comparator for array sorting and searching
-	 */
-	private PositionArrayComparator arrayComparator = new PositionArrayComparator();
-
-	/**
-	 * "usingnamespace" text
-	 */
-	private static final String USINGNAMESPACE = "usingnamespace"; //$NON-NLS-1$
-
-	/**
-	 * Start index of "using" substring in "usingnamespace" string
-	 */
-	private static final int START_INDEX_OF_USING_SUBSTRING = 0; // CodForChk_Dis_Magic
-
-	/**
-	 * End index of "using" substring in "usingnamespace" string
-	 */
-	private static final int END_INDEX_OF_USING_SUBSTRING = 5; // CodForChk_Dis_Magic
-
-	/**
-	 * Start index of "namespace" substring in "usingnamespace" string
-	 */
-	private static final int START_INDEX_OF_NAMESPACE_SUBSTRING = 5; // CodForChk_Dis_Magic
-
-	/**
-	 * End index of "namespace" substring in "usingnamespace" string
-	 */
-	private static final int END_INDEX_OF_NAMESPACE_SUBSTRING = 14; // CodForChk_Dis_Magic
-
-	/**
-	 * Constructor
-	 * 
-	 * @param parser
-	 *            the source parser
-	 */
-	ContextAreaParser(SourceParser parser) {
-		this.parser = parser;
-	}
-
-	/**
-	 * Resets the context areas
-	 */
-	void reset() {
-		contextAreas.clear();
-	}
-
-	/**
-	 * Returns the context at given offset
-	 * 
-	 * @param offset
-	 *            the offset to the source data
-	 * @return the context at the offset or null if no context exists
-	 * @throws SourceParserException
-	 *             if parser fails
-	 */
-	SourceContext parseAndGet(int offset) throws SourceParserException {
-		if (contextAreas.isEmpty()) {
-			parseAll();
-		}
-		int index = find(offset);
-		SourceContext context = null;
-		if (index >= 0) {
-			context = contextAreas.get(index);
-		}
-		return context;
-	}
-
-	/**
-	 * Gets the context areas. If the areas have not been parsed, this parses
-	 * them
-	 * 
-	 * @return the areas
-	 * @throws SourceParserException
-	 *             if parser fails
-	 */
-	Iterator<SourceContext> parseAndGetAll() throws SourceParserException {
-		if (contextAreas.isEmpty()) {
-			parseAll();
-		}
-		return contextAreas.iterator();
-	}
-
-	/**
-	 * Gets the context area list. This does not parse the areas
-	 * 
-	 * @return the list of context areas
-	 */
-	List<SourceContext> getContextList() {
-		return contextAreas;
-	}
-
-	/**
-	 * Finds the array index of the context area which contains the offset. If
-	 * none of the areas contain the offset, returns negative integer indicating
-	 * the index of the context area following the offset
-	 * 
-	 * @param offset
-	 *            the offset to the data
-	 * @return the context area index
-	 */
-	int find(int offset) {
-		return Collections.binarySearch(contextAreas, new SourceLocationBase(
-				parser, offset), arrayComparator);
-	}
-
-	/**
-	 * Builds the context array
-	 * 
-	 * @throws SourceParserException
-	 *             if parser fails
-	 */
-	void parseAll() throws SourceParserException { // CodForChk_Dis_ComplexFunc
-		contextAreas.clear();
-		char value;
-		
-		int inBrackets = 0;
-		int inContext = 0;
-		int inNamespace = 0;
-
-		int usingIndex = START_INDEX_OF_USING_SUBSTRING;
-		int usingKeywordEnd = 0;
-		int namespaceIndex = START_INDEX_OF_NAMESPACE_SUBSTRING;
-		int nameSpaceKeywordEnd = 0;
-		int previousIndexBeforeNamespace = 0;
-		boolean checkNextCharacter = false;
-
-		SourceContext context = null;
-		SourceIterator itr = parser.createIterator(0, SourceParser.SKIP_ALL);
-
-		while (itr.hasNext()) {
-			value = itr.next();
-
-			// Next character check is need only if we have found "namespace"
-			// text
-			if (checkNextCharacter) {
-
-				// Next character after "namespace" text should be space.
-				// Because we have skipped spaces, current index should be
-				// bigger than nameSpaceKeywordEnd + 1. If it is not space then
-				// we are not inside namespace
-				if (itr.currentIndex() - nameSpaceKeywordEnd < 2) { // CodForChk_Dis_Magic
-					inNamespace--;
-				}
-				checkNextCharacter = false;
-			}
-
-			// Check is character part of "using" text
-			if (value == USINGNAMESPACE.charAt(usingIndex)) {
-				usingIndex++;
-			} else {
-
-				// Character not part of "using" text -> reset usingIndex
-				usingIndex = START_INDEX_OF_USING_SUBSTRING;
-			}
-
-			// Check that did we found "using" text
-			if (usingIndex == END_INDEX_OF_USING_SUBSTRING) {
-				usingKeywordEnd = itr.currentIndex();
-				usingIndex = START_INDEX_OF_USING_SUBSTRING;
-			}
-
-			// Check is character part of "namespace" text
-			if (value == USINGNAMESPACE.charAt(namespaceIndex)) {
-				if (previousIndexBeforeNamespace == 0) {
-					previousIndexBeforeNamespace = itr.previousIndex();
-				}
-				namespaceIndex++;
-			} else {
-
-				// Character not part of "namespace" text -> reset
-				// previousIndexBeforeNamespace and namespaceIndex
-				previousIndexBeforeNamespace = 0;
-				namespaceIndex = START_INDEX_OF_NAMESPACE_SUBSTRING;
-			}
-
-			// Check that did we found "namespace" text
-			if (namespaceIndex == END_INDEX_OF_NAMESPACE_SUBSTRING) {
-				nameSpaceKeywordEnd = itr.currentIndex();
-
-				// If there was "using" text just before "namespace" text, then
-				// namespace is defined like: "using namespace foo;" and we are
-				// not going inside namespace brackets
-				if (usingKeywordEnd != previousIndexBeforeNamespace) {
-					inNamespace++;
-					checkNextCharacter = true;
-				}
-				namespaceIndex = START_INDEX_OF_NAMESPACE_SUBSTRING;
-			}
-
-			if (value == '{') {
-				inBrackets++;
-
-				// Check that are we inside namespace or context
-				if (inBrackets > inNamespace) {
-					inContext++;
-					if (inContext == 1) {
-						int start = itr.currentIndex() + 1;
-						context = new SourceContext(parser, start);
-
-						// Includes the '{' character into the context
-						if (!createContext(context, start - 2)) { // CodForChk_Dis_Magic
-							context = null;
-						}
-					}
-				}
-			} else if (value == '}') {
-				// Check that are we exiting from context or namespace
-				if (inBrackets == inNamespace) {
-					inNamespace--;
-				} else {
-					inContext--;
-					if (inContext == 0 && context != null) {
-						context.setLength(itr.currentIndex() + 1
-								- context.getOffset());
-						contextAreas.add(context);
-					}
-				}
-
-				inBrackets--;
-			}
-		}
-	}
-
-	/**
-	 * Sets the data to the source context
-	 * 
-	 * @param context
-	 *            the source context to be updated
-	 * @param offset
-	 *            the index preceeding the '{' character
-	 * @return true if valid, false otherwise
-	 * @throws SourceParserException
-	 *             if processing fails
-	 */
-	private boolean createContext(SourceContext context, int offset)
-			throws SourceParserException {
-		ContextSearchData data = new ContextSearchData();
-		data.itr = parser.createIterator(offset, SourceParser.BACKWARD_SEARCH
-				| SourceParser.SKIP_ALL);
-		data.context = context;
-		while (data.itr.hasNext() && !data.finished) {
-			char c = data.itr.next();
-			// Function start or stop character or statement separator breaks
-			// the search in normal case. In case of nested class separator
-			// character breaks the search.
-			if (c == ';' || c == '}' || c == '{'
-					|| (c == ':' && data.itr.peek() == ':')
-					&& data.classStartIndex != -1) {
-				processContextTerminator(context, data, false);
-			} else if (!data.parametersFound) {
-				processParametersNotFoundCharacter(data, c);
-			} else if (c == ')' || c == '(' || c == ','
-					|| (c == ':' && data.itr.peek() != ':')) {
-				// Constructor member initializer list may contain brackets, ','
-				// and ':'. When one of the characters from member initializer
-				// list is encountered, this assumes that the previous
-				// one was not the actual function parameter list yet. All
-				// variables are reset in that case
-				data.parametersFound = false;
-				data.functionEndIndex = -1;
-				data.functionStartIndex = -1;
-				data.classEndIndex = -1;
-				processParametersNotFoundCharacter(data, c);
-			} else if (data.functionEndIndex == -1) {
-				processFunctionNameNotFoundCharacter(data, c);
-			} else if (data.functionStartIndex == -1) {
-				processFunctionNameCharacter(context, data, c);
-			} else if (data.classEndIndex == -1) {
-				processClassNameNotFoundCharacter(data);
-			} else if (data.classStartIndex == -1) {
-				processClassNameCharacter(context, data, c);
-			} else {
-				processReturnTypeCharacter(context, data);
-			}
-		}
-		if (!data.finished) {
-			processContextTerminator(context, data, true);
-		}
-		return data.valid;
-	}
-
-	/**
-	 * Processes a character after class and function names have been found
-	 * 
-	 * @param context
-	 *            the context
-	 * @param data
-	 *            the search data
-	 * @throws SourceParserException
-	 *             if processing fails
-	 */
-	private void processReturnTypeCharacter(SourceContext context,
-			ContextSearchData data) throws SourceParserException {
-		if (data.itr.hasSkipped()) {
-			// Collects all return type candidates to the context
-			addReturnType(context, data.itr.previousIndex(),
-					data.returnEndIndex);
-			data.returnEndIndex = data.itr.currentIndex();
-		}
-	}
-
-	/**
-	 * Processes a character after function name has been found, but class name
-	 * has not yet been found
-	 * 
-	 * @param data
-	 *            the search flags
-	 */
-	private void processClassNameNotFoundCharacter(ContextSearchData data) {
-		// After start of function and the separator has been found, the
-		// next character marks the end of class name
-		data.classEndIndex = data.itr.currentIndex() + 1;
-	}
-
-	/**
-	 * Parses a character which belongs to the class name
-	 * 
-	 * @param context
-	 *            the source context to be parsed
-	 * @param data
-	 *            the context search parameters
-	 * @param c
-	 *            the character
-	 * @throws SourceParserException
-	 *             if processing fails
-	 */
-	private void processClassNameCharacter(SourceContext context,
-			ContextSearchData data, char c) throws SourceParserException {
-		if (data.itr.hasSkipped() || (c == ':' && data.itr.peek() == ':')) {
-			// Start of class name is found when iterator skips over
-			// white space or comment characters or in case of nested class
-			// separator character has been found
-			context.setFunctionName(parser.getSource().get(
-					data.functionStartIndex,
-					data.functionEndIndex - data.functionStartIndex));
-			data.classStartIndex = data.itr.previousIndex();
-			data.returnEndIndex = data.itr.currentIndex();
-			context.setClassName(parser.getSource().get(data.classStartIndex,
-					data.classEndIndex - data.classStartIndex));
-
-			// In case of nested class skips over the second ':'
-			if (c == ':' && data.itr.peek() == ':') {
-				data.itr.next();
-			}
-		}
-	}
-
-	/**
-	 * Processes a character while within function name
-	 * 
-	 * @param context
-	 *            the source context under processing
-	 * @param data
-	 *            the context search flags
-	 * @param c
-	 *            the character
-	 * @throws SourceParserException
-	 *             if processing fails
-	 */
-	private void processFunctionNameCharacter(SourceContext context,
-			ContextSearchData data, char c) throws SourceParserException {
-		// After end of function has been found the separator character
-		// marks the start of function
-		if (c == ':') {
-			if (data.itr.hasNext() && data.itr.peek() == ':') {
-				data.functionStartIndex = data.itr.previousIndex();
-				context.setFunctionName(parser.getSource().get(
-						data.functionStartIndex,
-						data.functionEndIndex - data.functionStartIndex));
-				// Skips over the second ':'
-				data.itr.next();
-			} else {
-				// Only one ':' character -> Invalid
-				data.finished = true;
-			}
-		} else if (data.itr.hasSkipped()) {
-			// If the iterator skipped over some characters and the next
-			// character is not ':' the function is a non-member
-			data.functionStartIndex = data.itr.previousIndex();
-			context.setFunctionName(parser.getSource().get(
-					data.functionStartIndex,
-					data.functionEndIndex - data.functionStartIndex));
-			// Class name indices are set so parser does not search for them
-			data.classStartIndex = data.itr.previousIndex();
-			data.classEndIndex = data.itr.previousIndex();
-			data.returnEndIndex = data.itr.currentIndex();
-		}
-	}
-
-	/**
-	 * Processes a character when function name has not yet been found
-	 * 
-	 * @param data
-	 *            the search flags
-	 * @param c
-	 *            the character to be processed
-	 */
-	private void processFunctionNameNotFoundCharacter(ContextSearchData data,
-			char c) {
-		// The next character after parameters is the end of function
-		if (c == ':') {
-			data.finished = true;
-		}
-		data.functionEndIndex = data.itr.currentIndex() + 1;
-	}
-
-	/**
-	 * Checks if the character is '(' or ')' and updates the parametersFound
-	 * flag accordingly
-	 * 
-	 * @param data
-	 *            the search data
-	 * @param c
-	 *            the current character
-	 */
-	private void processParametersNotFoundCharacter(ContextSearchData data,
-			char c) {
-		if (c == ')') {
-			data.inParameters++;
-		} else if (c == '(') {
-			data.inParameters--;
-			if (data.inParameters == 0) {
-				data.context.setParametersStartIndex(data.itr.currentIndex());
-				data.parametersFound = true;
-			}
-		}
-	}
-
-	/**
-	 * Processes a context terminating character
-	 * 
-	 * @param context
-	 *            the context under processing
-	 * @param data
-	 *            the search data
-	 * @param startOfFile
-	 *            context was terminated due to start of file
-	 * @throws SourceParserException
-	 *             if processing fails
-	 */
-	private void processContextTerminator(SourceContext context,
-			ContextSearchData data, boolean startOfFile)
-			throws SourceParserException {
-		int offset = startOfFile ? data.itr.currentIndex() : data.itr
-				.previousIndex();
-		if (data.classStartIndex != -1) {
-			addReturnType(context, offset, data.returnEndIndex);
-			data.valid = true;
-		} else if (data.classEndIndex != -1) {
-			context.setClassName(parser.getSource().get(offset,
-					data.classEndIndex - offset));
-			data.valid = true;
-		} else if (data.functionEndIndex != -1) {
-			context.setFunctionName(parser.getSource().get(offset,
-					data.functionEndIndex - offset));
-			data.valid = true;
-		}
-		// Finished flag is set. If function name was not found, the valid flag
-		// remains false
-		data.finished = true;
-	}
-
-	/**
-	 * Adds a return type to the context
-	 * 
-	 * @param context
-	 *            the context to be searched
-	 * @param start
-	 *            the start index
-	 * @param end
-	 *            the end index
-	 * @throws SourceParserException
-	 *             if return type cannot be added
-	 */
-	private void addReturnType(SourceContext context, int start, int end)
-			throws SourceParserException {
-		context.addReturnType(parser.getSource().get(start, end - start + 1));
-	}
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/ContextSearchData.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,82 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Contains search variables during SourceParser.createContext call
-*
-*/
-package com.nokia.tracecompiler.source;
-
-/**
- * Contains search variables during SourceParser.createContext call
- * 
- */
-final class ContextSearchData {
-
-	/**
-	 * Index is currently in parameters
-	 */
-	int inParameters;
-
-	/**
-	 * Parameters have been found
-	 */
-	boolean parametersFound;
-
-	/**
-	 * Start of function name
-	 */
-	int functionStartIndex = -1;
-
-	/**
-	 * End of function name
-	 */
-	int functionEndIndex = -1;
-
-	/**
-	 * Start of class name
-	 */
-	int classStartIndex = -1;
-
-	/**
-	 * End of class name
-	 */
-	int classEndIndex = -1;
-
-	/**
-	 * End of return statement
-	 */
-	int returnEndIndex = -1;
-
-	/**
-	 * Context is valid
-	 */
-	boolean valid;
-
-	/**
-	 * Processing is finished
-	 */
-	boolean finished;
-
-	/**
-	 * The iterator
-	 */
-	SourceIterator itr;
-
-	/**
-	 * The context
-	 */
-	SourceContext context;
-
-}
\ No newline at end of file
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/ExcludedAreaParser.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,352 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Parser for comments and strings
-*
-*/
-package com.nokia.tracecompiler.source;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-/**
- * Parser for comments and strings
- * 
- */
-final class ExcludedAreaParser {
-
-	/**
-	 * The check range is used to limit the effect of unterminated ' in code
-	 */
-	private static final int CHAR_CHECK_RANGE = 3; // CodForChk_Dis_Magic
-
-	/**
-	 * Source parser
-	 */
-	private SourceParser parser;
-
-	/**
-	 * List of source file areas that are not used in search
-	 */
-	private ArrayList<SourceExcludedArea> excludedAreas = new ArrayList<SourceExcludedArea>();
-
-	/**
-	 * Comparator for array sorting and searching
-	 */
-	private PositionArrayComparator arrayComparator = new PositionArrayComparator();
-
-	/**
-	 * Constructor
-	 * 
-	 * @param parser
-	 *            the source parser
-	 */
-	ExcludedAreaParser(SourceParser parser) {
-		this.parser = parser;
-	}
-
-	/**
-	 * Resets the excluded areas
-	 */
-	void reset() {
-		excludedAreas.clear();
-	}
-
-	/**
-	 * Finds the array index of the excluded area which contains the offset. If
-	 * none of the areas contain the offset, returns negative integer indicating
-	 * the index of the excluded area following the offset
-	 * 
-	 * @param offset
-	 *            the offset to the data
-	 * @return the excluded area index
-	 */
-	int find(int offset) {
-		return Collections.binarySearch(excludedAreas, new SourceLocationBase(
-				parser, offset), arrayComparator);
-	}
-
-	/**
-	 * Finds the excluded source file areas. Excluded areas include comments and
-	 * quoted strings. Overwrites possible old areas.
-	 * 
-	 * @throws SourceParserException
-	 *             if processing fails
-	 */
-	void parseAll() throws SourceParserException {
-		excludedAreas.clear();
-		ExcludedAreaSearchData data = new ExcludedAreaSearchData();
-		int length = parser.getSource().getLength();
-		SourceExcludedArea lastarea = parse(data, length);
-		if (data.inString || data.inChar || data.inComment
-				|| data.inLineComment || data.inPreprocessor) {
-			lastarea.setLength(parser.getSource().getLength()
-					- lastarea.getOffset());
-			excludedAreas.add(lastarea);
-		}
-	}
-
-	/**
-	 * Parses the excluded areas of source
-	 * 
-	 * @param data
-	 *            the search data
-	 * @param length
-	 *            the length of data to be parsed
-	 * @return the last area
-	 * @throws SourceParserException
-	 *             if parser fails
-	 */
-	private SourceExcludedArea parse(ExcludedAreaSearchData data, int length)
-			throws SourceParserException {
-		SourceExcludedArea area = null;
-		while (data.index < length) {
-			data.value = parser.getSource().getChar(data.index++);
-			// Line comments end at end-of-line
-			if (data.inLineComment) {
-				processInLineComment(data, area);
-			} else if (data.inComment) {
-				processInComment(data, area);
-			} else if (data.inPreprocessor) {
-				processInPreprocessor(data, area);
-			} else if (data.inString) {
-				processInString(data, area);
-			} else if (data.inChar) {
-				processInChar(data, area);
-			} else if (data.value == '/' && data.index < length) {
-				area = createCommentArea(data);
-			} else if (data.value == '\"') {
-				area = createStringArea(data);
-			} else if (data.value == '\'') {
-				area = createCharArea(data);
-			} else if (data.value == '#'
-					&& (data.index == 1 || parser.getSource().getChar(
-							data.index - 2) == '\n')) { // CodForChk_Dis_Magic
-				area = createPreprocessorArea(data);
-			}
-		}
-		return area;
-	}
-
-	/**
-	 * Gets the excluded area that contains given offset
-	 * 
-	 * @param offset
-	 *            the offset to the area
-	 * @return the area or null if offset does not hit any area
-	 */
-	SourceExcludedArea getArea(int offset) {
-		SourceExcludedArea retval;
-		int index = find(offset);
-		if (index >= 0) {
-			retval = excludedAreas.get(index);
-		} else {
-			retval = null;
-		}
-		return retval;
-	}
-
-	/**
-	 * Gets the list of excluded areas
-	 * 
-	 * @return the list of areas
-	 */
-	List<SourceExcludedArea> getAreas() {
-		return excludedAreas;
-	}
-
-	/**
-	 * Processes a quote (') character marking start of character area
-	 * 
-	 * @param data
-	 *            the search flags
-	 * @return the new area
-	 */
-	private SourceExcludedArea createCharArea(ExcludedAreaSearchData data) {
-		SourceExcludedArea area;
-		data.inChar = true;
-		area = new SourceExcludedArea(parser, data.index - 1,
-				SourceExcludedArea.CHARACTER);
-		return area;
-	}
-
-	/**
-	 * Processes a double quote (") character marking start of string area
-	 * 
-	 * @param data
-	 *            the search flags
-	 * @return the new area
-	 */
-	private SourceExcludedArea createStringArea(ExcludedAreaSearchData data) {
-		SourceExcludedArea area;
-		data.inString = true;
-		area = new SourceExcludedArea(parser, data.index - 1,
-				SourceExcludedArea.STRING);
-		return area;
-	}
-
-	/**
-	 * Processes a forward slash (/) character marking start of comment
-	 * 
-	 * @param data
-	 *            the search flags
-	 * @return the comment object
-	 * @throws SourceParserException
-	 *             if processing fails
-	 */
-	private SourceExcludedArea createCommentArea(ExcludedAreaSearchData data)
-			throws SourceParserException {
-		SourceExcludedArea area;
-		char next = parser.getSource().getChar(data.index);
-		if (next == '/') {
-			data.inLineComment = true;
-			area = new SourceExcludedArea(parser, data.index - 1,
-					SourceExcludedArea.LINE_COMMENT);
-			data.index++;
-		} else if (next == '*') {
-			data.inComment = true;
-			area = new SourceExcludedArea(parser, data.index - 1,
-					SourceExcludedArea.MULTILINE_COMMENT);
-			data.index++;
-		} else {
-			area = null;
-		}
-		return area;
-	}
-
-	/**
-	 * Processes a preprocessor definition
-	 * 
-	 * @param data
-	 *            the search flags
-	 * @return the preprocessor area representation
-	 */
-	private SourceExcludedArea createPreprocessorArea(
-			ExcludedAreaSearchData data) {
-		SourceExcludedArea area = new SourceExcludedArea(parser,
-				data.index - 1, SourceExcludedArea.PREPROCESSOR_DEFINITION);
-		data.inPreprocessor = true;
-		return area;
-	}
-
-	/**
-	 * Processes a character that belongs to '' area
-	 * 
-	 * @param data
-	 *            the search flags
-	 * @param area
-	 *            the area under processing
-	 * @throws SourceParserException
-	 *             if processing fails
-	 */
-	private void processInChar(ExcludedAreaSearchData data,
-			SourceExcludedArea area) throws SourceParserException {
-		// The check range is used to limit the effect of unterminated '
-		if ((data.value == '\'' && parser.getSource().getChar(data.index - 2) != '\\') // CodForChk_Dis_Magic
-				|| data.index - area.getOffset() > CHAR_CHECK_RANGE) {
-			data.inChar = false;
-			area.setLength(data.index - area.getOffset());
-			excludedAreas.add(area);
-		}
-	}
-
-	/**
-	 * Processes a character that belongs to "" area
-	 * 
-	 * @param data
-	 *            the search flags
-	 * @param area
-	 *            the area under processing
-	 * @throws SourceParserException
-	 *             if processing fails
-	 */
-	private void processInString(ExcludedAreaSearchData data,
-			SourceExcludedArea area) throws SourceParserException {
-		// Strings end with " unless escaped with \" (except \\")
-		if (data.value == '\"') {
-			if (parser.getSource().getChar(data.index - 2) != '\\' // CodForChk_Dis_Magic
-					|| parser.getSource().getChar(data.index - 3) == '\\') { // CodForChk_Dis_Magic
-				data.inString = false;
-				area.setLength(data.index - area.getOffset());
-				excludedAreas.add(area);
-			}
-		}
-	}
-
-	/**
-	 * Processes a character that belongs to multi-line comment
-	 * 
-	 * @param data
-	 *            the search flags
-	 * @param area
-	 *            the area under processing
-	 * @throws SourceParserException
-	 *             if processing fails
-	 */
-	private void processInComment(ExcludedAreaSearchData data,
-			SourceExcludedArea area) throws SourceParserException {
-		// Comments end with */
-		if (data.value == '*') {
-			if (data.index < parser.getSource().getLength()
-					&& parser.getSource().getChar(data.index) == '/') {
-				data.index++;
-				data.inComment = false;
-				area.setLength(data.index - area.getOffset());
-				excludedAreas.add(area);
-			}
-		}
-	}
-
-	/**
-	 * Processes a character that belongs to line comment
-	 * 
-	 * @param data
-	 *            the search flags
-	 * @param area
-	 *            the area under processing
-	 */
-	private void processInLineComment(ExcludedAreaSearchData data,
-			SourceExcludedArea area) {
-		if (data.value == '\n') {
-			data.inLineComment = false;
-			area.setLength(data.index - area.getOffset());
-			excludedAreas.add(area);
-		}
-	}
-
-	/**
-	 * Processes a character that belongs to preprocessor definition
-	 * 
-	 * @param data
-	 *            the search flags
-	 * @param area
-	 *            the area under processing
-	 * @throws SourceParserException
-	 *             if processing fails
-	 */
-	private void processInPreprocessor(ExcludedAreaSearchData data,
-			SourceExcludedArea area) throws SourceParserException {
-		if (data.value == '\n') {
-			char prev = parser.getSource().getChar(data.index - 2); // CodForChk_Dis_Magic
-			char prev2 = parser.getSource().getChar(data.index - 3); // CodForChk_Dis_Magic
-			if (!((prev == '\\') || (prev == '\r' && prev2 == '\\'))) {
-				data.inPreprocessor = false;
-				area.setLength(data.index - area.getOffset());
-				excludedAreas.add(area);
-			}
-		}
-	}
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/ExcludedAreaSearchData.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,61 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Contains search variables during SourceParser.findExcludedAreas call
-*
-*/
-package com.nokia.tracecompiler.source;
-
-/**
- * Contains search variables during SourceParser.findExcludedAreas call
- * 
- */
-final class ExcludedAreaSearchData {
-
-	/**
-	 * Data index
-	 */
-	int index;
-
-	/**
-	 * Current character
-	 */
-	char value;
-
-	/**
-	 * Within line comment flag
-	 */
-	boolean inLineComment;
-
-	/**
-	 * Within comment flag
-	 */
-	boolean inComment;
-
-	/**
-	 * Within string flag
-	 */
-	boolean inString;
-
-	/**
-	 * Within character flag
-	 */
-	boolean inChar;
-
-	/**
-	 * Within preprocessor definition flag
-	 */
-	boolean inPreprocessor;
-}
\ No newline at end of file
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/FormatMapping.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,52 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Format to parameter type mapping
-*
-*/
-package com.nokia.tracecompiler.source;
-
-/**
- * Type returned by {@link SourceUtils#mapFormatToParameterType(String)}
- * 
- */
-public final class FormatMapping {
-
-	/**
-	 * The type
-	 */
-	public String type;
-
-	/**
-	 * Array type flag
-	 */
-	public boolean isArray;
-
-	/**
-	 * Simple 32-bit type flag
-	 */
-	public boolean isSimple;
-
-	/**
-	 * Constructor
-	 * 
-	 * @param type
-	 *            the type
-	 */
-	public FormatMapping(String type) {
-		this.type = type;
-	}
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/FunctionReturnValueParser.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,317 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Parser for function return values
-*
-*/
-package com.nokia.tracecompiler.source;
-
-import java.util.Collections;
-import java.util.List;
-
-/**
- * Parser for function return values
- * 
- */
-class FunctionReturnValueParser {
-
-	/**
-	 * Source parser
-	 */
-	private SourceParser parser;
-
-	/**
-	 * Comparator for source return values
-	 */
-	private PositionArrayComparator comparator = new PositionArrayComparator();
-
-	/**
-	 * Macros representing return statement
-	 */
-	private List<String> returnExtensions;
-
-	/**
-	 * Constructor
-	 * 
-	 * @param parser
-	 *            the source parser
-	 */
-	FunctionReturnValueParser(SourceParser parser) {
-		this.parser = parser;
-	}
-
-	/**
-	 * Parses the return values of given source context
-	 * 
-	 * @param context
-	 *            the context to be parsed
-	 * @param list
-	 *            the list of return values
-	 */
-	void parseReturnValues(SourceContext context, List<SourceReturn> list) {
-		String statement = SourceConstants.RETURN;
-		try {
-			parseReturnValues(context, list, statement);
-		} catch (SourceParserException e) {
-		}
-		if (returnExtensions != null && returnExtensions.size() > 0) {
-			for (int i = 0; i < returnExtensions.size(); i++) {
-				try {
-					parseReturnValues(context, list, returnExtensions.get(i));
-				} catch (SourceParserException e) {
-				}
-			}
-			Collections.sort(list, comparator);
-		}
-		if (context.isVoid()) {
-			boolean addToEnd = true;
-			// If there were no return statements, the trace is added to end
-			// Otherwise the last return statement needs to be checked. If it is
-			// at the end of the function, the return trace is not added to
-			// the end
-			if (!list.isEmpty()) {
-				SourceReturn ret = list.get(list.size() - 1);
-				SourceIterator itr = parser.createIterator(ret.getOffset()
-						+ ret.getLength() + 1, SourceParser.SKIP_ALL);
-				try {
-					itr.next();
-					// If the next character after return statement is the end
-					// of function, the return is not added
-					if (itr.currentIndex() == context.getOffset()
-							+ context.getLength() - 1) {
-						addToEnd = false;
-					}
-				} catch (SourceParserException e) {
-					addToEnd = false;
-				}
-			}
-			if (addToEnd) {
-				list.add(new SourceReturn(parser, context.getOffset()
-						+ context.getLength() - 1, 0));
-			}
-		}
-	}
-
-	/**
-	 * Parses the return values of given source context that use the given
-	 * return statement
-	 * 
-	 * @param context
-	 *            the context to be parsed
-	 * @param list
-	 *            the list of return values
-	 * @param statement
-	 *            the return statement
-	 * @throws SourceParserException
-	 *             if processing fails
-	 */
-	private void parseReturnValues(SourceContext context,
-			List<SourceReturn> list, String statement)
-			throws SourceParserException {
-		FunctionReturnValueSearchData data = new FunctionReturnValueSearchData();
-		int offset = context.getOffset();
-		int end = offset + context.getLength();
-		SourceSearch search = parser.startStringSearch(statement, offset, end,
-				SourceParser.MATCH_WHOLE_WORD | SourceParser.SKIP_ALL);
-		boolean looping = true;
-		do {
-			data.index = search.findNext();
-			if (data.index != -1) {
-				data.itr = parser.createIterator(data.index
-						+ statement.length(), SourceParser.SKIP_ALL);
-				locateReturnStatement(data);
-				if (data.endOffset != -1 && data.startOffset != -1) {
-					SourceReturn ret = createReturnStatement(data);
-					list.add(ret);
-				} else {
-					// End of return statement missing
-					looping = false;
-				}
-			} else {
-				looping = false;
-			}
-		} while (looping);
-	}
-
-	/**
-	 * Locates the start and end offsets for the return statement
-	 * 
-	 * @param data
-	 *            the search data
-	 * @throws SourceParserException
-	 *             if parser fails
-	 */
-	private void locateReturnStatement(FunctionReturnValueSearchData data)
-			throws SourceParserException {
-		data.startOffset = -1;
-		data.endOffset = -1;
-		boolean found = false;
-		boolean colonAllowed = false;
-		while (data.itr.hasNext() && !found) {
-			char c = data.itr.next();
-			if (c == ';') {
-				data.endOffset = data.itr.previousIndex() + 1;
-				found = true;
-			} else if (c == '}') {
-				found = true;
-			} else if (c == '?') {
-				colonAllowed = true;
-			} else if (c == ':') {
-				if (data.itr.hasNext() && data.itr.peek() == ':') {
-					// Skips over ::
-					c = data.itr.next();
-				} else {
-					if (colonAllowed) {
-						colonAllowed = false;
-					} else {
-						data.endOffset = data.itr.previousIndex() + 1;
-						found = true;
-					}
-				}
-			}
-			if (data.startOffset == -1) {
-				data.startOffset = data.itr.currentIndex();
-			}
-		}
-	}
-
-	/**
-	 * Creates a return statement
-	 * 
-	 * @param data
-	 *            the parser data
-	 * @return the new statement
-	 * @throws SourceParserException
-	 *             if parser fails
-	 */
-	private SourceReturn createReturnStatement(
-			FunctionReturnValueSearchData data) throws SourceParserException {
-		SourceReturn ret = new SourceReturn(parser, data.startOffset,
-				data.endOffset - data.startOffset);
-		if (checkTag(data.startOffset, data.endOffset - data.startOffset)) {
-			ret.setTagHazard();
-		}
-		if (checkPreviousChar(data.index - 1)) {
-			ret.setPreviousCharHazard();
-		}
-		return ret;
-	}
-
-	/**
-	 * Checks if the tag is hazardous
-	 * 
-	 * @param start
-	 *            start offset
-	 * @param length
-	 *            tag length
-	 * @return true if there is a problem
-	 */
-	private boolean checkTag(int start, int length) {
-		boolean hazard = false;
-		boolean previous = false;
-		// Function calls and increment / decrement operators are not safe
-		for (int i = start; i < start + length && !hazard; i++) {
-			char c = parser.getData(i);
-			if (c == '(') {
-				// If return statement is within brackets, it is not hazardous
-				if (i != start || parser.getData(start + length - 1) != ')') {
-					hazard = true;
-				}
-			} else if (c == '?') {
-				hazard = true;
-			} else if (c == '-' || c == '+') {
-				if (previous) {
-					hazard = true;
-				} else {
-					previous = true;
-				}
-			} else {
-				previous = false;
-			}
-		}
-		return hazard;
-	}
-
-	/**
-	 * Checks if previous character is hazardous
-	 * 
-	 * @param index
-	 *            the index
-	 * @return true if hazard, false if not
-	 * @throws SourceParserException
-	 *             if processing fails
-	 */
-	private boolean checkPreviousChar(int index) throws SourceParserException {
-		boolean hazard = false;
-		SourceIterator previtr = parser.createIterator(index,
-				SourceParser.SKIP_ALL | SourceParser.BACKWARD_SEARCH);
-		char prevchar = previtr.next();
-		if (prevchar != ';' && prevchar != '{' && prevchar != '}') {
-			hazard = true;
-		}
-		return hazard;
-	}
-
-	/**
-	 * Finds the last return statement from the given context
-	 * 
-	 * @param context
-	 *            the context
-	 * @return the index to beginning of the return statement
-	 */
-	int findLast(SourceContext context) {
-		String statement = SourceConstants.RETURN;
-		int retval = findLast(context, statement);
-		if (returnExtensions != null && returnExtensions.size() > 0) {
-			int res;
-			for (int i = 0; i < returnExtensions.size(); i++) {
-				res = findLast(context, returnExtensions.get(i));
-				if (res > retval) {
-					retval = res;
-				}
-			}
-		}
-		if (retval == -1) {
-			retval = context.getOffset() + context.getLength();
-		}
-		return retval;
-	}
-
-	/**
-	 * Finds the last return statement from the given context
-	 * 
-	 * @param context
-	 *            the context
-	 * @param statement
-	 *            the statement to be searched
-	 * @return the index to beginning of the return statement
-	 */
-	private int findLast(SourceContext context, String statement) {
-		// TODO: Backwards string search
-		int start = context.getOffset();
-		int end = start + context.getLength();
-		SourceSearch search = parser.startStringSearch(statement, start, end,
-				SourceParser.MATCH_WHOLE_WORD | SourceParser.SKIP_ALL);
-		int index = 0;
-		int retval = -1;
-		do {
-			index = search.findNext();
-			if (index != -1) {
-				retval = index;
-			}
-		} while (index != -1);
-		return retval;
-	}
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/FunctionReturnValueSearchData.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Parser for function return values
-*
-*/
-package com.nokia.tracecompiler.source;
-
-/**
- * Parse data for function return value parser
- * 
- */
-final class FunctionReturnValueSearchData {
-
-	/**
-	 * Data index
-	 */
-	int index;
-
-	/**
-	 * Iterator
-	 */
-	SourceIterator itr;
-
-	/**
-	 * Return statement start offset
-	 */
-	int startOffset;
-
-	/**
-	 * Return statement end offset
-	 */
-	int endOffset;
-
-}
\ No newline at end of file
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/OffsetLength.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Wrapper for offset and length
-*
-*/
-package com.nokia.tracecompiler.source;
-
-/**
- * Wrapper for offset and length
- * 
- */
-public final class OffsetLength {
-
-	/**
-	 * Offset
-	 */
-	public int offset;
-
-	/**
-	 * Length
-	 */
-	public int length;
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/ParsedType.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,52 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Interface for types parsed from source files
-*
-*/
-package com.nokia.tracecompiler.source;
-
-/**
- * Interface for types parsed from source files
- * 
- */
-public interface ParsedType {
-
-	/**
-	 * Checks if parameter is pointer (*) or pointer reference (*&)
-	 * 
-	 * @return true if pointer, false if not
-	 */
-	public boolean isPointer();
-
-	/**
-	 * Checks if parameter type equals given type
-	 * 
-	 * @param type
-	 *            the type to be checked
-	 * @return true if types match
-	 */
-	public boolean typeEquals(String type);
-
-	/**
-	 * Checks if the type has the given qualifier
-	 * 
-	 * @param qualifier
-	 *            the qualifier to be checked
-	 * @return true if qualifier exists, false if not
-	 */
-	public boolean hasQualifier(String qualifier);
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/PositionArrayComparator.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Comparator for position arrays
-*
-*/
-package com.nokia.tracecompiler.source;
-
-import java.util.Comparator;
-
-/**
- * Comparator for position arrays
- * 
- */
-public final class PositionArrayComparator implements
-		Comparator<SourceLocationBase> {
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
-	 */
-	public int compare(SourceLocationBase arrayElement, SourceLocationBase key) {
-		int retval;
-		if (key.getOffset() < arrayElement.getOffset()) {
-			// Start is inclusive
-			retval = 1;
-		} else if (key.getOffset() >= arrayElement.getOffset()
-				+ arrayElement.getLength()) {
-			// End is exclusive
-			retval = -1;
-		} else {
-			retval = 0;
-		}
-		return retval;
-	}
-
-}
\ No newline at end of file
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/SourceConstants.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,445 +0,0 @@
-/*
-* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Constants related to source files
-*
-*/
-package com.nokia.tracecompiler.source;
-
-/**
- * Constants related to source files
- * 
- */
-public interface SourceConstants {
-
-	/**
-	 * Space character as string
-	 */
-	final String SPACE = " "; //$NON-NLS-1$
-
-	/**
-	 * Quote character as string
-	 */
-	final String QUOTE = "\""; //$NON-NLS-1$
-
-	/**
-	 * '\' character as string
-	 */
-	final String BACKSLASH = "\\"; //$NON-NLS-1$
-
-	/**
-	 * '_' character as string
-	 */
-	final String UNDERSCORE = "_"; //$NON-NLS-1$
-
-	/**
-	 * Double underscore for header guards
-	 */
-	final String DOUBLE_UNDERSCORE = "__"; //$NON-NLS-1$
-
-	/**
-	 * Semicolon character as string
-	 */
-	final String SEMICOLON = ";"; //$NON-NLS-1$
-
-	/**
-	 * Colon character as string
-	 */
-	final String COLON = ":"; //$NON-NLS-1$
-
-	/**
-	 * Period character as string
-	 */
-	final String PERIOD = "."; //$NON-NLS-1$
-
-	/**
-	 * Tilde character as string
-	 */
-	final String TILDE = "~"; //$NON-NLS-1$
-
-	/**
-	 * Opening brace as string
-	 */
-	final String OPENING_BRACE = "{"; //$NON-NLS-1$
-
-	/**
-	 * Closing brace as string
-	 */
-	final String CLOSING_BRACE = "}"; //$NON-NLS-1$
-
-	/**
-	 * Asterisk character
-	 */
-	final String ASTERISK = "*"; //$NON-NLS-1$
-
-	/**
-	 * Space character
-	 */
-	final char SPACE_CHAR = ' ';
-
-	/**
-	 * Colon character
-	 */
-	final char COLON_CHAR = ':';
-	
-	/**
-	 * Quote character
-	 */
-	final char QUOTE_CHAR = '\"';
-
-	/**
-	 * '\' character
-	 */
-	final char BACKSLASH_CHAR = '\\';
-
-	/**
-	 * '/' character
-	 */
-	final char FORWARD_SLASH_CHAR = '/';
-
-	/**
-	 * '_' character
-	 */
-	final char UNDERSCORE_CHAR = '_';
-
-	/**
-	 * '.' character
-	 */
-	final char PERIOD_CHAR = '.';
-
-	/**
-	 * Line separator
-	 */
-	final String LINE_FEED = System.getProperty("line.separator"); //$NON-NLS-1$
-
-	/**
-	 * Header extension (.h)
-	 */
-	final String HEADER_EXTENSION = ".h"; //$NON-NLS-1$
-
-	/**
-	 * #define
-	 */
-	final String DEFINE = "#define"; //$NON-NLS-1$
-
-	/**
-	 * #undef
-	 */
-	final String UNDEF = "#undef"; //$NON-NLS-1$
-
-	/**
-	 * #include
-	 */
-	final String INCLUDE = "#include"; //$NON-NLS-1$
-
-	/**
-	 * #ifdef
-	 */
-	final String IFDEF = "#ifdef"; //$NON-NLS-1$
-
-	/**
-	 * #ifndef
-	 */
-	final String IFNDEF = "#ifndef"; //$NON-NLS-1$
-
-	/**
-	 * #if
-	 */
-	final String IF = "#if"; //$NON-NLS-1$
-
-	/**
-	 * defined
-	 */
-	final String DEFINED = "defined"; //$NON-NLS-1$
-
-	/**
-	 * #else
-	 */
-	final String ELSE = "#else"; //$NON-NLS-1$
-
-	/**
-	 * #endif
-	 */
-	final String ENDIF = "#endif"; //$NON-NLS-1$
-
-	/**
-	 * Or
-	 */
-	final String OR = "||"; //$NON-NLS-1$
-
-	/**
-	 * Return statement
-	 */
-	final String RETURN = "return"; //$NON-NLS-1$
-
-	/**
-	 * One step up in path ("../")
-	 */
-	final String PATH_UP = "../"; //$NON-NLS-1$
-
-	/**
-	 * This path ("./")
-	 */
-	final String THIS_PATH = "./"; //$NON-NLS-1$
-
-	/**
-	 * inline
-	 */
-	final String INLINE = "inline"; //$NON-NLS-1$
-
-	/**
-	 * void
-	 */
-	final String VOID = "void"; //$NON-NLS-1$
-
-	/**
-	 * char
-	 */
-	final String CHAR = "char"; //$NON-NLS-1$
-
-	/**
-	 * short
-	 */
-	final String SHORT = "short"; //$NON-NLS-1$
-
-	/**
-	 * int
-	 */
-	final String INT = "int"; //$NON-NLS-1$
-
-	/**
-	 * long
-	 */
-	final String LONG = "long"; //$NON-NLS-1$
-
-	/**
-	 * unsigned
-	 */
-	final String UNSIGNED = "unsigned"; //$NON-NLS-1$
-
-	/**
-	 * Parameter type qualifier list
-	 */
-	final String[] PARAMETER_QUALIFIERS = { "const", //$NON-NLS-1$
-			"volatile", UNSIGNED }; //$NON-NLS-1$
-
-	/**
-	 * No parameters
-	 */
-	final String NO_PARAMETERS = "()"; //$NON-NLS-1$
-
-	/**
-	 * Start of parameters
-	 */
-	final String START_PARAMETERS = "( "; //$NON-NLS-1$
-
-	/**
-	 * Start of parameters with quote
-	 */
-	final String START_PARAMETERS_QUOTE = "( \""; //$NON-NLS-1$
-
-	/**
-	 * Closing parenthesis with non-quoted last parameter
-	 */
-	final String END_PARAMETERS = " )"; //$NON-NLS-1$
-
-	/**
-	 * Closing parenthesis with quoted last parameter
-	 */
-	final String END_PARAMETERS_QUOTE = "\" )"; //$NON-NLS-1$
-
-	/**
-	 * Separator between end of quoted parameter and start of non-quoted
-	 * parameter
-	 */
-	final String QUOTE_PARAMETER_SEPARATOR = "\", "; //$NON-NLS-1$
-
-	/**
-	 * Separator between two parameters without quotes
-	 */
-	final String PARAMETER_SEPARATOR = ", "; //$NON-NLS-1$
-
-	/**
-	 * Separator within for
-	 */
-	final String FOR_SEPARATOR = "; "; //$NON-NLS-1$
-
-	/**
-	 * Separator between end of non-quoted parameter and start of quoted
-	 * parameter
-	 */
-	final String PARAMETER_SEPARATOR_QUOTE = ", \""; //$NON-NLS-1$
-
-	/**
-	 * if and the opening parenthesis
-	 */
-	final String START_IF = "if ( "; //$NON-NLS-1$
-
-	/**
-	 * Sizeof and the opening parenthesis
-	 */
-	final String START_SIZEOF = "sizeof ( "; //$NON-NLS-1$
-
-	/**
-	 * for and the opening parenthesis
-	 */
-	final String START_FOR = "for ( "; //$NON-NLS-1$
-
-	/**
-	 * Assignment operation with spaces
-	 */
-	final String ASSIGN_WITH_SPACES = " = "; //$NON-NLS-1$
-
-	/**
-	 * Assignment operation with out spaces
-	 */
-	final String ASSIGN_WITH_OUT_SPACES = "="; //$NON-NLS-1$
-	
-	/**
-	 * Less of equals for if-statements
-	 */
-	final String LESS_OR_EQUAL_THAN = " <= "; //$NON-NLS-1$
-
-	/**
-	 * Less for if statements
-	 */
-	final String LESS_THAN = " < "; //$NON-NLS-1$
-
-	/**
-	 * Starting bracket for array
-	 */
-	final String START_ARRAY = "[ "; //$NON-NLS-1$
-
-	/**
-	 * Ending bracket for array
-	 */
-	final String END_ARRAY = " ]"; //$NON-NLS-1$
-
-	/**
-	 * Pointer and space
-	 */
-	final String POINTER = "* "; //$NON-NLS-1$
-
-	/**
-	 * Add operation with spaces
-	 */
-	final String ADD = " + "; //$NON-NLS-1$
-
-	/**
-	 * Modulo operation with spaces
-	 */
-	final String MOD = " % "; //$NON-NLS-1$
-
-	/**
-	 * Subtract with assignment
-	 */
-	final String SUBTRACT_ASSIGN = " -= "; //$NON-NLS-1$
-
-	/**
-	 * Add with assignment
-	 */
-	final String ADD_ASSIGN = " += "; //$NON-NLS-1$
-
-	/**
-	 * Not equal check
-	 */
-	final String NOT_EQUALS = " != "; //$NON-NLS-1$
-
-	/**
-	 * Equal check
-	 */
-	final String EQUALS = " == "; //$NON-NLS-1$
-
-	/**
-	 * Increment operation
-	 */
-	final String INCREMENT = "++"; //$NON-NLS-1$
-
-	/**
-	 * Subtract operation with spaces
-	 */
-	final String SUBTRACT = " - "; //$NON-NLS-1$
-
-	/**
-	 * class
-	 */
-	final String CLASS = "class"; //$NON-NLS-1$
-
-	/**
-	 * public
-	 */
-	final String PUBLIC = "public"; //$NON-NLS-1$
-
-	/**
-	 * private
-	 */
-	final String PRIVATE = "private"; //$NON-NLS-1$
-
-	/**
-	 * Prefix for hex numbers
-	 */
-	final String HEX_PREFIX = "0x"; //$NON-NLS-1$
-
-	/**
-	 * Prefix for hex numbers, upper case
-	 */
-	final String HEX_PREFIX_U = "0X"; //$NON-NLS-1$
-
-	/**
-	 * Prefix for octal numbers
-	 */
-	final String OCTAL_PREFIX = "0"; //$NON-NLS-1$
-
-	/**
-	 * 64-bit integer postfix
-	 */
-	final String I64_POSTFIX = "i64"; //$NON-NLS-1$
-
-	/**
-	 * Size of long integer
-	 */
-	final int LONG_SIZE = 64; // CodForChk_Dis_Magic
-
-	/**
-	 * Size of integer
-	 */
-	final int INT_SIZE = 32; // CodForChk_Dis_Magic
-
-	/**
-	 * Size of short
-	 */
-	final int SHORT_SIZE = 16; // CodForChk_Dis_Magic
-
-	/**
-	 * Size of byte
-	 */
-	final int BYTE_SIZE = 8; // CodForChk_Dis_Magic
-
-	/**
-	 * Array type prefix
-	 */
-	final String OST_ARRAY_TYPE_PREFIX = "const TOstArray< "; //$NON-NLS-1$
-
-	/**
-	 * Array type postfix
-	 */
-	final String OST_ARRAY_TYPE_POSTFIX = " >&"; //$NON-NLS-1$
-	
-	/**
-	 * Variable argument list indicator
-	 */
-	final String VARIABLE_ARG_LIST_INDICATOR = "..."; //$NON-NLS-1$
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/SourceContext.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,320 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Source context is a representation of a range of source code
-*
-*/
-package com.nokia.tracecompiler.source;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-
-/**
- * Source context is a representation of a range of source code. For example a
- * function in source code could be represented with a context that has the name
- * of the function
- * 
- */
-public class SourceContext extends SourceLocationBase implements ParsedType {
-
-	/**
-	 * No proposal
-	 */
-	public static final int NONE = 0; // CodForChk_Dis_Magic
-
-	/**
-	 * Start of function proposal type
-	 */
-	public static final int START_OF_FUNCTION = 1; // CodForChk_Dis_Magic
-
-	/**
-	 * End of function proposal type
-	 */
-	public static final int END_OF_FUNCTION = 2; // CodForChk_Dis_Magic
-
-	/**
-	 * Full selection proposal type
-	 */
-	public static final int FULL_SELECTION = 3; // CodForChk_Dis_Magic
-
-	/**
-	 * Class name
-	 */
-	private String className;
-
-	/**
-	 * Function name
-	 */
-	private String functionName;
-
-	/**
-	 * Index to start of parameters
-	 */
-	private int parameterStart;
-
-	/**
-	 * List of return types
-	 */
-	private ArrayList<String> returnTypes;
-
-	/**
-	 * Creates a new SourceContext starting from given offset
-	 * 
-	 * @param parser
-	 *            the parser owning this context
-	 * @param offset
-	 *            the offset
-	 */
-	SourceContext(SourceParser parser, int offset) {
-		super(parser, offset);
-	}
-
-	/**
-	 * Gets the class name of this context
-	 * 
-	 * @return the class name
-	 */
-	public String getClassName() {
-		return className;
-	}
-
-	/**
-	 * Gets the function name of this context
-	 * 
-	 * @return the function name
-	 */
-	public String getFunctionName() {
-		return functionName;
-	}
-
-	/**
-	 * Sets the class name. If the class name contains pointer or reference
-	 * characters, they are added to the return statements list
-	 * 
-	 * @param name
-	 *            the new class name
-	 */
-	void setClassName(String name) {
-		className = removePtrAndRef(name);
-	}
-
-	/**
-	 * Sets the function name. If the function name contains pointer or
-	 * reference characters, they are added to the return statements list
-	 * 
-	 * @param name
-	 *            the new function name
-	 */
-	void setFunctionName(String name) {
-		functionName = removePtrAndRef(name);
-	}
-
-	/**
-	 * Removes the * and & characters from the given tag and adds them as return
-	 * modifiers
-	 * 
-	 * @param name
-	 *            the name
-	 * @return the name with * and & removed
-	 */
-	private String removePtrAndRef(String name) {
-		String retval = name;
-		if (name != null) {
-			int start = 0;
-			int end = name.length();
-			boolean found = true;
-			while (start < end && found) {
-				char c = name.charAt(start);
-				if (c == '*' || c == '&') {
-					addReturnModifier(c);
-					start++;
-				} else {
-					found = false;
-				}
-			}
-			found = true;
-			while (end > start && found) {
-				char c = name.charAt(end - 1);
-				if (c == '*' || c == '&') {
-					addReturnModifier(c);
-					end--;
-				} else {
-					found = false;
-				}
-			}
-			retval = name.substring(start, end);
-		}
-		return retval;
-	}
-
-	/**
-	 * Sets the index for start of parameters
-	 * 
-	 * @param index
-	 *            the index
-	 */
-	void setParametersStartIndex(int index) {
-		parameterStart = index;
-	}
-
-	/**
-	 * Adds a return type string to the context
-	 * 
-	 * @param type
-	 *            the return type
-	 */
-	void addReturnType(String type) {
-		// Constructors and destructor do not have return types
-		if (className != null && functionName!= null && !className.equals(functionName)
-				&& !functionName.equals(SourceConstants.TILDE + className)) {
-			type = removePtrAndRef(type);
-			if (type.length() > 0) {
-				if (returnTypes == null) {
-					returnTypes = new ArrayList<String>();
-				}
-				returnTypes.add(type);
-			}
-		}
-	}
-
-	/**
-	 * Adds a return type modifier to the list of return types
-	 * 
-	 * @param c
-	 *            the modifier
-	 */
-	private void addReturnModifier(char c) {
-		if (returnTypes == null) {
-			returnTypes = new ArrayList<String>();
-		}
-		returnTypes.add(String.valueOf(c));
-	}
-
-	/**
-	 * Gets the return types of this context
-	 * 
-	 * @return the return types
-	 */
-	Iterator<String> getReturnTypes() {
-		List<String> list;
-		if (returnTypes != null) {
-			list = returnTypes;
-		} else {
-			list = Collections.emptyList();
-		}
-		return list.iterator();
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.source.ParsedType#hasQualifier(java.lang.String)
-	 */
-	public boolean hasQualifier(String type) {
-		// All types and qualifiers are in the returnTypes list
-		return typeEquals(type);
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.source.ParsedType#typeEquals(java.lang.String)
-	 */
-	public boolean typeEquals(String type) {
-		return (returnTypes != null && returnTypes.contains(type));
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.source.ParsedType#isPointer()
-	 */
-	public boolean isPointer() {
-		boolean retval = false;
-		if (returnTypes != null) {
-			for (int i = 0; i < returnTypes.size() && !retval; i++) {
-				if (returnTypes.get(i).equals(SourceConstants.ASTERISK)) {
-					retval = true;
-				}
-			}
-		}
-		return retval;
-	}
-
-	/**
-	 * Checks if return types list contains "void"
-	 * 
-	 * @return true if void, false if not
-	 */
-	public boolean isVoid() {
-		return (returnTypes == null || returnTypes
-				.contains(SourceConstants.VOID));
-	}
-
-	/**
-	 * Parses the parameters of this source context
-	 * 
-	 * @param parameterList
-	 *            the list where the parameters are stored
-	 * @throws SourceParserException
-	 *             if parsing fails
-	 */
-	public void parseParameters(List<SourceParameter> parameterList)
-			throws SourceParserException {
-		if (getParser() != null) {
-			getParser().parseFunctionParameters(parameterStart, parameterList);
-		} else {
-			throw new SourceParserException(
-					SourceErrorCodes.CONTEXT_MISSING_OWNER);
-		}
-	}
-
-	/**
-	 * Parses the return statements of this source context
-	 * 
-	 * @param returnList
-	 *            the list where the return values are stored
-	 * @throws SourceParserException
-	 *             if parsing fails
-	 */
-	public void parseReturnValues(List<SourceReturn> returnList)
-			throws SourceParserException {
-		if (getParser() != null) {
-			getParser().parseReturnValues(this, returnList);
-		} else {
-			throw new SourceParserException(
-					SourceErrorCodes.CONTEXT_MISSING_OWNER);
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see java.lang.Object#toString()
-	 */
-	@Override
-	public String toString() {
-		StringBuffer sb = new StringBuffer();
-		if (className != null) {
-			sb.append(getClassName());
-		}
-		sb.append("::"); //$NON-NLS-1$
-		sb.append(getFunctionName());
-		return sb.toString();
-	}
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/SourceDocumentFactory.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Interface to be implemented by document framework
-*
-*/
-package com.nokia.tracecompiler.source;
-
-/**
- * Interface to be implemented by document framework
- * 
- */
-public interface SourceDocumentFactory {
-
-	/**
-	 * Creates a new location
-	 * 
-	 * @param base
-	 *            the location which owns the position
-	 * @param offset
-	 *            the position offset
-	 * @param length
-	 *            the position length
-	 * @return the location
-	 */
-	public SourceLocationInterface createLocation(SourceLocationBase base,
-			int offset, int length);
-
-	/**
-	 * Creates a new document
-	 * 
-	 * @param sourceData
-	 *            the document data
-	 * @return the document
-	 */
-	public SourceDocumentInterface createDocument(String sourceData);
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/SourceDocumentInterface.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,123 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Source document abstraction
-*
-*/
-package com.nokia.tracecompiler.source;
-
-/**
- * Source document abstraction
- * 
- */
-public interface SourceDocumentInterface {
-
-	/**
-	 * Gets the property provider interface. This can return null if the
-	 * document framework does not support source properties
-	 * 
-	 * @return the property provider
-	 */
-	public SourcePropertyProvider getPropertyProvider();
-
-	/**
-	 * Gets a subset of document data
-	 * 
-	 * @param start
-	 *            the start offset
-	 * @param length
-	 *            the data length
-	 * @return the data
-	 * @throws SourceParserException
-	 *             if parameters are not valid
-	 */
-	public String get(int start, int length) throws SourceParserException;
-
-	/**
-	 * Gets a character
-	 * 
-	 * @param offset
-	 *            the offset
-	 * @return the character
-	 * @throws SourceParserException
-	 *             if offset is not valid
-	 */
-	public char getChar(int offset) throws SourceParserException;
-
-	/**
-	 * Gets the data length
-	 * 
-	 * @return the length
-	 */
-	public int getLength();
-
-	/**
-	 * Maps an offset to line number
-	 * 
-	 * @param offset
-	 *            the offset
-	 * @return the line number
-	 * @throws SourceParserException
-	 *             if offset is not valid
-	 */
-	public int getLineOfOffset(int offset) throws SourceParserException;
-
-	/**
-	 * Replaces data from the document
-	 * 
-	 * @param offset
-	 *            offset to removed data
-	 * @param length
-	 *            length of removed data
-	 * @param newText
-	 *            new data
-	 * @throws SourceParserException
-	 *             if parameters are not valid
-	 */
-	public void replace(int offset, int length, String newText)
-			throws SourceParserException;
-
-	/**
-	 * Adds a location to this source.
-	 * 
-	 * @param location
-	 *            the location to be added
-	 */
-	public void addLocation(SourceLocationInterface location);
-
-	/**
-	 * Removes a location from this source.
-	 * 
-	 * @param location
-	 *            the location to be removed
-	 */
-	public void removeLocation(SourceLocationInterface location);
-
-	/**
-	 * Gets the owner of this source
-	 * 
-	 * @return the owner
-	 */
-	public Object getOwner();
-
-	/**
-	 * Sets the owner of this source
-	 * 
-	 * @param owner
-	 *            the owner
-	 */
-	public void setOwner(Object owner);
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/SourceDocumentMonitor.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Monitor for source files
-*
-*/
-package com.nokia.tracecompiler.source;
-
-/**
- * Monitor for source files
- * 
- */
-public interface SourceDocumentMonitor extends
-		Iterable<SourceDocumentInterface> {
-
-	/**
-	 * Gets a document factory, which is shared between all documents created
-	 * into this monitor
-	 * 
-	 * @return the factory
-	 */
-	public SourceDocumentFactory getFactory();
-
-	/**
-	 * Starts the monitor
-	 * 
-	 * @param processor
-	 *            document processor callback
-	 * @throws Exception 
-	 */
-	public void startMonitor(SourceDocumentProcessor processor) throws Exception;
-
-	/**
-	 * Stops the monitor
-	 */
-	public void stopMonitor();
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/SourceDocumentProcessor.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Document processor interface
-*
-*/
-package com.nokia.tracecompiler.source;
-
-import com.nokia.tracecompiler.model.TraceCompilerException;
-
-/**
- * Document processor interface
- * 
- */
-public interface SourceDocumentProcessor {
-
-	/**
-	 * Notification about source opened
-	 * 
-	 * @param document
-	 *            the document
-	 * @throws TraceCompilerException 
-	 */
-	public void sourceOpened(SourceDocumentInterface document) throws TraceCompilerException;
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/SourceErrorCodes.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,63 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Error codes for source parser
-*
-*/
-package com.nokia.tracecompiler.source;
-
-/**
- * Error codes for source parser
- * 
- */
-public interface SourceErrorCodes {
-
-	/**
-	 * Something unexpected happened while parsing source. This should be
-	 * asserted
-	 */
-	int UNEXPECTED_EXCEPTION = 0; // CodForChk_Dis_Magic
-
-	/**
-	 * Missing owner from source context. This should be asserted
-	 */
-	int CONTEXT_MISSING_OWNER = 1; // CodForChk_Dis_Magic
-
-	/**
-	 * Unexpected separator while parsing parameters
-	 */
-	int UNEXPECTED_PARAMETER_SEPARATOR = 2; // CodForChk_Dis_Magic
-
-	/**
-	 * Unexpected end of file while parsing
-	 */
-	int UNEXPECTED_END_OF_FILE = 3; // CodForChk_Dis_Magic
-
-	/**
-	 * Unexpected quote character was encountered
-	 */
-	int UNEXPECTED_QUOTE_CHARACTER = 4; // CodForChk_Dis_Magic
-
-	/**
-	 * Bracket mismatch
-	 */
-	int BRACKET_MISMATCH = 5; // CodForChk_Dis_Magic
-
-	/**
-	 * Offset / length was not valid
-	 */
-	int BAD_LOCATION = 6; // CodForChk_Dis_Magic
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/SourceExcludedArea.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,81 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Comment or string ares are added to the excluded list
-*
-*/
-package com.nokia.tracecompiler.source;
-
-/**
- * Comment or string ares are added to the excluded list
- * 
- */
-public class SourceExcludedArea extends SourceLocationBase {
-
-	/**
-	 * Line comment type
-	 */
-	public static final int LINE_COMMENT = 1; // CodForChk_Dis_Magic
-
-	/**
-	 * Multiline comment type
-	 */
-	public static final int MULTILINE_COMMENT = 2; // CodForChk_Dis_Magic
-
-	/**
-	 * String type
-	 */
-	public static final int STRING = 3; // CodForChk_Dis_Magic
-
-	/**
-	 * Character type
-	 */
-	public static final int CHARACTER = 4; // CodForChk_Dis_Magic
-
-	/**
-	 * Preprocessor definition area
-	 */
-	public static final int PREPROCESSOR_DEFINITION = 5; // CodForChk_Dis_Magic
-
-	/**
-	 * Type of area
-	 */
-	private int type;
-
-	/**
-	 * Constructor
-	 * 
-	 * @param parser
-	 *            the parser where this area belongs
-	 * @param offset
-	 *            offset to the area
-	 * @param type
-	 *            type of area
-	 */
-	SourceExcludedArea(SourceParser parser, int offset, int type) {
-		super(parser, offset);
-		this.type = type;
-	}
-
-	/**
-	 * Gets the type of this area
-	 * 
-	 * @return the type
-	 */
-	public int getType() {
-		return type;
-	}
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/SourceIterator.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,352 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* SourceIterator can be used to traverse through the source file character at a time
-*
-*/
-package com.nokia.tracecompiler.source;
-
-/**
- * SourceIterator can be used to traverse through the source file character at a
- * time.
- * 
- */
-public class SourceIterator {
-
-	/**
-	 * The source parser
-	 */
-	private SourceParser parser;
-
-	/**
-	 * Index of next excluded area
-	 */
-	private int nextExcludedIndex;
-
-	/**
-	 * The type of next excluded area
-	 */
-	private int nextExcludedAreaType;
-
-	/**
-	 * Offset to the start of next excluded area
-	 */
-	private int nextExcludedStart;
-
-	/**
-	 * Offset to the end of next excluded area
-	 */
-	private int nextExcludedEnd;
-
-	/**
-	 * Index of next character to be fetched
-	 */
-	private int nextIndex;
-
-	/**
-	 * Index of character returned by latest call to next
-	 */
-	private int currentIndex;
-
-	/**
-	 * Index of character returned by previous call to next
-	 */
-	private int previousIndex;
-
-	/**
-	 * Search flags
-	 */
-	private int flags;
-
-	/**
-	 * Constructor
-	 * 
-	 * @param parser
-	 *            source parser
-	 * @param startIndex
-	 *            the index where to start
-	 * @param flags
-	 *            the iterator flags
-	 */
-	SourceIterator(SourceParser parser, int startIndex, int flags) {
-		SourceDocumentInterface source = parser.getSource();
-		if (startIndex >= source.getLength()
-				&& ((flags & SourceParser.BACKWARD_SEARCH) != 0)) {
-			nextIndex = source.getLength() - 1;
-		} else {
-			nextIndex = startIndex;
-		}
-		this.parser = parser;
-		this.flags = flags;
-		if (hasNext()) {
-			boolean forward = (flags & SourceParser.BACKWARD_SEARCH) == 0;
-			nextExcludedIndex = parser.findExcludedAreaIndex(nextIndex);
-			if (nextExcludedIndex < 0) {
-				nextExcludedIndex = -1 - nextExcludedIndex;
-				if (forward) {
-					// Update increments the index, so it must be moved behind
-					// the start of search
-					nextExcludedIndex--;
-				}
-			}
-			// Increments / decrements the next excluded area according to
-			// search direction. If direction is backward, this decrements the
-			// index. In that case the above initialization has selected the
-			// index after the start of search index. If direction is forward,
-			// this increments the index.
-			updateExcludedIndex();
-			// After the excluded index has been set, the white spaces and
-			// comments are skipped
-			if (forward) {
-				forwardSeekNext();
-			} else {
-				backwardSeekNext();
-			}
-			previousIndex = startIndex;
-			currentIndex = startIndex;
-		}
-	}
-
-	/**
-	 * Determines if there are more characters to process
-	 * 
-	 * @return true if iterator has more characters
-	 */
-	public boolean hasNext() {
-		return (flags & SourceParser.BACKWARD_SEARCH) == 0 ? nextIndex < parser
-				.getSource().getLength() : nextIndex >= 0;
-	}
-
-	/**
-	 * Gets the next character from this iterator
-	 * 
-	 * @return the next character
-	 * @throws SourceParserException
-	 *             if there are no more characters
-	 */
-	public char next() throws SourceParserException {
-		char ret;
-		previousIndex = currentIndex;
-		currentIndex = nextIndex;
-		if ((flags & SourceParser.BACKWARD_SEARCH) == 0) {
-			ret = forwardNext();
-		} else {
-			ret = backwardNext();
-		}
-		return ret;
-	}
-
-	/**
-	 * Returns next character moving forward
-	 * 
-	 * @return the character
-	 * @throws SourceParserException
-	 *             if there are no more characters
-	 */
-	private char forwardNext() throws SourceParserException {
-		char c = parser.getSource().getChar(nextIndex);
-		nextIndex++;
-		forwardSeekNext();
-		return c;
-	}
-
-	/**
-	 * Skips to next index
-	 */
-	private void forwardSeekNext() {
-		// Skips over the excluded area if the index enters one
-		boolean didSkip;
-		SourceDocumentInterface source = parser.getSource();
-		try {
-			do {
-				didSkip = false;
-				if (nextIndex >= nextExcludedStart && nextExcludedStart != -1) {
-					// Skips if applicable. Otherwise just updates the next
-					// excluded
-					// area variables
-					if (isExcluded()) {
-						nextIndex = nextExcludedEnd;
-					}
-					updateExcludedIndex();
-				}
-				if ((flags & SourceParser.SKIP_WHITE_SPACES) != 0) {
-					// Skips over white spaces
-					boolean wspFound = true;
-					do {
-						// If a white space is skipped, the excluded area check
-						// needs to be done again. didSkip flag controls that
-						if (nextIndex < source.getLength()
-								&& Character.isWhitespace(source
-										.getChar(nextIndex))) {
-							nextIndex++;
-							didSkip = true;
-						} else {
-							wspFound = false;
-						}
-					} while (wspFound);
-				}
-			} while (didSkip);
-		} catch (SourceParserException e) {
-			// The exception must not be thrown out of this function
-		}
-	}
-
-	/**
-	 * Returns next character moving backward
-	 * 
-	 * @return the character
-	 * @throws SourceParserException
-	 *             if there are no more characters
-	 */
-	private char backwardNext() throws SourceParserException {
-		char c = parser.getSource().getChar(nextIndex);
-		nextIndex--;
-		backwardSeekNext();
-		return c;
-	}
-
-	/**
-	 * Skips to previous index
-	 */
-	private void backwardSeekNext() {
-		// Skips over the excluded area if the index enters one
-		boolean didSkip;
-		SourceDocumentInterface source = parser.getSource();
-		try {
-			do {
-				didSkip = false;
-				if (nextIndex <= nextExcludedEnd - 1) {
-					// Skips if applicable. Otherwise just updates the next
-					// excluded
-					// area variables
-					if (isExcluded()) {
-						nextIndex = nextExcludedStart - 1;
-					}
-					updateExcludedIndex();
-				}
-				if ((flags & SourceParser.SKIP_WHITE_SPACES) != 0) {
-					boolean wspFound = true;
-					do {
-						// If a white space is skipped, the excluded area check
-						// needs to be done again. didSkip flag controls that
-						if (nextIndex >= 0
-								&& Character.isWhitespace(source
-										.getChar(nextIndex))) {
-							nextIndex--;
-							didSkip = true;
-						} else {
-							wspFound = false;
-						}
-					} while (wspFound);
-				}
-			} while (didSkip);
-		} catch (SourceParserException e) {
-			// The exception must not be thrown out of this function
-		}
-	}
-
-	/**
-	 * Updates the excluded area index
-	 */
-	private void updateExcludedIndex() {
-		if ((flags & SourceParser.BACKWARD_SEARCH) == 0) {
-			nextExcludedIndex++;
-		} else {
-			nextExcludedIndex--;
-		}
-		// Updates the values using the next excluded area
-		if (nextExcludedIndex >= 0
-				&& nextExcludedIndex < parser.getExcludedAreas().size()) {
-			SourceExcludedArea p = parser.getExcludedAreas().get(
-					nextExcludedIndex);
-			nextExcludedStart = p.getOffset();
-			nextExcludedEnd = p.getOffset() + p.getLength();
-			nextExcludedAreaType = p.getType();
-		} else {
-			nextExcludedStart = -1;
-			nextExcludedEnd = -1;
-		}
-	}
-
-	/**
-	 * Returns the index where the next character will be fetched
-	 * 
-	 * @return the index
-	 */
-	public int nextIndex() {
-		return nextIndex;
-	}
-
-	/**
-	 * Gets the index of the character returned by last call to next
-	 * 
-	 * @return the index
-	 */
-	public int currentIndex() {
-		return currentIndex;
-	}
-
-	/**
-	 * Gets the index that preceeded the latest call to next
-	 * 
-	 * @return the index
-	 */
-	public int previousIndex() {
-		return previousIndex;
-	}
-
-	/**
-	 * Gets the next character but does not move the iterator
-	 * 
-	 * @return the next character
-	 * @throws SourceParserException
-	 *             if there are no more characters
-	 */
-	public char peek() throws SourceParserException {
-		return parser.getSource().getChar(nextIndex);
-	}
-
-	/**
-	 * Determines if the iterator skipped over characters during last call to
-	 * next
-	 * 
-	 * @return true if skipped, false otherwise
-	 */
-	public boolean hasSkipped() {
-		return (flags & SourceParser.BACKWARD_SEARCH) == 0 ? currentIndex > previousIndex + 1
-				: currentIndex < previousIndex - 1;
-	}
-
-	/**
-	 * Checks if the next area is skipped
-	 * 
-	 * @return true is skipped
-	 */
-	private boolean isExcluded() {
-		return isExcluded(nextExcludedAreaType);
-	}
-
-	/**
-	 * Checks if the given type is skipped
-	 * 
-	 * @param type
-	 *            the type
-	 * @return true is skipped
-	 */
-	private boolean isExcluded(int type) {
-		return SourceParser.isExcluded(type, flags);
-	}
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/SourceLocation.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,184 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Represents a location in source
-*
-*/
-package com.nokia.tracecompiler.source;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-
-/**
- * Represents a location in source
- * 
- */
-public class SourceLocation extends SourceLocationBase {
-
-	/**
-	 * Location listeners
-	 */
-	private ArrayList<SourceLocationListener> locationListeners;
-
-	/**
-	 * Temporary array for callback purposes. Prevents concurrent modifications
-	 * if listeners are removed during a callback
-	 */
-	private ArrayList<SourceLocationListener> tempListeners;
-
-	/**
-	 * Reference count
-	 */
-	private int refCount = 0;
-
-	/**
-	 * Listener change flag
-	 */
-	private boolean listenersChanged = true;
-
-	/**
-	 * Constructor
-	 * 
-	 * @param parser
-	 *            the parser owning this location
-	 * @param offset
-	 *            offset of location
-	 * @param length
-	 *            length of location
-	 */
-	public SourceLocation(SourceParser parser, int offset, int length) {
-		super(parser, offset, length);
-		parser.addLocation(this);
-		refCount = 1;
-	}
-
-	/**
-	 * Gets the name of the class which owns this location
-	 * 
-	 * @return the class name
-	 */
-	public String getClassName() {
-		String retval = null;
-		if (getParser() != null) {
-			SourceContext context = getParser().getContext(getOffset());
-			if (context != null) {
-				retval = context.getClassName();
-			}
-		}
-		return retval;
-	}
-
-	/**
-	 * Gets the name of function which owns this location
-	 * 
-	 * @return the function name
-	 */
-	public String getFunctionName() {
-		String retval = null;
-		if (getParser() != null) {
-			SourceContext context = getParser().getContext(getOffset());
-			if (context != null) {
-				retval = context.getFunctionName();
-			}
-		}
-		return retval;
-	}
-
-	/**
-	 * Adds a location listener to this location
-	 * 
-	 * @param listener
-	 *            the location listener
-	 */
-	public void addLocationListener(SourceLocationListener listener) {
-		if (locationListeners == null) {
-			locationListeners = new ArrayList<SourceLocationListener>();
-		}
-		locationListeners.add(listener);
-		listenersChanged = true;
-	}
-
-	/**
-	 * Removes a location listener from this location
-	 * 
-	 * @param listener
-	 *            the location listener
-	 */
-	public void removeLocationListener(SourceLocationListener listener) {
-		if (locationListeners != null) {
-			if (locationListeners.remove(listener)) {
-				listenersChanged = true;
-			}
-		}
-	}
-
-	/**
-	 * Gets the listener interfaces
-	 * 
-	 * @return the listeners
-	 */
-	protected Iterator<SourceLocationListener> getListeners() {
-		List<SourceLocationListener> list;
-		if (locationListeners != null) {
-			if (listenersChanged) {
-				listenersChanged = false;
-				if (tempListeners == null) {
-					tempListeners = new ArrayList<SourceLocationListener>();
-				}
-				tempListeners.clear();
-				tempListeners.addAll(locationListeners);
-			}
-			list = tempListeners;
-		} else {
-			list = Collections.emptyList();
-		}
-		return list.iterator();
-	}
-
-	/**
-	 * Increases the reference count of this location.
-	 * 
-	 * @see #dereference()
-	 */
-	public void reference() {
-		refCount++;
-	}
-
-	/**
-	 * Decrements the reference count of this location. When reference count is
-	 * 0, this is removed from source. Note that a location can also be removed
-	 * from source even if it has outstanding references left. In that case it
-	 * can no longer be selected.
-	 */
-	public void dereference() {
-		if (--refCount <= 0) {
-			removeFromSource();
-		}
-	}
-
-	/**
-	 * Removes this location from the source
-	 */
-	private void removeFromSource() {
-		delete();
-		if (getParser() != null) {
-			getParser().removeLocation(this);
-			resetParser();
-		}
-	}
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/SourceLocationBase.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,215 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Base class for locations
-*
-*/
-package com.nokia.tracecompiler.source;
-
-/**
- * Base class for locations
- * 
- */
-public class SourceLocationBase {
-
-	/**
-	 * Source parser
-	 */
-	private SourceParser parser;
-
-	/**
-	 * Position abstraction
-	 */
-	private SourceLocationInterface position;
-
-	/**
-	 * Line number is cached and updated when changes occur
-	 */
-	private int currentLine = -1;
-
-	/**
-	 * Constructor
-	 * 
-	 * @param parser
-	 *            the source parser
-	 * @param offset
-	 *            the offset to the location
-	 */
-	protected SourceLocationBase(SourceParser parser, int offset) {
-		this.parser = parser;
-		position = parser.getDocumentFramework()
-				.createLocation(this, offset, 0);
-	}
-
-	/**
-	 * Constructor
-	 * 
-	 * @param parser
-	 *            the source parser
-	 * @param offset
-	 *            the offset to the location
-	 * @param length
-	 *            the location length
-	 */
-	protected SourceLocationBase(SourceParser parser, int offset, int length) {
-		this.parser = parser;
-		position = parser.getDocumentFramework().createLocation(this, offset,
-				length);
-	}
-
-	/**
-	 * Gets the offset
-	 * 
-	 * @return offset
-	 */
-	public final int getOffset() {
-		return position.getOffset();
-	}
-
-	/**
-	 * Sets the offset
-	 * 
-	 * @param offset
-	 *            new offset
-	 */
-	public final void setOffset(int offset) {
-		position.setOffset(offset);
-	}
-
-	/**
-	 * Gets the length
-	 * 
-	 * @return length
-	 */
-	public final int getLength() {
-		return position.getLength();
-	}
-
-	/**
-	 * Sets the length
-	 * 
-	 * @param length
-	 *            the length
-	 */
-	public final void setLength(int length) {
-		position.setLength(length);
-	}
-
-	/**
-	 * Returns deleted flag
-	 * 
-	 * @return the flag
-	 */
-	public final boolean isDeleted() {
-		return position.isDeleted();
-	}
-
-	/**
-	 * Sets the deleted flag
-	 */
-	public final void delete() {
-		position.delete();
-	}
-
-	/**
-	 * Gets the location interface
-	 * 
-	 * @return the location interface
-	 */
-	final SourceLocationInterface getLocation() {
-		return position;
-	}
-
-	/**
-	 * Gets the source parser
-	 * 
-	 * @return the parser
-	 */
-	public SourceParser getParser() {
-		return parser;
-	}
-
-	/**
-	 * Resets the source parser
-	 */
-	protected void resetParser() {
-		parser = null;
-	}
-
-	/**
-	 * Gets the line number of this location
-	 * 
-	 * @return line number
-	 */
-	public int getLineNumber() {
-		// Line number is set to -1 when notifyUpdate is called
-		if (parser != null) {
-			if (currentLine == -1) {
-				currentLine = parser.getLineNumber(getOffset());
-			}
-		} else {
-			currentLine = -1;
-		}
-		return currentLine;
-	}
-
-	/**
-	 * Resets the line number
-	 */
-	protected void resetLineNumber() {
-		currentLine = -1;
-	}
-
-	/**
-	 * Gets the source file name
-	 * 
-	 * @return the file name
-	 */
-	public String getFileName() {
-		String retval = null;
-		if (parser != null) {
-			SourceDocumentInterface owner = parser.getSource();
-			if (owner != null) {
-				SourcePropertyProvider propertyProvider = owner
-						.getPropertyProvider();
-				if (propertyProvider != null) {
-					retval = propertyProvider.getFileName();
-				}
-			}
-		}
-		return retval;
-	}
-
-	/**
-	 * Gets the source file path
-	 * 
-	 * @return the path
-	 */
-	public String getFilePath() {
-		String retval = null;
-		if (parser != null) {
-			SourceDocumentInterface owner = parser.getSource();
-			if (owner != null) {
-				SourcePropertyProvider propertyProvider = owner
-						.getPropertyProvider();
-				if (propertyProvider != null) {
-					retval = propertyProvider.getFilePath();
-				}
-			}
-		}
-		return retval;
-	}
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/SourceLocationInterface.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,69 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Interface which abstracts the underlying position framework
-*
-*/
-package com.nokia.tracecompiler.source;
-
-/**
- * Interface which abstracts the underlying position framework
- * 
- */
-public interface SourceLocationInterface {
-
-	/**
-	 * Gets the offset of the location
-	 * 
-	 * @return the offset
-	 */
-	int getOffset();
-
-	/**
-	 * Sets the offset
-	 * 
-	 * @param offset
-	 *            the new offset
-	 */
-	void setOffset(int offset);
-
-	/**
-	 * Gets the length of the location
-	 * 
-	 * @return the length
-	 */
-	int getLength();
-
-	/**
-	 * Sets the length
-	 * 
-	 * @param length
-	 *            the length
-	 */
-	void setLength(int length);
-
-	/**
-	 * Checks if the location has been deleted
-	 * 
-	 * @return true if deleted
-	 */
-	boolean isDeleted();
-
-	/**
-	 * Marks the location as deleted
-	 */
-	void delete();
-
-}
\ No newline at end of file
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/SourceLocationListener.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Listener for source locations
-*
-*/
-package com.nokia.tracecompiler.source;
-
-import com.nokia.tracecompiler.engine.TraceLocation;
-
-/**
- * Listener for source locations
- * 
- */
-public interface SourceLocationListener {
-
-	/**
-	 * Notification that location validity has changed
-	 * 
-	 * @param location
-	 *            the location that changed
-	 */
-	public void locationValidityChanged(TraceLocation location);	
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/SourceParameter.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,238 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Representation of a parameter parsed from source
-*
-*/
-package com.nokia.tracecompiler.source;
-
-import java.util.ArrayList;
-
-/**
- * Representation of a parameter parsed from source
- * 
- */
-public class SourceParameter implements ParsedType {
-
-	/**
-	 * Parameter qualifiers
-	 */
-	private ArrayList<String> qualifiers;
-
-	/**
-	 * Parameter type
-	 */
-	private String type;
-
-	/**
-	 * Parameter name
-	 */
-	private String name;
-
-	/**
-	 * Flag specifying if parameter is reference
-	 */
-	private boolean isReference;
-
-	/**
-	 * Number of pointers in parameter
-	 */
-	private int pointerCount;
-
-	/**
-	 * The location of this parameter in source
-	 */
-	private SourceLocation location;
-
-	/**
-	 * Gets the parameter type
-	 * 
-	 * @return the type
-	 */
-	public String getType() {
-		return type;
-	}
-
-	/**
-	 * Gets the parameter name or null if parameter does not have a name
-	 * 
-	 * @return the name
-	 */
-	public String getName() {
-		return name;
-	}
-
-	/**
-	 * Checks if parameter is pointer (*) or pointer reference (*&)
-	 * 
-	 * @return true if pointer, false if not
-	 */
-	public boolean isPointer() {
-		return pointerCount > 0;
-	}
-
-	/**
-	 * Gets the number of pointers
-	 * 
-	 * @return the number of pointers
-	 */
-	public int getPointerCount() {
-		return pointerCount;
-	}
-
-	/**
-	 * Checks if a parameter is referece (&) or pointer reference (*&)
-	 * 
-	 * @return true if reference, false if not
-	 */
-	public boolean isReference() {
-		return isReference;
-	}
-
-	/**
-	 * Checks if paraemter is pointer (*), but not pointer reference (*&). Equal
-	 * to isPointer() && !isReference()
-	 * 
-	 * @return true if pointer, but not reference
-	 */
-	public boolean isPlainPointer() {
-		return pointerCount > 0 && !isReference;
-	}
-
-	/**
-	 * Checks if parameter is reference (&), but not pointer reference (*&).
-	 * Equal to !isPointer() && isReference()
-	 * 
-	 * @return true if reference to value
-	 */
-	public boolean isPlainReference() {
-		return pointerCount == 0 && isReference;
-	}
-
-	/**
-	 * Checks if parameter is a reference to a pointer (*&). Equal to
-	 * isPointer() && isReference()
-	 * 
-	 * @return true if reference to a pointer
-	 */
-	public boolean isPointerReference() {
-		return pointerCount > 0 && isReference;
-	}
-
-	/**
-	 * Checks if parameter is pointer (*) or reference (&). Equal to isPointer() ||
-	 * isReference()
-	 * 
-	 * @return true if pointer or reference
-	 */
-	public boolean isPointerOrReference() {
-		return pointerCount > 0 || isReference;
-	}
-
-	/**
-	 * Checks if parameter type equals given type
-	 * 
-	 * @param type
-	 *            the type to be checked
-	 * @return true if types match
-	 */
-	public boolean typeEquals(String type) {
-		return this.type != null && type != null && this.type.equals(type);
-	}
-
-	/**
-	 * Returns the source reference of this parameter
-	 * 
-	 * @return the source reference
-	 */
-	public SourceLocation getSourceLocation() {
-		return location;
-	}
-
-	/**
-	 * Sets the parameter type
-	 * 
-	 * @param type
-	 *            the new type
-	 */
-	void setType(String type) {
-		this.type = type;
-	}
-
-	/**
-	 * Sets the parameter name
-	 * 
-	 * @param name
-	 *            the new name
-	 */
-	void setName(String name) {
-		this.name = name;
-	}
-
-	/**
-	 * Sets the reference flag
-	 */
-	void setReference() {
-		isReference = true;
-	}
-
-	/**
-	 * Increments the pointer count
-	 */
-	void addPointer() {
-		pointerCount++;
-	}
-
-	/**
-	 * Adds a qualifier to this parameter
-	 * 
-	 * @param type
-	 *            the qualifier type
-	 */
-	void addQualifier(String type) {
-		if (qualifiers == null) {
-			qualifiers = new ArrayList<String>();
-		}
-		qualifiers.add(type);
-	}
-
-	/**
-	 * Sets the source location of this parameter
-	 * 
-	 * @param location
-	 *            the location
-	 */
-	void setSourceLocation(SourceLocation location) {
-		this.location = location;
-	}
-
-	/**
-	 * Checks if a qualifier exists
-	 * 
-	 * @param qualifier
-	 *            the qualifier to be checked
-	 * @return true if it exists
-	 */
-	public boolean hasQualifier(String qualifier) {
-		boolean retval;
-		if (qualifiers != null) {
-			retval = qualifiers.contains(qualifier);
-		} else {
-			retval = false;
-		}
-		return retval;
-	}
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/SourceParameterTokenizer.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,440 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Parameter tokenizer is used to parse function parameters lists
-*
-*/
-package com.nokia.tracecompiler.source;
-
-import java.util.List;
-
-/**
- * Parameter tokenizer is used to parse function parameters lists
- * 
- */
-public class SourceParameterTokenizer {
-
-	/**
-	 * The source parser
-	 */
-	private SourceParser parser;
-
-	/**
-	 * The offset where to start the tokenizer
-	 */
-	private int offset;
-
-	/**
-	 * Slip next whitespace
-	 */
-	private boolean skipNextWhiteSpace;
-
-	/**
-	 * Constructor
-	 * 
-	 * @param parser
-	 *            the source parser
-	 * @param offset
-	 *            offset to the start of parameter
-	 */
-	public SourceParameterTokenizer(SourceParser parser, int offset) {
-		this.parser = parser;
-		this.offset = offset;
-	}
-
-	/**
-	 * Parses a list of parameters (a, b, c) and stores the values into the
-	 * given list.
-	 * 
-	 * @param list
-	 *            the list of parameters
-	 * @param findSeparator
-	 *            if true, the processing stops after ';' or '{' character. If
-	 *            false, processing stops after ')' at end of parameters
-	 * @return index at end of parameters
-	 * @throws SourceParserException
-	 *             if processing fails
-	 */
-	public int tokenize(List<String> list, boolean findSeparator)
-			throws SourceParserException {
-		TokenizerSearchData data = new TokenizerSearchData();
-		data.itr = parser.createIterator(offset, SourceParser.SKIP_WHITE_SPACES
-				| SourceParser.SKIP_COMMENTS);
-		boolean bracketsOpened = false;
-		boolean finished = false;
-		while (data.itr.hasNext() && !finished) {
-			data.value = data.itr.next();
-			if (!data.inQuotes && data.value == '\"') {
-				data.inQuotes = true;
-				data.hasData = true;
-			} else if (data.inQuotes) {
-				processInQuotesChar(data);
-			} else if (data.complete) {
-				processEndOfParametersChar(data);
-			} else if (data.value == '(') {
-				bracketsOpened = true;
-				processOpeningBracket(data);
-			} else if (data.value == ',' || data.value == ')') {
-				processCommaOrClosingBracket(list, data);
-			} else if (data.value == ';' && data.openBracketCount != 0 || data.value == '{'
-					|| data.value == '}' ) {
-				throw new SourceParserException(
-						SourceErrorCodes.UNEXPECTED_PARAMETER_SEPARATOR);
-			} else {
-				// Raises a flag that there is some data. processOpeningBracket
-				// no longer interprets the next bracket as opening bracket
-				if (data.openBracketCount > 0) {
-					data.hasData = true;
-				}
-			}
-			finished = ((data.complete && !findSeparator) || (data.endFound && findSeparator));
-			if (bracketsOpened && data.openBracketCount == 0) {
-				data.complete = true;
-				break;
-			}
-		}
-		if (!data.complete) {
-			throw new SourceParserException(
-					SourceErrorCodes.UNEXPECTED_END_OF_FILE);
-		}
-		if (data.openBracketCount != 0) {
-			throw new SourceParserException(SourceErrorCodes.BRACKET_MISMATCH);
-		}
-		
-		
-		return data.itr.currentIndex() + 1;
-	}
-
-	/**
-	 * Parses list of parameters with types (int a, int b, int c) and stores the
-	 * values into the given list.
-	 * 
-	 * @param list
-	 *            the list of parameters
-	 * @return index at end of parameters
-	 * @throws SourceParserException
-	 *             if processing fails
-	 */
-	public int tokenizeTyped(List<SourceParameter> list) 
-			throws SourceParserException {
-		TokenizerSearchData data = new TokenizerSearchData();
-
-		try {
-			data.itr = parser
-					.createIterator(offset, SourceParser.SKIP_WHITE_SPACES
-							| SourceParser.SKIP_COMMENTS);
-			data.sourceParameter = new SourceParameter();
-			while (data.itr.hasNext() && !data.complete) {
-				data.value = data.itr.next();
-
-				// Check if there was array start or end character and then
-				// space. It would mean that the parameter continues and more
-				// should be parsed.
-				if (skipNextWhiteSpace) {
-					skipNextWhiteSpace = false;
-					if (data.itr.hasSkipped()) {
-						data.value = data.itr.next();
-					}
-				}
-
-				if (data.value == '\"') {
-					throw new SourceParserException(
-							SourceErrorCodes.UNEXPECTED_QUOTE_CHARACTER);
-				} else if (data.value == '(') {
-					processOpeningBracket(data);
-				} else if (data.value == ',' || data.value == ')') {
-					processCommaOrClosingBracket(list, data);
-				} else if (data.value == ';' || data.value == '{'
-						|| data.value == '}') {
-					data.complete = true;
-					// Array start or end character.
-				} else if (data.value == '<' || data.value == '>') {
-					skipNextWhiteSpace = true;
-				} else if (data.itr.hasSkipped() && data.openBracketCount > 0) {
-					processNameValueSeparator(data);
-				}
-			}
-			if (!data.complete) {
-				throw new SourceParserException(
-						SourceErrorCodes.UNEXPECTED_END_OF_FILE);
-			}
-		} catch (SourceParserException e) {
-			// Resets all source locations if parser fails
-			for (int i = 0; i < list.size(); i++) {
-				list.get(i).getSourceLocation().dereference();
-			}
-			throw e;
-		}
-		return data.itr.currentIndex() + 1;
-	}
-
-	/**
-	 * Processes a separator character and updates the current SourceParameter
-	 * object in the search data
-	 * 
-	 * @param data
-	 *            the search data
-	 * @throws SourceParserException
-	 *             if processing fails
-	 */
-	private void processNameValueSeparator(TokenizerSearchData data)
-			throws SourceParserException {
-		// If the parameter is empty, the previous index will point
-		// to index preceeding tagStartIndex
-		int previous = data.itr.previousIndex();
-		if (previous >= data.tagStartIndex) {
-			int endIndex = previous + 1;
-			if (data.sourceParameter.getType() == null) {
-				processNameValueSeparatorNoType(data, endIndex);
-			} else if (data.sourceParameter.getName() == null) {
-				processNameValueSeparatorNoName(data, endIndex);
-			}
-			data.tagStartIndex = data.itr.currentIndex();
-		}
-	}
-
-	/**
-	 * Processes a name-value separator when there is no name
-	 * 
-	 * @param data
-	 *            the search data
-	 * @param endIndex
-	 *            the end index of the parameters
-	 * @throws SourceParserException
-	 *             if processing fails
-	 */
-	private void processNameValueSeparatorNoName(TokenizerSearchData data,
-			int endIndex) throws SourceParserException {
-		String name = parser.getSource().get(data.tagStartIndex,
-				endIndex - data.tagStartIndex);
-		boolean startFound = false;
-		int start = 0;
-		int end = name.length();
-		for (int i = 0; i < name.length(); i++) {
-			char c = name.charAt(i);
-			if (c == '&' || c == '*') {
-				if (c == '&') {
-					data.sourceParameter.setReference();
-				} else {
-					data.sourceParameter.addPointer();
-				}
-				if (!startFound) {
-					start++;
-				} else {
-					end--;
-				}
-			} else {
-				startFound = true;
-			}
-		}
-		name = name.substring(start, end);
-		if (name.length() > 0) {
-			if (isParameterTypeQualifier(name)) {
-				// Qualifiers between type and name are ignored
-				// For example TInt const* aValue
-			} else {
-				data.sourceParameter.setName(name);
-			}
-		}
-	}
-
-	/**
-	 * Processes a name-value separator when there is no value
-	 * 
-	 * @param data
-	 *            the search data
-	 * @param endIndex
-	 *            the end index of the parameters
-	 * @throws SourceParserException
-	 *             if processing fails
-	 */
-	private void processNameValueSeparatorNoType(TokenizerSearchData data,
-			int endIndex) throws SourceParserException {
-		String type = parser.getSource().get(data.tagStartIndex,
-				endIndex - data.tagStartIndex);
-		if (isParameterTypeQualifier(type)) {
-			data.sourceParameter.addQualifier(type);
-		} else {
-			for (int i = type.length() - 1; i >= 0; i--) {
-				if (type.charAt(i) == '&') {
-					data.sourceParameter.setReference();
-					if (i == 0) {
-						type = ""; //$NON-NLS-1$
-					}
-				} else if (type.charAt(i) == '*') {
-					data.sourceParameter.addPointer();
-					if (i == 0) {
-						type = ""; //$NON-NLS-1$
-					}
-				} else {
-					if (i != type.length() - 1) {
-						type = type.substring(0, i + 1);
-					}
-					i = -1;
-				}
-			}
-			if (type.length() > 0) {
-				// Remove spaces
-				type = type.replace(" ", ""); //$NON-NLS-1$ //$NON-NLS-2$
-				data.sourceParameter.setType(type);
-			}
-		}
-	}
-
-	/**
-	 * Checks if parameter type if a qualifier or not
-	 * 
-	 * @param type
-	 *            the type to be checked
-	 * @return true if qualifier, false if not
-	 */
-	private boolean isParameterTypeQualifier(String type) {
-		boolean retval = false;
-		for (String element : SourceConstants.PARAMETER_QUALIFIERS) {
-			if (type.equals(element)) {
-				retval = true;
-			}
-		}
-		return retval;
-	}
-
-	/**
-	 * Processes a parameter separator or closing bracket
-	 * 
-	 * @param list
-	 *            the list of existing parameters
-	 * @param data
-	 *            the search data
-	 * @throws SourceParserException
-	 *             if invalid character is encountered
-	 */
-	@SuppressWarnings("unchecked")
-	private void processCommaOrClosingBracket(List list,
-			TokenizerSearchData data) throws SourceParserException {
-		// This method is called from both tokenize functions. One uses
-		// List<String> and other List<SourceParameter>
-		// Thus this uses List and @SuppressWarnings
-		if (data.value == ')') {
-			data.openBracketCount--;
-		}
-		
-		if (data.value == ',') {
-			//we may have the case of OstTraceDef1( OST_TRACE_CATEGORY_ALL, TRACE_FATAL, TEST_OstTraceDef1, "EOstTraceDef1 - %u" , f(a,b));
-			//when processing the comma in f(a,b) that should not count as parameter separator
-			if (data.openBracketCount >1 ) {
-				return;
-			}
-		}
-		
-		if (data.value == ',' || data.openBracketCount == 0) {
-			//we have another parameter
-			if (data.sourceParameter != null) {
-				// If processing typed parameter list, the name and type are
-				// stored into a SourceParameter object, which is then added
-				// to list
-				processNameValueSeparator(data);
-				if (data.sourceParameter.getType() != null) {
-					SourceLocation location = new SourceLocation(parser,
-							data.paramStartIndex, data.itr.currentIndex()
-									- data.paramStartIndex);
-					data.sourceParameter.setSourceLocation(location);
-					list.add(data.sourceParameter);
-					data.sourceParameter = new SourceParameter();
-				}
-			} else {
-				// In this case the list contains strings.
-				int previous = data.itr.previousIndex();
-				String tracepoint = ""; //$NON-NLS-1$
-				if (previous >= data.tagStartIndex) {
-					int endIndex = data.itr.previousIndex() + 1;
-					tracepoint = parser.getSource().get(data.tagStartIndex,
-							endIndex - data.tagStartIndex);
-					list.add(tracepoint);
-				} else {
-					list.add(tracepoint);
-				}	
-			}
-			
-			// In case like below we have parsed all parameters and data is completed if next character after ')' is ':' 
-			// and open bracket count is 0:
-			// 		CNpeSendData::CNpeSendData(RMeDriver* aDriver, TUint16 aMaxMsgLength): CActive(EPriorityStandard),
-			//				iDriver(aDriver),
-			//				iMaxMsgLength(aMaxMsgLength)
-			if (data.itr.hasNext()){
-				char nextChar = data.itr.peek();
-				
-				if (data.value == ')' &&  nextChar == ':' && data.openBracketCount == 0) {
-					data.complete = true;
-				}
-			}
-			
-			if (data.value == ',') {
-				data.tagStartIndex = data.itr.nextIndex();
-				data.paramStartIndex = data.tagStartIndex;
-			}
-		}
-	}
-
-	/**
-	 * Processes an opening bracket
-	 * 
-	 * @param data
-	 *            the search data
-	 */
-	private void processOpeningBracket(TokenizerSearchData data) {
-		data.openBracketCount++;
-		if (!data.hasData && data.openBracketCount == 1 ) {
-			// The number of initial '(' characters is stored. The
-			// parameters are assumed to end when the corresponding ')'
-			// character is encountered
-			data.tagStartIndex = data.itr.nextIndex();
-			data.paramStartIndex = data.tagStartIndex;
-			data.initialBracketCount = data.openBracketCount;
-		}
-	}
-
-	/**
-	 * Process a character when in quotes
-	 * 
-	 * @param data
-	 *            the search data
-	 */
-	private void processInQuotesChar(TokenizerSearchData data) {
-		if (data.value == '\"' && data.previousValue != '\\') {
-			data.inQuotes = false;
-		}
-		data.previousValue = data.value;
-	}
-
-	/**
-	 * Processes a character found after the closing bracket
-	 * 
-	 * @param data
-	 *            the data
-	 * @throws SourceParserException
-	 *             if invalid characters are found
-	 */
-	private void processEndOfParametersChar(TokenizerSearchData data)
-			throws SourceParserException {
-		if (data.value == ';' || data.value == '{') {
-			data.endFound = true;
-		} else if (data.value == ')') {
-			data.openBracketCount--;
-		} else if (!Character.isWhitespace(data.value)) {
-			throw new SourceParserException(SourceErrorCodes.BRACKET_MISMATCH);
-		}
-	}
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/SourceParser.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,485 +0,0 @@
-/*
-* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Parser for C++ source files
-*
-*/
-package com.nokia.tracecompiler.source;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * Parser for C++ source files. Commented and quoted areas are located during
- * the construction of this object and those areas are excluded from the
- * searches.
- * 
- */
-public class SourceParser {
-
-	/**
-	 * Skip white spaces. Does not apply to string searches
-	 */
-	public final static int SKIP_WHITE_SPACES = 0x01; // CodForChk_Dis_Magic
-
-	/**
-	 * Skip string areas
-	 */
-	public final static int SKIP_STRINGS = 0x02; // CodForChk_Dis_Magic
-
-	/**
-	 * Search / iterate backwards
-	 */
-	public final static int BACKWARD_SEARCH = 0x04; // CodForChk_Dis_Magic
-
-	/**
-	 * Ignore character case in string searches
-	 */
-	public final static int IGNORE_CASE = 0x08; // CodForChk_Dis_Magic
-
-	/**
-	 * Skip commented areas
-	 */
-	public final static int SKIP_COMMENTS = 0x10; // CodForChk_Dis_Magic
-
-	/**
-	 * Skip preprocessor definitions
-	 */
-	public final static int SKIP_PREPROCESSOR = 0x80; // CodForChk_Dis_Magic
-
-	/**
-	 * Match beginning of word flag
-	 */
-	public final static int MATCH_WORD_BEGINNING = 0x20; // CodForChk_Dis_Magic
-
-	/**
-	 * Match end of word flag
-	 */
-	public final static int MATCH_WORD_END = 0x40; // CodForChk_Dis_Magic
-
-	/**
-	 * Match whole word flag
-	 */
-	public final static int MATCH_WHOLE_WORD = MATCH_WORD_BEGINNING
-			| MATCH_WORD_END;
-
-	/**
-	 * Ignore all special areas during search
-	 */
-	public final static int SKIP_ALL = SKIP_WHITE_SPACES | SKIP_STRINGS
-			| SKIP_COMMENTS | SKIP_PREPROCESSOR;
-
-	/**
-	 * Data to be searched.
-	 */
-	private SourceDocumentInterface source;
-
-	/**
-	 * List of source locations
-	 */
-	private ArrayList<SourceLocation> locations;
-
-	/**
-	 * Document factory for creating locations
-	 */
-	private SourceDocumentFactory documentFactory;
-
-	/**
-	 * Excluded area parser
-	 */
-	private ExcludedAreaParser excludedAreaParser;
-
-	/**
-	 * Context area parser
-	 */
-	private ContextAreaParser contextAreaParser;
-
-	/**
-	 * Function return value parser
-	 */
-	private FunctionReturnValueParser returnValueParser;
-
-	/**
-	 * Creates a new parser for given data
-	 * 
-	 * @param factory
-	 *            the document factory
-	 * @param sourceData
-	 *            the source data
-	 */
-	public SourceParser(SourceDocumentFactory factory, String sourceData) {
-		this(factory, factory.createDocument(sourceData));
-	}
-
-	/**
-	 * Creates a source parser from source document
-	 * 
-	 * @param factory
-	 *            the document factory
-	 * @param source
-	 *            the source document
-	 */
-	public SourceParser(SourceDocumentFactory factory,
-			SourceDocumentInterface source) {
-		this.documentFactory = factory;
-		this.source = source;
-		excludedAreaParser = new ExcludedAreaParser(this);
-		contextAreaParser = new ContextAreaParser(this);
-		returnValueParser = new FunctionReturnValueParser(this);
-		try {
-			findExcludedAreas();
-		} catch (SourceParserException e) {
-		}
-	}
-
-	/**
-	 * Gets the source document
-	 * 
-	 * @return the source
-	 */
-	public SourceDocumentInterface getSource() {
-		return source;
-	}
-
-	/**
-	 * Gets part of the source document data
-	 * 
-	 * @param start
-	 *            the start offset
-	 * @param length
-	 *            the data length
-	 * @return the data or null if offsets are not valid
-	 */
-	public String getData(int start, int length) {
-		String retval;
-		try {
-			retval = source.get(start, length);
-		} catch (SourceParserException e) {
-			retval = null;
-		}
-		return retval;
-	}
-
-	/**
-	 * Gets a character at given offset
-	 * 
-	 * @param offset
-	 *            the offset
-	 * @return the character
-	 */
-	public char getData(int offset) {
-		char retval;
-		try {
-			retval = source.getChar(offset);
-		} catch (SourceParserException e) {
-			retval = '\0';
-		}
-		return retval;
-	}
-
-	/**
-	 * Gets the source document length
-	 * 
-	 * @return the source length
-	 */
-	public int getDataLength() {
-		return source.getLength();
-	}
-
-	/**
-	 * Gets the line number of given offset
-	 * 
-	 * @param offset
-	 *            the offset
-	 * @return the line number or -1 if offset is not valid
-	 */
-	public int getLineNumber(int offset) {
-		int retval;
-		try {
-			retval = source.getLineOfOffset(offset) + 1;
-		} catch (SourceParserException e) {
-			retval = -1;
-		}
-		return retval;
-	}
-
-	/**
-	 * Starts a new string search from given offset
-	 * 
-	 * @param searchString
-	 *            the string to be searched
-	 * @param startOffset
-	 *            the offset to start of search
-	 * @param endOffset
-	 *            the end of search or -1 to search the whole document
-	 * @param searchFlags
-	 *            the search flags
-	 * @return the search object
-	 */
-	public SourceStringSearch startStringSearch(String searchString,
-			int startOffset, int endOffset, int searchFlags) {
-		return new SourceStringSearch(this, searchString, startOffset,
-				endOffset, searchFlags);
-	}
-
-	/**
-	 * Tokenizes the parameter list starting from next bracket. White spaces are
-	 * discarded. For example (a, b , c ) returns { "a", "b", "c" }. This method
-	 * is independent of the current string search and thus can be used during
-	 * one.
-	 * 
-	 * @param startIndex
-	 *            the index where to start
-	 * @param list
-	 *            the list where the parameters are added
-	 * @param findSeparator
-	 *            if true, the processing stops after ';' or '{' character. If
-	 *            false, processing stops after ')' at end of parameters
-	 * @return the offset at end of the parameters
-	 * @throws SourceParserException
-	 *             if parameters are not valid
-	 */
-	public int tokenizeParameters(int startIndex, List<String> list,
-			boolean findSeparator) throws SourceParserException {
-		SourceParameterTokenizer tokenizer = new SourceParameterTokenizer(this,
-				startIndex);
-		return tokenizer.tokenize(list, findSeparator);
-	}
-
-	/**
-	 * Parses the parameter list of given source context. Each entry added into
-	 * the list will be an instance of SourceParameter class. This method is
-	 * independent of the current string search and thus can be used during one.
-	 * 
-	 * @param parameterIndex
-	 *            the index where to start
-	 * @param list
-	 *            the list where the parameters are added
-	 * @return the offset at end of the parameters
-	 * @throws SourceParserException
-	 *             if context is not valid
-	 */
-	public int parseFunctionParameters(int parameterIndex, List<SourceParameter> list)
-			throws SourceParserException {
-		SourceParameterTokenizer tokenizer = new SourceParameterTokenizer(this,
-				parameterIndex);
-		return tokenizer.tokenizeTyped(list);
-	}
-
-	/**
-	 * Parses the return values of given source context
-	 * 
-	 * @param context
-	 *            the context to be parsed
-	 * @param list
-	 *            the list of return values
-	 */
-	void parseReturnValues(SourceContext context, List<SourceReturn> list) {
-		returnValueParser.parseReturnValues(context, list);
-	}
-
-	/**
-	 * Checks if the offset if within an excluded area
-	 * 
-	 * @param offset
-	 *            the offset
-	 * @return true if in excluded area
-	 */
-	public boolean isInExcludedArea(int offset) {
-		return findExcludedAreaIndex(offset) >= 0;
-	}
-
-	/**
-	 * Gets an excluded area
-	 * 
-	 * @param offset
-	 *            the data offset
-	 * @return the area or null
-	 */
-	public SourceExcludedArea getExcludedArea(int offset) {
-		return excludedAreaParser.getArea(offset);
-	}
-
-	/**
-	 * Creates a new source iterator
-	 * 
-	 * @param offset
-	 *            the offset where to start
-	 * @param iteratorFlags
-	 *            the flags for the iterator
-	 * @return the new iterator
-	 */
-	public SourceIterator createIterator(int offset, int iteratorFlags) {
-		return new SourceIterator(this, offset, iteratorFlags);
-	}
-
-	/**
-	 * Returns the context at given offset. This parses the source if it has not
-	 * been parsed before.
-	 * 
-	 * @param offset
-	 *            the offset to the source data
-	 * @return the context at the offset or null if no context exists
-	 */
-	public SourceContext getContext(int offset) {
-		SourceContext retval;
-		try {
-			retval = contextAreaParser.parseAndGet(offset);
-		} catch (SourceParserException e) {
-			retval = null;
-		}
-		return retval;
-	}
-
-	/**
-	 * Locates the start-of-line starting from given offset
-	 * 
-	 * @param offset
-	 *            the offset
-	 * @param cancelIfNotWhitespace
-	 *            flag that tells to stop processing and return the original
-	 *            value if a non-whitespace is found before start of line
-	 * @param stayInContext
-	 *            flag that tells to stay within the context offset currently
-	 *            resides. If this would come out of the context, this locates
-	 *            the start of the next line following offset
-	 * @return the start-of-line
-	 * @throws SourceParserException
-	 *             if the offset is not valid
-	 */
-	public int findStartOfLine(int offset, boolean cancelIfNotWhitespace,
-			boolean stayInContext) throws SourceParserException {
-		int retval = offset == 0 ? offset : offset - 1;
-		for (int i = retval; i >= 0; i--) {
-			char c = source.getChar(i);
-			if (source.getChar(i) == '\n') {
-				retval = i + 1;
-				i = -1;
-			} else if (cancelIfNotWhitespace && !Character.isWhitespace(c)) {
-				retval = offset;
-				i = -1;
-			}
-		}
-		if (stayInContext) {
-			SourceContext context = getContext(offset);
-			if (context != null && retval < context.getOffset()) {
-				retval = context.getOffset();
-				int end = context.getOffset() + context.getLength();
-				for (int i = retval; i < end; i++) {
-					if (source.getChar(i) == '\n') {
-						retval = i + 1;
-						i = end;
-					}
-				}
-			}
-		}
-		return retval;
-	}
-
-	/**
-	 * Finds the array index of the excluded area which contains the offset. If
-	 * none of the areas contain the offset, returns negative integer indicating
-	 * the index of the excluded area following the offset
-	 * 
-	 * @param offset
-	 *            the offset to the data
-	 * @return the excluded area index
-	 */
-	int findExcludedAreaIndex(int offset) {
-		return excludedAreaParser.find(offset);
-	}
-
-	/**
-	 * Finds the excluded source file areas. Excluded areas include comments and
-	 * quoted strings. Overwrites possible old areas.
-	 * 
-	 * @throws SourceParserException
-	 *             if parser fails
-	 */
-	public void findExcludedAreas() throws SourceParserException {
-		excludedAreaParser.parseAll();
-	}
-
-	/**
-	 * Gets the list of excluded areas
-	 * 
-	 * @return the list
-	 */
-	public List<SourceExcludedArea> getExcludedAreas() {
-		return excludedAreaParser.getAreas();
-	}
-
-	/**
-	 * Checks if the area is excluded with given flags
-	 * 
-	 * @param type
-	 *            the area type
-	 * @param flags
-	 *            the flags
-	 * @return true if skipped
-	 */
-	static boolean isExcluded(int type, int flags) {
-		boolean string = ((flags & SKIP_STRINGS) != 0)
-				&& (type == SourceExcludedArea.STRING);
-		boolean comment = ((flags & SKIP_COMMENTS) != 0)
-				&& (type == SourceExcludedArea.MULTILINE_COMMENT);
-		boolean linecomment = ((flags & SKIP_COMMENTS) != 0)
-				&& (type == SourceExcludedArea.LINE_COMMENT);
-		boolean preProcessor = ((flags & SKIP_PREPROCESSOR) != 0)
-				&& (type == SourceExcludedArea.PREPROCESSOR_DEFINITION);
-		return string || comment || linecomment || preProcessor;
-	}
-
-	/**
-	 * Adds a location to this parser
-	 * 
-	 * @param location
-	 *            the location
-	 */
-	void addLocation(SourceLocation location) {
-		if (locations == null) {
-			locations = new ArrayList<SourceLocation>();
-		}
-		locations.add(location);
-		if (source != null) {
-			source.addLocation(location.getLocation());
-		}
-	}
-
-	/**
-	 * Removes a location from this parser
-	 * 
-	 * @param location
-	 *            the location to be removed
-	 */
-	void removeLocation(SourceLocation location) {
-		if (locations != null) {
-			locations.remove(location);
-		}
-		if (source != null) {
-			source.removeLocation(location.getLocation());
-		}
-	}
-
-	/**
-	 * Gets the document framework
-	 * 
-	 * @return the document framework
-	 */
-	public SourceDocumentFactory getDocumentFramework() {
-		return documentFactory;
-	}
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/SourceParserException.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,57 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Exceptions thrown by source parser
-*
-*/
-package com.nokia.tracecompiler.source;
-
-/**
- * Exceptions thrown by source parser
- * 
- * @see SourceParser
- */
-public class SourceParserException extends Exception {
-
-	/**
-	 * UID
-	 */
-	private static final long serialVersionUID = -2332983004093789880L; // CodForChk_Dis_Magic
-
-	/**
-	 * Error type
-	 */
-	private int errorType;
-
-	/**
-	 * Constructor with message and source object
-	 * 
-	 * @param errorType
-	 *            the error type
-	 */
-	public SourceParserException(int errorType) {
-		this.errorType = errorType;
-	}
-
-	/**
-	 * Gets the error type
-	 * 
-	 * @return the type
-	 */
-	public int getErrorType() {
-		return errorType;
-	}
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/SourcePropertyProvider.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Property provider for SourceLocation objects
-*
-*/
-package com.nokia.tracecompiler.source;
-
-/**
- * Property provider for SourceLocation objects
- * 
- */
-public interface SourcePropertyProvider {
-
-	/**
-	 * Gets a file name that can be shown in the UI when viewing a
-	 * SourceLocation
-	 * 
-	 * @return the source file name
-	 */
-	public String getFileName();
-
-	/**
-	 * Gets the path to the source file including the ending separator.
-	 * 
-	 * @return the path
-	 */
-	public String getFilePath();
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/SourceReturn.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,102 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Properties of function return statement
-*
-*/
-package com.nokia.tracecompiler.source;
-
-/**
- * Properties of function return statement
- * 
- */
-public class SourceReturn extends SourceLocationBase {
-
-	/**
-	 * Previous character might cause a problem
-	 */
-	private boolean charHazard;
-
-	/**
-	 * The return statement itself might cause a problem
-	 */
-	private boolean tagHazard;
-
-	/**
-	 * Constructor
-	 * 
-	 * @param parser
-	 *            the parser owning this location
-	 * @param offset
-	 *            the offset to the beginning of return statement
-	 * @param length
-	 *            the return statement length
-	 */
-	SourceReturn(SourceParser parser, int offset, int length) {
-		super(parser, offset, length);
-	}
-
-	/**
-	 * Gets the return statement
-	 * 
-	 * @return the statement
-	 */
-	public String getReturnStatement() {
-		String retval = ""; //$NON-NLS-1$
-		if (getParser() != null) {
-			retval = getParser().getData(getOffset(), getLength());
-		}
-		return retval;
-	}
-
-	/**
-	 * Sets a flag which indicates that the character preceeding the return
-	 * statement might cause problems when a trace is added prior to the return
-	 * statement
-	 */
-	void setPreviousCharHazard() {
-		this.charHazard = true;
-	}
-
-	/**
-	 * Gets the flag which indicates if the character preceeding the return
-	 * statement might cause problems when a trace is added prior to the return
-	 * statement
-	 * 
-	 * @return the flag
-	 */
-	public boolean hasPreviousCharHazard() {
-		return charHazard;
-	}
-
-	/**
-	 * Sets a flag which indicates that the return statement might cause
-	 * problems when duplicated to a trace
-	 */
-	void setTagHazard() {
-		tagHazard = true;
-	}
-
-	/**
-	 * Gets the flag which indicates if the return statement might cause
-	 * problems when duplicated to a trace
-	 * 
-	 * @return the flag
-	 */
-	public boolean hasTagHazard() {
-		return tagHazard;
-	}
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/SourceSearch.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,178 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Base class for source search classes
-*
-*/
-package com.nokia.tracecompiler.source;
-
-import java.util.List;
-
-/**
- * Base class for source search classes.
- * 
- */
-public abstract class SourceSearch {
-
-	/**
-	 * Source parser
-	 */
-	protected final SourceParser parser;
-
-	/**
-	 * Current index within data during search
-	 */
-	protected int searchIndex;
-
-	/**
-	 * End index for search
-	 */
-	protected int searchEnd;
-
-	/**
-	 * Index of the next excluded area during search.
-	 */
-	protected int searchExcludedIndex;
-
-	/**
-	 * Search flags
-	 */
-	protected int flags;
-
-	/**
-	 * Creates a new search
-	 * 
-	 * @param parser
-	 *            the parser containing the source
-	 * @param startOffset
-	 *            offset to the start of search
-	 * @param endOffset
-	 *            offset to end of search or -1 for rest of the document
-	 * @param flags
-	 *            search flags
-	 */
-	protected SourceSearch(SourceParser parser, int startOffset, int endOffset,
-			int flags) {
-		this.parser = parser;
-		this.flags = flags;
-		resetSearch(startOffset, endOffset);
-	}
-
-	/**
-	 * Resets the current search with a new offset
-	 * 
-	 * @param startOffset
-	 *            the offset to the start of search
-	 * @param endOffset
-	 *            offset to end of search or -1 for rest of the document
-	 */
-	public void resetSearch(int startOffset, int endOffset) {
-		searchIndex = startOffset;
-		searchEnd = endOffset == -1 ? parser.getDataLength() : endOffset;
-		// Calculates the starting position for the search based on the
-		// offset and excluded areas
-		int excluded = parser.findExcludedAreaIndex(startOffset);
-		if (excluded >= 0) {
-			SourceExcludedArea area = parser.getExcludedAreas().get(excluded);
-			searchIndex = area.getOffset() + area.getLength();
-			if (excluded < parser.getExcludedAreas().size() - 1) {
-				searchExcludedIndex = excluded + 1;
-			} else {
-				searchExcludedIndex = -1;
-			}
-		} else {
-			// If binarySearch returns < 0, startIndex was between some
-			// excluded areas.
-			searchExcludedIndex = -1 - excluded;
-			if (searchExcludedIndex > parser.getExcludedAreas().size()) {
-				searchExcludedIndex = -1;
-			}
-		}
-		skipNonExcludedAreas();
-	}
-
-	/**
-	 * Changes the index to point behind an excluded area if current index is
-	 * within one.
-	 */
-	protected void skipExcludedArea() {
-		// If data index is within an excluded area, it is moved to end of
-		// it and the next excluded area is selected
-		boolean changedExcludedArea;
-		do {
-			// If the excluded area changes, the flag is set and the next
-			// excluded area is also checked. Otherwise the excluded area index
-			// gets left behind if the search index jumps past multiple excluded
-			// areas
-			changedExcludedArea = false;
-			if (searchExcludedIndex >= 0
-					&& searchExcludedIndex < parser.getExcludedAreas().size()) {
-				SourceExcludedArea area = parser.getExcludedAreas().get(
-						searchExcludedIndex);
-				if (area.getOffset() <= searchIndex) {
-					// If the search offset has skipped past an excluded area,
-					// the index is not changed
-					if (area.getOffset() + area.getLength() > searchIndex) {
-						searchIndex = area.getOffset() + area.getLength();
-					}
-					searchExcludedIndex++;
-					skipNonExcludedAreas();
-					changedExcludedArea = true;
-				}
-			}
-		} while (changedExcludedArea);
-	}
-
-	/**
-	 * Skips past excluded areas which are not actually excluded due to flags
-	 */
-	private void skipNonExcludedAreas() {
-		if (searchExcludedIndex >= 0
-				&& searchExcludedIndex < parser.getExcludedAreas().size()) {
-			boolean notExcluded = true;
-			do {
-				// If an excluded area is not excluded due to flags,
-				// the excluded area index is moved past that area
-				SourceExcludedArea area = parser.getExcludedAreas().get(
-						searchExcludedIndex);
-				if (!SourceParser.isExcluded(area.getType(), flags)) {
-					searchExcludedIndex++;
-				} else {
-					notExcluded = false;
-				}
-			} while (notExcluded
-					&& searchExcludedIndex < parser.getExcludedAreas().size());
-		}
-	}
-
-	/**
-	 * Returns the next occurence
-	 * 
-	 * @return the index or -1
-	 */
-	public abstract int findNext();
-
-	/**
-	 * Finds all occurences
-	 * 
-	 * @param list
-	 *            the list where the data is stored
-	 * @throws SourceParserException
-	 *             if search fails
-	 */
-	public abstract void findAll(List<Integer> list)
-			throws SourceParserException;
-
-}
\ No newline at end of file
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/SourceSelector.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Selects an area from a source
-*
-*/
-package com.nokia.tracecompiler.source;
-
-/**
- * Selects an area from a source
- * 
- */
-public interface SourceSelector {
-
-	/**
-	 * Selects an area defined by given offset and length
-	 * 
-	 * @param offset
-	 *            the offset
-	 * @param length
-	 *            the length
-	 */
-	public void setSelection(int offset, int length);
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/SourceStringSearch.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,267 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* String search algorithm
-*
-*/
-package com.nokia.tracecompiler.source;
-
-import java.util.List;
-
-/**
- * String search algorithm
- * 
- */
-public class SourceStringSearch extends SourceSearch {
-
-	/**
-	 * String to be searched from the source.
-	 */
-	private String searchString;
-
-	/**
-	 * Number of different characters in source file alphabet. Assumes that
-	 * 8-bit encoding is used
-	 */
-	private final static int CHARACTER_COUNT = 256; // CodForChk_Dis_Magic
-
-	/**
-	 * Mask for bad character shifts (0xFF)
-	 */
-	private static final int BAD_CHARACTER_MASK = 0xFF; // CodForChk_Dis_Magic
-
-	/**
-	 * String search shifts.
-	 */
-	private int[] badCharacterShifts = new int[CHARACTER_COUNT];
-
-	/**
-	 * User data associated with search
-	 */
-	private Object searchData;
-
-	/**
-	 * Creates a new string search
-	 * 
-	 * @param parser
-	 *            the parser containing the source to be searched
-	 * @param searchString
-	 *            the string to be searched
-	 * @param startOffset
-	 *            offset to the start of search
-	 * @param endOffset
-	 *            offset to end of search or -1 for rest of the document
-	 * @param flags
-	 *            the search flags
-	 */
-	public SourceStringSearch(SourceParser parser, String searchString,
-			int startOffset, int endOffset, int flags) {
-		super(parser, startOffset, endOffset, flags);
-		setSearchString(searchString);
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.source.SourceSearch#findNext()
-	 */
-	@Override
-	public int findNext() {
-		try {
-			SourceDocumentInterface source = parser.getSource();
-			int stringIndex = searchString.length() - 1;
-			boolean found = false;
-			while (!found && searchIndex + stringIndex < searchEnd) {
-				char dataChar;
-				char searchChar;
-				boolean match = false;
-				do {
-					dataChar = source.getChar(searchIndex + stringIndex);
-					searchChar = searchString.charAt(stringIndex);
-					if ((flags & SourceParser.IGNORE_CASE) != 0) {
-						searchChar = Character.toLowerCase(searchChar);
-						dataChar = Character.toLowerCase(dataChar);
-					}
-					if (searchChar == '?' || searchChar == dataChar) {
-						match = true;
-						stringIndex--;
-					} else {
-						match = false;
-					}
-				} while (match && stringIndex >= 0);
-				// If string was not found, resets index and skips according
-				// to the shift table
-				if (stringIndex < 0) {
-					found = true;
-					// Checks the previous character if match beginning is set
-					if ((flags & SourceParser.MATCH_WORD_BEGINNING) != 0) {
-						if ((searchIndex > 0)
-								&& isPartOfWord(source.getChar(searchIndex - 1))) {
-							found = false;
-						}
-					}
-					// Checks the character after data if match end is set
-					if (found && ((flags & SourceParser.MATCH_WORD_END) != 0)) {
-						if (((searchIndex + searchString.length()) < source
-								.getLength())
-								&& isPartOfWord(source.getChar(searchIndex
-										+ searchString.length()))) {
-							found = false;
-						}
-					}
-				}
-				if (!found) {
-					int diff = searchString.length() - 1 - stringIndex;
-					stringIndex = searchString.length() - 1;
-					int skip;
-
-					if (dataChar > badCharacterShifts.length - 1) {
-						skip = 1;
-					} else {
-						skip = badCharacterShifts[dataChar] - diff;
-						if (skip <= 0) {
-							skip = 1;
-						}
-					}
-
-					searchIndex += skip;
-					skipExcludedArea();
-				}
-			}
-			if (!found) {
-				searchIndex = -1;
-			}
-		} catch (SourceParserException e) {
-			searchIndex = -1;
-		}
-		int ret = searchIndex;
-		if (searchIndex != -1) {
-			searchIndex += searchString.length();
-		}
-		return ret;
-	}
-
-	/**
-	 * Checks if the character is part of a word
-	 * 
-	 * @param c
-	 *            the character to be checked
-	 * @return true if part of word
-	 */
-	private boolean isPartOfWord(char c) {
-		return Character.isLetterOrDigit(c) || c == '_';
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.source.SourceSearch#findAll(java.util.List)
-	 */
-	@Override
-	public void findAll(List<Integer> list) throws SourceParserException {
-		resetSearch(0, -1);
-		int index;
-		do {
-			index = findNext();
-			if (index > 0) {
-				list.add(new Integer(index));
-			}
-		} while (index > 0);
-	}
-
-	/**
-	 * Changes the search string
-	 * 
-	 * @param searchString
-	 *            the string to be searched
-	 */
-	public void setSearchString(String searchString) {
-		this.searchString = searchString;
-		int length = searchString.length();
-		// Elements not found in the string get the maximum shift distance
-		for (int i = 0; i < badCharacterShifts.length; i++) {
-			badCharacterShifts[i] = searchString.length();
-		}
-		// Characters of the search string are mapped into the
-		// shift distances array. If a character is found multiple
-		// times, the smallest shitft distance is stored
-		for (int i = 0; i < searchString.length() - 1; i++) {
-			if ((flags & SourceParser.IGNORE_CASE) != 0) {
-				badCharacterShifts[Character
-						.toLowerCase(searchString.charAt(i))
-						& BAD_CHARACTER_MASK] = length - i - 1;
-
-			} else {
-				badCharacterShifts[searchString.charAt(i) & BAD_CHARACTER_MASK] = length
-						- i - 1;
-			}
-		}
-	}
-
-	/**
-	 * Returns the search string
-	 * 
-	 * @return the string
-	 */
-	public String getSearchString() {
-		return searchString;
-	}
-
-	/**
-	 * Checks if the given string matches the search string
-	 * 
-	 * @param string
-	 *            the string
-	 * @return true if they match
-	 */
-	public boolean isSearchStringMatch(String string) {
-		int index = 0;
-		boolean match = true;
-		while (index < string.length() && match) {
-			char dataChar = string.charAt(index);
-			char searchChar = searchString.charAt(index);
-			if ((flags & SourceParser.IGNORE_CASE) != 0) {
-				searchChar = Character.toLowerCase(searchChar);
-				dataChar = Character.toLowerCase(dataChar);
-			}
-			if (searchChar == '?' || searchChar == dataChar) {
-				index++;
-			} else {
-				match = false;
-			}
-		}
-		return match;
-	}
-
-	/**
-	 * Sets the user variable associated with this searcher
-	 * 
-	 * @param data
-	 *            the variable
-	 */
-	public void setSearchData(Object data) {
-		searchData = data;
-	}
-
-	/**
-	 * Gets the user variable associated with this searcher
-	 * 
-	 * @return the variable
-	 */
-	public Object getSearchData() {
-		return searchData;
-	}
-
-}
\ No newline at end of file
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/SourceUtils.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1146 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Static utility functions related to source files
-*
-*/
-package com.nokia.tracecompiler.source;
-
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import com.nokia.tracecompiler.engine.TraceCompilerEngineGlobals;
-import com.nokia.tracecompiler.engine.TraceCompilerEngineErrorCodes.StringErrorParameters;
-import com.nokia.tracecompiler.engine.TraceCompilerEngineErrorCodes.TraceCompilerErrorCode;
-import com.nokia.tracecompiler.model.TraceCompilerException;
-import com.nokia.tracecompiler.model.TraceConstantTable;
-import com.nokia.tracecompiler.model.TraceParameter;
-import com.nokia.tracecompiler.rules.ArrayParameterRule;
-
-/**
- * Static utility functions related to source files
- * 
- */
-public class SourceUtils {
-
-	/**
-	 * Tag for array types
-	 */
-	private static final String ARRAY_TAG = "[]"; //$NON-NLS-1$
-
-	/**
-	 * Start tag for printf format specifier
-	 */
-	private static final String START_TAG = "%"; //$NON-NLS-1$
-
-	/**
-	 * Regular expression optional element tag
-	 */
-	private static final String OPTIONAL_TAG = "?"; //$NON-NLS-1$
-
-	/**
-	 * Optional parameter pattern. Quoted from Wikipedia:
-	 * 
-	 * <strong> Parameter can be omitted or can be: 'n$' Where n is the number
-	 * of the parameter to display using this format specifier, allowing the
-	 * parameters provided to be output multiple times, using varying format
-	 * specifiers or in different orders. This is a POSIX extension and not in
-	 * C99.</strong>
-	 * 
-	 * This has not been implemented -> Currently format specifier count must
-	 * match parameter count
-	 */
-	private final static String PARAMETER_PATTERN = "(\\d+\\$)"; //$NON-NLS-1$
-
-	/**
-	 * Optional flags pattern. Quoted from Wikipedia:
-	 * 
-	 * <strong> Flags can be zero or more (in any order) of:
-	 * <ul>
-	 * <li>'+' : Causes printf to always denote the sign '+' or '-' of a number
-	 * (the default is to omit the sign for positive numbers). Only applicable
-	 * to numeric types.
-	 * <li>'-' : Causes printf to left-align the output of this placeholder (the
-	 * default is to right-align the output).
-	 * <li>'#' : Alternate form. For 'g' and 'G', trailing zeros are not
-	 * removed. For 'f', 'F', 'e', 'E', 'g', 'G', the output always contains a
-	 * decimal point. For 'o', 'x', and 'X', a 0, 0x, and 0X, respectively, is
-	 * prepended to non-zero numbers.
-	 * <li>' ' : Causes printf to left-pad the output with spaces until the
-	 * required length of output is attained. If combined with '0' (see below),
-	 * it will cause the sign to become a space when positive, but the remaining
-	 * characters will be zero-padded
-	 * <li>'0' : Causes printf to use '0' (instead of spaces) to left fill a
-	 * fixed length field. For example (assume i = 3) printf("%2d", i) results
-	 * in " 3", while printf("%02d", i) results in "03"
-	 * </ul>
-	 * </strong>
-	 */
-	private final static String FLAGS_PATTERN = "([-+# 0])"; //$NON-NLS-1$
-
-	/**
-	 * Optional width pattern. Quoted from Wikipedia:
-	 * 
-	 * <strong>Width can be omitted or be any of:
-	 * <ul>
-	 * <li>a number : Causes printf to pad the output of this placeholder with
-	 * spaces until it is at least number characters wide. If number has a
-	 * leading '0', then padding is done with '0' characters.
-	 * <li>'*' : Causes printf to pad the output until it is n characters wide,
-	 * where n is an integer value stored in the a function argument just
-	 * preceding that represented by the modified type. For example
-	 * printf("%*d", 5, 10) will result in "10" being printed with a width of
-	 * 5.</strong>
-	 * </ul>
-	 * </strong>
-	 * 
-	 * '*' has not been implemented -> Currently format specifier count must
-	 * match parameter count
-	 */
-	private final static String WIDTH_PATTERN = "(\\d+|\\*)"; //$NON-NLS-1$
-
-	/**
-	 * Optional precision pattern. Quoted from Wikipedia:
-	 * 
-	 * Precision can be omitted or be any of: <strong>
-	 * <ul>
-	 * <li>a number : For non-integral numeric types, causes the decimal portion
-	 * of the output to be expressed in at least number digits. For the string
-	 * type, causes the output to be truncated at number characters.
-	 * <li>'*' : Same as the above, but uses an integer value in the intaken
-	 * argument to determine the number of decimal places or maximum string
-	 * length. For example, printf("%.*s", 3, "abcdef") will result in "abc"
-	 * being printed.
-	 * </ul>
-	 * </strong> If the precision is zero, nothing is printed for the
-	 * corresponding argument.
-	 * 
-	 * '*' has not been implemented -> Currently format specifier count must
-	 * match parameter count
-	 */
-	private final static String PRECISION_PATTERN = "(\\.(\\d+|\\*))"; //$NON-NLS-1$
-
-	/**
-	 * Optional length pattern. Quoted from Wikipedia:
-	 * 
-	 * Length can be omitted or be any of: <strong>
-	 * <ul>
-	 * <li>'hh' : For integer types, causes printf to expect an int sized
-	 * integer argument which was promoted from a char.
-	 * <li>'h' : For integer types, causes printf to expect a int sized integer
-	 * argument which was promoted from a short.
-	 * <li>'l' : (ell) For integer types, causes printf to expect a long sized
-	 * integer argument.
-	 * <li>'ll' : (ell ell) For integer types, causes printf to expect a long
-	 * long sized integer argument.
-	 * <li>'L' : For floating point types, causes printf to expect a long double
-	 * argument.
-	 * <li>'z' : For integer types, causes printf to expect a size_t sized
-	 * integer argument.
-	 * <li>'j' : For integer types, causes printf to expect a intmax_t sized
-	 * integer argument.
-	 * <li>'t' : For integer types, causes printf to expect a ptrdiff_t sized
-	 * integer argument.
-	 * </ul>
-	 * </strong>
-	 */
-	private final static String LENGTH_PATTERN = "([lh]?[hHlLZjt])"; //$NON-NLS-1$
-
-	/**
-	 * Type pattern. Quoted from Wikipedia:
-	 * 
-	 * <strong> type can be any of:
-	 * <ul>
-	 * <li>'d', 'i' : Print an int as a signed decimal number. '%d' and '%i' are
-	 * synonymous for output, but are different when used with scanf() for
-	 * input.
-	 * <li>'u' : Print decimal unsigned int.
-	 * <li>'f', 'F' : Print a double in normal (fixed-point) notation.
-	 * <li>'e', 'E' : Print a double value in standard form ([-]d.ddd
-	 * e[+/-]ddd).
-	 * <li>'g', 'G' : Print a double in either normal or exponential notation,
-	 * whichever is more appropriate for its magnitude. 'g' uses lower-case
-	 * letters, 'G' uses upper-case letters. This type differs slightly from
-	 * fixed-point notation in that insignificant zeroes to the right of the
-	 * decimal point are not included. Also, the decimal point is not included
-	 * on whole numbers.
-	 * <li>'x', 'X' : Print an unsigned int as a hexadecimal number. 'x' uses
-	 * lower-case letters and 'X' uses upper-case.
-	 * <li>'o' : Print an unsigned int in octal.
-	 * <li>'s' : Print a character string.
-	 * <li>'c' : Print a char (character).
-	 * <li>'p' : Print a void * (pointer to void) in an implementation-defined
-	 * format.
-	 * <li>'n' : Write number of characters successfully written so far into an
-	 * integer pointer parameter.
-	 * <li>'%' : Print a literal '%' character (this type doesn't accept any
-	 * flags, width, precision or length).
-	 * </ul>
-	 * </strong>
-	 * 
-	 * The pattern itself accepts all characters and the validity check is done
-	 * in {@link #mapFormatToParameterType mapFormatToType}
-	 */
-	private final static String TYPE_PATTERN = "([a-zA-Z%])"; //$NON-NLS-1$
-
-	/**
-	 * Regular expression pattern for printf
-	 * 
-	 * %[parameter][flags][width][.precision][length]type
-	 */
-	private static final String STANDARD_PRINTF_PATTERN = PARAMETER_PATTERN
-			+ OPTIONAL_TAG + FLAGS_PATTERN + OPTIONAL_TAG + WIDTH_PATTERN
-			+ OPTIONAL_TAG + PRECISION_PATTERN + OPTIONAL_TAG + LENGTH_PATTERN
-			+ OPTIONAL_TAG + TYPE_PATTERN;
-
-	/**
-	 * Regular expression pattern for Open System Trace printf extensions
-	 * %{Type}, %{Array[]}
-	 */
-	private static final String EXTENSION_PRINTF_PATTERN = "\\{[\\w_]+(\\[\\])?\\}"; //$NON-NLS-1$
-
-	/**
-	 * Regular expression pattern for printf
-	 */
-	public static final String PRINTF_PATTERN = START_TAG + "((" //$NON-NLS-1$
-			+ STANDARD_PRINTF_PATTERN + ")|(" //$NON-NLS-1$
-			+ EXTENSION_PRINTF_PATTERN + "))"; //$NON-NLS-1$
-
-	/**
-	 * The pattern for printf-formatted trace text
-	 */
-	public final static Pattern traceTextPattern = Pattern
-			.compile(PRINTF_PATTERN);
-
-	/**
-	 * The pattern for parameter length in printf specifier
-	 */
-	public final static Pattern lengthPattern = Pattern.compile(LENGTH_PATTERN);
-
-	/**
-	 * Hidden constructor
-	 */
-	private SourceUtils() {
-	}
-
-	/**
-	 * Creates a header guard
-	 * 
-	 * @param fileName
-	 *            the name of the file
-	 * @return the header guard
-	 */
-	public static String createHeaderGuard(String fileName) {
-		StringBuffer sb = new StringBuffer();
-		String uname = fileName.replace(SourceConstants.PERIOD_CHAR,
-				SourceConstants.UNDERSCORE_CHAR).toUpperCase();
-		sb.append(SourceConstants.IFNDEF);
-		sb.append(SourceConstants.SPACE);
-		sb.append(SourceConstants.DOUBLE_UNDERSCORE);
-		sb.append(uname);
-		sb.append(SourceConstants.DOUBLE_UNDERSCORE);
-		sb.append(SourceConstants.LINE_FEED);
-		sb.append(SourceConstants.DEFINE);
-		sb.append(SourceConstants.SPACE);
-		sb.append(SourceConstants.DOUBLE_UNDERSCORE);
-		sb.append(uname);
-		sb.append(SourceConstants.DOUBLE_UNDERSCORE);
-		return sb.toString();
-	}
-
-	/**
-	 * Checks the validity of name
-	 * 
-	 * @param name
-	 *            the name
-	 * @return true if valid
-	 */
-	public static boolean isValidName(String name) {
-		boolean retval;
-		if (name != null && name.length() > 0) {
-			retval = true;
-			if (!isValidNameStartChar(name.charAt(0))) {
-				retval = false;
-			} else {
-				for (int i = 1; i < name.length() && retval; i++) {
-					retval = isValidNameChar(name.charAt(i));
-				}
-			}
-		} else {
-			retval = false;
-		}
-		return retval;
-	}
-
-	/**
-	 * Checks the validity of parameter name
-	 * 
-	 * @param name
-	 *            the name
-	 * @return true if valid
-	 */
-	public static boolean isValidParameterName(String name) {
-		boolean retval;
-		if (name != null && name.length() > 0) {
-			retval = true;
-			if (!isValidNameStartChar(name.charAt(0))) {
-				retval = false;
-			} else {
-				for (int i = 1; i < name.length() && retval; i++) {
-
-					// Check validity of the character
-					char c = name.charAt(i);
-					retval = (isValidNameChar(c) || isValidSpecialChar(c));
-				}
-			}
-		} else {
-			retval = false;
-		}
-		return retval;
-	}
-
-	/**
-	 * Checks special character validity
-	 * 
-	 * @param c
-	 *            character
-	 * @return true if valid
-	 */
-	private static boolean isValidSpecialChar(char c) {
-		boolean retval = false;
-		// Check if the character is allowed
-		if (c == '.' || c == '-' || c == '>' || c == '(' || c == ')'
-				|| c == '[' || c == ']' || c == ' ' || c == '&' || c == '*') {
-			retval = true;
-		}
-		return retval;
-	}
-
-	/**
-	 * Checks start-of-name character validity
-	 * 
-	 * @param c
-	 *            character
-	 * @return true if valid
-	 */
-	private static boolean isValidNameStartChar(char c) {
-		// Ascii characters and underscore are allowed
-		return (c >= 0x41 && c <= 0x5A) || (c >= 0x61 && c <= 0x7A) // CodForChk_Dis_Magic
-				|| c == 0x5F; // CodForChk_Dis_Magic
-	}
-
-	/**
-	 * Checks name character validity
-	 * 
-	 * @param c
-	 *            character
-	 * @return true if valid
-	 */
-	private static boolean isValidNameChar(char c) {
-		// Numbers are allowed in addition to start characters
-		return isValidNameStartChar(c) || (c >= 0x30 && c <= 0x39); // CodForChk_Dis_Magic
-	}
-
-	/**
-	 * Maps a Symbian type to one of the TraceParameter types
-	 * 
-	 * @param parsedType
-	 *            the type parsed from source
-	 * @return the parameter type
-	 */
-	public static TypeMapping mapSymbianTypeToParameterType(
-			ParsedType parsedType) {
-		String type = null;
-		// The type map contains Symbian types
-		for (int i = 0; i < SymbianConstants.PARAMETER_TYPE_MAP.length
-				&& type == null; i++) {
-			if (parsedType
-					.typeEquals(SymbianConstants.PARAMETER_TYPE_MAP[i][0])) {
-				type = SymbianConstants.PARAMETER_TYPE_MAP[i][1];
-			}
-		}
-		if (type != null) {
-			if (parsedType.hasQualifier(SourceConstants.UNSIGNED)) {
-				type = convertToUnsigned(type);
-			}
-		}
-		TypeMapping retval = new TypeMapping(type);
-		if (type != null) {
-			// Value or a reference can be added to source as is
-			// Points needs to be cast to HEX32
-			if (parsedType.isPointer()) {
-				retval.type = TraceParameter.HEX32;
-				retval.needsCasting = true;
-			} else {
-				// TUint32 needs to be cast to TUint and TInt32 to TInt.
-				// Otherwise there will be some problems with extension
-				// headers
-				if (parsedType.typeEquals(SymbianConstants.TUINT32)
-						|| parsedType.typeEquals(SymbianConstants.TINT32)) {
-					retval.needsCasting = true;
-				}
-			}
-		} else if (parsedType.isPointer()) {
-			// Unrecognized pointer types are cast to Hex32
-			retval.type = TraceParameter.HEX32;
-			retval.needsCasting = true;
-		} else {
-			// Unrecognized value types are passed as pointer and cast to Hex32
-			retval.type = TraceParameter.HEX32;
-			retval.valueToPointer = true;
-			retval.needsCasting = true;
-		}
-		return retval;
-	}
-
-	/**
-	 * Maps the type of a parameter to a Symbian type
-	 * 
-	 * @param parameter
-	 *            the parameter
-	 * @return the parameter type as string
-	 */
-	public static String mapParameterTypeToSymbianType(TraceParameter parameter) {
-		String retval;
-		ArrayParameterRule rule = parameter
-				.getExtension(ArrayParameterRule.class);
-		String type = parameter.getType();
-		TraceConstantTable table = parameter.getModel()
-				.findConstantTableByName(type);
-		if (table != null) {
-			type = table.getType();
-		}
-		if (rule != null) {
-			retval = mapArrayTypeToSymbianType(type);
-		} else {
-			retval = mapBasicTypeToSymbianType(type);
-		}
-		return retval;
-	}
-
-	/**
-	 * Maps a basic parameter type to Symbian type
-	 * 
-	 * @param type
-	 *            the parameter type
-	 * @return the Symbian type
-	 */
-	public static String mapBasicTypeToSymbianType(String type) {
-		String retval;
-		// Unsigned and hex both use TUint types
-		// Signed uses TInt types
-		if (type.equals(TraceParameter.POINTER)) {
-			retval = SymbianConstants.CONST_TANY_PTR;
-		} else if (type.equals(TraceParameter.SDEC32)) {
-			retval = SymbianConstants.TINT;
-		} else if (type.equals(TraceParameter.UDEC32)
-				|| type.equals(TraceParameter.OCT32)
-				|| type.equals(TraceParameter.HEX32)) {
-			retval = SymbianConstants.TUINT;
-		} else if (type.equals(TraceParameter.SDEC16)) {
-			retval = SymbianConstants.TINT16;
-		} else if (type.equals(TraceParameter.UDEC16)
-				|| type.equals(TraceParameter.OCT16)
-				|| type.equals(TraceParameter.HEX16)) {
-			retval = SymbianConstants.TUINT16;
-		} else if (type.equals(TraceParameter.SDEC8)) {
-			retval = SymbianConstants.TINT8;
-		} else if (type.equals(TraceParameter.UDEC8)
-				|| type.equals(TraceParameter.OCT8)
-				|| type.equals(TraceParameter.HEX8)) {
-			retval = SymbianConstants.TUINT8;
-		} else if (type.equals(TraceParameter.SDEC64)
-				|| type.equals(TraceParameter.TIME)) {
-			retval = SymbianConstants.TINT64;
-		} else if (type.equals(TraceParameter.UDEC64)
-				|| type.equals(TraceParameter.OCT64)
-				|| type.equals(TraceParameter.HEX64)) {
-			retval = SymbianConstants.TUINT64;
-		} else if (type.equals(TraceParameter.ASCII)) {
-			retval = SymbianConstants.CONST_TDESC8_REF;
-		} else if (type.equals(TraceParameter.UNICODE)) {
-			retval = SymbianConstants.CONST_TDESC16_REF;
-		} else if (type.equals(TraceParameter.FLOAT_EXP)
-				|| type.equals(TraceParameter.FLOAT_FIX)
-				|| type.equals(TraceParameter.FLOAT_OPT)) {
-			retval = SymbianConstants.TREAL;
-		} else {
-			retval = SymbianConstants.TANY_PTR;
-		}
-		return retval;
-	}
-
-	/**
-	 * Maps an array parameter type to Symbian type
-	 * 
-	 * @param type
-	 *            the parameter type
-	 * @return the Symbian type
-	 */
-	public static String mapArrayTypeToSymbianType(String type) {
-		String basic = mapBasicTypeToSymbianType(type);
-		String retval = SourceConstants.OST_ARRAY_TYPE_PREFIX + basic
-				+ SourceConstants.OST_ARRAY_TYPE_POSTFIX;
-		return retval;
-	}
-
-	/**
-	 * Maps a format specifier into parameter type
-	 * 
-	 * @param formatSpecifier
-	 *            the format specifier
-	 * @return the parameter type or null if not recognized. If the type is one
-	 *         of the supported TraceParameter types, the string contains the
-	 *         integer value of the type
-	 * @throws TraceCompilerException
-	 *             if format specifier is not valid
-	 */
-	public static FormatMapping mapFormatToParameterType(String formatSpecifier)
-			throws TraceCompilerException {
-		String type;
-		boolean array = false;
-		boolean basic = false;
-		boolean extended = false;
-		int len = formatSpecifier.length();
-		// Extension format is checked first: %{x}
-		if (len > 3 && formatSpecifier.charAt(1) == '{' // CodForChk_Dis_Magic
-				&& formatSpecifier.charAt(len - 1) == '}') {
-			// Extension format can be an array: %{x[]}
-			// In that case it could also be a basic type
-			if (len > 3 + ARRAY_TAG.length() // CodForChk_Dis_Magic
-					&& formatSpecifier.charAt(len - 3) == '[' // CodForChk_Dis_Magic
-					&& formatSpecifier.charAt(len - 2) == ']') { // CodForChk_Dis_Magic
-				type = formatSpecifier.substring(2, len - 1 // CodForChk_Dis_Magic
-						- ARRAY_TAG.length());
-				array = true;
-				if (isStringType(type)) {
-					StringErrorParameters param = new StringErrorParameters();
-					param.string = type;
-					throw new TraceCompilerException(
-							TraceCompilerErrorCode.PARAMETER_FORMAT_NOT_SUPPORTED_IN_ARRAY,
-							param, null);
-				}
-			} else {
-				type = formatSpecifier.substring(2, len - 1); // CodForChk_Dis_Magic
-			}
-			extended = !isBasicType(type);
-		} else {
-			basic = true;
-			type = formatSpecifier;
-		}
-				
-		if (basic) {
-			type = mapBasicFormatToType(formatSpecifier);
-		}
-		if (type == null) {
-			StringErrorParameters params = new StringErrorParameters();
-			params.string = formatSpecifier;
-			throw new TraceCompilerException(
-					TraceCompilerErrorCode.PARAMETER_FORMAT_NOT_SUPPORTED,
-					params, null);
-		}
-		FormatMapping retval = new FormatMapping(type);
-		retval.isArray = array;
-		if (extended) {
-			// In case of extended types, a constant table can still be
-			// represented with normal trace macros.
-			TraceConstantTable table = TraceCompilerEngineGlobals.getTraceModel()
-					.findConstantTableByName(retval.type);
-			if (table != null) {
-				if (!array && isSimpleType(table.getType())) {
-					retval.isSimple = true;
-				}
-			} else {
-				// Extended type must be found from the property file
-				StringErrorParameters params = new StringErrorParameters();
-				params.string = formatSpecifier;
-				throw new TraceCompilerException(
-						TraceCompilerErrorCode.PARAMETER_FORMAT_NOT_SUPPORTED,
-						params, null);
-			}
-		} else if (!retval.isArray) {
-			retval.isSimple = isSimpleType(type);
-		}
-				
-		return retval;
-	}
-
-	/**
-	 * Maps basic format specifies to parameter type
-	 * 
-	 * @param formatSpecifier
-	 *            the format specifies
-	 * @return the type
-	 * @throws TraceCompilerException
-	 *             if mapping cannot be done
-	 */
-	private static String mapBasicFormatToType(String formatSpecifier)
-			throws TraceCompilerException { // CodForChk_Dis_ComplexFunc
-		String type;
-		int paramLength = SourceUtils
-				.mapFormatToParameterLength(formatSpecifier);
-		char formatChar = formatSpecifier.charAt(formatSpecifier.length() - 1);
-		switch (formatChar) {
-		case 'd':
-			type = SourceUtils.mapSignedToParameterType(paramLength);
-			break;
-		case 'x':
-		case 'X':
-			type = SourceUtils.mapHexToParameterType(paramLength);
-			break;
-		case 'u':
-			type = SourceUtils.mapUnsignedToParameterType(paramLength);
-			break;
-		case 'o':
-			type = SourceUtils.mapOctalToParameterType(paramLength);
-			break;
-		case 's':
-			type = TraceParameter.ASCII;
-			break;
-		case 'S': // Symbian extension
-			type = TraceParameter.UNICODE;
-			break;
-		case 'c':
-			type = TraceParameter.SDEC8;
-			break;
-		case 'p':
-			type = TraceParameter.POINTER;
-			break;
-		case 'f':
-		case 'F':
-			type = TraceParameter.FLOAT_FIX;
-			break;
-		case 'e':
-		case 'E':
-			type = TraceParameter.FLOAT_EXP;
-			break;
-		case 'g':
-		case 'G':
-			type = TraceParameter.FLOAT_OPT;
-			break;
-		default:
-			type = null;
-		}
-
-		return type;
-	}
-
-	/**
-	 * Maps a parameter type to format string
-	 * 
-	 * @param parameter
-	 *            the parameter
-	 * @return the format string
-	 */
-	public static String mapParameterTypeToFormat(TraceParameter parameter) {
-		String tag;
-		if (parameter.getExtension(ArrayParameterRule.class) != null) {
-			tag = mapArrayTypeToFormat(parameter.getType());
-		} else {
-			tag = mapNormalTypeToFormat(parameter.getType());
-		}
-		return tag;
-	}
-
-	/**
-	 * Maps an array type to basic type
-	 * 
-	 * @param arrayType
-	 *            the array type
-	 * @return the basic type or null if original type is not array type
-	 */
-	public static String mapArrayTypeToBasicType(String arrayType) {
-		String retval;
-		if (arrayType.endsWith(ARRAY_TAG)) {
-			retval = arrayType.substring(0, arrayType.length()
-					- ARRAY_TAG.length());
-		} else {
-			retval = null;
-		}
-		return retval;
-	}
-
-	/**
-	 * Parses a numeric value from source
-	 * 
-	 * @param number
-	 *            the number as string
-	 * @return the value
-	 */
-	public static int parseNumberFromSource(String number) {
-		int ret;
-		String low = number.toLowerCase();
-		int radix;
-		if (low.startsWith(SourceConstants.HEX_PREFIX)) {
-			radix = 16; // CodForChk_Dis_Magic
-			low = low.substring(SourceConstants.HEX_PREFIX.length());
-		} else if (low.startsWith(SourceConstants.OCTAL_PREFIX)
-				&& low.length() > SourceConstants.OCTAL_PREFIX.length()
-				&& Character.isDigit(low.charAt(SourceConstants.OCTAL_PREFIX
-						.length()))) {
-			radix = 8; // CodForChk_Dis_Magic
-			low = low.substring(SourceConstants.OCTAL_PREFIX.length());
-		} else {
-			radix = 10; // CodForChk_Dis_Magic
-		}
-		if (low.endsWith(SourceConstants.I64_POSTFIX)) {
-			low = low.substring(0, low.length()
-					- SourceConstants.I64_POSTFIX.length());
-		}
-		if (low.length() > 0) {
-			// Removes U / L characters from the end of value
-			int index = low.length() - 1;
-			boolean complete = false;
-			do {
-				char c = low.charAt(index);
-				if (c == 'u' || c == 'l') {
-					index--;
-				} else {
-					complete = true;
-				}
-			} while (!complete && index >= 0);
-			if (index < low.length() - 1 && index > 0) {
-				low = low.substring(0, index + 1);
-			}
-			ret = Integer.parseInt(low, radix);
-		} else {
-			ret = 0;
-		}
-		return ret;
-	}
-
-	/**
-	 * Calculates the size of parameter
-	 * 
-	 * @param parameter
-	 *            the parameter
-	 * @return the parameter size or 0 if the size is not known at compile time
-	 */
-	public static int mapParameterTypeToSize(TraceParameter parameter) {
-		int retval;
-		ArrayParameterRule rule = parameter
-				.getExtension(ArrayParameterRule.class);
-		if (rule != null) {
-			// Array parameters are dynamic
-			retval = 0;
-		} else {
-			String type = parameter.getType();
-			TraceConstantTable table = parameter.getModel()
-					.findConstantTableByName(type);
-			if (table != null) {
-				type = table.getType();
-			}
-			retval = mapParameterTypeToSize(type);
-		}
-		return retval;
-	}
-
-	/**
-	 * Calculates the size of parameter type
-	 * 
-	 * @param type
-	 *            the parameter type
-	 * @return the parameter size or 0 if size is not known at compile time
-	 */
-	public static int mapParameterTypeToSize(String type) {
-		int retval;
-		if (type.equals(TraceParameter.HEX32)
-				|| type.equals(TraceParameter.UDEC32)
-				|| type.equals(TraceParameter.SDEC32)
-				|| type.equals(TraceParameter.OCT32)
-				|| type.equals(TraceParameter.POINTER)) {
-			retval = 4; // CodForChk_Dis_Magic
-		} else if (type.equals(TraceParameter.HEX16)
-				|| type.equals(TraceParameter.UDEC16)
-				|| type.equals(TraceParameter.SDEC16)
-				|| type.equals(TraceParameter.OCT16)) {
-			retval = 2; // CodForChk_Dis_Magic
-		} else if (type.equals(TraceParameter.HEX8)
-				|| type.equals(TraceParameter.UDEC8)
-				|| type.equals(TraceParameter.SDEC8)
-				|| type.equals(TraceParameter.OCT8)) {
-			retval = 1;
-		} else if (type.equals(TraceParameter.HEX64)
-				|| type.equals(TraceParameter.UDEC64)
-				|| type.equals(TraceParameter.SDEC64)
-				|| type.equals(TraceParameter.OCT64)
-				|| type.equals(TraceParameter.FLOAT_EXP)
-				|| type.equals(TraceParameter.FLOAT_FIX)
-				|| type.equals(TraceParameter.FLOAT_OPT)) {
-			retval = 8; // CodForChk_Dis_Magic
-		} else {
-			retval = 0;
-		}
-		return retval;
-	}
-
-	/**
-	 * Removes printf formatting from trace text
-	 * 
-	 * @param text
-	 *            the text to be converted
-	 * @return the new text
-	 */
-	public static String removePrintfFormatting(String text) {
-		Matcher matcher = traceTextPattern.matcher(text);
-		return matcher.replaceAll(""); //$NON-NLS-1$
-	}
-
-	/**
-	 * Converts the given type to unsigned type
-	 * 
-	 * @param type
-	 *            the type
-	 * @return unsigned type
-	 */
-	private static String convertToUnsigned(String type) {
-		if (type.equals(TraceParameter.SDEC32)) {
-			type = TraceParameter.UDEC32;
-		} else if (type.equals(TraceParameter.SDEC16)) {
-			type = TraceParameter.UDEC16;
-		} else if (type.equals(TraceParameter.SDEC8)) {
-			type = TraceParameter.UDEC8;
-		} else if (type.equals(TraceParameter.SDEC64)) {
-			type = TraceParameter.UDEC64;
-		}
-		return type;
-	}
-
-	/**
-	 * Maps a normal parameter type for format character
-	 * 
-	 * @param type
-	 *            the parameter type
-	 * @return the format character
-	 */
-	public static String mapNormalTypeToFormat(String type) { // CodForChk_Dis_ComplexFunc
-		String tag;
-		if (type.equals(TraceParameter.SDEC32)) {
-			tag = "%d"; //$NON-NLS-1$
-		} else if (type.equals(TraceParameter.POINTER)) {
-			tag = "%p"; //$NON-NLS-1$
-		} else if (type.equals(TraceParameter.HEX32)) {
-			tag = "%x"; //$NON-NLS-1$
-		} else if (type.equals(TraceParameter.UDEC32)) {
-			tag = "%u"; //$NON-NLS-1$
-		} else if (type.equals(TraceParameter.OCT32)) {
-			tag = "%o"; //$NON-NLS-1$			
-		} else if (type.equals(TraceParameter.SDEC16)) {
-			tag = "%hd"; //$NON-NLS-1$
-		} else if (type.equals(TraceParameter.HEX16)) {
-			tag = "%hx"; //$NON-NLS-1$
-		} else if (type.equals(TraceParameter.UDEC16)) {
-			tag = "%hu"; //$NON-NLS-1$
-		} else if (type.equals(TraceParameter.OCT16)) {
-			tag = "%ho"; //$NON-NLS-1$			
-		} else if (type.equals(TraceParameter.SDEC8)) {
-			tag = "%hhd"; //$NON-NLS-1$
-		} else if (type.equals(TraceParameter.HEX8)) {
-			tag = "%hhx"; //$NON-NLS-1$
-		} else if (type.equals(TraceParameter.UDEC8)) {
-			tag = "%hhu"; //$NON-NLS-1$
-		} else if (type.equals(TraceParameter.OCT8)) {
-			tag = "%hho"; //$NON-NLS-1$			
-		} else if (type.equals(TraceParameter.SDEC64)) {
-			tag = "%Ld"; //$NON-NLS-1$
-		} else if (type.equals(TraceParameter.HEX64)) {
-			tag = "%Lx"; //$NON-NLS-1$
-		} else if (type.equals(TraceParameter.UDEC64)) {
-			tag = "%Lu"; //$NON-NLS-1$
-		} else if (type.equals(TraceParameter.OCT64)) {
-			tag = "%Lo"; //$NON-NLS-1$			
-		} else if (type.equals(TraceParameter.ASCII)) {
-			tag = "%s"; //$NON-NLS-1$
-		} else if (type.equals(TraceParameter.UNICODE)) {
-			tag = "%S"; //$NON-NLS-1$
-		} else if (type.equals(TraceParameter.FLOAT_FIX)) {
-			tag = "%f"; //$NON-NLS-1$
-		} else if (type.equals(TraceParameter.FLOAT_EXP)) {
-			tag = "%e"; //$NON-NLS-1$
-		} else if (type.equals(TraceParameter.FLOAT_OPT)) {
-			tag = "%g"; //$NON-NLS-1$
-		} else {
-			tag = "%{" //$NON-NLS-1$
-					+ type + "}"; //$NON-NLS-1$
-		}
-		return tag;
-	}
-
-	/**
-	 * Maps an array parameter type to format string
-	 * 
-	 * @param type
-	 *            the parameter type
-	 * @return the format string
-	 */
-	public static String mapArrayTypeToFormat(String type) {
-		String tag = "%{" //$NON-NLS-1$
-				+ type + "[]}"; //$NON-NLS-1$
-		return tag;
-	}
-
-	/**
-	 * Maps format specifier to parameter length
-	 * 
-	 * @param formatSpecifier
-	 *            the specifier
-	 * @return the length
-	 * @throws TraceCompilerException
-	 *             if length is not valid
-	 */
-	public static int mapFormatToParameterLength(String formatSpecifier)
-			throws TraceCompilerException {
-		Matcher matcher = SourceUtils.lengthPattern.matcher(formatSpecifier);
-		int paramLength = 0;
-		if (matcher.find()) {
-			String length = matcher.group();
-
-			if (length.length() == 2) { // CodForChk_Dis_Magic
-				if (length.charAt(0) == 'h' && length.charAt(1) == 'h') {
-					paramLength = SourceConstants.BYTE_SIZE;
-				} else if (length.charAt(0) == 'l' && length.charAt(1) == 'l') {
-					paramLength = SourceConstants.LONG_SIZE;
-				} else {
-					StringErrorParameters params = new StringErrorParameters();
-					params.string = formatSpecifier;
-					throw new TraceCompilerException(
-							TraceCompilerErrorCode.PARAMETER_FORMAT_NOT_SUPPORTED,
-							params, null);
-				}
-			} else if (length.length() == 1) {
-				switch (length.charAt(0)) {
-				case 'h':
-					paramLength = SourceConstants.SHORT_SIZE;
-					break;
-				case 'l':
-					paramLength = SourceConstants.INT_SIZE;
-					break;
-				case 'L':
-					paramLength = SourceConstants.LONG_SIZE;
-					break;
-				default:
-					StringErrorParameters params = new StringErrorParameters();
-					params.string = formatSpecifier;
-					throw new TraceCompilerException(
-							TraceCompilerErrorCode.PARAMETER_FORMAT_NOT_SUPPORTED,
-							params, null);
-				}
-			} else {
-				throw new TraceCompilerException(
-						TraceCompilerErrorCode.INVALID_TRACE_TEXT_FORMAT, null,
-						formatSpecifier);
-			}
-		}
-
-		return paramLength;
-	}
-
-	/**
-	 * Maps signed parameter length to type
-	 * 
-	 * @param paramLength
-	 *            the length
-	 * @return the type
-	 */
-	private static String mapSignedToParameterType(int paramLength) {
-		String retval;
-		if (paramLength == SourceConstants.BYTE_SIZE) {
-			retval = TraceParameter.SDEC8;
-		} else if (paramLength == SourceConstants.SHORT_SIZE) {
-			retval = TraceParameter.SDEC16;
-		} else if (paramLength == SourceConstants.LONG_SIZE) {
-			retval = TraceParameter.SDEC64;
-		} else {
-			retval = TraceParameter.SDEC32;
-		}
-		return retval;
-	}
-
-	/**
-	 * Maps unsigned parameter length to type
-	 * 
-	 * @param paramLength
-	 *            the length
-	 * @return the type
-	 */
-	public static String mapUnsignedToParameterType(int paramLength) {
-		String retval;
-		if (paramLength == SourceConstants.BYTE_SIZE) {
-			retval = TraceParameter.UDEC8;
-		} else if (paramLength == SourceConstants.SHORT_SIZE) {
-			retval = TraceParameter.UDEC16;
-		} else if (paramLength == SourceConstants.LONG_SIZE) {
-			retval = TraceParameter.UDEC64;
-		} else {
-			retval = TraceParameter.UDEC32;
-		}
-		return retval;
-	}
-
-	/**
-	 * Maps hex parameter length to type
-	 * 
-	 * @param paramLength
-	 *            the length
-	 * @return the type
-	 */
-	public static String mapHexToParameterType(int paramLength) {
-		String retval;
-		if (paramLength == SourceConstants.BYTE_SIZE) {
-			retval = TraceParameter.HEX8;
-		} else if (paramLength == SourceConstants.SHORT_SIZE) {
-			retval = TraceParameter.HEX16;
-		} else if (paramLength == SourceConstants.LONG_SIZE) {
-			retval = TraceParameter.HEX64;
-		} else {
-			retval = TraceParameter.HEX32;
-		}
-		return retval;
-	}
-
-	/**
-	 * Maps octal parameter length to type
-	 * 
-	 * @param paramLength
-	 *            the length
-	 * @return the type
-	 */
-	public static String mapOctalToParameterType(int paramLength) {
-		String retval;
-		if (paramLength == SourceConstants.BYTE_SIZE) {
-			retval = TraceParameter.OCT8;
-		} else if (paramLength == SourceConstants.SHORT_SIZE) {
-			retval = TraceParameter.OCT16;
-		} else if (paramLength == SourceConstants.LONG_SIZE) {
-			retval = TraceParameter.OCT64;
-		} else {
-			retval = TraceParameter.OCT32;
-		}
-
-		return retval;
-	}
-
-	/**
-	 * Checks if the parameter can be represented with default trace macros
-	 * 
-	 * @param parameter
-	 *            the parameter
-	 * @return true if parameter can be represented with default trace macros
-	 */
-	public static boolean isSimpleType(TraceParameter parameter) {
-		boolean retval;
-		if (parameter.getExtension(ArrayParameterRule.class) != null) {
-			// Arrays are always complex types
-			retval = false;
-		} else {
-			String type = parameter.getType();
-			TraceConstantTable table = parameter.getModel()
-					.findConstantTableByName(type);
-			if (table != null) {
-				type = table.getType();
-			}
-			retval = isSimpleType(type);
-		}
-		return retval;
-	}
-
-	/**
-	 * Simple type is 32-bit integer
-	 * 
-	 * @param type
-	 *            the type
-	 * @return true if simple, false if not
-	 */
-	private static boolean isSimpleType(String type) {
-		return type.equals(TraceParameter.SDEC32)
-				|| type.equals(TraceParameter.UDEC32)
-				|| type.equals(TraceParameter.OCT32)
-				|| type.equals(TraceParameter.HEX32);
-	}
-
-	/**
-	 * String type is either ascii or unicode
-	 * 
-	 * @param type
-	 *            the type
-	 * @return true if string, false if not
-	 */
-	private static boolean isStringType(String type) {
-		return type.equals(TraceParameter.ASCII)
-				|| type.equals(TraceParameter.UNICODE);
-	}
-
-	/**
-	 * Basic type is any of the built-in TraceParameter types
-	 * 
-	 * @param type
-	 *            the type
-	 * @return true if basic, false if not
-	 */
-	private static boolean isBasicType(String type) {
-		return isSimpleType(type) || type.equals(TraceParameter.SDEC8)
-				|| type.equals(TraceParameter.SDEC16)
-				|| type.equals(TraceParameter.UDEC8)
-				|| type.equals(TraceParameter.UDEC16)
-				|| type.equals(TraceParameter.OCT16)
-				|| type.equals(TraceParameter.HEX8)
-				|| type.equals(TraceParameter.HEX16)
-				|| type.equals(TraceParameter.SDEC64)
-				|| type.equals(TraceParameter.UDEC64)
-				|| type.equals(TraceParameter.OCT64)
-				|| type.equals(TraceParameter.HEX64)
-				|| type.equals(TraceParameter.ASCII)
-				|| type.equals(TraceParameter.UNICODE)
-				|| type.equals(TraceParameter.FLOAT_EXP)
-				|| type.equals(TraceParameter.FLOAT_FIX)
-				|| type.equals(TraceParameter.FLOAT_OPT)
-				|| type.equals(TraceParameter.POINTER);
-	}
-
-	/**
-	 * Checks if parameter size is dynamic
-	 * 
-	 * @param parameter
-	 *            the parameter to be checked
-	 * @return true if dynamic size
-	 */
-	public static boolean isParameterSizeDynamic(TraceParameter parameter) {
-		String type = parameter.getType();
-		ArrayParameterRule rule = parameter
-				.getExtension(ArrayParameterRule.class);
-		return rule != null || type.equals(TraceParameter.ASCII)
-				|| type.equals(TraceParameter.UNICODE);
-	}
-
-	/**
-	 * Checks if alignment is needed
-	 * 
-	 * @param type
-	 *            the parameter type
-	 * @return true if alignment is needed
-	 */
-	public static boolean isParameterAlignementNeeded(String type) {
-		int size = SourceUtils.mapParameterTypeToSize(type);
-		boolean retval = false;
-		if (size == 1 || size == 2) { // CodForChk_Dis_Magic
-			// 8 and 16-bit parameters need alignment
-			retval = true;
-		} else if (isStringType(type)) {
-			retval = true;
-		}
-		return retval;
-	}
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/SymbianConstants.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,241 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Constants related to Symbian sources
-*
-*/
-package com.nokia.tracecompiler.source;
-
-import com.nokia.tracecompiler.model.TraceParameter;
-
-/**
- * Constants related to Symbian sources
- * 
- */
-public interface SymbianConstants {
-
-	/**
-	 * Include directory
-	 */
-	final String INCLUDE_DIRECTORY = "inc"; //$NON-NLS-1$
-
-	/**
-	 * Source directory
-	 */
-	final String SOURCE_DIRECTORY = "src"; //$NON-NLS-1$
-
-	/**
-	 * Group directory
-	 */
-	final String GROUP_DIRECTORY = "group"; //$NON-NLS-1$
-
-	/**
-	 * Mmpfiles directory
-	 */
-	final String MMPFILES_DIRECTORY = "mmpfiles"; //$NON-NLS-1$
-	
-	/**
-	 * ETrue
-	 */
-	final String ETRUE = "ETrue"; //$NON-NLS-1$
-
-	/**
-	 * EFalse
-	 */
-	final String EFALSE = "EFalse"; //$NON-NLS-1$
-
-	/**
-	 * TBool
-	 */
-	final String TBOOL = "TBool"; //$NON-NLS-1$
-
-	/**
-	 * TInt
-	 */
-	final String TINT = "TInt"; //$NON-NLS-1$
-
-	/**
-	 * TUint
-	 */
-	final String TUINT = "TUint"; //$NON-NLS-1$
-
-	/**
-	 * TInt64
-	 */
-	final String TINT64 = "TInt64"; //$NON-NLS-1$
-
-	/**
-	 * TUint64
-	 */
-	final String TUINT64 = "TUint64"; //$NON-NLS-1$
-
-	/**
-	 * TTime
-	 */
-	final String TTIME = "TTime"; //$NON-NLS-1$
-
-	/**
-	 * TInt32
-	 */
-	final String TINT32 = "TInt32"; //$NON-NLS-1$
-
-	/**
-	 * TUint32
-	 */
-	final String TUINT32 = "TUint32"; //$NON-NLS-1$
-
-	/**
-	 * TInt16
-	 */
-	final String TINT16 = "TInt16"; //$NON-NLS-1$
-
-	/**
-	 * TUint16
-	 */
-	final String TUINT16 = "TUint16"; //$NON-NLS-1$
-
-	/**
-	 * TInt8
-	 */
-	final String TINT8 = "TInt8"; //$NON-NLS-1$
-
-	/**
-	 * TUint8
-	 */
-	final String TUINT8 = "TUint8"; //$NON-NLS-1$
-
-	/**
-	 * TAny
-	 */
-	final String TANY = "TAny"; //$NON-NLS-1$
-
-	/**
-	 * TAny*
-	 */
-	final String TANY_PTR = "TAny*"; //$NON-NLS-1$
-	
-	/**
-	 * const TAny*
-	 */
-	final String CONST_TANY_PTR = "const TAny*"; //$NON-NLS-1$
-
-	/**
-	 * TDes8
-	 */
-	final String TDES8 = "TDes8"; //$NON-NLS-1$
-
-	/**
-	 * TDesC8
-	 */
-	final String TDESC8 = "TDesC8"; //$NON-NLS-1$
-
-	/**
-	 * TDes16
-	 */
-	final String TDES16 = "TDes16"; //$NON-NLS-1$
-
-	/**
-	 * TDesC16
-	 */
-	final String TDESC16 = "TDesC16"; //$NON-NLS-1$
-
-	/**
-	 * TDes
-	 */
-	final String TDES = "TDes"; //$NON-NLS-1$
-
-	/**
-	 * TDesC
-	 */
-	final String TDESC = "TDesC"; //$NON-NLS-1$
-
-	/**
-	 * TPtr8
-	 */
-	final String TPTR8 = "TPtr8"; //$NON-NLS-1$
-
-	/**
-	 * TPtrC8
-	 */
-	final String TPTRC8 = "TPtrC8"; //$NON-NLS-1$
-
-	/**
-	 * TPtr16
-	 */
-	final String TPTR16 = "TPtr16"; //$NON-NLS-1$
-
-	/**
-	 * TPtrC16
-	 */
-	final String TPTRC16 = "TPtrC16"; //$NON-NLS-1$
-
-	/**
-	 * TPtr
-	 */
-	final String TPTR = "TPtr"; //$NON-NLS-1$
-
-	/**
-	 * TPtrC
-	 */
-	final String TPTRC = "TPtrC"; //$NON-NLS-1$
-
-	/**
-	 * TReal
-	 */
-	final String TREAL = "TReal"; //$NON-NLS-1$
-
-	/**
-	 * const TDesC8&
-	 */
-	final String CONST_TDESC8_REF = "const TDesC8&"; //$NON-NLS-1$
-
-	/**
-	 * const TDesC8&
-	 */
-	final String CONST_TDESC16_REF = "const TDesC16&"; //$NON-NLS-1$
-
-	/**
-	 * Prefix for all parameters generated into header files
-	 */
-	final String PARAMETER_DECLARATION_PREFIX = "aParam"; //$NON-NLS-1$
-
-	/**
-	 * __KERNEL_MODE__
-	 */
-	final String KERNEL_MODE = "__KERNEL_MODE__"; //$NON-NLS-1$
-
-	/**
-	 * Symbian parameter types mapped to TraceParameter types
-	 */
-	final String PARAMETER_TYPE_MAP[][] = { { TANY, null },
-			{ SourceConstants.VOID, null }, { TINT, TraceParameter.SDEC32 },
-			{ TINT32, TraceParameter.SDEC32 },
-			{ TBOOL, TraceParameter.SDEC32 },
-			{ SourceConstants.INT, TraceParameter.SDEC32 },
-			{ SourceConstants.LONG, TraceParameter.SDEC32 },
-			{ TUINT, TraceParameter.UDEC32 },
-			{ TUINT32, TraceParameter.UDEC32 },
-			{ TINT16, TraceParameter.SDEC16 },
-			{ SourceConstants.SHORT, TraceParameter.SDEC16 },
-			{ TUINT16, TraceParameter.UDEC16 },
-			{ TINT8, TraceParameter.SDEC8 },
-			{ SourceConstants.CHAR, TraceParameter.SDEC8 },
-			{ TUINT8, TraceParameter.UDEC8 },
-			{ TINT64, TraceParameter.SDEC64 },
-			{ TTIME, TraceParameter.TIME },
-			{ TUINT64, TraceParameter.UDEC64 },
-			{ TREAL, TraceParameter.FLOAT_FIX } };
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/TokenizerSearchData.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,87 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Contains search variables during SourceParameterTokenizer.tokenizeParameters call
-*
-*/
-package com.nokia.tracecompiler.source;
-
-/**
- * Contains search variables during SourceParameterTokenizer.tokenizeParameters
- * call
- * 
- */
-final class TokenizerSearchData {
-
-	/**
-	 * Iterator over source characters
-	 */
-	SourceIterator itr;
-
-	/**
-	 * Current character
-	 */
-	char value;
-
-	/**
-	 * Previous character
-	 */
-	char previousValue = ' ';
-
-	/**
-	 * Number of '(' encountered without matching ')' character
-	 */
-	int openBracketCount;
-
-	/**
-	 * Index for start of parameter
-	 */
-	int tagStartIndex;
-
-	/**
-	 * Index for start of parameter
-	 */
-	int paramStartIndex;
-
-	/**
-	 * Initial count of '(' characters at beginning of parameter
-	 */
-	int initialBracketCount;
-
-	/**
-	 * Closing ')' character has been found.
-	 */
-	boolean complete;
-
-	/**
-	 * Ending ';' or '{' character has been found
-	 */
-	boolean endFound;
-
-	/**
-	 * Within quotes flag
-	 */
-	boolean inQuotes;
-
-	/**
-	 * Parameter definition object
-	 */
-	SourceParameter sourceParameter;
-
-	/**
-	 * Data flag
-	 */
-	boolean hasData;
-}
\ No newline at end of file
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/TypeMapping.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,62 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Source to parameter type mapping
-*
-*/
-package com.nokia.tracecompiler.source;
-
-/**
- * Type returned by
- * {@link SourceUtils#mapSymbianTypeToParameterType(ParsedType)}
- * 
- */
-public final class TypeMapping {
-
-	/**
-	 * Parameter type
-	 */
-	public String type;
-
-	/**
-	 * Explicit casting needs to be used when calling trace function
-	 */
-	public boolean needsCasting;
-
-	/**
-	 * Value is changed to pointer before passing to trace function
-	 */
-	public boolean valueToPointer;
-
-	/**
-	 * Contructor
-	 * 
-	 * @param type
-	 *            the parameter type
-	 */
-	public TypeMapping(String type) {
-		this.type = type;
-	}
-
-	/**
-	 * Checks if type is void
-	 * 
-	 * @return true if type is void
-	 */
-	public boolean isVoid() {
-		return type == null;
-	}
-
-}
\ No newline at end of file
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/package.html	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-<html><body>
-Contains parsers for source code
-</body></html>
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/utils/DocumentAdapter.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,130 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Adapter for document interface
-*
-*/
-package com.nokia.tracecompiler.utils;
-
-import com.nokia.tracecompiler.source.SourceDocumentInterface;
-import com.nokia.tracecompiler.source.SourceLocationInterface;
-import com.nokia.tracecompiler.source.SourceParserException;
-import com.nokia.tracecompiler.source.SourcePropertyProvider;
-
-/**
- * Adapter for document interface
- * 
- */
-public class DocumentAdapter implements SourceDocumentInterface {
-
-	/**
-	 * Document owner
-	 */
-	private Object owner;
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.source.SourceDocumentInterface#
-	 *      addLocation(com.nokia.tracecompiler.source.SourceLocationInterface)
-	 */
-	public void addLocation(SourceLocationInterface location) {
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.source.SourceDocumentInterface#get(int, int)
-	 */
-	public String get(int start, int length) throws SourceParserException {
-		return ""; //$NON-NLS-1$
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.source.SourceDocumentInterface#getChar(int)
-	 */
-	public char getChar(int offset) throws SourceParserException {
-		return '\0';
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.source.SourceDocumentInterface#getLength()
-	 */
-	public int getLength() {
-		return 0;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.source.SourceDocumentInterface#
-	 *      getLineOfOffset(int)
-	 */
-	public int getLineOfOffset(int offset) throws SourceParserException {
-		return -1;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.source.SourceDocumentInterface#getOwner()
-	 */
-	public Object getOwner() {
-		return owner;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.source.SourceDocumentInterface#
-	 *      removeLocation(com.nokia.tracecompiler.source.SourceLocationInterface)
-	 */
-	public void removeLocation(SourceLocationInterface location) {
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.source.SourceDocumentInterface#replace(int,
-	 *      int, java.lang.String)
-	 */
-	public void replace(int offset, int length, String newText)
-			throws SourceParserException {
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.source.SourceDocumentInterface#
-	 *      setOwner(java.lang.Object)
-	 */
-	public void setOwner(Object owner) {
-		this.owner = owner;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.source.SourceDocumentInterface#getPropertyProvider()
-	 */
-	public SourcePropertyProvider getPropertyProvider() {
-		return null;
-	}
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/utils/DocumentFactory.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,57 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Factory class to create document interfaces
-*
-*/
-package com.nokia.tracecompiler.utils;
-
-import com.nokia.tracecompiler.source.SourceDocumentFactory;
-import com.nokia.tracecompiler.source.SourceDocumentMonitor;
-
-/**
- * Factory class to create document interfaces
- * 
- */
-public final class DocumentFactory {
-
-	/**
-	 * Document monitor
-	 */
-	private static SourceDocumentMonitor monitor;
-
-
-	/**
-	 * Registers a document framework to be used by the engine
-	 * 
-	 * @param monitor
-	 *            the document monitor
-	 * @param factoryClass
-	 *            the document factory class
-	 */
-	public static void registerDocumentFramework(SourceDocumentMonitor monitor,
-			Class<? extends SourceDocumentFactory> factoryClass) {
-		DocumentFactory.monitor = monitor;
-	}
-
-	/**
-	 * Gets the document monitor
-	 * 
-	 * @return the monitor
-	 */
-	public static final SourceDocumentMonitor getDocumentMonitor() {
-		return monitor;
-	}
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/utils/DocumentFactoryBase.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,54 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Base class for document factories
-*
-*/
-package com.nokia.tracecompiler.utils;
-
-import com.nokia.tracecompiler.source.SourceDocumentFactory;
-import com.nokia.tracecompiler.source.SourceDocumentInterface;
-import com.nokia.tracecompiler.source.SourceLocationBase;
-import com.nokia.tracecompiler.source.SourceLocationInterface;
-
-/**
- * Base class for document factories
- * 
- */
-public class DocumentFactoryBase implements SourceDocumentFactory {
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.source.SourceDocumentFactory#
-	 *      createDocument(java.lang.String)
-	 */
-	public SourceDocumentInterface createDocument(String sourceData) {
-		return new DocumentAdapter();
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.source.SourceDocumentFactory#
-	 *      createLocation(com.nokia.tracecompiler.source.SourceLocationBase,
-	 *      int, int)
-	 */
-	public SourceLocationInterface createLocation(SourceLocationBase base,
-			int offset, int length) {
-		return new SimpleLocation(offset, length);
-	}
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/utils/DocumentMonitorBase.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,84 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Base class for document monitors
-*
-*/
-package com.nokia.tracecompiler.utils;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-
-import com.nokia.tracecompiler.source.SourceDocumentFactory;
-import com.nokia.tracecompiler.source.SourceDocumentInterface;
-import com.nokia.tracecompiler.source.SourceDocumentMonitor;
-import com.nokia.tracecompiler.source.SourceDocumentProcessor;
-
-/**
- * Base class for document monitors.
- * 
- */
-public class DocumentMonitorBase implements SourceDocumentMonitor {
-
-	/**
-	 * Document factory adapter
-	 */
-	private DocumentFactoryBase factory;
-
-	/**
-	 * List of sources
-	 */
-	private ArrayList<SourceDocumentInterface> sources = new ArrayList<SourceDocumentInterface>();
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.source.SourceDocumentMonitor#getFactory()
-	 */
-	public SourceDocumentFactory getFactory() {
-		if (factory == null) {
-			factory = new DocumentFactoryBase();
-		}
-		return factory;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see java.lang.Iterable#iterator()
-	 */
-	public Iterator<SourceDocumentInterface> iterator() {
-		return sources.iterator();
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.source.SourceDocumentMonitor#
-	 *      startMonitor(com.nokia.tracecompiler.source.SourceDocumentProcessor)
-	 */
-	public void startMonitor(SourceDocumentProcessor processor) throws Exception {
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.source.SourceDocumentMonitor#stopMonitor()
-	 */
-	public void stopMonitor() {
-		sources.clear();
-	}
-
-}
\ No newline at end of file
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/utils/SimpleLocation.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,111 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Adapter for location interface
-*
-*/
-package com.nokia.tracecompiler.utils;
-
-import com.nokia.tracecompiler.source.SourceLocationInterface;
-
-/**
- * Location interface implementation
- * 
- */
-class SimpleLocation implements SourceLocationInterface {
-
-	/**
-	 * Location offset
-	 */
-	private int offset;
-
-	/**
-	 * Location length
-	 */
-	private int length;
-
-	/**
-	 * Deleted flag
-	 */
-	private boolean deleted;
-
-	/**
-	 * Constructor
-	 * 
-	 * @param offset
-	 *            location offset
-	 * @param length
-	 *            location length
-	 */
-	SimpleLocation(int offset, int length) {
-		this.offset = offset;
-		this.length = length;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.source.SourceLocationInterface#delete()
-	 */
-	public void delete() {
-		deleted = true;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.source.SourceLocationInterface#getLength()
-	 */
-	public int getLength() {
-		return length;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.source.SourceLocationInterface#getOffset()
-	 */
-	public int getOffset() {
-		return offset;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.source.SourceLocationInterface#isDeleted()
-	 */
-	public boolean isDeleted() {
-		return deleted;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.source.SourceLocationInterface#setLength(int)
-	 */
-	public void setLength(int length) {
-		this.length = length;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.nokia.tracecompiler.source.SourceLocationInterface#setOffset(int)
-	 */
-	public void setOffset(int offset) {
-		this.offset = offset;
-	}
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/utils/TraceCompilerVersion.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,55 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* Version number abstraction
-*
-*/
-package com.nokia.tracecompiler.utils;
-
-/**
- * Version number abstraction
- * 
- */
-public abstract class TraceCompilerVersion {
-
-	/**
-	 * Sub-class, which implements getVersion
-	 */
-	private static TraceCompilerVersion versionImpl;
-
-	/**
-	 * Gets TraceCompiler version number
-	 * 
-	 * @return version number
-	 */
-	public static String getVersion() {
-		String version = null;
-		if (versionImpl != null) {
-			version = versionImpl.getTraceCompilerVersion();
-		} else {
-			// TODO: This is used in console builds -> Maintenance needed
-			version = "2.3.0"; //$NON-NLS-1$
-		}
-		return version;
-	}
-
-	/**
-	 * Gets the version number as x.y.z
-	 * 
-	 * @return the version string
-	 */
-	protected abstract String getTraceCompilerVersion();
-
-}
--- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/utils/package.html	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-<html><body>
-Exported utility classes
-</body></html>
--- a/tracefw/tracecompiler/test/FixedIdDefinitionsTestApp/data/reference_fid_file_1.txt	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,22 +0,0 @@
-##
-# This is Default Licence added by TraceCompiler
-# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "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:
-#
-# Description: 
-#
-##
-#Fixed group and trace id definitions. If this file is removed, the identifiers are rebuilt.
-[GROUP]GROUP1=0xde
-[GROUP]GROUP2=0xdf
-[TRACE]GROUP1[0xDE]_TRACE0=0x1
-[TRACE]GROUP2[0xDF]_TRACE1=0x1
--- a/tracefw/tracecompiler/test/FixedIdDefinitionsTestApp/data/reference_fid_file_2.txt	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,24 +0,0 @@
-##
-# This is Default Licence added by TraceCompiler
-# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "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:
-#
-# Description: 
-#
-##
-#Fixed group and trace id definitions. If this file is removed, the identifiers are rebuilt.
-[GROUP]GROUP1=0xde
-[GROUP]GROUP2=0xdf
-[TRACE]GROUP1[0xDE]_TRACE0=0x1
-[TRACE]GROUP2[0xDF]_TRACE1=0x1
-[TRACE]GROUP2[0xDF]_TRACE2=0x2
-[TRACE]GROUP2[0xDF]_TRACE3=0x3
--- a/tracefw/tracecompiler/test/FixedIdDefinitionsTestApp/data/reference_fid_file_3.txt	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,24 +0,0 @@
-##
-# This is Default Licence added by TraceCompiler
-# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "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:
-#
-# Description: 
-#
-##
-#Fixed group and trace id definitions. If this file is removed, the identifiers are rebuilt.
-[GROUP]GROUP2=0xdf
-[TRACE]GROUP2[0xDF]_TRACE2=0x2
-[TRACE]GROUP2[0xDF]_TRACE3=0x3
-[[OBSOLETE]][GROUP]GROUP1=0xde
-[[OBSOLETE]][TRACE]GROUP1[0xDE]_TRACE0=0x1
-[[OBSOLETE]][TRACE]GROUP2[0xDF]_TRACE1=0x1
--- a/tracefw/tracecompiler/test/FixedIdDefinitionsTestApp/data/reference_fid_file_4.txt	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,29 +0,0 @@
-##
-# This is Default Licence added by TraceCompiler
-# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "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:
-#
-# Description: 
-#
-##
-#Fixed group and trace id definitions. If this file is removed, the identifiers are rebuilt.
-[GROUP]GROUP1=0xe0
-[GROUP]GROUP2=0xdf
-[GROUP]TRACE_FATAL=0x81
-[TRACE]GROUP1[0xE0]_TRACE0=0x1
-[TRACE]GROUP2[0xDF]_TRACE1=0x4
-[TRACE]GROUP2[0xDF]_TRACE2=0x2
-[TRACE]TRACE_FATAL[0x81]_TRACE3=0x1
-[[OBSOLETE]][GROUP]GROUP1=0xde
-[[OBSOLETE]][TRACE]GROUP1[0xDE]_TRACE0=0x1
-[[OBSOLETE]][TRACE]GROUP2[0xDF]_TRACE1=0x1
-[[OBSOLETE]][TRACE]GROUP2[0xDF]_TRACE3=0x3
--- a/tracefw/tracecompiler/test/FixedIdDefinitionsTestApp/data/reference_fid_file_5.txt	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
-##
-# This is Default Licence added by TraceCompiler
-# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "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:
-#
-# Description: 
-#
-##
-#Fixed group and trace id definitions. If this file is removed, the identifiers are rebuilt.
-[GROUP]GROUP1=0xe0
-[GROUP]GROUP2=0xdf
-[TRACE]GROUP1[0xE0]_TRACE0=0x1
-[TRACE]GROUP2[0xDF]_TRACE1=0x4
-[TRACE]GROUP2[0xDF]_TRACE2=0x2
-[[OBSOLETE]][GROUP]GROUP1=0xde
-[[OBSOLETE]][TRACE]GROUP1[0xDE]_TRACE0=0x1
-[[OBSOLETE]][TRACE]GROUP2[0xDF]_TRACE1=0x1
-[[OBSOLETE]][TRACE]GROUP2[0xDF]_TRACE3=0x3
-[[OBSOLETE]][TRACE]TRACE_FATAL[0x81]_TRACE3=0x1
--- a/tracefw/tracecompiler/test/FixedIdDefinitionsTestApp/data/reference_fid_file_6_0.txt	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-##
-# This is Default Licence added by TraceCompiler
-# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "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:
-#
-# Description: 
-#
-##
-#Fixed group and trace id definitions. If this file is removed, the identifiers are rebuilt.
-[GROUP]GROUP1=0xe0
-[GROUP]GROUP2=0xdf
-[TRACE]GROUP1[0xE0]_TRACE0=0x1
-[TRACE]GROUP2[0xDF]_TRACE2=0x2
-[[OBSOLETE]][GROUP]GROUP1=0xde
-[[OBSOLETE]][TRACE]GROUP1[0xDE]_TRACE0=0x1
-[[OBSOLETE]][TRACE]GROUP2[0xDF]_TRACE1=0x4
-[[OBSOLETE]][TRACE]GROUP2[0xDF]_TRACE3=0x3
-[[OBSOLETE]][TRACE]TRACE_FATAL[0x81]_TRACE3=0x1
--- a/tracefw/tracecompiler/test/FixedIdDefinitionsTestApp/data/reference_fid_file_6_1.txt	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
-##
-# This is Default Licence added by TraceCompiler
-# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "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:
-#
-# Description: 
-#
-##
-#Fixed group and trace id definitions. If this file is removed, the identifiers are rebuilt.
-[GROUP]GROUP1=0xe0
-[GROUP]GROUP2=0xdf
-[TRACE]GROUP1[0xE0]_TRACE0=0x1
-[TRACE]GROUP2[0xDF]_TRACE1=0x5
-[TRACE]GROUP2[0xDF]_TRACE2=0x2
-[[OBSOLETE]][GROUP]GROUP1=0xde
-[[OBSOLETE]][TRACE]GROUP1[0xDE]_TRACE0=0x1
-[[OBSOLETE]][TRACE]GROUP2[0xDF]_TRACE1=0x4
-[[OBSOLETE]][TRACE]GROUP2[0xDF]_TRACE3=0x3
-[[OBSOLETE]][TRACE]TRACE_FATAL[0x81]_TRACE3=0x1
--- a/tracefw/tracecompiler/test/FixedIdDefinitionsTestApp/data/reference_fid_file_6_2.txt	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-##
-# This is Default Licence added by TraceCompiler
-# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "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:
-#
-# Description: 
-#
-##
-#Fixed group and trace id definitions. If this file is removed, the identifiers are rebuilt.
-[GROUP]GROUP1=0xe0
-[GROUP]GROUP2=0xdf
-[TRACE]GROUP1[0xE0]_TRACE0=0x1
-[TRACE]GROUP2[0xDF]_TRACE2=0x2
-[[OBSOLETE]][GROUP]GROUP1=0xde
-[[OBSOLETE]][TRACE]GROUP1[0xDE]_TRACE0=0x1
-[[OBSOLETE]][TRACE]GROUP2[0xDF]_TRACE1=0x5
-[[OBSOLETE]][TRACE]GROUP2[0xDF]_TRACE3=0x3
-[[OBSOLETE]][TRACE]TRACE_FATAL[0x81]_TRACE3=0x1
--- a/tracefw/tracecompiler/test/FixedIdDefinitionsTestApp/data/reference_fid_file_6_3.txt	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
-##
-# This is Default Licence added by TraceCompiler
-# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "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:
-#
-# Description: 
-#
-##
-#Fixed group and trace id definitions. If this file is removed, the identifiers are rebuilt.
-[GROUP]GROUP1=0xe0
-[GROUP]GROUP2=0xdf
-[TRACE]GROUP1[0xE0]_TRACE0=0x1
-[TRACE]GROUP2[0xDF]_TRACE1=0x6
-[TRACE]GROUP2[0xDF]_TRACE2=0x2
-[[OBSOLETE]][GROUP]GROUP1=0xde
-[[OBSOLETE]][TRACE]GROUP1[0xDE]_TRACE0=0x1
-[[OBSOLETE]][TRACE]GROUP2[0xDF]_TRACE1=0x5
-[[OBSOLETE]][TRACE]GROUP2[0xDF]_TRACE3=0x3
-[[OBSOLETE]][TRACE]TRACE_FATAL[0x81]_TRACE3=0x1
--- a/tracefw/tracecompiler/test/FixedIdDefinitionsTestApp/data/reference_fid_file_7_0.txt	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
-##
-# This is Default Licence added by TraceCompiler
-# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "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:
-#
-# Description: 
-#
-##
-#Fixed group and trace id definitions. If this file is removed, the identifiers are rebuilt.
-[GROUP]GROUP2=0xdf
-[TRACE]GROUP2[0xDF]_TRACE0=0x7
-[TRACE]GROUP2[0xDF]_TRACE1=0x6
-[TRACE]GROUP2[0xDF]_TRACE2=0x2
-[[OBSOLETE]][GROUP]GROUP1=0xe0
-[[OBSOLETE]][TRACE]GROUP1[0xDE]_TRACE0=0x1
-[[OBSOLETE]][TRACE]GROUP1[0xE0]_TRACE0=0x1
-[[OBSOLETE]][TRACE]GROUP2[0xDF]_TRACE1=0x5
-[[OBSOLETE]][TRACE]GROUP2[0xDF]_TRACE3=0x3
-[[OBSOLETE]][TRACE]TRACE_FATAL[0x81]_TRACE3=0x1
--- a/tracefw/tracecompiler/test/FixedIdDefinitionsTestApp/data/reference_fid_file_7_1.txt	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +0,0 @@
-##
-# This is Default Licence added by TraceCompiler
-# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "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:
-#
-# Description: 
-#
-##
-#Fixed group and trace id definitions. If this file is removed, the identifiers are rebuilt.
-[GROUP]GROUP2=0xdf
-[GROUP]TRACE_NORMAL=0x86
-[TRACE]GROUP2[0xDF]_TRACE1=0x6
-[TRACE]GROUP2[0xDF]_TRACE2=0x2
-[TRACE]TRACE_NORMAL[0x86]_TRACE0=0x1
-[[OBSOLETE]][GROUP]GROUP1=0xe0
-[[OBSOLETE]][TRACE]GROUP1[0xDE]_TRACE0=0x1
-[[OBSOLETE]][TRACE]GROUP1[0xE0]_TRACE0=0x1
-[[OBSOLETE]][TRACE]GROUP2[0xDF]_TRACE0=0x7
-[[OBSOLETE]][TRACE]GROUP2[0xDF]_TRACE1=0x5
-[[OBSOLETE]][TRACE]GROUP2[0xDF]_TRACE3=0x3
-[[OBSOLETE]][TRACE]TRACE_FATAL[0x81]_TRACE3=0x1
--- a/tracefw/tracecompiler/test/FixedIdDefinitionsTestApp/data/reference_fid_file_7_2.txt	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
-##
-# This is Default Licence added by TraceCompiler
-# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "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:
-#
-# Description: 
-#
-##
-#Fixed group and trace id definitions. If this file is removed, the identifiers are rebuilt.
-[GROUP]GROUP1=0xe1
-[GROUP]GROUP2=0xdf
-[TRACE]GROUP1[0xE1]_TRACE0=0x1
-[TRACE]GROUP2[0xDF]_TRACE1=0x6
-[TRACE]GROUP2[0xDF]_TRACE2=0x2
-[[OBSOLETE]][GROUP]GROUP1=0xe0
-[[OBSOLETE]][TRACE]GROUP1[0xDE]_TRACE0=0x1
-[[OBSOLETE]][TRACE]GROUP1[0xE0]_TRACE0=0x1
-[[OBSOLETE]][TRACE]GROUP2[0xDF]_TRACE0=0x7
-[[OBSOLETE]][TRACE]GROUP2[0xDF]_TRACE1=0x5
-[[OBSOLETE]][TRACE]GROUP2[0xDF]_TRACE3=0x3
-[[OBSOLETE]][TRACE]TRACE_FATAL[0x81]_TRACE3=0x1
-[[OBSOLETE]][TRACE]TRACE_NORMAL[0x86]_TRACE0=0x1
--- a/tracefw/tracecompiler/test/FixedIdDefinitionsTestApp/data/reference_fid_file_8.txt	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,20 +0,0 @@
-##
-# This is Default Licence added by TraceCompiler
-# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "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:
-#
-# Description: 
-#
-##
-#Fixed group and trace id definitions. If this file is removed, the identifiers are rebuilt.
-[GROUP]TRACE_FLOW=0x8a
-[TRACE]TRACE_FLOW[0x8A]_TRACE1=0x1
--- a/tracefw/tracecompiler/test/FixedIdDefinitionsTestApp/data/reference_fid_file_9.txt	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,20 +0,0 @@
-##
-# This is Default Licence added by TraceCompiler
-# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "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:
-#
-# Description: 
-#
-##
-#Fixed group and trace id definitions. If this file is removed, the identifiers are rebuilt.
-[GROUP]MY_GROUP=0xde
-[TRACE]MY_GROUP[0xDE]_TRACE1=0x1
--- a/tracefw/tracecompiler/test/FixedIdDefinitionsTestApp/data/reference_tc_output_8.txt	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-warning: TC has detected a fixed_id.defintions using different Group Id values. This file will be regenerated with the correct values.
-FixedIdDefinitionsTestApp took
-
--- a/tracefw/tracecompiler/test/FixedIdDefinitionsTestApp/data/reference_tc_output_9.txt	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-warning: TC has detected a fixed_id.defintions using different Group Id values. This file will be regenerated with the correct values.
-FixedIdDefinitionsTestApp took
-
--- a/tracefw/tracecompiler/test/FixedIdDefinitionsTestApp/group/FixedIdDefinitionsTestApp.mmp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-
-TARGET		  FixedIdDefinitionsTestApp.exe
-TARGETTYPE	  exe
-UID			 0 0xE9FBE6EE
-
-OS_LAYER_SYSTEMINCLUDE
-
-USERINCLUDE	 ..\inc 
-USERINCLUDE  ..\traces
-
-SOURCEPATH	  ..\src
-SOURCE		  FixedIdDefinitionsTestApp.cpp
-
-LIBRARY		 euser.lib
-
-#ifdef ENABLE_ABIV2_MODE
-  DEBUGGABLE_UDEBONLY
-#endif
--- a/tracefw/tracecompiler/test/FixedIdDefinitionsTestApp/group/bld.inf	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,24 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-
-PRJ_PLATFORMS
-DEFAULT
-
-PRJ_MMPFILES
-FixedIdDefinitionsTestApp.mmp
--- a/tracefw/tracecompiler/test/FixedIdDefinitionsTestApp/inc/FixedIdDefinitionsTestApp.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef __FIXEDIDDEFINITIONSTESTAPP_H__
-#define __FIXEDIDDEFINITIONSTESTAPP_H__
-
-//  Include Files
-
-#include <e32base.h>
-
-//  Function Prototypes
-
-GLDEF_C TInt E32Main();
-
-#endif  // __FIXEDIDDEFINITIONSTESTAPP_H__
-
--- a/tracefw/tracecompiler/test/FixedIdDefinitionsTestApp/src/FixedIdDefinitionsTestApp.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,126 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-//  Include Files  
-#include "FixedIdDefinitionsTestApp.h"
-#include <e32base.h>
-#include <e32debug.h>
-#include <e32std.h>
-#include <e32cons.h>
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "FixedIdDefinitionsTestAppTraces.h"
-#endif
-// Console
-//  Constants
-_LIT(KTextConsoleTitle, "Console");
-_LIT(KTextFailed, " failed, leave code = %d");
-_LIT(KTextPressAnyKey, " [press any key]\n");
-
-//  Global Variables
-LOCAL_D CConsoleBase* console; // write all messages to this
-
-
-//  Local Functions
-
-LOCAL_C void MainL()
-    {
-//     OstTrace0(GROUP1, TRACE0, "trace 0"); // TRACE_USED_IN_TEST_CASE_1
-//     OstTrace0(GROUP2, TRACE1, "trace 1"); // TRACE_USED_IN_TEST_CASE_1
- 
-//     OstTrace0(GROUP1, TRACE0, "trace 0"); // TRACE_USED_IN_TEST_CASE_2
-//     OstTrace0(GROUP2, TRACE2, "trace 2"); // TRACE_USED_IN_TEST_CASE_2 
-//     OstTrace0(GROUP2, TRACE1, "trace 1"); // TRACE_USED_IN_TEST_CASE_2
-//     OstTrace0(GROUP2, TRACE3, "trace 3"); // TRACE_USED_IN_TEST_CASE_2 
-    
-//     OstTrace0(GROUP2, TRACE2, "trace 2"); // TRACE_USED_IN_TEST_CASE_3 
-//     OstTrace0(GROUP2, TRACE3, "trace 3"); // TRACE_USED_IN_TEST_CASE_3
-    
-//     OstTrace0(GROUP1, TRACE0, "trace 0"); // TRACE_USED_IN_TEST_CASE_4
-//     OstTrace0(GROUP2, TRACE2, "trace 2"); // TRACE_USED_IN_TEST_CASE_4 
-//     OstTrace0(GROUP2, TRACE1, "trace 1"); // TRACE_USED_IN_TEST_CASE_4
-//     OstTrace0(TRACE_FATAL, TRACE3, "trace 3"); // TRACE_USED_IN_TEST_CASE_4
-
-//     OstTrace0(GROUP1, TRACE0, "trace 0"); // TRACE_USED_IN_TEST_CASE_5
-//     OstTrace0(GROUP2, TRACE2, "trace 2"); // TRACE_USED_IN_TEST_CASE_5 
-//     OstTrace0(GROUP2, TRACE1, "trace 1"); // TRACE_USED_IN_TEST_CASE_5
-
-//     OstTrace0(GROUP1, TRACE0, "trace 0"); // TRACE_USED_IN_TEST_CASE_6_0
-//     OstTrace0(GROUP2, TRACE2, "trace 2"); // TRACE_USED_IN_TEST_CASE_6_0 
-//     OstTrace0(GROUP1, TRACE0, "trace 0"); // TRACE_USED_IN_TEST_CASE_6_1 
-//     OstTrace0(GROUP2, TRACE2, "trace 2"); // TRACE_USED_IN_TEST_CASE_6_1 
-//     OstTrace0(GROUP2, TRACE1, "trace 1"); // TRACE_USED_IN_TEST_CASE_6_1
-//     OstTrace0(GROUP1, TRACE0, "trace 0"); // TRACE_USED_IN_TEST_CASE_6_2
-//     OstTrace0(GROUP2, TRACE2, "trace 2"); // TRACE_USED_IN_TEST_CASE_6_2 
-//     OstTrace0(GROUP1, TRACE0, "trace 0"); // TRACE_USED_IN_TEST_CASE_6_3
-//     OstTrace0(GROUP2, TRACE2, "trace 2"); // TRACE_USED_IN_TEST_CASE_6_3 
-//     OstTrace0(GROUP2, TRACE1, "trace 1"); // TRACE_USED_IN_TEST_CASE_6_3
-
-//     OstTrace0(GROUP2, TRACE0, "trace 0"); // TRACE_USED_IN_TEST_CASE_7_0
-//     OstTrace0(GROUP2, TRACE2, "trace 2"); // TRACE_USED_IN_TEST_CASE_7_0 
-//     OstTrace0(GROUP2, TRACE1, "trace 1"); // TRACE_USED_IN_TEST_CASE_7_0
-//     OstTrace0(TRACE_NORMAL, TRACE0, "trace 0"); // TRACE_USED_IN_TEST_CASE_7_1
-//     OstTrace0(GROUP2, TRACE2, "trace 2"); // TRACE_USED_IN_TEST_CASE_7_1
-//     OstTrace0(GROUP2, TRACE1, "trace 1"); // TRACE_USED_IN_TEST_CASE_7_1
-//     OstTrace0(GROUP1, TRACE0, "trace 0"); // TRACE_USED_IN_TEST_CASE_7_2
-//     OstTrace0(GROUP2, TRACE2, "trace 2"); // TRACE_USED_IN_TEST_CASE_7_2 
-//     OstTrace0(GROUP2, TRACE1, "trace 1"); // TRACE_USED_IN_TEST_CASE_7_2   
-   
-//     OstTrace0(TRACE_FLOW, TRACE1, "trace 1"); // TRACE_USED_IN_TEST_CASE_8      
-
-//     OstTrace0(MY_GROUP, TRACE1, "trace 1"); // TRACE_USED_IN_TEST_CASE_9                
-    }
-
-LOCAL_C void DoStartL()
-    {
-    // Create active scheduler (to run active objects)
-    CActiveScheduler* scheduler = new (ELeave) CActiveScheduler();
-    CleanupStack::PushL(scheduler);
-    CActiveScheduler::Install(scheduler);
-
-    MainL();
-
-    // Delete active scheduler
-    CleanupStack::PopAndDestroy(scheduler);
-
-    }
-
-//  Global Functions
-
-GLDEF_C TInt E32Main()
-    {
-    // Create cleanup stack
-    __UHEAP_MARK;
-    CTrapCleanup* cleanup = CTrapCleanup::New();
-    // Create output console
-    TRAPD(createError, console = Console::NewL(KTextConsoleTitle, TSize(
-                            KConsFullScreen, KConsFullScreen)));
-    if (createError)
-        return createError;
-    // Run application code inside TRAP harness, wait keypress when terminated
-    TRAPD(mainError, DoStartL());
-    if (mainError)
-        console->Printf(KTextFailed, mainError);
-    console->Printf(KTextPressAnyKey);
-    console->Getch();
-
-    delete console;
-    delete cleanup;
-    __UHEAP_MARKEND;
-    return KErrNone;
-    }
-
--- a/tracefw/tracecompiler/test/MultipleCppTraceErrorApp/data/referencelog.txt	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,13 +0,0 @@
-error: ExtraCppFile.cpp, line 37: Trace does not need to use extension macro
-error: ExtraCppFile.cpp, line 38: Trace does not need to use extension macro
-error: ExtraCppFile.cpp, line 42: Parameter count does not match the format specification
-error: You have exceeded the number of Group IDs you have allocated.
-warning: Deprecated group TRACE_API detected. Updating to TRACE_BORDER in dictionary. Please update source code!
-warning: Deprecated group TRACE_DETAILED detected. Updating to TRACE_INTERNALS in dictionary. Please update source code!
-warning: Deprecated group TRACE_DEBUG detected. Updating to TRACE_DUMP in dictionary. Please update source code!
-error: MultipleCppTraceErrorApp.cpp, line 52: Trace does not need to use extension macro
-error: MultipleCppTraceErrorApp.cpp, line 53: Trace does not need to use extension macro
-error: MultipleCppTraceErrorApp.cpp, line 57: Trace is used from multiple places
-error: MultipleCppTraceErrorApp.cpp, line 58: Trace is used from multiple places
-error: MultipleCppTraceErrorApp.cpp, line 65: Parameter count does not match the format specification
-error: MultipleCppTraceErrorApp.cpp, line 101: Run out of Group IDs. You can try to reuse unused group ids by deleting fixed id definition file.
--- a/tracefw/tracecompiler/test/MultipleCppTraceErrorApp/group/MultipleCppTraceErrorApp.mmp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-
-TARGET		  MultipleCppTraceErrorApp.exe
-TARGETTYPE	  exe
-UID			 0 0xE8576D94
-
-APP_LAYER_SYSTEMINCLUDE
-
-USERINCLUDE	 ../inc
-USERINCLUDE  ../traces
-
-SOURCEPATH	  ../src
-SOURCE		  MultipleCppTraceErrorApp.cpp 
-SOURCE		  ExtraCppFile.cpp
-
-LIBRARY		 euser.lib
-
-#ifdef ENABLE_ABIV2_MODE
-DEBUGGABLE_UDEBONLY
-#endif
--- a/tracefw/tracecompiler/test/MultipleCppTraceErrorApp/group/bld.inf	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,24 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-
-PRJ_PLATFORMS
-DEFAULT
-
-PRJ_MMPFILES
-MultipleCppTraceErrorApp.mmp
--- a/tracefw/tracecompiler/test/MultipleCppTraceErrorApp/inc/MultipleCppTraceErrorApp.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef __TRACEERRORAPP_H__
-#define __TRACEERRORAPP_H__
-
-//  Include Files
-
-#include <e32base.h>
-
-//  Function Prototypes
-
-GLDEF_C TInt E32Main();
-void CallSomeMoreTraceStatements();
-
-#endif  // __TRACEERRORAPP_H__
-
--- a/tracefw/tracecompiler/test/MultipleCppTraceErrorApp/sis/TraceErrorApp_EKA2.pkg	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-;
-; Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-; All rights reserved.
-; This component and the accompanying materials are made available
-; under the terms of "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:
-;
-; Description: 
-;
-; Installation file for Symbian OS 9.x for generic console application
-; Installation file for TraceErrorApp EXE
-;
-; This is an auto-generated PKG file by Carbide.
-; This file uses variables specific to Carbide builds that will not work
-; on command-line builds. If you want to use this generated PKG file from the
-; command-line tools you will need to modify the variables with the appropriate
-; values: $(EPOCROOT), $(PLATFORM), $(TARGET)
-;
-
-;
-; UID is the exe's UID
-;
-#{"TraceErrorApp EXE"},(0xE8576D92),1,0,0
-
-
-;Localised Vendor name
-%{"Vendor-EN"}
-
-;Unique Vendor name
-:"Vendor"
-
-"$(EPOCROOT)Epoc32\release\$(PLATFORM)\$(TARGET)\TraceErrorApp.exe"		  -"!:\sys\bin\TraceErrorApp.exe"
-
--- a/tracefw/tracecompiler/test/MultipleCppTraceErrorApp/src/ExtraCppFile.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-/*
- * ExtraCppFile.cpp
- *
- *  Created on: Dec 7, 2009
- *      Author: cajagu
- */
-
-#include "MultipleCppTraceErrorApp.h"
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "ExtraCppFileTraces.h"
-#endif
-
-void CallSomeMoreTraceStatements()
-    {
-    TInt32 x = 555;
-    TUint32 y = 666;
-    
-    //In these two cases Trace Compiler should give a error that an extension macro isn't necessary:
-    //"TraceErrorApp.cpp, line xx: Trace does not need to use extension macro"
-    OstTraceExt1( TRACE_FLOW, TEST1_CALLMORE, "CallSomeMoreTraceStatements(): x=%d" , x );
-    OstTraceExt1( TRACE_FLOW, TEST2_CALLMORE, "CallSomeMoreTraceStatements(): y=%u" , y );
-    
-    //Wrong API i.e more parameters than it takes
-    //"TraceErrorApp.cpp, line xx: Parameter count does not match the format specification"
-    OstTrace0( TRACE_FLOW, TEST3_CALLMORE, "CallSomeMoreTraceStatements(): x=%d" ,x);
-    }
--- a/tracefw/tracecompiler/test/MultipleCppTraceErrorApp/src/MultipleCppTraceErrorApp.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,158 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-//  Include Files  
-
-#include "MultipleCppTraceErrorApp.h"
-#include <e32base.h>
-#include <e32std.h>
-#include <e32cons.h>			// Console
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "MultipleCppTraceErrorAppTraces.h"
-#endif
-
-//  Constants
-
-_LIT(KTextConsoleTitle, "Console");
-_LIT(KTextFailed, " failed, leave code = %d");
-_LIT(KTextPressAnyKey, " [press any key]\n");
-
-//  Global Variables
-
-LOCAL_D CConsoleBase* console; // write all messages to this
-
-
-//  Local Functions
-
-LOCAL_C void MainL()
-    {
-    /****************************SHOULD GIVE ERRORS*******************************/
-    _LIT8(KTestDes,"Test Descriptor");
-    TInt32 x = 555;
-    TUint32 y = 666;
-    
-    //In these two cases Trace Compiler should give a error that an extension macro isn't necessary:
-    //"TraceErrorApp.cpp, line xx: Trace does not need to use extension macro"
-    OstTraceExt1( TRACE_FLOW, TEST1_MAINL, "MainL(): x=%d" , x );
-    OstTraceExt1( TRACE_FLOW, TEST2_MAINL, "MainL(): y=%u" , y );
-    
-    //This should give an error stating that the trace name is duplicated
-    //"TraceErrorApp.cpp, line xx: Trace is used from multiple places"
-    OstTrace0( TRACE_FLOW, TEST3_MAINL, "MainL()" );
-    OstTrace0( TRACE_FLOW, TEST3_MAINL, "MainL()" );
-    
-    //This should NOT give an error stating that the arguments don't match format spec
-    //OstTraceExt2( TRACE_FLOW, TEST4_MAINL, "MainL(): x=%d;KTestDes=%d", x, KTestDes );
-
-    //Wrong API i.e more parameters than it takes
-    //"TraceErrorApp.cpp, line xx: Parameter count does not match the format specification"
-    OstTrace0( TRACE_FLOW, TEST5_MAINL, "MainL(): x=%d" ,x);
-    
-    //Too many User-defined group ids should be max of 32 but there are 33 here), should get an error
-    //"You have exceeded the number of Group IDs you have allocated."
-    OstTrace0( MY_GROUP_ID1, TEST_MAINL6, "MainL()" );
-    OstTrace0( MY_GROUP_ID2, TEST_MAINL7, "MainL()" );
-    OstTrace0( MY_GROUP_ID3, TEST_MAINL8, "MainL()" );
-    OstTrace0( MY_GROUP_ID4, TEST_MAINL9, "MainL()" );
-    OstTrace0( MY_GROUP_ID5, TEST_MAINL10, "MainL()" );
-    OstTrace0( MY_GROUP_ID6, TEST_MAINL11, "MainL()" );
-    OstTrace0( MY_GROUP_ID7, TEST_MAINL12, "MainL()" );
-    OstTrace0( MY_GROUP_ID8, TEST_MAINL13, "MainL()" );
-    OstTrace0( MY_GROUP_ID9, TEST_MAINL14, "MainL()" );
-    OstTrace0( MY_GROUP_ID10, TEST_MAINL15, "MainL()" );
-    OstTrace0( MY_GROUP_ID11, TEST_MAINL16, "MainL()" );
-    OstTrace0( MY_GROUP_ID12, TEST_MAINL17, "MainL()" );
-    OstTrace0( MY_GROUP_ID13, TEST_MAINL18, "MainL()" );
-    OstTrace0( MY_GROUP_ID14, TEST_MAINL19, "MainL()" );
-    OstTrace0( MY_GROUP_ID15, TEST_MAINL20, "MainL()" );
-    OstTrace0( MY_GROUP_ID16, TEST_MAINL21, "MainL()" );
-    OstTrace0( MY_GROUP_ID17, TEST_MAINL22, "MainL()" );
-    OstTrace0( MY_GROUP_ID18, TEST_MAINL23, "MainL()" );
-    OstTrace0( MY_GROUP_ID19, TEST_MAINL24, "MainL()" );
-    OstTrace0( MY_GROUP_ID20, TEST_MAINL25, "MainL()" );
-    OstTrace0( MY_GROUP_ID21, TEST_MAINL26, "MainL()" );
-    OstTrace0( MY_GROUP_ID22, TEST_MAINL27, "MainL()" );
-    OstTrace0( MY_GROUP_ID23, TEST_MAINL28, "MainL()" );
-    OstTrace0( MY_GROUP_ID24, TEST_MAINL29, "MainL()" );
-    OstTrace0( MY_GROUP_ID25, TEST_MAINL30, "MainL()" );
-    OstTrace0( MY_GROUP_ID26, TEST_MAINL31, "MainL()" );
-    OstTrace0( MY_GROUP_ID27, TEST_MAINL32, "MainL()" );
-    OstTrace0( MY_GROUP_ID28, TEST_MAINL33, "MainL()" );
-    OstTrace0( MY_GROUP_ID29, TEST_MAINL34, "MainL()" );
-    OstTrace0( MY_GROUP_ID30, TEST_MAINL35, "MainL()" );
-    OstTrace0( MY_GROUP_ID31, TEST_MAINL36, "MainL()" );
-    OstTrace0( MY_GROUP_ID32, TEST_MAINL37, "MainL()" );
-    OstTrace0( MY_GROUP_ID33, TEST_MAINL38, "MainL()" );    
-    /*****************************************************************************/
-    
-    
-    /******************************SHOULD GIVE WARNINGS***************************/
-    //Should get warnings from using deprecated GIDs
-    //e.g. "Deprecated group TRACE_API detected. Updating to TRACE_BORDER in dictionary. Please update source code!"
-    OstTrace0( TRACE_API, TEST_MAINL39, "MainL()" );  
-    OstTrace0( TRACE_IMPORTANT, TEST_MAINL40, "MainL()" );  
-    OstTrace0( TRACE_DETAILED, TEST_MAINL41, "MainL()" );
-    OstTrace0( TRACE_DEBUG, TEST_MAINL42, "MainL()" );  
-    /*****************************************************************************/
-    
-    CallSomeMoreTraceStatements();
-    
-    console->Write(_L("Hello, world!\n"));
-    }
-
-LOCAL_C void DoStartL()
-    {
-    // Create active scheduler (to run active objects)
-    CActiveScheduler* scheduler = new (ELeave) CActiveScheduler();
-    CleanupStack::PushL(scheduler);
-    CActiveScheduler::Install(scheduler);
-
-    MainL();
-
-    // Delete active scheduler
-    CleanupStack::PopAndDestroy(scheduler);
-    }
-
-//  Global Functions
-
-GLDEF_C TInt E32Main()
-    {
-    // Create cleanup stack
-    __UHEAP_MARK;
-    CTrapCleanup* cleanup = CTrapCleanup::New();
-
-    // Create output console
-    TRAPD(createError, console = Console::NewL(KTextConsoleTitle, TSize(
-            KConsFullScreen, KConsFullScreen)));
-    if (createError)
-        return createError;
-
-    // Run application code inside TRAP harness, wait keypress when terminated
-    TRAPD(mainError, DoStartL());
-    if (mainError)
-        console->Printf(KTextFailed, mainError);
-    console->Printf(KTextPressAnyKey);
-    console->Getch();
-
-    delete console;
-    delete cleanup;
-    __UHEAP_MARKEND;
-    return KErrNone;
-    }
-
--- a/tracefw/tracecompiler/test/MultipleCppTraceErrorApp/traces/OstTraceDefinitions.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-#ifndef __OSTTRACEDEFINITIONS_H__
-#define __OSTTRACEDEFINITIONS_H__
-// OST_TRACE_COMPILER_IN_USE flag has been added by Trace Compiler
-// REMOVE BEFORE CHECK-IN TO VERSION CONTROL
-#define OST_TRACE_COMPILER_IN_USE
-#include <OpenSystemTrace.h>
-#endif
--- a/tracefw/tracecompiler/test/MultipleCppTraceErrorApp/traces/fixed_id.definitions	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,9 +0,0 @@
-#Fixed group and trace id definitions. If this file is removed, the identifiers are rebuilt.
-[GROUP]TRACE_BORDER=0x84
-[GROUP]TRACE_DUMP=0x89
-[GROUP]TRACE_IMPORTANT=0x85
-[GROUP]TRACE_INTERNALS=0x88
-[TRACE]TRACE_BORDER[0x84]_TEST_MAINL39=0x1
-[TRACE]TRACE_DUMP[0x89]_TEST_MAINL42=0x1
-[TRACE]TRACE_IMPORTANT[0x85]_TEST_MAINL40=0x1
-[TRACE]TRACE_INTERNALS[0x88]_TEST_MAINL41=0x1
--- a/tracefw/tracecompiler/test/MultipleMmpTraceErrorApps/data/referencelog.txt	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,13 +0,0 @@
-error: ExtraCppFile2.cpp, line 37: Trace does not need to use extension macro
-error: ExtraCppFile2.cpp, line 38: Trace does not need to use extension macro
-error: ExtraCppFile2.cpp, line 42: Parameter count does not match the format specification
-error: You have exceeded the number of Group IDs you have allocated.
-warning: Deprecated group TRACE_API detected. Updating to TRACE_BORDER in dictionary. Please update source code!
-warning: Deprecated group TRACE_DETAILED detected. Updating to TRACE_INTERNALS in dictionary. Please update source code!
-warning: Deprecated group TRACE_DEBUG detected. Updating to TRACE_DUMP in dictionary. Please update source code!
-error: MultipleMmpTraceErrorApp2.cpp, line 52: Trace does not need to use extension macro
-error: MultipleMmpTraceErrorApp2.cpp, line 53: Trace does not need to use extension macro
-error: MultipleMmpTraceErrorApp2.cpp, line 57: Trace is used from multiple places
-error: MultipleMmpTraceErrorApp2.cpp, line 58: Trace is used from multiple places
-error: MultipleMmpTraceErrorApp2.cpp, line 65: Parameter count does not match the format specification
-error: MultipleMmpTraceErrorApp2.cpp, line 101: Run out of Group IDs. You can try to reuse unused group ids by deleting fixed id definition file.
--- a/tracefw/tracecompiler/test/MultipleMmpTraceErrorApps/group/MultipleMmpTraceErrorApp1.mmp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-
-TARGET		  MultipleCppTraceErrorApp1.exe
-TARGETTYPE	  exe
-UID			 0 0xE8576D96
-
-APP_LAYER_SYSTEMINCLUDE
-
-USERINCLUDE	 ../inc
-USERINCLUDE  ../traces
-
-SOURCEPATH	  ../src
-SOURCE		  MultipleMmpTraceErrorApp1.cpp 
-SOURCE 		  ExtraCppFile1.cpp
-
-LIBRARY		 euser.lib
-
-#ifdef ENABLE_ABIV2_MODE
-DEBUGGABLE_UDEBONLY
-#endif
--- a/tracefw/tracecompiler/test/MultipleMmpTraceErrorApps/group/MultipleMmpTraceErrorApp2.mmp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-
-TARGET		  MultipleCppTraceErrorApp2.exe
-TARGETTYPE	  exe
-UID			 0 0xE8576D95
-
-APP_LAYER_SYSTEMINCLUDE
-
-USERINCLUDE	 ..\inc
-USERINCLUDE  ..\traces
-
-SOURCEPATH	  ..\src
-SOURCE		  MultipleMmpTraceErrorApp2.cpp 
-SOURCE		  ExtraCppFile2.cpp
-
-LIBRARY		 euser.lib
-
-#ifdef ENABLE_ABIV2_MODE
-DEBUGGABLE_UDEBONLY
-#endif
--- a/tracefw/tracecompiler/test/MultipleMmpTraceErrorApps/group/bld.inf	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-
-PRJ_PLATFORMS
-DEFAULT
-
-PRJ_MMPFILES
-MultipleMmpTraceErrorApp1.mmp
-MultipleMmpTraceErrorApp2.mmp
--- a/tracefw/tracecompiler/test/MultipleMmpTraceErrorApps/inc/MultipleMmpTraceErrorApp.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef __TRACEERRORAPP_H__
-#define __TRACEERRORAPP_H__
-
-//  Include Files
-
-#include <e32base.h>
-
-//  Function Prototypes
-
-GLDEF_C TInt E32Main();
-void CallSomeMoreTraceStatements();
-
-#endif  // __TRACEERRORAPP_H__
-
--- a/tracefw/tracecompiler/test/MultipleMmpTraceErrorApps/sis/TraceErrorApp_EKA2.pkg	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-;
-; Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-; All rights reserved.
-; This component and the accompanying materials are made available
-; under the terms of "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:
-;
-; Description: 
-;
-; Installation file for Symbian OS 9.x for generic console application
-; Installation file for TraceErrorApp EXE
-;
-; This is an auto-generated PKG file by Carbide.
-; This file uses variables specific to Carbide builds that will not work
-; on command-line builds. If you want to use this generated PKG file from the
-; command-line tools you will need to modify the variables with the appropriate
-; values: $(EPOCROOT), $(PLATFORM), $(TARGET)
-;
-
-;
-; UID is the exe's UID
-;
-#{"TraceErrorApp EXE"},(0xE8576D92),1,0,0
-
-
-;Localised Vendor name
-%{"Vendor-EN"}
-
-;Unique Vendor name
-:"Vendor"
-
-"$(EPOCROOT)Epoc32\release\$(PLATFORM)\$(TARGET)\TraceErrorApp.exe"		  -"!:\sys\bin\TraceErrorApp.exe"
-
--- a/tracefw/tracecompiler/test/MultipleMmpTraceErrorApps/src/ExtraCppFile1.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-/*
- * ExtraCppFile.cpp
- *
- *  Created on: Dec 7, 2009
- *      Author: cajagu
- */
-
-#include "MultipleMmpTraceErrorApp.h"
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "ExtraCppFile1Traces.h"
-#endif
-
-void CallSomeMoreTraceStatements()
-    {
-    TInt32 x = 555;
-    TUint32 y = 666;
-    
-    //In these two cases Trace Compiler should give a error that an extension macro isn't necessary:
-    //"TraceErrorApp.cpp, line xx: Trace does not need to use extension macro"
-    OstTraceExt1( TRACE_FLOW, TEST1_CALLMORE, "CallSomeMoreTraceStatements(): x=%d" , x );
-    OstTraceExt1( TRACE_FLOW, TEST2_CALLMORE, "CallSomeMoreTraceStatements(): y=%u" , y );
-    
-    //Wrong API i.e more parameters than it takes
-    //"TraceErrorApp.cpp, line xx: Parameter count does not match the format specification"
-    OstTrace0( TRACE_FLOW, TEST3_CALLMORE, "CallSomeMoreTraceStatements(): x=%d" ,x);
-    }
--- a/tracefw/tracecompiler/test/MultipleMmpTraceErrorApps/src/ExtraCppFile2.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-/*
- * ExtraCppFile.cpp
- *
- *  Created on: Dec 7, 2009
- *      Author: cajagu
- */
-
-#include "MultipleMmpTraceErrorApp.h"
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "ExtraCppFile2Traces.h"
-#endif
-
-void CallSomeMoreTraceStatements()
-    {
-    TInt32 x = 555;
-    TUint32 y = 666;
-    
-    //In these two cases Trace Compiler should give a error that an extension macro isn't necessary:
-    //"TraceErrorApp.cpp, line xx: Trace does not need to use extension macro"
-    OstTraceExt1( TRACE_FLOW, TEST1_CALLMORE, "CallSomeMoreTraceStatements(): x=%d" , x );
-    OstTraceExt1( TRACE_FLOW, TEST2_CALLMORE, "CallSomeMoreTraceStatements(): y=%u" , y );
-    
-    //Wrong API i.e more parameters than it takes
-    //"TraceErrorApp.cpp, line xx: Parameter count does not match the format specification"
-    OstTrace0( TRACE_FLOW, TEST3_CALLMORE, "CallSomeMoreTraceStatements(): x=%d" ,x);
-    }
--- a/tracefw/tracecompiler/test/MultipleMmpTraceErrorApps/src/MultipleMmpTraceErrorApp1.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,158 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-//  Include Files  
-
-#include "MultipleMmpTraceErrorApp.h"
-#include <e32base.h>
-#include <e32std.h>
-#include <e32cons.h>			// Console
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "MultipleMmpTraceErrorApp1Traces.h"
-#endif
-
-//  Constants
-
-_LIT(KTextConsoleTitle, "Console");
-_LIT(KTextFailed, " failed, leave code = %d");
-_LIT(KTextPressAnyKey, " [press any key]\n");
-
-//  Global Variables
-
-LOCAL_D CConsoleBase* console; // write all messages to this
-
-
-//  Local Functions
-
-LOCAL_C void MainL()
-    {
-    /****************************SHOULD GIVE ERRORS*******************************/
-    _LIT8(KTestDes,"Test Descriptor");
-    TInt32 x = 555;
-    TUint32 y = 666;
-    
-    //In these two cases Trace Compiler should give a error that an extension macro isn't necessary:
-    //"TraceErrorApp.cpp, line xx: Trace does not need to use extension macro"
-    OstTraceExt1( TRACE_FLOW, TEST1_MAINL, "MainL(): x=%d" , x );
-    OstTraceExt1( TRACE_FLOW, TEST2_MAINL, "MainL(): y=%u" , y );
-    
-    //This should give an error stating that the trace name is duplicated
-    //"TraceErrorApp.cpp, line xx: Trace is used from multiple places"
-    OstTrace0( TRACE_FLOW, TEST3_MAINL, "MainL()" );
-    OstTrace0( TRACE_FLOW, TEST3_MAINL, "MainL()" );
-    
-    //This should NOT give an error stating that the arguments don't match format spec
-    //OstTraceExt2( TRACE_FLOW, TEST4_MAINL, "MainL(): x=%d;KTestDes=%d", x, KTestDes );
-
-    //Wrong API i.e more parameters than it takes
-    //"TraceErrorApp.cpp, line xx: Parameter count does not match the format specification"
-    OstTrace0( TRACE_FLOW, TEST5_MAINL, "MainL(): x=%d" ,x);
-    
-    //Too many User-defined group ids should be max of 32 but there are 33 here), should get an error
-    //"You have exceeded the number of Group IDs you have allocated."
-    OstTrace0( MY_GROUP_ID1, TEST_MAINL6, "MainL()" );
-    OstTrace0( MY_GROUP_ID2, TEST_MAINL7, "MainL()" );
-    OstTrace0( MY_GROUP_ID3, TEST_MAINL8, "MainL()" );
-    OstTrace0( MY_GROUP_ID4, TEST_MAINL9, "MainL()" );
-    OstTrace0( MY_GROUP_ID5, TEST_MAINL10, "MainL()" );
-    OstTrace0( MY_GROUP_ID6, TEST_MAINL11, "MainL()" );
-    OstTrace0( MY_GROUP_ID7, TEST_MAINL12, "MainL()" );
-    OstTrace0( MY_GROUP_ID8, TEST_MAINL13, "MainL()" );
-    OstTrace0( MY_GROUP_ID9, TEST_MAINL14, "MainL()" );
-    OstTrace0( MY_GROUP_ID10, TEST_MAINL15, "MainL()" );
-    OstTrace0( MY_GROUP_ID11, TEST_MAINL16, "MainL()" );
-    OstTrace0( MY_GROUP_ID12, TEST_MAINL17, "MainL()" );
-    OstTrace0( MY_GROUP_ID13, TEST_MAINL18, "MainL()" );
-    OstTrace0( MY_GROUP_ID14, TEST_MAINL19, "MainL()" );
-    OstTrace0( MY_GROUP_ID15, TEST_MAINL20, "MainL()" );
-    OstTrace0( MY_GROUP_ID16, TEST_MAINL21, "MainL()" );
-    OstTrace0( MY_GROUP_ID17, TEST_MAINL22, "MainL()" );
-    OstTrace0( MY_GROUP_ID18, TEST_MAINL23, "MainL()" );
-    OstTrace0( MY_GROUP_ID19, TEST_MAINL24, "MainL()" );
-    OstTrace0( MY_GROUP_ID20, TEST_MAINL25, "MainL()" );
-    OstTrace0( MY_GROUP_ID21, TEST_MAINL26, "MainL()" );
-    OstTrace0( MY_GROUP_ID22, TEST_MAINL27, "MainL()" );
-    OstTrace0( MY_GROUP_ID23, TEST_MAINL28, "MainL()" );
-    OstTrace0( MY_GROUP_ID24, TEST_MAINL29, "MainL()" );
-    OstTrace0( MY_GROUP_ID25, TEST_MAINL30, "MainL()" );
-    OstTrace0( MY_GROUP_ID26, TEST_MAINL31, "MainL()" );
-    OstTrace0( MY_GROUP_ID27, TEST_MAINL32, "MainL()" );
-    OstTrace0( MY_GROUP_ID28, TEST_MAINL33, "MainL()" );
-    OstTrace0( MY_GROUP_ID29, TEST_MAINL34, "MainL()" );
-    OstTrace0( MY_GROUP_ID30, TEST_MAINL35, "MainL()" );
-    OstTrace0( MY_GROUP_ID31, TEST_MAINL36, "MainL()" );
-    OstTrace0( MY_GROUP_ID32, TEST_MAINL37, "MainL()" );
-    OstTrace0( MY_GROUP_ID33, TEST_MAINL38, "MainL()" );    
-    /*****************************************************************************/
-    
-    
-    /******************************SHOULD GIVE WARNINGS***************************/
-    //Should get warnings from using deprecated GIDs
-    //e.g. "Deprecated group TRACE_API detected. Updating to TRACE_BORDER in dictionary. Please update source code!"
-    OstTrace0( TRACE_API, TEST_MAINL39, "MainL()" );  
-    OstTrace0( TRACE_IMPORTANT, TEST_MAINL40, "MainL()" );  
-    OstTrace0( TRACE_DETAILED, TEST_MAINL41, "MainL()" );
-    OstTrace0( TRACE_DEBUG, TEST_MAINL42, "MainL()" );  
-    /*****************************************************************************/
-    
-    CallSomeMoreTraceStatements();
-    
-    console->Write(_L("Hello, world!\n"));
-    }
-
-LOCAL_C void DoStartL()
-    {
-    // Create active scheduler (to run active objects)
-    CActiveScheduler* scheduler = new (ELeave) CActiveScheduler();
-    CleanupStack::PushL(scheduler);
-    CActiveScheduler::Install(scheduler);
-
-    MainL();
-
-    // Delete active scheduler
-    CleanupStack::PopAndDestroy(scheduler);
-    }
-
-//  Global Functions
-
-GLDEF_C TInt E32Main()
-    {
-    // Create cleanup stack
-    __UHEAP_MARK;
-    CTrapCleanup* cleanup = CTrapCleanup::New();
-
-    // Create output console
-    TRAPD(createError, console = Console::NewL(KTextConsoleTitle, TSize(
-            KConsFullScreen, KConsFullScreen)));
-    if (createError)
-        return createError;
-
-    // Run application code inside TRAP harness, wait keypress when terminated
-    TRAPD(mainError, DoStartL());
-    if (mainError)
-        console->Printf(KTextFailed, mainError);
-    console->Printf(KTextPressAnyKey);
-    console->Getch();
-
-    delete console;
-    delete cleanup;
-    __UHEAP_MARKEND;
-    return KErrNone;
-    }
-
--- a/tracefw/tracecompiler/test/MultipleMmpTraceErrorApps/src/MultipleMmpTraceErrorApp2.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,158 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-//  Include Files  
-
-#include "MultipleMmpTraceErrorApp.h"
-#include <e32base.h>
-#include <e32std.h>
-#include <e32cons.h>			// Console
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "MultipleMmpTraceErrorApp2Traces.h"
-#endif
-
-//  Constants
-
-_LIT(KTextConsoleTitle, "Console");
-_LIT(KTextFailed, " failed, leave code = %d");
-_LIT(KTextPressAnyKey, " [press any key]\n");
-
-//  Global Variables
-
-LOCAL_D CConsoleBase* console; // write all messages to this
-
-
-//  Local Functions
-
-LOCAL_C void MainL()
-    {
-    /****************************SHOULD GIVE ERRORS*******************************/
-    _LIT8(KTestDes,"Test Descriptor");
-    TInt32 x = 555;
-    TUint32 y = 666;
-    
-    //In these two cases Trace Compiler should give a error that an extension macro isn't necessary:
-    //"TraceErrorApp.cpp, line xx: Trace does not need to use extension macro"
-    OstTraceExt1( TRACE_FLOW, TEST1_MAINL, "MainL(): x=%d" , x );
-    OstTraceExt1( TRACE_FLOW, TEST2_MAINL, "MainL(): y=%u" , y );
-    
-    //This should give an error stating that the trace name is duplicated
-    //"TraceErrorApp.cpp, line xx: Trace is used from multiple places"
-    OstTrace0( TRACE_FLOW, TEST3_MAINL, "MainL()" );
-    OstTrace0( TRACE_FLOW, TEST3_MAINL, "MainL()" );
-    
-    //This should NOT give an error stating that the arguments don't match format spec
-    //OstTraceExt2( TRACE_FLOW, TEST4_MAINL, "MainL(): x=%d;KTestDes=%d", x, KTestDes );
-
-    //Wrong API i.e more parameters than it takes
-    //"TraceErrorApp.cpp, line xx: Parameter count does not match the format specification"
-    OstTrace0( TRACE_FLOW, TEST5_MAINL, "MainL(): x=%d" ,x);
-    
-    //Too many User-defined group ids should be max of 32 but there are 33 here), should get an error
-    //"You have exceeded the number of Group IDs you have allocated."
-    OstTrace0( MY_GROUP_ID1, TEST_MAINL6, "MainL()" );
-    OstTrace0( MY_GROUP_ID2, TEST_MAINL7, "MainL()" );
-    OstTrace0( MY_GROUP_ID3, TEST_MAINL8, "MainL()" );
-    OstTrace0( MY_GROUP_ID4, TEST_MAINL9, "MainL()" );
-    OstTrace0( MY_GROUP_ID5, TEST_MAINL10, "MainL()" );
-    OstTrace0( MY_GROUP_ID6, TEST_MAINL11, "MainL()" );
-    OstTrace0( MY_GROUP_ID7, TEST_MAINL12, "MainL()" );
-    OstTrace0( MY_GROUP_ID8, TEST_MAINL13, "MainL()" );
-    OstTrace0( MY_GROUP_ID9, TEST_MAINL14, "MainL()" );
-    OstTrace0( MY_GROUP_ID10, TEST_MAINL15, "MainL()" );
-    OstTrace0( MY_GROUP_ID11, TEST_MAINL16, "MainL()" );
-    OstTrace0( MY_GROUP_ID12, TEST_MAINL17, "MainL()" );
-    OstTrace0( MY_GROUP_ID13, TEST_MAINL18, "MainL()" );
-    OstTrace0( MY_GROUP_ID14, TEST_MAINL19, "MainL()" );
-    OstTrace0( MY_GROUP_ID15, TEST_MAINL20, "MainL()" );
-    OstTrace0( MY_GROUP_ID16, TEST_MAINL21, "MainL()" );
-    OstTrace0( MY_GROUP_ID17, TEST_MAINL22, "MainL()" );
-    OstTrace0( MY_GROUP_ID18, TEST_MAINL23, "MainL()" );
-    OstTrace0( MY_GROUP_ID19, TEST_MAINL24, "MainL()" );
-    OstTrace0( MY_GROUP_ID20, TEST_MAINL25, "MainL()" );
-    OstTrace0( MY_GROUP_ID21, TEST_MAINL26, "MainL()" );
-    OstTrace0( MY_GROUP_ID22, TEST_MAINL27, "MainL()" );
-    OstTrace0( MY_GROUP_ID23, TEST_MAINL28, "MainL()" );
-    OstTrace0( MY_GROUP_ID24, TEST_MAINL29, "MainL()" );
-    OstTrace0( MY_GROUP_ID25, TEST_MAINL30, "MainL()" );
-    OstTrace0( MY_GROUP_ID26, TEST_MAINL31, "MainL()" );
-    OstTrace0( MY_GROUP_ID27, TEST_MAINL32, "MainL()" );
-    OstTrace0( MY_GROUP_ID28, TEST_MAINL33, "MainL()" );
-    OstTrace0( MY_GROUP_ID29, TEST_MAINL34, "MainL()" );
-    OstTrace0( MY_GROUP_ID30, TEST_MAINL35, "MainL()" );
-    OstTrace0( MY_GROUP_ID31, TEST_MAINL36, "MainL()" );
-    OstTrace0( MY_GROUP_ID32, TEST_MAINL37, "MainL()" );
-    OstTrace0( MY_GROUP_ID33, TEST_MAINL38, "MainL()" );    
-    /*****************************************************************************/
-    
-    
-    /******************************SHOULD GIVE WARNINGS***************************/
-    //Should get warnings from using deprecated GIDs
-    //e.g. "Deprecated group TRACE_API detected. Updating to TRACE_BORDER in dictionary. Please update source code!"
-    OstTrace0( TRACE_API, TEST_MAINL39, "MainL()" );  
-    OstTrace0( TRACE_IMPORTANT, TEST_MAINL40, "MainL()" );  
-    OstTrace0( TRACE_DETAILED, TEST_MAINL41, "MainL()" );
-    OstTrace0( TRACE_DEBUG, TEST_MAINL42, "MainL()" );  
-    /*****************************************************************************/
-    
-    CallSomeMoreTraceStatements();
-    
-    console->Write(_L("Hello, world!\n"));
-    }
-
-LOCAL_C void DoStartL()
-    {
-    // Create active scheduler (to run active objects)
-    CActiveScheduler* scheduler = new (ELeave) CActiveScheduler();
-    CleanupStack::PushL(scheduler);
-    CActiveScheduler::Install(scheduler);
-
-    MainL();
-
-    // Delete active scheduler
-    CleanupStack::PopAndDestroy(scheduler);
-    }
-
-//  Global Functions
-
-GLDEF_C TInt E32Main()
-    {
-    // Create cleanup stack
-    __UHEAP_MARK;
-    CTrapCleanup* cleanup = CTrapCleanup::New();
-
-    // Create output console
-    TRAPD(createError, console = Console::NewL(KTextConsoleTitle, TSize(
-            KConsFullScreen, KConsFullScreen)));
-    if (createError)
-        return createError;
-
-    // Run application code inside TRAP harness, wait keypress when terminated
-    TRAPD(mainError, DoStartL());
-    if (mainError)
-        console->Printf(KTextFailed, mainError);
-    console->Printf(KTextPressAnyKey);
-    console->Getch();
-
-    delete console;
-    delete cleanup;
-    __UHEAP_MARKEND;
-    return KErrNone;
-    }
-
--- a/tracefw/tracecompiler/test/MultipleMmpTraceErrorApps/traces/OstTraceDefinitions.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-#ifndef __OSTTRACEDEFINITIONS_H__
-#define __OSTTRACEDEFINITIONS_H__
-// OST_TRACE_COMPILER_IN_USE flag has been added by Trace Compiler
-// REMOVE BEFORE CHECK-IN TO VERSION CONTROL
-#define OST_TRACE_COMPILER_IN_USE
-#include <OpenSystemTrace.h>
-#endif
--- a/tracefw/tracecompiler/test/MultipleMmpTraceErrorApps/traces/fixed_id.definitions	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,9 +0,0 @@
-#Fixed group and trace id definitions. If this file is removed, the identifiers are rebuilt.
-[GROUP]TRACE_BORDER=0x84
-[GROUP]TRACE_DUMP=0x89
-[GROUP]TRACE_IMPORTANT=0x85
-[GROUP]TRACE_INTERNALS=0x88
-[TRACE]TRACE_BORDER[0x84]_TEST_MAINL39=0x1
-[TRACE]TRACE_DUMP[0x89]_TEST_MAINL42=0x1
-[TRACE]TRACE_IMPORTANT[0x85]_TEST_MAINL40=0x1
-[TRACE]TRACE_INTERNALS[0x88]_TEST_MAINL41=0x1
--- a/tracefw/tracecompiler/test/TraceErrorApp/data/referencelog.txt	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,10 +0,0 @@
-error: You have exceeded the number of Group IDs you have allocated.
-warning: Deprecated group TRACE_API detected. Updating to TRACE_BORDER in dictionary. Please update source code!
-warning: Deprecated group TRACE_DETAILED detected. Updating to TRACE_INTERNALS in dictionary. Please update source code!
-warning: Deprecated group TRACE_DEBUG detected. Updating to TRACE_DUMP in dictionary. Please update source code!
-error: TraceErrorApp.cpp, line 52: Trace does not need to use extension macro
-error: TraceErrorApp.cpp, line 53: Trace does not need to use extension macro
-error: TraceErrorApp.cpp, line 57: Trace is used from multiple places
-error: TraceErrorApp.cpp, line 58: Trace is used from multiple places
-error: TraceErrorApp.cpp, line 65: Parameter count does not match the format specification
-error: TraceErrorApp.cpp, line 101: Run out of Group IDs. You can try to reuse unused group ids by deleting fixed id definition file.
--- a/tracefw/tracecompiler/test/TraceErrorApp/group/TraceErrorApp.mmp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-
-TARGET		  TraceErrorApp.exe
-TARGETTYPE	  exe
-UID			 0 0xE8576D92
-
-APP_LAYER_SYSTEMINCLUDE
-
-USERINCLUDE	 ../inc
-USERINCLUDE  ../traces
-
-SOURCEPATH	  ../src
-SOURCE		  TraceErrorApp.cpp
-
-LIBRARY		 euser.lib
-
-#ifdef ENABLE_ABIV2_MODE
-  DEBUGGABLE_UDEBONLY
-#endif
--- a/tracefw/tracecompiler/test/TraceErrorApp/group/bld.inf	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,24 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-
-PRJ_PLATFORMS
-DEFAULT
-
-PRJ_MMPFILES
-TraceErrorApp.mmp
--- a/tracefw/tracecompiler/test/TraceErrorApp/inc/TraceErrorApp.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef __TRACEERRORAPP_H__
-#define __TRACEERRORAPP_H__
-
-//  Include Files
-
-#include <e32base.h>
-
-//  Function Prototypes
-
-GLDEF_C TInt E32Main();
-
-#endif  // __TRACEERRORAPP_H__
-
--- a/tracefw/tracecompiler/test/TraceErrorApp/sis/TraceErrorApp_EKA2.pkg	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-;
-; Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-; All rights reserved.
-; This component and the accompanying materials are made available
-; under the terms of "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:
-;
-; Description: 
-;
-; Installation file for Symbian OS 9.x for generic console application
-; Installation file for TraceErrorApp EXE
-;
-; This is an auto-generated PKG file by Carbide.
-; This file uses variables specific to Carbide builds that will not work
-; on command-line builds. If you want to use this generated PKG file from the
-; command-line tools you will need to modify the variables with the appropriate
-; values: $(EPOCROOT), $(PLATFORM), $(TARGET)
-;
-
-;
-; UID is the exe's UID
-;
-#{"TraceErrorApp EXE"},(0xE8576D92),1,0,0
-
-
-;Localised Vendor name
-%{"Vendor-EN"}
-
-;Unique Vendor name
-:"Vendor"
-
-"$(EPOCROOT)Epoc32\release\$(PLATFORM)\$(TARGET)\TraceErrorApp.exe"		  -"!:\sys\bin\TraceErrorApp.exe"
-
--- a/tracefw/tracecompiler/test/TraceErrorApp/src/TraceErrorApp.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,155 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-//  Include Files  
-
-#include "TraceErrorApp.h"
-#include <e32base.h>
-#include <e32std.h>
-#include <e32cons.h>			// Console
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "TraceErrorAppTraces.h"
-#endif
-
-//  Constants
-
-_LIT(KTextConsoleTitle, "Console");
-_LIT(KTextFailed, " failed, leave code = %d");
-_LIT(KTextPressAnyKey, " [press any key]\n");
-
-//  Global Variables
-
-LOCAL_D CConsoleBase* console; // write all messages to this
-
-
-//  Local Functions
-
-LOCAL_C void MainL()
-    {
-    /****************************SHOULD GIVE ERRORS*******************************/
-    _LIT8(KTestDes,"Test Descriptor");
-    TInt32 x = 555;
-    TUint32 y = 666;
-    
-    //In these two cases Trace Compiler should give a error that an extension macro isn't necessary:
-    //"TraceErrorApp.cpp, line xx: Trace does not need to use extension macro"
-    OstTraceExt1( TRACE_FLOW, TEST1_MAINL, "MainL(): x=%d" , x );
-    OstTraceExt1( TRACE_FLOW, TEST2_MAINL, "MainL(): y=%u" , y );
-    
-    //This should give an error stating that the trace name is duplicated
-    //"TraceErrorApp.cpp, line xx: Trace is used from multiple places"
-    OstTrace0( TRACE_FLOW, TEST3_MAINL, "MainL()" );
-    OstTrace0( TRACE_FLOW, TEST3_MAINL, "MainL()" );
-    
-    //This should NOT give an error stating that the arguments don't match format spec
-    //OstTraceExt2( TRACE_FLOW, TEST4_MAINL, "MainL(): x=%d;KTestDes=%d", x, KTestDes );
-
-    //Wrong API i.e more parameters than it takes
-    //"TraceErrorApp.cpp, line xx: Parameter count does not match the format specification"
-    OstTrace0( TRACE_FLOW, TEST5_MAINL, "MainL(): x=%d" ,x);
-    
-    //Too many User-defined group ids should be max of 32 but there are 33 here), should get an error
-    //"You have exceeded the number of Group IDs you have allocated."
-    OstTrace0( MY_GROUP_ID1, TEST_MAINL6, "MainL()" );
-    OstTrace0( MY_GROUP_ID2, TEST_MAINL7, "MainL()" );
-    OstTrace0( MY_GROUP_ID3, TEST_MAINL8, "MainL()" );
-    OstTrace0( MY_GROUP_ID4, TEST_MAINL9, "MainL()" );
-    OstTrace0( MY_GROUP_ID5, TEST_MAINL10, "MainL()" );
-    OstTrace0( MY_GROUP_ID6, TEST_MAINL11, "MainL()" );
-    OstTrace0( MY_GROUP_ID7, TEST_MAINL12, "MainL()" );
-    OstTrace0( MY_GROUP_ID8, TEST_MAINL13, "MainL()" );
-    OstTrace0( MY_GROUP_ID9, TEST_MAINL14, "MainL()" );
-    OstTrace0( MY_GROUP_ID10, TEST_MAINL15, "MainL()" );
-    OstTrace0( MY_GROUP_ID11, TEST_MAINL16, "MainL()" );
-    OstTrace0( MY_GROUP_ID12, TEST_MAINL17, "MainL()" );
-    OstTrace0( MY_GROUP_ID13, TEST_MAINL18, "MainL()" );
-    OstTrace0( MY_GROUP_ID14, TEST_MAINL19, "MainL()" );
-    OstTrace0( MY_GROUP_ID15, TEST_MAINL20, "MainL()" );
-    OstTrace0( MY_GROUP_ID16, TEST_MAINL21, "MainL()" );
-    OstTrace0( MY_GROUP_ID17, TEST_MAINL22, "MainL()" );
-    OstTrace0( MY_GROUP_ID18, TEST_MAINL23, "MainL()" );
-    OstTrace0( MY_GROUP_ID19, TEST_MAINL24, "MainL()" );
-    OstTrace0( MY_GROUP_ID20, TEST_MAINL25, "MainL()" );
-    OstTrace0( MY_GROUP_ID21, TEST_MAINL26, "MainL()" );
-    OstTrace0( MY_GROUP_ID22, TEST_MAINL27, "MainL()" );
-    OstTrace0( MY_GROUP_ID23, TEST_MAINL28, "MainL()" );
-    OstTrace0( MY_GROUP_ID24, TEST_MAINL29, "MainL()" );
-    OstTrace0( MY_GROUP_ID25, TEST_MAINL30, "MainL()" );
-    OstTrace0( MY_GROUP_ID26, TEST_MAINL31, "MainL()" );
-    OstTrace0( MY_GROUP_ID27, TEST_MAINL32, "MainL()" );
-    OstTrace0( MY_GROUP_ID28, TEST_MAINL33, "MainL()" );
-    OstTrace0( MY_GROUP_ID29, TEST_MAINL34, "MainL()" );
-    OstTrace0( MY_GROUP_ID30, TEST_MAINL35, "MainL()" );
-    OstTrace0( MY_GROUP_ID31, TEST_MAINL36, "MainL()" );
-    OstTrace0( MY_GROUP_ID32, TEST_MAINL37, "MainL()" );
-    OstTrace0( MY_GROUP_ID33, TEST_MAINL38, "MainL()" );    
-    /*****************************************************************************/
-    
-    
-    /******************************SHOULD GIVE WARNINGS***************************/
-    //Should get warnings from using deprecated GIDs
-    //e.g. "Deprecated group TRACE_API detected. Updating to TRACE_BORDER in dictionary. Please update source code!"
-    OstTrace0( TRACE_API, TEST_MAINL39, "MainL()" );  
-    OstTrace0( TRACE_IMPORTANT, TEST_MAINL40, "MainL()" );  
-    OstTrace0( TRACE_DETAILED, TEST_MAINL41, "MainL()" );
-    OstTrace0( TRACE_DEBUG, TEST_MAINL42, "MainL()" );  
-    /*****************************************************************************/
-    console->Write(_L("Hello, world!\n"));
-    }
-
-LOCAL_C void DoStartL()
-    {
-    // Create active scheduler (to run active objects)
-    CActiveScheduler* scheduler = new (ELeave) CActiveScheduler();
-    CleanupStack::PushL(scheduler);
-    CActiveScheduler::Install(scheduler);
-
-    MainL();
-
-    // Delete active scheduler
-    CleanupStack::PopAndDestroy(scheduler);
-    }
-
-//  Global Functions
-
-GLDEF_C TInt E32Main()
-    {
-    // Create cleanup stack
-    __UHEAP_MARK;
-    CTrapCleanup* cleanup = CTrapCleanup::New();
-
-    // Create output console
-    TRAPD(createError, console = Console::NewL(KTextConsoleTitle, TSize(
-            KConsFullScreen, KConsFullScreen)));
-    if (createError)
-        return createError;
-
-    // Run application code inside TRAP harness, wait keypress when terminated
-    TRAPD(mainError, DoStartL());
-    if (mainError)
-        console->Printf(KTextFailed, mainError);
-    console->Printf(KTextPressAnyKey);
-    console->Getch();
-
-    delete console;
-    delete cleanup;
-    __UHEAP_MARKEND;
-    return KErrNone;
-    }
-
--- a/tracefw/tracecompiler/test/TraceErrorApp/traces/OstTraceDefinitions.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-#ifndef __OSTTRACEDEFINITIONS_H__
-#define __OSTTRACEDEFINITIONS_H__
-// OST_TRACE_COMPILER_IN_USE flag has been added by Trace Compiler
-// REMOVE BEFORE CHECK-IN TO VERSION CONTROL
-#define OST_TRACE_COMPILER_IN_USE
-#include <OpenSystemTrace.h>
-#endif
--- a/tracefw/tracecompiler/test/TraceErrorApp/traces/fixed_id.definitions	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,9 +0,0 @@
-#Fixed group and trace id definitions. If this file is removed, the identifiers are rebuilt.
-[GROUP]TRACE_BORDER=0x84
-[GROUP]TRACE_DUMP=0x89
-[GROUP]TRACE_IMPORTANT=0x85
-[GROUP]TRACE_INTERNALS=0x88
-[TRACE]TRACE_BORDER[0x84]_TEST_MAINL39=0x1
-[TRACE]TRACE_DUMP[0x89]_TEST_MAINL42=0x1
-[TRACE]TRACE_IMPORTANT[0x85]_TEST_MAINL40=0x1
-[TRACE]TRACE_INTERNALS[0x88]_TEST_MAINL41=0x1
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/console/group/HelloTraceConsole.mmp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-
-TARGET		  HelloTraceConsole.exe
-TARGETTYPE	  exe
-UID			  0 0xE40349E4
-
-OS_LAYER_SYSTEMINCLUDE
-USERINCLUDE	   ../inc
-USERINCLUDE    ../../dll/inc
-USERINCLUDE    ../traces
-
-SOURCEPATH	  ../src
-SOURCE		  HelloTraceConsole.cpp
-
-LIBRARY		  euser.lib
-LIBRARY       HelloTraceDll.lib
-
-#ifdef ENABLE_ABIV2_MODE
-DEBUGGABLE_UDEBONLY
-#endif
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/console/group/bld.inf	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-
-PRJ_PLATFORMS
-DEFAULT
-
-PRJ_EXPORTS
-hellotraceconsole.iby             CORE_OS_LAYER_IBY_EXPORT_PATH(hellotraceconsole.iby)
-
-PRJ_MMPFILES
-HelloTraceConsole.mmp
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/console/group/hellotraceconsole.iby	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,24 +0,0 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "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:
-//
-// Description:
-// ROM build file for tracecore project
-
-#ifndef HELLOTRACECONSOLE_IBY
-#define HELLOTRACECONSOLE_IBY
-
-#include <core\os\hellotracedll.iby>
-
-file=ABI_DIR\BUILD_DIR\hellotraceconsole.exe    Sys\Bin\hellotraceconsole.exe
-
-#endif //HELLOTRACECONSOLE_IBY
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/console/inc/HelloTraceConsole.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef __HELLOTRACECONSOLE_H__
-#define __HELLOTRACECONSOLE_H__
-
-//  Include Files
-
-#include <e32base.h>
-
-//  Function Prototypes
-
-GLDEF_C TInt E32Main();
-
-#endif  // __HELLOTRACECONSOLE_H__
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/console/src/HelloTraceConsole.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,124 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#include <e32cons.h>			// Console
-
-#include "HelloTraceConsole.h"
-#include "HelloTraceExample.h"
-
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTraceConsoleTraces.h"
-#endif
-
-
-_LIT(KTextConsoleTitle, "HelloTrace");
-_LIT(KTextPressAnyKey, " [press any key]\n");
-
-LOCAL_D CConsoleBase* console; // write all messages to this
-
-LOCAL_C void DoExamples()
-    {
-    TInt err = KErrNone;
-
-    console->Printf(_L("Before main tracing examples ...\n"));
-
-    console->Printf(_L(" Before type examples ..."));
-    console->Printf(KTextPressAnyKey);
-    console->Getch();
-    TRAP(err, HelloTraceExample::JustTypes());    
-    if (err)
-        console->Printf(_L(" Failed with error %d\n"), err);
-
-    console->Printf(_L(" Before Interface examples ..."));
-    console->Printf(KTextPressAnyKey);
-    console->Getch();
-    TRAP(err, HelloTraceExample::Interface());    
-    if (err)
-        console->Printf(_L(" Failed with error %d\n"), err);
-    
-    console->Printf(_L(" Before FnEntryExit examples ..."));
-    console->Printf(KTextPressAnyKey);
-    console->Getch();
-    TRAP(err, HelloTraceExample::FnEntryExit());    
-    if (err)
-        console->Printf(_L(" Failed with error %d\n"), err);    
-    }
-
-LOCAL_C void DoStartL()
-    {
-    // Create active scheduler (to run active objects)
-    CActiveScheduler* scheduler = new (ELeave) CActiveScheduler();
-    CleanupStack::PushL(scheduler);
-    CActiveScheduler::Install(scheduler);
-
-    DoExamples();
-    
-    // Delete active scheduler
-    CleanupStack::PopAndDestroy(scheduler);
-    }
-
-//  Global Functions
-
-GLDEF_C TInt E32Main()
-    {
-    OstTraceFunctionEntry0( E32MAIN_ENTRY );
-    
-    // Create cleanup stack
-    __UHEAP_MARK;
-    CTrapCleanup* cleanup = CTrapCleanup::New();
-
-    // Create output console
-    TRAPD(createError, 
-          console = Console::NewL(KTextConsoleTitle, 
-                                  TSize(KConsFullScreen, KConsFullScreen)));    
-    if (createError)
-        {
-        delete cleanup;
-        OstTrace1( TRACE_ERROR, E32MAIN_CREATE_ERROR, "Failed to create console error: %d", createError);
-        OstTraceFunctionExit0( E32MAIN_EXIT_ERR );
-        return createError;
-        }
-
-    TRAPD(mainError, DoStartL());    
-    if (mainError)
-        {
-        OstTrace1( TRACE_ERROR, E32MAIN_START_ERROR, "DoStartL failed with error: %d", mainError);
-        console->Printf(_L("DoStartL failed with error: %d\n\n"), mainError);
-        }
-    else 
-        {
-        console->Printf(_L("Before panic tracing example ..."));
-        console->Printf(KTextPressAnyKey);
-        console->Getch();
-    
-        OstTrace0( TRACE_FLOW, E32MAIN_BEFORE_PANIC, "About to cause a panic ..." );
-        HelloTraceExample::PanicTrace();
-        
-        console->Printf(KTextPressAnyKey);
-        console->Getch();
-        }
-
-    delete console;
-    delete cleanup;
-    __UHEAP_MARKEND;
-    
-    OstTraceFunctionExit0( E32MAIN_EXIT );
-    return KErrNone;
-    }
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/bwins/HelloTraceDllu.def	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,14 +0,0 @@
-EXPORTS
-	?Version@CHelloTraceInterface@@SA?AVTVersion@@XZ @ 1 NONAME ; class TVersion CHelloTraceInterface::Version(void)
-	?NewLC@CHelloTraceInterface@@SAPAV1@XZ @ 2 NONAME ; class CHelloTraceInterface * CHelloTraceInterface::NewLC(void)
-	?JustTypes@HelloTraceExample@@SAXXZ @ 3 NONAME ; void HelloTraceExample::JustTypes(void)
-	?Interface@HelloTraceExample@@SAXXZ @ 4 NONAME ; void HelloTraceExample::Interface(void)
-	?FnEntryExit@HelloTraceExample@@SAXXZ @ 5 NONAME ; void HelloTraceExample::FnEntryExit(void)
-	?ResetString@CHelloTraceInterface@@QAEXXZ @ 6 NONAME ; void CHelloTraceInterface::ResetString(void)
-	?AddCharL@CHelloTraceInterface@@QAEXABVTChar@@@Z @ 7 NONAME ; void CHelloTraceInterface::AddCharL(class TChar const &)
-	?PanicTrace@HelloTraceExample@@SAXXZ @ 8 NONAME ; void HelloTraceExample::PanicTrace(void)
-	??1CHelloTraceInterface@@UAE@XZ @ 9 NONAME ; CHelloTraceInterface::~CHelloTraceInterface(void)
-	?String@CHelloTraceInterface@@QBE?BVTPtrC16@@XZ @ 10 NONAME ; class TPtrC16 const CHelloTraceInterface::String(void) const
-	?RemoveLast@CHelloTraceInterface@@QAEXXZ @ 11 NONAME ; void CHelloTraceInterface::RemoveLast(void)
-	?NewL@CHelloTraceInterface@@SAPAV1@XZ @ 12 NONAME ; class CHelloTraceInterface * CHelloTraceInterface::NewL(void)
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/eabi/HelloTraceDllu.def	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,20 +0,0 @@
-EXPORTS
-	_ZN17HelloTraceExample10PanicTraceEv @ 1 NONAME
-	_ZN17HelloTraceExample11FnEntryExitEv @ 2 NONAME
-	_ZN17HelloTraceExample9InterfaceEv @ 3 NONAME
-	_ZN17HelloTraceExample9JustTypesEv @ 4 NONAME
-	_ZN20CHelloTraceInterface10RemoveLastEv @ 5 NONAME
-	_ZN20CHelloTraceInterface11ResetStringEv @ 6 NONAME
-	_ZN20CHelloTraceInterface4NewLEv @ 7 NONAME
-	_ZN20CHelloTraceInterface5NewLCEv @ 8 NONAME
-	_ZN20CHelloTraceInterface7VersionEv @ 9 NONAME
-	_ZN20CHelloTraceInterface8AddCharLERK5TChar @ 10 NONAME
-	_ZN20CHelloTraceInterfaceD0Ev @ 11 NONAME
-	_ZN20CHelloTraceInterfaceD1Ev @ 12 NONAME
-	_ZN20CHelloTraceInterfaceD2Ev @ 13 NONAME
-	_ZNK20CHelloTraceInterface6StringEv @ 14 NONAME
-	_ZTI13CHelloTraceFn @ 15 NONAME
-	_ZTI20CHelloTraceInterface @ 16 NONAME
-	_ZTV13CHelloTraceFn @ 17 NONAME
-	_ZTV20CHelloTraceInterface @ 18 NONAME
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/group/HelloTraceDll.mmp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-
-TARGET		  HelloTraceDll.dll
-TARGETTYPE	  dll
-UID			  0x1000008d 0xE43DF43E
-CAPABILITY    ReadUserData
-
-OS_LAYER_SYSTEMINCLUDE
-USERINCLUDE  ../inc ../incDup
-USERINCLUDE  ../traces
-
-SOURCEPATH	 ../src
-SOURCE       HelloTraceExample.cpp 
-SOURCE       HelloTraceTypes.cpp
-SOURCE       HelloTraceInterface.cpp 
-SOURCE       HelloTraceFn.cpp 
-SOURCE       HelloTracePanic.cpp 
-
-LIBRARY		 euser.lib
-
-#ifdef ENABLE_ABIV2_MODE
-DEBUGGABLE_UDEBONLY
-#endif
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/group/HelloTraceDll2.mmp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-
-TARGET		  HelloTraceDll2.dll
-TARGETTYPE	  dll
-UID			  0x1000008d 0xE43DF43F
-CAPABILITY    ReadUserData
-
-OS_LAYER_SYSTEMINCLUDE
-USERINCLUDE  ../inc ../incDup
-USERINCLUDE  ../traces
-
-SOURCEPATH	 ../src
-SOURCE       HelloTraceExample.cpp 
-SOURCE       HelloTraceTypes.cpp
-SOURCE       HelloTraceInterface.cpp 
-SOURCE       HelloTraceFn.cpp 
-SOURCE       HelloTracePanic.cpp 
-
-LIBRARY		 euser.lib
-
-#ifdef ENABLE_ABIV2_MODE
-DEBUGGABLE_UDEBONLY
-#endif
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/group/bld.inf	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-
-PRJ_PLATFORMS
-DEFAULT
-
-PRJ_EXPORTS
-hellotracedll.iby             CORE_OS_LAYER_IBY_EXPORT_PATH(hellotracedll.iby)
-
-PRJ_MMPFILES
-HelloTraceDll.mmp
-HelloTraceDll2.mmp
\ No newline at end of file
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/group/hellotracedll.iby	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "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:
-//
-// Description:
-// ROM build file for tracecore project
-
-#ifndef HELLOTRACEDLL_IBY
-#define HELLOTRACEDLL_IBY
-
-file=ABI_DIR\BUILD_DIR\hellotracedll.dll        Sys\Bin\hellotracedll.dll
-file=ABI_DIR\BUILD_DIR\hellotracedll2.dll        Sys\Bin\hellotracedll2.dll
-
-#endif //HELLOTRACEDLL_IBY
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/inc/HelloTraceExample.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef __HELLOTRACEEXAMPLE_H__
-#define __HELLOTRACEEXAMPLE_H__
-
-#include <e32std.h>
-
-class HelloTraceExample
-    {
-public:
-    IMPORT_C static void JustTypes();    
-    IMPORT_C static void Interface();    
-    IMPORT_C static void FnEntryExit();    
-    IMPORT_C static void PanicTrace();    
-
-    // @TODO add examples for state macros
-    // @TODO add examples for event macros
-    // @TODO add examples for OstTraceData
-    // @TODO add compile-time selector examples
-    // @TODO add macro wrapper examples
-    };
-
-#endif  // __HELLOTRACEEXAMPLE_H__
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/inc/HelloTraceFn.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,122 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef HELLOTRACEFN_H_
-#define HELLOTRACEFN_H_
-
-#include <e32base.h>    // CBase
-
-class CHelloTraceFn : public CBase
-    {
-public:
-    
-    // Note the Trace Builder will only parse this if it's in a cpp file
-    // but not from here :(
-    // Also if you add a new enum you need to reparse the enum - it doesn't
-    // get automatically reparsed by the Trace Compiler :(
-    enum TFnEnum
-        {
-        EExample1,
-        EExample2 = 2, 
-        // EExample3 = EExample2 + 1, // The Trace Builder can't parse this :(
-        };
-    
-public:
-    static CHelloTraceFn* NewL();
-    static CHelloTraceFn* NewLC();
-    ~CHelloTraceFn();
-   
-public: // Fn entry / exit tracing examples 
-    void Simple();
-    void OutputsParams(TInt aParam, TFnEnum aEnumParam);
-    void OutputsSignedIntegers(TInt8 aParam8,   TInt16 aParam16, 
-                               TInt32 aParam32, TInt64 aParam64);
-    void OutputsUnsignedIntegers(TUint8 aParam8,   TUint16 aParam16, 
-                                 TUint32 aParam32, TUint64 aParam64);
-     
-    TInt OutputsTIntReturnValue();
-    TInt64 OutputsTInt64ReturnValue();
-    TFnEnum OutputsTFnEnumReturnValue();
-
-    CActive* OutputsUnknownPtrType(CActive* aActive);
-    CActive& OutputsUnknownRefType(CActive& aActive);
-    
-    void OutputMissingParams(TInt aUsedParam, TInt aCommentParam, TInt aMissingParam);
-
-#ifdef _DEBUG    
-    void PreProcessedFn(TInt aDbgParam);
-#else
-    void PreProcessedFn();
-#endif
-    
-    static void StaticOutputsParamsL(TInt aParam);  
-    
-    // duplicate all the function and put the impl in the header file HelloTraceFnDup.h
-    void SimpleDup();
-    void OutputsParamsDup(TInt aParam, TFnEnum aEnumParam);
-    void OutputsSignedIntegersDup(TInt8 aParam8,   TInt16 aParam16, 
-                               TInt32 aParam32, TInt64 aParam64);
-    void OutputsUnsignedIntegersDup(TUint8 aParam8,   TUint16 aParam16, 
-                                 TUint32 aParam32, TUint64 aParam64);
-     
-    TInt OutputsTIntReturnValueDup();
-    TInt64 OutputsTInt64ReturnValueDup();
-    TFnEnum OutputsTFnEnumReturnValueDup();
-
-    CActive* OutputsUnknownPtrTypeDup(CActive* aActive);
-    CActive& OutputsUnknownRefTypeDup(CActive& aActive);
-    
-    void OutputMissingParamsDup(TInt aUsedParam, TInt aCommentParam, TInt aMissingParam);
-
-#ifdef _DEBUG    
-    void PreProcessedFnDup(TInt aDbgParam);
-#else
-    void PreProcessedFnDup();
-#endif
-    static void StaticOutputsParamsDupL(TInt aParam);  
-    
-    // duplicate all the function again and put the impl in the header file HelloTraceFnDup2.h
-    void SimpleDup2();
-    void OutputsParamsDup2(TInt aParam, TFnEnum aEnumParam);
-    void OutputsSignedIntegersDup2(TInt8 aParam8,   TInt16 aParam16, 
-                               TInt32 aParam32, TInt64 aParam64);
-    void OutputsUnsignedIntegersDup2(TUint8 aParam8,   TUint16 aParam16, 
-                                 TUint32 aParam32, TUint64 aParam64);
-     
-    TInt OutputsTIntReturnValueDup2();
-    TInt64 OutputsTInt64ReturnValueDup2();
-    TFnEnum OutputsTFnEnumReturnValueDup2();
-
-    CActive* OutputsUnknownPtrTypeDup2(CActive* aActive);
-    CActive& OutputsUnknownRefTypeDup2(CActive& aActive);
-    
-    void OutputMissingParamsDup2(TInt aUsedParam, TInt aCommentParam, TInt aMissingParam);
-
-#ifdef _DEBUG    
-    void PreProcessedFnDup2(TInt aDbgParam);
-#else
-    void PreProcessedFnDup2();
-#endif
-    static void StaticOutputsParamsDup2L(TInt aParam);  
-
-
-private:
-    CHelloTraceFn();
-    };
-
-#endif /* HELLOTRACEFN_H_ */
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/inc/HelloTraceFn2.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,122 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef HELLOTRACEFN2_H_
-#define HELLOTRACEFN2_H_
-
-#include <e32base.h>    // CBase
-
-class CHelloTraceFn : public CBase
-    {
-public:
-    
-    // Note the Trace Builder will only parse this if it's in a cpp file
-    // but not from here :(
-    // Also if you add a new enum you need to reparse the enum - it doesn't
-    // get automatically reparsed by the Trace Compiler :(
-    enum TFnEnum
-        {
-        EExample1,
-        EExample2 = 2, 
-        // EExample3 = EExample2 + 1, // The Trace Builder can't parse this :(
-        };
-    
-public:
-    static CHelloTraceFn* NewL();
-    static CHelloTraceFn* NewLC();
-    ~CHelloTraceFn();
-   
-public: // Fn entry / exit tracing examples 
-    void Simple();
-    void OutputsParams(TInt aParam, TFnEnum aEnumParam);
-    void OutputsSignedIntegers(TInt8 aParam8,   TInt16 aParam16, 
-                               TInt32 aParam32, TInt64 aParam64);
-    void OutputsUnsignedIntegers(TUint8 aParam8,   TUint16 aParam16, 
-                                 TUint32 aParam32, TUint64 aParam64);
-     
-    TInt OutputsTIntReturnValue();
-    TInt64 OutputsTInt64ReturnValue();
-    TFnEnum OutputsTFnEnumReturnValue();
-
-    CActive* OutputsUnknownPtrType(CActive* aActive);
-    CActive& OutputsUnknownRefType(CActive& aActive);
-    
-    void OutputMissingParams(TInt aUsedParam, TInt aCommentParam, TInt aMissingParam);
-
-#ifdef _DEBUG    
-    void PreProcessedFn(TInt aDbgParam);
-#else
-    void PreProcessedFn();
-#endif
-    
-    static void StaticOutputsParamsL(TInt aParam);  
-    
-    // duplicate all the function and put the impl in the header file HelloTraceFnDup.h
-    void SimpleDup();
-    void OutputsParamsDup(TInt aParam, TFnEnum aEnumParam);
-    void OutputsSignedIntegersDup(TInt8 aParam8,   TInt16 aParam16, 
-                               TInt32 aParam32, TInt64 aParam64);
-    void OutputsUnsignedIntegersDup(TUint8 aParam8,   TUint16 aParam16, 
-                                 TUint32 aParam32, TUint64 aParam64);
-     
-    TInt OutputsTIntReturnValueDup();
-    TInt64 OutputsTInt64ReturnValueDup();
-    TFnEnum OutputsTFnEnumReturnValueDup();
-
-    CActive* OutputsUnknownPtrTypeDup(CActive* aActive);
-    CActive& OutputsUnknownRefTypeDup(CActive& aActive);
-    
-    void OutputMissingParamsDup(TInt aUsedParam, TInt aCommentParam, TInt aMissingParam);
-
-#ifdef _DEBUG    
-    void PreProcessedFnDup(TInt aDbgParam);
-#else
-    void PreProcessedFnDup();
-#endif
-    static void StaticOutputsParamsDupL(TInt aParam);  
-    
-    // duplicate all the function again and put the impl in the header file HelloTraceFnDup2.h
-    void SimpleDup2();
-    void OutputsParamsDup2(TInt aParam, TFnEnum aEnumParam);
-    void OutputsSignedIntegersDup2(TInt8 aParam8,   TInt16 aParam16, 
-                               TInt32 aParam32, TInt64 aParam64);
-    void OutputsUnsignedIntegersDup2(TUint8 aParam8,   TUint16 aParam16, 
-                                 TUint32 aParam32, TUint64 aParam64);
-     
-    TInt OutputsTIntReturnValueDup2();
-    TInt64 OutputsTInt64ReturnValueDup2();
-    TFnEnum OutputsTFnEnumReturnValueDup2();
-
-    CActive* OutputsUnknownPtrTypeDup2(CActive* aActive);
-    CActive& OutputsUnknownRefTypeDup2(CActive& aActive);
-    
-    void OutputMissingParamsDup2(TInt aUsedParam, TInt aCommentParam, TInt aMissingParam);
-
-#ifdef _DEBUG    
-    void PreProcessedFnDup2(TInt aDbgParam);
-#else
-    void PreProcessedFnDup2();
-#endif
-    static void StaticOutputsParamsDup2L(TInt aParam);  
-
-
-private:
-    CHelloTraceFn();
-    };
-
-#endif /* HELLOTRACEFN2_H_ */
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/inc/HelloTraceInterface.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,63 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef __HELLOTRACEINTERFACE_H__
-#define __HELLOTRACEINTERFACE_H__
-
-#include <e32base.h>	// CBase
-#include <e32std.h>	 // TBuf
-
-const TInt KHelloTraceDllBufferLength = 10;
-typedef TBuf<KHelloTraceDllBufferLength> THelloTraceDllExampleString;
-
-class CHelloTraceInterface : public CBase
-    {
-public:
-    IMPORT_C static CHelloTraceInterface* NewL();
-    IMPORT_C static CHelloTraceInterface* NewLC();
-    IMPORT_C ~CHelloTraceInterface();
-
-public:
-    IMPORT_C static TVersion Version();
-    IMPORT_C const TPtrC String() const;
-    IMPORT_C void AddCharL(const TChar& aChar);
-    IMPORT_C void RemoveLast();
-    IMPORT_C void ResetString();
-    
-    IMPORT_C static TVersion VersionDup();
-    IMPORT_C const TPtrC StringDup() const;
-    IMPORT_C void AddCharDupL(const TChar& aChar);
-    IMPORT_C void RemoveLastDup();
-    IMPORT_C void ResetStringDup();
-
-    IMPORT_C static TVersion VersionDup2();
-    IMPORT_C const TPtrC StringDup2() const;
-    IMPORT_C void AddCharDup2L(const TChar& aChar);
-    IMPORT_C void RemoveLastDup2();
-    IMPORT_C void ResetStringDup2();
-private:
-    CHelloTraceInterface();
-    void ConstructL();
-
-private:
-    // data
-    THelloTraceDllExampleString* iString;
-    };
-
-#endif  // __HELLOTRACEINTERFACE_H__
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/inc/HelloTraceInterface2.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,63 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef __HELLOTRACEINTERFACE2_H__
-#define __HELLOTRACEINTERFACE2_H__
-
-#include <e32base.h>	// CBase
-#include <e32std.h>	 // TBuf
-
-const TInt KHelloTraceDllBufferLength = 10;
-typedef TBuf<KHelloTraceDllBufferLength> THelloTraceDllExampleString;
-
-class CHelloTraceInterface : public CBase
-    {
-public:
-    IMPORT_C static CHelloTraceInterface* NewL();
-    IMPORT_C static CHelloTraceInterface* NewLC();
-    IMPORT_C ~CHelloTraceInterface();
-
-public:
-    IMPORT_C static TVersion Version();
-    IMPORT_C const TPtrC String() const;
-    IMPORT_C void AddCharL(const TChar& aChar);
-    IMPORT_C void RemoveLast();
-    IMPORT_C void ResetString();
-    
-    IMPORT_C static TVersion VersionDup();
-    IMPORT_C const TPtrC StringDup() const;
-    IMPORT_C void AddCharDupL(const TChar& aChar);
-    IMPORT_C void RemoveLastDup();
-    IMPORT_C void ResetStringDup();
-
-    IMPORT_C static TVersion VersionDup2();
-    IMPORT_C const TPtrC StringDup2() const;
-    IMPORT_C void AddCharDup2L(const TChar& aChar);
-    IMPORT_C void RemoveLastDup2();
-    IMPORT_C void ResetStringDup2();
-private:
-    CHelloTraceInterface();
-    void ConstructL();
-
-private:
-    // data
-    THelloTraceDllExampleString* iString;
-    };
-
-#endif  // __HELLOTRACEINTERFACE2_H__
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/inc/HelloTracePanic.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef __HELLOTRACEDLL_PAN__
-#define __HELLOTRACEDLL_PAN__
-
-//  Data Types
-
-enum THelloTraceDllPanic
-    {
-    EHelloTraceDllExamplePanic,
-    EHelloTraceDllNullPointer,
-    };
-
-//  Function Prototypes
-
-GLREF_C void Panic(THelloTraceDllPanic aPanic);
-
-#endif  // __HELLOTRACEDLL_PAN__
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/inc/HelloTraceTypes.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef __HELLOTRACETYPES_H__
-#define __HELLOTRACETYPES_H__
-
-class HelloTraceTypes
-    {
-public:
-    static void SignedIntegers();
-    static void UnsignedIntegers();
-    static void Descriptors();
-    
-    static void SignedIntegersDup();
-    static void UnsignedIntegersDup();
-    static void DescriptorsDup();
-        
-    static void SignedIntegersDup2();
-    static void UnsignedIntegersDup2();
-    static void DescriptorsDup2();
-    };
-
-#endif  // __HELLOTRACETYPES_H__
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/inc/HelloTraceTypes2.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef __HELLOTRACETYPES2_H__
-#define __HELLOTRACETYPES2_H__
-
-class HelloTraceTypes
-    {
-public:
-    static void SignedIntegers();
-    static void UnsignedIntegers();
-    static void Descriptors();
-    
-    static void SignedIntegersDup();
-    static void UnsignedIntegersDup();
-    static void DescriptorsDup();
-        
-    static void SignedIntegersDup2();
-    static void UnsignedIntegersDup2();
-    static void DescriptorsDup2();
-    };
-
-#endif  // __HELLOTRACETYPES2_H__
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/incDup/HelloTraceFn2Dup.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,156 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
- 
-#ifndef HELLOTRACEFNDUP2_H_
-#define HELLOTRACEFNDUP2_H_
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTraceFn2DupTraces.h"
-#endif
-
-inline void CHelloTraceFn::SimpleDup()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_SIMPLE2_DUP_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_SIMPLE2_DUP_EXIT, this );
-    }
-
-inline void CHelloTraceFn::OutputsParamsDup(TInt aParam, TFnEnum aEnumParam)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSPARAMS2_DUP_ENTRY, this );
-    Simple();
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSPARAMS2_DUP_EXIT, this );
-    }
-
-inline void CHelloTraceFn::StaticOutputsParamsDupL(TInt aParam)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_STATICOUTPUTSPARAMS2_DUP_ENTRY, NULL );
-    CHelloTraceFn* example = CHelloTraceFn::NewLC();
-    example->SimpleDup();    
-    CleanupStack::PopAndDestroy(example);
-    OstTraceFunctionExit0( CHELLOTRACEFN_STATICOUTPUTSPARAMS2_DUP_EXIT );    
-    }
-
-inline void CHelloTraceFn::OutputsSignedIntegersDup(TInt8 aParam8,   TInt16 aParam16, 
-                                          TInt32 aParam32, TInt64 aParam64)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS2_DUP_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS2_DUP_EXIT, this );
-    }
-
-void CHelloTraceFn::OutputsUnsignedIntegersDup(TUint8 aParam8,   TUint16 aParam16, 
-                                            TUint32 aParam32, TUint64 aParam64)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS2_DUP_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS2_DUP_EXIT, this );
-    }
-
-
-inline TInt CHelloTraceFn::OutputsTIntReturnValueDup()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE2_DUP_ENTRY, this );
-    TInt ret = KErrNone;
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE2_DUP_EXIT, this, ret );
-    return ret;
-    }
-
-inline TInt64 CHelloTraceFn::OutputsTInt64ReturnValueDup()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE2_DUP_ENTRY, this );
-    TInt64 ret = (TInt64) 2 << 40;
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE2_DUP_EXIT, this, ret );
-    return ret;
-    }
-
-inline CHelloTraceFn::TFnEnum CHelloTraceFn::OutputsTFnEnumReturnValueDup()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE2_DUP_ENTRY, this );
-    TFnEnum ret = EExample1;
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE2_DUP_EXIT, this, ret );
-    return ret;    
-    }
-
-inline CActive* CHelloTraceFn::OutputsUnknownPtrTypeDup(CActive* aActive)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE2_DUP_ENTRY, this );    
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE2_DUP_EXIT, this, (TUint) aActive );
-    return aActive;
-    }
-
-inline CActive& CHelloTraceFn::OutputsUnknownRefTypeDup(CActive& aActive)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE2_DUP_ENTRY, this );
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE2_DUP_EXIT, this, (TUint) &aActive );    
-    return aActive;
-    }
-
-// The following doesn't compile as the Trace Compiler doesn't generate
-// the correct OstTraceGenExt(...) function for it
-//void CHelloTraceFn::OutputMissingParamsBug(TInt /*aCommentParam*/, TInt)
-//    {
-//    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_ENTRY, this );
-//    // ...
-//    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_EXIT, this );    
-//    }
-
-// The following compiles and works but outputs the following warning
-// warning: HelloTraceFn.cpp, line xxx: Parameter did not have a name and was not added to trace
-// The fact that this cannot be suppressed is a known problem we're working on.
-inline void CHelloTraceFn::OutputMissingParamsDup(TInt aUsedParam, TInt /*aCommentParam*/, TInt)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMS2_DUP_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMS2_DUP_EXIT, this );
-    }
-
-// The following doesn't work as the Trace Compiler outputs:
-// error: HelloTraceFn.cpp, line xxx: Class / function name for trace could not be determined x3
-//#ifdef _DEBUG
-//void CHelloTraceFn::PreProcessedFn(TInt aDbgParam)
-//    {
-//    OstTraceFunctionEntryExt( PRE_PROCESSED_ENTRTY_1, this );
-//#else
-//void CHelloTraceFn::PreProcessedFn()
-//    {
-//    OstTraceFunctionEntry1( PRE_PROCESSED_ENTRTY_2, this );
-//#endif
-//    Simple();
-//    OstTraceFunctionExit1( CHELLOTRACEFN_PREPROCESSEDFN_EXIT, this );
-//    }
-
-// Workaround example code until a proper fix is provided
-#ifdef _DEBUG
-inline void CHelloTraceFn::PreProcessedFnDup(TInt aDbgParam)
-    {
-    OstTraceExt2( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN2_DUP_ENTRY_1, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;aDbgParam=%d;this=%x", (TInt) aDbgParam, (TUint) this);
-#else
-    inline void CHelloTraceFn::PreProcessedFnDup()
-    {
-    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN2_DUP_ENTRY_2, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
-#endif
-    SimpleDup();
-    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN2_DUP_EXIT, "CHelloTraceFn::PreProcessedFn: < CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
-    }
-
-#endif /* HELLOTRACEFN2DUP_H_ */
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/incDup/HelloTraceFn2Dup2.inl	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,156 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
- 
-#ifndef HELLOTRACEFN2DUP2_H_
-#define HELLOTRACEFN2DUP2_H_
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTraceFn2Dup2Traces.h"
-#endif
-
-inline void CHelloTraceFn::SimpleDup2()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_SIMPLE2_DUP2_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_SIMPLE2_DUP2_EXIT, this );
-    }
-
-inline void CHelloTraceFn::OutputsParamsDup2(TInt aParam, TFnEnum aEnumParam)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSPARAMS2_DUP2_ENTRY, this );
-    Simple();
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSPARAMS2_DUP2_EXIT, this );
-    }
-
-inline void CHelloTraceFn::StaticOutputsParamsDup2L(TInt aParam)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_STATICOUTPUTSPARAMS2_DUP2_ENTRY, NULL );
-    CHelloTraceFn* example = CHelloTraceFn::NewLC();
-    example->SimpleDup2();    
-    CleanupStack::PopAndDestroy(example);
-    OstTraceFunctionExit0( CHELLOTRACEFN_STATICOUTPUTSPARAMS2_DUP2_EXIT );    
-    }
-
-inline void CHelloTraceFn::OutputsSignedIntegersDup2(TInt8 aParam8,   TInt16 aParam16, 
-                                          TInt32 aParam32, TInt64 aParam64)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS2_DUP2_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS2_DUP2_EXIT, this );
-    }
-
-inline void CHelloTraceFn::OutputsUnsignedIntegersDup2(TUint8 aParam8,   TUint16 aParam16, 
-                                            TUint32 aParam32, TUint64 aParam64)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS2_DUP2_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS2_DUP2_EXIT, this );
-    }
-
-
-inline TInt CHelloTraceFn::OutputsTIntReturnValueDup2()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE2_DUP2_ENTRY, this );
-    TInt ret = KErrNone;
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE2_DUP2_EXIT, this, ret );
-    return ret;
-    }
-
-inline TInt64 CHelloTraceFn::OutputsTInt64ReturnValueDup2()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE2_DUP2_ENTRY, this );
-    TInt64 ret = (TInt64) 2 << 40;
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE2_DUP2_EXIT, this, ret );
-    return ret;
-    }
-
-inline CHelloTraceFn::TFnEnum CHelloTraceFn::OutputsTFnEnumReturnValueDup2()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE2_DUP2_ENTRY, this );
-    TFnEnum ret = EExample1;
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE2_DUP2_EXIT, this, ret );
-    return ret;    
-    }
-
-inline CActive* CHelloTraceFn::OutputsUnknownPtrTypeDup2(CActive* aActive)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE2_DUP2_ENTRY, this );    
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE2_DUP2_EXIT, this, (TUint) aActive );
-    return aActive;
-    }
-
-inline CActive& CHelloTraceFn::OutputsUnknownRefTypeDup2(CActive& aActive)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE2_DUP2_ENTRY, this );
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE2_DUP2_EXIT, this, (TUint) &aActive );    
-    return aActive;
-    }
-
-// The following doesn't compile as the Trace Compiler doesn't generate
-// the correct OstTraceGenExt(...) function for it
-//void CHelloTraceFn::OutputMissingParamsBug(TInt /*aCommentParam*/, TInt)
-//    {
-//    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_ENTRY, this );
-//    // ...
-//    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_EXIT, this );    
-//    }
-
-// The following compiles and works but outputs the following warning
-// warning: HelloTraceFn.cpp, line xxx: Parameter did not have a name and was not added to trace
-// The fact that this cannot be suppressed is a known problem we're working on.
-inline void CHelloTraceFn::OutputMissingParamsDup2(TInt aUsedParam, TInt /*aCommentParam*/, TInt)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMS2_DUP2_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMS2_DUP2_EXIT, this );
-    }
-
-// The following doesn't work as the Trace Compiler outputs:
-// error: HelloTraceFn.cpp, line xxx: Class / function name for trace could not be determined x3
-//#ifdef _DEBUG
-//void CHelloTraceFn::PreProcessedFn(TInt aDbgParam)
-//    {
-//    OstTraceFunctionEntryExt( PRE_PROCESSED_ENTRTY_1, this );
-//#else
-//void CHelloTraceFn::PreProcessedFn()
-//    {
-//    OstTraceFunctionEntry1( PRE_PROCESSED_ENTRTY_2, this );
-//#endif
-//    Simple();
-//    OstTraceFunctionExit1( CHELLOTRACEFN_PREPROCESSEDFN_EXIT, this );
-//    }
-
-// Workaround example code until a proper fix is provided
-#ifdef _DEBUG
-inline void CHelloTraceFn::PreProcessedFnDup2(TInt aDbgParam)
-    {
-    OstTraceExt2( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN2_DUP2_ENTRY_1, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;aDbgParam=%d;this=%x", (TInt) aDbgParam, (TUint) this);
-#else
-    inline void CHelloTraceFn::PreProcessedFnDup2()
-    {
-    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN2_DUP2_ENTRY_2, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
-#endif
-    SimpleDup2();
-    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN2_DUP2_EXIT, "CHelloTraceFn::PreProcessedFn: < CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
-    }
-
-#endif /* HELLOTRACEFN2DUP2_H_ */
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/incDup/HelloTraceFnDup.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,157 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef HELLOTRACEFNDUP_H_
-#define HELLOTRACEFNDUP_H_
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTraceFnDupTraces.h"
-#endif
-
-inline void CHelloTraceFn::SimpleDup()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_SIMPLE_DUP_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_SIMPLE_DUP_EXIT, this );
-    }
-
-inline void CHelloTraceFn::OutputsParamsDup(TInt aParam, TFnEnum aEnumParam)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSPARAMS_DUP_ENTRY, this );
-    Simple();
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSPARAMS_DUP_EXIT, this );
-    }
-
-inline void CHelloTraceFn::StaticOutputsParamsDupL(TInt aParam)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_STATICOUTPUTSPARAMS_DUP_ENTRY, NULL );
-    CHelloTraceFn* example = CHelloTraceFn::NewLC();
-    example->SimpleDup();    
-    CleanupStack::PopAndDestroy(example);
-    OstTraceFunctionExit0( CHELLOTRACEFN_STATICOUTPUTSPARAMS_DUP_EXIT );    
-    }
-
-inline void CHelloTraceFn::OutputsSignedIntegersDup(TInt8 aParam8,   TInt16 aParam16, 
-                                          TInt32 aParam32, TInt64 aParam64)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS_DUP_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS_DUP_EXIT, this );
-    }
-
-void CHelloTraceFn::OutputsUnsignedIntegersDup(TUint8 aParam8,   TUint16 aParam16, 
-                                            TUint32 aParam32, TUint64 aParam64)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS_DUP_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS_DUP_EXIT, this );
-    }
-
-
-inline TInt CHelloTraceFn::OutputsTIntReturnValueDup()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_DUP_ENTRY, this );
-    TInt ret = KErrNone;
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_DUP_EXIT, this, ret );
-    return ret;
-    }
-
-inline TInt64 CHelloTraceFn::OutputsTInt64ReturnValueDup()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE_DUP_ENTRY, this );
-    TInt64 ret = (TInt64) 2 << 40;
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE_DUP_EXIT, this, ret );
-    return ret;
-    }
-
-inline CHelloTraceFn::TFnEnum CHelloTraceFn::OutputsTFnEnumReturnValueDup()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE_DUP_ENTRY, this );
-    TFnEnum ret = EExample1;
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE_DUP_EXIT, this, ret );
-    return ret;    
-    }
-
-inline CActive* CHelloTraceFn::OutputsUnknownPtrTypeDup(CActive* aActive)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_DUP_ENTRY, this );    
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_DUP_EXIT, this, (TUint) aActive );
-    return aActive;
-    }
-
-inline CActive& CHelloTraceFn::OutputsUnknownRefTypeDup(CActive& aActive)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE_DUP_ENTRY, this );
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE_DUP_EXIT, this, (TUint) &aActive );    
-    return aActive;
-    }
-
-// The following doesn't compile as the Trace Compiler doesn't generate
-// the correct OstTraceGenExt(...) function for it
-//void CHelloTraceFn::OutputMissingParamsBug(TInt /*aCommentParam*/, TInt)
-//    {
-//    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_ENTRY, this );
-//    // ...
-//    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_EXIT, this );    
-//    }
-
-// The following compiles and works but outputs the following warning
-// warning: HelloTraceFn.cpp, line xxx: Parameter did not have a name and was not added to trace
-// The fact that this cannot be suppressed is a known problem we're working on.
-inline void CHelloTraceFn::OutputMissingParamsDup(TInt aUsedParam, TInt /*aCommentParam*/, TInt)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMS_DUP_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMS_DUP_EXIT, this );
-    }
-
-// The following doesn't work as the Trace Compiler outputs:
-// error: HelloTraceFn.cpp, line xxx: Class / function name for trace could not be determined x3
-//#ifdef _DEBUG
-//void CHelloTraceFn::PreProcessedFn(TInt aDbgParam)
-//    {
-//    OstTraceFunctionEntryExt( PRE_PROCESSED_ENTRTY_1, this );
-//#else
-//void CHelloTraceFn::PreProcessedFn()
-//    {
-//    OstTraceFunctionEntry1( PRE_PROCESSED_ENTRTY_2, this );
-//#endif
-//    Simple();
-//    OstTraceFunctionExit1( CHELLOTRACEFN_PREPROCESSEDFN_EXIT, this );
-//    }
-
-// Workaround example code until a proper fix is provided
-#ifdef _DEBUG
-inline void CHelloTraceFn::PreProcessedFnDup(TInt aDbgParam)
-    {
-    OstTraceExt2( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_DUP_ENTRY_1, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;aDbgParam=%d;this=%x", (TInt) aDbgParam, (TUint) this);
-#else
-    inline void CHelloTraceFn::PreProcessedFnDup()
-    {
-    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_DUP_ENTRY_2, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
-#endif
-    SimpleDup();
-    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_DUP_EXIT, "CHelloTraceFn::PreProcessedFn: < CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
-    }
-
-#endif /* HELLOTRACEFNDUP_H_ */
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/incDup/HelloTraceFnDup2.inl	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,157 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef HELLOTRACEFNDUP2_H_
-#define HELLOTRACEFNDUP2_H_
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTraceFnDup2Traces.h"
-#endif
-
-inline void CHelloTraceFn::SimpleDup2()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_SIMPLE_DUP2_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_SIMPLE_DUP2_EXIT, this );
-    }
-
-inline void CHelloTraceFn::OutputsParamsDup2(TInt aParam, TFnEnum aEnumParam)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSPARAMS_DUP2_ENTRY, this );
-    Simple();
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSPARAMS_DUP2_EXIT, this );
-    }
-
-inline void CHelloTraceFn::StaticOutputsParamsDup2L(TInt aParam)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_STATICOUTPUTSPARAMS_DUP2_ENTRY, NULL );
-    CHelloTraceFn* example = CHelloTraceFn::NewLC();
-    example->SimpleDup2();    
-    CleanupStack::PopAndDestroy(example);
-    OstTraceFunctionExit0( CHELLOTRACEFN_STATICOUTPUTSPARAMS_DUP2_EXIT );    
-    }
-
-inline void CHelloTraceFn::OutputsSignedIntegersDup2(TInt8 aParam8,   TInt16 aParam16, 
-                                          TInt32 aParam32, TInt64 aParam64)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS_DUP2_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS_DUP2_EXIT, this );
-    }
-
-inline void CHelloTraceFn::OutputsUnsignedIntegersDup2(TUint8 aParam8,   TUint16 aParam16, 
-                                            TUint32 aParam32, TUint64 aParam64)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS_DUP2_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS_DUP2_EXIT, this );
-    }
-
-
-inline TInt CHelloTraceFn::OutputsTIntReturnValueDup2()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_DUP2_ENTRY, this );
-    TInt ret = KErrNone;
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_DUP2_EXIT, this, ret );
-    return ret;
-    }
-
-inline TInt64 CHelloTraceFn::OutputsTInt64ReturnValueDup2()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE_DUP2_ENTRY, this );
-    TInt64 ret = (TInt64) 2 << 40;
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE_DUP2_EXIT, this, ret );
-    return ret;
-    }
-
-inline CHelloTraceFn::TFnEnum CHelloTraceFn::OutputsTFnEnumReturnValueDup2()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE_DUP2_ENTRY, this );
-    TFnEnum ret = EExample1;
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE_DUP2_EXIT, this, ret );
-    return ret;    
-    }
-
-inline CActive* CHelloTraceFn::OutputsUnknownPtrTypeDup2(CActive* aActive)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_DUP2_ENTRY, this );    
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_DUP2_EXIT, this, (TUint) aActive );
-    return aActive;
-    }
-
-inline CActive& CHelloTraceFn::OutputsUnknownRefTypeDup2(CActive& aActive)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE_DUP2_ENTRY, this );
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE_DUP2_EXIT, this, (TUint) &aActive );    
-    return aActive;
-    }
-
-// The following doesn't compile as the Trace Compiler doesn't generate
-// the correct OstTraceGenExt(...) function for it
-//void CHelloTraceFn::OutputMissingParamsBug(TInt /*aCommentParam*/, TInt)
-//    {
-//    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_ENTRY, this );
-//    // ...
-//    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_EXIT, this );    
-//    }
-
-// The following compiles and works but outputs the following warning
-// warning: HelloTraceFn.cpp, line xxx: Parameter did not have a name and was not added to trace
-// The fact that this cannot be suppressed is a known problem we're working on.
-inline void CHelloTraceFn::OutputMissingParamsDup2(TInt aUsedParam, TInt /*aCommentParam*/, TInt)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMS_DUP2_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMS_DUP2_EXIT, this );
-    }
-
-// The following doesn't work as the Trace Compiler outputs:
-// error: HelloTraceFn.cpp, line xxx: Class / function name for trace could not be determined x3
-//#ifdef _DEBUG
-//void CHelloTraceFn::PreProcessedFn(TInt aDbgParam)
-//    {
-//    OstTraceFunctionEntryExt( PRE_PROCESSED_ENTRTY_1, this );
-//#else
-//void CHelloTraceFn::PreProcessedFn()
-//    {
-//    OstTraceFunctionEntry1( PRE_PROCESSED_ENTRTY_2, this );
-//#endif
-//    Simple();
-//    OstTraceFunctionExit1( CHELLOTRACEFN_PREPROCESSEDFN_EXIT, this );
-//    }
-
-// Workaround example code until a proper fix is provided
-#ifdef _DEBUG
-inline void CHelloTraceFn::PreProcessedFnDup2(TInt aDbgParam)
-    {
-    OstTraceExt2( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_DUP2_ENTRY_1, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;aDbgParam=%d;this=%x", (TInt) aDbgParam, (TUint) this);
-#else
-    inline void CHelloTraceFn::PreProcessedFnDup2()
-    {
-    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_DUP2_ENTRY_2, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
-#endif
-    SimpleDup2();
-    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_DUP2_EXIT, "CHelloTraceFn::PreProcessedFn: < CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
-    }
-
-#endif /* HELLOTRACEFNDUP2_H_ */
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/incDup/HelloTraceInterface2Dup.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,91 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef __HELLOTRACEINTERFACE2DUP_H__
-#define __HELLOTRACEINTERFACE2DUP_H__
-
-#include "HelloTracePanic.h"
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTraceInterface2DupTraces.h"
-#endif
-
- inline EXPORT_C TVersion CHelloTraceInterface::VersionDup()
-        {
-        const TInt KMajor = 1;
-        const TInt KMinor = 0;
-        const TInt KBuild = 1;
-        TVersion version = TVersion(KMajor, KMinor, KBuild);
-        OstTraceExt1( TRACE_BORDER, CHELLOTRACEDLL_VERSION2_DUP, "CHelloTraceInterface::Version = %S", version.Name());   
-        return version;
-        }
-
- inline EXPORT_C const TPtrC CHelloTraceInterface::StringDup() const
-        {
-        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
-
-        OstTraceDefExt2( OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CHELLOTRACEDLL_STRING2_DUP, 
-                         "[0x%08x] Returned %S", (TUint32) this, *iString);   
-        return *iString;
-        }
-
- inline EXPORT_C void CHelloTraceInterface::AddCharDupL(const TChar& aChar)
-        {
-        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
-
-        OstTraceExt3( TRACE_BORDER, CHELLOTRACEDLL_ADDCHARL2_DUP, 
-                      "[0x%08x] Adding %d to %S", (TUint32) this, (TInt32) aChar, *iString);   
-        if (iString->Length() >= KHelloTraceDllBufferLength)
-            {
-            OstTrace1( TRACE_ERROR, CHELLOTRACEDLL_ADDCHARL_ERR2_DUP,
-                       "[0x%08x] Not enough space to add character", (TUint32) this);
-            User::Leave( KErrTooBig);
-            }
-        iString->Append(aChar);
-        }
-
- inline EXPORT_C void CHelloTraceInterface::RemoveLastDup()
-        {
-        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
-
-        OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_REMOVELAST2_DUP, 
-                      "[0x%08x] Attempting to remove last character from %S", (TUint32) this, *iString);
-        if (iString->Length() > 0)
-            {
-            iString->SetLength(iString->Length() - 1);
-            }
-        else
-            {
-            OstTrace1( TRACE_WARNING, CHELLOTRACEDLL_REMOVELAST_WARN2_DUP, "[0x%08x] String already empty", (TUint32) this);   
-            }
-        }
-
- inline EXPORT_C void CHelloTraceInterface::ResetStringDup()
-        {
-        OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_RESETSTRING2_DUP, "[0x%08x] Reseting string %S", (TUint32) this, *iString);
-        if (iString == NULL)
-            {
-            iString = new (ELeave) THelloTraceDllExampleString;
-            }
-        else
-            {
-            iString->SetLength(0);
-            }
-        }
-#endif  // __HELLOTRACEINTERFACE2DUP_H__
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/incDup/HelloTraceInterface2Dup2.inl	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,91 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef __HELLOTRACEINTERFACE2DUP2_H__
-#define __HELLOTRACEINTERFACE2DUP2_H__
-
-#include "HelloTracePanic.h"
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTraceInterface2Dup2Traces.h"
-#endif
-
- inline EXPORT_C TVersion CHelloTraceInterface::VersionDup2()
-        {
-        const TInt KMajor = 1;
-        const TInt KMinor = 0;
-        const TInt KBuild = 1;
-        TVersion version = TVersion(KMajor, KMinor, KBuild);
-        OstTraceExt1( TRACE_BORDER, CHELLOTRACEDLL_VERSION2_DUP2, "CHelloTraceInterface::Version = %S", version.Name());   
-        return version;
-        }
-
- inline EXPORT_C const TPtrC CHelloTraceInterface::StringDup2() const
-        {
-        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
-
-        OstTraceDefExt2( OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CHELLOTRACEDLL_STRING2_DUP2, 
-                         "[0x%08x] Returned %S", (TUint32) this, *iString);   
-        return *iString;
-        }
-
- inline EXPORT_C void CHelloTraceInterface::AddCharDup2L(const TChar& aChar)
-        {
-        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
-
-        OstTraceExt3( TRACE_BORDER, CHELLOTRACEDLL_ADDCHARL2_DUP2, 
-                      "[0x%08x] Adding %d to %S", (TUint32) this, (TInt32) aChar, *iString);   
-        if (iString->Length() >= KHelloTraceDllBufferLength)
-            {
-            OstTrace1( TRACE_ERROR, CHELLOTRACEDLL_ADDCHARL_ERR2_DUP2,
-                       "[0x%08x] Not enough space to add character", (TUint32) this);
-            User::Leave( KErrTooBig);
-            }
-        iString->Append(aChar);
-        }
-
- inline EXPORT_C void CHelloTraceInterface::RemoveLastDup2()
-        {
-        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
-
-        OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_REMOVELAST2_DUP2, 
-                      "[0x%08x] Attempting to remove last character from %S", (TUint32) this, *iString);
-        if (iString->Length() > 0)
-            {
-            iString->SetLength(iString->Length() - 1);
-            }
-        else
-            {
-            OstTrace1( TRACE_WARNING, CHELLOTRACEDLL_REMOVELAST_WARN2_DUP2, "[0x%08x] String already empty", (TUint32) this);   
-            }
-        }
-
- inline EXPORT_C void CHelloTraceInterface::ResetStringDup2()
-        {
-        OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_RESETSTRING2_DUP2, "[0x%08x] Reseting string %S", (TUint32) this, *iString);
-        if (iString == NULL)
-            {
-            iString = new (ELeave) THelloTraceDllExampleString;
-            }
-        else
-            {
-            iString->SetLength(0);
-            }
-        }
-#endif  // __HELLOTRACEINTERFACE2DUP2_H__
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/incDup/HelloTraceInterfaceDup.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,91 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef __HELLOTRACEINTERFACEDUP_H__
-#define __HELLOTRACEINTERFACEDUP_H__
-
-#include "HelloTracePanic.h"
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTraceInterfaceDupTraces.h"
-#endif
-
- inline EXPORT_C TVersion CHelloTraceInterface::VersionDup()
-        {
-        const TInt KMajor = 1;
-        const TInt KMinor = 0;
-        const TInt KBuild = 1;
-        TVersion version = TVersion(KMajor, KMinor, KBuild);
-        OstTraceExt1( TRACE_BORDER, CHELLOTRACEDLL_VERSION_DUP, "CHelloTraceInterface::Version = %S", version.Name());   
-        return version;
-        }
-
- inline EXPORT_C const TPtrC CHelloTraceInterface::StringDup() const
-        {
-        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
-
-        OstTraceDefExt2( OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CHELLOTRACEDLL_STRING_DUP, 
-                         "[0x%08x] Returned %S", (TUint32) this, *iString);   
-        return *iString;
-        }
-
- inline EXPORT_C void CHelloTraceInterface::AddCharDupL(const TChar& aChar)
-        {
-        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
-
-        OstTraceExt3( TRACE_BORDER, CHELLOTRACEDLL_ADDCHARL_DUP, 
-                      "[0x%08x] Adding %d to %S", (TUint32) this, (TInt32) aChar, *iString);   
-        if (iString->Length() >= KHelloTraceDllBufferLength)
-            {
-            OstTrace1( TRACE_ERROR, CHELLOTRACEDLL_ADDCHARL_ERR_DUP,
-                       "[0x%08x] Not enough space to add character", (TUint32) this);
-            User::Leave( KErrTooBig);
-            }
-        iString->Append(aChar);
-        }
-
- inline EXPORT_C void CHelloTraceInterface::RemoveLastDup()
-        {
-        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
-
-        OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_REMOVELAST_DUP, 
-                      "[0x%08x] Attempting to remove last character from %S", (TUint32) this, *iString);
-        if (iString->Length() > 0)
-            {
-            iString->SetLength(iString->Length() - 1);
-            }
-        else
-            {
-            OstTrace1( TRACE_WARNING, CHELLOTRACEDLL_REMOVELAST_WARN_DUP, "[0x%08x] String already empty", (TUint32) this);   
-            }
-        }
-
- inline EXPORT_C void CHelloTraceInterface::ResetStringDup()
-        {
-        OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_RESETSTRING_DUP, "[0x%08x] Reseting string %S", (TUint32) this, *iString);
-        if (iString == NULL)
-            {
-            iString = new (ELeave) THelloTraceDllExampleString;
-            }
-        else
-            {
-            iString->SetLength(0);
-            }
-        }
-#endif  // __HELLOTRACEINTERFACEDUP_H__
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/incDup/HelloTraceInterfaceDup2.inl	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,91 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef __HELLOTRACEINTERFACEDUP2_H__
-#define __HELLOTRACEINTERFACEDUP2_H__
-
-#include "HelloTracePanic.h"
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTraceInterfaceDup2Traces.h"
-#endif
-
- inline EXPORT_C TVersion CHelloTraceInterface::VersionDup2()
-        {
-        const TInt KMajor = 1;
-        const TInt KMinor = 0;
-        const TInt KBuild = 1;
-        TVersion version = TVersion(KMajor, KMinor, KBuild);
-        OstTraceExt1( TRACE_BORDER, CHELLOTRACEDLL_VERSION_DUP2, "CHelloTraceInterface::Version = %S", version.Name());   
-        return version;
-        }
-
- inline EXPORT_C const TPtrC CHelloTraceInterface::StringDup2() const
-        {
-        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
-
-        OstTraceDefExt2( OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CHELLOTRACEDLL_STRING_DUP2, 
-                         "[0x%08x] Returned %S", (TUint32) this, *iString);   
-        return *iString;
-        }
-
- inline EXPORT_C void CHelloTraceInterface::AddCharDup2L(const TChar& aChar)
-        {
-        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
-
-        OstTraceExt3( TRACE_BORDER, CHELLOTRACEDLL_ADDCHARL_DUP2, 
-                      "[0x%08x] Adding %d to %S", (TUint32) this, (TInt32) aChar, *iString);   
-        if (iString->Length() >= KHelloTraceDllBufferLength)
-            {
-            OstTrace1( TRACE_ERROR, CHELLOTRACEDLL_ADDCHARL_ERR_DUP2,
-                       "[0x%08x] Not enough space to add character", (TUint32) this);
-            User::Leave( KErrTooBig);
-            }
-        iString->Append(aChar);
-        }
-
- inline EXPORT_C void CHelloTraceInterface::RemoveLastDup2()
-        {
-        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
-
-        OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_REMOVELAST_DUP2, 
-                      "[0x%08x] Attempting to remove last character from %S", (TUint32) this, *iString);
-        if (iString->Length() > 0)
-            {
-            iString->SetLength(iString->Length() - 1);
-            }
-        else
-            {
-            OstTrace1( TRACE_WARNING, CHELLOTRACEDLL_REMOVELAST_WARN_DUP2, "[0x%08x] String already empty", (TUint32) this);   
-            }
-        }
-
- inline EXPORT_C void CHelloTraceInterface::ResetStringDup2()
-        {
-        OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_RESETSTRING_DUP2, "[0x%08x] Reseting string %S", (TUint32) this, *iString);
-        if (iString == NULL)
-            {
-            iString = new (ELeave) THelloTraceDllExampleString;
-            }
-        else
-            {
-            iString->SetLength(0);
-            }
-        }
-#endif  // __HELLOTRACEINTERFACEDUP2_H__
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/incDup/HelloTraceTypes2Dup.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,75 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef __HELLOTRACETYPES2DUP_H__
-#define __HELLOTRACETYPES2DUP_H__
-
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTraceTypes2DupTraces.h"
-#endif
-
-inline void HelloTraceTypes::SignedIntegersDup()
-    {
-    TInt8  eightBit     = - (TInt8)  1 << 6;
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS2DUP_8, 
-                  "8 bit signed: %hhd", eightBit );
-    
-    TInt16 sixteenBit   = - (TInt16) 1 << 14; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS2DUP_16, 
-                  "16 bit signed: %hd", sixteenBit );
-
-    TInt32 thirtyTwoBit = - (TInt32) 1 << 30; 
-    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS2DUP_32, 
-               "32 bit signed: %d", thirtyTwoBit );
-
-    TInt64 sixtyFourBit = - (TInt64) 1 << 62; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS2DUP_64, 
-                  "64 bit signed: %Ld", sixtyFourBit );
-    }
-
-inline void HelloTraceTypes::UnsignedIntegersDup()
-    {
-    TUint8  eightBit     = (TUint8)  1 << 6;
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS2DUP_8, 
-                  "8 bit unsigned: %hhu", eightBit );
-    
-    TUint16 sixteenBit   = (TUint16) 1 << 14; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS2DUP_16, 
-                  "16 bit unsigned: %hu", sixteenBit );
-
-    TUint32 thirtyTwoBit = (TUint32) 1 << 30; 
-    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS2DUP_32, 
-               "32 bit unsigned: %u", thirtyTwoBit );
-
-    TUint64 sixtyFourBit = (TUint64) 1 << 62; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS2DUP_64, 
-                  "64 bit unsigned: %Lu", sixtyFourBit );
-    }
-
-inline void HelloTraceTypes::DescriptorsDup()
-    {
-    _LIT8(KAscii, "Some ASCII text");
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_ASCII2DUP, "8 bit descriptor: %s", KAscii() );
-
-    _LIT16(KUnicode, "Some unicode text");    
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNICODE2DUP, "16 bit descriptor: %S", KUnicode() );
-    }
-
-#endif  // __HELLOTRACETYPES2DUP_H__
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/incDup/HelloTraceTypes2Dup2.inl	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,75 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef __HELLOTRACETYPES2DUP2_H__
-#define __HELLOTRACETYPES2DUP2_H__
-
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTraceTypes2Dup2Traces.h"
-#endif
-
-inline void HelloTraceTypes::SignedIntegersDup2()
-    {
-    TInt8  eightBit     = - (TInt8)  1 << 6;
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS2DUP2_8, 
-                  "8 bit signed: %hhd", eightBit );
-    
-    TInt16 sixteenBit   = - (TInt16) 1 << 14; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS2DUP2_16, 
-                  "16 bit signed: %hd", sixteenBit );
-
-    TInt32 thirtyTwoBit = - (TInt32) 1 << 30; 
-    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS2DUP2_32, 
-               "32 bit signed: %d", thirtyTwoBit );
-
-    TInt64 sixtyFourBit = - (TInt64) 1 << 62; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS2DUP2_64, 
-                  "64 bit signed: %Ld", sixtyFourBit );
-    }
-
-inline void HelloTraceTypes::UnsignedIntegersDup2()
-    {
-    TUint8  eightBit     = (TUint8)  1 << 6;
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS2DUP2_8, 
-                  "8 bit unsigned: %hhu", eightBit );
-    
-    TUint16 sixteenBit   = (TUint16) 1 << 14; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS2DUP2_16, 
-                  "16 bit unsigned: %hu", sixteenBit );
-
-    TUint32 thirtyTwoBit = (TUint32) 1 << 30; 
-    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS2DUP2_32, 
-               "32 bit unsigned: %u", thirtyTwoBit );
-
-    TUint64 sixtyFourBit = (TUint64) 1 << 62; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS2DUP2_64, 
-                  "64 bit unsigned: %Lu", sixtyFourBit );
-    }
-
-inline void HelloTraceTypes::DescriptorsDup2()
-    {
-    _LIT8(KAscii, "Some ASCII text");
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_ASCII2DUP2, "8 bit descriptor: %s", KAscii() );
-
-    _LIT16(KUnicode, "Some unicode text");    
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNICODE2DUP2, "16 bit descriptor: %S", KUnicode() );
-    }
-
-#endif  // __HELLOTRACETYPES2DUP2_H__
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/incDup/HelloTraceTypesDup.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,75 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef __HELLOTRACETYPESDUP_H__
-#define __HELLOTRACETYPESDUP_H__
-
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTraceTypesDupTraces.h"
-#endif
-
-inline void HelloTraceTypes::SignedIntegersDup()
-    {
-    TInt8  eightBit     = - (TInt8)  1 << 6;
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP_8, 
-                  "8 bit signed: %hhd", eightBit );
-    
-    TInt16 sixteenBit   = - (TInt16) 1 << 14; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP_16, 
-                  "16 bit signed: %hd", sixteenBit );
-
-    TInt32 thirtyTwoBit = - (TInt32) 1 << 30; 
-    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP_32, 
-               "32 bit signed: %d", thirtyTwoBit );
-
-    TInt64 sixtyFourBit = - (TInt64) 1 << 62; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP_64, 
-                  "64 bit signed: %Ld", sixtyFourBit );
-    }
-
-inline void HelloTraceTypes::UnsignedIntegersDup()
-    {
-    TUint8  eightBit     = (TUint8)  1 << 6;
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP_8, 
-                  "8 bit unsigned: %hhu", eightBit );
-    
-    TUint16 sixteenBit   = (TUint16) 1 << 14; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP_16, 
-                  "16 bit unsigned: %hu", sixteenBit );
-
-    TUint32 thirtyTwoBit = (TUint32) 1 << 30; 
-    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP_32, 
-               "32 bit unsigned: %u", thirtyTwoBit );
-
-    TUint64 sixtyFourBit = (TUint64) 1 << 62; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP_64, 
-                  "64 bit unsigned: %Lu", sixtyFourBit );
-    }
-
-inline void HelloTraceTypes::DescriptorsDup()
-    {
-    _LIT8(KAscii, "Some ASCII text");
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_ASCIIDUP, "8 bit descriptor: %s", KAscii() );
-
-    _LIT16(KUnicode, "Some unicode text");    
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNICODEDUP, "16 bit descriptor: %S", KUnicode() );
-    }
-
-#endif  // __HELLOTRACETYPESDUP_H__
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/incDup/HelloTraceTypesDup2.inl	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,75 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef __HELLOTRACETYPESDUP2_H__
-#define __HELLOTRACETYPESDUP2_H__
-
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTraceTypesDup2Traces.h"
-#endif
-
-inline void HelloTraceTypes::SignedIntegersDup2()
-    {
-    TInt8  eightBit     = - (TInt8)  1 << 6;
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP2_8, 
-                  "8 bit signed: %hhd", eightBit );
-    
-    TInt16 sixteenBit   = - (TInt16) 1 << 14; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP2_16, 
-                  "16 bit signed: %hd", sixteenBit );
-
-    TInt32 thirtyTwoBit = - (TInt32) 1 << 30; 
-    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP2_32, 
-               "32 bit signed: %d", thirtyTwoBit );
-
-    TInt64 sixtyFourBit = - (TInt64) 1 << 62; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP2_64, 
-                  "64 bit signed: %Ld", sixtyFourBit );
-    }
-
-inline void HelloTraceTypes::UnsignedIntegersDup2()
-    {
-    TUint8  eightBit     = (TUint8)  1 << 6;
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP2_8, 
-                  "8 bit unsigned: %hhu", eightBit );
-    
-    TUint16 sixteenBit   = (TUint16) 1 << 14; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP2_16, 
-                  "16 bit unsigned: %hu", sixteenBit );
-
-    TUint32 thirtyTwoBit = (TUint32) 1 << 30; 
-    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP2_32, 
-               "32 bit unsigned: %u", thirtyTwoBit );
-
-    TUint64 sixtyFourBit = (TUint64) 1 << 62; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP2_64, 
-                  "64 bit unsigned: %Lu", sixtyFourBit );
-    }
-
-inline void HelloTraceTypes::DescriptorsDup2()
-    {
-    _LIT8(KAscii, "Some ASCII text");
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_ASCIIDUP2, "8 bit descriptor: %s", KAscii() );
-
-    _LIT16(KUnicode, "Some unicode text");    
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNICODEDUP2, "16 bit descriptor: %S", KUnicode() );
-    }
-
-#endif  // __HELLOTRACETYPESDUP2_H__
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/src/HelloTraceExample.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,106 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-
-#include "HelloTraceExample.h"
-#include "HelloTraceTypes.h"
-#include "HelloTraceInterface.h"
-#include "HelloTraceFn.h"
-#include "HelloTracePanic.h"
-
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTraceExampleTraces.h"
-#endif
-
-EXPORT_C void HelloTraceExample::JustTypes()
-    {
-    OstTrace0( TRACE_EXAMPLE, HELLOTRACEEXAMPLE_JUSTTYPES, "*********************************************** " );
-    
-    HelloTraceTypes::SignedIntegers();
-    HelloTraceTypes::UnsignedIntegers();
-    HelloTraceTypes::Descriptors();    
-    }
-
-EXPORT_C void HelloTraceExample::Interface()
-    {
-    OstTrace0( TRACE_EXAMPLE, HELLOTRACEEXAMPLE_INTERFACE, "*********************************************** " );
-    
-    TVersion version = CHelloTraceInterface::Version();   
-    if (version.iMajor >= 1) 
-        {
-        CHelloTraceInterface* example = CHelloTraceInterface::NewLC();
-        example->AddCharL('H');
-        example->AddCharL('e');
-        example->AddCharL('l');
-        example->AddCharL('l');
-        example->AddCharL('o');
-        example->AddCharL('T');        
-        example->RemoveLast();        
-        example->AddCharL(' ');
-        example->AddCharL('T');
-        example->AddCharL('r');
-        example->AddCharL('a');
-        example->AddCharL('c');
-        example->AddCharL('e');
-        example->AddCharL('!');
-        CleanupStack::PopAndDestroy(example);
-        }
-    else
-        {
-        OstTrace0( TRACE_ERROR, HELLOTRACEEXAMPLE_UNSUPPORTED_VERSION, "Unsupported version!");
-        }
-    }
-
-EXPORT_C void HelloTraceExample::FnEntryExit()
-    {
-    OstTrace0( TRACE_EXAMPLE, HELLOTRACEEXAMPLE_FNENTRYEXIT, "*********************************************** " );
-       
-    CHelloTraceFn* example = CHelloTraceFn::NewLC();
-    CIdle* idle = CIdle::NewL(CActive::EPriorityIdle);
-    CleanupStack::PushL(idle);
-
-    CHelloTraceFn::StaticOutputsParamsL(1);
-   
-    example->Simple();
-    example->OutputsParams(2, CHelloTraceFn::EExample1);
-    example->OutputsParams(3, CHelloTraceFn::EExample2);
-    example->OutputsSignedIntegers(-4, -5, -6, -7);
-    example->OutputsUnsignedIntegers(8, 9, 10, 11);
-    example->OutputsTIntReturnValue();    
-    example->OutputsTInt64ReturnValue(); 
-    example->OutputsTFnEnumReturnValue();
-    example->OutputsUnknownPtrType(idle);    
-    example->OutputsUnknownRefType(*idle);
-#ifdef _DEBUG
-    example->PreProcessedFn(12);
-#else
-    example->PreProcessedFn();
-#endif
-    example->OutputMissingParams(13, 14, 15);
-
-    CleanupStack::PopAndDestroy(idle);
-    CleanupStack::PopAndDestroy(example);
-    }
-
-EXPORT_C void HelloTraceExample::PanicTrace()
-    {
-    OstTrace0( TRACE_EXAMPLE, HELLOTRACEEXAMPLE_PANIC, "*********************************************** " );
-
-    Panic(EHelloTraceDllExamplePanic);
-    }
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/src/HelloTraceFn.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,183 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
- 
-#include "HelloTraceFn.h"
-#include "HelloTraceFnDup.h"
-#include "HelloTraceFnDup2.inl"
-#include "HelloTracePanic.h"
-
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTraceFnTraces.h"
-#endif
-
-CHelloTraceFn* CHelloTraceFn::NewLC()
-    {
-    CHelloTraceFn* self = new (ELeave) CHelloTraceFn;
-    CleanupStack::PushL(self);
-    return self;
-    }
-
-CHelloTraceFn* CHelloTraceFn::NewL()
-    {
-    CHelloTraceFn* self = CHelloTraceFn::NewLC();
-    CleanupStack::Pop(self);
-    return self;
-    }
-
-CHelloTraceFn::CHelloTraceFn()
-    {
-    OstTrace1( TRACE_NORMAL, CHELLOTRACEFN_CHELLOTRACEFN_CTOR, "[0x%08x] Constructor", this );    
-    }
-
-CHelloTraceFn::~CHelloTraceFn()
-    {
-    OstTrace1( TRACE_NORMAL, CHELLOTRACEFN_CHELLOTRACEFN_DTOR, "[0x%08x] Destructor", this );    
-    }
-
-void CHelloTraceFn::Simple()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_SIMPLE_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_SIMPLE_EXIT, this );
-    }
-
-void CHelloTraceFn::OutputsParams(TInt aParam, TFnEnum aEnumParam)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSPARAMS_ENTRY, this );
-    Simple();
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSPARAMS_EXIT, this );
-    }
-
-void CHelloTraceFn::StaticOutputsParamsL(TInt aParam)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_STATICOUTPUTSPARAMS_ENTRY, NULL );
-    CHelloTraceFn* example = CHelloTraceFn::NewLC();
-    example->Simple();    
-    CleanupStack::PopAndDestroy(example);
-    OstTraceFunctionExit0( CHELLOTRACEFN_STATICOUTPUTSPARAMS_EXIT );    
-    }
-
-void CHelloTraceFn::OutputsSignedIntegers(TInt8 aParam8,   TInt16 aParam16, 
-                                          TInt32 aParam32, TInt64 aParam64)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS_EXIT, this );
-    }
-
-void CHelloTraceFn::OutputsUnsignedIntegers(TUint8 aParam8,   TUint16 aParam16, 
-                                            TUint32 aParam32, TUint64 aParam64)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS_EXIT, this );
-    }
-
-
-TInt CHelloTraceFn::OutputsTIntReturnValue()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_ENTRY, this );
-    TInt ret = KErrNone;
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_EXIT, this, ret );
-    return ret;
-    }
-
-TInt64 CHelloTraceFn::OutputsTInt64ReturnValue()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE_ENTRY, this );
-    TInt64 ret = (TInt64) 2 << 40;
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE_EXIT, this, ret );
-    return ret;
-    }
-
-CHelloTraceFn::TFnEnum CHelloTraceFn::OutputsTFnEnumReturnValue()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE_ENTRY, this );
-    TFnEnum ret = EExample1;
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE_EXIT, this, ret );
-    return ret;    
-    }
-
-CActive* CHelloTraceFn::OutputsUnknownPtrType(CActive* aActive)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_ENTRY, this );    
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_EXIT, this, (TUint) aActive );
-    return aActive;
-    }
-
-CActive& CHelloTraceFn::OutputsUnknownRefType(CActive& aActive)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE_ENTRY, this );
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE_EXIT, this, (TUint) &aActive );    
-    return aActive;
-    }
-
-// The following doesn't compile as the Trace Compiler doesn't generate
-// the correct OstTraceGenExt(...) function for it
-//void CHelloTraceFn::OutputMissingParamsBug(TInt /*aCommentParam*/, TInt)
-//    {
-//    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_ENTRY, this );
-//    // ...
-//    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_EXIT, this );    
-//    }
-
-// The following compiles and works but outputs the following warning
-// warning: HelloTraceFn.cpp, line xxx: Parameter did not have a name and was not added to trace
-// The fact that this cannot be suppressed is a known problem we're working on.
-void CHelloTraceFn::OutputMissingParams(TInt aUsedParam, TInt /*aCommentParam*/, TInt)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMS_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMS_EXIT, this );
-    }
-
-// The following doesn't work as the Trace Compiler outputs:
-// error: HelloTraceFn.cpp, line xxx: Class / function name for trace could not be determined x3
-//#ifdef _DEBUG
-//void CHelloTraceFn::PreProcessedFn(TInt aDbgParam)
-//    {
-//    OstTraceFunctionEntryExt( PRE_PROCESSED_ENTRTY_1, this );
-//#else
-//void CHelloTraceFn::PreProcessedFn()
-//    {
-//    OstTraceFunctionEntry1( PRE_PROCESSED_ENTRTY_2, this );
-//#endif
-//    Simple();
-//    OstTraceFunctionExit1( CHELLOTRACEFN_PREPROCESSEDFN_EXIT, this );
-//    }
-
-// Workaround example code until a proper fix is provided
-#ifdef _DEBUG
-void CHelloTraceFn::PreProcessedFn(TInt aDbgParam)
-    {
-    OstTraceExt2( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_ENTRY_1, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;aDbgParam=%d;this=%x", (TInt) aDbgParam, (TUint) this);
-#else
-void CHelloTraceFn::PreProcessedFn()
-    {
-    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_ENTRY_2, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
-#endif
-    Simple();
-    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_EXIT, "CHelloTraceFn::PreProcessedFn: < CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
-    }
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/src/HelloTraceInterface.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,121 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-
-#include "HelloTraceInterface.h"
-#include "HelloTraceInterfaceDup.h"
-#include "HelloTraceInterfaceDup2.inl"
-#include "HelloTracePanic.h"
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTraceInterfaceTraces.h"
-#endif
-
-EXPORT_C CHelloTraceInterface* CHelloTraceInterface::NewLC()
-    {
-    CHelloTraceInterface* self = new (ELeave) CHelloTraceInterface;
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    return self;
-    }
-
-EXPORT_C CHelloTraceInterface* CHelloTraceInterface::NewL()
-    {
-    CHelloTraceInterface* self = CHelloTraceInterface::NewLC();
-    CleanupStack::Pop(self);
-    return self;
-    }
-
-CHelloTraceInterface::CHelloTraceInterface()
-    {
-    OstTrace1( TRACE_NORMAL, CHELLOTRACEDLL_CHELLOTRACEDLL_CTOR, "[0x%08x]", (TUint32) this );    
-    }
-
-void CHelloTraceInterface::ConstructL()
-    {
-    iString = new (ELeave) THelloTraceDllExampleString;
-    }
-
-EXPORT_C CHelloTraceInterface::~CHelloTraceInterface()
-    {
-    delete iString;
-    OstTrace1( TRACE_NORMAL, CHELLOTRACEDLL_CHELLOTRACEDLL_DTOR, "[0x%08x]", (TUint32) this );    
-    }
-
-EXPORT_C TVersion CHelloTraceInterface::Version()
-    {
-    const TInt KMajor = 1;
-    const TInt KMinor = 0;
-    const TInt KBuild = 1;
-    TVersion version = TVersion(KMajor, KMinor, KBuild);
-    OstTraceExt1( TRACE_BORDER, CHELLOTRACEDLL_VERSION, "CHelloTraceInterface::Version = %S", version.Name());   
-    return version;
-    }
-
-EXPORT_C const TPtrC CHelloTraceInterface::String() const
-    {
-    __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
-
-    OstTraceDefExt2( OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CHELLOTRACEDLL_STRING, 
-                     "[0x%08x] Returned %S", (TUint32) this, *iString);   
-    return *iString;
-    }
-
-EXPORT_C void CHelloTraceInterface::AddCharL(const TChar& aChar)
-    {
-    __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
-
-    OstTraceExt3( TRACE_BORDER, CHELLOTRACEDLL_ADDCHARL, 
-                  "[0x%08x] Adding %d to %S", (TUint32) this, (TInt32) aChar, *iString);   
-    if (iString->Length() >= KHelloTraceDllBufferLength)
-        {
-        OstTrace1( TRACE_ERROR, CHELLOTRACEDLL_ADDCHARL_ERR,
-                   "[0x%08x] Not enough space to add character", (TUint32) this);
-        User::Leave( KErrTooBig);
-        }
-    iString->Append(aChar);
-    }
-
-EXPORT_C void CHelloTraceInterface::RemoveLast()
-    {
-    __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
-
-    OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_REMOVELAST, 
-                  "[0x%08x] Attempting to remove last character from %S", (TUint32) this, *iString);
-    if (iString->Length() > 0)
-        {
-        iString->SetLength(iString->Length() - 1);
-        }
-    else
-        {
-        OstTrace1( TRACE_WARNING, CHELLOTRACEDLL_REMOVELAST_WARN, "[0x%08x] String already empty", (TUint32) this);   
-        }
-    }
-
-EXPORT_C void CHelloTraceInterface::ResetString()
-    {
-    OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_RESETSTRING, "[0x%08x] Reseting string %S", (TUint32) this, *iString);
-    if (iString == NULL)
-        {
-        iString = new (ELeave) THelloTraceDllExampleString;
-        }
-    else
-        {
-        iString->SetLength(0);
-        }
-    }
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/src/HelloTracePanic.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#include <e32std.h>		 // GLDEF_C
-
-#include "HelloTracePanic.h"
-
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTracePanicTraces.h"
-#endif
-
-GLDEF_C void Panic(THelloTraceDllPanic aPanic)
-    {
-    OstTrace1( TRACE_FATAL, PANIC, "Panic(%{THelloTraceDllPanic})", (TUint) aPanic );    
-    User::Panic(_L("HelloTraceDll"), aPanic);
-    }
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/src/HelloTraceTypes.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,76 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-
-#include <e32std.h>
-
-#include "HelloTraceTypes.h"
-#include "HelloTraceTypesDup.h"
-#include "HelloTraceTypesDup2.inl"
-
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTraceTypesTraces.h"
-#endif
-
-void HelloTraceTypes::SignedIntegers()
-    {
-    TInt8  eightBit     = - (TInt8)  1 << 6;
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS_8, 
-                  "8 bit signed: %hhd", eightBit );
-    
-    TInt16 sixteenBit   = - (TInt16) 1 << 14; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS_16, 
-                  "16 bit signed: %hd", sixteenBit );
-
-    TInt32 thirtyTwoBit = - (TInt32) 1 << 30; 
-    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS_32, 
-               "32 bit signed: %d", thirtyTwoBit );
-
-    TInt64 sixtyFourBit = - (TInt64) 1 << 62; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS_64, 
-                  "64 bit signed: %Ld", sixtyFourBit );
-    }
-
-void HelloTraceTypes::UnsignedIntegers()
-    {
-    TUint8  eightBit     = (TUint8)  1 << 6;
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS_8, 
-                  "8 bit unsigned: %hhu", eightBit );
-    
-    TUint16 sixteenBit   = (TUint16) 1 << 14; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS_16, 
-                  "16 bit unsigned: %hu", sixteenBit );
-
-    TUint32 thirtyTwoBit = (TUint32) 1 << 30; 
-    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS_32, 
-               "32 bit unsigned: %u", thirtyTwoBit );
-
-    TUint64 sixtyFourBit = (TUint64) 1 << 62; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS_64, 
-                  "64 bit unsigned: %Lu", sixtyFourBit );
-    }
-
-void HelloTraceTypes::Descriptors()
-    {
-    _LIT8(KAscii, "Some ASCII text");
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_ASCII, "8 bit descriptor: %s", KAscii() );
-
-    _LIT16(KUnicode, "Some unicode text");    
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNICODE, "16 bit descriptor: %S", KUnicode() );
-    }
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/traces/trace.properties	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<trace_properties>
-<enum name="TFnEnum">
-<value id="0">EExample1</value>
-<value id="2">EExample2</value>
-</enum>
-<enum name="THelloTraceDllPanic">
-<value id="0">EHelloTraceDllExamplePanic</value>
-<value id="1">EHelloTraceDllNullPointer</value>
-</enum>
-<file>../incDup/HelloTraceInterfaceDup.h</file>
-<file>../incDup/HelloTraceInterfaceDup2.inl</file>
-<file>../incDup/HelloTraceFnDup.h</file>
-<file>../incDup/HelloTraceFnDup2.inl</file>
-<file>../incDup/HelloTraceTypesDup.h</file>
-<file>../incDup/HelloTraceTypesDup2.inl</file>
-<file>../incDup/HelloTraceInterface2Dup.h</file>
-<file>../incDup/HelloTraceInterface2Dup2.inl</file>
-<file>../incDup/HelloTraceFn2Dup.h</file>
-<file>../incDup/HelloTraceFn2Dup2.inl</file>
-<file>../incDup/HelloTraceTypes2Dup.h</file>
-<file>../incDup/HelloTraceTypes2Dup2.inl</file>
-</trace_properties>
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/group/bld.inf	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,19 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-#include "../dll/group/bld.inf"
-#include "../console/group/bld.inf"
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/console/group/HelloTraceConsole.mmp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-
-TARGET		  HelloTraceConsole.exe
-TARGETTYPE	  exe
-UID			  0 0xE40349E4
-
-OS_LAYER_SYSTEMINCLUDE
-USERINCLUDE	   ../inc
-USERINCLUDE    ../../dll/inc
-USERINCLUDE    ../traces
-
-SOURCEPATH	  ../src
-SOURCE		  HelloTraceConsole.cpp
-
-LIBRARY		  euser.lib
-LIBRARY       HelloTraceDll.lib
-
-#ifdef ENABLE_ABIV2_MODE
-DEBUGGABLE_UDEBONLY
-#endif
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/console/group/bld.inf	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-
-PRJ_PLATFORMS
-DEFAULT
-
-PRJ_EXPORTS
-hellotraceconsole.iby             CORE_OS_LAYER_IBY_EXPORT_PATH(hellotraceconsole.iby)
-
-PRJ_MMPFILES
-HelloTraceConsole.mmp
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/console/group/hellotraceconsole.iby	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,24 +0,0 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "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:
-//
-// Description:
-// ROM build file for tracecore project
-
-#ifndef HELLOTRACECONSOLE_IBY
-#define HELLOTRACECONSOLE_IBY
-
-#include <core\os\hellotracedll.iby>
-
-file=ABI_DIR\BUILD_DIR\hellotraceconsole.exe    Sys\Bin\hellotraceconsole.exe
-
-#endif //HELLOTRACECONSOLE_IBY
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/console/inc/HelloTraceConsole.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef __HELLOTRACECONSOLE_H__
-#define __HELLOTRACECONSOLE_H__
-
-//  Include Files
-
-#include <e32base.h>
-
-//  Function Prototypes
-
-GLDEF_C TInt E32Main();
-
-#endif  // __HELLOTRACECONSOLE_H__
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/console/src/HelloTraceConsole.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,124 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#include <e32cons.h>			// Console
-
-#include "HelloTraceConsole.h"
-#include "HelloTraceExample.h"
-
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTraceConsoleTraces.h"
-#endif
-
-
-_LIT(KTextConsoleTitle, "HelloTrace");
-_LIT(KTextPressAnyKey, " [press any key]\n");
-
-LOCAL_D CConsoleBase* console; // write all messages to this
-
-LOCAL_C void DoExamples()
-    {
-    TInt err = KErrNone;
-
-    console->Printf(_L("Before main tracing examples ...\n"));
-
-    console->Printf(_L(" Before type examples ..."));
-    console->Printf(KTextPressAnyKey);
-    console->Getch();
-    TRAP(err, HelloTraceExample::JustTypes());    
-    if (err)
-        console->Printf(_L(" Failed with error %d\n"), err);
-
-    console->Printf(_L(" Before Interface examples ..."));
-    console->Printf(KTextPressAnyKey);
-    console->Getch();
-    TRAP(err, HelloTraceExample::Interface());    
-    if (err)
-        console->Printf(_L(" Failed with error %d\n"), err);
-    
-    console->Printf(_L(" Before FnEntryExit examples ..."));
-    console->Printf(KTextPressAnyKey);
-    console->Getch();
-    TRAP(err, HelloTraceExample::FnEntryExit());    
-    if (err)
-        console->Printf(_L(" Failed with error %d\n"), err);    
-    }
-
-LOCAL_C void DoStartL()
-    {
-    // Create active scheduler (to run active objects)
-    CActiveScheduler* scheduler = new (ELeave) CActiveScheduler();
-    CleanupStack::PushL(scheduler);
-    CActiveScheduler::Install(scheduler);
-
-    DoExamples();
-    
-    // Delete active scheduler
-    CleanupStack::PopAndDestroy(scheduler);
-    }
-
-//  Global Functions
-
-GLDEF_C TInt E32Main()
-    {
-    OstTraceFunctionEntry0( E32MAIN_ENTRY );
-    
-    // Create cleanup stack
-    __UHEAP_MARK;
-    CTrapCleanup* cleanup = CTrapCleanup::New();
-
-    // Create output console
-    TRAPD(createError, 
-          console = Console::NewL(KTextConsoleTitle, 
-                                  TSize(KConsFullScreen, KConsFullScreen)));    
-    if (createError)
-        {
-        delete cleanup;
-        OstTrace1( TRACE_ERROR, E32MAIN_CREATE_ERROR, "Failed to create console error: %d", createError);
-        OstTraceFunctionExit0( E32MAIN_EXIT_ERR );
-        return createError;
-        }
-
-    TRAPD(mainError, DoStartL());    
-    if (mainError)
-        {
-        OstTrace1( TRACE_ERROR, E32MAIN_START_ERROR, "DoStartL failed with error: %d", mainError);
-        console->Printf(_L("DoStartL failed with error: %d\n\n"), mainError);
-        }
-    else 
-        {
-        console->Printf(_L("Before panic tracing example ..."));
-        console->Printf(KTextPressAnyKey);
-        console->Getch();
-    
-        OstTrace0( TRACE_FLOW, E32MAIN_BEFORE_PANIC, "About to cause a panic ..." );
-        HelloTraceExample::PanicTrace();
-        
-        console->Printf(KTextPressAnyKey);
-        console->Getch();
-        }
-
-    delete console;
-    delete cleanup;
-    __UHEAP_MARKEND;
-    
-    OstTraceFunctionExit0( E32MAIN_EXIT );
-    return KErrNone;
-    }
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/dll/bwins/HelloTraceDllu.def	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,14 +0,0 @@
-EXPORTS
-	?Version@CHelloTraceInterface@@SA?AVTVersion@@XZ @ 1 NONAME ; class TVersion CHelloTraceInterface::Version(void)
-	?NewLC@CHelloTraceInterface@@SAPAV1@XZ @ 2 NONAME ; class CHelloTraceInterface * CHelloTraceInterface::NewLC(void)
-	?JustTypes@HelloTraceExample@@SAXXZ @ 3 NONAME ; void HelloTraceExample::JustTypes(void)
-	?Interface@HelloTraceExample@@SAXXZ @ 4 NONAME ; void HelloTraceExample::Interface(void)
-	?FnEntryExit@HelloTraceExample@@SAXXZ @ 5 NONAME ; void HelloTraceExample::FnEntryExit(void)
-	?ResetString@CHelloTraceInterface@@QAEXXZ @ 6 NONAME ; void CHelloTraceInterface::ResetString(void)
-	?AddCharL@CHelloTraceInterface@@QAEXABVTChar@@@Z @ 7 NONAME ; void CHelloTraceInterface::AddCharL(class TChar const &)
-	?PanicTrace@HelloTraceExample@@SAXXZ @ 8 NONAME ; void HelloTraceExample::PanicTrace(void)
-	??1CHelloTraceInterface@@UAE@XZ @ 9 NONAME ; CHelloTraceInterface::~CHelloTraceInterface(void)
-	?String@CHelloTraceInterface@@QBE?BVTPtrC16@@XZ @ 10 NONAME ; class TPtrC16 const CHelloTraceInterface::String(void) const
-	?RemoveLast@CHelloTraceInterface@@QAEXXZ @ 11 NONAME ; void CHelloTraceInterface::RemoveLast(void)
-	?NewL@CHelloTraceInterface@@SAPAV1@XZ @ 12 NONAME ; class CHelloTraceInterface * CHelloTraceInterface::NewL(void)
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/dll/eabi/HelloTraceDllu.def	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,20 +0,0 @@
-EXPORTS
-	_ZN17HelloTraceExample10PanicTraceEv @ 1 NONAME
-	_ZN17HelloTraceExample11FnEntryExitEv @ 2 NONAME
-	_ZN17HelloTraceExample9InterfaceEv @ 3 NONAME
-	_ZN17HelloTraceExample9JustTypesEv @ 4 NONAME
-	_ZN20CHelloTraceInterface10RemoveLastEv @ 5 NONAME
-	_ZN20CHelloTraceInterface11ResetStringEv @ 6 NONAME
-	_ZN20CHelloTraceInterface4NewLEv @ 7 NONAME
-	_ZN20CHelloTraceInterface5NewLCEv @ 8 NONAME
-	_ZN20CHelloTraceInterface7VersionEv @ 9 NONAME
-	_ZN20CHelloTraceInterface8AddCharLERK5TChar @ 10 NONAME
-	_ZN20CHelloTraceInterfaceD0Ev @ 11 NONAME
-	_ZN20CHelloTraceInterfaceD1Ev @ 12 NONAME
-	_ZN20CHelloTraceInterfaceD2Ev @ 13 NONAME
-	_ZNK20CHelloTraceInterface6StringEv @ 14 NONAME
-	_ZTI13CHelloTraceFn @ 15 NONAME
-	_ZTI20CHelloTraceInterface @ 16 NONAME
-	_ZTV13CHelloTraceFn @ 17 NONAME
-	_ZTV20CHelloTraceInterface @ 18 NONAME
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/dll/group/HelloTraceDll.mmp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-
-TARGET		  HelloTraceDll.dll
-TARGETTYPE	  dll
-UID			  0x1000008d 0xE43DF43E
-CAPABILITY    ReadUserData
-
-OS_LAYER_SYSTEMINCLUDE
-USERINCLUDE  ../inc ../incDup
-USERINCLUDE  ../traces/HelloTraceDll_dll
-
-SOURCEPATH	 ../src
-SOURCE       HelloTraceExample.cpp 
-SOURCE       HelloTraceTypes.cpp
-SOURCE       HelloTraceInterface.cpp 
-SOURCE       HelloTraceFn.cpp 
-SOURCE       HelloTracePanic.cpp 
-
-LIBRARY		 euser.lib
-
-#ifdef ENABLE_ABIV2_MODE
-DEBUGGABLE_UDEBONLY
-#endif
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/dll/group/HelloTraceDll2.mmp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-
-TARGET		  HelloTraceDll2.dll
-TARGETTYPE	  dll
-UID			  0x1000008d 0xE43DF43F
-CAPABILITY    ReadUserData
-
-OS_LAYER_SYSTEMINCLUDE
-USERINCLUDE  ../inc ../incDup
-USERINCLUDE  ../traces/HelloTraceDll2_dll
-
-SOURCEPATH	 ../src
-SOURCE       HelloTraceExample.cpp 
-SOURCE       HelloTraceTypes.cpp
-SOURCE       HelloTraceInterface.cpp 
-SOURCE       HelloTraceFn.cpp 
-SOURCE       HelloTracePanic.cpp 
-
-LIBRARY		 euser.lib
-
-#ifdef ENABLE_ABIV2_MODE
-DEBUGGABLE_UDEBONLY
-#endif
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/dll/group/bld.inf	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-
-PRJ_PLATFORMS
-DEFAULT
-
-PRJ_EXPORTS
-hellotracedll.iby             CORE_OS_LAYER_IBY_EXPORT_PATH(hellotracedll.iby)
-
-PRJ_MMPFILES
-HelloTraceDll.mmp
-HelloTraceDll2.mmp
\ No newline at end of file
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/dll/group/hellotracedll.iby	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "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:
-//
-// Description:
-// ROM build file for tracecore project
-
-#ifndef HELLOTRACEDLL_IBY
-#define HELLOTRACEDLL_IBY
-
-file=ABI_DIR\BUILD_DIR\hellotracedll.dll        Sys\Bin\hellotracedll.dll
-file=ABI_DIR\BUILD_DIR\hellotracedll2.dll        Sys\Bin\hellotracedll2.dll
-
-#endif //HELLOTRACEDLL_IBY
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/dll/inc/HelloTraceExample.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef __HELLOTRACEEXAMPLE_H__
-#define __HELLOTRACEEXAMPLE_H__
-
-#include <e32std.h>
-
-class HelloTraceExample
-    {
-public:
-    IMPORT_C static void JustTypes();    
-    IMPORT_C static void Interface();    
-    IMPORT_C static void FnEntryExit();    
-    IMPORT_C static void PanicTrace();    
-
-    // @TODO add examples for state macros
-    // @TODO add examples for event macros
-    // @TODO add examples for OstTraceData
-    // @TODO add compile-time selector examples
-    // @TODO add macro wrapper examples
-    };
-
-#endif  // __HELLOTRACEEXAMPLE_H__
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/dll/inc/HelloTraceFn.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,122 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef HELLOTRACEFN_H_
-#define HELLOTRACEFN_H_
-
-#include <e32base.h>    // CBase
-
-class CHelloTraceFn : public CBase
-    {
-public:
-    
-    // Note the Trace Builder will only parse this if it's in a cpp file
-    // but not from here :(
-    // Also if you add a new enum you need to reparse the enum - it doesn't
-    // get automatically reparsed by the Trace Compiler :(
-    enum TFnEnum
-        {
-        EExample1,
-        EExample2 = 2, 
-        // EExample3 = EExample2 + 1, // The Trace Builder can't parse this :(
-        };
-    
-public:
-    static CHelloTraceFn* NewL();
-    static CHelloTraceFn* NewLC();
-    ~CHelloTraceFn();
-   
-public: // Fn entry / exit tracing examples 
-    void Simple();
-    void OutputsParams(TInt aParam, TFnEnum aEnumParam);
-    void OutputsSignedIntegers(TInt8 aParam8,   TInt16 aParam16, 
-                               TInt32 aParam32, TInt64 aParam64);
-    void OutputsUnsignedIntegers(TUint8 aParam8,   TUint16 aParam16, 
-                                 TUint32 aParam32, TUint64 aParam64);
-     
-    TInt OutputsTIntReturnValue();
-    TInt64 OutputsTInt64ReturnValue();
-    TFnEnum OutputsTFnEnumReturnValue();
-
-    CActive* OutputsUnknownPtrType(CActive* aActive);
-    CActive& OutputsUnknownRefType(CActive& aActive);
-    
-    void OutputMissingParams(TInt aUsedParam, TInt aCommentParam, TInt aMissingParam);
-
-#ifdef _DEBUG    
-    void PreProcessedFn(TInt aDbgParam);
-#else
-    void PreProcessedFn();
-#endif
-    
-    static void StaticOutputsParamsL(TInt aParam);  
-    
-    // duplicate all the function and put the impl in the header file HelloTraceFnDup.h
-    void SimpleDup();
-    void OutputsParamsDup(TInt aParam, TFnEnum aEnumParam);
-    void OutputsSignedIntegersDup(TInt8 aParam8,   TInt16 aParam16, 
-                               TInt32 aParam32, TInt64 aParam64);
-    void OutputsUnsignedIntegersDup(TUint8 aParam8,   TUint16 aParam16, 
-                                 TUint32 aParam32, TUint64 aParam64);
-     
-    TInt OutputsTIntReturnValueDup();
-    TInt64 OutputsTInt64ReturnValueDup();
-    TFnEnum OutputsTFnEnumReturnValueDup();
-
-    CActive* OutputsUnknownPtrTypeDup(CActive* aActive);
-    CActive& OutputsUnknownRefTypeDup(CActive& aActive);
-    
-    void OutputMissingParamsDup(TInt aUsedParam, TInt aCommentParam, TInt aMissingParam);
-
-#ifdef _DEBUG    
-    void PreProcessedFnDup(TInt aDbgParam);
-#else
-    void PreProcessedFnDup();
-#endif
-    static void StaticOutputsParamsDupL(TInt aParam);  
-    
-    // duplicate all the function again and put the impl in the header file HelloTraceFnDup2.h
-    void SimpleDup2();
-    void OutputsParamsDup2(TInt aParam, TFnEnum aEnumParam);
-    void OutputsSignedIntegersDup2(TInt8 aParam8,   TInt16 aParam16, 
-                               TInt32 aParam32, TInt64 aParam64);
-    void OutputsUnsignedIntegersDup2(TUint8 aParam8,   TUint16 aParam16, 
-                                 TUint32 aParam32, TUint64 aParam64);
-     
-    TInt OutputsTIntReturnValueDup2();
-    TInt64 OutputsTInt64ReturnValueDup2();
-    TFnEnum OutputsTFnEnumReturnValueDup2();
-
-    CActive* OutputsUnknownPtrTypeDup2(CActive* aActive);
-    CActive& OutputsUnknownRefTypeDup2(CActive& aActive);
-    
-    void OutputMissingParamsDup2(TInt aUsedParam, TInt aCommentParam, TInt aMissingParam);
-
-#ifdef _DEBUG    
-    void PreProcessedFnDup2(TInt aDbgParam);
-#else
-    void PreProcessedFnDup2();
-#endif
-    static void StaticOutputsParamsDup2L(TInt aParam);  
-
-
-private:
-    CHelloTraceFn();
-    };
-
-#endif /* HELLOTRACEFN_H_ */
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/dll/inc/HelloTraceInterface.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,63 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef __HELLOTRACEINTERFACE_H__
-#define __HELLOTRACEINTERFACE_H__
-
-#include <e32base.h>	// CBase
-#include <e32std.h>	 // TBuf
-
-const TInt KHelloTraceDllBufferLength = 10;
-typedef TBuf<KHelloTraceDllBufferLength> THelloTraceDllExampleString;
-
-class CHelloTraceInterface : public CBase
-    {
-public:
-    IMPORT_C static CHelloTraceInterface* NewL();
-    IMPORT_C static CHelloTraceInterface* NewLC();
-    IMPORT_C ~CHelloTraceInterface();
-
-public:
-    IMPORT_C static TVersion Version();
-    IMPORT_C const TPtrC String() const;
-    IMPORT_C void AddCharL(const TChar& aChar);
-    IMPORT_C void RemoveLast();
-    IMPORT_C void ResetString();
-    
-    IMPORT_C static TVersion VersionDup();
-    IMPORT_C const TPtrC StringDup() const;
-    IMPORT_C void AddCharDupL(const TChar& aChar);
-    IMPORT_C void RemoveLastDup();
-    IMPORT_C void ResetStringDup();
-
-    IMPORT_C static TVersion VersionDup2();
-    IMPORT_C const TPtrC StringDup2() const;
-    IMPORT_C void AddCharDup2L(const TChar& aChar);
-    IMPORT_C void RemoveLastDup2();
-    IMPORT_C void ResetStringDup2();
-private:
-    CHelloTraceInterface();
-    void ConstructL();
-
-private:
-    // data
-    THelloTraceDllExampleString* iString;
-    };
-
-#endif  // __HELLOTRACEINTERFACE_H__
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/dll/inc/HelloTracePanic.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef __HELLOTRACEDLL_PAN__
-#define __HELLOTRACEDLL_PAN__
-
-//  Data Types
-
-enum THelloTraceDllPanic
-    {
-    EHelloTraceDllExamplePanic,
-    EHelloTraceDllNullPointer,
-    };
-
-//  Function Prototypes
-
-GLREF_C void Panic(THelloTraceDllPanic aPanic);
-
-#endif  // __HELLOTRACEDLL_PAN__
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/dll/inc/HelloTraceTypes.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef __HELLOTRACETYPES_H__
-#define __HELLOTRACETYPES_H__
-
-class HelloTraceTypes
-    {
-public:
-    static void SignedIntegers();
-    static void UnsignedIntegers();
-    static void Descriptors();
-    
-    static void SignedIntegersDup();
-    static void UnsignedIntegersDup();
-    static void DescriptorsDup();
-        
-    static void SignedIntegersDup2();
-    static void UnsignedIntegersDup2();
-    static void DescriptorsDup2();
-    };
-
-#endif  // __HELLOTRACETYPES_H__
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/dll/incDup/HelloTraceFnDup.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,157 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef HELLOTRACEFNDUP_H_
-#define HELLOTRACEFNDUP_H_
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTraceFnDupTraces.h"
-#endif
-
-inline void CHelloTraceFn::SimpleDup()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_SIMPLE_DUP_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_SIMPLE_DUP_EXIT, this );
-    }
-
-inline void CHelloTraceFn::OutputsParamsDup(TInt aParam, TFnEnum aEnumParam)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSPARAMS_DUP_ENTRY, this );
-    Simple();
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSPARAMS_DUP_EXIT, this );
-    }
-
-inline void CHelloTraceFn::StaticOutputsParamsDupL(TInt aParam)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_STATICOUTPUTSPARAMS_DUP_ENTRY, NULL );
-    CHelloTraceFn* example = CHelloTraceFn::NewLC();
-    example->SimpleDup();    
-    CleanupStack::PopAndDestroy(example);
-    OstTraceFunctionExit0( CHELLOTRACEFN_STATICOUTPUTSPARAMS_DUP_EXIT );    
-    }
-
-inline void CHelloTraceFn::OutputsSignedIntegersDup(TInt8 aParam8,   TInt16 aParam16, 
-                                          TInt32 aParam32, TInt64 aParam64)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS_DUP_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS_DUP_EXIT, this );
-    }
-
-void CHelloTraceFn::OutputsUnsignedIntegersDup(TUint8 aParam8,   TUint16 aParam16, 
-                                            TUint32 aParam32, TUint64 aParam64)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS_DUP_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS_DUP_EXIT, this );
-    }
-
-
-inline TInt CHelloTraceFn::OutputsTIntReturnValueDup()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_DUP_ENTRY, this );
-    TInt ret = KErrNone;
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_DUP_EXIT, this, ret );
-    return ret;
-    }
-
-inline TInt64 CHelloTraceFn::OutputsTInt64ReturnValueDup()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE_DUP_ENTRY, this );
-    TInt64 ret = (TInt64) 2 << 40;
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE_DUP_EXIT, this, ret );
-    return ret;
-    }
-
-inline CHelloTraceFn::TFnEnum CHelloTraceFn::OutputsTFnEnumReturnValueDup()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE_DUP_ENTRY, this );
-    TFnEnum ret = EExample1;
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE_DUP_EXIT, this, ret );
-    return ret;    
-    }
-
-inline CActive* CHelloTraceFn::OutputsUnknownPtrTypeDup(CActive* aActive)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_DUP_ENTRY, this );    
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_DUP_EXIT, this, (TUint) aActive );
-    return aActive;
-    }
-
-inline CActive& CHelloTraceFn::OutputsUnknownRefTypeDup(CActive& aActive)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE_DUP_ENTRY, this );
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE_DUP_EXIT, this, (TUint) &aActive );    
-    return aActive;
-    }
-
-// The following doesn't compile as the Trace Compiler doesn't generate
-// the correct OstTraceGenExt(...) function for it
-//void CHelloTraceFn::OutputMissingParamsBug(TInt /*aCommentParam*/, TInt)
-//    {
-//    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_ENTRY, this );
-//    // ...
-//    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_EXIT, this );    
-//    }
-
-// The following compiles and works but outputs the following warning
-// warning: HelloTraceFn.cpp, line xxx: Parameter did not have a name and was not added to trace
-// The fact that this cannot be suppressed is a known problem we're working on.
-inline void CHelloTraceFn::OutputMissingParamsDup(TInt aUsedParam, TInt /*aCommentParam*/, TInt)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMS_DUP_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMS_DUP_EXIT, this );
-    }
-
-// The following doesn't work as the Trace Compiler outputs:
-// error: HelloTraceFn.cpp, line xxx: Class / function name for trace could not be determined x3
-//#ifdef _DEBUG
-//void CHelloTraceFn::PreProcessedFn(TInt aDbgParam)
-//    {
-//    OstTraceFunctionEntryExt( PRE_PROCESSED_ENTRTY_1, this );
-//#else
-//void CHelloTraceFn::PreProcessedFn()
-//    {
-//    OstTraceFunctionEntry1( PRE_PROCESSED_ENTRTY_2, this );
-//#endif
-//    Simple();
-//    OstTraceFunctionExit1( CHELLOTRACEFN_PREPROCESSEDFN_EXIT, this );
-//    }
-
-// Workaround example code until a proper fix is provided
-#ifdef _DEBUG
-inline void CHelloTraceFn::PreProcessedFnDup(TInt aDbgParam)
-    {
-    OstTraceExt2( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_DUP_ENTRY_1, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;aDbgParam=%d;this=%x", (TInt) aDbgParam, (TUint) this);
-#else
-    inline void CHelloTraceFn::PreProcessedFnDup()
-    {
-    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_DUP_ENTRY_2, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
-#endif
-    SimpleDup();
-    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_DUP_EXIT, "CHelloTraceFn::PreProcessedFn: < CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
-    }
-
-#endif /* HELLOTRACEFNDUP_H_ */
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/dll/incDup/HelloTraceFnDup2.inl	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,157 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef HELLOTRACEFNDUP2_H_
-#define HELLOTRACEFNDUP2_H_
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTraceFnDup2Traces.h"
-#endif
-
-inline void CHelloTraceFn::SimpleDup2()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_SIMPLE_DUP2_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_SIMPLE_DUP2_EXIT, this );
-    }
-
-inline void CHelloTraceFn::OutputsParamsDup2(TInt aParam, TFnEnum aEnumParam)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSPARAMS_DUP2_ENTRY, this );
-    Simple();
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSPARAMS_DUP2_EXIT, this );
-    }
-
-inline void CHelloTraceFn::StaticOutputsParamsDup2L(TInt aParam)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_STATICOUTPUTSPARAMS_DUP2_ENTRY, NULL );
-    CHelloTraceFn* example = CHelloTraceFn::NewLC();
-    example->SimpleDup2();    
-    CleanupStack::PopAndDestroy(example);
-    OstTraceFunctionExit0( CHELLOTRACEFN_STATICOUTPUTSPARAMS_DUP2_EXIT );    
-    }
-
-inline void CHelloTraceFn::OutputsSignedIntegersDup2(TInt8 aParam8,   TInt16 aParam16, 
-                                          TInt32 aParam32, TInt64 aParam64)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS_DUP2_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS_DUP2_EXIT, this );
-    }
-
-inline void CHelloTraceFn::OutputsUnsignedIntegersDup2(TUint8 aParam8,   TUint16 aParam16, 
-                                            TUint32 aParam32, TUint64 aParam64)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS_DUP2_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS_DUP2_EXIT, this );
-    }
-
-
-inline TInt CHelloTraceFn::OutputsTIntReturnValueDup2()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_DUP2_ENTRY, this );
-    TInt ret = KErrNone;
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_DUP2_EXIT, this, ret );
-    return ret;
-    }
-
-inline TInt64 CHelloTraceFn::OutputsTInt64ReturnValueDup2()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE_DUP2_ENTRY, this );
-    TInt64 ret = (TInt64) 2 << 40;
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE_DUP2_EXIT, this, ret );
-    return ret;
-    }
-
-inline CHelloTraceFn::TFnEnum CHelloTraceFn::OutputsTFnEnumReturnValueDup2()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE_DUP2_ENTRY, this );
-    TFnEnum ret = EExample1;
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE_DUP2_EXIT, this, ret );
-    return ret;    
-    }
-
-inline CActive* CHelloTraceFn::OutputsUnknownPtrTypeDup2(CActive* aActive)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_DUP2_ENTRY, this );    
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_DUP2_EXIT, this, (TUint) aActive );
-    return aActive;
-    }
-
-inline CActive& CHelloTraceFn::OutputsUnknownRefTypeDup2(CActive& aActive)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE_DUP2_ENTRY, this );
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE_DUP2_EXIT, this, (TUint) &aActive );    
-    return aActive;
-    }
-
-// The following doesn't compile as the Trace Compiler doesn't generate
-// the correct OstTraceGenExt(...) function for it
-//void CHelloTraceFn::OutputMissingParamsBug(TInt /*aCommentParam*/, TInt)
-//    {
-//    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_ENTRY, this );
-//    // ...
-//    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_EXIT, this );    
-//    }
-
-// The following compiles and works but outputs the following warning
-// warning: HelloTraceFn.cpp, line xxx: Parameter did not have a name and was not added to trace
-// The fact that this cannot be suppressed is a known problem we're working on.
-inline void CHelloTraceFn::OutputMissingParamsDup2(TInt aUsedParam, TInt /*aCommentParam*/, TInt)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMS_DUP2_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMS_DUP2_EXIT, this );
-    }
-
-// The following doesn't work as the Trace Compiler outputs:
-// error: HelloTraceFn.cpp, line xxx: Class / function name for trace could not be determined x3
-//#ifdef _DEBUG
-//void CHelloTraceFn::PreProcessedFn(TInt aDbgParam)
-//    {
-//    OstTraceFunctionEntryExt( PRE_PROCESSED_ENTRTY_1, this );
-//#else
-//void CHelloTraceFn::PreProcessedFn()
-//    {
-//    OstTraceFunctionEntry1( PRE_PROCESSED_ENTRTY_2, this );
-//#endif
-//    Simple();
-//    OstTraceFunctionExit1( CHELLOTRACEFN_PREPROCESSEDFN_EXIT, this );
-//    }
-
-// Workaround example code until a proper fix is provided
-#ifdef _DEBUG
-inline void CHelloTraceFn::PreProcessedFnDup2(TInt aDbgParam)
-    {
-    OstTraceExt2( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_DUP2_ENTRY_1, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;aDbgParam=%d;this=%x", (TInt) aDbgParam, (TUint) this);
-#else
-    inline void CHelloTraceFn::PreProcessedFnDup2()
-    {
-    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_DUP2_ENTRY_2, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
-#endif
-    SimpleDup2();
-    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_DUP2_EXIT, "CHelloTraceFn::PreProcessedFn: < CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
-    }
-
-#endif /* HELLOTRACEFNDUP2_H_ */
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/dll/incDup/HelloTraceInterfaceDup.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,91 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef __HELLOTRACEINTERFACEDUP_H__
-#define __HELLOTRACEINTERFACEDUP_H__
-
-#include "HelloTracePanic.h"
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTraceInterfaceDupTraces.h"
-#endif
-
- inline EXPORT_C TVersion CHelloTraceInterface::VersionDup()
-        {
-        const TInt KMajor = 1;
-        const TInt KMinor = 0;
-        const TInt KBuild = 1;
-        TVersion version = TVersion(KMajor, KMinor, KBuild);
-        OstTraceExt1( TRACE_BORDER, CHELLOTRACEDLL_VERSION_DUP, "CHelloTraceInterface::Version = %S", version.Name());   
-        return version;
-        }
-
- inline EXPORT_C const TPtrC CHelloTraceInterface::StringDup() const
-        {
-        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
-
-        OstTraceDefExt2( OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CHELLOTRACEDLL_STRING_DUP, 
-                         "[0x%08x] Returned %S", (TUint32) this, *iString);   
-        return *iString;
-        }
-
- inline EXPORT_C void CHelloTraceInterface::AddCharDupL(const TChar& aChar)
-        {
-        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
-
-        OstTraceExt3( TRACE_BORDER, CHELLOTRACEDLL_ADDCHARL_DUP, 
-                      "[0x%08x] Adding %d to %S", (TUint32) this, (TInt32) aChar, *iString);   
-        if (iString->Length() >= KHelloTraceDllBufferLength)
-            {
-            OstTrace1( TRACE_ERROR, CHELLOTRACEDLL_ADDCHARL_ERR_DUP,
-                       "[0x%08x] Not enough space to add character", (TUint32) this);
-            User::Leave( KErrTooBig);
-            }
-        iString->Append(aChar);
-        }
-
- inline EXPORT_C void CHelloTraceInterface::RemoveLastDup()
-        {
-        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
-
-        OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_REMOVELAST_DUP, 
-                      "[0x%08x] Attempting to remove last character from %S", (TUint32) this, *iString);
-        if (iString->Length() > 0)
-            {
-            iString->SetLength(iString->Length() - 1);
-            }
-        else
-            {
-            OstTrace1( TRACE_WARNING, CHELLOTRACEDLL_REMOVELAST_WARN_DUP, "[0x%08x] String already empty", (TUint32) this);   
-            }
-        }
-
- inline EXPORT_C void CHelloTraceInterface::ResetStringDup()
-        {
-        OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_RESETSTRING_DUP, "[0x%08x] Reseting string %S", (TUint32) this, *iString);
-        if (iString == NULL)
-            {
-            iString = new (ELeave) THelloTraceDllExampleString;
-            }
-        else
-            {
-            iString->SetLength(0);
-            }
-        }
-#endif  // __HELLOTRACEINTERFACEDUP_H__
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/dll/incDup/HelloTraceInterfaceDup2.inl	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,91 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef __HELLOTRACEINTERFACEDUP2_H__
-#define __HELLOTRACEINTERFACEDUP2_H__
-
-#include "HelloTracePanic.h"
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTraceInterfaceDup2Traces.h"
-#endif
-
- inline EXPORT_C TVersion CHelloTraceInterface::VersionDup2()
-        {
-        const TInt KMajor = 1;
-        const TInt KMinor = 0;
-        const TInt KBuild = 1;
-        TVersion version = TVersion(KMajor, KMinor, KBuild);
-        OstTraceExt1( TRACE_BORDER, CHELLOTRACEDLL_VERSION_DUP2, "CHelloTraceInterface::Version = %S", version.Name());   
-        return version;
-        }
-
- inline EXPORT_C const TPtrC CHelloTraceInterface::StringDup2() const
-        {
-        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
-
-        OstTraceDefExt2( OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CHELLOTRACEDLL_STRING_DUP2, 
-                         "[0x%08x] Returned %S", (TUint32) this, *iString);   
-        return *iString;
-        }
-
- inline EXPORT_C void CHelloTraceInterface::AddCharDup2L(const TChar& aChar)
-        {
-        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
-
-        OstTraceExt3( TRACE_BORDER, CHELLOTRACEDLL_ADDCHARL_DUP2, 
-                      "[0x%08x] Adding %d to %S", (TUint32) this, (TInt32) aChar, *iString);   
-        if (iString->Length() >= KHelloTraceDllBufferLength)
-            {
-            OstTrace1( TRACE_ERROR, CHELLOTRACEDLL_ADDCHARL_ERR_DUP2,
-                       "[0x%08x] Not enough space to add character", (TUint32) this);
-            User::Leave( KErrTooBig);
-            }
-        iString->Append(aChar);
-        }
-
- inline EXPORT_C void CHelloTraceInterface::RemoveLastDup2()
-        {
-        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
-
-        OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_REMOVELAST_DUP2, 
-                      "[0x%08x] Attempting to remove last character from %S", (TUint32) this, *iString);
-        if (iString->Length() > 0)
-            {
-            iString->SetLength(iString->Length() - 1);
-            }
-        else
-            {
-            OstTrace1( TRACE_WARNING, CHELLOTRACEDLL_REMOVELAST_WARN_DUP2, "[0x%08x] String already empty", (TUint32) this);   
-            }
-        }
-
- inline EXPORT_C void CHelloTraceInterface::ResetStringDup2()
-        {
-        OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_RESETSTRING_DUP2, "[0x%08x] Reseting string %S", (TUint32) this, *iString);
-        if (iString == NULL)
-            {
-            iString = new (ELeave) THelloTraceDllExampleString;
-            }
-        else
-            {
-            iString->SetLength(0);
-            }
-        }
-#endif  // __HELLOTRACEINTERFACEDUP2_H__
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/dll/incDup/HelloTraceTypesDup.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,75 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef __HELLOTRACETYPESDUP_H__
-#define __HELLOTRACETYPESDUP_H__
-
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTraceTypesDupTraces.h"
-#endif
-
-inline void HelloTraceTypes::SignedIntegersDup()
-    {
-    TInt8  eightBit     = - (TInt8)  1 << 6;
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP_8, 
-                  "8 bit signed: %hhd", eightBit );
-    
-    TInt16 sixteenBit   = - (TInt16) 1 << 14; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP_16, 
-                  "16 bit signed: %hd", sixteenBit );
-
-    TInt32 thirtyTwoBit = - (TInt32) 1 << 30; 
-    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP_32, 
-               "32 bit signed: %d", thirtyTwoBit );
-
-    TInt64 sixtyFourBit = - (TInt64) 1 << 62; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP_64, 
-                  "64 bit signed: %Ld", sixtyFourBit );
-    }
-
-inline void HelloTraceTypes::UnsignedIntegersDup()
-    {
-    TUint8  eightBit     = (TUint8)  1 << 6;
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP_8, 
-                  "8 bit unsigned: %hhu", eightBit );
-    
-    TUint16 sixteenBit   = (TUint16) 1 << 14; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP_16, 
-                  "16 bit unsigned: %hu", sixteenBit );
-
-    TUint32 thirtyTwoBit = (TUint32) 1 << 30; 
-    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP_32, 
-               "32 bit unsigned: %u", thirtyTwoBit );
-
-    TUint64 sixtyFourBit = (TUint64) 1 << 62; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP_64, 
-                  "64 bit unsigned: %Lu", sixtyFourBit );
-    }
-
-inline void HelloTraceTypes::DescriptorsDup()
-    {
-    _LIT8(KAscii, "Some ASCII text");
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_ASCIIDUP, "8 bit descriptor: %s", KAscii() );
-
-    _LIT16(KUnicode, "Some unicode text");    
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNICODEDUP, "16 bit descriptor: %S", KUnicode() );
-    }
-
-#endif  // __HELLOTRACETYPESDUP_H__
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/dll/incDup/HelloTraceTypesDup2.inl	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,75 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef __HELLOTRACETYPESDUP2_H__
-#define __HELLOTRACETYPESDUP2_H__
-
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTraceTypesDup2Traces.h"
-#endif
-
-inline void HelloTraceTypes::SignedIntegersDup2()
-    {
-    TInt8  eightBit     = - (TInt8)  1 << 6;
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP2_8, 
-                  "8 bit signed: %hhd", eightBit );
-    
-    TInt16 sixteenBit   = - (TInt16) 1 << 14; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP2_16, 
-                  "16 bit signed: %hd", sixteenBit );
-
-    TInt32 thirtyTwoBit = - (TInt32) 1 << 30; 
-    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP2_32, 
-               "32 bit signed: %d", thirtyTwoBit );
-
-    TInt64 sixtyFourBit = - (TInt64) 1 << 62; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP2_64, 
-                  "64 bit signed: %Ld", sixtyFourBit );
-    }
-
-inline void HelloTraceTypes::UnsignedIntegersDup2()
-    {
-    TUint8  eightBit     = (TUint8)  1 << 6;
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP2_8, 
-                  "8 bit unsigned: %hhu", eightBit );
-    
-    TUint16 sixteenBit   = (TUint16) 1 << 14; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP2_16, 
-                  "16 bit unsigned: %hu", sixteenBit );
-
-    TUint32 thirtyTwoBit = (TUint32) 1 << 30; 
-    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP2_32, 
-               "32 bit unsigned: %u", thirtyTwoBit );
-
-    TUint64 sixtyFourBit = (TUint64) 1 << 62; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP2_64, 
-                  "64 bit unsigned: %Lu", sixtyFourBit );
-    }
-
-inline void HelloTraceTypes::DescriptorsDup2()
-    {
-    _LIT8(KAscii, "Some ASCII text");
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_ASCIIDUP2, "8 bit descriptor: %s", KAscii() );
-
-    _LIT16(KUnicode, "Some unicode text");    
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNICODEDUP2, "16 bit descriptor: %S", KUnicode() );
-    }
-
-#endif  // __HELLOTRACETYPESDUP2_H__
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/dll/src/HelloTraceExample.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,106 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-
-#include "HelloTraceExample.h"
-#include "HelloTraceTypes.h"
-#include "HelloTraceInterface.h"
-#include "HelloTraceFn.h"
-#include "HelloTracePanic.h"
-
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTraceExampleTraces.h"
-#endif
-
-EXPORT_C void HelloTraceExample::JustTypes()
-    {
-    OstTrace0( TRACE_EXAMPLE, HELLOTRACEEXAMPLE_JUSTTYPES, "*********************************************** " );
-    
-    HelloTraceTypes::SignedIntegers();
-    HelloTraceTypes::UnsignedIntegers();
-    HelloTraceTypes::Descriptors();    
-    }
-
-EXPORT_C void HelloTraceExample::Interface()
-    {
-    OstTrace0( TRACE_EXAMPLE, HELLOTRACEEXAMPLE_INTERFACE, "*********************************************** " );
-    
-    TVersion version = CHelloTraceInterface::Version();   
-    if (version.iMajor >= 1) 
-        {
-        CHelloTraceInterface* example = CHelloTraceInterface::NewLC();
-        example->AddCharL('H');
-        example->AddCharL('e');
-        example->AddCharL('l');
-        example->AddCharL('l');
-        example->AddCharL('o');
-        example->AddCharL('T');        
-        example->RemoveLast();        
-        example->AddCharL(' ');
-        example->AddCharL('T');
-        example->AddCharL('r');
-        example->AddCharL('a');
-        example->AddCharL('c');
-        example->AddCharL('e');
-        example->AddCharL('!');
-        CleanupStack::PopAndDestroy(example);
-        }
-    else
-        {
-        OstTrace0( TRACE_ERROR, HELLOTRACEEXAMPLE_UNSUPPORTED_VERSION, "Unsupported version!");
-        }
-    }
-
-EXPORT_C void HelloTraceExample::FnEntryExit()
-    {
-    OstTrace0( TRACE_EXAMPLE, HELLOTRACEEXAMPLE_FNENTRYEXIT, "*********************************************** " );
-       
-    CHelloTraceFn* example = CHelloTraceFn::NewLC();
-    CIdle* idle = CIdle::NewL(CActive::EPriorityIdle);
-    CleanupStack::PushL(idle);
-
-    CHelloTraceFn::StaticOutputsParamsL(1);
-   
-    example->Simple();
-    example->OutputsParams(2, CHelloTraceFn::EExample1);
-    example->OutputsParams(3, CHelloTraceFn::EExample2);
-    example->OutputsSignedIntegers(-4, -5, -6, -7);
-    example->OutputsUnsignedIntegers(8, 9, 10, 11);
-    example->OutputsTIntReturnValue();    
-    example->OutputsTInt64ReturnValue(); 
-    example->OutputsTFnEnumReturnValue();
-    example->OutputsUnknownPtrType(idle);    
-    example->OutputsUnknownRefType(*idle);
-#ifdef _DEBUG
-    example->PreProcessedFn(12);
-#else
-    example->PreProcessedFn();
-#endif
-    example->OutputMissingParams(13, 14, 15);
-
-    CleanupStack::PopAndDestroy(idle);
-    CleanupStack::PopAndDestroy(example);
-    }
-
-EXPORT_C void HelloTraceExample::PanicTrace()
-    {
-    OstTrace0( TRACE_EXAMPLE, HELLOTRACEEXAMPLE_PANIC, "*********************************************** " );
-
-    Panic(EHelloTraceDllExamplePanic);
-    }
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/dll/src/HelloTraceFn.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,183 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
- 
-#include "HelloTraceFn.h"
-#include "HelloTraceFnDup.h"
-#include "HelloTraceFnDup2.inl"
-#include "HelloTracePanic.h"
-
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTraceFnTraces.h"
-#endif
-
-CHelloTraceFn* CHelloTraceFn::NewLC()
-    {
-    CHelloTraceFn* self = new (ELeave) CHelloTraceFn;
-    CleanupStack::PushL(self);
-    return self;
-    }
-
-CHelloTraceFn* CHelloTraceFn::NewL()
-    {
-    CHelloTraceFn* self = CHelloTraceFn::NewLC();
-    CleanupStack::Pop(self);
-    return self;
-    }
-
-CHelloTraceFn::CHelloTraceFn()
-    {
-    OstTrace1( TRACE_NORMAL, CHELLOTRACEFN_CHELLOTRACEFN_CTOR, "[0x%08x] Constructor", this );    
-    }
-
-CHelloTraceFn::~CHelloTraceFn()
-    {
-    OstTrace1( TRACE_NORMAL, CHELLOTRACEFN_CHELLOTRACEFN_DTOR, "[0x%08x] Destructor", this );    
-    }
-
-void CHelloTraceFn::Simple()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_SIMPLE_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_SIMPLE_EXIT, this );
-    }
-
-void CHelloTraceFn::OutputsParams(TInt aParam, TFnEnum aEnumParam)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSPARAMS_ENTRY, this );
-    Simple();
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSPARAMS_EXIT, this );
-    }
-
-void CHelloTraceFn::StaticOutputsParamsL(TInt aParam)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_STATICOUTPUTSPARAMS_ENTRY, NULL );
-    CHelloTraceFn* example = CHelloTraceFn::NewLC();
-    example->Simple();    
-    CleanupStack::PopAndDestroy(example);
-    OstTraceFunctionExit0( CHELLOTRACEFN_STATICOUTPUTSPARAMS_EXIT );    
-    }
-
-void CHelloTraceFn::OutputsSignedIntegers(TInt8 aParam8,   TInt16 aParam16, 
-                                          TInt32 aParam32, TInt64 aParam64)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS_EXIT, this );
-    }
-
-void CHelloTraceFn::OutputsUnsignedIntegers(TUint8 aParam8,   TUint16 aParam16, 
-                                            TUint32 aParam32, TUint64 aParam64)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS_EXIT, this );
-    }
-
-
-TInt CHelloTraceFn::OutputsTIntReturnValue()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_ENTRY, this );
-    TInt ret = KErrNone;
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_EXIT, this, ret );
-    return ret;
-    }
-
-TInt64 CHelloTraceFn::OutputsTInt64ReturnValue()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE_ENTRY, this );
-    TInt64 ret = (TInt64) 2 << 40;
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE_EXIT, this, ret );
-    return ret;
-    }
-
-CHelloTraceFn::TFnEnum CHelloTraceFn::OutputsTFnEnumReturnValue()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE_ENTRY, this );
-    TFnEnum ret = EExample1;
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE_EXIT, this, ret );
-    return ret;    
-    }
-
-CActive* CHelloTraceFn::OutputsUnknownPtrType(CActive* aActive)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_ENTRY, this );    
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_EXIT, this, (TUint) aActive );
-    return aActive;
-    }
-
-CActive& CHelloTraceFn::OutputsUnknownRefType(CActive& aActive)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE_ENTRY, this );
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE_EXIT, this, (TUint) &aActive );    
-    return aActive;
-    }
-
-// The following doesn't compile as the Trace Compiler doesn't generate
-// the correct OstTraceGenExt(...) function for it
-//void CHelloTraceFn::OutputMissingParamsBug(TInt /*aCommentParam*/, TInt)
-//    {
-//    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_ENTRY, this );
-//    // ...
-//    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_EXIT, this );    
-//    }
-
-// The following compiles and works but outputs the following warning
-// warning: HelloTraceFn.cpp, line xxx: Parameter did not have a name and was not added to trace
-// The fact that this cannot be suppressed is a known problem we're working on.
-void CHelloTraceFn::OutputMissingParams(TInt aUsedParam, TInt /*aCommentParam*/, TInt)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMS_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMS_EXIT, this );
-    }
-
-// The following doesn't work as the Trace Compiler outputs:
-// error: HelloTraceFn.cpp, line xxx: Class / function name for trace could not be determined x3
-//#ifdef _DEBUG
-//void CHelloTraceFn::PreProcessedFn(TInt aDbgParam)
-//    {
-//    OstTraceFunctionEntryExt( PRE_PROCESSED_ENTRTY_1, this );
-//#else
-//void CHelloTraceFn::PreProcessedFn()
-//    {
-//    OstTraceFunctionEntry1( PRE_PROCESSED_ENTRTY_2, this );
-//#endif
-//    Simple();
-//    OstTraceFunctionExit1( CHELLOTRACEFN_PREPROCESSEDFN_EXIT, this );
-//    }
-
-// Workaround example code until a proper fix is provided
-#ifdef _DEBUG
-void CHelloTraceFn::PreProcessedFn(TInt aDbgParam)
-    {
-    OstTraceExt2( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_ENTRY_1, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;aDbgParam=%d;this=%x", (TInt) aDbgParam, (TUint) this);
-#else
-void CHelloTraceFn::PreProcessedFn()
-    {
-    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_ENTRY_2, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
-#endif
-    Simple();
-    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_EXIT, "CHelloTraceFn::PreProcessedFn: < CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
-    }
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/dll/src/HelloTraceInterface.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,121 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-
-#include "HelloTraceInterface.h"
-#include "HelloTraceInterfaceDup.h"
-#include "HelloTraceInterfaceDup2.inl"
-#include "HelloTracePanic.h"
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTraceInterfaceTraces.h"
-#endif
-
-EXPORT_C CHelloTraceInterface* CHelloTraceInterface::NewLC()
-    {
-    CHelloTraceInterface* self = new (ELeave) CHelloTraceInterface;
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    return self;
-    }
-
-EXPORT_C CHelloTraceInterface* CHelloTraceInterface::NewL()
-    {
-    CHelloTraceInterface* self = CHelloTraceInterface::NewLC();
-    CleanupStack::Pop(self);
-    return self;
-    }
-
-CHelloTraceInterface::CHelloTraceInterface()
-    {
-    OstTrace1( TRACE_NORMAL, CHELLOTRACEDLL_CHELLOTRACEDLL_CTOR, "[0x%08x]", (TUint32) this );    
-    }
-
-void CHelloTraceInterface::ConstructL()
-    {
-    iString = new (ELeave) THelloTraceDllExampleString;
-    }
-
-EXPORT_C CHelloTraceInterface::~CHelloTraceInterface()
-    {
-    delete iString;
-    OstTrace1( TRACE_NORMAL, CHELLOTRACEDLL_CHELLOTRACEDLL_DTOR, "[0x%08x]", (TUint32) this );    
-    }
-
-EXPORT_C TVersion CHelloTraceInterface::Version()
-    {
-    const TInt KMajor = 1;
-    const TInt KMinor = 0;
-    const TInt KBuild = 1;
-    TVersion version = TVersion(KMajor, KMinor, KBuild);
-    OstTraceExt1( TRACE_BORDER, CHELLOTRACEDLL_VERSION, "CHelloTraceInterface::Version = %S", version.Name());   
-    return version;
-    }
-
-EXPORT_C const TPtrC CHelloTraceInterface::String() const
-    {
-    __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
-
-    OstTraceDefExt2( OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CHELLOTRACEDLL_STRING, 
-                     "[0x%08x] Returned %S", (TUint32) this, *iString);   
-    return *iString;
-    }
-
-EXPORT_C void CHelloTraceInterface::AddCharL(const TChar& aChar)
-    {
-    __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
-
-    OstTraceExt3( TRACE_BORDER, CHELLOTRACEDLL_ADDCHARL, 
-                  "[0x%08x] Adding %d to %S", (TUint32) this, (TInt32) aChar, *iString);   
-    if (iString->Length() >= KHelloTraceDllBufferLength)
-        {
-        OstTrace1( TRACE_ERROR, CHELLOTRACEDLL_ADDCHARL_ERR,
-                   "[0x%08x] Not enough space to add character", (TUint32) this);
-        User::Leave( KErrTooBig);
-        }
-    iString->Append(aChar);
-    }
-
-EXPORT_C void CHelloTraceInterface::RemoveLast()
-    {
-    __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
-
-    OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_REMOVELAST, 
-                  "[0x%08x] Attempting to remove last character from %S", (TUint32) this, *iString);
-    if (iString->Length() > 0)
-        {
-        iString->SetLength(iString->Length() - 1);
-        }
-    else
-        {
-        OstTrace1( TRACE_WARNING, CHELLOTRACEDLL_REMOVELAST_WARN, "[0x%08x] String already empty", (TUint32) this);   
-        }
-    }
-
-EXPORT_C void CHelloTraceInterface::ResetString()
-    {
-    OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_RESETSTRING, "[0x%08x] Reseting string %S", (TUint32) this, *iString);
-    if (iString == NULL)
-        {
-        iString = new (ELeave) THelloTraceDllExampleString;
-        }
-    else
-        {
-        iString->SetLength(0);
-        }
-    }
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/dll/src/HelloTracePanic.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#include <e32std.h>		 // GLDEF_C
-
-#include "HelloTracePanic.h"
-
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTracePanicTraces.h"
-#endif
-
-GLDEF_C void Panic(THelloTraceDllPanic aPanic)
-    {
-    OstTrace1( TRACE_FATAL, PANIC, "Panic(%{THelloTraceDllPanic})", (TUint) aPanic );    
-    User::Panic(_L("HelloTraceDll"), aPanic);
-    }
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/dll/src/HelloTraceTypes.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,76 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-
-#include <e32std.h>
-
-#include "HelloTraceTypes.h"
-#include "HelloTraceTypesDup.h"
-#include "HelloTraceTypesDup2.inl"
-
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTraceTypesTraces.h"
-#endif
-
-void HelloTraceTypes::SignedIntegers()
-    {
-    TInt8  eightBit     = - (TInt8)  1 << 6;
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS_8, 
-                  "8 bit signed: %hhd", eightBit );
-    
-    TInt16 sixteenBit   = - (TInt16) 1 << 14; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS_16, 
-                  "16 bit signed: %hd", sixteenBit );
-
-    TInt32 thirtyTwoBit = - (TInt32) 1 << 30; 
-    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS_32, 
-               "32 bit signed: %d", thirtyTwoBit );
-
-    TInt64 sixtyFourBit = - (TInt64) 1 << 62; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS_64, 
-                  "64 bit signed: %Ld", sixtyFourBit );
-    }
-
-void HelloTraceTypes::UnsignedIntegers()
-    {
-    TUint8  eightBit     = (TUint8)  1 << 6;
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS_8, 
-                  "8 bit unsigned: %hhu", eightBit );
-    
-    TUint16 sixteenBit   = (TUint16) 1 << 14; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS_16, 
-                  "16 bit unsigned: %hu", sixteenBit );
-
-    TUint32 thirtyTwoBit = (TUint32) 1 << 30; 
-    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS_32, 
-               "32 bit unsigned: %u", thirtyTwoBit );
-
-    TUint64 sixtyFourBit = (TUint64) 1 << 62; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS_64, 
-                  "64 bit unsigned: %Lu", sixtyFourBit );
-    }
-
-void HelloTraceTypes::Descriptors()
-    {
-    _LIT8(KAscii, "Some ASCII text");
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_ASCII, "8 bit descriptor: %s", KAscii() );
-
-    _LIT16(KUnicode, "Some unicode text");    
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNICODE, "16 bit descriptor: %S", KUnicode() );
-    }
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/dll/traces/hellotracedll2_dll/trace.properties	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<trace_properties>
-<enum name="TFnEnum">
-<value id="0">EExample1</value>
-<value id="2">EExample2</value>
-</enum>
-<enum name="THelloTraceDllPanic">
-<value id="0">EHelloTraceDllExamplePanic</value>
-<value id="1">EHelloTraceDllNullPointer</value>
-</enum>
-<file>../../incDup/HelloTraceInterfaceDup.h</file>
-<file>../../incDup/HelloTraceInterfaceDup2.inl</file>
-<file>../../incDup/HelloTraceFnDup.h</file>
-<file>../../incDup/HelloTraceFnDup2.inl</file>
-<file>../../incDup/HelloTraceTypesDup.h</file>
-<file>../../incDup/HelloTraceTypesDup2.inl</file>
-</trace_properties>
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/dll/traces/hellotracedll_dll/trace.properties	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<trace_properties>
-<enum name="TFnEnum">
-<value id="0">EExample1</value>
-<value id="2">EExample2</value>
-</enum>
-<enum name="THelloTraceDllPanic">
-<value id="0">EHelloTraceDllExamplePanic</value>
-<value id="1">EHelloTraceDllNullPointer</value>
-</enum>
-<file>../../incDup/HelloTraceInterfaceDup.h</file>
-<file>../../incDup/HelloTraceInterfaceDup2.inl</file>
-<file>../../incDup/HelloTraceFnDup.h</file>
-<file>../../incDup/HelloTraceFnDup2.inl</file>
-<file>../../incDup/HelloTraceTypesDup.h</file>
-<file>../../incDup/HelloTraceTypesDup2.inl</file>
-</trace_properties>
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/group/bld.inf	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,19 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-#include "../dll/group/bld.inf"
-#include "../console/group/bld.inf"
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/console/group/HelloTraceConsole.mmp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-
-TARGET		  HelloTraceConsole.exe
-TARGETTYPE	  exe
-UID			  0 0xE40349E4
-
-OS_LAYER_SYSTEMINCLUDE
-USERINCLUDE	   ../inc
-USERINCLUDE    ../../dll/inc
-USERINCLUDE    ../traces
-
-SOURCEPATH	  ../src
-SOURCE		  HelloTraceConsole.cpp
-
-LIBRARY		  euser.lib
-LIBRARY       HelloTraceDll.lib
-
-#ifdef ENABLE_ABIV2_MODE
-DEBUGGABLE_UDEBONLY
-#endif
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/console/group/bld.inf	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-
-PRJ_PLATFORMS
-DEFAULT
-
-PRJ_EXPORTS
-hellotraceconsole.iby             CORE_OS_LAYER_IBY_EXPORT_PATH(hellotraceconsole.iby)
-
-PRJ_MMPFILES
-HelloTraceConsole.mmp
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/console/group/hellotraceconsole.iby	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,24 +0,0 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "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:
-//
-// Description:
-// ROM build file for tracecore project
-
-#ifndef HELLOTRACECONSOLE_IBY
-#define HELLOTRACECONSOLE_IBY
-
-#include <core\os\hellotracedll.iby>
-
-file=ABI_DIR\BUILD_DIR\hellotraceconsole.exe    Sys\Bin\hellotraceconsole.exe
-
-#endif //HELLOTRACECONSOLE_IBY
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/console/inc/HelloTraceConsole.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef __HELLOTRACECONSOLE_H__
-#define __HELLOTRACECONSOLE_H__
-
-//  Include Files
-
-#include <e32base.h>
-
-//  Function Prototypes
-
-GLDEF_C TInt E32Main();
-
-#endif  // __HELLOTRACECONSOLE_H__
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/console/src/HelloTraceConsole.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,124 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#include <e32cons.h>			// Console
-
-#include "HelloTraceConsole.h"
-#include "HelloTraceExample.h"
-
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTraceConsoleTraces.h"
-#endif
-
-
-_LIT(KTextConsoleTitle, "HelloTrace");
-_LIT(KTextPressAnyKey, " [press any key]\n");
-
-LOCAL_D CConsoleBase* console; // write all messages to this
-
-LOCAL_C void DoExamples()
-    {
-    TInt err = KErrNone;
-
-    console->Printf(_L("Before main tracing examples ...\n"));
-
-    console->Printf(_L(" Before type examples ..."));
-    console->Printf(KTextPressAnyKey);
-    console->Getch();
-    TRAP(err, HelloTraceExample::JustTypes());    
-    if (err)
-        console->Printf(_L(" Failed with error %d\n"), err);
-
-    console->Printf(_L(" Before Interface examples ..."));
-    console->Printf(KTextPressAnyKey);
-    console->Getch();
-    TRAP(err, HelloTraceExample::Interface());    
-    if (err)
-        console->Printf(_L(" Failed with error %d\n"), err);
-    
-    console->Printf(_L(" Before FnEntryExit examples ..."));
-    console->Printf(KTextPressAnyKey);
-    console->Getch();
-    TRAP(err, HelloTraceExample::FnEntryExit());    
-    if (err)
-        console->Printf(_L(" Failed with error %d\n"), err);    
-    }
-
-LOCAL_C void DoStartL()
-    {
-    // Create active scheduler (to run active objects)
-    CActiveScheduler* scheduler = new (ELeave) CActiveScheduler();
-    CleanupStack::PushL(scheduler);
-    CActiveScheduler::Install(scheduler);
-
-    DoExamples();
-    
-    // Delete active scheduler
-    CleanupStack::PopAndDestroy(scheduler);
-    }
-
-//  Global Functions
-
-GLDEF_C TInt E32Main()
-    {
-    OstTraceFunctionEntry0( E32MAIN_ENTRY );
-    
-    // Create cleanup stack
-    __UHEAP_MARK;
-    CTrapCleanup* cleanup = CTrapCleanup::New();
-
-    // Create output console
-    TRAPD(createError, 
-          console = Console::NewL(KTextConsoleTitle, 
-                                  TSize(KConsFullScreen, KConsFullScreen)));    
-    if (createError)
-        {
-        delete cleanup;
-        OstTrace1( TRACE_ERROR, E32MAIN_CREATE_ERROR, "Failed to create console error: %d", createError);
-        OstTraceFunctionExit0( E32MAIN_EXIT_ERR );
-        return createError;
-        }
-
-    TRAPD(mainError, DoStartL());    
-    if (mainError)
-        {
-        OstTrace1( TRACE_ERROR, E32MAIN_START_ERROR, "DoStartL failed with error: %d", mainError);
-        console->Printf(_L("DoStartL failed with error: %d\n\n"), mainError);
-        }
-    else 
-        {
-        console->Printf(_L("Before panic tracing example ..."));
-        console->Printf(KTextPressAnyKey);
-        console->Getch();
-    
-        OstTrace0( TRACE_FLOW, E32MAIN_BEFORE_PANIC, "About to cause a panic ..." );
-        HelloTraceExample::PanicTrace();
-        
-        console->Printf(KTextPressAnyKey);
-        console->Getch();
-        }
-
-    delete console;
-    delete cleanup;
-    __UHEAP_MARKEND;
-    
-    OstTraceFunctionExit0( E32MAIN_EXIT );
-    return KErrNone;
-    }
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/bwins/HelloTraceDllu.def	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,14 +0,0 @@
-EXPORTS
-	?Version@CHelloTraceInterface@@SA?AVTVersion@@XZ @ 1 NONAME ; class TVersion CHelloTraceInterface::Version(void)
-	?NewLC@CHelloTraceInterface@@SAPAV1@XZ @ 2 NONAME ; class CHelloTraceInterface * CHelloTraceInterface::NewLC(void)
-	?JustTypes@HelloTraceExample@@SAXXZ @ 3 NONAME ; void HelloTraceExample::JustTypes(void)
-	?Interface@HelloTraceExample@@SAXXZ @ 4 NONAME ; void HelloTraceExample::Interface(void)
-	?FnEntryExit@HelloTraceExample@@SAXXZ @ 5 NONAME ; void HelloTraceExample::FnEntryExit(void)
-	?ResetString@CHelloTraceInterface@@QAEXXZ @ 6 NONAME ; void CHelloTraceInterface::ResetString(void)
-	?AddCharL@CHelloTraceInterface@@QAEXABVTChar@@@Z @ 7 NONAME ; void CHelloTraceInterface::AddCharL(class TChar const &)
-	?PanicTrace@HelloTraceExample@@SAXXZ @ 8 NONAME ; void HelloTraceExample::PanicTrace(void)
-	??1CHelloTraceInterface@@UAE@XZ @ 9 NONAME ; CHelloTraceInterface::~CHelloTraceInterface(void)
-	?String@CHelloTraceInterface@@QBE?BVTPtrC16@@XZ @ 10 NONAME ; class TPtrC16 const CHelloTraceInterface::String(void) const
-	?RemoveLast@CHelloTraceInterface@@QAEXXZ @ 11 NONAME ; void CHelloTraceInterface::RemoveLast(void)
-	?NewL@CHelloTraceInterface@@SAPAV1@XZ @ 12 NONAME ; class CHelloTraceInterface * CHelloTraceInterface::NewL(void)
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/eabi/HelloTraceDllu.def	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,20 +0,0 @@
-EXPORTS
-	_ZN17HelloTraceExample10PanicTraceEv @ 1 NONAME
-	_ZN17HelloTraceExample11FnEntryExitEv @ 2 NONAME
-	_ZN17HelloTraceExample9InterfaceEv @ 3 NONAME
-	_ZN17HelloTraceExample9JustTypesEv @ 4 NONAME
-	_ZN20CHelloTraceInterface10RemoveLastEv @ 5 NONAME
-	_ZN20CHelloTraceInterface11ResetStringEv @ 6 NONAME
-	_ZN20CHelloTraceInterface4NewLEv @ 7 NONAME
-	_ZN20CHelloTraceInterface5NewLCEv @ 8 NONAME
-	_ZN20CHelloTraceInterface7VersionEv @ 9 NONAME
-	_ZN20CHelloTraceInterface8AddCharLERK5TChar @ 10 NONAME
-	_ZN20CHelloTraceInterfaceD0Ev @ 11 NONAME
-	_ZN20CHelloTraceInterfaceD1Ev @ 12 NONAME
-	_ZN20CHelloTraceInterfaceD2Ev @ 13 NONAME
-	_ZNK20CHelloTraceInterface6StringEv @ 14 NONAME
-	_ZTI13CHelloTraceFn @ 15 NONAME
-	_ZTI20CHelloTraceInterface @ 16 NONAME
-	_ZTV13CHelloTraceFn @ 17 NONAME
-	_ZTV20CHelloTraceInterface @ 18 NONAME
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/group/HelloTraceDll.mmp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-
-TARGET		  HelloTraceDll.dll
-TARGETTYPE	  dll
-UID			  0x1000008d 0xE43DF43E
-CAPABILITY    ReadUserData
-
-OS_LAYER_SYSTEMINCLUDE
-USERINCLUDE  ../inc ../incDup
-USERINCLUDE  ../traces
-
-SOURCEPATH	 ../src
-SOURCE       HelloTraceExample.cpp 
-SOURCE       HelloTraceTypes.cpp
-SOURCE       HelloTraceInterface.cpp 
-SOURCE       HelloTraceFn.cpp 
-SOURCE       HelloTracePanic.cpp 
-
-LIBRARY		 euser.lib
-
-#ifdef ENABLE_ABIV2_MODE
-DEBUGGABLE_UDEBONLY
-#endif
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/group/HelloTraceDll2.mmp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-
-TARGET		  HelloTraceDll2.dll
-TARGETTYPE	  dll
-UID			  0x1000008d 0xE43DF43E
-CAPABILITY    ReadUserData
-
-OS_LAYER_SYSTEMINCLUDE
-USERINCLUDE  ../inc ../incDup
-USERINCLUDE  ../traces
-
-SOURCEPATH	 ../src
-SOURCE       HelloTraceExample2.cpp 
-SOURCE       HelloTraceTypes2.cpp
-SOURCE       HelloTraceInterface2.cpp 
-SOURCE       HelloTraceFn2.cpp 
-SOURCE       HelloTracePanic2.cpp 
-
-LIBRARY		 euser.lib
-
-#ifdef ENABLE_ABIV2_MODE
-DEBUGGABLE_UDEBONLY
-#endif
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/group/bld.inf	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-
-PRJ_PLATFORMS
-DEFAULT
-
-PRJ_EXPORTS
-hellotracedll.iby             CORE_OS_LAYER_IBY_EXPORT_PATH(hellotracedll.iby)
-
-PRJ_MMPFILES
-HelloTraceDll.mmp
-HelloTraceDll2.mmp
\ No newline at end of file
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/group/hellotracedll.iby	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "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:
-//
-// Description:
-// ROM build file for tracecore project
-
-#ifndef HELLOTRACEDLL_IBY
-#define HELLOTRACEDLL_IBY
-
-file=ABI_DIR\BUILD_DIR\hellotracedll.dll        Sys\Bin\hellotracedll.dll
-file=ABI_DIR\BUILD_DIR\hellotracedll2.dll        Sys\Bin\hellotracedll2.dll
-
-#endif //HELLOTRACEDLL_IBY
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/inc/HelloTraceExample.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef __HELLOTRACEEXAMPLE_H__
-#define __HELLOTRACEEXAMPLE_H__
-
-#include <e32std.h>
-
-class HelloTraceExample
-    {
-public:
-    IMPORT_C static void JustTypes();    
-    IMPORT_C static void Interface();    
-    IMPORT_C static void FnEntryExit();    
-    IMPORT_C static void PanicTrace();    
-
-    // @TODO add examples for state macros
-    // @TODO add examples for event macros
-    // @TODO add examples for OstTraceData
-    // @TODO add compile-time selector examples
-    // @TODO add macro wrapper examples
-    };
-
-#endif  // __HELLOTRACEEXAMPLE_H__
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/inc/HelloTraceFn.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,122 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef HELLOTRACEFN_H_
-#define HELLOTRACEFN_H_
-
-#include <e32base.h>    // CBase
-
-class CHelloTraceFn : public CBase
-    {
-public:
-    
-    // Note the Trace Builder will only parse this if it's in a cpp file
-    // but not from here :(
-    // Also if you add a new enum you need to reparse the enum - it doesn't
-    // get automatically reparsed by the Trace Compiler :(
-    enum TFnEnum
-        {
-        EExample1,
-        EExample2 = 2, 
-        // EExample3 = EExample2 + 1, // The Trace Builder can't parse this :(
-        };
-    
-public:
-    static CHelloTraceFn* NewL();
-    static CHelloTraceFn* NewLC();
-    ~CHelloTraceFn();
-   
-public: // Fn entry / exit tracing examples 
-    void Simple();
-    void OutputsParams(TInt aParam, TFnEnum aEnumParam);
-    void OutputsSignedIntegers(TInt8 aParam8,   TInt16 aParam16, 
-                               TInt32 aParam32, TInt64 aParam64);
-    void OutputsUnsignedIntegers(TUint8 aParam8,   TUint16 aParam16, 
-                                 TUint32 aParam32, TUint64 aParam64);
-     
-    TInt OutputsTIntReturnValue();
-    TInt64 OutputsTInt64ReturnValue();
-    TFnEnum OutputsTFnEnumReturnValue();
-
-    CActive* OutputsUnknownPtrType(CActive* aActive);
-    CActive& OutputsUnknownRefType(CActive& aActive);
-    
-    void OutputMissingParams(TInt aUsedParam, TInt aCommentParam, TInt aMissingParam);
-
-#ifdef _DEBUG    
-    void PreProcessedFn(TInt aDbgParam);
-#else
-    void PreProcessedFn();
-#endif
-    
-    static void StaticOutputsParamsL(TInt aParam);  
-    
-    // duplicate all the function and put the impl in the header file HelloTraceFnDup.h
-    void SimpleDup();
-    void OutputsParamsDup(TInt aParam, TFnEnum aEnumParam);
-    void OutputsSignedIntegersDup(TInt8 aParam8,   TInt16 aParam16, 
-                               TInt32 aParam32, TInt64 aParam64);
-    void OutputsUnsignedIntegersDup(TUint8 aParam8,   TUint16 aParam16, 
-                                 TUint32 aParam32, TUint64 aParam64);
-     
-    TInt OutputsTIntReturnValueDup();
-    TInt64 OutputsTInt64ReturnValueDup();
-    TFnEnum OutputsTFnEnumReturnValueDup();
-
-    CActive* OutputsUnknownPtrTypeDup(CActive* aActive);
-    CActive& OutputsUnknownRefTypeDup(CActive& aActive);
-    
-    void OutputMissingParamsDup(TInt aUsedParam, TInt aCommentParam, TInt aMissingParam);
-
-#ifdef _DEBUG    
-    void PreProcessedFnDup(TInt aDbgParam);
-#else
-    void PreProcessedFnDup();
-#endif
-    static void StaticOutputsParamsDupL(TInt aParam);  
-    
-    // duplicate all the function again and put the impl in the header file HelloTraceFnDup2.h
-    void SimpleDup2();
-    void OutputsParamsDup2(TInt aParam, TFnEnum aEnumParam);
-    void OutputsSignedIntegersDup2(TInt8 aParam8,   TInt16 aParam16, 
-                               TInt32 aParam32, TInt64 aParam64);
-    void OutputsUnsignedIntegersDup2(TUint8 aParam8,   TUint16 aParam16, 
-                                 TUint32 aParam32, TUint64 aParam64);
-     
-    TInt OutputsTIntReturnValueDup2();
-    TInt64 OutputsTInt64ReturnValueDup2();
-    TFnEnum OutputsTFnEnumReturnValueDup2();
-
-    CActive* OutputsUnknownPtrTypeDup2(CActive* aActive);
-    CActive& OutputsUnknownRefTypeDup2(CActive& aActive);
-    
-    void OutputMissingParamsDup2(TInt aUsedParam, TInt aCommentParam, TInt aMissingParam);
-
-#ifdef _DEBUG    
-    void PreProcessedFnDup2(TInt aDbgParam);
-#else
-    void PreProcessedFnDup2();
-#endif
-    static void StaticOutputsParamsDup2L(TInt aParam);  
-
-
-private:
-    CHelloTraceFn();
-    };
-
-#endif /* HELLOTRACEFN_H_ */
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/inc/HelloTraceFn2.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,122 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef HELLOTRACEFN2_H_
-#define HELLOTRACEFN2_H_
-
-#include <e32base.h>    // CBase
-
-class CHelloTraceFn : public CBase
-    {
-public:
-    
-    // Note the Trace Builder will only parse this if it's in a cpp file
-    // but not from here :(
-    // Also if you add a new enum you need to reparse the enum - it doesn't
-    // get automatically reparsed by the Trace Compiler :(
-    enum TFnEnum
-        {
-        EExample1,
-        EExample2 = 2, 
-        // EExample3 = EExample2 + 1, // The Trace Builder can't parse this :(
-        };
-    
-public:
-    static CHelloTraceFn* NewL();
-    static CHelloTraceFn* NewLC();
-    ~CHelloTraceFn();
-   
-public: // Fn entry / exit tracing examples 
-    void Simple();
-    void OutputsParams(TInt aParam, TFnEnum aEnumParam);
-    void OutputsSignedIntegers(TInt8 aParam8,   TInt16 aParam16, 
-                               TInt32 aParam32, TInt64 aParam64);
-    void OutputsUnsignedIntegers(TUint8 aParam8,   TUint16 aParam16, 
-                                 TUint32 aParam32, TUint64 aParam64);
-     
-    TInt OutputsTIntReturnValue();
-    TInt64 OutputsTInt64ReturnValue();
-    TFnEnum OutputsTFnEnumReturnValue();
-
-    CActive* OutputsUnknownPtrType(CActive* aActive);
-    CActive& OutputsUnknownRefType(CActive& aActive);
-    
-    void OutputMissingParams(TInt aUsedParam, TInt aCommentParam, TInt aMissingParam);
-
-#ifdef _DEBUG    
-    void PreProcessedFn(TInt aDbgParam);
-#else
-    void PreProcessedFn();
-#endif
-    
-    static void StaticOutputsParamsL(TInt aParam);  
-    
-    // duplicate all the function and put the impl in the header file HelloTraceFnDup.h
-    void SimpleDup();
-    void OutputsParamsDup(TInt aParam, TFnEnum aEnumParam);
-    void OutputsSignedIntegersDup(TInt8 aParam8,   TInt16 aParam16, 
-                               TInt32 aParam32, TInt64 aParam64);
-    void OutputsUnsignedIntegersDup(TUint8 aParam8,   TUint16 aParam16, 
-                                 TUint32 aParam32, TUint64 aParam64);
-     
-    TInt OutputsTIntReturnValueDup();
-    TInt64 OutputsTInt64ReturnValueDup();
-    TFnEnum OutputsTFnEnumReturnValueDup();
-
-    CActive* OutputsUnknownPtrTypeDup(CActive* aActive);
-    CActive& OutputsUnknownRefTypeDup(CActive& aActive);
-    
-    void OutputMissingParamsDup(TInt aUsedParam, TInt aCommentParam, TInt aMissingParam);
-
-#ifdef _DEBUG    
-    void PreProcessedFnDup(TInt aDbgParam);
-#else
-    void PreProcessedFnDup();
-#endif
-    static void StaticOutputsParamsDupL(TInt aParam);  
-    
-    // duplicate all the function again and put the impl in the header file HelloTraceFnDup2.h
-    void SimpleDup2();
-    void OutputsParamsDup2(TInt aParam, TFnEnum aEnumParam);
-    void OutputsSignedIntegersDup2(TInt8 aParam8,   TInt16 aParam16, 
-                               TInt32 aParam32, TInt64 aParam64);
-    void OutputsUnsignedIntegersDup2(TUint8 aParam8,   TUint16 aParam16, 
-                                 TUint32 aParam32, TUint64 aParam64);
-     
-    TInt OutputsTIntReturnValueDup2();
-    TInt64 OutputsTInt64ReturnValueDup2();
-    TFnEnum OutputsTFnEnumReturnValueDup2();
-
-    CActive* OutputsUnknownPtrTypeDup2(CActive* aActive);
-    CActive& OutputsUnknownRefTypeDup2(CActive& aActive);
-    
-    void OutputMissingParamsDup2(TInt aUsedParam, TInt aCommentParam, TInt aMissingParam);
-
-#ifdef _DEBUG    
-    void PreProcessedFnDup2(TInt aDbgParam);
-#else
-    void PreProcessedFnDup2();
-#endif
-    static void StaticOutputsParamsDup2L(TInt aParam);  
-
-
-private:
-    CHelloTraceFn();
-    };
-
-#endif /* HELLOTRACEFN2_H_ */
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/inc/HelloTraceInterface.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,63 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef __HELLOTRACEINTERFACE_H__
-#define __HELLOTRACEINTERFACE_H__
-
-#include <e32base.h>	// CBase
-#include <e32std.h>	 // TBuf
-
-const TInt KHelloTraceDllBufferLength = 10;
-typedef TBuf<KHelloTraceDllBufferLength> THelloTraceDllExampleString;
-
-class CHelloTraceInterface : public CBase
-    {
-public:
-    IMPORT_C static CHelloTraceInterface* NewL();
-    IMPORT_C static CHelloTraceInterface* NewLC();
-    IMPORT_C ~CHelloTraceInterface();
-
-public:
-    IMPORT_C static TVersion Version();
-    IMPORT_C const TPtrC String() const;
-    IMPORT_C void AddCharL(const TChar& aChar);
-    IMPORT_C void RemoveLast();
-    IMPORT_C void ResetString();
-    
-    IMPORT_C static TVersion VersionDup();
-    IMPORT_C const TPtrC StringDup() const;
-    IMPORT_C void AddCharDupL(const TChar& aChar);
-    IMPORT_C void RemoveLastDup();
-    IMPORT_C void ResetStringDup();
-
-    IMPORT_C static TVersion VersionDup2();
-    IMPORT_C const TPtrC StringDup2() const;
-    IMPORT_C void AddCharDup2L(const TChar& aChar);
-    IMPORT_C void RemoveLastDup2();
-    IMPORT_C void ResetStringDup2();
-private:
-    CHelloTraceInterface();
-    void ConstructL();
-
-private:
-    // data
-    THelloTraceDllExampleString* iString;
-    };
-
-#endif  // __HELLOTRACEINTERFACE_H__
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/inc/HelloTraceInterface2.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,63 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef __HELLOTRACEINTERFACE2_H__
-#define __HELLOTRACEINTERFACE2_H__
-
-#include <e32base.h>	// CBase
-#include <e32std.h>	 // TBuf
-
-const TInt KHelloTraceDllBufferLength = 10;
-typedef TBuf<KHelloTraceDllBufferLength> THelloTraceDllExampleString;
-
-class CHelloTraceInterface : public CBase
-    {
-public:
-    IMPORT_C static CHelloTraceInterface* NewL();
-    IMPORT_C static CHelloTraceInterface* NewLC();
-    IMPORT_C ~CHelloTraceInterface();
-
-public:
-    IMPORT_C static TVersion Version();
-    IMPORT_C const TPtrC String() const;
-    IMPORT_C void AddCharL(const TChar& aChar);
-    IMPORT_C void RemoveLast();
-    IMPORT_C void ResetString();
-    
-    IMPORT_C static TVersion VersionDup();
-    IMPORT_C const TPtrC StringDup() const;
-    IMPORT_C void AddCharDupL(const TChar& aChar);
-    IMPORT_C void RemoveLastDup();
-    IMPORT_C void ResetStringDup();
-
-    IMPORT_C static TVersion VersionDup2();
-    IMPORT_C const TPtrC StringDup2() const;
-    IMPORT_C void AddCharDup2L(const TChar& aChar);
-    IMPORT_C void RemoveLastDup2();
-    IMPORT_C void ResetStringDup2();
-private:
-    CHelloTraceInterface();
-    void ConstructL();
-
-private:
-    // data
-    THelloTraceDllExampleString* iString;
-    };
-
-#endif  // __HELLOTRACEINTERFACE2_H__
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/inc/HelloTracePanic.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef __HELLOTRACEDLL_PAN__
-#define __HELLOTRACEDLL_PAN__
-
-//  Data Types
-
-enum THelloTraceDllPanic
-    {
-    EHelloTraceDllExamplePanic,
-    EHelloTraceDllNullPointer,
-    };
-
-//  Function Prototypes
-
-GLREF_C void Panic(THelloTraceDllPanic aPanic);
-
-#endif  // __HELLOTRACEDLL_PAN__
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/inc/HelloTraceTypes.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef __HELLOTRACETYPES_H__
-#define __HELLOTRACETYPES_H__
-
-class HelloTraceTypes
-    {
-public:
-    static void SignedIntegers();
-    static void UnsignedIntegers();
-    static void Descriptors();
-    
-    static void SignedIntegersDup();
-    static void UnsignedIntegersDup();
-    static void DescriptorsDup();
-        
-    static void SignedIntegersDup2();
-    static void UnsignedIntegersDup2();
-    static void DescriptorsDup2();
-    };
-
-#endif  // __HELLOTRACETYPES_H__
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/inc/HelloTraceTypes2.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef __HELLOTRACETYPES2_H__
-#define __HELLOTRACETYPES2_H__
-
-class HelloTraceTypes
-    {
-public:
-    static void SignedIntegers();
-    static void UnsignedIntegers();
-    static void Descriptors();
-    
-    static void SignedIntegersDup();
-    static void UnsignedIntegersDup();
-    static void DescriptorsDup();
-        
-    static void SignedIntegersDup2();
-    static void UnsignedIntegersDup2();
-    static void DescriptorsDup2();
-    };
-
-#endif  // __HELLOTRACETYPES2_H__
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/incDup/HelloTraceFn2Dup.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,156 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-#ifndef HELLOTRACEFNDUP2_H_
-#define HELLOTRACEFNDUP2_H_
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTraceFn2DupTraces.h"
-#endif
-
-inline void CHelloTraceFn::SimpleDup()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_SIMPLE2_DUP_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_SIMPLE2_DUP_EXIT, this );
-    }
-
-inline void CHelloTraceFn::OutputsParamsDup(TInt aParam, TFnEnum aEnumParam)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSPARAMS2_DUP_ENTRY, this );
-    Simple();
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSPARAMS2_DUP_EXIT, this );
-    }
-
-inline void CHelloTraceFn::StaticOutputsParamsDupL(TInt aParam)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_STATICOUTPUTSPARAMS2_DUP_ENTRY, NULL );
-    CHelloTraceFn* example = CHelloTraceFn::NewLC();
-    example->SimpleDup();    
-    CleanupStack::PopAndDestroy(example);
-    OstTraceFunctionExit0( CHELLOTRACEFN_STATICOUTPUTSPARAMS2_DUP_EXIT );    
-    }
-
-inline void CHelloTraceFn::OutputsSignedIntegersDup(TInt8 aParam8,   TInt16 aParam16, 
-                                          TInt32 aParam32, TInt64 aParam64)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS2_DUP_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS2_DUP_EXIT, this );
-    }
-
-void CHelloTraceFn::OutputsUnsignedIntegersDup(TUint8 aParam8,   TUint16 aParam16, 
-                                            TUint32 aParam32, TUint64 aParam64)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS2_DUP_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS2_DUP_EXIT, this );
-    }
-
-
-inline TInt CHelloTraceFn::OutputsTIntReturnValueDup()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE2_DUP_ENTRY, this );
-    TInt ret = KErrNone;
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE2_DUP_EXIT, this, ret );
-    return ret;
-    }
-
-inline TInt64 CHelloTraceFn::OutputsTInt64ReturnValueDup()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE2_DUP_ENTRY, this );
-    TInt64 ret = (TInt64) 2 << 40;
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE2_DUP_EXIT, this, ret );
-    return ret;
-    }
-
-inline CHelloTraceFn::TFnEnum CHelloTraceFn::OutputsTFnEnumReturnValueDup()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE2_DUP_ENTRY, this );
-    TFnEnum ret = EExample1;
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE2_DUP_EXIT, this, ret );
-    return ret;    
-    }
-
-inline CActive* CHelloTraceFn::OutputsUnknownPtrTypeDup(CActive* aActive)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE2_DUP_ENTRY, this );    
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE2_DUP_EXIT, this, (TUint) aActive );
-    return aActive;
-    }
-
-inline CActive& CHelloTraceFn::OutputsUnknownRefTypeDup(CActive& aActive)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE2_DUP_ENTRY, this );
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE2_DUP_EXIT, this, (TUint) &aActive );    
-    return aActive;
-    }
-
-// The following doesn't compile as the Trace Compiler doesn't generate
-// the correct OstTraceGenExt(...) function for it
-//void CHelloTraceFn::OutputMissingParamsBug(TInt /*aCommentParam*/, TInt)
-//    {
-//    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_ENTRY, this );
-//    // ...
-//    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_EXIT, this );    
-//    }
-
-// The following compiles and works but outputs the following warning
-// warning: HelloTraceFn.cpp, line xxx: Parameter did not have a name and was not added to trace
-// The fact that this cannot be suppressed is a known problem we're working on.
-inline void CHelloTraceFn::OutputMissingParamsDup(TInt aUsedParam, TInt /*aCommentParam*/, TInt)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMS2_DUP_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMS2_DUP_EXIT, this );
-    }
-
-// The following doesn't work as the Trace Compiler outputs:
-// error: HelloTraceFn.cpp, line xxx: Class / function name for trace could not be determined x3
-//#ifdef _DEBUG
-//void CHelloTraceFn::PreProcessedFn(TInt aDbgParam)
-//    {
-//    OstTraceFunctionEntryExt( PRE_PROCESSED_ENTRTY_1, this );
-//#else
-//void CHelloTraceFn::PreProcessedFn()
-//    {
-//    OstTraceFunctionEntry1( PRE_PROCESSED_ENTRTY_2, this );
-//#endif
-//    Simple();
-//    OstTraceFunctionExit1( CHELLOTRACEFN_PREPROCESSEDFN_EXIT, this );
-//    }
-
-// Workaround example code until a proper fix is provided
-#ifdef _DEBUG
-inline void CHelloTraceFn::PreProcessedFnDup(TInt aDbgParam)
-    {
-    OstTraceExt2( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN2_DUP_ENTRY_1, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;aDbgParam=%d;this=%x", (TInt) aDbgParam, (TUint) this);
-#else
-    inline void CHelloTraceFn::PreProcessedFnDup()
-    {
-    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN2_DUP_ENTRY_2, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
-#endif
-    SimpleDup();
-    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN2_DUP_EXIT, "CHelloTraceFn::PreProcessedFn: < CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
-    }
-
-#endif /* HELLOTRACEFN2DUP_H_ */
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/incDup/HelloTraceFn2Dup2.inl	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,157 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef HELLOTRACEFN2DUP2_H_
-#define HELLOTRACEFN2DUP2_H_
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTraceFn2Dup2Traces.h"
-#endif
-
-inline void CHelloTraceFn::SimpleDup2()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_SIMPLE2_DUP2_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_SIMPLE2_DUP2_EXIT, this );
-    }
-
-inline void CHelloTraceFn::OutputsParamsDup2(TInt aParam, TFnEnum aEnumParam)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSPARAMS2_DUP2_ENTRY, this );
-    Simple();
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSPARAMS2_DUP2_EXIT, this );
-    }
-
-inline void CHelloTraceFn::StaticOutputsParamsDup2L(TInt aParam)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_STATICOUTPUTSPARAMS2_DUP2_ENTRY, NULL );
-    CHelloTraceFn* example = CHelloTraceFn::NewLC();
-    example->SimpleDup2();    
-    CleanupStack::PopAndDestroy(example);
-    OstTraceFunctionExit0( CHELLOTRACEFN_STATICOUTPUTSPARAMS2_DUP2_EXIT );    
-    }
-
-inline void CHelloTraceFn::OutputsSignedIntegersDup2(TInt8 aParam8,   TInt16 aParam16, 
-                                          TInt32 aParam32, TInt64 aParam64)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS2_DUP2_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS2_DUP2_EXIT, this );
-    }
-
-inline void CHelloTraceFn::OutputsUnsignedIntegersDup2(TUint8 aParam8,   TUint16 aParam16, 
-                                            TUint32 aParam32, TUint64 aParam64)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS2_DUP2_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS2_DUP2_EXIT, this );
-    }
-
-
-inline TInt CHelloTraceFn::OutputsTIntReturnValueDup2()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE2_DUP2_ENTRY, this );
-    TInt ret = KErrNone;
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE2_DUP2_EXIT, this, ret );
-    return ret;
-    }
-
-inline TInt64 CHelloTraceFn::OutputsTInt64ReturnValueDup2()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE2_DUP2_ENTRY, this );
-    TInt64 ret = (TInt64) 2 << 40;
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE2_DUP2_EXIT, this, ret );
-    return ret;
-    }
-
-inline CHelloTraceFn::TFnEnum CHelloTraceFn::OutputsTFnEnumReturnValueDup2()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE2_DUP2_ENTRY, this );
-    TFnEnum ret = EExample1;
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE2_DUP2_EXIT, this, ret );
-    return ret;    
-    }
-
-inline CActive* CHelloTraceFn::OutputsUnknownPtrTypeDup2(CActive* aActive)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE2_DUP2_ENTRY, this );    
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE2_DUP2_EXIT, this, (TUint) aActive );
-    return aActive;
-    }
-
-inline CActive& CHelloTraceFn::OutputsUnknownRefTypeDup2(CActive& aActive)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE2_DUP2_ENTRY, this );
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE2_DUP2_EXIT, this, (TUint) &aActive );    
-    return aActive;
-    }
-
-// The following doesn't compile as the Trace Compiler doesn't generate
-// the correct OstTraceGenExt(...) function for it
-//void CHelloTraceFn::OutputMissingParamsBug(TInt /*aCommentParam*/, TInt)
-//    {
-//    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_ENTRY, this );
-//    // ...
-//    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_EXIT, this );    
-//    }
-
-// The following compiles and works but outputs the following warning
-// warning: HelloTraceFn.cpp, line xxx: Parameter did not have a name and was not added to trace
-// The fact that this cannot be suppressed is a known problem we're working on.
-inline void CHelloTraceFn::OutputMissingParamsDup2(TInt aUsedParam, TInt /*aCommentParam*/, TInt)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMS2_DUP2_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMS2_DUP2_EXIT, this );
-    }
-
-// The following doesn't work as the Trace Compiler outputs:
-// error: HelloTraceFn.cpp, line xxx: Class / function name for trace could not be determined x3
-//#ifdef _DEBUG
-//void CHelloTraceFn::PreProcessedFn(TInt aDbgParam)
-//    {
-//    OstTraceFunctionEntryExt( PRE_PROCESSED_ENTRTY_1, this );
-//#else
-//void CHelloTraceFn::PreProcessedFn()
-//    {
-//    OstTraceFunctionEntry1( PRE_PROCESSED_ENTRTY_2, this );
-//#endif
-//    Simple();
-//    OstTraceFunctionExit1( CHELLOTRACEFN_PREPROCESSEDFN_EXIT, this );
-//    }
-
-// Workaround example code until a proper fix is provided
-#ifdef _DEBUG
-inline void CHelloTraceFn::PreProcessedFnDup2(TInt aDbgParam)
-    {
-    OstTraceExt2( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN2_DUP2_ENTRY_1, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;aDbgParam=%d;this=%x", (TInt) aDbgParam, (TUint) this);
-#else
-    inline void CHelloTraceFn::PreProcessedFnDup2()
-    {
-    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN2_DUP2_ENTRY_2, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
-#endif
-    SimpleDup2();
-    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN2_DUP2_EXIT, "CHelloTraceFn::PreProcessedFn: < CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
-    }
-
-#endif /* HELLOTRACEFN2DUP2_H_ */
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/incDup/HelloTraceFnDup.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,157 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef HELLOTRACEFNDUP_H_
-#define HELLOTRACEFNDUP_H_
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTraceFnDupTraces.h"
-#endif
-
-inline void CHelloTraceFn::SimpleDup()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_SIMPLE_DUP_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_SIMPLE_DUP_EXIT, this );
-    }
-
-inline void CHelloTraceFn::OutputsParamsDup(TInt aParam, TFnEnum aEnumParam)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSPARAMS_DUP_ENTRY, this );
-    Simple();
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSPARAMS_DUP_EXIT, this );
-    }
-
-inline void CHelloTraceFn::StaticOutputsParamsDupL(TInt aParam)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_STATICOUTPUTSPARAMS_DUP_ENTRY, NULL );
-    CHelloTraceFn* example = CHelloTraceFn::NewLC();
-    example->SimpleDup();    
-    CleanupStack::PopAndDestroy(example);
-    OstTraceFunctionExit0( CHELLOTRACEFN_STATICOUTPUTSPARAMS_DUP_EXIT );    
-    }
-
-inline void CHelloTraceFn::OutputsSignedIntegersDup(TInt8 aParam8,   TInt16 aParam16, 
-                                          TInt32 aParam32, TInt64 aParam64)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS_DUP_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS_DUP_EXIT, this );
-    }
-
-void CHelloTraceFn::OutputsUnsignedIntegersDup(TUint8 aParam8,   TUint16 aParam16, 
-                                            TUint32 aParam32, TUint64 aParam64)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS_DUP_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS_DUP_EXIT, this );
-    }
-
-
-inline TInt CHelloTraceFn::OutputsTIntReturnValueDup()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_DUP_ENTRY, this );
-    TInt ret = KErrNone;
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_DUP_EXIT, this, ret );
-    return ret;
-    }
-
-inline TInt64 CHelloTraceFn::OutputsTInt64ReturnValueDup()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE_DUP_ENTRY, this );
-    TInt64 ret = (TInt64) 2 << 40;
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE_DUP_EXIT, this, ret );
-    return ret;
-    }
-
-inline CHelloTraceFn::TFnEnum CHelloTraceFn::OutputsTFnEnumReturnValueDup()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE_DUP_ENTRY, this );
-    TFnEnum ret = EExample1;
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE_DUP_EXIT, this, ret );
-    return ret;    
-    }
-
-inline CActive* CHelloTraceFn::OutputsUnknownPtrTypeDup(CActive* aActive)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_DUP_ENTRY, this );    
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_DUP_EXIT, this, (TUint) aActive );
-    return aActive;
-    }
-
-inline CActive& CHelloTraceFn::OutputsUnknownRefTypeDup(CActive& aActive)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE_DUP_ENTRY, this );
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE_DUP_EXIT, this, (TUint) &aActive );    
-    return aActive;
-    }
-
-// The following doesn't compile as the Trace Compiler doesn't generate
-// the correct OstTraceGenExt(...) function for it
-//void CHelloTraceFn::OutputMissingParamsBug(TInt /*aCommentParam*/, TInt)
-//    {
-//    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_ENTRY, this );
-//    // ...
-//    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_EXIT, this );    
-//    }
-
-// The following compiles and works but outputs the following warning
-// warning: HelloTraceFn.cpp, line xxx: Parameter did not have a name and was not added to trace
-// The fact that this cannot be suppressed is a known problem we're working on.
-inline void CHelloTraceFn::OutputMissingParamsDup(TInt aUsedParam, TInt /*aCommentParam*/, TInt)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMS_DUP_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMS_DUP_EXIT, this );
-    }
-
-// The following doesn't work as the Trace Compiler outputs:
-// error: HelloTraceFn.cpp, line xxx: Class / function name for trace could not be determined x3
-//#ifdef _DEBUG
-//void CHelloTraceFn::PreProcessedFn(TInt aDbgParam)
-//    {
-//    OstTraceFunctionEntryExt( PRE_PROCESSED_ENTRTY_1, this );
-//#else
-//void CHelloTraceFn::PreProcessedFn()
-//    {
-//    OstTraceFunctionEntry1( PRE_PROCESSED_ENTRTY_2, this );
-//#endif
-//    Simple();
-//    OstTraceFunctionExit1( CHELLOTRACEFN_PREPROCESSEDFN_EXIT, this );
-//    }
-
-// Workaround example code until a proper fix is provided
-#ifdef _DEBUG
-inline void CHelloTraceFn::PreProcessedFnDup(TInt aDbgParam)
-    {
-    OstTraceExt2( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_DUP_ENTRY_1, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;aDbgParam=%d;this=%x", (TInt) aDbgParam, (TUint) this);
-#else
-    inline void CHelloTraceFn::PreProcessedFnDup()
-    {
-    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_DUP_ENTRY_2, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
-#endif
-    SimpleDup();
-    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_DUP_EXIT, "CHelloTraceFn::PreProcessedFn: < CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
-    }
-
-#endif /* HELLOTRACEFNDUP_H_ */
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/incDup/HelloTraceFnDup2.inl	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,157 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef HELLOTRACEFNDUP2_H_
-#define HELLOTRACEFNDUP2_H_
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTraceFnDup2Traces.h"
-#endif
-
-inline void CHelloTraceFn::SimpleDup2()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_SIMPLE_DUP2_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_SIMPLE_DUP2_EXIT, this );
-    }
-
-inline void CHelloTraceFn::OutputsParamsDup2(TInt aParam, TFnEnum aEnumParam)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSPARAMS_DUP2_ENTRY, this );
-    Simple();
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSPARAMS_DUP2_EXIT, this );
-    }
-
-inline void CHelloTraceFn::StaticOutputsParamsDup2L(TInt aParam)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_STATICOUTPUTSPARAMS_DUP2_ENTRY, NULL );
-    CHelloTraceFn* example = CHelloTraceFn::NewLC();
-    example->SimpleDup2();    
-    CleanupStack::PopAndDestroy(example);
-    OstTraceFunctionExit0( CHELLOTRACEFN_STATICOUTPUTSPARAMS_DUP2_EXIT );    
-    }
-
-inline void CHelloTraceFn::OutputsSignedIntegersDup2(TInt8 aParam8,   TInt16 aParam16, 
-                                          TInt32 aParam32, TInt64 aParam64)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS_DUP2_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS_DUP2_EXIT, this );
-    }
-
-inline void CHelloTraceFn::OutputsUnsignedIntegersDup2(TUint8 aParam8,   TUint16 aParam16, 
-                                            TUint32 aParam32, TUint64 aParam64)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS_DUP2_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS_DUP2_EXIT, this );
-    }
-
-
-inline TInt CHelloTraceFn::OutputsTIntReturnValueDup2()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_DUP2_ENTRY, this );
-    TInt ret = KErrNone;
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_DUP2_EXIT, this, ret );
-    return ret;
-    }
-
-inline TInt64 CHelloTraceFn::OutputsTInt64ReturnValueDup2()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE_DUP2_ENTRY, this );
-    TInt64 ret = (TInt64) 2 << 40;
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE_DUP2_EXIT, this, ret );
-    return ret;
-    }
-
-inline CHelloTraceFn::TFnEnum CHelloTraceFn::OutputsTFnEnumReturnValueDup2()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE_DUP2_ENTRY, this );
-    TFnEnum ret = EExample1;
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE_DUP2_EXIT, this, ret );
-    return ret;    
-    }
-
-inline CActive* CHelloTraceFn::OutputsUnknownPtrTypeDup2(CActive* aActive)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_DUP2_ENTRY, this );    
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_DUP2_EXIT, this, (TUint) aActive );
-    return aActive;
-    }
-
-inline CActive& CHelloTraceFn::OutputsUnknownRefTypeDup2(CActive& aActive)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE_DUP2_ENTRY, this );
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE_DUP2_EXIT, this, (TUint) &aActive );    
-    return aActive;
-    }
-
-// The following doesn't compile as the Trace Compiler doesn't generate
-// the correct OstTraceGenExt(...) function for it
-//void CHelloTraceFn::OutputMissingParamsBug(TInt /*aCommentParam*/, TInt)
-//    {
-//    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_ENTRY, this );
-//    // ...
-//    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_EXIT, this );    
-//    }
-
-// The following compiles and works but outputs the following warning
-// warning: HelloTraceFn.cpp, line xxx: Parameter did not have a name and was not added to trace
-// The fact that this cannot be suppressed is a known problem we're working on.
-inline void CHelloTraceFn::OutputMissingParamsDup2(TInt aUsedParam, TInt /*aCommentParam*/, TInt)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMS_DUP2_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMS_DUP2_EXIT, this );
-    }
-
-// The following doesn't work as the Trace Compiler outputs:
-// error: HelloTraceFn.cpp, line xxx: Class / function name for trace could not be determined x3
-//#ifdef _DEBUG
-//void CHelloTraceFn::PreProcessedFn(TInt aDbgParam)
-//    {
-//    OstTraceFunctionEntryExt( PRE_PROCESSED_ENTRTY_1, this );
-//#else
-//void CHelloTraceFn::PreProcessedFn()
-//    {
-//    OstTraceFunctionEntry1( PRE_PROCESSED_ENTRTY_2, this );
-//#endif
-//    Simple();
-//    OstTraceFunctionExit1( CHELLOTRACEFN_PREPROCESSEDFN_EXIT, this );
-//    }
-
-// Workaround example code until a proper fix is provided
-#ifdef _DEBUG
-inline void CHelloTraceFn::PreProcessedFnDup2(TInt aDbgParam)
-    {
-    OstTraceExt2( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_DUP2_ENTRY_1, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;aDbgParam=%d;this=%x", (TInt) aDbgParam, (TUint) this);
-#else
-    inline void CHelloTraceFn::PreProcessedFnDup2()
-    {
-    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_DUP2_ENTRY_2, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
-#endif
-    SimpleDup2();
-    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_DUP2_EXIT, "CHelloTraceFn::PreProcessedFn: < CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
-    }
-
-#endif /* HELLOTRACEFNDUP2_H_ */
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/incDup/HelloTraceInterface2Dup.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,91 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef __HELLOTRACEINTERFACE2DUP_H__
-#define __HELLOTRACEINTERFACE2DUP_H__
-
-#include "HelloTracePanic.h"
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTraceInterface2DupTraces.h"
-#endif
-
- inline EXPORT_C TVersion CHelloTraceInterface::VersionDup()
-        {
-        const TInt KMajor = 1;
-        const TInt KMinor = 0;
-        const TInt KBuild = 1;
-        TVersion version = TVersion(KMajor, KMinor, KBuild);
-        OstTraceExt1( TRACE_BORDER, CHELLOTRACEDLL_VERSION2_DUP, "CHelloTraceInterface::Version = %S", version.Name());   
-        return version;
-        }
-
- inline EXPORT_C const TPtrC CHelloTraceInterface::StringDup() const
-        {
-        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
-
-        OstTraceDefExt2( OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CHELLOTRACEDLL_STRING2_DUP, 
-                         "[0x%08x] Returned %S", (TUint32) this, *iString);   
-        return *iString;
-        }
-
- inline EXPORT_C void CHelloTraceInterface::AddCharDupL(const TChar& aChar)
-        {
-        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
-
-        OstTraceExt3( TRACE_BORDER, CHELLOTRACEDLL_ADDCHARL2_DUP, 
-                      "[0x%08x] Adding %d to %S", (TUint32) this, (TInt32) aChar, *iString);   
-        if (iString->Length() >= KHelloTraceDllBufferLength)
-            {
-            OstTrace1( TRACE_ERROR, CHELLOTRACEDLL_ADDCHARL_ERR2_DUP,
-                       "[0x%08x] Not enough space to add character", (TUint32) this);
-            User::Leave( KErrTooBig);
-            }
-        iString->Append(aChar);
-        }
-
- inline EXPORT_C void CHelloTraceInterface::RemoveLastDup()
-        {
-        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
-
-        OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_REMOVELAST2_DUP, 
-                      "[0x%08x] Attempting to remove last character from %S", (TUint32) this, *iString);
-        if (iString->Length() > 0)
-            {
-            iString->SetLength(iString->Length() - 1);
-            }
-        else
-            {
-            OstTrace1( TRACE_WARNING, CHELLOTRACEDLL_REMOVELAST_WARN2_DUP, "[0x%08x] String already empty", (TUint32) this);   
-            }
-        }
-
- inline EXPORT_C void CHelloTraceInterface::ResetStringDup()
-        {
-        OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_RESETSTRING2_DUP, "[0x%08x] Reseting string %S", (TUint32) this, *iString);
-        if (iString == NULL)
-            {
-            iString = new (ELeave) THelloTraceDllExampleString;
-            }
-        else
-            {
-            iString->SetLength(0);
-            }
-        }
-#endif  // __HELLOTRACEINTERFACE2DUP_H__
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/incDup/HelloTraceInterface2Dup2.inl	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,91 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef __HELLOTRACEINTERFACE2DUP2_H__
-#define __HELLOTRACEINTERFACE2DUP2_H__
-
-#include "HelloTracePanic.h"
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTraceInterface2Dup2Traces.h"
-#endif
-
- inline EXPORT_C TVersion CHelloTraceInterface::VersionDup2()
-        {
-        const TInt KMajor = 1;
-        const TInt KMinor = 0;
-        const TInt KBuild = 1;
-        TVersion version = TVersion(KMajor, KMinor, KBuild);
-        OstTraceExt1( TRACE_BORDER, CHELLOTRACEDLL_VERSION2_DUP2, "CHelloTraceInterface::Version = %S", version.Name());   
-        return version;
-        }
-
- inline EXPORT_C const TPtrC CHelloTraceInterface::StringDup2() const
-        {
-        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
-
-        OstTraceDefExt2( OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CHELLOTRACEDLL_STRING2_DUP2, 
-                         "[0x%08x] Returned %S", (TUint32) this, *iString);   
-        return *iString;
-        }
-
- inline EXPORT_C void CHelloTraceInterface::AddCharDup2L(const TChar& aChar)
-        {
-        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
-
-        OstTraceExt3( TRACE_BORDER, CHELLOTRACEDLL_ADDCHARL2_DUP2, 
-                      "[0x%08x] Adding %d to %S", (TUint32) this, (TInt32) aChar, *iString);   
-        if (iString->Length() >= KHelloTraceDllBufferLength)
-            {
-            OstTrace1( TRACE_ERROR, CHELLOTRACEDLL_ADDCHARL_ERR2_DUP2,
-                       "[0x%08x] Not enough space to add character", (TUint32) this);
-            User::Leave( KErrTooBig);
-            }
-        iString->Append(aChar);
-        }
-
- inline EXPORT_C void CHelloTraceInterface::RemoveLastDup2()
-        {
-        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
-
-        OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_REMOVELAST2_DUP2, 
-                      "[0x%08x] Attempting to remove last character from %S", (TUint32) this, *iString);
-        if (iString->Length() > 0)
-            {
-            iString->SetLength(iString->Length() - 1);
-            }
-        else
-            {
-            OstTrace1( TRACE_WARNING, CHELLOTRACEDLL_REMOVELAST_WARN2_DUP2, "[0x%08x] String already empty", (TUint32) this);   
-            }
-        }
-
- inline EXPORT_C void CHelloTraceInterface::ResetStringDup2()
-        {
-        OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_RESETSTRING2_DUP2, "[0x%08x] Reseting string %S", (TUint32) this, *iString);
-        if (iString == NULL)
-            {
-            iString = new (ELeave) THelloTraceDllExampleString;
-            }
-        else
-            {
-            iString->SetLength(0);
-            }
-        }
-#endif  // __HELLOTRACEINTERFACE2DUP2_H__
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/incDup/HelloTraceInterfaceDup.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,91 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef __HELLOTRACEINTERFACEDUP_H__
-#define __HELLOTRACEINTERFACEDUP_H__
-
-#include "HelloTracePanic.h"
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTraceInterfaceDupTraces.h"
-#endif
-
- inline EXPORT_C TVersion CHelloTraceInterface::VersionDup()
-        {
-        const TInt KMajor = 1;
-        const TInt KMinor = 0;
-        const TInt KBuild = 1;
-        TVersion version = TVersion(KMajor, KMinor, KBuild);
-        OstTraceExt1( TRACE_BORDER, CHELLOTRACEDLL_VERSION_DUP, "CHelloTraceInterface::Version = %S", version.Name());   
-        return version;
-        }
-
- inline EXPORT_C const TPtrC CHelloTraceInterface::StringDup() const
-        {
-        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
-
-        OstTraceDefExt2( OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CHELLOTRACEDLL_STRING_DUP, 
-                         "[0x%08x] Returned %S", (TUint32) this, *iString);   
-        return *iString;
-        }
-
- inline EXPORT_C void CHelloTraceInterface::AddCharDupL(const TChar& aChar)
-        {
-        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
-
-        OstTraceExt3( TRACE_BORDER, CHELLOTRACEDLL_ADDCHARL_DUP, 
-                      "[0x%08x] Adding %d to %S", (TUint32) this, (TInt32) aChar, *iString);   
-        if (iString->Length() >= KHelloTraceDllBufferLength)
-            {
-            OstTrace1( TRACE_ERROR, CHELLOTRACEDLL_ADDCHARL_ERR_DUP,
-                       "[0x%08x] Not enough space to add character", (TUint32) this);
-            User::Leave( KErrTooBig);
-            }
-        iString->Append(aChar);
-        }
-
- inline EXPORT_C void CHelloTraceInterface::RemoveLastDup()
-        {
-        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
-
-        OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_REMOVELAST_DUP, 
-                      "[0x%08x] Attempting to remove last character from %S", (TUint32) this, *iString);
-        if (iString->Length() > 0)
-            {
-            iString->SetLength(iString->Length() - 1);
-            }
-        else
-            {
-            OstTrace1( TRACE_WARNING, CHELLOTRACEDLL_REMOVELAST_WARN_DUP, "[0x%08x] String already empty", (TUint32) this);   
-            }
-        }
-
- inline EXPORT_C void CHelloTraceInterface::ResetStringDup()
-        {
-        OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_RESETSTRING_DUP, "[0x%08x] Reseting string %S", (TUint32) this, *iString);
-        if (iString == NULL)
-            {
-            iString = new (ELeave) THelloTraceDllExampleString;
-            }
-        else
-            {
-            iString->SetLength(0);
-            }
-        }
-#endif  // __HELLOTRACEINTERFACEDUP_H__
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/incDup/HelloTraceInterfaceDup2.inl	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,91 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef __HELLOTRACEINTERFACEDUP2_H__
-#define __HELLOTRACEINTERFACEDUP2_H__
-
-#include "HelloTracePanic.h"
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTraceInterfaceDup2Traces.h"
-#endif
-
- inline EXPORT_C TVersion CHelloTraceInterface::VersionDup2()
-        {
-        const TInt KMajor = 1;
-        const TInt KMinor = 0;
-        const TInt KBuild = 1;
-        TVersion version = TVersion(KMajor, KMinor, KBuild);
-        OstTraceExt1( TRACE_BORDER, CHELLOTRACEDLL_VERSION_DUP2, "CHelloTraceInterface::Version = %S", version.Name());   
-        return version;
-        }
-
- inline EXPORT_C const TPtrC CHelloTraceInterface::StringDup2() const
-        {
-        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
-
-        OstTraceDefExt2( OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CHELLOTRACEDLL_STRING_DUP2, 
-                         "[0x%08x] Returned %S", (TUint32) this, *iString);   
-        return *iString;
-        }
-
- inline EXPORT_C void CHelloTraceInterface::AddCharDup2L(const TChar& aChar)
-        {
-        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
-
-        OstTraceExt3( TRACE_BORDER, CHELLOTRACEDLL_ADDCHARL_DUP2, 
-                      "[0x%08x] Adding %d to %S", (TUint32) this, (TInt32) aChar, *iString);   
-        if (iString->Length() >= KHelloTraceDllBufferLength)
-            {
-            OstTrace1( TRACE_ERROR, CHELLOTRACEDLL_ADDCHARL_ERR_DUP2,
-                       "[0x%08x] Not enough space to add character", (TUint32) this);
-            User::Leave( KErrTooBig);
-            }
-        iString->Append(aChar);
-        }
-
- inline EXPORT_C void CHelloTraceInterface::RemoveLastDup2()
-        {
-        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
-
-        OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_REMOVELAST_DUP2, 
-                      "[0x%08x] Attempting to remove last character from %S", (TUint32) this, *iString);
-        if (iString->Length() > 0)
-            {
-            iString->SetLength(iString->Length() - 1);
-            }
-        else
-            {
-            OstTrace1( TRACE_WARNING, CHELLOTRACEDLL_REMOVELAST_WARN_DUP2, "[0x%08x] String already empty", (TUint32) this);   
-            }
-        }
-
- inline EXPORT_C void CHelloTraceInterface::ResetStringDup2()
-        {
-        OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_RESETSTRING_DUP2, "[0x%08x] Reseting string %S", (TUint32) this, *iString);
-        if (iString == NULL)
-            {
-            iString = new (ELeave) THelloTraceDllExampleString;
-            }
-        else
-            {
-            iString->SetLength(0);
-            }
-        }
-#endif  // __HELLOTRACEINTERFACEDUP2_H__
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/incDup/HelloTraceTypes2Dup.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,75 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef __HELLOTRACETYPES2DUP_H__
-#define __HELLOTRACETYPES2DUP_H__
-
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTraceTypes2DupTraces.h"
-#endif
-
-inline void HelloTraceTypes::SignedIntegersDup()
-    {
-    TInt8  eightBit     = - (TInt8)  1 << 6;
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS2DUP_8, 
-                  "8 bit signed: %hhd", eightBit );
-    
-    TInt16 sixteenBit   = - (TInt16) 1 << 14; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS2DUP_16, 
-                  "16 bit signed: %hd", sixteenBit );
-
-    TInt32 thirtyTwoBit = - (TInt32) 1 << 30; 
-    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS2DUP_32, 
-               "32 bit signed: %d", thirtyTwoBit );
-
-    TInt64 sixtyFourBit = - (TInt64) 1 << 62; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS2DUP_64, 
-                  "64 bit signed: %Ld", sixtyFourBit );
-    }
-
-inline void HelloTraceTypes::UnsignedIntegersDup()
-    {
-    TUint8  eightBit     = (TUint8)  1 << 6;
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS2DUP_8, 
-                  "8 bit unsigned: %hhu", eightBit );
-    
-    TUint16 sixteenBit   = (TUint16) 1 << 14; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS2DUP_16, 
-                  "16 bit unsigned: %hu", sixteenBit );
-
-    TUint32 thirtyTwoBit = (TUint32) 1 << 30; 
-    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS2DUP_32, 
-               "32 bit unsigned: %u", thirtyTwoBit );
-
-    TUint64 sixtyFourBit = (TUint64) 1 << 62; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS2DUP_64, 
-                  "64 bit unsigned: %Lu", sixtyFourBit );
-    }
-
-inline void HelloTraceTypes::DescriptorsDup()
-    {
-    _LIT8(KAscii, "Some ASCII text");
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_ASCII2DUP, "8 bit descriptor: %s", KAscii() );
-
-    _LIT16(KUnicode, "Some unicode text");    
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNICODE2DUP, "16 bit descriptor: %S", KUnicode() );
-    }
-
-#endif  // __HELLOTRACETYPES2DUP_H__
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/incDup/HelloTraceTypes2Dup2.inl	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,75 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef __HELLOTRACETYPES2DUP2_H__
-#define __HELLOTRACETYPES2DUP2_H__
-
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTraceTypes2Dup2Traces.h"
-#endif
-
-inline void HelloTraceTypes::SignedIntegersDup2()
-    {
-    TInt8  eightBit     = - (TInt8)  1 << 6;
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS2DUP2_8, 
-                  "8 bit signed: %hhd", eightBit );
-    
-    TInt16 sixteenBit   = - (TInt16) 1 << 14; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS2DUP2_16, 
-                  "16 bit signed: %hd", sixteenBit );
-
-    TInt32 thirtyTwoBit = - (TInt32) 1 << 30; 
-    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS2DUP2_32, 
-               "32 bit signed: %d", thirtyTwoBit );
-
-    TInt64 sixtyFourBit = - (TInt64) 1 << 62; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS2DUP2_64, 
-                  "64 bit signed: %Ld", sixtyFourBit );
-    }
-
-inline void HelloTraceTypes::UnsignedIntegersDup2()
-    {
-    TUint8  eightBit     = (TUint8)  1 << 6;
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS2DUP2_8, 
-                  "8 bit unsigned: %hhu", eightBit );
-    
-    TUint16 sixteenBit   = (TUint16) 1 << 14; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS2DUP2_16, 
-                  "16 bit unsigned: %hu", sixteenBit );
-
-    TUint32 thirtyTwoBit = (TUint32) 1 << 30; 
-    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS2DUP2_32, 
-               "32 bit unsigned: %u", thirtyTwoBit );
-
-    TUint64 sixtyFourBit = (TUint64) 1 << 62; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS2DUP2_64, 
-                  "64 bit unsigned: %Lu", sixtyFourBit );
-    }
-
-inline void HelloTraceTypes::DescriptorsDup2()
-    {
-    _LIT8(KAscii, "Some ASCII text");
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_ASCII2DUP2, "8 bit descriptor: %s", KAscii() );
-
-    _LIT16(KUnicode, "Some unicode text");    
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNICODE2DUP2, "16 bit descriptor: %S", KUnicode() );
-    }
-
-#endif  // __HELLOTRACETYPES2DUP2_H__
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/incDup/HelloTraceTypesDup.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,75 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef __HELLOTRACETYPESDUP_H__
-#define __HELLOTRACETYPESDUP_H__
-
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTraceTypesDupTraces.h"
-#endif
-
-inline void HelloTraceTypes::SignedIntegersDup()
-    {
-    TInt8  eightBit     = - (TInt8)  1 << 6;
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP_8, 
-                  "8 bit signed: %hhd", eightBit );
-    
-    TInt16 sixteenBit   = - (TInt16) 1 << 14; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP_16, 
-                  "16 bit signed: %hd", sixteenBit );
-
-    TInt32 thirtyTwoBit = - (TInt32) 1 << 30; 
-    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP_32, 
-               "32 bit signed: %d", thirtyTwoBit );
-
-    TInt64 sixtyFourBit = - (TInt64) 1 << 62; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP_64, 
-                  "64 bit signed: %Ld", sixtyFourBit );
-    }
-
-inline void HelloTraceTypes::UnsignedIntegersDup()
-    {
-    TUint8  eightBit     = (TUint8)  1 << 6;
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP_8, 
-                  "8 bit unsigned: %hhu", eightBit );
-    
-    TUint16 sixteenBit   = (TUint16) 1 << 14; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP_16, 
-                  "16 bit unsigned: %hu", sixteenBit );
-
-    TUint32 thirtyTwoBit = (TUint32) 1 << 30; 
-    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP_32, 
-               "32 bit unsigned: %u", thirtyTwoBit );
-
-    TUint64 sixtyFourBit = (TUint64) 1 << 62; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP_64, 
-                  "64 bit unsigned: %Lu", sixtyFourBit );
-    }
-
-inline void HelloTraceTypes::DescriptorsDup()
-    {
-    _LIT8(KAscii, "Some ASCII text");
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_ASCIIDUP, "8 bit descriptor: %s", KAscii() );
-
-    _LIT16(KUnicode, "Some unicode text");    
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNICODEDUP, "16 bit descriptor: %S", KUnicode() );
-    }
-
-#endif  // __HELLOTRACETYPESDUP_H__
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/incDup/HelloTraceTypesDup2.inl	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,75 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef __HELLOTRACETYPESDUP2_H__
-#define __HELLOTRACETYPESDUP2_H__
-
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTraceTypesDup2Traces.h"
-#endif
-
-inline void HelloTraceTypes::SignedIntegersDup2()
-    {
-    TInt8  eightBit     = - (TInt8)  1 << 6;
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP2_8, 
-                  "8 bit signed: %hhd", eightBit );
-    
-    TInt16 sixteenBit   = - (TInt16) 1 << 14; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP2_16, 
-                  "16 bit signed: %hd", sixteenBit );
-
-    TInt32 thirtyTwoBit = - (TInt32) 1 << 30; 
-    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP2_32, 
-               "32 bit signed: %d", thirtyTwoBit );
-
-    TInt64 sixtyFourBit = - (TInt64) 1 << 62; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP2_64, 
-                  "64 bit signed: %Ld", sixtyFourBit );
-    }
-
-inline void HelloTraceTypes::UnsignedIntegersDup2()
-    {
-    TUint8  eightBit     = (TUint8)  1 << 6;
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP2_8, 
-                  "8 bit unsigned: %hhu", eightBit );
-    
-    TUint16 sixteenBit   = (TUint16) 1 << 14; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP2_16, 
-                  "16 bit unsigned: %hu", sixteenBit );
-
-    TUint32 thirtyTwoBit = (TUint32) 1 << 30; 
-    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP2_32, 
-               "32 bit unsigned: %u", thirtyTwoBit );
-
-    TUint64 sixtyFourBit = (TUint64) 1 << 62; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP2_64, 
-                  "64 bit unsigned: %Lu", sixtyFourBit );
-    }
-
-inline void HelloTraceTypes::DescriptorsDup2()
-    {
-    _LIT8(KAscii, "Some ASCII text");
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_ASCIIDUP2, "8 bit descriptor: %s", KAscii() );
-
-    _LIT16(KUnicode, "Some unicode text");    
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNICODEDUP2, "16 bit descriptor: %S", KUnicode() );
-    }
-
-#endif  // __HELLOTRACETYPESDUP2_H__
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/src/HelloTraceExample.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,106 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-
-#include "HelloTraceExample.h"
-#include "HelloTraceTypes.h"
-#include "HelloTraceInterface.h"
-#include "HelloTraceFn.h"
-#include "HelloTracePanic.h"
-
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTraceExampleTraces.h"
-#endif
-
-EXPORT_C void HelloTraceExample::JustTypes()
-    {
-    OstTrace0( TRACE_EXAMPLE, HELLOTRACEEXAMPLE_JUSTTYPES, "*********************************************** " );
-    
-    HelloTraceTypes::SignedIntegers();
-    HelloTraceTypes::UnsignedIntegers();
-    HelloTraceTypes::Descriptors();    
-    }
-
-EXPORT_C void HelloTraceExample::Interface()
-    {
-    OstTrace0( TRACE_EXAMPLE, HELLOTRACEEXAMPLE_INTERFACE, "*********************************************** " );
-    
-    TVersion version = CHelloTraceInterface::Version();   
-    if (version.iMajor >= 1) 
-        {
-        CHelloTraceInterface* example = CHelloTraceInterface::NewLC();
-        example->AddCharL('H');
-        example->AddCharL('e');
-        example->AddCharL('l');
-        example->AddCharL('l');
-        example->AddCharL('o');
-        example->AddCharL('T');        
-        example->RemoveLast();        
-        example->AddCharL(' ');
-        example->AddCharL('T');
-        example->AddCharL('r');
-        example->AddCharL('a');
-        example->AddCharL('c');
-        example->AddCharL('e');
-        example->AddCharL('!');
-        CleanupStack::PopAndDestroy(example);
-        }
-    else
-        {
-        OstTrace0( TRACE_ERROR, HELLOTRACEEXAMPLE_UNSUPPORTED_VERSION, "Unsupported version!");
-        }
-    }
-
-EXPORT_C void HelloTraceExample::FnEntryExit()
-    {
-    OstTrace0( TRACE_EXAMPLE, HELLOTRACEEXAMPLE_FNENTRYEXIT, "*********************************************** " );
-       
-    CHelloTraceFn* example = CHelloTraceFn::NewLC();
-    CIdle* idle = CIdle::NewL(CActive::EPriorityIdle);
-    CleanupStack::PushL(idle);
-
-    CHelloTraceFn::StaticOutputsParamsL(1);
-   
-    example->Simple();
-    example->OutputsParams(2, CHelloTraceFn::EExample1);
-    example->OutputsParams(3, CHelloTraceFn::EExample2);
-    example->OutputsSignedIntegers(-4, -5, -6, -7);
-    example->OutputsUnsignedIntegers(8, 9, 10, 11);
-    example->OutputsTIntReturnValue();    
-    example->OutputsTInt64ReturnValue(); 
-    example->OutputsTFnEnumReturnValue();
-    example->OutputsUnknownPtrType(idle);    
-    example->OutputsUnknownRefType(*idle);
-#ifdef _DEBUG
-    example->PreProcessedFn(12);
-#else
-    example->PreProcessedFn();
-#endif
-    example->OutputMissingParams(13, 14, 15);
-
-    CleanupStack::PopAndDestroy(idle);
-    CleanupStack::PopAndDestroy(example);
-    }
-
-EXPORT_C void HelloTraceExample::PanicTrace()
-    {
-    OstTrace0( TRACE_EXAMPLE, HELLOTRACEEXAMPLE_PANIC, "*********************************************** " );
-
-    Panic(EHelloTraceDllExamplePanic);
-    }
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/src/HelloTraceExample2.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,106 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-
-#include "HelloTraceExample.h"
-#include "HelloTraceTypes2.h"
-#include "HelloTraceInterface2.h"
-#include "HelloTraceFn2.h"
-#include "HelloTracePanic.h"
-
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTraceExample2Traces.h"
-#endif
-
-EXPORT_C void HelloTraceExample::JustTypes()
-    {
-    OstTrace0( TRACE_EXAMPLE, HELLOTRACEEXAMPLE_JUSTTYPES, "*********************************************** " );
-    
-    HelloTraceTypes::SignedIntegers();
-    HelloTraceTypes::UnsignedIntegers();
-    HelloTraceTypes::Descriptors();    
-    }
-
-EXPORT_C void HelloTraceExample::Interface()
-    {
-    OstTrace0( TRACE_EXAMPLE, HELLOTRACEEXAMPLE_INTERFACE, "*********************************************** " );
-    
-    TVersion version = CHelloTraceInterface::Version();   
-    if (version.iMajor >= 1) 
-        {
-        CHelloTraceInterface* example = CHelloTraceInterface::NewLC();
-        example->AddCharL('H');
-        example->AddCharL('e');
-        example->AddCharL('l');
-        example->AddCharL('l');
-        example->AddCharL('o');
-        example->AddCharL('T');        
-        example->RemoveLast();        
-        example->AddCharL(' ');
-        example->AddCharL('T');
-        example->AddCharL('r');
-        example->AddCharL('a');
-        example->AddCharL('c');
-        example->AddCharL('e');
-        example->AddCharL('!');
-        CleanupStack::PopAndDestroy(example);
-        }
-    else
-        {
-        OstTrace0( TRACE_ERROR, HELLOTRACEEXAMPLE_UNSUPPORTED_VERSION, "Unsupported version!");
-        }
-    }
-
-EXPORT_C void HelloTraceExample::FnEntryExit()
-    {
-    OstTrace0( TRACE_EXAMPLE, HELLOTRACEEXAMPLE_FNENTRYEXIT, "*********************************************** " );
-       
-    CHelloTraceFn* example = CHelloTraceFn::NewLC();
-    CIdle* idle = CIdle::NewL(CActive::EPriorityIdle);
-    CleanupStack::PushL(idle);
-
-    CHelloTraceFn::StaticOutputsParamsL(1);
-   
-    example->Simple();
-    example->OutputsParams(2, CHelloTraceFn::EExample1);
-    example->OutputsParams(3, CHelloTraceFn::EExample2);
-    example->OutputsSignedIntegers(-4, -5, -6, -7);
-    example->OutputsUnsignedIntegers(8, 9, 10, 11);
-    example->OutputsTIntReturnValue();    
-    example->OutputsTInt64ReturnValue(); 
-    example->OutputsTFnEnumReturnValue();
-    example->OutputsUnknownPtrType(idle);    
-    example->OutputsUnknownRefType(*idle);
-#ifdef _DEBUG
-    example->PreProcessedFn(12);
-#else
-    example->PreProcessedFn();
-#endif
-    example->OutputMissingParams(13, 14, 15);
-
-    CleanupStack::PopAndDestroy(idle);
-    CleanupStack::PopAndDestroy(example);
-    }
-
-EXPORT_C void HelloTraceExample::PanicTrace()
-    {
-    OstTrace0( TRACE_EXAMPLE, HELLOTRACEEXAMPLE_PANIC, "*********************************************** " );
-
-    Panic(EHelloTraceDllExamplePanic);
-    }
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/src/HelloTraceFn.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,183 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
- 
-#include "HelloTraceFn.h"
-#include "HelloTraceFnDup.h"
-#include "HelloTraceFnDup2.inl"
-#include "HelloTracePanic.h"
-
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTraceFnTraces.h"
-#endif
-
-CHelloTraceFn* CHelloTraceFn::NewLC()
-    {
-    CHelloTraceFn* self = new (ELeave) CHelloTraceFn;
-    CleanupStack::PushL(self);
-    return self;
-    }
-
-CHelloTraceFn* CHelloTraceFn::NewL()
-    {
-    CHelloTraceFn* self = CHelloTraceFn::NewLC();
-    CleanupStack::Pop(self);
-    return self;
-    }
-
-CHelloTraceFn::CHelloTraceFn()
-    {
-    OstTrace1( TRACE_NORMAL, CHELLOTRACEFN_CHELLOTRACEFN_CTOR, "[0x%08x] Constructor", this );    
-    }
-
-CHelloTraceFn::~CHelloTraceFn()
-    {
-    OstTrace1( TRACE_NORMAL, CHELLOTRACEFN_CHELLOTRACEFN_DTOR, "[0x%08x] Destructor", this );    
-    }
-
-void CHelloTraceFn::Simple()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_SIMPLE_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_SIMPLE_EXIT, this );
-    }
-
-void CHelloTraceFn::OutputsParams(TInt aParam, TFnEnum aEnumParam)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSPARAMS_ENTRY, this );
-    Simple();
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSPARAMS_EXIT, this );
-    }
-
-void CHelloTraceFn::StaticOutputsParamsL(TInt aParam)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_STATICOUTPUTSPARAMS_ENTRY, NULL );
-    CHelloTraceFn* example = CHelloTraceFn::NewLC();
-    example->Simple();    
-    CleanupStack::PopAndDestroy(example);
-    OstTraceFunctionExit0( CHELLOTRACEFN_STATICOUTPUTSPARAMS_EXIT );    
-    }
-
-void CHelloTraceFn::OutputsSignedIntegers(TInt8 aParam8,   TInt16 aParam16, 
-                                          TInt32 aParam32, TInt64 aParam64)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS_EXIT, this );
-    }
-
-void CHelloTraceFn::OutputsUnsignedIntegers(TUint8 aParam8,   TUint16 aParam16, 
-                                            TUint32 aParam32, TUint64 aParam64)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS_EXIT, this );
-    }
-
-
-TInt CHelloTraceFn::OutputsTIntReturnValue()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_ENTRY, this );
-    TInt ret = KErrNone;
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_EXIT, this, ret );
-    return ret;
-    }
-
-TInt64 CHelloTraceFn::OutputsTInt64ReturnValue()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE_ENTRY, this );
-    TInt64 ret = (TInt64) 2 << 40;
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE_EXIT, this, ret );
-    return ret;
-    }
-
-CHelloTraceFn::TFnEnum CHelloTraceFn::OutputsTFnEnumReturnValue()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE_ENTRY, this );
-    TFnEnum ret = EExample1;
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE_EXIT, this, ret );
-    return ret;    
-    }
-
-CActive* CHelloTraceFn::OutputsUnknownPtrType(CActive* aActive)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_ENTRY, this );    
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_EXIT, this, (TUint) aActive );
-    return aActive;
-    }
-
-CActive& CHelloTraceFn::OutputsUnknownRefType(CActive& aActive)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE_ENTRY, this );
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE_EXIT, this, (TUint) &aActive );    
-    return aActive;
-    }
-
-// The following doesn't compile as the Trace Compiler doesn't generate
-// the correct OstTraceGenExt(...) function for it
-//void CHelloTraceFn::OutputMissingParamsBug(TInt /*aCommentParam*/, TInt)
-//    {
-//    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_ENTRY, this );
-//    // ...
-//    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_EXIT, this );    
-//    }
-
-// The following compiles and works but outputs the following warning
-// warning: HelloTraceFn.cpp, line xxx: Parameter did not have a name and was not added to trace
-// The fact that this cannot be suppressed is a known problem we're working on.
-void CHelloTraceFn::OutputMissingParams(TInt aUsedParam, TInt /*aCommentParam*/, TInt)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMS_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMS_EXIT, this );
-    }
-
-// The following doesn't work as the Trace Compiler outputs:
-// error: HelloTraceFn.cpp, line xxx: Class / function name for trace could not be determined x3
-//#ifdef _DEBUG
-//void CHelloTraceFn::PreProcessedFn(TInt aDbgParam)
-//    {
-//    OstTraceFunctionEntryExt( PRE_PROCESSED_ENTRTY_1, this );
-//#else
-//void CHelloTraceFn::PreProcessedFn()
-//    {
-//    OstTraceFunctionEntry1( PRE_PROCESSED_ENTRTY_2, this );
-//#endif
-//    Simple();
-//    OstTraceFunctionExit1( CHELLOTRACEFN_PREPROCESSEDFN_EXIT, this );
-//    }
-
-// Workaround example code until a proper fix is provided
-#ifdef _DEBUG
-void CHelloTraceFn::PreProcessedFn(TInt aDbgParam)
-    {
-    OstTraceExt2( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_ENTRY_1, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;aDbgParam=%d;this=%x", (TInt) aDbgParam, (TUint) this);
-#else
-void CHelloTraceFn::PreProcessedFn()
-    {
-    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_ENTRY_2, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
-#endif
-    Simple();
-    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_EXIT, "CHelloTraceFn::PreProcessedFn: < CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
-    }
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/src/HelloTraceFn2.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,183 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
- 
-#include "HelloTraceFn2.h"
-#include "HelloTraceFn2Dup.h"
-#include "HelloTraceFn2Dup2.inl"
-#include "HelloTracePanic.h"
-
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTraceFn2Traces.h"
-#endif
-
-CHelloTraceFn* CHelloTraceFn::NewLC()
-    {
-    CHelloTraceFn* self = new (ELeave) CHelloTraceFn;
-    CleanupStack::PushL(self);
-    return self;
-    }
-
-CHelloTraceFn* CHelloTraceFn::NewL()
-    {
-    CHelloTraceFn* self = CHelloTraceFn::NewLC();
-    CleanupStack::Pop(self);
-    return self;
-    }
-
-CHelloTraceFn::CHelloTraceFn()
-    {
-    OstTrace1( TRACE_NORMAL, CHELLOTRACEFN_CHELLOTRACEFN_CTOR, "[0x%08x] Constructor", this );    
-    }
-
-CHelloTraceFn::~CHelloTraceFn()
-    {
-    OstTrace1( TRACE_NORMAL, CHELLOTRACEFN_CHELLOTRACEFN_DTOR, "[0x%08x] Destructor", this );    
-    }
-
-void CHelloTraceFn::Simple()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_SIMPLE_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_SIMPLE_EXIT, this );
-    }
-
-void CHelloTraceFn::OutputsParams(TInt aParam, TFnEnum aEnumParam)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSPARAMS_ENTRY, this );
-    Simple();
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSPARAMS_EXIT, this );
-    }
-
-void CHelloTraceFn::StaticOutputsParamsL(TInt aParam)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_STATICOUTPUTSPARAMS_ENTRY, NULL );
-    CHelloTraceFn* example = CHelloTraceFn::NewLC();
-    example->Simple();    
-    CleanupStack::PopAndDestroy(example);
-    OstTraceFunctionExit0( CHELLOTRACEFN_STATICOUTPUTSPARAMS_EXIT );    
-    }
-
-void CHelloTraceFn::OutputsSignedIntegers(TInt8 aParam8,   TInt16 aParam16, 
-                                          TInt32 aParam32, TInt64 aParam64)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS_EXIT, this );
-    }
-
-void CHelloTraceFn::OutputsUnsignedIntegers(TUint8 aParam8,   TUint16 aParam16, 
-                                            TUint32 aParam32, TUint64 aParam64)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS_EXIT, this );
-    }
-
-
-TInt CHelloTraceFn::OutputsTIntReturnValue()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_ENTRY, this );
-    TInt ret = KErrNone;
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_EXIT, this, ret );
-    return ret;
-    }
-
-TInt64 CHelloTraceFn::OutputsTInt64ReturnValue()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE_ENTRY, this );
-    TInt64 ret = (TInt64) 2 << 40;
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE_EXIT, this, ret );
-    return ret;
-    }
-
-CHelloTraceFn::TFnEnum CHelloTraceFn::OutputsTFnEnumReturnValue()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE_ENTRY, this );
-    TFnEnum ret = EExample1;
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE_EXIT, this, ret );
-    return ret;    
-    }
-
-CActive* CHelloTraceFn::OutputsUnknownPtrType(CActive* aActive)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_ENTRY, this );    
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_EXIT, this, (TUint) aActive );
-    return aActive;
-    }
-
-CActive& CHelloTraceFn::OutputsUnknownRefType(CActive& aActive)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE_ENTRY, this );
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE_EXIT, this, (TUint) &aActive );    
-    return aActive;
-    }
-
-// The following doesn't compile as the Trace Compiler doesn't generate
-// the correct OstTraceGenExt(...) function for it
-//void CHelloTraceFn::OutputMissingParamsBug(TInt /*aCommentParam*/, TInt)
-//    {
-//    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_ENTRY, this );
-//    // ...
-//    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_EXIT, this );    
-//    }
-
-// The following compiles and works but outputs the following warning
-// warning: HelloTraceFn.cpp, line xxx: Parameter did not have a name and was not added to trace
-// The fact that this cannot be suppressed is a known problem we're working on.
-void CHelloTraceFn::OutputMissingParams(TInt aUsedParam, TInt /*aCommentParam*/, TInt)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMS_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMS_EXIT, this );
-    }
-
-// The following doesn't work as the Trace Compiler outputs:
-// error: HelloTraceFn.cpp, line xxx: Class / function name for trace could not be determined x3
-//#ifdef _DEBUG
-//void CHelloTraceFn::PreProcessedFn(TInt aDbgParam)
-//    {
-//    OstTraceFunctionEntryExt( PRE_PROCESSED_ENTRTY_1, this );
-//#else
-//void CHelloTraceFn::PreProcessedFn()
-//    {
-//    OstTraceFunctionEntry1( PRE_PROCESSED_ENTRTY_2, this );
-//#endif
-//    Simple();
-//    OstTraceFunctionExit1( CHELLOTRACEFN_PREPROCESSEDFN_EXIT, this );
-//    }
-
-// Workaround example code until a proper fix is provided
-#ifdef _DEBUG
-void CHelloTraceFn::PreProcessedFn(TInt aDbgParam)
-    {
-    OstTraceExt2( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_ENTRY_1, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;aDbgParam=%d;this=%x", (TInt) aDbgParam, (TUint) this);
-#else
-void CHelloTraceFn::PreProcessedFn()
-    {
-    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_ENTRY_2, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
-#endif
-    Simple();
-    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_EXIT, "CHelloTraceFn::PreProcessedFn: < CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
-    }
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/src/HelloTraceInterface.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,121 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-
-#include "HelloTraceInterface.h"
-#include "HelloTraceInterfaceDup.h"
-#include "HelloTraceInterfaceDup2.inl"
-#include "HelloTracePanic.h"
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTraceInterfaceTraces.h"
-#endif
-
-EXPORT_C CHelloTraceInterface* CHelloTraceInterface::NewLC()
-    {
-    CHelloTraceInterface* self = new (ELeave) CHelloTraceInterface;
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    return self;
-    }
-
-EXPORT_C CHelloTraceInterface* CHelloTraceInterface::NewL()
-    {
-    CHelloTraceInterface* self = CHelloTraceInterface::NewLC();
-    CleanupStack::Pop(self);
-    return self;
-    }
-
-CHelloTraceInterface::CHelloTraceInterface()
-    {
-    OstTrace1( TRACE_NORMAL, CHELLOTRACEDLL_CHELLOTRACEDLL_CTOR, "[0x%08x]", (TUint32) this );    
-    }
-
-void CHelloTraceInterface::ConstructL()
-    {
-    iString = new (ELeave) THelloTraceDllExampleString;
-    }
-
-EXPORT_C CHelloTraceInterface::~CHelloTraceInterface()
-    {
-    delete iString;
-    OstTrace1( TRACE_NORMAL, CHELLOTRACEDLL_CHELLOTRACEDLL_DTOR, "[0x%08x]", (TUint32) this );    
-    }
-
-EXPORT_C TVersion CHelloTraceInterface::Version()
-    {
-    const TInt KMajor = 1;
-    const TInt KMinor = 0;
-    const TInt KBuild = 1;
-    TVersion version = TVersion(KMajor, KMinor, KBuild);
-    OstTraceExt1( TRACE_BORDER, CHELLOTRACEDLL_VERSION, "CHelloTraceInterface::Version = %S", version.Name());   
-    return version;
-    }
-
-EXPORT_C const TPtrC CHelloTraceInterface::String() const
-    {
-    __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
-
-    OstTraceDefExt2( OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CHELLOTRACEDLL_STRING, 
-                     "[0x%08x] Returned %S", (TUint32) this, *iString);   
-    return *iString;
-    }
-
-EXPORT_C void CHelloTraceInterface::AddCharL(const TChar& aChar)
-    {
-    __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
-
-    OstTraceExt3( TRACE_BORDER, CHELLOTRACEDLL_ADDCHARL, 
-                  "[0x%08x] Adding %d to %S", (TUint32) this, (TInt32) aChar, *iString);   
-    if (iString->Length() >= KHelloTraceDllBufferLength)
-        {
-        OstTrace1( TRACE_ERROR, CHELLOTRACEDLL_ADDCHARL_ERR,
-                   "[0x%08x] Not enough space to add character", (TUint32) this);
-        User::Leave( KErrTooBig);
-        }
-    iString->Append(aChar);
-    }
-
-EXPORT_C void CHelloTraceInterface::RemoveLast()
-    {
-    __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
-
-    OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_REMOVELAST, 
-                  "[0x%08x] Attempting to remove last character from %S", (TUint32) this, *iString);
-    if (iString->Length() > 0)
-        {
-        iString->SetLength(iString->Length() - 1);
-        }
-    else
-        {
-        OstTrace1( TRACE_WARNING, CHELLOTRACEDLL_REMOVELAST_WARN, "[0x%08x] String already empty", (TUint32) this);   
-        }
-    }
-
-EXPORT_C void CHelloTraceInterface::ResetString()
-    {
-    OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_RESETSTRING, "[0x%08x] Reseting string %S", (TUint32) this, *iString);
-    if (iString == NULL)
-        {
-        iString = new (ELeave) THelloTraceDllExampleString;
-        }
-    else
-        {
-        iString->SetLength(0);
-        }
-    }
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/src/HelloTraceInterface2.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,121 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-
-#include "HelloTraceInterface2.h"
-#include "HelloTraceInterface2Dup.h"
-#include "HelloTraceInterface2Dup2.inl"
-#include "HelloTracePanic.h"
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTraceInterface2Traces.h"
-#endif
-
-EXPORT_C CHelloTraceInterface* CHelloTraceInterface::NewLC()
-    {
-    CHelloTraceInterface* self = new (ELeave) CHelloTraceInterface;
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    return self;
-    }
-
-EXPORT_C CHelloTraceInterface* CHelloTraceInterface::NewL()
-    {
-    CHelloTraceInterface* self = CHelloTraceInterface::NewLC();
-    CleanupStack::Pop(self);
-    return self;
-    }
-
-CHelloTraceInterface::CHelloTraceInterface()
-    {
-    OstTrace1( TRACE_NORMAL, CHELLOTRACEDLL_CHELLOTRACEDLL_CTOR, "[0x%08x]", (TUint32) this );    
-    }
-
-void CHelloTraceInterface::ConstructL()
-    {
-    iString = new (ELeave) THelloTraceDllExampleString;
-    }
-
-EXPORT_C CHelloTraceInterface::~CHelloTraceInterface()
-    {
-    delete iString;
-    OstTrace1( TRACE_NORMAL, CHELLOTRACEDLL_CHELLOTRACEDLL_DTOR, "[0x%08x]", (TUint32) this );    
-    }
-
-EXPORT_C TVersion CHelloTraceInterface::Version()
-    {
-    const TInt KMajor = 1;
-    const TInt KMinor = 0;
-    const TInt KBuild = 1;
-    TVersion version = TVersion(KMajor, KMinor, KBuild);
-    OstTraceExt1( TRACE_BORDER, CHELLOTRACEDLL_VERSION, "CHelloTraceInterface::Version = %S", version.Name());   
-    return version;
-    }
-
-EXPORT_C const TPtrC CHelloTraceInterface::String() const
-    {
-    __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
-
-    OstTraceDefExt2( OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CHELLOTRACEDLL_STRING, 
-                     "[0x%08x] Returned %S", (TUint32) this, *iString);   
-    return *iString;
-    }
-
-EXPORT_C void CHelloTraceInterface::AddCharL(const TChar& aChar)
-    {
-    __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
-
-    OstTraceExt3( TRACE_BORDER, CHELLOTRACEDLL_ADDCHARL, 
-                  "[0x%08x] Adding %d to %S", (TUint32) this, (TInt32) aChar, *iString);   
-    if (iString->Length() >= KHelloTraceDllBufferLength)
-        {
-        OstTrace1( TRACE_ERROR, CHELLOTRACEDLL_ADDCHARL_ERR,
-                   "[0x%08x] Not enough space to add character", (TUint32) this);
-        User::Leave( KErrTooBig);
-        }
-    iString->Append(aChar);
-    }
-
-EXPORT_C void CHelloTraceInterface::RemoveLast()
-    {
-    __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
-
-    OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_REMOVELAST, 
-                  "[0x%08x] Attempting to remove last character from %S", (TUint32) this, *iString);
-    if (iString->Length() > 0)
-        {
-        iString->SetLength(iString->Length() - 1);
-        }
-    else
-        {
-        OstTrace1( TRACE_WARNING, CHELLOTRACEDLL_REMOVELAST_WARN, "[0x%08x] String already empty", (TUint32) this);   
-        }
-    }
-
-EXPORT_C void CHelloTraceInterface::ResetString()
-    {
-    OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_RESETSTRING, "[0x%08x] Reseting string %S", (TUint32) this, *iString);
-    if (iString == NULL)
-        {
-        iString = new (ELeave) THelloTraceDllExampleString;
-        }
-    else
-        {
-        iString->SetLength(0);
-        }
-    }
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/src/HelloTracePanic.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#include <e32std.h>		 // GLDEF_C
-
-#include "HelloTracePanic.h"
-
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTracePanicTraces.h"
-#endif
-
-GLDEF_C void Panic(THelloTraceDllPanic aPanic)
-    {
-    OstTrace1( TRACE_FATAL, PANIC, "Panic(%{THelloTraceDllPanic})", (TUint) aPanic );    
-    User::Panic(_L("HelloTraceDll"), aPanic);
-    }
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/src/HelloTracePanic2.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#include <e32std.h>		 // GLDEF_C
-
-#include "HelloTracePanic.h"
-
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTracePanic2Traces.h"
-#endif
-
-GLDEF_C void Panic(THelloTraceDllPanic aPanic)
-    {
-    OstTrace1( TRACE_FATAL, PANIC, "Panic(%{THelloTraceDllPanic})", (TUint) aPanic );    
-    User::Panic(_L("HelloTraceDll"), aPanic);
-    }
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/src/HelloTraceTypes.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,76 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-
-#include <e32std.h>
-
-#include "HelloTraceTypes.h"
-#include "HelloTraceTypesDup.h"
-#include "HelloTraceTypesDup2.inl"
-
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTraceTypesTraces.h"
-#endif
-
-void HelloTraceTypes::SignedIntegers()
-    {
-    TInt8  eightBit     = - (TInt8)  1 << 6;
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS_8, 
-                  "8 bit signed: %hhd", eightBit );
-    
-    TInt16 sixteenBit   = - (TInt16) 1 << 14; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS_16, 
-                  "16 bit signed: %hd", sixteenBit );
-
-    TInt32 thirtyTwoBit = - (TInt32) 1 << 30; 
-    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS_32, 
-               "32 bit signed: %d", thirtyTwoBit );
-
-    TInt64 sixtyFourBit = - (TInt64) 1 << 62; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS_64, 
-                  "64 bit signed: %Ld", sixtyFourBit );
-    }
-
-void HelloTraceTypes::UnsignedIntegers()
-    {
-    TUint8  eightBit     = (TUint8)  1 << 6;
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS_8, 
-                  "8 bit unsigned: %hhu", eightBit );
-    
-    TUint16 sixteenBit   = (TUint16) 1 << 14; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS_16, 
-                  "16 bit unsigned: %hu", sixteenBit );
-
-    TUint32 thirtyTwoBit = (TUint32) 1 << 30; 
-    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS_32, 
-               "32 bit unsigned: %u", thirtyTwoBit );
-
-    TUint64 sixtyFourBit = (TUint64) 1 << 62; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS_64, 
-                  "64 bit unsigned: %Lu", sixtyFourBit );
-    }
-
-void HelloTraceTypes::Descriptors()
-    {
-    _LIT8(KAscii, "Some ASCII text");
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_ASCII, "8 bit descriptor: %s", KAscii() );
-
-    _LIT16(KUnicode, "Some unicode text");    
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNICODE, "16 bit descriptor: %S", KUnicode() );
-    }
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/src/HelloTraceTypes2.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,76 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-
-#include <e32std.h>
-
-#include "HelloTraceTypes2.h"
-#include "HelloTraceTypes2Dup.h"
-#include "HelloTraceTypes2Dup2.inl"
-
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTraceTypes2Traces.h"
-#endif
-
-void HelloTraceTypes::SignedIntegers()
-    {
-    TInt8  eightBit     = - (TInt8)  1 << 6;
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS_8, 
-                  "8 bit signed: %hhd", eightBit );
-    
-    TInt16 sixteenBit   = - (TInt16) 1 << 14; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS_16, 
-                  "16 bit signed: %hd", sixteenBit );
-
-    TInt32 thirtyTwoBit = - (TInt32) 1 << 30; 
-    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS_32, 
-               "32 bit signed: %d", thirtyTwoBit );
-
-    TInt64 sixtyFourBit = - (TInt64) 1 << 62; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS_64, 
-                  "64 bit signed: %Ld", sixtyFourBit );
-    }
-
-void HelloTraceTypes::UnsignedIntegers()
-    {
-    TUint8  eightBit     = (TUint8)  1 << 6;
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS_8, 
-                  "8 bit unsigned: %hhu", eightBit );
-    
-    TUint16 sixteenBit   = (TUint16) 1 << 14; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS_16, 
-                  "16 bit unsigned: %hu", sixteenBit );
-
-    TUint32 thirtyTwoBit = (TUint32) 1 << 30; 
-    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS_32, 
-               "32 bit unsigned: %u", thirtyTwoBit );
-
-    TUint64 sixtyFourBit = (TUint64) 1 << 62; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS_64, 
-                  "64 bit unsigned: %Lu", sixtyFourBit );
-    }
-
-void HelloTraceTypes::Descriptors()
-    {
-    _LIT8(KAscii, "Some ASCII text");
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_ASCII, "8 bit descriptor: %s", KAscii() );
-
-    _LIT16(KUnicode, "Some unicode text");    
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNICODE, "16 bit descriptor: %S", KUnicode() );
-    }
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/traces/trace.properties	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<trace_properties>
-<enum name="TFnEnum">
-<value id="0">EExample1</value>
-<value id="2">EExample2</value>
-</enum>
-<enum name="THelloTraceDllPanic">
-<value id="0">EHelloTraceDllExamplePanic</value>
-<value id="1">EHelloTraceDllNullPointer</value>
-</enum>
-<file>../incDup/HelloTraceInterfaceDup.h</file>
-<file>../incDup/HelloTraceInterfaceDup2.inl</file>
-<file>../incDup/HelloTraceFnDup.h</file>
-<file>../incDup/HelloTraceFnDup2.inl</file>
-<file>../incDup/HelloTraceTypesDup.h</file>
-<file>../incDup/HelloTraceTypesDup2.inl</file>
-<file>../incDup/HelloTraceInterface2Dup.h</file>
-<file>../incDup/HelloTraceInterface2Dup2.inl</file>
-<file>../incDup/HelloTraceFn2Dup.h</file>
-<file>../incDup/HelloTraceFn2Dup2.inl</file>
-<file>../incDup/HelloTraceTypes2Dup.h</file>
-<file>../incDup/HelloTraceTypes2Dup2.inl</file>
-</trace_properties>
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/group/bld.inf	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,19 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-#include "../dll/group/bld.inf"
-#include "../console/group/bld.inf"
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/console/group/HelloTraceConsole.mmp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-
-TARGET		  HelloTraceConsole.exe
-TARGETTYPE	  exe
-UID			  0 0xE40349E4
-
-OS_LAYER_SYSTEMINCLUDE
-USERINCLUDE	   ../inc
-USERINCLUDE    ../../dll/inc
-USERINCLUDE    ../traces
-
-SOURCEPATH	  ../src
-SOURCE		  HelloTraceConsole.cpp
-
-LIBRARY		  euser.lib
-LIBRARY       HelloTraceDll.lib
-
-#ifdef ENABLE_ABIV2_MODE
-DEBUGGABLE_UDEBONLY
-#endif
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/console/group/bld.inf	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-
-PRJ_PLATFORMS
-DEFAULT
-
-PRJ_EXPORTS
-hellotraceconsole.iby             CORE_OS_LAYER_IBY_EXPORT_PATH(hellotraceconsole.iby)
-
-PRJ_MMPFILES
-HelloTraceConsole.mmp
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/console/group/hellotraceconsole.iby	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,24 +0,0 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "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:
-//
-// Description:
-// ROM build file for tracecore project
-
-#ifndef HELLOTRACECONSOLE_IBY
-#define HELLOTRACECONSOLE_IBY
-
-#include <core\os\hellotracedll.iby>
-
-file=ABI_DIR\BUILD_DIR\hellotraceconsole.exe    Sys\Bin\hellotraceconsole.exe
-
-#endif //HELLOTRACECONSOLE_IBY
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/console/inc/HelloTraceConsole.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef __HELLOTRACECONSOLE_H__
-#define __HELLOTRACECONSOLE_H__
-
-//  Include Files
-
-#include <e32base.h>
-
-//  Function Prototypes
-
-GLDEF_C TInt E32Main();
-
-#endif  // __HELLOTRACECONSOLE_H__
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/dll/bwins/HelloTraceDllu.def	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,14 +0,0 @@
-EXPORTS
-	?Version@CHelloTraceInterface@@SA?AVTVersion@@XZ @ 1 NONAME ; class TVersion CHelloTraceInterface::Version(void)
-	?NewLC@CHelloTraceInterface@@SAPAV1@XZ @ 2 NONAME ; class CHelloTraceInterface * CHelloTraceInterface::NewLC(void)
-	?JustTypes@HelloTraceExample@@SAXXZ @ 3 NONAME ; void HelloTraceExample::JustTypes(void)
-	?Interface@HelloTraceExample@@SAXXZ @ 4 NONAME ; void HelloTraceExample::Interface(void)
-	?FnEntryExit@HelloTraceExample@@SAXXZ @ 5 NONAME ; void HelloTraceExample::FnEntryExit(void)
-	?ResetString@CHelloTraceInterface@@QAEXXZ @ 6 NONAME ; void CHelloTraceInterface::ResetString(void)
-	?AddCharL@CHelloTraceInterface@@QAEXABVTChar@@@Z @ 7 NONAME ; void CHelloTraceInterface::AddCharL(class TChar const &)
-	?PanicTrace@HelloTraceExample@@SAXXZ @ 8 NONAME ; void HelloTraceExample::PanicTrace(void)
-	??1CHelloTraceInterface@@UAE@XZ @ 9 NONAME ; CHelloTraceInterface::~CHelloTraceInterface(void)
-	?String@CHelloTraceInterface@@QBE?BVTPtrC16@@XZ @ 10 NONAME ; class TPtrC16 const CHelloTraceInterface::String(void) const
-	?RemoveLast@CHelloTraceInterface@@QAEXXZ @ 11 NONAME ; void CHelloTraceInterface::RemoveLast(void)
-	?NewL@CHelloTraceInterface@@SAPAV1@XZ @ 12 NONAME ; class CHelloTraceInterface * CHelloTraceInterface::NewL(void)
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/dll/eabi/HelloTraceDllu.def	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,20 +0,0 @@
-EXPORTS
-	_ZN17HelloTraceExample10PanicTraceEv @ 1 NONAME
-	_ZN17HelloTraceExample11FnEntryExitEv @ 2 NONAME
-	_ZN17HelloTraceExample9InterfaceEv @ 3 NONAME
-	_ZN17HelloTraceExample9JustTypesEv @ 4 NONAME
-	_ZN20CHelloTraceInterface10RemoveLastEv @ 5 NONAME
-	_ZN20CHelloTraceInterface11ResetStringEv @ 6 NONAME
-	_ZN20CHelloTraceInterface4NewLEv @ 7 NONAME
-	_ZN20CHelloTraceInterface5NewLCEv @ 8 NONAME
-	_ZN20CHelloTraceInterface7VersionEv @ 9 NONAME
-	_ZN20CHelloTraceInterface8AddCharLERK5TChar @ 10 NONAME
-	_ZN20CHelloTraceInterfaceD0Ev @ 11 NONAME
-	_ZN20CHelloTraceInterfaceD1Ev @ 12 NONAME
-	_ZN20CHelloTraceInterfaceD2Ev @ 13 NONAME
-	_ZNK20CHelloTraceInterface6StringEv @ 14 NONAME
-	_ZTI13CHelloTraceFn @ 15 NONAME
-	_ZTI20CHelloTraceInterface @ 16 NONAME
-	_ZTV13CHelloTraceFn @ 17 NONAME
-	_ZTV20CHelloTraceInterface @ 18 NONAME
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/dll/group/HelloTraceDll.mmp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-
-TARGET		  HelloTraceDll.dll
-TARGETTYPE	  dll
-UID			  0x1000008d 0xE43DF43E
-CAPABILITY    ReadUserData
-
-OS_LAYER_SYSTEMINCLUDE
-USERINCLUDE  ../inc ../incDup
-USERINCLUDE  ../traces
-
-SOURCEPATH	 ../src
-SOURCE       HelloTraceExample.cpp 
-SOURCE       HelloTraceTypes.cpp
-SOURCE       HelloTraceInterface.cpp 
-SOURCE       HelloTraceFn.cpp 
-SOURCE       HelloTracePanic.cpp 
-
-LIBRARY		 euser.lib
-
-#ifdef ENABLE_ABIV2_MODE
-DEBUGGABLE_UDEBONLY
-#endif
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/dll/group/bld.inf	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-
-PRJ_PLATFORMS
-DEFAULT
-
-PRJ_EXPORTS
-hellotracedll.iby             CORE_OS_LAYER_IBY_EXPORT_PATH(hellotracedll.iby)
-../inc/hellotracefn.h		      OS_LAYER_PLATFORM_EXPORT_PATH(hellotracefn.h)
-
-PRJ_MMPFILES
-HelloTraceDll.mmp
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/dll/group/hellotracedll.iby	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,22 +0,0 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "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:
-//
-// Description:
-// ROM build file for tracecore project
-
-#ifndef HELLOTRACEDLL_IBY
-#define HELLOTRACEDLL_IBY
-
-file=ABI_DIR\BUILD_DIR\hellotracedll.dll        Sys\Bin\hellotracedll.dll
-
-#endif //HELLOTRACEDLL_IBY
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/dll/inc/HelloTraceExample.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef __HELLOTRACEEXAMPLE_H__
-#define __HELLOTRACEEXAMPLE_H__
-
-#include <e32std.h>
-
-class HelloTraceExample
-    {
-public:
-    IMPORT_C static void JustTypes();    
-    IMPORT_C static void Interface();    
-    IMPORT_C static void FnEntryExit();    
-    IMPORT_C static void PanicTrace();    
-
-    // @TODO add examples for state macros
-    // @TODO add examples for event macros
-    // @TODO add examples for OstTraceData
-    // @TODO add compile-time selector examples
-    // @TODO add macro wrapper examples
-    };
-
-#endif  // __HELLOTRACEEXAMPLE_H__
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/dll/inc/HelloTraceFn.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,124 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
- 
-
-#ifndef HELLOTRACEFN_H_
-#define HELLOTRACEFN_H_
-
-#include <e32base.h>    // CBase
-
-class CHelloTraceFn : public CBase
-    {
-public:
-    
-    // Note the Trace Builder will only parse this if it's in a cpp file
-    // but not from here :(
-    // Also if you add a new enum you need to reparse the enum - it doesn't
-    // get automatically reparsed by the Trace Compiler :(
-    enum TFnEnum
-        {
-        EExample1,
-        EExample2 = 2, 
-        // EExample3 = EExample2 + 1, // The Trace Builder can't parse this :(
-        };
-    
-public:
-    static CHelloTraceFn* NewL();
-    static CHelloTraceFn* NewLC();
-    ~CHelloTraceFn();
-   
-public: // Fn entry / exit tracing examples 
-    void Simple();
-    void OutputsParams(TInt aParam, TFnEnum aEnumParam);
-    void OutputsParams2(TInt aParam, TFnEnum aEnumParam);
-    void OutputsParams3(TInt aParam, TFnEnum aEnumParam);
-    void OutputsSignedIntegers(TInt8 aParam8,   TInt16 aParam16, 
-                               TInt32 aParam32, TInt64 aParam64);
-    void OutputsUnsignedIntegers(TUint8 aParam8,   TUint16 aParam16, 
-                                 TUint32 aParam32, TUint64 aParam64);
-     
-    TInt OutputsTIntReturnValue();
-    TInt64 OutputsTInt64ReturnValue();
-    TFnEnum OutputsTFnEnumReturnValue();
-
-    CActive* OutputsUnknownPtrType(CActive* aActive);
-    CActive& OutputsUnknownRefType(CActive& aActive);
-    
-    void OutputMissingParams(TInt aUsedParam, TInt aCommentParam, TInt aMissingParam);
-
-#ifdef _DEBUG    
-    void PreProcessedFn(TInt aDbgParam);
-#else
-    void PreProcessedFn();
-#endif
-    
-    static void StaticOutputsParamsL(TInt aParam);  
-    
-    // duplicate all the function and put the impl in the header file HelloTraceFnDup.h
-    void SimpleDup();
-    void OutputsParamsDup(TInt aParam, TFnEnum aEnumParam);
-    void OutputsSignedIntegersDup(TInt8 aParam8,   TInt16 aParam16, 
-                               TInt32 aParam32, TInt64 aParam64);
-    void OutputsUnsignedIntegersDup(TUint8 aParam8,   TUint16 aParam16, 
-                                 TUint32 aParam32, TUint64 aParam64);
-     
-    TInt OutputsTIntReturnValueDup();
-    TInt64 OutputsTInt64ReturnValueDup();
-    TFnEnum OutputsTFnEnumReturnValueDup();
-
-    CActive* OutputsUnknownPtrTypeDup(CActive* aActive);
-    CActive& OutputsUnknownRefTypeDup(CActive& aActive);
-    
-    void OutputMissingParamsDup(TInt aUsedParam, TInt aCommentParam, TInt aMissingParam);
-
-#ifdef _DEBUG    
-    void PreProcessedFnDup(TInt aDbgParam);
-#else
-    void PreProcessedFnDup();
-#endif
-    static void StaticOutputsParamsDupL(TInt aParam);  
-    
-    // duplicate all the function again and put the impl in the header file HelloTraceFnDup2.h
-    void SimpleDup2();
-    void OutputsParamsDup2(TInt aParam, TFnEnum aEnumParam);
-    void OutputsSignedIntegersDup2(TInt8 aParam8,   TInt16 aParam16, 
-                               TInt32 aParam32, TInt64 aParam64);
-    void OutputsUnsignedIntegersDup2(TUint8 aParam8,   TUint16 aParam16, 
-                                 TUint32 aParam32, TUint64 aParam64);
-     
-    TInt OutputsTIntReturnValueDup2();
-    TInt64 OutputsTInt64ReturnValueDup2();
-    TFnEnum OutputsTFnEnumReturnValueDup2();
-
-    CActive* OutputsUnknownPtrTypeDup2(CActive* aActive);
-    CActive& OutputsUnknownRefTypeDup2(CActive& aActive);
-    
-    void OutputMissingParamsDup2(TInt aUsedParam, TInt aCommentParam, TInt aMissingParam);
-
-#ifdef _DEBUG    
-    void PreProcessedFnDup2(TInt aDbgParam);
-#else
-    void PreProcessedFnDup2();
-#endif
-    static void StaticOutputsParamsDup2L(TInt aParam);  
-
-
-private:
-    CHelloTraceFn();
-    };
-
-#endif /* HELLOTRACEFN_H_ */
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/dll/inc/HelloTraceInterface.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,63 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef __HELLOTRACEINTERFACE_H__
-#define __HELLOTRACEINTERFACE_H__
-
-#include <e32base.h>	// CBase
-#include <e32std.h>	 // TBuf
-
-const TInt KHelloTraceDllBufferLength = 10;
-typedef TBuf<KHelloTraceDllBufferLength> THelloTraceDllExampleString;
-
-class CHelloTraceInterface : public CBase
-    {
-public:
-    IMPORT_C static CHelloTraceInterface* NewL();
-    IMPORT_C static CHelloTraceInterface* NewLC();
-    IMPORT_C ~CHelloTraceInterface();
-
-public:
-    IMPORT_C static TVersion Version();
-    IMPORT_C const TPtrC String() const;
-    IMPORT_C void AddCharL(const TChar& aChar);
-    IMPORT_C void RemoveLast();
-    IMPORT_C void ResetString();
-    
-    IMPORT_C static TVersion VersionDup();
-    IMPORT_C const TPtrC StringDup() const;
-    IMPORT_C void AddCharDupL(const TChar& aChar);
-    IMPORT_C void RemoveLastDup();
-    IMPORT_C void ResetStringDup();
-
-    IMPORT_C static TVersion VersionDup2();
-    IMPORT_C const TPtrC StringDup2() const;
-    IMPORT_C void AddCharDup2L(const TChar& aChar);
-    IMPORT_C void RemoveLastDup2();
-    IMPORT_C void ResetStringDup2();
-private:
-    CHelloTraceInterface();
-    void ConstructL();
-
-private:
-    // data
-    THelloTraceDllExampleString* iString;
-    };
-
-#endif  // __HELLOTRACEINTERFACE_H__
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/dll/inc/HelloTracePanic.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef __HELLOTRACEDLL_PAN__
-#define __HELLOTRACEDLL_PAN__
-
-//  Data Types
-
-enum THelloTraceDllPanic
-    {
-    EHelloTraceDllExamplePanic,
-    EHelloTraceDllNullPointer,
-    };
-
-//  Function Prototypes
-
-GLREF_C void Panic(THelloTraceDllPanic aPanic);
-
-#endif  // __HELLOTRACEDLL_PAN__
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/dll/inc/HelloTraceTypes.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef __HELLOTRACETYPES_H__
-#define __HELLOTRACETYPES_H__
-
-class HelloTraceTypes
-    {
-public:
-    static void SignedIntegers();
-    static void UnsignedIntegers();
-    static void Descriptors();
-    
-    static void SignedIntegersDup();
-    static void UnsignedIntegersDup();
-    static void DescriptorsDup();
-        
-    static void SignedIntegersDup2();
-    static void UnsignedIntegersDup2();
-    static void DescriptorsDup2();
-    };
-
-#endif  // __HELLOTRACETYPES_H__
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/dll/incDup/HelloTraceFnDup.inl	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,156 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-#ifndef HELLOTRACEFNDUP_H_
-#define HELLOTRACEFNDUP_H_
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTraceFnDupTraces.h"
-#endif
-
-inline void CHelloTraceFn::SimpleDup()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_SIMPLE_DUP_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_SIMPLE_DUP_EXIT, this );
-    }
-
-inline void CHelloTraceFn::OutputsParamsDup(TInt aParam, TFnEnum aEnumParam)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSPARAMS_DUP_ENTRY, this );
-    Simple();
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSPARAMS_DUP_EXIT, this );
-    }
-
-inline void CHelloTraceFn::StaticOutputsParamsDupL(TInt aParam)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_STATICOUTPUTSPARAMS_DUP_ENTRY, NULL );
-    CHelloTraceFn* example = CHelloTraceFn::NewLC();
-    example->SimpleDup();    
-    CleanupStack::PopAndDestroy(example);
-    OstTraceFunctionExit0( CHELLOTRACEFN_STATICOUTPUTSPARAMS_DUP_EXIT );    
-    }
-
-inline void CHelloTraceFn::OutputsSignedIntegersDup(TInt8 aParam8,   TInt16 aParam16, 
-                                          TInt32 aParam32, TInt64 aParam64)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS_DUP_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS_DUP_EXIT, this );
-    }
-
-void CHelloTraceFn::OutputsUnsignedIntegersDup(TUint8 aParam8,   TUint16 aParam16, 
-                                            TUint32 aParam32, TUint64 aParam64)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS_DUP_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS_DUP_EXIT, this );
-    }
-
-
-inline TInt CHelloTraceFn::OutputsTIntReturnValueDup()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_DUP_ENTRY, this );
-    TInt ret = KErrNone;
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_DUP_EXIT, this, ret );
-    return ret;
-    }
-
-inline TInt64 CHelloTraceFn::OutputsTInt64ReturnValueDup()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE_DUP_ENTRY, this );
-    TInt64 ret = (TInt64) 2 << 40;
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE_DUP_EXIT, this, ret );
-    return ret;
-    }
-
-inline CHelloTraceFn::TFnEnum CHelloTraceFn::OutputsTFnEnumReturnValueDup()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE_DUP_ENTRY, this );
-    TFnEnum ret = EExample1;
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE_DUP_EXIT, this, ret );
-    return ret;    
-    }
-
-inline CActive* CHelloTraceFn::OutputsUnknownPtrTypeDup(CActive* aActive)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_DUP_ENTRY, this );    
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_DUP_EXIT, this, (TUint) aActive );
-    return aActive;
-    }
-
-inline CActive& CHelloTraceFn::OutputsUnknownRefTypeDup(CActive& aActive)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE_DUP_ENTRY, this );
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE_DUP_EXIT, this, (TUint) &aActive );    
-    return aActive;
-    }
-
-// The following doesn't compile as the Trace Compiler doesn't generate
-// the correct OstTraceGenExt(...) function for it
-//void CHelloTraceFn::OutputMissingParamsBug(TInt /*aCommentParam*/, TInt)
-//    {
-//    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_ENTRY, this );
-//    // ...
-//    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_EXIT, this );    
-//    }
-
-// The following compiles and works but outputs the following warning
-// warning: HelloTraceFn.cpp, line xxx: Parameter did not have a name and was not added to trace
-// The fact that this cannot be suppressed is a known problem we're working on.
-inline void CHelloTraceFn::OutputMissingParamsDup(TInt aUsedParam, TInt /*aCommentParam*/, TInt)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMS_DUP_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMS_DUP_EXIT, this );
-    }
-
-// The following doesn't work as the Trace Compiler outputs:
-// error: HelloTraceFn.cpp, line xxx: Class / function name for trace could not be determined x3
-//#ifdef _DEBUG
-//void CHelloTraceFn::PreProcessedFn(TInt aDbgParam)
-//    {
-//    OstTraceFunctionEntryExt( PRE_PROCESSED_ENTRTY_1, this );
-//#else
-//void CHelloTraceFn::PreProcessedFn()
-//    {
-//    OstTraceFunctionEntry1( PRE_PROCESSED_ENTRTY_2, this );
-//#endif
-//    Simple();
-//    OstTraceFunctionExit1( CHELLOTRACEFN_PREPROCESSEDFN_EXIT, this );
-//    }
-
-// Workaround example code until a proper fix is provided
-#ifdef _DEBUG
-inline void CHelloTraceFn::PreProcessedFnDup(TInt aDbgParam)
-    {
-    OstTraceExt2( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_DUP_ENTRY_1, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;aDbgParam=%d;this=%x", (TInt) aDbgParam, (TUint) this);
-#else
-    inline void CHelloTraceFn::PreProcessedFnDup()
-    {
-    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_DUP_ENTRY_2, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
-#endif
-    SimpleDup();
-    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_DUP_EXIT, "CHelloTraceFn::PreProcessedFn: < CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
-    }
-
-#endif /* HELLOTRACEFNDUP_H_ */
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/dll/incDup/HelloTraceFnDup2.inl	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,157 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef HELLOTRACEFNDUP2_H_
-#define HELLOTRACEFNDUP2_H_
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTraceFnDup2Traces.h"
-#endif
-
-inline void CHelloTraceFn::SimpleDup2()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_SIMPLE_DUP2_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_SIMPLE_DUP2_EXIT, this );
-    }
-
-inline void CHelloTraceFn::OutputsParamsDup2(TInt aParam, TFnEnum aEnumParam)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSPARAMS_DUP2_ENTRY, this );
-    Simple();
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSPARAMS_DUP2_EXIT, this );
-    }
-
-inline void CHelloTraceFn::StaticOutputsParamsDup2L(TInt aParam)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_STATICOUTPUTSPARAMS_DUP2_ENTRY, NULL );
-    CHelloTraceFn* example = CHelloTraceFn::NewLC();
-    example->SimpleDup2();    
-    CleanupStack::PopAndDestroy(example);
-    OstTraceFunctionExit0( CHELLOTRACEFN_STATICOUTPUTSPARAMS_DUP2_EXIT );    
-    }
-
-inline void CHelloTraceFn::OutputsSignedIntegersDup2(TInt8 aParam8,   TInt16 aParam16, 
-                                          TInt32 aParam32, TInt64 aParam64)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS_DUP2_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS_DUP2_EXIT, this );
-    }
-
-inline void CHelloTraceFn::OutputsUnsignedIntegersDup2(TUint8 aParam8,   TUint16 aParam16, 
-                                            TUint32 aParam32, TUint64 aParam64)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS_DUP2_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS_DUP2_EXIT, this );
-    }
-
-
-inline TInt CHelloTraceFn::OutputsTIntReturnValueDup2()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_DUP2_ENTRY, this );
-    TInt ret = KErrNone;
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_DUP2_EXIT, this, ret );
-    return ret;
-    }
-
-inline TInt64 CHelloTraceFn::OutputsTInt64ReturnValueDup2()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE_DUP2_ENTRY, this );
-    TInt64 ret = (TInt64) 2 << 40;
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE_DUP2_EXIT, this, ret );
-    return ret;
-    }
-
-inline CHelloTraceFn::TFnEnum CHelloTraceFn::OutputsTFnEnumReturnValueDup2()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE_DUP2_ENTRY, this );
-    TFnEnum ret = EExample1;
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE_DUP2_EXIT, this, ret );
-    return ret;    
-    }
-
-inline CActive* CHelloTraceFn::OutputsUnknownPtrTypeDup2(CActive* aActive)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_DUP2_ENTRY, this );    
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_DUP2_EXIT, this, (TUint) aActive );
-    return aActive;
-    }
-
-inline CActive& CHelloTraceFn::OutputsUnknownRefTypeDup2(CActive& aActive)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE_DUP2_ENTRY, this );
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE_DUP2_EXIT, this, (TUint) &aActive );    
-    return aActive;
-    }
-
-// The following doesn't compile as the Trace Compiler doesn't generate
-// the correct OstTraceGenExt(...) function for it
-//void CHelloTraceFn::OutputMissingParamsBug(TInt /*aCommentParam*/, TInt)
-//    {
-//    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_ENTRY, this );
-//    // ...
-//    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_EXIT, this );    
-//    }
-
-// The following compiles and works but outputs the following warning
-// warning: HelloTraceFn.cpp, line xxx: Parameter did not have a name and was not added to trace
-// The fact that this cannot be suppressed is a known problem we're working on.
-inline void CHelloTraceFn::OutputMissingParamsDup2(TInt aUsedParam, TInt /*aCommentParam*/, TInt)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMS_DUP2_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMS_DUP2_EXIT, this );
-    }
-
-// The following doesn't work as the Trace Compiler outputs:
-// error: HelloTraceFn.cpp, line xxx: Class / function name for trace could not be determined x3
-//#ifdef _DEBUG
-//void CHelloTraceFn::PreProcessedFn(TInt aDbgParam)
-//    {
-//    OstTraceFunctionEntryExt( PRE_PROCESSED_ENTRTY_1, this );
-//#else
-//void CHelloTraceFn::PreProcessedFn()
-//    {
-//    OstTraceFunctionEntry1( PRE_PROCESSED_ENTRTY_2, this );
-//#endif
-//    Simple();
-//    OstTraceFunctionExit1( CHELLOTRACEFN_PREPROCESSEDFN_EXIT, this );
-//    }
-
-// Workaround example code until a proper fix is provided
-#ifdef _DEBUG
-inline void CHelloTraceFn::PreProcessedFnDup2(TInt aDbgParam)
-    {
-    OstTraceExt2( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_DUP2_ENTRY_1, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;aDbgParam=%d;this=%x", (TInt) aDbgParam, (TUint) this);
-#else
-    inline void CHelloTraceFn::PreProcessedFnDup2()
-    {
-    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_DUP2_ENTRY_2, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
-#endif
-    SimpleDup2();
-    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_DUP2_EXIT, "CHelloTraceFn::PreProcessedFn: < CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
-    }
-
-#endif /* HELLOTRACEFNDUP2_H_ */
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/dll/incDup/HelloTraceInterfaceDup.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,91 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef __HELLOTRACEINTERFACEDUP_H__
-#define __HELLOTRACEINTERFACEDUP_H__
-
-#include "HelloTracePanic.h"
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTraceInterfaceDupTraces.h"
-#endif
-
- inline EXPORT_C TVersion CHelloTraceInterface::VersionDup()
-        {
-        const TInt KMajor = 1;
-        const TInt KMinor = 0;
-        const TInt KBuild = 1;
-        TVersion version = TVersion(KMajor, KMinor, KBuild);
-        OstTraceExt1( TRACE_BORDER, CHELLOTRACEDLL_VERSION_DUP, "CHelloTraceInterface::Version = %S", version.Name());   
-        return version;
-        }
-
- inline EXPORT_C const TPtrC CHelloTraceInterface::StringDup() const
-        {
-        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
-
-        OstTraceDefExt2( OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CHELLOTRACEDLL_STRING_DUP, 
-                         "[0x%08x] Returned %S", (TUint32) this, *iString);   
-        return *iString;
-        }
-
- inline EXPORT_C void CHelloTraceInterface::AddCharDupL(const TChar& aChar)
-        {
-        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
-
-        OstTraceExt3( TRACE_BORDER, CHELLOTRACEDLL_ADDCHARL_DUP, 
-                      "[0x%08x] Adding %d to %S", (TUint32) this, (TInt32) aChar, *iString);   
-        if (iString->Length() >= KHelloTraceDllBufferLength)
-            {
-            OstTrace1( TRACE_ERROR, CHELLOTRACEDLL_ADDCHARL_ERR_DUP,
-                       "[0x%08x] Not enough space to add character", (TUint32) this);
-            User::Leave( KErrTooBig);
-            }
-        iString->Append(aChar);
-        }
-
- inline EXPORT_C void CHelloTraceInterface::RemoveLastDup()
-        {
-        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
-
-        OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_REMOVELAST_DUP, 
-                      "[0x%08x] Attempting to remove last character from %S", (TUint32) this, *iString);
-        if (iString->Length() > 0)
-            {
-            iString->SetLength(iString->Length() - 1);
-            }
-        else
-            {
-            OstTrace1( TRACE_WARNING, CHELLOTRACEDLL_REMOVELAST_WARN_DUP, "[0x%08x] String already empty", (TUint32) this);   
-            }
-        }
-
- inline EXPORT_C void CHelloTraceInterface::ResetStringDup()
-        {
-        OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_RESETSTRING_DUP, "[0x%08x] Reseting string %S", (TUint32) this, *iString);
-        if (iString == NULL)
-            {
-            iString = new (ELeave) THelloTraceDllExampleString;
-            }
-        else
-            {
-            iString->SetLength(0);
-            }
-        }
-#endif  // __HELLOTRACEINTERFACEDUP_H__
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/dll/incDup/HelloTraceInterfaceDup2.inl	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,91 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef __HELLOTRACEINTERFACEDUP2_H__
-#define __HELLOTRACEINTERFACEDUP2_H__
-
-#include "HelloTracePanic.h"
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTraceInterfaceDup2Traces.h"
-#endif
-
- inline EXPORT_C TVersion CHelloTraceInterface::VersionDup2()
-        {
-        const TInt KMajor = 1;
-        const TInt KMinor = 0;
-        const TInt KBuild = 1;
-        TVersion version = TVersion(KMajor, KMinor, KBuild);
-        OstTraceExt1( TRACE_BORDER, CHELLOTRACEDLL_VERSION_DUP2, "CHelloTraceInterface::Version = %S", version.Name());   
-        return version;
-        }
-
- inline EXPORT_C const TPtrC CHelloTraceInterface::StringDup2() const
-        {
-        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
-
-        OstTraceDefExt2( OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CHELLOTRACEDLL_STRING_DUP2, 
-                         "[0x%08x] Returned %S", (TUint32) this, *iString);   
-        return *iString;
-        }
-
- inline EXPORT_C void CHelloTraceInterface::AddCharDup2L(const TChar& aChar)
-        {
-        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
-
-        OstTraceExt3( TRACE_BORDER, CHELLOTRACEDLL_ADDCHARL_DUP2, 
-                      "[0x%08x] Adding %d to %S", (TUint32) this, (TInt32) aChar, *iString);   
-        if (iString->Length() >= KHelloTraceDllBufferLength)
-            {
-            OstTrace1( TRACE_ERROR, CHELLOTRACEDLL_ADDCHARL_ERR_DUP2,
-                       "[0x%08x] Not enough space to add character", (TUint32) this);
-            User::Leave( KErrTooBig);
-            }
-        iString->Append(aChar);
-        }
-
- inline EXPORT_C void CHelloTraceInterface::RemoveLastDup2()
-        {
-        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
-
-        OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_REMOVELAST_DUP2, 
-                      "[0x%08x] Attempting to remove last character from %S", (TUint32) this, *iString);
-        if (iString->Length() > 0)
-            {
-            iString->SetLength(iString->Length() - 1);
-            }
-        else
-            {
-            OstTrace1( TRACE_WARNING, CHELLOTRACEDLL_REMOVELAST_WARN_DUP2, "[0x%08x] String already empty", (TUint32) this);   
-            }
-        }
-
- inline EXPORT_C void CHelloTraceInterface::ResetStringDup2()
-        {
-        OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_RESETSTRING_DUP2, "[0x%08x] Reseting string %S", (TUint32) this, *iString);
-        if (iString == NULL)
-            {
-            iString = new (ELeave) THelloTraceDllExampleString;
-            }
-        else
-            {
-            iString->SetLength(0);
-            }
-        }
-#endif  // __HELLOTRACEINTERFACEDUP2_H__
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/dll/incDup/HelloTraceTypesDup.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,75 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef __HELLOTRACETYPESDUP_H__
-#define __HELLOTRACETYPESDUP_H__
-
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTraceTypesDupTraces.h"
-#endif
-
-inline void HelloTraceTypes::SignedIntegersDup()
-    {
-    TInt8  eightBit     = - (TInt8)  1 << 6;
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP_8, 
-                  "8 bit signed: %hhd", eightBit );
-    
-    TInt16 sixteenBit   = - (TInt16) 1 << 14; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP_16, 
-                  "16 bit signed: %hd", sixteenBit );
-
-    TInt32 thirtyTwoBit = - (TInt32) 1 << 30; 
-    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP_32, 
-               "32 bit signed: %d", thirtyTwoBit );
-
-    TInt64 sixtyFourBit = - (TInt64) 1 << 62; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP_64, 
-                  "64 bit signed: %Ld", sixtyFourBit );
-    }
-
-inline void HelloTraceTypes::UnsignedIntegersDup()
-    {
-    TUint8  eightBit     = (TUint8)  1 << 6;
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP_8, 
-                  "8 bit unsigned: %hhu", eightBit );
-    
-    TUint16 sixteenBit   = (TUint16) 1 << 14; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP_16, 
-                  "16 bit unsigned: %hu", sixteenBit );
-
-    TUint32 thirtyTwoBit = (TUint32) 1 << 30; 
-    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP_32, 
-               "32 bit unsigned: %u", thirtyTwoBit );
-
-    TUint64 sixtyFourBit = (TUint64) 1 << 62; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP_64, 
-                  "64 bit unsigned: %Lu", sixtyFourBit );
-    }
-
-inline void HelloTraceTypes::DescriptorsDup()
-    {
-    _LIT8(KAscii, "Some ASCII text");
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_ASCIIDUP, "8 bit descriptor: %s", KAscii() );
-
-    _LIT16(KUnicode, "Some unicode text");    
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNICODEDUP, "16 bit descriptor: %S", KUnicode() );
-    }
-
-#endif  // __HELLOTRACETYPESDUP_H__
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/dll/incDup/HelloTraceTypesDup2.inl	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,75 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef __HELLOTRACETYPESDUP2_H__
-#define __HELLOTRACETYPESDUP2_H__
-
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTraceTypesDup2Traces.h"
-#endif
-
-inline void HelloTraceTypes::SignedIntegersDup2()
-    {
-    TInt8  eightBit     = - (TInt8)  1 << 6;
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP2_8, 
-                  "8 bit signed: %hhd", eightBit );
-    
-    TInt16 sixteenBit   = - (TInt16) 1 << 14; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP2_16, 
-                  "16 bit signed: %hd", sixteenBit );
-
-    TInt32 thirtyTwoBit = - (TInt32) 1 << 30; 
-    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP2_32, 
-               "32 bit signed: %d", thirtyTwoBit );
-
-    TInt64 sixtyFourBit = - (TInt64) 1 << 62; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP2_64, 
-                  "64 bit signed: %Ld", sixtyFourBit );
-    }
-
-inline void HelloTraceTypes::UnsignedIntegersDup2()
-    {
-    TUint8  eightBit     = (TUint8)  1 << 6;
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP2_8, 
-                  "8 bit unsigned: %hhu", eightBit );
-    
-    TUint16 sixteenBit   = (TUint16) 1 << 14; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP2_16, 
-                  "16 bit unsigned: %hu", sixteenBit );
-
-    TUint32 thirtyTwoBit = (TUint32) 1 << 30; 
-    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP2_32, 
-               "32 bit unsigned: %u", thirtyTwoBit );
-
-    TUint64 sixtyFourBit = (TUint64) 1 << 62; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP2_64, 
-                  "64 bit unsigned: %Lu", sixtyFourBit );
-    }
-
-inline void HelloTraceTypes::DescriptorsDup2()
-    {
-    _LIT8(KAscii, "Some ASCII text");
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_ASCIIDUP2, "8 bit descriptor: %s", KAscii() );
-
-    _LIT16(KUnicode, "Some unicode text");    
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNICODEDUP2, "16 bit descriptor: %S", KUnicode() );
-    }
-
-#endif  // __HELLOTRACETYPESDUP2_H__
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/dll/src/HelloTraceExample.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,107 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#include "HelloTraceExample.h"
-#include "HelloTraceTypes.h"
-#include "HelloTraceInterface.h"
-#include "HelloTraceFn.h"
-#include "HelloTracePanic.h"
-
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTraceExampleTraces.h"
-#endif
-
-EXPORT_C void HelloTraceExample::JustTypes()
-    {
-    OstTrace0( TRACE_EXAMPLE, HELLOTRACEEXAMPLE_JUSTTYPES, "*********************************************** " );
-    
-    HelloTraceTypes::SignedIntegers();
-    HelloTraceTypes::UnsignedIntegers();
-    HelloTraceTypes::Descriptors();    
-    }
-
-EXPORT_C void HelloTraceExample::Interface()
-    {
-    OstTrace0( TRACE_EXAMPLE, HELLOTRACEEXAMPLE_INTERFACE, "*********************************************** " );
-    
-    TVersion version = CHelloTraceInterface::Version();   
-    if (version.iMajor >= 1) 
-        {
-        CHelloTraceInterface* example = CHelloTraceInterface::NewLC();
-        example->AddCharL('H');
-        example->AddCharL('e');
-        example->AddCharL('l');
-        example->AddCharL('l');
-        example->AddCharL('o');
-        example->AddCharL('T');        
-        example->RemoveLast();        
-        example->AddCharL(' ');
-        example->AddCharL('T');
-        example->AddCharL('r');
-        example->AddCharL('a');
-        example->AddCharL('c');
-        example->AddCharL('e');
-        example->AddCharL('!');
-        CleanupStack::PopAndDestroy(example);
-        }
-    else
-        {
-        OstTrace0( TRACE_ERROR, HELLOTRACEEXAMPLE_UNSUPPORTED_VERSION, "Unsupported version!");
-        }
-    }
-
-EXPORT_C void HelloTraceExample::FnEntryExit()
-    {
-    OstTrace0( TRACE_EXAMPLE, HELLOTRACEEXAMPLE_FNENTRYEXIT, "*********************************************** " );
-       
-    CHelloTraceFn* example = CHelloTraceFn::NewLC();
-    CIdle* idle = CIdle::NewL(CActive::EPriorityIdle);
-    CleanupStack::PushL(idle);
-
-    CHelloTraceFn::StaticOutputsParamsL(1);
-   
-    example->Simple();
-    example->OutputsParams(2, CHelloTraceFn::EExample1);
-    example->OutputsParams2(2, CHelloTraceFn::EExample1);
-    example->OutputsParams3(2, CHelloTraceFn::EExample1);
-    example->OutputsParams(3, CHelloTraceFn::EExample2);
-    example->OutputsSignedIntegers(-4, -5, -6, -7);
-    example->OutputsUnsignedIntegers(8, 9, 10, 11);
-    example->OutputsTIntReturnValue();    
-    example->OutputsTInt64ReturnValue(); 
-    example->OutputsTFnEnumReturnValue();
-    example->OutputsUnknownPtrType(idle);    
-    example->OutputsUnknownRefType(*idle);
-#ifdef _DEBUG
-    example->PreProcessedFn(12);
-#else
-    example->PreProcessedFn();
-#endif
-    example->OutputMissingParams(13, 14, 15);
-
-    CleanupStack::PopAndDestroy(idle);
-    CleanupStack::PopAndDestroy(example);
-    }
-
-EXPORT_C void HelloTraceExample::PanicTrace()
-    {
-    OstTrace0( TRACE_EXAMPLE, HELLOTRACEEXAMPLE_PANIC, "*********************************************** " );
-
-    Panic(EHelloTraceDllExamplePanic);
-    }
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/dll/src/HelloTraceFn.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,200 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
- 
-#include "HelloTraceFn.h"
-#include "HelloTraceFnDup.inl"
-#include "HelloTraceFnDup2.inl"
-#include "HelloTracePanic.h"
-
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTraceFnTraces.h"
-#endif
-
-
-CHelloTraceFn* CHelloTraceFn::NewLC()
-    {
-    CHelloTraceFn* self = new (ELeave) CHelloTraceFn;
-    CleanupStack::PushL(self);
-    return self;
-    }
-
-CHelloTraceFn* CHelloTraceFn::NewL()
-    {
-    CHelloTraceFn* self = CHelloTraceFn::NewLC();
-    CleanupStack::Pop(self);
-    return self;
-    }
-
-CHelloTraceFn::CHelloTraceFn()
-    {
-    OstTrace1( TRACE_NORMAL, CHELLOTRACEFN_CHELLOTRACEFN_CTOR, "[0x%08x] Constructor", this );  
-    OstTrace1( TRACE_NORMAL, CHELLOTRACEFN_CHELLOTRACEFN_CTOR_TEXTWITHTAB, "[0x%08x] Constructor -   Trace text with tabs", this );
-    }
-
-CHelloTraceFn::~CHelloTraceFn()
-    {
-    OstTrace1( TRACE_NORMAL, CHELLOTRACEFN_CHELLOTRACEFN_DTOR, "[0x%08x] Destructor", this );    
-    }
-
-void CHelloTraceFn::Simple()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_SIMPLE_ENTRY, this );
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_SIMPLE_ENTRY_EXT_NO_PARAM, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_SIMPLE_EXIT, this );
-    }
-
-void CHelloTraceFn::OutputsParams(TInt aParam, TFnEnum aEnumParam)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSPARAMS_ENTRY, this );
-    Simple();
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSPARAMS_EXIT, this );
-    }
-void CHelloTraceFn::OutputsParams2(TInt /*aParam*/, TFnEnum aEnumParam)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSPARAMS2_PRAMCOMMENTED_ENTRY, this );
-    Simple();
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSPARAMS2_EXIT, this );
-    }
-    
-void CHelloTraceFn::OutputsParams3(TInt /*aParam*/, TFnEnum /*aEnumParam*/)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSPARAMS3_ALLPARAMCOMMENTED_ENTRY, this );
-    Simple();
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSPARAMS3_EXIT, this );
-    }    
-
-void CHelloTraceFn::StaticOutputsParamsL(TInt aParam)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_STATICOUTPUTSPARAMS_ENTRY, NULL );
-    CHelloTraceFn* example = CHelloTraceFn::NewLC();
-    example->Simple();    
-    CleanupStack::PopAndDestroy(example);
-    OstTraceFunctionExit0( CHELLOTRACEFN_STATICOUTPUTSPARAMS_EXIT );    
-    }
-
-void CHelloTraceFn::OutputsSignedIntegers(TInt8 aParam8,   TInt16 aParam16, 
-                                          TInt32 aParam32, TInt64 aParam64)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS_EXIT, this );
-    }
-
-void CHelloTraceFn::OutputsUnsignedIntegers(TUint8 aParam8,   TUint16 aParam16, 
-                                            TUint32 aParam32, TUint64 aParam64)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS_EXIT, this );
-    }
-
-
-TInt CHelloTraceFn::OutputsTIntReturnValue()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_ENTRY, this );
-    TInt ret = KErrNone;
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_EXIT, this, ret );
-    return ret;
-    }
-
-TInt64 CHelloTraceFn::OutputsTInt64ReturnValue()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE_ENTRY, this );
-    TInt64 ret = (TInt64) 2 << 40;
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE_EXIT, this, ret );
-    return ret;
-    }
-
-CHelloTraceFn::TFnEnum CHelloTraceFn::OutputsTFnEnumReturnValue()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE_ENTRY, this );
-    TFnEnum ret = EExample1;
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE_EXIT, this, ret );
-    return ret;    
-    }
-
-CActive* CHelloTraceFn::OutputsUnknownPtrType(CActive* aActive)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_ENTRY, this );    
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_EXIT, this, (TUint) aActive );
-    return aActive;
-    }
-
-CActive& CHelloTraceFn::OutputsUnknownRefType(CActive& aActive)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE_ENTRY, this );
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE_EXIT, this, (TUint) &aActive );    
-    return aActive;
-    }
-
-// The following doesn't compile as the Trace Compiler doesn't generate
-// the correct OstTraceGenExt(...) function for it
-//void CHelloTraceFn::OutputMissingParamsBug(TInt /*aCommentParam*/, TInt)
-//    {
-//    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_ENTRY, this );
-//    // ...
-//    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_EXIT, this );    
-//    }
-
-// The following compiles and works but outputs the following warning
-// warning: HelloTraceFn.cpp, line xxx: Parameter did not have a name and was not added to trace
-// The fact that this cannot be suppressed is a known problem we're working on.
-void CHelloTraceFn::OutputMissingParams(TInt aUsedParam, TInt /*aCommentParam*/, TInt)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMS_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMS_EXIT, this );
-    }
-
-// The following doesn't work as the Trace Compiler outputs:
-// error: HelloTraceFn.cpp, line xxx: Class / function name for trace could not be determined x3
-//#ifdef _DEBUG
-//void CHelloTraceFn::PreProcessedFn(TInt aDbgParam)
-//    {
-//    OstTraceFunctionEntryExt( PRE_PROCESSED_ENTRTY_1, this );
-//#else
-//void CHelloTraceFn::PreProcessedFn()
-//    {
-//    OstTraceFunctionEntry1( PRE_PROCESSED_ENTRTY_2, this );
-//#endif
-//    Simple();
-//    OstTraceFunctionExit1( CHELLOTRACEFN_PREPROCESSEDFN_EXIT, this );
-//    }
-
-// Workaround example code until a proper fix is provided
-#ifdef _DEBUG
-void CHelloTraceFn::PreProcessedFn(TInt aDbgParam)
-    {
-    OstTraceExt2( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_ENTRY_1, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;aDbgParam=%d;this=%x", (TInt) aDbgParam, (TUint) this);
-#else
-void CHelloTraceFn::PreProcessedFn()
-    {
-    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_ENTRY_2, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
-#endif
-    Simple();
-    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_EXIT, "CHelloTraceFn::PreProcessedFn: < CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
-    }
-
-	
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/dll/src/HelloTraceInterface.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,121 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-
-#include "HelloTraceInterface.h"
-#include "HelloTraceInterfaceDup.h"
-#include "HelloTraceInterfaceDup2.inl"
-#include "HelloTracePanic.h"
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTraceInterfaceTraces.h"
-#endif
-
-EXPORT_C CHelloTraceInterface* CHelloTraceInterface::NewLC()
-    {
-    CHelloTraceInterface* self = new (ELeave) CHelloTraceInterface;
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    return self;
-    }
-
-EXPORT_C CHelloTraceInterface* CHelloTraceInterface::NewL()
-    {
-    CHelloTraceInterface* self = CHelloTraceInterface::NewLC();
-    CleanupStack::Pop(self);
-    return self;
-    }
-
-CHelloTraceInterface::CHelloTraceInterface()
-    {
-    OstTrace1( TRACE_NORMAL, CHELLOTRACEDLL_CHELLOTRACEDLL_CTOR, "[0x%08x]", (TUint32) this );    
-    }
-
-void CHelloTraceInterface::ConstructL()
-    {
-    iString = new (ELeave) THelloTraceDllExampleString;
-    }
-
-EXPORT_C CHelloTraceInterface::~CHelloTraceInterface()
-    {
-    delete iString;
-    OstTrace1( TRACE_NORMAL, CHELLOTRACEDLL_CHELLOTRACEDLL_DTOR, "[0x%08x]", (TUint32) this );    
-    }
-
-EXPORT_C TVersion CHelloTraceInterface::Version()
-    {
-    const TInt KMajor = 1;
-    const TInt KMinor = 0;
-    const TInt KBuild = 1;
-    TVersion version = TVersion(KMajor, KMinor, KBuild);
-    OstTraceExt1( TRACE_BORDER, CHELLOTRACEDLL_VERSION, "CHelloTraceInterface::Version = %S", version.Name());   
-    return version;
-    }
-
-EXPORT_C const TPtrC CHelloTraceInterface::String() const
-    {
-    __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
-
-    OstTraceDefExt2( OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CHELLOTRACEDLL_STRING, 
-                     "[0x%08x] Returned %S", (TUint32) this, *iString);   
-    return *iString;
-    }
-
-EXPORT_C void CHelloTraceInterface::AddCharL(const TChar& aChar)
-    {
-    __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
-
-    OstTraceExt3( TRACE_BORDER, CHELLOTRACEDLL_ADDCHARL, 
-                  "[0x%08x] Adding %d to %S", (TUint32) this, (TInt32) aChar, *iString);   
-    if (iString->Length() >= KHelloTraceDllBufferLength)
-        {
-        OstTrace1( TRACE_ERROR, CHELLOTRACEDLL_ADDCHARL_ERR,
-                   "[0x%08x] Not enough space to add character", (TUint32) this);
-        User::Leave( KErrTooBig);
-        }
-    iString->Append(aChar);
-    }
-
-EXPORT_C void CHelloTraceInterface::RemoveLast()
-    {
-    __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
-
-    OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_REMOVELAST, 
-                  "[0x%08x] Attempting to remove last character from %S", (TUint32) this, *iString);
-    if (iString->Length() > 0)
-        {
-        iString->SetLength(iString->Length() - 1);
-        }
-    else
-        {
-        OstTrace1( TRACE_WARNING, CHELLOTRACEDLL_REMOVELAST_WARN, "[0x%08x] String already empty", (TUint32) this);   
-        }
-    }
-
-EXPORT_C void CHelloTraceInterface::ResetString()
-    {
-    OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_RESETSTRING, "[0x%08x] Reseting string %S", (TUint32) this, *iString);
-    if (iString == NULL)
-        {
-        iString = new (ELeave) THelloTraceDllExampleString;
-        }
-    else
-        {
-        iString->SetLength(0);
-        }
-    }
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/dll/src/HelloTracePanic.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#include <e32std.h>		 // GLDEF_C
-
-#include "HelloTracePanic.h"
-
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTracePanicTraces.h"
-#endif
-
-GLDEF_C void Panic(THelloTraceDllPanic aPanic)
-    {
-    OstTrace1( TRACE_FATAL, PANIC, "Panic(%{THelloTraceDllPanic})", (TUint) aPanic );    
-    User::Panic(_L("HelloTraceDll"), aPanic);
-    }
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/dll/src/HelloTraceTypes.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,76 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-
-#include <e32std.h>
-
-#include "HelloTraceTypes.h"
-#include "HelloTraceTypesDup.h"
-#include "HelloTraceTypesDup2.inl"
-
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTraceTypesTraces.h"
-#endif
-
-void HelloTraceTypes::SignedIntegers()
-    {
-    TInt8  eightBit     = - (TInt8)  1 << 6;
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS_8, 
-                  "8 bit signed: %hhd", eightBit );
-    
-    TInt16 sixteenBit   = - (TInt16) 1 << 14; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS_16, 
-                  "16 bit signed: %hd", sixteenBit );
-
-    TInt32 thirtyTwoBit = - (TInt32) 1 << 30; 
-    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS_32, 
-               "32 bit signed: %d", thirtyTwoBit );
-
-    TInt64 sixtyFourBit = - (TInt64) 1 << 62; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS_64, 
-                  "64 bit signed: %Ld", sixtyFourBit );
-    }
-
-void HelloTraceTypes::UnsignedIntegers()
-    {
-    TUint8  eightBit     = (TUint8)  1 << 6;
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS_8, 
-                  "8 bit unsigned: %hhu", eightBit );
-    
-    TUint16 sixteenBit   = (TUint16) 1 << 14; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS_16, 
-                  "16 bit unsigned: %hu", sixteenBit );
-
-    TUint32 thirtyTwoBit = (TUint32) 1 << 30; 
-    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS_32, 
-               "32 bit unsigned: %u", thirtyTwoBit );
-
-    TUint64 sixtyFourBit = (TUint64) 1 << 62; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS_64, 
-                  "64 bit unsigned: %Lu", sixtyFourBit );
-    }
-
-void HelloTraceTypes::Descriptors()
-    {
-    _LIT8(KAscii, "Some ASCII text");
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_ASCII, "8 bit descriptor: %s", KAscii() );
-
-    _LIT16(KUnicode, "Some unicode text");    
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNICODE, "16 bit descriptor: %S", KUnicode() );
-    }
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/dll/traces/trace.properties	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<trace_properties>
-<enum name="TFnEnum">
-<value id="0">EExample1</value>
-<value id="2">EExample2</value>
-</enum>
-<enum name="THelloTraceDllPanic">
-<value id="0">EHelloTraceDllExamplePanic</value>
-<value id="1">EHelloTraceDllNullPointer</value>
-</enum>
-<file>../incDup/HelloTraceInterfaceDup.h</file>
-<file>../incDup/HelloTraceInterfaceDup2.inl</file>
-<file>../incDup/HelloTraceFnDup.inl</file>
-<file>../incDup/HelloTraceFnDup2.inl</file>
-<file>../incDup/HelloTraceTypesDup.h</file>
-<file>../incDup/HelloTraceTypesDup2.inl</file>
-</trace_properties>
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/group/bld.inf	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,19 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-#include "../dll/group/bld.inf"
-#include "../console/group/bld.inf"
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/console/group/HelloTraceConsole.mmp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-
-TARGET		  HelloTraceConsole.exe
-TARGETTYPE	  exe
-UID			  0 0xE40349E4
-
-OS_LAYER_SYSTEMINCLUDE
-USERINCLUDE	   ../inc
-USERINCLUDE    ../../dll/inc
-USERINCLUDE    ../traces
-
-SOURCEPATH	  ../src
-SOURCE		  HelloTraceConsole.cpp
-
-LIBRARY		  euser.lib
-LIBRARY       HelloTraceDll.lib
-
-#ifdef ENABLE_ABIV2_MODE
-DEBUGGABLE_UDEBONLY
-#endif
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/console/group/bld.inf	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-
-PRJ_PLATFORMS
-DEFAULT
-
-PRJ_EXPORTS
-hellotraceconsole.iby             CORE_OS_LAYER_IBY_EXPORT_PATH(hellotraceconsole.iby)
-
-PRJ_MMPFILES
-HelloTraceConsole.mmp
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/console/group/hellotraceconsole.iby	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,24 +0,0 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "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:
-//
-// Description:
-// ROM build file for tracecore project
-
-#ifndef HELLOTRACECONSOLE_IBY
-#define HELLOTRACECONSOLE_IBY
-
-#include <core\os\hellotracedll.iby>
-
-file=ABI_DIR\BUILD_DIR\hellotraceconsole.exe    Sys\Bin\hellotraceconsole.exe
-
-#endif //HELLOTRACECONSOLE_IBY
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/console/inc/HelloTraceConsole.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef __HELLOTRACECONSOLE_H__
-#define __HELLOTRACECONSOLE_H__
-
-//  Include Files
-
-#include <e32base.h>
-
-//  Function Prototypes
-
-GLDEF_C TInt E32Main();
-
-#endif  // __HELLOTRACECONSOLE_H__
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/console/src/HelloTraceConsole.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,124 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#include <e32cons.h>			// Console
-
-#include "HelloTraceConsole.h"
-#include "HelloTraceExample.h"
-
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTraceConsoleTraces.h"
-#endif
-
-
-_LIT(KTextConsoleTitle, "HelloTrace");
-_LIT(KTextPressAnyKey, " [press any key]\n");
-
-LOCAL_D CConsoleBase* console; // write all messages to this
-
-LOCAL_C void DoExamples()
-    {
-    TInt err = KErrNone;
-
-    console->Printf(_L("Before main tracing examples ...\n"));
-
-    console->Printf(_L(" Before type examples ..."));
-    console->Printf(KTextPressAnyKey);
-    console->Getch();
-    TRAP(err, HelloTraceExample::JustTypes());    
-    if (err)
-        console->Printf(_L(" Failed with error %d\n"), err);
-
-    console->Printf(_L(" Before Interface examples ..."));
-    console->Printf(KTextPressAnyKey);
-    console->Getch();
-    TRAP(err, HelloTraceExample::Interface());    
-    if (err)
-        console->Printf(_L(" Failed with error %d\n"), err);
-    
-    console->Printf(_L(" Before FnEntryExit examples ..."));
-    console->Printf(KTextPressAnyKey);
-    console->Getch();
-    TRAP(err, HelloTraceExample::FnEntryExit());    
-    if (err)
-        console->Printf(_L(" Failed with error %d\n"), err);    
-    }
-
-LOCAL_C void DoStartL()
-    {
-    // Create active scheduler (to run active objects)
-    CActiveScheduler* scheduler = new (ELeave) CActiveScheduler();
-    CleanupStack::PushL(scheduler);
-    CActiveScheduler::Install(scheduler);
-
-    DoExamples();
-    
-    // Delete active scheduler
-    CleanupStack::PopAndDestroy(scheduler);
-    }
-
-//  Global Functions
-
-GLDEF_C TInt E32Main()
-    {
-    OstTraceFunctionEntry0( E32MAIN_ENTRY );
-    
-    // Create cleanup stack
-    __UHEAP_MARK;
-    CTrapCleanup* cleanup = CTrapCleanup::New();
-
-    // Create output console
-    TRAPD(createError, 
-          console = Console::NewL(KTextConsoleTitle, 
-                                  TSize(KConsFullScreen, KConsFullScreen)));    
-    if (createError)
-        {
-        delete cleanup;
-        OstTrace1( TRACE_ERROR, E32MAIN_CREATE_ERROR, "Failed to create console error: %d", createError);
-        OstTraceFunctionExit0( E32MAIN_EXIT_ERR );
-        return createError;
-        }
-
-    TRAPD(mainError, DoStartL());    
-    if (mainError)
-        {
-        OstTrace1( TRACE_ERROR, E32MAIN_START_ERROR, "DoStartL failed with error: %d", mainError);
-        console->Printf(_L("DoStartL failed with error: %d\n\n"), mainError);
-        }
-    else 
-        {
-        console->Printf(_L("Before panic tracing example ..."));
-        console->Printf(KTextPressAnyKey);
-        console->Getch();
-    
-        OstTrace0( TRACE_FLOW, E32MAIN_BEFORE_PANIC, "About to cause a panic ..." );
-        HelloTraceExample::PanicTrace();
-        
-        console->Printf(KTextPressAnyKey);
-        console->Getch();
-        }
-
-    delete console;
-    delete cleanup;
-    __UHEAP_MARKEND;
-    
-    OstTraceFunctionExit0( E32MAIN_EXIT );
-    return KErrNone;
-    }
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/dll/bwins/HelloTraceDllu.def	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,14 +0,0 @@
-EXPORTS
-	?Version@CHelloTraceInterface@@SA?AVTVersion@@XZ @ 1 NONAME ; class TVersion CHelloTraceInterface::Version(void)
-	?NewLC@CHelloTraceInterface@@SAPAV1@XZ @ 2 NONAME ; class CHelloTraceInterface * CHelloTraceInterface::NewLC(void)
-	?JustTypes@HelloTraceExample@@SAXXZ @ 3 NONAME ; void HelloTraceExample::JustTypes(void)
-	?Interface@HelloTraceExample@@SAXXZ @ 4 NONAME ; void HelloTraceExample::Interface(void)
-	?FnEntryExit@HelloTraceExample@@SAXXZ @ 5 NONAME ; void HelloTraceExample::FnEntryExit(void)
-	?ResetString@CHelloTraceInterface@@QAEXXZ @ 6 NONAME ; void CHelloTraceInterface::ResetString(void)
-	?AddCharL@CHelloTraceInterface@@QAEXABVTChar@@@Z @ 7 NONAME ; void CHelloTraceInterface::AddCharL(class TChar const &)
-	?PanicTrace@HelloTraceExample@@SAXXZ @ 8 NONAME ; void HelloTraceExample::PanicTrace(void)
-	??1CHelloTraceInterface@@UAE@XZ @ 9 NONAME ; CHelloTraceInterface::~CHelloTraceInterface(void)
-	?String@CHelloTraceInterface@@QBE?BVTPtrC16@@XZ @ 10 NONAME ; class TPtrC16 const CHelloTraceInterface::String(void) const
-	?RemoveLast@CHelloTraceInterface@@QAEXXZ @ 11 NONAME ; void CHelloTraceInterface::RemoveLast(void)
-	?NewL@CHelloTraceInterface@@SAPAV1@XZ @ 12 NONAME ; class CHelloTraceInterface * CHelloTraceInterface::NewL(void)
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/dll/eabi/HelloTraceDllu.def	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,20 +0,0 @@
-EXPORTS
-	_ZN17HelloTraceExample10PanicTraceEv @ 1 NONAME
-	_ZN17HelloTraceExample11FnEntryExitEv @ 2 NONAME
-	_ZN17HelloTraceExample9InterfaceEv @ 3 NONAME
-	_ZN17HelloTraceExample9JustTypesEv @ 4 NONAME
-	_ZN20CHelloTraceInterface10RemoveLastEv @ 5 NONAME
-	_ZN20CHelloTraceInterface11ResetStringEv @ 6 NONAME
-	_ZN20CHelloTraceInterface4NewLEv @ 7 NONAME
-	_ZN20CHelloTraceInterface5NewLCEv @ 8 NONAME
-	_ZN20CHelloTraceInterface7VersionEv @ 9 NONAME
-	_ZN20CHelloTraceInterface8AddCharLERK5TChar @ 10 NONAME
-	_ZN20CHelloTraceInterfaceD0Ev @ 11 NONAME
-	_ZN20CHelloTraceInterfaceD1Ev @ 12 NONAME
-	_ZN20CHelloTraceInterfaceD2Ev @ 13 NONAME
-	_ZNK20CHelloTraceInterface6StringEv @ 14 NONAME
-	_ZTI13CHelloTraceFn @ 15 NONAME
-	_ZTI20CHelloTraceInterface @ 16 NONAME
-	_ZTV13CHelloTraceFn @ 17 NONAME
-	_ZTV20CHelloTraceInterface @ 18 NONAME
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/dll/group/HelloTraceDll.mmp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-
-TARGET		  HelloTraceDll.dll
-TARGETTYPE	  dll
-UID			  0x1000008d 0xE43DF43E
-CAPABILITY    ReadUserData
-
-OS_LAYER_SYSTEMINCLUDE
-USERINCLUDE  ../inc ../incDup
-USERINCLUDE  ../traces/HelloTraceDll_dll
-
-SOURCEPATH	 ../src
-SOURCE       HelloTraceExample.cpp 
-SOURCE       HelloTraceTypes.cpp
-SOURCE       HelloTraceInterface.cpp 
-SOURCE       HelloTraceFn.cpp 
-SOURCE       HelloTracePanic.cpp 
-
-LIBRARY		 euser.lib
-
-#ifdef ENABLE_ABIV2_MODE
-DEBUGGABLE_UDEBONLY
-#endif
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/dll/group/bld.inf	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-
-PRJ_PLATFORMS
-DEFAULT
-
-PRJ_EXPORTS
-hellotracedll.iby             CORE_OS_LAYER_IBY_EXPORT_PATH(hellotracedll.iby)
-
-PRJ_MMPFILES
-HelloTraceDll.mmp
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/dll/group/hellotracedll.iby	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,22 +0,0 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "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:
-//
-// Description:
-// ROM build file for tracecore project
-
-#ifndef HELLOTRACEDLL_IBY
-#define HELLOTRACEDLL_IBY
-
-file=ABI_DIR\BUILD_DIR\hellotracedll.dll        Sys\Bin\hellotracedll.dll
-
-#endif //HELLOTRACEDLL_IBY
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/dll/inc/HelloTraceExample.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef __HELLOTRACEEXAMPLE_H__
-#define __HELLOTRACEEXAMPLE_H__
-
-#include <e32std.h>
-
-class HelloTraceExample
-    {
-public:
-    IMPORT_C static void JustTypes();    
-    IMPORT_C static void Interface();    
-    IMPORT_C static void FnEntryExit();    
-    IMPORT_C static void PanicTrace();    
-
-    // @TODO add examples for state macros
-    // @TODO add examples for event macros
-    // @TODO add examples for OstTraceData
-    // @TODO add compile-time selector examples
-    // @TODO add macro wrapper examples
-    };
-
-#endif  // __HELLOTRACEEXAMPLE_H__
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/dll/inc/HelloTraceFn.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,122 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef HELLOTRACEFN_H_
-#define HELLOTRACEFN_H_
-
-#include <e32base.h>    // CBase
-
-class CHelloTraceFn : public CBase
-    {
-public:
-    
-    // Note the Trace Builder will only parse this if it's in a cpp file
-    // but not from here :(
-    // Also if you add a new enum you need to reparse the enum - it doesn't
-    // get automatically reparsed by the Trace Compiler :(
-    enum TFnEnum
-        {
-        EExample1,
-        EExample2 = 2, 
-        // EExample3 = EExample2 + 1, // The Trace Builder can't parse this :(
-        };
-    
-public:
-    static CHelloTraceFn* NewL();
-    static CHelloTraceFn* NewLC();
-    ~CHelloTraceFn();
-   
-public: // Fn entry / exit tracing examples 
-    void Simple();
-    void OutputsParams(TInt aParam, TFnEnum aEnumParam);
-    void OutputsSignedIntegers(TInt8 aParam8,   TInt16 aParam16, 
-                               TInt32 aParam32, TInt64 aParam64);
-    void OutputsUnsignedIntegers(TUint8 aParam8,   TUint16 aParam16, 
-                                 TUint32 aParam32, TUint64 aParam64);
-     
-    TInt OutputsTIntReturnValue();
-    TInt64 OutputsTInt64ReturnValue();
-    TFnEnum OutputsTFnEnumReturnValue();
-
-    CActive* OutputsUnknownPtrType(CActive* aActive);
-    CActive& OutputsUnknownRefType(CActive& aActive);
-    
-    void OutputMissingParams(TInt aUsedParam, TInt aCommentParam, TInt aMissingParam);
-
-#ifdef _DEBUG    
-    void PreProcessedFn(TInt aDbgParam);
-#else
-    void PreProcessedFn();
-#endif
-    
-    static void StaticOutputsParamsL(TInt aParam);  
-    
-    // duplicate all the function and put the impl in the header file HelloTraceFnDup.h
-    void SimpleDup();
-    void OutputsParamsDup(TInt aParam, TFnEnum aEnumParam);
-    void OutputsSignedIntegersDup(TInt8 aParam8,   TInt16 aParam16, 
-                               TInt32 aParam32, TInt64 aParam64);
-    void OutputsUnsignedIntegersDup(TUint8 aParam8,   TUint16 aParam16, 
-                                 TUint32 aParam32, TUint64 aParam64);
-     
-    TInt OutputsTIntReturnValueDup();
-    TInt64 OutputsTInt64ReturnValueDup();
-    TFnEnum OutputsTFnEnumReturnValueDup();
-
-    CActive* OutputsUnknownPtrTypeDup(CActive* aActive);
-    CActive& OutputsUnknownRefTypeDup(CActive& aActive);
-    
-    void OutputMissingParamsDup(TInt aUsedParam, TInt aCommentParam, TInt aMissingParam);
-
-#ifdef _DEBUG    
-    void PreProcessedFnDup(TInt aDbgParam);
-#else
-    void PreProcessedFnDup();
-#endif
-    static void StaticOutputsParamsDupL(TInt aParam);  
-    
-    // duplicate all the function again and put the impl in the header file HelloTraceFnDup2.h
-    void SimpleDup2();
-    void OutputsParamsDup2(TInt aParam, TFnEnum aEnumParam);
-    void OutputsSignedIntegersDup2(TInt8 aParam8,   TInt16 aParam16, 
-                               TInt32 aParam32, TInt64 aParam64);
-    void OutputsUnsignedIntegersDup2(TUint8 aParam8,   TUint16 aParam16, 
-                                 TUint32 aParam32, TUint64 aParam64);
-     
-    TInt OutputsTIntReturnValueDup2();
-    TInt64 OutputsTInt64ReturnValueDup2();
-    TFnEnum OutputsTFnEnumReturnValueDup2();
-
-    CActive* OutputsUnknownPtrTypeDup2(CActive* aActive);
-    CActive& OutputsUnknownRefTypeDup2(CActive& aActive);
-    
-    void OutputMissingParamsDup2(TInt aUsedParam, TInt aCommentParam, TInt aMissingParam);
-
-#ifdef _DEBUG    
-    void PreProcessedFnDup2(TInt aDbgParam);
-#else
-    void PreProcessedFnDup2();
-#endif
-    static void StaticOutputsParamsDup2L(TInt aParam);  
-
-
-private:
-    CHelloTraceFn();
-    };
-
-#endif /* HELLOTRACEFN_H_ */
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/dll/inc/HelloTraceInterface.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,63 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef __HELLOTRACEINTERFACE_H__
-#define __HELLOTRACEINTERFACE_H__
-
-#include <e32base.h>	// CBase
-#include <e32std.h>	 // TBuf
-
-const TInt KHelloTraceDllBufferLength = 10;
-typedef TBuf<KHelloTraceDllBufferLength> THelloTraceDllExampleString;
-
-class CHelloTraceInterface : public CBase
-    {
-public:
-    IMPORT_C static CHelloTraceInterface* NewL();
-    IMPORT_C static CHelloTraceInterface* NewLC();
-    IMPORT_C ~CHelloTraceInterface();
-
-public:
-    IMPORT_C static TVersion Version();
-    IMPORT_C const TPtrC String() const;
-    IMPORT_C void AddCharL(const TChar& aChar);
-    IMPORT_C void RemoveLast();
-    IMPORT_C void ResetString();
-    
-    IMPORT_C static TVersion VersionDup();
-    IMPORT_C const TPtrC StringDup() const;
-    IMPORT_C void AddCharDupL(const TChar& aChar);
-    IMPORT_C void RemoveLastDup();
-    IMPORT_C void ResetStringDup();
-
-    IMPORT_C static TVersion VersionDup2();
-    IMPORT_C const TPtrC StringDup2() const;
-    IMPORT_C void AddCharDup2L(const TChar& aChar);
-    IMPORT_C void RemoveLastDup2();
-    IMPORT_C void ResetStringDup2();
-private:
-    CHelloTraceInterface();
-    void ConstructL();
-
-private:
-    // data
-    THelloTraceDllExampleString* iString;
-    };
-
-#endif  // __HELLOTRACEINTERFACE_H__
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/dll/inc/HelloTracePanic.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef __HELLOTRACEDLL_PAN__
-#define __HELLOTRACEDLL_PAN__
-
-//  Data Types
-
-enum THelloTraceDllPanic
-    {
-    EHelloTraceDllExamplePanic,
-    EHelloTraceDllNullPointer,
-    };
-
-//  Function Prototypes
-
-GLREF_C void Panic(THelloTraceDllPanic aPanic);
-
-#endif  // __HELLOTRACEDLL_PAN__
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/dll/inc/HelloTraceTypes.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef __HELLOTRACETYPES_H__
-#define __HELLOTRACETYPES_H__
-
-class HelloTraceTypes
-    {
-public:
-    static void SignedIntegers();
-    static void UnsignedIntegers();
-    static void Descriptors();
-    
-    static void SignedIntegersDup();
-    static void UnsignedIntegersDup();
-    static void DescriptorsDup();
-        
-    static void SignedIntegersDup2();
-    static void UnsignedIntegersDup2();
-    static void DescriptorsDup2();
-    };
-
-#endif  // __HELLOTRACETYPES_H__
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/dll/incDup/HelloTraceFnDup.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,157 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef HELLOTRACEFNDUP_H_
-#define HELLOTRACEFNDUP_H_
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTraceFnDupTraces.h"
-#endif
-
-inline void CHelloTraceFn::SimpleDup()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_SIMPLE_DUP_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_SIMPLE_DUP_EXIT, this );
-    }
-
-inline void CHelloTraceFn::OutputsParamsDup(TInt aParam, TFnEnum aEnumParam)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSPARAMS_DUP_ENTRY, this );
-    Simple();
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSPARAMS_DUP_EXIT, this );
-    }
-
-inline void CHelloTraceFn::StaticOutputsParamsDupL(TInt aParam)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_STATICOUTPUTSPARAMS_DUP_ENTRY, NULL );
-    CHelloTraceFn* example = CHelloTraceFn::NewLC();
-    example->SimpleDup();    
-    CleanupStack::PopAndDestroy(example);
-    OstTraceFunctionExit0( CHELLOTRACEFN_STATICOUTPUTSPARAMS_DUP_EXIT );    
-    }
-
-inline void CHelloTraceFn::OutputsSignedIntegersDup(TInt8 aParam8,   TInt16 aParam16, 
-                                          TInt32 aParam32, TInt64 aParam64)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS_DUP_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS_DUP_EXIT, this );
-    }
-
-void CHelloTraceFn::OutputsUnsignedIntegersDup(TUint8 aParam8,   TUint16 aParam16, 
-                                            TUint32 aParam32, TUint64 aParam64)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS_DUP_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS_DUP_EXIT, this );
-    }
-
-
-inline TInt CHelloTraceFn::OutputsTIntReturnValueDup()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_DUP_ENTRY, this );
-    TInt ret = KErrNone;
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_DUP_EXIT, this, ret );
-    return ret;
-    }
-
-inline TInt64 CHelloTraceFn::OutputsTInt64ReturnValueDup()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE_DUP_ENTRY, this );
-    TInt64 ret = (TInt64) 2 << 40;
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE_DUP_EXIT, this, ret );
-    return ret;
-    }
-
-inline CHelloTraceFn::TFnEnum CHelloTraceFn::OutputsTFnEnumReturnValueDup()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE_DUP_ENTRY, this );
-    TFnEnum ret = EExample1;
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE_DUP_EXIT, this, ret );
-    return ret;    
-    }
-
-inline CActive* CHelloTraceFn::OutputsUnknownPtrTypeDup(CActive* aActive)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_DUP_ENTRY, this );    
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_DUP_EXIT, this, (TUint) aActive );
-    return aActive;
-    }
-
-inline CActive& CHelloTraceFn::OutputsUnknownRefTypeDup(CActive& aActive)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE_DUP_ENTRY, this );
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE_DUP_EXIT, this, (TUint) &aActive );    
-    return aActive;
-    }
-
-// The following doesn't compile as the Trace Compiler doesn't generate
-// the correct OstTraceGenExt(...) function for it
-//void CHelloTraceFn::OutputMissingParamsBug(TInt /*aCommentParam*/, TInt)
-//    {
-//    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_ENTRY, this );
-//    // ...
-//    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_EXIT, this );    
-//    }
-
-// The following compiles and works but outputs the following warning
-// warning: HelloTraceFn.cpp, line xxx: Parameter did not have a name and was not added to trace
-// The fact that this cannot be suppressed is a known problem we're working on.
-inline void CHelloTraceFn::OutputMissingParamsDup(TInt aUsedParam, TInt /*aCommentParam*/, TInt)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMS_DUP_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMS_DUP_EXIT, this );
-    }
-
-// The following doesn't work as the Trace Compiler outputs:
-// error: HelloTraceFn.cpp, line xxx: Class / function name for trace could not be determined x3
-//#ifdef _DEBUG
-//void CHelloTraceFn::PreProcessedFn(TInt aDbgParam)
-//    {
-//    OstTraceFunctionEntryExt( PRE_PROCESSED_ENTRTY_1, this );
-//#else
-//void CHelloTraceFn::PreProcessedFn()
-//    {
-//    OstTraceFunctionEntry1( PRE_PROCESSED_ENTRTY_2, this );
-//#endif
-//    Simple();
-//    OstTraceFunctionExit1( CHELLOTRACEFN_PREPROCESSEDFN_EXIT, this );
-//    }
-
-// Workaround example code until a proper fix is provided
-#ifdef _DEBUG
-inline void CHelloTraceFn::PreProcessedFnDup(TInt aDbgParam)
-    {
-    OstTraceExt2( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_DUP_ENTRY_1, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;aDbgParam=%d;this=%x", (TInt) aDbgParam, (TUint) this);
-#else
-    inline void CHelloTraceFn::PreProcessedFnDup()
-    {
-    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_DUP_ENTRY_2, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
-#endif
-    SimpleDup();
-    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_DUP_EXIT, "CHelloTraceFn::PreProcessedFn: < CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
-    }
-
-#endif /* HELLOTRACEFNDUP_H_ */
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/dll/incDup/HelloTraceFnDup2.inl	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,157 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef HELLOTRACEFNDUP2_H_
-#define HELLOTRACEFNDUP2_H_
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTraceFnDup2Traces.h"
-#endif
-
-inline void CHelloTraceFn::SimpleDup2()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_SIMPLE_DUP2_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_SIMPLE_DUP2_EXIT, this );
-    }
-
-inline void CHelloTraceFn::OutputsParamsDup2(TInt aParam, TFnEnum aEnumParam)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSPARAMS_DUP2_ENTRY, this );
-    Simple();
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSPARAMS_DUP2_EXIT, this );
-    }
-
-inline void CHelloTraceFn::StaticOutputsParamsDup2L(TInt aParam)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_STATICOUTPUTSPARAMS_DUP2_ENTRY, NULL );
-    CHelloTraceFn* example = CHelloTraceFn::NewLC();
-    example->SimpleDup2();    
-    CleanupStack::PopAndDestroy(example);
-    OstTraceFunctionExit0( CHELLOTRACEFN_STATICOUTPUTSPARAMS_DUP2_EXIT );    
-    }
-
-inline void CHelloTraceFn::OutputsSignedIntegersDup2(TInt8 aParam8,   TInt16 aParam16, 
-                                          TInt32 aParam32, TInt64 aParam64)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS_DUP2_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS_DUP2_EXIT, this );
-    }
-
-inline void CHelloTraceFn::OutputsUnsignedIntegersDup2(TUint8 aParam8,   TUint16 aParam16, 
-                                            TUint32 aParam32, TUint64 aParam64)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS_DUP2_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS_DUP2_EXIT, this );
-    }
-
-
-inline TInt CHelloTraceFn::OutputsTIntReturnValueDup2()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_DUP2_ENTRY, this );
-    TInt ret = KErrNone;
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_DUP2_EXIT, this, ret );
-    return ret;
-    }
-
-inline TInt64 CHelloTraceFn::OutputsTInt64ReturnValueDup2()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE_DUP2_ENTRY, this );
-    TInt64 ret = (TInt64) 2 << 40;
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE_DUP2_EXIT, this, ret );
-    return ret;
-    }
-
-inline CHelloTraceFn::TFnEnum CHelloTraceFn::OutputsTFnEnumReturnValueDup2()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE_DUP2_ENTRY, this );
-    TFnEnum ret = EExample1;
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE_DUP2_EXIT, this, ret );
-    return ret;    
-    }
-
-inline CActive* CHelloTraceFn::OutputsUnknownPtrTypeDup2(CActive* aActive)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_DUP2_ENTRY, this );    
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_DUP2_EXIT, this, (TUint) aActive );
-    return aActive;
-    }
-
-inline CActive& CHelloTraceFn::OutputsUnknownRefTypeDup2(CActive& aActive)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE_DUP2_ENTRY, this );
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE_DUP2_EXIT, this, (TUint) &aActive );    
-    return aActive;
-    }
-
-// The following doesn't compile as the Trace Compiler doesn't generate
-// the correct OstTraceGenExt(...) function for it
-//void CHelloTraceFn::OutputMissingParamsBug(TInt /*aCommentParam*/, TInt)
-//    {
-//    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_ENTRY, this );
-//    // ...
-//    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_EXIT, this );    
-//    }
-
-// The following compiles and works but outputs the following warning
-// warning: HelloTraceFn.cpp, line xxx: Parameter did not have a name and was not added to trace
-// The fact that this cannot be suppressed is a known problem we're working on.
-inline void CHelloTraceFn::OutputMissingParamsDup2(TInt aUsedParam, TInt /*aCommentParam*/, TInt)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMS_DUP2_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMS_DUP2_EXIT, this );
-    }
-
-// The following doesn't work as the Trace Compiler outputs:
-// error: HelloTraceFn.cpp, line xxx: Class / function name for trace could not be determined x3
-//#ifdef _DEBUG
-//void CHelloTraceFn::PreProcessedFn(TInt aDbgParam)
-//    {
-//    OstTraceFunctionEntryExt( PRE_PROCESSED_ENTRTY_1, this );
-//#else
-//void CHelloTraceFn::PreProcessedFn()
-//    {
-//    OstTraceFunctionEntry1( PRE_PROCESSED_ENTRTY_2, this );
-//#endif
-//    Simple();
-//    OstTraceFunctionExit1( CHELLOTRACEFN_PREPROCESSEDFN_EXIT, this );
-//    }
-
-// Workaround example code until a proper fix is provided
-#ifdef _DEBUG
-inline void CHelloTraceFn::PreProcessedFnDup2(TInt aDbgParam)
-    {
-    OstTraceExt2( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_DUP2_ENTRY_1, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;aDbgParam=%d;this=%x", (TInt) aDbgParam, (TUint) this);
-#else
-    inline void CHelloTraceFn::PreProcessedFnDup2()
-    {
-    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_DUP2_ENTRY_2, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
-#endif
-    SimpleDup2();
-    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_DUP2_EXIT, "CHelloTraceFn::PreProcessedFn: < CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
-    }
-
-#endif /* HELLOTRACEFNDUP2_H_ */
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/dll/incDup/HelloTraceInterfaceDup.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,91 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef __HELLOTRACEINTERFACEDUP_H__
-#define __HELLOTRACEINTERFACEDUP_H__
-
-#include "HelloTracePanic.h"
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTraceInterfaceDupTraces.h"
-#endif
-
- inline EXPORT_C TVersion CHelloTraceInterface::VersionDup()
-        {
-        const TInt KMajor = 1;
-        const TInt KMinor = 0;
-        const TInt KBuild = 1;
-        TVersion version = TVersion(KMajor, KMinor, KBuild);
-        OstTraceExt1( TRACE_BORDER, CHELLOTRACEDLL_VERSION_DUP, "CHelloTraceInterface::Version = %S", version.Name());   
-        return version;
-        }
-
- inline EXPORT_C const TPtrC CHelloTraceInterface::StringDup() const
-        {
-        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
-
-        OstTraceDefExt2( OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CHELLOTRACEDLL_STRING_DUP, 
-                         "[0x%08x] Returned %S", (TUint32) this, *iString);   
-        return *iString;
-        }
-
- inline EXPORT_C void CHelloTraceInterface::AddCharDupL(const TChar& aChar)
-        {
-        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
-
-        OstTraceExt3( TRACE_BORDER, CHELLOTRACEDLL_ADDCHARL_DUP, 
-                      "[0x%08x] Adding %d to %S", (TUint32) this, (TInt32) aChar, *iString);   
-        if (iString->Length() >= KHelloTraceDllBufferLength)
-            {
-            OstTrace1( TRACE_ERROR, CHELLOTRACEDLL_ADDCHARL_ERR_DUP,
-                       "[0x%08x] Not enough space to add character", (TUint32) this);
-            User::Leave( KErrTooBig);
-            }
-        iString->Append(aChar);
-        }
-
- inline EXPORT_C void CHelloTraceInterface::RemoveLastDup()
-        {
-        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
-
-        OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_REMOVELAST_DUP, 
-                      "[0x%08x] Attempting to remove last character from %S", (TUint32) this, *iString);
-        if (iString->Length() > 0)
-            {
-            iString->SetLength(iString->Length() - 1);
-            }
-        else
-            {
-            OstTrace1( TRACE_WARNING, CHELLOTRACEDLL_REMOVELAST_WARN_DUP, "[0x%08x] String already empty", (TUint32) this);   
-            }
-        }
-
- inline EXPORT_C void CHelloTraceInterface::ResetStringDup()
-        {
-        OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_RESETSTRING_DUP, "[0x%08x] Reseting string %S", (TUint32) this, *iString);
-        if (iString == NULL)
-            {
-            iString = new (ELeave) THelloTraceDllExampleString;
-            }
-        else
-            {
-            iString->SetLength(0);
-            }
-        }
-#endif  // __HELLOTRACEINTERFACEDUP_H__
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/dll/incDup/HelloTraceInterfaceDup2.inl	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,91 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef __HELLOTRACEINTERFACEDUP2_H__
-#define __HELLOTRACEINTERFACEDUP2_H__
-
-#include "HelloTracePanic.h"
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTraceInterfaceDup2Traces.h"
-#endif
-
- inline EXPORT_C TVersion CHelloTraceInterface::VersionDup2()
-        {
-        const TInt KMajor = 1;
-        const TInt KMinor = 0;
-        const TInt KBuild = 1;
-        TVersion version = TVersion(KMajor, KMinor, KBuild);
-        OstTraceExt1( TRACE_BORDER, CHELLOTRACEDLL_VERSION_DUP2, "CHelloTraceInterface::Version = %S", version.Name());   
-        return version;
-        }
-
- inline EXPORT_C const TPtrC CHelloTraceInterface::StringDup2() const
-        {
-        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
-
-        OstTraceDefExt2( OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CHELLOTRACEDLL_STRING_DUP2, 
-                         "[0x%08x] Returned %S", (TUint32) this, *iString);   
-        return *iString;
-        }
-
- inline EXPORT_C void CHelloTraceInterface::AddCharDup2L(const TChar& aChar)
-        {
-        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
-
-        OstTraceExt3( TRACE_BORDER, CHELLOTRACEDLL_ADDCHARL_DUP2, 
-                      "[0x%08x] Adding %d to %S", (TUint32) this, (TInt32) aChar, *iString);   
-        if (iString->Length() >= KHelloTraceDllBufferLength)
-            {
-            OstTrace1( TRACE_ERROR, CHELLOTRACEDLL_ADDCHARL_ERR_DUP2,
-                       "[0x%08x] Not enough space to add character", (TUint32) this);
-            User::Leave( KErrTooBig);
-            }
-        iString->Append(aChar);
-        }
-
- inline EXPORT_C void CHelloTraceInterface::RemoveLastDup2()
-        {
-        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
-
-        OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_REMOVELAST_DUP2, 
-                      "[0x%08x] Attempting to remove last character from %S", (TUint32) this, *iString);
-        if (iString->Length() > 0)
-            {
-            iString->SetLength(iString->Length() - 1);
-            }
-        else
-            {
-            OstTrace1( TRACE_WARNING, CHELLOTRACEDLL_REMOVELAST_WARN_DUP2, "[0x%08x] String already empty", (TUint32) this);   
-            }
-        }
-
- inline EXPORT_C void CHelloTraceInterface::ResetStringDup2()
-        {
-        OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_RESETSTRING_DUP2, "[0x%08x] Reseting string %S", (TUint32) this, *iString);
-        if (iString == NULL)
-            {
-            iString = new (ELeave) THelloTraceDllExampleString;
-            }
-        else
-            {
-            iString->SetLength(0);
-            }
-        }
-#endif  // __HELLOTRACEINTERFACEDUP2_H__
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/dll/incDup/HelloTraceTypesDup.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,75 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef __HELLOTRACETYPESDUP_H__
-#define __HELLOTRACETYPESDUP_H__
-
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTraceTypesDupTraces.h"
-#endif
-
-inline void HelloTraceTypes::SignedIntegersDup()
-    {
-    TInt8  eightBit     = - (TInt8)  1 << 6;
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP_8, 
-                  "8 bit signed: %hhd", eightBit );
-    
-    TInt16 sixteenBit   = - (TInt16) 1 << 14; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP_16, 
-                  "16 bit signed: %hd", sixteenBit );
-
-    TInt32 thirtyTwoBit = - (TInt32) 1 << 30; 
-    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP_32, 
-               "32 bit signed: %d", thirtyTwoBit );
-
-    TInt64 sixtyFourBit = - (TInt64) 1 << 62; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP_64, 
-                  "64 bit signed: %Ld", sixtyFourBit );
-    }
-
-inline void HelloTraceTypes::UnsignedIntegersDup()
-    {
-    TUint8  eightBit     = (TUint8)  1 << 6;
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP_8, 
-                  "8 bit unsigned: %hhu", eightBit );
-    
-    TUint16 sixteenBit   = (TUint16) 1 << 14; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP_16, 
-                  "16 bit unsigned: %hu", sixteenBit );
-
-    TUint32 thirtyTwoBit = (TUint32) 1 << 30; 
-    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP_32, 
-               "32 bit unsigned: %u", thirtyTwoBit );
-
-    TUint64 sixtyFourBit = (TUint64) 1 << 62; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP_64, 
-                  "64 bit unsigned: %Lu", sixtyFourBit );
-    }
-
-inline void HelloTraceTypes::DescriptorsDup()
-    {
-    _LIT8(KAscii, "Some ASCII text");
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_ASCIIDUP, "8 bit descriptor: %s", KAscii() );
-
-    _LIT16(KUnicode, "Some unicode text");    
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNICODEDUP, "16 bit descriptor: %S", KUnicode() );
-    }
-
-#endif  // __HELLOTRACETYPESDUP_H__
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/dll/incDup/HelloTraceTypesDup2.inl	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,75 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef __HELLOTRACETYPESDUP2_H__
-#define __HELLOTRACETYPESDUP2_H__
-
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTraceTypesDup2Traces.h"
-#endif
-
-inline void HelloTraceTypes::SignedIntegersDup2()
-    {
-    TInt8  eightBit     = - (TInt8)  1 << 6;
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP2_8, 
-                  "8 bit signed: %hhd", eightBit );
-    
-    TInt16 sixteenBit   = - (TInt16) 1 << 14; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP2_16, 
-                  "16 bit signed: %hd", sixteenBit );
-
-    TInt32 thirtyTwoBit = - (TInt32) 1 << 30; 
-    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP2_32, 
-               "32 bit signed: %d", thirtyTwoBit );
-
-    TInt64 sixtyFourBit = - (TInt64) 1 << 62; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP2_64, 
-                  "64 bit signed: %Ld", sixtyFourBit );
-    }
-
-inline void HelloTraceTypes::UnsignedIntegersDup2()
-    {
-    TUint8  eightBit     = (TUint8)  1 << 6;
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP2_8, 
-                  "8 bit unsigned: %hhu", eightBit );
-    
-    TUint16 sixteenBit   = (TUint16) 1 << 14; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP2_16, 
-                  "16 bit unsigned: %hu", sixteenBit );
-
-    TUint32 thirtyTwoBit = (TUint32) 1 << 30; 
-    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP2_32, 
-               "32 bit unsigned: %u", thirtyTwoBit );
-
-    TUint64 sixtyFourBit = (TUint64) 1 << 62; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP2_64, 
-                  "64 bit unsigned: %Lu", sixtyFourBit );
-    }
-
-inline void HelloTraceTypes::DescriptorsDup2()
-    {
-    _LIT8(KAscii, "Some ASCII text");
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_ASCIIDUP2, "8 bit descriptor: %s", KAscii() );
-
-    _LIT16(KUnicode, "Some unicode text");    
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNICODEDUP2, "16 bit descriptor: %S", KUnicode() );
-    }
-
-#endif  // __HELLOTRACETYPESDUP2_H__
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/dll/src/HelloTraceExample.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,106 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-
-#include "HelloTraceExample.h"
-#include "HelloTraceTypes.h"
-#include "HelloTraceInterface.h"
-#include "HelloTraceFn.h"
-#include "HelloTracePanic.h"
-
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTraceExampleTraces.h"
-#endif
-
-EXPORT_C void HelloTraceExample::JustTypes()
-    {
-    OstTrace0( TRACE_EXAMPLE, HELLOTRACEEXAMPLE_JUSTTYPES, "*********************************************** " );
-    
-    HelloTraceTypes::SignedIntegers();
-    HelloTraceTypes::UnsignedIntegers();
-    HelloTraceTypes::Descriptors();    
-    }
-
-EXPORT_C void HelloTraceExample::Interface()
-    {
-    OstTrace0( TRACE_EXAMPLE, HELLOTRACEEXAMPLE_INTERFACE, "*********************************************** " );
-    
-    TVersion version = CHelloTraceInterface::Version();   
-    if (version.iMajor >= 1) 
-        {
-        CHelloTraceInterface* example = CHelloTraceInterface::NewLC();
-        example->AddCharL('H');
-        example->AddCharL('e');
-        example->AddCharL('l');
-        example->AddCharL('l');
-        example->AddCharL('o');
-        example->AddCharL('T');        
-        example->RemoveLast();        
-        example->AddCharL(' ');
-        example->AddCharL('T');
-        example->AddCharL('r');
-        example->AddCharL('a');
-        example->AddCharL('c');
-        example->AddCharL('e');
-        example->AddCharL('!');
-        CleanupStack::PopAndDestroy(example);
-        }
-    else
-        {
-        OstTrace0( TRACE_ERROR, HELLOTRACEEXAMPLE_UNSUPPORTED_VERSION, "Unsupported version!");
-        }
-    }
-
-EXPORT_C void HelloTraceExample::FnEntryExit()
-    {
-    OstTrace0( TRACE_EXAMPLE, HELLOTRACEEXAMPLE_FNENTRYEXIT, "*********************************************** " );
-       
-    CHelloTraceFn* example = CHelloTraceFn::NewLC();
-    CIdle* idle = CIdle::NewL(CActive::EPriorityIdle);
-    CleanupStack::PushL(idle);
-
-    CHelloTraceFn::StaticOutputsParamsL(1);
-   
-    example->Simple();
-    example->OutputsParams(2, CHelloTraceFn::EExample1);
-    example->OutputsParams(3, CHelloTraceFn::EExample2);
-    example->OutputsSignedIntegers(-4, -5, -6, -7);
-    example->OutputsUnsignedIntegers(8, 9, 10, 11);
-    example->OutputsTIntReturnValue();    
-    example->OutputsTInt64ReturnValue(); 
-    example->OutputsTFnEnumReturnValue();
-    example->OutputsUnknownPtrType(idle);    
-    example->OutputsUnknownRefType(*idle);
-#ifdef _DEBUG
-    example->PreProcessedFn(12);
-#else
-    example->PreProcessedFn();
-#endif
-    example->OutputMissingParams(13, 14, 15);
-
-    CleanupStack::PopAndDestroy(idle);
-    CleanupStack::PopAndDestroy(example);
-    }
-
-EXPORT_C void HelloTraceExample::PanicTrace()
-    {
-    OstTrace0( TRACE_EXAMPLE, HELLOTRACEEXAMPLE_PANIC, "*********************************************** " );
-
-    Panic(EHelloTraceDllExamplePanic);
-    }
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/dll/src/HelloTraceFn.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,183 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
- 
-#include "HelloTraceFn.h"
-#include "HelloTraceFnDup.h"
-#include "HelloTraceFnDup2.inl"
-#include "HelloTracePanic.h"
-
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTraceFnTraces.h"
-#endif
-
-CHelloTraceFn* CHelloTraceFn::NewLC()
-    {
-    CHelloTraceFn* self = new (ELeave) CHelloTraceFn;
-    CleanupStack::PushL(self);
-    return self;
-    }
-
-CHelloTraceFn* CHelloTraceFn::NewL()
-    {
-    CHelloTraceFn* self = CHelloTraceFn::NewLC();
-    CleanupStack::Pop(self);
-    return self;
-    }
-
-CHelloTraceFn::CHelloTraceFn()
-    {
-    OstTrace1( TRACE_NORMAL, CHELLOTRACEFN_CHELLOTRACEFN_CTOR, "[0x%08x] Constructor", this );    
-    }
-
-CHelloTraceFn::~CHelloTraceFn()
-    {
-    OstTrace1( TRACE_NORMAL, CHELLOTRACEFN_CHELLOTRACEFN_DTOR, "[0x%08x] Destructor", this );    
-    }
-
-void CHelloTraceFn::Simple()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_SIMPLE_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_SIMPLE_EXIT, this );
-    }
-
-void CHelloTraceFn::OutputsParams(TInt aParam, TFnEnum aEnumParam)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSPARAMS_ENTRY, this );
-    Simple();
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSPARAMS_EXIT, this );
-    }
-
-void CHelloTraceFn::StaticOutputsParamsL(TInt aParam)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_STATICOUTPUTSPARAMS_ENTRY, NULL );
-    CHelloTraceFn* example = CHelloTraceFn::NewLC();
-    example->Simple();    
-    CleanupStack::PopAndDestroy(example);
-    OstTraceFunctionExit0( CHELLOTRACEFN_STATICOUTPUTSPARAMS_EXIT );    
-    }
-
-void CHelloTraceFn::OutputsSignedIntegers(TInt8 aParam8,   TInt16 aParam16, 
-                                          TInt32 aParam32, TInt64 aParam64)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS_EXIT, this );
-    }
-
-void CHelloTraceFn::OutputsUnsignedIntegers(TUint8 aParam8,   TUint16 aParam16, 
-                                            TUint32 aParam32, TUint64 aParam64)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS_EXIT, this );
-    }
-
-
-TInt CHelloTraceFn::OutputsTIntReturnValue()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_ENTRY, this );
-    TInt ret = KErrNone;
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_EXIT, this, ret );
-    return ret;
-    }
-
-TInt64 CHelloTraceFn::OutputsTInt64ReturnValue()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE_ENTRY, this );
-    TInt64 ret = (TInt64) 2 << 40;
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE_EXIT, this, ret );
-    return ret;
-    }
-
-CHelloTraceFn::TFnEnum CHelloTraceFn::OutputsTFnEnumReturnValue()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE_ENTRY, this );
-    TFnEnum ret = EExample1;
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE_EXIT, this, ret );
-    return ret;    
-    }
-
-CActive* CHelloTraceFn::OutputsUnknownPtrType(CActive* aActive)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_ENTRY, this );    
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_EXIT, this, (TUint) aActive );
-    return aActive;
-    }
-
-CActive& CHelloTraceFn::OutputsUnknownRefType(CActive& aActive)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE_ENTRY, this );
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE_EXIT, this, (TUint) &aActive );    
-    return aActive;
-    }
-
-// The following doesn't compile as the Trace Compiler doesn't generate
-// the correct OstTraceGenExt(...) function for it
-//void CHelloTraceFn::OutputMissingParamsBug(TInt /*aCommentParam*/, TInt)
-//    {
-//    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_ENTRY, this );
-//    // ...
-//    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_EXIT, this );    
-//    }
-
-// The following compiles and works but outputs the following warning
-// warning: HelloTraceFn.cpp, line xxx: Parameter did not have a name and was not added to trace
-// The fact that this cannot be suppressed is a known problem we're working on.
-void CHelloTraceFn::OutputMissingParams(TInt aUsedParam, TInt /*aCommentParam*/, TInt)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMS_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMS_EXIT, this );
-    }
-
-// The following doesn't work as the Trace Compiler outputs:
-// error: HelloTraceFn.cpp, line xxx: Class / function name for trace could not be determined x3
-//#ifdef _DEBUG
-//void CHelloTraceFn::PreProcessedFn(TInt aDbgParam)
-//    {
-//    OstTraceFunctionEntryExt( PRE_PROCESSED_ENTRTY_1, this );
-//#else
-//void CHelloTraceFn::PreProcessedFn()
-//    {
-//    OstTraceFunctionEntry1( PRE_PROCESSED_ENTRTY_2, this );
-//#endif
-//    Simple();
-//    OstTraceFunctionExit1( CHELLOTRACEFN_PREPROCESSEDFN_EXIT, this );
-//    }
-
-// Workaround example code until a proper fix is provided
-#ifdef _DEBUG
-void CHelloTraceFn::PreProcessedFn(TInt aDbgParam)
-    {
-    OstTraceExt2( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_ENTRY_1, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;aDbgParam=%d;this=%x", (TInt) aDbgParam, (TUint) this);
-#else
-void CHelloTraceFn::PreProcessedFn()
-    {
-    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_ENTRY_2, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
-#endif
-    Simple();
-    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_EXIT, "CHelloTraceFn::PreProcessedFn: < CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
-    }
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/dll/src/HelloTraceInterface.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,121 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-
-#include "HelloTraceInterface.h"
-#include "HelloTraceInterfaceDup.h"
-#include "HelloTraceInterfaceDup2.inl"
-#include "HelloTracePanic.h"
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTraceInterfaceTraces.h"
-#endif
-
-EXPORT_C CHelloTraceInterface* CHelloTraceInterface::NewLC()
-    {
-    CHelloTraceInterface* self = new (ELeave) CHelloTraceInterface;
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    return self;
-    }
-
-EXPORT_C CHelloTraceInterface* CHelloTraceInterface::NewL()
-    {
-    CHelloTraceInterface* self = CHelloTraceInterface::NewLC();
-    CleanupStack::Pop(self);
-    return self;
-    }
-
-CHelloTraceInterface::CHelloTraceInterface()
-    {
-    OstTrace1( TRACE_NORMAL, CHELLOTRACEDLL_CHELLOTRACEDLL_CTOR, "[0x%08x]", (TUint32) this );    
-    }
-
-void CHelloTraceInterface::ConstructL()
-    {
-    iString = new (ELeave) THelloTraceDllExampleString;
-    }
-
-EXPORT_C CHelloTraceInterface::~CHelloTraceInterface()
-    {
-    delete iString;
-    OstTrace1( TRACE_NORMAL, CHELLOTRACEDLL_CHELLOTRACEDLL_DTOR, "[0x%08x]", (TUint32) this );    
-    }
-
-EXPORT_C TVersion CHelloTraceInterface::Version()
-    {
-    const TInt KMajor = 1;
-    const TInt KMinor = 0;
-    const TInt KBuild = 1;
-    TVersion version = TVersion(KMajor, KMinor, KBuild);
-    OstTraceExt1( TRACE_BORDER, CHELLOTRACEDLL_VERSION, "CHelloTraceInterface::Version = %S", version.Name());   
-    return version;
-    }
-
-EXPORT_C const TPtrC CHelloTraceInterface::String() const
-    {
-    __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
-
-    OstTraceDefExt2( OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CHELLOTRACEDLL_STRING, 
-                     "[0x%08x] Returned %S", (TUint32) this, *iString);   
-    return *iString;
-    }
-
-EXPORT_C void CHelloTraceInterface::AddCharL(const TChar& aChar)
-    {
-    __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
-
-    OstTraceExt3( TRACE_BORDER, CHELLOTRACEDLL_ADDCHARL, 
-                  "[0x%08x] Adding %d to %S", (TUint32) this, (TInt32) aChar, *iString);   
-    if (iString->Length() >= KHelloTraceDllBufferLength)
-        {
-        OstTrace1( TRACE_ERROR, CHELLOTRACEDLL_ADDCHARL_ERR,
-                   "[0x%08x] Not enough space to add character", (TUint32) this);
-        User::Leave( KErrTooBig);
-        }
-    iString->Append(aChar);
-    }
-
-EXPORT_C void CHelloTraceInterface::RemoveLast()
-    {
-    __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
-
-    OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_REMOVELAST, 
-                  "[0x%08x] Attempting to remove last character from %S", (TUint32) this, *iString);
-    if (iString->Length() > 0)
-        {
-        iString->SetLength(iString->Length() - 1);
-        }
-    else
-        {
-        OstTrace1( TRACE_WARNING, CHELLOTRACEDLL_REMOVELAST_WARN, "[0x%08x] String already empty", (TUint32) this);   
-        }
-    }
-
-EXPORT_C void CHelloTraceInterface::ResetString()
-    {
-    OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_RESETSTRING, "[0x%08x] Reseting string %S", (TUint32) this, *iString);
-    if (iString == NULL)
-        {
-        iString = new (ELeave) THelloTraceDllExampleString;
-        }
-    else
-        {
-        iString->SetLength(0);
-        }
-    }
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/dll/src/HelloTracePanic.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#include <e32std.h>		 // GLDEF_C
-
-#include "HelloTracePanic.h"
-
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTracePanicTraces.h"
-#endif
-
-GLDEF_C void Panic(THelloTraceDllPanic aPanic)
-    {
-    OstTrace1( TRACE_FATAL, PANIC, "Panic(%{THelloTraceDllPanic})", (TUint) aPanic );    
-    User::Panic(_L("HelloTraceDll"), aPanic);
-    }
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/dll/src/HelloTraceTypes.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,76 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-
-#include <e32std.h>
-
-#include "HelloTraceTypes.h"
-#include "HelloTraceTypesDup.h"
-#include "HelloTraceTypesDup2.inl"
-
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTraceTypesTraces.h"
-#endif
-
-void HelloTraceTypes::SignedIntegers()
-    {
-    TInt8  eightBit     = - (TInt8)  1 << 6;
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS_8, 
-                  "8 bit signed: %hhd", eightBit );
-    
-    TInt16 sixteenBit   = - (TInt16) 1 << 14; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS_16, 
-                  "16 bit signed: %hd", sixteenBit );
-
-    TInt32 thirtyTwoBit = - (TInt32) 1 << 30; 
-    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS_32, 
-               "32 bit signed: %d", thirtyTwoBit );
-
-    TInt64 sixtyFourBit = - (TInt64) 1 << 62; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS_64, 
-                  "64 bit signed: %Ld", sixtyFourBit );
-    }
-
-void HelloTraceTypes::UnsignedIntegers()
-    {
-    TUint8  eightBit     = (TUint8)  1 << 6;
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS_8, 
-                  "8 bit unsigned: %hhu", eightBit );
-    
-    TUint16 sixteenBit   = (TUint16) 1 << 14; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS_16, 
-                  "16 bit unsigned: %hu", sixteenBit );
-
-    TUint32 thirtyTwoBit = (TUint32) 1 << 30; 
-    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS_32, 
-               "32 bit unsigned: %u", thirtyTwoBit );
-
-    TUint64 sixtyFourBit = (TUint64) 1 << 62; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS_64, 
-                  "64 bit unsigned: %Lu", sixtyFourBit );
-    }
-
-void HelloTraceTypes::Descriptors()
-    {
-    _LIT8(KAscii, "Some ASCII text");
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_ASCII, "8 bit descriptor: %s", KAscii() );
-
-    _LIT16(KUnicode, "Some unicode text");    
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNICODE, "16 bit descriptor: %S", KUnicode() );
-    }
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/dll/traces/hellotracedll_dll/trace.properties	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<trace_properties>
-<enum name="TFnEnum">
-<value id="0">EExample1</value>
-<value id="2">EExample2</value>
-</enum>
-<enum name="THelloTraceDllPanic">
-<value id="0">EHelloTraceDllExamplePanic</value>
-<value id="1">EHelloTraceDllNullPointer</value>
-</enum>
-<file>../../incDup/HelloTraceInterfaceDup.h</file>
-<file>../../incDup/HelloTraceInterfaceDup2.inl</file>
-<file>../../incDup/HelloTraceFnDup.h</file>
-<file>../../incDup/HelloTraceFnDup2.inl</file>
-<file>../../incDup/HelloTraceTypesDup.h</file>
-<file>../../incDup/HelloTraceTypesDup2.inl</file>
-</trace_properties>
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/group/bld.inf	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,19 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-#include "../dll/group/bld.inf"
-#include "../console/group/bld.inf"
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_import/console/group/HelloTraceConsole.mmp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-
-TARGET		  HelloTraceConsole.exe
-TARGETTYPE	  exe
-UID			  0 0xE40349E4
-
-OS_LAYER_SYSTEMINCLUDE
-USERINCLUDE	   ../inc
-USERINCLUDE    ../../dll/inc
-USERINCLUDE    ../traces
-
-SOURCEPATH	  ../src
-SOURCE		  HelloTraceConsole.cpp
-
-LIBRARY		  euser.lib
-LIBRARY       HelloTraceDll.lib
-
-#ifdef ENABLE_ABIV2_MODE
-DEBUGGABLE_UDEBONLY
-#endif
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_import/console/group/bld.inf	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-
-PRJ_PLATFORMS
-DEFAULT
-
-PRJ_EXPORTS
-hellotraceconsole.iby             CORE_OS_LAYER_IBY_EXPORT_PATH(hellotraceconsole.iby)
-
-PRJ_MMPFILES
-HelloTraceConsole.mmp
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_import/console/group/hellotraceconsole.iby	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,24 +0,0 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "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:
-//
-// Description:
-// ROM build file for tracecore project
-
-#ifndef HELLOTRACECONSOLE_IBY
-#define HELLOTRACECONSOLE_IBY
-
-#include <core\os\hellotracedll.iby>
-
-file=ABI_DIR\BUILD_DIR\hellotraceconsole.exe    Sys\Bin\hellotraceconsole.exe
-
-#endif //HELLOTRACECONSOLE_IBY
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_import/console/inc/HelloTraceConsole.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef __HELLOTRACECONSOLE_H__
-#define __HELLOTRACECONSOLE_H__
-
-//  Include Files
-
-#include <e32base.h>
-
-//  Function Prototypes
-
-GLDEF_C TInt E32Main();
-
-#endif  // __HELLOTRACECONSOLE_H__
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_import/console/src/HelloTraceConsole.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,124 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#include <e32cons.h>			// Console
-
-#include "HelloTraceConsole.h"
-#include "HelloTraceExample.h"
-
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTraceConsoleTraces.h"
-#endif
-
-
-_LIT(KTextConsoleTitle, "HelloTrace");
-_LIT(KTextPressAnyKey, " [press any key]\n");
-
-LOCAL_D CConsoleBase* console; // write all messages to this
-
-LOCAL_C void DoExamples()
-    {
-    TInt err = KErrNone;
-
-    console->Printf(_L("Before main tracing examples ...\n"));
-
-    console->Printf(_L(" Before type examples ..."));
-    console->Printf(KTextPressAnyKey);
-    console->Getch();
-    TRAP(err, HelloTraceExample::JustTypes());    
-    if (err)
-        console->Printf(_L(" Failed with error %d\n"), err);
-
-    console->Printf(_L(" Before Interface examples ..."));
-    console->Printf(KTextPressAnyKey);
-    console->Getch();
-    TRAP(err, HelloTraceExample::Interface());    
-    if (err)
-        console->Printf(_L(" Failed with error %d\n"), err);
-    
-    console->Printf(_L(" Before FnEntryExit examples ..."));
-    console->Printf(KTextPressAnyKey);
-    console->Getch();
-    TRAP(err, HelloTraceExample::FnEntryExit());    
-    if (err)
-        console->Printf(_L(" Failed with error %d\n"), err);    
-    }
-
-LOCAL_C void DoStartL()
-    {
-    // Create active scheduler (to run active objects)
-    CActiveScheduler* scheduler = new (ELeave) CActiveScheduler();
-    CleanupStack::PushL(scheduler);
-    CActiveScheduler::Install(scheduler);
-
-    DoExamples();
-    
-    // Delete active scheduler
-    CleanupStack::PopAndDestroy(scheduler);
-    }
-
-//  Global Functions
-
-GLDEF_C TInt E32Main()
-    {
-    OstTraceFunctionEntry0( E32MAIN_ENTRY );
-    
-    // Create cleanup stack
-    __UHEAP_MARK;
-    CTrapCleanup* cleanup = CTrapCleanup::New();
-
-    // Create output console
-    TRAPD(createError, 
-          console = Console::NewL(KTextConsoleTitle, 
-                                  TSize(KConsFullScreen, KConsFullScreen)));    
-    if (createError)
-        {
-        delete cleanup;
-        OstTrace1( TRACE_ERROR, E32MAIN_CREATE_ERROR, "Failed to create console error: %d", createError);
-        OstTraceFunctionExit0( E32MAIN_EXIT_ERR );
-        return createError;
-        }
-
-    TRAPD(mainError, DoStartL());    
-    if (mainError)
-        {
-        OstTrace1( TRACE_ERROR, E32MAIN_START_ERROR, "DoStartL failed with error: %d", mainError);
-        console->Printf(_L("DoStartL failed with error: %d\n\n"), mainError);
-        }
-    else 
-        {
-        console->Printf(_L("Before panic tracing example ..."));
-        console->Printf(KTextPressAnyKey);
-        console->Getch();
-    
-        OstTrace0( TRACE_FLOW, E32MAIN_BEFORE_PANIC, "About to cause a panic ..." );
-        HelloTraceExample::PanicTrace();
-        
-        console->Printf(KTextPressAnyKey);
-        console->Getch();
-        }
-
-    delete console;
-    delete cleanup;
-    __UHEAP_MARKEND;
-    
-    OstTraceFunctionExit0( E32MAIN_EXIT );
-    return KErrNone;
-    }
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_import/dll/bwins/HelloTraceDllu.def	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,14 +0,0 @@
-EXPORTS
-	?Version@CHelloTraceInterface@@SA?AVTVersion@@XZ @ 1 NONAME ; class TVersion CHelloTraceInterface::Version(void)
-	?NewLC@CHelloTraceInterface@@SAPAV1@XZ @ 2 NONAME ; class CHelloTraceInterface * CHelloTraceInterface::NewLC(void)
-	?JustTypes@HelloTraceExample@@SAXXZ @ 3 NONAME ; void HelloTraceExample::JustTypes(void)
-	?Interface@HelloTraceExample@@SAXXZ @ 4 NONAME ; void HelloTraceExample::Interface(void)
-	?FnEntryExit@HelloTraceExample@@SAXXZ @ 5 NONAME ; void HelloTraceExample::FnEntryExit(void)
-	?ResetString@CHelloTraceInterface@@QAEXXZ @ 6 NONAME ; void CHelloTraceInterface::ResetString(void)
-	?AddCharL@CHelloTraceInterface@@QAEXABVTChar@@@Z @ 7 NONAME ; void CHelloTraceInterface::AddCharL(class TChar const &)
-	?PanicTrace@HelloTraceExample@@SAXXZ @ 8 NONAME ; void HelloTraceExample::PanicTrace(void)
-	??1CHelloTraceInterface@@UAE@XZ @ 9 NONAME ; CHelloTraceInterface::~CHelloTraceInterface(void)
-	?String@CHelloTraceInterface@@QBE?BVTPtrC16@@XZ @ 10 NONAME ; class TPtrC16 const CHelloTraceInterface::String(void) const
-	?RemoveLast@CHelloTraceInterface@@QAEXXZ @ 11 NONAME ; void CHelloTraceInterface::RemoveLast(void)
-	?NewL@CHelloTraceInterface@@SAPAV1@XZ @ 12 NONAME ; class CHelloTraceInterface * CHelloTraceInterface::NewL(void)
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_import/dll/eabi/HelloTraceDllu.def	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,20 +0,0 @@
-EXPORTS
-	_ZN17HelloTraceExample10PanicTraceEv @ 1 NONAME
-	_ZN17HelloTraceExample11FnEntryExitEv @ 2 NONAME
-	_ZN17HelloTraceExample9InterfaceEv @ 3 NONAME
-	_ZN17HelloTraceExample9JustTypesEv @ 4 NONAME
-	_ZN20CHelloTraceInterface10RemoveLastEv @ 5 NONAME
-	_ZN20CHelloTraceInterface11ResetStringEv @ 6 NONAME
-	_ZN20CHelloTraceInterface4NewLEv @ 7 NONAME
-	_ZN20CHelloTraceInterface5NewLCEv @ 8 NONAME
-	_ZN20CHelloTraceInterface7VersionEv @ 9 NONAME
-	_ZN20CHelloTraceInterface8AddCharLERK5TChar @ 10 NONAME
-	_ZN20CHelloTraceInterfaceD0Ev @ 11 NONAME
-	_ZN20CHelloTraceInterfaceD1Ev @ 12 NONAME
-	_ZN20CHelloTraceInterfaceD2Ev @ 13 NONAME
-	_ZNK20CHelloTraceInterface6StringEv @ 14 NONAME
-	_ZTI13CHelloTraceFn @ 15 NONAME
-	_ZTI20CHelloTraceInterface @ 16 NONAME
-	_ZTV13CHelloTraceFn @ 17 NONAME
-	_ZTV20CHelloTraceInterface @ 18 NONAME
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_import/dll/group/HelloTraceDll.mmp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-
-TARGET		  HelloTraceDll.dll
-TARGETTYPE	  dll
-UID			  0x1000008d 0xE43DF43E
-CAPABILITY    ReadUserData
-
-OS_LAYER_SYSTEMINCLUDE
-USERINCLUDE  ../inc ../incDup
-USERINCLUDE  ../traces
-
-SOURCEPATH	 ../src
-SOURCE       HelloTraceExample.cpp 
-SOURCE       HelloTraceTypes.cpp
-SOURCE       HelloTraceInterface.cpp 
-SOURCE       HelloTraceFn.cpp 
-SOURCE       HelloTracePanic.cpp 
-
-LIBRARY		 euser.lib
-
-#ifdef ENABLE_ABIV2_MODE
-DEBUGGABLE_UDEBONLY
-#endif
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_import/dll/group/bld.inf	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-
-PRJ_PLATFORMS
-DEFAULT
-
-PRJ_EXPORTS
-hellotracedll.iby             CORE_OS_LAYER_IBY_EXPORT_PATH(hellotracedll.iby)
-
-PRJ_MMPFILES
-HelloTraceDll.mmp
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_import/dll/group/hellotracedll.iby	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,22 +0,0 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "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:
-//
-// Description:
-// ROM build file for tracecore project
-
-#ifndef HELLOTRACEDLL_IBY
-#define HELLOTRACEDLL_IBY
-
-file=ABI_DIR\BUILD_DIR\hellotracedll.dll        Sys\Bin\hellotracedll.dll
-
-#endif //HELLOTRACEDLL_IBY
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_import/dll/inc/HelloTraceExample.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef __HELLOTRACEEXAMPLE_H__
-#define __HELLOTRACEEXAMPLE_H__
-
-#include <e32std.h>
-
-class HelloTraceExample
-    {
-public:
-    IMPORT_C static void JustTypes();    
-    IMPORT_C static void Interface();    
-    IMPORT_C static void FnEntryExit();    
-    IMPORT_C static void PanicTrace();    
-
-    // @TODO add examples for state macros
-    // @TODO add examples for event macros
-    // @TODO add examples for OstTraceData
-    // @TODO add compile-time selector examples
-    // @TODO add macro wrapper examples
-    };
-
-#endif  // __HELLOTRACEEXAMPLE_H__
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_import/dll/inc/HelloTraceInterface.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,63 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef __HELLOTRACEINTERFACE_H__
-#define __HELLOTRACEINTERFACE_H__
-
-#include <e32base.h>	// CBase
-#include <e32std.h>	 // TBuf
-
-const TInt KHelloTraceDllBufferLength = 10;
-typedef TBuf<KHelloTraceDllBufferLength> THelloTraceDllExampleString;
-
-class CHelloTraceInterface : public CBase
-    {
-public:
-    IMPORT_C static CHelloTraceInterface* NewL();
-    IMPORT_C static CHelloTraceInterface* NewLC();
-    IMPORT_C ~CHelloTraceInterface();
-
-public:
-    IMPORT_C static TVersion Version();
-    IMPORT_C const TPtrC String() const;
-    IMPORT_C void AddCharL(const TChar& aChar);
-    IMPORT_C void RemoveLast();
-    IMPORT_C void ResetString();
-    
-    IMPORT_C static TVersion VersionDup();
-    IMPORT_C const TPtrC StringDup() const;
-    IMPORT_C void AddCharDupL(const TChar& aChar);
-    IMPORT_C void RemoveLastDup();
-    IMPORT_C void ResetStringDup();
-
-    IMPORT_C static TVersion VersionDup2();
-    IMPORT_C const TPtrC StringDup2() const;
-    IMPORT_C void AddCharDup2L(const TChar& aChar);
-    IMPORT_C void RemoveLastDup2();
-    IMPORT_C void ResetStringDup2();
-private:
-    CHelloTraceInterface();
-    void ConstructL();
-
-private:
-    // data
-    THelloTraceDllExampleString* iString;
-    };
-
-#endif  // __HELLOTRACEINTERFACE_H__
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_import/dll/inc/HelloTracePanic.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef __HELLOTRACEDLL_PAN__
-#define __HELLOTRACEDLL_PAN__
-
-//  Data Types
-
-enum THelloTraceDllPanic
-    {
-    EHelloTraceDllExamplePanic,
-    EHelloTraceDllNullPointer,
-    };
-
-//  Function Prototypes
-
-GLREF_C void Panic(THelloTraceDllPanic aPanic);
-
-#endif  // __HELLOTRACEDLL_PAN__
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_import/dll/inc/HelloTraceTypes.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef __HELLOTRACETYPES_H__
-#define __HELLOTRACETYPES_H__
-
-class HelloTraceTypes
-    {
-public:
-    static void SignedIntegers();
-    static void UnsignedIntegers();
-    static void Descriptors();
-    
-    static void SignedIntegersDup();
-    static void UnsignedIntegersDup();
-    static void DescriptorsDup();
-        
-    static void SignedIntegersDup2();
-    static void UnsignedIntegersDup2();
-    static void DescriptorsDup2();
-    };
-
-#endif  // __HELLOTRACETYPES_H__
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_import/dll/incDup/HelloTraceFnDup.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,157 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef HELLOTRACEFNDUP_H_
-#define HELLOTRACEFNDUP_H_
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTraceFnDupTraces.h"
-#endif
-
-inline void CHelloTraceFn::SimpleDup()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_SIMPLE_DUP_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_SIMPLE_DUP_EXIT, this );
-    }
-
-inline void CHelloTraceFn::OutputsParamsDup(TInt aParam, TFnEnum aEnumParam)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSPARAMS_DUP_ENTRY, this );
-    Simple();
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSPARAMS_DUP_EXIT, this );
-    }
-
-inline void CHelloTraceFn::StaticOutputsParamsDupL(TInt aParam)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_STATICOUTPUTSPARAMS_DUP_ENTRY, NULL );
-    CHelloTraceFn* example = CHelloTraceFn::NewLC();
-    example->SimpleDup();    
-    CleanupStack::PopAndDestroy(example);
-    OstTraceFunctionExit0( CHELLOTRACEFN_STATICOUTPUTSPARAMS_DUP_EXIT );    
-    }
-
-inline void CHelloTraceFn::OutputsSignedIntegersDup(TInt8 aParam8,   TInt16 aParam16, 
-                                          TInt32 aParam32, TInt64 aParam64)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS_DUP_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS_DUP_EXIT, this );
-    }
-
-void CHelloTraceFn::OutputsUnsignedIntegersDup(TUint8 aParam8,   TUint16 aParam16, 
-                                            TUint32 aParam32, TUint64 aParam64)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS_DUP_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS_DUP_EXIT, this );
-    }
-
-
-inline TInt CHelloTraceFn::OutputsTIntReturnValueDup()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_DUP_ENTRY, this );
-    TInt ret = KErrNone;
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_DUP_EXIT, this, ret );
-    return ret;
-    }
-
-inline TInt64 CHelloTraceFn::OutputsTInt64ReturnValueDup()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE_DUP_ENTRY, this );
-    TInt64 ret = (TInt64) 2 << 40;
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE_DUP_EXIT, this, ret );
-    return ret;
-    }
-
-inline CHelloTraceFn::TFnEnum CHelloTraceFn::OutputsTFnEnumReturnValueDup()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE_DUP_ENTRY, this );
-    TFnEnum ret = EExample1;
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE_DUP_EXIT, this, ret );
-    return ret;    
-    }
-
-inline CActive* CHelloTraceFn::OutputsUnknownPtrTypeDup(CActive* aActive)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_DUP_ENTRY, this );    
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_DUP_EXIT, this, (TUint) aActive );
-    return aActive;
-    }
-
-inline CActive& CHelloTraceFn::OutputsUnknownRefTypeDup(CActive& aActive)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE_DUP_ENTRY, this );
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE_DUP_EXIT, this, (TUint) &aActive );    
-    return aActive;
-    }
-
-// The following doesn't compile as the Trace Compiler doesn't generate
-// the correct OstTraceGenExt(...) function for it
-//void CHelloTraceFn::OutputMissingParamsBug(TInt /*aCommentParam*/, TInt)
-//    {
-//    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_ENTRY, this );
-//    // ...
-//    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_EXIT, this );    
-//    }
-
-// The following compiles and works but outputs the following warning
-// warning: HelloTraceFn.cpp, line xxx: Parameter did not have a name and was not added to trace
-// The fact that this cannot be suppressed is a known problem we're working on.
-inline void CHelloTraceFn::OutputMissingParamsDup(TInt aUsedParam, TInt /*aCommentParam*/, TInt)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMS_DUP_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMS_DUP_EXIT, this );
-    }
-
-// The following doesn't work as the Trace Compiler outputs:
-// error: HelloTraceFn.cpp, line xxx: Class / function name for trace could not be determined x3
-//#ifdef _DEBUG
-//void CHelloTraceFn::PreProcessedFn(TInt aDbgParam)
-//    {
-//    OstTraceFunctionEntryExt( PRE_PROCESSED_ENTRTY_1, this );
-//#else
-//void CHelloTraceFn::PreProcessedFn()
-//    {
-//    OstTraceFunctionEntry1( PRE_PROCESSED_ENTRTY_2, this );
-//#endif
-//    Simple();
-//    OstTraceFunctionExit1( CHELLOTRACEFN_PREPROCESSEDFN_EXIT, this );
-//    }
-
-// Workaround example code until a proper fix is provided
-#ifdef _DEBUG
-inline void CHelloTraceFn::PreProcessedFnDup(TInt aDbgParam)
-    {
-    OstTraceExt2( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_DUP_ENTRY_1, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;aDbgParam=%d;this=%x", (TInt) aDbgParam, (TUint) this);
-#else
-    inline void CHelloTraceFn::PreProcessedFnDup()
-    {
-    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_DUP_ENTRY_2, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
-#endif
-    SimpleDup();
-    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_DUP_EXIT, "CHelloTraceFn::PreProcessedFn: < CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
-    }
-
-#endif /* HELLOTRACEFNDUP_H_ */
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_import/dll/incDup/HelloTraceFnDup2.inl	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,157 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef HELLOTRACEFNDUP2_H_
-#define HELLOTRACEFNDUP2_H_
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTraceFnDup2Traces.h"
-#endif
-
-inline void CHelloTraceFn::SimpleDup2()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_SIMPLE_DUP2_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_SIMPLE_DUP2_EXIT, this );
-    }
-
-inline void CHelloTraceFn::OutputsParamsDup2(TInt aParam, TFnEnum aEnumParam)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSPARAMS_DUP2_ENTRY, this );
-    Simple();
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSPARAMS_DUP2_EXIT, this );
-    }
-
-inline void CHelloTraceFn::StaticOutputsParamsDup2L(TInt aParam)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_STATICOUTPUTSPARAMS_DUP2_ENTRY, NULL );
-    CHelloTraceFn* example = CHelloTraceFn::NewLC();
-    example->SimpleDup2();    
-    CleanupStack::PopAndDestroy(example);
-    OstTraceFunctionExit0( CHELLOTRACEFN_STATICOUTPUTSPARAMS_DUP2_EXIT );    
-    }
-
-inline void CHelloTraceFn::OutputsSignedIntegersDup2(TInt8 aParam8,   TInt16 aParam16, 
-                                          TInt32 aParam32, TInt64 aParam64)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS_DUP2_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS_DUP2_EXIT, this );
-    }
-
-inline void CHelloTraceFn::OutputsUnsignedIntegersDup2(TUint8 aParam8,   TUint16 aParam16, 
-                                            TUint32 aParam32, TUint64 aParam64)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS_DUP2_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS_DUP2_EXIT, this );
-    }
-
-
-inline TInt CHelloTraceFn::OutputsTIntReturnValueDup2()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_DUP2_ENTRY, this );
-    TInt ret = KErrNone;
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_DUP2_EXIT, this, ret );
-    return ret;
-    }
-
-inline TInt64 CHelloTraceFn::OutputsTInt64ReturnValueDup2()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE_DUP2_ENTRY, this );
-    TInt64 ret = (TInt64) 2 << 40;
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE_DUP2_EXIT, this, ret );
-    return ret;
-    }
-
-inline CHelloTraceFn::TFnEnum CHelloTraceFn::OutputsTFnEnumReturnValueDup2()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE_DUP2_ENTRY, this );
-    TFnEnum ret = EExample1;
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE_DUP2_EXIT, this, ret );
-    return ret;    
-    }
-
-inline CActive* CHelloTraceFn::OutputsUnknownPtrTypeDup2(CActive* aActive)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_DUP2_ENTRY, this );    
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_DUP2_EXIT, this, (TUint) aActive );
-    return aActive;
-    }
-
-inline CActive& CHelloTraceFn::OutputsUnknownRefTypeDup2(CActive& aActive)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE_DUP2_ENTRY, this );
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE_DUP2_EXIT, this, (TUint) &aActive );    
-    return aActive;
-    }
-
-// The following doesn't compile as the Trace Compiler doesn't generate
-// the correct OstTraceGenExt(...) function for it
-//void CHelloTraceFn::OutputMissingParamsBug(TInt /*aCommentParam*/, TInt)
-//    {
-//    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_ENTRY, this );
-//    // ...
-//    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_EXIT, this );    
-//    }
-
-// The following compiles and works but outputs the following warning
-// warning: HelloTraceFn.cpp, line xxx: Parameter did not have a name and was not added to trace
-// The fact that this cannot be suppressed is a known problem we're working on.
-inline void CHelloTraceFn::OutputMissingParamsDup2(TInt aUsedParam, TInt /*aCommentParam*/, TInt)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMS_DUP2_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMS_DUP2_EXIT, this );
-    }
-
-// The following doesn't work as the Trace Compiler outputs:
-// error: HelloTraceFn.cpp, line xxx: Class / function name for trace could not be determined x3
-//#ifdef _DEBUG
-//void CHelloTraceFn::PreProcessedFn(TInt aDbgParam)
-//    {
-//    OstTraceFunctionEntryExt( PRE_PROCESSED_ENTRTY_1, this );
-//#else
-//void CHelloTraceFn::PreProcessedFn()
-//    {
-//    OstTraceFunctionEntry1( PRE_PROCESSED_ENTRTY_2, this );
-//#endif
-//    Simple();
-//    OstTraceFunctionExit1( CHELLOTRACEFN_PREPROCESSEDFN_EXIT, this );
-//    }
-
-// Workaround example code until a proper fix is provided
-#ifdef _DEBUG
-inline void CHelloTraceFn::PreProcessedFnDup2(TInt aDbgParam)
-    {
-    OstTraceExt2( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_DUP2_ENTRY_1, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;aDbgParam=%d;this=%x", (TInt) aDbgParam, (TUint) this);
-#else
-    inline void CHelloTraceFn::PreProcessedFnDup2()
-    {
-    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_DUP2_ENTRY_2, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
-#endif
-    SimpleDup2();
-    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_DUP2_EXIT, "CHelloTraceFn::PreProcessedFn: < CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
-    }
-
-#endif /* HELLOTRACEFNDUP2_H_ */
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_import/dll/incDup/HelloTraceInterfaceDup.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,91 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef __HELLOTRACEINTERFACEDUP_H__
-#define __HELLOTRACEINTERFACEDUP_H__
-
-#include "HelloTracePanic.h"
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTraceInterfaceDupTraces.h"
-#endif
-
- inline EXPORT_C TVersion CHelloTraceInterface::VersionDup()
-        {
-        const TInt KMajor = 1;
-        const TInt KMinor = 0;
-        const TInt KBuild = 1;
-        TVersion version = TVersion(KMajor, KMinor, KBuild);
-        OstTraceExt1( TRACE_BORDER, CHELLOTRACEDLL_VERSION_DUP, "CHelloTraceInterface::Version = %S", version.Name());   
-        return version;
-        }
-
- inline EXPORT_C const TPtrC CHelloTraceInterface::StringDup() const
-        {
-        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
-
-        OstTraceDefExt2( OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CHELLOTRACEDLL_STRING_DUP, 
-                         "[0x%08x] Returned %S", (TUint32) this, *iString);   
-        return *iString;
-        }
-
- inline EXPORT_C void CHelloTraceInterface::AddCharDupL(const TChar& aChar)
-        {
-        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
-
-        OstTraceExt3( TRACE_BORDER, CHELLOTRACEDLL_ADDCHARL_DUP, 
-                      "[0x%08x] Adding %d to %S", (TUint32) this, (TInt32) aChar, *iString);   
-        if (iString->Length() >= KHelloTraceDllBufferLength)
-            {
-            OstTrace1( TRACE_ERROR, CHELLOTRACEDLL_ADDCHARL_ERR_DUP,
-                       "[0x%08x] Not enough space to add character", (TUint32) this);
-            User::Leave( KErrTooBig);
-            }
-        iString->Append(aChar);
-        }
-
- inline EXPORT_C void CHelloTraceInterface::RemoveLastDup()
-        {
-        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
-
-        OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_REMOVELAST_DUP, 
-                      "[0x%08x] Attempting to remove last character from %S", (TUint32) this, *iString);
-        if (iString->Length() > 0)
-            {
-            iString->SetLength(iString->Length() - 1);
-            }
-        else
-            {
-            OstTrace1( TRACE_WARNING, CHELLOTRACEDLL_REMOVELAST_WARN_DUP, "[0x%08x] String already empty", (TUint32) this);   
-            }
-        }
-
- inline EXPORT_C void CHelloTraceInterface::ResetStringDup()
-        {
-        OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_RESETSTRING_DUP, "[0x%08x] Reseting string %S", (TUint32) this, *iString);
-        if (iString == NULL)
-            {
-            iString = new (ELeave) THelloTraceDllExampleString;
-            }
-        else
-            {
-            iString->SetLength(0);
-            }
-        }
-#endif  // __HELLOTRACEINTERFACEDUP_H__
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_import/dll/incDup/HelloTraceInterfaceDup2.inl	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,91 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef __HELLOTRACEINTERFACEDUP2_H__
-#define __HELLOTRACEINTERFACEDUP2_H__
-
-#include "HelloTracePanic.h"
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTraceInterfaceDup2Traces.h"
-#endif
-
- inline EXPORT_C TVersion CHelloTraceInterface::VersionDup2()
-        {
-        const TInt KMajor = 1;
-        const TInt KMinor = 0;
-        const TInt KBuild = 1;
-        TVersion version = TVersion(KMajor, KMinor, KBuild);
-        OstTraceExt1( TRACE_BORDER, CHELLOTRACEDLL_VERSION_DUP2, "CHelloTraceInterface::Version = %S", version.Name());   
-        return version;
-        }
-
- inline EXPORT_C const TPtrC CHelloTraceInterface::StringDup2() const
-        {
-        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
-
-        OstTraceDefExt2( OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CHELLOTRACEDLL_STRING_DUP2, 
-                         "[0x%08x] Returned %S", (TUint32) this, *iString);   
-        return *iString;
-        }
-
- inline EXPORT_C void CHelloTraceInterface::AddCharDup2L(const TChar& aChar)
-        {
-        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
-
-        OstTraceExt3( TRACE_BORDER, CHELLOTRACEDLL_ADDCHARL_DUP2, 
-                      "[0x%08x] Adding %d to %S", (TUint32) this, (TInt32) aChar, *iString);   
-        if (iString->Length() >= KHelloTraceDllBufferLength)
-            {
-            OstTrace1( TRACE_ERROR, CHELLOTRACEDLL_ADDCHARL_ERR_DUP2,
-                       "[0x%08x] Not enough space to add character", (TUint32) this);
-            User::Leave( KErrTooBig);
-            }
-        iString->Append(aChar);
-        }
-
- inline EXPORT_C void CHelloTraceInterface::RemoveLastDup2()
-        {
-        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
-
-        OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_REMOVELAST_DUP2, 
-                      "[0x%08x] Attempting to remove last character from %S", (TUint32) this, *iString);
-        if (iString->Length() > 0)
-            {
-            iString->SetLength(iString->Length() - 1);
-            }
-        else
-            {
-            OstTrace1( TRACE_WARNING, CHELLOTRACEDLL_REMOVELAST_WARN_DUP2, "[0x%08x] String already empty", (TUint32) this);   
-            }
-        }
-
- inline EXPORT_C void CHelloTraceInterface::ResetStringDup2()
-        {
-        OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_RESETSTRING_DUP2, "[0x%08x] Reseting string %S", (TUint32) this, *iString);
-        if (iString == NULL)
-            {
-            iString = new (ELeave) THelloTraceDllExampleString;
-            }
-        else
-            {
-            iString->SetLength(0);
-            }
-        }
-#endif  // __HELLOTRACEINTERFACEDUP2_H__
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_import/dll/incDup/HelloTraceTypesDup.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,75 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef __HELLOTRACETYPESDUP_H__
-#define __HELLOTRACETYPESDUP_H__
-
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTraceTypesDupTraces.h"
-#endif
-
-inline void HelloTraceTypes::SignedIntegersDup()
-    {
-    TInt8  eightBit     = - (TInt8)  1 << 6;
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP_8, 
-                  "8 bit signed: %hhd", eightBit );
-    
-    TInt16 sixteenBit   = - (TInt16) 1 << 14; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP_16, 
-                  "16 bit signed: %hd", sixteenBit );
-
-    TInt32 thirtyTwoBit = - (TInt32) 1 << 30; 
-    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP_32, 
-               "32 bit signed: %d", thirtyTwoBit );
-
-    TInt64 sixtyFourBit = - (TInt64) 1 << 62; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP_64, 
-                  "64 bit signed: %Ld", sixtyFourBit );
-    }
-
-inline void HelloTraceTypes::UnsignedIntegersDup()
-    {
-    TUint8  eightBit     = (TUint8)  1 << 6;
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP_8, 
-                  "8 bit unsigned: %hhu", eightBit );
-    
-    TUint16 sixteenBit   = (TUint16) 1 << 14; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP_16, 
-                  "16 bit unsigned: %hu", sixteenBit );
-
-    TUint32 thirtyTwoBit = (TUint32) 1 << 30; 
-    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP_32, 
-               "32 bit unsigned: %u", thirtyTwoBit );
-
-    TUint64 sixtyFourBit = (TUint64) 1 << 62; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP_64, 
-                  "64 bit unsigned: %Lu", sixtyFourBit );
-    }
-
-inline void HelloTraceTypes::DescriptorsDup()
-    {
-    _LIT8(KAscii, "Some ASCII text");
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_ASCIIDUP, "8 bit descriptor: %s", KAscii() );
-
-    _LIT16(KUnicode, "Some unicode text");    
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNICODEDUP, "16 bit descriptor: %S", KUnicode() );
-    }
-
-#endif  // __HELLOTRACETYPESDUP_H__
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_import/dll/incDup/HelloTraceTypesDup2.inl	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,75 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef __HELLOTRACETYPESDUP2_H__
-#define __HELLOTRACETYPESDUP2_H__
-
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTraceTypesDup2Traces.h"
-#endif
-
-inline void HelloTraceTypes::SignedIntegersDup2()
-    {
-    TInt8  eightBit     = - (TInt8)  1 << 6;
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP2_8, 
-                  "8 bit signed: %hhd", eightBit );
-    
-    TInt16 sixteenBit   = - (TInt16) 1 << 14; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP2_16, 
-                  "16 bit signed: %hd", sixteenBit );
-
-    TInt32 thirtyTwoBit = - (TInt32) 1 << 30; 
-    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP2_32, 
-               "32 bit signed: %d", thirtyTwoBit );
-
-    TInt64 sixtyFourBit = - (TInt64) 1 << 62; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP2_64, 
-                  "64 bit signed: %Ld", sixtyFourBit );
-    }
-
-inline void HelloTraceTypes::UnsignedIntegersDup2()
-    {
-    TUint8  eightBit     = (TUint8)  1 << 6;
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP2_8, 
-                  "8 bit unsigned: %hhu", eightBit );
-    
-    TUint16 sixteenBit   = (TUint16) 1 << 14; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP2_16, 
-                  "16 bit unsigned: %hu", sixteenBit );
-
-    TUint32 thirtyTwoBit = (TUint32) 1 << 30; 
-    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP2_32, 
-               "32 bit unsigned: %u", thirtyTwoBit );
-
-    TUint64 sixtyFourBit = (TUint64) 1 << 62; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP2_64, 
-                  "64 bit unsigned: %Lu", sixtyFourBit );
-    }
-
-inline void HelloTraceTypes::DescriptorsDup2()
-    {
-    _LIT8(KAscii, "Some ASCII text");
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_ASCIIDUP2, "8 bit descriptor: %s", KAscii() );
-
-    _LIT16(KUnicode, "Some unicode text");    
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNICODEDUP2, "16 bit descriptor: %S", KUnicode() );
-    }
-
-#endif  // __HELLOTRACETYPESDUP2_H__
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_import/dll/src/HelloTraceExample.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,106 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-
-#include "HelloTraceExample.h"
-#include "HelloTraceTypes.h"
-#include "HelloTraceInterface.h"
-#include "HelloTraceFn.h"
-#include "HelloTracePanic.h"
-
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTraceExampleTraces.h"
-#endif
-
-EXPORT_C void HelloTraceExample::JustTypes()
-    {
-    OstTrace0( TRACE_EXAMPLE, HELLOTRACEEXAMPLE_JUSTTYPES, "*********************************************** " );
-    
-    HelloTraceTypes::SignedIntegers();
-    HelloTraceTypes::UnsignedIntegers();
-    HelloTraceTypes::Descriptors();    
-    }
-
-EXPORT_C void HelloTraceExample::Interface()
-    {
-    OstTrace0( TRACE_EXAMPLE, HELLOTRACEEXAMPLE_INTERFACE, "*********************************************** " );
-    
-    TVersion version = CHelloTraceInterface::Version();   
-    if (version.iMajor >= 1) 
-        {
-        CHelloTraceInterface* example = CHelloTraceInterface::NewLC();
-        example->AddCharL('H');
-        example->AddCharL('e');
-        example->AddCharL('l');
-        example->AddCharL('l');
-        example->AddCharL('o');
-        example->AddCharL('T');        
-        example->RemoveLast();        
-        example->AddCharL(' ');
-        example->AddCharL('T');
-        example->AddCharL('r');
-        example->AddCharL('a');
-        example->AddCharL('c');
-        example->AddCharL('e');
-        example->AddCharL('!');
-        CleanupStack::PopAndDestroy(example);
-        }
-    else
-        {
-        OstTrace0( TRACE_ERROR, HELLOTRACEEXAMPLE_UNSUPPORTED_VERSION, "Unsupported version!");
-        }
-    }
-
-EXPORT_C void HelloTraceExample::FnEntryExit()
-    {
-    OstTrace0( TRACE_EXAMPLE, HELLOTRACEEXAMPLE_FNENTRYEXIT, "*********************************************** " );
-       
-    CHelloTraceFn* example = CHelloTraceFn::NewLC();
-    CIdle* idle = CIdle::NewL(CActive::EPriorityIdle);
-    CleanupStack::PushL(idle);
-
-    CHelloTraceFn::StaticOutputsParamsL(1);
-   
-    example->Simple();
-    example->OutputsParams(2, CHelloTraceFn::EExample1);
-    example->OutputsParams(3, CHelloTraceFn::EExample2);
-    example->OutputsSignedIntegers(-4, -5, -6, -7);
-    example->OutputsUnsignedIntegers(8, 9, 10, 11);
-    example->OutputsTIntReturnValue();    
-    example->OutputsTInt64ReturnValue(); 
-    example->OutputsTFnEnumReturnValue();
-    example->OutputsUnknownPtrType(idle);    
-    example->OutputsUnknownRefType(*idle);
-#ifdef _DEBUG
-    example->PreProcessedFn(12);
-#else
-    example->PreProcessedFn();
-#endif
-    example->OutputMissingParams(13, 14, 15);
-
-    CleanupStack::PopAndDestroy(idle);
-    CleanupStack::PopAndDestroy(example);
-    }
-
-EXPORT_C void HelloTraceExample::PanicTrace()
-    {
-    OstTrace0( TRACE_EXAMPLE, HELLOTRACEEXAMPLE_PANIC, "*********************************************** " );
-
-    Panic(EHelloTraceDllExamplePanic);
-    }
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_import/dll/src/HelloTraceFn.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,183 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
- 
-#include <HelloTraceFn.h>
-#include "HelloTraceFnDup.h"
-#include "HelloTraceFnDup2.inl"
-#include "HelloTracePanic.h"
-
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTraceFnTraces.h"
-#endif
-
-CHelloTraceFn* CHelloTraceFn::NewLC()
-    {
-    CHelloTraceFn* self = new (ELeave) CHelloTraceFn;
-    CleanupStack::PushL(self);
-    return self;
-    }
-
-CHelloTraceFn* CHelloTraceFn::NewL()
-    {
-    CHelloTraceFn* self = CHelloTraceFn::NewLC();
-    CleanupStack::Pop(self);
-    return self;
-    }
-
-CHelloTraceFn::CHelloTraceFn()
-    {
-    OstTrace1( TRACE_NORMAL, CHELLOTRACEFN_CHELLOTRACEFN_CTOR, "[0x%08x] Constructor", this );    
-    }
-
-CHelloTraceFn::~CHelloTraceFn()
-    {
-    OstTrace1( TRACE_NORMAL, CHELLOTRACEFN_CHELLOTRACEFN_DTOR, "[0x%08x] Destructor", this );    
-    }
-
-void CHelloTraceFn::Simple()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_SIMPLE_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_SIMPLE_EXIT, this );
-    }
-
-void CHelloTraceFn::OutputsParams(TInt aParam, TFnEnum aEnumParam)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSPARAMS_ENTRY, this );
-    Simple();
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSPARAMS_EXIT, this );
-    }
-
-void CHelloTraceFn::StaticOutputsParamsL(TInt aParam)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_STATICOUTPUTSPARAMS_ENTRY, NULL );
-    CHelloTraceFn* example = CHelloTraceFn::NewLC();
-    example->Simple();    
-    CleanupStack::PopAndDestroy(example);
-    OstTraceFunctionExit0( CHELLOTRACEFN_STATICOUTPUTSPARAMS_EXIT );    
-    }
-
-void CHelloTraceFn::OutputsSignedIntegers(TInt8 aParam8,   TInt16 aParam16, 
-                                          TInt32 aParam32, TInt64 aParam64)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS_EXIT, this );
-    }
-
-void CHelloTraceFn::OutputsUnsignedIntegers(TUint8 aParam8,   TUint16 aParam16, 
-                                            TUint32 aParam32, TUint64 aParam64)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS_EXIT, this );
-    }
-
-
-TInt CHelloTraceFn::OutputsTIntReturnValue()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_ENTRY, this );
-    TInt ret = KErrNone;
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_EXIT, this, ret );
-    return ret;
-    }
-
-TInt64 CHelloTraceFn::OutputsTInt64ReturnValue()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE_ENTRY, this );
-    TInt64 ret = (TInt64) 2 << 40;
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE_EXIT, this, ret );
-    return ret;
-    }
-
-CHelloTraceFn::TFnEnum CHelloTraceFn::OutputsTFnEnumReturnValue()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE_ENTRY, this );
-    TFnEnum ret = EExample1;
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE_EXIT, this, ret );
-    return ret;    
-    }
-
-CActive* CHelloTraceFn::OutputsUnknownPtrType(CActive* aActive)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_ENTRY, this );    
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_EXIT, this, (TUint) aActive );
-    return aActive;
-    }
-
-CActive& CHelloTraceFn::OutputsUnknownRefType(CActive& aActive)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE_ENTRY, this );
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE_EXIT, this, (TUint) &aActive );    
-    return aActive;
-    }
-
-// The following doesn't compile as the Trace Compiler doesn't generate
-// the correct OstTraceGenExt(...) function for it
-//void CHelloTraceFn::OutputMissingParamsBug(TInt /*aCommentParam*/, TInt)
-//    {
-//    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_ENTRY, this );
-//    // ...
-//    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_EXIT, this );    
-//    }
-
-// The following compiles and works but outputs the following warning
-// warning: HelloTraceFn.cpp, line xxx: Parameter did not have a name and was not added to trace
-// The fact that this cannot be suppressed is a known problem we're working on.
-void CHelloTraceFn::OutputMissingParams(TInt aUsedParam, TInt /*aCommentParam*/, TInt)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMS_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMS_EXIT, this );
-    }
-
-// The following doesn't work as the Trace Compiler outputs:
-// error: HelloTraceFn.cpp, line xxx: Class / function name for trace could not be determined x3
-//#ifdef _DEBUG
-//void CHelloTraceFn::PreProcessedFn(TInt aDbgParam)
-//    {
-//    OstTraceFunctionEntryExt( PRE_PROCESSED_ENTRTY_1, this );
-//#else
-//void CHelloTraceFn::PreProcessedFn()
-//    {
-//    OstTraceFunctionEntry1( PRE_PROCESSED_ENTRTY_2, this );
-//#endif
-//    Simple();
-//    OstTraceFunctionExit1( CHELLOTRACEFN_PREPROCESSEDFN_EXIT, this );
-//    }
-
-// Workaround example code until a proper fix is provided
-#ifdef _DEBUG
-void CHelloTraceFn::PreProcessedFn(TInt aDbgParam)
-    {
-    OstTraceExt2( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_ENTRY_1, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;aDbgParam=%d;this=%x", (TInt) aDbgParam, (TUint) this);
-#else
-void CHelloTraceFn::PreProcessedFn()
-    {
-    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_ENTRY_2, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
-#endif
-    Simple();
-    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_EXIT, "CHelloTraceFn::PreProcessedFn: < CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
-    }
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_import/dll/src/HelloTraceInterface.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,120 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#include "HelloTraceInterface.h"
-#include "HelloTraceInterfaceDup.h"
-#include "HelloTraceInterfaceDup2.inl"
-#include "HelloTracePanic.h"
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTraceInterfaceTraces.h"
-#endif
-
-EXPORT_C CHelloTraceInterface* CHelloTraceInterface::NewLC()
-    {
-    CHelloTraceInterface* self = new (ELeave) CHelloTraceInterface;
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    return self;
-    }
-
-EXPORT_C CHelloTraceInterface* CHelloTraceInterface::NewL()
-    {
-    CHelloTraceInterface* self = CHelloTraceInterface::NewLC();
-    CleanupStack::Pop(self);
-    return self;
-    }
-
-CHelloTraceInterface::CHelloTraceInterface()
-    {
-    OstTrace1( TRACE_NORMAL, CHELLOTRACEDLL_CHELLOTRACEDLL_CTOR, "[0x%08x]", (TUint32) this );    
-    }
-
-void CHelloTraceInterface::ConstructL()
-    {
-    iString = new (ELeave) THelloTraceDllExampleString;
-    }
-
-EXPORT_C CHelloTraceInterface::~CHelloTraceInterface()
-    {
-    delete iString;
-    OstTrace1( TRACE_NORMAL, CHELLOTRACEDLL_CHELLOTRACEDLL_DTOR, "[0x%08x]", (TUint32) this );    
-    }
-
-EXPORT_C TVersion CHelloTraceInterface::Version()
-    {
-    const TInt KMajor = 1;
-    const TInt KMinor = 0;
-    const TInt KBuild = 1;
-    TVersion version = TVersion(KMajor, KMinor, KBuild);
-    OstTraceExt1( TRACE_BORDER, CHELLOTRACEDLL_VERSION, "CHelloTraceInterface::Version = %S", version.Name());   
-    return version;
-    }
-
-EXPORT_C const TPtrC CHelloTraceInterface::String() const
-    {
-    __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
-
-    OstTraceDefExt2( OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CHELLOTRACEDLL_STRING, 
-                     "[0x%08x] Returned %S", (TUint32) this, *iString);   
-    return *iString;
-    }
-
-EXPORT_C void CHelloTraceInterface::AddCharL(const TChar& aChar)
-    {
-    __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
-
-    OstTraceExt3( TRACE_BORDER, CHELLOTRACEDLL_ADDCHARL, 
-                  "[0x%08x] Adding %d to %S", (TUint32) this, (TInt32) aChar, *iString);   
-    if (iString->Length() >= KHelloTraceDllBufferLength)
-        {
-        OstTrace1( TRACE_ERROR, CHELLOTRACEDLL_ADDCHARL_ERR,
-                   "[0x%08x] Not enough space to add character", (TUint32) this);
-        User::Leave( KErrTooBig);
-        }
-    iString->Append(aChar);
-    }
-
-EXPORT_C void CHelloTraceInterface::RemoveLast()
-    {
-    __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
-
-    OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_REMOVELAST, 
-                  "[0x%08x] Attempting to remove last character from %S", (TUint32) this, *iString);
-    if (iString->Length() > 0)
-        {
-        iString->SetLength(iString->Length() - 1);
-        }
-    else
-        {
-        OstTrace1( TRACE_WARNING, CHELLOTRACEDLL_REMOVELAST_WARN, "[0x%08x] String already empty", (TUint32) this);   
-        }
-    }
-
-EXPORT_C void CHelloTraceInterface::ResetString()
-    {
-    OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_RESETSTRING, "[0x%08x] Reseting string %S", (TUint32) this, *iString);
-    if (iString == NULL)
-        {
-        iString = new (ELeave) THelloTraceDllExampleString;
-        }
-    else
-        {
-        iString->SetLength(0);
-        }
-    }
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_import/dll/src/HelloTracePanic.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#include <e32std.h>		 // GLDEF_C
-
-#include "HelloTracePanic.h"
-
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTracePanicTraces.h"
-#endif
-
-GLDEF_C void Panic(THelloTraceDllPanic aPanic)
-    {
-    OstTrace1( TRACE_FATAL, PANIC, "Panic(%{THelloTraceDllPanic})", (TUint) aPanic );    
-    User::Panic(_L("HelloTraceDll"), aPanic);
-    }
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_import/dll/src/HelloTraceTypes.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,76 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-
-#include <e32std.h>
-
-#include "HelloTraceTypes.h"
-#include "HelloTraceTypesDup.h"
-#include "HelloTraceTypesDup2.inl"
-
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTraceTypesTraces.h"
-#endif
-
-void HelloTraceTypes::SignedIntegers()
-    {
-    TInt8  eightBit     = - (TInt8)  1 << 6;
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS_8, 
-                  "8 bit signed: %hhd", eightBit );
-    
-    TInt16 sixteenBit   = - (TInt16) 1 << 14; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS_16, 
-                  "16 bit signed: %hd", sixteenBit );
-
-    TInt32 thirtyTwoBit = - (TInt32) 1 << 30; 
-    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS_32, 
-               "32 bit signed: %d", thirtyTwoBit );
-
-    TInt64 sixtyFourBit = - (TInt64) 1 << 62; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS_64, 
-                  "64 bit signed: %Ld", sixtyFourBit );
-    }
-
-void HelloTraceTypes::UnsignedIntegers()
-    {
-    TUint8  eightBit     = (TUint8)  1 << 6;
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS_8, 
-                  "8 bit unsigned: %hhu", eightBit );
-    
-    TUint16 sixteenBit   = (TUint16) 1 << 14; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS_16, 
-                  "16 bit unsigned: %hu", sixteenBit );
-
-    TUint32 thirtyTwoBit = (TUint32) 1 << 30; 
-    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS_32, 
-               "32 bit unsigned: %u", thirtyTwoBit );
-
-    TUint64 sixtyFourBit = (TUint64) 1 << 62; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS_64, 
-                  "64 bit unsigned: %Lu", sixtyFourBit );
-    }
-
-void HelloTraceTypes::Descriptors()
-    {
-    _LIT8(KAscii, "Some ASCII text");
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_ASCII, "8 bit descriptor: %s", KAscii() );
-
-    _LIT16(KUnicode, "Some unicode text");    
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNICODE, "16 bit descriptor: %S", KUnicode() );
-    }
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_import/dll/traces/trace.properties	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<trace_properties>
-<enum name="TFnEnum">
-<value id="0">EExample1</value>
-<value id="2">EExample2</value>
-</enum>
-<enum name="THelloTraceDllPanic">
-<value id="0">EHelloTraceDllExamplePanic</value>
-<value id="1">EHelloTraceDllNullPointer</value>
-</enum>
-<file>../incDup/HelloTraceInterfaceDup.h</file>
-<file>../incDup/HelloTraceInterfaceDup2.inl</file>
-<file>../incDup/HelloTraceFnDup2.inl</file>
-<file>../incDup/HelloTraceTypesDup.h</file>
-<file>../incDup/HelloTraceTypesDup2.inl</file>
-</trace_properties>
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_import/group/bld.inf	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,19 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-#include "../dll/group/bld.inf"
-#include "../console/group/bld.inf"
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/console/group/HelloTraceConsole.mmp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-
-TARGET		  HelloTraceConsole.exe
-TARGETTYPE	  exe
-UID			  0 0xE40349E4
-
-OS_LAYER_SYSTEMINCLUDE
-USERINCLUDE	   ../inc
-USERINCLUDE    ../../dll/inc
-USERINCLUDE    ../traces
-
-SOURCEPATH	  ../src
-SOURCE		  HelloTraceConsole.cpp
-
-LIBRARY		  euser.lib
-LIBRARY       HelloTraceDll.lib
-
-#ifdef ENABLE_ABIV2_MODE
-DEBUGGABLE_UDEBONLY
-#endif
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/console/group/bld.inf	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-
-PRJ_PLATFORMS
-DEFAULT
-
-PRJ_EXPORTS
-hellotraceconsole.iby             CORE_OS_LAYER_IBY_EXPORT_PATH(hellotraceconsole.iby)
-
-PRJ_MMPFILES
-HelloTraceConsole.mmp
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/console/group/hellotraceconsole.iby	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,24 +0,0 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "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:
-//
-// Description:
-// ROM build file for tracecore project
-
-#ifndef HELLOTRACECONSOLE_IBY
-#define HELLOTRACECONSOLE_IBY
-
-#include <core\os\hellotracedll.iby>
-
-file=ABI_DIR\BUILD_DIR\hellotraceconsole.exe    Sys\Bin\hellotraceconsole.exe
-
-#endif //HELLOTRACECONSOLE_IBY
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/console/inc/HelloTraceConsole.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef __HELLOTRACECONSOLE_H__
-#define __HELLOTRACECONSOLE_H__
-
-//  Include Files
-
-#include <e32base.h>
-
-//  Function Prototypes
-
-GLDEF_C TInt E32Main();
-
-#endif  // __HELLOTRACECONSOLE_H__
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/console/src/HelloTraceConsole.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,124 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#include <e32cons.h>			// Console
-
-#include "HelloTraceConsole.h"
-#include "HelloTraceExample.h"
-
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTraceConsoleTraces.h"
-#endif
-
-
-_LIT(KTextConsoleTitle, "HelloTrace");
-_LIT(KTextPressAnyKey, " [press any key]\n");
-
-LOCAL_D CConsoleBase* console; // write all messages to this
-
-LOCAL_C void DoExamples()
-    {
-    TInt err = KErrNone;
-
-    console->Printf(_L("Before main tracing examples ...\n"));
-
-    console->Printf(_L(" Before type examples ..."));
-    console->Printf(KTextPressAnyKey);
-    console->Getch();
-    TRAP(err, HelloTraceExample::JustTypes());    
-    if (err)
-        console->Printf(_L(" Failed with error %d\n"), err);
-
-    console->Printf(_L(" Before Interface examples ..."));
-    console->Printf(KTextPressAnyKey);
-    console->Getch();
-    TRAP(err, HelloTraceExample::Interface());    
-    if (err)
-        console->Printf(_L(" Failed with error %d\n"), err);
-    
-    console->Printf(_L(" Before FnEntryExit examples ..."));
-    console->Printf(KTextPressAnyKey);
-    console->Getch();
-    TRAP(err, HelloTraceExample::FnEntryExit());    
-    if (err)
-        console->Printf(_L(" Failed with error %d\n"), err);    
-    }
-
-LOCAL_C void DoStartL()
-    {
-    // Create active scheduler (to run active objects)
-    CActiveScheduler* scheduler = new (ELeave) CActiveScheduler();
-    CleanupStack::PushL(scheduler);
-    CActiveScheduler::Install(scheduler);
-
-    DoExamples();
-    
-    // Delete active scheduler
-    CleanupStack::PopAndDestroy(scheduler);
-    }
-
-//  Global Functions
-
-GLDEF_C TInt E32Main()
-    {
-    OstTraceFunctionEntry0( E32MAIN_ENTRY );
-    
-    // Create cleanup stack
-    __UHEAP_MARK;
-    CTrapCleanup* cleanup = CTrapCleanup::New();
-
-    // Create output console
-    TRAPD(createError, 
-          console = Console::NewL(KTextConsoleTitle, 
-                                  TSize(KConsFullScreen, KConsFullScreen)));    
-    if (createError)
-        {
-        delete cleanup;
-        OstTrace1( TRACE_ERROR, E32MAIN_CREATE_ERROR, "Failed to create console error: %d", createError);
-        OstTraceFunctionExit0( E32MAIN_EXIT_ERR );
-        return createError;
-        }
-
-    TRAPD(mainError, DoStartL());    
-    if (mainError)
-        {
-        OstTrace1( TRACE_ERROR, E32MAIN_START_ERROR, "DoStartL failed with error: %d", mainError);
-        console->Printf(_L("DoStartL failed with error: %d\n\n"), mainError);
-        }
-    else 
-        {
-        console->Printf(_L("Before panic tracing example ..."));
-        console->Printf(KTextPressAnyKey);
-        console->Getch();
-    
-        OstTrace0( TRACE_FLOW, E32MAIN_BEFORE_PANIC, "About to cause a panic ..." );
-        HelloTraceExample::PanicTrace();
-        
-        console->Printf(KTextPressAnyKey);
-        console->Getch();
-        }
-
-    delete console;
-    delete cleanup;
-    __UHEAP_MARKEND;
-    
-    OstTraceFunctionExit0( E32MAIN_EXIT );
-    return KErrNone;
-    }
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/dll/bwins/HelloTraceDllu.def	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,14 +0,0 @@
-EXPORTS
-	?Version@CHelloTraceInterface@@SA?AVTVersion@@XZ @ 1 NONAME ; class TVersion CHelloTraceInterface::Version(void)
-	?NewLC@CHelloTraceInterface@@SAPAV1@XZ @ 2 NONAME ; class CHelloTraceInterface * CHelloTraceInterface::NewLC(void)
-	?JustTypes@HelloTraceExample@@SAXXZ @ 3 NONAME ; void HelloTraceExample::JustTypes(void)
-	?Interface@HelloTraceExample@@SAXXZ @ 4 NONAME ; void HelloTraceExample::Interface(void)
-	?FnEntryExit@HelloTraceExample@@SAXXZ @ 5 NONAME ; void HelloTraceExample::FnEntryExit(void)
-	?ResetString@CHelloTraceInterface@@QAEXXZ @ 6 NONAME ; void CHelloTraceInterface::ResetString(void)
-	?AddCharL@CHelloTraceInterface@@QAEXABVTChar@@@Z @ 7 NONAME ; void CHelloTraceInterface::AddCharL(class TChar const &)
-	?PanicTrace@HelloTraceExample@@SAXXZ @ 8 NONAME ; void HelloTraceExample::PanicTrace(void)
-	??1CHelloTraceInterface@@UAE@XZ @ 9 NONAME ; CHelloTraceInterface::~CHelloTraceInterface(void)
-	?String@CHelloTraceInterface@@QBE?BVTPtrC16@@XZ @ 10 NONAME ; class TPtrC16 const CHelloTraceInterface::String(void) const
-	?RemoveLast@CHelloTraceInterface@@QAEXXZ @ 11 NONAME ; void CHelloTraceInterface::RemoveLast(void)
-	?NewL@CHelloTraceInterface@@SAPAV1@XZ @ 12 NONAME ; class CHelloTraceInterface * CHelloTraceInterface::NewL(void)
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/dll/eabi/HelloTraceDllu.def	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,20 +0,0 @@
-EXPORTS
-	_ZN17HelloTraceExample10PanicTraceEv @ 1 NONAME
-	_ZN17HelloTraceExample11FnEntryExitEv @ 2 NONAME
-	_ZN17HelloTraceExample9InterfaceEv @ 3 NONAME
-	_ZN17HelloTraceExample9JustTypesEv @ 4 NONAME
-	_ZN20CHelloTraceInterface10RemoveLastEv @ 5 NONAME
-	_ZN20CHelloTraceInterface11ResetStringEv @ 6 NONAME
-	_ZN20CHelloTraceInterface4NewLEv @ 7 NONAME
-	_ZN20CHelloTraceInterface5NewLCEv @ 8 NONAME
-	_ZN20CHelloTraceInterface7VersionEv @ 9 NONAME
-	_ZN20CHelloTraceInterface8AddCharLERK5TChar @ 10 NONAME
-	_ZN20CHelloTraceInterfaceD0Ev @ 11 NONAME
-	_ZN20CHelloTraceInterfaceD1Ev @ 12 NONAME
-	_ZN20CHelloTraceInterfaceD2Ev @ 13 NONAME
-	_ZNK20CHelloTraceInterface6StringEv @ 14 NONAME
-	_ZTI13CHelloTraceFn @ 15 NONAME
-	_ZTI20CHelloTraceInterface @ 16 NONAME
-	_ZTV13CHelloTraceFn @ 17 NONAME
-	_ZTV20CHelloTraceInterface @ 18 NONAME
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/dll/group/HelloTraceDll.mmp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-
-TARGET		  HelloTraceDll.dll
-TARGETTYPE	  dll
-UID			  0x1000008d 0xE43DF43E
-CAPABILITY    ReadUserData
-
-OS_LAYER_SYSTEMINCLUDE
-USERINCLUDE  ../inc ../incDup
-USERINCLUDE  ../traces
-
-SOURCEPATH	 ../src
-SOURCE       HelloTraceExample.cpp 
-SOURCE       HelloTraceTypes.cpp
-SOURCE       HelloTraceInterface.cpp 
-SOURCE       HelloTraceFn.cpp 
-SOURCE       HelloTracePanic.cpp 
-
-LIBRARY		 euser.lib
-
-#ifdef ENABLE_ABIV2_MODE
-DEBUGGABLE_UDEBONLY
-#endif
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/dll/group/bld.inf	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-
-PRJ_PLATFORMS
-DEFAULT
-
-PRJ_EXPORTS
-hellotracedll.iby             CORE_OS_LAYER_IBY_EXPORT_PATH(hellotracedll.iby)
-
-PRJ_MMPFILES
-HelloTraceDll.mmp
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/dll/group/hellotracedll.iby	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,22 +0,0 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "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:
-//
-// Description:
-// ROM build file for tracecore project
-
-#ifndef HELLOTRACEDLL_IBY
-#define HELLOTRACEDLL_IBY
-
-file=ABI_DIR\BUILD_DIR\hellotracedll.dll        Sys\Bin\hellotracedll.dll
-
-#endif //HELLOTRACEDLL_IBY
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/dll/inc/HelloTraceExample.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef __HELLOTRACEEXAMPLE_H__
-#define __HELLOTRACEEXAMPLE_H__
-
-#include <e32std.h>
-
-class HelloTraceExample
-    {
-public:
-    IMPORT_C static void JustTypes();    
-    IMPORT_C static void Interface();    
-    IMPORT_C static void FnEntryExit();    
-    IMPORT_C static void PanicTrace();    
-
-    // @TODO add examples for state macros
-    // @TODO add examples for event macros
-    // @TODO add examples for OstTraceData
-    // @TODO add compile-time selector examples
-    // @TODO add macro wrapper examples
-    };
-
-#endif  // __HELLOTRACEEXAMPLE_H__
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/dll/inc/HelloTraceFn.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,122 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef HELLOTRACEFN_H_
-#define HELLOTRACEFN_H_
-
-#include <e32base.h>    // CBase
-
-class CHelloTraceFn : public CBase
-    {
-public:
-    
-    // Note the Trace Builder will only parse this if it's in a cpp file
-    // but not from here :(
-    // Also if you add a new enum you need to reparse the enum - it doesn't
-    // get automatically reparsed by the Trace Compiler :(
-    enum TFnEnum
-        {
-        EExample1,
-        EExample2 = 2, 
-        // EExample3 = EExample2 + 1, // The Trace Builder can't parse this :(
-        };
-    
-public:
-    static CHelloTraceFn* NewL();
-    static CHelloTraceFn* NewLC();
-    ~CHelloTraceFn();
-   
-public: // Fn entry / exit tracing examples 
-    void Simple();
-    void OutputsParams(TInt aParam, TFnEnum aEnumParam);
-    void OutputsSignedIntegers(TInt8 aParam8,   TInt16 aParam16, 
-                               TInt32 aParam32, TInt64 aParam64);
-    void OutputsUnsignedIntegers(TUint8 aParam8,   TUint16 aParam16, 
-                                 TUint32 aParam32, TUint64 aParam64);
-     
-    TInt OutputsTIntReturnValue();
-    TInt64 OutputsTInt64ReturnValue();
-    TFnEnum OutputsTFnEnumReturnValue();
-
-    CActive* OutputsUnknownPtrType(CActive* aActive);
-    CActive& OutputsUnknownRefType(CActive& aActive);
-    
-    void OutputMissingParams(TInt aUsedParam, TInt aCommentParam, TInt aMissingParam);
-
-#ifdef _DEBUG    
-    void PreProcessedFn(TInt aDbgParam);
-#else
-    void PreProcessedFn();
-#endif
-    
-    static void StaticOutputsParamsL(TInt aParam);  
-    
-    // duplicate all the function and put the impl in the header file HelloTraceFnDup.h
-    void SimpleDup();
-    void OutputsParamsDup(TInt aParam, TFnEnum aEnumParam);
-    void OutputsSignedIntegersDup(TInt8 aParam8,   TInt16 aParam16, 
-                               TInt32 aParam32, TInt64 aParam64);
-    void OutputsUnsignedIntegersDup(TUint8 aParam8,   TUint16 aParam16, 
-                                 TUint32 aParam32, TUint64 aParam64);
-     
-    TInt OutputsTIntReturnValueDup();
-    TInt64 OutputsTInt64ReturnValueDup();
-    TFnEnum OutputsTFnEnumReturnValueDup();
-
-    CActive* OutputsUnknownPtrTypeDup(CActive* aActive);
-    CActive& OutputsUnknownRefTypeDup(CActive& aActive);
-    
-    void OutputMissingParamsDup(TInt aUsedParam, TInt aCommentParam, TInt aMissingParam);
-
-#ifdef _DEBUG    
-    void PreProcessedFnDup(TInt aDbgParam);
-#else
-    void PreProcessedFnDup();
-#endif
-    static void StaticOutputsParamsDupL(TInt aParam);  
-    
-    // duplicate all the function again and put the impl in the header file HelloTraceFnDup2.h
-    void SimpleDup2();
-    void OutputsParamsDup2(TInt aParam, TFnEnum aEnumParam);
-    void OutputsSignedIntegersDup2(TInt8 aParam8,   TInt16 aParam16, 
-                               TInt32 aParam32, TInt64 aParam64);
-    void OutputsUnsignedIntegersDup2(TUint8 aParam8,   TUint16 aParam16, 
-                                 TUint32 aParam32, TUint64 aParam64);
-     
-    TInt OutputsTIntReturnValueDup2();
-    TInt64 OutputsTInt64ReturnValueDup2();
-    TFnEnum OutputsTFnEnumReturnValueDup2();
-
-    CActive* OutputsUnknownPtrTypeDup2(CActive* aActive);
-    CActive& OutputsUnknownRefTypeDup2(CActive& aActive);
-    
-    void OutputMissingParamsDup2(TInt aUsedParam, TInt aCommentParam, TInt aMissingParam);
-
-#ifdef _DEBUG    
-    void PreProcessedFnDup2(TInt aDbgParam);
-#else
-    void PreProcessedFnDup2();
-#endif
-    static void StaticOutputsParamsDup2L(TInt aParam);  
-
-
-private:
-    CHelloTraceFn();
-    };
-
-#endif /* HELLOTRACEFN_H_ */
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/dll/inc/HelloTraceInterface.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,63 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef __HELLOTRACEINTERFACE_H__
-#define __HELLOTRACEINTERFACE_H__
-
-#include <e32base.h>	// CBase
-#include <e32std.h>	 // TBuf
-
-const TInt KHelloTraceDllBufferLength = 10;
-typedef TBuf<KHelloTraceDllBufferLength> THelloTraceDllExampleString;
-
-class CHelloTraceInterface : public CBase
-    {
-public:
-    IMPORT_C static CHelloTraceInterface* NewL();
-    IMPORT_C static CHelloTraceInterface* NewLC();
-    IMPORT_C ~CHelloTraceInterface();
-
-public:
-    IMPORT_C static TVersion Version();
-    IMPORT_C const TPtrC String() const;
-    IMPORT_C void AddCharL(const TChar& aChar);
-    IMPORT_C void RemoveLast();
-    IMPORT_C void ResetString();
-    
-    IMPORT_C static TVersion VersionDup();
-    IMPORT_C const TPtrC StringDup() const;
-    IMPORT_C void AddCharDupL(const TChar& aChar);
-    IMPORT_C void RemoveLastDup();
-    IMPORT_C void ResetStringDup();
-
-    IMPORT_C static TVersion VersionDup2();
-    IMPORT_C const TPtrC StringDup2() const;
-    IMPORT_C void AddCharDup2L(const TChar& aChar);
-    IMPORT_C void RemoveLastDup2();
-    IMPORT_C void ResetStringDup2();
-private:
-    CHelloTraceInterface();
-    void ConstructL();
-
-private:
-    // data
-    THelloTraceDllExampleString* iString;
-    };
-
-#endif  // __HELLOTRACEINTERFACE_H__
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/dll/inc/HelloTracePanic.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef __HELLOTRACEDLL_PAN__
-#define __HELLOTRACEDLL_PAN__
-
-//  Data Types
-
-enum THelloTraceDllPanic
-    {
-    EHelloTraceDllExamplePanic,
-    EHelloTraceDllNullPointer,
-    };
-
-//  Function Prototypes
-
-GLREF_C void Panic(THelloTraceDllPanic aPanic);
-
-#endif  // __HELLOTRACEDLL_PAN__
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/dll/inc/HelloTraceTypes.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef __HELLOTRACETYPES_H__
-#define __HELLOTRACETYPES_H__
-
-class HelloTraceTypes
-    {
-public:
-    static void SignedIntegers();
-    static void UnsignedIntegers();
-    static void Descriptors();
-    
-    static void SignedIntegersDup();
-    static void UnsignedIntegersDup();
-    static void DescriptorsDup();
-        
-    static void SignedIntegersDup2();
-    static void UnsignedIntegersDup2();
-    static void DescriptorsDup2();
-    };
-
-#endif  // __HELLOTRACETYPES_H__
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/dll/incDup/HelloTraceFn.inl	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,157 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef HELLOTRACEFNINL_H_
-#define HELLOTRACEFNINL_H_
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTraceFnTraces.h"
-#endif
-
-inline void CHelloTraceFn::SimpleDup2()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_SIMPLE_DUP2_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_SIMPLE_DUP2_EXIT, this );
-    }
-
-inline void CHelloTraceFn::OutputsParamsDup2(TInt aParam, TFnEnum aEnumParam)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSPARAMS_DUP2_ENTRY, this );
-    Simple();
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSPARAMS_DUP2_EXIT, this );
-    }
-
-inline void CHelloTraceFn::StaticOutputsParamsDup2L(TInt aParam)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_STATICOUTPUTSPARAMS_DUP2_ENTRY, NULL );
-    CHelloTraceFn* example = CHelloTraceFn::NewLC();
-    example->SimpleDup2();    
-    CleanupStack::PopAndDestroy(example);
-    OstTraceFunctionExit0( CHELLOTRACEFN_STATICOUTPUTSPARAMS_DUP2_EXIT );    
-    }
-
-inline void CHelloTraceFn::OutputsSignedIntegersDup2(TInt8 aParam8,   TInt16 aParam16, 
-                                          TInt32 aParam32, TInt64 aParam64)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS_DUP2_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS_DUP2_EXIT, this );
-    }
-
-inline void CHelloTraceFn::OutputsUnsignedIntegersDup2(TUint8 aParam8,   TUint16 aParam16, 
-                                            TUint32 aParam32, TUint64 aParam64)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS_DUP2_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS_DUP2_EXIT, this );
-    }
-
-
-inline TInt CHelloTraceFn::OutputsTIntReturnValueDup2()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_DUP2_ENTRY, this );
-    TInt ret = KErrNone;
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_DUP2_EXIT, this, ret );
-    return ret;
-    }
-
-inline TInt64 CHelloTraceFn::OutputsTInt64ReturnValueDup2()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE_DUP2_ENTRY, this );
-    TInt64 ret = (TInt64) 2 << 40;
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE_DUP2_EXIT, this, ret );
-    return ret;
-    }
-
-inline CHelloTraceFn::TFnEnum CHelloTraceFn::OutputsTFnEnumReturnValueDup2()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE_DUP2_ENTRY, this );
-    TFnEnum ret = EExample1;
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE_DUP2_EXIT, this, ret );
-    return ret;    
-    }
-
-inline CActive* CHelloTraceFn::OutputsUnknownPtrTypeDup2(CActive* aActive)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_DUP2_ENTRY, this );    
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_DUP2_EXIT, this, (TUint) aActive );
-    return aActive;
-    }
-
-inline CActive& CHelloTraceFn::OutputsUnknownRefTypeDup2(CActive& aActive)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE_DUP2_ENTRY, this );
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE_DUP2_EXIT, this, (TUint) &aActive );    
-    return aActive;
-    }
-
-// The following doesn't compile as the Trace Compiler doesn't generate
-// the correct OstTraceGenExt(...) function for it
-//void CHelloTraceFn::OutputMissingParamsBug(TInt /*aCommentParam*/, TInt)
-//    {
-//    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_ENTRY, this );
-//    // ...
-//    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_EXIT, this );    
-//    }
-
-// The following compiles and works but outputs the following warning
-// warning: HelloTraceFn.cpp, line xxx: Parameter did not have a name and was not added to trace
-// The fact that this cannot be suppressed is a known problem we're working on.
-inline void CHelloTraceFn::OutputMissingParamsDup2(TInt aUsedParam, TInt /*aCommentParam*/, TInt)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMS_DUP2_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMS_DUP2_EXIT, this );
-    }
-
-// The following doesn't work as the Trace Compiler outputs:
-// error: HelloTraceFn.cpp, line xxx: Class / function name for trace could not be determined x3
-//#ifdef _DEBUG
-//void CHelloTraceFn::PreProcessedFn(TInt aDbgParam)
-//    {
-//    OstTraceFunctionEntryExt( PRE_PROCESSED_ENTRTY_1, this );
-//#else
-//void CHelloTraceFn::PreProcessedFn()
-//    {
-//    OstTraceFunctionEntry1( PRE_PROCESSED_ENTRTY_2, this );
-//#endif
-//    Simple();
-//    OstTraceFunctionExit1( CHELLOTRACEFN_PREPROCESSEDFN_EXIT, this );
-//    }
-
-// Workaround example code until a proper fix is provided
-#ifdef _DEBUG
-inline void CHelloTraceFn::PreProcessedFnDup2(TInt aDbgParam)
-    {
-    OstTraceExt2( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_DUP2_ENTRY_1, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;aDbgParam=%d;this=%x", (TInt) aDbgParam, (TUint) this);
-#else
-    inline void CHelloTraceFn::PreProcessedFnDup2()
-    {
-    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_DUP2_ENTRY_2, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
-#endif
-    SimpleDup2();
-    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_DUP2_EXIT, "CHelloTraceFn::PreProcessedFn: < CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
-    }
-
-#endif /* HELLOTRACEFNINL_H_ */
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/dll/incDup/HelloTraceFnDup.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,157 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef HELLOTRACEFNDUP_H_
-#define HELLOTRACEFNDUP_H_
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTraceFnDupTraces.h"
-#endif
-
-inline void CHelloTraceFn::SimpleDup()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_SIMPLE_DUP_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_SIMPLE_DUP_EXIT, this );
-    }
-
-inline void CHelloTraceFn::OutputsParamsDup(TInt aParam, TFnEnum aEnumParam)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSPARAMS_DUP_ENTRY, this );
-    Simple();
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSPARAMS_DUP_EXIT, this );
-    }
-
-inline void CHelloTraceFn::StaticOutputsParamsDupL(TInt aParam)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_STATICOUTPUTSPARAMS_DUP_ENTRY, NULL );
-    CHelloTraceFn* example = CHelloTraceFn::NewLC();
-    example->SimpleDup();    
-    CleanupStack::PopAndDestroy(example);
-    OstTraceFunctionExit0( CHELLOTRACEFN_STATICOUTPUTSPARAMS_DUP_EXIT );    
-    }
-
-inline void CHelloTraceFn::OutputsSignedIntegersDup(TInt8 aParam8,   TInt16 aParam16, 
-                                          TInt32 aParam32, TInt64 aParam64)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS_DUP_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS_DUP_EXIT, this );
-    }
-
-void CHelloTraceFn::OutputsUnsignedIntegersDup(TUint8 aParam8,   TUint16 aParam16, 
-                                            TUint32 aParam32, TUint64 aParam64)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS_DUP_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS_DUP_EXIT, this );
-    }
-
-
-inline TInt CHelloTraceFn::OutputsTIntReturnValueDup()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_DUP_ENTRY, this );
-    TInt ret = KErrNone;
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_DUP_EXIT, this, ret );
-    return ret;
-    }
-
-inline TInt64 CHelloTraceFn::OutputsTInt64ReturnValueDup()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE_DUP_ENTRY, this );
-    TInt64 ret = (TInt64) 2 << 40;
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE_DUP_EXIT, this, ret );
-    return ret;
-    }
-
-inline CHelloTraceFn::TFnEnum CHelloTraceFn::OutputsTFnEnumReturnValueDup()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE_DUP_ENTRY, this );
-    TFnEnum ret = EExample1;
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE_DUP_EXIT, this, ret );
-    return ret;    
-    }
-
-inline CActive* CHelloTraceFn::OutputsUnknownPtrTypeDup(CActive* aActive)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_DUP_ENTRY, this );    
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_DUP_EXIT, this, (TUint) aActive );
-    return aActive;
-    }
-
-inline CActive& CHelloTraceFn::OutputsUnknownRefTypeDup(CActive& aActive)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE_DUP_ENTRY, this );
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE_DUP_EXIT, this, (TUint) &aActive );    
-    return aActive;
-    }
-
-// The following doesn't compile as the Trace Compiler doesn't generate
-// the correct OstTraceGenExt(...) function for it
-//void CHelloTraceFn::OutputMissingParamsBug(TInt /*aCommentParam*/, TInt)
-//    {
-//    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_ENTRY, this );
-//    // ...
-//    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_EXIT, this );    
-//    }
-
-// The following compiles and works but outputs the following warning
-// warning: HelloTraceFn.cpp, line xxx: Parameter did not have a name and was not added to trace
-// The fact that this cannot be suppressed is a known problem we're working on.
-inline void CHelloTraceFn::OutputMissingParamsDup(TInt aUsedParam, TInt /*aCommentParam*/, TInt)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMS_DUP_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMS_DUP_EXIT, this );
-    }
-
-// The following doesn't work as the Trace Compiler outputs:
-// error: HelloTraceFn.cpp, line xxx: Class / function name for trace could not be determined x3
-//#ifdef _DEBUG
-//void CHelloTraceFn::PreProcessedFn(TInt aDbgParam)
-//    {
-//    OstTraceFunctionEntryExt( PRE_PROCESSED_ENTRTY_1, this );
-//#else
-//void CHelloTraceFn::PreProcessedFn()
-//    {
-//    OstTraceFunctionEntry1( PRE_PROCESSED_ENTRTY_2, this );
-//#endif
-//    Simple();
-//    OstTraceFunctionExit1( CHELLOTRACEFN_PREPROCESSEDFN_EXIT, this );
-//    }
-
-// Workaround example code until a proper fix is provided
-#ifdef _DEBUG
-inline void CHelloTraceFn::PreProcessedFnDup(TInt aDbgParam)
-    {
-    OstTraceExt2( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_DUP_ENTRY_1, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;aDbgParam=%d;this=%x", (TInt) aDbgParam, (TUint) this);
-#else
-    inline void CHelloTraceFn::PreProcessedFnDup()
-    {
-    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_DUP_ENTRY_2, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
-#endif
-    SimpleDup();
-    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_DUP_EXIT, "CHelloTraceFn::PreProcessedFn: < CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
-    }
-
-#endif /* HELLOTRACEFNDUP_H_ */
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/dll/incDup/HelloTraceInterface.inl	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,91 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef __HELLOTRACEINTERFACEINL_H__
-#define __HELLOTRACEINTERFACEINL_H__
-
-#include "HelloTracePanic.h"
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTraceInterfaceTraces.h"
-#endif
-
- inline EXPORT_C TVersion CHelloTraceInterface::VersionDup2()
-        {
-        const TInt KMajor = 1;
-        const TInt KMinor = 0;
-        const TInt KBuild = 1;
-        TVersion version = TVersion(KMajor, KMinor, KBuild);
-        OstTraceExt1( TRACE_BORDER, CHELLOTRACEDLL_VERSION_DUP2, "CHelloTraceInterface::Version = %S", version.Name());   
-        return version;
-        }
-
- inline EXPORT_C const TPtrC CHelloTraceInterface::StringDup2() const
-        {
-        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
-
-        OstTraceDefExt2( OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CHELLOTRACEDLL_STRING_DUP2, 
-                         "[0x%08x] Returned %S", (TUint32) this, *iString);   
-        return *iString;
-        }
-
- inline EXPORT_C void CHelloTraceInterface::AddCharDup2L(const TChar& aChar)
-        {
-        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
-
-        OstTraceExt3( TRACE_BORDER, CHELLOTRACEDLL_ADDCHARL_DUP2, 
-                      "[0x%08x] Adding %d to %S", (TUint32) this, (TInt32) aChar, *iString);   
-        if (iString->Length() >= KHelloTraceDllBufferLength)
-            {
-            OstTrace1( TRACE_ERROR, CHELLOTRACEDLL_ADDCHARL_ERR_DUP2,
-                       "[0x%08x] Not enough space to add character", (TUint32) this);
-            User::Leave( KErrTooBig);
-            }
-        iString->Append(aChar);
-        }
-
- inline EXPORT_C void CHelloTraceInterface::RemoveLastDup2()
-        {
-        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
-
-        OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_REMOVELAST_DUP2, 
-                      "[0x%08x] Attempting to remove last character from %S", (TUint32) this, *iString);
-        if (iString->Length() > 0)
-            {
-            iString->SetLength(iString->Length() - 1);
-            }
-        else
-            {
-            OstTrace1( TRACE_WARNING, CHELLOTRACEDLL_REMOVELAST_WARN_DUP2, "[0x%08x] String already empty", (TUint32) this);   
-            }
-        }
-
- inline EXPORT_C void CHelloTraceInterface::ResetStringDup2()
-        {
-        OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_RESETSTRING_DUP2, "[0x%08x] Reseting string %S", (TUint32) this, *iString);
-        if (iString == NULL)
-            {
-            iString = new (ELeave) THelloTraceDllExampleString;
-            }
-        else
-            {
-            iString->SetLength(0);
-            }
-        }
-#endif  // __HELLOTRACEINTERFACEINL_H__
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/dll/incDup/HelloTraceInterfaceDup.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,91 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef __HELLOTRACEINTERFACEDUP_H__
-#define __HELLOTRACEINTERFACEDUP_H__
-
-#include "HelloTracePanic.h"
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTraceInterfaceDupTraces.h"
-#endif
-
- inline EXPORT_C TVersion CHelloTraceInterface::VersionDup()
-        {
-        const TInt KMajor = 1;
-        const TInt KMinor = 0;
-        const TInt KBuild = 1;
-        TVersion version = TVersion(KMajor, KMinor, KBuild);
-        OstTraceExt1( TRACE_BORDER, CHELLOTRACEDLL_VERSION_DUP, "CHelloTraceInterface::Version = %S", version.Name());   
-        return version;
-        }
-
- inline EXPORT_C const TPtrC CHelloTraceInterface::StringDup() const
-        {
-        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
-
-        OstTraceDefExt2( OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CHELLOTRACEDLL_STRING_DUP, 
-                         "[0x%08x] Returned %S", (TUint32) this, *iString);   
-        return *iString;
-        }
-
- inline EXPORT_C void CHelloTraceInterface::AddCharDupL(const TChar& aChar)
-        {
-        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
-
-        OstTraceExt3( TRACE_BORDER, CHELLOTRACEDLL_ADDCHARL_DUP, 
-                      "[0x%08x] Adding %d to %S", (TUint32) this, (TInt32) aChar, *iString);   
-        if (iString->Length() >= KHelloTraceDllBufferLength)
-            {
-            OstTrace1( TRACE_ERROR, CHELLOTRACEDLL_ADDCHARL_ERR_DUP,
-                       "[0x%08x] Not enough space to add character", (TUint32) this);
-            User::Leave( KErrTooBig);
-            }
-        iString->Append(aChar);
-        }
-
- inline EXPORT_C void CHelloTraceInterface::RemoveLastDup()
-        {
-        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
-
-        OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_REMOVELAST_DUP, 
-                      "[0x%08x] Attempting to remove last character from %S", (TUint32) this, *iString);
-        if (iString->Length() > 0)
-            {
-            iString->SetLength(iString->Length() - 1);
-            }
-        else
-            {
-            OstTrace1( TRACE_WARNING, CHELLOTRACEDLL_REMOVELAST_WARN_DUP, "[0x%08x] String already empty", (TUint32) this);   
-            }
-        }
-
- inline EXPORT_C void CHelloTraceInterface::ResetStringDup()
-        {
-        OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_RESETSTRING_DUP, "[0x%08x] Reseting string %S", (TUint32) this, *iString);
-        if (iString == NULL)
-            {
-            iString = new (ELeave) THelloTraceDllExampleString;
-            }
-        else
-            {
-            iString->SetLength(0);
-            }
-        }
-#endif  // __HELLOTRACEINTERFACEDUP_H__
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/dll/incDup/HelloTraceTypes.inl	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,75 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef __HELLOTRACETYPESINL_H__
-#define __HELLOTRACETYPESINL_H__
-
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTraceTypesTraces.h"
-#endif
-
-inline void HelloTraceTypes::SignedIntegersDup2()
-    {
-    TInt8  eightBit     = - (TInt8)  1 << 6;
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP2_8, 
-                  "8 bit signed: %hhd", eightBit );
-    
-    TInt16 sixteenBit   = - (TInt16) 1 << 14; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP2_16, 
-                  "16 bit signed: %hd", sixteenBit );
-
-    TInt32 thirtyTwoBit = - (TInt32) 1 << 30; 
-    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP2_32, 
-               "32 bit signed: %d", thirtyTwoBit );
-
-    TInt64 sixtyFourBit = - (TInt64) 1 << 62; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP2_64, 
-                  "64 bit signed: %Ld", sixtyFourBit );
-    }
-
-inline void HelloTraceTypes::UnsignedIntegersDup2()
-    {
-    TUint8  eightBit     = (TUint8)  1 << 6;
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP2_8, 
-                  "8 bit unsigned: %hhu", eightBit );
-    
-    TUint16 sixteenBit   = (TUint16) 1 << 14; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP2_16, 
-                  "16 bit unsigned: %hu", sixteenBit );
-
-    TUint32 thirtyTwoBit = (TUint32) 1 << 30; 
-    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP2_32, 
-               "32 bit unsigned: %u", thirtyTwoBit );
-
-    TUint64 sixtyFourBit = (TUint64) 1 << 62; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP2_64, 
-                  "64 bit unsigned: %Lu", sixtyFourBit );
-    }
-
-inline void HelloTraceTypes::DescriptorsDup2()
-    {
-    _LIT8(KAscii, "Some ASCII text");
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_ASCIIDUP2, "8 bit descriptor: %s", KAscii() );
-
-    _LIT16(KUnicode, "Some unicode text");    
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNICODEDUP2, "16 bit descriptor: %S", KUnicode() );
-    }
-
-#endif  // __HELLOTRACETYPESINL_H__
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/dll/incDup/HelloTraceTypesDup.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,75 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef __HELLOTRACETYPESDUP_H__
-#define __HELLOTRACETYPESDUP_H__
-
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTraceTypesDupTraces.h"
-#endif
-
-inline void HelloTraceTypes::SignedIntegersDup()
-    {
-    TInt8  eightBit     = - (TInt8)  1 << 6;
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP_8, 
-                  "8 bit signed: %hhd", eightBit );
-    
-    TInt16 sixteenBit   = - (TInt16) 1 << 14; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP_16, 
-                  "16 bit signed: %hd", sixteenBit );
-
-    TInt32 thirtyTwoBit = - (TInt32) 1 << 30; 
-    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP_32, 
-               "32 bit signed: %d", thirtyTwoBit );
-
-    TInt64 sixtyFourBit = - (TInt64) 1 << 62; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP_64, 
-                  "64 bit signed: %Ld", sixtyFourBit );
-    }
-
-inline void HelloTraceTypes::UnsignedIntegersDup()
-    {
-    TUint8  eightBit     = (TUint8)  1 << 6;
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP_8, 
-                  "8 bit unsigned: %hhu", eightBit );
-    
-    TUint16 sixteenBit   = (TUint16) 1 << 14; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP_16, 
-                  "16 bit unsigned: %hu", sixteenBit );
-
-    TUint32 thirtyTwoBit = (TUint32) 1 << 30; 
-    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP_32, 
-               "32 bit unsigned: %u", thirtyTwoBit );
-
-    TUint64 sixtyFourBit = (TUint64) 1 << 62; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP_64, 
-                  "64 bit unsigned: %Lu", sixtyFourBit );
-    }
-
-inline void HelloTraceTypes::DescriptorsDup()
-    {
-    _LIT8(KAscii, "Some ASCII text");
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_ASCIIDUP, "8 bit descriptor: %s", KAscii() );
-
-    _LIT16(KUnicode, "Some unicode text");    
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNICODEDUP, "16 bit descriptor: %S", KUnicode() );
-    }
-
-#endif  // __HELLOTRACETYPESDUP_H__
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/dll/src/HelloTraceExample.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,106 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-
-#include "HelloTraceExample.h"
-#include "HelloTraceTypes.h"
-#include "HelloTraceInterface.h"
-#include "HelloTraceFn.h"
-#include "HelloTracePanic.h"
-
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTraceExampleTraces.h"
-#endif
-
-EXPORT_C void HelloTraceExample::JustTypes()
-    {
-    OstTrace0( TRACE_EXAMPLE, HELLOTRACEEXAMPLE_JUSTTYPES, "*********************************************** " );
-    
-    HelloTraceTypes::SignedIntegers();
-    HelloTraceTypes::UnsignedIntegers();
-    HelloTraceTypes::Descriptors();    
-    }
-
-EXPORT_C void HelloTraceExample::Interface()
-    {
-    OstTrace0( TRACE_EXAMPLE, HELLOTRACEEXAMPLE_INTERFACE, "*********************************************** " );
-    
-    TVersion version = CHelloTraceInterface::Version();   
-    if (version.iMajor >= 1) 
-        {
-        CHelloTraceInterface* example = CHelloTraceInterface::NewLC();
-        example->AddCharL('H');
-        example->AddCharL('e');
-        example->AddCharL('l');
-        example->AddCharL('l');
-        example->AddCharL('o');
-        example->AddCharL('T');        
-        example->RemoveLast();        
-        example->AddCharL(' ');
-        example->AddCharL('T');
-        example->AddCharL('r');
-        example->AddCharL('a');
-        example->AddCharL('c');
-        example->AddCharL('e');
-        example->AddCharL('!');
-        CleanupStack::PopAndDestroy(example);
-        }
-    else
-        {
-        OstTrace0( TRACE_ERROR, HELLOTRACEEXAMPLE_UNSUPPORTED_VERSION, "Unsupported version!");
-        }
-    }
-
-EXPORT_C void HelloTraceExample::FnEntryExit()
-    {
-    OstTrace0( TRACE_EXAMPLE, HELLOTRACEEXAMPLE_FNENTRYEXIT, "*********************************************** " );
-       
-    CHelloTraceFn* example = CHelloTraceFn::NewLC();
-    CIdle* idle = CIdle::NewL(CActive::EPriorityIdle);
-    CleanupStack::PushL(idle);
-
-    CHelloTraceFn::StaticOutputsParamsL(1);
-   
-    example->Simple();
-    example->OutputsParams(2, CHelloTraceFn::EExample1);
-    example->OutputsParams(3, CHelloTraceFn::EExample2);
-    example->OutputsSignedIntegers(-4, -5, -6, -7);
-    example->OutputsUnsignedIntegers(8, 9, 10, 11);
-    example->OutputsTIntReturnValue();    
-    example->OutputsTInt64ReturnValue(); 
-    example->OutputsTFnEnumReturnValue();
-    example->OutputsUnknownPtrType(idle);    
-    example->OutputsUnknownRefType(*idle);
-#ifdef _DEBUG
-    example->PreProcessedFn(12);
-#else
-    example->PreProcessedFn();
-#endif
-    example->OutputMissingParams(13, 14, 15);
-
-    CleanupStack::PopAndDestroy(idle);
-    CleanupStack::PopAndDestroy(example);
-    }
-
-EXPORT_C void HelloTraceExample::PanicTrace()
-    {
-    OstTrace0( TRACE_EXAMPLE, HELLOTRACEEXAMPLE_PANIC, "*********************************************** " );
-
-    Panic(EHelloTraceDllExamplePanic);
-    }
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/dll/src/HelloTraceFn.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,183 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
- 
-#include "HelloTraceFn.h"
-#include "HelloTraceFnDup.h"
-#include "HelloTraceFn.inl"
-#include "HelloTracePanic.h"
-
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTraceFnTraces.h"
-#endif
-
-CHelloTraceFn* CHelloTraceFn::NewLC()
-    {
-    CHelloTraceFn* self = new (ELeave) CHelloTraceFn;
-    CleanupStack::PushL(self);
-    return self;
-    }
-
-CHelloTraceFn* CHelloTraceFn::NewL()
-    {
-    CHelloTraceFn* self = CHelloTraceFn::NewLC();
-    CleanupStack::Pop(self);
-    return self;
-    }
-
-CHelloTraceFn::CHelloTraceFn()
-    {
-    OstTrace1( TRACE_NORMAL, CHELLOTRACEFN_CHELLOTRACEFN_CTOR, "[0x%08x] Constructor", this );    
-    }
-
-CHelloTraceFn::~CHelloTraceFn()
-    {
-    OstTrace1( TRACE_NORMAL, CHELLOTRACEFN_CHELLOTRACEFN_DTOR, "[0x%08x] Destructor", this );    
-    }
-
-void CHelloTraceFn::Simple()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_SIMPLE_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_SIMPLE_EXIT, this );
-    }
-
-void CHelloTraceFn::OutputsParams(TInt aParam, TFnEnum aEnumParam)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSPARAMS_ENTRY, this );
-    Simple();
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSPARAMS_EXIT, this );
-    }
-
-void CHelloTraceFn::StaticOutputsParamsL(TInt aParam)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_STATICOUTPUTSPARAMS_ENTRY, NULL );
-    CHelloTraceFn* example = CHelloTraceFn::NewLC();
-    example->Simple();    
-    CleanupStack::PopAndDestroy(example);
-    OstTraceFunctionExit0( CHELLOTRACEFN_STATICOUTPUTSPARAMS_EXIT );    
-    }
-
-void CHelloTraceFn::OutputsSignedIntegers(TInt8 aParam8,   TInt16 aParam16, 
-                                          TInt32 aParam32, TInt64 aParam64)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS_EXIT, this );
-    }
-
-void CHelloTraceFn::OutputsUnsignedIntegers(TUint8 aParam8,   TUint16 aParam16, 
-                                            TUint32 aParam32, TUint64 aParam64)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS_EXIT, this );
-    }
-
-
-TInt CHelloTraceFn::OutputsTIntReturnValue()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_ENTRY, this );
-    TInt ret = KErrNone;
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_EXIT, this, ret );
-    return ret;
-    }
-
-TInt64 CHelloTraceFn::OutputsTInt64ReturnValue()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE_ENTRY, this );
-    TInt64 ret = (TInt64) 2 << 40;
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE_EXIT, this, ret );
-    return ret;
-    }
-
-CHelloTraceFn::TFnEnum CHelloTraceFn::OutputsTFnEnumReturnValue()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE_ENTRY, this );
-    TFnEnum ret = EExample1;
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE_EXIT, this, ret );
-    return ret;    
-    }
-
-CActive* CHelloTraceFn::OutputsUnknownPtrType(CActive* aActive)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_ENTRY, this );    
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_EXIT, this, (TUint) aActive );
-    return aActive;
-    }
-
-CActive& CHelloTraceFn::OutputsUnknownRefType(CActive& aActive)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE_ENTRY, this );
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE_EXIT, this, (TUint) &aActive );    
-    return aActive;
-    }
-
-// The following doesn't compile as the Trace Compiler doesn't generate
-// the correct OstTraceGenExt(...) function for it
-//void CHelloTraceFn::OutputMissingParamsBug(TInt /*aCommentParam*/, TInt)
-//    {
-//    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_ENTRY, this );
-//    // ...
-//    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_EXIT, this );    
-//    }
-
-// The following compiles and works but outputs the following warning
-// warning: HelloTraceFn.cpp, line xxx: Parameter did not have a name and was not added to trace
-// The fact that this cannot be suppressed is a known problem we're working on.
-void CHelloTraceFn::OutputMissingParams(TInt aUsedParam, TInt /*aCommentParam*/, TInt)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMS_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMS_EXIT, this );
-    }
-
-// The following doesn't work as the Trace Compiler outputs:
-// error: HelloTraceFn.cpp, line xxx: Class / function name for trace could not be determined x3
-//#ifdef _DEBUG
-//void CHelloTraceFn::PreProcessedFn(TInt aDbgParam)
-//    {
-//    OstTraceFunctionEntryExt( PRE_PROCESSED_ENTRTY_1, this );
-//#else
-//void CHelloTraceFn::PreProcessedFn()
-//    {
-//    OstTraceFunctionEntry1( PRE_PROCESSED_ENTRTY_2, this );
-//#endif
-//    Simple();
-//    OstTraceFunctionExit1( CHELLOTRACEFN_PREPROCESSEDFN_EXIT, this );
-//    }
-
-// Workaround example code until a proper fix is provided
-#ifdef _DEBUG
-void CHelloTraceFn::PreProcessedFn(TInt aDbgParam)
-    {
-    OstTraceExt2( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_ENTRY_1, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;aDbgParam=%d;this=%x", (TInt) aDbgParam, (TUint) this);
-#else
-void CHelloTraceFn::PreProcessedFn()
-    {
-    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_ENTRY_2, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
-#endif
-    Simple();
-    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_EXIT, "CHelloTraceFn::PreProcessedFn: < CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
-    }
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/dll/src/HelloTraceInterface.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,121 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-
-#include "HelloTraceInterface.h"
-#include "HelloTraceInterfaceDup.h"
-#include "HelloTraceInterface.inl"
-#include "HelloTracePanic.h"
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTraceInterfaceTraces.h"
-#endif
-
-EXPORT_C CHelloTraceInterface* CHelloTraceInterface::NewLC()
-    {
-    CHelloTraceInterface* self = new (ELeave) CHelloTraceInterface;
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    return self;
-    }
-
-EXPORT_C CHelloTraceInterface* CHelloTraceInterface::NewL()
-    {
-    CHelloTraceInterface* self = CHelloTraceInterface::NewLC();
-    CleanupStack::Pop(self);
-    return self;
-    }
-
-CHelloTraceInterface::CHelloTraceInterface()
-    {
-    OstTrace1( TRACE_NORMAL, CHELLOTRACEDLL_CHELLOTRACEDLL_CTOR, "[0x%08x]", (TUint32) this );    
-    }
-
-void CHelloTraceInterface::ConstructL()
-    {
-    iString = new (ELeave) THelloTraceDllExampleString;
-    }
-
-EXPORT_C CHelloTraceInterface::~CHelloTraceInterface()
-    {
-    delete iString;
-    OstTrace1( TRACE_NORMAL, CHELLOTRACEDLL_CHELLOTRACEDLL_DTOR, "[0x%08x]", (TUint32) this );    
-    }
-
-EXPORT_C TVersion CHelloTraceInterface::Version()
-    {
-    const TInt KMajor = 1;
-    const TInt KMinor = 0;
-    const TInt KBuild = 1;
-    TVersion version = TVersion(KMajor, KMinor, KBuild);
-    OstTraceExt1( TRACE_BORDER, CHELLOTRACEDLL_VERSION, "CHelloTraceInterface::Version = %S", version.Name());   
-    return version;
-    }
-
-EXPORT_C const TPtrC CHelloTraceInterface::String() const
-    {
-    __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
-
-    OstTraceDefExt2( OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CHELLOTRACEDLL_STRING, 
-                     "[0x%08x] Returned %S", (TUint32) this, *iString);   
-    return *iString;
-    }
-
-EXPORT_C void CHelloTraceInterface::AddCharL(const TChar& aChar)
-    {
-    __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
-
-    OstTraceExt3( TRACE_BORDER, CHELLOTRACEDLL_ADDCHARL, 
-                  "[0x%08x] Adding %d to %S", (TUint32) this, (TInt32) aChar, *iString);   
-    if (iString->Length() >= KHelloTraceDllBufferLength)
-        {
-        OstTrace1( TRACE_ERROR, CHELLOTRACEDLL_ADDCHARL_ERR,
-                   "[0x%08x] Not enough space to add character", (TUint32) this);
-        User::Leave( KErrTooBig);
-        }
-    iString->Append(aChar);
-    }
-
-EXPORT_C void CHelloTraceInterface::RemoveLast()
-    {
-    __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
-
-    OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_REMOVELAST, 
-                  "[0x%08x] Attempting to remove last character from %S", (TUint32) this, *iString);
-    if (iString->Length() > 0)
-        {
-        iString->SetLength(iString->Length() - 1);
-        }
-    else
-        {
-        OstTrace1( TRACE_WARNING, CHELLOTRACEDLL_REMOVELAST_WARN, "[0x%08x] String already empty", (TUint32) this);   
-        }
-    }
-
-EXPORT_C void CHelloTraceInterface::ResetString()
-    {
-    OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_RESETSTRING, "[0x%08x] Reseting string %S", (TUint32) this, *iString);
-    if (iString == NULL)
-        {
-        iString = new (ELeave) THelloTraceDllExampleString;
-        }
-    else
-        {
-        iString->SetLength(0);
-        }
-    }
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/dll/src/HelloTracePanic.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#include <e32std.h>		 // GLDEF_C
-
-#include "HelloTracePanic.h"
-
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTracePanicTraces.h"
-#endif
-
-GLDEF_C void Panic(THelloTraceDllPanic aPanic)
-    {
-    OstTrace1( TRACE_FATAL, PANIC, "Panic(%{THelloTraceDllPanic})", (TUint) aPanic );    
-    User::Panic(_L("HelloTraceDll"), aPanic);
-    }
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/dll/src/HelloTraceTypes.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,76 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-
-#include <e32std.h>
-
-#include "HelloTraceTypes.h"
-#include "HelloTraceTypesDup.h"
-#include "HelloTraceTypes.inl"
-
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTraceTypesTraces.h"
-#endif
-
-void HelloTraceTypes::SignedIntegers()
-    {
-    TInt8  eightBit     = - (TInt8)  1 << 6;
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS_8, 
-                  "8 bit signed: %hhd", eightBit );
-    
-    TInt16 sixteenBit   = - (TInt16) 1 << 14; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS_16, 
-                  "16 bit signed: %hd", sixteenBit );
-
-    TInt32 thirtyTwoBit = - (TInt32) 1 << 30; 
-    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS_32, 
-               "32 bit signed: %d", thirtyTwoBit );
-
-    TInt64 sixtyFourBit = - (TInt64) 1 << 62; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS_64, 
-                  "64 bit signed: %Ld", sixtyFourBit );
-    }
-
-void HelloTraceTypes::UnsignedIntegers()
-    {
-    TUint8  eightBit     = (TUint8)  1 << 6;
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS_8, 
-                  "8 bit unsigned: %hhu", eightBit );
-    
-    TUint16 sixteenBit   = (TUint16) 1 << 14; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS_16, 
-                  "16 bit unsigned: %hu", sixteenBit );
-
-    TUint32 thirtyTwoBit = (TUint32) 1 << 30; 
-    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS_32, 
-               "32 bit unsigned: %u", thirtyTwoBit );
-
-    TUint64 sixtyFourBit = (TUint64) 1 << 62; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS_64, 
-                  "64 bit unsigned: %Lu", sixtyFourBit );
-    }
-
-void HelloTraceTypes::Descriptors()
-    {
-    _LIT8(KAscii, "Some ASCII text");
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_ASCII, "8 bit descriptor: %s", KAscii() );
-
-    _LIT16(KUnicode, "Some unicode text");    
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNICODE, "16 bit descriptor: %S", KUnicode() );
-    }
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/dll/traces/trace.properties	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<trace_properties>
-<enum name="TFnEnum">
-<value id="0">EExample1</value>
-<value id="2">EExample2</value>
-</enum>
-<enum name="THelloTraceDllPanic">
-<value id="0">EHelloTraceDllExamplePanic</value>
-<value id="1">EHelloTraceDllNullPointer</value>
-</enum>
-<file>../incDup/HelloTraceInterfaceDup.h</file>
-<file>../incDup/HelloTraceInterface.inl</file>
-<file>../incDup/HelloTraceFnDup.h</file>
-<file>../incDup/HelloTraceFn.inl</file>
-<file>../incDup/HelloTraceTypesDup.h</file>
-<file>../incDup/HelloTraceTypes.inl</file>
-</trace_properties>
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/group/bld.inf	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,19 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-#include "../dll/group/bld.inf"
-#include "../console/group/bld.inf"
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/console/group/HelloTraceConsole.mmp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-
-TARGET		  HelloTraceConsole.exe
-TARGETTYPE	  exe
-UID			  0 0xE40349E4
-
-OS_LAYER_SYSTEMINCLUDE
-USERINCLUDE	   ../inc
-USERINCLUDE    ../../dll/inc
-USERINCLUDE    ../traces
-
-SOURCEPATH	  ../src
-SOURCE		  HelloTraceConsole.cpp
-
-LIBRARY		  euser.lib
-LIBRARY       HelloTraceDll.lib
-
-#ifdef ENABLE_ABIV2_MODE
-DEBUGGABLE_UDEBONLY
-#endif
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/console/group/bld.inf	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-
-PRJ_PLATFORMS
-DEFAULT
-
-PRJ_EXPORTS
-hellotraceconsole.iby             CORE_OS_LAYER_IBY_EXPORT_PATH(hellotraceconsole.iby)
-
-PRJ_MMPFILES
-HelloTraceConsole.mmp
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/console/group/hellotraceconsole.iby	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,24 +0,0 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "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:
-//
-// Description:
-// ROM build file for tracecore project
-
-#ifndef HELLOTRACECONSOLE_IBY
-#define HELLOTRACECONSOLE_IBY
-
-#include <core\os\hellotracedll.iby>
-
-file=ABI_DIR\BUILD_DIR\hellotraceconsole.exe    Sys\Bin\hellotraceconsole.exe
-
-#endif //HELLOTRACECONSOLE_IBY
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/console/inc/HelloTraceConsole.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef __HELLOTRACECONSOLE_H__
-#define __HELLOTRACECONSOLE_H__
-
-//  Include Files
-
-#include <e32base.h>
-
-//  Function Prototypes
-
-GLDEF_C TInt E32Main();
-
-#endif  // __HELLOTRACECONSOLE_H__
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/console/src/HelloTraceConsole.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,124 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#include <e32cons.h>			// Console
-
-#include "HelloTraceConsole.h"
-#include "HelloTraceExample.h"
-
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTraceConsoleTraces.h"
-#endif
-
-
-_LIT(KTextConsoleTitle, "HelloTrace");
-_LIT(KTextPressAnyKey, " [press any key]\n");
-
-LOCAL_D CConsoleBase* console; // write all messages to this
-
-LOCAL_C void DoExamples()
-    {
-    TInt err = KErrNone;
-
-    console->Printf(_L("Before main tracing examples ...\n"));
-
-    console->Printf(_L(" Before type examples ..."));
-    console->Printf(KTextPressAnyKey);
-    console->Getch();
-    TRAP(err, HelloTraceExample::JustTypes());    
-    if (err)
-        console->Printf(_L(" Failed with error %d\n"), err);
-
-    console->Printf(_L(" Before Interface examples ..."));
-    console->Printf(KTextPressAnyKey);
-    console->Getch();
-    TRAP(err, HelloTraceExample::Interface());    
-    if (err)
-        console->Printf(_L(" Failed with error %d\n"), err);
-    
-    console->Printf(_L(" Before FnEntryExit examples ..."));
-    console->Printf(KTextPressAnyKey);
-    console->Getch();
-    TRAP(err, HelloTraceExample::FnEntryExit());    
-    if (err)
-        console->Printf(_L(" Failed with error %d\n"), err);    
-    }
-
-LOCAL_C void DoStartL()
-    {
-    // Create active scheduler (to run active objects)
-    CActiveScheduler* scheduler = new (ELeave) CActiveScheduler();
-    CleanupStack::PushL(scheduler);
-    CActiveScheduler::Install(scheduler);
-
-    DoExamples();
-    
-    // Delete active scheduler
-    CleanupStack::PopAndDestroy(scheduler);
-    }
-
-//  Global Functions
-
-GLDEF_C TInt E32Main()
-    {
-    OstTraceFunctionEntry0( E32MAIN_ENTRY );
-    
-    // Create cleanup stack
-    __UHEAP_MARK;
-    CTrapCleanup* cleanup = CTrapCleanup::New();
-
-    // Create output console
-    TRAPD(createError, 
-          console = Console::NewL(KTextConsoleTitle, 
-                                  TSize(KConsFullScreen, KConsFullScreen)));    
-    if (createError)
-        {
-        delete cleanup;
-        OstTrace1( TRACE_ERROR, E32MAIN_CREATE_ERROR, "Failed to create console error: %d", createError);
-        OstTraceFunctionExit0( E32MAIN_EXIT_ERR );
-        return createError;
-        }
-
-    TRAPD(mainError, DoStartL());    
-    if (mainError)
-        {
-        OstTrace1( TRACE_ERROR, E32MAIN_START_ERROR, "DoStartL failed with error: %d", mainError);
-        console->Printf(_L("DoStartL failed with error: %d\n\n"), mainError);
-        }
-    else 
-        {
-        console->Printf(_L("Before panic tracing example ..."));
-        console->Printf(KTextPressAnyKey);
-        console->Getch();
-    
-        OstTrace0( TRACE_FLOW, E32MAIN_BEFORE_PANIC, "About to cause a panic ..." );
-        HelloTraceExample::PanicTrace();
-        
-        console->Printf(KTextPressAnyKey);
-        console->Getch();
-        }
-
-    delete console;
-    delete cleanup;
-    __UHEAP_MARKEND;
-    
-    OstTraceFunctionExit0( E32MAIN_EXIT );
-    return KErrNone;
-    }
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/dll/bwins/HelloTraceDllu.def	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,14 +0,0 @@
-EXPORTS
-	?Version@CHelloTraceInterface@@SA?AVTVersion@@XZ @ 1 NONAME ; class TVersion CHelloTraceInterface::Version(void)
-	?NewLC@CHelloTraceInterface@@SAPAV1@XZ @ 2 NONAME ; class CHelloTraceInterface * CHelloTraceInterface::NewLC(void)
-	?JustTypes@HelloTraceExample@@SAXXZ @ 3 NONAME ; void HelloTraceExample::JustTypes(void)
-	?Interface@HelloTraceExample@@SAXXZ @ 4 NONAME ; void HelloTraceExample::Interface(void)
-	?FnEntryExit@HelloTraceExample@@SAXXZ @ 5 NONAME ; void HelloTraceExample::FnEntryExit(void)
-	?ResetString@CHelloTraceInterface@@QAEXXZ @ 6 NONAME ; void CHelloTraceInterface::ResetString(void)
-	?AddCharL@CHelloTraceInterface@@QAEXABVTChar@@@Z @ 7 NONAME ; void CHelloTraceInterface::AddCharL(class TChar const &)
-	?PanicTrace@HelloTraceExample@@SAXXZ @ 8 NONAME ; void HelloTraceExample::PanicTrace(void)
-	??1CHelloTraceInterface@@UAE@XZ @ 9 NONAME ; CHelloTraceInterface::~CHelloTraceInterface(void)
-	?String@CHelloTraceInterface@@QBE?BVTPtrC16@@XZ @ 10 NONAME ; class TPtrC16 const CHelloTraceInterface::String(void) const
-	?RemoveLast@CHelloTraceInterface@@QAEXXZ @ 11 NONAME ; void CHelloTraceInterface::RemoveLast(void)
-	?NewL@CHelloTraceInterface@@SAPAV1@XZ @ 12 NONAME ; class CHelloTraceInterface * CHelloTraceInterface::NewL(void)
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/dll/eabi/HelloTraceDllu.def	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,20 +0,0 @@
-EXPORTS
-	_ZN17HelloTraceExample10PanicTraceEv @ 1 NONAME
-	_ZN17HelloTraceExample11FnEntryExitEv @ 2 NONAME
-	_ZN17HelloTraceExample9InterfaceEv @ 3 NONAME
-	_ZN17HelloTraceExample9JustTypesEv @ 4 NONAME
-	_ZN20CHelloTraceInterface10RemoveLastEv @ 5 NONAME
-	_ZN20CHelloTraceInterface11ResetStringEv @ 6 NONAME
-	_ZN20CHelloTraceInterface4NewLEv @ 7 NONAME
-	_ZN20CHelloTraceInterface5NewLCEv @ 8 NONAME
-	_ZN20CHelloTraceInterface7VersionEv @ 9 NONAME
-	_ZN20CHelloTraceInterface8AddCharLERK5TChar @ 10 NONAME
-	_ZN20CHelloTraceInterfaceD0Ev @ 11 NONAME
-	_ZN20CHelloTraceInterfaceD1Ev @ 12 NONAME
-	_ZN20CHelloTraceInterfaceD2Ev @ 13 NONAME
-	_ZNK20CHelloTraceInterface6StringEv @ 14 NONAME
-	_ZTI13CHelloTraceFn @ 15 NONAME
-	_ZTI20CHelloTraceInterface @ 16 NONAME
-	_ZTV13CHelloTraceFn @ 17 NONAME
-	_ZTV20CHelloTraceInterface @ 18 NONAME
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/dll/group/HelloTraceDll.mmp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-
-TARGET		  HelloTraceDll.dll
-TARGETTYPE	  dll
-UID			  0x1000008d 0xE43DF43E
-CAPABILITY    ReadUserData
-
-OS_LAYER_SYSTEMINCLUDE
-USERINCLUDE  ../inc ../incDup
-USERINCLUDE  ../traces/HelloTraceDll_dll
-
-SOURCEPATH	 ../src
-SOURCE       HelloTraceExample.cpp 
-SOURCE       HelloTraceTypes.cpp
-SOURCE       HelloTraceInterface.cpp 
-SOURCE       HelloTraceFn.cpp 
-SOURCE       HelloTracePanic.cpp 
-
-LIBRARY		 euser.lib
-
-#ifdef ENABLE_ABIV2_MODE
-DEBUGGABLE_UDEBONLY
-#endif
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/dll/group/bld.inf	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-
-PRJ_PLATFORMS
-DEFAULT
-
-PRJ_EXPORTS
-hellotracedll.iby             CORE_OS_LAYER_IBY_EXPORT_PATH(hellotracedll.iby)
-
-PRJ_MMPFILES
-HelloTraceDll.mmp
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/dll/group/hellotracedll.iby	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,22 +0,0 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "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:
-//
-// Description:
-// ROM build file for tracecore project
-
-#ifndef HELLOTRACEDLL_IBY
-#define HELLOTRACEDLL_IBY
-
-file=ABI_DIR\BUILD_DIR\hellotracedll.dll        Sys\Bin\hellotracedll.dll
-
-#endif //HELLOTRACEDLL_IBY
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/dll/inc/HelloTraceExample.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef __HELLOTRACEEXAMPLE_H__
-#define __HELLOTRACEEXAMPLE_H__
-
-#include <e32std.h>
-
-class HelloTraceExample
-    {
-public:
-    IMPORT_C static void JustTypes();    
-    IMPORT_C static void Interface();    
-    IMPORT_C static void FnEntryExit();    
-    IMPORT_C static void PanicTrace();    
-
-    // @TODO add examples for state macros
-    // @TODO add examples for event macros
-    // @TODO add examples for OstTraceData
-    // @TODO add compile-time selector examples
-    // @TODO add macro wrapper examples
-    };
-
-#endif  // __HELLOTRACEEXAMPLE_H__
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/dll/inc/HelloTraceFn.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,122 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef HELLOTRACEFN_H_
-#define HELLOTRACEFN_H_
-
-#include <e32base.h>    // CBase
-
-class CHelloTraceFn : public CBase
-    {
-public:
-    
-    // Note the Trace Builder will only parse this if it's in a cpp file
-    // but not from here :(
-    // Also if you add a new enum you need to reparse the enum - it doesn't
-    // get automatically reparsed by the Trace Compiler :(
-    enum TFnEnum
-        {
-        EExample1,
-        EExample2 = 2, 
-        // EExample3 = EExample2 + 1, // The Trace Builder can't parse this :(
-        };
-    
-public:
-    static CHelloTraceFn* NewL();
-    static CHelloTraceFn* NewLC();
-    ~CHelloTraceFn();
-   
-public: // Fn entry / exit tracing examples 
-    void Simple();
-    void OutputsParams(TInt aParam, TFnEnum aEnumParam);
-    void OutputsSignedIntegers(TInt8 aParam8,   TInt16 aParam16, 
-                               TInt32 aParam32, TInt64 aParam64);
-    void OutputsUnsignedIntegers(TUint8 aParam8,   TUint16 aParam16, 
-                                 TUint32 aParam32, TUint64 aParam64);
-     
-    TInt OutputsTIntReturnValue();
-    TInt64 OutputsTInt64ReturnValue();
-    TFnEnum OutputsTFnEnumReturnValue();
-
-    CActive* OutputsUnknownPtrType(CActive* aActive);
-    CActive& OutputsUnknownRefType(CActive& aActive);
-    
-    void OutputMissingParams(TInt aUsedParam, TInt aCommentParam, TInt aMissingParam);
-
-#ifdef _DEBUG    
-    void PreProcessedFn(TInt aDbgParam);
-#else
-    void PreProcessedFn();
-#endif
-    
-    static void StaticOutputsParamsL(TInt aParam);  
-    
-    // duplicate all the function and put the impl in the header file HelloTraceFnDup.h
-    void SimpleDup();
-    void OutputsParamsDup(TInt aParam, TFnEnum aEnumParam);
-    void OutputsSignedIntegersDup(TInt8 aParam8,   TInt16 aParam16, 
-                               TInt32 aParam32, TInt64 aParam64);
-    void OutputsUnsignedIntegersDup(TUint8 aParam8,   TUint16 aParam16, 
-                                 TUint32 aParam32, TUint64 aParam64);
-     
-    TInt OutputsTIntReturnValueDup();
-    TInt64 OutputsTInt64ReturnValueDup();
-    TFnEnum OutputsTFnEnumReturnValueDup();
-
-    CActive* OutputsUnknownPtrTypeDup(CActive* aActive);
-    CActive& OutputsUnknownRefTypeDup(CActive& aActive);
-    
-    void OutputMissingParamsDup(TInt aUsedParam, TInt aCommentParam, TInt aMissingParam);
-
-#ifdef _DEBUG    
-    void PreProcessedFnDup(TInt aDbgParam);
-#else
-    void PreProcessedFnDup();
-#endif
-    static void StaticOutputsParamsDupL(TInt aParam);  
-    
-    // duplicate all the function again and put the impl in the header file HelloTraceFnDup2.h
-    void SimpleDup2();
-    void OutputsParamsDup2(TInt aParam, TFnEnum aEnumParam);
-    void OutputsSignedIntegersDup2(TInt8 aParam8,   TInt16 aParam16, 
-                               TInt32 aParam32, TInt64 aParam64);
-    void OutputsUnsignedIntegersDup2(TUint8 aParam8,   TUint16 aParam16, 
-                                 TUint32 aParam32, TUint64 aParam64);
-     
-    TInt OutputsTIntReturnValueDup2();
-    TInt64 OutputsTInt64ReturnValueDup2();
-    TFnEnum OutputsTFnEnumReturnValueDup2();
-
-    CActive* OutputsUnknownPtrTypeDup2(CActive* aActive);
-    CActive& OutputsUnknownRefTypeDup2(CActive& aActive);
-    
-    void OutputMissingParamsDup2(TInt aUsedParam, TInt aCommentParam, TInt aMissingParam);
-
-#ifdef _DEBUG    
-    void PreProcessedFnDup2(TInt aDbgParam);
-#else
-    void PreProcessedFnDup2();
-#endif
-    static void StaticOutputsParamsDup2L(TInt aParam);  
-
-
-private:
-    CHelloTraceFn();
-    };
-
-#endif /* HELLOTRACEFN_H_ */
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/dll/inc/HelloTraceInterface.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,63 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef __HELLOTRACEINTERFACE_H__
-#define __HELLOTRACEINTERFACE_H__
-
-#include <e32base.h>	// CBase
-#include <e32std.h>	 // TBuf
-
-const TInt KHelloTraceDllBufferLength = 10;
-typedef TBuf<KHelloTraceDllBufferLength> THelloTraceDllExampleString;
-
-class CHelloTraceInterface : public CBase
-    {
-public:
-    IMPORT_C static CHelloTraceInterface* NewL();
-    IMPORT_C static CHelloTraceInterface* NewLC();
-    IMPORT_C ~CHelloTraceInterface();
-
-public:
-    IMPORT_C static TVersion Version();
-    IMPORT_C const TPtrC String() const;
-    IMPORT_C void AddCharL(const TChar& aChar);
-    IMPORT_C void RemoveLast();
-    IMPORT_C void ResetString();
-    
-    IMPORT_C static TVersion VersionDup();
-    IMPORT_C const TPtrC StringDup() const;
-    IMPORT_C void AddCharDupL(const TChar& aChar);
-    IMPORT_C void RemoveLastDup();
-    IMPORT_C void ResetStringDup();
-
-    IMPORT_C static TVersion VersionDup2();
-    IMPORT_C const TPtrC StringDup2() const;
-    IMPORT_C void AddCharDup2L(const TChar& aChar);
-    IMPORT_C void RemoveLastDup2();
-    IMPORT_C void ResetStringDup2();
-private:
-    CHelloTraceInterface();
-    void ConstructL();
-
-private:
-    // data
-    THelloTraceDllExampleString* iString;
-    };
-
-#endif  // __HELLOTRACEINTERFACE_H__
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/dll/inc/HelloTracePanic.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef __HELLOTRACEDLL_PAN__
-#define __HELLOTRACEDLL_PAN__
-
-//  Data Types
-
-enum THelloTraceDllPanic
-    {
-    EHelloTraceDllExamplePanic,
-    EHelloTraceDllNullPointer,
-    };
-
-//  Function Prototypes
-
-GLREF_C void Panic(THelloTraceDllPanic aPanic);
-
-#endif  // __HELLOTRACEDLL_PAN__
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/dll/inc/HelloTraceTypes.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef __HELLOTRACETYPES_H__
-#define __HELLOTRACETYPES_H__
-
-class HelloTraceTypes
-    {
-public:
-    static void SignedIntegers();
-    static void UnsignedIntegers();
-    static void Descriptors();
-    
-    static void SignedIntegersDup();
-    static void UnsignedIntegersDup();
-    static void DescriptorsDup();
-        
-    static void SignedIntegersDup2();
-    static void UnsignedIntegersDup2();
-    static void DescriptorsDup2();
-    };
-
-#endif  // __HELLOTRACETYPES_H__
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/dll/incDup/HelloTraceFn.inl	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,157 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef HELLOTRACEFNINL_H_
-#define HELLOTRACEFNINL_H_
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTraceFnTraces.h"
-#endif
-
-inline void CHelloTraceFn::SimpleDup2()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_SIMPLE_DUP2_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_SIMPLE_DUP2_EXIT, this );
-    }
-
-inline void CHelloTraceFn::OutputsParamsDup2(TInt aParam, TFnEnum aEnumParam)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSPARAMS_DUP2_ENTRY, this );
-    Simple();
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSPARAMS_DUP2_EXIT, this );
-    }
-
-inline void CHelloTraceFn::StaticOutputsParamsDup2L(TInt aParam)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_STATICOUTPUTSPARAMS_DUP2_ENTRY, NULL );
-    CHelloTraceFn* example = CHelloTraceFn::NewLC();
-    example->SimpleDup2();    
-    CleanupStack::PopAndDestroy(example);
-    OstTraceFunctionExit0( CHELLOTRACEFN_STATICOUTPUTSPARAMS_DUP2_EXIT );    
-    }
-
-inline void CHelloTraceFn::OutputsSignedIntegersDup2(TInt8 aParam8,   TInt16 aParam16, 
-                                          TInt32 aParam32, TInt64 aParam64)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS_DUP2_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS_DUP2_EXIT, this );
-    }
-
-inline void CHelloTraceFn::OutputsUnsignedIntegersDup2(TUint8 aParam8,   TUint16 aParam16, 
-                                            TUint32 aParam32, TUint64 aParam64)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS_DUP2_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS_DUP2_EXIT, this );
-    }
-
-
-inline TInt CHelloTraceFn::OutputsTIntReturnValueDup2()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_DUP2_ENTRY, this );
-    TInt ret = KErrNone;
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_DUP2_EXIT, this, ret );
-    return ret;
-    }
-
-inline TInt64 CHelloTraceFn::OutputsTInt64ReturnValueDup2()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE_DUP2_ENTRY, this );
-    TInt64 ret = (TInt64) 2 << 40;
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE_DUP2_EXIT, this, ret );
-    return ret;
-    }
-
-inline CHelloTraceFn::TFnEnum CHelloTraceFn::OutputsTFnEnumReturnValueDup2()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE_DUP2_ENTRY, this );
-    TFnEnum ret = EExample1;
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE_DUP2_EXIT, this, ret );
-    return ret;    
-    }
-
-inline CActive* CHelloTraceFn::OutputsUnknownPtrTypeDup2(CActive* aActive)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_DUP2_ENTRY, this );    
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_DUP2_EXIT, this, (TUint) aActive );
-    return aActive;
-    }
-
-inline CActive& CHelloTraceFn::OutputsUnknownRefTypeDup2(CActive& aActive)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE_DUP2_ENTRY, this );
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE_DUP2_EXIT, this, (TUint) &aActive );    
-    return aActive;
-    }
-
-// The following doesn't compile as the Trace Compiler doesn't generate
-// the correct OstTraceGenExt(...) function for it
-//void CHelloTraceFn::OutputMissingParamsBug(TInt /*aCommentParam*/, TInt)
-//    {
-//    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_ENTRY, this );
-//    // ...
-//    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_EXIT, this );    
-//    }
-
-// The following compiles and works but outputs the following warning
-// warning: HelloTraceFn.cpp, line xxx: Parameter did not have a name and was not added to trace
-// The fact that this cannot be suppressed is a known problem we're working on.
-inline void CHelloTraceFn::OutputMissingParamsDup2(TInt aUsedParam, TInt /*aCommentParam*/, TInt)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMS_DUP2_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMS_DUP2_EXIT, this );
-    }
-
-// The following doesn't work as the Trace Compiler outputs:
-// error: HelloTraceFn.cpp, line xxx: Class / function name for trace could not be determined x3
-//#ifdef _DEBUG
-//void CHelloTraceFn::PreProcessedFn(TInt aDbgParam)
-//    {
-//    OstTraceFunctionEntryExt( PRE_PROCESSED_ENTRTY_1, this );
-//#else
-//void CHelloTraceFn::PreProcessedFn()
-//    {
-//    OstTraceFunctionEntry1( PRE_PROCESSED_ENTRTY_2, this );
-//#endif
-//    Simple();
-//    OstTraceFunctionExit1( CHELLOTRACEFN_PREPROCESSEDFN_EXIT, this );
-//    }
-
-// Workaround example code until a proper fix is provided
-#ifdef _DEBUG
-inline void CHelloTraceFn::PreProcessedFnDup2(TInt aDbgParam)
-    {
-    OstTraceExt2( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_DUP2_ENTRY_1, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;aDbgParam=%d;this=%x", (TInt) aDbgParam, (TUint) this);
-#else
-    inline void CHelloTraceFn::PreProcessedFnDup2()
-    {
-    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_DUP2_ENTRY_2, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
-#endif
-    SimpleDup2();
-    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_DUP2_EXIT, "CHelloTraceFn::PreProcessedFn: < CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
-    }
-
-#endif /* HELLOTRACEFNINL_H_ */
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/dll/incDup/HelloTraceFnDup.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,157 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef HELLOTRACEFNDUP_H_
-#define HELLOTRACEFNDUP_H_
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTraceFnDupTraces.h"
-#endif
-
-inline void CHelloTraceFn::SimpleDup()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_SIMPLE_DUP_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_SIMPLE_DUP_EXIT, this );
-    }
-
-inline void CHelloTraceFn::OutputsParamsDup(TInt aParam, TFnEnum aEnumParam)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSPARAMS_DUP_ENTRY, this );
-    Simple();
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSPARAMS_DUP_EXIT, this );
-    }
-
-inline void CHelloTraceFn::StaticOutputsParamsDupL(TInt aParam)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_STATICOUTPUTSPARAMS_DUP_ENTRY, NULL );
-    CHelloTraceFn* example = CHelloTraceFn::NewLC();
-    example->SimpleDup();    
-    CleanupStack::PopAndDestroy(example);
-    OstTraceFunctionExit0( CHELLOTRACEFN_STATICOUTPUTSPARAMS_DUP_EXIT );    
-    }
-
-inline void CHelloTraceFn::OutputsSignedIntegersDup(TInt8 aParam8,   TInt16 aParam16, 
-                                          TInt32 aParam32, TInt64 aParam64)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS_DUP_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS_DUP_EXIT, this );
-    }
-
-void CHelloTraceFn::OutputsUnsignedIntegersDup(TUint8 aParam8,   TUint16 aParam16, 
-                                            TUint32 aParam32, TUint64 aParam64)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS_DUP_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS_DUP_EXIT, this );
-    }
-
-
-inline TInt CHelloTraceFn::OutputsTIntReturnValueDup()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_DUP_ENTRY, this );
-    TInt ret = KErrNone;
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_DUP_EXIT, this, ret );
-    return ret;
-    }
-
-inline TInt64 CHelloTraceFn::OutputsTInt64ReturnValueDup()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE_DUP_ENTRY, this );
-    TInt64 ret = (TInt64) 2 << 40;
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE_DUP_EXIT, this, ret );
-    return ret;
-    }
-
-inline CHelloTraceFn::TFnEnum CHelloTraceFn::OutputsTFnEnumReturnValueDup()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE_DUP_ENTRY, this );
-    TFnEnum ret = EExample1;
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE_DUP_EXIT, this, ret );
-    return ret;    
-    }
-
-inline CActive* CHelloTraceFn::OutputsUnknownPtrTypeDup(CActive* aActive)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_DUP_ENTRY, this );    
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_DUP_EXIT, this, (TUint) aActive );
-    return aActive;
-    }
-
-inline CActive& CHelloTraceFn::OutputsUnknownRefTypeDup(CActive& aActive)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE_DUP_ENTRY, this );
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE_DUP_EXIT, this, (TUint) &aActive );    
-    return aActive;
-    }
-
-// The following doesn't compile as the Trace Compiler doesn't generate
-// the correct OstTraceGenExt(...) function for it
-//void CHelloTraceFn::OutputMissingParamsBug(TInt /*aCommentParam*/, TInt)
-//    {
-//    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_ENTRY, this );
-//    // ...
-//    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_EXIT, this );    
-//    }
-
-// The following compiles and works but outputs the following warning
-// warning: HelloTraceFn.cpp, line xxx: Parameter did not have a name and was not added to trace
-// The fact that this cannot be suppressed is a known problem we're working on.
-inline void CHelloTraceFn::OutputMissingParamsDup(TInt aUsedParam, TInt /*aCommentParam*/, TInt)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMS_DUP_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMS_DUP_EXIT, this );
-    }
-
-// The following doesn't work as the Trace Compiler outputs:
-// error: HelloTraceFn.cpp, line xxx: Class / function name for trace could not be determined x3
-//#ifdef _DEBUG
-//void CHelloTraceFn::PreProcessedFn(TInt aDbgParam)
-//    {
-//    OstTraceFunctionEntryExt( PRE_PROCESSED_ENTRTY_1, this );
-//#else
-//void CHelloTraceFn::PreProcessedFn()
-//    {
-//    OstTraceFunctionEntry1( PRE_PROCESSED_ENTRTY_2, this );
-//#endif
-//    Simple();
-//    OstTraceFunctionExit1( CHELLOTRACEFN_PREPROCESSEDFN_EXIT, this );
-//    }
-
-// Workaround example code until a proper fix is provided
-#ifdef _DEBUG
-inline void CHelloTraceFn::PreProcessedFnDup(TInt aDbgParam)
-    {
-    OstTraceExt2( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_DUP_ENTRY_1, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;aDbgParam=%d;this=%x", (TInt) aDbgParam, (TUint) this);
-#else
-    inline void CHelloTraceFn::PreProcessedFnDup()
-    {
-    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_DUP_ENTRY_2, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
-#endif
-    SimpleDup();
-    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_DUP_EXIT, "CHelloTraceFn::PreProcessedFn: < CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
-    }
-
-#endif /* HELLOTRACEFNDUP_H_ */
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/dll/incDup/HelloTraceInterface.inl	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,91 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef __HELLOTRACEINTERFACEINL_H__
-#define __HELLOTRACEINTERFACEINL_H__
-
-#include "HelloTracePanic.h"
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTraceInterfaceTraces.h"
-#endif
-
- inline EXPORT_C TVersion CHelloTraceInterface::VersionDup2()
-        {
-        const TInt KMajor = 1;
-        const TInt KMinor = 0;
-        const TInt KBuild = 1;
-        TVersion version = TVersion(KMajor, KMinor, KBuild);
-        OstTraceExt1( TRACE_BORDER, CHELLOTRACEDLL_VERSION_DUP2, "CHelloTraceInterface::Version = %S", version.Name());   
-        return version;
-        }
-
- inline EXPORT_C const TPtrC CHelloTraceInterface::StringDup2() const
-        {
-        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
-
-        OstTraceDefExt2( OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CHELLOTRACEDLL_STRING_DUP2, 
-                         "[0x%08x] Returned %S", (TUint32) this, *iString);   
-        return *iString;
-        }
-
- inline EXPORT_C void CHelloTraceInterface::AddCharDup2L(const TChar& aChar)
-        {
-        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
-
-        OstTraceExt3( TRACE_BORDER, CHELLOTRACEDLL_ADDCHARL_DUP2, 
-                      "[0x%08x] Adding %d to %S", (TUint32) this, (TInt32) aChar, *iString);   
-        if (iString->Length() >= KHelloTraceDllBufferLength)
-            {
-            OstTrace1( TRACE_ERROR, CHELLOTRACEDLL_ADDCHARL_ERR_DUP2,
-                       "[0x%08x] Not enough space to add character", (TUint32) this);
-            User::Leave( KErrTooBig);
-            }
-        iString->Append(aChar);
-        }
-
- inline EXPORT_C void CHelloTraceInterface::RemoveLastDup2()
-        {
-        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
-
-        OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_REMOVELAST_DUP2, 
-                      "[0x%08x] Attempting to remove last character from %S", (TUint32) this, *iString);
-        if (iString->Length() > 0)
-            {
-            iString->SetLength(iString->Length() - 1);
-            }
-        else
-            {
-            OstTrace1( TRACE_WARNING, CHELLOTRACEDLL_REMOVELAST_WARN_DUP2, "[0x%08x] String already empty", (TUint32) this);   
-            }
-        }
-
- inline EXPORT_C void CHelloTraceInterface::ResetStringDup2()
-        {
-        OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_RESETSTRING_DUP2, "[0x%08x] Reseting string %S", (TUint32) this, *iString);
-        if (iString == NULL)
-            {
-            iString = new (ELeave) THelloTraceDllExampleString;
-            }
-        else
-            {
-            iString->SetLength(0);
-            }
-        }
-#endif  // __HELLOTRACEINTERFACEINL_H__
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/dll/incDup/HelloTraceInterfaceDup.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,91 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef __HELLOTRACEINTERFACEDUP_H__
-#define __HELLOTRACEINTERFACEDUP_H__
-
-#include "HelloTracePanic.h"
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTraceInterfaceDupTraces.h"
-#endif
-
- inline EXPORT_C TVersion CHelloTraceInterface::VersionDup()
-        {
-        const TInt KMajor = 1;
-        const TInt KMinor = 0;
-        const TInt KBuild = 1;
-        TVersion version = TVersion(KMajor, KMinor, KBuild);
-        OstTraceExt1( TRACE_BORDER, CHELLOTRACEDLL_VERSION_DUP, "CHelloTraceInterface::Version = %S", version.Name());   
-        return version;
-        }
-
- inline EXPORT_C const TPtrC CHelloTraceInterface::StringDup() const
-        {
-        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
-
-        OstTraceDefExt2( OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CHELLOTRACEDLL_STRING_DUP, 
-                         "[0x%08x] Returned %S", (TUint32) this, *iString);   
-        return *iString;
-        }
-
- inline EXPORT_C void CHelloTraceInterface::AddCharDupL(const TChar& aChar)
-        {
-        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
-
-        OstTraceExt3( TRACE_BORDER, CHELLOTRACEDLL_ADDCHARL_DUP, 
-                      "[0x%08x] Adding %d to %S", (TUint32) this, (TInt32) aChar, *iString);   
-        if (iString->Length() >= KHelloTraceDllBufferLength)
-            {
-            OstTrace1( TRACE_ERROR, CHELLOTRACEDLL_ADDCHARL_ERR_DUP,
-                       "[0x%08x] Not enough space to add character", (TUint32) this);
-            User::Leave( KErrTooBig);
-            }
-        iString->Append(aChar);
-        }
-
- inline EXPORT_C void CHelloTraceInterface::RemoveLastDup()
-        {
-        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
-
-        OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_REMOVELAST_DUP, 
-                      "[0x%08x] Attempting to remove last character from %S", (TUint32) this, *iString);
-        if (iString->Length() > 0)
-            {
-            iString->SetLength(iString->Length() - 1);
-            }
-        else
-            {
-            OstTrace1( TRACE_WARNING, CHELLOTRACEDLL_REMOVELAST_WARN_DUP, "[0x%08x] String already empty", (TUint32) this);   
-            }
-        }
-
- inline EXPORT_C void CHelloTraceInterface::ResetStringDup()
-        {
-        OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_RESETSTRING_DUP, "[0x%08x] Reseting string %S", (TUint32) this, *iString);
-        if (iString == NULL)
-            {
-            iString = new (ELeave) THelloTraceDllExampleString;
-            }
-        else
-            {
-            iString->SetLength(0);
-            }
-        }
-#endif  // __HELLOTRACEINTERFACEDUP_H__
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/dll/incDup/HelloTraceTypes.inl	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,75 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef __HELLOTRACETYPESINL_H__
-#define __HELLOTRACETYPESINL_H__
-
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTraceTypesTraces.h"
-#endif
-
-inline void HelloTraceTypes::SignedIntegersDup2()
-    {
-    TInt8  eightBit     = - (TInt8)  1 << 6;
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP2_8, 
-                  "8 bit signed: %hhd", eightBit );
-    
-    TInt16 sixteenBit   = - (TInt16) 1 << 14; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP2_16, 
-                  "16 bit signed: %hd", sixteenBit );
-
-    TInt32 thirtyTwoBit = - (TInt32) 1 << 30; 
-    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP2_32, 
-               "32 bit signed: %d", thirtyTwoBit );
-
-    TInt64 sixtyFourBit = - (TInt64) 1 << 62; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP2_64, 
-                  "64 bit signed: %Ld", sixtyFourBit );
-    }
-
-inline void HelloTraceTypes::UnsignedIntegersDup2()
-    {
-    TUint8  eightBit     = (TUint8)  1 << 6;
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP2_8, 
-                  "8 bit unsigned: %hhu", eightBit );
-    
-    TUint16 sixteenBit   = (TUint16) 1 << 14; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP2_16, 
-                  "16 bit unsigned: %hu", sixteenBit );
-
-    TUint32 thirtyTwoBit = (TUint32) 1 << 30; 
-    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP2_32, 
-               "32 bit unsigned: %u", thirtyTwoBit );
-
-    TUint64 sixtyFourBit = (TUint64) 1 << 62; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP2_64, 
-                  "64 bit unsigned: %Lu", sixtyFourBit );
-    }
-
-inline void HelloTraceTypes::DescriptorsDup2()
-    {
-    _LIT8(KAscii, "Some ASCII text");
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_ASCIIDUP2, "8 bit descriptor: %s", KAscii() );
-
-    _LIT16(KUnicode, "Some unicode text");    
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNICODEDUP2, "16 bit descriptor: %S", KUnicode() );
-    }
-
-#endif  // __HELLOTRACETYPESINL_H__
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/dll/incDup/HelloTraceTypesDup.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,75 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef __HELLOTRACETYPESDUP_H__
-#define __HELLOTRACETYPESDUP_H__
-
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTraceTypesDupTraces.h"
-#endif
-
-inline void HelloTraceTypes::SignedIntegersDup()
-    {
-    TInt8  eightBit     = - (TInt8)  1 << 6;
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP_8, 
-                  "8 bit signed: %hhd", eightBit );
-    
-    TInt16 sixteenBit   = - (TInt16) 1 << 14; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP_16, 
-                  "16 bit signed: %hd", sixteenBit );
-
-    TInt32 thirtyTwoBit = - (TInt32) 1 << 30; 
-    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP_32, 
-               "32 bit signed: %d", thirtyTwoBit );
-
-    TInt64 sixtyFourBit = - (TInt64) 1 << 62; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP_64, 
-                  "64 bit signed: %Ld", sixtyFourBit );
-    }
-
-inline void HelloTraceTypes::UnsignedIntegersDup()
-    {
-    TUint8  eightBit     = (TUint8)  1 << 6;
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP_8, 
-                  "8 bit unsigned: %hhu", eightBit );
-    
-    TUint16 sixteenBit   = (TUint16) 1 << 14; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP_16, 
-                  "16 bit unsigned: %hu", sixteenBit );
-
-    TUint32 thirtyTwoBit = (TUint32) 1 << 30; 
-    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP_32, 
-               "32 bit unsigned: %u", thirtyTwoBit );
-
-    TUint64 sixtyFourBit = (TUint64) 1 << 62; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP_64, 
-                  "64 bit unsigned: %Lu", sixtyFourBit );
-    }
-
-inline void HelloTraceTypes::DescriptorsDup()
-    {
-    _LIT8(KAscii, "Some ASCII text");
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_ASCIIDUP, "8 bit descriptor: %s", KAscii() );
-
-    _LIT16(KUnicode, "Some unicode text");    
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNICODEDUP, "16 bit descriptor: %S", KUnicode() );
-    }
-
-#endif  // __HELLOTRACETYPESDUP_H__
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/dll/src/HelloTraceExample.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,106 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-
-#include "HelloTraceExample.h"
-#include "HelloTraceTypes.h"
-#include "HelloTraceInterface.h"
-#include "HelloTraceFn.h"
-#include "HelloTracePanic.h"
-
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTraceExampleTraces.h"
-#endif
-
-EXPORT_C void HelloTraceExample::JustTypes()
-    {
-    OstTrace0( TRACE_EXAMPLE, HELLOTRACEEXAMPLE_JUSTTYPES, "*********************************************** " );
-    
-    HelloTraceTypes::SignedIntegers();
-    HelloTraceTypes::UnsignedIntegers();
-    HelloTraceTypes::Descriptors();    
-    }
-
-EXPORT_C void HelloTraceExample::Interface()
-    {
-    OstTrace0( TRACE_EXAMPLE, HELLOTRACEEXAMPLE_INTERFACE, "*********************************************** " );
-    
-    TVersion version = CHelloTraceInterface::Version();   
-    if (version.iMajor >= 1) 
-        {
-        CHelloTraceInterface* example = CHelloTraceInterface::NewLC();
-        example->AddCharL('H');
-        example->AddCharL('e');
-        example->AddCharL('l');
-        example->AddCharL('l');
-        example->AddCharL('o');
-        example->AddCharL('T');        
-        example->RemoveLast();        
-        example->AddCharL(' ');
-        example->AddCharL('T');
-        example->AddCharL('r');
-        example->AddCharL('a');
-        example->AddCharL('c');
-        example->AddCharL('e');
-        example->AddCharL('!');
-        CleanupStack::PopAndDestroy(example);
-        }
-    else
-        {
-        OstTrace0( TRACE_ERROR, HELLOTRACEEXAMPLE_UNSUPPORTED_VERSION, "Unsupported version!");
-        }
-    }
-
-EXPORT_C void HelloTraceExample::FnEntryExit()
-    {
-    OstTrace0( TRACE_EXAMPLE, HELLOTRACEEXAMPLE_FNENTRYEXIT, "*********************************************** " );
-       
-    CHelloTraceFn* example = CHelloTraceFn::NewLC();
-    CIdle* idle = CIdle::NewL(CActive::EPriorityIdle);
-    CleanupStack::PushL(idle);
-
-    CHelloTraceFn::StaticOutputsParamsL(1);
-   
-    example->Simple();
-    example->OutputsParams(2, CHelloTraceFn::EExample1);
-    example->OutputsParams(3, CHelloTraceFn::EExample2);
-    example->OutputsSignedIntegers(-4, -5, -6, -7);
-    example->OutputsUnsignedIntegers(8, 9, 10, 11);
-    example->OutputsTIntReturnValue();    
-    example->OutputsTInt64ReturnValue(); 
-    example->OutputsTFnEnumReturnValue();
-    example->OutputsUnknownPtrType(idle);    
-    example->OutputsUnknownRefType(*idle);
-#ifdef _DEBUG
-    example->PreProcessedFn(12);
-#else
-    example->PreProcessedFn();
-#endif
-    example->OutputMissingParams(13, 14, 15);
-
-    CleanupStack::PopAndDestroy(idle);
-    CleanupStack::PopAndDestroy(example);
-    }
-
-EXPORT_C void HelloTraceExample::PanicTrace()
-    {
-    OstTrace0( TRACE_EXAMPLE, HELLOTRACEEXAMPLE_PANIC, "*********************************************** " );
-
-    Panic(EHelloTraceDllExamplePanic);
-    }
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/dll/src/HelloTraceFn.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,183 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
- 
-#include "HelloTraceFn.h"
-#include "HelloTraceFnDup.h"
-#include "HelloTraceFn.inl"
-#include "HelloTracePanic.h"
-
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTraceFnTraces.h"
-#endif
-
-CHelloTraceFn* CHelloTraceFn::NewLC()
-    {
-    CHelloTraceFn* self = new (ELeave) CHelloTraceFn;
-    CleanupStack::PushL(self);
-    return self;
-    }
-
-CHelloTraceFn* CHelloTraceFn::NewL()
-    {
-    CHelloTraceFn* self = CHelloTraceFn::NewLC();
-    CleanupStack::Pop(self);
-    return self;
-    }
-
-CHelloTraceFn::CHelloTraceFn()
-    {
-    OstTrace1( TRACE_NORMAL, CHELLOTRACEFN_CHELLOTRACEFN_CTOR, "[0x%08x] Constructor", this );    
-    }
-
-CHelloTraceFn::~CHelloTraceFn()
-    {
-    OstTrace1( TRACE_NORMAL, CHELLOTRACEFN_CHELLOTRACEFN_DTOR, "[0x%08x] Destructor", this );    
-    }
-
-void CHelloTraceFn::Simple()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_SIMPLE_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_SIMPLE_EXIT, this );
-    }
-
-void CHelloTraceFn::OutputsParams(TInt aParam, TFnEnum aEnumParam)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSPARAMS_ENTRY, this );
-    Simple();
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSPARAMS_EXIT, this );
-    }
-
-void CHelloTraceFn::StaticOutputsParamsL(TInt aParam)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_STATICOUTPUTSPARAMS_ENTRY, NULL );
-    CHelloTraceFn* example = CHelloTraceFn::NewLC();
-    example->Simple();    
-    CleanupStack::PopAndDestroy(example);
-    OstTraceFunctionExit0( CHELLOTRACEFN_STATICOUTPUTSPARAMS_EXIT );    
-    }
-
-void CHelloTraceFn::OutputsSignedIntegers(TInt8 aParam8,   TInt16 aParam16, 
-                                          TInt32 aParam32, TInt64 aParam64)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS_EXIT, this );
-    }
-
-void CHelloTraceFn::OutputsUnsignedIntegers(TUint8 aParam8,   TUint16 aParam16, 
-                                            TUint32 aParam32, TUint64 aParam64)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS_EXIT, this );
-    }
-
-
-TInt CHelloTraceFn::OutputsTIntReturnValue()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_ENTRY, this );
-    TInt ret = KErrNone;
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_EXIT, this, ret );
-    return ret;
-    }
-
-TInt64 CHelloTraceFn::OutputsTInt64ReturnValue()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE_ENTRY, this );
-    TInt64 ret = (TInt64) 2 << 40;
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE_EXIT, this, ret );
-    return ret;
-    }
-
-CHelloTraceFn::TFnEnum CHelloTraceFn::OutputsTFnEnumReturnValue()
-    {
-    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE_ENTRY, this );
-    TFnEnum ret = EExample1;
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE_EXIT, this, ret );
-    return ret;    
-    }
-
-CActive* CHelloTraceFn::OutputsUnknownPtrType(CActive* aActive)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_ENTRY, this );    
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_EXIT, this, (TUint) aActive );
-    return aActive;
-    }
-
-CActive& CHelloTraceFn::OutputsUnknownRefType(CActive& aActive)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE_ENTRY, this );
-    // ...
-    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE_EXIT, this, (TUint) &aActive );    
-    return aActive;
-    }
-
-// The following doesn't compile as the Trace Compiler doesn't generate
-// the correct OstTraceGenExt(...) function for it
-//void CHelloTraceFn::OutputMissingParamsBug(TInt /*aCommentParam*/, TInt)
-//    {
-//    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_ENTRY, this );
-//    // ...
-//    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_EXIT, this );    
-//    }
-
-// The following compiles and works but outputs the following warning
-// warning: HelloTraceFn.cpp, line xxx: Parameter did not have a name and was not added to trace
-// The fact that this cannot be suppressed is a known problem we're working on.
-void CHelloTraceFn::OutputMissingParams(TInt aUsedParam, TInt /*aCommentParam*/, TInt)
-    {
-    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMS_ENTRY, this );
-    // ...
-    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMS_EXIT, this );
-    }
-
-// The following doesn't work as the Trace Compiler outputs:
-// error: HelloTraceFn.cpp, line xxx: Class / function name for trace could not be determined x3
-//#ifdef _DEBUG
-//void CHelloTraceFn::PreProcessedFn(TInt aDbgParam)
-//    {
-//    OstTraceFunctionEntryExt( PRE_PROCESSED_ENTRTY_1, this );
-//#else
-//void CHelloTraceFn::PreProcessedFn()
-//    {
-//    OstTraceFunctionEntry1( PRE_PROCESSED_ENTRTY_2, this );
-//#endif
-//    Simple();
-//    OstTraceFunctionExit1( CHELLOTRACEFN_PREPROCESSEDFN_EXIT, this );
-//    }
-
-// Workaround example code until a proper fix is provided
-#ifdef _DEBUG
-void CHelloTraceFn::PreProcessedFn(TInt aDbgParam)
-    {
-    OstTraceExt2( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_ENTRY_1, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;aDbgParam=%d;this=%x", (TInt) aDbgParam, (TUint) this);
-#else
-void CHelloTraceFn::PreProcessedFn()
-    {
-    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_ENTRY_2, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
-#endif
-    Simple();
-    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_EXIT, "CHelloTraceFn::PreProcessedFn: < CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
-    }
-
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/dll/src/HelloTraceInterface.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,121 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-
-#include "HelloTraceInterface.h"
-#include "HelloTraceInterfaceDup.h"
-#include "HelloTraceInterface.inl"
-#include "HelloTracePanic.h"
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTraceInterfaceTraces.h"
-#endif
-
-EXPORT_C CHelloTraceInterface* CHelloTraceInterface::NewLC()
-    {
-    CHelloTraceInterface* self = new (ELeave) CHelloTraceInterface;
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    return self;
-    }
-
-EXPORT_C CHelloTraceInterface* CHelloTraceInterface::NewL()
-    {
-    CHelloTraceInterface* self = CHelloTraceInterface::NewLC();
-    CleanupStack::Pop(self);
-    return self;
-    }
-
-CHelloTraceInterface::CHelloTraceInterface()
-    {
-    OstTrace1( TRACE_NORMAL, CHELLOTRACEDLL_CHELLOTRACEDLL_CTOR, "[0x%08x]", (TUint32) this );    
-    }
-
-void CHelloTraceInterface::ConstructL()
-    {
-    iString = new (ELeave) THelloTraceDllExampleString;
-    }
-
-EXPORT_C CHelloTraceInterface::~CHelloTraceInterface()
-    {
-    delete iString;
-    OstTrace1( TRACE_NORMAL, CHELLOTRACEDLL_CHELLOTRACEDLL_DTOR, "[0x%08x]", (TUint32) this );    
-    }
-
-EXPORT_C TVersion CHelloTraceInterface::Version()
-    {
-    const TInt KMajor = 1;
-    const TInt KMinor = 0;
-    const TInt KBuild = 1;
-    TVersion version = TVersion(KMajor, KMinor, KBuild);
-    OstTraceExt1( TRACE_BORDER, CHELLOTRACEDLL_VERSION, "CHelloTraceInterface::Version = %S", version.Name());   
-    return version;
-    }
-
-EXPORT_C const TPtrC CHelloTraceInterface::String() const
-    {
-    __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
-
-    OstTraceDefExt2( OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CHELLOTRACEDLL_STRING, 
-                     "[0x%08x] Returned %S", (TUint32) this, *iString);   
-    return *iString;
-    }
-
-EXPORT_C void CHelloTraceInterface::AddCharL(const TChar& aChar)
-    {
-    __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
-
-    OstTraceExt3( TRACE_BORDER, CHELLOTRACEDLL_ADDCHARL, 
-                  "[0x%08x] Adding %d to %S", (TUint32) this, (TInt32) aChar, *iString);   
-    if (iString->Length() >= KHelloTraceDllBufferLength)
-        {
-        OstTrace1( TRACE_ERROR, CHELLOTRACEDLL_ADDCHARL_ERR,
-                   "[0x%08x] Not enough space to add character", (TUint32) this);
-        User::Leave( KErrTooBig);
-        }
-    iString->Append(aChar);
-    }
-
-EXPORT_C void CHelloTraceInterface::RemoveLast()
-    {
-    __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
-
-    OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_REMOVELAST, 
-                  "[0x%08x] Attempting to remove last character from %S", (TUint32) this, *iString);
-    if (iString->Length() > 0)
-        {
-        iString->SetLength(iString->Length() - 1);
-        }
-    else
-        {
-        OstTrace1( TRACE_WARNING, CHELLOTRACEDLL_REMOVELAST_WARN, "[0x%08x] String already empty", (TUint32) this);   
-        }
-    }
-
-EXPORT_C void CHelloTraceInterface::ResetString()
-    {
-    OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_RESETSTRING, "[0x%08x] Reseting string %S", (TUint32) this, *iString);
-    if (iString == NULL)
-        {
-        iString = new (ELeave) THelloTraceDllExampleString;
-        }
-    else
-        {
-        iString->SetLength(0);
-        }
-    }
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/dll/src/HelloTracePanic.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#include <e32std.h>		 // GLDEF_C
-
-#include "HelloTracePanic.h"
-
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTracePanicTraces.h"
-#endif
-
-GLDEF_C void Panic(THelloTraceDllPanic aPanic)
-    {
-    OstTrace1( TRACE_FATAL, PANIC, "Panic(%{THelloTraceDllPanic})", (TUint) aPanic );    
-    User::Panic(_L("HelloTraceDll"), aPanic);
-    }
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/dll/src/HelloTraceTypes.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,76 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-
-#include <e32std.h>
-
-#include "HelloTraceTypes.h"
-#include "HelloTraceTypesDup.h"
-#include "HelloTraceTypes.inl"
-
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "HelloTraceTypesTraces.h"
-#endif
-
-void HelloTraceTypes::SignedIntegers()
-    {
-    TInt8  eightBit     = - (TInt8)  1 << 6;
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS_8, 
-                  "8 bit signed: %hhd", eightBit );
-    
-    TInt16 sixteenBit   = - (TInt16) 1 << 14; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS_16, 
-                  "16 bit signed: %hd", sixteenBit );
-
-    TInt32 thirtyTwoBit = - (TInt32) 1 << 30; 
-    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS_32, 
-               "32 bit signed: %d", thirtyTwoBit );
-
-    TInt64 sixtyFourBit = - (TInt64) 1 << 62; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS_64, 
-                  "64 bit signed: %Ld", sixtyFourBit );
-    }
-
-void HelloTraceTypes::UnsignedIntegers()
-    {
-    TUint8  eightBit     = (TUint8)  1 << 6;
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS_8, 
-                  "8 bit unsigned: %hhu", eightBit );
-    
-    TUint16 sixteenBit   = (TUint16) 1 << 14; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS_16, 
-                  "16 bit unsigned: %hu", sixteenBit );
-
-    TUint32 thirtyTwoBit = (TUint32) 1 << 30; 
-    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS_32, 
-               "32 bit unsigned: %u", thirtyTwoBit );
-
-    TUint64 sixtyFourBit = (TUint64) 1 << 62; 
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS_64, 
-                  "64 bit unsigned: %Lu", sixtyFourBit );
-    }
-
-void HelloTraceTypes::Descriptors()
-    {
-    _LIT8(KAscii, "Some ASCII text");
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_ASCII, "8 bit descriptor: %s", KAscii() );
-
-    _LIT16(KUnicode, "Some unicode text");    
-    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNICODE, "16 bit descriptor: %S", KUnicode() );
-    }
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/dll/traces/hellotracedll_dll/trace.properties	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<trace_properties>
-<enum name="TFnEnum">
-<value id="0">EExample1</value>
-<value id="2">EExample2</value>
-</enum>
-<enum name="THelloTraceDllPanic">
-<value id="0">EHelloTraceDllExamplePanic</value>
-<value id="1">EHelloTraceDllNullPointer</value>
-</enum>
-<file>../../incDup/HelloTraceInterfaceDup.h</file>
-<file>../../incDup/HelloTraceInterface.inl</file>
-<file>../../incDup/HelloTraceFnDup.h</file>
-<file>../../incDup/HelloTraceFn.inl</file>
-<file>../../incDup/HelloTraceTypesDup.h</file>
-<file>../../incDup/HelloTraceTypes.inl</file>
-</trace_properties>
--- a/tracefw/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/group/bld.inf	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,19 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-#include "../dll/group/bld.inf"
-#include "../console/group/bld.inf"
--- a/tracefw/tracecompiler/test/group/bld.inf	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,29 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-* TraceCompiler
-*/
-
-prj_platforms
-TOOLS2
-
-
-
-
-prj_testextensions
-start   extension   tools\ant_launch
-option  build_xml   build.xml
-end
-
--- a/tracefw/tracecompiler/test/group/build.xml	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,235 +0,0 @@
-<project name="OstTraceCompilerTest" default="build" basedir="..">
-
-<condition property="isLinux">
-    <os name="linux"/>
-</condition>
-
-<condition property="isWindows">
-	<not>
-		<os name="linux"/>
-	</not>
-</condition>
-
-<!-- EMMA configuration -->
-<path id="emma.lib" >
-	<pathelement location="${ant.home}/lib/emma.jar" />
-	<pathelement location="${ant.home}/lib/emma_ant.jar" />
-</path>
-
-<taskdef resource="emma_ant.properties" classpathref="emma.lib" />
-
-<target name="init_windows_epocroot" if="isWindows">
-	<property environment="env" />
-	<echo message="Init Windows epocroot"/>
-	<property name="epoc.root" value="${env.EPOCROOT}"/>
-</target>
-
-<target name="init_linux_epocroot" if="isLinux">
-	<property environment="env" />
-	<echo message="Init Linux epocroot"/>
-	<property name="epoc.root" value="${env.EPOCROOT}//" />
-</target>
-
-<target name="init" depends="init_windows_epocroot, init_linux_epocroot">
-	<property name="src.dir" value="src" />
-	<property name="build.dir" value="build" />
-	<property name="jar.dir" value="jar" />
-	<property name="instr.dir" location="instr"/>
-	<property name="testdata.dir" location="${epoc.root}testdata"/>
-	<property name="reports.dir" value="${epoc.root}testdata/reports" />	
-	<property name="emma.dir" location="${epoc.root}testdata/reports/emma"/>
-	<property name="tools.dir" location="${epoc.root}epoc32/tools"/>
-</target>
-
-<target name="clean" depends="init">
-	<echo>Cleaning the ${build.dir}</echo>
-	<delete dir="${build.dir}"/>
-	<echo>Creating the ${build.dir} directory</echo>
-	<mkdir dir="${build.dir}"/>
-	<echo>Cleaning the ${reports.dir}</echo>
-	<delete dir="${reports.dir}"/>
-	<echo>Creating the ${reports.dir} directory</echo>
-	<mkdir dir="${reports.dir}"/>
-	<echo>Cleaning the ${instr.dir}</echo>
-	<delete dir="${instr.dir}"/>
-	<echo>Creating the ${instr.dir} directory</echo>
-	<mkdir dir="${instr.dir}"/>
-	<echo>Deleting test exports</echo>
-	<delete file="${epoc.root}epoc32/include/platform/test_opensystemtrace_types.h"/>
-	<delete file="${epoc.root}epoc32/build/buildlog_tc.txt"/>
-	<delete file="${epoc.root}epoc32/build/parsedlogs_tc.txt"/>
-	<delete file="${epoc.root}epoc32/build/buildlog_sbs.txt"/>
-	<delete file="${epoc.root}epoc32/build/parsedlogs_sbs.txt"/>
-	<delete file="${epoc.root}epoc32/build/buildlog_mult_cpp.txt"/>
-	<delete file="${epoc.root}epoc32/build/parsedlogs_mult_cpp.txt"/>
-	<delete file="${epoc.root}epoc32/build/buildlog_mult_mmp.txt"/>
-	<delete file="${epoc.root}epoc32/build/parsedlogs_mult_mmp.txt"/>	
-	<delete dir="${testdata.dir}/TraceErrorApp"/>
-	<delete dir="${testdata.dir}/MultipleCppTraceErrorApp"/>
-	<delete dir="${testdata.dir}/MultipleMmpTraceErrorApps"/>
-	<delete dir="${testdata.dir}/FixedIdDefinitionsTestApp"/>
-	<delete dir="${testdata.dir}/MultipleMmpTestCases"/>
-	<delete dir="${epoc.root}testdata/MultipleMmpTestCases"/>
-	<delete dir="${testdata.dir}TracesInHeadersApps"/>
-	<delete dir="${epoc.root}epoc32/build/testdata/MultipleMmpTestCases"/>
-	<delete dir="${epoc.root}epoc32/build/testdata/MultipleCppTraceErrorApp"/>
-	<delete dir="${epoc.root}epoc32/build/testdata/TracesInHeadersApps"/>
-</target>
-
-<target name="build" depends="clean">
-	<property name="classpath" value="${build.dir}:lib/junit-4.7.jar:../jar/tracecompiler.jar" />
-	<copy todir="${epoc.root}epoc32/include/platform">
-		<fileset dir="testdata"/>
-	</copy>
-	<copy todir="${epoc.root}testdata/TraceErrorApp">
-		<fileset dir="TraceErrorApp"/>
-	</copy>	
-	<copy todir="${epoc.root}testdata/MultipleCppTraceErrorApp">
-		<fileset dir="MultipleCppTraceErrorApp"/>
-	</copy>	
-	<copy todir="${epoc.root}testdata/MultipleMmpTraceErrorApps">
-		<fileset dir="MultipleMmpTraceErrorApps"/>
-	</copy>
-	<copy todir="${epoc.root}testdata/FixedIdDefinitionsTestApp">
-		<fileset dir="FixedIdDefinitionsTestApp"/>
-	</copy>			
-	<copy todir="${epoc.root}testdata/MultipleMmpTestCases">
-		<fileset dir="MultipleMmpTestCases"/>
-	</copy>
-    	<copy todir="${epoc.root}testdata/TracesInHeadersApps">
-		<fileset dir="TracesInHeadersApps"/>
-	</copy>
-	<javac  classpath="${classpath}" srcdir="${src.dir}" destdir="${build.dir}" debug="false" target="1.5" >
-	</javac>
-</target>
-
-<target name="run" depends="build" description="run the junit tests">
-
-	<echo>---- Note ANT 1.7 or greater is required for the junit task ----</echo>
-
-	<!-- generate classpath -->
-	<path id="lib.path.ref">
-		<pathelement location="build"/>
-   		<fileset dir="lib" includes="*.jar"/>
-   		<fileset dir="../jar" includes="*.jar"/>
- 	</path>
-	
-	<junit printsummary="yes" haltonfailure="yes">		
-	 	<classpath path="${toString:lib.path.ref}"/>
-	 	<formatter type="plain"/>
-	
-		<!--complete test code should be in the $src.dir so run all of them except ErrorLogsTestBase.java-->
-		<!--that is the base class of ErrorLogsTestUnit.java and ErrorLogsTestSystem.java-->	 	 	
-	 	<batchtest fork="yes" todir="${reports.dir}">
-	 		<fileset dir="${src.dir}">
-	      		<include name="*.java"/>
-	      		<exclude name="ErrorLogsTestBase.java"/>
-	 		</fileset>
-	 	</batchtest>	
-	</junit>
-
-</target>
-
-<!-- Instrumentation target, depends on JAR -->
-<target name="instr" depends="build">
-	<!-- Instrument the source code -->
-	<emma>
-		<instr instrpath="${tools.dir}/tracecompiler" metadatafile="${emma.dir}/metadata.emma" merge="true" mode="overwrite"/>
-	</emma>
-</target>
-
-<!--target to execute pure unit tests and measure test coverage-->		 
-<target name="run_unit_emma" depends="instr" description="run the TraceCompiler unit tests and measure test coverage">
-	<echo>---- Note ANT 1.7 or greater is required for the junit task ----</echo>
-
-	<!-- generate classpath -->
-	<path id="lib.path.ref">
-		<!-- Instrumented class files -->
-		<pathelement location="${epoc.root}epoc32/tools/tracecompiler"/>
-		<pathelement location="build"/>
-		<fileset dir="${instr.dir}" includes="*.class"/>
-		<fileset dir="lib" includes="*.jar"/>
-
-		<!-- EMMA -->
-		<pathelement path="${ant.home}/lib/emma.jar"/>
- 	</path>
-	
-	<echo>${toString:lib.path.ref}</echo> 
-	
-	<junit printsummary="yes" haltonfailure="yes">		
-	 	<classpath path="${toString:lib.path.ref}"/>
-	 	<formatter type="plain"/>
-		<formatter type="xml"/>
-
-		<!-- Instrumentation arguments to JVM -->
-		<jvmarg value="-Demma.coverage.out.file=${emma.dir}/coverage.emma" />
-		<jvmarg value="-Demma.coverage.out.merge=true" />
-
-		<!--complete test code should be in the $src.dir so run all of them except ErrorLogsTestSystem.java, MultipleMmpTest.java and-->
-		<!--ErrorLogsTestBase.java that is the base class of ErrorLogsTestUnit.java and ErrorLogsTestSystem.java-->		 	
-	 	<batchtest fork="yes" todir="${reports.dir}">
-	 		<fileset dir="${src.dir}">
-	      		<include name="*.java"/>
-	      		<exclude name="ErrorLogsTestSystem.java"/>
-	      		<exclude name="ErrorLogsTestBase.java"/>
-	      		<exclude name="MultipleMmpTest.java"/>
-	      		<exclude name="TracesInHeadersTest.java"/>	      		
-                <exclude name="TraceHeadersLicenceTest.java"/>
-	 		</fileset>
-		</batchtest>
-	</junit>
-		
-	<!-- Create EMMA report -->
-	<emma>
-		<report sourcepath="src/" >
-			<fileset dir="${emma.dir}" >
-				<include name="*.emma" />
-			</fileset>
-			<xml outfile="${emma.dir}/coverage.xml" />
-		</report>
-	</emma>
-</target>
-
-<!--target to execute pure unit tests-->		 
-<target name="run_unit" depends="build" description="run the TraceCompiler unit tests">
-
-	<echo>---- Note ANT 1.7 or greater is required for the junit task ----</echo>
-
-	<!-- generate classpath -->
-	<path id="lib.path.ref">
-		<pathelement location="build"/>
-   		<fileset dir="lib" includes="*.jar"/>
-   		<fileset dir="../jar" includes="*.jar"/>
- 	</path>
-	
-	<junit printsummary="yes" haltonfailure="yes">		
-	 	<classpath path="${toString:lib.path.ref}"/>
-	 	<formatter type="plain"/>
-	 	<formatter type="xml"/>
-	
-		<!--complete test code should be in the $src.dir so run all of them except ErrorLogsTestBase.java-->
-		<!--that is the base class of ErrorLogsTestUnit.java and ErrorLogsTestSystem.java-->	 	 	
-	 	<batchtest fork="yes" todir="${reports.dir}">
-	 		<fileset dir="${src.dir}">
-	      		<include name="*.java"/>
-	      		<exclude name="ErrorLogsTestSystem.java"/>
-	      		<exclude name="ErrorLogsTestBase.java"/>
-	      		<exclude name="MultipleMmpTest.java"/>
-	      		<exclude name="TracesInHeadersTest.java"/>	 
-	      		<exclude name="TraceHeadersLicenceTest.java"/>                
-	 		</fileset>
-	 	</batchtest>	
-	</junit>
-
-</target>
-
-<target name="jar" depends="build">
-	<mkdir dir="${jar.dir}"/>
-        <jar destfile="${jar.dir}/tests.jar" basedir="${build.dir}">
-            <manifest>
-                <attribute name="Main-Class" value="GroupNamesTest"/>
-            </manifest>
-        </jar>
-</target>
-
-</project>
--- a/tracefw/tracecompiler/test/group/ccbuild.xml	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,69 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project name="com.nokia.tracecompiler" default="cc" basedir="..">
-
-	<target name="cc" depends="init, test, analyze" description="Run unit tests and analyze code"/>
-
-	<property name="javacVerbose" value="false"/>
-
-
-	<!-- declare ant4eclipse -->
-	<taskdef resource="net/sf/ant4eclipse/antlib.xml" />
-
-	
-	<!-- PMD configuration -->
-	<path id="pmd.lib" >
-    	<pathelement location="${ant.home}/lib/pmd-4.2.jar" />
-    	<pathelement location="${ant.home}/lib/asm-3.1.jar" />
-    	<pathelement location="${ant.home}/lib/jaxen-1.1.1.jar" />
-  	</path>
-	
-	<taskdef name="pmd" classname="net.sourceforge.pmd.ant.PMDTask" classpathref="pmd.lib" />
-
-	<!-- Init target -->
-	<target name="init">
-		<property environment="env"/>
-		<property name="testdata.dir" location="${env.EPOCROOT}testdata"/>
-		<property name="reports.dir" location="${env.EPOCROOT}testdata/reports"/>
-		<property name="hudson_reports.dir" location="reports"/>
-		
-		<echo>Cleaning the ${hudson_reports.dir}</echo>
-		<delete dir="${hudson_reports.dir}"/>
-		<echo>Creating the ${hudson_reports.dir} directory</echo>
-		<mkdir dir="${hudson_reports.dir}"/>
-	</target>
-
-	<!-- Test target -->
-	<target name="test" depends="init">
-		<ant antfile="group/build.xml" target="run_unit"/>
-		
-		<!-- Copy reports folder to reports forder in Hudson workspace, so reports can be used in Hudson -->
-		<copy todir="${hudson_reports.dir}">
-			<fileset dir="${reports.dir}"/>
-		</copy>
-	</target>
-
-	<!-- Analyze target -->
-	<target name="analyze" depends="init">
-		<!-- PMD -->
-		<pmd>
-			<!-- Rules -->
-			<ruleset>basic</ruleset>
-			<ruleset>codesize</ruleset>
-			<ruleset>coupling</ruleset>
-			<ruleset>design</ruleset>
-			<ruleset>strictexception</ruleset>
-			<ruleset>strings</ruleset>
-			<ruleset>sunsecure</ruleset>
-			<ruleset>unusedcode</ruleset>
-			
-			<!-- Output PMD report directly to reports forder in Hudson workspace, so report can be used in Hudson -->
-			<formatter type="xml" toFile="${hudson_reports.dir}/report.pmd.xml"/>
-			
-			<!-- Files to analyze -->
-			<fileset dir="../src/">
-				<include name="**/*.java"/>
-			</fileset>
-		</pmd>
-	</target>
-
-</project>
--- a/tracefw/tracecompiler/test/group/readme.txt	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,6 +0,0 @@
-build.xml adds ant support for running and building the tests
-
-
-ant build - builds test code
-ant run builds & runs test code
-ant jar generates executable jar file
Binary file tracefw/tracecompiler/test/lib/junit-4.7.jar has changed
--- a/tracefw/tracecompiler/test/multipleMmpTestCases/group/bld.inf	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,26 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-
-#include "../mmp_traces/group/bld.inf"
-#include "../mmp_traces_mmpname/group/bld.inf"
-#include "../mmp_traces_slash_target_ext/group/bld.inf"
-#include "../mmp_traces_target_type/group/bld.inf"
-#include "../mmp_traces_mixed/group/bld.inf"
-#include "../mmp_traces_slash_target_ext_commonsource/group/bld.inf"
-
--- a/tracefw/tracecompiler/test/multipleMmpTestCases/mmp_traces/group/bld.inf	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-
-PRJ_PLATFORMS
-DEFAULT
-
-PRJ_MMPFILES
-mmp_traces1.mmp
-mmp_traces2.mmp
--- a/tracefw/tracecompiler/test/multipleMmpTestCases/mmp_traces/group/mmp_traces1.mmp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-
-TARGET		  target1.exe
-TARGETTYPE	  exe
-UID			 0 0xE8576D96
-
-USERINCLUDE	 ../inc
-USERINCLUDE  ../traces
-
-APP_LAYER_SYSTEMINCLUDE
-
-SYSTEMINCLUDE   /epoc32/include
-
-SOURCEPATH	  ../src
-SOURCE		  MultipleMmpApp1.cpp 
-SOURCE 		  ExtraCppFile1.cpp
-
-LIBRARY		 euser.lib
-
-#ifdef ENABLE_ABIV2_MODE
-DEBUGGABLE_UDEBONLY
-#endif
-
--- a/tracefw/tracecompiler/test/multipleMmpTestCases/mmp_traces/group/mmp_traces2.mmp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-
-TARGET		  target2.exe
-TARGETTYPE	  exe
-UID			 0 0xE8576D95
-
-USERINCLUDE	 ../inc
-USERINCLUDE  ../traces
-
-APP_LAYER_SYSTEMINCLUDE
-
-SYSTEMINCLUDE   /epoc32/include
-
-SOURCEPATH	  ../src
-SOURCE		  MultipleMmpApp2.cpp 
-SOURCE		  ExtraCppFile2.cpp
-
-LIBRARY		 euser.lib
-
-#ifdef ENABLE_ABIV2_MODE
-DEBUGGABLE_UDEBONLY
-#endif
--- a/tracefw/tracecompiler/test/multipleMmpTestCases/mmp_traces/inc/MultipleMmpApp.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef __MULTIPLEMMPAPP_H__
-#define __MULTIPLEMMPAPP_H__
-
-//  Include Files
-
-#include <e32base.h>
-
-//  Function Prototypes
-
-GLDEF_C TInt E32Main();
-void CallSomeMoreTraceStatements();
-
-#endif  // __MULTIPLEMMPAPP_H__
-
--- a/tracefw/tracecompiler/test/multipleMmpTestCases/mmp_traces/src/ExtraCppFile1.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-/*
-* Copyriight (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-/*
- * ExtraCppFile.cpp
- *
- *  Created on: Dec 7, 2009
- *      Author: cajagu
- */
-
-#include "MultipleMmpApp.h"
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "ExtraCppFile1Traces.h"
-#endif
-
-void CallSomeMoreTraceStatements()
-    {
-    TInt32 x = 555;
-    TUint32 y = 666;
-
-    OstTrace1( TRACE_FLOW, TEST1_CALLMORE, "CallSomeMoreTraceStatements(): x=%d" , x );
-    OstTrace1( TRACE_FLOW, TEST2_CALLMORE, "CallSomeMoreTraceStatements(): y=%u" , y );
-    }
--- a/tracefw/tracecompiler/test/multipleMmpTestCases/mmp_traces/src/ExtraCppFile2.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +0,0 @@
-/*
- * ExtraCppFile.cpp
- *
- *  Created on: Dec 7, 2009
- *      Author: cajagu
- */
-
-
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-/*
- * ExtraCppFile.cpp
- *
- *  Created on: Dec 7, 2009
- *      Author: cajagu
- */
-
-#include "MultipleMmpApp.h"
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "ExtraCppFile2Traces.h"
-#endif
-
-void CallSomeMoreTraceStatements()
-    {
-    TInt32 x = 555;
-    TUint32 y = 666;
-
-    OstTrace1( TRACE_FLOW, TEST1_CALLMORE, "CallSomeMoreTraceStatements(): x=%d" , x );
-    OstTrace1( TRACE_FLOW, TEST2_CALLMORE, "CallSomeMoreTraceStatements(): y=%u" , y );
-    }
--- a/tracefw/tracecompiler/test/multipleMmpTestCases/mmp_traces/src/MultipleMmpApp1.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,77 +0,0 @@
-
-//  Include Files  
-
-#include "MultipleMmpApp.h"
-#include <e32base.h>
-#include <e32std.h>
-#include <e32cons.h>			// Console
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "MultipleMmpApp1Traces.h"
-#endif
-
-//  Constants
-
-_LIT(KTextConsoleTitle, "Console");
-_LIT(KTextFailed, " failed, leave code = %d");
-_LIT(KTextPressAnyKey, " [press any key]\n");
-
-//  Global Variables
-
-LOCAL_D CConsoleBase* console; // write all messages to this
-
-
-//  Local Functions
-
-LOCAL_C void MainL()
-    {
-    /****************************TRACE STATEMENTS*********************************/
-    OstTrace0( TRACE_FLOW, TEST1_MAINL, "MainL()" );
-    OstTrace0( TRACE_FLOW, TEST2_MAINL, "MainL()" );    
-    /*****************************************************************************/
-    
-    CallSomeMoreTraceStatements();
-    
-    console->Write(_L("Hello, world!\n"));
-    }
-
-LOCAL_C void DoStartL()
-    {
-    // Create active scheduler (to run active objects)
-    CActiveScheduler* scheduler = new (ELeave) CActiveScheduler();
-    CleanupStack::PushL(scheduler);
-    CActiveScheduler::Install(scheduler);
-
-    MainL();
-
-    // Delete active scheduler
-    CleanupStack::PopAndDestroy(scheduler);
-    }
-
-//  Global Functions
-
-GLDEF_C TInt E32Main()
-    {
-    // Create cleanup stack
-    __UHEAP_MARK;
-    CTrapCleanup* cleanup = CTrapCleanup::New();
-
-    // Create output console
-    TRAPD(createError, console = Console::NewL(KTextConsoleTitle, TSize(
-            KConsFullScreen, KConsFullScreen)));
-    if (createError)
-        return createError;
-
-    // Run application code inside TRAP harness, wait keypress when terminated
-    TRAPD(mainError, DoStartL());
-    if (mainError)
-        console->Printf(KTextFailed, mainError);
-    console->Printf(KTextPressAnyKey);
-    console->Getch();
-
-    delete console;
-    delete cleanup;
-    __UHEAP_MARKEND;
-    return KErrNone;
-    }
-
--- a/tracefw/tracecompiler/test/multipleMmpTestCases/mmp_traces/src/MultipleMmpApp2.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,94 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-//  Include Files  
-
-#include "MultipleMmpApp.h"
-#include <e32base.h>
-#include <e32std.h>
-#include <e32cons.h>			// Console
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "MultipleMmpApp2Traces.h"
-#endif
-
-//  Constants
-
-_LIT(KTextConsoleTitle, "Console");
-_LIT(KTextFailed, " failed, leave code = %d");
-_LIT(KTextPressAnyKey, " [press any key]\n");
-
-//  Global Variables
-
-LOCAL_D CConsoleBase* console; // write all messages to this
-
-
-//  Local Functions
-
-LOCAL_C void MainL()
-    {
-    /****************************TRACE STATEMENTS*********************************/
-    OstTrace0( TRACE_FLOW, TEST1_MAINL, "MainL()" );
-    OstTrace0( TRACE_FLOW, TEST2_MAINL, "MainL()" );    
-    /*****************************************************************************/
-    
-    CallSomeMoreTraceStatements();
-    
-    console->Write(_L("Hello, world!\n"));
-    }
-
-LOCAL_C void DoStartL()
-    {
-    // Create active scheduler (to run active objects)
-    CActiveScheduler* scheduler = new (ELeave) CActiveScheduler();
-    CleanupStack::PushL(scheduler);
-    CActiveScheduler::Install(scheduler);
-
-    MainL();
-
-    // Delete active scheduler
-    CleanupStack::PopAndDestroy(scheduler);
-    }
-
-//  Global Functions
-
-GLDEF_C TInt E32Main()
-    {
-    // Create cleanup stack
-    __UHEAP_MARK;
-    CTrapCleanup* cleanup = CTrapCleanup::New();
-
-    // Create output console
-    TRAPD(createError, console = Console::NewL(KTextConsoleTitle, TSize(
-            KConsFullScreen, KConsFullScreen)));
-    if (createError)
-        return createError;
-
-    // Run application code inside TRAP harness, wait keypress when terminated
-    TRAPD(mainError, DoStartL());
-    if (mainError)
-        console->Printf(KTextFailed, mainError);
-    console->Printf(KTextPressAnyKey);
-    console->Getch();
-
-    delete console;
-    delete cleanup;
-    __UHEAP_MARKEND;
-    return KErrNone;
-    }
-
--- a/tracefw/tracecompiler/test/multipleMmpTestCases/mmp_traces_mixed/group/bld.inf	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-
-PRJ_PLATFORMS
-DEFAULT
-
-PRJ_MMPFILES
-mmp_traces_mixed1.mmp
-mmp_traces_mixed2.mmp
--- a/tracefw/tracecompiler/test/multipleMmpTestCases/mmp_traces_mixed/group/mmp_traces_mixed1.mmp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-TARGET		  target3.dll
-TARGETTYPE	  kext
-UID			 0 0xE8576D96
-
-USERINCLUDE	 ..\inc
-USERINCLUDE  ..\traces
-USERINCLUDE  ..\traces_target3_kext
-USERINCLUDE  ..\traces\target3_dll //traces should be generated here
-
-OS_LAYER_SYSTEMINCLUDE
-
-SYSTEMINCLUDE   \epoc32\include
-
-SOURCEPATH	  ..\src
-SOURCE		  MultipleMmpApp1.cpp 
-SOURCE 		  ExtraCppFile1.cpp
-
-#include "kernel/kern_ext.mmh"
-
-#ifdef ENABLE_ABIV2_MODE
-DEBUGGABLE_UDEBONLY
-#endif
--- a/tracefw/tracecompiler/test/multipleMmpTestCases/mmp_traces_mixed/group/mmp_traces_mixed2.mmp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-TARGET		  target4.dll
-TARGETTYPE	  kext
-UID			 0 0xE8576D95
-
-USERINCLUDE	 ..\inc
-USERINCLUDE  ..\traces
-USERINCLUDE  ..\traces_target4_kext //traces should be generated here
-
-OS_LAYER_SYSTEMINCLUDE
-
-SYSTEMINCLUDE   \epoc32\include
-
-SOURCEPATH	  ..\src
-SOURCE		  MultipleMmpApp2.cpp 
-SOURCE		  ExtraCppFile2.cpp
-
-#include "kernel/kern_ext.mmh"
-
-#ifdef ENABLE_ABIV2_MODE
-DEBUGGABLE_UDEBONLY
-#endif
--- a/tracefw/tracecompiler/test/multipleMmpTestCases/mmp_traces_mixed/inc/MultipleMmpApp.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef __MULTIPLEMMPAPP_H__
-#define __MULTIPLEMMPAPP_H__
-
-//  Include Files
-
-#include <e32def.h>
-
-
-//  Function Prototypes
-
-void CallSomeMoreTraceStatements();
-
-#endif  // __MULTIPLEMMPAPP_H__
-
--- a/tracefw/tracecompiler/test/multipleMmpTestCases/mmp_traces_mixed/src/ExtraCppFile1.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-/*
- * ExtraCppFile.cpp
- *
- *  Created on: Dec 7, 2009
- *      Author: cajagu
- */
-
-#include "MultipleMmpApp.h"
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "ExtraCppFile1Traces.h"
-#endif
-
-void CallSomeMoreTraceStatements()
-    {
-    TInt32 x = 555;
-    TUint32 y = 666;
-
-    OstTrace1( TRACE_FLOW, TEST1_CALLMORE, "CallSomeMoreTraceStatements(): x=%d" , x );
-    OstTrace1( TRACE_FLOW, TEST2_CALLMORE, "CallSomeMoreTraceStatements(): y=%u" , y );
-    }
--- a/tracefw/tracecompiler/test/multipleMmpTestCases/mmp_traces_mixed/src/ExtraCppFile2.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-/*
- * ExtraCppFile.cpp
- *
- *  Created on: Dec 7, 2009
- *      Author: cajagu
- */
-
-#include "MultipleMmpApp.h"
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "ExtraCppFile2Traces.h"
-#endif
-
-void CallSomeMoreTraceStatements()
-    {
-    TInt32 x = 555;
-    TUint32 y = 666;
-
-    OstTrace1( TRACE_FLOW, TEST1_CALLMORE, "CallSomeMoreTraceStatements(): x=%d" , x );
-    OstTrace1( TRACE_FLOW, TEST2_CALLMORE, "CallSomeMoreTraceStatements(): y=%u" , y );
-    }
--- a/tracefw/tracecompiler/test/multipleMmpTestCases/mmp_traces_mixed/src/MultipleMmpApp1.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-//  Include Files  
-
-#include "MultipleMmpApp.h"
-#include <kernel/kernel.h>
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "MultipleMmpApp1Traces.h"
-#endif
-
-
-
-DECLARE_STANDARD_EXTENSION()
-    {
-    /****************************TRACE STATEMENTS*********************************/
-    OstTrace0( TRACE_FLOW, TEST1_DECLARE_STANDARD_EXTENSION, "DECLARE_STANDARD_EXTENSION()" );
-    OstTrace0( TRACE_FLOW, TEST2_DECLARE_STANDARD_EXTENSION, "DECLARE_STANDARD_EXTENSION()" );    
-    /*****************************************************************************/
-    
-    CallSomeMoreTraceStatements();
-    
-    return 0;
-    }
-
--- a/tracefw/tracecompiler/test/multipleMmpTestCases/mmp_traces_mixed/src/MultipleMmpApp2.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-//  Include Files  
-
-#include "MultipleMmpApp.h"
-#include <kernel/kernel.h>
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "MultipleMmpApp2Traces.h"
-#endif
-
-
-DECLARE_STANDARD_EXTENSION()
-    {
-    /****************************TRACE STATEMENTS*********************************/
-    OstTrace0( TRACE_FLOW, TEST1_MAINL, "MainL()" );
-    OstTrace0( TRACE_FLOW, TEST2_MAINL, "MainL()" );    
-    /*****************************************************************************/
-    
-    CallSomeMoreTraceStatements();
-    
-    return 0;
-    }
--- a/tracefw/tracecompiler/test/multipleMmpTestCases/mmp_traces_mmpname/group/bld.inf	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-
-PRJ_PLATFORMS
-DEFAULT
-
-PRJ_MMPFILES
-mmp_traces_mmpname1.mmp
-mmp_traces_mmpname2.mmp
--- a/tracefw/tracecompiler/test/multipleMmpTestCases/mmp_traces_mmpname/group/mmp_traces_mmpname1.mmp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-
-TARGET		  target5.exe
-TARGETTYPE	  exe
-UID			 0 0xE8576D96
-
-USERINCLUDE	 ../inc
-USERINCLUDE  ../traces
-USERINCLUDE  ../traces_mmp_traces_mmpname1
-
-APP_LAYER_SYSTEMINCLUDE
-
-SYSTEMINCLUDE   /epoc32/include
-
-SOURCEPATH	  ../src
-SOURCE		  MultipleMmpApp1.cpp 
-SOURCE 		  ExtraCppFile1.cpp
-
-LIBRARY		 euser.lib
-
-#ifdef ENABLE_ABIV2_MODE
-DEBUGGABLE_UDEBONLY
-#endif
--- a/tracefw/tracecompiler/test/multipleMmpTestCases/mmp_traces_mmpname/group/mmp_traces_mmpname2.mmp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-
-TARGET		  target6.exe
-TARGETTYPE	  exe
-UID			 0 0xE8576D95
-
-USERINCLUDE	 ../inc
-USERINCLUDE  ../traces
-USERINCLUDE  ../traces_mmp_traces_mmpname2
-
-APP_LAYER_SYSTEMINCLUDE
-
-SYSTEMINCLUDE  /epoc32/include
-
-SOURCEPATH	  ../src
-SOURCE		  MultipleMmpApp2.cpp 
-SOURCE		  ExtraCppFile2.cpp
-
-LIBRARY		 euser.lib
-
-#ifdef ENABLE_ABIV2_MODE
-DEBUGGABLE_UDEBONLY
-#endif
--- a/tracefw/tracecompiler/test/multipleMmpTestCases/mmp_traces_mmpname/inc/MultipleMmpApp.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef __MULTIPLEMMPAPP_H__
-#define __MULTIPLEMMPAPP_H__
-
-//  Include Files
-
-#include <e32base.h>
-
-//  Function Prototypes
-
-GLDEF_C TInt E32Main();
-void CallSomeMoreTraceStatements();
-
-#endif  // __MULTIPLEMMPAPP_H__
-
--- a/tracefw/tracecompiler/test/multipleMmpTestCases/mmp_traces_mmpname/src/ExtraCppFile1.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-/*
- * ExtraCppFile.cpp
- *
- *  Created on: Dec 7, 2009
- *      Author: cajagu
- */
-
-#include "MultipleMmpApp.h"
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "ExtraCppFile1Traces.h"
-#endif
-
-void CallSomeMoreTraceStatements()
-    {
-    TInt32 x = 555;
-    TUint32 y = 666;
-
-    OstTrace1( TRACE_FLOW, TEST1_CALLMORE, "CallSomeMoreTraceStatements(): x=%d" , x );
-    OstTrace1( TRACE_FLOW, TEST2_CALLMORE, "CallSomeMoreTraceStatements(): y=%u" , y );
-    }
--- a/tracefw/tracecompiler/test/multipleMmpTestCases/mmp_traces_mmpname/src/ExtraCppFile2.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-/*
- * ExtraCppFile.cpp
- *
- *  Created on: Dec 7, 2009
- *      Author: cajagu
- */
-
-#include "MultipleMmpApp.h"
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "ExtraCppFile2Traces.h"
-#endif
-
-void CallSomeMoreTraceStatements()
-    {
-    TInt32 x = 555;
-    TUint32 y = 666;
-
-    OstTrace1( TRACE_FLOW, TEST1_CALLMORE, "CallSomeMoreTraceStatements(): x=%d" , x );
-    OstTrace1( TRACE_FLOW, TEST2_CALLMORE, "CallSomeMoreTraceStatements(): y=%u" , y );
-    }
--- a/tracefw/tracecompiler/test/multipleMmpTestCases/mmp_traces_mmpname/src/MultipleMmpApp1.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,94 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-//  Include Files  
-
-#include "MultipleMmpApp.h"
-#include <e32base.h>
-#include <e32std.h>
-#include <e32cons.h>			// Console
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "MultipleMmpApp1Traces.h"
-#endif
-
-//  Constants
-
-_LIT(KTextConsoleTitle, "Console");
-_LIT(KTextFailed, " failed, leave code = %d");
-_LIT(KTextPressAnyKey, " [press any key]\n");
-
-//  Global Variables
-
-LOCAL_D CConsoleBase* console; // write all messages to this
-
-
-//  Local Functions
-
-LOCAL_C void MainL()
-    {
-    /****************************TRACE STATEMENTS*********************************/
-    OstTrace0( TRACE_FLOW, TEST1_MAINL, "MainL()" );
-    OstTrace0( TRACE_FLOW, TEST2_MAINL, "MainL()" );    
-    /*****************************************************************************/
-    
-    CallSomeMoreTraceStatements();
-    
-    console->Write(_L("Hello, world!\n"));
-    }
-
-LOCAL_C void DoStartL()
-    {
-    // Create active scheduler (to run active objects)
-    CActiveScheduler* scheduler = new (ELeave) CActiveScheduler();
-    CleanupStack::PushL(scheduler);
-    CActiveScheduler::Install(scheduler);
-
-    MainL();
-
-    // Delete active scheduler
-    CleanupStack::PopAndDestroy(scheduler);
-    }
-
-//  Global Functions
-
-GLDEF_C TInt E32Main()
-    {
-    // Create cleanup stack
-    __UHEAP_MARK;
-    CTrapCleanup* cleanup = CTrapCleanup::New();
-
-    // Create output console
-    TRAPD(createError, console = Console::NewL(KTextConsoleTitle, TSize(
-            KConsFullScreen, KConsFullScreen)));
-    if (createError)
-        return createError;
-
-    // Run application code inside TRAP harness, wait keypress when terminated
-    TRAPD(mainError, DoStartL());
-    if (mainError)
-        console->Printf(KTextFailed, mainError);
-    console->Printf(KTextPressAnyKey);
-    console->Getch();
-
-    delete console;
-    delete cleanup;
-    __UHEAP_MARKEND;
-    return KErrNone;
-    }
-
--- a/tracefw/tracecompiler/test/multipleMmpTestCases/mmp_traces_mmpname/src/MultipleMmpApp2.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,94 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-//  Include Files  
-
-#include "MultipleMmpApp.h"
-#include <e32base.h>
-#include <e32std.h>
-#include <e32cons.h>			// Console
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "MultipleMmpApp2Traces.h"
-#endif
-
-//  Constants
-
-_LIT(KTextConsoleTitle, "Console");
-_LIT(KTextFailed, " failed, leave code = %d");
-_LIT(KTextPressAnyKey, " [press any key]\n");
-
-//  Global Variables
-
-LOCAL_D CConsoleBase* console; // write all messages to this
-
-
-//  Local Functions
-
-LOCAL_C void MainL()
-    {
-    /****************************TRACE STATEMENTS*********************************/
-    OstTrace0( TRACE_FLOW, TEST1_MAINL, "MainL()" );
-    OstTrace0( TRACE_FLOW, TEST2_MAINL, "MainL()" );    
-    /*****************************************************************************/
-    
-    CallSomeMoreTraceStatements();
-    
-    console->Write(_L("Hello, world!\n"));
-    }
-
-LOCAL_C void DoStartL()
-    {
-    // Create active scheduler (to run active objects)
-    CActiveScheduler* scheduler = new (ELeave) CActiveScheduler();
-    CleanupStack::PushL(scheduler);
-    CActiveScheduler::Install(scheduler);
-
-    MainL();
-
-    // Delete active scheduler
-    CleanupStack::PopAndDestroy(scheduler);
-    }
-
-//  Global Functions
-
-GLDEF_C TInt E32Main()
-    {
-    // Create cleanup stack
-    __UHEAP_MARK;
-    CTrapCleanup* cleanup = CTrapCleanup::New();
-
-    // Create output console
-    TRAPD(createError, console = Console::NewL(KTextConsoleTitle, TSize(
-            KConsFullScreen, KConsFullScreen)));
-    if (createError)
-        return createError;
-
-    // Run application code inside TRAP harness, wait keypress when terminated
-    TRAPD(mainError, DoStartL());
-    if (mainError)
-        console->Printf(KTextFailed, mainError);
-    console->Printf(KTextPressAnyKey);
-    console->Getch();
-
-    delete console;
-    delete cleanup;
-    __UHEAP_MARKEND;
-    return KErrNone;
-    }
-
--- a/tracefw/tracecompiler/test/multipleMmpTestCases/mmp_traces_slash_target_ext/group/bld.inf	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,24 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-PRJ_PLATFORMS
-DEFAULT
-
-PRJ_MMPFILES
-mmp_traces_slash_target_ext1.mmp
-mmp_traces_slash_target_ext2.mmp
--- a/tracefw/tracecompiler/test/multipleMmpTestCases/mmp_traces_slash_target_ext/group/mmp_traces_slash_target_ext1.mmp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-
-TARGET		  target7.dll
-TARGETTYPE	  kext
-UID			 0 0xE8576D96
-
-USERINCLUDE	 ..\inc
-USERINCLUDE  ..\traces\target7_dll
-
-OS_LAYER_SYSTEMINCLUDE
-
-SYSTEMINCLUDE   \epoc32\include
-
-SOURCEPATH	  ..\src
-SOURCE		  MultipleMmpApp1.cpp 
-SOURCE 		  ExtraCppFile1.cpp
-
-#include "kernel/kern_ext.mmh"
-
-#ifdef ENABLE_ABIV2_MODE
-DEBUGGABLE_UDEBONLY
-#endif
--- a/tracefw/tracecompiler/test/multipleMmpTestCases/mmp_traces_slash_target_ext/group/mmp_traces_slash_target_ext2.mmp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-
-TARGET		  target8.dll
-TARGETTYPE	  kext
-UID			 0 0xE8576D95
-
-USERINCLUDE	 ..\inc
-USERINCLUDE  ..\traces\target8_dll
-
-OS_LAYER_SYSTEMINCLUDE
-
-SYSTEMINCLUDE   \epoc32\include
-
-SOURCEPATH	  ..\src
-SOURCE		  MultipleMmpApp2.cpp 
-SOURCE		  ExtraCppFile2.cpp
-
-#include "kernel/kern_ext.mmh"
-
-#ifdef ENABLE_ABIV2_MODE
-DEBUGGABLE_UDEBONLY
-#endif
--- a/tracefw/tracecompiler/test/multipleMmpTestCases/mmp_traces_slash_target_ext/inc/MultipleMmpApp.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef __MULTIPLEMMPAPP_H__
-#define __MULTIPLEMMPAPP_H__
-
-//  Include Files
-
-#include <e32def.h>
-
-
-//  Function Prototypes
-
-void CallSomeMoreTraceStatements();
-
-#endif  // __MULTIPLEMMPAPP_H__
-
--- a/tracefw/tracecompiler/test/multipleMmpTestCases/mmp_traces_slash_target_ext/src/ExtraCppFile1.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-/*
- * ExtraCppFile.cpp
- *
- *  Created on: Dec 7, 2009
- *      Author: cajagu
- */
-
-#include "MultipleMmpApp.h"
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "ExtraCppFile1Traces.h"
-#endif
-
-void CallSomeMoreTraceStatements()
-    {
-    TInt32 x = 555;
-    TUint32 y = 666;
-
-    OstTrace1( TRACE_FLOW, TEST1_CALLMORE, "CallSomeMoreTraceStatements(): x=%d" , x );
-    OstTrace1( TRACE_FLOW, TEST2_CALLMORE, "CallSomeMoreTraceStatements(): y=%u" , y );
-    }
--- a/tracefw/tracecompiler/test/multipleMmpTestCases/mmp_traces_slash_target_ext/src/ExtraCppFile2.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-/*
- * ExtraCppFile.cpp
- *
- *  Created on: Dec 7, 2009
- *      Author: cajagu
- */
-
-#include "MultipleMmpApp.h"
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "ExtraCppFile2Traces.h"
-#endif
-
-void CallSomeMoreTraceStatements()
-    {
-    TInt32 x = 555;
-    TUint32 y = 666;
-
-    OstTrace1( TRACE_FLOW, TEST1_CALLMORE, "CallSomeMoreTraceStatements(): x=%d" , x );
-    OstTrace1( TRACE_FLOW, TEST2_CALLMORE, "CallSomeMoreTraceStatements(): y=%u" , y );
-    }
--- a/tracefw/tracecompiler/test/multipleMmpTestCases/mmp_traces_slash_target_ext/src/MultipleMmpApp1.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-//  Include Files  
-
-#include "MultipleMmpApp.h"
-#include <kernel/kernel.h>
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "MultipleMmpApp1Traces.h"
-#endif
-
-
-
-DECLARE_STANDARD_EXTENSION()
-    {
-    /****************************TRACE STATEMENTS*********************************/
-    OstTrace0( TRACE_FLOW, TEST1_DECLARE_STANDARD_EXTENSION, "DECLARE_STANDARD_EXTENSION()" );
-    OstTrace0( TRACE_FLOW, TEST2_DECLARE_STANDARD_EXTENSION, "DECLARE_STANDARD_EXTENSION()" );    
-    /*****************************************************************************/
-    
-    CallSomeMoreTraceStatements();
-    
-    return 0;
-    }
-
--- a/tracefw/tracecompiler/test/multipleMmpTestCases/mmp_traces_slash_target_ext/src/MultipleMmpApp2.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-//  Include Files  
-
-#include "MultipleMmpApp.h"
-#include <kernel/kernel.h>
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "MultipleMmpApp2Traces.h"
-#endif
-
-
-DECLARE_STANDARD_EXTENSION()
-    {
-    /****************************TRACE STATEMENTS*********************************/
-    OstTrace0( TRACE_FLOW, TEST1_MAINL, "MainL()" );
-    OstTrace0( TRACE_FLOW, TEST2_MAINL, "MainL()" );    
-    /*****************************************************************************/
-    
-    CallSomeMoreTraceStatements();
-    
-    return 0;
-    }
--- a/tracefw/tracecompiler/test/multipleMmpTestCases/mmp_traces_slash_target_ext_commonsource/group/bld.inf	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-
-PRJ_PLATFORMS
-DEFAULT
-
-PRJ_MMPFILES
-mmp_traces_slash_target_cs_ext1.mmp
-mmp_traces_slash_target_cs_ext2.mmp
--- a/tracefw/tracecompiler/test/multipleMmpTestCases/mmp_traces_slash_target_ext_commonsource/group/mmp_traces_slash_target_cs_ext1.mmp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-
-TARGET		  target9.dll
-TARGETTYPE	  kext
-UID			 0 0xE8576D96
-
-USERINCLUDE	 ..\inc
-USERINCLUDE  ..\traces\target9_dll
-
-OS_LAYER_SYSTEMINCLUDE
-
-SYSTEMINCLUDE   \epoc32\include
-
-SOURCEPATH	  ..\src
-SOURCE		  MultipleMmpApp1.cpp 
-SOURCE 		  ExtraCppFile1.cpp
-
-#include "kernel/kern_ext.mmh"
-
-#ifdef ENABLE_ABIV2_MODE
-DEBUGGABLE_UDEBONLY
-#endif
--- a/tracefw/tracecompiler/test/multipleMmpTestCases/mmp_traces_slash_target_ext_commonsource/group/mmp_traces_slash_target_cs_ext2.mmp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-
-TARGET		  target10.dll
-TARGETTYPE	  kext
-UID			 0 0xE8576D95
-
-USERINCLUDE	 ..\inc
-USERINCLUDE  ..\traces\target10_dll
-
-OS_LAYER_SYSTEMINCLUDE
-
-SYSTEMINCLUDE   \epoc32\include
-
-SOURCEPATH	  ..\src
-SOURCE		  MultipleMmpApp1.cpp 
-SOURCE		  ExtraCppFile1.cpp
-
-#include "kernel/kern_ext.mmh"
-
-#ifdef ENABLE_ABIV2_MODE
-DEBUGGABLE_UDEBONLY
-#endif
--- a/tracefw/tracecompiler/test/multipleMmpTestCases/mmp_traces_slash_target_ext_commonsource/inc/MultipleMmpApp.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef __MULTIPLEMMPAPP_H__
-#define __MULTIPLEMMPAPP_H__
-
-//  Include Files
-
-#include <e32def.h>
-
-
-//  Function Prototypes
-
-void CallSomeMoreTraceStatements();
-
-#endif  // __MULTIPLEMMPAPP_H__
-
--- a/tracefw/tracecompiler/test/multipleMmpTestCases/mmp_traces_slash_target_ext_commonsource/src/ExtraCppFile1.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-/*
- * ExtraCppFile.cpp
- *
- *  Created on: Dec 7, 2009
- *      Author: cajagu
- */
-
-#include "MultipleMmpApp.h"
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "ExtraCppFile1Traces.h"
-#endif
-
-void CallSomeMoreTraceStatements()
-    {
-    TInt32 x = 555;
-    TUint32 y = 666;
-
-    OstTrace1( TRACE_FLOW, TEST1_CALLMORE, "CallSomeMoreTraceStatements(): x=%d" , x );
-    OstTrace1( TRACE_FLOW, TEST2_CALLMORE, "CallSomeMoreTraceStatements(): y=%u" , y );
-    }
--- a/tracefw/tracecompiler/test/multipleMmpTestCases/mmp_traces_slash_target_ext_commonsource/src/MultipleMmpApp1.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-//  Include Files  
-
-#include "MultipleMmpApp.h"
-#include <kernel/kernel.h>
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "MultipleMmpApp1Traces.h"
-#endif
-
-
-
-DECLARE_STANDARD_EXTENSION()
-    {
-    /****************************TRACE STATEMENTS*********************************/
-    OstTrace0( TRACE_FLOW, TEST1_DECLARE_STANDARD_EXTENSION, "DECLARE_STANDARD_EXTENSION()" );
-    OstTrace0( TRACE_FLOW, TEST2_DECLARE_STANDARD_EXTENSION, "DECLARE_STANDARD_EXTENSION()" );    
-    /*****************************************************************************/
-    
-    CallSomeMoreTraceStatements();
-    
-    return 0;
-    }
-
--- a/tracefw/tracecompiler/test/multipleMmpTestCases/mmp_traces_target_type/group/bld.inf	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-
-PRJ_PLATFORMS
-DEFAULT
-
-PRJ_MMPFILES
-mmp_traces_target_type1.mmp
-mmp_traces_target_type2.mmp
--- a/tracefw/tracecompiler/test/multipleMmpTestCases/mmp_traces_target_type/group/mmp_traces_target_type1.mmp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-
-TARGET		  target11.exe
-TARGETTYPE	exe
-UID			 0 0xE8576D96
-
-USERINCLUDE	 ..\inc
-USERINCLUDE  ..\traces_target11_exe
-
-APP_LAYER_SYSTEMINCLUDE
-
-SYSTEMINCLUDE   \epoc32\include
-
-SOURCEPATH	  ..\src
-SOURCE		  MultipleMmpApp1.cpp 
-SOURCE 		  ExtraCppFile1.cpp
-
-LIBRARY		 euser.lib
-
-#ifdef ENABLE_ABIV2_MODE
-DEBUGGABLE_UDEBONLY
-#endif
--- a/tracefw/tracecompiler/test/multipleMmpTestCases/mmp_traces_target_type/group/mmp_traces_target_type2.mmp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-
-TARGET		   target12.exe
-TARGETTYPE	  exe
-UID			 0 0xE8576D95
-
-USERINCLUDE	 ..\inc
-USERINCLUDE  ..\traces_target12_exe
-
-APP_LAYER_SYSTEMINCLUDE
-
-SYSTEMINCLUDE   \epoc32\include
-
-SOURCEPATH	  ..\src
-SOURCE		  MultipleMmpApp2.cpp 
-SOURCE		  ExtraCppFile2.cpp
-
-LIBRARY		 euser.lib
-
-#ifdef ENABLE_ABIV2_MODE
-DEBUGGABLE_UDEBONLY
-#endif
--- a/tracefw/tracecompiler/test/multipleMmpTestCases/mmp_traces_target_type/inc/MultipleMmpApp.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-#ifndef __MULTIPLEMMPAPP_H__
-#define __MULTIPLEMMPAPP_H__
-
-//  Include Files
-
-#include <e32base.h>
-
-//  Function Prototypes
-
-GLDEF_C TInt E32Main();
-void CallSomeMoreTraceStatements();
-
-#endif  // __MULTIPLEMMPAPP_H__
-
--- a/tracefw/tracecompiler/test/multipleMmpTestCases/mmp_traces_target_type/src/ExtraCppFile1.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-/*
- * ExtraCppFile.cpp
- *
- *  Created on: Dec 7, 2009
- *      Author: cajagu
- */
-
-#include "MultipleMmpApp.h"
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "ExtraCppFile1Traces.h"
-#endif
-
-void CallSomeMoreTraceStatements()
-    {
-    TInt32 x = 555;
-    TUint32 y = 666;
-
-    OstTrace1( TRACE_FLOW, TEST1_CALLMORE, "CallSomeMoreTraceStatements(): x=%d" , x );
-    OstTrace1( TRACE_FLOW, TEST2_CALLMORE, "CallSomeMoreTraceStatements(): y=%u" , y );
-    }
--- a/tracefw/tracecompiler/test/multipleMmpTestCases/mmp_traces_target_type/src/ExtraCppFile2.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-/*
- * ExtraCppFile.cpp
- *
- *  Created on: Dec 7, 2009
- *      Author: cajagu
- */
-
-#include "MultipleMmpApp.h"
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "ExtraCppFile2Traces.h"
-#endif
-
-void CallSomeMoreTraceStatements()
-    {
-    TInt32 x = 555;
-    TUint32 y = 666;
-
-    OstTrace1( TRACE_FLOW, TEST1_CALLMORE, "CallSomeMoreTraceStatements(): x=%d" , x );
-    OstTrace1( TRACE_FLOW, TEST2_CALLMORE, "CallSomeMoreTraceStatements(): y=%u" , y );
-    }
--- a/tracefw/tracecompiler/test/multipleMmpTestCases/mmp_traces_target_type/src/MultipleMmpApp1.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,94 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-//  Include Files  
-
-#include "MultipleMmpApp.h"
-#include <e32base.h>
-#include <e32std.h>
-#include <e32cons.h>			// Console
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "MultipleMmpApp1Traces.h"
-#endif
-
-//  Constants
-
-_LIT(KTextConsoleTitle, "Console");
-_LIT(KTextFailed, " failed, leave code = %d");
-_LIT(KTextPressAnyKey, " [press any key]\n");
-
-//  Global Variables
-
-LOCAL_D CConsoleBase* console; // write all messages to this
-
-
-//  Local Functions
-
-LOCAL_C void MainL()
-    {
-    /****************************TRACE STATEMENTS*********************************/
-    OstTrace0( TRACE_FLOW, TEST1_MAINL, "MainL()" );
-    OstTrace0( TRACE_FLOW, TEST2_MAINL, "MainL()" );    
-    /*****************************************************************************/
-    
-    CallSomeMoreTraceStatements();
-    
-    console->Write(_L("Hello, world!\n"));
-    }
-
-LOCAL_C void DoStartL()
-    {
-    // Create active scheduler (to run active objects)
-    CActiveScheduler* scheduler = new (ELeave) CActiveScheduler();
-    CleanupStack::PushL(scheduler);
-    CActiveScheduler::Install(scheduler);
-
-    MainL();
-
-    // Delete active scheduler
-    CleanupStack::PopAndDestroy(scheduler);
-    }
-
-//  Global Functions
-
-GLDEF_C TInt E32Main()
-    {
-    // Create cleanup stack
-    __UHEAP_MARK;
-    CTrapCleanup* cleanup = CTrapCleanup::New();
-
-    // Create output console
-    TRAPD(createError, console = Console::NewL(KTextConsoleTitle, TSize(
-            KConsFullScreen, KConsFullScreen)));
-    if (createError)
-        return createError;
-
-    // Run application code inside TRAP harness, wait keypress when terminated
-    TRAPD(mainError, DoStartL());
-    if (mainError)
-        console->Printf(KTextFailed, mainError);
-    console->Printf(KTextPressAnyKey);
-    console->Getch();
-
-    delete console;
-    delete cleanup;
-    __UHEAP_MARKEND;
-    return KErrNone;
-    }
-
--- a/tracefw/tracecompiler/test/multipleMmpTestCases/mmp_traces_target_type/src/MultipleMmpApp2.cpp	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,94 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-//  Include Files  
-
-#include "MultipleMmpApp.h"
-#include <e32base.h>
-#include <e32std.h>
-#include <e32cons.h>			// Console
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "MultipleMmpApp2Traces.h"
-#endif
-
-//  Constants
-
-_LIT(KTextConsoleTitle, "Console");
-_LIT(KTextFailed, " failed, leave code = %d");
-_LIT(KTextPressAnyKey, " [press any key]\n");
-
-//  Global Variables
-
-LOCAL_D CConsoleBase* console; // write all messages to this
-
-
-//  Local Functions
-
-LOCAL_C void MainL()
-    {
-    /****************************TRACE STATEMENTS*********************************/
-    OstTrace0( TRACE_FLOW, TEST1_MAINL, "MainL()" );
-    OstTrace0( TRACE_FLOW, TEST2_MAINL, "MainL()" );    
-    /*****************************************************************************/
-    
-    CallSomeMoreTraceStatements();
-    
-    console->Write(_L("Hello, world!\n"));
-    }
-
-LOCAL_C void DoStartL()
-    {
-    // Create active scheduler (to run active objects)
-    CActiveScheduler* scheduler = new (ELeave) CActiveScheduler();
-    CleanupStack::PushL(scheduler);
-    CActiveScheduler::Install(scheduler);
-
-    MainL();
-
-    // Delete active scheduler
-    CleanupStack::PopAndDestroy(scheduler);
-    }
-
-//  Global Functions
-
-GLDEF_C TInt E32Main()
-    {
-    // Create cleanup stack
-    __UHEAP_MARK;
-    CTrapCleanup* cleanup = CTrapCleanup::New();
-
-    // Create output console
-    TRAPD(createError, console = Console::NewL(KTextConsoleTitle, TSize(
-            KConsFullScreen, KConsFullScreen)));
-    if (createError)
-        return createError;
-
-    // Run application code inside TRAP harness, wait keypress when terminated
-    TRAPD(mainError, DoStartL());
-    if (mainError)
-        console->Printf(KTextFailed, mainError);
-    console->Printf(KTextPressAnyKey);
-    console->Getch();
-
-    delete console;
-    delete cleanup;
-    __UHEAP_MARKEND;
-    return KErrNone;
-    }
-
--- a/tracefw/tracecompiler/test/src/ErrorLogsTestBase.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,269 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-import static org.junit.Assert.fail;
-
-import java.io.BufferedReader;
-import java.io.DataInputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.PrintStream;
-
-public class ErrorLogsTestBase {
-	
-	/****************************************************UTILITY FUNCTIONS FOR TESTS************************************************************/
-	
-	/**
-	 * This function gets an environment variable value given the name.
-	 * @param variablename The name of the variable for which the value is required.
-	 * @return The variable value.
-	 */
-	public String GetEnvironmentVariablePath(String variablename) {
-		String variablevalue = System.getenv(variablename);
-		if(variablevalue == null || (variablevalue.length()==0)){
-			fail();
-		}
-		
-		// need to check that the path ends in a backslash
-		if(!variablevalue.endsWith(File.separator)){ 
-			variablevalue += File.separator; 
-		}
-		return variablevalue;
-	}
-	
-	/**
-	 * This function invokes the desired compiler for a particular test case depending
-	 * on the string passed
-	 * @param compiler String specifying the compiler to run, and also specifying where
-	 * 		  		   the logs should be stored.
-	 */
-	public void InvokeCompiler(String compiler) {
-		System.out.println ("InvokeCompiler()");
-		//get epocroot location
-		String e32=GetEnvironmentVariablePath("EPOCROOT");
-		
-		String TraceErrorAppPath = e32 + "testdata" + File.separator + "TraceErrorApp" + File.separator;
-		try{
-			File compilerpath = new File (e32 + "epoc32" + File.separator + "tools" + File.separator + "tracecompiler" + File.separator);
-			
-			if (compiler.compareTo("_sbs")==0){//raptor
-				compilerpath = new File (e32 + "testdata" + File.separator + "TraceErrorApp" + File.separator +"group" + File.separator);
-			}
-			else if (compiler.compareTo("_mult_cpp")==0){//raptor compiling project with multiple source files
-				compilerpath = new File (e32 + "testdata" + File.separator + "MultipleCppTraceErrorApp" + File.separator + "group" + File.separator);
-			}
-			else if (compiler.compareTo("_mult_mmp")==0){//raptor compiling project with multiple source files
-				compilerpath = new File (e32 + "testdata" + File.separator + "MultipleMmpTraceErrorApps" + File.separator + "group" + File.separator);
-			}
-			else if (compiler.compareTo("_tc")!=0){
-				System.out.println("Error: Unrecognised test case. Use either _tc, _sbs, _mult_cpp or _mult_mmp");
-				fail();
-			}
-			
-			//set up the process builder object
-	 		ProcessBuilder pb; 
-	 		//commands to be used to invoke the compiler
-	 		if (compiler.compareTo("_tc")==0){//tracecompiler
-	 			// These EMMA flags are added, because of EMMA reporting in Hudson
-				// EMMA lfags are commented out, because it does not work in Hudson at the moment
-//	 			String emmaOutputFileFlag = "-Demma.coverage.out.file=" + e32 + "testdata" + File.separator + "reports" + File.separator + "emma" + File.separator + "coverage.emma";
-//	 			String emmaOutputMergeFlag = "-Demma.coverage.out.merge=true";
-	 			String emmaOutputFileFlag = "";
-	 			String emmaOutputMergeFlag = "";
-	 			pb = new ProcessBuilder("java", emmaOutputFileFlag, emmaOutputMergeFlag, "-classpath",".", "com.nokia.tracecompiler.TraceCompiler", "E8576D92", "TraceErrorApp",TraceErrorAppPath+"group"+File.separator+"TraceErrorApp.mmp",TraceErrorAppPath+"src"+File.separator+"TraceErrorApp.cpp");
-	 		}
-	 		else /*if (compiler.compareTo("_sbs")==0)*/{//for all other raptor cases
-	 			pb = new ProcessBuilder("sbs.bat","-c","armv5.tracecompiler");
-	 		}
-	 		
-			pb.directory(compilerpath);
-			pb.redirectErrorStream(true);
-			
-			//start the compiler
-			Process p = pb.start();
-			InputStream inp = p.getInputStream();
-	        int c = -1;
-	        
-	        
-	        String str = "";
-	        
-	        /*
-	        //read the output from the compiler into the input stream
-	        while ((c = inp.read()) != -1) {
-	            str= str +((char)c);
-	        }
-	        */
-	        
-	        StringBuilder sb = new StringBuilder();
-	        //read the output from the compiler into the input stream
-	        while ((c = inp.read()) != -1) {
-	        	sb.append(((char)c));
-	        }
-	        str = sb.toString();
-	        
-	        
-	    	//Declare output file to write logs to
-	    	FileOutputStream outstream; 
-			PrintStream ps; 
-			System.out.println ("creating output logs in buildlog"+compiler+".txt");
-			outstream = new FileOutputStream(e32+"epoc32"+File.separator+"build"+File.separator+"buildlog"+compiler+".txt");
-			ps = new PrintStream( outstream );
-			ps.println (str);
-			
-			//check return code if tracecompiler.. we don't check error code for raptor:
-			int ret = p.exitValue();
-			if ((ret==0)&&(compiler.compareTo("_tc")==0)){
-				System.out.println("FAIL: TraceCompiler does not exit with error");
-				fail();
-			}
-			inp.close();
-			outstream.close();
-		}
-		
-    	catch (IOException e){//Catch IOException
-    		System.err.println("Error: " + e.getMessage());
-    		fail();
-        }
-		
-	}
-	
-	/**
-	 * This function parses the log files (as specified by the passed string) for errors and warnings
-	 *  and stores them in a separate file (also specified by the same passed string)
-	 * 
-	 * @param pathext  String specifying the part of the name of the build log file to parse which is 
-	 * 				   also part of the name of the file where parsed logs are written to.	  		   
-	 */
-	public void ParseLogFile(String pathext) {
-		System.out.println ("ParseLogFile()");
-		//get epocroot location
-		String e32=GetEnvironmentVariablePath("EPOCROOT");
-		
-		
-	    try{
-	    	// Open the file
-	    	System.out.println ("opening buildlog"+pathext+".txt");
-	    	FileInputStream fstream = new FileInputStream(e32+"epoc32"+File.separator+"build"+File.separator+"buildlog"+pathext+".txt");
-
-	    	// Get the object of DataInputStream
-	    	//System.out.println ("creating input stream");
-	    	DataInputStream in = new DataInputStream(fstream);
-	        BufferedReader br = new BufferedReader(new InputStreamReader(in));
-	    	String strLine;
-	    	
-	    	//Declare output file to write parsed logs to
-	    	FileOutputStream out; 
-			PrintStream p; 
-			//System.out.println ("creating output stream");
-			out = new FileOutputStream(e32+"epoc32"+File.separator+"build"+File.separator+"parsedlogs"+pathext+".txt");
-			p = new PrintStream( out );
-	    	
-	    	//Read File Line By Line and write to parsedlogs.txt
-	    	System.out.println ("Writing to parsedlogs"+pathext+".txt");
-	    	while ((strLine = br.readLine()) != null&&(strLine.length()) >= 9)   {
-	    		//remove any leading white spaces because there are spaces when printed to standard output.
-	    		strLine=strLine.trim();
-		    	if((strLine.startsWith("error:")==true)||(strLine.startsWith("warning:")==true)){
-			    	// Write to a separate file
-			    	p.println (strLine);
-	    	}
-      	
-    	}
-    	
-    	//Close the input and output streams
-    	in.close();
-    	out.close();
-    	}
-    	
-    	catch (IOException e){//Catch IOException
-    		System.err.println("Error: " + e.getMessage());
-    		fail();
-    	}
-	
-	}
-	
-	/**
-	 * This function validates the parsed log file by comparing it to a reference file containg
-	 * the knows warnings and errors 
-	 * @param project String specifying the name of the project folder that was compiled.
-	 * @param pathext String specifying the part of the name of the parsed log file to validate.	   
-	 */
-	public void ValidateLogs(String project, String pathext) {
-		System.out.println ("ValidateLogs()");
-		//get epocroot location
-		String e32=GetEnvironmentVariablePath("EPOCROOT");
-		
-	try{
-		// Open the files
-		System.out.println ("opening referencelog.txt and parsedlogs"+pathext+".txt");
-		FileInputStream fstream1 = new FileInputStream(e32+"testdata"+File.separator+project+File.separator+"data"+File.separator+"referencelog.txt");
-		FileInputStream fstream2 = new FileInputStream(e32+"epoc32"+File.separator+"build"+File.separator+"parsedlogs"+pathext+".txt");
-	
-		// Get the objects of DataInputStream
-		//System.out.println ("creating input streams");
-		DataInputStream in1 = new DataInputStream(fstream1);
-		DataInputStream in2 = new DataInputStream(fstream2);
-		//System.out.println ("creating buffered readers");
-	    BufferedReader br1 = new BufferedReader(new InputStreamReader(in1));
-	    BufferedReader br2 = new BufferedReader(new InputStreamReader(in2));
-		String strLine1;
-		String strLine2;
-		int i=1;
-		
-		//compare the two files
-		while (((strLine1 = br1.readLine()) != null)&&(((strLine2 = br2.readLine()) != null)))   {
-			if (pathext.compareTo("_mult_mmp")!=0){//if this is not the multiple mmp test, then compare the whole error string
-				if(strLine1.compareTo(strLine2)==0){
-					System.out.println ("Validated line "+i+": "+strLine1);
-				}
-				else{
-					System.out.println ("Line "+i+" ("+strLine2+") is not correct.");
-					fail();
-				}
-			}
-			else{//else if this is the multiple mmp test, compare only the last 40 characters of the string because
-				//raptor does not have a specified order in which it compiles mmps using trace compiler so we can't validate exactly
-				if(strLine1.substring(strLine1.length()-40, strLine1.length()).compareTo(strLine2.substring(strLine1.length()-40, strLine2.length()))==0){
-					System.out.println ("Validated line "+i+": "+strLine1);
-				}
-				else{
-					System.out.println ("Line "+i+" ("+strLine2+") is not correct.");
-					fail();
-				}			
-			}
-		i++;
-		}
-		
-		if (i==1) {//never entered loop therefore there were no errors or warnings in the build logs
-			System.out.println("FAIL: Compiler did not output any correct errors to logs");
-			fail();
-		}
-		in1.close();
-		in2.close();
-	}
-	
-	catch (IOException e){//Catch IOException
-		System.err.println("Error: " + e.getMessage());
-		fail();
-    }
-	}
-}
\ No newline at end of file
--- a/tracefw/tracecompiler/test/src/ErrorLogsTestSystem.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,80 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-import org.junit.Test;
-
-public class ErrorLogsTestSystem extends ErrorLogsTestBase{
-	
-	public static void main(String args[]) {		
-	      	org.junit.runner.JUnitCore.main(ErrorLogsTestSystem.class.getName());
-	    }
-	
-	/**
-	 * This test calls Trace Compiler via Raptor and invokes it against a simple c++ project with one mmp file containing one cpp 
-	 * The logs from Raptor (written to std::out) are checked to ensure the errors and warnings from traceCompiler are correct.
-	 */
-	@Test
-	public void SystemTestTraceCompilerAndRaptor (){
-		System.out.println ("****************SystemTestTraceCompilerAndRaptor()**********************");
-		//Call Raptor
-		InvokeCompiler("_sbs");
-		
-		//Parse the Raptor log files (from standard output)
-		ParseLogFile("_sbs");
-		
-		//Validate the Raptor log files
-		ValidateLogs("TraceErrorApp","_sbs");		
-	}
-	
-	/**
-	 * This test calls Trace Compiler via Raptor and invokes it against a c++ project with one mmp file containing two cpp files.
-	 * The logs from Raptor (written to std::out) are checked to ensure the errors and warnings from traceCompiler are correct.
-	 * It is expected that all errors from all ccp files are written to the logs.
-	 */
-	@Test
-	public void SystemTestTraceCompilerAndRaptorMultipleCpps (){
-		System.out.println ("**********SystemTestTraceCompilerAndRaptorMultipleCpps()****************");
-		//Call Raptor
-		InvokeCompiler("_mult_cpp");
-		
-		//Parse the Raptor log files (from standard output)
-		ParseLogFile("_mult_cpp");
-		
-		//Validate the Raptor log files
-		ValidateLogs("MultipleCppTraceErrorApp","_mult_cpp");		
-	}
-	
-	/**
-	 * This test calls Trace Compiler via Raptor and invokes it against a c++ project with two mmp files each containing two cpp files.
-	 * The logs from Raptor (written to std::out) are checked to ensure the erros and warnings from traceCompiler are correct.
-	 * It is expected that all errors from all cpp files in the first mmp which is compiled are written to the logs. Any mmp after that
-	 * point is not compiled.
-	 */
-	@Test
-	public void SystemTestTraceCompilerAndRaptorMultipleMmps (){
-		System.out.println ("**********SystemTestTraceCompilerAndRaptorMultipleMmps()****************");
-		//Call Raptor
-		InvokeCompiler("_mult_mmp");
-		
-		//Parse the Raptor log files (from standard output)
-		ParseLogFile("_mult_mmp");
-		
-		//Validate the Raptor log files
-		ValidateLogs("MultipleMmpTraceErrorApps","_mult_mmp");	
-	}
-}
\ No newline at end of file
--- a/tracefw/tracecompiler/test/src/ErrorLogsTestUnit.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-import org.junit.Test;
-
-public class ErrorLogsTestUnit extends ErrorLogsTestBase {
-	
-	public static void main(String args[]) {		
-	      	org.junit.runner.JUnitCore.main(ErrorLogsTestUnit.class.getName());
-	    }
-	
-	/**
-	 * This test calls Trace Compiler directly and invokes it against a simple c++ project with one cpp and one mmp file
-	 * The exit code from tracecompiler is checked to ensure an error is indicated and the logs are also checked
-	 */
-	@Test
-	public void UnitTestTraceCompiler (){
-		System.out.println ("*********************UnitTestTraceCompiler()****************************");
-		//Call Trace Compiler
-		InvokeCompiler("_tc");
-		
-		//Parse the Trace Compiler log files
-		ParseLogFile("_tc");
-		
-		//Validate the Trace Compiler log files
-		ValidateLogs("TraceErrorApp","_tc");		
-	}
-}
\ No newline at end of file
--- a/tracefw/tracecompiler/test/src/FixedIdDefinitionsTest.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,597 +0,0 @@
-/*
- * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of "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:
- *
- * Description:
- *
- * JUnit tests for fixed_id.definitions file
- *
- */
-
-import java.io.BufferedReader;
-import java.io.BufferedWriter;
-import java.io.DataInputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.FileReader;
-import java.io.FileWriter;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.Writer;
-
-import junit.framework.TestCase;
-
-import org.junit.Test;
-
-import com.nokia.tracecompiler.file.FileUtils;
-import com.nokia.tracecompiler.source.SourceDocumentFactory;
-
-public class FixedIdDefinitionsTest extends TestCase {
-
-	/**
-	 * EMMA output prefix
-	 */
-	private static final String EMMA_OUTPUT_PREFIX = "EMMA: "; //$NON-NLS-1$
-	
-	/**
-	 * Fixed id definitions test app took note prefix
-	 */
-	private static final String FIXED_ID_DEFINITIONS_TEST_APP_TOOK_NOTE_PREFIX = "FixedIdDefinitionsTestApp took"; //$NON-NLS-1$
-
-	/**
-	 * UID3 of FixedIdDefinitionsTestApp
-	 */
-	private static final String FIXED_ID_DEFINITIONS_TEST_APP_UID3 = "E8576D92"; //$NON-NLS-1$
-
-	/**
-	 * txt extension
-	 */
-	private static final String TXT_EXTENSION = ".txt"; //$NON-NLS-1$
-
-	/**
-	 * Reference fid file name prefix
-	 */
-	private static final String REFERENCE_FID_FILE_NAME_PREFIX = "reference_fid_file_"; //$NON-NLS-1$
-
-	/**
-	 * Reference fid file name prefix
-	 */
-	private static final String REFERENCE_TC_OUTPUT_NAME_PREFIX = "reference_tc_output_"; //$NON-NLS-1$	
-
-	/**
-	 * data directory name
-	 */
-	private static final String DATA_DIRECTORY = "data"; //$NON-NLS-1$
-
-	/**
-	 * traces directory name
-	 */
-	private static final String TRACES_DIRECTORY = "traces"; //$NON-NLS-1$
-
-	/**
-	 * fixed_id.definitions file name
-	 */
-	private static final String FIXED_ID_DEFINITIONS_FILE_NAME = "fixed_id.definitions"; //$NON-NLS-1$
-
-	/**
-	 * Line comment tag
-	 */
-	private static final String LINE_COMMENT_TAG = "//"; //$NON-NLS-1$
-
-	/**
-	 * TRACE_USED_IN_TEST_CASE tag
-	 */
-	private static final String TRACE_USED_IN_TEST_CASE_TAG = "TRACE_USED_IN_TEST_CASE"; //$NON-NLS-1$
-
-	/**
-	 * Error text prefix
-	 */
-	private static final String ERROR_TEXT_PREFIX = "Error: "; //$NON-NLS-1$
-
-	/**
-	 * src directory name
-	 */
-	private static final String SRC_DIRECTORY = "src"; //$NON-NLS-1$
-
-	/**
-	 * .cpp extension
-	 */
-	private static final String CPP_EXTENSION = ".cpp"; //$NON-NLS-1$
-
-	/**
-	 * FixedIdDefinitionsTestApp
-	 */
-	private static final String FIXED_ID_DEFINITIONS_TEST_APP = "FixedIdDefinitionsTestApp"; //$NON-NLS-1$
-
-	/**
-	 * Variable for epocroot
-	 */
-	String e32;
-
-	/**
-	 * Path to FixedIdDefinitionsTestApp application
-	 */
-	String fixedIdDefinitionsTestAppPath;
-
-	/**
-	 * Process builder
-	 */
-	ProcessBuilder pb = null;
-
-	/**
-	 * Compiler path
-	 */
-	File compilerPath = null;
-
-	/**
-	 * Line separator
-	 */
-	String lineSeparator;
-
-	/**
-	 * Source file name with full path
-	 */
-	String sourceFileNameWithFullPath;
-
-	/**
-	 * fixed_id.definitions file name with full path
-	 */
-	String fixedIdDefinitionsFileNameWithFullPath;
-
-	/**
-	 * SourceDocumentFactory
-	 */
-	SourceDocumentFactory factory = null;
-
-	public static void main(String[] args) {
-		org.junit.runner.JUnitCore.main(FixedIdDefinitionsTest.class.getName());
-	}
-
-	/**
-	 * setup
-	 */
-	@Test
-	public void setUp() {
-		System.out.println("Setup class variables"); //$NON-NLS-1$
-
-		e32 = System.getenv("EPOCROOT"); //$NON-NLS-1$
-
-		if (!e32.endsWith(File.separator)) {
-			e32 += File.separator;
-		}
-
-		fixedIdDefinitionsTestAppPath = e32 + "testdata" + File.separator //$NON-NLS-1$
-				+ FIXED_ID_DEFINITIONS_TEST_APP + File.separator;
-				
-		// These EMMA flags are added, because of EMMA reporting in Hudson
-		String emmaOutputFileFlag = "-Demma.coverage.out.file=" + e32 + "testdata" + File.separator + "reports" + File.separator + "emma" + File.separator + "coverage.emma";
-		String emmaOutputMergeFlag = "-Demma.coverage.out.merge=true";
-
-		pb = new ProcessBuilder("java", emmaOutputFileFlag, emmaOutputMergeFlag, "-classpath", ".", //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
-				"com.nokia.tracecompiler.TraceCompiler", FIXED_ID_DEFINITIONS_TEST_APP_UID3, //$NON-NLS-1$
-				FIXED_ID_DEFINITIONS_TEST_APP, fixedIdDefinitionsTestAppPath
-						+ "group" + File.separator //$NON-NLS-1$
-						+ FIXED_ID_DEFINITIONS_TEST_APP + ".mmp", //$NON-NLS-1$
-				fixedIdDefinitionsTestAppPath + SRC_DIRECTORY + File.separator
-						+ FIXED_ID_DEFINITIONS_TEST_APP + CPP_EXTENSION);
-
-		compilerPath = new File(e32 + "epoc32" + File.separator + "tools" //$NON-NLS-1$//$NON-NLS-2$
-				+ File.separator + "tracecompiler" + File.separator); //$NON-NLS-1$
-
-		lineSeparator = System.getProperty("line.separator"); //$NON-NLS-1$
-
-		sourceFileNameWithFullPath = fixedIdDefinitionsTestAppPath
-				+ SRC_DIRECTORY + File.separator
-				+ FIXED_ID_DEFINITIONS_TEST_APP + CPP_EXTENSION;
-
-		fixedIdDefinitionsFileNameWithFullPath = fixedIdDefinitionsTestAppPath
-				+ TRACES_DIRECTORY + File.separator
-				+ FIXED_ID_DEFINITIONS_FILE_NAME;
-	}
-
-	/**
-	 * Check if fixed id file is created correctly when it doesn't already exist
-	 */
-	@Test
-	public void testFixedIdDefinitionsFunctionalityTestCase_1() {
-		int testCaseNumber = 1;
-		System.out
-				.println("*** Check if fixed id file is created correctly when it doesn't already exist ***"); //$NON-NLS-1$
-		executeTestCase(testCaseNumber, 0);
-	}
-
-	/**
-	 * Check new trace points are assigned values correctly (i.e. existing ones
-	 * don't change)
-	 */
-	@Test
-	public void testFixedIdDefinitionsFunctionalityTestCase_2() {
-		int testCaseNumber = 2;
-		System.out
-				.println("*** Check new trace points are assigned values correctly (i.e. existing ones don't change) ***"); //$NON-NLS-1$
-		executeTestCase(testCaseNumber, 0);
-	}
-
-	/**
-	 * Check removed trace points / user-defined groups are obsoleted correctly
-	 */
-	@Test
-	public void testFixedIdDefinitionsFunctionalityTestCase_3() {
-		int testCaseNumber = 3;
-		System.out
-				.println("*** Check removed trace points / user-defined groups are obsoleted correctly ***"); //$NON-NLS-1$
-		executeTestCase(testCaseNumber, 0);
-	}
-
-	/**
-	 * Check that adding a trace point with an obsoleted name is given a new
-	 * value.
-	 */
-	@Test
-	public void testFixedIdDefinitionsFunctionalityTestCase_4() {
-		int testCaseNumber = 4;
-		System.out
-				.println("*** Check that adding a trace point with an obsoleted name is given a new value. ***"); //$NON-NLS-1$
-		executeTestCase(testCaseNumber, 0);
-	}
-
-	/**
-	 * Check that obsoleting all trace points in a component that refer to a
-	 * common group id (e.g. TRACE_FLOW) does NOT mark group as obsolete
-	 */
-	@Test
-	public void testFixedIdDefinitionsFunctionalityTestCase_5() {
-		int testCaseNumber = 5;
-		System.out
-				.println("*** Check that obsoleting all trace points in a component that refer to a common group id (e.g. TRACE_FLOW) does NOT mark group as obsolete ***"); //$NON-NLS-1$
-		executeTestCase(testCaseNumber, 0);
-	}
-
-	/**
-	 * Check that repeatedly obsoleting a trace point does not mess
-	 * TraceCompiler.
-	 */
-	@Test
-	public void testFixedIdDefinitionsFunctionalityTestCase_6() {
-		int testCaseNumber = 6;
-		int subTestNumber = 1;
-		System.out
-				.println("*** Check that repeatedly obsoleting a trace point does not mess TraceCompiler. ***"); //$NON-NLS-1$
-		int numberOfSubTests = 4;
-		while (subTestNumber < numberOfSubTests) {
-			executeTestCase(testCaseNumber, subTestNumber);
-			subTestNumber++;
-		}
-	}
-
-	/**
-	 * Check that repeatedly changing group of the trace point does not mess
-	 * TraceCompiler.
-	 */
-	@Test
-	public void testFixedIdDefinitionsFunctionalityTestCase_7() {
-		int testCaseNumber = 7;
-		int subTestNumber = 1;
-		System.out
-				.println("*** Check that repeatedly changing group of the trace point does not mess TraceCompiler. ***"); //$NON-NLS-1$
-		int numberOfSubTests = 3;
-		while (subTestNumber < numberOfSubTests) {
-			executeTestCase(testCaseNumber, subTestNumber);
-			subTestNumber++;
-		}
-	}
-
-	/**
-	 * Check that a OSTv1 common group id values results in new fixed id file.
-	 */
-	@Test
-	public void testFixedIdDefinitionsFunctionalityTestCase_8() {
-		int testCaseNumber = 8;
-		System.out
-				.println("*** Check that a OSTv1 common group id values results in new fixed id file. ***"); //$NON-NLS-1$
-		executeTestCaseWithTraceCompilerOutputCheck(testCaseNumber, 0);
-	}
-
-	/**
-	 * Check that a OSTv1 user group id values results in new fixed id file.
-	 */
-	@Test
-	public void testFixedIdDefinitionsFunctionalityTestCase_9() {
-		int testCaseNumber = 9;
-		System.out
-				.println("*** Check that a OSTv1 user group id values results in new fixed id file. ***"); //$NON-NLS-1$
-		executeTestCaseWithTraceCompilerOutputCheck(testCaseNumber, 0);
-	}
-
-	/**
-	 * Sub function to execute test case with TraceCompiler output check
-	 * 
-	 * @param testCaseNumber
-	 *            Test case number
-	 */
-	private void executeTestCaseWithTraceCompilerOutputCheck(
-			int testCaseNumber, int subTestNumber) {
-		System.out
-				.println("Start to execute test case with TraceCompiler output check."); //$NON-NLS-1$
-		modifyFixedIdDefinitionsTestApp(testCaseNumber, subTestNumber);
-		InputStream traceCompilerOutput = runTraceCompiler();
-		verifyTraceCompilerOutput(testCaseNumber, subTestNumber,
-				traceCompilerOutput);
-		verifyTestResults(testCaseNumber, subTestNumber);
-	}
-
-	/**
-	 * Sub function to execute test case
-	 * 
-	 * @param testCaseNumber
-	 *            Test case number
-	 */
-	private void executeTestCase(int testCaseNumber, int subTestNumber) {
-		System.out.println("Start to execute test case."); //$NON-NLS-1$
-		modifyFixedIdDefinitionsTestApp(testCaseNumber, subTestNumber);
-		if (testCaseNumber > 1) {
-			initializeFixedIDDefinitionsFile(testCaseNumber, subTestNumber);
-		}
-		runTraceCompiler();
-		verifyTestResults(testCaseNumber, subTestNumber);
-	}
-
-	/**
-	 * Initialize fixed_id.defitions file
-	 * 
-	 * @param testCaseNumber
-	 *            Test case number
-	 */
-	private void initializeFixedIDDefinitionsFile(int testCaseNumber,
-			int subTestNumber) {
-		System.out.println("Initialize fixed_id.defitions file"); //$NON-NLS-1$
-		String refesenceFileName;
-		if (subTestNumber == 0) {
-			refesenceFileName = REFERENCE_FID_FILE_NAME_PREFIX
-					+ (testCaseNumber - 1);
-		} else {
-			refesenceFileName = REFERENCE_FID_FILE_NAME_PREFIX + testCaseNumber
-					+ "_" + (subTestNumber - 1); //$NON-NLS-1$
-		}
-		refesenceFileName = refesenceFileName + TXT_EXTENSION;
-		String sourceFile = fixedIdDefinitionsTestAppPath + DATA_DIRECTORY
-				+ File.separator + refesenceFileName;
-		File source = new File(sourceFile);
-		File target = new File(fixedIdDefinitionsFileNameWithFullPath);
-		FileUtils.copyFile(source, target);
-	}
-
-	/**
-	 * Modify FixedIdDefinitionsTestApp application source code
-	 * 
-	 * @param testCaseNumber
-	 *            test case number
-	 */
-	private void modifyFixedIdDefinitionsTestApp(int testCaseNumber,
-			int subTestNumber) {
-		System.out
-				.println("Modify FixedIdDefinitionsTestApp application source code"); //$NON-NLS-1$
-		try {
-			StringBuilder modifiedContents = new StringBuilder();
-			File sourceFile = new File(sourceFileNameWithFullPath);
-			BufferedReader input = new BufferedReader(
-					new FileReader(sourceFile));
-			String line;
-			String currentTestCaseTag = TRACE_USED_IN_TEST_CASE_TAG
-					+ "_" + testCaseNumber; //$NON-NLS-1$
-			if (subTestNumber != 0) {
-				currentTestCaseTag = currentTestCaseTag + "_" + subTestNumber; //$NON-NLS-1$
-			}
-			while ((line = input.readLine()) != null) {
-				if (line.indexOf(TRACE_USED_IN_TEST_CASE_TAG) != -1) {
-					if (line.indexOf(currentTestCaseTag) != -1) {
-						if (line.startsWith(LINE_COMMENT_TAG)) {
-							line = line.substring(LINE_COMMENT_TAG.length());
-						}
-					} else {
-						if (!line.startsWith(LINE_COMMENT_TAG)) {
-							line = LINE_COMMENT_TAG + line;
-						}
-					}
-				}
-				modifiedContents.append(line);
-				modifiedContents.append(lineSeparator);
-			}
-			input.close();
-			Writer sourceFileWriter = new BufferedWriter(new FileWriter(
-					sourceFileNameWithFullPath));
-			sourceFileWriter.write(modifiedContents.toString());
-			sourceFileWriter.close();
-
-			if (testCaseNumber == 8 || testCaseNumber == 9) {
-				String fileContent = "#Fixed group and trace id definitions. If this file is removed, the identifiers are rebuilt." + lineSeparator; //$NON-NLS-1$
-
-				if (testCaseNumber == 8) {
-					fileContent += "[GROUP]TRACE_FLOW=0x7" + lineSeparator //$NON-NLS-1$
-							+ "[TRACE]TRACE_FLOW[0x7]_TRACE1=0x1"; //$NON-NLS-1$
-				} else if (testCaseNumber == 9) {
-					fileContent += "[GROUP]MY_GROUP=0x70" + lineSeparator //$NON-NLS-1$
-							+ "[TRACE]MY_GROUP [0x70]_TRACE1=0x1"; //$NON-NLS-1$
-				}
-				Writer fixedIDDefinitionsFileWriter = new BufferedWriter(
-						new FileWriter(fixedIdDefinitionsFileNameWithFullPath));
-				fixedIDDefinitionsFileWriter.write(fileContent);
-				fixedIDDefinitionsFileWriter.close();
-			}
-
-		} catch (Exception e) {
-			System.err.println(ERROR_TEXT_PREFIX + e.getMessage());
-			fail();
-		}
-	}
-
-	/**
-	 * Run TraceCompiler
-	 */
-	private InputStream runTraceCompiler() {
-		System.out.println("Run TraceCompiler"); //$NON-NLS-1$
-		InputStream inp = null;
-		pb.directory(compilerPath);
-		pb.redirectErrorStream(true);
-		// start the compiler
-		try {
-			Process p = pb.start();
-			p.waitFor();
-			inp = p.getInputStream();
-		} catch (Exception e) {// Catch exception if any
-			System.err.println(ERROR_TEXT_PREFIX + e.getMessage());
-			fail();
-		}
-
-		return inp;
-	}
-
-	/**
-	 * Verify TraceCompiler output
-	 * 
-	 * @param traceCompilerOutput
-	 *            TraceCompiler output
-	 */
-	private void verifyTraceCompilerOutput(int testCaseNumber,
-			int subTestNumber, InputStream traceCompilerOutput) {
-		System.out.println("Verify TraceCompiler output"); //$NON-NLS-1$
-
-		String refesenceFileName = REFERENCE_TC_OUTPUT_NAME_PREFIX
-				+ testCaseNumber;
-		if (subTestNumber != 0) {
-			refesenceFileName = refesenceFileName + "_" + subTestNumber; //$NON-NLS-1$
-		}
-		refesenceFileName = refesenceFileName + TXT_EXTENSION;
-
-		try {
-			FileInputStream fstreamExpected = new FileInputStream(
-					fixedIdDefinitionsTestAppPath + DATA_DIRECTORY
-							+ File.separator + refesenceFileName);
-			compareExpectedAndActual(fstreamExpected, traceCompilerOutput);
-		} catch (FileNotFoundException e) {
-			System.err.println(ERROR_TEXT_PREFIX + e.getMessage());
-			fail();
-		}
-	}
-
-	/**
-	 * Verify test result
-	 * 
-	 * @param testCaseNumber
-	 *            test case number
-	 */
-	private void verifyTestResults(int testCaseNumber, int subTestNumber) {
-		System.out.println("Verify test result"); //$NON-NLS-1$
-		String refesenceFileName = REFERENCE_FID_FILE_NAME_PREFIX
-				+ testCaseNumber;
-
-		if (subTestNumber != 0) {
-			refesenceFileName = refesenceFileName + "_" + subTestNumber; //$NON-NLS-1$
-		}
-
-		refesenceFileName = refesenceFileName + TXT_EXTENSION;
-		try {
-			FileInputStream fstreamExpected = new FileInputStream(
-					fixedIdDefinitionsTestAppPath + DATA_DIRECTORY
-							+ File.separator + refesenceFileName);
-			FileInputStream fstreamActual = new FileInputStream(
-					fixedIdDefinitionsFileNameWithFullPath);
-			compareExpectedAndActual(fstreamExpected, fstreamActual);
-		} catch (FileNotFoundException e) {
-			System.err.println(ERROR_TEXT_PREFIX + e.getMessage());
-			fail();
-		}
-	}
-
-	/**
-	 * Compare expected and actual input streams
-	 * 
-	 * @param streamExpected
-	 *            Expected input stream
-	 * @param streamActual
-	 *            Actual input stream
-	 */
-	private void compareExpectedAndActual(InputStream streamExpected,
-			InputStream streamActual) {
-		System.out.println("Compare expected and actual input streams"); //$NON-NLS-1$
-		try {
-			// Get the objects of DataInputStream
-			DataInputStream inExpected = new DataInputStream(streamExpected);
-			DataInputStream inActual = new DataInputStream(streamActual);
-			BufferedReader brExpected = new BufferedReader(
-					new InputStreamReader(inExpected));
-			BufferedReader brActual = new BufferedReader(new InputStreamReader(
-					inActual));
-
-			String strLineExpected;
-			String strLineActual;
-			int i = 1;
-			// compare the expected and actual input streams
-			while (((strLineExpected = brExpected.readLine()) != null)
-					&& (((strLineActual = brActual.readLine()) != null))) {
-
-				// Skip EMMA outputs if those exists
-				if (strLineActual.trim().startsWith(EMMA_OUTPUT_PREFIX)) {
-						strLineActual = brActual.readLine();
-						if (strLineActual == null) {
-							break;
-						}
-				}
-
-				// Following check skips different TraceCompiler execution time
-				// values
-				if (strLineExpected
-						.indexOf(FIXED_ID_DEFINITIONS_TEST_APP_TOOK_NOTE_PREFIX) != -1
-						&& strLineActual
-								.indexOf(FIXED_ID_DEFINITIONS_TEST_APP_TOOK_NOTE_PREFIX) != -1) {
-					strLineActual = strLineActual.trim().substring(
-							0,
-							FIXED_ID_DEFINITIONS_TEST_APP_TOOK_NOTE_PREFIX
-									.length());
-
-				}
-				assertTrue(ERROR_TEXT_PREFIX + "Line \"" + strLineActual //$NON-NLS-1$
-						+ "\" does not match to \"" + strLineExpected + "\"", //$NON-NLS-1$ //$NON-NLS-2$
-						strLineExpected.compareTo(strLineActual) == 0);
-				i++;
-			}
-			
-			// Check that actual file does not contain any extra lines, it could be that there are some EMMA outputs and those are ok
-			while ((strLineActual = brActual.readLine()) != null) {
-				assertTrue(
-						ERROR_TEXT_PREFIX
-								+ "Actual file does contain extra lines", strLineActual.trim().startsWith(EMMA_OUTPUT_PREFIX)); //$NON-NLS-1$				
-			}
-			
-			// never entered loop therefore there actual file was empty or
-			// missing
-			assertTrue(ERROR_TEXT_PREFIX + "Actual file was empty or missing", //$NON-NLS-1$
-					i > 0);
-
-			inExpected.close();
-			inActual.close();
-		} catch (Exception e) {
-			System.err.println(ERROR_TEXT_PREFIX + e.getMessage());
-			fail();
-		}
-	}
-
-	/**
-	 * tearDown
-	 */
-	@Test
-	public void tearDown() {
-		System.out.println("Comment out all trace points in FixedIdDefinitionsTestApp"); //$NON-NLS-1$
-		modifyFixedIdDefinitionsTestApp(0, 0);
-	}
-}
--- a/tracefw/tracecompiler/test/src/GroupNamesTest.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,226 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-import static org.junit.Assert.*;
-import java.io.*;
-
-import org.junit.Test;
-
-import com.nokia.tracecompiler.TraceCompilerRootException;
-import com.nokia.tracecompiler.project.*;
-
-public class GroupNamesTest { 
-
-	
-	public static void main(String args[]) {		
-	      	org.junit.runner.JUnitCore.main(GroupNamesTest.class.getName());
-	    }
-			
-	@Test
-	public void testGetGroupNameVector() {
-		
-	
-		try {
-			GroupNames.initialiseGroupName();
-		} catch (TraceCompilerRootException e) {
-			fail();
-		}
-					
-		// test group id values obtain by name
-		assertEquals("TRACE_FATAL gid check", GroupNames.getIdByName("TRACE_FATAL"), 129);
-		assertEquals("TRACE_ERROR gid check", GroupNames.getIdByName("TRACE_ERROR"), 130);
-		assertEquals("TRACE_WARNING gid check", GroupNames.getIdByName("TRACE_WARNING"), 131);
-		assertEquals("TRACE_BORDER gid check", GroupNames.getIdByName("TRACE_BORDER"), 132);	    
-		assertEquals("TRACE_API gid check", GroupNames.getIdByName("TRACE_API"), 132);
-		assertEquals("TRACE_IMPORTANT gid check", GroupNames.getIdByName("TRACE_IMPORTANT"), 133);
-		assertEquals("TRACE_NORMAL gid check", GroupNames.getIdByName("TRACE_NORMAL"), 134);
-		assertEquals("TRACE_STATE gid check", GroupNames.getIdByName("TRACE_STATE"), 135);
-		assertEquals("TRACE_INTERNALS gid check", GroupNames.getIdByName("TRACE_INTERNALS"), 136);
-		assertEquals("TRACE_DETAILED", GroupNames.getIdByName("TRACE_DETAILED"), 136);
-		assertEquals("TRACE_DUMP gid check", GroupNames.getIdByName("TRACE_DUMP"), 137);
-		assertEquals("TRACE_DEBUG gid check", GroupNames.getIdByName("TRACE_DEBUG"), 137);
-		assertEquals("TRACE_FLOW gid check", GroupNames.getIdByName("TRACE_FLOW"), 138);
-		assertEquals("TRACE_PERFORMANCE gid check", GroupNames.getIdByName("TRACE_PERFORMANCE"), 139);
-		assertEquals("TRACE_ADHOC gid check", GroupNames.getIdByName("TRACE_ADHOC"), 140);
-		assertEquals("TRACE_EXTENSION gid check", GroupNames.getIdByName("TRACE_EXTENSION"), 141);
-
-		// test GID strings obtained by id
-//		assertEquals("TRACE_FATAL string check", GroupNames.getNameById(129), "TRACE_FATAL");
-//		assertEquals("TRACE_ERROR string check", GroupNames.getNameById(130), "TRACE_ERROR");
-//		assertEquals("TRACE_WARNING string check", GroupNames.getNameById(131), "TRACE_WARNING");
-//		assertEquals("TRACE_BORDER string check", GroupNames.getNameById(132), "TRACE_BORDER");	    
-//		assertEquals("TRACE_IMPORTANT string check", GroupNames.getNameById(133), "TRACE_IMPORTANT");
-//		assertEquals("TRACE_NORMAL string check", GroupNames.getNameById(134), "TRACE_NORMAL");
-//		assertEquals("TRACE_STATE string check", GroupNames.getNameById(135), "TRACE_STATE");
-//		assertEquals("TRACE_INTERNALS string check", GroupNames.getNameById(136), "TRACE_INTERNALS");
-//		assertEquals("TRACE_DUMP string check", GroupNames.getNameById(137), "TRACE_DUMP");
-//		assertEquals("TRACE_FLOW string check", GroupNames.getNameById(138), "TRACE_FLOW");
-//		assertEquals("TRACE_PERFORMANCE string check", GroupNames.getNameById(139), "TRACE_PERFORMANCE");
-//		assertEquals("TRACE_ADHOC string check", GroupNames.getNameById(140), "TRACE_ADHOC");
-//		assertEquals("TRACE_EXTENSION string check", GroupNames.getNameById(141), "TRACE_EXTENSION");	
-//		assertEquals("TRACE_TESTING1 string check", GroupNames.getNameById(254), "TRACE_TESTING1");
-//		assertEquals("TRACE_TESTING2 string check", GroupNames.getNameById(255), "TRACE_TESTING2");	
-	}
-	
-	
-	@Test
-	public void testUserDefinedRange(){
-		// test that the user defined range starts at the expected value
-		assertEquals("user defined range check", GroupNames.USER_GROUP_ID_FIRST, 222);		
-		assertEquals("user defined range check", GroupNames.USER_GROUP_ID_LAST, 253);
-			
-	}
-	
-	@Test
-	public void testModifiedOstHeaderFile(){
-		// copy a modfified file to epoc32\platform\include, rename ost_types.h, run tests, and then replace original ost_types
-	    
-		String e32 = System.getenv("EPOCROOT");
-		if(e32 == null || (e32.length()==0)){
-			fail();
-		}
-		
-		// need to check that e32 ends in a backslash
-		if(!e32.endsWith(File.separator)){ 
-			e32 += File.separator; 
-		}
-		
-		e32 = e32 + "epoc32"+File.separator+"include"+File.separator+"platform"+File.separator;
-		
-		System.out.println(e32);
-		
-		System.setProperty("user.dir", e32);
-		
-		String curDir = System.getProperty("user.dir");
-		System.out.println(curDir);
-		
-		// File (or directory) with old name
-	    File file = new File(e32 + "opensystemtrace_types.h");
-	    
-	    // File (or directory) with new name
-	    File file2 = new File(e32 + "CBR_opensystemtrace_types.h");
-	    
-	    // File (or directory) with new name
-	    File file3 = new File(e32 + "test_opensystemtrace_types.h");
-	    
-	    // Rename file (or directory)
-	    boolean success = file.renameTo(file2);
-	    if (!success) {
-	        // File was not successfully renamed
-	    	fail();
-	    }
-	    
-	    // Rename file (or directory)
-	    success = file3.renameTo(file);
-	    if (!success) {
-	        // File was not successfully renamed
-	    	fail();
-	    }
-	    
-		try {
-			GroupNames.initialiseGroupName();
-		} catch (TraceCompilerRootException e) {
-			fail();
-		}
-		
-		// test group id values obtain by name
-		assertEquals("TRACE_FATAL gid check", GroupNames.getIdByName("TRACE_FATAL"), 149);
-		assertEquals("TRACE_ERROR gid check", GroupNames.getIdByName("TRACE_ERROR"), 150);
-		assertEquals("TRACE_WARNING gid check", GroupNames.getIdByName("TRACE_WARNING"), 151);
-		assertEquals("TRACE_BORDER gid check", GroupNames.getIdByName("TRACE_BORDER"), 152);	    
-		assertEquals("TRACE_API gid check", GroupNames.getIdByName("TRACE_API"), 152);
-		assertEquals("TRACE_IMPORTANT gid check", GroupNames.getIdByName("TRACE_IMPORTANT"), 153);
-		assertEquals("TRACE_NORMAL gid check", GroupNames.getIdByName("TRACE_NORMAL"), 154);
-		assertEquals("TRACE_STATE gid check", GroupNames.getIdByName("TRACE_STATE"), 155);
-		assertEquals("TRACE_INTERNALS gid check", GroupNames.getIdByName("TRACE_INTERNALS"), 156);
-		assertEquals("TRACE_DETAILED", GroupNames.getIdByName("TRACE_DETAILED"), 156);
-		assertEquals("TRACE_DUMP gid check", GroupNames.getIdByName("TRACE_DUMP"), 157);
-		assertEquals("TRACE_DEBUG gid check", GroupNames.getIdByName("TRACE_DEBUG"), 157);
-		assertEquals("TRACE_FLOW gid check", GroupNames.getIdByName("TRACE_FLOW"), 158);
-		assertEquals("TRACE_PERFORMANCE gid check", GroupNames.getIdByName("TRACE_PERFORMANCE"), 159);
-		assertEquals("TRACE_ADHOC gid check", GroupNames.getIdByName("TRACE_ADHOC"), 160);
-		assertEquals("TRACE_EXTENSION gid check", GroupNames.getIdByName("TRACE_EXTENSION"), 161);
-
-		// test GID strings obtained by id
-//		assertEquals("TRACE_FATAL string check", GroupNames.getNameById(149), "TRACE_FATAL");
-//		assertEquals("TRACE_ERROR string check", GroupNames.getNameById(150), "TRACE_ERROR");
-//		assertEquals("TRACE_WARNING string check", GroupNames.getNameById(151), "TRACE_WARNING");
-//		assertEquals("TRACE_BORDER string check", GroupNames.getNameById(152), "TRACE_BORDER");	    
-//		assertEquals("TRACE_IMPORTANT string check", GroupNames.getNameById(153), "TRACE_IMPORTANT");
-//		assertEquals("TRACE_NORMAL string check", GroupNames.getNameById(154), "TRACE_NORMAL");
-//		assertEquals("TRACE_STATE string check", GroupNames.getNameById(155), "TRACE_STATE");
-//		assertEquals("TRACE_INTERNALS string check", GroupNames.getNameById(156), "TRACE_INTERNALS");
-//		assertEquals("TRACE_DUMP string check", GroupNames.getNameById(157), "TRACE_DUMP");
-//		assertEquals("TRACE_FLOW string check", GroupNames.getNameById(158), "TRACE_FLOW");
-//		assertEquals("TRACE_PERFORMANCE string check", GroupNames.getNameById(159), "TRACE_PERFORMANCE");
-//		assertEquals("TRACE_ADHOC string check", GroupNames.getNameById(160), "TRACE_ADHOC");
-//		assertEquals("TRACE_EXTENSION string check", GroupNames.getNameById(161), "TRACE_EXTENSION");
-	} 
-   
-	@Test
-    public void tearDown() {
-        // release objects under test here, if necessary
-		
-		String e32 = System.getenv("EPOCROOT");
-		if(e32 == null || (e32.length()==0)){
-			fail();
-		}
-		
-		// need to check that e32 ends in a backslash
-		if(!e32.endsWith(File.separator)){ 
-			e32 += File.separator; 
-		}
-		
-		e32 = e32 + "epoc32"+File.separator+"include"+File.separator+"platform"+File.separator;
-		
-		System.out.println(e32);
-		
-		System.setProperty("user.dir", e32);
-		
-		String curDir = System.getProperty("user.dir");
-		System.out.println(curDir);
-		
-		// File (or directory) with old name
-	    File file = new File(e32 + "opensystemtrace_types.h");
-	    
-	    // File (or directory) with new name
-	    File file2 = new File(e32 + "CBR_opensystemtrace_types.h");
-	    
-	    	    
-	    boolean i = file.exists();
-	    System.out.println(i);
-	    
-	    // Rename file (or directory)
-	    boolean success = (file.delete());
-	    if (!success) {
-	        fail();
-	    }
-	    
-	    success = file2.renameTo(file);
-	    if (!success) {
-	        // File was not successfully renamed
-	    	fail();
-	    }
-	    
-
-		
-		// File (or directory) with old name
-	    
-	    
-	}
-}
--- a/tracefw/tracecompiler/test/src/MacroWrappersTest.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,239 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-*
-* JUnit tests for OST MacroWrappers
-*
-*/
-
-
-import static org.junit.Assert.assertTrue;
-
-import java.util.ArrayList;
-import org.junit.Assert;
-import org.junit.Test;
-import com.nokia.tracecompiler.source.*;
-import com.nokia.tracecompiler.document.*;
-
-public class MacroWrappersTest {
-
-	public static void main(String[] args) {
-		org.junit.runner.JUnitCore.main(MacroWrappersTest.class.getName());
-	}
-	
-	@Test
-	public void testMacroWrappers(){
-		
-		// this string should parse down to the following members in list	
-		final String REFERENCE_STR = 
-			"TRACE_DEBUG_ONLY ( mystuff,…, OstTraceExt3( TRACE_DEBUG,DUP7__CONSTRUCTL,\"::ConstructL;x=%d;y=%d;z=%d\",x,y,z ) );";
-		FileDocumentMonitor monitor = new FileDocumentMonitor();		
-		SourceDocumentFactory factory = monitor.getFactory();
-
-		// construct the reference parameter array
-		ArrayList<String> expectedTokens = new ArrayList<String>();
-		expectedTokens.add("TRACE_DEBUG");
-		expectedTokens.add("DUP7__CONSTRUCTL");
-		expectedTokens.add("\"::ConstructL;x=%d;y=%d;z=%d\"");
-		expectedTokens.add("x");
-		expectedTokens.add("y");
-		expectedTokens.add("z");
-
-		// construct the trace string from reference parameters
-		final String TRACE_STR = "OstTraceExt3( "+ expectedTokens.get(0) + 
-								 "," + expectedTokens.get(1) + 
-								 "," + expectedTokens.get(2) +
-								 "," + expectedTokens.get(3) + 
-								 "," + expectedTokens.get(4) +
-								 "," + expectedTokens.get(5) + " )";
-				
-		// first test the parser on an unwrapped string
-		SourceParser sourceParser = new SourceParser(factory, factory.createDocument(TRACE_STR));
-		ArrayList<String> actualTokens = new ArrayList<String>();
-		// parse string
-		try{
-			sourceParser.tokenizeParameters(0, actualTokens, true);			
-		}catch(SourceParserException e){
-			Assert.fail(e.getMessage());
-		}
-						
-		checkContents(actualTokens, expectedTokens); 
-						
-		// Create the wrapped OstTrace...  	
-		final String WRAPPED_STR = "TRACE_DEBUG_ONLY ( mystuff,…, " + TRACE_STR + " );";
-		
-		// do a quick check to see that the reference string matches the string generated from list
-		// we could use java.util.StringTokenizer to generate the expected list, 
-		// but this is test code for tracecompiler after all
-		assertTrue(REFERENCE_STR.compareTo(WRAPPED_STR) == 0 );
-
-		sourceParser = new SourceParser(factory, factory.createDocument(WRAPPED_STR));
-		
-
-		actualTokens.clear();
-		// this string should parse down to the following members in list
-		// [0]	"mystuff"	
-		// [1]	"…"	
-		// [2]	"OstTraceExt3( TRACE_DEBUG, DUP7__CONSTRUCTL, "::ConstructL;x=%d;y=%d;z=%d",x,y,z )"	
-		try{
-			sourceParser.tokenizeParameters(0, actualTokens, true);			
-		}catch(SourceParserException e){
-			Assert.fail(e.getMessage());
-		}
-
-		assertTrue(actualTokens.size() == 3);
-		assertTrue(((String)actualTokens.get(0)).compareTo("mystuff") == 0);
-		assertTrue(((String)actualTokens.get(1)).compareTo("…") == 0);
-		
-		// now check the extracted OstTrace part
-		String ostStr = (String)actualTokens.get(2);
-		assertTrue(ostStr.compareTo(TRACE_STR) == 0);
-		
-		sourceParser = new SourceParser(factory, factory.createDocument(ostStr));
-		actualTokens.clear();
-
-		try{
-			sourceParser.tokenizeParameters(0, actualTokens, true);			
-		}catch(SourceParserException e){
-			Assert.fail(e.getMessage());
-		}
-						
-		checkContents(actualTokens, expectedTokens); 
-	}
-	
-	
-	@Test
-	public void testMultipleMacroWrappers(){
-		
-		// testing parsing of macro in this format
-		//TRACE_DEBUG_ONLY (OstTrace0( TRACE_DETAILED, DUP5__CONSTRUCTL, "::ConstructL" )
-		// , OstTraceExt3( TRACE_BORDER, DUP99__CONSTRUCTL, "::ConstructL;x=%x;y=%x;z=%x",x,y, (x+y) ));
-		
-		final String REFERENCE_STR = 
-			"TRACE_DEBUG_ONLY (OstTrace0( TRACE_DETAILED,DUP5__CONSTRUCTL ),OstTraceExt3( TRACE_BORDER,DUP99__CONSTRUCTL,\"::ConstructL;x=%x;y=%x;z=%x\",x,y,(x+y) ));";
-
-		FileDocumentMonitor monitor = new FileDocumentMonitor();		
-		SourceDocumentFactory factory = monitor.getFactory();
-
-		
-		// construct the reference parameter array
-		ArrayList<String> expectedTokens1 = new ArrayList<String>();
-		expectedTokens1.add("TRACE_DETAILED");
-		expectedTokens1.add("DUP5__CONSTRUCTL");
-		
-		
-		ArrayList<String> expectedTokens2 = new ArrayList<String>();
-		expectedTokens2.add("TRACE_BORDER");
-		expectedTokens2.add("DUP99__CONSTRUCTL");
-		expectedTokens2.add("\"::ConstructL;x=%x;y=%x;z=%x\"");
-		expectedTokens2.add("x");
-		expectedTokens2.add("y");
-		expectedTokens2.add("(x+y)");
-
-		// construct the trace strings from reference parameters
-		final String TRACE_STR1 = "OstTrace0( "+ expectedTokens1.get(0) + 
-								 "," + expectedTokens1.get(1) + " )";
-
-		final String TRACE_STR2 = "OstTraceExt3( "+ expectedTokens2.get(0) + 
-								  "," + expectedTokens2.get(1) + 
-								  "," + expectedTokens2.get(2) +
-								  "," + expectedTokens2.get(3) + 
-								  "," + expectedTokens2.get(4) +
-								  "," + expectedTokens2.get(5) + " )";
-
-		// check it works with TRACE_STR1
-		SourceParser sourceParser = new SourceParser(factory, factory.createDocument(TRACE_STR1));
-		ArrayList<String> actualTokens = new ArrayList<String>();
-		// parse string
-		try{
-			sourceParser.tokenizeParameters(0, actualTokens, true);			
-		}catch(SourceParserException e){
-			Assert.fail(e.getMessage());
-		}
-						
-		checkContents(actualTokens, expectedTokens1); 
-
-		// check it works with TRACE_STR2
-		sourceParser = new SourceParser(factory, factory.createDocument(TRACE_STR2));
-		actualTokens.clear();
-		
-		// parse string
-		try{
-			sourceParser.tokenizeParameters(0, actualTokens, true);			
-		}catch(SourceParserException e){
-			Assert.fail(e.getMessage());
-		}
-						
-		checkContents(actualTokens, expectedTokens2); 
-
-		// create the composite string
-		String TRACE_STR3 = "TRACE_DEBUG_ONLY (" + TRACE_STR1 + "," + TRACE_STR2 + ");";
-
-		// do a quick check to see that the reference string matches the string generated from list
-		// we could use java.util.StringTokenizer to generate the expected list, 
-		// but this is test code for tracecompiler after all
-		assertTrue(REFERENCE_STR.compareTo(TRACE_STR3) == 0);
-		
-		sourceParser = new SourceParser(factory, factory.createDocument(TRACE_STR3));
-		actualTokens.clear();
-
-		// this string should parse down to the following members in list
-		// [0]	"OstTraceExt0( TRACE_DETAILED,DUP5__CONSTRUCTL )" (id=77)	
-		// [1]	"OstTraceExt3( TRACE_BORDER,DUP99__CONSTRUCTL,"::ConstructL;x=%d;y=%d;z=%d",x,y,z )" (id=78)	
-		try{
-			sourceParser.tokenizeParameters(0, actualTokens, true);			
-		}catch(SourceParserException e){
-			Assert.fail(e.getMessage());
-		}
-		
-		assertTrue(actualTokens.size() == 2);
-		final String OST_STR1 = actualTokens.get(0);
-		assertTrue(OST_STR1.compareTo(TRACE_STR1) == 0);
-		final String OST_STR2 = actualTokens.get(1);
-		assertTrue(OST_STR2.compareTo(TRACE_STR2) == 0);
-		
-		
-		// check parsing of first OST macro
-		sourceParser = new SourceParser(factory, factory.createDocument(OST_STR1));
-		actualTokens.clear();
-		try{
-			sourceParser.tokenizeParameters(0, actualTokens, true);			
-		}catch(SourceParserException e){
-			Assert.fail(e.getMessage());
-		}
-
-		checkContents(actualTokens, expectedTokens1);
-		
-
-		// check parsing of second OST macro
-		sourceParser = new SourceParser(factory, factory.createDocument(OST_STR2));
-		actualTokens.clear();
-		try{
-			sourceParser.tokenizeParameters(0, actualTokens, true);			
-		}catch(SourceParserException e){
-			Assert.fail(e.getMessage());
-		}
-
-		checkContents(actualTokens, expectedTokens2);
-		
-	}
-
-	
-	private static void checkContents(final ArrayList<String> ACTUAL, final ArrayList<String> EXPECTED ){
-		assertTrue(ACTUAL.size() == EXPECTED.size());
-		for(int i=0;i < ACTUAL.size();i++){
-			assertTrue( ACTUAL.get(i).compareTo(EXPECTED.get(i)) == 0);			
-		}		
-	}
-}
--- a/tracefw/tracecompiler/test/src/MultipleMmpTest.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,754 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-import static org.junit.Assert.fail;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.List;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-import com.nokia.tracecompiler.engine.TraceCompilerEngineGlobals;
-import com.nokia.tracecompiler.model.TraceCompilerException;
-
-
-public class MultipleMmpTest {
-	
-	public static void main(String args[]) {		
-	      	org.junit.runner.JUnitCore.main(MultipleMmpTest.class.getName());
-	    }
-	
-	/****************************************************UTILITY FUNCTIONS FOR TESTS************************************************************/
-	
-	private static String epocroot = null; 
-	private static String projectdir = "testdata\\MultipleMmpTestCases\\"; //$NON-NLS-1$
-	private static String dictpath= "epoc32\\ost_dictionaries\\"; //$NON-NLS-1$
-	private static String autogenpath= "epoc32\\include\\platform\\symbiantraces\\autogen\\"; //$NON-NLS-1$
-	private static Pattern versionPattern = Pattern.compile("^.*(\\d+\\.\\d+\\.\\d+).*$"); //$NON-NLS-1$
-	private static Pattern oldversionPat = Pattern.compile("^(1\\..*)|(2\\.1.*)"); //$NON-NLS-1$
-	//old TC version should be up to 2.12.5 as new functionality was submitted to 2.12.6 (we hope)
-	private static Pattern sbsoldversionPat = Pattern.compile("^(1\\..*)|(2\\.[01]\\..*)|(2\\.1[0-2]\\.[0-3].*)"); //$NON-NLS-1$
-	private static String TCversion = ""; //$NON-NLS-1$
-	private static String SBSversion = ""; //$NON-NLS-1$
-	private static File compilerpath;
-	private static boolean oldTC = false;
-	private static boolean oldBuilder = false; 
-	private static HashMap<String, List<File>> headers = new HashMap<String, List<File>>();
-	private static HashMap<String, List<File>> dicts = new HashMap<String, List<File>>();
-	private static HashMap<String, List<File>> sources = new HashMap<String, List<File>>();
-	private static ProcessBuilder sbs_build = new ProcessBuilder("sbs.bat","-k","-c","winscw_udeb.tracecompiler");
-	private static ProcessBuilder sbs_reallyclean = new ProcessBuilder("sbs.bat","-k","-c","winscw_udeb.tracecompiler", "reallyclean");
-	
-
-	@BeforeClass
-	static public void setEnvVariables() {
-		epocroot = System.getenv("EPOCROOT"); //$NON-NLS-1$
-		if(epocroot == null || (epocroot.length()==0)){
-			fail();
-		}
-		
-		// need to check that the path ends in a backslash
-		if(!epocroot.endsWith("\\")){ 
-			epocroot += "\\"; 
-		}
-
-		compilerpath = new File (epocroot + "epoc32" + File.separator + "tools" + File.separator +"tracecompiler" + File.separator); //default value to remove warnings. //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-
-		ProcessBuilder tc = new ProcessBuilder("java", "-classpath", compilerpath.getPath(), //$NON-NLS-1$//$NON-NLS-2$
-				"com.nokia.tracecompiler.TraceCompiler", "-v"); //$NON-NLS-1$//$NON-NLS-2$
-		System.out.println("compilerPath= " + compilerpath); //$NON-NLS-1$
-		tc.directory(compilerpath);
-		tc.redirectErrorStream(true);
-		try {
-		Process p = tc.start();
-		p.waitFor();	
-
-		
-		String str = readProcessOutput(p);
-		System.out.println("TC version = " + str); //$NON-NLS-1$
-		Matcher m = versionPattern.matcher(str.trim());
-		if (m.matches()) {
-			TCversion = m.group(1);
-			System.out.println("TC Version = " + TCversion); //$NON-NLS-1$
-		}
-		
-		m = oldversionPat.matcher(TCversion);
-		if (m.matches()){
-			oldTC=true;
-		}
-
-		System.out.println("TC version = " + TCversion); //$NON-NLS-1$ 
-		System.out.println("OLD TC version = " + oldTC); //$NON-NLS-1$
-
-		ProcessBuilder sbs = new ProcessBuilder("sbs.bat","-v"); //$NON-NLS-1$ //$NON-NLS-2$
-		sbs.directory(compilerpath);
-		sbs.redirectErrorStream(true);
-			
-		//start the compiler
-		p = sbs.start();
-		p.waitFor();
-			
-		InputStream inp = p.getInputStream();
-			
-	        str = ""; //$NON-NLS-1$
-	        int c;
-	        //read the output from the compiler into the input stream
-	        while ((c = inp.read()) != -1) {
-	           	 str= str +((char)c);
-	        }
-
-		System.out.println("SBS version = " + str); //$NON-NLS-1$
-		m = versionPattern.matcher(str.trim());
-		if (m.matches()) {
-			SBSversion = m.group(1);
-		}
-		
-		m = sbsoldversionPat.matcher(SBSversion);
-		if (m.matches()){
-			oldBuilder=true;
-		}
-		
-		} catch (Exception e) {// Catch exception if any
-			System.err.println(e.getMessage());
-		}
-	}
-	
-	
-	public void createListHeadersDicts(String builder)
-	{
-		//The whole logic of what is expected is built here whether we build with sbs 
-		//new TC or old, The structure is re-built for each case.
-		
-		
-		Matcher m = sbsoldversionPat.matcher(SBSversion);
-		if (m.matches()){
-			oldBuilder=true;
-		} else {
-			oldBuilder=false;
-		}
-		
-		
-		System.out.println("OLD Builder :" + builder + ": = " + oldBuilder); //$NON-NLS-1$
-		
-		File tracesHeader1;
-		File tracesHeader2;
-		File tracesHeader3;
-		File tracesHeader4;
-		File source1;
-		File source2;
-		File source3;
-		File source4;
-		File ostTraceDefinitions;
-		File fixedidDefinitions;
-		File ostDict1;
-		File ostDict2;
-		File autogenDict1;
-		File autogenDict2;
-		String loc = "traces\\"; //$NON-NLS-1$
-		
-		source1 = new File (epocroot+projectdir+"mmp_traces\\src\\MultipleMmpApp1.cpp"); //$NON-NLS-1$
-		source2 = new File (epocroot+projectdir+"mmp_traces\\src\\ExtraCppFile1.cpp"); //$NON-NLS-1$
-		source3 = new File (epocroot+projectdir+"mmp_traces\\src\\MultipleMmpApp2.cpp"); //$NON-NLS-1$
-		source4 = new File (epocroot+projectdir+"mmp_traces\\src\\ExtraCppFile2.cpp"); //$NON-NLS-1$
-		sources.put("_traces", Arrays.asList(source1, source2, source3, source4));
-		
-		tracesHeader1 = new File (epocroot+projectdir+"mmp_traces\\traces\\MultipleMmpApp1Traces.h"); //$NON-NLS-1$
-		tracesHeader2 = new File (epocroot+projectdir+"mmp_traces\\traces\\ExtraCppFile1Traces.h"); //$NON-NLS-1$
-		tracesHeader3 = new File (epocroot+projectdir+"mmp_traces\\traces\\MultipleMmpApp2Traces.h"); //$NON-NLS-1$
-		tracesHeader4 = new File (epocroot+projectdir+"mmp_traces\\traces\\ExtraCppFile2Traces.h"); //$NON-NLS-1$
-		
-		ostTraceDefinitions = new File(epocroot+projectdir+"mmp_traces\\traces\\OstTraceDefinitions.h"); //$NON-NLS-1$
-		fixedidDefinitions = new File(epocroot+projectdir+"mmp_traces\\traces\\fixed_id.definitions"); //$NON-NLS-1$)
-		headers.put("_traces", Arrays.asList(tracesHeader1,tracesHeader2,tracesHeader3,tracesHeader4,ostTraceDefinitions,fixedidDefinitions)); //$NON-NLS-1$
-		
-		ostDict1     = new File(epocroot+dictpath+"mmp_traces1_0xe8576d96_Dictionary.xml"); //$NON-NLS-1$
-		ostDict2     = new File(epocroot+dictpath+"mmp_traces2_0xe8576d95_Dictionary.xml"); //$NON-NLS-1$	
-		autogenDict1 = new File(epocroot+autogenpath+"mmp_traces1_0xe8576d96_TraceDefinitions.h"); //$NON-NLS-1$	
-		autogenDict2 = new File(epocroot+autogenpath+"mmp_traces2_0xe8576d95_TraceDefinitions.h"); //$NON-NLS-1$	
-		dicts.put("_traces", Arrays.asList(ostDict1, ostDict2, autogenDict1, autogenDict2)); //$NON-NLS-1$
-		
-		//=============================
-		
-		if (!oldBuilder && !oldTC) {
-			loc = "traces_mmp_traces_mmpname1\\"; //$NON-NLS-1$
-		}
-		tracesHeader1 = new File (epocroot+projectdir+"mmp_traces_mmpname\\"+ loc + "MultipleMmpApp1Traces.h"); //$NON-NLS-1$ //$NON-NLS-2$
-		tracesHeader2 = new File (epocroot+projectdir+"mmp_traces_mmpname\\" + loc + "ExtraCppFile1Traces.h"); //$NON-NLS-1$ //$NON-NLS-2$
-		if (!oldBuilder && !oldTC) {
-			loc = "traces_mmp_traces_mmpname2\\"; //$NON-NLS-1$
-		}
-		tracesHeader3 = new File (epocroot+projectdir+"mmp_traces_mmpname\\" + loc + "MultipleMmpApp2Traces.h"); //$NON-NLS-1$ //$NON-NLS-2$
-		tracesHeader4 = new File (epocroot+projectdir+"mmp_traces_mmpname\\" + loc + "ExtraCppFile2Traces.h"); //$NON-NLS-1$ //$NON-NLS-2$
-		ostTraceDefinitions = new File(epocroot+projectdir+"mmp_traces_mmpname\\" + loc + "OstTraceDefinitions.h"); //$NON-NLS-1$
-		fixedidDefinitions = new File(epocroot+projectdir+"mmp_traces_mmpname\\" + loc + "fixed_id.definitions"); //$NON-NLS-1$)
-
-		headers.put("_traces_mmpname", Arrays.asList(tracesHeader1,tracesHeader2,tracesHeader3,tracesHeader4,ostTraceDefinitions,fixedidDefinitions)); //$NON-NLS-1$
-		
-		source1 = new File (epocroot+projectdir+"mmp_traces_mmpname\\src\\MultipleMmpApp1.cpp"); //$NON-NLS-1$
-		source2 = new File (epocroot+projectdir+"mmp_traces_mmpname\\src\\ExtraCppFile1.cpp"); //$NON-NLS-1$
-		source3 = new File (epocroot+projectdir+"mmp_traces_mmpname\\src\\MultipleMmpApp2.cpp"); //$NON-NLS-1$
-		source4 = new File (epocroot+projectdir+"mmp_traces_mmpname\\src\\ExtraCppFile2.cpp"); //$NON-NLS-1$
-		sources.put("_traces_mmpname", Arrays.asList(source1, source2, source3, source4));
-		
-		ostDict1     = new File(epocroot+dictpath+"mmp_traces_mmpname1_0xe8576d96_Dictionary.xml"); //$NON-NLS-1$
-		ostDict2     = new File(epocroot+dictpath+"mmp_traces_mmpname2_0xe8576d95_Dictionary.xml"); //$NON-NLS-1$	
-		autogenDict1 = new File(epocroot+autogenpath+"mmp_traces_mmpname1_0xe8576d96_TraceDefinitions.h"); //$NON-NLS-1$	
-		autogenDict2 = new File(epocroot+autogenpath+"mmp_traces_mmpname2_0xe8576d95_TraceDefinitions.h"); //$NON-NLS-1$	
-		dicts.put("_traces_mmpname", Arrays.asList(ostDict1, ostDict2, autogenDict1, autogenDict2)); //$NON-NLS-1$
-
-	    //=============================
-	    
-	    loc = "traces\\"; //$NON-NLS-1$
-		if (!oldTC) {
-			loc = "traces\\target7_dll\\"; //$NON-NLS-1$
-		}
-		tracesHeader1 = new File (epocroot+projectdir+"mmp_traces_slash_target_ext\\" + loc + "MultipleMmpApp1Traces.h"); //$NON-NLS-1$ //$NON-NLS-2$
-		tracesHeader2 = new File (epocroot+projectdir+"mmp_traces_slash_target_ext\\" + loc + "ExtraCppFile1Traces.h"); //$NON-NLS-1$ //$NON-NLS-2$
-		if (!oldTC) {
-			loc = "traces\\target8_dll\\"; //$NON-NLS-1$
-		}
-		tracesHeader3 = new File (epocroot+projectdir+"mmp_traces_slash_target_ext\\" + loc + "MultipleMmpApp2Traces.h"); //$NON-NLS-1$ //$NON-NLS-2$
-		tracesHeader4 = new File (epocroot+projectdir+"mmp_traces_slash_target_ext\\" + loc + "ExtraCppFile2Traces.h"); //$NON-NLS-1$ //$NON-NLS-2$
-		ostTraceDefinitions = new File(epocroot+projectdir+"mmp_traces_slash_target_ext\\" + loc + "OstTraceDefinitions.h"); //$NON-NLS-1$
-		fixedidDefinitions = new File(epocroot+projectdir+"mmp_traces_slash_target_ext\\" + loc + "fixed_id.definitions"); //$NON-NLS-1$)
-
-		headers.put("_traces_slash_target_ext", Arrays.asList(tracesHeader1,tracesHeader2,tracesHeader3,tracesHeader4,ostTraceDefinitions,fixedidDefinitions)); //$NON-NLS-1$
-		
-		source1 = new File (epocroot+projectdir+"mmp_traces_slash_target_ext\\src\\MultipleMmpApp1.cpp"); //$NON-NLS-1$
-		source2 = new File (epocroot+projectdir+"mmp_traces_slash_target_ext\\src\\ExtraCppFile1.cpp"); //$NON-NLS-1$
-		source3 = new File (epocroot+projectdir+"mmp_traces_slash_target_ext\\src\\MultipleMmpApp2.cpp"); //$NON-NLS-1$
-		source4 = new File (epocroot+projectdir+"mmp_traces_slash_target_ext\\src\\ExtraCppFile2.cpp"); //$NON-NLS-1$
-		sources.put("_traces_slash_target_ext", Arrays.asList(source1, source2, source3, source4));
-
-		
-		String name1 = "";
-		String name2 = "";
-		if (oldTC) {
-			name1 = "mmp_traces_slash_target_ext1";
-			name2 = "mmp_traces_slash_target_ext2";
-		} else {
-			name1 = "target7_dll";
-			name2 = "target8_dll";
-		}
-		
-		ostDict1     = new File(epocroot+dictpath + name1 + "_0xe8576d96_Dictionary.xml"); //$NON-NLS-1$
-		ostDict2     = new File(epocroot+dictpath + name2 + "_0xe8576d95_Dictionary.xml"); //$NON-NLS-1$	
-		autogenDict1 = new File(epocroot+autogenpath + name1 + "_0xe8576d96_TraceDefinitions.h"); //$NON-NLS-1$	
-		autogenDict2 = new File(epocroot+autogenpath + name2 + "_0xe8576d95_TraceDefinitions.h"); //$NON-NLS-1$	
-		dicts.put("_traces_slash_target_ext", Arrays.asList(ostDict1, ostDict2, autogenDict1, autogenDict2)); //$NON-NLS-1$
-		
-	    //================================
-	    loc = "traces\\"; //$NON-NLS-1$
-		if (!oldTC) {
-			loc = "traces\\target9_dll\\"; //$NON-NLS-1$
-		}
-		tracesHeader1 = new File (epocroot+projectdir+"mmp_traces_slash_target_ext_commonsource\\" + loc + "MultipleMmpApp1Traces.h"); //$NON-NLS-1$ //$NON-NLS-2$
-		tracesHeader2 = new File (epocroot+projectdir+"mmp_traces_slash_target_ext_commonsource\\" + loc + "ExtraCppFile1Traces.h"); //$NON-NLS-1$ //$NON-NLS-2$
-		if (!oldTC) {
-			loc = "traces\\target10_dll\\"; //$NON-NLS-1$
-		}
-		tracesHeader3 = new File (epocroot+projectdir+"mmp_traces_slash_target_ext_commonsource\\" + loc + "MultipleMmpApp1Traces.h"); //$NON-NLS-1$ //$NON-NLS-2$
-		tracesHeader4 = new File (epocroot+projectdir+"mmp_traces_slash_target_ext_commonsource\\" + loc + "ExtraCppFile1Traces.h"); //$NON-NLS-1$ //$NON-NLS-2$
-		ostTraceDefinitions = new File(epocroot+projectdir+"mmp_traces_slash_target_ext_commonsource\\" + loc + "OstTraceDefinitions.h"); //$NON-NLS-1$
-		fixedidDefinitions = new File(epocroot+projectdir+"mmp_traces_slash_target_ext_commonsource\\" + loc + "fixed_id.definitions"); //$NON-NLS-1$)
-
-		headers.put("_traces_slash_target_ext_commonsource", Arrays.asList(tracesHeader1,tracesHeader2,tracesHeader3,tracesHeader4,ostTraceDefinitions,fixedidDefinitions)); //$NON-NLS-1$
-		
-		source1 = new File (epocroot+projectdir+"mmp_traces_slash_target_ext_commonsource\\src\\MultipleMmpApp1.cpp"); //$NON-NLS-1$
-		source2 = new File (epocroot+projectdir+"mmp_traces_slash_target_ext_commonsource\\src\\ExtraCppFile1.cpp"); //$NON-NLS-1$
-		source3 = new File (epocroot+projectdir+"mmp_traces_slash_target_ext_commonsource\\src\\MultipleMmpApp1.cpp"); //$NON-NLS-1$
-		source4 = new File (epocroot+projectdir+"mmp_traces_slash_target_ext_commonsource\\src\\ExtraCppFile1.cpp"); //$NON-NLS-1$
-		sources.put("_traces_slash_target_ext_commonsource", Arrays.asList(source1, source2, source3, source4));
-
-		
-		if (oldTC) {
-			name1 = "mmp_traces_slash_target_ext1_cs";
-			name2 = "mmp_traces_slash_target_ext2_cs";
-		} else {
-			name1 = "target9_dll";
-			name2 = "target10_dll";
-		}
-		ostDict1     = new File(epocroot+dictpath + name1 + "_0xe8576d96_Dictionary.xml"); //$NON-NLS-1$
-		ostDict2     = new File(epocroot+dictpath + name2 + "_0xe8576d95_Dictionary.xml"); //$NON-NLS-1$	
-		autogenDict1 = new File(epocroot+autogenpath + name1 + "_0xe8576d96_TraceDefinitions.h"); //$NON-NLS-1$	
-		autogenDict2 = new File(epocroot+autogenpath + name2 + "_0xe8576d95_TraceDefinitions.h"); //$NON-NLS-1$	
-		dicts.put("_traces_slash_target_ext_commonsource", Arrays.asList(ostDict1, ostDict2, autogenDict1, autogenDict2)); //$NON-NLS-1$
-		
-		//==================================
-		loc = "traces\\"; //$NON-NLS-1$
-		if (!oldTC && !oldBuilder) {
-			loc = "traces_target11_exe\\"; //$NON-NLS-1$
-		}
-		tracesHeader1 = new File (epocroot+projectdir+"mmp_traces_target_type\\" + loc +"MultipleMmpApp1Traces.h"); //$NON-NLS-1$ //$NON-NLS-2$
-		tracesHeader2 = new File (epocroot+projectdir+"mmp_traces_target_type\\" + loc +"ExtraCppFile1Traces.h"); //$NON-NLS-1$ //$NON-NLS-2$
-		if (!oldTC && !oldBuilder) {
-			loc = "traces_target12_exe\\"; //$NON-NLS-1$
-		}
-		tracesHeader3 = new File (epocroot+projectdir+"mmp_traces_target_type\\" + loc + "MultipleMmpApp2Traces.h"); //$NON-NLS-1$ //$NON-NLS-2$
-		tracesHeader4 = new File (epocroot+projectdir+"mmp_traces_target_type\\" + loc + "ExtraCppFile2Traces.h"); //$NON-NLS-1$ //$NON-NLS-2$
-		ostTraceDefinitions = new File(epocroot+projectdir+"mmp_traces_target_type\\" + loc + "OstTraceDefinitions.h"); //$NON-NLS-1$
-		fixedidDefinitions = new File(epocroot+projectdir+"mmp_traces_target_type\\" + loc + "fixed_id.definitions"); //$NON-NLS-1$)
-
-		headers.put("_traces_target_type", Arrays.asList(tracesHeader1,tracesHeader2,tracesHeader3,tracesHeader4,ostTraceDefinitions,fixedidDefinitions)); //$NON-NLS-1$
-		
-		
-		source1 = new File (epocroot+projectdir+"mmp_traces_target_type\\src\\MultipleMmpApp1.cpp"); //$NON-NLS-1$
-		source2 = new File (epocroot+projectdir+"mmp_traces_target_type\\src\\ExtraCppFile1.cpp"); //$NON-NLS-1$
-		source3 = new File (epocroot+projectdir+"mmp_traces_target_type\\src\\MultipleMmpApp2.cpp"); //$NON-NLS-1$
-		source4 = new File (epocroot+projectdir+"mmp_traces_target_type\\src\\ExtraCppFile2.cpp"); //$NON-NLS-1$
-		sources.put("_traces_target_type", Arrays.asList(source1, source2, source3, source4));
-
-		ostDict1     = new File(epocroot+dictpath+"target11_exe_0xe8576d96_Dictionary.xml"); //$NON-NLS-1$
-		ostDict2     = new File(epocroot+dictpath+"target12_exe_0xe8576d95_Dictionary.xml"); //$NON-NLS-1$	
-		autogenDict1 = new File(epocroot+autogenpath+"target11_exe_0xe8576d96_TraceDefinitions.h"); //$NON-NLS-1$	
-		autogenDict2 = new File(epocroot+autogenpath+"target12_exe_0xe8576d95_TraceDefinitions.h"); //$NON-NLS-1$	
-		dicts.put("_traces_target_type", Arrays.asList(ostDict1, ostDict2, autogenDict1, autogenDict2)); //$NON-NLS-1$	
-		
-		//==================================
-		
-		loc = "traces\\"; //$NON-NLS-1$
-		if (!oldTC && !oldBuilder) {
-			loc = "traces\\target3_dll\\"; //$NON-NLS-1$
-		}
-		tracesHeader1 = new File (epocroot+projectdir+"mmp_traces_mixed\\" + loc + "MultipleMmpApp1Traces.h"); //$NON-NLS-1$ //$NON-NLS-2$
-		tracesHeader2 = new File (epocroot+projectdir+"mmp_traces_mixed\\" + loc + "ExtraCppFile1Traces.h"); //$NON-NLS-1$ //$NON-NLS-2$
-		if (!oldTC && !oldBuilder) {
-			loc = "traces_target4_kext\\"; //$NON-NLS-1$ 
-		}
-		tracesHeader3 = new File (epocroot+projectdir+"mmp_traces_mixed\\" + loc + "MultipleMmpApp2Traces.h"); //$NON-NLS-1$ //$NON-NLS-2$
-		tracesHeader4 = new File (epocroot+projectdir+"mmp_traces_mixed\\" + loc + "ExtraCppFile2Traces.h"); //$NON-NLS-1$ //$NON-NLS-2$		
-		ostTraceDefinitions = new File(epocroot+projectdir+"mmp_traces_mixed\\" + loc + "OstTraceDefinitions.h"); //$NON-NLS-1$
-		fixedidDefinitions = new File(epocroot+projectdir+"mmp_traces_mixed\\" + loc + "fixed_id.definitions"); //$NON-NLS-1$)
-
-		headers.put("_traces_mixed", Arrays.asList(tracesHeader1,tracesHeader2,tracesHeader3,tracesHeader4,ostTraceDefinitions,fixedidDefinitions)); //$NON-NLS-1$		
-		
-		source1 = new File (epocroot+projectdir+"mmp_traces_mixed\\src\\MultipleMmpApp1.cpp"); //$NON-NLS-1$
-		source2 = new File (epocroot+projectdir+"mmp_traces_mixed\\src\\ExtraCppFile1.cpp"); //$NON-NLS-1$
-		source3 = new File (epocroot+projectdir+"mmp_traces_mixed\\src\\MultipleMmpApp2.cpp"); //$NON-NLS-1$
-		source4 = new File (epocroot+projectdir+"mmp_traces_mixed\\src\\ExtraCppFile2.cpp"); //$NON-NLS-1$
-		sources.put("_traces_mixed", Arrays.asList(source1, source2, source3, source4));
-
-		String suffix = ""; //$NON-NLS-1$
-		String name = "";
-		if (!oldBuilder) {
-			suffix = "_dll"; //$NON-NLS-1$
-			name = "target3";
-		} else {
-		        name = "mmp_traces_mixed1";
-		}
-
-		ostDict1     = new File(epocroot+dictpath+name + suffix + "_0xe8576d96_Dictionary.xml"); //$NON-NLS-1$
-		autogenDict1 = new File(epocroot+autogenpath+name + suffix + "_0xe8576d96_TraceDefinitions.h"); //$NON-NLS-1$
-		if (!oldBuilder) {
-			suffix = "_kext"; //$NON-NLS-1$
-			name = "target4";
-		} else {
-			name = "mmp_traces_mixed2";
-		}
-		ostDict2     = new File(epocroot+dictpath+name + suffix + "_0xe8576d95_Dictionary.xml"); //$NON-NLS-1$
-		autogenDict2 = new File(epocroot+autogenpath+name + suffix + "_0xe8576d95_TraceDefinitions.h"); //$NON-NLS-1$	
-		dicts.put("_traces_mixed", Arrays.asList(ostDict1, ostDict2, autogenDict1, autogenDict2)); //$NON-NLS-1$	
-	}
-	
-	
-	/**
-	 * This function invokes raptor on the desired test c++ project
-	 * 
-	 * @param path String specifying the path the compiler needs
-	 * 				  to run from
-	 */
-	public void InvokeCompiler(String path, String builder) {
-		System.out.println ("InvokeCompiler() for : " + builder);
-		
-		List<File> headersList;
-		List<File> dictsList;
-		try{
-			
-			//set up the directory from which the process will be called
-			if (path.compareTo("_traces")==0){ //$NON-NLS-1$
-				headersList = headers.get("_traces"); //$NON-NLS-1$
-				System.out.println("deleting file " + headersList.toString()); //$NON-NLS-1$
-				for (File header : headersList) {
-					if (header.exists()) header.delete();
-				}
-				
-				dictsList = dicts.get("_traces"); //$NON-NLS-1$
-				System.out.println("deleting file " + dictsList.toString()); //$NON-NLS-1$
-				for (File dict : dictsList) {
-					if (dict.exists()) dict.delete();
-				}
-				compilerpath = new File (epocroot+projectdir+"mmp_traces\\group\\"); //$NON-NLS-1$
-			}
-			else if (path.compareTo("_traces_mmpname")==0){ //$NON-NLS-1$
-				headersList = headers.get("_traces_mmpname"); //$NON-NLS-1$
-				System.out.println("deleting file " + headersList.toString()); //$NON-NLS-1$
-				for (File header : headersList) {
-					if (header.exists()) {
-						header.delete();
-					}
-				}
-				
-				dictsList = dicts.get("_traces_mmpname");
-				System.out.println("deleting file " + dictsList.toString());
-				for (File dict : dictsList) {
-					if (dict.exists()) {
-						dict.delete();
-					}
-				}
-				compilerpath = new File (epocroot+projectdir+"mmp_traces_mmpname\\group\\");
-			}
-			else if (path.compareTo("_traces_slash_target_ext")==0){
-				headersList = headers.get("_traces_slash_target_ext");
-				System.out.println("deleting file " + headersList.toString());
-				for (File header : headersList) {
-					if (header.exists()) header.delete();
-				}
-				
-				dictsList = dicts.get("_traces_slash_target_ext");
-				System.out.println("deleting file " + dictsList.toString());
-				for (File dict : dictsList) {
-					if (dict.exists()) dict.delete();
-				}
-				compilerpath = new File (epocroot+projectdir+"mmp_traces_slash_target_ext\\group\\");
-			}
-			else if (path.compareTo("_traces_slash_target_ext_commonsource")==0){
-				headersList = headers.get("_traces_slash_target_ext_commonsource");
-				System.out.println("deleting file " + headersList.toString());
-				for (File header : headersList) {
-					if (header.exists()) header.delete();
-				}
-				
-				dictsList = dicts.get("_traces_slash_target_ext_commonsource");
-				System.out.println("deleting file " + dictsList.toString());
-				for (File dict : dictsList) {
-					if (dict.exists()) dict.delete();
-				}
-				compilerpath = new File (epocroot+projectdir+"mmp_traces_slash_target_ext_commonsource\\group\\");
-			}
-			else if (path.compareTo("_traces_target_type")==0){
-				headersList = headers.get("_traces_target_type");
-				System.out.println("deleting file " + headersList.toString());
-				for (File header : headersList) {
-					if (header.exists()) header.delete();
-				}
-				
-				dictsList = dicts.get("_traces_target_type");
-				System.out.println("deleting file " + dictsList.toString());
-				for (File dict : dictsList) {
-					if (dict.exists()) dict.delete();
-				}
-				compilerpath = new File (epocroot+projectdir+"mmp_traces_target_type\\group\\");
-			}
-			else if (path.compareTo("_traces_mixed")==0){
-				headersList = headers.get("_traces_mixed");
-				System.out.println("deleting file " + headersList.toString());
-				for (File header : headersList) {
-					if (header.exists()) header.delete();
-				}
-				
-				dictsList = dicts.get("_traces_mixed");
-				System.out.println("deleting file " + dictsList.toString());
-				for (File dict : dictsList) {
-					if (dict.exists()) dict.delete();
-				}
-				compilerpath = new File (epocroot+projectdir+"mmp_traces_mixed\\group\\");
-			}
-			else{
-			
-				System.out.println("Error: Unrecognised test case.");
-				fail();
-			}
-			
-			//set up the process builder object
-			sbs_build.directory(compilerpath);
-			sbs_reallyclean.directory(compilerpath);
-			sbs_build.redirectErrorStream(true);
-			
-			
-			
-			Process p;
-			String str = "";
-			//start the compiler
-			System.out.println("Starting build process ....");
-			
-				System.out.println("Running sbs reallyclean on : " + compilerpath + " command: " + sbs_reallyclean.command().toString());
-				p = sbs_reallyclean.start();
-				readProcessOutput(p);
-				System.out.println("Running sbs on : " + compilerpath + " command: " + sbs_build.command().toString());
-				p = sbs_build.start();
-				str = readProcessOutput(p);
-			
-			
-			int ret = p.exitValue();
-			System.out.println("build process ended....");
-			if (ret!=0){
-				System.out.println("build process failed:"+str);
-			}
-		}
-		
-    	catch (Exception e){//Catch exception if any
-    		System.err.println("Error: " + e.getMessage());
-    		fail();
-        }
-		
-	}
-
-
-	static private String readProcessOutput(Process p) throws IOException {
-		InputStream inp = p.getInputStream();
-		
-			int c;
-			String str = "";	        
-			//read the output from the compiler into the input stream
-			while ((c = inp.read()) != -1) {
-		   	 str= str +((char)c);
-			}
-		return str;
-	}
-	
-	/**
-	 * This function checks that the traces header files have been generated in the expected locations
-	 * 
-	 * @param path  String specifying where to look for the traces header file.  		   
-	 */
-	public void CheckForTracesHeaders(String path) {
-		System.out.println ("CheckForTracesHeaders()");
-		System.out.println("Old Builder : " + oldBuilder + "......Old TC : " + oldTC);
-		List<File> headersList = headers.get(path);
-		List<File> sourceList =  sources.get(path);
-		System.out.println("checking files " + headersList.toString());
-		boolean error = false;
-		if ((path.compareTo("_traces_slash_target_ext")==0 || path.compareTo("_traces_slash_target_ext_commonsource")==0) && oldBuilder && !oldTC){
-			System.out.println("No need to check for header files as old sbs cannot call TC");
-		} else {
-			try {
-				TraceCompilerEngineGlobals.start();
-			} catch (TraceCompilerException e) {
-				fail();
-			}
-			for (File header : headersList) {
-				if (!header.exists()) {
-					error = true;
-					System.out.println("Error: "+header+" does not exist/hasn't been generated by TraceCompiler");
-				} else {
-					String licenceInSource = null;
-					String licenceInHeader = null;
-					File source = null;
-					// read the licence from the header file
-					if (header.getName().trim().equalsIgnoreCase("OstTraceDefinitions.h")) {
-						licenceInSource = TraceCompilerEngineGlobals.getDefaultLicence(true);
-						System.out.println("Reading default licence for OstTraceDefinitions.h" + licenceInSource);
-					} else {
-						if (header.getName().trim().equalsIgnoreCase("fixed_id.definitions")) {
-							licenceInSource = TraceCompilerEngineGlobals.getDefaultLicence(false);
-							System.out.println("Reading default licence for fixed_id.definitions" + licenceInSource);
-						} else {
-							licenceInHeader = readFirstMultiLineComment(header.getAbsolutePath());
-							System.out.println("Reading licence from " + header.getAbsolutePath() + " == " + licenceInHeader);
-							source = sourceList.get(headersList.indexOf(header));
-
-							licenceInSource = readFirstMultiLineComment(source.getAbsolutePath());
-							System.out.println("Reading licence from " + source.getAbsolutePath() + " == " + licenceInSource);
-							if (licenceInSource == null) {
-								//licence should be EPL
-								licenceInSource = TraceCompilerEngineGlobals.getDefaultLicence(true);
-								System.out.println("Reading default licence for " + header.getAbsolutePath() + " == " + licenceInSource);
-							}
-						}
-					}
-					if (licenceInHeader != licenceInHeader) {
-						System.out.println("Error: licence in header " + header + " is not the same in source." + source);
-						fail();
-					}
-				}
-			}
-		
-			if(!error){
-				System.out.println("All Traces Header files have been generated as expected");
-			}
-			else {
-				fail();
-				}
-		}
-	}
-
-
-	/**
-	 * @param path
-	 */
-	private String readFirstMultiLineComment(String path) {
-		StringBuffer sb = new StringBuffer();
-		try {
-			FileReader reader = new FileReader(new File(path));
-			BufferedReader br = new BufferedReader(reader);
-			String line;
-			boolean inComment = false;
-			
-			while ((line = br.readLine()) != null) {
-				if (line.trim().startsWith("/*")) {
-					inComment = true;
-				}
-				if (inComment) {
-					sb.append(line + System.getProperty("line.separator"));
-				}
-				if (line.trim().endsWith("*/") && inComment) {
-					break;
-				}
-			}
-			br.close();
-		} catch (Exception e) {
-			System.out.println("Failed to open/read file " + path + "  " + e.getMessage());
-			fail();
-		}
-		String licence = null;
-		if (sb.length()> 0) {
-			licence = sb.toString();
-			if (!licence.contains("Copyright")) {
-				licence = null;
-			}
-		}
-			
-		return licence;
-	}
-	
-	/**
-	 * This function checks that the dictionary files have been generated in the expected locations with the right name
-	 * 
-	 * @param path.  		   
-	 */
-	public void CheckForDictionary(String path) {
-		System.out.println ("CheckForDictionaries()");
-
-		List<File> dictsList = dicts.get(path);
-		System.out.println("checking files " + dictsList.toString());
-		boolean error = false;
-
-		if ((path.compareTo("_traces_slash_target_ext")==0 || path.compareTo("_traces_slash_target_ext_commonsource")==0) && oldBuilder && !oldTC){
-			System.out.println("No need to check for dictionary as old sbs cannot call TC");
-		} else {
-			for (File dict : dictsList) {
-				if(!dict.exists()) {
-					error = true;
-					System.out.println("Error: "+dict+" does not exist/hasn't been generated by TraceCompiler");
-				}
-			}
-
-			if (!error) {
-				System.out.println("Dictionary files have been generated as expected");
-			}
-			else {
-				fail();
-			}
-		}
-	}
-	
-
-	/****************************************************ACTUAL TESTS************************************************************/
-	@Test
-	public void MultipleMmpsTest1 (){
-		System.out.println ("*********************traces****************************");
-		createListHeadersDicts("sbs");
-		//Call Raptor
-		InvokeCompiler("_traces", "sbs");		
-		//Check for header files
-		CheckForTracesHeaders("_traces");
-		//Check dictionary
-		CheckForDictionary("_traces");	
-		
-	
-	}
-	
-
-	@Test
-	public void MultipleMmpsTest2 (){
-		System.out.println ("****************traces_mmpname**********************");
-		createListHeadersDicts("sbs");
-		//Call Raptor
-		InvokeCompiler("_traces_mmpname", "sbs");
-		//Check for header files
-		CheckForTracesHeaders("_traces_mmpname");
-		//Check dictionary
-		CheckForDictionary("_traces_mmpname");
-		
-		
-	}
-	
-
-	@Test
-	public void MultipleMmpsTest3 (){
-		System.out.println ("**********traces_slash_target_ext****************");
-		createListHeadersDicts("sbs");
-		//Call Raptor
-		InvokeCompiler("_traces_slash_target_ext", "sbs");
-		//Check for header files
-		CheckForTracesHeaders("_traces_slash_target_ext");
-		//Check dictionary
-		CheckForDictionary("_traces_slash_target_ext");	
-		
-		
-	}
-
-	@Test
-	public void MultipleMmpsTest4 (){
-		System.out.println ("**********traces_slash_target_ext_commonsource****************");
-		createListHeadersDicts("sbs");
-		//Call Raptor
-		InvokeCompiler("_traces_slash_target_ext_commonsource", "sbs");
-		//Check for header files
-		CheckForTracesHeaders("_traces_slash_target_ext_commonsource");
-		//Check dictionary
-		CheckForDictionary("_traces_slash_target_ext_commonsource");
-		
-		
-				
-	}
-
-	@Test
-	public void MultipleMmpsTest5 (){
-		System.out.println ("**********traces_target_type****************");
-		createListHeadersDicts("sbs");
-		//Call Raptor
-		InvokeCompiler("_traces_target_type", "sbs");
-		//Check for header files
-		CheckForTracesHeaders("_traces_target_type");
-		//Check dictionary
-		CheckForDictionary("_traces_target_type");
-		
-		
-	}
-
-	@Test
-	public void MultipleMmpsTest6 (){
-		System.out.println ("**********traces_mixed****************");
-		createListHeadersDicts("sbs");
-		//Call Raptor
-		InvokeCompiler("_traces_mixed", "sbs");
-		//Check for header files
-		CheckForTracesHeaders("_traces_mixed");
-		//Check dictionary
-		CheckForDictionary("_traces_mixed");	
-	}
-}
--- a/tracefw/tracecompiler/test/src/ParseFunctionParametersTest.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,228 +0,0 @@
-/*
- * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of "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:
- *
- * Description:
- *
- * JUnit tests for function parameters parsing
- *
- */
-
-import static org.junit.Assert.assertTrue;
-
-import java.util.ArrayList;
-import org.junit.Assert;
-import org.junit.Test;
-import com.nokia.tracecompiler.source.*;
-import com.nokia.tracecompiler.document.*;
-
-public class ParseFunctionParametersTest {
-
-	/**
-	 * SourceDocumentFactory
-	 */
-	SourceDocumentFactory iFactory = null;
-
-	public static void main(String[] args) {
-		org.junit.runner.JUnitCore.main(ParseFunctionParametersTest.class
-				.getName());
-	}
-
-	/**
-	 * jUnit test to test function parameter parsing
-	 */
-	@Test
-	public void testFunctionParameterParsing() {
-
-		FileDocumentMonitor monitor = new FileDocumentMonitor();
-		iFactory = monitor.getFactory();
-
-		ArrayList<String> expectedParameterNames = new ArrayList<String>();
-		ArrayList<String> expectedParameterTypes = new ArrayList<String>();
-		String functionHeader;
-
-		// Function header 1
-
-		// First expected parameter
-		expectedParameterNames.add("aLenght"); //$NON-NLS-1$
-		expectedParameterTypes.add("TUint32"); //$NON-NLS-1$
-
-		// Second expected parameter
-		expectedParameterNames.add("aWidth"); //$NON-NLS-1$
-		expectedParameterTypes.add("TUint16"); //$NON-NLS-1$
-
-		// Third expected parameter
-		expectedParameterNames.add("aDelay"); //$NON-NLS-1$
-		expectedParameterTypes.add("TUint32"); //$NON-NLS-1$
-
-		// construct the function header
-		functionHeader = "DHelloWorld::DHelloWorld(TUint32 aLenght, TUint16 aWidth, TUint32 aDelay)\n" //$NON-NLS-1$
-				+ "{"; //$NON-NLS-1$
-
-		System.out.println("Execute test to function header 1"); //$NON-NLS-1$
-		executeTest(expectedParameterNames, expectedParameterTypes,
-				functionHeader);
-
-		// Function header 2
-
-		// Clear expected names and types arrays
-		expectedParameterNames.clear();
-		expectedParameterTypes.clear();
-
-		// construct the function header
-		functionHeader = "EXPORT_C DMessageHandler::DMessageHandler()\n" //$NON-NLS-1$
-				+ ": iWriter( NULL )\n" //$NON-NLS-1$
-				+ ", iSettings( NULL )\n" //$NON-NLS-1$				
-				+ "{"; //$NON-NLS-1$
-
-		System.out.println("Execute test to function header 2"); //$NON-NLS-1$
-		executeTest(expectedParameterNames, expectedParameterTypes,
-				functionHeader);
-
-		// Test headers those caused defects in TraceCompiler version 2.1.0 and
-		// 2.1.1
-		// xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-		// x
-
-		System.out
-				.println("Execute tests to function headers those caused defects in TraceCompiler version 2.1.0 and 2.1.1"); //$NON-NLS-1$
-
-		// Clear expected names and types arrays
-		expectedParameterNames.clear();
-		expectedParameterTypes.clear();
-
-		// First expected parameter
-		expectedParameterNames.add("aObserver"); //$NON-NLS-1$
-		expectedParameterTypes.add("MModemLcsServerObserver"); //$NON-NLS-1$
-
-		// Second expected parameter
-		expectedParameterNames.add("aIsiMsgObserver"); //$NON-NLS-1$
-		expectedParameterTypes.add("MModemLcsIsiMsgObserver"); //$NON-NLS-1$
-
-		// construct the function header
-		functionHeader = "Cmodemlcsserverrrc::Cmodemlcsserverrrc(MModemLcsServerObserver *aObserver, MModemLcsIsiMsgObserver* aIsiMsgObserver):\n" //$NON-NLS-1$
-				+ " CActive(EPriorityStandard) // Standard priority\n" //$NON-NLS-1$
-				+ "{"; //$NON-NLS-1$
-
-		executeTest(expectedParameterNames, expectedParameterTypes,
-				functionHeader);
-
-		// Clear expected names and types arrays
-		expectedParameterNames.clear();
-		expectedParameterTypes.clear();
-
-		// First expected parameter
-		expectedParameterNames.add("aDriver"); //$NON-NLS-1$
-		expectedParameterTypes.add("RMeDriver"); //$NON-NLS-1$
-
-		// Second expected parameter
-		expectedParameterNames.add("aMaxMsgLength"); //$NON-NLS-1$
-		expectedParameterTypes.add("TUint16"); //$NON-NLS-1$
-
-		// construct the function header
-		functionHeader = "CNpeSendData::CNpeSendData(RMeDriver* aDriver, TUint16 aMaxMsgLength): CActive(EPriorityStandard),\n" //$NON-NLS-1$
-				+ "iDriver(aDriver),\n" //$NON-NLS-1$
-				+ "iMaxMsgLength(aMaxMsgLength)\n" //$NON-NLS-1$
-				+ "{"; //$NON-NLS-1$
-
-		executeTest(expectedParameterNames, expectedParameterTypes,
-				functionHeader);
-
-		// Same expected parameter names and types are used as previous case
-
-		// construct the function header
-		functionHeader = "CNpeReceiveData::CNpeReceiveData(RMeDriver* aDriver, TUint16 aMaxMsgLength): CActive(EPriorityStandard),\n" //$NON-NLS-1$
-				+ "iDriver(aDriver),\n" //$NON-NLS-1$
-				+ "iMaxMsgLength(aMaxMsgLength)\n" //$NON-NLS-1$
-				+ "{"; //$NON-NLS-1$
-
-		executeTest(expectedParameterNames, expectedParameterTypes,
-				functionHeader);
-		// x
-		// xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-
-	}
-
-	/**
-	 * Execute test for function header
-	 * 
-	 * @param expectedParameterNames
-	 *            expected parameter names
-	 * @param expectedParameterTypes
-	 *            expected parameter types
-	 * @param functionHeader
-	 *            function header to be parsed
-	 */
-	private void executeTest(ArrayList<String> expectedParameterNames,
-			ArrayList<String> expectedParameterTypes,
-			final String functionHeader) {
-
-		// first test the parser on an unwrapped string
-		SourceParser sourceParser = new SourceParser(iFactory, iFactory
-				.createDocument(functionHeader));
-
-		// ArrayList<String> actualTokens = new ArrayList<String>();
-		ArrayList<SourceParameter> actualParameters = new ArrayList<SourceParameter>();
-
-		// parse string
-		try {
-			sourceParser.parseFunctionParameters(0, actualParameters);
-
-		} catch (SourceParserException e) {
-			Assert.fail(e.getMessage());
-		}
-
-		checkContents(actualParameters, expectedParameterNames,
-				expectedParameterTypes);
-	}
-
-	/**
-	 * Check contents
-	 * 
-	 * @param actualParameters
-	 *            actual parsed parameters
-	 * @param expectedParameterNames
-	 *            expected parameter names
-	 * @param expectedParameterTypes
-	 *            expected parameter types
-	 */
-	private static void checkContents(
-			final ArrayList<SourceParameter> actualParameters,
-			final ArrayList<String> expectedParameterNames,
-			final ArrayList<String> expectedParameterTypes) {
-
-		// Confirm count of parsed parameters
-		
-		System.out.println("Confirm count of parsed parameters:"); //$NON-NLS-1$
-		System.out.println("actualParameters.size() = " + actualParameters.size()); //$NON-NLS-1$
-		System.out.println("expectedParameterNames() = " + expectedParameterNames.size()); //$NON-NLS-1$
-		assertTrue(actualParameters.size() == expectedParameterNames.size());
-		for (int i = 0; i < actualParameters.size(); i++) {
-
-			// Confirm parsed parameter names
-			
-			System.out.println("Confirm parsed parameter names:"); //$NON-NLS-1$
-			System.out.println("actualParameters name = " + actualParameters.get(i).getName()); //$NON-NLS-1$
-			System.out.println("expectedParameter name = " + expectedParameterNames.get(i)); //$NON-NLS-1$
-			assertTrue(actualParameters.get(i).getName().compareTo(
-					expectedParameterNames.get(i)) == 0);
-
-			// Confirm parsed parameter types
-			
-			System.out.println("Confirm parsed parameter types:"); //$NON-NLS-1$
-			System.out.println("actualParameters type = " + actualParameters.get(i).getType()); //$NON-NLS-1$
-			System.out.println("expectedParameter type = " + expectedParameterTypes.get(i)); //$NON-NLS-1$
-			assertTrue(actualParameters.get(i).getType().compareTo(
-					expectedParameterTypes.get(i)) == 0);
-		}
-	}
-}
--- a/tracefw/tracecompiler/test/src/PluginTracePropertyVerifierTest.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,215 +0,0 @@
-/*
- * Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies). 
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of "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:
- *
- * Description:
- *
- * JUnit tests for PluginTracePropertyVerifier
- *
- */
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.util.ArrayList;
-import java.util.List;
-
-import junit.framework.Assert;
-import junit.framework.TestCase;
-
-import org.junit.After;
-import org.junit.AfterClass;
-import org.junit.Before;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-public class PluginTracePropertyVerifierTest extends TestCase {
-
-	/**
-	 * Class to PluginTracePropertyVerifier
-	 */
-	static Class<?> pluginTracePropertyVerifier;
-
-	/**
-	 * PluginTracePropertyVerifier object
-	 */
-	static Object ptpvObject;
-
-	/**
-	 * Empty string
-	 */
-	private static final String EMPTY_STRING = ""; //$NON-NLS-1$
-
-	/**
-	 * White space
-	 */
-	private static final String WHITE_SPACE = " "; //$NON-NLS-1$
-
-	/**
-	 * Enum for different functions to test
-	 * 
-	 */
-	private enum FunctionToTest {
-		ISVALIDDATA
-	}
-
-	/**
-	 * TestData class
-	 * 
-	 */
-	private class TestData {
-		String testString;
-		boolean expectedIsValidDataResult;
-
-		/**
-		 * 
-		 * Constructor
-		 * 
-		 * @param testStringParam
-		 *            the test string
-		 * @param expectedIsValidDataResultParam
-		 *            the expected return value in case of isValidData
-		 *            method
-		 */
-		TestData(String testStringParam, boolean expectedIsValidDataResultParam) {
-			this.testString = testStringParam;
-			this.expectedIsValidDataResult = expectedIsValidDataResultParam;
-		}
-	}
-
-	/**
-	 * List of test data
-	 */
-	List<TestData> testDataList = new ArrayList<TestData>();
-
-	/**
-	 * main
-	 * 
-	 * @param args
-	 */
-	public static void main(String[] args) {
-		org.junit.runner.JUnitCore
-				.main(PluginTracePropertyVerifierTest.class.getName());
-	}
-
-	/**
-	 * setUp
-	 */
-	@Before
-	public void setUp() {
-
-		if (testDataList.size() == 0) {
-			initializeTestDataList();
-		}
-
-		if (pluginTracePropertyVerifier == null && ptpvObject == null) {
-			try {
-				pluginTracePropertyVerifier = Class
-						.forName("com.nokia.tracecompiler.engine.plugin.PluginTracePropertyVerifier"); //$NON-NLS-1$
-				ptpvObject = pluginTracePropertyVerifier.newInstance();
-			} catch (Exception e) {
-				Assert.fail(e.toString());
-			}
-		}
-
-	}
-
-	/**
-	 * Initialize test data list
-	 */
-	private void initializeTestDataList() {
-		char VTAB = 0xB; //vertical TAB
-		testDataList.add(new TestData("Some valid text", true)); //valid text //$NON-NLS-1$
-		testDataList.add(new TestData("Some text with non-valid character - vertical TAB - : " + String.valueOf(VTAB) , false)); //$NON-NLS-1$
-		testDataList.add(new TestData("Some valid text with TAB	: " , true)); //$NON-NLS-1$
-		testDataList.add(new TestData("Some valid text with TABs				: " , true)); //$NON-NLS-1$
-	}
-
-	/**
-	 * Execute tests
-	 * 
-	 * @param nameOfFunctionUnderTest
-	 *            the name of the function that should be tested
-	 * @param testType
-	 *            the number of expected result column
-	 */
-	private void executeTests(String nameOfFunctionUnderTest,
-			FunctionToTest testType) {
-		for (int i = 0; i < testDataList.size(); i++) {
-			String testString = testDataList.get(i).testString;
-			boolean expectedResult = false;
-
-			switch (testType) {
-			case ISVALIDDATA:
-				expectedResult = testDataList.get(i).expectedIsValidDataResult;
-				break;
-			}
-
-			executeTest(nameOfFunctionUnderTest, testString, expectedResult);
-		}
-	}
-
-	/**
-	 * Execute test
-	 * 
-	 * @param nameOfFunctionUnderTest
-	 *            the name of the function that should be tested
-	 * @param testString
-	 *            the test string that is used in test
-	 * @param columNumberOfExpectedResult
-	 *            the number of expected result column
-	 */
-	private void executeTest(String nameOfFunctionUnderTest, String testString,
-			boolean expectedResult) {
-		Method functionUnderTest = null;
-		try {
-			functionUnderTest = pluginTracePropertyVerifier.getDeclaredMethod(
-					nameOfFunctionUnderTest, String.class);
-			// change access of the function under test because otherwise we can
-			// test to private functions
-			functionUnderTest.setAccessible(true);
-			// invoke the function and get result
-			Object retObj = null;
-
-			// remove white spaces from test string, because those those does
-			// not exist in real life either
-			retObj = functionUnderTest.invoke(ptpvObject, testString.replace(
-					WHITE_SPACE, EMPTY_STRING));
-
-			// cast the result to the expected return type.
-			Boolean res = (Boolean) retObj;
-
-			String msg = functionUnderTest.getName() + "  invoked on \"" //$NON-NLS-1$
-					+ testString + "\" returned " + res.toString(); //$NON-NLS-1$
-			Assert.assertEquals(msg, expectedResult, res.booleanValue());
-		} catch (Exception e) {
-			Assert.fail(e.getMessage());
-		}
-	}
-
-	/**
-	 * Test isValidData method
-	 */
-	@Test
-	public void testIsValidDataMethod() {
-		executeTests("isValidData", FunctionToTest.ISVALIDDATA); //$NON-NLS-1$
-	}
-
-	//add future methods tests after this point.
-	
-	/**
-	 * tearDown
-	 */
-	@After
-	public void tearDown() {
-		// nothing to do
-	}
-
-}
--- a/tracefw/tracecompiler/test/src/TraceHeadersLicenceTest.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,600 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-import static org.junit.Assert.fail;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.List;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-import com.nokia.tracecompiler.engine.TraceCompilerEngineGlobals;
-import com.nokia.tracecompiler.model.TraceCompilerException;
-
-
-public class TraceHeadersLicenceTest {
-	
-	public static void main(String args[]) {		
-	      	org.junit.runner.JUnitCore.main(TraceHeadersLicenceTest.class.getName());
-	    }
-	
-	/****************************************************UTILITY FUNCTIONS FOR TESTS************************************************************/
-	
-	private static String epocroot = null; 
-	private static String projectdir = "testdata\\MultipleMmpTestCases\\"; //$NON-NLS-1$
-	private static Pattern versionPattern = Pattern.compile("^.*(\\d+\\.\\d+\\.\\d+).*$"); //$NON-NLS-1$
-	private static Pattern oldversionPat = Pattern.compile("^(1\\..*)|(2\\.1.*)"); //$NON-NLS-1$
-	//old TC version should be up to 2.12.5 as new functionality was submitted to 2.12.6 (we hope)
-	private static Pattern sbsoldversionPat = Pattern.compile("^(1\\..*)|(2\\.[01]\\..*)|(2\\.1[0-2]\\.[0-3].*)"); //$NON-NLS-1$
-	private static String TCversion = ""; //$NON-NLS-1$
-	private static String SBSversion = ""; //$NON-NLS-1$
-	private static File compilerpath;
-	private static boolean oldTC = false;
-	private static boolean oldBuilder = false; 
-	private static HashMap<String, List<File>> headers = new HashMap<String, List<File>>();
-	private static HashMap<String, List<File>> sources = new HashMap<String, List<File>>();
-	private static ProcessBuilder sbs_build = new ProcessBuilder("sbs.bat","-k","-c","winscw_udeb.tracecompiler");
-	private static ProcessBuilder sbs_reallyclean = new ProcessBuilder("sbs.bat","-k","-c","winscw_udeb.tracecompiler", "reallyclean");
-	
-
-	@BeforeClass
-	static public void setEnvVariables() {
-		epocroot = System.getenv("EPOCROOT"); //$NON-NLS-1$
-		if(epocroot == null || (epocroot.length()==0)){
-			fail();
-		}
-		
-		// need to check that the path ends in a backslash
-		if(!epocroot.endsWith("\\")){ 
-			epocroot += "\\"; 
-		}
-
-		compilerpath = new File (epocroot + "epoc32" + File.separator + "tools" + File.separator +"tracecompiler" + File.separator); //default value to remove warnings. //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-
-		ProcessBuilder tc = new ProcessBuilder("java", "-classpath", compilerpath.getPath(), //$NON-NLS-1$//$NON-NLS-2$
-				"com.nokia.tracecompiler.TraceCompiler", "-v"); //$NON-NLS-1$//$NON-NLS-2$
-		System.out.println("compilerPath= " + compilerpath); //$NON-NLS-1$
-		tc.directory(compilerpath);
-		tc.redirectErrorStream(true);
-		try {
-		Process p = tc.start();
-		p.waitFor();	
-
-		
-		String str = readProcessOutput(p);
-		System.out.println("TC version = " + str); //$NON-NLS-1$
-		Matcher m = versionPattern.matcher(str.trim());
-		if (m.matches()) {
-			TCversion = m.group(1);
-			System.out.println("TC Version = " + TCversion); //$NON-NLS-1$
-		}
-		
-		m = oldversionPat.matcher(TCversion);
-		if (m.matches()){
-			oldTC=true;
-		}
-
-		System.out.println("TC version = " + TCversion); //$NON-NLS-1$ 
-		System.out.println("OLD TC version = " + oldTC); //$NON-NLS-1$
-
-		ProcessBuilder sbs = new ProcessBuilder("sbs.bat","-v"); //$NON-NLS-1$ //$NON-NLS-2$
-		sbs.directory(compilerpath);
-		sbs.redirectErrorStream(true);
-			
-		//start the compiler
-		p = sbs.start();
-		p.waitFor();
-			
-		InputStream inp = p.getInputStream();
-			
-	        str = ""; //$NON-NLS-1$
-	        int c;
-	        //read the output from the compiler into the input stream
-	        while ((c = inp.read()) != -1) {
-	           	 str= str +((char)c);
-	        }
-
-		System.out.println("SBS version = " + str); //$NON-NLS-1$
-		m = versionPattern.matcher(str.trim());
-		if (m.matches()) {
-			SBSversion = m.group(1);
-		}
-		
-		m = sbsoldversionPat.matcher(SBSversion);
-		if (m.matches()){
-			oldBuilder=true;
-		}
-		
-		} catch (Exception e) {// Catch exception if any
-			System.err.println(e.getMessage());
-		}
-	}
-	
-	
-	public void createListHeadersDicts(String builder)
-	{
-		//The whole logic of what is expected is built here whether we build with sbs 
-		//new TC or old, The structure is re-built for each case.
-		
-		
-		Matcher m = sbsoldversionPat.matcher(SBSversion);
-		if (m.matches()){
-			oldBuilder=true;
-		} else {
-			oldBuilder=false;
-		}
-		
-		
-		System.out.println("OLD Builder :" + builder + ": = " + oldBuilder); //$NON-NLS-1$
-		
-		File tracesHeader1;
-		File tracesHeader2;
-		File tracesHeader3;
-		File tracesHeader4;
-		File source1;
-		File source2;
-		File source3;
-		File source4;
-		File ostTraceDefinitions;
-		File fixedidDefinitions;
-		String loc = "traces\\"; //$NON-NLS-1$
-		
-		source1 = new File (epocroot+projectdir+"mmp_traces\\src\\MultipleMmpApp1.cpp"); //$NON-NLS-1$
-		source2 = new File (epocroot+projectdir+"mmp_traces\\src\\ExtraCppFile1.cpp"); //$NON-NLS-1$
-		source3 = new File (epocroot+projectdir+"mmp_traces\\src\\MultipleMmpApp2.cpp"); //$NON-NLS-1$
-		source4 = new File (epocroot+projectdir+"mmp_traces\\src\\ExtraCppFile2.cpp"); //$NON-NLS-1$
-		sources.put("_traces", Arrays.asList(source1, source2, source3, source4));
-		
-		tracesHeader1 = new File (epocroot+projectdir+"mmp_traces\\traces\\MultipleMmpApp1Traces.h"); //$NON-NLS-1$
-		tracesHeader2 = new File (epocroot+projectdir+"mmp_traces\\traces\\ExtraCppFile1Traces.h"); //$NON-NLS-1$
-		tracesHeader3 = new File (epocroot+projectdir+"mmp_traces\\traces\\MultipleMmpApp2Traces.h"); //$NON-NLS-1$
-		tracesHeader4 = new File (epocroot+projectdir+"mmp_traces\\traces\\ExtraCppFile2Traces.h"); //$NON-NLS-1$
-		
-		ostTraceDefinitions = new File(epocroot+projectdir+"mmp_traces\\traces\\OstTraceDefinitions.h"); //$NON-NLS-1$
-		fixedidDefinitions = new File(epocroot+projectdir+"mmp_traces\\traces\\fixed_id.definitions"); //$NON-NLS-1$)
-		headers.put("_traces", Arrays.asList(tracesHeader1,tracesHeader2,tracesHeader3,tracesHeader4,ostTraceDefinitions,fixedidDefinitions)); //$NON-NLS-1$
-		
-		
-		//=============================
-		
-		if (!oldBuilder && !oldTC) {
-			loc = "traces_mmp_traces_mmpname1\\"; //$NON-NLS-1$
-		}
-		tracesHeader1 = new File (epocroot+projectdir+"mmp_traces_mmpname\\"+ loc + "MultipleMmpApp1Traces.h"); //$NON-NLS-1$ //$NON-NLS-2$
-		tracesHeader2 = new File (epocroot+projectdir+"mmp_traces_mmpname\\" + loc + "ExtraCppFile1Traces.h"); //$NON-NLS-1$ //$NON-NLS-2$
-		if (!oldBuilder && !oldTC) {
-			loc = "traces_mmp_traces_mmpname2\\"; //$NON-NLS-1$
-		}
-		tracesHeader3 = new File (epocroot+projectdir+"mmp_traces_mmpname\\" + loc + "MultipleMmpApp2Traces.h"); //$NON-NLS-1$ //$NON-NLS-2$
-		tracesHeader4 = new File (epocroot+projectdir+"mmp_traces_mmpname\\" + loc + "ExtraCppFile2Traces.h"); //$NON-NLS-1$ //$NON-NLS-2$
-		ostTraceDefinitions = new File(epocroot+projectdir+"mmp_traces_mmpname\\" + loc + "OstTraceDefinitions.h"); //$NON-NLS-1$
-		fixedidDefinitions = new File(epocroot+projectdir+"mmp_traces_mmpname\\" + loc + "fixed_id.definitions"); //$NON-NLS-1$)
-
-		headers.put("_traces_mmpname", Arrays.asList(tracesHeader1,tracesHeader2,tracesHeader3,tracesHeader4,ostTraceDefinitions,fixedidDefinitions)); //$NON-NLS-1$
-		
-		source1 = new File (epocroot+projectdir+"mmp_traces_mmpname\\src\\MultipleMmpApp1.cpp"); //$NON-NLS-1$
-		source2 = new File (epocroot+projectdir+"mmp_traces_mmpname\\src\\ExtraCppFile1.cpp"); //$NON-NLS-1$
-		source3 = new File (epocroot+projectdir+"mmp_traces_mmpname\\src\\MultipleMmpApp2.cpp"); //$NON-NLS-1$
-		source4 = new File (epocroot+projectdir+"mmp_traces_mmpname\\src\\ExtraCppFile2.cpp"); //$NON-NLS-1$
-		sources.put("_traces_mmpname", Arrays.asList(source1, source2, source3, source4));
-		
-	    //=============================
-	    
-	    loc = "traces\\"; //$NON-NLS-1$
-		if (!oldTC) {
-			loc = "traces\\target7_dll\\"; //$NON-NLS-1$
-		}
-		tracesHeader1 = new File (epocroot+projectdir+"mmp_traces_slash_target_ext\\" + loc + "MultipleMmpApp1Traces.h"); //$NON-NLS-1$ //$NON-NLS-2$
-		tracesHeader2 = new File (epocroot+projectdir+"mmp_traces_slash_target_ext\\" + loc + "ExtraCppFile1Traces.h"); //$NON-NLS-1$ //$NON-NLS-2$
-		if (!oldTC) {
-			loc = "traces\\target8_dll\\"; //$NON-NLS-1$
-		}
-		tracesHeader3 = new File (epocroot+projectdir+"mmp_traces_slash_target_ext\\" + loc + "MultipleMmpApp2Traces.h"); //$NON-NLS-1$ //$NON-NLS-2$
-		tracesHeader4 = new File (epocroot+projectdir+"mmp_traces_slash_target_ext\\" + loc + "ExtraCppFile2Traces.h"); //$NON-NLS-1$ //$NON-NLS-2$
-		ostTraceDefinitions = new File(epocroot+projectdir+"mmp_traces_slash_target_ext\\" + loc + "OstTraceDefinitions.h"); //$NON-NLS-1$
-		fixedidDefinitions = new File(epocroot+projectdir+"mmp_traces_slash_target_ext\\" + loc + "fixed_id.definitions"); //$NON-NLS-1$)
-
-		headers.put("_traces_slash_target_ext", Arrays.asList(tracesHeader1,tracesHeader2,tracesHeader3,tracesHeader4,ostTraceDefinitions,fixedidDefinitions)); //$NON-NLS-1$
-		
-		source1 = new File (epocroot+projectdir+"mmp_traces_slash_target_ext\\src\\MultipleMmpApp1.cpp"); //$NON-NLS-1$
-		source2 = new File (epocroot+projectdir+"mmp_traces_slash_target_ext\\src\\ExtraCppFile1.cpp"); //$NON-NLS-1$
-		source3 = new File (epocroot+projectdir+"mmp_traces_slash_target_ext\\src\\MultipleMmpApp2.cpp"); //$NON-NLS-1$
-		source4 = new File (epocroot+projectdir+"mmp_traces_slash_target_ext\\src\\ExtraCppFile2.cpp"); //$NON-NLS-1$
-		sources.put("_traces_slash_target_ext", Arrays.asList(source1, source2, source3, source4));
-				
-	    //================================
-	    loc = "traces\\"; //$NON-NLS-1$
-		if (!oldTC) {
-			loc = "traces\\target9_dll\\"; //$NON-NLS-1$
-		}
-		tracesHeader1 = new File (epocroot+projectdir+"mmp_traces_slash_target_ext_commonsource\\" + loc + "MultipleMmpApp1Traces.h"); //$NON-NLS-1$ //$NON-NLS-2$
-		tracesHeader2 = new File (epocroot+projectdir+"mmp_traces_slash_target_ext_commonsource\\" + loc + "ExtraCppFile1Traces.h"); //$NON-NLS-1$ //$NON-NLS-2$
-		if (!oldTC) {
-			loc = "traces\\target10_dll\\"; //$NON-NLS-1$
-		}
-		tracesHeader3 = new File (epocroot+projectdir+"mmp_traces_slash_target_ext_commonsource\\" + loc + "MultipleMmpApp1Traces.h"); //$NON-NLS-1$ //$NON-NLS-2$
-		tracesHeader4 = new File (epocroot+projectdir+"mmp_traces_slash_target_ext_commonsource\\" + loc + "ExtraCppFile1Traces.h"); //$NON-NLS-1$ //$NON-NLS-2$
-		ostTraceDefinitions = new File(epocroot+projectdir+"mmp_traces_slash_target_ext_commonsource\\" + loc + "OstTraceDefinitions.h"); //$NON-NLS-1$
-		fixedidDefinitions = new File(epocroot+projectdir+"mmp_traces_slash_target_ext_commonsource\\" + loc + "fixed_id.definitions"); //$NON-NLS-1$)
-
-		headers.put("_traces_slash_target_ext_commonsource", Arrays.asList(tracesHeader1,tracesHeader2,tracesHeader3,tracesHeader4,ostTraceDefinitions,fixedidDefinitions)); //$NON-NLS-1$
-		
-		source1 = new File (epocroot+projectdir+"mmp_traces_slash_target_ext_commonsource\\src\\MultipleMmpApp1.cpp"); //$NON-NLS-1$
-		source2 = new File (epocroot+projectdir+"mmp_traces_slash_target_ext_commonsource\\src\\ExtraCppFile1.cpp"); //$NON-NLS-1$
-		source3 = new File (epocroot+projectdir+"mmp_traces_slash_target_ext_commonsource\\src\\MultipleMmpApp1.cpp"); //$NON-NLS-1$
-		source4 = new File (epocroot+projectdir+"mmp_traces_slash_target_ext_commonsource\\src\\ExtraCppFile1.cpp"); //$NON-NLS-1$
-		sources.put("_traces_slash_target_ext_commonsource", Arrays.asList(source1, source2, source3, source4));
-		
-		//==================================
-		loc = "traces\\"; //$NON-NLS-1$
-		if (!oldTC && !oldBuilder) {
-			loc = "traces_target11_exe\\"; //$NON-NLS-1$
-		}
-		tracesHeader1 = new File (epocroot+projectdir+"mmp_traces_target_type\\" + loc +"MultipleMmpApp1Traces.h"); //$NON-NLS-1$ //$NON-NLS-2$
-		tracesHeader2 = new File (epocroot+projectdir+"mmp_traces_target_type\\" + loc +"ExtraCppFile1Traces.h"); //$NON-NLS-1$ //$NON-NLS-2$
-		if (!oldTC && !oldBuilder) {
-			loc = "traces_target12_exe\\"; //$NON-NLS-1$
-		}
-		tracesHeader3 = new File (epocroot+projectdir+"mmp_traces_target_type\\" + loc + "MultipleMmpApp2Traces.h"); //$NON-NLS-1$ //$NON-NLS-2$
-		tracesHeader4 = new File (epocroot+projectdir+"mmp_traces_target_type\\" + loc + "ExtraCppFile2Traces.h"); //$NON-NLS-1$ //$NON-NLS-2$
-		ostTraceDefinitions = new File(epocroot+projectdir+"mmp_traces_target_type\\" + loc + "OstTraceDefinitions.h"); //$NON-NLS-1$
-		fixedidDefinitions = new File(epocroot+projectdir+"mmp_traces_target_type\\" + loc + "fixed_id.definitions"); //$NON-NLS-1$)
-
-		headers.put("_traces_target_type", Arrays.asList(tracesHeader1,tracesHeader2,tracesHeader3,tracesHeader4,ostTraceDefinitions,fixedidDefinitions)); //$NON-NLS-1$
-		
-		
-		source1 = new File (epocroot+projectdir+"mmp_traces_target_type\\src\\MultipleMmpApp1.cpp"); //$NON-NLS-1$
-		source2 = new File (epocroot+projectdir+"mmp_traces_target_type\\src\\ExtraCppFile1.cpp"); //$NON-NLS-1$
-		source3 = new File (epocroot+projectdir+"mmp_traces_target_type\\src\\MultipleMmpApp2.cpp"); //$NON-NLS-1$
-		source4 = new File (epocroot+projectdir+"mmp_traces_target_type\\src\\ExtraCppFile2.cpp"); //$NON-NLS-1$
-		sources.put("_traces_target_type", Arrays.asList(source1, source2, source3, source4));
-
-		
-		//==================================
-		
-		loc = "traces\\"; //$NON-NLS-1$
-		if (!oldTC && !oldBuilder) {
-			loc = "traces\\target3_dll\\"; //$NON-NLS-1$
-		}
-		tracesHeader1 = new File (epocroot+projectdir+"mmp_traces_mixed\\" + loc + "MultipleMmpApp1Traces.h"); //$NON-NLS-1$ //$NON-NLS-2$
-		tracesHeader2 = new File (epocroot+projectdir+"mmp_traces_mixed\\" + loc + "ExtraCppFile1Traces.h"); //$NON-NLS-1$ //$NON-NLS-2$
-		if (!oldTC && !oldBuilder) {
-			loc = "traces_target4_kext\\"; //$NON-NLS-1$ 
-		}
-		tracesHeader3 = new File (epocroot+projectdir+"mmp_traces_mixed\\" + loc + "MultipleMmpApp2Traces.h"); //$NON-NLS-1$ //$NON-NLS-2$
-		tracesHeader4 = new File (epocroot+projectdir+"mmp_traces_mixed\\" + loc + "ExtraCppFile2Traces.h"); //$NON-NLS-1$ //$NON-NLS-2$		
-		ostTraceDefinitions = new File(epocroot+projectdir+"mmp_traces_mixed\\" + loc + "OstTraceDefinitions.h"); //$NON-NLS-1$
-		fixedidDefinitions = new File(epocroot+projectdir+"mmp_traces_mixed\\" + loc + "fixed_id.definitions"); //$NON-NLS-1$)
-
-		headers.put("_traces_mixed", Arrays.asList(tracesHeader1,tracesHeader2,tracesHeader3,tracesHeader4,ostTraceDefinitions,fixedidDefinitions)); //$NON-NLS-1$		
-		
-		source1 = new File (epocroot+projectdir+"mmp_traces_mixed\\src\\MultipleMmpApp1.cpp"); //$NON-NLS-1$
-		source2 = new File (epocroot+projectdir+"mmp_traces_mixed\\src\\ExtraCppFile1.cpp"); //$NON-NLS-1$
-		source3 = new File (epocroot+projectdir+"mmp_traces_mixed\\src\\MultipleMmpApp2.cpp"); //$NON-NLS-1$
-		source4 = new File (epocroot+projectdir+"mmp_traces_mixed\\src\\ExtraCppFile2.cpp"); //$NON-NLS-1$
-		sources.put("_traces_mixed", Arrays.asList(source1, source2, source3, source4));
-	}
-	
-	
-	/**
-	 * This function invokes raptor on the desired test c++ project
-	 * 
-	 * @param path String specifying the path the compiler needs
-	 * 				  to run from
-	 */
-	public void InvokeCompiler(String path, String builder) {
-		System.out.println ("InvokeCompiler() for : " + builder);
-		
-		List<File> headersList;
-		try{
-			
-			//set up the directory from which the process will be called
-			if (path.compareTo("_traces")==0){ //$NON-NLS-1$
-				headersList = headers.get("_traces"); //$NON-NLS-1$
-				System.out.println("deleting file " + headersList.toString()); //$NON-NLS-1$
-				for (File header : headersList) {
-					if (header.exists()) header.delete();
-				}
-				
-				compilerpath = new File (epocroot+projectdir+"mmp_traces\\group\\"); //$NON-NLS-1$
-			}
-			else if (path.compareTo("_traces_mmpname")==0){ //$NON-NLS-1$
-				headersList = headers.get("_traces_mmpname"); //$NON-NLS-1$
-				System.out.println("deleting file " + headersList.toString()); //$NON-NLS-1$
-				for (File header : headersList) {
-					if (header.exists()) {
-						header.delete();
-					}
-				}
-				
-				compilerpath = new File (epocroot+projectdir+"mmp_traces_mmpname\\group\\");
-			}
-			else if (path.compareTo("_traces_slash_target_ext")==0){
-				headersList = headers.get("_traces_slash_target_ext");
-				System.out.println("deleting file " + headersList.toString());
-				for (File header : headersList) {
-					if (header.exists()) header.delete();
-				}
-				
-				compilerpath = new File (epocroot+projectdir+"mmp_traces_slash_target_ext\\group\\");
-			}
-			else if (path.compareTo("_traces_slash_target_ext_commonsource")==0){
-				headersList = headers.get("_traces_slash_target_ext_commonsource");
-				System.out.println("deleting file " + headersList.toString());
-				for (File header : headersList) {
-					if (header.exists()) header.delete();
-				}
-				
-				compilerpath = new File (epocroot+projectdir+"mmp_traces_slash_target_ext_commonsource\\group\\");
-			}
-			else if (path.compareTo("_traces_target_type")==0){
-				headersList = headers.get("_traces_target_type");
-				System.out.println("deleting file " + headersList.toString());
-				for (File header : headersList) {
-					if (header.exists()) header.delete();
-				}
-				
-				compilerpath = new File (epocroot+projectdir+"mmp_traces_target_type\\group\\");
-			}
-			else if (path.compareTo("_traces_mixed")==0){
-				headersList = headers.get("_traces_mixed");
-				System.out.println("deleting file " + headersList.toString());
-				for (File header : headersList) {
-					if (header.exists()) header.delete();
-				}
-				
-				compilerpath = new File (epocroot+projectdir+"mmp_traces_mixed\\group\\");
-			}
-			else{
-			
-				System.out.println("Error: Unrecognised test case.");
-				fail();
-			}
-			
-			//set up the process builder object
-			sbs_build.directory(compilerpath);
-			sbs_reallyclean.directory(compilerpath);
-			sbs_build.redirectErrorStream(true);
-			
-			
-			
-			Process p;
-			String str = "";
-			//start the compiler
-			System.out.println("Starting build process ....");
-			
-				System.out.println("Running sbs reallyclean on : " + compilerpath + " command: " + sbs_reallyclean.command().toString());
-				p = sbs_reallyclean.start();
-				readProcessOutput(p);
-				System.out.println("Running sbs on : " + compilerpath + " command: " + sbs_build.command().toString());
-				p = sbs_build.start();
-				str = readProcessOutput(p);
-			
-			
-			int ret = p.exitValue();
-			System.out.println("build process ended....");
-			if (ret!=0){
-				System.out.println("build process failed:"+str);
-			}
-		}
-		
-    	catch (Exception e){//Catch exception if any
-    		System.err.println("Error: " + e.getMessage());
-    		fail();
-        }
-		
-	}
-
-
-	static private String readProcessOutput(Process p) throws IOException {
-		InputStream inp = p.getInputStream();
-		
-			int c;
-			String str = "";	        
-			//read the output from the compiler into the input stream
-			while ((c = inp.read()) != -1) {
-		   	 str= str +((char)c);
-			}
-		return str;
-	}
-	
-	/**
-	 * This function checks that the traces header files have been generated in the expected locations
-	 * 
-	 * @param path  String specifying where to look for the traces header file.  		   
-	 */
-	public void checkForTracesHeadersAndLicence(String path) {
-		System.out.println ("CheckForTracesHeaders()");
-		System.out.println("Old Builder : " + oldBuilder + "......Old TC : " + oldTC);
-		List<File> headersList = headers.get(path);
-		List<File> sourceList =  sources.get(path);
-		System.out.println("checking files " + headersList.toString());
-		boolean error = false;
-		if ((path.compareTo("_traces_slash_target_ext")==0 || path.compareTo("_traces_slash_target_ext_commonsource")==0) && oldBuilder && !oldTC){
-			System.out.println("No need to check for header files as old sbs cannot call TC");
-		} else {
-			try {
-				TraceCompilerEngineGlobals.start();
-			} catch (TraceCompilerException e) {
-				fail();
-			}
-			for (File header : headersList) {
-				if (!header.exists()) {
-					error = true;
-					System.out.println("Error: "+header+" does not exist/hasn't been generated by TraceCompiler");
-				} else {
-					String licenceInSource = null;
-					String licenceInHeader = null;
-					File source = null;
-					// read the licence from the header file
-					if (header.getName().trim().equalsIgnoreCase("OstTraceDefinitions.h")) {
-						licenceInSource = TraceCompilerEngineGlobals.getDefaultLicence(true);
-						System.out.println("Reading default licence for OstTraceDefinitions.h" + licenceInSource);
-					} else {
-						if (header.getName().trim().equalsIgnoreCase("fixed_id.definitions")) {
-							licenceInSource = TraceCompilerEngineGlobals.getDefaultLicence(false);
-							System.out.println("Reading default licence for fixed_id.definitions" + licenceInSource);
-						} else {
-							licenceInHeader = readFirstMultiLineComment(header.getAbsolutePath());
-							System.out.println("Reading licence from " + header.getAbsolutePath() + " == " + licenceInHeader);
-							if (licenceInHeader == null) {
-								System.out.println("No licence found in header file, so fail().");
-								fail();
-							}
-							source = sourceList.get(headersList.indexOf(header));
-
-							licenceInSource = readFirstMultiLineComment(source.getAbsolutePath());
-							System.out.println("Reading licence from " + source.getAbsolutePath() + " == " + licenceInSource);
-							if (licenceInSource == null) {
-								//licence should be EPL
-								System.out.println("No licence found in source file, so get default one.");
-								licenceInSource = TraceCompilerEngineGlobals.getDefaultLicence(true);
-								System.out.println("Reading default licence for " + header.getAbsolutePath() + " == " + licenceInSource);
-							}
-						}
-					}
-					if (licenceInHeader != licenceInHeader) {
-						System.out.println("Error: licence in header " + header + " is not the same in source." + source);
-						fail();
-					}
-				}
-			}
-		
-			if(!error){
-				System.out.println("All Traces Header files have been generated as expected");
-			}
-			else {
-				fail();
-				}
-		}
-	}
-
-
-	/**
-	 * @param path
-	 */
-	private String readFirstMultiLineComment(String path) {
-		StringBuffer sb = new StringBuffer();
-		try {
-			FileReader reader = new FileReader(new File(path));
-			BufferedReader br = new BufferedReader(reader);
-			String line;
-			boolean inComment = false;
-			
-			while ((line = br.readLine()) != null) {
-				if (line.trim().startsWith("/*")) {
-					inComment = true;
-				}
-				if (inComment) {
-					sb.append(line + System.getProperty("line.separator"));
-				}
-				if (line.trim().endsWith("*/") && inComment) {
-					break;
-				}
-			}
-			br.close();
-		} catch (Exception e) {
-			System.out.println("Failed to open/read file " + path + "  " + e.getMessage());
-			fail();
-		}
-		String licence = null;
-		if (sb.length()> 0) {
-			licence = sb.toString();
-			if (!licence.contains("Copyright")) {
-				licence = null;
-			}
-		}
-			
-		return licence;
-	}
-	
-
-	/****************************************************ACTUAL TESTS************************************************************/
-	@Test
-	public void MultipleMmpsTest1 (){
-		System.out.println ("*********************traces****************************");
-		createListHeadersDicts("sbs");
-		//Call Raptor
-		InvokeCompiler("_traces", "sbs");		
-		//Check for header files
-		checkForTracesHeadersAndLicence("_traces");		
-	
-	}
-	
-
-	@Test
-	public void MultipleMmpsTest2 (){
-		System.out.println ("****************traces_mmpname**********************");
-		createListHeadersDicts("sbs");
-		//Call Raptor
-		InvokeCompiler("_traces_mmpname", "sbs");
-		//Check for header files
-		checkForTracesHeadersAndLicence("_traces_mmpname");		
-		
-	}
-	
-
-	@Test
-	public void MultipleMmpsTest3 (){
-		System.out.println ("**********traces_slash_target_ext****************");
-		createListHeadersDicts("sbs");
-		//Call Raptor
-		InvokeCompiler("_traces_slash_target_ext", "sbs");
-		//Check for header files
-		checkForTracesHeadersAndLicence("_traces_slash_target_ext");		
-		
-	}
-
-	@Test
-	public void MultipleMmpsTest4 (){
-		System.out.println ("**********traces_slash_target_ext_commonsource****************");
-		createListHeadersDicts("sbs");
-		//Call Raptor
-		InvokeCompiler("_traces_slash_target_ext_commonsource", "sbs");
-		//Check for header files
-		checkForTracesHeadersAndLicence("_traces_slash_target_ext_commonsource");						
-	}
-
-	@Test
-	public void MultipleMmpsTest5 (){
-		System.out.println ("**********traces_target_type****************");
-		createListHeadersDicts("sbs");
-		//Call Raptor
-		InvokeCompiler("_traces_target_type", "sbs");
-		//Check for header files
-		checkForTracesHeadersAndLicence("_traces_target_type");
-	}
-
-	@Test
-	public void MultipleMmpsTest6 (){
-		System.out.println ("**********traces_mixed****************");
-		createListHeadersDicts("sbs");
-		//Call Raptor
-		InvokeCompiler("_traces_mixed", "sbs");
-		//Check for header files
-		checkForTracesHeadersAndLicence("_traces_mixed");
-	}
-}
--- a/tracefw/tracecompiler/test/src/TraceLocationConverterTest.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,82 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-
-import com.nokia.tracecompiler.TraceCompilerRootException;
-import com.nokia.tracecompiler.engine.*;
-import static org.junit.Assert.*;
-import java.io.*;
-
-import org.junit.Test;
-
-import com.nokia.tracecompiler.project.*;
-
-
-public class TraceLocationConverterTest { 
-
-	
-	public static void main(String args[]) {		
-	      	org.junit.runner.JUnitCore.main(TraceLocationConverterTest.class.getName());
-	    }
-	
-	@Test
-    public void searchForOldGroupIdsTest() {  
-		
-		
-		try {
-			GroupNames.initialiseGroupName();
-		} catch (TraceCompilerRootException e) {
-			fail();
-		}
-		
-		
-		assertTrue("Test case 1",TraceLocationConverter.searchForOldGroupIds(""));
-		assertTrue("Test case 1",TraceLocationConverter.searchForOldGroupIds("                              "));
-		assertTrue("Test case 1",TraceLocationConverter.searchForOldGroupIds("123456789"));
-		assertFalse("Test case 1",TraceLocationConverter.searchForOldGroupIds("TRACE_FATAL=0x1"));
-		assertFalse("Test case 1",TraceLocationConverter.searchForOldGroupIds("TRACE_IMPORTANT=0x2"));
-		assertFalse("Test case 1",TraceLocationConverter.searchForOldGroupIds("TRACE_NORMAL=0x77"));
-		assertFalse("Test case 1",TraceLocationConverter.searchForOldGroupIds("TRACE_PERFORMANCE=0x4"));
-		assertFalse("Test case 1",TraceLocationConverter.searchForOldGroupIds("TRACE_STATE=0x5"));
-		assertFalse("Test case 1",TraceLocationConverter.searchForOldGroupIds("TRACE_STATE=5"));
-		assertFalse("Test case 1",TraceLocationConverter.searchForOldGroupIds("TRACE_STATE=5555"));
-		assertFalse("Test case 1",TraceLocationConverter.searchForOldGroupIds("TRACE_STATE=565nh"));
-		assertFalse("Test case 1",TraceLocationConverter.searchForOldGroupIds("TRACE_API=0x6"));
-		assertFalse("Test case 1",TraceLocationConverter.searchForOldGroupIds("TRACE_FLOW=0x7"));
-		assertFalse("Test case 1",TraceLocationConverter.searchForOldGroupIds("TRACE_DETAILED=0x8"));
-		assertFalse("Test case 1",TraceLocationConverter.searchForOldGroupIds("TRACE_DEBUG=0x9"));
-		assertFalse("Test case 1",TraceLocationConverter.searchForOldGroupIds("USER_DEFINED_TRACE=0xA1"));
-		assertTrue("Test case 1",TraceLocationConverter.searchForOldGroupIds("USER_DEFINED_TRACE=0xEA"));
-		assertTrue("Test case 1",TraceLocationConverter.searchForOldGroupIds("TRACE_FATAL=0x81"));
-		assertTrue("Test case 1",TraceLocationConverter.searchForOldGroupIds("TRACE_ERROR=0x82"));
-		assertTrue("Test case 1",TraceLocationConverter.searchForOldGroupIds("TRACE_WARNING=0x83"));
-		assertTrue("Test case 1",TraceLocationConverter.searchForOldGroupIds("TRACE_BORDER=0x84"));
-		assertTrue("Test case 1",TraceLocationConverter.searchForOldGroupIds("TRACE_API=0x84"));
-		assertTrue("Test case 1",TraceLocationConverter.searchForOldGroupIds("TRACE_IMPORTANT=0x85"));
-		assertTrue("Test case 1",TraceLocationConverter.searchForOldGroupIds("TRACE_NORMAL=0x86"));
-		assertTrue("Test case 1",TraceLocationConverter.searchForOldGroupIds("TRACE_STATE=0x87"));
-		assertTrue("Test case 1",TraceLocationConverter.searchForOldGroupIds("TRACE_INTERNALS=0x88"));
-		assertTrue("Test case 1",TraceLocationConverter.searchForOldGroupIds("TRACE_DUMP=0x89"));
-		assertTrue("Test case 1",TraceLocationConverter.searchForOldGroupIds("TRACE_DEBUG=0x89"));
-		assertTrue("Test case 1",TraceLocationConverter.searchForOldGroupIds("TRACE_FLOW=0x8a"));
-		assertTrue("Test case 1",TraceLocationConverter.searchForOldGroupIds("TRACE_PERFORMANCE=0x8b"));
-		assertTrue("Test case 1",TraceLocationConverter.searchForOldGroupIds("TRACE_ADHOC=0x8c"));
-		assertTrue("Test case 1",TraceLocationConverter.searchForOldGroupIds("TRACE_EXTENSION=0x8d"));
-	}
-	
-}
-
--- a/tracefw/tracecompiler/test/src/TracesInHeadersTest.java	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,210 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description: 
-*
-*/
-
-import static org.junit.Assert.fail;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-
-public class TracesInHeadersTest {
-	
-		public static void main(String args[]) {		
-	      	org.junit.runner.JUnitCore.main(TracesInHeadersTest.class.getName());
-	    }
-	/****************************************************UTILITY FUNCTIONS FOR TESTS************************************************************/
-	
-	private static String epocroot = null; 
-	private static String projectdir = "testdata\\TracesInHeadersApps\\"; //$NON-NLS-1$
-	private static File compilerpath;
-	private static ProcessBuilder sbs_build = new ProcessBuilder("sbs.bat","-k","-c","winscw_udeb.tracecompiler");
-	private static ProcessBuilder sbs_reallyclean = new ProcessBuilder("sbs.bat","-k","-c","winscw_udeb.tracecompiler", "reallyclean");
-
-	@BeforeClass
-	static public void setEnvVariables() {
-		epocroot = System.getenv("EPOCROOT"); //$NON-NLS-1$
-		if(epocroot == null || (epocroot.length()==0)){
-			fail();
-		}
-		
-		// need to check that the path ends in a backslash
-		if(!epocroot.endsWith("\\")){ 
-			epocroot += "\\"; 
-		}
-	}
-	
-	
-	/**
-	 * This function invokes raptor on the desired test c++ project
-	 * 
-	 * @param path String specifying the path the compiler needs
-	 * 				  to run from
-	 */
-	public void InvokeCompiler(String path, String builder) {
-		System.out.println ("InvokeCompiler() for : " + builder);
-		
-		try{
-			
-			//set up the directory from which the process will be called
-			if (path.compareTo("_diffnames")==0){ //$NON-NLS-1$
-				
-				compilerpath = new File (epocroot+projectdir+"singlemmp_diffnames\\group\\"); //$NON-NLS-1$
-			} else if (path.compareTo("_samenames")==0){ //$NON-NLS-1$
-				
-				compilerpath = new File (epocroot+projectdir+"singlemmp_samenames\\group\\"); //$NON-NLS-1$
-			} else if (path.compareTo("_diffnames_tracesplus")==0){ //$NON-NLS-1$
-				
-				compilerpath = new File (epocroot+projectdir+"singlemmp_diffnames_tracesplus\\group\\"); //$NON-NLS-1$
-			} else if (path.compareTo("_samenames_tracesplus")==0){ //$NON-NLS-1$
-				
-				compilerpath = new File (epocroot+projectdir+"singlemmp_samenames_tracesplus\\group\\"); //$NON-NLS-1$
-			} else if (path.compareTo("_samenames")==0){ //$NON-NLS-1$
-				
-				compilerpath = new File (epocroot+projectdir+"singlemmp_samenames\\group\\"); //$NON-NLS-1$
-			} else if (path.compareTo("_separate_source")==0){ //$NON-NLS-1$
-				
-				compilerpath = new File (epocroot+projectdir+"multmmp_separate_source\\group\\"); //$NON-NLS-1$
-			} else if (path.compareTo("_comm_source")==0){ //$NON-NLS-1$
-				
-				compilerpath = new File (epocroot+projectdir+"multmmp_comm_source\\group\\"); //$NON-NLS-1$
-			} else if (path.compareTo("_comm_source_tracesplus")==0){ //$NON-NLS-1$
-				
-				compilerpath = new File (epocroot+projectdir+"multmmp_comm_source_tracesplus\\group\\"); //$NON-NLS-1$
-			} else if (path.compareTo("_import")==0){ //$NON-NLS-1$
-				
-				compilerpath = new File (epocroot+projectdir+"singlemmp_import\\group\\"); //$NON-NLS-1$
-			} 
-			else{
-			
-				System.out.println("Error: Unrecognised test case.");
-				fail();
-			}
-			
-			//set up the process builder object
-			sbs_build.directory(compilerpath);
-			sbs_reallyclean.directory(compilerpath);
-			sbs_build.redirectErrorStream(true);
-						
-			Process p = null;
-			String str = "";
-			//start the compiler
-			System.out.println("Starting build process ....");
-
-				System.out.println("Running sbs reallyclean on : " + compilerpath + " command: " + sbs_reallyclean.command().toString());
-				p = sbs_reallyclean.start();
-				readProcessOutput(p);
-				System.out.println("Running sbs on : " + compilerpath + " command: " + sbs_build.command().toString());
-				p = sbs_build.start();
-				str = readProcessOutput(p);
-			
-			int ret = p.exitValue();
-			System.out.println("build process ended....");
-			if (ret!=0){
-				if (path.compareTo("_import")==0){ //$NON-NLS-1$
-					System.out.println("build process expected to fail: "+str);
-				} else {
-					System.out.println("build process failed:"+str);
-					fail();
-				}
-			}
-		}
-		
-    	catch (Exception e){//Catch exception if any
-    		System.err.println("Error: " + e.getMessage());
-    		fail();
-        }
-		
-	}
-
-
-	static private String readProcessOutput(Process p) throws IOException {
-		InputStream inp = p.getInputStream();
-		
-			int c;
-			String str = "";	        
-			//read the output from the compiler into the input stream
-			while ((c = inp.read()) != -1) {
-		   	 str= str +((char)c);
-			}
-		return str;
-	}
-
-	
-
-	/****************************************************ACTUAL TESTS************************************************************/
-	@Test
-	public void TracesInHeradersTest1 (){
-		System.out.println ("*********************single mmp with diff names****************************");
-		//Call Raptor
-		InvokeCompiler("_diffnames", "sbs");
-	}
-	
-	@Test
-	public void TracesInHeradersTest2 (){
-		System.out.println ("*********************single mmp with same names****************************");
-		//Call Raptor
-		InvokeCompiler("_samenames", "sbs");
-	}
-	
-	@Test
-	public void TracesInHeradersTest3 (){
-		System.out.println ("*********************single mmp with diff names and using tarce/<taget>_<ext>****************************");
-		//Call Raptor
-		InvokeCompiler("_diffnames_tracesplus", "sbs");
-	}
-	
-	@Test
-	public void TracesInHeradersTest4 (){
-		System.out.println ("*********************single mmp with same names and using tarce/<taget>_<ext>****************************");
-		//Call Raptor
-		InvokeCompiler("_samenames_tracesplus", "sbs");
-	}
-	
-	@Test
-	public void TracesInHeradersTest5 (){
-		System.out.println ("*********************multiple mmp with separate source ****************************");
-		//Call Raptor
-		InvokeCompiler("_separate_source", "sbs");
-	}
-	
-	@Test
-	public void TracesInHeradersTest6 (){
-		System.out.println ("*********************multiple mmp with common source ****************************");
-		//Call Raptor
-		InvokeCompiler("_comm_source", "sbs");
-	}
-	
-	@Test
-	public void TracesInHeradersTest7 (){
-		System.out.println ("*********************multiple mmp with common source and traces/<target>_<ext> ****************************");
-		//Call Raptor
-		InvokeCompiler("_comm_source_tracesplus", "sbs");
-	}
-	
-	@Test
-	public void TracesInHeradersTest8 (){
-		System.out.println ("*********************Traces in header exported to epoc32 by another mmp****************************");
-		//Call Raptor
-		InvokeCompiler("_import", "sbs");
-	}
-	
-}
-
--- a/tracefw/tracecompiler/test/testdata/test_opensystemtrace_types.h	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,532 +0,0 @@
-/**
-* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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:
-*
-* Description:
-* Trace API
-*
-*/
-
-
-
-/**
- @file
- @publishedPartner
- @prototype
-*/
-
-
-#ifndef OPENSYSTEMTRACE_TYPES_H
-#define OPENSYSTEMTRACE_TYPES_H
-
-#ifdef __KERNEL_MODE__
-#include <kernel.h>
-#else //__KERNEL_MODE__
-#include <e32std.h>
-#endif //__KERNEL_MODE__
-
-
-/**
-@file
-@publishedPartner
-@prototype
-*/
-
-
-/**
- * Every trace point must be statically assigned a group ID. This is
- * essentially a “label” that allows identification of the intended use of
- * the trace packets generated by the trace point. The Group ID will either 
- * reflect a system wide Tracing use cases, such as identifying why a panic 
- * occurred, or is assigned a meaning specific to a component, such as the 
- * heap trace output from the kernel. In essence the Group ID is a way of 
- * indicating that trace points / packets are related in some way. 
- * @see TGroupIdRange for more information.
- */
-typedef TUint8  TGroupId;
-
-/**
- * The maximum possible value for TGroupId
- */
-const static TGroupId KMaxGroupId = 255; // 2^8 - 1
-
-/**
- * @deprecated Use TGroupId instead
- * @see TGroupId
- */
-typedef TUint8  TClassification;
-
-/**
- * @deprecated Use KMaxGroupId instead
- * @see KMaxGroupId
- */
-const static TClassification KMaxClassification = KMaxGroupId;
-
-/**
- * Each trace point must be statically assigned a ComponentId to indicate the
- * module in which the trace point is defined. It should always be the UID3
- * of the binary containing the trace point associated with the component ID. 
-
- * The ComponentId and Group ID attributes of a trace point are independent.
- */
-typedef TUint32 TComponentId;
-
-/**
- * The maximum possible value for TComponentId
- */
-const static TComponentId KMaxComponentId = 0xFFFFFFFF; // 2^32 - 1, or 4294967295 - 1
-
-/**
- * The EXECUTABLE_DEFAULT_COMPONENTID can be used to define your own default
- * specific ComponentId. This is done by defining the macro to be your new
- * default value.
- */
-#ifdef EXECUTABLE_DEFAULT_COMPONENTID
-#define FW_DEFAULT_COMPONENTID EXECUTABLE_DEFAULT_COMPONENTID
-#else
-#define FW_DEFAULT_COMPONENTID TTraceContext::DefaultComponentId()
-#endif
-
-/**
- * Trace IDs have two functions in a trace packet:
- * 
- * 1. They identify the individual trace point that created the trace packet.
- * 2. They specify the format of the trace packet payload. 
- * 
- * This only works if the Trace ID value is unique for a given Group ID and 
- * Component ID, if present, and should be statically assigned during development 
- * when a trace point is created.  
- * 
- * The meaning of a TraceId is specific to the ComponentId and Group ID of the
- * associated trace point.
- */
-typedef TUint16 TTraceId;
-
-/**
- * The maximum possible value for TTraceId
- */
-const static TTraceId KMaxTraceId = 65535; // 2^16 - 1
-
-/**
- * Used in packets produced by the Print and Printf functions.
- *
- * Note that this format should not be used on the
- * device by clients of OST. This symbol is only marked
- * as published to partners to give host side tools access to
- * it.
- *
- * @deprecated No replacement is provided as this symbol is no 
- * longer needed as a result of the alignment of trace attributes 
- * in OSTv2.
- * @see TTraceId
- */
-const static TTraceId KFormatPrintf = 0;
-
-/**
- * Used in packets produced by the Print and Printf functions 
- * for unicode descriptors.
- *
- * Note that this format should not be used on the
- * device by clients of OST. This symbol is only marked
- * as published to partners to give host side tools access to
- * it.
- * 
- * @deprecated No replacement is provided as this symbol is no 
- * longer needed as a result of the alignment of trace attributes 
- * in OSTv2.
- * @see TTraceId
- */
-const static TTraceId KFormatPrintfUnicode = 1;
-
-/**
- * This value was used by UTFv2 clients to specify the start of 
- * the range of enums used to define their format ids. This is 
- * no longer necessary as in OSTv2 clients are allowed to use the
- * whole range without exception. 
- *
- * @deprecated No replacement is provided as this symbol is no 
- * longer needed as a result of the alignment of trace attributes 
- * in OSTv2.
- * @see TTraceId
- */
-const static TTraceId KInitialClientFormat = 512;
-
-/**
- * Include the thread identification into the trace packet at run-time.
- * The thread identification is used as an identifier to resolve
- * thread and process names in conjunction with
- * Group ID EThreadIdentification = 3.
- */
-enum THasThreadIdentification
-    {
-    /** Do add the thread identification to the trace packet */
-    EAddThreadIdentification = ETrue,
-    /** Don't add the thread identification */
-    ENoThreadIdentification = EFalse
-    };
-
-
-/**
- * The EXECUTABLE_DEFAULT_HAS_THREAD_IDENTIFICATION can be used to
- * define the default setting for adding or not adding the thread
- * identification in a trace packet. This is done by defining
- * the macro to be your new default value.
- */
-#ifdef EXECUTABLE_DEFAULT_HAS_THREAD_IDENTIFICATION
-#define FW_DEFAULT_HAS_THREAD_IDENTIFICATION EXECUTABLE_DEFAULT_HAS_THREAD_IDENTIFICATION
-#else
-#define FW_DEFAULT_HAS_THREAD_IDENTIFICATION EAddThreadIdentification
-#endif
-
-
-/**
- * Add the program counter into the trace packet at run-time.
- * The program counter is used to indicate where the CPU is in the
- * instruction sequence. This can be used to locate the line of code
- * or routine the trace was sent from.
- */
-enum THasProgramCounter
-    {
-    /** Do add the program counter to the trace packet. */
-    EAddProgramCounter = ETrue,
-    /** Don't add the program counter */
-    ENoProgramCounter = EFalse
-    };
-
-
-/**
- * The EXECUTABLE_DEFAULT_HAS_PC can be used to
- * define the default setting for adding or not adding the
- * program counter in a trace packet. This is done by defining
- * the macro to be your new default value.
- */
-#ifdef EXECUTABLE_DEFAULT_HAS_PC
-#define FW_DEFAULT_HAS_PC EXECUTABLE_DEFAULT_HAS_PC
-#else
-#define FW_DEFAULT_HAS_PC ENoProgramCounter
-#endif
-
-/**
- * The division of the Group IDs into different ranges aims to manage the
- * contention for the namespace.
- *
- * It is recommended that all developers use the Reserved range as far as possible.
- *
- * @see TGroupId
- */
-enum TGroupIdRange
-    {
-    /**
-     * The Group IDs in the Reserved range should be used by the majority of trace
-     * points. This range of Group IDs are intended to identify which of the
-     * most common trace use-cases a trace point is contributing to. They are unique
-     * across the system.
-     *
-     * The Group IDs in this series are defined solely by the Symbian Foundation but are
-     * intended for use by any software on a device.
-     *
-     * These Group IDs should only be enabled at run-time if the filtering on
-     * ComponentIds functionality is also enabled. This is to avoid accidentally causing
-     * trace live-locks from occurring when just the Group IDs is enabled. This could
-     * happen because trace points in components involved in the current trace output
-     * path might also be assigned these Group IDs. Filtering on ComponentIds means
-     * that those trace points can be activated only when it’s known to be safe to do
-     * so and not accidentally enabled with a Group IDs.
-     *
-     * @see TGroupIdReserved
-     */
-    EOstReservedRangeFirst = 0,
-
-    /**
-     * @see EOstReservedRangeFirst
-     */
-    EOstReservedRangeLast = 221,
-
-    /**
-     * The meaning of Group IDs in this range are defined on a per-component basis.
-     * They are to be unique within a component.
-     */
-    EUserDefinedRangeFirst = 222,
-
-    /**
-     * @see EUserDefinedRangeFirst
-     */
-    EUserDefinedRangeLast = 253,
-    
-    /**
-     * Only for use on the device by test code.
-     *
-     * Trace points with these Group IDs should not be released as part of a
-     * production device.
-     */
-    ETestingRangeFirst = 154,
-
-    /**
-     * @see ETestingRangeFirst
-     */
-    ETestingRangeLast = KMaxGroupId
-    };
-
-/**
- * The Group IDs in the Reserved range should be used by the majority of
- * trace points. This range of Group IDs are intended to identify which
- * of the most common trace use-cases a trace point is contributing to.
- *
- * @see TGroupId
- * @see TGroupIdRange
- * @see EOstReservedRangeFirst
- */
-enum TGroupIdReserved
-    {
-    /**
-     * Used when a fatal error, such as a panic, has occurred or when providing information 
-     * on the execution state immediately before the decision to panic.
-     *
-     * A trace point with this Group ID should be used when a fatal condition is detected 
-     * which will result in the flow of execution being halted in the thread associated with 
-     * the trace point.
-     *
-     * Can also provide information describing where a panic has been dealt with. 
-     *
-     * Trace points using this Group ID should be present in a release device. 
-     */
-    TRACE_FATAL = 149,
-
-    /**
-     * Used when an error has occurred which means that the current operation cannot continue 
-     * but is not sufficiently serious to cause a fatal error. These trace packets should 
-     * contain not just the error code but any relevant information about the execution state 
-     * when the error occurred.
-     *
-     * To be used for all types of error including include situations where the errors are 
-     * returned from a function or via a leave. 
-     *
-     * This Group ID also provides information describing where an error has been handled. 
-     */
-    TRACE_ERROR=150,
-
-    /**
-     * Used when something unexpected or unusual has occurred that does not stop the
-     * current operation from happening but may result in unintended side effects or
-     * actual errors later on.
-     */
-    TRACE_WARNING = 151,
-
-    /**
-     * Used to describe activity at the edges of a trace component. 
-     *
-     * Includes data about exported or published functions defined by a trace component as 
-     * well as calls out of the component to get significant information. Exactly what 
-     * is significant depends on the trace component in question. For instance, reading in a 
-     * setting from an INI file would be significant but calling RArray::Count() would not be. 
-     *
-     * The information in this Group ID should be enough to allow someone unfamiliar with the 
-     * trace component to get a high level understanding of what functionality it has executed.
-     */
-    TRACE_BORDER = 152,
-    
-    /**
-    * @deprecated Use TRACE_BORDER instead
-    */
-    TRACE_API = TRACE_BORDER,
-    
-    /**
-     * @deprecated Use TRACE_NORMAL or one of the other reserved Group IDs instead
-     */
-    TRACE_IMPORTANT = 153,
-    
-    /**
-     * Used to described the normal activity within a trace component that might be of interest
-     * to people who use the component.
-     *
-     * The information in this Group ID should be enough to allow someone unfamiliar with the 
-     * trace component to start to understand why a component is behaving the way it is perhaps 
-     * to help with diagnosing problems with the way the component is being used.
-     */
-    TRACE_NORMAL = 154,
-
-    /**
-     * Intended for tracing the state transitions of an application or service such as those
-     * performed by a machine.
-     *
-     * Trace packets using this Group ID should contain the name of the
-     * changed state variable and the new value.
-     */
-    TRACE_STATE  = 155,
-
-    /**
-     * Used to provide detailed information about the normal activity of a trace component
-     * to help a developer, who is familiar with the component, to understand what it is doing.
-     */
-    TRACE_INTERNALS = 156,
-
-    /**
-    * @deprecated Use TRACE_INTERNALS instead
-    */
-    TRACE_DETAILED = TRACE_INTERNALS,
-    
-    /**
-     * Used when there is a need to output large amounts of data through individual trace
-     * points that would likely cause significant intrusion if included under one of the
-     * other Group IDs.
-     *
-     * This Group ID is intended to be used in conjunction with the TRACE_INTERNALS
-     * Group ID to provide more details when debugging a specific trace component.
-     */
-    TRACE_DUMP = 157,
-
-    /**
-    * @deprecated Use TRACE_DUMP instead
-    */    
-    TRACE_DEBUG = TRACE_DUMP,
-    
-    /**
-     * Used to provide comprehensive information on what paths the execution takes within
-     * functions.
-     *
-     * This Group ID is intended mainly to be used by tools that add temporary instrumentation 
-     * points specifically to output this data.
-     */
-    TRACE_FLOW = 158,
-
-    /**
-     * Used to output data about the execution time, memory usage, disk usage, power
-     * utilisation and any other performance characteristics of the associated trace 
-     * component.
-     *
-     * This data may need to be processed before it can provide effective metrics. E.g.
-     * the time between two timestamps might need to be computed.
-     *
-     * Intended only to be used to output a small amount of data to ensure that it 
-     * creates the smallest possible intrusion since otherwise the act of tracing would 
-     * devalue the information it is intended to provide.
-     */
-    TRACE_PERFORMANCE = 159,
-
-    /**
-     * May be used when adding temporary trace points during a debugging session to 
-     * distinguish them from existing instrumentation. 
-     */
-    TRACE_ADHOC = 160,
-    
-    /**
-     * This Group ID is reserved for future use to allow the Group ID range to be expanded 
-     * to cover more than current 256 different values.
-     *
-     * If trace is output on this Group ID at some point in the future then this indicates 
-     * that another mechanism (yet to be decided) will be used to indicate the actual 
-     * Group ID for the trace.
-     */
-    TRACE_EXTENSION = 161,
-
-    /**
-	 * Not intended to be used by code including this header.
-	 * 
-     * Provided to allow the following compile time assert (should NOT be used):
-     * EGroupIdReservedHighWaterMark <= EOstReservedRangeLast + 1
-     *
-     */
-    EGroupIdReservedHighWaterMark
-    } ;
-
-// Check high water mark for the reserved Group ID range
-__ASSERT_COMPILE(EGroupIdReservedHighWaterMark <= EOstReservedRangeLast + 1);
-
-/**
- * @see TGroupId
- * @see ETestingRangeFirst
- * @test
- */
-enum TGroupIdTesting
-    {
-    /**
-     * This Group ID may be used for testing purposes and is not intended to be used in 
-     * production code. 
-     */
-    TRACE_TESTING1 = ETestingRangeFirst,
-
-    /**
-     * The same as for TRACE_TESTING1
-     */
-    TRACE_TESTING2 = 155,
-
-    /**
-	 * Not intended to be used by code including this header.
-	 * 
-     * Provided to allow the following compile time assert (should NOT be used):
-     * EGroupIdTestingHighWaterMark <= ETestingRangeLast + 1
-     *
-     */
-    EGroupIdTestingHighWaterMark
-    };
-
-// Check high water marks for the testing Group ID range
-__ASSERT_COMPILE(EGroupIdTestingHighWaterMark <= ETestingRangeLast + 1);
-
-/**
- * @deprecated Use enumerations from TGroupIdReserved instead
- * @see TGroupId
- * @see TGroupIdRange
- * @see EOstReservedRangeFirst
- */
-enum TClassificationAll
-    {
-    EPanic = TRACE_FATAL,
-    EError = TRACE_ERROR,
-    EWarning = TRACE_WARNING,
-    EBorder = TRACE_BORDER,
-    EState = TRACE_STATE,
-    EInternals = TRACE_INTERNALS,
-    EDump = TRACE_DUMP,
-    EFlow = TRACE_FLOW,
-    ESystemCharacteristicMetrics = TRACE_PERFORMANCE,
-    EAdhoc = TRACE_ADHOC,
-    EClassificationAllHighWaterMark
-    };
-
-// Check high water mark for the 'All' classification range
-__ASSERT_COMPILE(EClassificationAllHighWaterMark <= EOstReservedRangeLast + 1);
-
-/**
- * @deprecated Use enumerations from TGroupIdReserved instead
- * @see TGroupId
- * @see TGroupIdRange
- * @see EOstReservedRangeFirst
- */
-enum TClassificationSymbianTwo
-	{
-	EClassificationExtension = TRACE_EXTENSION,
-	EClassificationSymbianTwoHighWaterMark
-	};
-
-// Check high water marks for the Symbian Two classification range
-__ASSERT_COMPILE(EClassificationSymbianTwoHighWaterMark <= EOstReservedRangeLast + 1);
-
-/**
- * @deprecated Use enumerations from TGroupIdTesting instead
- * @see TGroupId
- * @see TGroupIdRange
- * @see ETestingRangeFirst
- * @test
- */
-enum TClassificationTesting
-	{
-	ETesting1 = TRACE_TESTING1,
-	ETesting2 = TRACE_TESTING2,
-	EClassificationTestingHighWaterMark,
-	};
-
-// Check high water marks for classification ranges
-__ASSERT_COMPILE(EClassificationTestingHighWaterMark <= ETestingRangeLast + 1);
-
-
-#endif //OPENSYSTEMTRACE_TYPES_H
--- a/tracefw/tracecompiler/tracecompiler/readme.txt	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,75 +0,0 @@
-------------TraceCompiler------------
-
-
-
-----What is TraceCompiler?----
-
-TraceCompiler will find OST (Open System Trace) traces from source files and generate needed headers and decode files for them
-during component compilation time.
-
-
-
-----What are OST traces?----
-
-Open System Trace traces. Macros can be found from the header OpenSystemTrace.h. OST is a binary tracing concept for good performance
-and run-time activation of traces.
-
-
-
-----How to set up TraceCompiler?----
-
-Remove comments before exports from group folder bld.inf
-When compiled from the group folder, will export itself to /epoc32/tools folder.
-
-Usually TraceCompiler is already integrated to Symbian build system, so there is no need to run TraceCompiler separately. Symbian build system calls 
-TraceCompiler automatically during component compilation. 
-
-If TraceCompiler is not integrated to build system but is needed to be run automatically when building a component
-abld.pl in /epoc32/tools/ needs to be changed to call tracecompiler.pl file. Note that the change might already be there.
-
-Change is done after a line like this:
-  "foreach $LoopBld (@Blds) {"
-			
-And the change is this: (First line is comment)
-
-	# Add the TraceCompiler once to the Calls array when TARGET is called
-	$Command eq "TARGET" and not scalar grep(/tracecompiler\.pl/,@Calls) and push @Calls, "perl /epoc32/tools/tracecompiler.pl $Plat $Program";
-
-
-		
-----How to use TraceCompiler?----
-
-Usually TraceCompiler is already integrated to Symbian build system, so there is no need to run TraceCompiler separately. Symbian build system calls 
-TraceCompiler automatically during component compilation. 
-
-If there is need to run TraceCompiler manually, it can be done following way:
-
-   perl /epoc32/tools/tracecompiler.pl <platform> [program]
-
-   For example: perl /epoc32/tools/tracecompiler.pl armv5
-		
-
-
-----How to actually get the traces?----
-Open System Trace macros use Symbian BTrace framework to forward the traces. To get these traces, you must implement a trace handler which will
-register itself to the Symbian BTrace using command BTrace::SetHandler( MyHandler ). Then it's up to you what to do with the traces.
-
-
-
-----What is happening in TraceCompiler?----
-
-1. tracecompiler.pl first runs a Java check to ensure that Java 1.5 or newer is found from the system. If this fails, tracecompiler.pl will exit.
-	 
-   If Java check is OK, tracecompiler.pl opens a "abld.bat" file which is generated by command "bldmake bldfiles". From that file, a path to
-   MAKEFILE generated by "bldmake bldfiles" is searched. This MAKEFILE is then opened and is parsed for a list of project MMP files. These MMP
-   files are then forwarded to the tracecompiler_parse_mmp.pl script.
-	 
-2. tracecompiler_parse_mmp.pl gets a MMP file as a parameter. It parses the MMP file for UID of the component and paths to all the source files.
-	 NOTE that MACROS are NOT supported! If UID cannot be found from the MMP file, tracecompiler_parse_mmp.pl will exit. If UID is found,
-	 TraceCompiler Java application is started and the component UID is given to it as a parameter. After it's started, component name, the path
-	 to the MMP file of the component and a list of source paths are send to STDOUT of TraceCompiler Java application. When all source paths are
-	 send, tracecompiler_parse_mmp.pl sends end tag "*ENDOFSOURCEFILES*" to TraceCompiler so it knows all the sources are then sent.
-	 
-3. TraceCompiler Java application listens to STDIN for component name, MMP file path and the paths to the source files. When it receives
-   "*ENDOFSOURCEFILES*" tag, it starts processing the source files. It finds all OST traces from the source files and generates needed headers
-   for the application to compile properly. It also generates autogen header and Symbian Dictionary file from the traces.
--- a/tracefw/tracecompiler/tracecompiler/release_note.txt	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,112 +0,0 @@
-NOTE: JRE1.5 is needed to run TraceCompiler.
-
-TraceCompiler 2.3.0
-
-New stuff in 2.3.0
-	- TraceCompiler refactored for Symbian Foundation.
-
-
-New stuff in 2.2.4
-	- Bug Fix - Trace compiler entry/exit errors with no paramter or return value
-	- Allow TAB in trace point text.
-	- Allow trace point text to span over multiple lines but TraceCompiler removes the line-feed character.
-	- improve the code to create the trace folder path to avoid any hickups in multiple mmp projects
-	- Improve the build.xml for raptor to build only the rel version of TraceCompiler and therfore avoid the clash between rel and deb when creating traceCompiler.zip file.
-
-New stuff in 2.2.3
-	- Bug Fix - 10. DEF144527: Critical - Adding OST to .h or .inl files can cause OstTraceGenX(...) redefined errors
-	
-New stuff in 2.2.2
-	- Bug fix - TCF-525 Critical: (TSW:EJRK-842AW2) IDO BAT - KernelHooks_Component is missing from pmd file
-
-New stuff in 2.2.1
-
-	- Change - TraceCompiler now support mulitple mmps in one bld.inf by provinding an new command 
-		line interface wher users can pass the traces folder in. This is a continuation of the 
-		previous release to enable the new feature for abld.
-
-New stuff in 2.2.0
-
-	- Change - TraceCompiler now support mulitple mmps in one bld.inf by provinding an new command 
-		line interface wher users can pass the traces folder in.
-New stuff in 2.1.1 - 2.1.2
-
-	- Bug fix - TraceCompiler did not parse function parameter correctly in all cases
-	- Bug fix - TraceCompiler did not work in Linux
-  
-New stuff in 2.0.0 - 2.0.1
-
-	- Change - TraceCompiler automatically converts deprecated group names to valid group names
-               (TRACE_API -> TRACE_BORDER, TRACE_DEBUG- > TRACE_DUMP, TRACE_DETAILED -> TRACE_INTERNALS)
-	- Bug fix - TraceCompiler did not work in Linux 
-	
-New stuff in 1.3.0 - 1.3.1
-
-	- Change - Trace compiler now reads in the group IDs from opensystemtrace_types.h
-	- Change - Code cleanup
-  
-New stuff in 1.2.0 - 1.2.7
-
-	- Change - TraceCompiler source code separated from TraceBuilder source code
-	- Change - Decode plugins can be added or removed
-	- Bug fix - 32-bit alignment was not done correctly in generated OstTraceGen1 inline functions 
-	- Bug fix - TraceCompiler did not handle empty strings correctly
-	- Bug fix - Wrong type definition generated for Performance traces
-	- Bug fix - Long traces were corrupted
-	- Bug fix - TRACE_PERFORMANCE group is now reserved only to performance event traces and 
-	            TRACE_STATE group is now reserved only to event traces
-	- Bug fix - Trace garbled if there were 16 and 8 bit descriptors in same trace
-
-New stuff in 1.1.0 - 1.1.6
-
-	- Change - Changed Performance Event Trace output format
-	- Change - Symbian Foundation related changes
-	- Bug fix - OstTraceData did not work
-	- Bug fix - Traces that contained both string and number parameter did not work correctly	
-	- Bug fix - Sometimes trace ID's changed during every compilation
-	- Bug fix - Trace with octal parameter didn't compile
-	- Bug fix - If EPOCROOT was like C:\S60, Dictionaries were exported to C:\S60epoc32\ost_dictionaries\
-
-New stuff in 1.0.4 - 1.0.42
-
-	NOTE! Format of the fixed_id.definitions file has changed from TraceBuilder version 1.0.20
-
-	- New feature - TraceCompiler now adds trace name to the Dictionaries
-	- New feature - TraceCompiler support non-source files that are listed in trace.properties file
-	- New feature - Support both "traces_<component name>" and "traces" as trace project directory name
-	- New feature - Support for -clean and -final
-	- New feature - Support to fixed group and trace ids
-	- New feature - Get export path from EPOCROOT environment variable
-	- New feature - Added support to type "p" in the OST macro	
-	- New feature - Possible to send over 80 byte traces (max. 512)
-	- Bug fix - Problems tracing string parameters whose length was 3 or fewer bytes.	
-	- Bug fix - TraceCompiler did not to parse constant pointers
-	- Bug fix - Descriptor's length in trace is not checked
-	- Bug fix - TraceCompiler did not support state transition macros
-	- Bug fix - TraceCompiler did not understand namespaces
-	- Bug fix - TraceCompiler did not generate OstTraceGenExt inline function for TTime parameter type
-	- Bug fix - In some cases TraceCompiler skiped trace ids
-	- Bug fix - Traces folder was generated even component doesn't have any OST traces
-	- Bug fix - Wrong trace ID is assigned to new Flow trace
-	- Bug fix - Autogen file got corrupted with special characters in parameter name
-	- Bug fix - Trace with only parameters doesn't work sometimes
-	- Bug fix - Supports %X format character
-	- Bug fix - Supports more format characters like %lx and %llx
-
-New stuff in 1.0.2 - 1.0.3
-
-	- Bug fix - Special characters crashed TraceCompiler
-	- Bug fix - In some cases TraceCompiler created "Traces" folder to wrong place
-
-New stuff in 0.25 - 0.25.49:
-
-	- New feature - Release note added
-	- Bug fix - TraceCompiler did not handle path correctly if sourcepath was "."
-	- Bug fix - TraceCompiler did not try to find group or traces folder deep enough
-	- Bug fix - In some cases TraceCompiler created "Traces" folder to wrong place
-	- Bug fix - TraceCompiler did not understand "/" path separators
-	- Bug fix - TraceCompiler did not convert "&" to "&amp;" in trace text. Fixed again in 0.25.45
-	- Bug fix - TraceCompiler assigned same ID for two groups
-	- Bug fix - TraceCompiler / TraceBuilder added extra backslash marks to dictionary
-	- Bug fix - Autogen headers are not always generated
-	- Bug fix - TraceCompiler did not understand concatenation of strings
--- a/tracefw/tracecompiler/tracecompiler/tracecompiler.pl	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,296 +0,0 @@
-#
-# Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "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:
-#
-# Description:
-#
-# Finds MMP paths from component makefiles and forwards them to MMP parser
-#
-#!perl -w
-use FindBin;
-my $trace_compiler_path;
-
-BEGIN
-{
-  # Get current directory as TraceCompiler path
-  $trace_compiler_path = $FindBin::Bin; # e.g. X:/epoc32/tools
-  $trace_compiler_path =~ s/\\/\//g; # Replace all "\" with "/"
-  $trace_compiler_path =~ s/\/$//; # Remove possible trailing slash
-}
-
-use lib $trace_compiler_path;
-
-use strict;
-use env;
-use Cwd;
-use tracecompiler;
-use tracecompiler_mmp_data;
-
-# EPOC root is two levels down from TraceCompiler level
-my $epocroot = tracecompiler::concatenatePath($trace_compiler_path, "../../");
-$epocroot =~ s/\/$//; # Remove possible trailing slash
-my $drive = substr($epocroot, 0, 2);
-my $build_target;
-my $project_name;
-my $action = "RUN";
-
-# Get Java command or EXIT if not found
-my $java_command = tracecompiler::getJavaCommand();
-
-if (not defined $java_command)
-{
-  print STDERR "Java 1.5 or newer required!\n";
-  exit;
-}
-
-#-------------------------------------------------------
-# Go through command line arguments
-#-------------------------------------------------------
-while ( @ARGV )
-{
-  my $arg = shift(@ARGV);
-  
-  # Print version information
-  if ($arg eq "-v")
-  {
-    my $version = tracecompiler::getTraceCompilerVersion();
-    print $version;
-    exit;
-  }
-  # Clean TraceCompiler generated files
-  elsif ($arg eq "-clean")
-  {
-    $action = "CLEAN";
-  }
-  # Finalize TraceCompiler running
-  elsif ($arg eq "-final")
-  {
-    $action = "FINAL";
-  }
-  # Build target (e.g. armv5)
-  elsif (not defined $build_target)
-  {
-    $build_target = $arg;
-  }
-  # Project name (e.g. MyComponent)
-  else
-  {
-    $project_name = $arg; 
-  }
-}
-
-#-------------------------------------------------------
-# Build target must now be defined or print usage info
-#-------------------------------------------------------
-if (not defined $build_target)
-{
-  my $version = tracecompiler::getTraceCompilerVersion();
-  print $version;
-  print "\nUsage: tracecompiler.pl build_target in the folder containing bld.inf. bldmake bldfiles must be run before this.\n";
-  print "Example: tracecompiler.pl armv5\n";
-  exit;
-}
-
-my $return_string = "";
-
-#-------------------------------------------------------
-# Find component makefile path from abld.bat
-#-------------------------------------------------------
-tracecompiler::debugTraceCompilerVersion();
-tracecompiler::debugMsg("Find component makefile path from abld.bat");
-open(ABLD, "<abld.bat") or die $!;
-my $makefile;
-while (<ABLD>)
-{
-  if (/ABLD.PL/)
-  {
-    my $makefilepath = $_;
-    $makefilepath =~ s/perl -S ABLD.PL "(.*)\\" .*$/$1/;
-    chop($makefilepath);
-    
-    # Change all "\" characters to "/"
-    $makefilepath =~ s/\\/\//g;
-    
-    $makefilepath = "$epocroot/epoc32/build".$makefilepath;
-    $makefile = $makefilepath.$build_target.".MAKE";
-  }
-}
-close ABLD or die $!;
-
-#-------------------------------------------------------
-# Find project makefile paths from component makefile
-#-------------------------------------------------------
-my @projectmakefiles;
-my $mmps;
-
-tracecompiler::debugMsg("Find project makefile paths from component makefile $makefile");
-
-open(MAKEFILE, "<$makefile") or (print STDERR "Cannot open makefile $makefile\n" and exit);
-while (<MAKEFILE>)
-{
-  my $line = $_;
-    
-  if ($line =~ /\"([^\"]+?)\"\s+\"PRJ_.*MMPFILES\s+MMP\"\s+\"([^\"]+?)\"/i)
-  {
-    my $bldinf = $1;
-    my $mmp = $2;
-    
-    tracecompiler::debugMsg("Found BLD file: $bldinf");
-    
-    # Remove bld.inf from the end of the path
-    $bldinf =~ s/(.*)[\\\/].*/$1\//;
-    
-    my $mmp_file = tracecompiler::concatenatePath($bldinf, $mmp);
-        
-    # Change all "//" to "/"
-    $mmp_file =~ s/\/\//\//g;
-    
-    # If .mmp is missing from the end, add it
-    if ($mmp_file !~ /\.mmp$/i)
-    {
-      $mmp_file .= ".mmp";
-    }
-        
-    tracecompiler::debugMsg("Found MMP file: $drive$mmp_file\n");
-    
-    # If project name is defined, only add that MMP to the list of mmp files
-    if (defined $project_name)
-    {
-        if ($mmp_file =~ /($project_name.mmp)$/i)
-        {
-          $mmps .= $drive . $mmp_file . " ";
-        }       
-    }
-    else
-    {
-      $mmps .= $drive . $mmp_file . " ";  
-    }
-  }
-
-}
-close MAKEFILE or die $!;
-
-#-------------------------------------------------------
-# Call the MMP parser for each MMP (or clean / final)
-#-------------------------------------------------------
-if (defined $mmps)
-{
-  foreach my $mmp (split(" ", $mmps))
-  {
-    # Pass MMP file path to Parse MMP
-    if ($action eq "RUN")
-    {
-      my $command = "perl $trace_compiler_path/tracecompiler_parse_mmp.pl $mmp";
-      tracecompiler::debugMsg("Call the MMP parser. Command: $command\n");
-      print qx($command);
-    }
-    
-    # Clean files using this MMP
-    elsif ($action eq "CLEAN")
-    {
-    	my $mmpObject = tracecompiler_mmp_data->new($mmp);
-      cleanTraceCompilerFiles($mmpObject);
-    }
-    
-    # Finalize files using this MMP
-    elsif ($action eq "FINAL")
-    {
-    	my $mmpObject = tracecompiler_mmp_data->new($mmp);
-      finalizeTraceCompilerRun($mmpObject);
-    }
-  }
-}
-else
-{
-  tracecompiler::debugMsg("Could not find any MMP files!");
-}
-
-
-
-
-
-#-------------------------------------------------------#
-#-------------------------------------------------------#
-#--------------------SUBROUTINES------------------------#
-#-------------------------------------------------------#
-#-------------------------------------------------------#
-
-#-------------------------------------------------------
-# Cleans TraceCompiler generated files
-#-------------------------------------------------------
-sub cleanTraceCompilerFiles
-{
-  tracecompiler::debugMsg("Clean TraceCompiler Files");
-  my $mmpObj = $_[0];
-  if($mmpObj->{tracespaths}) {
-  	foreach my $tracesFolder (@{$mmpObj->{tracespaths}})
-  	{
-    	if (-e $tracesFolder and opendir(DIR, $tracesFolder))
-    	{
-      	while (defined(my $file = readdir(DIR)))
-      	{
-        	# Delete files ending with *Traces.h
-        	if ($file =~ /Traces\.h$/i)
-        	{
-          	print "Cleaning: " . $tracesFolder . "/" . $file . "\n";
-          	unlink $tracesFolder . "/" . $file || print $!;
-        	}
-        	# Delete cache files
-        	elsif ($file =~ /\.cache$/i)
-        	{
-          	print "Cleaning: " . $tracesFolder . "/" . $file . "\n";
-          	unlink $tracesFolder . "/" . $file || print $!;
-        	}
-      	}
-      	closedir(DIR);
-    	}
- 	 }
- 	}
-  
-  tracecompiler::debugMsg("Cleaning TraceCompiler Files ready\n");
-  
-  # Finalize TraceCompiler run
-  finalizeTraceCompilerRun($mmpObj);
-}
-
-#-------------------------------------------------------
-# Finalizes TraceCompiler run
-#-------------------------------------------------------
-sub finalizeTraceCompilerRun
-{
-	tracecompiler::debugMsg("Finalize TraceCompiler Run");
-	my $mmpObj = $_[0];
-	if($mmpObj->{tracespaths}) {
-	foreach my $tracesFolder (@{$mmpObj->{tracespaths}})
-	{
-		my $defFile = $tracesFolder . "/" . "OstTraceDefinitions.h";
-		# Open OstTraceDefinitions.h and read stuff to array
-		if (-e $defFile and open(FILE,"<$defFile"))
-		{
-			my @lines = <FILE>;
-			close(FILE);
-
-			# Write stuff back to OstTraceDefinitions.h
-			open(FILE,">$defFile") || exit;
-			foreach my $line (@lines)
-			{
-				# Comment out the define
-				$line =~ s/(.*)#define OST_TRACE_COMPILER_IN_USE/\/\/ #define OST_TRACE_COMPILER_IN_USE/;
-				print FILE $line;
-			}
-			close(FILE);
-		}
-	}
-}
-
-tracecompiler::debugMsg("Finalizing TraceCompiler Run ready\n");
-}
--- a/tracefw/tracecompiler/tracecompiler/tracecompiler.pm	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,174 +0,0 @@
-#
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "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:
-#
-# Description:
-#
-# Module for TraceCompiler
-#
-package tracecompiler;
-
-# If this is 1, debug prints are shown
-my $DEBUG = 0;
-
-use FindBin;
-
-# Get current directory as TraceCompiler path
-my $trace_compiler_path = $FindBin::Bin;  # e.g. X:/epoc32/tools
-$trace_compiler_path =~ s/\\/\//g; # Replace all "\" with "/"
-$trace_compiler_path =~ s/\/$//; # Remove possible trailing slash
-
-#-------------------------------------------------------
-# Concatenate path
-#-------------------------------------------------------
-sub concatenatePath
-{
-  my $concatenatePathBase = $_[0];
-  my $concatenatePathFile = $_[1];
-  
-  my $backCount = 0;
-  
-  # Change all "\" characters to "/"
-  $concatenatePathBase =~ s/\\/\//g;
-  $concatenatePathFile =~ s/\\/\//g;
-  
-  # Replace all "/./" with "/"
-  $concatenatePathBase =~ s/\/\.\//\//g;
-  $concatenatePathFile =~ s/\/\.\//\//g;
-    
-  # Find how many back references there are and remove them
-  while ($concatenatePathFile =~ /\.\.\//g) 
-  { 
-    $backCount++ 
-  }
-  $concatenatePathFile =~ s/\.\.\///g;
-  
-  # If there is / in the end of the base remove it
-  $concatenatePathBase =~ s/\/$//;
-  
-  # Remove directories from the end of the path
-  $concatenatePathBase = reverse($concatenatePathBase);
-  for (my $i=0; $i<$backCount; $i++)
-  {
-    $concatenatePathBase =~ s/.*?\///;
-  }
-  $concatenatePathBase = reverse($concatenatePathBase);
-  
-  my $concatenatePathFullFilePath = "$concatenatePathBase\/$concatenatePathFile";
-  
-  # Replace again all "/./" with "/"
-  $concatenatePathFullFilePath =~ s/\/\.\//\//g;
-  
-  debugMsg("Concatenate returns $concatenatePathFullFilePath");
-  return $concatenatePathFullFilePath;
-}
-
-#-------------------------------------------------------
-# Get java command
-#-------------------------------------------------------
-sub getJavaCommand
-{
-  my @java_commands = ("/tools/ncp_tools/helium/external/jdk1.5/jre/bin/java.exe", "java.exe", "c:/apps/seeinstaller/jre/bin/java.exe");
-
-  my $java_command;
-  
-  foreach my $command (@java_commands)
-  {
-    if (checkJava($command))
-    {
-      $java_command = $command;
-      last;
-    }
-  }
-  
-  return $java_command;
-}
-
-#-------------------------------------------------------
-# Check java
-#-------------------------------------------------------
-sub checkJava
-{
-  open (IN, "$_[0] -version 2>&1 |");
-  while(<IN>)
-  {
-    if (/(\d+\.\d+)/)
-    {
-      if ($1 >= 1.5)
-      {
-        return 1;
-      }
-    } 
-  }
-  
-  return 0;
-}
-
-#-------------------------------------------------------
-# Gets TraceCompiler version number
-#-------------------------------------------------------
-sub getTraceCompilerVersion
-{
-  # Get Java command or EXIT if not found
-  my $java_command = getJavaCommand();
-
-  if (not defined $java_command)
-  {
-    return "Java 1.5 or newer required!\n";
-    exit;
-  }
-  
-   # run from class files class files
-  my $version_query_command = "$java_command -classpath $trace_compiler_path/tracecompiler com.nokia.tracecompiler.TraceCompilerMain -v";
-  
-  # run from jar  file	command
-  #my $version_query_command = "$java_command -jar $trace_compiler_path/tracecompiler.jar -version"; 
-
-  my $version = qx($version_query_command);
-    
-  return $version;
-}
-
-
-#-------------------------------------------------------
-# Debug Message. Writes to log file and outputs to screen.
-#-------------------------------------------------------
-sub debugMsg
-{
-  if ($DEBUG)
-  {
-    open FILE, ">>/tracecompiler_debug.txt" or die $!;
-    print FILE $_[0] . "\n";
-    close FILE;
-    
-    return print "DEBUG: $_[0]\n";
-  }
-}
-
-#-------------------------------------------------------
-# Writes TraceCompiler version to log and screen if Debug is on.
-#-------------------------------------------------------
-sub debugTraceCompilerVersion
-{
-  if ($DEBUG)
-  {   
-    open FILE, ">>/tracecompiler_debug.txt" or die $!;
-    my $version = getTraceCompilerVersion();
-    print FILE $version;
-    close FILE;
-    
-    return print "DEBUG: $version\n";
-  }
-}
-
-1;
-
Binary file tracefw/tracecompiler/tracecompiler/tracecompiler.zip has changed
--- a/tracefw/tracecompiler/tracecompiler/tracecompiler_mmp_data.pm	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,225 +0,0 @@
-#
-# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "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:
-#
-# Description:
-#
-# Module for TraceCompiler. parse the mmp file and prepare an object to be re-used by tracecompiler.pl and tracecompiler_perse_mmp.pl
-#
-package tracecompiler_mmp_data;
-
-use strict;
-use warnings;
-use File::Basename;
-use tracecompiler;
-sub readMmp($);
-
-
-my $component_name;
-
-
-sub new
-{
-	my $pkg = shift;
-	my $self = {};
-	bless $self,$pkg;
-	my $mmp = shift;
-	if (defined($mmp) and -e $mmp) {
-	  tracecompiler::debugMsg("Starting to parse MMP file: $mmp");
-	  my $file_path = $mmp;
-	  $component_name =  basename $mmp;
-
-	  # Take the module name from the MMP file path. e.g. "X:/temp/mycomponent.mmp" would create "mycomponent"
-	  $component_name =~ s/([^\.]*).*/$1/;
-
-		$self->{mmpName} = $mmp;
-		$self->readMmp($mmp);
-	} else 
-	{
-		tracecompiler::debugMsg("tracecompiler_mmp_data :: Valid MMP file must be provided ...\n");
-	}
-
-	return $self;
-}
-
-# parse mmp and get the infos we need. This method moved from tracecompiler_parse_mmp.pl to here with some add-on
-sub readMmp($)
-{
-	my $self = shift;
-	my $file = shift;
-	if (-e $file)
-	{
-		tracecompiler::debugMsg("Starting to parse file: $file");
-		my @sources;
-		my @tracesfolders;
-		my $in_comment_block = 0;
-
-		# Get file path (remove file + extension)
-		my $file_path = dirname $file;
-
-		# Change "//" to "/"
-		$file_path =~ s/\/\//\//g;
-
-		my $current_src_path = $file_path;
-
-		# Go through lines
-		open FILE, "<$file" or die $!;
-		foreach my $line (<FILE>)
-		{
-			# Check if contains includes
-			if ($line =~ /#include.+\"(.*)?\"/i)
-			{
-				my $includedFile = $1;
-
-				# Get absolute path if the first character is not "\" or b"/"
-				if ($includedFile =~ /^[^\\\/]/)
-				{
-					$includedFile = tracecompiler::concatenatePath($file_path, $includedFile);
-				}
-				else
-				{
-					$includedFile = substr($file_path, 0, 2) . $includedFile;
-				}
-
-				if (defined $includedFile)
-				{
-					tracecompiler::debugMsg("Found #include from $file. Start parsing it..\n");
-					$self->readMmp($includedFile);
-				}
-			}
-
-			# Check if in comment block
-			if ($in_comment_block > 0)
-			{
-				if ($line =~ /\*\/(.*)/)
-				{
-					$line = $1;
-					$in_comment_block--;
-				}
-				if ($in_comment_block == 0)
-				{
-					# Comment block ended, continue parsing the line
-				}
-				else
-				{
-					# We are still in comment block, jump to next line
-					next;
-				}
-			}
-
-			# Delete possible comments in one line
-			$line =~ s/\/\/.*//; # //
-			$line =~ s/\/\*.*\*\///; # /* */
-
-			if ($line =~ /(.*?)\/\*/)
-			{
-				$line = $1;
-				$in_comment_block++;
-			}
-
-			# Find uid
-			if ($line =~ /uid.+0x([a-fA-F0-9]+)?/i)
-			{
-				$self->{uid} = $1;
-
-				tracecompiler::debugMsg("Found Uid: $self->{uid}");
-			}
-
-			#Find target
-			if($line =~ /target\s+(\S+)\.(\S+)/i)
-			{
-				$self->{target} = $1;
-				$self->{ext} = $2;
-			}
-
-			#Find target type
-			if($line =~ /targettype\s+(\S+)/i)
-			{
-				$self->{type} = $1;
-			}
-
-			# Find source path
-		if ($line =~ /sourcepath\s+([^\s]+)/i)
-			{
-				my $src_path = $1;
-
-				# Get absolute path if the first character is not "\" or "/"
-				if ($src_path =~ /^[^\\\/]/)
-				{
-					$current_src_path = tracecompiler::concatenatePath($file_path, $src_path . "/");
-				}
-				else
-				{
-					$current_src_path = substr($file_path, 0, 2) . $src_path;
-				}
-
-				tracecompiler::debugMsg("Source path changed to: $current_src_path");
-			}
-
-			# Find sources
-			while ($line =~ /source\s+([^\s]+)/i)
-			{
-				my $src = $1;
-
-				my $src_path = tracecompiler::concatenatePath($current_src_path, $src);
-
-				if (-e $src_path)
-				{
-					push(@sources, $src_path);
-
-					tracecompiler::debugMsg("Found source: $src_path");
-				}
-				else
-				{
-					tracecompiler::debugMsg("Source doesn't exist!: $src_path");
-				}
-
-				$line =~ s/\Q$src//;
-			}
-
-			#Find unserincludes
-			if ($line =~ /userinclude\s+([^\s]+)/i)
-			{
-				tracecompiler::debugMsg("Found userinclude: $line");
-				my $userinclude = $1;
-				$userinclude =~ s/\\/\//g;
-				my $tmp1 = $self->{target} . "_" . $self->{ext};
-				my $tmp2 = $self->{target} . "_" . $self->{type};
-				if (   $userinclude =~ /.*\/traces\/$tmp1$/i
-				or $userinclude =~ /.*\/traces_$tmp2$/i
-				or $userinclude =~ /.*\/traces_$component_name$/i
-				or $userinclude =~ /.*\/traces$/i)
-				{
-					tracecompiler::debugMsg("Found traces userinclude: $userinclude");
-					push(@tracesfolders, $userinclude);
-				}
-			}
-		}
-		if (scalar @sources > 0)
-		{
-			$self->{sources} = [@sources];
-		}
-		if (scalar @tracesfolders > 0)
-		{
-			$self->{tracespaths} = [@tracesfolders];
-		}
-		close FILE;
-
-		tracecompiler::debugMsg("Ending the parsing of MMP file: $file\n");
-	} else
-	{
-		tracecompiler::debugMsg("Could not find file: $file\n");
-	}
-
-}
-
-1;
\ No newline at end of file
--- a/tracefw/tracecompiler/tracecompiler/tracecompiler_parse_mmp.pl	Wed Sep 29 17:45:35 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,226 +0,0 @@
-#
-# Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "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:
-#
-# Description:
-#
-# Parses UID and source files from given MMP files. Starts TraceCompiler Java application.
-#
-#!perl -w
-use FindBin;
-my $trace_compiler_path;
-
-
-BEGIN
-{
-  # Get current directory as TraceCompiler path
-  $trace_compiler_path = $FindBin::Bin; # e.g. X:/epoc32/tools
-  $trace_compiler_path =~ s/\\/\//g; # Replace all "\" with "/"
-  $trace_compiler_path =~ s/\/$//; # Remove possible trailing slash
-}
-
-use lib $trace_compiler_path;
-
-use strict;
-use warnings;
-use env;
-use FileHandle;
-use IPC::Open3;
-use tracecompiler;
-use tracecompiler_mmp_data;
-
-my $java_command = tracecompiler::getJavaCommand();
-
-if (not defined $java_command)
-{
-  print STDERR "Java 1.5 or newer required!\n";
-  exit;
-}
-
-# Global variables
-my $project_name;
-my $traces_folder = "";
-
-
-# run from class files
-
-my $command = "$java_command -classpath $trace_compiler_path/tracecompiler com.nokia.tracecompiler.TraceCompilerMain";
-
-# run from jar file
-#my $command = "$java_command  -jar $trace_compiler_path/tracecompiler/tracecompiler.jar";
-
-# Open MMP file
-foreach my $mmp_file (@ARGV)
-{
-  $traces_folder = "";
-  $project_name = $mmp_file;
-  
-  # Take the module name from the MMP file path. e.g. "X:/temp/mycomponent.mmp" would create "mycomponent"
-  $project_name =~ s/.*\/([^\.]*).*/$1/;
-  
-  tracecompiler::debugMsg("Module name: $project_name");
-  
-  # Parse sources in an own function
-  my $mmpObject = tracecompiler_mmp_data->new($mmp_file);
-    
-  # There must be UID
-  if (!$mmpObject->{uid})
-  {
-    tracecompiler::debugMsg("UID is not defined, don't call TraceCompiler!"); 
-    exit;
-  }
-  if (!$mmpObject->{target})
-  {
-  	tracecompiler::debugMsg("Target not defined, don't call TraceCompiler!"); 
-  	exit;
-  }
-  if (!$mmpObject->{type})
-  {
-  	tracecompiler::debugMsg("Target type not defined, don't call TraceCompiler!"); 
-  	exit;
-  }
-  if (!$mmpObject->{ext})
-  {
-  	tracecompiler::debugMsg("Target extension not defined, don't call TraceCompiler!"); 
-  	exit;
-  }
-  
-  # find out the right traces folder to use if ther is more than one and set the project name accordingly.
-  # the following order of the code is very important.
-  my $tmp;
-  if ($mmpObject->{tracespaths})
-  {
-  	#Check if there is one of the expected format
-  	
-  	#search for /trace/<target>_<ext>
-  	$tmp = $mmpObject->{target} ."_" . $mmpObject->{ext};
-  	my @list = grep(/.*\/traces\/$tmp\s*$/i, @{$mmpObject->{tracespaths}});
-  	
-  	if (scalar @list > 0) 
-  	{
-  		$traces_folder = pop(@list);
-  		$project_name = $mmpObject->{target} ."_" . $mmpObject->{ext};
-  		tracecompiler::debugMsg("Found traces folder 1: $traces_folder" ); 
-  	}
-  	 
-  	if ($traces_folder eq "" ) 
-  	{
-  		#search for /traces_<target>_<type>
-  		$tmp = $mmpObject->{target} ."_" . $mmpObject->{type};
-  		@list = grep(/.*\/traces_$tmp\s*$/i, @{$mmpObject->{tracespaths}});
-  		if (scalar @list > 0) 
-  		{
-  			$traces_folder = pop(@list);
-  			$project_name = $mmpObject->{target} . "_" . $mmpObject->{type};
-  			tracecompiler::debugMsg("Found traces folder 2: $traces_folder" ); 
-  		}
-  	}
-  	
-  	if ($traces_folder eq "" ) 
-  	{
-  		#search for /traces_<mmpname>
-  		@list = grep(/.*\/traces_$project_name\s*$/i, @{$mmpObject->{tracespaths}});
-  		if (scalar @list > 0) 
-  		{
-  			$traces_folder = pop(@list);
-  			tracecompiler::debugMsg("Found traces folder 3: $traces_folder" ); 
-  		}
-  	}
-  		
-  	if ($traces_folder eq "" ) 
-  	{
-  		#search for /traces
-  		@list = grep(/.*\/traces\s*$/i, @{$mmpObject->{tracespaths}});
-  		if (scalar @list > 0) 
-  		{
-  			$traces_folder = pop(@list);
-  			tracecompiler::debugMsg("Found traces folder 4: $traces_folder" ); 
-  		}
-  	}
-  }
-  else 
-  {
-  	tracecompiler::debugMsg("No Traces folder was found in userinclude, don't call TraceCompiler!"); 
-  	exit;
-  }
-  
-  if (!$mmpObject->{sources})
-  {
-  	tracecompiler::debugMsg("No sources found!"); 
-  	exit; 	
-  }
- 
- 
-  # IMPORTANT NOTE:
-  # please note that IPC::open3() is the only suitable api available in the perl version 5.6.1 used in ONB
-  # but it has a limit. If the size of the command is more than 264, perl will crash and it seems to be a windows limit
-  # rather perl.
-  # Therefore we have to parse the mmp and the traces folder from the stdin (*WRITER in this case) and 
-  # relax the new TraceCompiler API to allow this if they are not specified on the command line.
-  # It's not an issue in Raptor as it calls TraceCompiler directly.
-  #
-  $command .= " --uid=" . $mmpObject->{uid} . " --project=" . $project_name;
-           
-  tracecompiler::debugMsg("\nCall the Java TraceCompiler. Command: $command\n");
-    
-  # Create TraceCompiler process
-  local (*READER, *WRITER);
-  my $ pid = open3(\*WRITER, \*READER, \*READER, $command);
-    
-  # Remove duplicates from the sources list
-  my %seen = ();
-  my @uniqueSources = ();
-  foreach my $item (@{$mmpObject->{sources}}) 
-  {
-    push(@uniqueSources, $item) unless $seen{$item}++;
-  }
- 
-  tracecompiler::debugMsg("Send mmp file: $mmp_file");
-  print WRITER "--mmp=$mmp_file\n";
-  
-  tracecompiler::debugMsg("Send traces folder path: $traces_folder");
-  print WRITER "--traces=$traces_folder\n";
-    
-    
-  # Send sources to the TraceCompiler     
-  foreach my $source (@uniqueSources)
-  {
-    tracecompiler::debugMsg("Send source: $source");
-    print WRITER "$source\n";
-   }
-    
-  # Send the end of the source files tag
-  print WRITER "*ENDOFSOURCEFILES*\n";
-  WRITER->autoflush(1);
-    
-  # Gather up the response from the TraceCompiler
-  my $compilerReturn = "";
-  foreach my $line (<READER>)
-  {
-    tracecompiler::debugMsg("Response line from TraceCompiler: $line");
-    $compilerReturn .= $line;
-  }       
-
-  # If Compiler doesn't return anything or we get no class found error from Java, don't print anything
-  if ($compilerReturn ne "" and $compilerReturn !~ /NoClassDefFoundError/)
-  {
-    tracecompiler::debugMsg("TraceCompiler succeeded! Returned: $compilerReturn");
-    print "\n******************* TRACECOMPILER STARTS *******************\n\n";
-    print "Building traces for component $project_name. Component UID: 0x$mmpObject->{uid}.\n";
-    print $compilerReturn . "\n";
-    print "\n******************* TRACECOMPILER ENDS *********************\n\n";
-  }
-  else 
-  {
-    tracecompiler::debugMsg("No traces were generated. Returned:\n$compilerReturn\n");
-  }
- }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/group/bld.inf	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,30 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+* TraceCompiler
+*/
+
+PRJ_PLATFORMS
+TOOLS2
+
+PRJ_EXPORTS
+../tracecompiler/tracecompiler.pl 			+/tools/ //
+../tracecompiler/tracecompiler.pm 			+/tools/ //
+../tracecompiler/tracecompiler_parse_mmp.pl 		+/tools/ //
+../tracecompiler/tracecompiler_mmp_data.pm		+/tools/ //
+	
+
+:zip ../tracecompiler/tracecompiler.zip +/tools/tracecompiler overwrite//
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/group/build.xml	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,119 @@
+<!--
+#
+# Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "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:
+#
+# Description: 
+#
+-->
+<project name="OstTraceCompiler" default="build" basedir="..">
+
+<condition property="isLinux">
+    <os name="linux"/>
+</condition>
+
+<condition property="isWindows">
+	<not>
+		<os name="linux"/>
+	</not>
+</condition>
+	
+<condition property="isRel">
+	<matches string="${epoc.rel}" pattern="^.*rel$"/>
+</condition>
+	
+<condition property="isDeb">
+	<matches string="${epoc.rel}" pattern="^.*deb$"/>
+</condition>
+
+	
+<target name="init" >
+	<property environment="env" />
+	<property name="epoc.root" value="${env.EPOCROOT}/" />
+	<property name="src.dir" value="src" />
+	<property name="jar.dir" value="jar" />
+	<property name="dest.dir" value="${tools.rel}/tracecompiler" />
+	<property name="build.dir" value="${epoc.root}epoc32/build/ost/tracecompiler" />
+</target>
+
+
+<target name="clean" depends="init" if="isRel">
+	<echo>Cleaning the ${build.dir}</echo>
+	<delete dir="${build.dir}"/>
+	<echo>Creating the build directory</echo>
+	<mkdir dir="${build.dir}"/>
+	
+	<echo>Deleting *.xml_ files</echo>
+	<delete>
+		<fileset dir="${epoc.root}epoc32/build" includes="**/*.xml_"/>
+	</delete>
+    <delete dir="${dest.dir}"/>
+    <delete file="tracecompiler/tracecompiler.zip"/>
+</target>
+
+	
+<target name="what" depends="init" description="Prints out all releasables">
+	<pathconvert pathsep="${line.separator}" property="output">
+		<fileset dir="${dest.dir}" casesensitive="no"/>
+	</pathconvert>
+	<echo message="${output}" />
+</target>
+
+
+<target name="build" if="isRel" depends="clean">	
+	<javac srcdir="${src.dir}" destdir="${build.dir}" debug="true" target="1.5"></javac>
+
+	<echo> Copying html and properties files from src/com.nokia.tracecompiler/src to ${build.dir} </echo>
+	<copy todir="${build.dir}">
+		<fileset dir="src/com.nokia.tracecompiler/src" includes="**/*.properties"/>
+		<fileset dir="src/com.nokia.tracecompiler/src" includes="**/*.html"/>
+        <fileset dir="src/com.nokia.tracecompiler/src" includes="**/*.lic"/>
+	</copy>
+
+	<antcall target="change_windows_file_attributes"></antcall>
+
+	<antcall target="change_linux_file_attributes"></antcall>
+
+	<echo>Zip TraceCompiler binaries</echo>
+	<zip destfile="tracecompiler/tracecompiler.zip" update="true">
+		<zipfileset dir="${build.dir}"/> 
+	</zip>
+	
+	<echo>Unzip recompiled TraceCompiler binaries intop epoc32/tools/tracecompiler</echo>
+	<unzip src="tracecompiler/tracecompiler.zip" dest="${dest.dir}" overwrite="true"/>
+
+	<mkdir dir="${jar.dir}"/>
+       	<jar destfile="${jar.dir}/tracecompiler.jar" basedir="${build.dir}">
+       		<fileset dir="src/com.nokia.tracecompiler/src" includes="**/*.properties"/>
+       		<manifest>
+       			<attribute name="Main-Class" value="com.nokia.tracecompiler.TraceCompilerMain"/>
+       		</manifest>
+        </jar>
+</target>
+
+<target name="change_windows_file_attributes" if="isWindows">
+	<echo message="Change tracecompiler.zip file attributes in Windows"/>
+	<exec executable="attrib">
+		<arg value="-r"/>
+		<arg value="tracecompiler/tracecompiler.zip"/>
+	</exec>
+</target>
+
+<target name="change_linux_file_attributes" if="isLinux">
+	<echo message="Change tracecompiler.zip file attributes in Linux"/>
+	<exec executable="chmod">
+		<arg value="777"/>
+		<arg value="tracecompiler/tracecompiler.zip"/>
+	</exec>
+</target>
+
+</project>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/.classpath	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+	<classpathentry kind="output" path="bin"/>	
+</classpath>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/.project	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>com.nokia.tracecompiler</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
+		<nature>org.eclipse.pde.PluginNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+		<nature>org.eclipse.jem.beaninfo.BeanInfoNature</nature>
+	</natures>
+</projectDescription>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/.settings/org.eclipse.core.resources.prefs	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,8 @@
+#Fri Sep 04 14:04:36 BST 2009
+eclipse.preferences.version=1
+encoding//src/com/nokia/tracecompiler/autogen/messages.properties=8859_1
+encoding//src/com/nokia/tracecompiler/dictionary/messages.properties=8859_1
+encoding//src/com/nokia/tracecompiler/engine/header/messages.properties=8859_1
+encoding//src/com/nokia/tracecompiler/engine/messages.properties=8859_1
+encoding//src/com/nokia/tracecompiler/engine/project/messages.properties=8859_1
+encoding//src/com/nokia/tracecompiler/engine/rules/messages.properties=8859_1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/.settings/org.eclipse.jdt.core.prefs	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,3 @@
+#Tue Apr 14 13:07:47 EEST 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.source=1.5
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/.settings/org.eclipse.jdt.ui.prefs	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,3 @@
+#Tue Apr 14 13:07:47 EEST 2009
+eclipse.preferences.version=1
+internal.default.compliance=default
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/about.html	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,20 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<head>
+<title>About</title>
+<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
+</head>
+<body>
+
+<h2>About This Content</h2>
+ 
+<p>February 4, 2009</p>	
+
+<h3>Copyright</h3>
+<p>Copyright &copy; 2007-2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.<br>
+This component and the accompanying materials are made available under the <br/>
+terms of the License "Symbian Foundation License v1.0" which accompanies this <br/>
+distribution, and is available at the URL: <a href="http://www.symbianfoundation.org/legal/sfl-v10.html">http://www.symbianfoundation.org/legal/sfl-v10.html</a>.<p>
+
+</body>
+</html>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/build.properties	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,2 @@
+source.. = src/
+output.. = bin/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/Messages.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,58 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "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:
+ *
+ * Description:
+ *
+ ** Localization for tracecompiler package
+ *
+ */
+package com.nokia.tracecompiler;
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+@SuppressWarnings("all")
+public final class Messages {
+
+	/**
+	 * Bundle name
+	 */
+	private static final String BUNDLE_NAME = "com.nokia.tracecompiler.messages"; //$NON-NLS-1$
+
+	/**
+	 * Bundle
+	 */
+	private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
+			.getBundle(BUNDLE_NAME);
+
+	/**
+	 * Prevents construction
+	 */
+	private Messages() {
+	}
+
+	/**
+	 * Gets localized string based on key
+	 * 
+	 * @param key
+	 *            the resource key
+	 * @return the localized resource
+	 */
+	public static String getString(String key) {
+		try {
+			return RESOURCE_BUNDLE.getString(key);
+		} catch (MissingResourceException e) {
+			return '!' + key + '!';
+		}
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/TraceCompiler.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,758 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "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:
+ *
+ * Description:
+ *
+ * TraceCompiler command-line main class
+ *
+ */
+package com.nokia.tracecompiler;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import com.nokia.tracecompiler.document.FileDocumentMonitor;
+import com.nokia.tracecompiler.document.StringDocumentFactory;
+import com.nokia.tracecompiler.engine.TraceCompilerEngineEvents;
+import com.nokia.tracecompiler.engine.TraceCompilerEngineGlobals;
+import com.nokia.tracecompiler.engine.TraceCompilerEngineInterface;
+import com.nokia.tracecompiler.engine.TraceLocationList;
+import com.nokia.tracecompiler.engine.project.ProjectEngine;
+import com.nokia.tracecompiler.engine.utils.TraceUtils;
+import com.nokia.tracecompiler.model.TraceCompilerException;
+import com.nokia.tracecompiler.model.TraceModel;
+import com.nokia.tracecompiler.plugin.TraceCompilerPlugin;
+import com.nokia.tracecompiler.project.GroupNames;
+import com.nokia.tracecompiler.source.SourceConstants;
+import com.nokia.tracecompiler.source.SymbianConstants;
+import com.nokia.tracecompiler.utils.DocumentFactory;
+import com.nokia.tracecompiler.utils.TraceCompilerVersion;
+
+/**
+ * TraceCompiler command-line main class
+ * 
+ */
+public class TraceCompiler {
+	
+	private static String LINE_SEPARATOR =  System.getProperty("line.separator"); //$NON-NLS-1$
+
+	/**
+	 * Index of third character
+	 */
+	private static final int INDEX_OF_THIRD_CHARACTER = 2;
+
+	/**
+	 * Index of first character
+	 */
+	private static final int INDEX_OF_FIRST_CHARACTER = 0;
+
+	/**
+	 * Version option
+	 */
+	private static final String VERSION_OPTION = "--version"; //$NON-NLS-1$
+	private static final String LEGACY_VERSION_OPTION = "-version"; //$NON-NLS-1$
+	private static final String VERSION_OPTION_SF = "-v"; //$NON-NLS-1$
+	/**
+	 * Version option instruction text
+	 */
+	private static final String VERSION_OPTION_INSTRUCTION_TEXT = "print TraceCompiler version"; //$NON-NLS-1$
+
+	
+	/**
+	 * help option
+	 */
+	private static final String HELP_OPTION = "--help"; //$NON-NLS-1$
+	private static final String HELP_OPTION_SF = "-h"; //$NON-NLS-1$
+	private static final String HELP_OPTION_INSTRUCTION_TEXT = "print help"; //$NON-NLS-1$
+	
+	/**
+	 * Verbose option
+	 */
+	private static final String VERBOSE_OPTION = "--verbose"; //$NON-NLS-1$
+	private static final String VERBOSE_OPTION_SF = "-vb"; //$NON-NLS-1$
+	/**
+	 * Verbose option instruction text
+	 */
+	private static final String VERBOSE_OPTION_INSTRUCTION_TEXT = "print info messages."; //$NON-NLS-1$
+
+	/**
+	 * keep going option
+	 */
+	private static final String STOP_ON_ERROR_OPTION = "--stopOnError"; //$NON-NLS-1$
+	private static final String STOP_ON_ERROR_OPTION_SF = "-soe"; //$NON-NLS-1$
+	/**
+	 * keep going option instruction text
+	 */
+	private static final String STOP_ON_ERROR_OPTION_INSTRUCTION_TEXT = "On error, stop at the end of the compilation unit."; //$NON-NLS-1$
+
+	
+
+	/**
+	 * Version text
+	 */
+	private static final String VERSION_TEXT = "TraceCompiler version "; //$NON-NLS-1$
+
+	/**
+	 * Option instruction text
+	 */
+	private static final String OPTION_INSTRUCTION_TEXT = "Options:"; //$NON-NLS-1$
+
+	
+	private static final String USAGE = "Usage: " + LINE_SEPARATOR + //$NON-NLS-1$
+										"tracecompiler [options] Component_UID [Component_name MMP_path source_file...]" + LINE_SEPARATOR + //$NON-NLS-1$
+										"\t" + OPTION_INSTRUCTION_TEXT + LINE_SEPARATOR + //$NON-NLS-1$
+										"\t" + HELP_OPTION_SF  + ", " + HELP_OPTION + ", " + HELP_OPTION_INSTRUCTION_TEXT + LINE_SEPARATOR +   //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
+										"\t" + VERSION_OPTION_SF + ", " + VERSION_OPTION + ", " + LEGACY_VERSION_OPTION + "\t" +  VERSION_OPTION_INSTRUCTION_TEXT + LINE_SEPARATOR +   //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$ //$NON-NLS-4$
+										"\t" + VERBOSE_OPTION_SF + ", " + VERBOSE_OPTION + "\t\t" + VERBOSE_OPTION_INSTRUCTION_TEXT + LINE_SEPARATOR +  //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
+										"\t" + STOP_ON_ERROR_OPTION_SF + ", " + STOP_ON_ERROR_OPTION + "\t" + STOP_ON_ERROR_OPTION_INSTRUCTION_TEXT + LINE_SEPARATOR;  //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
+
+
+
+	/**
+	 * End of source files tag
+	 */
+	private static final String ENDOFSOURCEFILES = "*ENDOFSOURCEFILES*"; //$NON-NLS-1$
+	
+
+	/**
+	 * Offset to UID
+	 */
+	private static final int COMPONENT_UID_ARG = 0;
+
+	/**
+	 * Offset to component name
+	 */
+	private static final int COMPONENT_NAME_ARG = 1;
+
+	/**
+	 * Offset to MMP path
+	 */
+	private static final int COMPONENT_MMP_PATH_ARG = 2; // CodForChk_Dis_Magic
+
+	/**
+	 * Offset to source files
+	 */
+	private static final int SOURCE_FILE_START_OFFSET = 3; // CodForChk_Dis_Magic
+
+	/**
+	 * Number of arguments
+	 */
+	private static final int MANDATORY_ARGUMENT_COUNT = 1;
+
+	/**
+	 * MMP file extension
+	 */
+	private static final String MMP = ".mmp"; //$NON-NLS-1$
+
+	/**
+	 * Underscore character
+	 */
+	private static final String UNDERSCORE = "_"; //$NON-NLS-1$
+
+	/**
+	 * Name of the trace folder that include component name
+	 */
+	private String traceFolderName;
+
+	/**
+	 * Decode plugins path
+	 */
+	private String DECODE_PLUGINS_PATH = "com/nokia/tracecompiler/decodeplugins"; //$NON-NLS-1$
+
+	/**
+	 * Decode plugin name tag
+	 */
+	private String DECODE_PLUGIN_NAME_TAG = "<DECODE_PLUGIN_NAME>"; //$NON-NLS-1$
+
+	/**
+	 * Decode plugin class name tag
+	 */
+	private String DECODE_PLUGIN_CLASS_NAME_TAG = "<DECODE_PLUGIN_CLASS_NAME>"; //$NON-NLS-1$
+
+	/**
+	 * Decode plugin engine class name template
+	 */
+	private String ENGINE_CLASS_NAME_TEMPLATE = DECODE_PLUGIN_NAME_TAG
+			+ "Engine"; //$NON-NLS-1$
+
+	/**
+	 * Decode plugin engine file name template
+	 */
+	private String ENGINE_FILE_NAME_TEMPLATE = DECODE_PLUGIN_CLASS_NAME_TAG
+			+ ".class"; //$NON-NLS-1$
+
+	/**
+	 * Decode plugins class template
+	 */
+	private String CLASS_TEMPLATE = "com.nokia.tracecompiler.decodeplugins." + DECODE_PLUGIN_NAME_TAG + "." + DECODE_PLUGIN_CLASS_NAME_TAG; //$NON-NLS-1$ //$NON-NLS-2$	
+
+	/**
+	 * Main function
+	 * 
+	 * @param args
+	 *            the command line arguments
+	 */
+	public static void main(String[] args) {
+		ArrayList<String> list = new ArrayList<String>(Arrays.asList(args));
+		long startTime = System.currentTimeMillis();
+		//create a new session of TraceCompiler
+		TraceCompiler console = new TraceCompiler();
+		
+		try {
+			console.parseCommandLine(list);
+		} catch (Exception e) { //should cover IOException and TraceCompilerIllegalArgumentsException
+			//There is no point to continue if there are problems with the arguments.
+			TraceCompilerLogger.printError(e.getMessage());
+			printUsage();
+			System.exit(1);
+		}
+		
+		boolean error = false;
+		try {
+			if(list.size() != 0) {
+				console.createPlugins();
+				console.start();
+				console.buildTraceFiles();
+				
+			}
+		} catch (Exception e) {
+			if (e instanceof TraceCompilerRootException) {
+				TraceCompilerLogger.printError(e.getMessage()); 
+			} //else the error should have been reported earlier
+			error = true;
+		} finally {
+			try {
+				if (!error) { //check if errors have been logged by EventEngine
+					TraceCompilerEngineEvents events = TraceCompilerEngineGlobals.getEvents();
+					if (events != null && events.hasErrorHappened()) {
+						error = true;
+					}
+				}
+				console.shutdown();
+			} catch (TraceCompilerException e) {
+				error = true;
+			}
+		}
+
+		if (console.componentName != null) {
+			TraceCompilerLogger.printMessage(console.componentName + " took " //$NON-NLS-1$
+					+ (System.currentTimeMillis() - startTime) + " ms"); //$NON-NLS-1$
+		}
+		if (error) {
+			System.exit(1);
+		} else {
+			System.exit(0);
+		}	
+	}
+
+	/**
+	 * With Eclipse, the plug-ins are loaded by Eclipse framework. Here they
+	 * must be manually created and started
+	 */
+	private ArrayList<TraceCompilerPlugin> plugIns = new ArrayList<TraceCompilerPlugin>();
+
+	/**
+	 * Model listener
+	 */
+	private TraceCompilerModelListener modelListener;
+
+	/**
+	 * Name of the component
+	 */
+	private String componentName;
+
+	/**
+	 * UID of the component
+	 */
+	private long componentUID;
+
+	/**
+	 * Component path
+	 */
+	private String componentPath;
+
+	/**
+	 * MMP file path
+	 */
+	private File mmpPath;
+
+	/**
+	 * Constructor
+	 */
+	TraceCompiler() {
+
+		// Creates listeners and preferences
+		modelListener = new TraceCompilerModelListener();
+	}
+
+	/**
+	 * Creates the plug-ins to be registered with TraceCompiler
+	 * @throws TraceCompilerRootException if fail to create a valid plugins
+	 */
+	private void createPlugins() throws TraceCompilerRootException {
+		
+		// Get location of the TraceCompiler
+		URL path = getClass().getProtectionDomain().getCodeSource()
+				.getLocation();
+		String decodePluginsPath = path.getPath();
+
+		// If first character is forward slash and it is located before drive
+		// letter remove it
+		if (decodePluginsPath.charAt(INDEX_OF_FIRST_CHARACTER) == SourceConstants.FORWARD_SLASH_CHAR
+				&& decodePluginsPath.charAt(INDEX_OF_THIRD_CHARACTER) == SourceConstants.COLON_CHAR) {
+			decodePluginsPath = decodePluginsPath.substring(1);
+		}
+		
+		// Concatenate decode plugins path
+		decodePluginsPath = decodePluginsPath.concat(DECODE_PLUGINS_PATH);
+		
+		// Replace slashes with correct separator character
+		decodePluginsPath = decodePluginsPath.replace(
+				SourceConstants.FORWARD_SLASH_CHAR, File.separatorChar);
+		decodePluginsPath = decodePluginsPath.replace(
+				SourceConstants.BACKSLASH_CHAR, File.separatorChar);
+		File decodePluginsDir = new File(decodePluginsPath);
+		String[] decodePlugins = decodePluginsDir.list();
+		if (decodePlugins != null) {
+			for (int i = 0; i < decodePlugins.length; i++) {
+
+				// Get decode plugin name
+				String decodePluginName = decodePlugins[i];
+
+				// Get decode plugin path
+				String decodePluginPath = decodePluginsPath
+						+ File.separatorChar + decodePluginName;
+
+				// Decode plugin must be in own directory
+				Boolean isDirectory = (new File(decodePluginPath))
+						.isDirectory();
+				if (isDirectory) {
+
+					// Construct decode plugin engine class name
+					String engineClassName = ENGINE_CLASS_NAME_TEMPLATE
+							.replaceFirst(DECODE_PLUGIN_NAME_TAG,
+									decodePluginName.substring(0, 1)
+											.toUpperCase()
+											+ decodePluginName.substring(1));
+
+					// Construct decode plugin engine file name
+					String engineFileName = ENGINE_FILE_NAME_TEMPLATE
+							.replaceFirst(DECODE_PLUGIN_CLASS_NAME_TAG,
+									engineClassName);
+					String engineFileFullName = decodePluginPath
+							+ File.separatorChar + engineFileName;
+
+					// Check does engine file exist
+					Boolean exists = (new File(engineFileFullName)).exists();
+					if (exists) {
+						String engineClassFullName = CLASS_TEMPLATE
+								.replaceFirst(DECODE_PLUGIN_NAME_TAG,
+										decodePluginName).replaceFirst(
+										DECODE_PLUGIN_CLASS_NAME_TAG,
+										engineClassName);
+						try {
+							Class<?> engineClass = Class
+									.forName(engineClassFullName);
+							TraceCompilerPlugin engine = (TraceCompilerPlugin) engineClass
+									.newInstance();
+							plugIns.add(engine);
+							TraceCompilerLogger.printInfo("Decode plugin " + engineClassFullName + " added"); //$NON-NLS-1$ //$NON-NLS-2$
+						} catch (Exception e) {
+							String msg = "Decode plugin " + engineClassFullName + " adding failed"; //$NON-NLS-1$ //$NON-NLS-2$
+							throw new TraceCompilerRootException(msg, e); 
+						}
+					} else {
+						String msg = "Decode plugin file " + engineFileFullName + " does not exist"; //$NON-NLS-1$ //$NON-NLS-2$
+						throw new TraceCompilerRootException(msg, null);
+					}
+				}
+			}
+		}
+	}
+
+	/**
+	 * Parses the command line
+	 * 
+	 * @param args
+	 *            the arguments
+	 * @throws TraceCompilerRootException if arguments are invalid
+	 * @throws IOException 
+	 */
+	private void parseCommandLine(ArrayList<String> list) throws TraceCompilerIllegalArgumentsException, IOException {
+		TraceCompilerLogger.printInfo("Building traces..."); //$NON-NLS-1$
+		if (list.size() == 0) {
+			printUsage();
+			System.exit(0);
+		}
+		List<String> switches = new ArrayList<String>();
+
+		// version, verbose, keepgoing if available could be anywhere, so process them and remove them from the list
+		for (String element : list) {
+			if (element.equalsIgnoreCase(HELP_OPTION) || element.equalsIgnoreCase(HELP_OPTION_SF)) {
+				printUsage();
+				System.exit(0);
+			}
+			if (element.equalsIgnoreCase(VERBOSE_OPTION) || element.equalsIgnoreCase(VERBOSE_OPTION_SF)) {
+				TraceCompilerGlobals.setVerbose(true);
+				switches.add(element);
+			}
+			if (element.equalsIgnoreCase(LEGACY_VERSION_OPTION) || element.equalsIgnoreCase(VERSION_OPTION) || element.equalsIgnoreCase(VERSION_OPTION_SF)) {
+				TraceCompilerLogger.printMessage(VERSION_TEXT + TraceCompilerVersion.getVersion());
+				System.exit(0);
+			}
+			if (element.equalsIgnoreCase(STOP_ON_ERROR_OPTION) || element.equalsIgnoreCase(STOP_ON_ERROR_OPTION_SF)) {
+				TraceCompilerGlobals.setKeepGoing(false);
+				switches.add(element);
+			}
+		}
+		
+		//remove switches from the list
+		for (String string : switches) {
+			list.remove(string);
+		}
+		
+		switches = null;
+		
+		if (list.size() < MANDATORY_ARGUMENT_COUNT) {
+			throw new TraceCompilerIllegalArgumentsException(Messages.getString("TraceCompiler.invalidTraceCompilerArgumetsExceptionText"), null); //$NON-NLS-1$
+		}
+		
+		
+		//the rest of elements must be in the order COMPONENT_UID, COMPONENT_NAME, COMPONENT_MMP_PATH, source...
+		//COMPONENT_UID must be on the command line, the rest can either be on the command line or stdin
+
+		try {
+			componentUID = Long.parseLong(list.get(COMPONENT_UID_ARG),
+					TraceCompilerConstants.HEX_RADIX);
+			TraceCompilerLogger.printInfo("Component UID: 0x" + Long.toHexString(componentUID)); //$NON-NLS-1$
+
+		} catch (NumberFormatException e) {
+			String msg = Messages.getString("TraceCompiler.componentUidIsNotValidExceptionText") + componentUID; //$NON-NLS-1$
+			throw new TraceCompilerIllegalArgumentsException(msg, null);
+		}
+		if (componentUID > 0) {
+
+			// Arguments are given as a parameter
+			if (list.size() > MANDATORY_ARGUMENT_COUNT + 1) {
+				parseParameters(list);
+
+				// Otherwise, read arguments from STDIN
+			} else {
+				readFromStdin();
+			}
+		} else {
+			String msg = Messages.getString("TraceCompiler.componentUidIsNotValidExceptionText") + componentUID; //$NON-NLS-1$
+			throw new TraceCompilerIllegalArgumentsException(msg, null);
+		}
+	}
+
+
+	private static void printUsage() {
+		TraceCompilerLogger.printMessage(VERSION_TEXT + TraceCompilerVersion.getVersion());
+		TraceCompilerLogger.printMessage(USAGE);
+	}
+
+	/**
+	 * Parses parameters
+	 * 
+	 * @param args
+	 *            the parameters
+	 * @throws TraceCompilerRootException if arguments are not valid
+	 */
+	private void parseParameters(List<String> args) throws TraceCompilerIllegalArgumentsException {
+		//index is safe, already checked by the caller
+		componentName = args.get(COMPONENT_NAME_ARG);
+		traceFolderName = 	TraceCompilerConstants.TRACES_DIRECTORY + UNDERSCORE
+							+ componentName;
+		
+		mmpPath = new File(args.get(COMPONENT_MMP_PATH_ARG));
+
+		if (isMmpValid()) {
+
+			// Move the files from args array to source file list
+				ArrayList<String> sources = new ArrayList<String>();
+				for (int i = 0; i < args.size() - SOURCE_FILE_START_OFFSET; i++) {
+					sources.add(args.get(SOURCE_FILE_START_OFFSET + i));
+				}
+
+				registerFiles(sources);
+		} else {
+			throw new TraceCompilerIllegalArgumentsException(Messages.getString("TraceCompiler.invalidMmpExceptionText") + mmpPath, null); //$NON-NLS-1$
+		}
+		
+	}
+
+	/**
+	 * Read information from STDIN
+	 * @throws IOException if fails to read the input
+	 * @throws TraceCompilerRootException if the list of files is empty
+	 */
+	private void readFromStdin() throws IOException, TraceCompilerIllegalArgumentsException {
+		ArrayList<String> files = new ArrayList<String>();
+
+		// Create reader
+		BufferedReader stdin = new BufferedReader(
+				new InputStreamReader(System.in));
+		
+			int numberOfReceivedLines = 1;
+
+			String line = stdin.readLine();
+						
+			while (line != null) {
+
+				// End of source files received
+				if (line.equals(ENDOFSOURCEFILES)) {
+					break;
+				}
+
+				// Component name
+				if (numberOfReceivedLines == COMPONENT_NAME_ARG) {
+					componentName = line;
+					traceFolderName = TraceCompilerConstants.TRACES_DIRECTORY
+							+ UNDERSCORE + componentName;
+
+					// MMP path
+				} else if (numberOfReceivedLines == COMPONENT_MMP_PATH_ARG) {
+					mmpPath = new File(line);
+					if (!isMmpValid()) {
+						stdin.close();
+						throw new TraceCompilerIllegalArgumentsException(Messages.getString("TraceCompiler.invalidMmpExceptionText") + mmpPath, null); //$NON-NLS-1$
+					}
+
+					// Source files
+				} else {
+					// Add to the files list
+					File file = new File(line);
+					files.add(file.getAbsolutePath());
+				}
+
+				numberOfReceivedLines++;
+
+				// Read new line from STDIN
+				line = stdin.readLine();				
+			}
+		stdin.close();
+		registerFiles(files);
+	}
+
+	/**
+	 * Registers files to document monitor.
+	 * 
+	 * @param sources
+	 *            sources
+	 * @throws TraceCompilerRootException 
+	 */
+	private void registerFiles(ArrayList<String> sources) throws TraceCompilerIllegalArgumentsException {
+
+		if (sources.size() == 0) {
+			throw new TraceCompilerIllegalArgumentsException(Messages.getString("TraceCompiler.noSourceFilesExceptionText"), null); //$NON-NLS-1$
+		}
+		File parent = mmpPath.getParentFile();
+		boolean found = false;
+
+		componentPath = parent.getAbsolutePath();
+
+		ProjectEngine.traceFolderName = TraceCompilerConstants.TRACES_DIRECTORY;
+
+		// Find location of "traces" or "traces_<component name>" -folder. If
+		// "traces" or "traces_<component name>" -folder does not
+		// exist, "traces" -folder will be add to same level than "group" or
+		// "mmpfiles" -folder. If "group" or "mmpfiles" -folder does not exist
+		// then "traces" -folder will be added to same level than source file.
+		while (!found && parent != null) {
+			File[] children = parent.listFiles();
+			if (children != null) {
+				for (int i = 0; i < children.length; i++) {
+					File child = children[i];
+					String childName = child.getName();
+					if (child.isDirectory() && isProjectRoot(childName)) {
+						componentPath = parent.getAbsolutePath();
+						found = true;
+
+						// Check that does subdirectory that name is
+						// "traces_<component name>" exist in this directory. If
+						// it exist use that as traces directory name.
+						for (i = 0; i < children.length; i++) {
+							child = children[i];
+							childName = child.getName();
+							if (child.isDirectory()
+									&& childName
+											.equalsIgnoreCase(traceFolderName)) {
+								ProjectEngine.traceFolderName = traceFolderName;
+								break;
+							}
+						}
+						break;
+					}
+				}
+			}
+
+			if (found == false) {
+				parent = parent.getParentFile();
+			}
+		}
+
+		registerSourceFiles(sources);
+	}
+
+	/**
+	 * Checks if this folder is the project root
+	 * 
+	 * @param name
+	 *            name of the folder
+	 * @return true if this folder is the project root
+	 */
+	private boolean isProjectRoot(String name) {
+		boolean retval = false;
+		if (name.equalsIgnoreCase(traceFolderName)
+				|| name.equalsIgnoreCase(SymbianConstants.GROUP_DIRECTORY)
+				|| name.equalsIgnoreCase(SymbianConstants.MMPFILES_DIRECTORY)
+				|| name
+						.equalsIgnoreCase(TraceCompilerConstants.TRACES_DIRECTORY)) {
+			retval = true;
+		}
+		return retval;
+	}
+
+	/**
+	 * Registers source files
+	 * 
+	 * @param files
+	 */
+	private void registerSourceFiles(ArrayList<String> files) {
+		if (files.size() > 0) {
+			String[] fileArr = new String[files.size()];
+			files.toArray(fileArr);
+
+			// Sets the source files to the TraceCompiler document
+			// factory. It will create a document from each source in the array
+			FileDocumentMonitor.setFiles(fileArr);
+			DocumentFactory.registerDocumentFramework(
+					new FileDocumentMonitor(), StringDocumentFactory.class);
+		}
+	}
+
+	/**
+	 * Initializes TraceCompiler
+	 * @throws TraceCompilerRootException if fail to initialize the plugins
+	 * @throws TraceCompilerException 
+	 */
+	private void start() throws TraceCompilerRootException, TraceCompilerException {
+
+		// Starts TraceCompiler. This is normally called from the Eclipse
+		// plug-in
+		// activator, but in console case that does not exist
+		TraceCompilerEngineGlobals.start();
+				
+		
+		//Reads the GroupId values from opensystemtrace_types.h
+		//If this fails a message is logged and trace compiler stops
+		GroupNames.initialiseGroupName();
+
+		
+		// Registers a view to TraceCompiler
+		TraceCompilerEngineGlobals
+				.setView(new TraceCompilerView(componentPath));
+
+		// Registers all plug-in components
+		for (TraceCompilerPlugin plugin : plugIns) {
+			TraceCompilerEngineGlobals.registerPlugin(plugin);
+		}
+		// Adds a model event listener
+		TraceCompilerEngineGlobals.getTraceModel().addModelListener(
+				modelListener);
+		TraceCompilerEngineGlobals.getTraceModel().addExtensionListener(
+				modelListener);
+		TraceCompilerEngineGlobals.getTraceModel().getExtension(
+				TraceLocationList.class).addLocationListListener(modelListener);
+		TraceCompilerEngineGlobals.getTraceModel().addProcessingListener(modelListener);
+	}
+
+	/**
+	 * Parses the sources and generates trace files
+	 * @throws Exception 
+	 */
+	private void buildTraceFiles() throws Exception {
+		TraceCompilerEngineInterface tbi = TraceCompilerEngineGlobals
+				.getTraceCompiler();
+		try {
+			// Opens a trace project
+			componentName = TraceUtils.convertName(componentName);
+
+			// Set project path before opening project
+			TraceCompilerEngineGlobals.setProjectPath(componentPath);
+			tbi.openProject(componentName);
+			TraceModel model = TraceCompilerEngineGlobals.getTraceModel();
+			if (model.isValid()) {
+				model.setID((int) componentUID);
+
+				// Location errors are printed after a file changes, but the
+				// last file is not detected by the listener
+				if (modelListener.getErrors().size() > 0) {
+					modelListener.printLocationErrors();
+					tbi.closeProject();
+					throw new TraceCompilerRootException(null, null);
+				}
+				tbi.exportProject();
+				tbi.closeProject();
+			} else {
+				String msg = "Project creation was cancelled"; //$NON-NLS-1$
+				throw new TraceCompilerRootException(msg, null);
+			}
+		} catch (TraceCompilerException e) {
+			TraceCompilerEngineGlobals.getEvents().postError(e);
+			throw new TraceCompilerRootException("Build trace files failed.", e); //$NON-NLS-1$
+		}
+	}
+
+	/**
+	 * Shuts down TraceCompiler
+	 * @throws TraceCompilerException 
+	 */
+	private void shutdown() throws TraceCompilerException {
+		for (TraceCompilerPlugin plugin : plugIns) {
+			TraceCompilerEngineGlobals.unregisterPlugin(plugin);
+		}
+		TraceCompilerEngineGlobals.shutdown();
+	}
+
+	/**
+	 * Checks if the MMP file is valid
+	 * 
+	 * @return true if MMP file is valid
+	 */
+	private boolean isMmpValid() {
+		boolean valid = false;
+		String pathStr = mmpPath.getAbsolutePath();
+
+		if (mmpPath.exists() && pathStr.length() > MMP.length()) {
+			String end = pathStr.substring(pathStr.length() - MMP.length());
+			if (end.equalsIgnoreCase(MMP)) {
+				valid = true;
+			} else {
+				TraceCompilerLogger.printError("Invalid MMP file: " + mmpPath.getAbsolutePath()); //$NON-NLS-1$
+			}
+		} else {
+			TraceCompilerLogger.printError("Missing or can not access MMP path: " + mmpPath.getAbsolutePath()); //$NON-NLS-1$
+		}
+		return valid;
+		
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/TraceCompilerConfiguration.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,153 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Configuration for the console UI
+*
+*/
+package com.nokia.tracecompiler;
+
+import com.nokia.tracecompiler.engine.TraceCompilerEngineConfiguration;
+import com.nokia.tracecompiler.engine.TraceCompilerEngineConfigurationListener;
+
+/**
+ * Configuration for the TraceCompiler UI
+ * 
+ */
+final class TraceCompilerConfiguration implements TraceCompilerEngineConfiguration {
+
+	/**
+	 * Export path
+	 */
+	private String exportPath;
+
+	/**
+	 * Constructor
+	 * 
+	 * @param exportPath
+	 *            the export path for decode files
+	 */
+	TraceCompilerConfiguration(String exportPath) {
+		this.exportPath = exportPath;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engine.TraceCompilerConfiguration#
+	 *      addConfigurationListener(com.nokia.tracecompiler.engine.TraceCompilerConfigurationListener)
+	 */
+	public void addConfigurationListener(
+			TraceCompilerEngineConfigurationListener configurationListener) {
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engine.TraceCompilerConfiguration#
+	 *      getFlag(java.lang.String)
+	 */
+	public boolean getFlag(String flagName) {
+		boolean retval;
+		if (flagName.equals(TraceCompilerEngineConfiguration.CONSOLE_UI_MODE)) {
+			retval = true;
+		} else {
+			retval = false;
+		}
+		return retval;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engine.TraceCompilerConfiguration#
+	 *      getText(java.lang.String)
+	 */
+	public String getText(String textName) {
+		String retval;
+		if (textName.equals(TraceCompilerEngineConfiguration.ENVIRONMENT_ROOT)) {
+			retval = exportPath;
+		} else {
+			retval = ""; //$NON-NLS-1$
+		}
+		return retval;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engine.TraceCompilerConfiguration#
+	 *      getValue(java.lang.String)
+	 */
+	public int getValue(String valueName) {
+		return 0;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engine.TraceCompilerConfiguration#
+	 *      hasEntry(java.lang.String)
+	 */
+	public boolean hasEntry(String entryName) {
+		return false;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engine.TraceCompilerConfiguration#isAvailable()
+	 */
+	public boolean isAvailable() {
+		return true;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engine.TraceCompilerConfiguration#
+	 *      removeConfigurationListener(com.nokia.tracecompiler.engine.TraceCompilerConfigurationListener)
+	 */
+	public void removeConfigurationListener(
+			TraceCompilerEngineConfigurationListener configurationListener) {
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engine.TraceCompilerConfiguration#setFlag(java.lang.String,
+	 *      boolean)
+	 */
+	public void setFlag(String flagName, boolean flag) {
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engine.TraceCompilerConfiguration#setText(java.lang.String,
+	 *      java.lang.String)
+	 */
+	public void setText(String textName, String text) {
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engine.TraceCompilerConfiguration#setValue(java.lang.String,
+	 *      int)
+	 */
+	public void setValue(String valueName, int value) {
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/TraceCompilerConstants.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,43 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Constants for console UI
+*
+*/
+package com.nokia.tracecompiler;
+
+
+/**
+ * Constants for TraceCompiler UI
+ *
+ */
+public interface TraceCompilerConstants {
+
+	/**
+	 * Default UID if component does not have one
+	 */
+	int DEFAULT_UID = 0x0;
+
+	/**
+	 * Traces directory
+	 */
+	String TRACES_DIRECTORY = "traces"; //$NON-NLS-1$
+
+	/**
+	 * Radix for hex numbers
+	 */
+	int HEX_RADIX = 16; // CodForChk_Dis_Magic
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/TraceCompilerGlobals.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,73 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "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:
+ *
+ * Description:
+ *
+ * TraceCompilerGlobals global constants
+ *
+ */
+package com.nokia.tracecompiler;
+
+/**
+ * TraceCompiler Global constants
+ *
+ */
+public class TraceCompilerGlobals {
+
+	/**
+	 * Verbose output. Verbose is usually checked to print Infos
+	 */
+	private static boolean VERBOSE = false;
+	
+	/**
+	 * KepGoing is used to decide whether we continue processing on errors
+	 */
+	private static boolean KEEPGOING =  true;
+	
+	//disallow instances
+	private TraceCompilerGlobals() {
+		// singleton
+	}
+
+	/**
+	 * set verbose mode
+	 * @param verbose
+	 */
+	public static void setVerbose(boolean verbose) {
+		VERBOSE = verbose;
+	}
+	
+	/**
+	 * is vebose mode on/off
+	 * @return boolean
+	 */
+	public static boolean isVebose() {
+		return VERBOSE;
+	}
+	
+	/**
+	 * set keep going mode
+	 * @param keepgoing
+	 */
+	public static void setKeepGoing(boolean keepgoing) {
+		KEEPGOING = keepgoing;
+	}
+	
+	/**
+	 * is keepgoing mode on/off
+	 * @return boolean
+	 */
+	public static boolean keepGoing() {
+		return KEEPGOING;
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/TraceCompilerIllegalArgumentsException.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "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:
+ *
+ * Description:
+ *
+ * TraceCompilerIllegalArgumentsException thrown when tracecompiler can not process its arguments
+ *
+ */
+package com.nokia.tracecompiler;
+
+/**
+ * TraceCompilerIllegalArgumentsException thrown when tracecompiler can not process its arguments
+ *
+ */
+public class TraceCompilerIllegalArgumentsException extends TraceCompilerRootException {
+
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 1387782275931306398L;
+
+	public TraceCompilerIllegalArgumentsException(String message, Throwable cause) {
+		super(message, cause);
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/TraceCompilerLogger.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,70 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "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:
+ *
+ * Description:
+ *
+ * Simple Logger
+ *
+ */
+package com.nokia.tracecompiler;
+
+
+
+/**
+ * Simple logger for errors warnings and infos
+ *
+ */
+public class TraceCompilerLogger {
+
+	/**
+	 * Prints errors message to STDERR.
+	 * 
+	 * @param msg
+	 *            the message
+	 */
+	static public void printError(String msg) {
+		if (msg != null) {
+			System.err.println(Messages.getString("TraceCompilerLogger.errorPrefix") + msg); //$NON-NLS-1$
+			System.err.flush();
+		}
+	}
+	
+	/**
+	 * Prints warning message to STDERR.
+	 * @param msg
+	 */
+	static public void printWarning(String msg) {
+			System.err.println(Messages.getString("TraceCompilerLogger.warningPrefix") + msg); //$NON-NLS-1$
+			System.err.flush();
+	}
+
+	/**
+	 * Prints warning message to STDOUT if verbose is on.
+	 * @param msg
+	 */
+	static public void printInfo(String msg) {
+		if (TraceCompilerGlobals.isVebose()) {
+			System.out.println(Messages.getString("TraceCompilerLogger.infoPrefix") + msg); //$NON-NLS-1$
+			System.out.flush();
+		}
+	}
+	
+	/**
+	 * Prints warning message to STDOUT.
+	 * @param msg
+	 */
+	static public void printMessage(String msg) {
+			System.out.println(msg);
+			System.out.flush();
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/TraceCompilerMain.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,766 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "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:
+ *
+ * Description:
+ *
+ * TraceCompiler command-line main class
+ *
+ */
+package com.nokia.tracecompiler;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Iterator;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import com.nokia.tracecompiler.document.FileDocumentMonitor;
+import com.nokia.tracecompiler.document.StringDocumentFactory;
+import com.nokia.tracecompiler.engine.TraceCompilerEngineEvents;
+import com.nokia.tracecompiler.engine.TraceCompilerEngineGlobals;
+import com.nokia.tracecompiler.engine.TraceCompilerEngineInterface;
+import com.nokia.tracecompiler.engine.TraceLocationList;
+import com.nokia.tracecompiler.engine.project.ProjectEngine;
+import com.nokia.tracecompiler.file.FileUtils;
+import com.nokia.tracecompiler.model.TraceCompilerException;
+import com.nokia.tracecompiler.model.TraceModel;
+import com.nokia.tracecompiler.plugin.TraceCompilerPlugin;
+import com.nokia.tracecompiler.project.GroupNames;
+import com.nokia.tracecompiler.source.SourceConstants;
+import com.nokia.tracecompiler.utils.DocumentFactory;
+import com.nokia.tracecompiler.utils.TraceCompilerVersion;
+
+/**
+ * TraceCompiler command-line main class
+ * 
+ */
+public class TraceCompilerMain {
+	
+	/** line separator */
+	private static String LINE_SEPARATOR =  System.getProperty("line.separator"); //$NON-NLS-1$
+	
+	/**
+	 * Index of third character
+	 */
+	private static final int INDEX_OF_THIRD_CHARACTER = 2;
+
+	/**
+	 * Index of first character
+	 */
+	private static final int INDEX_OF_FIRST_CHARACTER = 0;
+	
+	/**
+	 * TraceCompiler options
+	 */
+	
+	/**
+	 * UID : it is used to create the dictionary file
+	 */
+	private static final String UID_SWITCH = Messages.getString("TraceCompiler.UidStwich"); //$NON-NLS-1$
+	private static final String UID_SWITCH_TEXT = Messages.getString("TraceCompiler.UidText"); //$NON-NLS-1$
+	/**
+	 * project name : it is used to create the dictionary file
+	 */
+	private static final String PRJ_NAME_SWITCH = Messages.getString("TraceCompiler.ProjectSwitch");//$NON-NLS-1$
+	private static final String PRJ_NAME_SWITCH_TEXT = Messages.getString("TraceCompiler.ProjectText"); //$NON-NLS-1$
+	/**
+	 * mmp file path:  may be used to compute the traces folder
+	 */
+	private static final String MMP_PATH_SWITCH = Messages.getString("TraceCompiler.MmpSwitch");//$NON-NLS-1$
+	private static final String MMP_PATH_SWITCH_TEXT = Messages.getString("TraceCompiler.MmpText"); //$NON-NLS-1$
+	/**
+	 * traces folder: absolute or relative to the mmp folder
+	 */
+	private static final String TRACES_PATH_SWITCH = Messages.getString("TraceCompiler.TracesSwitch");//$NON-NLS-1$
+	private static final String TRACES_PATH_SWITCH_TEXT = Messages.getString("TraceCompiler.TracesText"); //$NON-NLS-1$
+	
+
+	/**
+	 * Version option
+	 */
+	private static final String VERSION_OPTION = Messages.getString("TraceCompiler.VersionSwitchLong"); //$NON-NLS-1$
+	private static final String VERSION_OPTION_SF = Messages.getString("TraceCompiler.VersionSwitchShort"); //$NON-NLS-1$
+	private static final String VERSION_OPTION_INSTRUCTION_TEXT = Messages.getString("TraceCompiler.VersionText"); //$NON-NLS-1$
+
+	
+	/**
+	 * help option
+	 */
+	private static final String HELP_OPTION = Messages.getString("TraceCompiler.HelpSwicthLong"); //$NON-NLS-1$
+	private static final String HELP_OPTION_SF = Messages.getString("TraceCompiler.HelpSwitchShort"); //$NON-NLS-1$
+	private static final String HELP_OPTION_INSTRUCTION_TEXT = Messages.getString("TraceCompiler.HelpText"); //$NON-NLS-1$
+	
+	/**
+	 * Verbose option
+	 */
+	private static final String VERBOSE_OPTION = Messages.getString("TraceCompiler.VerboseSwitchLong"); //$NON-NLS-1$
+	private static final String VERBOSE_OPTION_SF = Messages.getString("TraceCompiler.VerboseSwitchShort"); //$NON-NLS-1$
+	private static final String VERBOSE_OPTION_INSTRUCTION_TEXT = Messages.getString("TraceCompiler.VerboseText"); //$NON-NLS-1$
+
+	/**
+	 * keep going option
+	 */
+	private static final String STOP_ON_ERROR_OPTION = Messages.getString("TraceCompiler.StopSwitchLong"); //$NON-NLS-1$
+	private static final String STOP_ON_ERROR_OPTION_SF = Messages.getString("TraceCompiler.StopSwitchShort"); //$NON-NLS-1$
+	private static final String STOP_ON_ERROR_OPTION_INSTRUCTION_TEXT = Messages.getString("TraceCompiler.StopText"); //$NON-NLS-1$
+
+	
+
+	/**
+	 * Version text
+	 */
+	private static final String VERSION_TEXT = Messages.getString("TraceCompiler.DisplayVersionText"); //$NON-NLS-1$
+
+	/**
+	 * Option instruction text
+	 */
+	private static final String OPTION_INSTRUCTION_TEXT = Messages.getString("TraceCompiler.Options"); //$NON-NLS-1$
+	private static final String VALUE=Messages.getString("TraceCompiler.Value"); //$NON-NLS-1$
+	
+
+	
+	private static final String USAGE = Messages.getString("TraceCompiler.Usage") + LINE_SEPARATOR + //$NON-NLS-1$
+	Messages.getString("TraceCompiler.UsageText") + LINE_SEPARATOR + //$NON-NLS-1$
+										"\t" + OPTION_INSTRUCTION_TEXT + LINE_SEPARATOR + //$NON-NLS-1$
+										"\t" + HELP_OPTION_SF  + ", " + HELP_OPTION + ", " + HELP_OPTION_INSTRUCTION_TEXT + LINE_SEPARATOR +   //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
+										"\t" + VERSION_OPTION_SF + ", " + VERSION_OPTION + "\t" +  VERSION_OPTION_INSTRUCTION_TEXT + LINE_SEPARATOR +   //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
+										"\t" + VERBOSE_OPTION_SF + ", " + VERBOSE_OPTION + "\t\t" + VERBOSE_OPTION_INSTRUCTION_TEXT + LINE_SEPARATOR +  //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
+										"\t" + STOP_ON_ERROR_OPTION_SF + ", " + STOP_ON_ERROR_OPTION + "\t" + STOP_ON_ERROR_OPTION_INSTRUCTION_TEXT + LINE_SEPARATOR +  //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
+										"\t" + UID_SWITCH + "=" + VALUE + "\t" + UID_SWITCH_TEXT +  LINE_SEPARATOR + //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
+										"\t" + PRJ_NAME_SWITCH + "=" + VALUE + "\t" + PRJ_NAME_SWITCH_TEXT +  LINE_SEPARATOR + //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
+										"\t" + MMP_PATH_SWITCH + "=" + VALUE + "\t" + MMP_PATH_SWITCH_TEXT +  LINE_SEPARATOR + //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
+										"\t" + TRACES_PATH_SWITCH + "=" + VALUE + "\t" + TRACES_PATH_SWITCH_TEXT; //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
+
+
+
+	/**
+	 * End of source files tag
+	 */
+	private static final String ENDOFSOURCEFILES = Messages.getString("TraceCompiler.EndOfList"); //$NON-NLS-1$
+
+	/**
+	 * MMP file extension
+	 */
+	private static final String MMP_FILE_TYPE = Messages.getString("TraceCompiler.MmpExtension"); //$NON-NLS-1$
+
+	/**
+	 * Decode plugins path
+	 */
+	private String DECODE_PLUGINS_PATH = Messages.getString("TraceCompiler.PluginPath"); //$NON-NLS-1$
+
+	/**
+	 * Decode plugin name tag
+	 */
+	private String DECODE_PLUGIN_NAME_TAG = Messages.getString("TraceCompiler.DecodeText1"); //$NON-NLS-1$
+
+	/**
+	 * Decode plugin class name tag
+	 */
+	private String DECODE_PLUGIN_CLASS_NAME_TAG = Messages.getString("TraceCompiler.DecodeText2"); //$NON-NLS-1$
+
+	/**
+	 * Decode plugin engine class name template
+	 */
+	private String ENGINE_CLASS_NAME_TEMPLATE = DECODE_PLUGIN_NAME_TAG
+			+ "Engine"; //$NON-NLS-1$
+
+	/**
+	 * Decode plugin engine file name template
+	 */
+	private String ENGINE_FILE_NAME_TEMPLATE = DECODE_PLUGIN_CLASS_NAME_TAG
+			+ ".class"; //$NON-NLS-1$
+
+	/**
+	 * Decode plugins class template
+	 */
+	private String CLASS_TEMPLATE = Messages.getString("TraceCompiler.DecodePluginsNameSpace") + DECODE_PLUGIN_NAME_TAG + "." + DECODE_PLUGIN_CLASS_NAME_TAG; //$NON-NLS-1$ //$NON-NLS-2$	
+	
+	//switch with value such as --uid=value
+	private Pattern valueSwitchPattern = Pattern.compile("(--\\S+)=(\\S+)"); //$NON-NLS-1$
+	//switches with no values such -v, --version
+	private Pattern singleSwitchPattern = Pattern.compile("-{1,2}([^=]+)"); //$NON-NLS-1$
+	
+	/**
+	 * list of source files
+	 */
+	private ArrayList<String> sources = new ArrayList<String>();
+	/**
+	 * traces path
+	 */
+	private String traces_path = null;
+	
+	
+	
+	
+	/**
+	 * Main function
+	 * 
+	 * @param args
+	 *            the command line arguments
+	 */
+	public static void main(String[] args) {
+		if (args.length == 0) {
+			printUsage();
+			return;
+		}
+		
+		ArrayList<String> list = null;
+		
+		//support spaces in switches, build a long string, clean it and convert it back to array - a bit expensive
+		String tmpString = "";  //$NON-NLS-1$
+		for (int i = 0; i < args.length; i++) {
+			tmpString = tmpString + " " + args[i];  //$NON-NLS-1$
+		}
+		tmpString = tmpString.replaceAll("\\s*=\\s*", "="); //$NON-NLS-1$ //$NON-NLS-2$
+		tmpString = tmpString.replaceAll("\\s+", " "); //$NON-NLS-1$ //$NON-NLS-2$
+		String[] split = tmpString.trim().split(" "); //$NON-NLS-1$
+		tmpString = null; // not needed anymore
+		
+		//rebuild array of arguments
+		if (split.length > 0) {
+			list = new ArrayList<String>(Arrays.asList(split));
+		}
+				
+		long startTime = System.currentTimeMillis();
+		//create a new session of TraceCompiler
+		TraceCompilerMain console = new TraceCompilerMain();
+		
+		try {
+			console.parseCommandLine(list);
+		} catch (Exception e) { //should cover IOException and TraceCompilerIllegalArgumentsException
+			//There is no point to continue if there are problems with the arguments.
+			TraceCompilerLogger.printError(e.getMessage());
+			printUsage();
+			System.exit(1);
+		}
+		
+		boolean error = false;
+		try {
+			if(list.size() != 0) {
+				console.createPlugins();
+				console.start();
+				console.buildTraceFiles();				
+			}
+		} catch (Exception e) {
+			if (e instanceof TraceCompilerRootException) {
+				TraceCompilerLogger.printError(e.getMessage()); 
+			} //else the error should have been reported earlier
+			error = true;
+		} finally {
+			try {
+				if (!error) { //check if errors have been logged by EventEngine
+					TraceCompilerEngineEvents events = TraceCompilerEngineGlobals.getEvents();
+					if (events != null && events.hasErrorHappened()) {
+						error = true;
+					}
+				}
+				console.shutdown();
+			} catch (TraceCompilerException e) {
+				error = true;
+			}
+		}
+
+		if (console.projectName != null) {
+			TraceCompilerLogger.printMessage(console.projectName + Messages.getString("TraceCompiler.Took") //$NON-NLS-1$
+					+ (System.currentTimeMillis() - startTime) + Messages.getString("TraceCompiler.MS")); //$NON-NLS-1$
+		}
+		if (error) {
+			System.exit(1);
+		} else {
+			System.exit(0);
+		}	
+	}
+
+	/**
+	 * With Eclipse, the plug-ins are loaded by Eclipse framework. Here they
+	 * must be manually created and started
+	 */
+	private ArrayList<TraceCompilerPlugin> plugIns = new ArrayList<TraceCompilerPlugin>();
+
+	/**
+	 * Model listener
+	 */
+	private TraceCompilerModelListener modelListener;
+
+	/**
+	 * Name of the component
+	 */
+	private String projectName = null;
+	
+
+	/**
+	 * UID of the component
+	 */
+	private long componentUID = 0L;
+
+	/**
+	 * Component path
+	 */
+	private String componentPath = null;
+
+	/**
+	 * MMP file path
+	 */
+	private File mmpPath = null;
+
+	/**
+	 * Constructor
+	 */
+	TraceCompilerMain() {
+
+		// Creates listeners and preferences
+		modelListener = new TraceCompilerModelListener();
+	}
+
+	/**
+	 * Creates the plug-ins to be registered with TraceCompiler
+	 * @throws TraceCompilerRootException if fail to create a valid plugins
+	 */
+	private void createPlugins() throws TraceCompilerRootException {
+		
+		// Get location of the TraceCompiler
+		URL path = getClass().getProtectionDomain().getCodeSource()
+				.getLocation();
+		String decodePluginsPath = path.getPath();
+
+		// If first character is forward slash and it is located before drive
+		// letter remove it
+		if (decodePluginsPath.charAt(INDEX_OF_FIRST_CHARACTER) == SourceConstants.FORWARD_SLASH_CHAR
+				&& decodePluginsPath.charAt(INDEX_OF_THIRD_CHARACTER) == SourceConstants.COLON_CHAR) {
+			decodePluginsPath = decodePluginsPath.substring(1);
+		}
+		
+		// Concatenate decode plugins path
+		decodePluginsPath = decodePluginsPath.concat(DECODE_PLUGINS_PATH);
+		
+		// Replace slashes with correct separator character
+		decodePluginsPath = decodePluginsPath.replace(
+				SourceConstants.FORWARD_SLASH_CHAR, File.separatorChar);
+		decodePluginsPath = decodePluginsPath.replace(
+				SourceConstants.BACKSLASH_CHAR, File.separatorChar);
+		File decodePluginsDir = new File(decodePluginsPath);
+		String[] decodePlugins = decodePluginsDir.list();
+		if (decodePlugins != null) {
+			for (int i = 0; i < decodePlugins.length; i++) {
+
+				// Get decode plugin name
+				String decodePluginName = decodePlugins[i];
+
+				// Get decode plugin path
+				String decodePluginPath = decodePluginsPath
+						+ File.separatorChar + decodePluginName;
+
+				// Decode plugin must be in own directory
+				Boolean isDirectory = (new File(decodePluginPath))
+						.isDirectory();
+				if (isDirectory) {
+
+					// Construct decode plugin engine class name
+					String engineClassName = ENGINE_CLASS_NAME_TEMPLATE
+							.replaceFirst(DECODE_PLUGIN_NAME_TAG,
+									decodePluginName.substring(0, 1)
+											.toUpperCase()
+											+ decodePluginName.substring(1));
+
+					// Construct decode plugin engine file name
+					String engineFileName = ENGINE_FILE_NAME_TEMPLATE
+							.replaceFirst(DECODE_PLUGIN_CLASS_NAME_TAG,
+									engineClassName);
+					String engineFileFullName = decodePluginPath
+							+ File.separatorChar + engineFileName;
+
+					// Check does engine file exist
+					Boolean exists = (new File(engineFileFullName)).exists();
+					if (exists) {
+						String engineClassFullName = CLASS_TEMPLATE
+								.replaceFirst(DECODE_PLUGIN_NAME_TAG,
+										decodePluginName).replaceFirst(
+										DECODE_PLUGIN_CLASS_NAME_TAG,
+										engineClassName);
+						try {
+							Class<?> engineClass = Class
+									.forName(engineClassFullName);
+							TraceCompilerPlugin engine = (TraceCompilerPlugin) engineClass
+									.newInstance();
+							plugIns.add(engine);
+							TraceCompilerLogger.printInfo(Messages.getString(Messages.getString("TraceCompiler.DecodePlugin") + engineClassFullName + Messages.getString("TraceCompiler.Added"))); //$NON-NLS-1$ //$NON-NLS-2$
+						} catch (Exception e) {
+							String msg = Messages.getString("TraceCompiler.DecodePlugin" + engineClassFullName + Messages.getString("TraceCompiler.AddingFailed")); //$NON-NLS-1$ //$NON-NLS-2$
+							throw new TraceCompilerRootException(msg, e); 
+						}
+					} else {
+						String msg = Messages.getString("TraceCompiler.DecodePluginFile") + Messages.getString("TraceCompiler.EngineFullName") + engineFileFullName + Messages.getString("TraceCompiler.DoesNotExist"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+						throw new TraceCompilerRootException(msg, null);
+					}
+				}
+			}
+		}
+	}
+
+	/**
+	 * Parses the command line
+	 * 
+	 * @param args
+	 *            the arguments
+	 * @throws TraceCompilerRootException if arguments are invalid
+	 * @throws IOException 
+	 */
+	private void parseCommandLine(ArrayList<String> list) throws TraceCompilerIllegalArgumentsException, IOException {
+		TraceCompilerLogger.printInfo(Messages.getString("TraceCompiler.BuildingTracesMess")); //$NON-NLS-1$
+		Iterator<String> argIterator = list.iterator();
+		
+		if (list.size() == 0) {
+			printUsage();
+			System.exit(0);
+		}
+		while (argIterator.hasNext()) {
+			String element = argIterator.next().trim();
+			Matcher m = singleSwitchPattern.matcher(element);
+
+			if (m.matches()) { //it's one of the single switches 
+				if (element.equalsIgnoreCase(HELP_OPTION) || element.equalsIgnoreCase(HELP_OPTION_SF)) {
+					printUsage();
+					System.exit(0);
+				}
+				if (element.equalsIgnoreCase(VERBOSE_OPTION) || element.equalsIgnoreCase(VERBOSE_OPTION_SF)) {
+					TraceCompilerGlobals.setVerbose(true);
+					TraceCompilerLogger.printInfo(Messages.getString("TraceCompiler.veboseEnabled")); //$NON-NLS-1$
+					continue;
+				}
+				if ( element.equalsIgnoreCase(VERSION_OPTION) || element.equalsIgnoreCase(VERSION_OPTION_SF)) {
+					TraceCompilerLogger.printMessage(VERSION_TEXT + TraceCompilerVersion.getVersion());
+					System.exit(0);
+				}
+				if (element.equalsIgnoreCase(STOP_ON_ERROR_OPTION) || element.equalsIgnoreCase(STOP_ON_ERROR_OPTION_SF)) {
+					TraceCompilerGlobals.setKeepGoing(false);
+					TraceCompilerLogger.printInfo(Messages.getString("TraceCompiler.StopOnErrorEnabled")); //$NON-NLS-1$
+					continue;
+				}
+				TraceCompilerLogger.printMessage(Messages.getString("TraceCompiler.UnsupportedSwitch")  + element); //$NON-NLS-1$
+			} else {
+				m = valueSwitchPattern.matcher(element.trim());
+				if (m.matches()) { //it's one of the swithes with values
+					if (m.group(1).equalsIgnoreCase(UID_SWITCH)) {
+						// UID
+						try {
+							componentUID = Long.parseLong(m.group(2),TraceCompilerConstants.HEX_RADIX);	
+							TraceCompilerLogger.printInfo("Component UID: 0x" + Long.toHexString(componentUID)); //$NON-NLS-1$
+							if (componentUID <= 0L) {
+								String msg = Messages.getString("TraceCompiler.componentUidIsNotValidExceptionText") + componentUID; //$NON-NLS-1$
+								throw new TraceCompilerIllegalArgumentsException(msg, null);
+							}
+						} catch (NumberFormatException e) {
+							String msg = Messages.getString("TraceCompiler.componentUidIsNotValidExceptionText") + componentUID; //$NON-NLS-1$
+							throw new TraceCompilerIllegalArgumentsException(msg, null);
+						}
+					} else {
+						if (m.group(1).equalsIgnoreCase(PRJ_NAME_SWITCH)) {
+							// project name
+							projectName = m.group(2);
+							TraceCompilerLogger.printInfo(Messages.getString("TraceCompiler.CompNameSet") + projectName); //$NON-NLS-1$
+						} else {
+							if (m.group(1).equalsIgnoreCase(MMP_PATH_SWITCH)) {
+								//mmp path. for the moment only the mmp folder is used.
+								mmpPath = new File(m.group(2));
+								TraceCompilerLogger.printInfo(Messages.getString("TraceCompiler.MMPPathSet") + mmpPath); //$NON-NLS-1$
+							} else {
+								if (m.group(1).equalsIgnoreCase(TRACES_PATH_SWITCH)) {
+									//traces path
+									traces_path = m.group(2);
+								} else {
+									//unsupported switch
+									TraceCompilerLogger.printMessage(Messages.getString("TraceCompiler.UnsupportedSwitch") + element); //$NON-NLS-1$
+								}
+							}
+						}
+					}
+
+				} else {
+					//it must be a file name
+					//it's a good time to stop TC here if the file does not exist
+					if (!(new File(element)).exists()) {
+						throw new TraceCompilerIllegalArgumentsException(Messages.getString("TraceCompiler.sourceFileDoesNotExist") + element, null); //$NON-NLS-1$
+					}
+					sources.add(element);				
+				}	
+			}
+		}
+		
+		// by now, if the user wanted just help or version they would have got it and TC stopped
+		
+		if (componentUID <= 0L) {
+			String msg = Messages.getString("TraceCompiler.componentUidIsNotValidExceptionText") + componentUID; //$NON-NLS-1$
+			throw new TraceCompilerIllegalArgumentsException(msg, null);
+		}
+		
+		if (projectName == null) {
+			throw new TraceCompilerIllegalArgumentsException(Messages.getString("TraceCompiler.projectNameMissing"), null); //$NON-NLS-1$
+		}
+		
+		//if files have not been provided , get them from stdin
+		if (sources.size() == 0) {
+			//get them from the stdin
+			readFromStdin();
+		}
+		
+		if (mmpPath == null ) {
+			throw new TraceCompilerIllegalArgumentsException(Messages.getString("TraceCompiler.mmpPathMissing"), null); //$NON-NLS-1$
+		} else if (!isMmpValid()) {
+			throw new TraceCompilerIllegalArgumentsException(Messages.getString("TraceCompiler.invalidMmpExceptionText") + mmpPath, null); //$NON-NLS-1$
+		}
+		
+		if (traces_path == null ) {
+			throw new TraceCompilerIllegalArgumentsException(Messages.getString("TraceCompiler.tracesPathMissing"), null); //$NON-NLS-1$
+		} else {
+			computeTracesPath(traces_path);
+		}
+		
+		if (sources.size() == 0 ) {
+			throw new TraceCompilerIllegalArgumentsException(Messages.getString("TraceCompiler.fileListMissing"), null); //$NON-NLS-1$
+		}
+		
+		//we have all parameters input and validated, register files.
+		registerSourceFiles(sources);		
+	}
+	
+	
+	/**
+	 * If traces path is relative, work out the full path relative to the location of the mmp file
+	 * @param path
+	 * @throws TraceCompilerIllegalArgumentsException
+	 */
+	private void computeTracesPath(String path) throws TraceCompilerIllegalArgumentsException {
+		String traces_pathString = path;
+		traces_pathString = traces_pathString.replace('/', File.separatorChar);
+		traces_pathString = traces_pathString.replace('\\', File.separatorChar);
+
+		File traces_path = new File(traces_pathString);
+
+		Pattern p = Pattern.compile("(([a-zA-Z]:[\\\\/])|([\\\\/])).*"); //$NON-NLS-1$
+		Matcher m = p.matcher(traces_pathString);
+
+		if (!m.matches() /*  workaround for isAbsolute in java */) {
+			//traces path is relative to mmp location
+			traces_pathString = mmpPath.getAbsoluteFile().getParent() + File.separator + traces_pathString;
+		}
+
+		traces_path = new File(traces_pathString);
+
+		if (traces_path.isDirectory() && !traces_path.canWrite()) {
+			throw new TraceCompilerIllegalArgumentsException(Messages.getString("TraceCompiler.TracesPathWriteProtected") + traces_path, null); //$NON-NLS-1$
+		}
+
+		boolean dirExists = true;
+		if (!traces_path.exists()) {
+			dirExists = FileUtils.createDirectories(traces_path);
+		}
+		if (!dirExists) {
+			throw new TraceCompilerIllegalArgumentsException(Messages.getString("TraceCompiler.mkdirFailed") + traces_path, null); //$NON-NLS-1$
+		}
+
+		//set component path and trace folder
+		componentPath = traces_path.getParent();
+		ProjectEngine.traceFolderName = traces_path.getName();
+		TraceCompilerLogger.printInfo(Messages.getString("TraceCompiler.settingComponentPath") + componentPath); //$NON-NLS-1$
+		TraceCompilerLogger.printInfo(Messages.getString("TraceCompiler.settingTracesPath") + ProjectEngine.traceFolderName); //$NON-NLS-1$
+	}
+
+	private static void printUsage() {
+		TraceCompilerLogger.printMessage(VERSION_TEXT + TraceCompilerVersion.getVersion());
+		TraceCompilerLogger.printMessage(USAGE);
+	}
+
+	/**
+	 * Read information from STDIN
+	 * @throws IOException if fails to read the input
+	 * @throws TraceCompilerRootException if the list of files is empty
+	 */
+	private void readFromStdin() throws IOException, TraceCompilerIllegalArgumentsException {
+		TraceCompilerLogger.printInfo(Messages.getString("TraceCompiler.ReadingFilesMess")  + ENDOFSOURCEFILES); //$NON-NLS-1$
+		// Create reader
+		BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in));
+
+			String line = stdin.readLine();
+						
+			while (line != null) {
+				line = line.trim();
+				if (line.length() > 0) {
+					// End of source files received
+					if (line.equals(ENDOFSOURCEFILES)) {
+						break;
+					}
+					line = line.replaceAll("\\s+", ""); //$NON-NLS-1$ //$NON-NLS-2$
+					Matcher m = valueSwitchPattern.matcher(line.trim());
+					//because mmp path and traces path can be very long, we should allow them to be input'ed through stdin too.
+					if (m.matches()) { //it's one of the swithes with values
+						if (m.group(1).equalsIgnoreCase(MMP_PATH_SWITCH)) {
+							//mmp path. for the moment only the mmp folder is used.
+							mmpPath = new File(m.group(2));
+							TraceCompilerLogger.printInfo(Messages.getString("TraceCompiler.MMPPathSet") + mmpPath); //$NON-NLS-1$
+						} else {
+							if (m.group(1).equalsIgnoreCase(TRACES_PATH_SWITCH)) {
+								//traces path
+								traces_path = m.group(2);
+							} else {
+								//unsupported switch
+								TraceCompilerLogger.printMessage(Messages.getString("TraceCompiler.UnsupportedSwitch") + line); //$NON-NLS-1$
+							}
+						}
+					} else {
+
+						//it must be a file name
+						//it's a good time to stop TC here if the file does not exist
+						if (!(new File(line)).exists()) {
+							throw new TraceCompilerIllegalArgumentsException(Messages.getString("TraceCompiler.sourceFileDoesNotExist") + line, null); //$NON-NLS-1$
+						}
+						sources.add(line);
+					}
+				}
+				// Read new line from STDIN
+				line = stdin.readLine();				
+			}
+		stdin.close();
+	}
+
+	/**
+	 * Registers source files
+	 * 
+	 * @param files
+	 */
+	private void registerSourceFiles(ArrayList<String> files) throws TraceCompilerIllegalArgumentsException {
+		if (sources.size() == 0) {
+			throw new TraceCompilerIllegalArgumentsException(Messages.getString("TraceCompiler.noSourceFilesExceptionText"), null); //$NON-NLS-1$
+		}
+		if (files.size() > 0) {
+			String[] fileArr = new String[files.size()];
+			files.toArray(fileArr);
+
+			// Sets the source files to the TraceCompiler document
+			// factory. It will create a document from each source in the array
+			FileDocumentMonitor.setFiles(fileArr);
+			DocumentFactory.registerDocumentFramework(
+					new FileDocumentMonitor(), StringDocumentFactory.class);
+		}
+	}
+
+	/**
+	 * Initializes TraceCompiler
+	 * @throws TraceCompilerRootException if fail to initialize the plugins
+	 * @throws TraceCompilerException 
+	 */
+	private void start() throws TraceCompilerRootException, TraceCompilerException {
+
+		// Starts TraceCompiler. This is normally called from the Eclipse
+		// plug-in
+		// activator, but in console case that does not exist
+		TraceCompilerEngineGlobals.start();
+						
+		//Reads the GroupId values from opensystemtrace_types.h
+		//If this fails a message is logged and trace compiler stops
+		GroupNames.initialiseGroupName();
+
+		
+		// Registers a view to TraceCompiler
+		TraceCompilerEngineGlobals
+				.setView(new TraceCompilerView(componentPath));
+
+		// Registers all plug-in components
+		for (TraceCompilerPlugin plugin : plugIns) {
+			TraceCompilerEngineGlobals.registerPlugin(plugin);
+		}
+		// Adds a model event listener
+		TraceCompilerEngineGlobals.getTraceModel().addModelListener(
+				modelListener);
+		TraceCompilerEngineGlobals.getTraceModel().addExtensionListener(
+				modelListener);
+		TraceCompilerEngineGlobals.getTraceModel().getExtension(
+				TraceLocationList.class).addLocationListListener(modelListener);
+		TraceCompilerEngineGlobals.getTraceModel().addProcessingListener(modelListener);
+	}
+
+	/**
+	 * Parses the sources and generates trace files
+	 * @throws Exception 
+	 */
+	private void buildTraceFiles() throws Exception {
+		TraceCompilerEngineInterface tbi = TraceCompilerEngineGlobals
+				.getTraceCompiler();
+		try {
+			// Opens a trace project
+
+			// Set project path before opening project
+			TraceCompilerEngineGlobals.setProjectPath(componentPath);
+			tbi.openProject(projectName);
+			TraceModel model = TraceCompilerEngineGlobals.getTraceModel();
+			if (model.isValid()) {
+				model.setID((int) componentUID);
+
+				// Location errors are printed after a file changes, but the
+				// last file is not detected by the listener
+				if (modelListener.getErrors().size() > 0) {
+					modelListener.printLocationErrors();
+					tbi.closeProject();
+					throw new TraceCompilerRootException(null, null);
+				}
+				tbi.exportProject();
+				tbi.closeProject();
+			} else {
+				String msg = Messages.getString("TraceCompiler.ProjectCancelledMess"); //$NON-NLS-1$
+				throw new TraceCompilerRootException(msg, null);
+			}
+		} catch (TraceCompilerException e) {
+			TraceCompilerEngineGlobals.getEvents().postError(e);
+			throw new TraceCompilerRootException(Messages.getString("TraceCompiler.BuildFailed"), e); //$NON-NLS-1$
+		}
+	}
+
+	/**
+	 * Shuts down TraceCompiler
+	 * @throws TraceCompilerException 
+	 */
+	private void shutdown() throws TraceCompilerException {
+		for (TraceCompilerPlugin plugin : plugIns) {
+			TraceCompilerEngineGlobals.unregisterPlugin(plugin);
+		}
+		TraceCompilerEngineGlobals.shutdown();
+	}
+
+	/**
+	 * Checks if the MMP file is valid
+	 * 
+	 * @return true if MMP file is valid
+	 */
+	private boolean isMmpValid() {
+		boolean valid = false;
+		String pathStr = mmpPath.getAbsolutePath();
+
+		if (mmpPath.exists() && pathStr.length() > MMP_FILE_TYPE.length()) {
+			String end = pathStr.substring(pathStr.length() - MMP_FILE_TYPE.length());
+			if (end.equalsIgnoreCase(MMP_FILE_TYPE)) {
+				valid = true;
+			} else {
+				TraceCompilerLogger.printError(Messages.getString("TraceCompiler.invalidMmpExceptionText") + mmpPath.getAbsolutePath()); //$NON-NLS-1$
+			}
+		} else {
+			TraceCompilerLogger.printError(Messages.getString("TraceCompiler.InvalidMMP2") + mmpPath.getAbsolutePath()); //$NON-NLS-1$
+		}
+		return valid;
+		
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/TraceCompilerModelListener.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,246 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "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:
+ *
+ * Description:
+ *
+ * Model extension listener for console UI
+ *
+ */
+package com.nokia.tracecompiler;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+
+import com.nokia.tracecompiler.engine.TraceCompilerEngineErrorMessages;
+import com.nokia.tracecompiler.engine.TraceCompilerEngineGlobals;
+import com.nokia.tracecompiler.engine.TraceLocation;
+import com.nokia.tracecompiler.engine.TraceLocationList;
+import com.nokia.tracecompiler.engine.TraceLocationListListener;
+import com.nokia.tracecompiler.engine.TraceCompilerEngineErrorCodes.TraceCompilerErrorCode;
+import com.nokia.tracecompiler.model.TraceModelExtension;
+import com.nokia.tracecompiler.model.TraceModelExtensionListener;
+import com.nokia.tracecompiler.model.TraceModelListener;
+import com.nokia.tracecompiler.model.TraceObject;
+import com.nokia.tracecompiler.model.TraceProcessingListener;
+import com.nokia.tracecompiler.source.SourceConstants;
+import com.nokia.tracecompiler.source.SourceLocationListener;
+
+/**
+ * Model extension listener for TraceCompiler UI
+ * 
+ */
+final class TraceCompilerModelListener implements TraceModelListener,
+		TraceModelExtensionListener, TraceLocationListListener,
+		SourceLocationListener, TraceProcessingListener {
+
+	/**
+	 * List of errors for a source
+	 */
+	private ArrayList<TraceLocation> errorList = new ArrayList<TraceLocation>();
+
+	/**
+	 * Name of the file being processed
+	 */
+	private String currentFileName;
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.model.TraceModelListener#
+	 * objectAdded(com.nokia.tracecompiler.model.TraceObject,
+	 * com.nokia.tracecompiler.model.TraceObject)
+	 */
+	public void objectAdded(TraceObject owner, TraceObject object) {
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.model.TraceModelListener#
+	 * objectCreationComplete(com.nokia.tracecompiler.model.TraceObject)
+	 */
+	public void objectCreationComplete(TraceObject object) {
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.model.TraceModelListener#
+	 * objectRemoved(com.nokia.tracecompiler.model.TraceObject,
+	 * com.nokia.tracecompiler.model.TraceObject)
+	 */
+	public void objectRemoved(TraceObject owner, TraceObject object) {
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.model.TraceModelListener#
+	 * propertyUpdated(com.nokia.tracecompiler.model.TraceObject, int)
+	 */
+	public void propertyUpdated(TraceObject object, int property) {
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.model.TraceModelExtensionListener#
+	 * extensionAdded(com.nokia.tracecompiler.model.TraceObject,
+	 * com.nokia.tracecompiler.model.TraceModelExtension)
+	 */
+	public void extensionAdded(TraceObject object, TraceModelExtension extension) {
+		if (extension instanceof TraceLocationList) {
+			((TraceLocationList) extension).addLocationListListener(this);
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.model.TraceModelExtensionListener#
+	 * extensionRemoved(com.nokia.tracecompiler.model.TraceObject,
+	 * com.nokia.tracecompiler.model.TraceModelExtension)
+	 */
+	public void extensionRemoved(TraceObject object,
+			TraceModelExtension extension) {
+		if (extension instanceof TraceLocationList) {
+			((TraceLocationList) extension).removeLocationListListener(this);
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.source.TraceLocationListListener#
+	 * locationAdded(com.nokia.tracecompiler.engine.TraceLocation)
+	 */
+	public void locationAdded(TraceLocation location) {
+		location.addLocationListener(this);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.source.TraceLocationListListener#
+	 * locationRemoved(com.nokia.tracecompiler.engine.TraceLocation)
+	 */
+	public void locationRemoved(TraceLocation location) {
+		location.removeLocationListener(this);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.source.SourceLocationListener#
+	 * locationValidityChanged(com.nokia.tracecompiler.engine.TraceLocation)
+	 */
+	public void locationValidityChanged(TraceLocation location) {
+		String fileName = location.getFileName();
+		if (currentFileName != null) {
+			if (!fileName.equals(currentFileName)) {
+				currentFileName = fileName;
+				printLocationErrors();
+			}
+		} else {
+			currentFileName = fileName;
+		}
+		TraceCompilerErrorCode code = location.getValidityCode();
+		if (code != TraceCompilerErrorCode.OK
+				&& code != TraceCompilerErrorCode.TRACE_DOES_NOT_EXIST) {
+			if (!errorList.contains(location)) {
+				errorList.add(location);
+				location.reference();
+			}
+		} else {
+			if (errorList.remove(location)) {
+				location.dereference();
+			}
+		}
+	}
+
+	/**
+	 * Prints the errors from the error list
+	 */
+	void printLocationErrors() {
+		Collections.sort(errorList, new Comparator<TraceLocation>() {
+
+			/**
+			 * Sorts the array by line number
+			 * 
+			 * @param o1
+			 *            location 1
+			 * @param o2
+			 *            location 2
+			 * @return the result
+			 */
+			public int compare(TraceLocation o1, TraceLocation o2) {
+				int line1 = o1.getLineNumber();
+				int line2 = o2.getLineNumber();
+				return line1 > line2 ? 1 : line1 == line2 ? 0 : -1;
+			}
+
+		});
+		for (TraceLocation location : errorList) {
+			printLocationError(location);
+		}
+		errorList.clear();
+	}
+
+	/**
+	 * Prints a location error
+	 * 
+	 * @param location
+	 *            the location
+	 */
+	private void printLocationError(TraceLocation location) {
+		TraceCompilerEngineGlobals.getEvents().postErrorMessage(
+				location.getFileName()
+						+ Messages.getString("TraceCompilerModelListener.lineNumberPrefix") //$NON-NLS-1$
+						+ location.getLineNumber()
+						+ SourceConstants.COLON
+						+ SourceConstants.SPACE
+						+ TraceCompilerEngineErrorMessages.getErrorMessage(
+								location.getValidityCode(), location
+										.getValidityParameters()), null, true);
+	}
+
+	/**
+	 * get list of cumulated erros.
+	 * 
+	 * @return list of TaceLocaion
+	 */
+	public ArrayList<TraceLocation> getErrors() {
+		return errorList;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * com.nokia.tracecompiler.model.TraceProcessingListener#processingComplete
+	 * (boolean)
+	 */
+	public void processingComplete(boolean changed) {
+		printLocationErrors();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * com.nokia.tracecompiler.model.TraceProcessingListener#processingStarted()
+	 */
+	public void processingStarted() {
+	}
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/TraceCompilerRootException.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "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:
+ *
+ * Description:
+ *
+ * Command-line based view implementation
+ *
+ */
+package com.nokia.tracecompiler;
+
+
+public class TraceCompilerRootException extends Exception {
+	// Serial version UID, as required for all Exceptions
+	private static final long serialVersionUID = 2126996710246333574L;
+	
+
+	/**
+	 * Constructs a TraceCompilerRootException with the given detail message and
+	 * cause.
+	 * @param message the detail message
+	 * @param cause the Exception that caused this Exception
+	 */
+	public TraceCompilerRootException(String message, Throwable cause)
+	{
+		super(message, cause);
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/TraceCompilerView.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,84 @@
+/*
+ * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "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:
+ *
+ * Description:
+ *
+ * Console view implementation
+ *
+ */
+package com.nokia.tracecompiler;
+
+import java.io.File;
+
+import com.nokia.tracecompiler.engine.TraceCompilerEngineConfiguration;
+import com.nokia.tracecompiler.engine.ViewAdapter;
+
+/**
+ * TraceCompiler view implementation
+ * 
+ */
+class TraceCompilerView extends ViewAdapter {
+
+	/**
+	 * Epoc root name in environment variables
+	 */
+	private static final String EPOCROOT = "EPOCROOT"; //$NON-NLS-1$
+
+	/**
+	 * Export path
+	 */
+	private String exportPath;
+
+	/**
+	 * Configuration
+	 */
+	private TraceCompilerConfiguration configuration;
+
+	/**
+	 * Constructor
+	 * 
+	 * @param projectPath
+	 *            the project path
+	 */
+	TraceCompilerView(String projectPath) {
+		// First try to get EPOCROOT from environment
+		exportPath = System.getenv(EPOCROOT);
+
+		// Windows substed drive
+		if (exportPath == null) {
+			int index = projectPath.indexOf(':');
+			if (index >= 0) {
+				exportPath = projectPath.substring(0, index + 2); // CodForChk_Dis_Magic
+			} else {
+				exportPath = File.separator;
+			}
+
+			// Check if it ends with a file separator, if not add one at the end
+		} else if (!exportPath.endsWith(File.separator)) {
+			exportPath = exportPath + File.separator;
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engine.ViewAdapter#getConfiguration()
+	 */
+	@Override
+	public TraceCompilerEngineConfiguration getConfiguration() {
+		if (configuration == null) {
+			configuration = new TraceCompilerConfiguration(exportPath);
+		}
+		return configuration;
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/DictionaryDefRef.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,37 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Reference to a trace definition
+*
+*/
+package com.nokia.tracecompiler.decodeplugins.dictionary;
+
+/**
+ * Reference to a trace definition
+ * 
+ */
+final class DictionaryDefRef extends DictionaryRef {
+
+	/**
+	 * Constructor
+	 * 
+	 * @param refid
+	 *            the reference id
+	 */
+	DictionaryDefRef(int refid) {
+		super(refid);
+	}
+
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/DictionaryEngine.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,100 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* TraceCompilerExport implementation for Symbian dictionary files
+*
+*/
+package com.nokia.tracecompiler.decodeplugins.dictionary;
+
+import com.nokia.tracecompiler.model.TraceCompilerException;
+import com.nokia.tracecompiler.model.TraceModel;
+import com.nokia.tracecompiler.plugin.TraceCompilerExport;
+
+/**
+ * TraceCompilerExport implementation for Symbian dictionary files
+ * 
+ */
+public final class DictionaryEngine implements TraceCompilerExport {
+
+	/**
+	 * The trace model
+	 */
+	private TraceModel model;
+
+	/**
+	 * Dictionary instance
+	 */
+	private static DictionaryEngine instance;
+
+	/**
+	 * Gets the shared instance
+	 * 
+	 * @return the instance
+	 */
+	static DictionaryEngine getInstance() {
+		return instance;
+	}
+
+	/**
+	 * Constructor
+	 */
+	public DictionaryEngine() {
+		instance = this;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engine.TraceCompilerPlugin#
+	 *      traceProjectOpened(com.nokia.tracecompiler.model.TraceModel)
+	 */
+	public void traceProjectOpened(TraceModel model) {
+		this.model = model;
+		DictionaryFile file = model.getExtension(DictionaryFile.class);
+		if (file == null) {
+			file = new DictionaryFile(DictionaryFileExport
+					.getPathForDictionary(model));
+			model.addExtension(file);
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engine.TraceCompilerPlugin#traceProjectClosed()
+	 */
+	public void traceProjectClosed() {
+		if (model != null && model.isValid()) {
+			model.removeExtensions(DictionaryFile.class);
+		}
+		model = null;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engine.TraceCompilerExport#exportTraceProject()
+	 */
+	public void exportTraceProject() throws TraceCompilerException {
+		if (model != null && model.isValid()) {
+			DictionaryFile df = model.getExtension(DictionaryFile.class);
+			if (df != null) {
+				DictionaryFileExport export = new DictionaryFileExport(df);
+				export.exportDictionary();
+			}
+		}
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/DictionaryFile.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,65 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Project file for Dictionary format
+*
+*/
+package com.nokia.tracecompiler.decodeplugins.dictionary;
+
+import com.nokia.tracecompiler.project.TraceProjectFile;
+
+/**
+ * Project file for Dictionary format
+ * 
+ */
+final class DictionaryFile extends TraceProjectFile {
+
+	/**
+	 * Title shown in UI
+	 */
+	private static final String TITLE = Messages
+			.getString("DictionaryFile.Title"); //$NON-NLS-1$
+
+	/**
+	 * Constructor
+	 * 
+	 * @param absolutePath
+	 *            the path to the dictionary file
+	 */
+	DictionaryFile(String absolutePath) {
+		super(absolutePath, true);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.project.TraceProjectFile#getFileExtension()
+	 */
+	@Override
+	protected String getFileExtension() {
+		return DictionaryFileConstants.DICTIONARY_FILE_EXTENSION;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.project.TraceProjectFile#getTitle()
+	 */
+	@Override
+	public String getTitle() {
+		return TITLE;
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/DictionaryFileConstants.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,37 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Constants related to dictionary file
+*
+*/
+package com.nokia.tracecompiler.decodeplugins.dictionary;
+
+/**
+ * Constants related to dictionary file
+ * 
+ */
+interface DictionaryFileConstants {
+
+	/**
+	 * Dictionary file extension
+	 */
+	String DICTIONARY_FILE_EXTENSION = "Dictionary.xml"; //$NON-NLS-1$
+
+	/**
+	 * Search depth for dictionary file
+	 */
+	int DICTIONARY_SEARCH_DEPTH = 3; // CodForChk_Dis_Magic
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/DictionaryFileExport.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,102 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Exporter for dictionary file
+*
+*/
+package com.nokia.tracecompiler.decodeplugins.dictionary;
+
+import java.io.File;
+
+import com.nokia.tracecompiler.engine.TraceCompilerEngineConfiguration;
+import com.nokia.tracecompiler.engine.TraceCompilerEngineGlobals;
+import com.nokia.tracecompiler.file.FileUtils;
+import com.nokia.tracecompiler.model.TraceModel;
+import com.nokia.tracecompiler.source.SourceConstants;
+
+/**
+ * Exporter for dictionary file
+ * 
+ */
+final class DictionaryFileExport {
+
+	/**
+	 * The dictionary file properties
+	 */
+	private DictionaryFile dictionaryFile;
+
+	/**
+	 * Constructor
+	 * 
+	 * @param dictionary
+	 *            the dictionary file
+	 */
+	DictionaryFileExport(DictionaryFile dictionary) {
+		this.dictionaryFile = dictionary;
+	}
+
+	/**
+	 * Exports the dictionary file
+	 */
+	void exportDictionary() {
+		String exportPath = getExportPath(File.separatorChar);
+		String exportFile = dictionaryFile.getFileName();
+		String envRoot = TraceCompilerEngineGlobals.getConfiguration().getText(
+				TraceCompilerEngineConfiguration.ENVIRONMENT_ROOT);
+		if (envRoot != null) {
+			File target = new File(envRoot + exportPath + exportFile);
+			// The dictionary file is updated with the new environment root
+			dictionaryFile.updatePath(target.getAbsolutePath());
+			DictionaryFileWriter writer = new DictionaryFileWriter(
+					dictionaryFile);
+			writer.write();
+			dictionaryFile.postFileWrittenEvent(dictionaryFile
+					.getAbsolutePathWithID());
+		}
+	}
+
+	/**
+	 * Returns the export path for dictionary files
+	 * 
+	 * @param separator
+	 *            the file separator to use
+	 * @return the export path
+	 */
+	private static String getExportPath(char separator) {
+		String exportPath = DictionaryPreferences.DEFAULT_EXPORT_PATH;
+
+		// Accepts both types of separators, ends with separator
+		exportPath = FileUtils.convertSeparators(separator, exportPath, true);
+		return exportPath;
+	}
+
+	/**
+	 * Gets the default path to the dictionary file
+	 * 
+	 * @param model
+	 *            trace model
+	 * @return the file
+	 */
+	static String getPathForDictionary(TraceModel model) {
+		String fileName = model.getName()
+				+ DictionaryFileConstants.DICTIONARY_FILE_EXTENSION;
+		String exportPath = getExportPath(File.separatorChar);
+		String envRoot = TraceCompilerEngineGlobals.getConfiguration().getText(
+				TraceCompilerEngineConfiguration.ENVIRONMENT_ROOT);
+		return FileUtils.convertSeparators(SourceConstants.FORWARD_SLASH_CHAR,
+				envRoot + exportPath + fileName, false);
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/DictionaryFileRef.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,60 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Reference to a file
+*
+*/
+package com.nokia.tracecompiler.decodeplugins.dictionary;
+
+/**
+ * Reference to a file
+ * 
+ */
+final class DictionaryFileRef extends DictionaryRef {
+
+	/**
+	 * File name
+	 */
+	String file;
+
+	/**
+	 * File path
+	 */
+	String path;
+
+	/**
+	 * Trace
+	 */
+	com.nokia.tracecompiler.model.Trace trace;
+
+	/**
+	 * Constructor
+	 * 
+	 * @param file
+	 *            the file name
+	 * @param path
+	 *            the file path
+	 * @param trace
+	 *            the trace
+	 */
+	DictionaryFileRef(String file, String path,
+			com.nokia.tracecompiler.model.Trace trace) {
+		super(0);
+		this.file = file;
+		this.path = path;
+		this.trace = trace;
+	}
+
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/DictionaryFileWriter.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,586 @@
+/*
+* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Writer for dictionary file
+*
+*/
+package com.nokia.tracecompiler.decodeplugins.dictionary;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.Iterator;
+
+import com.nokia.tracecompiler.decodeplugins.dictionary.encoder.DataType;
+import com.nokia.tracecompiler.decodeplugins.dictionary.encoder.Dictionary;
+import com.nokia.tracecompiler.decodeplugins.dictionary.encoder.LocationStore;
+import com.nokia.tracecompiler.decodeplugins.dictionary.encoder.TraceComponent;
+import com.nokia.tracecompiler.decodeplugins.dictionary.encoder.TraceDataStore;
+import com.nokia.tracecompiler.decodeplugins.dictionary.encoder.TraceDictionaryEncoder;
+import com.nokia.tracecompiler.decodeplugins.dictionary.encoder.TypeDef;
+import com.nokia.tracecompiler.decodeplugins.dictionary.encoder.TypeDefStore;
+import com.nokia.tracecompiler.engine.LocationListBase;
+import com.nokia.tracecompiler.engine.LocationProperties;
+import com.nokia.tracecompiler.file.FileUtils;
+import com.nokia.tracecompiler.model.Trace;
+import com.nokia.tracecompiler.model.TraceConstantTable;
+import com.nokia.tracecompiler.model.TraceConstantTableEntry;
+import com.nokia.tracecompiler.model.TraceGroup;
+import com.nokia.tracecompiler.model.TraceModel;
+import com.nokia.tracecompiler.model.TraceObjectUtils;
+import com.nokia.tracecompiler.model.TraceParameter;
+import com.nokia.tracecompiler.project.FormattingUtils;
+import com.nokia.tracecompiler.project.PropertyNames;
+import com.nokia.tracecompiler.project.TraceProjectAPI;
+import com.nokia.tracecompiler.project.TraceProjectAPI.TraceFormatFlags;
+import com.nokia.tracecompiler.rules.FillerParameterRule;
+import com.nokia.tracecompiler.rules.HiddenTraceObjectRule;
+import com.nokia.tracecompiler.source.SourceConstants;
+import com.nokia.tracecompiler.source.SourceUtils;
+
+/**
+ * Writer for dictionary file
+ * 
+ */
+final class DictionaryFileWriter {
+
+	/**
+	 * Comparator for file references
+	 */
+	private final class FileRefComparator implements
+			Comparator<DictionaryFileRef> {
+		public int compare(DictionaryFileRef o1, DictionaryFileRef o2) {
+			int val = o1.path.compareTo(o2.path);
+			if (val == 0) {
+				val = o1.file.compareTo(o2.file);
+			}
+			return val;
+		}
+	}
+
+	/**
+	 * Dictionary file
+	 */
+	private DictionaryFile dictionaryFile;
+
+	/**
+	 * Sequential number for trace definitions
+	 */
+	private int defref;
+
+	/**
+	 * Sequential number for file definitions
+	 */
+	private int fileref;
+
+	/**
+	 * Constructor
+	 * 
+	 * @param dictionaryFile
+	 *            the dictionary file
+	 */
+	DictionaryFileWriter(DictionaryFile dictionaryFile) {
+		this.dictionaryFile = dictionaryFile;
+	}
+
+	/**
+	 * Writes the dictionary file
+	 */
+	void write() {
+		defref = 0;
+		fileref = 0;
+		File file = new File(dictionaryFile.getAbsolutePathWithID());
+		// Delete removes possible read-only flags
+		if (file.exists()) {
+			file.delete();
+		}
+
+		TraceDictionaryEncoder encoder = new TraceDictionaryEncoder();
+		File path = file.getParentFile();
+		if (!path.exists()) {
+			FileUtils.createDirectories(path);
+		}
+		encoder.createNewDictionary(file.getAbsolutePath());
+		Dictionary.startDictionary();
+		createTypedefs();
+		createDefs();
+		createLocations();
+		createComponent();
+		Dictionary.endDictionary();
+	}
+
+	/**
+	 * Creates the type definitions
+	 */
+	private void createTypedefs() {
+		TypeDefStore.startTypeDefs();
+		ArrayList<String> typeList = buildTypeList();
+		writeTypeDefinitions(typeList);
+		TypeDefStore.endTypeDefs();
+	}
+
+	/**
+	 * Builds the list of parameter types
+	 * 
+	 * @return the list of types found from the model
+	 */
+	private ArrayList<String> buildTypeList() {
+		TraceModel model = dictionaryFile.getOwner().getModel();
+		ArrayList<String> typeList = new ArrayList<String>();
+		for (TraceGroup group : model) {
+			for (Trace trace : group) {
+				for (TraceParameter parameter : trace) {
+					if ((parameter.getExtension(HiddenTraceObjectRule.class) == null)
+							|| (parameter
+									.getExtension(FillerParameterRule.class) != null)) {
+						String type = parameter.getType();
+						if (!typeList.contains(type)) {
+							typeList.add(type);
+						}
+					}
+				}
+			}
+		}
+		return typeList;
+	}
+
+	/**
+	 * Writes the data type definitions
+	 * 
+	 * @param typeList
+	 *            the list of data types
+	 */
+	private void writeTypeDefinitions(ArrayList<String> typeList) {
+		for (String type : typeList) {
+			DataType dt = mapTypeToDataType(type);
+			if (dt != null) {
+				// Normal parameters
+				int size = mapParameterTypeToSize(type);
+				String formatChar = SourceUtils.mapNormalTypeToFormat(type);
+				if (formatChar != null && formatChar.length() > 1
+						&& formatChar.charAt(0) == '%') {
+					formatChar = formatChar.substring(1);
+					TypeDefStore.writeTypeDef(type, size, formatChar, dt);
+
+					// Write alternative format characters
+					writeAlternativeFormatChars(formatChar, type, size, dt);
+
+				} else {
+					TypeDefStore.writeTypeDef(type, size, null, dt);
+				}
+			} else {
+				// Enum parameters
+				TraceModel model = dictionaryFile.getOwner().getModel();
+				TraceConstantTable table = model.findConstantTableByName(type);
+				if (table != null) {
+					TypeDefStore.startTypeDef(table.getName(),
+							mapParameterTypeToSize(table.getType()), null,
+							DataType.ENUM);
+					for (TraceConstantTableEntry entry : table) {
+						TypeDef.writeTypeMember(entry.getID(), entry.getName(),
+								null);
+					}
+					TypeDefStore.endTypeDef();
+				}
+			}
+		}
+	}
+
+	/**
+	 * Writes alternative format characters to the Dictionary
+	 * 
+	 * @param formatChar
+	 *            formatchar
+	 * @param type
+	 *            parameter type
+	 * @param size
+	 *            parameter size
+	 * @param dt
+	 *            data type
+	 */
+	private void writeAlternativeFormatChars(String formatChar, String type,
+			int size, DataType dt) {
+
+		// If there's big L, write also 'll' type
+		if (formatChar.indexOf('L') != -1) {
+
+			// Double small l
+			String newFormatChar = formatChar.replace("L", "ll"); //$NON-NLS-1$ //$NON-NLS-2$
+			TypeDefStore.writeTypeDef(type, size, newFormatChar, dt);
+			writeCapitalHexType(newFormatChar, type, size, dt);
+
+		}
+
+		// Write alternative option to float types
+		else if (formatChar.equals("f") || formatChar.equals("e") //$NON-NLS-1$//$NON-NLS-2$
+				|| formatChar.equals("g")) { //$NON-NLS-1$
+
+			String newFormatChar = 'L' + formatChar;
+			TypeDefStore.writeTypeDef(type, size, newFormatChar, dt);
+		}
+
+		else {
+			// If length is one, add also formatchar with "l"
+			if (formatChar.length() == 1) {
+				String newFormatChar = "l" + formatChar; //$NON-NLS-1$
+				TypeDefStore.writeTypeDef(type, size, newFormatChar, dt);
+				writeCapitalHexType(newFormatChar, type, size, dt);
+			}
+
+			// Check capital hex need
+			writeCapitalHexType(formatChar, type, size, dt);
+		}
+	}
+
+	/**
+	 * Writes capital hex type
+	 * 
+	 * @param formatChar
+	 *            formatchar
+	 * @param type
+	 *            parameter type
+	 * @param size
+	 *            parameter size
+	 * @param dt
+	 *            data type
+	 */
+	private void writeCapitalHexType(String formatChar, String type, int size,
+			DataType dt) {
+
+		// Write also capital X if there are hex values
+		if (formatChar.indexOf('x') != -1) {
+			type = type.toUpperCase();
+			TypeDefStore.writeTypeDef(type, size, formatChar.replace('x', 'X'),
+					dt);
+		}
+	}
+
+	/**
+	 * Gets the parameter size from type
+	 * 
+	 * @param type
+	 *            the type
+	 * @return the size in bytes
+	 */
+	private int mapParameterTypeToSize(String type) {
+		int size = SourceUtils.mapParameterTypeToSize(type);
+		if (size == 0) {
+			if (type.equals(TraceParameter.ASCII)) {
+				size = 1;
+			} else if (type.equals(TraceParameter.UNICODE)) {
+				size = 2; // CodForChk_Dis_Magic
+			}
+		}
+		return size;
+	}
+
+	/**
+	 * Creates the trace definitions
+	 */
+	private void createDefs() {
+		// This should check for duplicates
+		TraceDataStore.startDataStore();
+		TraceModel model = dictionaryFile.getOwner().getModel();
+		TraceProjectAPI api = model.getExtension(TraceProjectAPI.class);
+		for (TraceGroup group : model) {
+			for (Trace trace : group) {
+				trace.addExtension(new DictionaryDefRef(++defref));
+				TraceFormatFlags flags = new TraceFormatFlags();
+				flags.isFormattingSupported = true;
+				String data = api.formatTraceForExport(trace, flags);
+				data = replaceUnescapeQuotes(data);
+				TraceDataStore.writeData(defref, DataType.STRING, data);
+			}
+		}
+		TraceDataStore.endDataStore();
+	}
+
+	/**
+	 * Replaces unescape quates
+	 * 
+	 * @param data
+	 *            the data
+	 * @return the new string
+	 */
+	private String replaceUnescapeQuotes(String data) {
+		data = data.replace("\\\"", "\""); //$NON-NLS-1$ //$NON-NLS-2$
+		return data;
+	}
+
+	/**
+	 * Maps a basic type to a Dictionary data type
+	 * 
+	 * @param type
+	 *            the type
+	 * @return the data type
+	 */
+	private DataType mapTypeToDataType(String type) { // CodForChk_Dis_ComplexFunc
+		DataType retval;
+		// Unsigned is not supported in Dictionary
+		if (type.equals(TraceParameter.SDEC32)) {
+			retval = DataType.INTEGER;
+		} else if (type.equals(TraceParameter.HEX32)) {
+			retval = DataType.HEX;
+		} else if (type.equals(TraceParameter.UDEC32)) {
+			retval = DataType.INTEGER;
+		} else if (type.equals(TraceParameter.OCT32)) {
+			retval = DataType.OCTAL;
+		} else if (type.equals(TraceParameter.SDEC16)) {
+			retval = DataType.INTEGER;
+		} else if (type.equals(TraceParameter.HEX16)) {
+			retval = DataType.HEX;
+		} else if (type.equals(TraceParameter.UDEC16)) {
+			retval = DataType.INTEGER;
+		} else if (type.equals(TraceParameter.OCT16)) {
+			retval = DataType.OCTAL;
+		} else if (type.equals(TraceParameter.SDEC8)) {
+			retval = DataType.INTEGER;
+		} else if (type.equals(TraceParameter.HEX8)) {
+			retval = DataType.HEX;
+		} else if (type.equals(TraceParameter.UDEC8)) {
+			retval = DataType.INTEGER;
+		} else if (type.equals(TraceParameter.OCT8)) {
+			retval = DataType.OCTAL;
+		} else if (type.equals(TraceParameter.SDEC64)) {
+			retval = DataType.INTEGER;
+		} else if (type.equals(TraceParameter.HEX64)) {
+			retval = DataType.HEX;
+		} else if (type.equals(TraceParameter.UDEC64)) {
+			retval = DataType.INTEGER;
+		} else if (type.equals(TraceParameter.OCT64)) {
+			retval = DataType.OCTAL;
+		} else if (type.equals(TraceParameter.ASCII)) {
+			retval = DataType.STRING;
+		} else if (type.equals(TraceParameter.UNICODE)) {
+			retval = DataType.STRING;
+		} else if (type.equals(TraceParameter.FLOAT_FIX)) {
+			retval = DataType.FLOAT;
+		} else if (type.equals(TraceParameter.FLOAT_EXP)) {
+			retval = DataType.FLOAT;
+		} else if (type.equals(TraceParameter.FLOAT_OPT)) {
+			retval = DataType.FLOAT;
+		} else if (type.equals(TraceParameter.POINTER)) {
+			retval = DataType.HEX;
+		} else {
+			retval = null;
+		}
+		return retval;
+	}
+
+	/**
+	 * Creates the location definitions
+	 */
+	private void createLocations() {
+		ArrayList<DictionaryFileRef> files = new ArrayList<DictionaryFileRef>();
+		LocationStore.startLocations();
+		for (TraceGroup group : dictionaryFile.getOwner().getModel()) {
+			for (Trace trace : group) {
+				writeLocation(files, trace);
+			}
+		}
+		// Build XML and assign ID's to refs
+		Collections.sort(files, new FileRefComparator());
+		String lastpath = null;
+		for (DictionaryFileRef ref : files) {
+			if (!ref.path.equals(lastpath)) {
+				if (lastpath != null) {
+					LocationStore.endPath();
+				}
+				LocationStore.startPath(ref.path);
+				lastpath = ref.path;
+			}
+			LocationStore.writeFile(++fileref, ref.file);
+			ref.refid = fileref;
+		}
+		if (lastpath != null) {
+			LocationStore.endPath();
+		}
+		LocationStore.endLocations();
+	}
+
+	/**
+	 * Writes the location of a trace
+	 * 
+	 * @param files
+	 *            file references
+	 * @param trace
+	 *            trace to be written
+	 */
+	private void writeLocation(ArrayList<DictionaryFileRef> files, Trace trace) {
+		LocationProperties loc = findFirstLocation(trace);
+		if (loc != null) {
+			String path = loc.getFilePath();
+			String file = loc.getFileName();
+			if (path != null) {
+				path = FileUtils.convertSeparators(
+						SourceConstants.FORWARD_SLASH_CHAR, path, true);
+				// TODO: Remove drive letter. Actually cannot remove drive
+				// letter because EPOCROOT might not be in the root of the drive
+			}
+			DictionaryFileRef ref = getRef(files, file, path);
+			if (ref == null) {
+				ref = new DictionaryFileRef(file, path, trace);
+				files.add(ref);
+				trace.addExtension(ref);
+			} else {
+				trace.addExtension(ref);
+			}
+		}
+	}
+
+	/**
+	 * Finds the first location from trace
+	 * 
+	 * @param trace
+	 *            the trace
+	 * @return the location
+	 */
+	private LocationProperties findFirstLocation(Trace trace) {
+		Iterator<LocationListBase> itr = trace
+				.getExtensions(LocationListBase.class);
+		LocationProperties loc = null;
+		while (itr.hasNext() && loc == null) {
+			Iterator<LocationProperties> locs = itr.next().iterator();
+			if (locs.hasNext()) {
+				loc = locs.next();
+			}
+		}
+		return loc;
+	}
+
+	/**
+	 * Gets a file reference
+	 * 
+	 * @param files
+	 *            the list of file references
+	 * @param file
+	 *            file name
+	 * @param path
+	 *            file path
+	 * @return the file reference
+	 */
+	private DictionaryFileRef getRef(ArrayList<DictionaryFileRef> files,
+			String file, String path) {
+		DictionaryFileRef retval = null;
+		for (int i = 0; i < files.size() && retval == null; i++) {
+			DictionaryFileRef ref = files.get(i);
+			if (ref.file.equals(file) && ref.path.equals(path)) {
+				retval = ref;
+			}
+		}
+		return retval;
+	}
+
+	/**
+	 * Creates the component definition
+	 */
+	private void createComponent() {
+		TraceModel model = dictionaryFile.getOwner().getModel();
+		int compid = model.getID();
+		// Component prefix and suffix are in property file.
+		// If not there, the default values are used
+		String prefix = TraceObjectUtils.findProperty(model,
+				PropertyNames.PREFIX);
+		if (prefix == null || prefix.length() == 0) {
+			prefix = FormattingUtils.getDefaultComponentPrefix(model);
+		}
+		String suffix = TraceObjectUtils.findProperty(model,
+				PropertyNames.SUFFIX);
+		if (suffix == null || suffix.length() == 0) {
+			suffix = FormattingUtils.getDefaultComponentSuffix(model);
+		}
+		Dictionary.startComponent(compid, dictionaryFile.getProjectName(),
+				prefix, suffix);
+		for (TraceGroup group : model) {
+			createGroup(group);
+		}
+		Dictionary.endComponent();
+	}
+
+	/**
+	 * Creates a group definition
+	 * 
+	 * @param group
+	 *            the group
+	 */
+	private void createGroup(TraceGroup group) {
+		String prefix = TraceObjectUtils.findProperty(group,
+				PropertyNames.PREFIX);
+		if (prefix == null || prefix.length() == 0) {
+			prefix = FormattingUtils.getDefaultGroupPrefix(group);
+		}
+		String suffix = TraceObjectUtils.findProperty(group,
+				PropertyNames.SUFFIX);
+		if (suffix == null || suffix.length() == 0) {
+			suffix = FormattingUtils.getDefaultGroupSuffix(group);
+		}
+		TraceComponent.startGroup(group.getID(), group.getName(), prefix,
+				suffix);
+		for (Trace trace : group) {
+			createTrace(trace);
+		}
+		TraceComponent.endGroup();
+	}
+
+	/**
+	 * Creates a trace definition
+	 * 
+	 * @param trace
+	 *            the trace
+	 */
+	private void createTrace(Trace trace) {
+		DictionaryDefRef defref = trace.getExtension(DictionaryDefRef.class);
+		if (defref != null) {
+			DictionaryFileRef fileref = trace
+					.getExtension(DictionaryFileRef.class);
+			com.nokia.tracecompiler.decodeplugins.dictionary.encoder.TraceGroup.startTrace(defref
+					.getRefId(), trace.getName());
+			if (fileref != null) {
+				writeTraceWithLocation(fileref.getRefId(), trace);
+			} else {
+				com.nokia.tracecompiler.decodeplugins.dictionary.encoder.Trace.writeInstance(trace
+						.getID(), 0, 0, "", //$NON-NLS-1$
+						""); //$NON-NLS-1$
+			}
+			com.nokia.tracecompiler.decodeplugins.dictionary.encoder.TraceGroup.endTrace();
+		}
+		trace.removeExtensions(DictionaryRef.class);
+
+	}
+
+	/**
+	 * Writes a trace which has a source location
+	 * 
+	 * @param refId
+	 *            file reference number
+	 * @param trace
+	 *            the trace
+	 */
+	private void writeTraceWithLocation(int refId, Trace trace) {
+		LocationProperties loc = findFirstLocation(trace);
+		int line = 0;
+		String className = ""; //$NON-NLS-1$
+		String functionName = ""; //$NON-NLS-1$
+		if (loc != null) {
+			line = loc.getLineNumber();
+			className = loc.getClassName();
+			functionName = loc.getFunctionName();
+		}
+		com.nokia.tracecompiler.decodeplugins.dictionary.encoder.Trace.writeInstance(trace.getID(),
+				refId, line, functionName, className);
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/DictionaryPreferences.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,46 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Preferences for dictionary
+*
+*/
+package com.nokia.tracecompiler.decodeplugins.dictionary;
+
+/**
+ * Preferences for dictionary
+ * 
+ */
+public interface DictionaryPreferences {
+
+	/**
+	 * Export path for dictionary files
+	 */
+	String EXPORT_PATH = "Dictionary.exportPath"; //$NON-NLS-1$
+
+	/**
+	 * Default path where to export dictionary files
+	 */
+	String DEFAULT_EXPORT_PATH = "epoc32/ost_dictionaries"; //$NON-NLS-1$
+
+	/**
+	 * Gets a property from preferences
+	 * 
+	 * @param name
+	 *            the property name
+	 * @return the property value
+	 */
+	public String getString(String name);
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/DictionaryRef.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,72 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Reference base class
+*
+*/
+package com.nokia.tracecompiler.decodeplugins.dictionary;
+
+import com.nokia.tracecompiler.model.TraceModelExtension;
+import com.nokia.tracecompiler.model.TraceObject;
+
+/**
+ * Reference base class
+ * 
+ */
+class DictionaryRef implements TraceModelExtension {
+
+	/**
+	 * Reference id
+	 */
+	int refid;
+
+	/**
+	 * Constructor
+	 * 
+	 * @param refid
+	 *            the reference id
+	 */
+	DictionaryRef(int refid) {
+		this.refid = refid;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.model.TraceModelExtension#getOwner()
+	 */
+	public TraceObject getOwner() {
+		return null;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.model.TraceModelExtension#
+	 *      setOwner(com.nokia.tracecompiler.model.TraceObject)
+	 */
+	public void setOwner(TraceObject owner) {
+	}
+
+	/**
+	 * Gets the reference id
+	 * 
+	 * @return ID
+	 */
+	int getRefId() {
+		return refid;
+	}
+
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/Messages.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,64 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Localization for dictionary package
+*
+*/
+package com.nokia.tracecompiler.decodeplugins.dictionary;
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+/**
+ * Localization for dictionary package
+ * 
+ */
+class Messages {
+
+	/**
+	 * Bundle name
+	 */
+	private static final String BUNDLE_NAME = "com.nokia.tracecompiler.decodeplugins.dictionary.messages"; //$NON-NLS-1$
+
+	/**
+	 * Bundle
+	 */
+	private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
+			.getBundle(BUNDLE_NAME);
+
+	/**
+	 * Prevents construction
+	 */
+	private Messages() {
+
+	}
+
+	/**
+	 * Gets localized string based on key
+	 * 
+	 * @param key
+	 *            the resource key
+	 * @return the localized resource
+	 */
+	public static String getString(String key) {
+		String value;
+		try {
+			value = RESOURCE_BUNDLE.getString(key);
+		} catch (MissingResourceException e) {
+			value = '!' + key + '!';
+		}
+		return value;
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/encoder/DataType.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,96 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* DataType enumeration
+*
+*/
+package com.nokia.tracecompiler.decodeplugins.dictionary.encoder;
+
+/**
+ * DataType enumeration
+ * 
+ */
+public enum DataType {
+
+	/**
+	 * String type
+	 */
+	STRING("string"), //$NON-NLS-1$
+
+	/**
+	 * Integer type
+	 */
+	INTEGER("integer"), //$NON-NLS-1$
+
+	/**
+	 * Float type
+	 */
+	FLOAT("float"), //$NON-NLS-1$
+
+	/**
+	 * Hex type
+	 */
+	HEX("hex"), //$NON-NLS-1$
+
+	/**
+	 * Binary type
+	 */
+	BINARY("binary"), //$NON-NLS-1$
+
+	/**
+	 * Octal type
+	 */
+	OCTAL("octal"), //$NON-NLS-1$
+
+	/**
+	 * Enum type
+	 */
+	ENUM("enum"), //$NON-NLS-1$
+
+	/**
+	 * Raw type
+	 */
+	RAW("raw"), //$NON-NLS-1$
+
+	/**
+	 * Compound type
+	 */
+	COMPOUND("compound"); //$NON-NLS-1$
+
+	/**
+	 * Data type
+	 */
+	private final String type;
+
+	/**
+	 * Constructor
+	 * 
+	 * @param type
+	 *            the type
+	 */
+	private DataType(String type) {
+		this.type = type;
+	}
+
+	/**
+	 * Gets the type as string
+	 * 
+	 * @return type
+	 */
+	public String getType() {
+		return type;
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/encoder/Dictionary.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,101 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Dictionary tag
+*
+*/
+package com.nokia.tracecompiler.decodeplugins.dictionary.encoder;
+
+/**
+ * Dictionary tag
+ * 
+ */
+public class Dictionary {
+
+	/**
+	 * Writes start of the XML file and starts &lt;tracedictionary&gt; structure
+	 */
+	public static void startDictionary() {
+		TagWriter.write(TagWriter.XML_START, TagWriter.INDENT_0);
+		TagWriter.write(TagWriter.DICTIONARY_START, TagWriter.INDENT_0);
+	}
+
+	/**
+	 * Writes &lt;/tracedictionary&gt;
+	 */
+	public static void endDictionary() {
+		TagWriter.write(TagWriter.DICTIONARY_END, TagWriter.INDENT_0);
+		TagWriter.close();
+	}
+
+	/**
+	 * Starts &lt;component id="", name="" prefix="" suffix=""&gt; structure
+	 * 
+	 * @param id
+	 *            unique component id within dictionary
+	 * @param name
+	 *            name of the component
+	 * @param prefix
+	 *            optional prefix for the component
+	 * @param suffix
+	 *            optional suffix for the component
+	 */
+	public static void startComponent(int id, String name, String prefix,
+			String suffix) {
+		TraceComponent.startComponent(id, name, prefix, suffix);
+
+	}
+
+	/**
+	 * Writes &lt;/component&gt;
+	 */
+	public static void endComponent() {
+		TraceComponent.endComponent();
+	}
+
+	/**
+	 * Starts &lt;metadata&gt; structure
+	 */
+	public static void startMetaData() {
+		TagWriter.write(TagWriter.METADATA_START, TagWriter.INDENT_1);
+	}
+
+	/**
+	 * Writes user defined tags &lt;mytagXXX&gt;value&lt;/mytagXXX&gt;
+	 * 
+	 * @param name
+	 *            tag
+	 * @param value
+	 *            value of the tag
+	 */
+	public static void writeMetaData(String name, String value) {
+		StringBuffer sb = new StringBuffer();
+		sb.append(TagWriter.START_TAG_OPEN);
+		sb.append(name);
+		sb.append(TagWriter.TAG_CLOSE);
+		sb.append(XMLDataFilter.changeData(value));
+		sb.append(TagWriter.END_TAG_OPEN);
+		sb.append(name);
+		sb.append(TagWriter.TAG_CLOSE);
+		TagWriter.write(sb.toString(), TagWriter.INDENT_2);
+	}
+
+	/**
+	 * Writes &lt;/metadata&gt;
+	 */
+	public static void endMetaData() {
+		TagWriter.write(TagWriter.METADATA_END, TagWriter.INDENT_1);
+	}
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/encoder/LocationStore.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,81 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Location store
+*
+*/
+package com.nokia.tracecompiler.decodeplugins.dictionary.encoder;
+
+/**
+ * Location store
+ * 
+ */
+public class LocationStore {
+
+	/**
+	 * Writes &lt;locations&gt;
+	 */
+	public static void startLocations() {
+		TagWriter.write(TagWriter.LOCATIONS_START, TagWriter.INDENT_1);
+	}
+
+	/**
+	 * Starts &lt;path val=""&gt; structure
+	 * 
+	 * @param path
+	 *            relative or absolute path to some directory
+	 */
+	public static void startPath(String path) {
+		StringBuffer sb = new StringBuffer();
+		sb.append(TagWriter.PATH_START_OPEN);
+		TagWriter.appendAttribute(sb, TagWriter.VAL_ATTR, path, false);
+		sb.append(TagWriter.TAG_CLOSE);
+		TagWriter.write(sb.toString(), TagWriter.INDENT_2);
+	}
+
+	/**
+	 * Writes &lt;file id=""&gt;fileName&lt;/file&gt; structure
+	 * 
+	 * @param id
+	 *            unique number within &lt;locations&gt; structure
+	 * @param fileName
+	 *            value of the file element
+	 */
+	public static void writeFile(int id, String fileName) {
+		StringBuffer sb = new StringBuffer();
+		sb.append(TagWriter.FILE_START_OPEN);
+		TagWriter.appendAttribute(sb, TagWriter.ID_ATTR, String.valueOf(id),
+				false);
+		sb.append(TagWriter.TAG_CLOSE);
+		sb.append(XMLDataFilter.changeData(fileName));
+		sb.append(TagWriter.FILE_END);
+		TagWriter.write(sb.toString(), TagWriter.INDENT_3);
+	}
+
+	/**
+	 * Writes &lt;/path&gt;
+	 */
+	public static void endPath() {
+		TagWriter.write(TagWriter.PATH_END, TagWriter.INDENT_2);
+	}
+
+	/**
+	 * Writes &lt;/locations&gt;
+	 */
+	public static void endLocations() {
+		TagWriter.write(TagWriter.LOCATIONS_END, TagWriter.INDENT_1);
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/encoder/Options.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,69 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Options
+*
+*/
+package com.nokia.tracecompiler.decodeplugins.dictionary.encoder;
+
+/**
+ * Options
+ * 
+ */
+public class Options {
+
+	/**
+	 * Writes &lt;options&gt;
+	 * 
+	 * @param indent
+	 *            amount of tabs for indent
+	 */
+	static void startOptions(int indent) {
+		TagWriter.write(TagWriter.OPTIONS_START, indent);
+	}
+
+	/**
+	 * Writes &lt;/options&gt;
+	 * 
+	 * @param indent
+	 *            amount of tabs for indent
+	 */
+	static void endOptions(int indent) {
+		TagWriter.write(TagWriter.OPTIONS_END, indent);
+	}
+
+	/**
+	 * Writes user defined tags &lt;mytagXXX&gt;value&lt;/mytagXXX&gt;
+	 * 
+	 * @param tag
+	 *            user defined tag
+	 * @param value
+	 *            value of the tag
+	 * @param indent
+	 *            amount of tabs for indent
+	 */
+	static void writeOptions(String tag, String value, int indent) {
+		StringBuffer sb = new StringBuffer();
+		sb.append(TagWriter.START_TAG_OPEN);
+		sb.append(tag);
+		sb.append(TagWriter.TAG_CLOSE);
+		sb.append(XMLDataFilter.changeData(value));
+		sb.append(TagWriter.END_TAG_OPEN);
+		sb.append(tag);
+		sb.append(TagWriter.TAG_CLOSE);
+		TagWriter.write(sb.toString(), indent);
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/encoder/TagWriter.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,489 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Tag writer
+*
+*/
+package com.nokia.tracecompiler.decodeplugins.dictionary.encoder;
+
+import java.io.BufferedOutputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.io.OutputStreamWriter;
+
+/**
+ * Tag writer
+ * 
+ */
+class TagWriter {
+
+	/**
+	 * 
+	 */
+	private static final String OUTPUT_FORMAT_UTF8 = "UTF-8"; //$NON-NLS-1$
+
+	/**
+	 * 
+	 */
+	private static OutputStreamWriter m_writer = null;
+
+	/**
+	 * 
+	 */
+	static final String XML_START = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"; //$NON-NLS-1$
+
+	/**
+	 * 
+	 */
+	static final String CLASSIFICATION_ATTR = "classification="; //$NON-NLS-1$
+
+	/**
+	 * 
+	 */
+	static final String CLASSNAME_ATTR = "classname="; //$NON-NLS-1$
+
+	/**
+	 * 
+	 */
+	static final String COMPONENT_START_OPEN = "<component "; //$NON-NLS-1$
+
+	/**
+	 * 
+	 */
+	static final String COMPONENT_END = "</component>"; //$NON-NLS-1$
+
+	/**
+	 * 
+	 */
+	static final String DATA_REF_ATTR = "data-ref="; //$NON-NLS-1$
+
+	/**
+	 * 
+	 */
+	static final String DATASTORE_START = "<datastore>"; //$NON-NLS-1$
+
+	/**
+	 * 
+	 */
+	static final String DATASTORE_END = "<datastore>"; //$NON-NLS-1$
+
+	/**
+	 * 
+	 */
+	static final String DEF_END = "</def>"; //$NON-NLS-1$
+
+	/**
+	 * 
+	 */
+	static final String DEF_START_OPEN = "<def "; //$NON-NLS-1$
+
+	/**
+	 * 
+	 */
+	static final String DICTIONARY_START = "<tracedictionary xmlns:xsi=" + //$NON-NLS-1$
+			"\"http://www.w3.org/2001/XMLSchema-instance\" " + //$NON-NLS-1$
+			"xsi:noNamespaceSchemaLocation=\"DictionarySchema.xsd\">";//$NON-NLS-1$
+
+	/**
+	 * 
+	 */
+	static final String DICTIONARY_END = "</tracedictionary>"; //$NON-NLS-1$
+
+	/**
+	 * 
+	 */
+	static final String END_TAG_OPEN = "</"; //$NON-NLS-1$
+
+	/**
+	 * 
+	 */
+	static final String EXTERNAL_DEF_END = "</external-def>"; //$NON-NLS-1$
+
+	/**
+	 * 
+	 */
+	static final String EXTERNAL_DEF_START = "<external-def>"; //$NON-NLS-1$
+
+	/**
+	 * 
+	 */
+	static final String FILE_START_OPEN = "<file "; //$NON-NLS-1$
+
+	/**
+	 * 
+	 */
+	static final String FILE_END = "</file>"; //$NON-NLS-1$
+
+	/**
+	 * 
+	 */
+	static final String FORMATCHAR_ATTR = "formatchar="; //$NON-NLS-1$
+
+	/**
+	 * 
+	 */
+	static final String GROUP_END = "</group>"; //$NON-NLS-1$
+
+	/**
+	 * 
+	 */
+	static final String GROUP_START_OPEN = "<group "; //$NON-NLS-1$
+
+	/**
+	 * 
+	 */
+	static final String ID_ATTR = "id="; //$NON-NLS-1$
+
+	/**
+	 * 
+	 */
+	static final String INSTANCE_START_OPEN = "<instance "; //$NON-NLS-1$
+
+	/**
+	 * 
+	 */
+	static final String INSTANCE_END = "</instance>"; //$NON-NLS-1$
+
+	/**
+	 * 
+	 */
+	static final String LINE_ATTR = "line="; //$NON-NLS-1$
+
+	/**
+	 * 
+	 */
+	static final String LOC_REF_ATTR = "loc-ref="; //$NON-NLS-1$
+
+	/**
+	 * 
+	 */
+	static final String LOCATIONS_START = "<locations>"; //$NON-NLS-1$
+
+	/**
+	 * 
+	 */
+	static final String LOCATIONS_END = "</locations>"; //$NON-NLS-1$
+
+	/**
+	 * 
+	 */
+	static final String METHODNAME_ATTR = "methodname="; //$NON-NLS-1$
+
+	/**
+	 * 
+	 */
+	static final String METADATA_START = "<metadata>"; //$NON-NLS-1$
+
+	/**
+	 * 
+	 */
+	static final String METADATA_END = "</metadata>"; //$NON-NLS-1$
+
+	/**
+	 * 
+	 */
+	static final String NAME_ATTR = "name="; //$NON-NLS-1$
+
+	/**
+	 * 
+	 */
+	static final String NAME_START = "<name>"; //$NON-NLS-1$
+
+	/**
+	 * 
+	 */
+	static final String NAME_END = "</name>"; //$NON-NLS-1$
+
+	/**
+	 * 
+	 */
+	static final String OBJECT_END = "</object>"; //$NON-NLS-1$
+
+	/**
+	 * 
+	 */
+	static final String OBJECT_START = "<object>"; //$NON-NLS-1$
+
+	/**
+	 * 
+	 */
+	static final String OBJECT_START_OPEN = "<object "; //$NON-NLS-1$
+
+	/**
+	 * 
+	 */
+	static final String OPTIONS_START = "<options>"; //$NON-NLS-1$
+
+	/**
+	 * 
+	 */
+	static final String OPTIONS_START_OPEN = "<options "; //$NON-NLS-1$
+
+	/**
+	 * 
+	 */
+	static final String OPTIONS_END = "</options>"; //$NON-NLS-1$
+
+	/**
+	 * 
+	 */
+	static final String PATH_START_OPEN = "<path "; //$NON-NLS-1$
+
+	/**
+	 * 
+	 */
+	static final String PATH_END = "</path>"; //$NON-NLS-1$
+
+	/**
+	 * 
+	 */
+	static final String PREFIX_ATTR = "prefix="; //$NON-NLS-1$
+
+	/**
+	 * 
+	 */
+	static final String QUOTE = "\""; //$NON-NLS-1$
+
+	/**
+	 * 
+	 */
+	static final String ROW_CHANGE = "\n"; //$NON-NLS-1$
+
+	/**
+	 * 
+	 */
+	static final String SIZE_ATTR = "size="; //$NON-NLS-1$
+
+	/**
+	 * 
+	 */
+	static final String SPACE = " "; //$NON-NLS-1$
+
+	/**
+	 * 
+	 */
+	static final String START_TAG_OPEN = "<"; //$NON-NLS-1$
+
+	/**
+	 * 
+	 */
+	static final String SUFFIX_ATTR = "suffix="; //$NON-NLS-1$
+
+	/**
+	 * 
+	 */
+	static final String TAB = "\t"; //$NON-NLS-1$
+
+	/**
+	 * 
+	 */
+	static final String TAG_CLOSE = ">"; //$NON-NLS-1$
+
+	/**
+	 * 
+	 */
+	static final String TAG_END = "/>"; //$NON-NLS-1$
+
+	/**
+	 * 
+	 */
+	static final String TRACE_END = "</trace>"; //$NON-NLS-1$
+
+	/**
+	 * 
+	 */
+	static final String TRACE_START = "<trace>"; //$NON-NLS-1$
+
+	/**
+	 * 
+	 */
+	static final String TRACE_START_OPEN = "<trace "; //$NON-NLS-1$
+
+	/**
+	 * 
+	 */
+	static final String TRACE_DATA_END = "</data>"; //$NON-NLS-1$
+
+	/**
+	 * 
+	 */
+	static final String TRACE_DATA_START = "<data>"; //$NON-NLS-1$
+
+	/**
+	 * 
+	 */
+	static final String TYPE_ATTR = "type="; //$NON-NLS-1$
+
+	/**
+	 * 
+	 */
+	static final String TYPEDEFS_START = "<typedefs>"; //$NON-NLS-1$
+
+	/**
+	 * 
+	 */
+	static final String TYPEDEFS_END = "</typedefs>"; //$NON-NLS-1$
+
+	/**
+	 * 
+	 */
+	static final String TYPEMEMBER_END = "</typemember>"; //$NON-NLS-1$
+
+	/**
+	 * 
+	 */
+	static final String TYPEMEMBER_START = "<typemember>"; //$NON-NLS-1$
+
+	/**
+	 * 
+	 */
+	static final String TYPEMEMBER_START_OPEN = "<typemember "; //$NON-NLS-1$
+
+	/**
+	 * 
+	 */
+	static final String VAL_ATTR = "val="; //$NON-NLS-1$
+
+	/**
+	 * 
+	 */
+	static final String VALUE_ATTR = "value="; //$NON-NLS-1$
+
+	/**
+	 * 
+	 */
+	static final String VALUE_START = "<value>"; //$NON-NLS-1$
+
+	/**
+	 * 
+	 */
+	static final String VALUE_END = "</value>"; //$NON-NLS-1$
+
+	/**
+	 * 
+	 */
+	static final int INDENT_0 = 0;
+
+	/**
+	 * 
+	 */
+	static final int INDENT_1 = 1;
+
+	/**
+	 * 
+	 */
+	static final int INDENT_2 = 2; // CodForChk_Dis_Magic
+
+	/**
+	 * 
+	 */
+	static final int INDENT_3 = 3;// CodForChk_Dis_Magic
+
+	/**
+	 * 
+	 */
+	static final int INDENT_4 = 4;// CodForChk_Dis_Magic
+
+	/**
+	 * 
+	 */
+	static final int INDENT_5 = 5;// CodForChk_Dis_Magic
+
+	/**
+	 * 
+	 */
+	static final int INDENT_6 = 6;// CodForChk_Dis_Magic
+
+	/**
+	 * Initializes TagWriter
+	 * 
+	 * @param filePath
+	 *            name of the output file
+	 */
+	static void initialize(String filePath) {
+		try {
+			OutputStream fout = new FileOutputStream(filePath);
+			OutputStream bout = new BufferedOutputStream(fout);
+			m_writer = new OutputStreamWriter(bout, OUTPUT_FORMAT_UTF8);
+		} catch (java.io.IOException e) {
+			e.printStackTrace();
+		}
+	}
+
+	/**
+	 * Writes tag to XML file
+	 * 
+	 * @param tag
+	 *            name of the tag
+	 * @param indent
+	 *            amount of tabs for indent
+	 */
+	static void write(String tag, int indent) {
+		try {
+			StringBuffer sb = new StringBuffer();
+			for (int i = 0; i < indent; i++) {
+				sb.append(TAB);
+			}
+			sb.append(tag);
+			sb.append(ROW_CHANGE);
+			m_writer.write(sb.toString());
+		} catch (IOException e) {
+			e.printStackTrace();
+		}
+	}
+
+	/**
+	 * Appends attribute to given StringBuffer
+	 * 
+	 * @param sb
+	 *            buffer to be updated
+	 * @param attribute
+	 *            attribute to append
+	 * @param value
+	 *            value of the attribute
+	 * @param withSpace
+	 *            is there leading space before attribute
+	 */
+	static void appendAttribute(StringBuffer sb, String attribute,
+			String value, boolean withSpace) {
+		if (value != null) {
+			if (withSpace) {
+				sb.append(SPACE);
+			}
+			sb.append(attribute);
+			sb.append(QUOTE);
+			sb.append(value);
+			sb.append(QUOTE);
+		}
+	}
+
+	/**
+	 * Closes TagWriter
+	 */
+	static void close() {
+		try {
+			m_writer.flush();
+		} catch (IOException e) {
+			e.printStackTrace();
+		}
+
+		try {
+			m_writer.close();
+		} catch (IOException e) {
+			e.printStackTrace();
+		}
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/encoder/TestEncoder.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,133 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Testing class for Encoder
+*
+*/
+package com.nokia.tracecompiler.decodeplugins.dictionary.encoder;
+
+/**
+ * Testing class for Encoder
+ * 
+ */
+public class TestEncoder {
+
+	/**
+	 * 
+	 */
+	private static final String DICTIONARY1 = "c:\\Temp\\traces.xml"; //$NON-NLS-1$
+
+	/**
+	 * 
+	 */
+	private static final String DICTIONARY2 = "c:\\Temp\\traces2.xml"; //$NON-NLS-1$
+
+	/**
+	 * @param args
+	 */
+	public static void main(String[] args) {
+		TraceDictionaryEncoder encoder = new TraceDictionaryEncoder();
+		encoder.createNewDictionary(DICTIONARY1);
+		Dictionary.startDictionary();
+		Dictionary.startMetaData();
+		Dictionary.writeMetaData("name", "<Metadata>"); //$NON-NLS-1$ //$NON-NLS-2$
+		Dictionary.writeMetaData("id", "1"); //$NON-NLS-1$ //$NON-NLS-2$
+		Dictionary.endMetaData();
+		TypeDefStore.startTypeDefs();
+		TypeDefStore.writeExternalDefFile("<?xml version=\"1.0\" encoding=" //$NON-NLS-1$
+				+ "\"UTF-8\"?> <external>c:\\Temp\\ExternalDef.xml</external>"); //$NON-NLS-1$
+		TypeDefStore.startTypeDef("TBool", 1, null, DataType.BINARY); //$NON-NLS-1$
+		TypeDef.writeTypeMember(0, "EFalse", "BOOL"); //$NON-NLS-1$ //$NON-NLS-2$
+		TypeDef.writeTypeMember(-1, "iX", "TInt"); //$NON-NLS-1$ //$NON-NLS-2$
+		TypeDef.writeTypeMember(0, "EFalse", null); //$NON-NLS-1$
+		TypeDefStore.endTypeDef();
+		TypeDefStore.startTypeDef("TPoint", -1, null, DataType.COMPOUND); //$NON-NLS-1$
+		TypeDef.writeTypeMember(-1, "iX", "TInt"); //$NON-NLS-1$ //$NON-NLS-2$
+		TypeDef.writeTypeMember(-1, "iY", "TInt"); //$NON-NLS-1$ //$NON-NLS-2$
+		TypeDefStore.endTypeDef();
+		TypeDefStore.writeTypeDef("TPixel", 1, "u", DataType.RAW); //$NON-NLS-1$ //$NON-NLS-2$
+		TypeDefStore.endTypeDefs();
+		TraceDataStore.startDataStore();
+		TraceDataStore.writeData(3, DataType.HEX, "<hex> value is 0xFF"); //$NON-NLS-1$ CodForChk_Dis_Magic
+		TraceDataStore.writeData(2, DataType.OCTAL, "<octal> value is 8"); //$NON-NLS-1$ CodForChk_Dis_Magic
+		TraceDataStore.writeData(1, DataType.BINARY, "<binary> value is 0"); //$NON-NLS-1$
+		TraceDataStore.endDataStore();
+		LocationStore.startLocations();
+		LocationStore.startPath("<?xml version=\"1.0\" encoding=" //$NON-NLS-1$
+				+ "\"UTF-8\"?><file>C:\\Temp\\</file>"); //$NON-NLS-1$
+		LocationStore.writeFile(1, "<?xml version=\"1.0\" encoding=" //$NON-NLS-1$
+				+ "\"UTF-8\"?><file>C:\\Temp\\file1.txt</file>"); //$NON-NLS-1$
+		LocationStore.writeFile(2, "<?xml version=\"1.0\" encoding=" //$NON-NLS-1$ CodForChk_Dis_Magic
+				+ "\"UTF-8\"?><file>C:\\Temp\\file2.txt</file>"); //$NON-NLS-1$
+		LocationStore.endPath();
+		LocationStore.endLocations();
+		Dictionary.startComponent(666, "Satan", null, null); //$NON-NLS-1$ CodForChk_Dis_Magic
+		TraceComponent.startOptions();
+		TraceComponent.writeOption("background", "red"); //$NON-NLS-1$ //$NON-NLS-2$
+		TraceComponent.startGroup(1, "Group UNO", "pre", "suf"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+		TraceGroup.startOptions();
+		TraceGroup.writeOption("JeesTag", "<Tampura>"); //$NON-NLS-1$ //$NON-NLS-2$
+		TraceGroup.writeOption("NoTag", "<Ilkves>"); //$NON-NLS-1$ //$NON-NLS-2$
+		TraceGroup.endOptions();
+		TraceGroup.startTrace(-1, null);
+		Trace.startOptions();
+		Trace.writeOption("MyTag", "Value"); //$NON-NLS-1$ //$NON-NLS-2$
+		Trace.endOptions();
+		Trace.writeInstance(99, 1, 22, "testMethod", "testClass"); //$NON-NLS-1$ //$NON-NLS-2$ CodForChk_Dis_Magic
+		TraceGroup.endTrace();
+		TraceGroup.startTrace(-1, null);
+		Trace.writeInstance(100, 1, 235, "heyBabe", "auts"); //$NON-NLS-1$ //$NON-NLS-2$ CodForChk_Dis_Magic
+		Trace.writeInstance(100, 2, 291, "heyBabe2", "auts2"); //$NON-NLS-1$ //$NON-NLS-2$ CodForChk_Dis_Magic
+		TraceGroup.endTrace();
+		TraceComponent.endGroup();
+		Dictionary.endComponent();
+		Dictionary.endDictionary();
+
+		TraceDictionaryEncoder encoder2 = new TraceDictionaryEncoder();
+		encoder2.createNewDictionary(DICTIONARY2);
+		Dictionary.startDictionary();
+		Dictionary.startMetaData();
+		Dictionary.writeMetaData("id", "1"); //$NON-NLS-1$ //$NON-NLS-2$
+		Dictionary.writeMetaData("name", "Metadata Example"); //$NON-NLS-1$ //$NON-NLS-2$
+		Dictionary.endMetaData();
+		TypeDefStore.startTypeDefs();
+		TypeDefStore.writeExternalDefFile("StandardTypeDefs.xml"); //$NON-NLS-1$
+		TypeDefStore.writeTypeDef("TUint", 4, "u", DataType.ENUM); //$NON-NLS-1$ //$NON-NLS-2$ CodForChk_Dis_Magic
+		TypeDefStore.startTypeDef("TBool", 1, null, DataType.ENUM); //$NON-NLS-1$
+		TypeDef.writeTypeMember(0, "EFalse", null); //$NON-NLS-1$
+		TypeDef.writeTypeMember(1, "ETrue", null); //$NON-NLS-1$
+		TypeDefStore.endTypeDef();
+		TraceDataStore.startDataStore();
+		TraceDataStore.writeData(1, DataType.STRING, "My integer value: %d"); //$NON-NLS-1$
+		TraceDataStore.endDataStore();
+		LocationStore.startLocations();
+		LocationStore.startPath("../src"); //$NON-NLS-1$
+		LocationStore.writeFile(1, "foo.cpp"); //$NON-NLS-1$
+		LocationStore.writeFile(2, "foo2.cpp"); //$NON-NLS-1$ CodForChk_Dis_Magic
+		LocationStore.endPath();
+		LocationStore.endLocations();
+		Dictionary.startComponent(12345678, "ComName", "ComPrefix", null); //$NON-NLS-1$ //$NON-NLS-2$ CodForChk_Dis_Magic
+		TraceComponent.startGroup(1, "Flow", "GroupPrefix", "GroupSuffix"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+		TraceGroup.startTrace(1, null);
+		Trace.writeInstance(1, 1, 14, "MyGlobalMethodL", null); //$NON-NLS-1$ CodForChk_Dis_Magic
+		Trace.writeInstance(2, 1, 214, "MyClassMethod", null); //$NON-NLS-1$ CodForChk_Dis_Magic
+		TraceGroup.endTrace();
+		TraceComponent.endGroup();
+		Dictionary.endComponent();
+		Dictionary.endDictionary();
+
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/encoder/Trace.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,120 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Writes Trace objects
+*
+*/
+package com.nokia.tracecompiler.decodeplugins.dictionary.encoder;
+
+/**
+ * Writes Trace objects
+ * 
+ */
+public class Trace {
+
+	/**
+	 * Starts &lt;trace data-ref=""&gt; structure
+	 * 
+	 * @param dataRef
+	 *            reference to actual data stored in &lt;data&gt; structure
+	 * @param name
+	 *            name of the trace. Can be null if trace doesn't have name
+	 */
+	static void startTrace(int dataRef, String name) {
+		StringBuffer sb = new StringBuffer();
+		sb.append(TagWriter.TRACE_START_OPEN);
+		if (dataRef >= 0) {
+			TagWriter.appendAttribute(sb, TagWriter.DATA_REF_ATTR, String
+					.valueOf(dataRef), false);
+
+			if (name != null && name != "") { //$NON-NLS-1$
+				TagWriter.appendAttribute(sb, TagWriter.NAME_ATTR, name, true);
+			}
+		}
+		sb.append(TagWriter.TAG_CLOSE);
+		TagWriter.write(sb.toString(), TagWriter.INDENT_3);
+
+	}
+
+	/**
+	 * Writes &lt;/trace&gt;
+	 */
+	static void endTrace() {
+		TagWriter.write(TagWriter.TRACE_END, TagWriter.INDENT_3);
+	}
+
+	/**
+	 * Writes &lt;options&gt;
+	 */
+	public static void startOptions() {
+		Options.startOptions(TagWriter.INDENT_4);
+	}
+
+	/**
+	 * Writes &lt;/options&gt;
+	 */
+	public static void endOptions() {
+		Options.endOptions(TagWriter.INDENT_4);
+	}
+
+	/**
+	 * Writes user defined tags &lt;mytagXXX&gt;value&lt;/mytagXXX&gt;
+	 * 
+	 * @param tag
+	 *            user defined tag
+	 * @param value
+	 *            value of the tag
+	 */
+	public static void writeOption(String tag, String value) {
+		Options.writeOptions(tag, value, TagWriter.INDENT_5);
+	}
+
+	/**
+	 * Writes &lt;instance id="" locRef="" line="" methodName=""
+	 * className=""/&gt; structure
+	 * 
+	 * @param id
+	 *            unique id number for this instance in current group structure
+	 * @param locRef
+	 *            unique location reference for instance (reference to
+	 *            &lt;locations&gt; structure
+	 * @param line
+	 *            positive number of line where data were founded in source file
+	 * @param methodName
+	 *            name of the function from which trace was generated
+	 * @param className
+	 *            this is class name or namespace name for method described in
+	 *            methodname attribute
+	 */
+	public static void writeInstance(int id, int locRef, int line,
+			String methodName, String className) {
+		StringBuffer sb = new StringBuffer();
+		sb.append(TagWriter.INSTANCE_START_OPEN);
+		TagWriter.appendAttribute(sb, TagWriter.ID_ATTR, String.valueOf(id),
+				false);
+		TagWriter.appendAttribute(sb, TagWriter.LOC_REF_ATTR, String
+				.valueOf(locRef), true);
+		TagWriter.appendAttribute(sb, TagWriter.LINE_ATTR,
+				String.valueOf(line), true);
+		TagWriter.appendAttribute(sb, TagWriter.METHODNAME_ATTR, methodName,
+				true);
+		if (className != null) {
+			TagWriter.appendAttribute(sb, TagWriter.CLASSNAME_ATTR, className,
+					true);
+		}
+		sb.append(TagWriter.TAG_END);
+		TagWriter.write(sb.toString(), TagWriter.INDENT_4);
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/encoder/TraceComponent.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,111 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Writes component objects
+*
+*/
+package com.nokia.tracecompiler.decodeplugins.dictionary.encoder;
+
+/**
+ * Writes component objects
+ * 
+ */
+public class TraceComponent {
+
+	/**
+	 * Starts &lt;component id="", name="" prefix="" suffix=""&gt; structure
+	 * 
+	 * @param id
+	 *            unique component id within dictionary
+	 * @param name
+	 *            name of the component
+	 * @param prefix
+	 *            optional prefix for the component
+	 * @param suffix
+	 *            optional suffix for the component
+	 */
+	static void startComponent(int id, String name, String prefix, String suffix) {
+		StringBuffer sb = new StringBuffer();
+		sb.append(TagWriter.COMPONENT_START_OPEN);
+		TagWriter.appendAttribute(sb, TagWriter.ID_ATTR, String.valueOf(id),
+				false);
+		TagWriter.appendAttribute(sb, TagWriter.NAME_ATTR, name, true);
+		if (prefix != null) {
+			TagWriter.appendAttribute(sb, TagWriter.PREFIX_ATTR, prefix, true);
+		}
+		if (suffix != null) {
+			TagWriter.appendAttribute(sb, TagWriter.SUFFIX_ATTR, suffix, true);
+		}
+		sb.append(TagWriter.TAG_CLOSE);
+		TagWriter.write(sb.toString(), TagWriter.INDENT_1);
+	}
+
+	/**
+	 * Writes &lt;/component&gt;
+	 */
+	static void endComponent() {
+		TagWriter.write(TagWriter.COMPONENT_END, TagWriter.INDENT_1);
+	}
+
+	/**
+	 * Writes &lt;options&gt;
+	 */
+	public static void startOptions() {
+		Options.startOptions(TagWriter.INDENT_2);
+	}
+
+	/**
+	 * Writes user defined tags &lt;mytagXXX&gt;value&lt;/mytagXXX&gt;
+	 * 
+	 * @param tag
+	 *            user defined tag
+	 * @param value
+	 *            value of the tag
+	 */
+	public static void writeOption(String tag, String value) {
+		Options.writeOptions(tag, value, TagWriter.INDENT_3);
+	}
+
+	/**
+	 * Writes &lt;/options&gt;
+	 */
+	public static void endOptions() {
+		Options.endOptions(TagWriter.INDENT_2);
+	}
+
+	/**
+	 * Starts &lt;group id="", name="" prefix="" suffix=""&gt; structure
+	 * 
+	 * @param id
+	 *            unique group identifier within dictionary
+	 * @param name
+	 *            group name
+	 * @param prefix
+	 *            optional prefix for the group
+	 * @param suffix
+	 *            optional suffix for the group
+	 */
+	public static void startGroup(int id, String name, String prefix,
+			String suffix) {
+		TraceGroup.startGroup(id, name, prefix, suffix);
+	}
+
+	/**
+	 * Writes &lt;/group&gt;
+	 */
+	public static void endGroup() {
+		TraceGroup.endGroup();
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/encoder/TraceDataStore.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,66 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Writes Data objects
+*
+*/
+package com.nokia.tracecompiler.decodeplugins.dictionary.encoder;
+
+/**
+ * Writes Data objects
+ * 
+ */
+public class TraceDataStore {
+
+	/**
+	 * Writes &lt;data&gt;
+	 */
+	public static void startDataStore() {
+		TagWriter.write(TagWriter.TRACE_DATA_START, TagWriter.INDENT_1);
+	}
+
+	/**
+	 * Writes &lt;def id="" dataType=""&gt;value&lt;/def&gt; structure
+	 * 
+	 * @param id
+	 *            unique number in &lt;data&gt; structure, it is data identifier
+	 * @param dataType
+	 *            data type, defaults to string
+	 * @param value
+	 *            the value
+	 * 
+	 */
+	public static void writeData(int id, DataType dataType, String value) {
+		StringBuffer sb = new StringBuffer();
+		sb.append(TagWriter.DEF_START_OPEN);
+		TagWriter.appendAttribute(sb, TagWriter.ID_ATTR, String.valueOf(id),
+				false);
+		if (dataType != null) {
+			TagWriter.appendAttribute(sb, TagWriter.TYPE_ATTR, dataType
+					.getType(), true);
+		}
+		sb.append(TagWriter.TAG_CLOSE);
+		sb.append(XMLDataFilter.changeData(value));
+		sb.append(TagWriter.DEF_END);
+		TagWriter.write(sb.toString(), TagWriter.INDENT_2);
+	}
+
+	/**
+	 * Writes &lt;/data&gt;
+	 */
+	public static void endDataStore() {
+		TagWriter.write(TagWriter.TRACE_DATA_END, TagWriter.INDENT_1);
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/encoder/TraceDictionaryEncoder.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,42 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Dictionary encoder class
+*
+*/
+package com.nokia.tracecompiler.decodeplugins.dictionary.encoder;
+
+/**
+ * Dictionary encoder class
+ * 
+ */
+public class TraceDictionaryEncoder {
+
+	/**
+	 * Constructor
+	 */
+	public TraceDictionaryEncoder() {
+	}
+
+	/**
+	 * Creates a new dictionary XML file to given path
+	 * 
+	 * @param filePath
+	 *            the path
+	 */
+	public void createNewDictionary(String filePath) {
+		TagWriter.initialize(filePath);
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/encoder/TraceGroup.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,107 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Writes groups objects
+*
+*/
+package com.nokia.tracecompiler.decodeplugins.dictionary.encoder;
+
+/**
+ * Writes groups objects
+ * 
+ */
+public class TraceGroup {
+
+	/**
+	 * Writes &lt;options&gt;
+	 */
+	public static void startOptions() {
+		Options.startOptions(TagWriter.INDENT_3);
+	}
+
+	/**
+	 * Writes user defined tags &lt;mytagXXX&gt;value&lt;/mytagXXX&gt;
+	 * 
+	 * @param tag
+	 *            user defined tag
+	 * @param value
+	 *            value of the tag
+	 */
+	public static void writeOption(String tag, String value) {
+		Options.writeOptions(tag, value, TagWriter.INDENT_4);
+	}
+
+	/**
+	 * Writes &lt;/options&gt;
+	 */
+	public static void endOptions() {
+		Options.endOptions(TagWriter.INDENT_3);
+	}
+
+	/**
+	 * Starts &lt;trace data-ref=""&gt; structure
+	 * 
+	 * @param dataRef
+	 *            reference to actual data stored in &lt;data&gt; structure
+	 * @param name
+	 *            name of the trace. Can be null if trace doesn't have name            
+	 */
+	public static void startTrace(int dataRef, String name) {
+		Trace.startTrace(dataRef, name);
+	}
+
+	/**
+	 * Writes &lt;/trace&gt;
+	 */
+	public static void endTrace() {
+		Trace.endTrace();
+	}
+
+	/**
+	 * Starts &lt;group id="", name="" prefix="" suffix=""&gt; structure
+	 * 
+	 * @param id
+	 *            unique group identifier within dictionary
+	 * @param name
+	 *            group name
+	 * @param prefix
+	 *            optional prefix for the group
+	 * @param suffix
+	 *            optional suffix for the group
+	 */
+	static void startGroup(int id, String name, String prefix, String suffix) {
+		StringBuffer sb = new StringBuffer();
+		sb.append(TagWriter.GROUP_START_OPEN);
+		TagWriter.appendAttribute(sb, TagWriter.ID_ATTR, String.valueOf(id),
+				false);
+		TagWriter.appendAttribute(sb, TagWriter.NAME_ATTR, name, true);
+		if (prefix != null) {
+			TagWriter.appendAttribute(sb, TagWriter.PREFIX_ATTR, prefix, true);
+		}
+		if (suffix != null) {
+			TagWriter.appendAttribute(sb, TagWriter.SUFFIX_ATTR, suffix, true);
+		}
+		sb.append(TagWriter.TAG_CLOSE);
+		TagWriter.write(sb.toString(), TagWriter.INDENT_2);
+
+	}
+
+	/**
+	 * Writes &lt;/group&gt;
+	 */
+	static void endGroup() {
+		TagWriter.write(TagWriter.GROUP_END, TagWriter.INDENT_2);
+	}
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/encoder/TypeDef.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,52 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Writes type def objects
+*
+*/
+package com.nokia.tracecompiler.decodeplugins.dictionary.encoder;
+
+/**
+ * Writes type def objects
+ * 
+ */
+public class TypeDef {
+
+	/**
+	 * Writes &lt;typemember value="" name="" type=""/&gt; structure
+	 * 
+	 * @param value
+	 *            value which will be assigned to name attribute in case where
+	 *            object have classification equals enum
+	 * @param name
+	 *            text which is assigned to value attribute or to type attribute
+	 * @param type
+	 *            name of data type that will be assigned to name attribute in
+	 *            case where object classification equals compound
+	 */
+	public static void writeTypeMember(int value, String name, String type) {
+		StringBuffer sb = new StringBuffer();
+		sb.append(TagWriter.TYPEMEMBER_START_OPEN);
+		TagWriter.appendAttribute(sb, TagWriter.VALUE_ATTR, String
+				.valueOf(value), false);
+		TagWriter.appendAttribute(sb, TagWriter.NAME_ATTR, name, true);
+		if (type != null) { // optional attribute
+			TagWriter.appendAttribute(sb, TagWriter.TYPE_ATTR, type, true);
+		}
+		sb.append(TagWriter.TAG_END);
+		TagWriter.write(sb.toString(), TagWriter.INDENT_3);
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/encoder/TypeDefStore.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,128 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Writes type definition objects
+*
+*/
+package com.nokia.tracecompiler.decodeplugins.dictionary.encoder;
+
+/**
+ * Writes type definition objects
+ * 
+ */
+public class TypeDefStore {
+
+	/**
+	 * Writes &lt;typedef&gt;
+	 */
+	public static void startTypeDefs() {
+		TagWriter.write(TagWriter.TYPEDEFS_START, TagWriter.INDENT_1);
+	}
+
+	/**
+	 * Writes &lt;external-def&gt;path&lt;/external-def&gt; structure
+	 * 
+	 * @param path
+	 *            path to external dictionary file
+	 */
+	public static void writeExternalDefFile(String path) {
+		StringBuffer sb = new StringBuffer();
+		sb.append(TagWriter.EXTERNAL_DEF_START);
+		sb.append(XMLDataFilter.changeData(path));
+		sb.append(TagWriter.EXTERNAL_DEF_END);
+		TagWriter.write(sb.toString(), TagWriter.INDENT_2);
+	}
+
+	/**
+	 * Starts &lt;object type="" size="" formatChar="" dataType=""&gt; structure
+	 * 
+	 * @param type
+	 *            original type name
+	 * @param size
+	 *            size of typical object, it’s optional because dictionary user
+	 *            can calculate size for compound types by sum size of each
+	 *            member. Give -1 if not used.
+	 * @param formatChar
+	 *            used for formatting
+	 * @param dataType
+	 *            one value form &lt;datatype&gt; enumeration
+	 */
+	public static void startTypeDef(String type, int size, String formatChar,
+			DataType dataType) {
+		StringBuffer sb = new StringBuffer();
+		sb.append(TagWriter.OBJECT_START_OPEN);
+		TagWriter.appendAttribute(sb, TagWriter.TYPE_ATTR, type, false);
+		if (size >= 0) { // optional attribute
+			TagWriter.appendAttribute(sb, TagWriter.SIZE_ATTR, String
+					.valueOf(size), true);
+		}
+		if (formatChar != null) { // optional attribute
+			TagWriter.appendAttribute(sb, TagWriter.FORMATCHAR_ATTR,
+					formatChar, true);
+		}
+		TagWriter.appendAttribute(sb, TagWriter.CLASSIFICATION_ATTR, dataType
+				.getType(), true);
+		sb.append(TagWriter.TAG_CLOSE);
+		TagWriter.write(sb.toString(), TagWriter.INDENT_2);
+	}
+
+	/**
+	 * Writes &lt;object type="" size="" formatChar="" dataType=""/&gt;
+	 * structure
+	 * 
+	 * @param type
+	 *            original type name
+	 * @param size
+	 *            size of typical object, it’s optional because dictionary user
+	 *            can calculate size for compound types by sum size of each
+	 *            member. Give -1 if not used.
+	 * @param formatChar
+	 *            used for formatting
+	 * @param dataType
+	 *            one value form &lt;datatype&gt; enumeration
+	 */
+	public static void writeTypeDef(String type, int size, String formatChar,
+			DataType dataType) {
+		StringBuffer sb = new StringBuffer();
+		sb.append(TagWriter.OBJECT_START_OPEN);
+		TagWriter.appendAttribute(sb, TagWriter.TYPE_ATTR, type, false);
+		if (size >= 0) {
+			TagWriter.appendAttribute(sb, TagWriter.SIZE_ATTR, String
+					.valueOf(size), true);
+		}
+		if (formatChar != null) {
+			TagWriter.appendAttribute(sb, TagWriter.FORMATCHAR_ATTR,
+					formatChar, true);
+		}
+		TagWriter.appendAttribute(sb, TagWriter.CLASSIFICATION_ATTR, dataType
+				.getType(), true);
+		sb.append(TagWriter.TAG_END);
+		TagWriter.write(sb.toString(), TagWriter.INDENT_2);
+	}
+
+	/**
+	 * Writes &lt;/object&gt;
+	 */
+	public static void endTypeDef() {
+		TagWriter.write(TagWriter.OBJECT_END, TagWriter.INDENT_2);
+	}
+
+	/**
+	 * Writes &lt;/typedef&gt;
+	 */
+	public static void endTypeDefs() {
+		TagWriter.write(TagWriter.TYPEDEFS_END, TagWriter.INDENT_1);
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/encoder/XMLDataFilter.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,85 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Replaces special characters with escape sequences 
+*
+*/
+package com.nokia.tracecompiler.decodeplugins.dictionary.encoder;
+
+/**
+ * Replaces special characters with escape sequences
+ * 
+ */
+class XMLDataFilter {
+
+	/**
+	 * XML start tag
+	 */
+	private static final String LEFT_ARROW = "<"; //$NON-NLS-1$
+
+	/**
+	 * XML end tag
+	 */
+	private static final String RIGHT_ARROW = ">"; //$NON-NLS-1$
+
+	/**
+	 * XML entity tag
+	 */
+	private static final String AMPERSAND = "&"; //$NON-NLS-1$
+
+	/**
+	 * XML start tag escaped
+	 */
+	private static final String LEFT_ARROW_SUBST = "&lt;"; //$NON-NLS-1$
+
+	/**
+	 * XML end tag escaped
+	 */
+	private static final String RIGHT_ARROW_SUBST = "&gt;"; //$NON-NLS-1$
+
+	/**
+	 * XML entity tag escaped
+	 */
+	private static final String AMPERSAND_SUBST = "&amp;"; //$NON-NLS-1$
+
+	/**
+	 * Not found result
+	 */
+	private static final int NOT_FOUND = -1;
+
+	/**
+	 * Changes XML data
+	 * 
+	 * @param data
+	 *            data to be changed
+	 * @return changed data
+	 */
+	static String changeData(String data) {
+
+		// This must be before any other that will add & marks to the text.
+		// Otherwise those will be replaced also.
+		if (data.indexOf(AMPERSAND) != NOT_FOUND) {
+			data = data.replaceAll(AMPERSAND, AMPERSAND_SUBST);
+		}
+		if (data.indexOf(LEFT_ARROW) != NOT_FOUND) {
+			data = data.replaceAll(LEFT_ARROW, LEFT_ARROW_SUBST);
+		}
+		if (data.indexOf(RIGHT_ARROW) != NOT_FOUND) {
+			data = data.replaceAll(RIGHT_ARROW, RIGHT_ARROW_SUBST);
+		}
+
+		return data;
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/encoder/package.html	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,3 @@
+<html><body>
+Dictionary encoder is used to create dictionary XML files
+</body></html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/messages.properties	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,1 @@
+DictionaryFile.Title=Dictionary File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/decodeplugins/dictionary/package.html	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,3 @@
+<html><body>
+TraceCompiler plug-in implementation to export the project to Symbian Dictionary format
+</body></html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/document/FileDocument.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,89 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* File-based implementation of the document interface
+*
+*/
+package com.nokia.tracecompiler.document;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+
+import com.nokia.tracecompiler.file.FileUtils;
+import com.nokia.tracecompiler.source.SourceConstants;
+import com.nokia.tracecompiler.source.SourcePropertyProvider;
+
+/**
+ * File-based implementation of the document interface. This extends the string
+ * document with SourcePropertyProvider implementation which can provide the
+ * file name to TraceCompiler source framework
+ * 
+ */
+final class FileDocument extends StringDocument implements
+		SourcePropertyProvider {
+
+	/**
+	 * The file
+	 */
+	private File file;
+
+	/**
+	 * Constructor
+	 * 
+	 * @param file
+	 *            the document file
+	 * @throws IOException
+	 *             if processing fails
+	 */
+	FileDocument(File file) throws IOException {
+		this.file = file;
+		byte[] buf = new byte[(int) file.length()];
+		FileInputStream fis = new FileInputStream(file);
+		fis.read(buf);
+		fis.close();
+		setSourceData(new String(buf));
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.utils.DocumentAdapter#getPropertyProvider()
+	 */
+	@Override
+	public SourcePropertyProvider getPropertyProvider() {
+		return this;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.source.SourcePropertyProvider#getFileName()
+	 */
+	public String getFileName() {
+		return file.getName();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.source.SourcePropertyProvider#getFilePath()
+	 */
+	public String getFilePath() {
+		return FileUtils.convertSeparators(
+				SourceConstants.FORWARD_SLASH_CHAR, file.getParent(), true);
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/document/FileDocumentMonitor.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,135 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Document monitor implementation which reads all files from a directory
+*
+*/
+package com.nokia.tracecompiler.document;
+
+import java.io.File;
+import java.util.ArrayList;
+
+import com.nokia.tracecompiler.TraceCompilerGlobals;
+import com.nokia.tracecompiler.engine.TraceCompilerEngineErrorMessages;
+import com.nokia.tracecompiler.engine.TraceCompilerEngineGlobals;
+import com.nokia.tracecompiler.engine.TraceCompilerEngineErrorCodes.TraceCompilerErrorCode;
+import com.nokia.tracecompiler.engine.source.SourceEngine;
+import com.nokia.tracecompiler.file.FileUtils;
+import com.nokia.tracecompiler.source.SourceDocumentFactory;
+import com.nokia.tracecompiler.source.SourceDocumentProcessor;
+import com.nokia.tracecompiler.utils.DocumentMonitorBase;
+
+/**
+ * Document monitor implementation which reads files
+ * 
+ */
+public final class FileDocumentMonitor extends DocumentMonitorBase {
+
+	/**
+	 * Document factory
+	 */
+	private StringDocumentFactory documentFactory;
+
+	/**
+	 * Files to be processed
+	 */
+	private static String[] files;
+
+	/**
+	 * Sets the files to be used by the document monitor
+	 * 
+	 * @param files
+	 *            the files
+	 */
+	public static void setFiles(String[] files) {
+		FileDocumentMonitor.files = files;
+	}
+
+	/**
+	 * Constructor
+	 */
+	public FileDocumentMonitor() {
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.utils.DocumentMonitorBase#getFactory()
+	 */
+	@Override
+	public SourceDocumentFactory getFactory() {
+		if (documentFactory == null) {
+			documentFactory = new StringDocumentFactory();
+		}
+		return documentFactory;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.utils.DocumentMonitorAdapter#
+	 *      startMonitor(com.nokia.tracecompiler.source.SourceDocumentProcessor)
+	 */
+	@Override
+	public void startMonitor(SourceDocumentProcessor processor) throws Exception {
+		
+		// Put source files and non-source files to same list
+		SourceEngine sourceEngine = TraceCompilerEngineGlobals.getSourceEngine();
+		ArrayList<String> list = sourceEngine.getNonSourceFiles();
+		for (int i=0; i < files.length; i++) {
+			String fileName = files[i];
+			if (!list.contains(fileName)) {
+				list.add(fileName);
+			}
+		}		
+		String[] fileArr = new String[list.size()];
+		list.toArray(fileArr);
+		String err = ""; //$NON-NLS-1$
+		
+		for (String fileName : fileArr) {
+			File file = new File(fileName);
+			if (file.exists() && !file.isDirectory()
+					&& FileUtils.isFileAllowed(file.getName())) {
+				try {
+					TraceCompilerEngineGlobals.getEvents().postInfoMessage(Messages.getString("FileDocumentMonitor.processingSourceFileText") + file.getAbsolutePath(), null); //$NON-NLS-1$
+					processor.sourceOpened(new FileDocument(file));
+				} catch (Exception e) {
+					// Error after processing one file
+					String msg = TraceCompilerEngineErrorMessages
+							.getErrorMessage(
+									TraceCompilerErrorCode.CANNOT_OPEN_SOURCE_FILE,
+									null);
+					TraceCompilerEngineGlobals.getEvents().postErrorMessage(msg,
+							file.getAbsolutePath(),true);
+					err = e.getMessage();
+				} finally {
+					if (TraceCompilerEngineGlobals.getEvents().hasErrorHappened() && !TraceCompilerGlobals.keepGoing())  {
+						throw new Exception("TraceCompiler stopping on error. " + err); //$NON-NLS-1$
+					}
+				}
+			}
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.utils.DocumentMonitorAdapter#stopMonitor()
+	 */
+	@Override
+	public void stopMonitor() {
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/document/Messages.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,57 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Localized strings for engine package
+*
+*/
+package com.nokia.tracecompiler.document;
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+public class Messages {
+
+	/**
+	 * Bundle name
+	 */
+	private static final String BUNDLE_NAME = "com.nokia.tracecompiler.document.messages"; //$NON-NLS-1$
+
+	/**
+	 * Bundle
+	 */
+	private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
+			.getBundle(BUNDLE_NAME);
+
+	/**
+	 * Prevents construction
+	 */
+	private Messages() {
+	}
+
+	/**
+	 * Gets localized string based on key
+	 * 
+	 * @param key
+	 *            the resource key
+	 * @return the localized resource
+	 */
+	public static String getString(String key) {
+		try {
+			return RESOURCE_BUNDLE.getString(key);
+		} catch (MissingResourceException e) {
+			return '!' + key + '!';
+		}
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/document/StringDocument.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,126 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* String-based document object
+*
+*/
+package com.nokia.tracecompiler.document;
+
+import java.util.ArrayList;
+
+import com.nokia.tracecompiler.source.SourceParserException;
+import com.nokia.tracecompiler.utils.DocumentAdapter;
+
+/**
+ * String-based document object
+ * 
+ */
+class StringDocument extends DocumentAdapter {
+
+	/**
+	 * The document data
+	 */
+	private String sourceData;
+
+	/**
+	 * Line information
+	 */
+	private ArrayList<Integer> lines = new ArrayList<Integer>();
+
+	/**
+	 * Constructor
+	 */
+	StringDocument() {
+	}
+
+	/**
+	 * Constructor
+	 * 
+	 * @param data
+	 *            the document data
+	 */
+	StringDocument(String data) {
+		setSourceData(data);
+	}
+
+	/**
+	 * Sets the source data
+	 * 
+	 * @param data
+	 *            the source data
+	 */
+	void setSourceData(String data) {
+		this.sourceData = data;
+		if (data.length() > 0) {
+			lines.add(0);
+		}
+		for (int i = 0; i < data.length(); i++) {
+			if (data.charAt(i) == '\n') {
+				lines.add(i + 1);
+			}
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.utils.DocumentAdapter#get(int, int)
+	 */
+	@Override
+	public String get(int start, int length) throws SourceParserException {
+		return sourceData.substring(start, start + length);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.utils.DocumentAdapter#getChar(int)
+	 */
+	@Override
+	public char getChar(int offset) throws SourceParserException {
+		return sourceData.charAt(offset);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.utils.DocumentAdapter#getLength()
+	 */
+	@Override
+	public int getLength() {
+		return sourceData.length();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.utils.DocumentAdapter#getLineOfOffset(int)
+	 */
+	@Override
+	public int getLineOfOffset(int offset) throws SourceParserException {
+		int retval = -1;
+		if (offset >= 0 && offset < sourceData.length()) {
+			for (int i = 0; i < lines.size(); i++) {
+				int lineStart = lines.get(i);
+				if (lineStart > offset) {
+					retval = i - 1;
+					i = lines.size();
+				}
+			}
+		}
+		return retval;
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/document/StringDocumentFactory.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,41 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Document factory for file-based documents
+*
+*/
+package com.nokia.tracecompiler.document;
+
+import com.nokia.tracecompiler.source.SourceDocumentInterface;
+import com.nokia.tracecompiler.utils.DocumentFactoryBase;
+
+/**
+ * Document factory for string-based documents and simple locations which do not
+ * support changes or selections.
+ * 
+ */
+public final class StringDocumentFactory extends DocumentFactoryBase {
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.utils.DocumentFactoryBase#createDocument(java.lang.String)
+	 */
+	@Override
+	public SourceDocumentInterface createDocument(String sourceData) {
+		return new StringDocument(sourceData);
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/document/messages.properties	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,1 @@
+FileDocumentMonitor.processingSourceFileText=Processing source file : 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/ConfigurationDelegate.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,204 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Delegate to configuration of the view
+*
+*/
+package com.nokia.tracecompiler.engine;
+
+import java.util.ArrayList;
+
+/**
+ * Delegate to configuration of the view
+ * 
+ */
+final class ConfigurationDelegate implements TraceCompilerEngineConfiguration {
+
+	/**
+	 * Configuration from view
+	 */
+	private TraceCompilerEngineConfiguration configuration;
+
+	/**
+	 * Temporary list of configuration listeners
+	 */
+	private ArrayList<TraceCompilerEngineConfigurationListener> tempListeners;
+
+	/**
+	 * Sets the configuration delegate
+	 * 
+	 * @param configuration
+	 *            the configuration
+	 */
+	void setConfiguration(TraceCompilerEngineConfiguration configuration) {
+		this.configuration = configuration;
+		if (configuration != null && tempListeners != null) {
+			for (int i = 0; i < tempListeners.size(); i++) {
+				TraceCompilerEngineConfigurationListener listener = tempListeners
+						.get(i);
+				configuration.addConfigurationListener(listener);
+				listener.configurationCreated();
+			}
+			tempListeners.clear();
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engine.TraceCompilerConfiguration#isAvailable()
+	 */
+	public boolean isAvailable() {
+		boolean retval;
+		if (configuration != null) {
+			retval = configuration.isAvailable();
+		} else {
+			retval = false;
+		}
+		return retval;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engine.TraceCompilerConfiguration#
+	 *      addConfigurationListener(com.nokia.tracecompiler.engine.TraceCompilerConfigurationListener)
+	 */
+	public void addConfigurationListener(
+			TraceCompilerEngineConfigurationListener configurationListener) {
+		if (configuration != null) {
+			configuration.addConfigurationListener(configurationListener);
+		} else {
+			if (tempListeners == null) {
+				tempListeners = new ArrayList<TraceCompilerEngineConfigurationListener>();
+			}
+			tempListeners.add(configurationListener);
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engine.TraceCompilerConfiguration#
+	 *      removeConfigurationListener(com.nokia.tracecompiler.engine.TraceCompilerConfigurationListener)
+	 */
+	public void removeConfigurationListener(
+			TraceCompilerEngineConfigurationListener configurationListener) {
+		if (configuration != null) {
+			configuration.removeConfigurationListener(configurationListener);
+		} else {
+			if (tempListeners != null) {
+				tempListeners.remove(configurationListener);
+			}
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engine.TraceCompilerConfiguration#getFlag(java.lang.String)
+	 */
+	public boolean getFlag(String flagName) {
+		boolean retval;
+		if (configuration != null) {
+			retval = configuration.getFlag(flagName);
+		} else {
+			retval = false;
+		}
+		return retval;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engine.TraceCompilerConfiguration#getText(java.lang.String)
+	 */
+	public String getText(String textName) {
+		String retval;
+		if (configuration != null) {
+			retval = configuration.getText(textName);
+		} else {
+			retval = ""; //$NON-NLS-1$
+		}
+		return retval;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engine.TraceCompilerConfiguration#getValue(java.lang.String)
+	 */
+	public int getValue(String valueName) {
+		int retval;
+		if (configuration != null) {
+			retval = configuration.getValue(valueName);
+		} else {
+			retval = 0;
+		}
+		return retval;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engine.TraceCompilerConfiguration#hasEntry(java.lang.String)
+	 */
+	public boolean hasEntry(String entryName) {
+		boolean retval;
+		if (configuration != null) {
+			retval = configuration.hasEntry(entryName);
+		} else {
+			retval = false;
+		}
+		return retval;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engine.TraceCompilerConfiguration#
+	 *      setFlag(java.lang.String, boolean)
+	 */
+	public void setFlag(String flagName, boolean flag) {
+		if (configuration != null) {
+			configuration.setFlag(flagName, flag);
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engine.TraceCompilerConfiguration#
+	 *      setText(java.lang.String, java.lang.String)
+	 */
+	public void setText(String textName, String text) {
+		if (configuration != null) {
+			configuration.setText(textName, text);
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engine.TraceCompilerConfiguration#setValue(java.lang.String,
+	 *      int)
+	 */
+	public void setValue(String valueName, int value) {
+		if (configuration != null) {
+			configuration.setValue(valueName, value);
+		}
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/LocationListBase.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,121 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Base class for TraceLocationList and PersistentLocationList
+*
+*/
+package com.nokia.tracecompiler.engine;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+
+import com.nokia.tracecompiler.model.TraceModelExtension;
+import com.nokia.tracecompiler.model.TraceObject;
+
+/**
+ * Base class for TraceLocationList and PersistentLocationList
+ * 
+ */
+public class LocationListBase implements TraceModelExtension,
+		Iterable<LocationProperties> {
+
+	/**
+	 * List of locations
+	 */
+	private ArrayList<LocationProperties> locations = new ArrayList<LocationProperties>();
+
+	/**
+	 * Owning trace object
+	 */
+	private TraceObject owner;
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.model.TraceModelExtension#getOwner()
+	 */
+	public TraceObject getOwner() {
+		return owner;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.model.TraceModelExtension#setOwner(com.nokia.tracecompiler.model.TraceObject)
+	 */
+	public void setOwner(TraceObject owner) {
+		this.owner = owner;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.lang.Iterable#iterator()
+	 */
+	public Iterator<LocationProperties> iterator() {
+		return locations.iterator();
+	}
+
+	/**
+	 * Gets the location count of this list
+	 * 
+	 * @return the count
+	 */
+	public final int getLocationCount() {
+		return locations.size();
+	}
+
+	/**
+	 * Checks if there are locations in this list
+	 * 
+	 * @return true if list has locations
+	 */
+	public final boolean hasLocations() {
+		return !locations.isEmpty();
+	}
+
+	/**
+	 * Adds a location to this list
+	 * 
+	 * @param location
+	 *            the location to be added
+	 */
+	void add(LocationProperties location) {
+		locations.add(location);
+	}
+
+	/**
+	 * Removes a location from this list
+	 * 
+	 * @param location
+	 *            the location to be removed
+	 * @return true if removed
+	 */
+	boolean remove(LocationProperties location) {
+		return locations.remove(location);
+	}
+
+	/**
+	 * Checks if location exists
+	 * 
+	 * @param location
+	 *            the location
+	 * @return true if exists
+	 */
+	boolean contains(LocationProperties location) {
+		return locations.contains(location);
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/LocationMapModelListener.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,113 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Model listener for trace location mapper
+*
+*/
+package com.nokia.tracecompiler.engine;
+
+import com.nokia.tracecompiler.model.Trace;
+import com.nokia.tracecompiler.model.TraceCompilerException;
+import com.nokia.tracecompiler.model.TraceGroup;
+import com.nokia.tracecompiler.model.TraceModelListener;
+import com.nokia.tracecompiler.model.TraceObject;
+import com.nokia.tracecompiler.model.TraceParameter;
+
+/**
+ * Model listener for trace location mapper
+ * 
+ */
+final class LocationMapModelListener implements TraceModelListener {
+
+	/**
+	 * Trace location mapper
+	 */
+	private final TraceLocationMap locationMap;
+
+	/**
+	 * Constructor
+	 * 
+	 * @param map
+	 *            the location mapper
+	 */
+	LocationMapModelListener(TraceLocationMap map) {
+		locationMap = map;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.model.TraceModelListener#
+	 *      objectAdded(com.nokia.tracecompiler.model.TraceObject,
+	 *      com.nokia.tracecompiler.model.TraceObject)
+	 */
+	public void objectAdded(TraceObject owner, TraceObject object) {
+		// A trace does not have a name yet, so this does nothing
+		// The locations are assigned to the trace in propertyChanged
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.model.TraceModelListener#
+	 *      objectRemoved(com.nokia.tracecompiler.model.TraceObject,
+	 *      com.nokia.tracecompiler.model.TraceObject)
+	 */
+	public void objectRemoved(TraceObject owner, TraceObject object) throws TraceCompilerException {
+		if (object instanceof Trace) {
+			locationMap.moveToUnrelated((Trace) object);
+		} else if (object instanceof TraceGroup) {
+			// Moves locations to unrelated list
+			for (Trace trace : (TraceGroup) object) {
+				locationMap.moveToUnrelated(trace);
+			}
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.model.TraceModelListener#
+	 *      propertiesUpdated(com.nokia.tracecompiler.model.TraceObject)
+	 */
+	public void propertyUpdated(TraceObject object, int property) throws TraceCompilerException {
+		if (object instanceof Trace && property == NAME && object.isComplete()) {
+			Trace trace = (Trace) object;
+			locationMap.moveFromUnrelated(trace);
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.model.TraceModelListener#
+	 *      objectCreationComplete(com.nokia.tracecompiler.model.TraceObject)
+	 */
+	public void objectCreationComplete(TraceObject object) throws TraceCompilerException {
+		if (object instanceof Trace) {
+			Trace trace = (Trace) object;
+			locationMap.moveFromUnrelated(trace);
+		} else if (object instanceof TraceParameter) {
+			// If a parameter is added, the validity needs to be checked
+			TraceLocationList list = ((TraceParameter) object).getTrace()
+					.getExtension(TraceLocationList.class);
+			if (list != null) {
+				for (LocationProperties loc : list) {
+					((TraceLocation) loc).runValidityCheck();
+				}
+			}
+		}
+	}
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/LocationProperties.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,62 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Common properties of locations
+*
+*/
+package com.nokia.tracecompiler.engine;
+
+/**
+ * Common properties of locations
+ * 
+ */
+public interface LocationProperties {
+
+	/**
+	 * Gets the file path
+	 * 
+	 * @return the file path
+	 */
+	public String getFilePath();
+
+	/**
+	 * Gets the file name
+	 * 
+	 * @return the file name
+	 */
+	public String getFileName();
+
+	/**
+	 * Gets the line number
+	 * 
+	 * @return the line number
+	 */
+	public int getLineNumber();
+
+	/**
+	 * Gets the name of the class which owns this location
+	 * 
+	 * @return the class name
+	 */
+	public String getClassName();
+
+	/**
+	 * Gets the name of function which owns this location
+	 * 
+	 * @return the function name
+	 */
+	public String getFunctionName();
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/Messages.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,63 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Localized strings for engine package
+*
+*/
+package com.nokia.tracecompiler.engine;
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+/**
+ * Messages for engine package
+ * 
+ */
+public class Messages {
+
+	/**
+	 * Bundle name
+	 */
+	private static final String BUNDLE_NAME = "com.nokia.tracecompiler.engine.messages"; //$NON-NLS-1$
+
+	/**
+	 * Bundle
+	 */
+	private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
+			.getBundle(BUNDLE_NAME);
+
+	/**
+	 * Prevents construction
+	 */
+	private Messages() {
+	}
+
+	/**
+	 * Gets localized string based on key
+	 * 
+	 * @param key
+	 *            the resource key
+	 * @return the localized resource
+	 */
+	public static String getString(String key) {
+		String value;
+		try {
+			value = RESOURCE_BUNDLE.getString(key);
+		} catch (MissingResourceException e) {
+			value = '!' + key + '!';
+		}
+		return value;
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/SourceContextManager.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,59 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Interface to change the currently active source context
+*
+*/
+package com.nokia.tracecompiler.engine;
+
+import com.nokia.tracecompiler.source.SourceContext;
+
+/**
+ * Interface to the currently active source context
+ * 
+ */
+public interface SourceContextManager {
+
+	/**
+	 * Gets the active source context
+	 * 
+	 * @return the context
+	 */
+	public SourceContext getContext();
+
+	/**
+	 * Sets the active source context
+	 * 
+	 * @param context
+	 *            the context
+	 */
+	public void setContext(SourceContext context);
+
+	/**
+	 * Checks if the auto-converter is running
+	 * 
+	 * @return true if converter is running, false otherwise
+	 */
+	public boolean isConverting();
+
+	/**
+	 * Sets the auto-converter flag
+	 * 
+	 * @param flag
+	 *            the new flag value
+	 */
+	public void setConverting(boolean flag);
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/SourceContextManagerImpl.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,84 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* SourceContextManager interface implementation
+*
+*/
+package com.nokia.tracecompiler.engine;
+
+import com.nokia.tracecompiler.source.SourceContext;
+
+/**
+ * SourceContextManager interface implementation
+ * 
+ */
+final class SourceContextManagerImpl implements SourceContextManager {
+
+	/**
+	 * Active context
+	 */
+	private SourceContext activeContext;
+
+	/**
+	 * Converting flag
+	 */
+	private boolean isConverting;
+
+	/**
+	 * Constructor
+	 * 
+	 * @param sourceEngine
+	 *            the source engine
+	 */
+	SourceContextManagerImpl() {
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engine.SourceContextManager#getContext()
+	 */
+	public SourceContext getContext() {
+		return activeContext;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engine.SourceContextManager#
+	 *      setContext(com.nokia.tracecompiler.source.SourceContext)
+	 */
+	public void setContext(SourceContext context) {
+		activeContext = context;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engine.SourceContextManager#isConverting()
+	 */
+	public boolean isConverting() {
+		return isConverting;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engine.SourceContextManager#setConverting(boolean)
+	 */
+	public void setConverting(boolean flag) {
+		this.isConverting = flag;
+	}
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/TraceCompilerEngine.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,393 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "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:
+ *
+ * Description:
+ *
+ * A singleton access point to functionality of Trace Compiler
+ *
+ */
+package com.nokia.tracecompiler.engine;
+
+import java.util.ArrayList;
+
+import com.nokia.tracecompiler.engine.TraceCompilerEngineErrorCodes.TraceCompilerErrorCode;
+import com.nokia.tracecompiler.engine.event.EventEngine;
+import com.nokia.tracecompiler.engine.header.HeaderEngine;
+import com.nokia.tracecompiler.engine.plugin.PluginEngine;
+import com.nokia.tracecompiler.engine.project.ProjectEngine;
+import com.nokia.tracecompiler.engine.propertyfile.PropertyFileEngine;
+import com.nokia.tracecompiler.engine.rules.RulesEngine;
+import com.nokia.tracecompiler.engine.source.SourceEngine;
+import com.nokia.tracecompiler.engine.source.SourceListener;
+import com.nokia.tracecompiler.engine.source.SourceProperties;
+import com.nokia.tracecompiler.model.TraceCompilerException;
+import com.nokia.tracecompiler.model.TraceModel;
+import com.nokia.tracecompiler.plugin.TraceCompilerPlugin;
+
+/**
+ * A singleton access point to functionality of Trace Compiler
+ * 
+ */
+final class TraceCompilerEngine implements SourceListener, TraceCompilerEngineInterface {
+
+	/**
+	 * TraceCompiler plug-in engine
+	 */
+	private PluginEngine pluginEngine;
+
+	/**
+	 * Event handler interface implementation
+	 */
+	private TraceCompilerEngineEvents eventEngine;
+
+	/**
+	 * Source editor engine
+	 */
+	private SourceEngine sourceEngine;
+
+	/**
+	 * Trace header engine
+	 */
+	private HeaderEngine headerEngine;
+
+	/**
+	 * Trace project engine
+	 */
+	private ProjectEngine projectEngine;
+
+	/**
+	 * Rule engine
+	 */
+	private RulesEngine rulesEngine;
+
+	/**
+	 * Trace property file engine
+	 */
+	private PropertyFileEngine propertyFileEngine;
+
+	/**
+	 * Source context manager
+	 */
+	private SourceContextManager contextManager;
+
+	/**
+	 * Location map
+	 */
+	private TraceLocationMap locationMap;
+
+	/**
+	 * Location converter
+	 */
+	private TraceLocationConverter locationConverter;
+
+	/**
+	 * Trace model
+	 */
+	private TraceModel model;
+
+	/**
+	 * Interface to the view
+	 */
+	private TraceCompilerEngineView view = new ViewAdapter();
+
+	/**
+	 * Configuration
+	 */
+	private ConfigurationDelegate configurationDelegate;
+
+	/**
+	 * List of engines that need project open / export / close notifications
+	 */
+	private ArrayList<TraceCompilerEngineBase> engines = new ArrayList<TraceCompilerEngineBase>();
+
+	/**
+	 * View has been registered flag
+	 */
+	private boolean isViewRegistered = false;
+
+	/**
+	 * Project path is stored in case the view unregisters and re-registers
+	 */
+	private String currentProjectPath;
+
+	/**
+	 * Gets the configuration of TraceCompiler
+	 * 
+	 * @return the configuration
+	 */
+	TraceCompilerEngineConfiguration getConfiguration() {
+		return configurationDelegate;
+	}
+
+	/**
+	 * Gets the trace compiler interface
+	 * 
+	 * @return this object
+	 */
+	TraceCompilerEngineInterface getTraceCompiler() {
+		return this;
+	}
+
+	/**
+	 * Gets the trace model
+	 * 
+	 * @return the trace model
+	 */
+	TraceModel getModel() {
+		return model;
+	}
+
+	/**
+	 * Gets the source engine
+	 * 
+	 * @return the source engine
+	 */
+	SourceEngine getSourceEngine() {
+		return sourceEngine;
+	}
+
+	/**
+	 * Gets the events interface
+	 * 
+	 * @return the events interface
+	 */
+	TraceCompilerEngineEvents getEvents() {
+		return eventEngine;
+	}
+
+	/**
+	 * Adds a plug-in
+	 * 
+	 * @param plugin
+	 *            the plugin
+	 */
+	void registerPlugin(TraceCompilerPlugin plugin) {
+		pluginEngine.add(plugin);
+	}
+
+	/**
+	 * Removes an existing plug-in
+	 * 
+	 * @param plugin
+	 *            the plugin
+	 */
+	void unregisterPlugin(TraceCompilerPlugin plugin) {
+		pluginEngine.remove(plugin);
+	}
+
+	/**
+	 * Gets the source context manager
+	 * 
+	 * @return the context manager
+	 */
+	public SourceContextManager getSourceContextManager() {
+		return contextManager;
+	}
+
+	/**
+	 * Starts TraceCompiler.
+	 * @throws TraceCompilerException 
+	 */
+	void start() throws TraceCompilerException {
+		configurationDelegate = new ConfigurationDelegate();
+		rulesEngine = new RulesEngine();
+		pluginEngine = new PluginEngine();
+		model = new TraceModel(rulesEngine, pluginEngine.getVerifier());
+		pluginEngine.setModel(model);
+		projectEngine = new ProjectEngine(model);
+		propertyFileEngine = new PropertyFileEngine(model);
+		eventEngine = new EventEngine(model);
+		sourceEngine = new SourceEngine(model);
+		locationMap = new TraceLocationMap(model);
+		locationConverter = new TraceLocationConverter(model);
+		sourceEngine.addSourceListener(this);
+		contextManager = new SourceContextManagerImpl();
+		headerEngine = new HeaderEngine(model);
+		// Keep this order -> Exports need to be in correct order
+		// Property file engine manages the ID cache so it needs to be run
+		// before plug-in's and header
+		engines.add(projectEngine);
+		engines.add(propertyFileEngine);
+		engines.add(headerEngine);
+		engines.add(pluginEngine);
+	}
+
+	/**
+	 * Shuts down TraceCompiler
+	 * @throws TraceCompilerException 
+	 */
+	void shutdown() throws TraceCompilerException {
+		closeProject();
+	}
+
+	/**
+	 * Registers the view
+	 * 
+	 * @param view
+	 *            the view
+	 * @throws TraceCompilerException 
+	 */
+	void setView(TraceCompilerEngineView view) throws TraceCompilerException {
+		if (view == null) {
+			// Closes the project, but leaves the currentProjectName and
+			// currentProjectPath variables. When view re-registers the project
+			// is opened back
+			internalCloseProject();
+			this.view = new ViewAdapter();
+			isViewRegistered = false;
+		} else {
+			this.view = view;
+			isViewRegistered = true;
+		}
+		configurationDelegate.setConfiguration(this.view.getConfiguration());
+	}
+
+	/**
+	 * Checks that model is valid
+	 * 
+	 * @throws TraceCompilerException
+	 *             if model is not valid
+	 */
+	private void checkIsModelValid() throws TraceCompilerException {
+		if (!model.isValid()) {
+			throw new TraceCompilerException(
+					TraceCompilerErrorCode.MODEL_NOT_READY);
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engine.TraceCompilerEngineInterface#openProject(java.lang.String,
+	 *      java.lang.String)
+	 */
+	public void openProject(String modelName) throws Exception {
+		try {
+			if (view != null && isViewRegistered && !model.isValid()) {
+				projectEngine.openTraceProject(currentProjectPath, modelName);
+				for (TraceCompilerEngineBase engine : engines) {
+					engine.projectOpened();
+				}
+				model.setValid(true);
+				sourceEngine.start();
+			}
+		} catch (TraceCompilerException e) {
+			closeModel();
+			throw e;
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engine.TraceCompilerEngineInterface#exportProject()
+	 */
+	public void exportProject() throws TraceCompilerException {
+		checkIsModelValid();
+		if (model.getID() != 0) {
+			for (TraceCompilerEngineBase engine : engines) {
+					engine.exportProject();
+			}
+		} else {
+			throw new TraceCompilerException(
+					TraceCompilerErrorCode.INVALID_MODEL_PROPERTIES_FOR_EXPORT);
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engine.TraceCompilerEngineInterface#closeProject()
+	 */
+	public void closeProject() throws TraceCompilerException {
+		internalCloseProject();
+		currentProjectPath = null;
+	}
+
+	/**
+	 * Closes the project
+	 * @throws TraceCompilerException 
+	 */
+	private void internalCloseProject() throws TraceCompilerException {
+		if (model.isValid()) {
+			if (!TraceCompilerEngineGlobals.getConfiguration().getFlag(
+					TraceCompilerEngineConfiguration.CONSOLE_UI_MODE)) {
+				try {
+					// Plug-in's are not exported when project is closed
+					// They can do cleanup in traceProjectClosed call
+					for (TraceCompilerEngineBase engine : engines) {
+						if (engine != pluginEngine) {
+							engine.exportProject();
+						}
+					}
+				} catch (TraceCompilerException e) {
+					getEvents().postError(e);
+						throw e;
+				}
+			}
+			// Engines are closed in reverse order
+			for (int i = engines.size() - 1; i >= 0; i--) {
+				engines.get(i).projectClosed();
+			}
+			sourceEngine.shutdown();
+			closeModel();
+		}
+	}
+
+	/**
+	 * Closes the trace model
+	 */
+	private void closeModel() {
+		try {
+			if (model != null) {
+				model.reset();
+				model.setValid(false);
+			}
+		} catch (Exception e) {
+			if (TraceCompilerEngineConfiguration.ASSERTIONS_ENABLED) {
+				getEvents().postAssertionFailed("Failed to close model", e); //$NON-NLS-1$
+			}
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engine.SourceListener#
+	 *      sourceOpened(com.nokia.tracecompiler.engine.SourceProperties)
+	 */
+	public void sourceOpened(SourceProperties properties) throws TraceCompilerException {
+		locationMap.addSource(properties);
+		locationConverter.sourceOpened(properties);
+	}
+
+	/**
+	 * Get project path
+	 * 
+	 * @return project path
+	 */
+	public String getProjectPath() {
+		return currentProjectPath;
+	}
+
+	/**
+	 * Set project path
+	 * 
+	 * @param path
+	 *            the path
+	 */
+	public void setProjectPath(String path) {
+		currentProjectPath = path;
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/TraceCompilerEngineActions.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,35 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Action interface
+*
+*/
+package com.nokia.tracecompiler.engine;
+
+/**
+ * Action interface
+ * 
+ */
+public interface TraceCompilerEngineActions {
+
+	/**
+	 * Enables actions based on selected object
+	 * 
+	 * @param object
+	 *            the object that has been selected
+	 */
+	public void enableActions(Object object);
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/TraceCompilerEngineBase.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,48 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Base class for all engine classes
+*
+*/
+package com.nokia.tracecompiler.engine;
+
+import com.nokia.tracecompiler.model.TraceCompilerException;
+
+/**
+ * Base class for all engine classes
+ * 
+ */
+public abstract class TraceCompilerEngineBase {
+
+	/**
+	 * Called after trace project has been opened
+	 * @throws TraceCompilerException 
+	 */
+	public abstract void projectOpened() throws TraceCompilerException;
+
+	/**
+	 * Called when trace project is closed
+	 */
+	public abstract void projectClosed();
+
+	/**
+	 * Called when exporting the project
+	 * 
+	 * @throws TraceCompilerException
+	 *             if export fails
+	 */
+	public abstract void exportProject() throws TraceCompilerException;
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/TraceCompilerEngineConfiguration.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,188 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Access to configuration of TraceCompiler
+*
+*/
+package com.nokia.tracecompiler.engine;
+
+/**
+ * Access to configuration of TraceCompiler
+ * 
+ */
+public interface TraceCompilerEngineConfiguration {
+
+	/**
+	 * Name of the currently selected source formatter
+	 */
+	public String FORMATTER_NAME = "TraceCompiler.sourceFormatter"; //$NON-NLS-1$
+
+	/**
+	 * Environment root
+	 */
+	public String ENVIRONMENT_ROOT = "TraceCompiler.environmentRoot"; //$NON-NLS-1$
+
+	/**
+	 * Printf support flag
+	 */
+	public String PRINTF_SUPPORT = "TraceCompiler.printfSupport"; //$NON-NLS-1$
+
+	/**
+	 * Printf extension macro
+	 */
+	public String PRINTF_EXTENSION = "TraceCompiler.printfMacro"; //$NON-NLS-1$
+
+	/**
+	 * Console UI mode flag
+	 */
+	public String CONSOLE_UI_MODE = "TraceCompiler.consoleUI"; //$NON-NLS-1$
+
+	/**
+	 * Flag to show the project files in view
+	 */
+	public boolean SHOW_PROJECT_FILES = false;
+
+	/**
+	 * Compiler flag to show hidden parameters in view
+	 */
+	public boolean SHOW_HIDDEN_PARAMETERS_IN_VIEW = false;
+
+	/**
+	 * Compiler flag to show location tag in view
+	 */
+	public boolean SHOW_LOCATION_TAG_IN_VIEW = false;
+
+	/**
+	 * Assertions events are enabled
+	 */
+	public boolean ASSERTIONS_ENABLED = true;
+
+	/**
+	 * Trace location assertions are enabled
+	 */
+	public boolean GLOBAL_LOCATION_ASSERTS = false;
+
+	/**
+	 * Traces the view state
+	 */
+	public boolean TRACE_VIEW_STATE = false;
+
+	/**
+	 * Allow changes to source formatter
+	 */
+	public boolean ALLOW_FORMAT_CHANGE = false;
+
+	/**
+	 * Comment after trace
+	 */
+	public String COMMENT_POSITION_AFTER_TRACE = "before"; //$NON-NLS-1$
+
+	/**
+	 * Comment before trace
+	 */
+	public String COMMENT_POSITION_BEFORE_TRACE = "after"; //$NON-NLS-1$
+
+	/**
+	 * Flag which determines if the configuration is available
+	 * 
+	 * @return true if available, false if not
+	 */
+	public boolean isAvailable();
+
+	/**
+	 * Stores a boolean flag into properties
+	 * 
+	 * @param flagName
+	 *            name for the flag
+	 * @param flag
+	 *            flag to be stored
+	 */
+	public void setFlag(String flagName, boolean flag);
+
+	/**
+	 * Gets a configuration flag based on flag name
+	 * 
+	 * @param flagName
+	 *            the confiugration flag name
+	 * @return the flag value
+	 */
+	public boolean getFlag(String flagName);
+
+	/**
+	 * Stores an integer value into properties
+	 * 
+	 * @param valueName
+	 *            name for the value
+	 * @param value
+	 *            value to be stored
+	 */
+	public void setValue(String valueName, int value);
+
+	/**
+	 * Gets a configuration value based on value name
+	 * 
+	 * @param valueName
+	 *            configuration value name
+	 * @return the value
+	 */
+	public int getValue(String valueName);
+
+	/**
+	 * Stores text into properties
+	 * 
+	 * @param textName
+	 *            name for the text
+	 * @param text
+	 *            text to be stored
+	 */
+	public void setText(String textName, String text);
+
+	/**
+	 * Gets a text entry based on property name
+	 * 
+	 * @param textName
+	 *            configuration value name
+	 * @return the text
+	 */
+	public String getText(String textName);
+
+	/**
+	 * Checks if the given entry exists in configuration.
+	 * 
+	 * @param entryName
+	 *            the name of the entry
+	 * @return true if entry exists, false otherwise
+	 */
+	public boolean hasEntry(String entryName);
+
+	/**
+	 * Adds a configuration listener to this configuration
+	 * 
+	 * @param configurationListener
+	 *            the listener to be added
+	 */
+	public void addConfigurationListener(
+			TraceCompilerEngineConfigurationListener configurationListener);
+
+	/**
+	 * Removes an existing configuration listener
+	 * 
+	 * @param configurationListener
+	 *            the listener to be removed
+	 */
+	public void removeConfigurationListener(
+			TraceCompilerEngineConfigurationListener configurationListener);
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/TraceCompilerEngineConfigurationListener.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,32 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Configuration listener interface
+*
+*/
+package com.nokia.tracecompiler.engine;
+
+/**
+ * Configuration listener interface
+ * 
+ */
+public interface TraceCompilerEngineConfigurationListener {
+
+	/**
+	 * Configuration creation notification
+	 */
+	public void configurationCreated();
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/TraceCompilerEngineErrorCodes.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,489 @@
+/*
+ * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "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:
+ *
+ * Description:
+ *
+ * Error codes for TraceCompiler
+ *
+ */
+package com.nokia.tracecompiler.engine;
+
+import com.nokia.tracecompiler.model.TraceCompilerErrorParameters;
+import com.nokia.tracecompiler.model.TraceCompilerException.TraceCompilerExceptionCode;
+
+/**
+ * Error codes for TraceCompiler
+ * 
+ */
+public interface TraceCompilerEngineErrorCodes {
+
+	/**
+	 * Error parameters for a file-related errors
+	 */
+	public class FileErrorParameters extends TraceCompilerErrorParameters {
+
+		/**
+		 * Path to the file
+		 */
+		public String file;
+
+	}
+
+	/**
+	 * Error parameters for errors related to names, titles etc.
+	 */
+	public class StringErrorParameters extends TraceCompilerErrorParameters {
+
+		/**
+		 * String
+		 */
+		public String string;
+
+	}
+
+	/**
+	 * Error parameters for integer values that must be between two values
+	 */
+	public class RangeErrorParameters extends TraceCompilerErrorParameters {
+
+		/**
+		 * Start of range
+		 */
+		public int start;
+
+		/**
+		 * End of range
+		 */
+		public int end;
+
+		/**
+		 * Hex / decimal flag
+		 */
+		public boolean isHex;
+
+	}
+
+	/**
+	 * Error codes for TraceCompiler
+	 */
+	public enum TraceCompilerErrorCode implements TraceCompilerExceptionCode {
+
+		/**
+		 * Success
+		 */
+		OK,
+
+		/**
+		 * Trace ID was duplicate
+		 */
+		DUPLICATE_TRACE_ID,
+
+		/**
+		 * Group ID was duplicate
+		 */
+		DUPLICATE_GROUP_ID,
+
+		/**
+		 * Trace name was duplicate
+		 */
+		DUPLICATE_TRACE_NAME,
+
+		/**
+		 * Trace name was duplicate
+		 */
+		DUPLICATE_GROUP_NAME,
+
+		/**
+		 * Trace ID was not valid. Parameters for this error are either
+		 * RangeErrorParameters or null (no range)
+		 */
+		INVALID_TRACE_ID,
+
+		/**
+		 * Group ID was not valid. Parameters for this error are either
+		 * RangeErrorParameters or null (no range)
+		 */
+		INVALID_GROUP_ID,
+
+		/**
+		 * Name was not valid
+		 */
+		INVALID_TRACE_NAME,
+
+		/**
+		 * Name was not valid
+		 */
+		INVALID_GROUP_NAME,
+
+		/**
+		 * Trace string was not valid
+		 */
+		INVALID_TRACE_DATA,
+
+		/**
+		 * Cannot edit source file
+		 */
+		SOURCE_NOT_EDITABLE,
+
+		/**
+		 * Source location was not valid
+		 */
+		INVALID_SOURCE_LOCATION,
+
+		/**
+		 * Unreachable trace location
+		 */
+		UNREACHABLE_TRACE_LOCATION,
+
+		/**
+		 * Tried to perform group operation when group was not selected
+		 */
+		GROUP_NOT_SELECTED,
+
+		/**
+		 * Tried to perform trace operation when trace was not selected
+		 */
+		TRACE_NOT_SELECTED,
+
+		/**
+		 * Not enough parameters in trace
+		 */
+		NOT_ENOUGH_PARAMETERS,
+
+		/**
+		 * Unexpected exception occurred
+		 */
+		UNEXPECTED_EXCEPTION,
+
+		/**
+		 * Trace model is not ready
+		 */
+		MODEL_NOT_READY,
+
+		/**
+		 * No trace groups
+		 */
+		NO_TRACE_GROUPS,
+
+		/**
+		 * Parameter name is not valid
+		 */
+		INVALID_PARAMETER_NAME,
+
+		/**
+		 * Model properties are not valid
+		 */
+		INVALID_MODEL_PROPERTIES_FOR_EXPORT,
+
+		/**
+		 * Model name is not valid
+		 */
+		INVALID_MODEL_NAME,
+
+		/**
+		 * Trace project file cannot be parsed
+		 */
+		INVALID_PROJECT_FILE,
+
+		/**
+		 * File was not found. This error is related to FileErrorParameters
+		 * class
+		 */
+		FILE_NOT_FOUND,
+
+		/**
+		 * Path was not valid. This is related to FileErrorParameters class
+		 */
+		INVALID_PATH,
+
+		/**
+		 * Constant value was duplicate
+		 */
+		DUPLICATE_CONSTANT_VALUE,
+
+		/**
+		 * Constant name was already in use
+		 */
+		DUPLICATE_CONSTANT_TABLE_NAME,
+
+		/**
+		 * Constant table name was not valid
+		 */
+		INVALID_CONSTANT_TABLE_NAME,
+
+		/**
+		 * Constant table not part of project
+		 */
+		CONSTANT_TABLE_NOT_PART_OF_PROJECT,
+
+		/**
+		 * Constant ID was already in use
+		 */
+		DUPLICATE_CONSTANT_ID,
+
+		/**
+		 * Constant value was not valid
+		 */
+		INVALID_CONSTANT_VALUE,
+
+		/**
+		 * Parameter name was already in use
+		 */
+		DUPLICATE_PARAMETER_NAME,
+
+		/**
+		 * Parameter type was not supported
+		 */
+		INVALID_PARAMETER_TYPE,
+
+		/**
+		 * Parameters cannot be added
+		 */
+		PARAMETER_ADD_NOT_ALLOWED,
+
+		/**
+		 * Parameters cannot be removed
+		 */
+		PARAMETER_REMOVE_NOT_ALLOWED,
+
+		/**
+		 * Parameter name was empty. This is generated when automatically adding
+		 * function parameters to new trace and a parameter does not have a name
+		 * in the declaration.
+		 */
+		EMPTY_PARAMETER_NAME,
+
+		/**
+		 * Parameter template was already used by another parameter
+		 */
+		PARAMETER_TEMPLATE_ALREADY_IN_USE,
+
+		/**
+		 * Tried to remove trace location when one was not selected
+		 */
+		LOCATION_NOT_SELECTED,
+
+		/**
+		 * Cannot add a constant, since constant table was not selected
+		 */
+		CONSTANT_TABLE_NOT_SELECTED,
+
+		/**
+		 * The selected object was not valid target for delete operation
+		 */
+		CANNOT_DELETE_SELECTED_OBJECT,
+
+		/**
+		 * Trace text format is not valid
+		 */
+		INVALID_TRACE_TEXT_FORMAT,
+
+		/**
+		 * Trace name format is not valid
+		 */
+		INVALID_TRACE_NAME_FORMAT,
+
+		/**
+		 * Missing function name from trace name format
+		 */
+		TRACE_NAME_FORMAT_MISSING_FUNCTION,
+
+		/**
+		 * No traces to delete
+		 */
+		NO_TRACES_TO_DELETE,
+
+		/**
+		 * Source file is not open
+		 */
+		SOURCE_NOT_OPEN,
+
+		/**
+		 * Failed to parse a constant table from source
+		 */
+		CONSTANT_TABLE_PARSE_FAILED,
+
+		/**
+		 * Cannot open project file
+		 */
+		CANNOT_OPEN_PROJECT_FILE,
+
+		/**
+		 * Cannot write project file
+		 */
+		CANNOT_WRITE_PROJECT_FILE,
+
+		/**
+		 * Parameter ID was already in use
+		 */
+		DUPLICATE_PARAMETER_ID,
+
+		/**
+		 * Constant table ID was already in use
+		 */
+		DUPLICATE_CONSTANT_TABLE_ID,
+
+		/**
+		 * Instrumenter function list was empty
+		 */
+		NO_FUNCTIONS_TO_INSTRUMENT,
+
+		/**
+		 * Instrumenter function list was empty. Related to
+		 * StringErrorParameters
+		 */
+		NO_FUNCTIONS_TO_INSTRUMENT_WITH_TEMPLATE,
+
+		/**
+		 * Multiple errors during an operation
+		 */
+		MULTIPLE_ERRORS_IN_OPERATION,
+
+		/**
+		 * Printf parameter parameter format specification did not match the
+		 * parameter count
+		 */
+		PARAMETER_FORMAT_MISMATCH,
+
+		/**
+		 * A trace does not exist
+		 */
+		TRACE_DOES_NOT_EXIST,
+
+		/**
+		 * Trace needs to be converted to correct API
+		 */
+		TRACE_NEEDS_CONVERSION,
+
+		/**
+		 * Parameter count of location and trace do not match
+		 */
+		PARAMETER_COUNT_MISMATCH,
+
+		/**
+		 * Parameter count in location does not match the API macro
+		 */
+		PARAMETER_COUNT_DOES_NOT_MATCH_API,
+
+		/**
+		 * Location parser failed
+		 */
+		LOCATION_PARSER_FAILED,
+
+		/**
+		 * Trace is not referenced from source files
+		 */
+		TRACE_HAS_NO_LOCATIONS,
+
+		/**
+		 * Trace is used from multiple locations in source files
+		 */
+		TRACE_HAS_MULTIPLE_LOCATIONS,
+
+		/**
+		 * Project was empty when export was called
+		 */
+		NO_TRACES_TO_EXPORT,
+
+		/**
+		 * Source file cannot be opened
+		 */
+		CANNOT_OPEN_SOURCE_FILE,
+
+		/**
+		 * Trace in source cannot be updated
+		 */
+		CANNOT_UPDATE_TRACE_INTO_SOURCE,
+
+		/**
+		 * Parameter format is not supported
+		 */
+		PARAMETER_FORMAT_NOT_SUPPORTED,
+
+		/**
+		 * Parameter format is not supported by default macros
+		 */
+		PARAMETER_FORMAT_NEEDS_EXT_MACRO,
+
+		/**
+		 * Ext macro usage is not necessary with
+		 */
+		PARAMETER_FORMAT_UNNECESSARY_EXT_MACRO,
+
+		/**
+		 * Parameter format cannot be used as an array
+		 */
+		PARAMETER_FORMAT_NOT_SUPPORTED_IN_ARRAY,
+
+		/**
+		 * Property file element was unknown
+		 */
+		PROPERTY_FILE_ELEMENT_NOT_SUPPORTED,
+
+		/**
+		 * Property file element was in wrong place
+		 */
+		PROPERTY_FILE_ELEMENT_MISPLACED,
+
+		/**
+		 * Property file attribute was not valid
+		 */
+		PROPERTY_FILE_ATTRIBUTE_INVALID,
+
+		/**
+		 * Inserting a trace into source will produce incorrect results
+		 */
+		INSERT_TRACE_DOES_NOT_WORK,
+
+		/**
+		 * Trace found from source is not in valid source context
+		 */
+		NO_CONTEXT_FOR_LOCATION,
+
+		/**
+		 * Function parameters could not be parsed
+		 */
+		CANNOT_PARSE_FUNCTION_PARAMETERS,
+
+		/**
+		 * Parameter name is not valid exit trace return parameter name
+		 */
+		INVALID_PARAMETER_NAME_IN_RETURN_VALUE,
+
+		/**
+		 * Run out of Group IDs
+		 */
+		RUN_OUT_OF_GROUP_IDS,
+
+		/**
+		 * Run out of Trace IDs
+		 */
+		RUN_OUT_OF_TRACE_IDS,
+
+		/**
+		 * Cannot add function parameters if there is var arg list
+		 */
+		VAR_ARG_LIST_PARAMETER_FOUND,
+
+		/**
+		 * TRACE_STATE group name was used in non state trace
+		 */
+		INVALID_USAGE_OF_TRACE_STATE_GROUP_NAME,
+
+		/**
+		 * TRACE_PERFORMANCE group name was used in non performance trace
+		 */
+		INVALID_USAGE_OF_TRACE_PERFORMACE_GROUP_NAME
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/TraceCompilerEngineErrorMessages.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,722 @@
+/*
+ * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "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:
+ *
+ * Description:
+ *
+ * Error code to error message mapper
+ *
+ */
+package com.nokia.tracecompiler.engine;
+
+import java.io.File;
+
+import com.nokia.tracecompiler.engine.TraceCompilerEngineErrorCodes.FileErrorParameters;
+import com.nokia.tracecompiler.engine.TraceCompilerEngineErrorCodes.RangeErrorParameters;
+import com.nokia.tracecompiler.engine.TraceCompilerEngineErrorCodes.StringErrorParameters;
+import com.nokia.tracecompiler.engine.TraceCompilerEngineErrorCodes.TraceCompilerErrorCode;
+import com.nokia.tracecompiler.model.TraceCompilerErrorParameters;
+import com.nokia.tracecompiler.model.TraceCompilerException;
+import com.nokia.tracecompiler.source.SourceConstants;
+import com.nokia.tracecompiler.source.SourceUtils;
+
+/**
+ * Error code to error message mapper
+ * 
+ */
+public final class TraceCompilerEngineErrorMessages {
+
+	/**
+	 * Maps an exception to error message
+	 * 
+	 * @param e
+	 *            the exception
+	 * @return the message
+	 */
+	public static String getErrorMessage(TraceCompilerException e) {
+		return TraceCompilerEngineErrorMessages.getErrorMessage(
+				(TraceCompilerErrorCode) e.getErrorCode(), e
+						.getErrorParameters());
+	}
+
+	/**
+	 * Maps error code to error message
+	 * 
+	 * @param error
+	 *            the error code
+	 * @param parameters
+	 *            the parameters of the error
+	 * @return the message
+	 */
+	public static String getErrorMessage(TraceCompilerErrorCode error,
+			TraceCompilerErrorParameters parameters) {
+		// CodForChk_Dis_LengthyFunc
+		// CodForChk_Dis_ComplexFunc
+		String s;
+		StringBuffer sb = new StringBuffer();
+		switch (error) {
+		case DUPLICATE_GROUP_ID:
+			sb.append(Messages
+					.getString("TraceCompilerErrorMessages.DuplicateGroupID")); //$NON-NLS-1$
+			break;
+		case DUPLICATE_GROUP_NAME:
+			sb.append(Messages
+					.getString("TraceCompilerErrorMessages.DuplicateGroupName")); //$NON-NLS-1$
+			break;
+		case DUPLICATE_TRACE_ID:
+			sb.append(Messages
+					.getString("TraceCompilerErrorMessages.DuplicateTraceID")); //$NON-NLS-1$
+			break;
+		case DUPLICATE_TRACE_NAME:
+			sb.append(Messages
+					.getString("TraceCompilerErrorMessages.DuplicateTraceName")); //$NON-NLS-1$
+			break;
+		case DUPLICATE_PARAMETER_ID:
+			s = Messages
+					.getString("TraceCompilerErrorMessages.DuplicateParameterID"); //$NON-NLS-1$
+			sb.append(s);
+			break;
+		case DUPLICATE_CONSTANT_VALUE:
+			s = Messages
+					.getString("TraceCompilerErrorMessages.DuplicateConstantValue"); //$NON-NLS-1$
+			sb.append(s);
+			break;
+		case DUPLICATE_CONSTANT_ID:
+			s = Messages
+					.getString("TraceCompilerErrorMessages.DuplicateConstantID"); //$NON-NLS-1$
+			sb.append(s);
+			break;
+		case DUPLICATE_CONSTANT_TABLE_NAME:
+			s = Messages
+					.getString("TraceCompilerErrorMessages.DuplicateConstantTableName"); //$NON-NLS-1$
+			sb.append(s);
+			break;
+		case DUPLICATE_CONSTANT_TABLE_ID:
+			s = Messages
+					.getString("TraceCompilerErrorMessages.DuplicateConstantTableID"); //$NON-NLS-1$
+			sb.append(s);
+			break;
+		case DUPLICATE_PARAMETER_NAME:
+			s = Messages
+					.getString("TraceCompilerErrorMessages.DuplicateParameterName"); //$NON-NLS-1$
+			sb.append(s);
+			break;
+		case INVALID_GROUP_ID:
+			createInvalidGroupIDMessage(parameters, sb);
+			break;
+		case INVALID_TRACE_ID:
+			createInvalidTraceIDMessage(parameters, sb);
+			break;
+		case INVALID_MODEL_PROPERTIES_FOR_EXPORT:
+			s = Messages
+					.getString("TraceCompilerErrorMessages.InvalidModelPropertiesForExport"); //$NON-NLS-1$
+			sb.append(s);
+			break;
+		case INVALID_MODEL_NAME:
+			sb.append(Messages
+					.getString("TraceCompilerErrorMessages.InvalidProjectName")); //$NON-NLS-1$
+			break;
+		case INVALID_GROUP_NAME:
+			sb.append(Messages
+					.getString("TraceCompilerErrorMessages.InvalidGroupName")); //$NON-NLS-1$
+			break;
+		case INVALID_TRACE_NAME:
+			sb.append(Messages
+					.getString("TraceCompilerErrorMessages.InvalidTraceName")); //$NON-NLS-1$
+			break;
+		case INVALID_PARAMETER_NAME:
+			s = Messages
+					.getString("TraceCompilerErrorMessages.InvalidParameterName"); //$NON-NLS-1$
+			sb.append(s);
+			break;
+		case EMPTY_PARAMETER_NAME:
+			sb.append(Messages
+					.getString("TraceCompilerErrorMessages.EmptyParameterName")); //$NON-NLS-1$
+			break;
+		case INVALID_CONSTANT_TABLE_NAME:
+			s = Messages
+					.getString("TraceCompilerErrorMessages.InvalidConstantTableName"); //$NON-NLS-1$
+			sb.append(s);
+			break;
+		case CONSTANT_TABLE_NOT_PART_OF_PROJECT:
+			s = Messages
+					.getString("TraceCompilerErrorMessages.ConstantTableNotPartOfProject"); //$NON-NLS-1$
+			sb.append(s);
+			break;
+		case INVALID_TRACE_DATA:
+			sb.append(Messages
+					.getString("TraceCompilerErrorMessages.InvalidTraceData")); //$NON-NLS-1$
+			break;
+		case INVALID_PARAMETER_TYPE:
+			createInvalidParameterTypeMessage(parameters, sb);
+			break;
+		case INVALID_CONSTANT_VALUE:
+			s = Messages
+					.getString("TraceCompilerErrorMessages.InvalidConstantValue"); //$NON-NLS-1$
+			sb.append(s);
+			break;
+		case SOURCE_NOT_EDITABLE:
+			s = Messages
+					.getString("TraceCompilerErrorMessages.SourceNotEditable"); //$NON-NLS-1$
+			sb.append(s);
+			break;
+		case INVALID_SOURCE_LOCATION:
+			s = Messages
+					.getString("TraceCompilerErrorMessages.InvalidSourceLocation"); //$NON-NLS-1$
+			sb.append(s);
+			break;
+		case UNREACHABLE_TRACE_LOCATION:
+			s = Messages
+					.getString("TraceCompilerErrorMessages.UnreachableTraceLocation"); //$NON-NLS-1$
+			sb.append(s);
+			break;
+		case INVALID_PROJECT_FILE:
+			sb.append(Messages
+					.getString("TraceCompilerErrorMessages.InvalidTraceFile")); //$NON-NLS-1$
+			break;
+		case FILE_NOT_FOUND:
+			createFileNotFoundMessage((FileErrorParameters) parameters, sb);
+			break;
+		case INVALID_PATH:
+			createInvalidPathMessage((FileErrorParameters) parameters, sb);
+			break;
+		case SOURCE_NOT_OPEN:
+			sb.append(Messages
+					.getString("TraceCompilerErrorMessages.SourceNotOpen")); //$NON-NLS-1$
+			break;
+		case CANNOT_OPEN_PROJECT_FILE:
+			s = Messages
+					.getString("TraceCompilerErrorMessages.CannotOpenProjectFile"); //$NON-NLS-1$
+			sb.append(s);
+			break;
+		case CANNOT_WRITE_PROJECT_FILE:
+			s = Messages
+					.getString("TraceCompilerErrorMessages.CannotWriteProjectFile"); //$NON-NLS-1$
+			sb.append(s);
+			break;
+		case PARAMETER_FORMAT_MISMATCH:
+			s = Messages
+					.getString("TraceCompilerErrorMessages.ParameterFormatMismatch"); //$NON-NLS-1$
+			sb.append(s);
+			break;
+		case GROUP_NOT_SELECTED:
+			sb.append(Messages
+					.getString("TraceCompilerErrorMessages.GroupNotSelected")); //$NON-NLS-1$
+			break;
+		case TRACE_NOT_SELECTED:
+			sb.append(Messages
+					.getString("TraceCompilerErrorMessages.TraceNotSelected")); //$NON-NLS-1$
+			break;
+		case CONSTANT_TABLE_NOT_SELECTED:
+			s = Messages
+					.getString("TraceCompilerErrorMessages.ConstantTableNotSelected"); //$NON-NLS-1$
+			sb.append(s);
+			break;
+		case LOCATION_NOT_SELECTED:
+			s = Messages
+					.getString("TraceCompilerErrorMessages.TraceLocationNotSelected"); //$NON-NLS-1$
+			sb.append(s);
+			break;
+		case CANNOT_DELETE_SELECTED_OBJECT:
+			s = Messages
+					.getString("TraceCompilerErrorMessages.CannotDeleteSelectedObject"); //$NON-NLS-1$
+			sb.append(s);
+			break;
+		case MODEL_NOT_READY:
+			s = Messages
+					.getString("TraceCompilerErrorMessages.TraceProjectNotOpen"); //$NON-NLS-1$
+			sb.append(s);
+			break;
+		case NO_TRACE_GROUPS:
+			sb.append(Messages
+					.getString("TraceCompilerErrorMessages.NoTraceGroups")); //$NON-NLS-1$
+			break;
+		case NOT_ENOUGH_PARAMETERS:
+			s = Messages
+					.getString("TraceCompilerErrorMessages.NotEnoughParameters"); //$NON-NLS-1$
+			sb.append(s);
+			break;
+		case PARAMETER_ADD_NOT_ALLOWED:
+			s = Messages
+					.getString("TraceCompilerErrorMessages.ParameterAddNotAllowed"); //$NON-NLS-1$
+			sb.append(s);
+			break;
+		case PARAMETER_REMOVE_NOT_ALLOWED:
+			s = Messages
+					.getString("TraceCompilerErrorMessages.ParameterRemoveNotAllowed"); //$NON-NLS-1$
+			sb.append(s);
+			break;
+		case PARAMETER_TEMPLATE_ALREADY_IN_USE:
+			s = Messages
+					.getString("TraceCompilerErrorMessages.ParameterTemplateInUse"); //$NON-NLS-1$
+			sb.append(s);
+			break;
+		case CONSTANT_TABLE_PARSE_FAILED:
+			s = Messages
+					.getString("TraceCompilerErrorMessages.ConstantTableParseFailed"); //$NON-NLS-1$
+			sb.append(s);
+			break;
+		case UNEXPECTED_EXCEPTION:
+			s = Messages
+					.getString("TraceCompilerErrorMessages.UnexpectedException"); //$NON-NLS-1$
+			sb.append(s);
+			break;
+		case TRACE_NAME_FORMAT_MISSING_FUNCTION:
+			s = Messages
+					.getString("TraceCompilerErrorMessages.NameFormatMissingFunction"); //$NON-NLS-1$
+			sb.append(s);
+			break;
+		case INVALID_TRACE_TEXT_FORMAT:
+			s = Messages
+					.getString("TraceCompilerErrorMessages.InvalidTraceTextFormat"); //$NON-NLS-1$
+			sb.append(s);
+			break;
+		case INVALID_TRACE_NAME_FORMAT:
+			s = Messages
+					.getString("TraceCompilerErrorMessages.InvalidTraceNameFormat"); //$NON-NLS-1$
+			sb.append(s);
+			break;
+		case NO_FUNCTIONS_TO_INSTRUMENT_WITH_TEMPLATE:
+			s = Messages
+					.getString("TraceCompilerErrorMessages.NoFunctionsToInstrumentPrefix"); //$NON-NLS-1$
+			sb.append(s);
+			sb.append(((StringErrorParameters) parameters).string);
+			s = Messages
+					.getString("TraceCompilerErrorMessages.NoFunctionsToInstrumentPostfix"); //$NON-NLS-1$
+			sb.append(s);
+			break;
+		case NO_FUNCTIONS_TO_INSTRUMENT:
+			s = Messages
+					.getString("TraceCompilerErrorMessages.NoFunctionsToInstrument"); //$NON-NLS-1$
+			sb.append(s);
+			break;
+		case MULTIPLE_ERRORS_IN_OPERATION:
+			s = Messages
+					.getString("TraceCompilerErrorMessages.MultipleErrorsInOperation"); //$NON-NLS-1$
+			sb.append(s);
+			break;
+		case NO_TRACES_TO_DELETE:
+			sb.append(Messages
+					.getString("TraceCompilerErrorMessages.NoTracesToDelete")); //$NON-NLS-1$
+			break;
+		case TRACE_DOES_NOT_EXIST:
+			s = Messages
+					.getString("TraceCompilerErrorMessages.TraceDoesNotExist"); //$NON-NLS-1$
+			sb.append(s);
+			break;
+		case TRACE_NEEDS_CONVERSION:
+			s = Messages
+					.getString("TraceCompilerErrorMessages.TraceNeedsConversionPrefix"); //$NON-NLS-1$
+			sb.append(s);
+			break;
+		case PARAMETER_COUNT_MISMATCH:
+			s = Messages
+					.getString("TraceCompilerErrorMessages.ParameterCountMismatch"); //$NON-NLS-1$
+			sb.append(s);
+			break;
+		case PARAMETER_COUNT_DOES_NOT_MATCH_API:
+			s = Messages
+					.getString("TraceCompilerErrorMessages.ParameterCountDoesNotMatchApi"); //$NON-NLS-1$
+			sb.append(s);
+			break;
+		case TRACE_HAS_NO_LOCATIONS:
+			s = Messages
+					.getString("TraceCompilerErrorMessages.TraceHasNoLocations"); //$NON-NLS-1$
+			sb.append(s);
+			break;
+		case TRACE_HAS_MULTIPLE_LOCATIONS:
+			s = Messages
+					.getString("TraceCompilerErrorMessages.TraceHasMultipleLocations"); //$NON-NLS-1$
+			sb.append(s);
+			break;
+		case LOCATION_PARSER_FAILED:
+			s = Messages
+					.getString("TraceCompilerErrorMessages.LocationCouldNotBeParsed"); //$NON-NLS-1$
+			sb.append(s);
+			break;
+		case NO_TRACES_TO_EXPORT:
+			s = Messages
+					.getString("TraceCompilerErrorMessages.NoTracesToExport"); //$NON-NLS-1$
+			sb.append(s);
+			break;
+		case CANNOT_OPEN_SOURCE_FILE:
+			s = Messages
+					.getString("TraceCompilerErrorMessages.CannotOpenSourceFile"); //$NON-NLS-1$
+			sb.append(s);
+			break;
+		case CANNOT_UPDATE_TRACE_INTO_SOURCE:
+			s = Messages
+					.getString("TraceCompilerErrorMessages.CannotUpdateTraceIntoSource"); //$NON-NLS-1$
+			sb.append(s);
+			break;
+		case PARAMETER_FORMAT_NOT_SUPPORTED:
+			createParameterFormatNotSupportedMessage(parameters, sb);
+			break;
+		case PARAMETER_FORMAT_NEEDS_EXT_MACRO:
+			createParameterFormatNotSupportedInMacroMessage(parameters, sb);
+			break;
+		case PARAMETER_FORMAT_NOT_SUPPORTED_IN_ARRAY:
+			createParameterFormatNotSupportedInArrayMessage(parameters, sb);
+			break;
+		case PARAMETER_FORMAT_UNNECESSARY_EXT_MACRO:
+			s = Messages
+					.getString("TraceCompilerErrorMessages.ParameterFormatUnnecessaryExtMacro"); //$NON-NLS-1$
+			sb.append(s);
+			break;
+		case PROPERTY_FILE_ELEMENT_NOT_SUPPORTED:
+			s = Messages
+					.getString("TraceCompilerErrorMessages.PropertyFileElementNotSupportedPrefix"); //$NON-NLS-1$ CodForChk_Dis_LengthyLine
+			sb.append(s);
+			sb.append(((StringErrorParameters) parameters).string);
+			s = Messages
+					.getString("TraceCompilerErrorMessages.PropertyFileElementNotSupportedPostfix"); //$NON-NLS-1$ CodForChk_Dis_LengthyLine
+			sb.append(s);
+			break;
+		case PROPERTY_FILE_ELEMENT_MISPLACED:
+			s = Messages
+					.getString("TraceCompilerErrorMessages.PropertyFileElementMisplacedPrefix"); //$NON-NLS-1$
+			sb.append(s);
+			sb.append(((StringErrorParameters) parameters).string);
+			s = Messages
+					.getString("TraceCompilerErrorMessages.PropertyFileElementMisplacedPostfix"); //$NON-NLS-1$
+			sb.append(s);
+			break;
+		case PROPERTY_FILE_ATTRIBUTE_INVALID:
+			s = Messages
+					.getString("TraceCompilerErrorMessages.PropertyFileAttributeInvalidPrefix"); //$NON-NLS-1$
+			sb.append(s);
+			sb.append(((StringErrorParameters) parameters).string);
+			s = Messages
+					.getString("TraceCompilerErrorMessages.PropertyFileAttributeInvalidPostfix"); //$NON-NLS-1$
+			sb.append(s);
+			break;
+		case INSERT_TRACE_DOES_NOT_WORK:
+			s = Messages
+					.getString("TraceCompilerErrorMessages.InsertTraceDoesNotWork"); //$NON-NLS-1$
+			sb.append(s);
+			break;
+		case NO_CONTEXT_FOR_LOCATION:
+			s = Messages
+					.getString("TraceCompilerErrorMessages.NoContextForLocation"); //$NON-NLS-1$
+			sb.append(s);
+			break;
+		case CANNOT_PARSE_FUNCTION_PARAMETERS:
+			s = Messages
+					.getString("TraceCompilerErrorMessages.CannotParseFunctionParameters"); //$NON-NLS-1$
+			sb.append(s);
+			break;
+		case INVALID_PARAMETER_NAME_IN_RETURN_VALUE:
+			s = Messages
+					.getString("TraceCompilerErrorMessages.InvalidParameterNameInReturnValue"); //$NON-NLS-1$
+			sb.append(s);
+			break;
+		case RUN_OUT_OF_GROUP_IDS:
+			sb.append(Messages
+					.getString("TraceCompilerErrorMessages.RunOutOfGroupIDs")); //$NON-NLS-1$
+			break;
+		case RUN_OUT_OF_TRACE_IDS:
+			sb.append(Messages
+					.getString("TraceCompilerErrorMessages.RunOutOfTraceIDs")); //$NON-NLS-1$
+			break;
+		case VAR_ARG_LIST_PARAMETER_FOUND:
+			sb.append(Messages
+					.getString("TraceCompilerErrorMessages.VarArgListParameterFound")); //$NON-NLS-1$
+			break;
+		case INVALID_USAGE_OF_TRACE_STATE_GROUP_NAME:
+			sb.append(Messages
+					.getString("TraceCompilerErrorMessages.InvalidUsageOfTraceStateGroupName")); //$NON-NLS-1$
+			break;
+		case INVALID_USAGE_OF_TRACE_PERFORMACE_GROUP_NAME:
+			sb.append(Messages
+					.getString("TraceCompilerErrorMessages.InvalidUsageOfTracePerformanceGroupName")); //$NON-NLS-1$
+			break;
+		default:
+			break;
+		}
+		return sb.toString();
+	}
+
+	/**
+	 * Creates invalid parameter type message
+	 * 
+	 * @param parameters
+	 *            the parameters
+	 * @param sb
+	 *            the message buffer
+	 */
+	private static void createInvalidParameterTypeMessage(
+			TraceCompilerErrorParameters parameters, StringBuffer sb) {
+		String s;
+		if (parameters instanceof StringErrorParameters) {
+			s = Messages
+					.getString("TraceCompilerErrorMessages.InvalidParameterTypePrefix"); //$NON-NLS-1$
+			sb.append(s);
+			sb.append(((StringErrorParameters) parameters).string);
+			String format = SourceUtils
+					.mapNormalTypeToFormat(((StringErrorParameters) parameters).string);
+			if (format != null) {
+				sb.append(" "); //$NON-NLS-1$
+				sb.append(format);
+			}
+			s = Messages
+					.getString("TraceCompilerErrorMessages.InvalidParameterTypePostfix"); //$NON-NLS-1$
+			sb.append(s);
+		} else {
+			s = Messages
+					.getString("TraceCompilerErrorMessages.InvalidParameterType"); //$NON-NLS-1$
+			sb.append(s);
+		}
+	}
+
+	/**
+	 * Creates parameter format not supported message
+	 * 
+	 * @param parameters
+	 *            the parameters
+	 * @param sb
+	 *            the message buffer
+	 */
+	private static void createParameterFormatNotSupportedMessage(
+			TraceCompilerErrorParameters parameters, StringBuffer sb) {
+		String s;
+		if (parameters instanceof StringErrorParameters) {
+			s = Messages
+					.getString("TraceCompilerErrorMessages.ParameterFormatNotSupportedPrefix"); //$NON-NLS-1$
+			sb.append(s);
+			sb.append(((StringErrorParameters) parameters).string);
+			s = Messages
+					.getString("TraceCompilerErrorMessages.ParameterFormatNotSupportedPostfix"); //$NON-NLS-1$
+			sb.append(s);
+		} else {
+			s = Messages
+					.getString("TraceCompilerErrorMessages.ParameterFormatNotSupported"); //$NON-NLS-1$
+			sb.append(s);
+		}
+	}
+
+	/**
+	 * Creates parameter not supported in macro message
+	 * 
+	 * @param parameters
+	 *            the parameters
+	 * @param sb
+	 *            the message buffer
+	 */
+	private static void createParameterFormatNotSupportedInMacroMessage(
+			TraceCompilerErrorParameters parameters, StringBuffer sb) {
+		String s;
+		if (parameters instanceof StringErrorParameters) {
+			s = Messages
+					.getString("TraceCompilerErrorMessages.ParameterFormatNotSupportedInMacroPrefix"); //$NON-NLS-1$ CodForChk_Dis_LengthyLine
+			sb.append(s);
+			sb.append(((StringErrorParameters) parameters).string);
+			s = Messages
+					.getString("TraceCompilerErrorMessages.ParameterFormatNotSupportedInMacroPostfix"); //$NON-NLS-1$ CodForChk_Dis_LengthyLine
+			sb.append(s);
+		} else {
+			s = Messages
+					.getString("TraceCompilerErrorMessages.ParameterFormatNotSupportedInMacro"); //$NON-NLS-1$
+			sb.append(s);
+		}
+	}
+
+	/**
+	 * Creates parameter not supported in array message
+	 * 
+	 * @param parameters
+	 *            the parameters
+	 * @param sb
+	 *            the message buffer
+	 */
+	private static void createParameterFormatNotSupportedInArrayMessage(
+			TraceCompilerErrorParameters parameters, StringBuffer sb) {
+		String s;
+		if (parameters instanceof StringErrorParameters) {
+			s = Messages
+					.getString("TraceCompilerErrorMessages.ParameterFormatNotSupportedInArrayPrefix"); //$NON-NLS-1$ CodForChk_Dis_LengthyLine
+			sb.append(s);
+			sb.append(((StringErrorParameters) parameters).string);
+			s = Messages
+					.getString("TraceCompilerErrorMessages.ParameterFormatNotSupportedInArrayPostfix"); //$NON-NLS-1$ CodForChk_Dis_LengthyLine
+			sb.append(s);
+		} else {
+			s = Messages
+					.getString("TraceCompilerErrorMessages.ParameterFormatNotSupportedInArray"); //$NON-NLS-1$
+			sb.append(s);
+		}
+	}
+
+	/**
+	 * Creates invalid trace ID message
+	 * 
+	 * @param parameters
+	 *            the parameters
+	 * @param sb
+	 *            the message buffer
+	 */
+	private static void createInvalidTraceIDMessage(
+			TraceCompilerErrorParameters parameters, StringBuffer sb) {
+		String s;
+		if (parameters instanceof RangeErrorParameters) {
+			s = Messages
+					.getString("TraceCompilerErrorMessages.InvalidTraceIDStart"); //$NON-NLS-1$
+			sb.append(s);
+			s = Messages
+					.getString("TraceCompilerErrorMessages.InvalidTraceIDMiddle"); //$NON-NLS-1$
+			addRangeParameter((RangeErrorParameters) parameters, sb, s);
+			sb.append(Messages
+					.getString("TraceCompilerErrorMessages.InvalidTraceIDEnd")); //$NON-NLS-1$
+		} else {
+			sb.append(Messages
+					.getString("TraceCompilerErrorMessages.InvalidTraceID")); //$NON-NLS-1$
+		}
+	}
+
+	/**
+	 * Creates invalid group ID message
+	 * 
+	 * @param parameters
+	 *            the parameters
+	 * @param sb
+	 *            the message buffer
+	 */
+	private static void createInvalidGroupIDMessage(
+			TraceCompilerErrorParameters parameters, StringBuffer sb) {
+		String s;
+		if (parameters instanceof RangeErrorParameters) {
+			s = Messages
+					.getString("TraceCompilerErrorMessages.InvalidGroupIDStart"); //$NON-NLS-1$
+			sb.append(s);
+			s = Messages
+					.getString("TraceCompilerErrorMessages.InvalidGroupIDMiddle"); //$NON-NLS-1$
+			addRangeParameter((RangeErrorParameters) parameters, sb, s);
+			sb.append(Messages
+					.getString("TraceCompilerErrorMessages.InvalidGroupIDEnd")); //$NON-NLS-1$
+		} else {
+			sb.append(Messages
+					.getString("TraceCompilerErrorMessages.InvalidGroupID")); //$NON-NLS-1$
+		}
+	}
+
+	/**
+	 * Adds a range parameter to error buffer
+	 * 
+	 * @param parameters
+	 *            the range
+	 * @param sb
+	 *            the buffer
+	 * @param middleText
+	 *            the text between the range
+	 */
+	private static void addRangeParameter(RangeErrorParameters parameters,
+			StringBuffer sb, String middleText) {
+		if (parameters.isHex) {
+			sb.append(SourceConstants.HEX_PREFIX);
+			sb.append(Integer.toHexString(parameters.start));
+		} else {
+			sb.append(parameters.start);
+		}
+		sb.append(middleText);
+		if (parameters.isHex) {
+			sb.append(SourceConstants.HEX_PREFIX);
+			sb.append(Integer.toHexString(parameters.end));
+		} else {
+			sb.append(parameters.end);
+		}
+	}
+
+	/**
+	 * Creates "Invalid directory" message
+	 * 
+	 * @param parameters
+	 *            the message parameters
+	 * @param sb
+	 *            the string buffer where the message is stored
+	 */
+	private static void createInvalidPathMessage(
+			FileErrorParameters parameters, StringBuffer sb) {
+		String s;
+		if (parameters != null) {
+			s = Messages
+					.getString("TraceCompilerErrorMessages.InvalidDirectoryPrefix"); //$NON-NLS-1$
+			sb.append(s);
+			sb.append(convertPath(parameters.file));
+			s = Messages
+					.getString("TraceCompilerErrorMessages.InvalidDirectoryPostfix"); //$NON-NLS-1$
+			sb.append(s);
+		} else {
+			sb.append(Messages
+					.getString("TraceCompilerErrorMessages.InvalidDirectory")); //$NON-NLS-1$
+		}
+	}
+
+	/**
+	 * Creates "File not found" message
+	 * 
+	 * @param parameters
+	 *            the message parameters
+	 * @param sb
+	 *            the string buffer where the message is stored
+	 */
+	private static void createFileNotFoundMessage(
+			FileErrorParameters parameters, StringBuffer sb) {
+		String s;
+		if (parameters != null) {
+			s = Messages
+					.getString("TraceCompilerErrorMessages.FileDoesNotExistPrefix"); //$NON-NLS-1$
+			sb.append(s);
+			sb.append(convertPath(parameters.file));
+			s = Messages
+					.getString("TraceCompilerErrorMessages.FileDoesNotExistPostfix"); //$NON-NLS-1$
+			sb.append(s);
+		} else {
+			sb.append(Messages
+					.getString("TraceCompilerErrorMessages.FileDoesNotExist")); //$NON-NLS-1$
+		}
+	}
+
+	/**
+	 * Adds some spaces to path string to allow folding
+	 * 
+	 * @param path
+	 *            the path
+	 * @return the converted path
+	 */
+	public static String convertPath(String path) {
+		StringBuffer sb = new StringBuffer();
+		int strIndex = -1;
+		do {
+			strIndex++;
+			int lastIndex = strIndex;
+			strIndex = path.indexOf(File.separatorChar, strIndex);
+			if (strIndex != -1) {
+				String sub = path.substring(lastIndex, strIndex);
+				if (sub.length() > 0) {
+					sb.append(sub);
+					sb.append(' ');
+					sb.append(File.separatorChar);
+					sb.append(' ');
+				}
+			} else {
+				// If the data ends with file separator, lastIndex points to
+				// end-of-data. If not, the rest of the data is appended without
+				// further white spaces
+				if (lastIndex < path.length()) {
+					String sub = path.substring(lastIndex);
+					sb.append(sub);
+				}
+			}
+		} while (strIndex != -1);
+		return sb.toString();
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/TraceCompilerEngineEvents.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,98 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Event listener interface
+*
+*/
+package com.nokia.tracecompiler.engine;
+
+import com.nokia.tracecompiler.model.TraceCompilerException;
+
+/**
+ * Event listener interface
+ * 
+ */
+public interface TraceCompilerEngineEvents {
+
+	/**
+	 * Posts an error event to TraceCompiler
+	 * 
+	 * @param exception
+	 *            the error data
+	 */
+	public void postError(TraceCompilerException exception);
+
+	/**
+	 * Posts an error event to TraceCompiler
+	 * 
+	 * @param message
+	 *            the error message
+	 * @param source
+	 *            the error source
+	 * @param postEvent
+	 *            defines is error event also posted to trace event view
+	 */
+	public void postErrorMessage(String message, Object source, boolean postEvent);
+
+	/**
+	 * Posts a warning event to TraceCompiler
+	 * 
+	 * @param message
+	 *            the warning message
+	 * @param source
+	 *            the warning source
+	 */
+	public void postWarningMessage(String message, Object source);
+
+	/**
+	 * Posts an info event to TraceCompiler
+	 * 
+	 * @param message
+	 *            the info message
+	 * @param source
+	 *            the info source
+	 */
+	public void postInfoMessage(String message, Object source);
+
+	/**
+	 * Posts a critical assertion failed event
+	 * 
+	 * @param message
+	 *            the message
+	 * @param source
+	 *            the source of the assertion
+	 * @throws TraceCompilerException 
+	 */
+	public void postCriticalAssertionFailed(String message, Object source) throws TraceCompilerException;
+
+	/**
+	 * Posts an assertion failed event
+	 * 
+	 * @param message
+	 *            the message
+	 * @param source
+	 *            the source of the assertion
+	 */
+	public void postAssertionFailed(String message, Object source);
+
+	/**
+	 * Gets the processing error
+	 * 
+	 * @return the error
+	 */
+	public boolean hasErrorHappened();
+
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/TraceCompilerEngineGlobals.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,255 @@
+/*
+* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Access point to the exported interfaces of TraceCompiler engine
+*
+*/
+package com.nokia.tracecompiler.engine;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+
+import com.nokia.tracecompiler.TraceCompilerLogger;
+import com.nokia.tracecompiler.engine.source.SourceEngine;
+import com.nokia.tracecompiler.model.TraceCompilerException;
+import com.nokia.tracecompiler.model.TraceModel;
+import com.nokia.tracecompiler.plugin.TraceCompilerPlugin;
+import com.nokia.tracecompiler.source.SourceConstants;
+
+/**
+ * Access point to the exported interfaces of TraceCompiler engine
+ * 
+ */
+public class TraceCompilerEngineGlobals {
+
+	/**
+	 * Max group ID
+	 */
+	public static final int MAX_GROUP_ID = 65535; // CodForChk_Dis_Magic
+
+	/**
+	 * Max trace ID
+	 */
+	public static final int MAX_TRACE_ID = 65535; // CodForChk_Dis_Magic
+
+	/**
+	 * TraceCompiler engine instance
+	 */
+	private static TraceCompilerEngine instance;
+	
+	/**
+	 * default licence
+	 */
+	static String defaultLicence;
+	
+	/**
+	 * default licence
+	 */
+	static String defaultLicenceWithHash;
+	
+	/**
+	 * Constructor is hidden
+	 */
+	private TraceCompilerEngineGlobals() {
+	}
+
+	/**
+	 * Starts TraceCompiler engine.
+	 * @throws TraceCompilerException 
+	 */
+	public static void start() throws TraceCompilerException {
+		if (instance == null) {
+			instance = new TraceCompilerEngine();
+			instance.start();
+		}
+	}
+
+	/**
+	 * Shuts down the TraceCompiler instance
+	 * @throws TraceCompilerException 
+	 */
+	public static void shutdown() throws TraceCompilerException {
+		if (instance != null) {
+			instance.shutdown();
+			instance = null;
+		}
+	}
+
+	/**
+	 * Gets the configuration interface. The configuration interface is not
+	 * available until view has been registered.
+	 * 
+	 * @return the configuration
+	 */
+	public static TraceCompilerEngineConfiguration getConfiguration() {
+		return instance.getConfiguration();
+	}
+
+	/**
+	 * Gets the trace model
+	 * 
+	 * @return the model
+	 */
+	public static TraceModel getTraceModel() {
+		return instance.getModel();
+	}
+
+	/**
+	 * Gets the source engine
+	 * 
+	 * @return the source engine
+	 */
+	public static SourceEngine getSourceEngine() {
+		return instance.getSourceEngine();
+	}
+
+	/**
+	 * Gets the trace compiler interface
+	 * 
+	 * @return trace compiler
+	 */
+	public static TraceCompilerEngineInterface getTraceCompiler() {
+		return instance.getTraceCompiler();
+	}
+
+	/**
+	 * Gets the events interface
+	 * 
+	 * @return the events interface
+	 */
+	public static TraceCompilerEngineEvents getEvents() {
+		if (instance != null) {
+			return instance.getEvents();
+		} else {
+			return null;
+		}
+	}
+
+	/**
+	 * Called by a plug-in to register itself
+	 * 
+	 * @param plugin
+	 *            the plugin to be registered
+	 */
+	public static void registerPlugin(TraceCompilerPlugin plugin) {
+		instance.registerPlugin(plugin);
+	}
+
+	/**
+	 * Called by a plug-in to unregister itself
+	 * 
+	 * @param plugin
+	 *            the plugin to be unregistered
+	 */
+	public static void unregisterPlugin(TraceCompilerPlugin plugin) {
+		if (instance != null) {
+			instance.unregisterPlugin(plugin);
+		}
+	}
+
+	/**
+	 * Called by the view plug-in to register the view
+	 * 
+	 * @param view
+	 *            the view
+	 * @throws TraceCompilerException 
+	 */
+	public static void setView(TraceCompilerEngineView view) throws TraceCompilerException {
+		instance.setView(view);
+	}
+
+	/**
+	 * Gets the source context manager
+	 * 
+	 * @return the context manager
+	 */
+	public static SourceContextManager getSourceContextManager() {
+		return instance.getSourceContextManager();
+	}
+
+	/**
+	 * Get project path
+	 * 
+	 * @return project path
+	 */
+	public static String getProjectPath() {
+		String projetcPath = instance.getProjectPath();
+		return projetcPath;
+	}
+
+	/**
+	 * Set project path
+	 * 
+	 * @param path
+	 *            the path
+	 */
+	public static void setProjectPath(String path) {
+		instance.setProjectPath(path);
+	}
+	
+	/**
+	 * get default licence from com/nokia/tracecompiler/licence.lic
+	 * c++ comment format
+	 * @param boolean cppCommented
+	 *  if true, it returns the licence in cpp comment \/** ... **\/
+	 *  else it retuen the licence in a # comment ## ... ##
+	 * @return String licence
+	 */
+	public static String getDefaultLicence(boolean cppCommented) {
+		String licenceResourceName;
+		if (cppCommented) {
+			if (defaultLicence == null) {
+				licenceResourceName = "/com/nokia/tracecompiler/licence.lic"; //$NON-NLS-1$
+				defaultLicence = readLicence(licenceResourceName);
+			}
+			return defaultLicence;
+		} else {
+			if (defaultLicenceWithHash == null) {
+				licenceResourceName = "/com/nokia/tracecompiler/licence_hash.lic"; //$NON-NLS-1$
+				defaultLicenceWithHash = readLicence(licenceResourceName);
+			}
+			return defaultLicenceWithHash;
+		}
+	}
+
+	/**
+	 * read the provided resource file and return the text in it.
+	 */
+	private static String readLicence(String aLicenceResourceName) {
+		String licenceText = null;
+		InputStream is = instance.getClass().getResourceAsStream(aLicenceResourceName); 
+		if (is != null) {
+			InputStreamReader isr = new InputStreamReader(is);
+			BufferedReader br = new BufferedReader(isr);
+			StringBuffer sb = new StringBuffer();
+			String line;
+			try {
+				while ((line = br.readLine()) != null) {
+					sb.append(line + SourceConstants.LINE_FEED);
+				}
+				licenceText = sb.toString();
+				br.close();
+				isr.close();
+				is.close();
+			} catch (IOException e) {
+				TraceCompilerLogger.printWarning(Messages.getString("TraceCompilerErrorMessages.LicenceFileError") + e.getMessage()); //$NON-NLS-1$
+			}
+		}
+		return licenceText;
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/TraceCompilerEngineInterface.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,55 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* TraceCompiler interface
+*
+*/
+package com.nokia.tracecompiler.engine;
+
+import com.nokia.tracecompiler.model.TraceCompilerException;
+
+/**
+ * TraceCompiler interface
+ * 
+ */
+public interface TraceCompilerEngineInterface {
+
+	/**
+	 * Opens the trace project related to given source file
+	 * 
+	 * @param modelName
+	 *            the name for the model
+	 * @throws TraceCompilerException
+	 *             if startup fails
+	 * @throws Exception 
+	 */
+	public void openProject(String modelName)
+			throws Exception; //this include TraceCompilerException
+
+	/**
+	 * Exports the trace project
+	 * 
+	 * @throws TraceCompilerException
+	 *             if export fails
+	 */
+	public void exportProject() throws TraceCompilerException;
+
+	/**
+	 * Closes the trace project
+	 * @throws TraceCompilerException 
+	 */
+	public void closeProject() throws TraceCompilerException;
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/TraceCompilerEngineView.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,37 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Interface implemented by the view of TraceCompiler
+*
+*/
+package com.nokia.tracecompiler.engine;
+
+/**
+ * Interface implemented by the view of TraceCompiler. The view is implemented
+ * as a separate plug-in, which is registered via
+ * {@link TraceCompilerEngineGlobals#setView(TraceCompilerView)}
+ * 
+ * @see com.nokia.tracecompiler.engine.TraceCompilerEngineGlobals#setView(TraceCompilerView)
+ */
+public interface TraceCompilerEngineView {
+
+	/**
+	 * Gets the configuration interface
+	 * 
+	 * @return the configuration interface
+	 */
+	public TraceCompilerEngineConfiguration getConfiguration();
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/TraceLocation.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,491 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Represents a location of a trace within a source document
+*
+*/
+package com.nokia.tracecompiler.engine;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+
+import com.nokia.tracecompiler.engine.TraceCompilerEngineErrorCodes.TraceCompilerErrorCode;
+import com.nokia.tracecompiler.engine.source.SourceParserResult;
+import com.nokia.tracecompiler.engine.source.SourceParserRule;
+import com.nokia.tracecompiler.engine.source.SourceProperties;
+import com.nokia.tracecompiler.model.Trace;
+import com.nokia.tracecompiler.model.TraceCompilerErrorParameters;
+import com.nokia.tracecompiler.model.TraceCompilerException;
+import com.nokia.tracecompiler.model.TraceObject;
+import com.nokia.tracecompiler.source.SourceConstants;
+import com.nokia.tracecompiler.source.SourceLocation;
+import com.nokia.tracecompiler.source.SourceLocationListener;
+
+/**
+ * Represents a location of a trace within a source document. The locations of a
+ * document are updated by TraceLocationUpdater when document is changed
+ * 
+ */
+public class TraceLocation extends SourceLocation implements LocationProperties {
+
+	/**
+	 * Source which owns this location
+	 */
+	private SourceProperties source;
+
+	/**
+	 * Name of the trace as parsed from source
+	 */
+	private String originalName;
+
+	/**
+	 * Name after conversion to valid trace name
+	 */
+	private String convertedName;
+
+	/**
+	 * Text of the trace as parsed from source
+	 */
+	private String traceText;
+
+	/**
+	 * The tag of the parser that found this trace location
+	 */
+	private String tag;
+
+	/**
+	 * Content changed flag
+	 */
+	private boolean contentChanged;
+
+	/**
+	 * Name changed flag
+	 */
+	private boolean nameChanged;
+
+	/**
+	 * The location list
+	 */
+	private TraceLocationList list;
+
+	/**
+	 * The parameters
+	 */
+	private List<String> parameters;
+
+	/**
+	 * Parser-specific data associated with this location
+	 */
+	private List<String> parserData;
+
+	/**
+	 * Rule which defines how the parameters found from source are interpreted
+	 */
+	private SourceParserRule parserRule;
+
+	/**
+	 * Flag, which determines if this location has changed after last convert
+	 * operation
+	 */
+	private boolean changedAfterConvert = true;
+
+	/**
+	 * Last notified validity code
+	 */
+	private TraceCompilerErrorCode notifiedValidity = TraceCompilerErrorCode.OK;
+
+	/**
+	 * Last notified validity parameters
+	 */
+	private TraceCompilerErrorParameters notifiedValidityParameters;
+
+	/**
+	 * Parser error code
+	 */
+	private TraceCompilerErrorCode parserErrorCode = TraceCompilerErrorCode.OK;
+
+	/**
+	 * Parser error parameters
+	 */
+	private TraceCompilerErrorParameters parserErrorParameters;
+
+	/**
+	 * Converter error code
+	 */
+	private TraceCompilerErrorCode converterErrorCode = TraceCompilerErrorCode.OK;
+
+	/**
+	 * Converter error parameters
+	 */
+	private TraceCompilerErrorParameters converterErrorParameters;
+
+	/**
+	 * Creates a new location
+	 * 
+	 * @param source
+	 *            the source where the location is associated
+	 * @param offset
+	 *            the offset to the trace within the source document
+	 * @param length
+	 *            the length of the trace
+	 */
+	public TraceLocation(SourceProperties source, int offset, int length) {
+		super(source.getSourceParser(), offset, length);
+		this.source = source;
+	}
+
+	/**
+	 * Sets the content changed flag. If <i>changed</i> is false this also sets
+	 * the name changed flag to false
+	 * 
+	 * @param changed
+	 *            the new changed flag
+	 */
+	public void setContentChanged(boolean changed) {
+		this.contentChanged = changed;
+		if (!changed) {
+			nameChanged = false;
+		}
+	}
+
+	/**
+	 * Checks if the content has changed.
+	 * 
+	 * @return the content changed flag
+	 */
+	public boolean isContentChanged() {
+		return contentChanged;
+	}
+
+	/**
+	 * Checks if the name has changed.
+	 * 
+	 * @return the name changed flag
+	 */
+	public boolean isNameChanged() {
+		return contentChanged && nameChanged;
+	}
+
+	/**
+	 * Gets the trace this location is associated to or null if unrelated
+	 * 
+	 * @return the trace
+	 */
+	public Trace getTrace() {
+		Trace retval = null;
+		if (list != null) {
+			TraceObject object = list.getOwner();
+			if (object instanceof Trace) {
+				retval = (Trace) object;
+			}
+		}
+		return retval;
+	}
+
+	/**
+	 * Gets the name of the trace as parsed from source
+	 * 
+	 * @return the name of the trace
+	 */
+	public String getOriginalName() {
+		return originalName;
+	}
+
+	/**
+	 * Gets the name of the trace after conversion to valid name
+	 * 
+	 * @return the name of the trace
+	 */
+	public String getConvertedName() {
+		return convertedName;
+	}
+
+	/**
+	 * Gets the text of the trace
+	 * 
+	 * @return the text of the trace
+	 */
+	public String getTraceText() {
+		return traceText;
+	}
+
+	/**
+	 * Returns the source properties this location belongs to
+	 * 
+	 * @return source properties
+	 */
+	public SourceProperties getSource() {
+		return source;
+	}
+
+	/**
+	 * Sets the location list which owns this location
+	 * 
+	 * @param list
+	 *            the location list
+	 */
+	public void setLocationList(TraceLocationList list) {
+		this.list = list;
+	}
+
+	/**
+	 * Gets the location list this location belongs to
+	 * 
+	 * @return the list
+	 */
+	public TraceLocationList getLocationList() {
+		return list;
+	}
+
+	/**
+	 * Sets the parser rule that will be used to parse the data of this
+	 * location. Must be called before setData
+	 * 
+	 * @param rule
+	 *            the rule used to parse the data
+	 */
+	public void setParserRule(SourceParserRule rule) {
+		parserRule = rule;
+	}
+
+	/**
+	 * Gets the parser rule that found this location
+	 * 
+	 * @return the parser rule
+	 */
+	public SourceParserRule getParserRule() {
+		return parserRule;
+	}
+
+	/**
+	 * Sets the trace tag that was found from source
+	 * 
+	 * @param tag
+	 *            the trace tag
+	 */
+	public void setTag(String tag) {
+		this.tag = tag;
+	}
+
+	/**
+	 * Gets the trace tag
+	 * 
+	 * @return the tag
+	 */
+	public String getTag() {
+		return tag;
+	}
+
+	/**
+	 * Sets the trace data
+	 * 
+	 * @param list
+	 *            the list of parameters
+	 */
+	public void setData(ArrayList<String> list) {
+		try {
+			SourceParserResult result = parserRule.parseParameters(tag, list);
+			setData(result.originalName, result.convertedName,
+					result.traceText, result.parameters, result.parserData);
+			parserRule.getLocationParser().processNewLocation(this);
+			parserErrorCode = TraceCompilerErrorCode.OK;
+			parserErrorParameters = null;
+			converterErrorCode = TraceCompilerErrorCode.OK;
+			converterErrorParameters = null;
+		} catch (TraceCompilerException e) {
+			parserErrorCode = (TraceCompilerErrorCode) e.getErrorCode();
+			parserErrorParameters = e.getErrorParameters();
+		}
+	}
+
+	/**
+	 * Sets the trace name and parameter list
+	 * 
+	 * @param originalName
+	 *            the name parsed from source
+	 * @param convertedName
+	 *            the name after conversion
+	 * @param traceText
+	 *            the text parsed from source
+	 * @param parameters
+	 *            the list of parameters parsed from source
+	 * @param parserData
+	 *            list of parser-specific data
+	 */
+	private void setData(String originalName, String convertedName,
+			String traceText, List<String> parameters, List<String> parserData) {
+		if (!convertedName.equals(this.convertedName)) {
+			this.convertedName = convertedName;
+			nameChanged = true;
+		}
+		this.originalName = originalName;
+		//remove line feed if the trace text spans multiple lines.
+		if (traceText != null ) {
+			this.traceText = traceText.replaceAll(SourceConstants.LINE_FEED, ""); //$NON-NLS-1$ //$NON-NLS-2$
+		}
+		this.parameters = parameters;
+		this.parserData = parserData;
+	}
+
+	/**
+	 * Removes the parameter at given index
+	 * 
+	 * @param index
+	 *            the index
+	 */
+	public void removeParameterAt(int index) {
+		// NOTE: Does not cause validity callbacks
+		// This is currently only used temporarily when removing a parameter
+		// from trace. This is needed to correctly update the source code
+		if (parameters != null && index >= 0 && index < parameters.size()) {
+			parameters.remove(index);
+		}
+	}
+
+	/**
+	 * Gets the number of parameters found from the source code
+	 * 
+	 * @return the number of parameters
+	 */
+	public int getParameterCount() {
+		return parameters != null ? parameters.size() : 0;
+	}
+
+	/**
+	 * Gets the parameter at given index
+	 * 
+	 * @param index
+	 *            the parameter index
+	 * @return the parameter at the index
+	 */
+	public String getParameter(int index) {
+		return parameters.get(index);
+	}
+
+	/**
+	 * Gets the parameters
+	 * 
+	 * @return iterator over the parameters
+	 */
+	public Iterator<String> getParameters() {
+		List<String> list = null;
+		if (parameters != null) {
+			list = parameters;
+		} else {
+			list = Collections.emptyList();
+		}
+		return list.iterator();
+	}
+
+	/**
+	 * Gets the parser-specific data
+	 * 
+	 * @return the parser data
+	 */
+	public List<String> getParserData() {
+		return parserData;
+	}
+
+	/**
+	 * Gets the current location validity code.
+	 * 
+	 * @return the validity code
+	 */
+	public TraceCompilerErrorCode getValidityCode() {
+		return notifiedValidity;
+	}
+
+	/**
+	 * Gets the parameters associated with the current location validity code.
+	 * 
+	 * @return the validity code
+	 */
+	public TraceCompilerErrorParameters getValidityParameters() {
+		return notifiedValidityParameters;
+	}
+
+	/**
+	 * Creates a notification if validity has changed. This is initially called
+	 * from the location list when a location is added to it and after that from
+	 * notifyLocationChanged.
+	 */
+	void runValidityCheck() {
+		TraceCompilerErrorCode code;
+		TraceCompilerErrorParameters parameters;
+		if (parserErrorCode != TraceCompilerErrorCode.OK) {
+			code = parserErrorCode;
+			parameters = parserErrorParameters;
+		} else if (converterErrorCode != TraceCompilerErrorCode.OK) {
+			code = converterErrorCode;
+			parameters = converterErrorParameters;
+		} else {
+			code = TraceCompilerErrorCode.TRACE_DOES_NOT_EXIST;
+			parameters = null;
+			if (parserRule != null) {
+				code = parserRule.getLocationParser().checkLocationValidity(
+						this);
+			}
+		}
+		if (code != notifiedValidity) {
+			notifiedValidity = code;
+			notifiedValidityParameters = parameters;
+			Iterator<SourceLocationListener> itr = getListeners();
+			while (itr.hasNext()) {
+				SourceLocationListener listener = itr.next();
+				if (listener instanceof SourceLocationListener) {
+					((SourceLocationListener) listener)
+							.locationValidityChanged(this);
+				}
+			}
+		}
+	}
+
+	/**
+	 * Sets the converter error code and runs the validity check to notify
+	 * listeners about change in error code
+	 * 
+	 * @param errorCode
+	 *            the new error code
+	 * @param parameters
+	 *            the error parameters
+	 */
+	void setConverterErrorCode(TraceCompilerErrorCode errorCode,
+			TraceCompilerErrorParameters parameters) {
+		converterErrorCode = errorCode;
+		converterErrorParameters = parameters;
+		runValidityCheck();
+	}
+
+	/**
+	 * Flag, which determines if the location has changed since last convert
+	 * operation
+	 * 
+	 * @return the flag
+	 */
+	public boolean hasChangedAfterConvert() {
+		return changedAfterConvert;
+	}
+
+	/**
+	 * Called when the location has been converted. Sets the changed after
+	 * convert flag to false
+	 */
+	public void locationConverted() {
+		changedAfterConvert = false;
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/TraceLocationConverter.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,679 @@
+/*
+ * Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). 
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "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:
+ *
+ * Description:
+ *
+ * Location converter monitors locations and converts them to traces if necessary.
+ *
+ */
+package com.nokia.tracecompiler.engine;
+
+import java.io.*;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Properties;
+
+import com.nokia.tracecompiler.TraceCompilerConstants;
+import com.nokia.tracecompiler.TraceCompilerLogger;
+import com.nokia.tracecompiler.engine.TraceCompilerEngineErrorCodes.TraceCompilerErrorCode;
+import com.nokia.tracecompiler.engine.project.ProjectConstants;
+import com.nokia.tracecompiler.engine.project.ProjectEngine;
+import com.nokia.tracecompiler.engine.project.SortedProperties;
+import com.nokia.tracecompiler.engine.project.TraceIDCache;
+import com.nokia.tracecompiler.engine.rules.PerformanceEventRuleBase;
+import com.nokia.tracecompiler.engine.rules.StateTraceRule;
+import com.nokia.tracecompiler.engine.source.SourceParserRule;
+import com.nokia.tracecompiler.engine.source.SourceProperties;
+import com.nokia.tracecompiler.engine.source.SourceParserRule.ParameterConversionResult;
+import com.nokia.tracecompiler.engine.source.SourceParserRule.TraceConversionResult;
+import com.nokia.tracecompiler.model.Trace;
+import com.nokia.tracecompiler.model.TraceCompilerException;
+import com.nokia.tracecompiler.model.TraceGroup;
+import com.nokia.tracecompiler.model.TraceModel;
+import com.nokia.tracecompiler.model.TraceModelExtension;
+import com.nokia.tracecompiler.model.TraceModelPersistentExtension;
+import com.nokia.tracecompiler.model.TraceParameter;
+import com.nokia.tracecompiler.project.FormattingUtils;
+import com.nokia.tracecompiler.project.GroupNames;
+import com.nokia.tracecompiler.project.ProjectUtils;
+import com.nokia.tracecompiler.source.SourceConstants;
+
+/**
+ * Location converter monitors locations and converts them to traces if
+ * necessary.
+ * 
+ */
+public final class TraceLocationConverter {
+
+	/**
+	 * Number of deprecated groups
+	 */
+	final static int NUMBER_OF_DEPRECATED_GROUPS = 3;
+
+	/**
+	 * Deprecated group name map
+	 */
+	Map<String, String> deprecatedGroupNameMap = new HashMap<String, String>(
+			NUMBER_OF_DEPRECATED_GROUPS);
+
+	/**
+	 * Trace model
+	 */
+	private TraceModel model;
+
+	/**
+	 * Constructor
+	 * 
+	 * @param model
+	 *            the trace model
+	 */
+	TraceLocationConverter(TraceModel model) {
+		this.model = model;
+		initializeDeprecatedGroupNameMap();
+	}
+
+	/**
+	 * Initialize deprecated group name map
+	 */
+	private void initializeDeprecatedGroupNameMap() {
+		deprecatedGroupNameMap.put(GroupNames.TRACE_API,
+				GroupNames.TRACE_BORDER);
+		deprecatedGroupNameMap.put(GroupNames.TRACE_DEBUG,
+				GroupNames.TRACE_DUMP);
+		deprecatedGroupNameMap.put(GroupNames.TRACE_DETAILED,
+				GroupNames.TRACE_INTERNALS);
+	}
+
+	/**
+	 * Source opened notification
+	 * 
+	 * @param properties
+	 *            the source properties
+	 * @throws TraceCompilerException 
+	 */
+	void sourceOpened(SourceProperties properties) throws TraceCompilerException {
+		//make sure all errors are reported AFTER processing a file
+		TraceCompilerEngineGlobals.getSourceContextManager()
+				.setConverting(true);
+		model.startProcessing();
+		try {
+			// Load fixed group and trace ids from definition file to model
+			//no errors are reported here 
+			if (model.getFixedIds() == null) {
+				loadFixedIdsFromDefinitionFileToModel();
+			}
+
+			for (TraceLocation loc : properties) {
+				autoConvertLocation(loc);
+			}
+			// If there are duplicates or unused traces, they are removed
+			// Note that this will work across source files although this
+			// function is processing only one file.
+			// If a trace is created, all locations from all open source files
+			// are linked to that trace and thus it will be removed as
+			// duplicate.
+			removeDuplicateTraces();
+
+		} finally {
+			model.processingComplete();
+			SourceContextManager manager = TraceCompilerEngineGlobals
+					.getSourceContextManager();
+			manager.setConverting(false);
+			manager.setContext(null);
+		}
+	}
+
+	/**
+	 * Load fixed Ids from definiton file to properties
+	 * 
+	 */
+	private void loadFixedIdsFromDefinitionFileToModel() {
+		TraceIDCache cache = model.getExtension(TraceIDCache.class);
+
+		// Create trace Id cache if it does not exist
+		try {
+			if (cache == null) {
+				String path;
+				path = ProjectUtils.getLocationForFile(model,
+						ProjectEngine.traceFolderName,
+						ProjectConstants.FIXED_ID_DEFINITIONS_FILE_NAME, false);
+				if (path != null) {
+					cache = new TraceIDCache(new File(path).getParent());
+					model.addExtension(cache);
+				}
+			}
+			if (cache != null) {
+				File cacheFile = new File(cache.getAbsolutePath());
+				// Try to load Ids from trace Id cache file
+				try {
+					SortedProperties fixedIds = new SortedProperties();
+					if (cacheFile.exists()) {
+						String thisLine;
+						boolean allOldFixedIdsAreValid = true;
+						String group = model.GROUP_PROPERTY_PREFIX;
+						FileInputStream fis = new FileInputStream(cacheFile);
+						BufferedReader myInput = new BufferedReader(
+								new InputStreamReader(fis));
+						// Read the old fixed id definition file
+						while ((thisLine = myInput.readLine()) != null) {
+							if (thisLine.indexOf(group) != -1) {
+								thisLine = thisLine.substring(group.length(),
+										thisLine.length());
+								if (!searchForOldGroupIds(thisLine)) {						
+									String msg  = Messages.getString("TraceLocationConverter.GroupIdValueError"); //$NON-NLS-1$
+									TraceCompilerEngineGlobals.getEvents().postWarningMessage(msg, null);
+									// We need only one old invalid id to make all of them invalid
+									allOldFixedIdsAreValid = false;
+									break;
+								}
+							}
+						}
+						fis.close();
+						
+						if (allOldFixedIdsAreValid) {
+							// Create file input stream again
+							FileInputStream newFis = new FileInputStream(cacheFile);
+							fixedIds.load(newFis);
+							// Load fixed Ids from properties to model
+							model.setFixedIds(fixedIds);
+							newFis.close();
+						}
+						
+					}
+				} catch (IOException e) {
+					// If there is a problem with the cache file, just delete it
+					// make sure the model fixed ids is null
+					model.setFixedIds(null);
+					cacheFile.delete();
+					// We do not raise an exception but we need to report a info
+					TraceCompilerLogger.printWarning(Messages.getString("TraceLocationConverter.FixedIdProblemWarningBeginText") + cacheFile.toString() + Messages.getString("TraceLocationConverter.FixedIdProblemWarningMiddleText") + e.getMessage()); //$NON-NLS-1$ //$NON-NLS-2$
+				}
+			}
+		} catch (TraceCompilerException e) {
+			// This exception can probably be ignored
+			TraceCompilerLogger.printWarning("Could not create ID cache : " + e.getMessage()); //$NON-NLS-1$
+		}
+	}
+
+	/**
+	 * Searches the fixed_id file to see if there are any old definitions
+	 * 
+	 * @param string
+	 *            of text from the fixed_id files
+	 * @return boolean 
+	 */
+	public static boolean searchForOldGroupIds(String str) {
+		
+		boolean oldGroupIdValid = true;
+
+		//get group name from the string
+		int index = str.indexOf(SourceConstants.ASSIGN_WITH_OUT_SPACES);
+		if (index == -1) {
+			//not valid string, so ignore it, just return success
+			return true;
+		}
+
+		String groupName = str.substring(0, index);
+
+		//get group id
+		str = str.substring(str.indexOf(SourceConstants.HEX_PREFIX) + 2, str
+				.length());
+
+		int groupId = -1;
+
+		try {
+			groupId = Integer.parseInt(str.trim(),
+					TraceCompilerConstants.HEX_RADIX);
+		} catch (NumberFormatException e) {
+			//it's not an hex number so fail
+			oldGroupIdValid = false;
+		}
+
+		//get group id from ost header file
+		int fileGroupId = GroupNames.getIdByName(groupName);
+
+		if (fileGroupId != 0) {
+			//found 1
+			if (fileGroupId != groupId) //group id has changed, so old one can't be used
+				oldGroupIdValid = false;
+		} else {
+			if ((GroupNames.USER_GROUP_ID_FIRST > groupId)
+					|| (groupId > GroupNames.USER_GROUP_ID_LAST)) //not within new user defined Ids
+				oldGroupIdValid = false;
+		}
+
+		return oldGroupIdValid;
+	}
+
+	/**
+	 * Converts the given location to trace if parser supports auto-conversion
+	 * 
+	 * @param location
+	 *            the location
+	 */
+	private void autoConvertLocation(TraceLocation location) {
+		// Stores the context of the location to the context manager.
+		TraceCompilerEngineGlobals.getSourceContextManager().setContext(
+				location.getParser().getContext(location.getOffset()));
+		Trace trace = location.getTrace();
+		if (trace == null) {
+			// If the trace does not exist, the parser determines if the
+			// location can be converted
+			if (location.getParserRule().getLocationParser()
+					.isLocationConverted(location)) {
+				try {
+					convertLocation(location, null, true);
+				} catch (TraceCompilerException e) {
+					// If converter fails, the error code is stored into the
+					// location. The location notifies all validity listeners
+					// about the change
+					location.setConverterErrorCode((TraceCompilerErrorCode) e
+							.getErrorCode(), e.getErrorParameters());
+				}
+			}
+		} else {
+			// If the trace already exists in the model, it is updated
+			// based on the source file contents
+			updateLocation(location);
+		}
+	}
+
+	/**
+	 * Recreates the trace from changed location when source is saved
+	 * 
+	 * @param location
+	 *            the location to be checked
+	 */
+	private void updateLocation(TraceLocation location) {
+		// Parser determines if the location can be converted
+		if (location.getParserRule().getLocationParser().isLocationConverted(
+				location)) {
+			try {
+				Trace trace = location.getTrace();
+				// If a location has changed, the old trace is removed
+				// and a new one created. Persistent extensions are moved to the
+				// new trace
+				Iterator<TraceModelPersistentExtension> extensions = null;
+				if (trace != null) {
+					extensions = trace
+							.getExtensions(TraceModelPersistentExtension.class);
+					trace.getGroup().removeTrace(trace);
+				}
+				convertLocation(location, extensions, true);
+
+				// Check that the location is inside a function. Otherwise throw
+				// an error because the code is unreachable
+				if (location.getFunctionName() == null) {
+					throw new TraceCompilerException(
+							TraceCompilerErrorCode.UNREACHABLE_TRACE_LOCATION);
+				}
+
+			} catch (TraceCompilerException e) {
+				// If converter fails, the error code is stored into the
+				// location. The location notifies all validity listeners about
+				// the change
+				location.setConverterErrorCode((TraceCompilerErrorCode) e
+						.getErrorCode(), e.getErrorParameters());
+			}
+		}
+	}
+
+	/**
+	 * Removes all duplicate traces from the model
+	 * @throws TraceCompilerException 
+	 */
+	private void removeDuplicateTraces() throws TraceCompilerException {
+		boolean groupRemoved = true;
+		while (groupRemoved) {
+			groupRemoved = false;
+			for (TraceGroup group : model) {
+				removeDuplicateTracesFromGroup(group);
+				if (!group.hasTraces()) {
+					model.removeGroup(group);
+					groupRemoved = true;
+					break;
+				}
+			}
+		}
+	}
+
+	/**
+	 * Removes duplicate traces from a trace group
+	 * 
+	 * @param group
+	 *            the group
+	 * @throws TraceCompilerException 
+	 */
+	private void removeDuplicateTracesFromGroup(TraceGroup group) throws TraceCompilerException {
+		boolean traceRemoved = true;
+		while (traceRemoved) {
+			traceRemoved = false;
+			for (Trace trace : group) {
+				TraceLocationList list = trace
+						.getExtension(TraceLocationList.class);
+				if (list != null) {
+					if (list.getLocationCount() > 1) {
+						// All the locations are marked as duplicates and the
+						// trace is deleted
+						TraceCompilerErrorCode code = TraceCompilerErrorCode.TRACE_HAS_MULTIPLE_LOCATIONS;
+						for (LocationProperties loc : list) {
+							((TraceLocation) loc).setConverterErrorCode(code,
+									null);
+						}
+						group.removeTrace(trace);
+						traceRemoved = true;
+						break;
+					}
+				}
+			}
+		}
+	}
+
+	/**
+	 * Converts a location to a Trace object.
+	 * 
+	 * @param location
+	 *            the location to be converted
+	 * @param extensions
+	 *            persistent extensions to be added to the new trace
+	 * @param autoConvert
+	 *            true if converting without user interaction
+	 * @return the new trace
+	 * @throws TraceCompilerException
+	 *             if conversion fails
+	 */
+	private Trace convertLocation(TraceLocation location,
+			Iterator<TraceModelPersistentExtension> extensions,
+			boolean autoConvert) throws TraceCompilerException {
+		Trace trace = null;
+		// If the parser has failed, the validity code is not OK and the
+		// location cannot be converted. Traces marked with no-trace error code
+		// have not yet been converted, so that is OK. Traces that have
+		// duplicate ID's error code can be parsed, since the duplicates might
+		// no longer exist.
+		if (!autoConvert
+				|| location.getValidityCode() == TraceCompilerErrorCode.OK
+				|| location.getValidityCode() == TraceCompilerErrorCode.TRACE_DOES_NOT_EXIST
+				|| location.getValidityCode() == TraceCompilerErrorCode.TRACE_HAS_MULTIPLE_LOCATIONS) {
+			// The parser does the actual conversion
+			SourceParserRule rule = location.getParserRule();
+			TraceConversionResult result = rule.getLocationParser()
+					.convertLocation(location);
+			// After parser has finished, the trace is created.
+			trace = convertWithoutUI(result, extensions);
+
+			if (trace != null) {
+				model.startProcessing();
+				try {
+					createParametersFromConversionResult(location, result,
+							trace);
+					// Runs a location validity check and notifies listeners
+					// that location is now OK
+					location.setConverterErrorCode(TraceCompilerErrorCode.OK,
+							null);
+				} catch (TraceCompilerException e) {
+					// If parameters cannot be created, the trace is removed
+					TraceGroup group = trace.getGroup();
+					trace.getGroup().removeTrace(trace);
+					if (!group.hasTraces()) {
+						group.getModel().removeGroup(group);
+					}
+					throw e;
+				} finally {
+					model.processingComplete();
+				}
+			}
+		}
+		return trace;
+	}
+
+	/**
+	 * Converts a location to trace without UI
+	 * 
+	 * @param result
+	 *            the conversion result from parser
+	 * @param extensions
+	 *            persistent extensions to be added to the new trace
+	 * @return the converted trace
+	 * @throws TraceCompilerException
+	 *             if location properties are not valid
+	 */
+	private Trace convertWithoutUI(TraceConversionResult result,
+			Iterator<TraceModelPersistentExtension> extensions)
+			throws TraceCompilerException {
+		Trace trace = null;
+		if (result.group != null) {
+			String groupName = result.group;
+			TraceGroup group = handleGroup(groupName);
+			trace = handleTrace(result, extensions, group);
+		} else {
+			throw new TraceCompilerException(
+					TraceCompilerErrorCode.GROUP_NOT_SELECTED);
+		}
+		return trace;
+	}
+
+	/**
+	 * Handle trace
+	 * 
+	 * @param result
+	 *            the conversion result from parser
+	 * @param extensions
+	 *            persistent extensions to be added to the new trace
+	 * @param group
+	 *            the group where trace belongs to
+	 * @return the trace
+	 * @throws TraceCompilerException
+	 */
+	private Trace handleTrace(TraceConversionResult result,
+			Iterator<TraceModelPersistentExtension> extensions, TraceGroup group)
+			throws TraceCompilerException {
+		// First try to find Id to trace from fixed Ids
+		Trace trace = null;
+		Properties fixedIds = model.getFixedIds();
+		String groupName = result.group;
+		String traceName = result.name;
+		int groupId = group.getID();
+		String groupIdString = SourceConstants.HEX_PREFIX
+				+ Integer.toString(groupId, model.HEX_RADIX).toUpperCase();
+		int traceId = 0;
+		if (fixedIds != null) {
+			String tracePropertyName = groupName + model.GROUP_ID_PREFIX
+					+ groupIdString + model.GROUP_ID_SUFFIX
+					+ SourceConstants.UNDERSCORE + traceName;
+			String value = fixedIds.getProperty(model.TRACE_PROPERTY_PREFIX
+					+ tracePropertyName);
+			if (value != null) {
+				try {
+					traceId = Integer.decode(value).intValue();
+				} catch (NumberFormatException e) {
+					// Corrupted, assign a proper Id later on
+					traceId = 0;
+				}
+			}
+		}
+		// If there was no fixed Id to this trace, get Id from model
+		if (traceId == 0) {
+			traceId = model.getNextTraceId(group);
+		}
+
+		String text = result.text;
+		model.getVerifier().checkTraceProperties(group, null, traceId,
+				traceName, text);
+		TraceModelExtension[] extArray = createExtensionArray(result,
+				extensions);
+		trace = model.getFactory().createTrace(group, traceId, traceName, text,
+				extArray);
+
+		if ((trace.getExtension(StateTraceRule.class) == null)
+				&& (group.getName()
+						.equals("TRACE_STATE"))) { //$NON-NLS-1$
+			throw new TraceCompilerException(
+					TraceCompilerErrorCode.INVALID_USAGE_OF_TRACE_STATE_GROUP_NAME);
+		} else if ((trace.getExtension(PerformanceEventRuleBase.class) == null)
+				&& (group.getName()
+						.equals("TRACE_PERFORMANCE"))) { //$NON-NLS-1$
+			throw new TraceCompilerException(
+					TraceCompilerErrorCode.INVALID_USAGE_OF_TRACE_PERFORMACE_GROUP_NAME);
+		}
+
+		return trace;
+	}
+
+	/**
+	 * Handle group. Try to fnd group from model. If it does not exist then
+	 * create new group.
+	 * 
+	 * @param groupName
+	 *            the name of the group
+	 * @return the handled group
+	 * @throws TraceCompilerException
+	 */
+	private TraceGroup handleGroup(String groupName)
+			throws TraceCompilerException {
+		String deprecatedGroupName = null;
+		
+		// Convert deprecated group name to valid group name if needed
+		if (deprecatedGroupNameMap.containsKey(groupName)) {
+			deprecatedGroupName = groupName;
+			groupName = deprecatedGroupNameMap.get(groupName);
+		}
+
+		// If auto-convert flag is set, the location is converted without
+		// user interaction. A new trace group is created if not found
+		TraceGroup group = model.findGroupByName(groupName);
+		if (group == null) {
+			
+			// Print warning related to deprecated group name change if needed
+			if (deprecatedGroupName != null) {
+				String message = Messages
+						.getString("TraceLocationConverter.DeprecatedGroupIdWarningStart");//$NON-NLS-1$
+				message += SourceConstants.SPACE + deprecatedGroupName
+						+ SourceConstants.SPACE;
+				message += Messages
+						.getString("TraceLocationConverter.DeprecatedGroupIdWarningMiddle");//$NON-NLS-1$
+				message += SourceConstants.SPACE + groupName
+						+ SourceConstants.SPACE;
+				message += Messages
+						.getString("TraceLocationConverter.DeprecatedGroupIdWarningEnd");//$NON-NLS-1$
+				TraceCompilerLogger.printWarning(message);
+			}
+
+			int groupId = 0;
+			Properties fixedIds = model.getFixedIds();
+
+			// First try to find Id to group from fixed Ids
+			if (fixedIds != null) {
+				String value = fixedIds.getProperty(model.GROUP_PROPERTY_PREFIX
+						+ groupName);
+				if (value != null) {
+					try {
+						groupId = Integer.decode(value).intValue();
+					} catch (NumberFormatException e) {
+						// Corrupted, assign a proper Id later on
+						groupId = 0;
+					}
+				}
+			}
+			// If there was no fixed Id to this group, get Id from model
+			if (groupId == 0) {
+				groupId = FormattingUtils.getGroupID(model, groupName);
+			}
+			model.getVerifier().checkTraceGroupProperties(model, null, groupId,
+					groupName);
+			group = model.getFactory().createTraceGroup(groupId, groupName,
+					null);
+		}
+
+		return group;
+	}
+
+	/**
+	 * Combines extensions into one array
+	 * 
+	 * @param result
+	 *            the conversion result
+	 * @param extensions
+	 *            the persistent extensions from old trace
+	 * @return the combined array of extensions
+	 */
+	private TraceModelExtension[] createExtensionArray(
+			TraceConversionResult result,
+			Iterator<TraceModelPersistentExtension> extensions) {
+		TraceModelExtension[] extArray = null;
+		ArrayList<TraceModelExtension> ext = null;
+		if (result.extensions != null) {
+			ext = new ArrayList<TraceModelExtension>();
+			ext.addAll(result.extensions);
+		}
+		if (extensions != null) {
+			if (ext == null) {
+				ext = new ArrayList<TraceModelExtension>();
+			}
+			while (extensions.hasNext()) {
+				ext.add(extensions.next());
+			}
+		}
+		if (ext != null) {
+			extArray = new TraceModelExtension[ext.size()];
+			ext.toArray(extArray);
+		}
+		return extArray;
+	}
+
+	/**
+	 * Creates the trace parameters based on trace conversion result
+	 * 
+	 * @param converted
+	 *            the location that was converted
+	 * @param result
+	 *            the conversion result
+	 * @param trace
+	 *            the trace
+	 * @throws TraceCompilerException
+	 *             if parameters cannot be created
+	 */
+	private void createParametersFromConversionResult(TraceLocation converted,
+			TraceConversionResult result, Trace trace)
+			throws TraceCompilerException {
+		if (result.parameters != null) {
+			for (int i = 0; i < result.parameters.size(); i++) {
+				int id = trace.getNextParameterID();
+				ParameterConversionResult res = result.parameters.get(i);
+				boolean warning = false;
+				if (res.type == null) {
+					warning = true;
+					res.type = TraceParameter.HEX32;
+				}
+				model.getVerifier().checkTraceParameterProperties(trace, null,
+						id, res.name, res.type);
+				TraceModelExtension[] extArray = null;
+				if (res.extensions != null) {
+					extArray = new TraceModelExtension[res.extensions.size()];
+					res.extensions.toArray(extArray);
+				}
+				TraceParameter param = model.getFactory().createTraceParameter(
+						trace, id, res.name, res.type, extArray);
+				if (warning) {
+					String msg = Messages
+							.getString("TraceCompiler.UnknownTypeWarning"); //$NON-NLS-1$
+					TraceCompilerEngineGlobals.getEvents().postWarningMessage(
+							msg, param);
+				}
+			}
+		}
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/TraceLocationList.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,146 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* List of trace locations
+*
+*/
+package com.nokia.tracecompiler.engine;
+
+import java.util.ArrayList;
+
+import com.nokia.tracecompiler.model.TraceCompilerException;
+
+/**
+ * List of trace locations.
+ * 
+ */
+public class TraceLocationList extends LocationListBase {
+
+	/**
+	 * Location list listeners
+	 */
+	private ArrayList<TraceLocationListListener> listeners = new ArrayList<TraceLocationListListener>();
+
+	/**
+	 * List title, returned by getTitle
+	 */
+	private String listTitle;
+
+	/**
+	 * Constructor
+	 */
+	TraceLocationList() {
+	}
+
+	/**
+	 * Constructor
+	 * 
+	 * @param listTitle
+	 *            the title of this location list
+	 */
+	TraceLocationList(String listTitle) {
+		this.listTitle = listTitle;
+	}
+
+	/**
+	 * Adds a location to this list.
+	 * 
+	 * @param location
+	 *            the location to be added
+	 * @throws TraceCompilerException 
+	 */
+	void addLocation(TraceLocation location) throws TraceCompilerException {
+		if (TraceCompilerEngineConfiguration.ASSERTIONS_ENABLED) {
+			if (contains(location)) {
+				//this can only happen if there is a programming error
+				TraceCompilerEngineGlobals.getEvents().postCriticalAssertionFailed(
+						"Duplicate trace location", //$NON-NLS-1$
+						location.getConvertedName());
+				throw new TraceCompilerException(null);
+			}
+		}
+		location.setLocationList(this);
+		add(location);
+		fireLocationAdded(location);
+		location.runValidityCheck();
+	}
+
+	/**
+	 * Removes a location from this list.
+	 * 
+	 * @param location
+	 *            the location to be removed
+	 */
+	void removeLocation(TraceLocation location) {
+		if (remove(location)) {
+			fireLocationRemoved(location);
+			location.setLocationList(null);
+		}
+	}
+
+	/**
+	 * Adds a location list listener to this object
+	 * 
+	 * @param listener
+	 *            the listener interface
+	 */
+	public void addLocationListListener(TraceLocationListListener listener) {
+		listeners.add(listener);
+	}
+
+	/**
+	 * Removes the location list listener
+	 * 
+	 * @param listener
+	 *            the listener interface
+	 */
+	public void removeLocationListListener(TraceLocationListListener listener) {
+		listeners.remove(listener);
+	}
+
+	/**
+	 * Creates locationAdded event to location list listeners
+	 * 
+	 * @param location
+	 *            the location that was added
+	 */
+	private void fireLocationAdded(TraceLocation location) {
+		for (TraceLocationListListener l : listeners) {
+			l.locationAdded(location);
+		}
+	}
+
+	/**
+	 * Creates locationRemoved event to location list listeners
+	 * 
+	 * @param location
+	 *            the location that was added
+	 */
+	void fireLocationRemoved(TraceLocation location) {
+		for (TraceLocationListListener l : listeners) {
+			l.locationRemoved(location);
+		}
+	}
+
+	/**
+	 * Gets the list title or null
+	 * 
+	 * @return the list title
+	 */
+	public String getListTitle() {
+		return listTitle;
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/TraceLocationListListener.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,43 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Listener for trace location lists
+*
+*/
+package com.nokia.tracecompiler.engine;
+
+/**
+ * Listener for trace location lists
+ * 
+ */
+public interface TraceLocationListListener {
+
+	/**
+	 * Location was added to this list
+	 * 
+	 * @param location
+	 *            the new location
+	 */
+	public void locationAdded(TraceLocation location);
+
+	/**
+	 * Location was removed from this list
+	 * 
+	 * @param location
+	 *            the location that was removed
+	 */
+	public void locationRemoved(TraceLocation location);
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/TraceLocationMap.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,174 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Maps trace locations into traces and vice versa
+*
+*/
+package com.nokia.tracecompiler.engine;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+
+import com.nokia.tracecompiler.engine.source.SourceProperties;
+import com.nokia.tracecompiler.model.Trace;
+import com.nokia.tracecompiler.model.TraceCompilerException;
+import com.nokia.tracecompiler.model.TraceModel;
+
+/**
+ * Maps trace locations into traces and vice versa.
+ * 
+ */
+final class TraceLocationMap {
+
+	/**
+	 * List of unrelated traces
+	 */
+	private TraceLocationList unrelated = new TraceLocationList();
+
+	/**
+	 * Parser groups
+	 */
+	private HashMap<String, TraceLocationList> parserGroups = new HashMap<String, TraceLocationList>();
+
+	/**
+	 * The trace model
+	 */
+	private TraceModel model;
+
+	/**
+	 * Global list of locations, used for verification purposes with
+	 * GLOBAL_LOCATION_ASSERTS configuration flag
+	 */
+	private ArrayList<TraceLocation> globalList;
+
+	/**
+	 * Creates a location mapper
+	 * 
+	 * @param model
+	 *            the trace model
+	 */
+	public TraceLocationMap(TraceModel model) {
+		if (TraceCompilerEngineConfiguration.GLOBAL_LOCATION_ASSERTS) {
+			globalList = new ArrayList<TraceLocation>();
+		}
+		this.model = model;
+		model.addModelListener(new LocationMapModelListener(this));
+		model.addExtension(unrelated);
+	}
+
+	/**
+	 * Adds the locations from the source file to the map
+	 * 
+	 * @param source
+	 *            properties of the source to be added
+	 * @throws TraceCompilerException 
+	 */
+	void addSource(SourceProperties source) throws TraceCompilerException {
+		for (TraceLocation location : source) {
+			if (TraceCompilerEngineConfiguration.GLOBAL_LOCATION_ASSERTS) {
+				if (globalList.contains(location)) {
+					TraceCompilerEngineGlobals.getEvents().postAssertionFailed(
+							"Location already in global list", //$NON-NLS-1$
+							location.getConvertedName());
+				} else {
+					globalList.add(location);
+				}
+			}
+			// Generates locationAdded event via TraceLocationListListener
+			addNewLocationToTrace(location);
+		}
+	}
+
+	/**
+	 * Adds a location to trace or to the unrelated list if a trace cannot be
+	 * found.
+	 * 
+	 * @param location
+	 *            the location to be added
+	 * @throws TraceCompilerException 
+	 */
+	private void addNewLocationToTrace(TraceLocation location) throws TraceCompilerException {
+		TraceLocationList list;
+		Trace trace = model.findTraceByName(location.getOriginalName());
+		if (trace != null) {
+			list = trace.getExtension(TraceLocationList.class);
+			if (list == null) {
+				list = new TraceLocationList();
+				trace.addExtension(list);
+			}
+		} else {
+			String name = location.getParserRule().getLocationParser()
+					.getLocationGroup();
+			if (name == null) {
+				list = unrelated;
+			} else {
+				list = parserGroups.get(name);
+				if (list == null) {
+					list = new TraceLocationList(name);
+					model.addExtension(list);
+					parserGroups.put(name, list);
+				}
+			}
+		}
+		list.addLocation(location);
+	}
+
+	/**
+	 * Moves the locations from trace to unrelated list
+	 * 
+	 * @param trace
+	 *            the trace
+	 * @throws TraceCompilerException 
+	 */
+	void moveToUnrelated(Trace trace) throws TraceCompilerException {
+		TraceLocationList list = trace.getExtension(TraceLocationList.class);
+		if (list != null) {
+			trace.removeExtension(list);
+			for (LocationProperties loc : list) {
+				unrelated.addLocation((TraceLocation) loc);
+			}
+		}
+	}
+
+	/**
+	 * Moves locations from unrelated to the given trace
+	 * 
+	 * @param trace
+	 *            the trace
+	 * @throws TraceCompilerException 
+	 */
+	void moveFromUnrelated(Trace trace) throws TraceCompilerException {
+		String name = trace.getName();
+		TraceLocationList list = null;
+		Iterator<LocationProperties> itr = unrelated.iterator();
+		while (itr.hasNext()) {
+			TraceLocation location = (TraceLocation) itr.next();
+			if (name.equals(location.getOriginalName())) {
+				list = trace.getExtension(TraceLocationList.class);
+				if (list == null) {
+					list = new TraceLocationList();
+					trace.addExtension(list);
+				}
+				// NOTE: This must replicate the behavior of
+				// TraceLocationList.removeLocation
+				itr.remove();
+				unrelated.fireLocationRemoved(location);
+				list.addLocation(location);
+			}
+		}
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/ViewAdapter.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,37 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* View adapter
+*
+*/
+package com.nokia.tracecompiler.engine;
+
+
+/**
+ * View adapter implements the view interface.
+ * 
+ */
+public class ViewAdapter implements TraceCompilerEngineView {
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engi.TraceCompilerEngineView#getConfiguration()
+	 */
+	public TraceCompilerEngineConfiguration getConfiguration() {
+		// This can be null, the configuration delegate checks it
+		return null;
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/event/EventEngine.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,239 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Implements TraceCompilerEvents to forward events to the event router plug-in
+*
+*/
+package com.nokia.tracecompiler.engine.event;
+
+import com.nokia.tracecompiler.TraceCompilerGlobals;
+import com.nokia.tracecompiler.TraceCompilerLogger;
+import com.nokia.tracecompiler.engine.TraceCompilerEngineErrorMessages;
+import com.nokia.tracecompiler.engine.TraceCompilerEngineEvents;
+import com.nokia.tracecompiler.engine.TraceCompilerEngineGlobals;
+import com.nokia.tracecompiler.model.TraceCompilerException;
+import com.nokia.tracecompiler.model.TraceModel;
+import com.nokia.tracecompiler.source.SourceConstants;
+import com.nokia.tracecompiler.source.SourceLocationBase;
+
+/**
+ * Implements TraceCompilerEvents to forward events to the event router plug-in
+ * 
+ */
+public final class EventEngine implements TraceCompilerEngineEvents {
+
+	/**
+	 * Info event type
+	 */
+	public final static int INFO = 1; // CodForChk_Dis_Magic
+
+	/**
+	 * Warning event type
+	 */
+	public final static int WARNING = 2; // CodForChk_Dis_Magic
+
+	/**
+	 * Error event type
+	 */
+	public final static int ERROR = 3; // CodForChk_Dis_Magic
+
+	/**
+	 * Critical assertion failure event type
+	 */
+	public final static int ASSERT_CRITICAL = 4; // CodForChk_Dis_Magic
+
+	/**
+	 * Non-critical assertion failure event type
+	 */
+	public final static int ASSERT_NORMAL = 5; // CodForChk_Dis_Magic
+	
+
+	/**
+	 * indicates if an error happened for all files
+	 */
+	private boolean globalProcessingError = false;
+	
+
+
+	/**
+	 * Constructor
+	 * 
+	 * @param model
+	 *            the trace model
+	 */
+	public EventEngine(TraceModel model) {
+	}
+
+	/**
+	 * check if an error happened
+	 * 
+	 * @return the error
+	 */
+	public boolean hasErrorHappened() {
+		return globalProcessingError;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engine.TraceCompilerEvents#
+	 *      postError(com.nokia.tracecompiler.engine.TraceCompilerException)
+	 */
+	public void postError(TraceCompilerException exception) {
+		String message = TraceCompilerEngineErrorMessages.getErrorMessage(exception);
+		if (message != null && message.length() > 0) {
+			postErrorMessage(message, exception.getErrorSource(), exception.isEventWantedToPost());
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engine.TraceCompilerEvents#postErrorMessage(java.lang.String, java.lang.Object, boolean)
+	 */
+	public void postErrorMessage(String message, Object source, boolean postEvent) {
+		
+		if (postEvent) {
+			postEvent(ERROR, message, source);
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engine.TraceCompilerEvents#
+	 *      postWarningMessage(java.lang.String, java.lang.Object)
+	 */
+	public void postWarningMessage(String message, Object source) {
+		postEvent(WARNING, message, source);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engine.TraceCompilerEvents#
+	 *      postInfoMessage(java.lang.String, java.lang.Object)
+	 */
+	public void postInfoMessage(String message, Object source) {
+		postEvent(INFO, message, source);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engine.TraceCompilerEvents#
+	 *      postAssertionFailed(java.lang.String, java.lang.Object)
+	 */
+	public void postAssertionFailed(String message, Object source) {
+		message = "Assertion failed. Reason: " //$NON-NLS-1$
+				+ message;
+		postEvent(ASSERT_NORMAL, message, source);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engine.TraceCompilerEvents#
+	 *      postCriticalAssertionFailed(java.lang.String, java.lang.Object)
+	 */
+	public void postCriticalAssertionFailed(String message, Object source) throws TraceCompilerException {
+		message = "Critical assertion failure, the project has been closed. Reason: " //$NON-NLS-1$
+				+ message;
+		// Closes the trace project and shows an error message
+		TraceCompilerEngineGlobals.getTraceCompiler().closeProject();
+		postEvent(ASSERT_CRITICAL, message, source);
+	}
+
+
+	/**
+	 * Print an event to console
+	 * @param type
+	 *            event type
+	 * @param message
+	 *            event message
+	 * @param source
+	 *            event source
+	 */
+	private void postEvent(int type, String message, Object source) {
+		switch (type) {
+		case INFO:
+				if (TraceCompilerGlobals.isVebose()) {
+					printEvent(type, message, source);
+
+					// This means that the component has been processed. Let's
+					// print one space to ensure that parse_mmp.pl will print
+					// out something.
+				} else if (message.contains(
+						"Dictionary File written")) { //$NON-NLS-1$
+					System.out.print(" "); //$NON-NLS-1$
+				} else if (!message
+						.contains("No files were written")) { //$NON-NLS-1$
+					// If we get "no files written" message, let's dismiss it ->
+					// parse_mmp.pl won't print out anything
+					printEvent(type, message, source);
+				}
+			break;
+		case WARNING:
+		case ERROR:
+		case ASSERT_NORMAL:
+		case ASSERT_CRITICAL:
+			printEvent(type, message, source);
+			break;
+		}		
+	}
+
+	/**
+	 * Prints event
+	 * @param type error type
+	 * @param message
+	 *            event message
+	 * @param source
+	 *            event source
+	 */
+	private void printEvent(int type, String message, Object source) {
+		if (message == null) {
+			message = Messages.getString("EventEngine.unknowError"); //$NON-NLS-1$
+		}
+		String fullMessage = ""; //$NON-NLS-1$
+
+		
+		if (source instanceof SourceLocationBase) {
+			SourceLocationBase location = (SourceLocationBase) source;
+			fullMessage = location.getFileName() + Messages.getString("EventEngine.lineNumberPrefix") + location.getLineNumber() + SourceConstants.COLON + SourceConstants.SPACE; //$NON-NLS-1$
+		} else if (source instanceof String) {
+			message = (String) source;
+		}
+		fullMessage = fullMessage + message;
+		
+		switch (type) {
+		case INFO:
+			TraceCompilerLogger.printInfo(fullMessage);
+			break;
+		case WARNING:
+		case ASSERT_NORMAL:
+			TraceCompilerLogger.printWarning(fullMessage);
+			break;
+		case ERROR:
+		case ASSERT_CRITICAL:
+			globalProcessingError = true;
+			TraceCompilerLogger.printError(fullMessage);
+			break;
+		default:
+			break;
+		}
+	}
+	
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/event/Messages.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,57 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Localized strings for engine package
+*
+*/
+package com.nokia.tracecompiler.engine.event;
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+public class Messages {
+
+	/**
+	 * Bundle name
+	 */
+	private static final String BUNDLE_NAME = "com.nokia.tracecompiler.engine.event.messages"; //$NON-NLS-1$
+
+	/**
+	 * Bundle
+	 */
+	private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
+			.getBundle(BUNDLE_NAME);
+
+	/**
+	 * Prevents construction
+	 */
+	private Messages() {
+	}
+	
+	/**
+	 * Gets localized string based on key
+	 * 
+	 * @param key
+	 *            the resource key
+	 * @return the localized resource
+	 */
+	public static String getString(String key) {
+		try {
+			return RESOURCE_BUNDLE.getString(key);
+		} catch (MissingResourceException e) {
+			return '!' + key + '!';
+		}
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/event/messages.properties	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,2 @@
+EventEngine.lineNumberPrefix=, line 
+EventEngine.unknowError=Unknown error happened, Please report to trace team.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/event/package.html	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,3 @@
+<html><body>
+TraceCompiler event router implementation
+</body></html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/header/CheckFormattedTraceExists.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,37 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Kernel #endif flag check
+*
+*/
+package com.nokia.tracecompiler.engine.header;
+
+/**
+ * Trace activation length check template element
+ * 
+ */
+public final class CheckFormattedTraceExists extends TemplateCheckBase {
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engine.header.TemplateCheckBase#check()
+	 */
+	@Override
+	boolean check() {
+		return writer.getCurrentTraceFormatted().length() > 0;
+	}
+
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/header/CheckIsBufferSizeDynamic.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,37 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Dynamic buffer size check
+*
+*/
+package com.nokia.tracecompiler.engine.header;
+
+/**
+ * Dynamic buffer size check
+ * 
+ */
+public final class CheckIsBufferSizeDynamic extends TemplateCheckBase {
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engine.header.TemplateCheckBase#check()
+	 */
+	@Override
+	boolean check() {
+		return writer.isBufferSizeDynamic();
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/header/CheckIsKernelModeEndifNeeded.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,37 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Kernel #endif flag check
+*
+*/
+package com.nokia.tracecompiler.engine.header;
+
+/**
+ * __KERNEL_MODE__ #endif flag check
+ * 
+ */
+public final class CheckIsKernelModeEndifNeeded extends TemplateCheckBase {
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engine.header.TemplateCheckBase#check()
+	 */
+	@Override
+	boolean check() {
+		return writer.isKernelModeEndifNeeded();
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/header/CheckIsKernelModeFlagNeeded.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,47 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Kernel #endif flag check
+*
+*/
+package com.nokia.tracecompiler.engine.header;
+
+import com.nokia.tracecompiler.source.SymbianConstants;
+
+/**
+ * Check if __KERNEL_MODE__ flags needs to be added
+ * 
+ */
+public final class CheckIsKernelModeFlagNeeded extends TemplateCheckBase {
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engine.header.TemplateCheckBase#check()
+	 */
+	@Override
+	boolean check() {
+		boolean retval;
+		if (writer.getCurrentTraceFormatted().contains(
+				SymbianConstants.CONST_TDESC16_REF)) {
+			retval = true;
+			writer.setKernelModeEndifNeeded(true);
+		} else {
+			retval = false;
+			writer.setKernelModeEndifNeeded(false);
+		}
+		return retval;
+	}
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/header/CheckIsTraceBufferBuilt.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,37 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Trace buffer flag check
+*
+*/
+package com.nokia.tracecompiler.engine.header;
+
+/**
+ * Trace buffer flag check
+ * 
+ */
+public final class CheckIsTraceBufferBuilt extends TemplateCheckBase {
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engine.header.TemplateCheckBase#check()
+	 */
+	@Override
+	boolean check() {
+		return writer.isTraceBufferBuilt();
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/header/CheckIsTraceFormatDuplicate.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,37 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Checks if a trace format exists
+*
+*/
+package com.nokia.tracecompiler.engine.header;
+
+/**
+ * Checks if a trace format exists
+ * 
+ */
+public final class CheckIsTraceFormatDuplicate extends TemplateCheckBase {
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engine.header.TemplateCheckBase#check()
+	 */
+	@Override
+	boolean check() {
+		return writer.isTraceFormatDuplicate();
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/header/CheckParameterNeedsAlignment.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,37 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Checks if parameter needs 32-bit alignment
+*
+*/
+package com.nokia.tracecompiler.engine.header;
+
+/**
+ * Checks if parameter needs 32-bit alignment
+ * 
+ */
+final class CheckParameterNeedsAlignment extends TemplateCheckBase {
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engine.header.TemplateCheckBase#check()
+	 */
+	@Override
+	boolean check() {
+		return writer.isParameterAlignmentNeeded();
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/header/ComplexHeaderRule.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,44 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Rule which specifies that a trace cannot be represented by the normal trace API macros
+*
+*/
+package com.nokia.tracecompiler.engine.header;
+
+import com.nokia.tracecompiler.model.TraceObjectRule;
+
+/**
+ * Rule which specifies that a trace cannot be represented by the normal trace
+ * API macros
+ * 
+ */
+public interface ComplexHeaderRule extends TraceObjectRule {
+
+	/**
+	 * Returns true if an ext-function needs to be written for this trace
+	 * 
+	 * @return function flag
+	 */
+	public boolean needsFunction();
+
+	/**
+	 * Gets an extension to be added to the trace ID define
+	 * 
+	 * @return the extension
+	 */
+	public String getTraceIDDefineExtension();
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/header/HeaderConstants.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,42 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Constants for header engine package
+*
+*/
+package com.nokia.tracecompiler.engine.header;
+
+/**
+ * Constants for header engine package
+ * 
+ */
+interface HeaderConstants {
+
+	/**
+	 * Number of parent paths to check when locating include directory
+	 */
+	int INC_SEARCH_DEPTH = 3; // CodForChk_Dis_Magic
+
+	/**
+	 * Trace header extension
+	 */
+	String TRACE_HEADER_EXTENSION = "Traces.h"; //$NON-NLS-1$
+
+	/**
+	 * Main trace header name
+	 */
+	String TRACE_HEADER_NAME = "OstTraceDefinitions.h"; //$NON-NLS-1$
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/header/HeaderEngine.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,289 @@
+/*
+* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Header engine manages the trace header file that is included into source code
+*
+*/
+package com.nokia.tracecompiler.engine.header;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Iterator;
+
+import com.nokia.tracecompiler.engine.LocationListBase;
+import com.nokia.tracecompiler.engine.LocationProperties;
+import com.nokia.tracecompiler.engine.TraceCompilerEngineBase;
+import com.nokia.tracecompiler.engine.TraceCompilerEngineEvents;
+import com.nokia.tracecompiler.engine.TraceCompilerEngineGlobals;
+import com.nokia.tracecompiler.engine.TraceCompilerEngineErrorCodes.TraceCompilerErrorCode;
+import com.nokia.tracecompiler.engine.project.ProjectEngine;
+import com.nokia.tracecompiler.file.FileCompareOutputStream;
+import com.nokia.tracecompiler.model.Trace;
+import com.nokia.tracecompiler.model.TraceCompilerException;
+import com.nokia.tracecompiler.model.TraceGroup;
+import com.nokia.tracecompiler.model.TraceModel;
+import com.nokia.tracecompiler.plugin.TraceHeaderContribution;
+import com.nokia.tracecompiler.plugin.TraceHeaderContribution.TraceHeaderContributionType;
+import com.nokia.tracecompiler.project.ProjectUtils;
+import com.nokia.tracecompiler.project.TraceProjectAPI;
+import com.nokia.tracecompiler.source.SourceUtils;
+
+/**
+ * Header engine manages the trace header file that is included into source
+ * code. This implements the plug-in interface to get notifications about
+ * project file opening and closing
+ * 
+ */
+public final class HeaderEngine extends TraceCompilerEngineBase {
+
+	/**
+	 * Trace model
+	 */
+	private TraceModel model;
+
+	/**
+	 * Constructor
+	 * 
+	 * @param model
+	 *            trace model
+	 */
+	public HeaderEngine(TraceModel model) {
+		this.model = model;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engine.TraceCompilerEngine#projectOpened()
+	 */
+	@Override
+	public void projectOpened() {
+		TraceHeader header = model.getExtension(TraceHeader.class);
+		if (header == null) {
+			String fileName = null;
+			try {
+				fileName = ProjectUtils.getLocationForFile(model,
+						ProjectEngine.traceFolderName,
+						HeaderConstants.TRACE_HEADER_NAME, false);
+			} catch (TraceCompilerException e) {
+				// Model should always be open when traceProjectOpened is called
+			}
+			if (fileName != null) {
+				header = new TraceHeader(fileName, false);
+				model.addExtension(header);
+			} else {
+				String msg = Messages
+						.getString("HeaderEngine.FailedToAttachHeader"); //$NON-NLS-1$
+				TraceCompilerEngineGlobals.getEvents().postErrorMessage(msg, null, true);
+			}
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engin.TraceCompilererEngine#projectClosing()
+	 */
+	@Override
+	public void projectClosed() {
+		model.removeExtensions(TraceHeader.class);
+	}
+
+	/**
+	 * Gets the name for the trace header file based on given source
+	 * 
+	 * @param sourceFile
+	 *            the source file name
+	 * @return the header file name
+	 */
+	public String getHeaderFileName(String sourceFile) {
+		String retval = null;
+		if (model != null) {
+			// The header file name is the source file name with extension
+			// replaced by Traces.h
+			File f = new File(sourceFile);
+			retval = removeFileExtension(f.getName())
+					+ HeaderConstants.TRACE_HEADER_EXTENSION;
+		}
+		return retval;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engi.TraceCompilerlerEngine#projectExporting()
+	 */
+	@Override
+	public void exportProject() throws TraceCompilerException {
+		if (model.isValid() && model.hasTraces()) {
+			TraceHeader header = model.getExtension(TraceHeader.class);
+			if (header != null) {
+				// Headers for each source are written first
+				String path = header.getPath();
+				ArrayList<String> fileNames = new ArrayList<String>();
+				collectSourceFilesFromTraces(fileNames);
+				for (String fileName : fileNames) {
+					String target = path + File.separator + fileName;
+					writeHeaderFile(target);
+				}
+				// The main header is written after everything else succeeds
+				writeMainHeaderFile(header);
+			}
+		}
+	}
+
+	/**
+	 * Collects the source file names from traces
+	 * 
+	 * @param fileNames
+	 *            the file names
+	 */
+	private void collectSourceFilesFromTraces(ArrayList<String> fileNames) {
+		for (TraceGroup group : model) {
+			for (Trace trace : group) {
+				Iterator<LocationListBase> itr = trace
+						.getExtensions(LocationListBase.class);
+				while (itr.hasNext()) {
+					LocationListBase base = itr.next();
+					for (LocationProperties loc : base) {
+						String locFileName = loc.getFileName();
+						if (locFileName != null) {
+							addFileToList(fileNames, locFileName);
+						}
+					}
+				}
+			}
+		}
+	}
+
+	/**
+	 * Adds a file to list if it does not exist
+	 * 
+	 * @param fileNames
+	 *            the list
+	 * @param locFileName
+	 *            the file
+	 */
+	private void addFileToList(ArrayList<String> fileNames, String locFileName) {
+		locFileName = removeFileExtension(locFileName);
+		if (!fileNames.contains(locFileName)) {
+			fileNames.add(locFileName);
+		}
+	}
+
+	/**
+	 * Removes the file extension from file name
+	 * 
+	 * @param fileName
+	 *            the file name
+	 * @return name without extension
+	 */
+	private String removeFileExtension(String fileName) {
+		int index = fileName.lastIndexOf('.');
+		int sep1 = fileName.lastIndexOf('/');
+		int sep2 = fileName.lastIndexOf('\\');
+		if (index > sep1 && index > sep2) {
+			fileName = fileName.substring(0, index);
+		}
+		return fileName;
+	}
+
+	/**
+	 * Writes the header to given target
+	 * 
+	 * @param target
+	 *            the target file
+	 * @throws TraceCompilerException
+	 *             if writing fails
+	 */
+	private void writeHeaderFile(String target) throws TraceCompilerException {
+		// The TraceHeader stored into the model is not used when writing
+		// headers, since a separate header is written for each source file
+		TraceHeader header = new TraceHeader(target, true);
+		try {
+			header.setOwner(model);
+			TraceHeaderWriter writer = new TraceHeaderWriter(header);
+			TraceCompilerEngineEvents events = TraceCompilerEngineGlobals.getEvents();
+			if (writer.write()) {
+				header.postFileWrittenEvent(header.getAbsolutePath());
+			} else {
+				String msg = Messages
+						.getString("HeaderEngine.TraceHeaderNotChangedPrefix"); //$NON-NLS-1$
+				events.postInfoMessage(msg + header.getAbsolutePath(), null);
+			}
+		} finally {
+			// The header owner must be reset to null, since that makes
+			// unregisters it from the model
+			header.setOwner(null);
+		}
+	}
+
+	/**
+	 * Writes the main header file to given target
+	 * 
+	 * @param header
+	 *            the header
+	 * @throws TraceCompilerException
+	 *             if writing fails
+	 */
+	private void writeMainHeaderFile(TraceHeader header)
+			throws TraceCompilerException {
+		// The TraceHeader stored into the model is not used when writing
+		// headers, since a separate header is written for each source file
+		TraceCompilerEngineEvents events = TraceCompilerEngineGlobals.getEvents();
+		String path = header.getAbsolutePath();
+		try {
+			if (writeMainHeader(path)) {
+				header.postFileWrittenEvent(path);
+			} else {
+				String msg = Messages
+						.getString("HeaderEngine.TraceHeaderNotChangedPrefix"); //$NON-NLS-1$
+				events.postInfoMessage(msg + path, null);
+			}
+		} catch (IOException e) {
+			throw new TraceCompilerException(
+					TraceCompilerErrorCode.CANNOT_WRITE_PROJECT_FILE, e);
+		}
+	}
+
+	/**
+	 * Writes the main header to given target
+	 * 
+	 * @param target
+	 *            the target
+	 * @return true if written, false if the file already had the same content
+	 * @throws IOException
+	 *             if writing fails
+	 */
+	private boolean writeMainHeader(String target) throws IOException {
+		File f = new File(target);
+		FileCompareOutputStream stream = new FileCompareOutputStream(f);
+		String licence = TraceCompilerEngineGlobals.getDefaultLicence(true);
+		if (licence != null) {
+			stream.write(licence.getBytes());
+		}
+		stream.write(SourceUtils.createHeaderGuard(f.getName()).getBytes());
+		TraceProjectAPI api = model.getExtension(TraceProjectAPI.class);
+		if (api instanceof TraceHeaderContribution) {
+			String[] content = ((TraceHeaderContribution) api)
+					.getContribution(TraceHeaderContributionType.MAIN_HEADER_CONTENT);
+			if (content != null && content.length == 1) {
+				stream.write(content[0].getBytes());
+			}
+		}
+		return stream.writeFile();
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/header/HeaderTemplate.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,443 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Header file template definition
+*
+*/
+package com.nokia.tracecompiler.engine.header;
+
+import com.nokia.tracecompiler.engine.header.TraceHeaderWriter.HeaderTemplateElementType;
+import com.nokia.tracecompiler.plugin.TraceAPIFormatter.TraceFormatType;
+import com.nokia.tracecompiler.plugin.TraceHeaderContribution.TraceHeaderContributionType;
+import com.nokia.tracecompiler.source.SymbianConstants;
+
+/**
+ * Header file template definition
+ * 
+ */
+interface HeaderTemplate {
+	
+	/**
+	 * Tag written to trace header
+	 */
+	String HEADER_COMMENT_CREATED_BY = "// Created by TraceCompiler"; //$NON-NLS-1$
+	
+	/**
+	 * Empty template
+	 */
+	Object[] EMPTY_TEMPLATE = {};
+
+	/**
+	 * Sets line count to 1
+	 */
+	Object SET_LINES_PACKED = new SetNewLineCount(1);
+
+	/**
+	 * Sets line count to 2
+	 */
+	Object SET_LINES_MIDDLE = new SetNewLineCount(2); // CodForChk_Dis_Magic
+
+	/**
+	 * Sets line count to 3
+	 */
+	Object SET_LINES_LOOSE = new SetNewLineCount(3); // CodForChk_Dis_Magic
+
+	/**
+	 * Template for empty trace macros
+	 */
+	Object[] EMPTY_TRACE_FUNCTION_EXISTS_TEMPLATE = {
+			HeaderTemplateElementType.NEW_LINE, "#define ", //$NON-NLS-1$
+			HeaderTemplateElementType.FORMATTED_TRACE };
+
+	/**
+	 * Empty trace macro template switch. This formats the trace using
+	 * TraceFormatType.EmptyPreprocessorDefinition and checks if the definition
+	 * has already been written using CheckIsTraceFormatDuplicate switch
+	 */
+	Object[] EMPTY_TRACE_FUNCTION_TEMPLATE = {
+			TraceFormatType.EMPTY_MACRO,
+			new TemplateChoice(CheckIsTraceFormatDuplicate.class,
+					EMPTY_TEMPLATE, EMPTY_TRACE_FUNCTION_EXISTS_TEMPLATE), };
+
+	/**
+	 * Template for trace activation check
+	 */
+	Object[] TRACE_FUNCTION_ACTIVATION_CHECK = {
+			"TBool retval = ", //$NON-NLS-1$
+			TraceFormatType.TRACE_ACTIVATION,
+			// Checks if the TraceActivation format exists
+			new TemplateChoice(CheckFormattedTraceExists.class, new Object[] {
+					HeaderTemplateElementType.FORMATTED_TRACE, ";", //$NON-NLS-1$
+					HeaderTemplateElementType.NEW_LINE, "if ( retval )", //$NON-NLS-1$
+					HeaderTemplateElementType.OPEN_BRACE }, new Object[] {
+					"EFalse;", HeaderTemplateElementType.NEW_LINE }), //$NON-NLS-1$
+	};
+
+	/**
+	 * Template if no activation check is needed
+	 */
+	Object[] TRACE_FUNCTION_NO_ACTIVATION_CHECK = { "TBool retval;", //$NON-NLS-1$
+			HeaderTemplateElementType.NEW_LINE };
+
+	/**
+	 * Template for trace functions
+	 */
+	Object[] TRACE_FUNCTION_EXISTS_TEMPLATE = {
+			SET_LINES_PACKED,
+			HeaderTemplateElementType.BUILD_TRACE_BUFFER_CHECK,
+			// If the trace contains TDesC16 parameter, __KERNEL_MODE__ flag is
+			// added to it
+			new TemplateChoice(CheckIsKernelModeFlagNeeded.class, new Object[] {
+					"#ifndef __KERNEL_MODE__", //$NON-NLS-1$
+					HeaderTemplateElementType.NEW_LINE }, EMPTY_TEMPLATE),
+			"inline TBool ", //$NON-NLS-1$
+			HeaderTemplateElementType.FORMATTED_TRACE,
+			HeaderTemplateElementType.OPEN_BRACE,
+			// If the trace is buffered activation check is written
+			new TemplateChoice(CheckIsTraceBufferBuilt.class,
+					TRACE_FUNCTION_ACTIVATION_CHECK,
+					TRACE_FUNCTION_NO_ACTIVATION_CHECK),
+			HeaderTemplateElementType.TRACE_FUNCTION_BODY, // Parameters + API
+			HeaderTemplateElementType.CLOSE_EXTRA_BRACES,
+			"return retval;", //$NON-NLS-1$
+			HeaderTemplateElementType.NEW_LINE,
+			HeaderTemplateElementType.CLOSE_BRACE,
+			// The __KERNEL_MODE__ #ifdef added above needs to be closed
+			new TemplateChoice(
+					CheckIsKernelModeEndifNeeded.class,
+					new Object[] { "#endif", HeaderTemplateElementType.NEW_LINE }, //$NON-NLS-1$
+					EMPTY_TEMPLATE), SET_LINES_LOOSE,
+			HeaderTemplateElementType.NEW_LINE };
+
+	/**
+	 * Trace function template switch. This formats the trace using
+	 * TraceFormatType.Header and checks if the definition has already been
+	 * written using TRACE_FORMAT_EXISTS_TEMPLATE_INDEX switch
+	 */
+	Object[] TRACE_FUNCTION_TEMPLATE = {
+			TraceFormatType.HEADER,
+			new TemplateChoice(CheckIsTraceFormatDuplicate.class,
+					EMPTY_TEMPLATE, TRACE_FUNCTION_EXISTS_TEMPLATE) };
+
+	/**
+	 * Template for trace ID's
+	 */
+	Object[] TRACE_ID_TEMPLATE = {
+			"#define ", //$NON-NLS-1$
+			HeaderTemplateElementType.TRACE_NAME,
+			" 0x", //$NON-NLS-1$
+			HeaderTemplateElementType.TRACE_ID_HEX,
+			HeaderTemplateElementType.NEW_LINE };
+
+	/**
+	 * Main header template
+	 */
+	Object[] HEADER_TEMPLATE = {
+			SET_LINES_PACKED,
+			HeaderTemplateElementType.LICENCE_TEXT,
+			HeaderTemplateElementType.NEW_LINE,
+			HEADER_COMMENT_CREATED_BY, " ", //$NON-NLS-1$
+			HeaderTemplateElementType.TRACE_COMPILER_VERSION,
+			HeaderTemplateElementType.NEW_LINE,
+			"// DO NOT EDIT, CHANGES WILL BE LOST", //$NON-NLS-1$
+			SET_LINES_MIDDLE,
+			HeaderTemplateElementType.NEW_LINE,
+			HeaderTemplateElementType.HEADER_GUARD,
+			HeaderTemplateElementType.NEW_LINE,
+			SET_LINES_PACKED,
+			TraceHeaderContributionType.GLOBAL_DEFINES,
+			SET_LINES_MIDDLE,
+			HeaderTemplateElementType.NEW_LINE,
+			SET_LINES_PACKED,
+			TraceHeaderContributionType.GLOBAL_INCLUDES,
+			SET_LINES_MIDDLE,
+			HeaderTemplateElementType.NEW_LINE,
+			SET_LINES_PACKED,
+			new TemplateIterator(IteratorTraces.class, TRACE_ID_TEMPLATE),
+			SET_LINES_LOOSE,
+			HeaderTemplateElementType.NEW_LINE,
+			// Trace functions
+			new TemplateIterator(IteratorComplexTraces.class,
+					TRACE_FUNCTION_TEMPLATE),
+			// End of header guard
+			SET_LINES_MIDDLE, "#endif", HeaderTemplateElementType.NEW_LINE, //$NON-NLS-1$
+			HeaderTemplateElementType.NEW_LINE, "// End of file", //$NON-NLS-1$
+			HeaderTemplateElementType.NEW_LINE };
+
+	/**
+	 * Template for parameter with fixed size
+	 */
+	Object[] FIXED_PARAMETER_TEMPLATE = { "*( ( ", //$NON-NLS-1$
+			HeaderTemplateElementType.PARAMETER_TYPE, "* )ptr ) = ", //$NON-NLS-1$
+			HeaderTemplateElementType.PARAMETER_NAME, ";", //$NON-NLS-1$
+			HeaderTemplateElementType.NEW_LINE, "ptr += sizeof ( ", //$NON-NLS-1$
+			HeaderTemplateElementType.PARAMETER_TYPE, " );", //$NON-NLS-1$
+			HeaderTemplateElementType.NEW_LINE };
+
+	/**
+	 * Template for parameter with fixed size and length check
+	 */
+	Object[] FIXED_PARAMETER_TEMPLATE_WITH_LENGTH_CHECK = {
+			"// Check that there are enough space to next parameter", //$NON-NLS-1$
+			HeaderTemplateElementType.NEW_LINE,
+			"if ((length + sizeof ( ", //$NON-NLS-1$
+			HeaderTemplateElementType.PARAMETER_TYPE,
+			" )) <= KOstMaxDataLength)", //$NON-NLS-1$
+			HeaderTemplateElementType.OPEN_BRACE,
+			FIXED_PARAMETER_TEMPLATE,
+			"length += sizeof ( ", //$NON-NLS-1$
+			HeaderTemplateElementType.PARAMETER_TYPE,
+			" );", //$NON-NLS-1$
+			HeaderTemplateElementType.NEW_LINE,
+			HeaderTemplateElementType.CLOSE_BRACE};	
+	
+	/**
+	 * Template for writing 32-bit alignment for parameters
+	 */
+	Object[] DYNAMIC_PARAMETER_ALIGNMENT_TEMPLATE = {
+			"// Fillers are written to get 32-bit alignment", //$NON-NLS-1$
+			HeaderTemplateElementType.NEW_LINE,
+			"while ( length", //$NON-NLS-1$
+			HeaderTemplateElementType.PARAMETER_INDEX,
+			"++ < lengthAligned", //$NON-NLS-1$
+			HeaderTemplateElementType.PARAMETER_INDEX,
+			" )", //$NON-NLS-1$
+			HeaderTemplateElementType.OPEN_BRACE,
+			"*ptr++ = 0;", //$NON-NLS-1$
+			HeaderTemplateElementType.NEW_LINE,
+			HeaderTemplateElementType.CLOSE_BRACE };
+
+	/**
+	 * Template for parameter with dynamic size
+	 */
+	Object[] DYNAMIC_PARAMETER_TEMPLATE = {
+			"if (length", //$NON-NLS-1$
+			HeaderTemplateElementType.PARAMETER_INDEX,
+			" > 0)", //$NON-NLS-1$
+			HeaderTemplateElementType.OPEN_BRACE,
+			"// Number of elements is written before data", //$NON-NLS-1$
+			HeaderTemplateElementType.NEW_LINE,
+			"// In case of Unicode string, number of elements is half of length", //$NON-NLS-1$
+			HeaderTemplateElementType.NEW_LINE,
+			"*( ( TUint32* )ptr ) = length", //$NON-NLS-1$
+			HeaderTemplateElementType.PARAMETER_INDEX,
+			" / (", //$NON-NLS-1$
+			HeaderTemplateElementType.PARAMETER_NAME,
+			".Size() / ", //$NON-NLS-1$
+			HeaderTemplateElementType.PARAMETER_NAME,
+			".Length());", //$NON-NLS-1$
+			HeaderTemplateElementType.NEW_LINE,
+			"ptr += sizeof ( TUint32 );", //$NON-NLS-1$
+			HeaderTemplateElementType.NEW_LINE,
+			"memcpy( ptr, ", //$NON-NLS-1$
+			HeaderTemplateElementType.PARAMETER_NAME,
+			".Ptr(), length", //$NON-NLS-1$
+			HeaderTemplateElementType.PARAMETER_INDEX,
+			" );", //$NON-NLS-1$
+			HeaderTemplateElementType.NEW_LINE,
+			"ptr += length", //$NON-NLS-1$
+			HeaderTemplateElementType.PARAMETER_INDEX,
+			";", //$NON-NLS-1$
+			HeaderTemplateElementType.NEW_LINE,
+			new TemplateChoice(CheckParameterNeedsAlignment.class,
+					DYNAMIC_PARAMETER_ALIGNMENT_TEMPLATE, EMPTY_TEMPLATE),
+			HeaderTemplateElementType.NEW_LINE,
+			"length += sizeof ( TUint32 ) + lengthAligned", //$NON-NLS-1$
+			HeaderTemplateElementType.PARAMETER_INDEX,
+			";", //$NON-NLS-1$
+			HeaderTemplateElementType.NEW_LINE,			
+			HeaderTemplateElementType.CLOSE_BRACE,
+			"else if (length + sizeof ( TUint32 ) <= KOstMaxDataLength)",  //$NON-NLS-1$
+			HeaderTemplateElementType.OPEN_BRACE,
+			HeaderTemplateElementType.NEW_LINE,
+			"*( ( TUint32* )ptr ) = 0;",  //$NON-NLS-1$
+			HeaderTemplateElementType.NEW_LINE,
+			"ptr += sizeof ( TUint32 );",  //$NON-NLS-1$
+			HeaderTemplateElementType.NEW_LINE,
+			"length += sizeof ( TUint32 );",  //$NON-NLS-1$
+			HeaderTemplateElementType.NEW_LINE,
+			HeaderTemplateElementType.CLOSE_BRACE};
+
+	/**
+	 * Template to allocate the buffer for parameters if buffer size is fixed
+	 */
+	Object[] FIXED_BUFFER_ALLOCATION_TEMPLATE = { "TUint8 data[ ", //$NON-NLS-1$
+			HeaderTemplateElementType.FIXED_BUFFER_SIZE, " ];", //$NON-NLS-1$
+			HeaderTemplateElementType.NEW_LINE, "TUint8* ptr = data;", //$NON-NLS-1$
+			HeaderTemplateElementType.NEW_LINE};
+
+	/**
+	 * Template to allocate the buffer for parameters if buffer size is dynamic
+	 */
+	Object[] DYNAMIC_BUFFER_ALLOCATION_TEMPLATE = {
+			// KOstMaxDataLength is defined in opensystemtrace.h
+			"TUint8 data[ KOstMaxDataLength ];", //$NON-NLS-1$
+			HeaderTemplateElementType.NEW_LINE, "TUint8* ptr = data;", //$NON-NLS-1$
+			HeaderTemplateElementType.NEW_LINE, "// Set length to zero and calculate it againg", //$NON-NLS-1$
+			HeaderTemplateElementType.NEW_LINE, "// when adding parameters", //$NON-NLS-1$
+			HeaderTemplateElementType.NEW_LINE, "length = 0;", //$NON-NLS-1$
+			HeaderTemplateElementType.NEW_LINE };
+
+	/**
+	 * Template to allocate buffer for trace data
+	 */
+	Object[] BUFFER_ALLOCATION_TEMPLATE = { new TemplateChoice(
+			CheckIsBufferSizeDynamic.class, DYNAMIC_BUFFER_ALLOCATION_TEMPLATE,
+			FIXED_BUFFER_ALLOCATION_TEMPLATE) };
+
+	/**
+	 * Template to length variable definition
+	 */
+	Object[] LENGTH_VARIABLE_DEFINITION_TEMPLATE = {	
+			"TInt length = 0;", //$NON-NLS-1$
+			HeaderTemplateElementType.NEW_LINE };
+
+	/**
+	 * Beging template to length variable increase
+	 */
+	Object[] LENGTH_VARIABLE_INCREASE_TEMPLATE_BEGIN = {
+			"// Increase length because of fixed size parameters", //$NON-NLS-1$
+			HeaderTemplateElementType.NEW_LINE,
+			"length += "};	 //$NON-NLS-1$
+
+	/**
+	 * End template to length variable increase
+	 */
+	Object[] LENGTH_VARIABLE_INCREASE_TEMPLATE_END = {	
+			";",	 //$NON-NLS-1$	
+			HeaderTemplateElementType.NEW_LINE };
+	
+	/**
+	 * Template to calculate the length for a dynamic parameter
+	 */
+	Object[] DYNAMIC_PARAMETER_LENGTH_TEMPLATE = {
+	"// Check that parameter lenght is not too long", //$NON-NLS-1$
+	HeaderTemplateElementType.NEW_LINE,
+	"TInt length", //$NON-NLS-1$
+	HeaderTemplateElementType.PARAMETER_INDEX,
+	" = ", //$NON-NLS-1$
+	SymbianConstants.PARAMETER_DECLARATION_PREFIX,
+	HeaderTemplateElementType.PARAMETER_INDEX, ".Size();", //$NON-NLS-1$
+	HeaderTemplateElementType.NEW_LINE,
+		"if ((length + length", //$NON-NLS-1$
+	HeaderTemplateElementType.PARAMETER_INDEX,
+	" + sizeof ( TUint32 )) > KOstMaxDataLength)", //$NON-NLS-1$
+	HeaderTemplateElementType.OPEN_BRACE,
+	"length", //$NON-NLS-1$
+	HeaderTemplateElementType.PARAMETER_INDEX,	
+	" = KOstMaxDataLength - (length + sizeof ( TUint32 ));", //$NON-NLS-1$	
+	HeaderTemplateElementType.NEW_LINE,
+	HeaderTemplateElementType.CLOSE_BRACE,
+	HeaderTemplateElementType.NEW_LINE,
+	"TInt lengthAligned", //$NON-NLS-1$
+	HeaderTemplateElementType.PARAMETER_INDEX,
+	" = ( length", //$NON-NLS-1$
+	HeaderTemplateElementType.PARAMETER_INDEX,
+	" + 3 ) & ~3;", //$NON-NLS-1$
+	HeaderTemplateElementType.NEW_LINE,	
+	"if (lengthAligned", //$NON-NLS-1$
+	HeaderTemplateElementType.PARAMETER_INDEX,
+	" > 0)", //$NON-NLS-1$
+	HeaderTemplateElementType.OPEN_BRACE,
+	"length = length + sizeof ( TUint32 ) + lengthAligned", //$NON-NLS-1$
+	HeaderTemplateElementType.PARAMETER_INDEX,
+	";", //$NON-NLS-1$
+	HeaderTemplateElementType.NEW_LINE,
+	HeaderTemplateElementType.CLOSE_BRACE,
+	HeaderTemplateElementType.NEW_LINE };
+
+	/**
+	 * Template for the optimized single dynamic parameter case, where buffer is
+	 * not needed
+	 */
+	Object[] SINGLE_DYNAMIC_PARAMETER_TEMPLATE = {
+			"TInt size = ", //$NON-NLS-1$
+		    SymbianConstants.PARAMETER_DECLARATION_PREFIX, "1.Size();", //$NON-NLS-1$
+		    HeaderTemplateElementType.NEW_LINE,
+		    "// BTrace assumes that parameter size is atleast 4 bytes", //$NON-NLS-1$
+		    HeaderTemplateElementType.NEW_LINE,
+		    "if (size % 4 == 0)", //$NON-NLS-1$
+		    HeaderTemplateElementType.OPEN_BRACE,
+		    "TUint8* ptr = ( TUint8* )aParam1.Ptr();", //$NON-NLS-1$
+		    HeaderTemplateElementType.NEW_LINE,
+		    "// Data is written directly and length is determined from trace message length", //$NON-NLS-1$
+		    HeaderTemplateElementType.NEW_LINE,
+		    "retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, size );", //$NON-NLS-1$
+		    HeaderTemplateElementType.NEW_LINE,
+		    HeaderTemplateElementType.CLOSE_BRACE,
+		    HeaderTemplateElementType.NEW_LINE,
+		    "else", //$NON-NLS-1$
+		    HeaderTemplateElementType.OPEN_BRACE,
+		    "TUint8 data[ KOstMaxDataLength ];", //$NON-NLS-1$
+		    HeaderTemplateElementType.NEW_LINE,
+		    "TUint8* ptr = data;", //$NON-NLS-1$
+		    HeaderTemplateElementType.NEW_LINE,
+		    "if (size > KOstMaxDataLength)", //$NON-NLS-1$
+		    HeaderTemplateElementType.OPEN_BRACE,
+		    "size = KOstMaxDataLength;", //$NON-NLS-1$
+		    HeaderTemplateElementType.NEW_LINE,
+		    HeaderTemplateElementType.CLOSE_BRACE,
+		    HeaderTemplateElementType.NEW_LINE,
+		    "TInt sizeAligned = ( size + 3 ) & ~3;", //$NON-NLS-1$
+		    HeaderTemplateElementType.NEW_LINE,		    
+		    "memcpy( ptr, ", //$NON-NLS-1$
+		    SymbianConstants.PARAMETER_DECLARATION_PREFIX, "1.Ptr(), size );", //$NON-NLS-1$
+		    HeaderTemplateElementType.NEW_LINE,
+		    "ptr += size;", //$NON-NLS-1$
+		    HeaderTemplateElementType.NEW_LINE,
+		    "// Fillers are written to get 32-bit alignment", //$NON-NLS-1$
+		    HeaderTemplateElementType.NEW_LINE,
+		    "while ( size++ < sizeAligned )", //$NON-NLS-1$
+		    HeaderTemplateElementType.OPEN_BRACE,
+		    "*ptr++ = 0;", //$NON-NLS-1$
+		    HeaderTemplateElementType.NEW_LINE,
+		    HeaderTemplateElementType.CLOSE_BRACE,
+			HeaderTemplateElementType.NEW_LINE,
+		    "ptr -= sizeAligned;", //$NON-NLS-1$
+		    HeaderTemplateElementType.NEW_LINE,
+		    "size = sizeAligned;", //$NON-NLS-1$
+		    HeaderTemplateElementType.NEW_LINE,
+		    "// Data is written directly and length is determined from trace message length", //$NON-NLS-1$
+		    HeaderTemplateElementType.NEW_LINE,
+		    "retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, size );", //$NON-NLS-1$
+		    HeaderTemplateElementType.NEW_LINE,
+		    HeaderTemplateElementType.CLOSE_BRACE,
+			HeaderTemplateElementType.NEW_LINE};
+
+	/**
+	 * Template for buffered parameters
+	 */
+	Object[] BUFFERED_PARAMETERS_TEMPLATE = { HeaderTemplateElementType.TRACE_FUNCTION_PARAMETERS };
+
+	/**
+	 * Template when the trace buffer needs to be allocated
+	 */
+	Object[] BUILD_TRACE_BUFFER_TEMPLATE = {
+			new TemplateIterator(IteratorParameters.class,
+					BUFFERED_PARAMETERS_TEMPLATE),
+			"ptr -= ", //$NON-NLS-1$
+			new TemplateChoice(CheckIsBufferSizeDynamic.class,
+					new Object[] { "length;" }, new Object[] { //$NON-NLS-1$
+					HeaderTemplateElementType.FIXED_BUFFER_SIZE, ";" }), //$NON-NLS-1$
+			HeaderTemplateElementType.NEW_LINE };
+
+	/**
+	 * Template for trace parameters.
+	 */
+	Object[] PARAMETERS_TEMPLATE = { new TemplateChoice(
+			CheckIsTraceBufferBuilt.class, BUILD_TRACE_BUFFER_TEMPLATE,
+			SINGLE_DYNAMIC_PARAMETER_TEMPLATE) };
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/header/IteratorComplexTraces.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,55 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Iterator for complex traces
+*
+*/
+package com.nokia.tracecompiler.engine.header;
+
+import java.io.IOException;
+
+import com.nokia.tracecompiler.model.Trace;
+import com.nokia.tracecompiler.model.TraceGroup;
+import com.nokia.tracecompiler.model.TraceModel;
+
+/**
+ * Iterator for complex traces
+ * 
+ */
+public final class IteratorComplexTraces extends TemplateIteratorEntry {
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engine.header.TemplateIteratorEntry#
+	 *      iterate(java.lang.Object[])
+	 */
+	@Override
+	void iterate(Object[] template) throws IOException {
+		TraceModel model = writer.getHeader().getOwner().getModel();
+		for (TraceGroup group : model) {
+			for (Trace trace : group) {
+				ComplexHeaderRule rule = trace
+						.getExtension(ComplexHeaderRule.class);
+				if (rule != null && rule.needsFunction()) {
+					if (writer.startTrace(trace)) {
+						writer.writeTemplate(template);
+					}
+				}
+			}
+		}
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/header/IteratorParameters.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,46 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Parameter iterator
+*
+*/
+package com.nokia.tracecompiler.engine.header;
+
+import java.io.IOException;
+import java.util.Iterator;
+
+import com.nokia.tracecompiler.model.TraceParameter;
+
+/**
+ * Parameter iterator
+ * 
+ */
+public final class IteratorParameters extends TemplateIteratorEntry {
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engine.header.TemplateIteratorEntry#iterate()
+	 */
+	@Override
+	public void iterate(Object[] template) throws IOException {
+		Iterator<TraceParameter> itr = writer.getCurrentTrace().getParameters();
+		while (itr.hasNext()) {
+			writer.startParameter(itr.next());
+			writer.writeTemplate(template);
+		}
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/header/IteratorTraces.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,51 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Iterator for all traces
+*
+*/
+package com.nokia.tracecompiler.engine.header;
+
+import java.io.IOException;
+
+import com.nokia.tracecompiler.model.Trace;
+import com.nokia.tracecompiler.model.TraceGroup;
+import com.nokia.tracecompiler.model.TraceModel;
+
+/**
+ * Iterator for all traces
+ * 
+ */
+public final class IteratorTraces extends TemplateIteratorEntry {
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engine.header.TemplateIteratorEntry#
+	 *      iterate(java.lang.Object[])
+	 */
+	@Override
+	void iterate(Object[] template) throws IOException {
+		TraceModel model = writer.getHeader().getOwner().getModel();
+		for (TraceGroup group : model) {
+			for (Trace trace : group) {
+				if (writer.startTrace(trace)) {
+					writer.writeTemplate(template);
+				}
+			}
+		}
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/header/Messages.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,63 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Localization for header package
+*
+*/
+package com.nokia.tracecompiler.engine.header;
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+/**
+ * Localization for header package
+ * 
+ */
+class Messages {
+
+	/**
+	 * Bundle name
+	 */
+	private static final String BUNDLE_NAME = "com.nokia.tracecompiler.engine.header.messages"; //$NON-NLS-1$
+
+	/**
+	 * Bundle
+	 */
+	private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
+			.getBundle(BUNDLE_NAME);
+
+	/**
+	 * Prevents construction
+	 */
+	private Messages() {
+	}
+
+	/**
+	 * Gets localized string based on key
+	 * 
+	 * @param key
+	 *            the resource key
+	 * @return the localized resource
+	 */
+	public static String getString(String key) {
+		String value;
+		try {
+			value = RESOURCE_BUNDLE.getString(key);
+		} catch (MissingResourceException e) {
+			value = '!' + key + '!';
+		}
+		return value;
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/header/SetNewLineCount.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,51 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Changes the new line count
+*
+*/
+package com.nokia.tracecompiler.engine.header;
+
+/**
+ * Changes the new line count
+ * 
+ */
+public final class SetNewLineCount {
+
+	/**
+	 * Line feed count
+	 */
+	private int count;
+
+	/**
+	 * Constructor
+	 * 
+	 * @param count
+	 *            the line feed count
+	 */
+	SetNewLineCount(int count) {
+		this.count = count;
+	}
+
+	/**
+	 * Gets the count
+	 * 
+	 * @return the count
+	 */
+	final int getLineCount() {
+		return count;
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/header/TemplateCheckBase.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,49 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Template iterator
+*
+*/
+package com.nokia.tracecompiler.engine.header;
+
+/**
+ * Check function for TemplateChoice
+ * 
+ */
+abstract class TemplateCheckBase {
+
+	/**
+	 * Header writer
+	 */
+	protected TraceHeaderWriter writer;
+
+	/**
+	 * Sets the writer
+	 * 
+	 * @param writer
+	 *            the writer to set
+	 */
+	final void setWriter(TraceHeaderWriter writer) {
+		this.writer = writer;
+	}
+
+	/**
+	 * Runs the check
+	 * 
+	 * @return the result
+	 */
+	abstract boolean check();
+
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/header/TemplateChoice.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,86 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Template iterator
+*
+*/
+package com.nokia.tracecompiler.engine.header;
+
+/**
+ * If-check in template
+ * 
+ */
+class TemplateChoice {
+
+	/**
+	 * Templates to be used if check is true
+	 */
+	private Object[] templateTrue;
+
+	/**
+	 * Templates to be used if check is false
+	 */
+	private Object[] templateFalse;
+
+	/**
+	 * Choice class
+	 */
+	private Class<? extends TemplateCheckBase> choiceClass;
+
+	/**
+	 * Constructors
+	 * 
+	 * @param choiceClass
+	 *            the class which does the check
+	 * @param templateTrue
+	 *            the template to be used if check is true
+	 * @param templateFalse
+	 *            the template to be used if check is false
+	 */
+	TemplateChoice(Class<? extends TemplateCheckBase> choiceClass,
+			Object[] templateTrue, Object[] templateFalse) {
+		this.choiceClass = choiceClass;
+		this.templateTrue = templateTrue;
+		this.templateFalse = templateFalse;
+	}
+
+	/**
+	 * Gets the choice class
+	 * 
+	 * @return the class
+	 */
+	Class<? extends TemplateCheckBase> getChoiceClass() {
+		return choiceClass;
+	}
+
+	/**
+	 * Gets the template if choice returns true
+	 * 
+	 * @return the template
+	 */
+	Object[] getTrueTemplate() {
+		return templateTrue;
+	}
+
+	/**
+	 * Gets the template if choice returns false
+	 * 
+	 * @return the template
+	 */
+	Object[] getFalseTemplate() {
+		return templateFalse;
+	}
+
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/header/TemplateIterator.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,69 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Template iterator
+*
+*/
+package com.nokia.tracecompiler.engine.header;
+
+/**
+ * Template iterator
+ * 
+ */
+final class TemplateIterator {
+
+	/**
+	 * Iterator class
+	 */
+	private Class<? extends TemplateIteratorEntry> iteratorClass;
+
+	/**
+	 * Template to be run by the iterator
+	 */
+	private Object[] template;
+
+	/**
+	 * Constructor
+	 * 
+	 * @param iteratorClass
+	 *            the iterator class
+	 * @param template
+	 *            the template
+	 */
+	TemplateIterator(Class<? extends TemplateIteratorEntry> iteratorClass,
+			Object[] template) {
+		this.iteratorClass = iteratorClass;
+		this.template = template;
+	}
+
+	/**
+	 * Gets the iterator class
+	 * 
+	 * @return the class
+	 */
+	final Class<? extends TemplateIteratorEntry> getIteratorClass() {
+		return iteratorClass;
+	}
+
+	/**
+	 * Gets the template
+	 * 
+	 * @return the template
+	 */
+	final Object[] getTemplate() {
+		return template;
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/header/TemplateIteratorEntry.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,54 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Iterator base class
+*
+*/
+package com.nokia.tracecompiler.engine.header;
+
+import java.io.IOException;
+
+/**
+ * Iterator base class
+ * 
+ */
+abstract class TemplateIteratorEntry {
+
+	/**
+	 * Header writer
+	 */
+	protected TraceHeaderWriter writer;
+
+	/**
+	 * Sets the writer
+	 * 
+	 * @param writer
+	 *            the writer to set
+	 */
+	final void setWriter(TraceHeaderWriter writer) {
+		this.writer = writer;
+	}
+
+	/**
+	 * Runs the iterator on given template
+	 * 
+	 * @param template
+	 *            the template
+	 * @throws IOException
+	 *             if operation fails
+	 */
+	abstract void iterate(Object[] template) throws IOException;
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/header/TraceHeader.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,73 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Representation of a header file that gets included into sources
+*
+*/
+package com.nokia.tracecompiler.engine.header;
+
+import com.nokia.tracecompiler.project.TraceProjectFile;
+
+/**
+ * Representation of a header file that gets included into sources when traces
+ * are added.
+ * 
+ */
+final class TraceHeader extends TraceProjectFile {
+
+	/**
+	 * Title shown in UI
+	 */
+	private static final String TITLE = Messages.getString("TraceHeader.Title"); //$NON-NLS-1$
+
+	/**
+	 * Constructor
+	 * 
+	 * @param target
+	 *            target path
+	 * @param hasModelName
+	 *            true if model name should be used with the file
+	 */
+	TraceHeader(String target, boolean hasModelName) {
+		super(target, hasModelName);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.project.TraceProjectFile#getFileExtension()
+	 */
+	@Override
+	protected String getFileExtension() {
+		String retval;
+		if (hasModelName) {
+			retval = HeaderConstants.TRACE_HEADER_EXTENSION;
+		} else {
+			retval = ""; //$NON-NLS-1$
+		}
+		return retval;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.project.TraceProjectFile#getTitle()
+	 */
+	@Override
+	public String getTitle() {
+		return TITLE;
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/header/TraceHeaderWriter.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,1401 @@
+/*
+ * Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies). 
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "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:
+ *
+ * Description:
+ *
+ * Writes the TraceHeader to a file
+ *
+ */
+package com.nokia.tracecompiler.engine.header;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import com.nokia.tracecompiler.TraceCompilerLogger;
+import com.nokia.tracecompiler.engine.LocationListBase;
+import com.nokia.tracecompiler.engine.LocationProperties;
+import com.nokia.tracecompiler.engine.TraceCompilerEngineGlobals;
+import com.nokia.tracecompiler.engine.TraceLocation;
+import com.nokia.tracecompiler.engine.TraceCompilerEngineErrorCodes.TraceCompilerErrorCode;
+import com.nokia.tracecompiler.engine.source.SourceFormatter;
+import com.nokia.tracecompiler.engine.source.TraceFormattingRule;
+import com.nokia.tracecompiler.engine.source.TraceParameterFormattingRule;
+import com.nokia.tracecompiler.file.FileCompareOutputStream;
+import com.nokia.tracecompiler.file.FileUtils;
+import com.nokia.tracecompiler.model.Trace;
+import com.nokia.tracecompiler.model.TraceCompilerException;
+import com.nokia.tracecompiler.model.TraceGroup;
+import com.nokia.tracecompiler.model.TraceModel;
+import com.nokia.tracecompiler.model.TraceParameter;
+import com.nokia.tracecompiler.plugin.TraceFormatConstants;
+import com.nokia.tracecompiler.plugin.TraceHeaderContribution;
+import com.nokia.tracecompiler.plugin.TraceAPIFormatter.TraceFormatType;
+import com.nokia.tracecompiler.plugin.TraceHeaderContribution.TraceHeaderContributionType;
+import com.nokia.tracecompiler.rules.FillerParameterRule;
+import com.nokia.tracecompiler.source.SourceConstants;
+import com.nokia.tracecompiler.source.SourceExcludedArea;
+import com.nokia.tracecompiler.source.SourceParser;
+import com.nokia.tracecompiler.source.SourceUtils;
+import com.nokia.tracecompiler.source.SymbianConstants;
+import com.nokia.tracecompiler.utils.TraceCompilerVersion;
+
+/**
+ * Writes the TraceHeader to a file
+ * 
+ */
+final class TraceHeaderWriter {
+
+	/**
+	 * return type text of a generated OstTraceGenx function.
+	 */
+	private static final String INLINE_TBOOL = "inline TBool";
+
+	/**
+	 * open bracket in a type cast
+	 */
+	private static final String BEGINCAST = "OBR"; //$NON-NLS-1$
+	
+	/**
+	 * closing bracket in a type cast
+	 */
+	private static final String ENDCAST = "CBR"; //$NON-NLS-1$
+
+	/**
+	 * REF replaces & in a function guard
+	 */
+	private static final String REF = "REF"; //$NON-NLS-1$
+
+	/**
+	 * & character
+	 */
+	private static final String AMPERSANT = "&"; //$NON-NLS-1$
+
+	/**
+	 * closing bracket
+	 */
+	private static final String CLOSING_BRACKET = ")"; //$NON-NLS-1$
+
+	/**
+	 * open bracket
+	 */
+	private static final String OPEN_BRACKET = "("; //$NON-NLS-1$
+
+	/**
+	 * TUint32 definition
+	 */
+	private static final String TUINT32_DEF = "TUint32 "; //$NON-NLS-1$
+
+	/**
+	 * TInt32 definition
+	 */
+	private static final String TINT32_DEF = "TInt32 "; //$NON-NLS-1$
+
+	/**
+	 * TUint definition
+	 */
+	private static final String TUINT_DEF = "TUint "; //$NON-NLS-1$
+
+	/**
+	 * TInt definition
+	 */
+	private static final String TINT_DEF = "TInt "; //$NON-NLS-1$
+
+	/**
+	 * Length variable defined flag
+	 */
+	private boolean lenghtVariableDefined = false;
+	
+	
+	/**
+	 * List of dynamic elements that can be used from the templates
+	 * 
+	 */
+	enum HeaderTemplateElementType {
+
+		/**
+		 * Licence text
+		 */
+		LICENCE_TEXT,
+		
+		/**
+		 * TraceCompiler version number
+		 */
+		TRACE_COMPILER_VERSION,
+
+		/**
+		 * Header guard based on file name
+		 */
+		HEADER_GUARD,
+
+		/**
+		 * Opening brace
+		 */
+		OPEN_BRACE,
+
+		/**
+		 * Closing brace
+		 */
+		CLOSE_BRACE,
+
+		/**
+		 * New line and indent based on open brace count
+		 */
+		NEW_LINE,
+
+		/**
+		 * Writes currentTraceFormatted
+		 */
+		FORMATTED_TRACE,
+
+		/**
+		 * Adds all closing braces except the one that closes the function
+		 */
+		CLOSE_EXTRA_BRACES,
+
+		/**
+		 * Type of current parameter
+		 */
+		PARAMETER_TYPE,
+
+		/**
+		 * Name of current parameter
+		 */
+		PARAMETER_NAME,
+
+		/**
+		 * Name of current trace
+		 */
+		TRACE_NAME,
+
+		/**
+		 * ID of current trace
+		 */
+		TRACE_ID_HEX,
+
+		/**
+		 * Calls a function to add the trace buffer initialization code
+		 */
+		BUILD_TRACE_BUFFER_CHECK,
+
+		/**
+		 * Calls a function to add the function body
+		 */
+		TRACE_FUNCTION_BODY,
+
+		/**
+		 * Calls a function to add function parameters
+		 */
+		TRACE_FUNCTION_PARAMETERS,
+
+		/**
+		 * Writes the fixedBufferSize member variable
+		 */
+		FIXED_BUFFER_SIZE,
+
+		/**
+		 * Writes the dynamicBufferSize member variable
+		 */
+		DYNAMIC_BUFFER_SIZE,
+
+		/**
+		 * Index of the parameter being processed
+		 */
+		PARAMETER_INDEX
+	}
+
+	/**
+	 * Group ID shift bits
+	 */
+	private static final int GROUP_SHIFT = 16; // CodForChk_Dis_Magic
+
+	/**
+	 * Number of bytes in parameter
+	 */
+	private static final int BYTES_IN_PARAMETER = 4; // CodForChk_Dis_Magic
+
+	/**
+	 * Indent
+	 */
+	private static final String INDENT = "    "; //$NON-NLS-1$
+
+	/**
+	 * The header file to be updated
+	 */
+	private TraceHeader header;
+
+	/**
+	 * Output stream for the header
+	 */
+	private OutputStream headerOutput;
+
+	/**
+	 * Temporary flag that specifies if a trace requires a trace buffer or it
+	 * can be represented by the default trace macros
+	 */
+	private boolean buildTraceBuffer;
+
+	/**
+	 * Temporary variable for fixed size
+	 */
+	private int fixedBufferSize;
+
+	/**
+	 * Dynamic size flag
+	 */
+	private boolean dynamicBufferSizeFlag;
+
+	/**
+	 * Flag which is set it trace needs #endif for __KERNEL_MODE__
+	 */
+	private boolean needsKernelEndif;
+
+	/**
+	 * Used via HeaderTemplateElementType.FORMATTED_TRACE
+	 */
+	private String currentTraceFormatted;
+
+	/**
+	 * Type of current parameter
+	 */
+	private String currentParameterType;
+
+	/**
+	 * Name of current parameter
+	 */
+	private String currentParameterName;
+
+	/**
+	 * Index of current parameter
+	 */
+	private int currentParameterIndex;
+
+	/**
+	 * Number of opened brackets
+	 */
+	private int openBraceCount;
+
+	/**
+	 * Trace being processed
+	 */
+	private Trace currentTrace;
+
+	/**
+	 * Parameter being processed
+	 */
+	private TraceParameter currentParameter;
+
+	/**
+	 * List of trace functions already in the header
+	 */
+	private ArrayList<String> traceDeclarations = new ArrayList<String>();
+
+	/**
+	 * Number of sequential new lines
+	 */
+	private int newLineCount;
+
+	/**
+	 * Number of allowed sequential new lines
+	 */
+	private int maxNewLines;
+
+	/**
+	 * Indicates that writing a function to the header file is going
+	 */
+	private boolean firstOpenBraceFound;
+	
+	/**
+	 * boolean indication that we are buffering a function text
+	 */
+	private boolean bufferingFunction;
+
+	/**
+	 * While writing a function to the header file, it's gathered to this
+	 * member. The member is then checked if the function parameters contain
+	 * TInt or TUint values. If so, the function is replicated so that TInt is
+	 * replaced by TInt32 and TUint with TUint32.
+	 */
+	private StringBuilder functionText = new StringBuilder();
+
+	/**
+	 * Number of brackets seen when writing a function. When it gets to 0, the
+	 * function in previousFunction variable is complete and can be written.
+	 */
+	private int numberOfBrackets;
+		
+	/**
+	 * string to hold the function guard
+	 */
+	private String ostTraceGenxFunGuard;
+
+	/**
+	 * Creates a new header writer
+	 * 
+	 * @param header
+	 *            the header to be written
+	 */
+	TraceHeaderWriter(TraceHeader header) {
+		this.header = header;
+	}
+
+	/**
+	 * Writes the header
+	 * 
+	 * @return true if header was written, false if it matched the existing
+	 *         header
+	 * @throws TraceCompilerException
+	 *             if writing fails
+	 */
+	boolean write() throws TraceCompilerException {
+		boolean headerWritten = false;
+		try {
+			openBraceCount = 0;
+			createHeader();
+			writeTemplate(HeaderTemplate.HEADER_TEMPLATE);
+			headerWritten = closeHeader();
+		} catch (IOException e) {
+			e.printStackTrace();
+			throw new TraceCompilerException(
+					TraceCompilerErrorCode.CANNOT_WRITE_PROJECT_FILE, e);
+		} finally {
+			traceDeclarations.clear();
+			if (headerOutput != null) {
+				try {
+					headerOutput.close();
+				} catch (IOException e) {
+				}
+			}
+			headerOutput = null;
+		}
+		return headerWritten;
+	}
+
+	/**
+	 * Creates the header file
+	 * 
+	 * @throws IOException
+	 *             if creation fails
+	 */
+	private void createHeader() throws IOException {
+		File file = new File(header.getAbsolutePath());
+		if (file.exists()) {
+			// If header exists, data is written to a byte array and compared
+			// with existing file. If they are the same, the file is not
+			// updated.
+			headerOutput = new FileCompareOutputStream(file);
+		} else {
+			// If header does not exist, the data is written directly to file
+			headerOutput = FileUtils.createOutputStream(file);
+		}
+	}
+
+	/**
+	 * Closes the header file. If data was written to a byte buffer this
+	 * compares the contents of the buffer with the existing file and re-writes
+	 * the file if contents do not match.
+	 * 
+	 * @return true if header was written, false if it matched the existing
+	 *         header
+	 * @throws IOException
+	 *             if closing fails
+	 */
+	private boolean closeHeader() throws IOException {
+		boolean headerWritten = true;
+		if (headerOutput instanceof FileCompareOutputStream) {
+			headerWritten = ((FileCompareOutputStream) headerOutput)
+					.writeFile();
+		}
+		headerOutput.close();
+		headerOutput = null;
+		return headerWritten;
+	}
+
+	/**
+	 * Writes a template to the stream
+	 * 
+	 * @param template
+	 *            the template
+	 * @throws IOException
+	 *             if writing fails
+	 */
+	void writeTemplate(Object[] template) throws IOException {
+		for (Object o : template) {
+			if (o instanceof String) {
+				write((String) o);
+			} else if (o instanceof TraceHeaderContributionType) {
+				writeHeaderContributions((TraceHeaderContributionType) o);
+			} else if (o instanceof HeaderTemplateElementType) {
+				writeTemplateElement((HeaderTemplateElementType) o);
+			} else if (o instanceof Object[]) {
+				// Template within template
+				writeTemplate((Object[]) o);
+			} else if (o instanceof TemplateChoice) {
+				TemplateChoice choice = (TemplateChoice) o;
+				// Gets the array index from template
+				Class<? extends TemplateCheckBase> c = choice.getChoiceClass();
+				try {
+					// Creates a switch-case object based on array index
+					TemplateCheckBase check = c.newInstance();
+					check.setWriter(this);
+					// Gets the case from the switch-case object and uses it to
+					// get the correct template
+					if (check.check()) {
+						writeTemplate(choice.getTrueTemplate());
+					} else {
+						writeTemplate(choice.getFalseTemplate());
+					}
+				} catch (InstantiationException e) {
+				} catch (IllegalAccessException e) {
+				}
+			} else if (o instanceof TemplateIterator) {
+				Class<? extends TemplateIteratorEntry> c = ((TemplateIterator) o)
+						.getIteratorClass();
+				try {
+					// Creates an iterator object based on array index
+					TemplateIteratorEntry itr = c.newInstance();
+					itr.setWriter(this);
+					itr.iterate(((TemplateIterator) o).getTemplate());
+				} catch (InstantiationException e) {
+				} catch (IllegalAccessException e) {
+				}
+			} else if (o instanceof SetNewLineCount) {
+				maxNewLines = ((SetNewLineCount) o).getLineCount();
+			} else if (o instanceof TraceFormatType) {
+				// Stores the formatted trace, but does not write anything
+				// HeaderTemplateElementType.FORMATTED_TRACE writes the trace
+				currentTraceFormatted = SourceFormatter.formatTrace(
+						currentTrace, (TraceFormatType) o);
+			}
+		}
+	}
+
+	/**
+	 * Writes an element from the HeaderTemplateElementType enumeration
+	 * 
+	 * @param type
+	 *            the element type
+	 * @throws IOException
+	 *             if writing fails
+	 */
+	private void writeTemplateElement(HeaderTemplateElementType type)
+			throws IOException { // CodForChk_Dis_ComplexFunc
+		switch (type) {
+		case NEW_LINE:
+			writeNewLine();
+			break;
+		case OPEN_BRACE:
+			writeOpenBrace();
+			break;
+		case CLOSE_BRACE:
+			writeCloseBrace();
+			break;
+		case PARAMETER_INDEX:
+			write(String.valueOf(currentParameterIndex));
+			break;
+		case PARAMETER_TYPE:
+			write(currentParameterType);
+			break;
+		case PARAMETER_NAME:
+			write(currentParameterName);
+			break;
+		case FORMATTED_TRACE:
+			writeFormattedTrace(currentTraceFormatted);
+			break;
+		case TRACE_NAME:
+			write(currentTrace.getName());
+			break;
+		case TRACE_ID_HEX:
+			writeTraceID();
+			break;
+		case FIXED_BUFFER_SIZE:
+			write(String.valueOf(fixedBufferSize));
+			break;
+		case TRACE_FUNCTION_BODY:
+			writeFunctionBody(currentTrace);
+			break;
+		case TRACE_FUNCTION_PARAMETERS:
+			writeParameter(currentParameter);
+			break;
+		case BUILD_TRACE_BUFFER_CHECK:
+			buildTraceBuffer = traceNeedsBuffer(currentTrace);
+			break;
+		case HEADER_GUARD:
+			write(SourceUtils.createHeaderGuard(header.getFileName()));
+			break;
+		case TRACE_COMPILER_VERSION:
+			write(TraceCompilerVersion.getVersion());
+			break;
+		case CLOSE_EXTRA_BRACES:
+			while (openBraceCount > 1) {
+				writeCloseBrace();
+			}
+			break;
+		case LICENCE_TEXT:
+		    writeLicence();
+		    break;
+		}
+	}
+
+	/**
+	 * Writes the trace ID to header
+	 * 
+	 * @throws IOException
+	 *             if writing fails
+	 */
+	private void writeTraceID() throws IOException {
+		int gid = currentTrace.getGroup().getID() << GROUP_SHIFT;
+		write(Integer.toHexString(gid | currentTrace.getID()));
+		ComplexHeaderRule rule = currentTrace
+				.getExtension(ComplexHeaderRule.class);
+		if (rule != null) {
+			String ext = rule.getTraceIDDefineExtension();
+			if (ext != null) {
+				write(ext);
+			}
+		}
+	}
+
+	/**
+	 * Writes the header contributions from plug-in's
+	 * 
+	 * @param type
+	 *            the contribution type
+	 * @throws IOException
+	 *             if writing fails
+	 */
+	private void writeHeaderContributions(TraceHeaderContributionType type)
+			throws IOException {
+		Iterator<String> contributions = getContributions(type);
+		boolean written = false;
+		while (contributions.hasNext()) {
+			writeContribution(contributions.next(), type);
+			written = true;
+		}
+		if (written) {
+			writeNewLine();
+		}
+	}
+
+	/**
+	 * Gets a list of contributions from plug-in's
+	 * 
+	 * @param type
+	 *            the contribution type
+	 * @return the contributions
+	 */
+	private Iterator<String> getContributions(TraceHeaderContributionType type) {
+		Iterator<TraceHeaderContribution> contributions = header.getOwner()
+				.getExtensions(TraceHeaderContribution.class);
+		ArrayList<String> list = new ArrayList<String>();
+		while (contributions.hasNext()) {
+			String[] s = contributions.next().getContribution(type);
+			if (s != null) {
+				for (String element : s) {
+					list.add(element);
+				}
+			}
+		}
+		return list.iterator();
+	}
+
+	/**
+	 * Writes a contribution to the stream
+	 * 
+	 * @param contribution
+	 *            the contribution
+	 * @param type
+	 *            the contribution type
+	 * @throws IOException
+	 *             if writing fails
+	 */
+	private void writeContribution(String contribution,
+			TraceHeaderContributionType type) throws IOException {
+		switch (type) {
+		case GLOBAL_DEFINES:
+			writeDefine(contribution);
+			break;
+		case GLOBAL_INCLUDES:
+			writeSystemInclude(contribution);
+			break;
+		case MAIN_HEADER_CONTENT:
+			// Handled by HeaderEngine
+			break;
+		}
+	}
+	
+	/**
+	 * write start of function guard
+	 * @throws IOException
+	 */
+	private void writeStartFunctionGuard() throws IOException {
+		Pattern p = Pattern.compile("inline\\s+TBool\\s+([^\\(]+)\\s*\\((.*)\\)\\s*\\{"); //$NON-NLS-1$
+		String guard = null;
+		String functionName = null;
+		
+		// Get the function definition line
+		int startIndex = functionText.indexOf(SourceConstants.OPENING_BRACE) + 1;
+		String funcDef = functionText.substring(0, startIndex);
+		
+		Matcher m = p.matcher(funcDef);
+		if (m.matches()) {
+			//get function name
+			functionName = m.group(1);
+			if (functionName == null || functionName.length() == 0) {
+				throw new IOException(Messages.getString("TraceHeader.internalError1")); //$NON-NLS-1$
+			}
+			//get raw parameters
+			String parameters = m.group(2);
+			if (parameters == null || parameters.length() == 0) {//there must be at least TraceID
+				throw new IOException(Messages.getString("TraceHeader.internalError2")); //$NON-NLS-1$
+			}
+			
+			functionName = functionName.trim();
+			parameters = parameters.trim();
+			//remove parameters names
+			guard = parameters.replaceAll("(\\S+,)|(\\S+\\s*$)", ""); //$NON-NLS-1$ //$NON-NLS-2$
+			//replace repeated spaces by one space
+			guard = guard.replaceAll("\\s+", SourceConstants.SPACE).trim(); //$NON-NLS-1$
+			//replace space by underscore
+			guard = guard.replace(SourceConstants.SPACE, SourceConstants.UNDERSCORE);
+			//replace ampersant by REF
+			guard = guard.replace(AMPERSANT, REF);
+			//replace ( by OBR
+			guard = guard.replace(OPEN_BRACKET, BEGINCAST);
+			//replace ) by CBR
+			guard = guard.replace(CLOSING_BRACKET, ENDCAST);
+		} else {
+			throw new IOException(Messages.getString("TraceHeader.internalError3")); //$NON-NLS-1$
+		}
+		
+		guard = SourceConstants.DOUBLE_UNDERSCORE 
+				+ functionName.toUpperCase()
+				+ SourceConstants.UNDERSCORE
+				+ guard.toUpperCase()
+				+ SourceConstants.DOUBLE_UNDERSCORE;
+		
+		ostTraceGenxFunGuard = guard;
+		write( SourceConstants.IFNDEF + SourceConstants.SPACE_CHAR + ostTraceGenxFunGuard);
+		write(SourceConstants.LINE_FEED);
+		write( SourceConstants.DEFINE +SourceConstants.SPACE_CHAR + ostTraceGenxFunGuard);
+		write(SourceConstants.LINE_FEED);
+		write(SourceConstants.LINE_FEED);
+	}
+
+	/**
+	 * write end of function guard
+	 * @throws IOException
+	 */
+	private void writeEndFunctionGuard() throws IOException {
+		if (ostTraceGenxFunGuard != null) {
+			write(SourceConstants.LINE_FEED);
+			write(SourceConstants.LINE_FEED);
+			write(SourceConstants.ENDIF 
+					+ SourceConstants.SPACE_CHAR
+					+ SourceConstants.FORWARD_SLASH_CHAR
+					+ SourceConstants.FORWARD_SLASH_CHAR
+					+ SourceConstants.SPACE_CHAR
+					+ ostTraceGenxFunGuard);
+			write(SourceConstants.LINE_FEED);
+		}
+	}
+	/**
+	 * Writes the function body to the stream
+	 * 
+	 * @param trace
+	 *            the trace to be written
+	 * @throws IOException
+	 *             if writing fails
+	 */
+	private void writeFunctionBody(Trace trace) throws IOException {
+		writeTraceBufferAllocation(trace);
+		writeTemplate(HeaderTemplate.PARAMETERS_TEMPLATE);
+		// If buffer is not used (single descriptor parameter), trace line is
+		// already written in template
+		if (isTraceBufferBuilt()) {
+			writeTraceLine(trace);
+		}
+	}
+
+	/**
+	 * Writes trace buffer allocation code to the function
+	 * 
+	 * @param trace
+	 *            the trace to be written
+	 * @throws IOException
+	 *             if writing fails
+	 */
+	private void writeTraceBufferAllocation(Trace trace) throws IOException {
+		// If buffer is not used (single descriptor parameter), this function
+		// does nothing
+		if (isTraceBufferBuilt()) {
+			Iterator<TraceParameter> parameters = trace.getParameters();
+			lenghtVariableDefined = false;
+			int fixedSizeParametersTotalSize = 0;
+			while (parameters.hasNext()) {
+				TraceParameter parameter = parameters.next();
+				TraceParameterFormattingRule sourceRule = parameter
+						.getExtension(TraceParameterFormattingRule.class);
+				if (sourceRule == null || sourceRule.isShownInSource()
+						|| sourceRule instanceof FillerParameterRule) {
+					// Fillers do not increment parameter index
+					if (!(sourceRule instanceof FillerParameterRule)) {
+						currentParameterIndex++;
+					}
+					int paramSize = SourceUtils
+							.mapParameterTypeToSize(parameter);
+					// calculateParameterSize returns 0 for dynamic parameters,
+					// but 4 extra bytes need to be reserved for the length
+					if (paramSize == 0) {
+						paramSize = BYTES_IN_PARAMETER;
+					}
+					fixedBufferSize += paramSize;
+					fixedSizeParametersTotalSize += paramSize;
+					if (SourceUtils.isParameterSizeDynamic(parameter)) {
+
+						// Define length variable only once
+						if (lenghtVariableDefined == false) {
+							writeTemplate(HeaderTemplate.LENGTH_VARIABLE_DEFINITION_TEMPLATE);
+							lenghtVariableDefined = true;
+						}
+
+						// Increase length variable if needed
+						// This is needed in case that there has been fixed size
+						// parameter
+						// before dynamic parameter
+						if (fixedSizeParametersTotalSize - paramSize > 0) {
+							fixedSizeParametersTotalSize -= paramSize;
+							writeTemplate(HeaderTemplate.LENGTH_VARIABLE_INCREASE_TEMPLATE_BEGIN);
+							write(String.valueOf(fixedSizeParametersTotalSize));
+							writeTemplate(HeaderTemplate.LENGTH_VARIABLE_INCREASE_TEMPLATE_END);
+						}
+
+						fixedSizeParametersTotalSize = 0;
+
+						writeTemplate(HeaderTemplate.DYNAMIC_PARAMETER_LENGTH_TEMPLATE);
+						dynamicBufferSizeFlag = true;
+					}
+				}
+			}
+			writeTemplate(HeaderTemplate.BUFFER_ALLOCATION_TEMPLATE);
+			currentParameterIndex = 0;
+		}
+	}
+
+	/**
+	 * Writes the given parameter to the header
+	 * 
+	 * @param parameter
+	 *            the parameter
+	 * @throws IOException
+	 *             if writing fails
+	 */
+	void writeParameter(TraceParameter parameter) throws IOException {
+		TraceParameterFormattingRule sourceRule = parameter
+				.getExtension(TraceParameterFormattingRule.class);
+		if (sourceRule == null || sourceRule.isShownInSource()
+				|| sourceRule instanceof FillerParameterRule) {
+			String paramType = SourceUtils
+					.mapParameterTypeToSymbianType(parameter);
+			if (SourceUtils.isParameterSizeDynamic(parameter)) {
+				currentParameterIndex++;
+				currentParameterName = SymbianConstants.PARAMETER_DECLARATION_PREFIX
+						+ currentParameterIndex;
+				writeTemplate(HeaderTemplate.DYNAMIC_PARAMETER_TEMPLATE);
+			} else {
+				currentParameterType = paramType;
+				if (sourceRule instanceof FillerParameterRule) {
+					currentParameterName = "0"; //$NON-NLS-1$
+					writeTemplate(HeaderTemplate.FIXED_PARAMETER_TEMPLATE);
+				} else {
+					currentParameterIndex++;
+					currentParameterName = SymbianConstants.PARAMETER_DECLARATION_PREFIX
+							+ currentParameterIndex;
+					if (lenghtVariableDefined == true) {
+						writeTemplate(HeaderTemplate.FIXED_PARAMETER_TEMPLATE_WITH_LENGTH_CHECK);
+					} else {
+						writeTemplate(HeaderTemplate.FIXED_PARAMETER_TEMPLATE);
+					}
+				}
+			}
+		}
+	}
+
+	/**
+	 * Writes the trace line to the function
+	 * 
+	 * @param trace
+	 *            the trace to be written
+	 * @throws IOException
+	 *             if writing fails
+	 */
+	private void writeTraceLine(Trace trace) throws IOException {
+		StringBuffer sb;
+		StringBuffer bufferData = new StringBuffer();
+		StringBuffer lengthData = new StringBuffer();
+		if (isBufferSizeDynamic()) {
+			sb = writeBufferedTraceLine(trace, bufferData, lengthData);
+		} else {
+			// If buffer size is 4, the buffer can be traced using the
+			// the 32-bit parameter trace macro instead of data macro
+			if (fixedBufferSize / BYTES_IN_PARAMETER == 1) {
+				sb = writePackedTraceLine(trace, bufferData);
+			} else {
+				sb = writeBufferedTraceLine(trace, bufferData, lengthData);
+			}
+		}
+		int index = sb.indexOf(TraceFormatConstants.DATA_BUFFER_FORMAT);
+		if (index >= 0) {
+			sb.replace(index, index
+					+ TraceFormatConstants.DATA_BUFFER_FORMAT.length(),
+					bufferData.toString());
+		}
+		index = sb.indexOf(TraceFormatConstants.DATA_LENGTH_FORMAT);
+		if (index >= 0) {
+			sb.replace(index, index
+					+ TraceFormatConstants.DATA_LENGTH_FORMAT.length(),
+					lengthData.toString());
+		}
+		String s = sb.toString();
+		write("retval = "); //$NON-NLS-1$
+		writeFormattedTrace(s);
+		writeNewLine();
+	}
+
+	/**
+	 * Writes a trace line when the parameters can be fitted into a direct API
+	 * call
+	 * 
+	 * @param trace
+	 *            the trace
+	 * @param bufferData
+	 *            the buffer
+	 * @return formatted trace
+	 */
+	private StringBuffer writePackedTraceLine(Trace trace,
+			StringBuffer bufferData) {
+		StringBuffer sb;
+		// The formatting rule is used to get the API macro
+		sb = new StringBuffer(SourceFormatter.formatTrace(trace,
+				TraceFormatType.TRACE_PACKED));
+		TraceFormattingRule rule = trace
+				.getExtension(TraceFormattingRule.class);
+		if (rule == null) {
+			rule = trace.getModel().getExtension(TraceFormattingRule.class);
+		}
+		int index = sb.indexOf(TraceFormatConstants.PARAM_COUNT_FORMAT);
+		if (index >= 0) {
+			// Single parameter is supported
+			sb.replace(index, index
+					+ TraceFormatConstants.PARAM_COUNT_FORMAT.length(), rule
+					.mapParameterCountToSource(trace, 1));
+		}
+		bufferData.append("*( ( TUint32* )ptr )"); //$NON-NLS-1$
+		return sb;
+	}
+
+	/**
+	 * Writes a trace line when the trace contains more data that the API
+	 * supports
+	 * 
+	 * @param trace
+	 *            the trace
+	 * @param bufferData
+	 *            the trace buffer
+	 * @param lengthData
+	 *            the trace length buffer
+	 * @return the formatted trace
+	 */
+	private StringBuffer writeBufferedTraceLine(Trace trace,
+			StringBuffer bufferData, StringBuffer lengthData) {
+		StringBuffer sb;
+		// Buffer parameter
+		// *( ( TUint32* )ptr ), *( ( TUint32* )( ptr + 4 ) ), ..., ptr + x
+		sb = new StringBuffer(SourceFormatter.formatTrace(trace,
+				TraceFormatType.TRACE_BUFFER));
+		if (isTraceBufferBuilt()) {
+			bufferData.append("ptr"); //$NON-NLS-1$
+			if (isBufferSizeDynamic()) {
+				// In case of dynamic buffer, the length has been calculated
+				// into length variable
+				lengthData.append("length"); //$NON-NLS-1$
+			} else {
+				// Fixed size case
+				lengthData.append(String.valueOf(fixedBufferSize));
+			}
+		} else {
+			// In case of no-buffer, the size variable contain the data size
+			bufferData.append("ptr"); //$NON-NLS-1$
+			lengthData.append("size"); //$NON-NLS-1$
+		}
+		return sb;
+	}
+
+	/**
+	 * Writes a formatted trace to the stream. This removes the newline from the
+	 * trace if it exists
+	 * 
+	 * @param trace
+	 *            the trace
+	 * @throws IOException
+	 *             if writing fails
+	 */
+	private void writeFormattedTrace(String trace) throws IOException {
+		if (trace.endsWith(SourceConstants.LINE_FEED)) {
+			write(trace.substring(0, trace.length()
+					- SourceConstants.LINE_FEED.length()));
+		} else {
+			write(trace);
+		}
+	}
+
+	/**
+	 * Increases indent and writes a new line, brace, new line combination
+	 * 
+	 * @throws IOException
+	 *             if writing fails
+	 */
+	private void writeOpenBrace() throws IOException {
+		openBraceCount++;
+		writeNewLine();
+		write(SourceConstants.OPENING_BRACE);
+		writeNewLine();
+	}
+
+	/**
+	 * Write brace, decreases indent and writes a new line
+	 * 
+	 * @throws IOException
+	 *             if writing fails
+	 */
+	private void writeCloseBrace() throws IOException {
+		write(SourceConstants.CLOSING_BRACE);
+		openBraceCount--;
+		writeNewLine();
+	}
+	
+	/**
+	 * write licence Text
+	 * @throws IOException if write fails
+	 */
+	private void writeLicence() throws IOException {
+		String licence = null;
+		SourceParser parser = null;
+		//first get any of the traces belonging to this header
+		TraceModel model = header.getOwner().getModel();
+		for (TraceGroup group : model) {
+			for (Trace trace : group) {
+				Iterator<LocationListBase> itr = trace.getExtensions(LocationListBase.class);
+				// The trace must have at least one location that belong to this header
+				while (itr.hasNext() && parser == null) {
+					LocationListBase list = itr.next();
+					for (LocationProperties loc : list) {
+						if (isValidTraceForHeader(loc.getFileName())) {
+								parser = ((TraceLocation)loc).getParser();
+								break;
+						}
+					}
+				}
+				if (parser!= null)  {
+					break;
+				}
+			}
+			if (parser != null) {
+				break;
+			}
+		}
+		
+		if (parser!= null) {
+		List<SourceExcludedArea> excludedAreas = parser.getExcludedAreas();
+		//try to find licence from the source
+		if (!excludedAreas.isEmpty()) {
+			SourceExcludedArea sourceExcludedArea = excludedAreas.get(0);
+			int offset = sourceExcludedArea.getOffset();
+			int type = sourceExcludedArea.getType();
+			int length = sourceExcludedArea.getLength();
+			if (offset == 0 && type == SourceExcludedArea.MULTILINE_COMMENT) {
+				String data = sourceExcludedArea.getParser().getData(offset, length);
+				if (data.contains("Copyright")) { //$NON-NLS-1$
+					// licence found write it
+					TraceCompilerLogger.printInfo("Add Licence text from: " + sourceExcludedArea.getFileName() + " to : " + header.getAbsolutePath()); //$NON-NLS-1$
+					licence = data;
+					write(licence);
+				}
+			}	
+		}
+		}
+		
+		if (licence == null) {
+			//get default licence from the licence file
+			licence = TraceCompilerEngineGlobals.getDefaultLicence(true);
+			
+			if(licence != null) {
+				TraceCompilerLogger.printInfo("Add default EPL Licence to : " + header.getAbsolutePath()); //$NON-NLS-1$
+				write(licence);
+			}
+		}
+	}
+
+	/**
+	 * Writes a new line and indent to the stream
+	 * 
+	 * @throws IOException
+	 *             if writing fails
+	 */
+	private void writeNewLine() throws IOException {
+		int newLines = newLineCount;
+		while (newLines < maxNewLines) {
+			write(SourceConstants.LINE_FEED);
+			for (int i = 0; i < openBraceCount; i++) {
+				write(INDENT);
+			}
+			newLines++;
+		}
+		newLineCount = maxNewLines;
+	}
+
+	/**
+	 * Writes a define to stream
+	 * 
+	 * @param name
+	 *            the name for the define
+	 * @throws IOException
+	 *             if writing fails
+	 */
+	private void writeDefine(String name) throws IOException {
+		write(SourceConstants.DEFINE);
+		write(SourceConstants.SPACE);
+		write(name);
+		writeNewLine();
+	}
+
+	/**
+	 * Writes include to header
+	 * 
+	 * @param name
+	 *            the header name
+	 * @throws IOException
+	 *             if writing fails
+	 */
+	private void writeSystemInclude(String name) throws IOException {
+		write(SourceConstants.INCLUDE);
+		write(SourceConstants.SPACE);
+		write("<"); //$NON-NLS-1$
+		write(name);
+		write(">"); //$NON-NLS-1$
+		writeNewLine();
+	}
+
+	/**
+	 * Writes data to a stream
+	 * 
+	 * @param data
+	 *            the string of data
+	 * @throws IOException
+	 *             if writing fails
+	 */
+	private void write(String data) throws IOException {
+		// Check if function starts
+		if (data.contains(INLINE_TBOOL) || bufferingFunction) {
+			bufferingFunction = true;
+			functionText.append(data);
+		} else {
+			headerOutput.write(data.getBytes());
+		}
+			newLineCount = 0;
+
+		//try to duplicate function if the current function processing is complete and duplicate is needed.
+		writeAndDuplicateFunction(data);
+	}
+
+	/**
+	 * Duplicates the function if needed
+	 * 
+	 * @param data
+	 *            data String
+	 * @throws IOException
+	 *             if writing fails
+	 */
+	private void writeAndDuplicateFunction(String data) throws IOException {
+			// This assumes there is only one start or end bracket in one line!
+			if (data.contains(SourceConstants.OPENING_BRACE)) {
+				firstOpenBraceFound = true;
+				numberOfBrackets++;
+			} else if (data.contains(SourceConstants.CLOSING_BRACE)) {
+				numberOfBrackets--;
+
+				// Function ends
+				if (numberOfBrackets == 0 && firstOpenBraceFound) {
+					firstOpenBraceFound = false;
+					bufferingFunction = false;
+					//write start function guard
+					writeStartFunctionGuard();
+					//write the function
+					headerOutput.write(functionText.toString().getBytes());
+					//write end function guard
+					writeEndFunctionGuard();
+
+					//process duplicate if needed
+					// Get the function definition line
+					int startIndex = functionText.indexOf(SourceConstants.OPENING_BRACE);
+					String funcDef = functionText.substring(0, startIndex);
+
+					// Replace TInt with TInt32 and TUint with TUint32 from the
+					// header and write the function back again
+					if (funcDef.contains(TINT_DEF)
+							|| funcDef.contains(TUINT_DEF)) {
+						//replace and duplicate
+						funcDef = funcDef.replace(TINT_DEF, TINT32_DEF);
+						funcDef = funcDef.replace(TUINT_DEF, TUINT32_DEF);
+						functionText.replace(0, startIndex, funcDef);
+						
+						//write start function guard for duplicate
+						write(SourceConstants.LINE_FEED);
+						write(SourceConstants.LINE_FEED);
+						writeStartFunctionGuard();
+						
+						//write duplicate function
+						headerOutput.write(functionText.toString().getBytes());
+						
+						//write end function guard for duplicate
+						writeEndFunctionGuard();
+					}
+
+					functionText.setLength(0);
+				}
+			}
+	}
+
+	/**
+	 * Checks if a trace needs a buffer or it can be represented with regular
+	 * trace macros.
+	 * 
+	 * @param trace
+	 *            the trace
+	 * @return true if trace needs a buffer
+	 */
+	private boolean traceNeedsBuffer(Trace trace) {
+		// A single dynamic parameter can be passed through the regular
+		// API macros. In that case the parameter length is determined
+		// by the trace message length
+		Iterator<TraceParameter> parameters = trace.getParameters();
+		boolean needsBuffer = false;
+		boolean dynamicFound = false;
+		while (parameters.hasNext() && !needsBuffer) {
+			TraceParameter parameter = parameters.next();
+			if (isParameterVisible(parameter)) {
+				if (SourceUtils.isParameterSizeDynamic(parameter)) {
+					if (dynamicFound) {
+						needsBuffer = true;
+					} else {
+						dynamicFound = true;
+					}
+				} else {
+					needsBuffer = true;
+				}
+			}
+		}
+		return needsBuffer;
+	}
+
+	/**
+	 * Checks if a parameter is visible
+	 * 
+	 * @param parameter
+	 *            the parameter to be checked
+	 * @return true if visible, false if not
+	 */
+	private boolean isParameterVisible(TraceParameter parameter) {
+		boolean retval;
+		TraceParameterFormattingRule sourceRule = parameter
+				.getExtension(TraceParameterFormattingRule.class);
+		if (sourceRule == null || sourceRule.isShownInSource()) {
+			retval = true;
+		} else {
+			retval = false;
+		}
+		return retval;
+	}
+
+	/**
+	 * Gets the formatted trace
+	 * 
+	 * @return the trace
+	 */
+	String getCurrentTraceFormatted() {
+		return currentTraceFormatted;
+	}
+
+	/**
+	 * Checks if trace is already formatted to header
+	 * 
+	 * @return true if formatted
+	 */
+	boolean isTraceFormatDuplicate() {
+		boolean retval;
+		if (traceDeclarations.contains(currentTraceFormatted)) {
+			retval = true;
+		} else {
+			traceDeclarations.add(currentTraceFormatted);
+			retval = false;
+		}
+		return retval;
+	}
+
+	/**
+	 * Checks if the buffer size for current trace is fixed
+	 * 
+	 * @return the flag
+	 */
+	boolean isTraceBufferFixed() {
+		return fixedBufferSize != 0;
+	}
+
+	/**
+	 * Checks if the buffer is built
+	 * 
+	 * @return the flag
+	 */
+	boolean isTraceBufferBuilt() {
+		return buildTraceBuffer;
+	}
+
+	/**
+	 * Gets the current trace
+	 * 
+	 * @return the trace
+	 */
+	Trace getCurrentTrace() {
+		return currentTrace;
+	}
+
+	/**
+	 * Gets the header
+	 * 
+	 * @return the header
+	 */
+	TraceHeader getHeader() {
+		return header;
+	}
+
+	/**
+	 * Starts writing a trace
+	 * 
+	 * @param trace
+	 *            the trace
+	 * @return true if trace can be written, false if not
+	 */
+	boolean startTrace(Trace trace) {
+		boolean validTrace = false;
+		Iterator<LocationListBase> itr = trace
+				.getExtensions(LocationListBase.class);
+		// The trace must have at least one location that belong to this header
+		while (itr.hasNext() && !validTrace) {
+			LocationListBase list = itr.next();
+			for (LocationProperties loc : list) {
+				validTrace = isValidTraceForHeader(loc.getFileName());
+				if (validTrace) {
+					break;
+				}
+			}
+		}
+		if (validTrace) {
+			currentTrace = trace;
+			fixedBufferSize = 0;
+			dynamicBufferSizeFlag = false;
+			buildTraceBuffer = false;
+			currentTraceFormatted = null;
+			currentParameterName = null;
+			currentParameterType = null;
+			currentParameterIndex = 0;
+		}
+		return validTrace;
+	}
+
+	/**
+	 * Checks if the location belongs to this header
+	 * 
+	 * @param locFileName
+	 *            the location
+	 * @return true if location belongs here
+	 */
+	private boolean isValidTraceForHeader(String locFileName) {
+		boolean valid = false;
+		if (locFileName != null) {
+			int index = locFileName.lastIndexOf('.');
+			if (index >= 0) {
+				locFileName = locFileName.substring(0, index);
+			}
+			if (locFileName.equals(header.getProjectName())) {
+				valid = true;
+			}
+		}
+		return valid;
+	}
+
+	/**
+	 * Starts writing a parameter
+	 * 
+	 * @param parameter
+	 *            the parameter
+	 */
+	void startParameter(TraceParameter parameter) {
+		currentParameterName = null;
+		currentParameterType = null;
+		currentParameter = parameter;
+	}
+
+	/**
+	 * Sets the kernel mode #endif needed flag
+	 * 
+	 * @param flag
+	 *            the flag
+	 */
+	void setKernelModeEndifNeeded(boolean flag) {
+		needsKernelEndif = flag;
+	}
+
+	/**
+	 * Gets the kernel mode endif needed flag
+	 * 
+	 * @return the flag
+	 */
+	boolean isKernelModeEndifNeeded() {
+		return needsKernelEndif;
+	}
+
+	/**
+	 * Returns the dynamic buffer size flag
+	 * 
+	 * @return true if buffer size is dynamic
+	 */
+	boolean isBufferSizeDynamic() {
+		return dynamicBufferSizeFlag;
+	}
+
+	/**
+	 * Checks if current parameter needs alignment
+	 * 
+	 * @return true if needed
+	 */
+	boolean isParameterAlignmentNeeded() {
+		return SourceUtils.isParameterAlignementNeeded(currentParameter
+				.getType());
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/header/messages.properties	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,8 @@
+TraceHeader.Title=Trace Header
+HeaderEngine.TraceHeaderNotChangedPrefix=No changes were made to 
+HeaderEngine.FailedToAttachHeader=Failed to attach trace header to project
+TraceHeader.internalError1=TraceCompiler internal: Error parsing OstTraceGenx function name.
+TraceHeader.internalError2=TraceCompiler internal: Error parsing OstTraceGenx function parameters.
+TraceHeader.internalError3=TraceCompiler internal: TraceCompiler could not identify OstTraceGenx function.
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/header/package.html	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,4 @@
+<html><body>
+Maintains the trace header, which contains inline functions 
+for traces that cannot be represented by the normal trace API.
+</body></html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/messages.properties	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,110 @@
+TraceCompiler.UnknownTypeWarning=Parameter type is unknown. Hex, 32-bit used
+TraceLocationConverter.GroupIdValueError=TC has detected a fixed_id.defintions using different Group Id values. This file will be regenerated with the correct values.
+TraceLocationConverter.DeprecatedGroupIdWarningStart=Deprecated group
+TraceLocationConverter.DeprecatedGroupIdWarningMiddle=detected. Updating to
+TraceLocationConverter.DeprecatedGroupIdWarningEnd=in dictionary. Please update source code!
+TraceLocationConverter.FixedIdProblemWarningBeginText=Found problems with the old fixed id message : 
+TraceLocationConverter.FixedIdProblemWarningMiddleText=. Therfore deleting it.
+TraceLocationMap.SourceWithTraceRemoved=Source file with traces was removed
+TraceCompilerErrorMessages.SourceNotEditable=Source cannot be edited
+TraceCompilerErrorMessages.DuplicateGroupID=Group ID conflict. Please close all the source files, delete traceid and tracecompiler cache files. Then reopen source file.
+TraceCompilerErrorMessages.DuplicateTraceID=Trace ID is already in use
+TraceCompilerErrorMessages.DuplicateGroupName=Group name is already in use
+TraceCompilerErrorMessages.DuplicateTraceName=Trace name is already in use
+TraceCompilerErrorMessages.DuplicateConstantValue=Enum text is already in use
+TraceCompilerErrorMessages.DuplicateConstantID=Enum value is already in use
+TraceCompilerErrorMessages.DuplicateConstantTableName=Enum type is already in use
+TraceCompilerErrorMessages.DuplicateConstantTableID=Enum ID is already in use
+TraceCompilerErrorMessages.DuplicateParameterName=Parameter name is already in use
+TraceCompilerErrorMessages.DuplicateParameterID=Parameter ID is already in use
+TraceCompilerErrorMessages.InvalidGroupName=Invalid group name
+TraceCompilerErrorMessages.InvalidTraceName=Invalid trace name
+TraceCompilerErrorMessages.InvalidGroupID=Invalid group ID
+TraceCompilerErrorMessages.InvalidGroupIDStart=Group ID must be between 
+TraceCompilerErrorMessages.InvalidGroupIDMiddle=\ and 
+TraceCompilerErrorMessages.InvalidGroupIDEnd=
+TraceCompilerErrorMessages.InvalidTraceID=Invalid trace ID
+TraceCompilerErrorMessages.InvalidTraceIDStart=Trace ID must be between 
+TraceCompilerErrorMessages.InvalidTraceIDMiddle=\ and 
+TraceCompilerErrorMessages.InvalidTraceIDEnd=
+TraceCompilerErrorMessages.InvalidModelPropertiesForExport=Before exporting, the trace compiler needs to be run once to generate UID and name for the component.
+TraceCompilerErrorMessages.InvalidProjectName=Project name is not valid
+TraceCompilerErrorMessages.InvalidSourceLocation=Cursor location is not valid
+TraceCompilerErrorMessages.InvalidParameterName=Parameter name is not valid
+TraceCompilerErrorMessages.InvalidParameterNameInReturnValue=Return parameter name is not valid. Parameter was not added to exit trace.
+TraceCompilerErrorMessages.InvalidConstantValue=Enum text is not valid
+TraceCompilerErrorMessages.InvalidParameterType=Parameter type is not supported
+TraceCompilerErrorMessages.InvalidParameterTypePrefix=Parameter type 
+TraceCompilerErrorMessages.InvalidParameterTypePostfix=\ is not supported
+TraceCompilerErrorMessages.InvalidDirectoryPrefix=
+TraceCompilerErrorMessages.InvalidDirectoryPostfix=\ is not a valid directory
+TraceCompilerErrorMessages.InvalidDirectory=Directory is not valid
+TraceCompilerErrorMessages.InvalidConstantTableName=Enum type is not valid. Please select a valid enum from the source code and try again.
+TraceCompilerErrorMessages.ConstantTableNotPartOfProject=The file where enum exist is not part of project. You can parse enums only from files that are part of the project. If you want parse enum from external file, you can copy and paste that enum to some file in your project and parse it from there. After you have parsed enum you can delete it from your project.  
+TraceCompilerErrorMessages.FileDoesNotExistPrefix=
+TraceCompilerErrorMessages.FileDoesNotExistPostfix=\ does not exist
+TraceCompilerErrorMessages.InvalidTraceData=Invalid trace text
+TraceCompilerErrorMessages.InvalidTraceFile=Trace project file is not valid
+TraceCompilerErrorMessages.GroupNotSelected=Group was not selected
+TraceCompilerErrorMessages.NoFunctionsToInstrumentPrefix=None of the functions from open files could be instrumented with 
+TraceCompilerErrorMessages.NoFunctionsToInstrument=Currently open files do not have any functions that can be instrumented
+TraceCompilerErrorMessages.NoFunctionsToInstrumentPostfix=\ template
+TraceCompilerErrorMessages.ParameterFormatMismatch=Parameter count does not match the format specification
+TraceCompilerErrorMessages.ParameterFormatNotSupported=Parameter format is not supported
+TraceCompilerErrorMessages.ParameterFormatNotSupportedPrefix=Parameter format 
+TraceCompilerErrorMessages.ParameterFormatNotSupportedPostfix=\ is not supported
+TraceCompilerErrorMessages.MultipleErrorsInOperation=Multiple errors during operation. See event viewer for details
+TraceCompilerErrorMessages.ParameterAddNotAllowed=Parameters cannot be added to the trace
+TraceCompilerErrorMessages.EmptyParameterName=Parameter did not have a name and was not added to trace
+TraceCompilerErrorMessages.SourceNotOpen=Source file needs to be opened first
+TraceCompilerErrorMessages.ParameterRemoveNotAllowed=The parameter cannot be removed
+TraceCompilerErrorMessages.ConstantTableNotSelected=Enum was not selected
+TraceCompilerErrorMessages.ConstantTableParseFailed=Failed to parse enum
+TraceCompilerErrorMessages.CannotDeleteSelectedObject=The selected object cannot be deleted
+TraceCompilerErrorMessages.CannotUpdateTraceIntoSource=Trace could not be updated to source code
+TraceCompilerErrorMessages.CannotParseFunctionParameters=None of the function parameters could be added to the function entry trace
+TraceCompilerErrorMessages.CannotOpenProjectFile=Cannot open project file. Check that the directory is not read-only
+TraceCompilerErrorMessages.CannotWriteProjectFile=Cannot write project file. Check that the directory is not read-only
+TraceCompilerErrorMessages.CannotOpenSourceFile=Source file could not be opened
+TraceCompilerErrorMessages.ParameterTemplateInUse=Another parameter already uses the selected template
+TraceCompilerErrorMessages.InvalidTraceTextFormat=Trace text format is not valid
+TraceCompilerErrorMessages.InvalidTraceNameFormat=Trace name format is not valid
+TraceCompilerErrorMessages.InsertTraceDoesNotWork=Data traces cannot be inserted to source
+TraceCompilerErrorMessages.TraceLocationNotSelected=Source location was not selected
+TraceCompilerErrorMessages.TraceHasMultipleLocations=Trace is used from multiple places
+TraceCompilerErrorMessages.LocationCouldNotBeParsed=Location could not be parsed
+TraceCompilerErrorMessages.UnreachableTraceLocation=Trace is in unreachable part of the code
+TraceCompilerErrorMessages.NameFormatMissingFunction=Missing function name tag {$FN} from trace name
+TraceCompilerErrorMessages.TraceNotSelected=Trace was not selected
+TraceCompilerErrorMessages.TraceProjectNotOpen=Trace project is not open
+TraceCompilerErrorMessages.TraceHasNoLocations=Trace is not used from source files and will be removed when a source is saved
+TraceCompilerErrorMessages.NoTracesToDelete=No traces to delete
+TraceCompilerErrorMessages.NoTracesToExport=Project does not have any traces -> No files were written
+TraceCompilerErrorMessages.FileDoesNotExist=File does not exist
+TraceCompilerErrorMessages.NoTraceGroups=Cannot add a new trace before a trace group has been created
+TraceCompilerErrorMessages.UnexpectedException=Unknown error occurred
+TraceCompilerErrorMessages.NotEnoughParameters=Trace does not have enough parameters
+TraceCompilerErrorMessages.NoContextForLocation=Class / function name for trace could not be determined
+TraceCompilerErrorMessages.TraceDoesNotExist=Trace will be created when the source file is saved
+TraceCompilerErrorMessages.TraceNeedsConversionPrefix=Trace needs conversion
+TraceCompilerErrorMessages.ParameterCountMismatch=Parameter count in source does not match the parameter count in trace
+TraceCompilerErrorMessages.ParameterCountDoesNotMatchApi=The number of parameters in source does not match the API macro
+TraceCompilerErrorMessages.ParameterFormatNotSupportedInMacro=Extension macro needs to be used with this parameter format type
+TraceCompilerErrorMessages.ParameterFormatUnnecessaryExtMacro=Trace does not need to use extension macro
+TraceCompilerErrorMessages.ParameterFormatNotSupportedInMacroPrefix=Extension macro needs to be used with parameter 
+TraceCompilerErrorMessages.ParameterFormatNotSupportedInMacroPostfix=
+TraceCompilerErrorMessages.ParameterFormatNotSupportedInArrayPrefix=Parameter format 
+TraceCompilerErrorMessages.ParameterFormatNotSupportedInArrayPostfix=\ cannot be used as an array
+TraceCompilerErrorMessages.ParameterFormatNotSupportedInArray=Parameter format cannot be used as an array
+TraceCompilerErrorMessages.PropertyFileElementNotSupportedPrefix=Property file element 
+TraceCompilerErrorMessages.PropertyFileElementNotSupportedPostfix=\ is not supported and was ignored
+TraceCompilerErrorMessages.PropertyFileElementMisplacedPrefix=Property file element 
+TraceCompilerErrorMessages.PropertyFileElementMisplacedPostfix=\ was unexpected
+TraceCompilerErrorMessages.PropertyFileAttributeInvalidPrefix=Property file attribute 
+TraceCompilerErrorMessages.PropertyFileAttributeInvalidPostfix=\ did not have a valid value
+TraceCompilerErrorMessages.RunOutOfGroupIDs=Run out of Group IDs. You can try to reuse unused group ids by deleting fixed id definition file.
+TraceCompilerErrorMessages.RunOutOfTraceIDs=Run out of Trace IDs. You can try to reuse unused trace ids by deleting fixed id definition file.
+TraceCompilerErrorMessages.VarArgListParameterFound=Parameters were not added to the trace because one of the variables is a variable argument list.
+TraceCompilerErrorMessages.InvalidUsageOfTraceStateGroupName=Invalid group name. TRACE_STATE group name is reserved for state traces only.
+TraceCompilerErrorMessages.InvalidUsageOfTracePerformanceGroupName=Invalid group name. TRACE_PERFORMANCE group name is reserved for performance traces only.
+TraceCompilerErrorMessages.LicenceFileError=Failed to read licence file. 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/package.html	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,3 @@
+<html><body>
+Contains the main control logic of TraceCompiler.
+</body></html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/plugin/PluginEngine.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,198 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Export plugin manager, which delegates calls to plug-ins
+*
+*/
+package com.nokia.tracecompiler.engine.plugin;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+
+import com.nokia.tracecompiler.engine.TraceCompilerEngineBase;
+import com.nokia.tracecompiler.engine.TraceCompilerEngineConfiguration;
+import com.nokia.tracecompiler.engine.TraceCompilerEngineErrorMessages;
+import com.nokia.tracecompiler.engine.TraceCompilerEngineGlobals;
+import com.nokia.tracecompiler.engine.TraceCompilerEngineErrorCodes.TraceCompilerErrorCode;
+import com.nokia.tracecompiler.model.TraceCompilerException;
+import com.nokia.tracecompiler.model.TraceModel;
+import com.nokia.tracecompiler.model.TraceObjectPropertyVerifier;
+import com.nokia.tracecompiler.plugin.TraceAPIPlugin;
+import com.nokia.tracecompiler.plugin.TraceCompilerExport;
+import com.nokia.tracecompiler.plugin.TraceCompilerPlugin;
+
+/**
+ * Plugin engine, which delegates calls to plug-ins
+ * 
+ */
+public final class PluginEngine extends TraceCompilerEngineBase {
+
+	/**
+	 * List of plug-ins
+	 */
+	private ArrayList<TraceCompilerPlugin> plugins = new ArrayList<TraceCompilerPlugin>();
+
+	/**
+	 * Property verifier
+	 */
+	private PluginTracePropertyVerifier verifier = new PluginTracePropertyVerifier(
+			this);
+
+	/**
+	 * Trace model
+	 */
+	private TraceModel model;
+
+	/**
+	 * Project open flag
+	 */
+	private boolean projectOpen;
+
+	/**
+	 * Sets the trace model. This is not set in constructor, since plug-in
+	 * engine is created before the model
+	 * 
+	 * @param model
+	 *            the trace model
+	 */
+	public void setModel(TraceModel model) {
+		this.model = model;
+	}
+
+	/**
+	 * Gets the started flag
+	 * 
+	 * @return true if started, false if not
+	 */
+	public boolean isProjectOpen() {
+		return projectOpen;
+	}
+
+	/**
+	 * Adds a plugin
+	 * 
+	 * @param plugin
+	 *            the plugin to be added
+	 */
+	public void add(TraceCompilerPlugin plugin) {
+		plugins.add(plugin);
+		if (plugin instanceof TraceAPIPlugin) {
+			TraceAPIPlugin api = (TraceAPIPlugin) plugin;
+			TraceAPIPluginManager manager = model
+					.getExtension(TraceAPIPluginManager.class);
+			manager.addFormatters(api.getFormatters());
+			manager.addParsers(api.getParsers());
+		}
+	}
+
+	/**
+	 * Removes a plugin
+	 * 
+	 * @param plugin
+	 *            the plugin to be removed
+	 */
+	public void remove(TraceCompilerPlugin plugin) {
+		// Formatters / parsers are not removed. Currently this is not a
+		// problem since plug-in's are removed only on shutdown
+		plugins.remove(plugin);
+	}
+
+	/**
+	 * Gets the property verifier interface
+	 * 
+	 * @return the verifier
+	 */
+	public TraceObjectPropertyVerifier getVerifier() {
+		return verifier;
+	}
+
+	/**
+	 * Checks if there are plug-ins
+	 * 
+	 * @return true if plug-ins exist
+	 */
+	public boolean hasPlugins() {
+		return !plugins.isEmpty();
+	}
+
+	/**
+	 * Gets the plug-ins
+	 * 
+	 * @return the plug-ins
+	 */
+	Iterator<TraceCompilerPlugin> getPlugins() {
+		return plugins.iterator();
+	}
+
+	/* (non-Javadoc)
+	 * @see com.nokia.tracecompiler.engine.TraceCompilerEngineBase#exportProject()
+	 */
+	@Override
+	public void exportProject() throws TraceCompilerException {
+		if (model.hasTraces()) {
+			for (TraceCompilerPlugin plugin : plugins) {
+				if (plugin instanceof TraceCompilerExport) {
+					try {
+						((TraceCompilerExport) plugin).exportTraceProject();
+					} catch (TraceCompilerException e) {
+						TraceCompilerEngineGlobals.getEvents().postError(e);
+							throw e;
+					}
+				}
+			}
+		} else {
+			TraceCompilerEngineGlobals.getEvents().postInfoMessage(
+					TraceCompilerEngineErrorMessages.getErrorMessage(
+							TraceCompilerErrorCode.NO_TRACES_TO_EXPORT, null),
+					null);
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engine.TraceCompilerEngine#projectOpened()
+	 */
+	@Override
+	public void projectOpened() {
+		if (!projectOpen) {
+			for (TraceCompilerPlugin plugin : plugins) {
+				plugin.traceProjectOpened(model);
+			}
+			projectOpen = true;
+		} else {
+			if (TraceCompilerEngineConfiguration.ASSERTIONS_ENABLED) {
+				TraceCompilerEngineGlobals.getEvents().postAssertionFailed(
+						"PluginEngine.traceProjectOpened", null); //$NON-NLS-1$
+			}
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engine.TraceCompilerEngine#projectClosing()
+	 */
+	@Override
+	public void projectClosed() {
+		if (projectOpen) {
+			for (TraceCompilerPlugin plugin : plugins) {
+				plugin.traceProjectClosed();
+			}
+			projectOpen = false;
+		}
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/plugin/PluginTracePropertyVerifier.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,336 @@
+/*
+* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Property verifier for trace objects
+*
+*/
+package com.nokia.tracecompiler.engine.plugin;
+
+import java.util.Iterator;
+
+import com.nokia.tracecompiler.engine.TraceCompilerEngineGlobals;
+import com.nokia.tracecompiler.engine.TraceCompilerEngineErrorCodes.RangeErrorParameters;
+import com.nokia.tracecompiler.engine.TraceCompilerEngineErrorCodes.TraceCompilerErrorCode;
+import com.nokia.tracecompiler.model.Trace;
+import com.nokia.tracecompiler.model.TraceCompilerException;
+import com.nokia.tracecompiler.model.TraceConstantTable;
+import com.nokia.tracecompiler.model.TraceConstantTableEntry;
+import com.nokia.tracecompiler.model.TraceGroup;
+import com.nokia.tracecompiler.model.TraceModel;
+import com.nokia.tracecompiler.model.TraceObjectPropertyVerifier;
+import com.nokia.tracecompiler.model.TraceParameter;
+import com.nokia.tracecompiler.plugin.TraceCompilerPlugin;
+import com.nokia.tracecompiler.source.SourceConstants;
+import com.nokia.tracecompiler.source.SourceUtils;
+import com.nokia.tracecompiler.project.*;
+
+/**
+ * Property verifier for trace objects
+ * 
+ */
+public final class PluginTracePropertyVerifier implements TraceObjectPropertyVerifier {
+
+	/**
+	 * Valid data character range start
+	 */
+	private static final int DATA_CHAR_START = 0x20; // CodForChk_Dis_Magic
+
+	/**
+	 * Valid data character range end
+	 */
+	private static final int DATA_CHAR_END = 0x7E; // CodForChk_Dis_Magic
+	/**
+	 * TAB character
+	 */
+	private static final int TAB =  0x9;  // CodForChk_Dis_Magic
+
+	/**
+	 * Plugin engine
+	 */
+	private PluginEngine pluginEngine;
+
+	/**
+	 * Constructor. Empty public constructor is needed by test class.
+	 */
+	public PluginTracePropertyVerifier() {
+		
+	}
+	
+	/**
+	 * Constructor
+	 * 
+	 * @param engine
+	 *            plug-in engine
+	 */
+	PluginTracePropertyVerifier(PluginEngine engine) {
+		this.pluginEngine = engine;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.model.TraceObjectPropertyVerifier#
+	 *      checkConstantProperties(com.nokia.tracecompiler.model.TraceConstantTable,
+	 *      com.nokia.tracecompiler.model.TraceConstantTableEntry, int,
+	 *      java.lang.String)
+	 */
+	public void checkConstantProperties(TraceConstantTable table,
+			TraceConstantTableEntry entry, int id, String value)
+			throws TraceCompilerException {
+		if (!SourceUtils.isValidName(value)) {
+			throw new TraceCompilerException(
+					TraceCompilerErrorCode.INVALID_CONSTANT_VALUE);
+		}
+		if (table != null) {
+			// If table exists, the value and ID must be unique
+			TraceConstantTableEntry old = table.findEntryByID(id);
+			if (old != null && old != entry) {
+				throw new TraceCompilerException(
+						TraceCompilerErrorCode.DUPLICATE_CONSTANT_ID);
+			}
+			old = table.findEntryByName(value);
+			if (old != null && old != entry) {
+				throw new TraceCompilerException(
+						TraceCompilerErrorCode.DUPLICATE_CONSTANT_VALUE);
+			}
+		}
+		Iterator<TraceCompilerPlugin> itr = pluginEngine.getPlugins();
+		while (itr.hasNext()) {
+			TraceCompilerPlugin provider = itr.next();
+			if (provider instanceof TraceObjectPropertyVerifier) {
+				((TraceObjectPropertyVerifier) provider)
+						.checkConstantProperties(table, entry, id, value);
+			}
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.model.TraceObjectPropertyVerifier#
+	 *      checkConstantTableProperties(com.nokia.tracecompiler.model.TraceModel,
+	 *      com.nokia.tracecompiler.model.TraceConstantTable, int,
+	 *      java.lang.String)
+	 */
+	public void checkConstantTableProperties(TraceModel model,
+			TraceConstantTable table, int id, String tableName)
+			throws TraceCompilerException {
+		if (!SourceUtils.isValidName(tableName)) {
+			 throw new TraceCompilerException(
+			 TraceCompilerErrorCode.INVALID_CONSTANT_TABLE_NAME, false);
+		}
+		TraceConstantTable old = model.findConstantTableByID(id);
+		if (old != null && old != table) {
+			throw new TraceCompilerException(
+					TraceCompilerErrorCode.DUPLICATE_CONSTANT_TABLE_ID);
+		}
+		old = model.findConstantTableByName(tableName);
+		if (old != null && old != table) {
+			throw new TraceCompilerException(
+					TraceCompilerErrorCode.DUPLICATE_CONSTANT_TABLE_NAME);
+		}
+		Iterator<TraceCompilerPlugin> itr = pluginEngine.getPlugins();
+		while (itr.hasNext()) {
+			TraceCompilerPlugin provider = itr.next();
+			if (provider instanceof TraceObjectPropertyVerifier) {
+				((TraceObjectPropertyVerifier) provider)
+						.checkConstantTableProperties(model, table, id,
+								tableName);
+			}
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.model.TraceObjectPropertyVerifier#
+	 *      checkTraceGroupProperties(com.nokia.tracecompiler.model.TraceModel,
+	 *      com.nokia.tracecompiler.model.TraceGroup, int, java.lang.String)
+	 */
+	public void checkTraceGroupProperties(TraceModel model, TraceGroup group,
+			int id, String name) throws TraceCompilerException {
+		if (!SourceUtils.isValidName(name)) {
+			throw new TraceCompilerException(
+					TraceCompilerErrorCode.INVALID_GROUP_NAME);
+		} else if ((id < 0) || (id > TraceCompilerEngineGlobals.MAX_GROUP_ID)) {
+			RangeErrorParameters params = new RangeErrorParameters();
+			params.start = 0;
+			params.end = TraceCompilerEngineGlobals.MAX_GROUP_ID;
+			params.isHex = true;
+			throw new TraceCompilerException(
+					TraceCompilerErrorCode.INVALID_GROUP_ID, params);
+		} else {
+			TraceGroup old = model.findGroupByID(id);
+			// this condition is to check that user defined group ids are unique.
+			// system defined group ids at present are not required to be unique.
+			if ((old != null) && (old != group) && (id >= GroupNames.USER_GROUP_ID_FIRST  ) && (id <= GroupNames.USER_GROUP_ID_LAST )) {
+				throw new TraceCompilerException(
+						TraceCompilerErrorCode.DUPLICATE_GROUP_ID);
+			}
+			old = model.findGroupByName(name);
+			if (old != null && old != group) {
+				throw new TraceCompilerException(
+						TraceCompilerErrorCode.DUPLICATE_GROUP_NAME);
+			}
+		}
+		Iterator<TraceCompilerPlugin> itr = pluginEngine.getPlugins();
+		while (itr.hasNext()) {
+			TraceCompilerPlugin provider = itr.next();
+			if (provider instanceof TraceObjectPropertyVerifier) {
+				((TraceObjectPropertyVerifier) provider)
+						.checkTraceGroupProperties(model, group, id, name);
+			}
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.model.TraceObjectPropertyVerifier#
+	 *      checkTraceModelProperties(com.nokia.tracecompiler.model.TraceModel,
+	 *      int, java.lang.String, java.lang.String)
+	 */
+	public void checkTraceModelProperties(TraceModel model, int id,
+			String name, String path) throws TraceCompilerException {
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.model.TraceObjectPropertyVerifier#
+	 *      checkTraceParameterProperties(com.nokia.tracecompiler.model.Trace,
+	 *      com.nokia.tracecompiler.model.TraceParameter, int, java.lang.String,
+	 *      java.lang.String)
+	 */
+	public void checkTraceParameterProperties(Trace owner,
+			TraceParameter parameter, int id, String name, String type)
+			throws TraceCompilerException {
+		if (!SourceUtils.isValidParameterName(name)) {
+			throw new TraceCompilerException(
+					TraceCompilerErrorCode.INVALID_PARAMETER_NAME);
+		}
+		TraceParameter old = owner.findParameterByID(id);
+		if (old != null && old != parameter) {
+			throw new TraceCompilerException(
+					TraceCompilerErrorCode.DUPLICATE_PARAMETER_ID);
+		}
+		old = owner.findParameterByName(name);
+		if (old != null && old != parameter) {
+			throw new TraceCompilerException(
+					TraceCompilerErrorCode.DUPLICATE_PARAMETER_NAME);
+		}
+		Iterator<TraceCompilerPlugin> itr = pluginEngine.getPlugins();
+		while (itr.hasNext()) {
+			TraceCompilerPlugin provider = itr.next();
+			if (provider instanceof TraceObjectPropertyVerifier) {
+				((TraceObjectPropertyVerifier) provider)
+						.checkTraceParameterProperties(owner, parameter, id,
+								name, type);
+			}
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.model.TraceObjectPropertyVerifier#
+	 *      checkTraceProperties(com.nokia.tracecompiler.model.TraceGroup,
+	 *      com.nokia.tracecompiler.model.Trace, int, java.lang.String,
+	 *      java.lang.String)
+	 */
+	public void checkTraceProperties(TraceGroup group, Trace trace, int id,
+			String name, String data) throws TraceCompilerException {
+		if (!isValidData(data)) {
+			throw new TraceCompilerException(
+					TraceCompilerErrorCode.INVALID_TRACE_DATA);
+		} else if (!SourceUtils.isValidName(name)) {
+			throw new TraceCompilerException(
+					TraceCompilerErrorCode.INVALID_TRACE_NAME);
+		} else if ((id < 0) || (id > TraceCompilerEngineGlobals.MAX_TRACE_ID)) {
+			RangeErrorParameters params = new RangeErrorParameters();
+			params.start = 0;
+			params.end = TraceCompilerEngineGlobals.MAX_TRACE_ID;
+			params.isHex = true;
+			throw new TraceCompilerException(
+					TraceCompilerErrorCode.INVALID_TRACE_ID, params);
+		} else {
+			// Verifies the trace name is globally unique
+			Trace old = TraceCompilerEngineGlobals.getTraceModel().findTraceByName(
+					name);
+			if (old != trace && old != null) {
+				throw new TraceCompilerException(
+						TraceCompilerErrorCode.DUPLICATE_TRACE_NAME);
+			}
+			if (group != null) {
+				// If group exists, the trace ID and text must be unique within
+				// the group
+				old = group.findTraceByID(id);
+				if (old != trace && old != null) {
+					// Trace ID's must be unique within group
+					throw new TraceCompilerException(
+							TraceCompilerErrorCode.DUPLICATE_TRACE_ID);
+				}
+			}
+		}
+		Iterator<TraceCompilerPlugin> itr = pluginEngine.getPlugins();
+		while (itr.hasNext()) {
+			TraceCompilerPlugin provider = itr.next();
+			if (provider instanceof TraceObjectPropertyVerifier) {
+				((TraceObjectPropertyVerifier) provider).checkTraceProperties(
+						group, trace, id, name, data);
+			}
+		}
+	}
+
+	/**
+	 * Checks the validity of data
+	 * 
+	 * @param data
+	 *            the data
+	 * @return true if valid
+	 */
+	private boolean isValidData(String data) {
+		boolean retval;
+		if (data != null) {
+			retval = true;
+			for (int i = 0; i < data.length() && retval; i++) {
+				char c = data.charAt(i);
+				// Unescaped quotes are not allowed
+				if (c == SourceConstants.QUOTE_CHAR
+						&& (i == 0 || data.charAt(i - 1) != SourceConstants.BACKSLASH_CHAR)) {
+					retval = false;
+				} else {
+					retval = isValidDataChar(c);
+				}
+			}
+		} else {
+			retval = false;
+		}
+		return retval;
+	}
+
+	/**
+	 * Checks data character validity
+	 * 
+	 * @param c
+	 *            character
+	 * @return true if valid
+	 */
+	private boolean isValidDataChar(char c) {
+		// Special and extended characters are not allowed, except TAB
+		return c >= DATA_CHAR_START && c <= DATA_CHAR_END || c == TAB;
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/plugin/TraceAPIPluginManager.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,52 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Trace API plug-in manager interface
+*
+*/
+package com.nokia.tracecompiler.engine.plugin;
+
+import com.nokia.tracecompiler.model.TraceModelExtension;
+import com.nokia.tracecompiler.plugin.TraceAPIFormatter;
+import com.nokia.tracecompiler.plugin.TraceAPIParser;
+
+/**
+ * Trace API plug-in manager interface
+ * 
+ */
+public interface TraceAPIPluginManager extends TraceModelExtension {
+
+	/**
+	 * Adds the formatter API's from the plug-in
+	 * 
+	 * @param formatters
+	 *            the formatters
+	 */
+	public void addFormatters(TraceAPIFormatter[] formatters);
+
+	/**
+	 * Adds the parser API's from the plug-in
+	 * 
+	 * @param parsers
+	 *            the parsers
+	 */
+	public void addParsers(TraceAPIParser[] parsers);
+
+	/**
+	 * Sets the default API to the model.
+	 */
+	public void createDefaultAPI();
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/plugin/package.html	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,3 @@
+<html><body>
+Plug-in manager and related classes
+</body></html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/project/Messages.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,63 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Localization for project package
+*
+*/
+package com.nokia.tracecompiler.engine.project;
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+/**
+ * Localization for project package
+ * 
+ */
+class Messages {
+
+	/**
+	 * Bundle name
+	 */
+	private static final String BUNDLE_NAME = "com.nokia.tracecompiler.engine.project.messages"; //$NON-NLS-1$
+
+	/**
+	 * Bundle
+	 */
+	private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
+			.getBundle(BUNDLE_NAME);
+
+	/**
+	 * Prevents construction
+	 */
+	private Messages() {
+	}
+
+	/**
+	 * Gets localized string based on key
+	 * 
+	 * @param key
+	 *            the resource key
+	 * @return the localized resource
+	 */
+	public static String getString(String key) {
+		String value;
+		try {
+			value = RESOURCE_BUNDLE.getString(key);
+		} catch (MissingResourceException e) {
+			value = '!' + key + '!';
+		}
+		return value;
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/project/ProjectConstants.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,168 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Constant values related to project files
+*
+*/
+package com.nokia.tracecompiler.engine.project;
+
+/**
+ * Constant values related to project files
+ * 
+ */
+public interface ProjectConstants {
+
+	/**
+	 * Title of the cache file
+	 */
+	String FIXED_ID_DEFINITION_FILE_TITLE = Messages
+			.getString("ProjectConstants.FixedIdDefinitionFileTitle"); //$NON-NLS-1$
+
+	/**
+	 * Cache file extension
+	 */
+	String CACHE_FILE_NAME = "tracecompiler.cache"; //$NON-NLS-1$
+
+	/**
+	 * Fixed ID file extension
+	 */
+	String FIXED_ID_DEFINITIONS_FILE_NAME = "fixed_id.definitions"; //$NON-NLS-1$
+
+	/**
+	 * Extension for the file within zip file
+	 */
+	String FILE_EXTENSION = ".xml"; //$NON-NLS-1$
+
+	/**
+	 * Less than escape sequence
+	 */
+	String LT = "&lt;"; //$NON-NLS-1$
+
+	/**
+	 * Greater than escape sequence
+	 */
+	String GT = "&gt;"; //$NON-NLS-1$
+
+	/**
+	 * Indent
+	 */
+	String INDENT = "  "; //$NON-NLS-1$
+
+	/**
+	 * End a tag
+	 */
+	String END_TAG = ">"; //$NON-NLS-1$
+
+	/**
+	 * Start of end tag
+	 */
+	String START_END_TAG = "</"; //$NON-NLS-1$
+
+	/**
+	 * End tag with line feed
+	 */
+	String END_TAG_LF = ">\r\n"; //$NON-NLS-1$
+
+	/**
+	 * Start a tag
+	 */
+	String START_TAG = "<"; //$NON-NLS-1$
+
+	/**
+	 * Extension tag
+	 */
+	String EXTENSION_TAG = "extension"; //$NON-NLS-1$
+
+	/**
+	 * Data tag
+	 */
+	String DATA_TAG = "data"; //$NON-NLS-1$
+
+	/**
+	 * Name tag
+	 */
+	String NAME_TAG = "name"; //$NON-NLS-1$
+
+	/**
+	 * Object ID tag
+	 */
+	String ID_TAG = "id"; //$NON-NLS-1$
+
+	/**
+	 * Constant table entry tag
+	 */
+	String CONSTANT_TABLE_ENTRY_TAG = "entry"; //$NON-NLS-1$
+
+	/**
+	 * Parameter tag
+	 */
+	String PARAMETER_TAG = "parameter"; //$NON-NLS-1$
+
+	/**
+	 * Trace text tag
+	 */
+	String TRACE_TEXT_TAG = "text"; //$NON-NLS-1$
+
+	/**
+	 * Trace tag
+	 */
+	String TRACE_TAG = "trace"; //$NON-NLS-1$
+
+	/**
+	 * Parameter type tag
+	 */
+	String PARAMETER_TYPE_TAG = "type"; //$NON-NLS-1$
+
+	/**
+	 * Constant table tag
+	 */
+	String CONSTANT_TABLE_TAG = "table"; //$NON-NLS-1$
+
+	/**
+	 * Group tag
+	 */
+	String GROUP_TAG = "group"; //$NON-NLS-1$
+
+	/**
+	 * Model tag
+	 */
+	String MODEL_TAG = "model"; //$NON-NLS-1$
+
+	/**
+	 * Location tag
+	 */
+	String LOCATION_TAG = "location"; //$NON-NLS-1$
+
+	/**
+	 * File tag
+	 */
+	String LOCATION_FILE_TAG = "file"; //$NON-NLS-1$
+
+	/**
+	 * Line tag
+	 */
+	String LOCATION_LINE_TAG = "line"; //$NON-NLS-1$
+
+	/**
+	 * Class name tag
+	 */
+	String LOCATION_CLASS_NAME_TAG = "class"; //$NON-NLS-1$
+
+	/**
+	 * Function name tag
+	 */
+	String LOCATION_FUNCTION_NAME_TAG = "function"; //$NON-NLS-1$
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/project/ProjectEngine.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,294 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Trace project file manager
+*
+*/
+package com.nokia.tracecompiler.engine.project;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.util.Enumeration;
+
+import com.nokia.tracecompiler.engine.TraceCompilerEngineBase;
+import com.nokia.tracecompiler.engine.TraceCompilerEngineErrorCodes.TraceCompilerErrorCode;
+import com.nokia.tracecompiler.engine.plugin.TraceAPIPluginManager;
+import com.nokia.tracecompiler.file.FileUtils;
+import com.nokia.tracecompiler.model.TraceCompilerException;
+import com.nokia.tracecompiler.model.TraceModel;
+import com.nokia.tracecompiler.project.GroupNames;
+import com.nokia.tracecompiler.project.ProjectUtils;
+
+/**
+ * Trace project engine
+ * 
+ */
+public final class ProjectEngine extends TraceCompilerEngineBase {
+
+	/**
+	 * Parameters for create project
+	 */
+	private class CreateProjectParameters {
+
+		/**
+		 * Trace project path
+		 */
+		String traceProjectPath;
+
+		/**
+		 * Trace project name
+		 */
+		String traceProjectName;
+
+		/**
+		 * Trace project ID
+		 */
+		int traceProjectID;
+
+	}
+
+	/**
+	 * Default project ID
+	 */
+	private static final int DEFAULT_PROJECT_ID = 0x0; // CodForChk_Dis_Magic
+
+	/**
+	 * Trace model
+	 */
+	private TraceModel model;
+
+	/**
+	 * Trace directory name
+	 */
+	public static String traceFolderName;
+
+	/**
+	 * Constructor
+	 * 
+	 * @param model
+	 *            the trace model
+	 */
+	public ProjectEngine(TraceModel model) {
+		this.model = model;
+	}
+
+	/**
+	 * Opens trace project
+	 * 
+	 * @param projectPath
+	 *            the path to the project to be opened
+	 * @param modelName
+	 *            the name for the model or null to use directory name
+	 * @throws TraceCompilerException
+	 *             if opening fails
+	 */
+	public void openTraceProject(String projectPath, String modelName)
+			throws TraceCompilerException {
+		if (projectPath != null) {
+			CreateProjectParameters parameters = createParameters(projectPath,
+					modelName);
+
+			// Create empty project
+			if (model.getExtension(TraceCompilerProject.class) == null) {
+				createEmptyProjectFile(parameters);
+			}
+		} else {
+			
+			// If fileName is null, there's no open source files. In
+			// that the project cannot be created
+			throw new TraceCompilerException(
+					TraceCompilerErrorCode.SOURCE_NOT_OPEN);
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engine.TraceCompilerEngine#projectOpened()
+	 */
+	@Override
+	public void projectOpened() {
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engine.TraceCompilerEngine#projectClosed()
+	 */
+	@Override
+	public void projectClosed() {
+		model.removeExtensions(TraceCompilerProject.class);
+		model.removeExtensions(TraceIDCache.class);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engine.TraceCompilerEngine#exportProject()
+	 */
+	@Override
+	public void exportProject() {
+		try {
+
+			// The fixed id definitions file is updated even there are no traces
+			// in case that old fixed id definitions file exist
+			syncFixedIdDefinitionsFile();
+		} catch (TraceCompilerException e) {
+		}
+	}
+
+	/**
+	 * Updated fixed id definitions file
+	 * 
+	 * @throws TraceCompilerException
+	 *             if update fails
+	 */
+	private void syncFixedIdDefinitionsFile() throws TraceCompilerException {
+		TraceIDCache cache = model.getExtension(TraceIDCache.class);
+		// Create trace Id cache if it does not exist
+		if (cache == null) {
+			String path = ProjectUtils.getLocationForFile(model,
+					ProjectEngine.traceFolderName,
+					ProjectConstants.FIXED_ID_DEFINITIONS_FILE_NAME, false);
+			if (path != null) {
+				cache = new TraceIDCache(new File(path).getParent());
+				model.addExtension(cache);
+			}
+		}
+		if (cache != null) {
+			File cacheFile = new File(cache.getAbsolutePath());
+
+			// The fixed id definitions file is updated in case that there are
+			// traces in model
+			if (model.hasTraces()) {
+				// Try to save Ids to fixed Id definition file
+				try {
+					SortedProperties ids = new SortedProperties();
+					// Save Ids from model to fixed Id properties
+					model.saveIDs(ids);
+
+					// If there are some fixed Ids in that are not used anymore,
+					// keep also those Ids in defininiton file, but mark those
+					// ids as obsolete
+					ids = handleObsoleteIds(ids);
+
+					// Rewrites the trace Id cache file
+					OutputStream fos = FileUtils.createOutputStream(cacheFile);
+					ids.store(fos,
+							ProjectConstants.FIXED_ID_DEFINITION_FILE_TITLE);
+					fos.close();
+					cache.postFileWrittenEvent(cache.getAbsolutePath());
+				} catch (IOException e) {
+					cacheFile.delete();
+				}
+			}
+		}
+	}
+
+	/**
+	 * Handle obsolete Ids
+	 * 
+	 * @param ids
+	 *            Ids
+	 */
+	private SortedProperties handleObsoleteIds(SortedProperties ids) {
+		SortedProperties fixedIds = model.getFixedIds();
+		if (fixedIds != null) {
+			Enumeration<Object> fixedIdKeys = fixedIds.keys();
+			while (fixedIdKeys.hasMoreElements()) {
+				String fixedIdKey = (String) fixedIdKeys.nextElement();
+				if (!ids.containsKey(fixedIdKey)) {
+					String value = fixedIds.getProperty(fixedIdKey);
+					boolean markAsObsolete = true;
+					// In case of groups we only mark user defined
+					// groups as obsolete
+					if (fixedIdKey.startsWith(model.GROUP_PROPERTY_PREFIX)) {
+						int valueAsInt = 0;
+						try {
+							valueAsInt = Integer.decode(value).intValue();
+						} catch (NumberFormatException e) {
+							// Corrupted.
+							valueAsInt = 0;
+						}
+						if (valueAsInt < GroupNames.USER_GROUP_ID_FIRST) {
+							markAsObsolete = false;
+						}
+					}
+					if (markAsObsolete) {
+						// If OBSOLETE tag text already exit, do not
+						// add that again
+						if (fixedIdKey
+								.startsWith(model.OBSOLETE_PROPERTY_PREFIX)) {
+							ids.setProperty(fixedIdKey, value);
+						} else {
+							ids.setProperty(model.OBSOLETE_PROPERTY_PREFIX
+									+ fixedIdKey, value);
+						}
+					}
+				}
+			}
+		}
+		return ids;
+	}
+
+	/**
+	 * Creates the parameters for new project
+	 * 
+	 * @param projectPath
+	 *            the project path
+	 * @param projectName
+	 *            the name for the project
+	 * @return the parameters
+	 */
+	private CreateProjectParameters createParameters(String projectPath,
+			String projectName) {
+		CreateProjectParameters queryData = new CreateProjectParameters();
+		queryData.traceProjectPath = projectPath + File.separator
+				+ ProjectEngine.traceFolderName;
+		queryData.traceProjectName = projectName;
+		queryData.traceProjectID = DEFAULT_PROJECT_ID;
+		return queryData;
+	}
+
+	/**
+	 * Creates the project file from query results
+	 * 
+	 * @param queryData
+	 *            the query result
+	 * @throws TraceCompilerException 
+	 */
+	private void createEmptyProjectFile(CreateProjectParameters queryData) throws TraceCompilerException {
+		model.setName(queryData.traceProjectName);
+		model.setID(queryData.traceProjectID);
+		String componentName = model.getName();
+		TraceCompilerProject file = new TraceCompilerProject(
+				queryData.traceProjectPath, componentName);
+		createAPI(file);
+	}
+
+	/**
+	 * Creates the project API
+	 * 
+	 * @param file
+	 *            the project file
+	 */
+	private void createAPI(TraceCompilerProject file) {
+		model.addExtension(file);
+		TraceAPIPluginManager plugin = model
+				.getExtension(TraceAPIPluginManager.class);
+		plugin.createDefaultAPI();
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/project/SortedProperties.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,198 @@
+/*
+* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Sorted properties
+*
+*/
+package com.nokia.tracecompiler.engine.project;
+
+import java.io.BufferedWriter;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.io.OutputStreamWriter;
+import java.util.Collections;
+import java.util.Enumeration;
+import java.util.Properties;
+import java.util.Vector;
+
+import com.nokia.tracecompiler.engine.TraceCompilerEngineGlobals;
+
+/**
+ * Sorted properties
+ * 
+ */
+public final class SortedProperties extends Properties {
+
+	/**
+	 * UID
+	 */
+	private static final long serialVersionUID = 746540919659257261L;
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.util.Hashtable#keys()
+	 */
+	@Override
+	@SuppressWarnings("unchecked")
+	public synchronized Enumeration<Object> keys() {
+		Enumeration<Object> keysEnum = super.keys();
+		Vector keyList = new Vector();
+		while (keysEnum.hasMoreElements()) {
+			keyList.add(keysEnum.nextElement());
+		}
+		Collections.sort(keyList);
+		return keyList.elements();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.util.Properties#store(java.io.OutputStream, java.lang.String)
+	 */
+	@Override
+	public synchronized void store(OutputStream out, String comments)
+			throws IOException {
+		BufferedWriter awriter;
+		awriter = new BufferedWriter(new OutputStreamWriter(out, "8859_1")); //$NON-NLS-1$
+		String licence = TraceCompilerEngineGlobals.getDefaultLicence(false);
+		if (licence != null) {
+			out.write(licence.getBytes());
+		}
+		if (comments != null)
+			writeln(awriter, "#" + comments); //$NON-NLS-1$
+
+		for (Enumeration<Object> e = keys(); e.hasMoreElements();) {
+			String key = (String) e.nextElement();
+			String val = (String) get(key);
+			key = saveConvert(key, true);
+
+			/*
+			 * No need to escape embedded and trailing spaces for value, hence
+			 * pass false to flag.
+			 */
+			val = saveConvert(val, false);
+			writeln(awriter, key + "=" + val); //$NON-NLS-1$
+		}
+		awriter.flush();
+	}
+
+	/**
+	 * Converts unicodes to encoded &#92;uxxxx and escapes special characters
+	 * with a preceding slash
+	 * 
+	 * @param theString
+	 *            the string to be convert
+	 * @param escapeSpace
+	 *            the escape space flag
+	 * @return the coverted string
+	 */
+	private String saveConvert(String theString, boolean escapeSpace) { // CodForChk_Dis_ComplexFunc
+		int len = theString.length();
+		int bufLen = len * 2; // CodForChk_Dis_Magic
+		if (bufLen < 0) {
+			bufLen = Integer.MAX_VALUE;
+		}
+		StringBuffer outBuffer = new StringBuffer(bufLen);
+
+		for (int x = 0; x < len; x++) {
+			char aChar = theString.charAt(x);
+			// Handle common case first, selecting largest block that
+			// avoids the specials below
+			if ((aChar > 61) && (aChar < 127)) { // CodForChk_Dis_Magic
+				if (aChar == '\\') {
+					outBuffer.append('\\');
+					outBuffer.append('\\');
+					continue;
+				}
+				outBuffer.append(aChar);
+				continue;
+			}
+			switch (aChar) {
+			case ' ':
+				if (x == 0 || escapeSpace)
+					outBuffer.append('\\');
+				outBuffer.append(' ');
+				break;
+			case '\t':
+				outBuffer.append('\\');
+				outBuffer.append('t');
+				break;
+			case '\n':
+				outBuffer.append('\\');
+				outBuffer.append('n');
+				break;
+			case '\r':
+				outBuffer.append('\\');
+				outBuffer.append('r');
+				break;
+			case '\f':
+				outBuffer.append('\\');
+				outBuffer.append('f');
+				break;
+			case '=': // Fall through
+			case ':': // Fall through
+			case '#': // Fall through
+			case '!':
+				outBuffer.append('\\');
+				outBuffer.append(aChar);
+				break;
+			default:
+				if ((aChar < 0x0020) || (aChar > 0x007e)) { // CodForChk_Dis_Magic
+					outBuffer.append('\\');
+					outBuffer.append('u');
+					outBuffer.append(toHex((aChar >> 12) & 0xF)); // CodForChk_Dis_Magic
+					outBuffer.append(toHex((aChar >> 8) & 0xF)); // CodForChk_Dis_Magic
+					outBuffer.append(toHex((aChar >> 4) & 0xF)); // CodForChk_Dis_Magic
+					outBuffer.append(toHex(aChar & 0xF)); // CodForChk_Dis_Magic
+				} else {
+					outBuffer.append(aChar);
+				}
+			}
+		}
+		return outBuffer.toString();
+	}
+
+	/**
+	 * Convert a nibble to a hex character
+	 * 
+	 * @param nibble
+	 *            the nibble to convert
+	 * @return the hex character
+	 */
+	private static char toHex(int nibble) {
+		return hexDigit[(nibble & 0xF)]; // CodForChk_Dis_Magic
+	}
+
+	/**
+	 * A table of hex digits
+	 */
+	private static final char[] hexDigit = { '0', '1', '2', '3', '4', '5', '6',
+			'7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' };
+
+	/**
+	 * Write line
+	 * 
+	 * @param bw
+	 *            the buffered writer that used to write
+	 * @param s
+	 *            the string what to write
+	 * @throws IOException
+	 */
+	private static void writeln(BufferedWriter bw, String s) throws IOException {
+		bw.write(s);
+		bw.newLine();
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/project/TraceCompilerProject.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,77 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* TraceCompiler project file properties
+*
+*/
+package com.nokia.tracecompiler.engine.project;
+
+import com.nokia.tracecompiler.project.TraceProjectFile;
+
+/**
+ * TraceCompiler project file properties
+ * 
+ */
+final class TraceCompilerProject extends TraceProjectFile {
+
+	/**
+	 * Title shown in UI
+	 */
+	private static final String TITLE = Messages
+			.getString("TraceCompilerProject.Title"); //$NON-NLS-1$
+
+	/**
+	 * Constructor
+	 * 
+	 * @param absolutePath
+	 *            the path to the file, including file name
+	 */
+	TraceCompilerProject(String absolutePath) {
+		super(absolutePath, true);
+	}
+
+	/**
+	 * Constructor
+	 * 
+	 * @param path
+	 *            the path to the file
+	 * @param name
+	 *            the file name
+	 */
+	TraceCompilerProject(String path, String name) {
+		super(path, name);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.project.TraceProjectFile#getFileExtension()
+	 */
+	@Override
+	protected String getFileExtension() {
+		return null;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.project.TraceProjectFile#getTitle()
+	 */
+	@Override
+	public String getTitle() {
+		return TITLE;
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/project/TraceIDCache.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,65 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Cache file for storing trace and group identifiers
+*
+*/
+package com.nokia.tracecompiler.engine.project;
+
+import com.nokia.tracecompiler.project.TraceProjectFile;
+
+/**
+ * Cache file for storing trace and group identifiers
+ * 
+ */
+public final class TraceIDCache extends TraceProjectFile {
+
+	/**
+	 * Title shown in UI
+	 */
+	private static final String TITLE = Messages
+			.getString("TraceIDCache.Title"); //$NON-NLS-1$
+
+	/**
+	 * Constructor
+	 * 
+	 * @param cachePath
+	 *            path to the cache file
+	 */
+	public TraceIDCache(String cachePath) {
+		super(cachePath, ""); //$NON-NLS-1$
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.project.TraceProjectFile#getFileExtension()
+	 */
+	@Override
+	protected String getFileExtension() {
+		return ProjectConstants.FIXED_ID_DEFINITIONS_FILE_NAME;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.project.TraceProjectFile#getTitle()
+	 */
+	@Override
+	public String getTitle() {
+		return TITLE;
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/project/messages.properties	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,5 @@
+ProjectFileParser.SourceFileDoesNotExist=Source file referenced by traces does not exist
+ProjectFileParser.ErrorWhileProcessing=An error occurred while processing the project file
+TraceCompilerProject.Title=Project File
+TraceIDCache.Title=Trace ID Cache File
+ProjectConstants.FixedIdDefinitionFileTitle=Fixed group and trace id definitions. If this file is removed, the identifiers are rebuilt.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/project/package.html	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,3 @@
+<html><body>
+TraceCompiler project file management
+</body></html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/propertyfile/DocumentElementWrapper.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,64 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Extension wrapper for XML document element
+*
+*/
+package com.nokia.tracecompiler.engine.propertyfile;
+
+import org.w3c.dom.Element;
+
+import com.nokia.tracecompiler.model.TraceModelExtension;
+import com.nokia.tracecompiler.model.TraceObject;
+
+/**
+ * Extension wrapper for XML document element
+ * 
+ */
+final class DocumentElementWrapper implements TraceModelExtension {
+
+	/**
+	 * Owner
+	 */
+	private TraceObject owner;
+
+	/**
+	 * Constructor
+	 * 
+	 * @param element
+	 *            the document element
+	 */
+	DocumentElementWrapper(Element element) {
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.model.TraceModelExtension#getOwner()
+	 */
+	public TraceObject getOwner() {
+		return owner;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.model.TraceModelExtension#setOwner(com.nokia.tracecompiler.model.TraceObject)
+	 */
+	public void setOwner(TraceObject owner) {
+		this.owner = owner;
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/propertyfile/EnumElementParser.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,70 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Parser for enum element
+*
+*/
+package com.nokia.tracecompiler.engine.propertyfile;
+
+import org.w3c.dom.Element;
+
+import com.nokia.tracecompiler.engine.TraceCompilerEngineGlobals;
+import com.nokia.tracecompiler.model.TraceCompilerException;
+import com.nokia.tracecompiler.model.TraceConstantTable;
+import com.nokia.tracecompiler.model.TraceModel;
+import com.nokia.tracecompiler.model.TraceModelExtension;
+
+/**
+ * Parser for enum element
+ * 
+ */
+final class EnumElementParser implements PropertyFileElementParser {
+
+	/**
+	 * Property file parser
+	 */
+	private final PropertyFileParser propertyFileParser;
+
+	/**
+	 * Constructor
+	 * 
+	 * @param propertyFileParser
+	 *            the parser
+	 */
+	EnumElementParser(PropertyFileParser propertyFileParser) {
+		this.propertyFileParser = propertyFileParser;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engine.propertyfile.PropertyFileElementParser#
+	 *      parse(java.lang.Object, org.w3c.dom.Element)
+	 */
+	public void parse(Object owner, Element element)
+			throws TraceCompilerException {
+		TraceModel model = TraceCompilerEngineGlobals.getTraceModel();
+		String name = element
+				.getAttribute(PropertyFileConstants.NAME_ATTRIBUTE);
+		int id = model.getNextConstantTableID();
+		model.getVerifier().checkConstantTableProperties(model, null, id, name);
+		// Document element reference is stored to the model
+		TraceModelExtension[] exts = new TraceModelExtension[] { new DocumentElementWrapper(
+				element) };
+		TraceConstantTable table = model.getFactory().createConstantTable(id,
+				name, exts);
+		propertyFileParser.parseChildren(table, element);
+	}
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/propertyfile/FileElementParser.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,65 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* FIle element parser
+*
+*/
+package com.nokia.tracecompiler.engine.propertyfile;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+
+import org.w3c.dom.Element;
+
+import com.nokia.tracecompiler.engine.TraceCompilerEngineGlobals;
+import com.nokia.tracecompiler.engine.project.ProjectEngine;
+import com.nokia.tracecompiler.engine.source.SourceEngine;
+import com.nokia.tracecompiler.model.TraceCompilerException;
+
+/**
+ * File element parser
+ * 
+ */
+final class FileElementParser implements PropertyFileElementParser {
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engine.propertyfile.PropertyFileElementParser#
+	 *      parse(java.lang.Object, org.w3c.dom.Element)
+	 */
+	public void parse(Object owner, Element element)
+			throws TraceCompilerException {
+		String filePath = element.getTextContent();
+		SourceEngine sourceEngine = TraceCompilerEngineGlobals.getSourceEngine();
+		ArrayList<String> list = sourceEngine.getNonSourceFiles();
+
+		String projectPath = TraceCompilerEngineGlobals.getProjectPath();
+
+		File file = new File(projectPath + File.separatorChar
+				+ ProjectEngine.traceFolderName + File.separatorChar + filePath);
+
+		try {
+			filePath = file.getCanonicalPath();
+		} catch (IOException e) {
+			e.printStackTrace();
+		}
+
+		if (!list.contains(filePath)) {
+			sourceEngine.addNonSourceFile(filePath);
+		}
+	}
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/propertyfile/Messages.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,63 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Localization for property file package
+*
+*/
+package com.nokia.tracecompiler.engine.propertyfile;
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+/**
+ * Localization for property file package
+ * 
+ */
+class Messages {
+
+	/**
+	 * Bundle name
+	 */
+	private static final String BUNDLE_NAME = "com.nokia.tracecompiler.engine.propertyfile.messages"; //$NON-NLS-1$
+
+	/**
+	 * Bundle
+	 */
+	private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
+			.getBundle(BUNDLE_NAME);
+
+	/**
+	 * Prevents construction
+	 */
+	private Messages() {
+	}
+
+	/**
+	 * Gets localized string based on key
+	 * 
+	 * @param key
+	 *            the resource key
+	 * @return the localized resource
+	 */
+	public static String getString(String key) {
+		String value;
+		try {
+			value = RESOURCE_BUNDLE.getString(key);
+		} catch (MissingResourceException e) {
+			value = '!' + key + '!';
+		}
+		return value;
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/propertyfile/PropertyFileConstants.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,118 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Constants for property file engine
+*
+*/
+package com.nokia.tracecompiler.engine.propertyfile;
+
+
+/**
+ * Constants for property file engine
+ * 
+ */
+public interface PropertyFileConstants {
+
+	/**
+	 * File name
+	 */
+	String PROPERTY_FILE_NAME = "trace.properties"; //$NON-NLS-1$
+
+	/**
+	 * Number of backup files to keep
+	 */
+	int BACKUP_COUNT = 10; // CodForChk_Dis_Magic
+
+	/**
+	 * Last of the backup headers
+	 */
+	String LAST_BACKUP = "9.properties.bak"; //$NON-NLS-1$
+
+	/**
+	 * Backup extension
+	 */
+	String BACKUP_EXTENSION = ".bak"; //$NON-NLS-1$
+
+	/**
+	 * Root element name
+	 */
+	String ROOT_ELEMENT = "trace_properties"; //$NON-NLS-1$
+
+	/**
+	 * Enum element name
+	 */
+	String ENUM_ELEMENT = "enum"; //$NON-NLS-1$
+
+	/**
+	 * Struct element name
+	 */
+	String STRUCT_ELEMENT = "struct"; //$NON-NLS-1$
+
+	/**
+	 * Component element name
+	 */
+	String COMPONENT_ELEMENT = "component"; //$NON-NLS-1$
+
+	/**
+	 * Component element name
+	 */
+	String GROUP_ELEMENT = "group"; //$NON-NLS-1$
+
+	/**
+	 * Trace element name
+	 */
+	String TRACE_ELEMENT = "trace"; //$NON-NLS-1$
+
+	/**
+	 * Value element name
+	 */
+	String VALUE_ELEMENT = "value"; //$NON-NLS-1$
+
+	/**
+	 * Property element name
+	 */
+	String PROPERTY_ELEMENT = "property"; //$NON-NLS-1$
+
+	/**
+	 * File element name
+	 */
+	String FILE_ELEMENT = "file"; //$NON-NLS-1$
+	
+	/**
+	 * Name attribute
+	 */
+	String NAME_ATTRIBUTE = "name"; //$NON-NLS-1$
+
+	/**
+	 * Format attribute
+	 */
+	String FORMAT_ATTRIBUTE = "format"; //$NON-NLS-1$
+
+	/**
+	 * ID attribute
+	 */
+	String ID_ATTRIBUTE = "id"; //$NON-NLS-1$
+
+	/**
+	 * Type attribute
+	 */
+	String TYPE_ATTRIBUTE = "type"; //$NON-NLS-1$
+
+	/**
+	 * Size attribute
+	 */
+	String SIZE_ATTRIBUTE = "size"; //$NON-NLS-1$
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/propertyfile/PropertyFileElementParser.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,42 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Property file element parser interface
+*
+*/
+package com.nokia.tracecompiler.engine.propertyfile;
+
+import org.w3c.dom.Element;
+
+import com.nokia.tracecompiler.model.TraceCompilerException;
+
+/**
+ * Property file element parser interface
+ * 
+ */
+interface PropertyFileElementParser {
+
+	/**
+	 * Parses the given element
+	 * 
+	 * @param owner
+	 *            the owning object
+	 * @param element
+	 *            the element to be parsed
+	 * @throws TraceCompilerException
+	 *             if parser fails
+	 */
+	void parse(Object owner, Element element) throws TraceCompilerException;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/propertyfile/PropertyFileEngine.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,192 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Property file management engine
+*
+*/
+package com.nokia.tracecompiler.engine.propertyfile;
+
+import java.io.File;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+
+import com.nokia.tracecompiler.engine.TraceCompilerEngineBase;
+import com.nokia.tracecompiler.engine.TraceCompilerEngineGlobals;
+import com.nokia.tracecompiler.engine.project.ProjectEngine;
+import com.nokia.tracecompiler.file.FileUtils;
+import com.nokia.tracecompiler.model.TraceCompilerException;
+import com.nokia.tracecompiler.model.TraceModel;
+import com.nokia.tracecompiler.project.ProjectUtils;
+import com.nokia.tracecompiler.source.SourceConstants;
+
+/**
+ * Property file management engine
+ * 
+ */
+public final class PropertyFileEngine extends TraceCompilerEngineBase {
+
+	/**
+	 * Trace model
+	 */
+	private TraceModel model;
+
+	/**
+	 * Constructor
+	 * 
+	 * @param model
+	 *            the trace model
+	 */
+	public PropertyFileEngine(TraceModel model) {
+		this.model = model;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engine.TraceCompilerEngine#projectOpened()
+	 */
+	@Override
+	public void projectOpened() throws TraceCompilerException {
+		TracePropertyFile propertyFile = model
+				.getExtension(TracePropertyFile.class);
+		if (propertyFile == null) {
+			String fileName = null;
+			try {
+				fileName = ProjectUtils.getLocationForFile(model,
+						ProjectEngine.traceFolderName,
+						PropertyFileConstants.PROPERTY_FILE_NAME, false);
+			} catch (TraceCompilerException e) {
+				// Model should always be open when traceProjectOpened is
+				// called
+			}
+			if (fileName != null) {
+				propertyFile = parsePropertyFile(fileName);
+			}
+		}
+		if (propertyFile == null) {
+			String msg = Messages
+					.getString("PropertyFileEngine.FailedToAttachFile"); //$NON-NLS-1$
+			TraceCompilerEngineGlobals.getEvents().postErrorMessage(msg, null, true);
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engine.TraceCompilerEngine#projectClosing()
+	 */
+	@Override
+	public void projectClosed() {
+		model.removeExtensions(TracePropertyFile.class);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engine.TraceCompilerEngine#exportProject()
+	 */
+	@Override
+	public void exportProject() {
+	}
+
+	/**
+	 * Parses the property file
+	 * 
+	 * @param fileName
+	 *            the file path
+	 * @return the property file
+	 */
+	private TracePropertyFile parsePropertyFile(String fileName) {
+		DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+		factory.setValidating(false);
+		DocumentBuilder builder;
+		TracePropertyFile propertyFile = null;
+		try {
+			builder = factory.newDocumentBuilder();
+			File file = new File(fileName);
+			if (file.exists()) {
+				try {
+					PropertyFileParser parser = new PropertyFileParser(model,
+							fileName, builder);
+					parser.parse();
+					propertyFile = new TracePropertyFile(file.getParent(),
+							parser.getDocument());
+				} catch (TraceCompilerException e) {
+					// Problem parsing document -> Backup and create new
+					TraceCompilerEngineGlobals.getEvents().postError(e);
+					createBackup(fileName);
+				}
+			}
+			if (propertyFile == null) {
+				propertyFile = new TracePropertyFile(file.getParent(), builder
+						.newDocument());
+			}
+			model.addExtension(propertyFile);
+		} catch (ParserConfigurationException e) {
+		}
+		return propertyFile;
+	}
+
+	/**
+	 * Creates a backup of the property file
+	 * 
+	 * @param path
+	 *            the file to be backed up
+	 */
+	private void createBackup(String path) {
+		boolean backup = false;
+		File file = new File(path);
+		if (file.exists()) {
+			boolean allexist = true;
+			// Checks the existing backup files and renames the old file to
+			// largest available number starting from 0
+			File f = null;
+			for (int i = 0; i < PropertyFileConstants.BACKUP_COUNT && allexist; i++) {
+				f = new File(path + i + PropertyFileConstants.BACKUP_EXTENSION);
+				if (!f.exists()) {
+					backup = FileUtils.copyFile(file, f);
+					allexist = false;
+				}
+			}
+			if (allexist) {
+				// If all backups from 0 to 9 exist, the old ones are moved
+				// back 1 step. The new file is renamed to *9.h
+				for (int i = 0; i < PropertyFileConstants.BACKUP_COUNT; i++) {
+					f = new File(path + i
+							+ PropertyFileConstants.BACKUP_EXTENSION);
+					if (i == 0) {
+						f.delete();
+					} else {
+						f.renameTo(new File(path + (i - 1)
+								+ PropertyFileConstants.BACKUP_EXTENSION));
+					}
+				}
+				f = new File(path + PropertyFileConstants.LAST_BACKUP);
+				backup = FileUtils.copyFile(file, f);
+			}
+			if (f != null && backup) {
+				String msg = Messages
+						.getString("PropertyFileEngine.PropertyFileBackUpPrefix") //$NON-NLS-1$
+						+ FileUtils.convertSeparators(
+								SourceConstants.FORWARD_SLASH_CHAR, f
+										.getAbsolutePath(), false);
+				TraceCompilerEngineGlobals.getEvents().postInfoMessage(msg, null);
+			}
+		}
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/propertyfile/PropertyFileParser.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,183 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Parser for trace property files
+*
+*/
+package com.nokia.tracecompiler.engine.propertyfile;
+
+import java.util.HashMap;
+
+import javax.xml.parsers.DocumentBuilder;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+import com.nokia.tracecompiler.engine.TraceCompilerEngineErrorMessages;
+import com.nokia.tracecompiler.engine.TraceCompilerEngineGlobals;
+import com.nokia.tracecompiler.engine.TraceCompilerEngineErrorCodes.StringErrorParameters;
+import com.nokia.tracecompiler.engine.TraceCompilerEngineErrorCodes.TraceCompilerErrorCode;
+import com.nokia.tracecompiler.model.TraceCompilerException;
+import com.nokia.tracecompiler.model.TraceModel;
+import com.nokia.tracecompiler.project.ProjectFileParser;
+
+/**
+ * Parser for trace property files
+ * 
+ */
+final class PropertyFileParser extends ProjectFileParser {
+
+	/**
+	 * DOM document representing the property file
+	 */
+	private Document document;
+
+	/**
+	 * Parsers for document elements
+	 */
+	private HashMap<String, PropertyFileElementParser> elementParsers = new HashMap<String, PropertyFileElementParser>();
+
+	/**
+	 * Document builder
+	 */
+	private DocumentBuilder builder;
+
+	/**
+	 * Constructor
+	 * 
+	 * @param model
+	 *            the trace model
+	 * @param fileName
+	 *            the property file name
+	 * @param builder
+	 *            document builder
+	 * @throws TraceCompilerException
+	 *             if parser cannot be created
+	 */
+	protected PropertyFileParser(TraceModel model, String fileName,
+			DocumentBuilder builder) throws TraceCompilerException {
+		super(model, fileName);
+		this.builder = builder;
+		elementParsers.put(PropertyFileConstants.ENUM_ELEMENT,
+				new EnumElementParser(this));
+		elementParsers.put(PropertyFileConstants.VALUE_ELEMENT,
+				new ValueElementParser());
+		elementParsers.put(PropertyFileConstants.FILE_ELEMENT,
+				new FileElementParser());
+
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.project.ProjectFileParser#createParser()
+	 */
+	@Override
+	protected void createParser() throws TraceCompilerException {
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.project.ProjectFileParser#parse()
+	 */
+	@Override
+	public void parse() throws TraceCompilerException {
+		try {
+			document = builder.parse(projectFile);
+			Element rootElement = PropertyFileUtils.findRoot(document);
+			if (rootElement != null) {
+				parseChildren(model, rootElement);
+			} else {
+				throw new TraceCompilerException(
+						TraceCompilerErrorCode.INVALID_PROJECT_FILE);
+			}
+		} catch (TraceCompilerException e) {
+			throw e;
+		} catch (Exception e) {
+			throw new TraceCompilerException(
+					TraceCompilerErrorCode.INVALID_PROJECT_FILE, e);
+		}
+	}
+
+	/**
+	 * Parses child elements of given element
+	 * 
+	 * @param owner
+	 *            the owning object
+	 * @param element
+	 *            the element
+	 */
+	void parseChildren(Object owner, Element element) {
+		NodeList list;
+		list = element.getChildNodes();
+		for (int i = 0; i < list.getLength(); i++) {
+			Node node = list.item(i);
+			if (node.getNodeType() == Node.ELEMENT_NODE) {
+				parseElement(owner, (Element) node);
+			}
+		}
+	}
+
+	/**
+	 * Parses an element
+	 * 
+	 * @param owner
+	 *            the owning trace object
+	 * @param element
+	 *            the element to be parsed
+	 */
+	private void parseElement(Object owner, Element element) {
+		String name = element.getNodeName();
+		PropertyFileElementParser parser = elementParsers.get(name);
+		if (parser != null) {
+			try {
+				parser.parse(owner, element);
+			} catch (TraceCompilerException e) {
+				String msg = TraceCompilerEngineErrorMessages.getErrorMessage(e);
+				TraceCompilerEngineGlobals.getEvents().postWarningMessage(msg,
+						e.getErrorSource());
+			}
+		} else {
+			postElementNotSupportedWarning(name);
+		}
+	}
+
+	/**
+	 * Posts element not supported warning
+	 * 
+	 * @param name
+	 *            the element name
+	 */
+	private void postElementNotSupportedWarning(String name) {
+		StringErrorParameters parameter = new StringErrorParameters();
+		parameter.string = name;
+		String msg = TraceCompilerEngineErrorMessages.getErrorMessage(
+				TraceCompilerErrorCode.PROPERTY_FILE_ELEMENT_NOT_SUPPORTED,
+				parameter);
+		TraceCompilerEngineGlobals.getEvents().postWarningMessage(msg, null);
+	}
+
+	/**
+	 * Gets the document representing the property file
+	 * 
+	 * @return the document
+	 */
+	Document getDocument() {
+		return document;
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/propertyfile/PropertyFileUtils.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,54 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Utility functions for property file
+*
+*/
+package com.nokia.tracecompiler.engine.propertyfile;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+/**
+ * Utility functions for property file
+ * 
+ */
+final class PropertyFileUtils {
+
+	/**
+	 * Finds the root element from property file document
+	 * 
+	 * @param document
+	 *            the document
+	 * @return the root element
+	 */
+	static Element findRoot(Document document) {
+		NodeList list = document.getChildNodes();
+		Element rootElement = null;
+		for (int i = 0; i < list.getLength(); i++) {
+			Node root = list.item(i);
+			if (root.getNodeType() == Node.ELEMENT_NODE) {
+				if (root.getNodeName().equalsIgnoreCase(
+						PropertyFileConstants.ROOT_ELEMENT)) {
+					rootElement = (Element) root;
+				}
+			}
+		}
+		return rootElement;
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/propertyfile/TracePropertyFile.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,68 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Trace property file properties
+*
+*/
+package com.nokia.tracecompiler.engine.propertyfile;
+
+import org.w3c.dom.Document;
+
+import com.nokia.tracecompiler.project.TraceProjectFile;
+
+/**
+ * Trace property file properties
+ * 
+ */
+final class TracePropertyFile extends TraceProjectFile {
+
+	/**
+	 * Title shown in UI
+	 */
+	private static final String PROPERTY_FILE = Messages
+			.getString("TracePropertyFile.Title"); //$NON-NLS-1$
+
+	/**
+	 * Creates a new property file
+	 * 
+	 * @param filePath
+	 *            path to the file
+	 * @param document
+	 *            the document representing the property file
+	 */
+	TracePropertyFile(String filePath, Document document) {
+		super(filePath, ""); //$NON-NLS-1$
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.project.TraceProjectFile#getFileExtension()
+	 */
+	@Override
+	protected String getFileExtension() {
+		return PropertyFileConstants.PROPERTY_FILE_NAME;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.project.TraceProjectFile#getTitle()
+	 */
+	@Override
+	public String getTitle() {
+		return PROPERTY_FILE;
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/propertyfile/ValueElementParser.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,89 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Value element parser
+*
+*/
+package com.nokia.tracecompiler.engine.propertyfile;
+
+import org.w3c.dom.Element;
+
+import com.nokia.tracecompiler.engine.TraceCompilerEngineErrorCodes.StringErrorParameters;
+import com.nokia.tracecompiler.engine.TraceCompilerEngineErrorCodes.TraceCompilerErrorCode;
+import com.nokia.tracecompiler.model.TraceCompilerException;
+import com.nokia.tracecompiler.model.TraceConstantTable;
+import com.nokia.tracecompiler.model.TraceModelExtension;
+
+/**
+ * Value element parser
+ * 
+ */
+final class ValueElementParser implements PropertyFileElementParser {
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engine.propertyfile.PropertyFileElementParser#
+	 *      parse(java.lang.Object, org.w3c.dom.Element)
+	 */
+	public void parse(Object owner, Element element)
+			throws TraceCompilerException {
+		// Value element must be parsed within context of TraceConstantTable
+		// Struct has not yet been implemented
+		if (owner instanceof TraceConstantTable) {
+			parseConstantTableEntry((TraceConstantTable) owner, element);
+		} else {
+			StringErrorParameters parameter = new StringErrorParameters();
+			parameter.string = PropertyFileConstants.VALUE_ELEMENT;
+			throw new TraceCompilerException(
+					TraceCompilerErrorCode.PROPERTY_FILE_ELEMENT_MISPLACED,
+					parameter, null);
+		}
+	}
+
+	/**
+	 * Parses a constant table entry
+	 * 
+	 * @param table
+	 *            the constant table
+	 * @param element
+	 *            the table entry
+	 * @throws TraceCompilerException
+	 *             if entry is not valid
+	 */
+	private void parseConstantTableEntry(TraceConstantTable table,
+			Element element) throws TraceCompilerException {
+		String idstr = element.getAttribute(PropertyFileConstants.ID_ATTRIBUTE);
+		if (idstr != null) {
+			try {
+				int id = Integer.parseInt(idstr);
+				String value = element.getTextContent();
+				table.getModel().getVerifier().checkConstantProperties(table,
+						null, id, value);
+				// Document element reference is stored to the model
+				TraceModelExtension[] exts = new TraceModelExtension[] { new DocumentElementWrapper(
+						element) };
+				table.getModel().getFactory().createConstantTableEntry(table,
+						id, value, exts);
+			} catch (NumberFormatException e) {
+				StringErrorParameters parameter = new StringErrorParameters();
+				parameter.string = PropertyFileConstants.ID_ATTRIBUTE;
+				throw new TraceCompilerException(
+						TraceCompilerErrorCode.PROPERTY_FILE_ATTRIBUTE_INVALID,
+						parameter, null);
+			}
+		}
+	}
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/propertyfile/messages.properties	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,5 @@
+TracePropertyFile.Title=Property File
+PropertyFileEngine.FailedToAttachFile=Failed to attach property file to project
+PropertyFileEngine.PropertyFileBackUpPrefix=Property file back-up created to 
+TraceObjectPropertyList.Title=Properties
+TraceObjectPropertyImpl.NameValueSeparator=: 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/ArrayParameterRuleImpl.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,63 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Rule which defines a parameter as array type
+*
+*/
+package com.nokia.tracecompiler.engine.rules;
+
+import com.nokia.tracecompiler.model.TraceModelPersistentExtension;
+import com.nokia.tracecompiler.rules.ArrayParameterRule;
+
+/**
+ * Rule which defines a parameter as array type
+ * 
+ */
+final class ArrayParameterRuleImpl extends RuleBase implements
+		ArrayParameterRule, TraceModelPersistentExtension {
+
+	/**
+	 * Storage name for array parameter
+	 */
+	static final String STORAGE_NAME = "Array"; //$NON-NLS-1$
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.model.TraceModelPersistentExtension#getData()
+	 */
+	public String getData() {
+		return ""; //$NON-NLS-1$
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.model.TraceModelPersistentExtension#getStorageName()
+	 */
+	public String getStorageName() {
+		return STORAGE_NAME;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.model.TraceModelPersistentExtension#
+	 *      setData(java.lang.String)
+	 */
+	public boolean setData(String data) {
+		return true;
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/AutoAddFunctionParametersRule.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,298 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Trace rule for automatically adding function parameters to a trace
+*
+*/
+package com.nokia.tracecompiler.engine.rules;
+
+import java.util.ArrayList;
+
+import com.nokia.tracecompiler.engine.TraceCompilerEngineErrorMessages;
+import com.nokia.tracecompiler.engine.TraceCompilerEngineGlobals;
+import com.nokia.tracecompiler.engine.TraceCompilerEngineErrorCodes.StringErrorParameters;
+import com.nokia.tracecompiler.engine.TraceCompilerEngineErrorCodes.TraceCompilerErrorCode;
+import com.nokia.tracecompiler.engine.header.ComplexHeaderRule;
+import com.nokia.tracecompiler.engine.source.TraceParameterFormattingRule;
+import com.nokia.tracecompiler.model.Trace;
+import com.nokia.tracecompiler.model.TraceCompilerException;
+import com.nokia.tracecompiler.model.TraceConstantTable;
+import com.nokia.tracecompiler.model.TraceObjectRuleCreateObject;
+import com.nokia.tracecompiler.model.TraceObjectRuleRemoveOnCreate;
+import com.nokia.tracecompiler.model.TraceParameter;
+import com.nokia.tracecompiler.source.SourceConstants;
+import com.nokia.tracecompiler.source.SourceContext;
+import com.nokia.tracecompiler.source.SourceParameter;
+import com.nokia.tracecompiler.source.SourceParserException;
+import com.nokia.tracecompiler.source.SourceUtils;
+import com.nokia.tracecompiler.source.TypeMapping;
+
+/**
+ * Trace rule for automatically adding function parameters to a trace
+ * 
+ */
+public final class AutoAddFunctionParametersRule extends RuleBase implements
+		TraceObjectRuleCreateObject, TraceObjectRuleRemoveOnCreate {
+
+	/**
+	 * Warning about value-to-pointer conversion
+	 */
+	private static final String VALUE_TO_POINTER_WARNING = Messages
+			.getString("AutoAddFunctionParametersRule.UnrecognizedTypeWarning"); //$NON-NLS-1$
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * com.nokia.tracecompiler.model.TraceObjectRuleCreateObject#createObject()
+	 */
+	public void createObject() throws TraceCompilerException {
+		SourceContext context = TraceCompilerEngineGlobals.getSourceContextManager()
+				.getContext();
+		Trace trace = (Trace) getOwner();
+		if (context != null) {
+			boolean valid = false;
+			ArrayList<SourceParameter> list = tokenizeParameters(context);
+
+			trace.getModel().startProcessing();
+			try {
+				createParameters(trace, list);
+			} finally {
+				trace.getModel().processingComplete();
+			}
+			// At least one parameter must be parsed from source except for function entry extension
+			valid = trace.getParameterCount() > 0 || trace.getExtension(EntryTraceRule.class) != null;
+
+			if (!valid) {
+				String msg = TraceCompilerEngineErrorMessages.getErrorMessage(
+						TraceCompilerErrorCode.CANNOT_PARSE_FUNCTION_PARAMETERS,
+						null);
+				TraceCompilerEngineGlobals.getEvents().postWarningMessage(msg, trace);
+				// Removes the complex rule -> Function is not generated and
+				// source does not compile
+				trace.removeExtensions(ComplexHeaderRule.class);
+			}
+		} else {
+			String msg = TraceCompilerEngineErrorMessages.getErrorMessage(
+					TraceCompilerErrorCode.NO_CONTEXT_FOR_LOCATION, null);
+			TraceCompilerEngineGlobals.getEvents().postErrorMessage(msg, null, true);
+			// Removes the complex rule -> Function is not generated and
+			// source does not compile
+			trace.removeExtensions(ComplexHeaderRule.class);
+		}
+	}
+
+	/**
+	 * Creates the parameters to the trace
+	 * 
+	 * @param owner
+	 *            the trace
+	 * @param list
+	 *            the parameter list parsed from source
+	 * @throws TraceCompilerException 
+	 */
+	private void createParameters(Trace owner, ArrayList<SourceParameter> list) throws TraceCompilerException {
+
+		// If any of the parameters is "...", clear the whole parameter list
+		for (SourceParameter param : list) {
+			String type = param.getType();
+			if (type != null
+					&& type.equals(SourceConstants.VARIABLE_ARG_LIST_INDICATOR)) {
+				list.clear();
+				
+				
+				String msg = TraceCompilerEngineErrorMessages.getErrorMessage(
+						TraceCompilerErrorCode.VAR_ARG_LIST_PARAMETER_FOUND,
+						null);
+				TraceCompilerEngineGlobals.getEvents().postWarningMessage(msg, owner);
+				break;
+			}
+		}
+
+		StringBuilder str = new StringBuilder();
+		for (SourceParameter param : list) {
+			TraceParameter parameter = createParameter(owner, param);
+			if (parameter != null) {
+				str.append(SourceConstants.PARAMETER_SEPARATOR);
+				TraceParameterFormattingRule rule = parameter
+						.getExtension(TraceParameterFormattingRule.class);
+				if (rule != null) {
+					str.append(rule.mapNameToSource(param.getName()));
+				} else {
+					str.append(param.getName());
+				}
+			}
+			// The location will be referenced by event handlers if
+			// they need it. Otherwise it will be removed from the
+			// source
+			param.getSourceLocation().dereference();
+		}
+		// The header extension is stored in case of complex function entry
+		// trace
+		EntryTraceRule entryRule = owner.getExtension(EntryTraceRule.class);
+		ComplexHeaderRuleImpl complex = owner
+				.getExtension(ComplexHeaderRuleImpl.class);
+		if (entryRule != null && complex != null) {
+			complex.setTraceIDDefineExtension(str.toString());
+		}
+	}
+
+	/**
+	 * Processes the parameters of given source context
+	 * 
+	 * @param context
+	 *            the context
+	 * @return list of parameters
+	 * @throws TraceCompilerException 
+	 */
+	private ArrayList<SourceParameter> tokenizeParameters(SourceContext context) throws TraceCompilerException {
+		ArrayList<SourceParameter> list = new ArrayList<SourceParameter>();
+		try {
+			context.parseParameters(list);
+		} catch (SourceParserException e) {
+			TraceCompilerException exception = new TraceCompilerException(
+					TraceCompilerErrorCode.UNEXPECTED_EXCEPTION, e);
+			TraceCompilerEngineGlobals.getEvents().postError(
+					exception);
+			list = null;
+		}
+		return list;
+	}
+
+	/**
+	 * Creates a TraceParameter based on parameter parsed from source
+	 * 
+	 * @param owner
+	 *            the owning trace object
+	 * @param param
+	 *            the parameter found from source
+	 * @return the parameter
+	 */
+	private TraceParameter createParameter(Trace owner, SourceParameter param) {
+		TraceConstantTable foundTable = RuleUtils.findConstantTableByType(owner
+				.getModel(), param);
+		TraceParameter parameter = null;
+		if (foundTable == null) {
+			TypeMapping type = SourceUtils.mapSymbianTypeToParameterType(param);
+			if (type != null) {
+				if (!type.isVoid()) {
+					parameter = createParameter(owner, param, type);
+				}
+			} else {
+				StringErrorParameters params = new StringErrorParameters();
+				params.string = param.getType();
+				TraceCompilerException exception = new TraceCompilerException(
+						TraceCompilerErrorCode.INVALID_PARAMETER_TYPE,
+						params, param.getSourceLocation());
+				TraceCompilerEngineGlobals.getEvents().postError(
+						exception);
+			}
+		} else {
+			parameter = createParameter(owner, param, foundTable);
+		}
+		return parameter;
+	}
+
+	/**
+	 * Processes a non-void parameter type that was not associated with a
+	 * constant table
+	 * 
+	 * @param owner
+	 *            the owner for the parameter
+	 * @param param
+	 *            the parameter found from source
+	 * @param type
+	 *            the parameter type as parsed by source package
+	 * @return the parameter
+	 */
+	private TraceParameter createParameter(Trace owner, SourceParameter param,
+			TypeMapping type) {
+		String name = param.getName();
+		TraceParameter retval = null;
+		if (name == null || name.length() == 0) {
+			String s = TraceCompilerEngineErrorMessages.getErrorMessage(
+					TraceCompilerErrorCode.EMPTY_PARAMETER_NAME, null);
+			TraceCompilerEngineGlobals.getEvents().postWarningMessage(s,
+					param.getSourceLocation());
+		} else {
+			try {
+				retval = RuleUtils.createParameterFromType(owner, name, type);
+				if (retval != null && type.valueToPointer) {
+					// Posts a warning about value-to-pointer conversion
+					TraceCompilerEngineGlobals.getEvents()
+							.postWarningMessage(VALUE_TO_POINTER_WARNING,
+									param.getSourceLocation());
+				}
+			} catch (TraceCompilerException e) {
+				// Changes the source of the error to the location that failed
+				TraceCompilerException exception = new TraceCompilerException(e.getErrorCode(), e
+						.getErrorParameters(), param
+						.getSourceLocation());
+				TraceCompilerEngineGlobals.getEvents().postError(
+						exception);
+			}
+		}
+		return retval;
+	}
+
+	/**
+	 * Processes a non-void parameter type that was associated with a constant
+	 * table
+	 * 
+	 * @param owner
+	 *            the owner for the parameter
+	 * @param param
+	 *            the parameter found from source
+	 * @param table
+	 *            the constant table the parameter was associated to
+	 * @return the parameter
+	 */
+	private TraceParameter createParameter(Trace owner, SourceParameter param,
+			TraceConstantTable table) {
+		String name = param.getName();
+		TraceParameter retval = null;
+		if (name == null || name.length() == 0) {
+			String s = TraceCompilerEngineErrorMessages.getErrorMessage(
+					TraceCompilerErrorCode.EMPTY_PARAMETER_NAME, null);
+			TraceCompilerEngineGlobals.getEvents().postWarningMessage(s,
+					param.getSourceLocation());
+		} else {
+			try {
+				retval = RuleUtils.createParameterFromConstantTable(owner,
+						name, table);
+			} catch (TraceCompilerException e) {
+				// Changes the source of the error to the location that failed
+				TraceCompilerException exception = new TraceCompilerException(e.getErrorCode(), e
+						.getErrorParameters(), param
+						.getSourceLocation());
+				TraceCompilerEngineGlobals.getEvents().postError(
+						exception);
+			}
+		}
+		return retval;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * com.nokia.tracecompiler.model.TraceObjectRuleRemoveOnCreate#canBeRemoved()
+	 */
+	public boolean canBeRemoved() {
+		// This is not copied to exit trace -> Can be removed
+		return true;
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/AutoAddParameterRuleBase.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,97 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Base class for the auto-add parameter rules
+*
+*/
+package com.nokia.tracecompiler.engine.rules;
+
+import com.nokia.tracecompiler.engine.TraceCompilerEngineGlobals;
+import com.nokia.tracecompiler.engine.utils.TraceMultiplierRule;
+import com.nokia.tracecompiler.model.Trace;
+import com.nokia.tracecompiler.model.TraceCompilerException;
+import com.nokia.tracecompiler.model.TraceModelExtension;
+import com.nokia.tracecompiler.model.TraceObjectRule;
+import com.nokia.tracecompiler.model.TraceObjectRuleCreateObject;
+import com.nokia.tracecompiler.model.TraceObjectRuleRemoveOnCreate;
+import com.nokia.tracecompiler.model.TraceObjectUtils;
+
+/**
+ * Base class for the auto-add parameter rules
+ * 
+ */
+abstract class AutoAddParameterRuleBase extends RuleBase implements
+		TraceObjectRuleCreateObject, TraceObjectRuleRemoveOnCreate {
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.model.TraceObjectRuleCreateObject#createObject()
+	 */
+	public void createObject() throws TraceCompilerException {
+		TraceObjectRule rule = getRule();
+		TraceModelExtension[] extensions = null;
+		if (rule != null) {
+			extensions = new TraceModelExtension[] { rule };
+		}
+		Trace owner = (Trace) getOwner();
+		int id = owner.getNextParameterID();
+		String name = TraceObjectUtils.modifyDuplicateParameterName(owner,
+				getName()).getData();
+		String type = getType();
+		try {
+			owner.getModel().getVerifier().checkTraceParameterProperties(owner,
+					null, id, name, type);
+			owner.getModel().getFactory().createTraceParameter(owner, id, name,
+					type, extensions);
+		} catch (TraceCompilerException e) {
+			TraceCompilerEngineGlobals.getEvents().postError(e);
+				throw e;
+		}
+	}
+
+	/**
+	 * Gets the name for the new parameter
+	 * 
+	 * @return the parameter name
+	 */
+	protected abstract String getName();
+
+	/**
+	 * Gets the new parameter type
+	 * 
+	 * @return the type
+	 */
+	protected abstract String getType();
+
+	/**
+	 * Gets the rule for the parameter
+	 * 
+	 * @return the rule
+	 */
+	protected abstract TraceObjectRule getRule();
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.model.TraceObjectRuleRemoveOnCreate#canBeRemoved()
+	 */
+	public boolean canBeRemoved() {
+		// If the owner has a multiplier, this needs to be moved to it using the
+		// CopyAndRemoveExtensionRule
+		return getOwner().getExtension(TraceMultiplierRule.class) == null;
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/AutoAddReturnParameterRule.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,188 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Trace rule for automatically adding function return value to exit trace
+*
+*/
+package com.nokia.tracecompiler.engine.rules;
+
+import java.util.ArrayList;
+
+import com.nokia.tracecompiler.engine.TraceCompilerEngineErrorMessages;
+import com.nokia.tracecompiler.engine.TraceCompilerEngineGlobals;
+import com.nokia.tracecompiler.engine.TraceCompilerEngineErrorCodes.TraceCompilerErrorCode;
+import com.nokia.tracecompiler.engine.utils.TraceMultiplierRule;
+import com.nokia.tracecompiler.model.Trace;
+import com.nokia.tracecompiler.model.TraceCompilerException;
+import com.nokia.tracecompiler.model.TraceConstantTable;
+import com.nokia.tracecompiler.model.TraceObjectRuleCreateObject;
+import com.nokia.tracecompiler.model.TraceObjectRuleRemoveOnCreate;
+import com.nokia.tracecompiler.model.TraceParameter;
+import com.nokia.tracecompiler.source.SourceContext;
+import com.nokia.tracecompiler.source.SourceParserException;
+import com.nokia.tracecompiler.source.SourceReturn;
+import com.nokia.tracecompiler.source.SourceUtils;
+import com.nokia.tracecompiler.source.TypeMapping;
+
+/**
+ * Trace rule for automatically adding function return value to exit trace
+ * 
+ */
+public final class AutoAddReturnParameterRule extends RuleBase implements
+		TraceObjectRuleCreateObject, TraceObjectRuleRemoveOnCreate {
+
+	/**
+	 * Parameter name
+	 */
+	static final String PARAMETER_NAME = "retval"; //$NON-NLS-1$
+
+	/**
+	 * The number of handled return statements
+	 */
+	private static int numberOfHandledReturnStatements = 0;
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.model.TraceObjectRuleCreateObject#
+	 *      createObject(com.nokia.tracecompiler.model.TraceObject)
+	 */
+	public void createObject() throws TraceCompilerException {
+		// If owner has a multiplier (entry trace), the trace is not added to it
+		Trace owner = (Trace) getOwner();
+		if (owner.getExtension(TraceMultiplierRule.class) == null) {
+			SourceContext context = TraceCompilerEngineGlobals
+					.getSourceContextManager().getContext();
+			if (!context.isVoid()) {
+				TraceConstantTable table = RuleUtils.findConstantTableByType(
+						owner.getModel(), context);
+				if (table != null) {
+					createParameter(owner, table);
+				} else {
+					createParameter(owner, context);
+				}
+			}
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.model.TraceObjectRuleRemoveOnCreate#canBeRemoved()
+	 */
+	public boolean canBeRemoved() {
+		// If the owner has a multiplier, this needs to be moved to it using the
+		// CopyAndRemoveExtensionRule
+		return getOwner().getExtension(TraceMultiplierRule.class) == null;
+	}
+
+	/**
+	 * Creates a return parameter that was not associated with a constant table
+	 * 
+	 * @param owner
+	 *            the owner for the parameter
+	 * @param context
+	 *            the context specifying the parameter type 
+	 */
+	private void createParameter(Trace owner, SourceContext context) {
+		TypeMapping type = SourceUtils.mapSymbianTypeToParameterType(context);
+		String return_value_name = PARAMETER_NAME;
+		ArrayList<SourceReturn> returnList = new ArrayList<SourceReturn>();
+
+		// Find out return value name
+		try {
+			context.parseReturnValues(returnList);
+			if (numberOfHandledReturnStatements <= (returnList.size() - 1)) {
+				return_value_name = returnList.get(
+						numberOfHandledReturnStatements).getReturnStatement();
+			}
+
+			numberOfHandledReturnStatements++;
+		} catch (SourceParserException e) {
+			String msg = Messages
+					.getString("RuleUtils.FailedToParseReturnValues"); //$NON-NLS-1$
+			String cname = context.getClassName();
+			String source;
+			if (cname != null) {
+				source = cname + "::" + context.getFunctionName(); //$NON-NLS-1$;
+			} else {
+				source = context.getFunctionName();
+			}
+			TraceCompilerEngineGlobals.getEvents().postErrorMessage(msg, source, true);
+		}
+
+		try {
+			if (!type.needsCasting) {
+				// If an extension header is generated, the parameter needs to
+				// be cast, since the return statement may contain anything.
+				type.needsCasting = type.type != TraceParameter.HEX32
+						&& type.type != TraceParameter.SDEC32
+						&& type.type != TraceParameter.UDEC32;
+			}
+			RuleUtils.createParameterFromType(owner, return_value_name, type);
+
+		} catch (TraceCompilerException e) {
+
+			if (e.getErrorCode() == TraceCompilerErrorCode.INVALID_PARAMETER_NAME) {
+				String msg = TraceCompilerEngineErrorMessages
+						.getErrorMessage(
+								TraceCompilerErrorCode.INVALID_PARAMETER_NAME_IN_RETURN_VALUE,
+								null);
+
+				TraceCompilerEngineGlobals.getEvents().postWarningMessage(msg, owner);
+			} else {
+				TraceCompilerException exception = new TraceCompilerException(e.getErrorCode(), e
+						.getErrorParameters(), null);
+				TraceCompilerEngineGlobals.getEvents().postError(
+						exception);
+			}
+		}
+	}
+
+	/**
+	 * Creates a return parameter that was associated with a constant table
+	 * 
+	 * @param owner
+	 *            the owner for the parameter
+	 * @param table
+	 *            the constant table the parameter was associated to
+	 */
+	private void createParameter(Trace owner, TraceConstantTable table) {
+		try {
+			RuleUtils.createParameterFromConstantTable(owner, PARAMETER_NAME,
+					table);
+		} catch (TraceCompilerException e) {
+			TraceCompilerException exception = new TraceCompilerException(e.getErrorCode(), e
+					.getErrorParameters(), null);
+			TraceCompilerEngineGlobals.getEvents().postError(
+					exception);
+		}
+	}
+
+	/**
+	 * Reset static variables
+	 */
+	static void resetNumberOfHandledReturnStatements() {
+		numberOfHandledReturnStatements = 0;
+	}
+
+	/**
+	 * Increase number of handled return statements
+	 */
+	static void increaseNumberOfHandledReturnStatements() {
+		numberOfHandledReturnStatements++;
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/AutoAddThisPtrRule.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,77 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Creation rule for this parameter
+*
+*/
+package com.nokia.tracecompiler.engine.rules;
+
+import com.nokia.tracecompiler.engine.TraceCompilerEngineGlobals;
+import com.nokia.tracecompiler.model.TraceCompilerException;
+import com.nokia.tracecompiler.model.TraceObjectRule;
+import com.nokia.tracecompiler.model.TraceParameter;
+import com.nokia.tracecompiler.source.SourceContext;
+
+/**
+ * Creation rule for "this pointer" parameter
+ * 
+ */
+public final class AutoAddThisPtrRule extends AutoAddParameterRuleBase {
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engine.rules.AutoAddParameterRuleBase#createObject()
+	 */
+	@Override
+	public void createObject() throws TraceCompilerException {
+		SourceContext context = TraceCompilerEngineGlobals.getSourceContextManager()
+				.getContext();
+		if (context != null && !RuleUtils.isStaticFunction(context)) {
+			super.createObject();
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engine.rules.AutoAddParameterRuleBase#getName()
+	 */
+	@Override
+	protected String getName() {
+		return ThisPointerParameterTemplate.PARAMETER_NAME;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engine.rules.AutoAddParameterRuleBase#getRule()
+	 */
+	@Override
+	protected TraceObjectRule getRule() {
+		return null;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engine.rules.AutoAddParameterRuleBase#getType()
+	 */
+	@Override
+	protected String getType() {
+		return TraceParameter.HEX32;
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/AutoAddValueRule.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,77 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Creation rule for value parameter
+*
+*/
+package com.nokia.tracecompiler.engine.rules;
+
+import com.nokia.tracecompiler.engine.TraceCompilerEngineGlobals;
+import com.nokia.tracecompiler.model.TraceCompilerException;
+import com.nokia.tracecompiler.model.TraceObjectRule;
+import com.nokia.tracecompiler.model.TraceParameter;
+import com.nokia.tracecompiler.source.SourceContext;
+
+/**
+ * Creation rule for "value" parameter
+ * 
+ */
+public final class AutoAddValueRule extends AutoAddParameterRuleBase {
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engine.rules.AutoAddParameterRuleBase#createObject()
+	 */
+	@Override
+	public void createObject() throws TraceCompilerException {
+		SourceContext context = TraceCompilerEngineGlobals.getSourceContextManager()
+				.getContext();
+		if (context != null) {
+			super.createObject();
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engine.rules.AutoAddParameterRuleBase#getName()
+	 */
+	@Override
+	protected String getName() {
+		return ValueParameterTemplate.PARAMETER_NAME;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engine.rules.AutoAddParameterRuleBase#getRule()
+	 */
+	@Override
+	protected TraceObjectRule getRule() {
+		return null;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engine.rules.AutoAddParameterRuleBase#getType()
+	 */
+	@Override
+	protected String getType() {
+		return TraceParameter.SDEC32;
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/AutomaticTraceTextRule.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,38 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Rule which specifies that trace does not have user-defined text
+*
+*/
+package com.nokia.tracecompiler.engine.rules;
+
+import com.nokia.tracecompiler.source.SourceContext;
+
+/**
+ * Rule which specifies that trace does not have user-defined text
+ * 
+ */
+public abstract class AutomaticTraceTextRule extends RuleBase {
+
+	/**
+	 * Formats a trace according to given source context
+	 * 
+	 * @param context
+	 *            the context
+	 * @return the trace
+	 */
+	public abstract String formatTrace(SourceContext context);
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/ClassNameWrapper.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,53 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Wrapper for Class and name
+*
+*/
+package com.nokia.tracecompiler.engine.rules;
+
+import com.nokia.tracecompiler.model.TraceModelPersistentExtension;
+
+/**
+ * Wrapper for persistent extension class and name
+ * 
+ */
+class ClassNameWrapper {
+
+	/**
+	 * Constructor
+	 * 
+	 * @param name
+	 *            the name
+	 * @param clasz
+	 *            the class
+	 */
+	ClassNameWrapper(String name,
+			Class<? extends TraceModelPersistentExtension> clasz) {
+		this.name = name;
+		this.clasz = clasz;
+	}
+
+	/**
+	 * Name for the class
+	 */
+	String name;
+
+	/**
+	 * The class
+	 */
+	Class<? extends TraceModelPersistentExtension> clasz;
+
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/ComplexHeaderRuleImpl.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,62 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Implementation of ComplexHeaderRule
+*
+*/
+package com.nokia.tracecompiler.engine.rules;
+
+import com.nokia.tracecompiler.engine.header.ComplexHeaderRule;
+
+/**
+ * Implementation of ComplexHeaderRule
+ * 
+ */
+public final class ComplexHeaderRuleImpl extends RuleBase implements
+		ComplexHeaderRule {
+
+	/**
+	 * Trace ID define extension
+	 */
+	private String traceIDDefineExtension;
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engine.header.ComplexHeaderRule#needsFunction()
+	 */
+	public boolean needsFunction() {
+		return true;
+	}
+
+	/**
+	 * Sets the data to be added to the trace ID define statement after the ID
+	 * 
+	 * @param traceIDDefineExtension
+	 *            the extension
+	 */
+	void setTraceIDDefineExtension(String traceIDDefineExtension) {
+		this.traceIDDefineExtension = traceIDDefineExtension;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engine.header.ComplexHeaderRule#getTraceIDDefineExtension()
+	 */
+	public String getTraceIDDefineExtension() {
+		return traceIDDefineExtension;
+	}
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/EndOfFunctionLocationRule.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,62 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Location rule for end of function
+*
+*/
+package com.nokia.tracecompiler.engine.rules;
+
+import com.nokia.tracecompiler.engine.source.SourceLocationRule;
+
+/**
+ * Location rule for end of function
+ * 
+ */
+public final class EndOfFunctionLocationRule extends RuleBase implements
+		SourceLocationRule {
+
+	/**
+	 * Location rule offset. Should be large enough to cover a function
+	 */
+	private static final int OFFSET = 100000; // CodForChk_Dis_Magic
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engine.source.SourceLocationRule#getType()
+	 */
+	public int getLocationType() {
+		return SourceLocationRule.CONTEXT_RELATIVE;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engine.source.SourceLocationRule#getOffset()
+	 */
+	public int getLocationOffset() {
+		return OFFSET;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engine.source.SourceLocationRule#isRemovedAfterInsert()
+	 */
+	public boolean isRemovedAfterInsert() {
+		return true;
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/EntryTraceRule.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,41 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Rule for entry traces
+*
+*/
+package com.nokia.tracecompiler.engine.rules;
+
+import com.nokia.tracecompiler.engine.utils.TraceUtils;
+import com.nokia.tracecompiler.source.SourceContext;
+
+/**
+ * Rule for entry traces
+ * 
+ */
+public class EntryTraceRule extends AutomaticTraceTextRule {
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engine.rules.AutomaticTraceTextRule#
+	 *      formatTrace(com.nokia.tracecompiler.source.SourceContext)
+	 */
+	@Override
+	public String formatTrace(SourceContext context) {
+		return TraceUtils.formatTrace(RuleUtils.TEXT_FORMAT_BASE, context
+				.getClassName(), context.getFunctionName());
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/ExitTracePropertyBuilder.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,45 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Creates exit traces from entry traces
+*
+*/
+package com.nokia.tracecompiler.engine.rules;
+
+/**
+ * Creates exit traces from entry traces
+ * 
+ */
+interface ExitTracePropertyBuilder {
+
+	/**
+	 * Gets the name for exit trace
+	 * 
+	 * @param entryName
+	 *            name of the entry trace
+	 * @return the name for exit trace
+	 */
+	String createExitName(String entryName);
+
+	/**
+	 * Gets the exit trace text based on entry trace
+	 * 
+	 * @param entryText
+	 *            entry trace text
+	 * @return the text for exit trace
+	 */
+	String createExitText(String entryText);
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/ExitTraceRule.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,42 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Rule for exit traces
+*
+*/
+package com.nokia.tracecompiler.engine.rules;
+
+import com.nokia.tracecompiler.engine.utils.TraceUtils;
+import com.nokia.tracecompiler.source.SourceContext;
+
+/**
+ * Rule for exit traces
+ * 
+ */
+public class ExitTraceRule extends AutomaticTraceTextRule {
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engine.rules.AutomaticTraceTextRule#
+	 *      formatTrace(com.nokia.tracecompiler.source.SourceContext)
+	 */
+	@Override
+	public String formatTrace(SourceContext context) {
+		return TraceUtils.formatTrace(RuleUtils.TEXT_FORMAT_BASE, context
+				.getClassName(), context.getFunctionName());
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/ExtensionBase.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,54 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Base class for model extensions
+*
+*/
+package com.nokia.tracecompiler.engine.rules;
+
+import com.nokia.tracecompiler.model.TraceModelExtension;
+import com.nokia.tracecompiler.model.TraceObject;
+
+/**
+ * Base class for model extensions
+ * 
+ */
+public class ExtensionBase implements TraceModelExtension {
+
+	/**
+	 * The owning trace object
+	 */
+	private TraceObject owner;
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.model.TraceModelExtension#
+	 *      setOwner(com.nokia.tracecompiler.model.TraceObject)
+	 */
+	public void setOwner(TraceObject owner) {
+		this.owner = owner;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.model.TraceModelExtension#getOwner()
+	 */
+	public TraceObject getOwner() {
+		return owner;
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/FillerParameterRuleImpl.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,39 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Filler parameter rule implementation
+*
+*/
+package com.nokia.tracecompiler.engine.rules;
+
+import com.nokia.tracecompiler.rules.FillerParameterRule;
+
+/**
+ * Filler parameter rule implementation. This returns false from isShownInSource
+ * 
+ */
+final class FillerParameterRuleImpl extends TraceParameterFormattingRuleBase
+		implements FillerParameterRule {
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engine.source.TraceParameterFormattingRule#isShownInSource()
+	 */
+	@Override
+	public boolean isShownInSource() {
+		return false;
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/Messages.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,64 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Localized strings for rules package
+*
+*/
+package com.nokia.tracecompiler.engine.rules;
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+/**
+ * Localized strings for rules package
+ * 
+ */
+class Messages {
+
+	/**
+	 * Bundle name
+	 */
+	private static final String BUNDLE_NAME = "com.nokia.tracecompiler.engine.rules.messages"; //$NON-NLS-1$
+
+	/**
+	 * Bundle
+	 */
+	private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
+			.getBundle(BUNDLE_NAME);
+
+	/**
+	 * Prevents construction
+	 */
+	private Messages() {
+
+	}
+
+	/**
+	 * Gets localized string based on key
+	 * 
+	 * @param key
+	 *            the resource key
+	 * @return the localized resource
+	 */
+	public static String getString(String key) {
+		String value;
+		try {
+			value = RESOURCE_BUNDLE.getString(key);
+		} catch (MissingResourceException e) {
+			value = '!' + key + '!';
+		}
+		return value;
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/ParameterTypeMappingRule.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,145 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Trace parameter rule for adding casting and pointer operations to source code
+*
+*/
+package com.nokia.tracecompiler.engine.rules;
+
+import com.nokia.tracecompiler.model.TraceModelPersistentExtension;
+import com.nokia.tracecompiler.model.TraceParameter;
+import com.nokia.tracecompiler.source.SourceConstants;
+import com.nokia.tracecompiler.source.SourceUtils;
+import com.nokia.tracecompiler.source.TypeMapping;
+
+/**
+ * Trace parameter rule for adding casting and pointer operations to source code
+ * 
+ */
+final class ParameterTypeMappingRule extends TraceParameterFormattingRuleBase
+		implements TraceModelPersistentExtension {
+
+	/**
+	 * TTime.Int64() function
+	 */	
+	private static final String INT64_FUNCTION = ".Int64()"; //$NON-NLS-1$
+
+	/**
+	 * The type mapping
+	 */
+	private TypeMapping typeMapping;
+
+	/**
+	 * Storage name for this parameter
+	 */
+	static String STORAGE_NAME = "TypeMapping"; //$NON-NLS-1$
+
+	/**
+	 * Constructor for reflection
+	 */
+	ParameterTypeMappingRule() {
+		typeMapping = new TypeMapping(null);
+	}
+
+	/**
+	 * Creates a new type mapping rule
+	 * 
+	 * @param mapping
+	 *            the type mapping to be used
+	 */
+	ParameterTypeMappingRule(TypeMapping mapping) {
+		this.typeMapping = mapping;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engine.rules.TraceParameterFormattingRuleBase#
+	 *      mapNameToSource(java.lang.String)
+	 */
+	@Override
+	public String mapNameToSource(String originalName) {
+		StringBuffer source = new StringBuffer();
+		if (typeMapping.type.equals(TraceParameter.TIME)) {
+			source.append(originalName);
+			source.append(INT64_FUNCTION);
+		} else {
+			if (typeMapping.needsCasting) {
+				source.append(SourceConstants.START_PARAMETERS);
+				TraceParameter param = (TraceParameter) getOwner();
+				source.append(SourceUtils.mapParameterTypeToSymbianType(param));
+				source.append(SourceConstants.END_PARAMETERS);
+			}
+			if (typeMapping.valueToPointer) {
+				source.append('&');
+			}
+			source.append(SourceConstants.START_PARAMETERS);
+			source.append(originalName);
+			source.append(SourceConstants.END_PARAMETERS);
+		}
+		return source.toString();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.model.TraceModelPersistentExtension#getData()
+	 */
+	public String getData() {
+		StringBuffer sb = new StringBuffer();
+		if (typeMapping.needsCasting) {
+			sb.append('C');
+		}
+		if (typeMapping.valueToPointer) {
+			sb.append('V');
+		}
+		return sb.toString();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.model.TraceModelPersistentExtension#getStorageName()
+	 */
+	public String getStorageName() {
+		return STORAGE_NAME;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.model.TraceModelPersistentExtension#setData(java.lang.String)
+	 */
+	public boolean setData(String data) {
+		boolean retval = false;
+		if (data != null) {
+			for (int i = 0; i < data.length(); i++) {
+				char c = data.charAt(i);
+				switch (c) {
+				case 'C':
+					typeMapping.needsCasting = true;
+					retval = true;
+					break;
+				case 'V':
+					typeMapping.valueToPointer = true;
+					retval = true;
+					break;
+				}
+			}
+		}
+		return retval;
+	}
+
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/PerformanceEventRuleBase.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,28 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Base class for performance event rules
+*
+*/
+package com.nokia.tracecompiler.engine.rules;
+
+
+/**
+ * Base class for performance event rules
+ * 
+ */
+public class PerformanceEventRuleBase extends RuleBase {
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/PerformanceEventStartRule.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,27 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Rule for performance timer entry trace
+*
+*/
+package com.nokia.tracecompiler.engine.rules;
+
+
+/**
+ * Rule for performance timer entry trace
+ * 
+ */
+public class PerformanceEventStartRule extends PerformanceEventRuleBase {
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/PerformanceEventStopRule.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,26 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Performance timer exit trace rule
+*
+*/
+package com.nokia.tracecompiler.engine.rules;
+
+/**
+ * Performance timer exit trace rule
+ * 
+ */
+public final class PerformanceEventStopRule extends PerformanceEventRuleBase {
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/ReadOnlyObjectRuleImpl.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,30 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Read-only rule implementation
+*
+*/
+package com.nokia.tracecompiler.engine.rules;
+
+import com.nokia.tracecompiler.rules.ReadOnlyObjectRule;
+
+/**
+ * Read-only rule implementation
+ * 
+ */
+public final class ReadOnlyObjectRuleImpl extends RuleBase implements
+		ReadOnlyObjectRule {
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/RuleBase.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,28 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Base class for rules
+*
+*/
+package com.nokia.tracecompiler.engine.rules;
+
+import com.nokia.tracecompiler.model.TraceObjectRule;
+
+/**
+ * Base class for rules
+ * 
+ */
+public class RuleBase extends ExtensionBase implements TraceObjectRule {
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/RuleUtils.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,320 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "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:
+ *
+ * Description:
+ *
+ * Utility functions for rules package
+ *
+ */
+package com.nokia.tracecompiler.engine.rules;
+
+import java.util.Iterator;
+import java.util.List;
+
+import com.nokia.tracecompiler.engine.TraceCompilerEngineConfiguration;
+import com.nokia.tracecompiler.engine.TraceCompilerEngineGlobals;
+import com.nokia.tracecompiler.model.Trace;
+import com.nokia.tracecompiler.model.TraceCompilerException;
+import com.nokia.tracecompiler.model.TraceConstantTable;
+import com.nokia.tracecompiler.model.TraceModel;
+import com.nokia.tracecompiler.model.TraceModelExtension;
+import com.nokia.tracecompiler.model.TraceObjectUtils;
+import com.nokia.tracecompiler.model.TraceParameter;
+import com.nokia.tracecompiler.source.ParsedType;
+import com.nokia.tracecompiler.source.SourceContext;
+import com.nokia.tracecompiler.source.SourceParserException;
+import com.nokia.tracecompiler.source.SourceReturn;
+import com.nokia.tracecompiler.source.TypeMapping;
+
+/**
+ * Utility functions for rules package
+ * 
+ */
+public final class RuleUtils {
+
+	/**
+	 * Entry-exit template
+	 */
+	public static final int TYPE_ENTRY_EXIT = 0; // CodForChk_Dis_Magic
+
+	/**
+	 * Start-stop event template
+	 */
+	public static final int TYPE_PERF_EVENT = 1; // CodForChk_Dis_Magic
+
+	/**
+	 * State trace template
+	 */
+	public static final int TYPE_STATE_TRACE = 2; // CodForChk_Dis_Magic
+
+	/**
+	 * Trace name format base
+	 */
+	static final String NAME_FORMAT_BASE = "{$CN}_{$FN}"; //$NON-NLS-1$
+
+	/**
+	 * Trace text format base
+	 */
+	static final String TEXT_FORMAT_BASE = "{$cn}::{$fn}"; //$NON-NLS-1$
+
+	/**
+	 * Template titles
+	 */
+	private static final String[] ENTRY_TEMPLATE_TITLES = {
+			Messages.getString("RuleUtils.FunctionEntryTitle"), //$NON-NLS-1$
+			Messages.getString("RuleUtils.PerformanceEventTitle"), //$NON-NLS-1$
+			Messages.getString("RuleUtils.StateTraceTitle"), //$NON-NLS-1$
+	};
+
+	/**
+	 * Entry name prefixes
+	 */
+	public static final String[] ENTRY_NAME_PREFIXES = { "", //$NON-NLS-1$
+			"EVENT_", //$NON-NLS-1$
+			"STATE_" //$NON-NLS-1$
+	};
+
+	/**
+	 * Entry name suffixes
+	 */
+	public static final String[] ENTRY_NAME_SUFFIXES = { "_ENTRY", //$NON-NLS-1$
+			"_START", //$NON-NLS-1$
+			"" //$NON-NLS-1$
+	};
+
+	/**
+	 * Exit name prefixes
+	 */
+	private static final String[] EXIT_NAME_PREFIXES = { "", //$NON-NLS-1$
+			"EVENT_", //$NON-NLS-1$
+			"" //$NON-NLS-1$
+	};
+
+	/**
+	 * Exit name suffixes
+	 */
+	public static final String[] EXIT_NAME_SUFFIXES = { "_EXIT", //$NON-NLS-1$
+			"_STOP", //$NON-NLS-1$
+			"" //$NON-NLS-1$
+	};
+
+	/**
+	 * Gets an entry template title
+	 * 
+	 * @param type
+	 *            the template type
+	 * @return the template title
+	 */
+	static String getEntryTemplateTitle(int type) {
+		return ENTRY_TEMPLATE_TITLES[type];
+	}
+
+	/**
+	 * Creates exit name from entry name
+	 * 
+	 * @param entryName
+	 *            the entry name
+	 * @param type
+	 *            the type of entry
+	 * @return the exit name
+	 */
+	static String createExitName(String entryName, int type) {
+		// Strips the duplicate modifier from the name
+		entryName = TraceObjectUtils.removeDuplicateModifier(entryName);
+		StringBuffer sb = new StringBuffer();
+		if (entryName.startsWith(ENTRY_NAME_PREFIXES[type])) {
+			entryName = entryName.substring(ENTRY_NAME_PREFIXES[type].length());
+		}
+		if (entryName.endsWith(ENTRY_NAME_SUFFIXES[type])) {
+			entryName = entryName.substring(0, entryName.length()
+					- ENTRY_NAME_SUFFIXES[type].length());
+		}
+		sb.append(EXIT_NAME_PREFIXES[type]);
+		sb.append(entryName);
+		sb.append(EXIT_NAME_SUFFIXES[type]);
+		return sb.toString();
+	}
+
+	/**
+	 * Creates an entry trace name format from type
+	 * 
+	 * @param type
+	 *            the trace format type
+	 * @return the trace name format
+	 */
+	public static String createEntryTraceNameFormat(int type) {
+		StringBuffer sb = new StringBuffer();
+		if (type == TYPE_PERF_EVENT || type == TYPE_STATE_TRACE) {
+			sb.append(NAME_FORMAT_BASE);
+		} else {
+			sb.append(ENTRY_NAME_PREFIXES[type]);
+			sb.append(NAME_FORMAT_BASE);
+			sb.append(ENTRY_NAME_SUFFIXES[type]);
+		}
+		return sb.toString();
+	}
+
+	/**
+	 * Creates an exit trace name format based on type
+	 * 
+	 * @param type
+	 *            the format type
+	 * @return the trace name format
+	 */
+	public static String createExitTraceNameFormat(int type) {
+		StringBuffer sb = new StringBuffer();
+		sb.append(EXIT_NAME_PREFIXES[type]);
+		sb.append(NAME_FORMAT_BASE);
+		sb.append(EXIT_NAME_SUFFIXES[type]);
+		return sb.toString();
+	}
+
+	/**
+	 * Gets the return statements from current context from the context manager.
+	 * 
+	 * @param returnStatements
+	 *            the list where the return statements are stored
+	 */
+	static void getCurrentContextReturns(List<SourceReturn> returnStatements) {
+		SourceContext context = TraceCompilerEngineGlobals.getSourceContextManager()
+				.getContext();
+		if (context != null) {
+			try {
+				context.parseReturnValues(returnStatements);
+			} catch (SourceParserException e) {
+				String msg = Messages
+						.getString("RuleUtils.FailedToParseReturnValues"); //$NON-NLS-1$
+				String cname = context.getClassName();
+				String source;
+				if (cname != null) {
+					source = cname + "::" + context.getFunctionName(); //$NON-NLS-1$;
+				} else {
+					source = context.getFunctionName();
+				}
+				TraceCompilerEngineGlobals.getEvents().postErrorMessage(msg, source,
+						true);
+			}
+		} else {
+			if (TraceCompilerEngineConfiguration.ASSERTIONS_ENABLED) {
+				TraceCompilerEngineGlobals.getEvents().postAssertionFailed(
+						"Function return not in function", null); //$NON-NLS-1$
+			}
+		}
+	}
+
+	/**
+	 * Checks if the function is static. Currently this is just dummy, checking
+	 * that the class name exists and the function name is not New / NewL /
+	 * NewLC
+	 * 
+	 * @param context
+	 *            the context to be checked
+	 * @return true if static, false if not
+	 */
+	static boolean isStaticFunction(SourceContext context) {
+		boolean retval;
+		if (context.getClassName() == null) {
+			retval = true;
+		} else {
+			String fname = context.getFunctionName();
+			if (fname.equals("New") //$NON-NLS-1$
+					|| fname.equals("NewL") //$NON-NLS-1$
+					|| fname.equals("NewLC") //$NON-NLS-1$
+			) {
+				retval = true;
+			} else {
+				retval = false;
+			}
+		}
+		return retval;
+	}
+
+	/**
+	 * Locates a constant table based on type definition parsed from source
+	 * 
+	 * @param model
+	 *            the trace model
+	 * @param type
+	 *            the parameter type
+	 * @return the constant table or null if not found
+	 */
+	static TraceConstantTable findConstantTableByType(TraceModel model,
+			ParsedType type) {
+		Iterator<TraceConstantTable> tables = model.getConstantTables();
+		TraceConstantTable foundTable = null;
+		while (tables.hasNext() && foundTable == null) {
+			TraceConstantTable table = tables.next();
+			if (type.typeEquals(table.getName())) {
+				foundTable = table;
+			}
+		}
+		return foundTable;
+	}
+
+	/**
+	 * Creates a parameter based on TypeMapping definition
+	 * 
+	 * @param owner
+	 *            the parameter owner
+	 * @param name
+	 *            the parameter name
+	 * @param type
+	 *            the type mapping
+	 * @return the parameter
+	 * @throws TraceCompilerException
+	 *             if parameter cannot be created
+	 */
+	static TraceParameter createParameterFromType(Trace owner, String name,
+			TypeMapping type) throws TraceCompilerException {
+		int id = owner.getNextParameterID();
+		owner.getModel().getVerifier().checkTraceParameterProperties(owner,
+				null, id, name, type.type);
+		TraceModelExtension[] extensions = null;
+		if (type.needsCasting || type.valueToPointer
+				|| type.type.equals(TraceParameter.TIME)) {
+			extensions = new TraceModelExtension[1];
+			extensions[0] = new ParameterTypeMappingRule(type);
+		}
+		TraceParameter parameter = owner.getModel().getFactory()
+				.createTraceParameter(owner, id, name, type.type, extensions);
+		return parameter;
+	}
+
+	/**
+	 * Creates a parameter object from constant table
+	 * 
+	 * @param owner
+	 *            the parameter owner
+	 * @param name
+	 *            the name for the parameter
+	 * @param table
+	 *            the constant table
+	 * @return the parameter
+	 * @throws TraceCompilerException
+	 *             if parameter cannot be created
+	 */
+	static TraceParameter createParameterFromConstantTable(Trace owner,
+			String name, TraceConstantTable table) throws TraceCompilerException {
+		int id = owner.getNextParameterID();
+		owner.getModel().getVerifier().checkTraceParameterProperties(owner,
+				null, id, name, table.getType());
+		// Constant tables need a cast to constant table type
+		TypeMapping type = new TypeMapping(table.getType());
+		type.needsCasting = true;
+		TraceModelExtension[] extensions = new TraceModelExtension[1];
+		extensions[0] = new ParameterTypeMappingRule(type);
+		return owner.getModel().getFactory().createTraceParameter(owner, id,
+				name, table.getName(), extensions);
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/RulesEngine.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,383 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Implementation of TraceObjectRuleFactory interface
+*
+*/
+package com.nokia.tracecompiler.engine.rules;
+
+import java.util.Iterator;
+
+import com.nokia.tracecompiler.engine.TraceCompilerEngineConfiguration;
+import com.nokia.tracecompiler.engine.TraceCompilerEngineConfigurationListener;
+import com.nokia.tracecompiler.engine.TraceCompilerEngineGlobals;
+import com.nokia.tracecompiler.engine.header.ComplexHeaderRule;
+import com.nokia.tracecompiler.engine.rules.osttrace.OstTraceFormatRule;
+import com.nokia.tracecompiler.engine.source.SourceParserRule;
+import com.nokia.tracecompiler.engine.source.TraceParameterFormattingRule;
+import com.nokia.tracecompiler.model.Trace;
+import com.nokia.tracecompiler.model.TraceCompilerException;
+import com.nokia.tracecompiler.model.TraceModel;
+import com.nokia.tracecompiler.model.TraceModelExtension;
+import com.nokia.tracecompiler.model.TraceModelListener;
+import com.nokia.tracecompiler.model.TraceModelPersistentExtension;
+import com.nokia.tracecompiler.model.TraceModelResetListener;
+import com.nokia.tracecompiler.model.TraceObject;
+import com.nokia.tracecompiler.model.TraceObjectRuleFactory;
+import com.nokia.tracecompiler.model.TraceParameter;
+import com.nokia.tracecompiler.project.TraceProjectAPI;
+import com.nokia.tracecompiler.rules.FillerParameterRule;
+import com.nokia.tracecompiler.source.SourceUtils;
+
+/**
+ * Provides rules for trace objects.
+ * 
+ */
+public class RulesEngine implements TraceObjectRuleFactory {
+
+	/**
+	 * Number of parameters in a simple trace
+	 */
+	private static final int SIMPLE_TRACE_MAX_PARAMETER_COUNT = 1;
+
+	/**
+	 * Trace model listener updates the fillers and complex type flagging when
+	 * traces and parameters are modified
+	 */
+	private TraceModelListener modelListener;
+
+	/**
+	 * Trace model reset listener uses modelValid to update the complex header
+	 * rules
+	 */
+	private TraceModelResetListener resetListener;
+
+	/**
+	 * Manager for plug-in API's
+	 */
+	private RulesEnginePluginManager pluginManager;
+
+	/**
+	 * Configuration listener for source format changes
+	 */
+	private TraceCompilerEngineConfigurationListener configurationListener = new RulesEngineConfigurationListener(
+			this);
+
+	/**
+	 * Trace model
+	 */
+	private TraceModel model;
+
+	/**
+	 * Constructor
+	 */
+	public RulesEngine() {
+		TraceCompilerEngineGlobals.getConfiguration().addConfigurationListener(
+				configurationListener);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.model.TraceObjectRuleFactory#
+	 *      createExtension(com.nokia.tracecompiler.model.TraceObject,
+	 *      java.lang.String)
+	 */
+	public TraceModelPersistentExtension createExtension(TraceObject target,
+			String name) {
+		TraceModelPersistentExtension retval = null;
+		ClassNameWrapper[] table = RulesEngineConstants.PERSISTENT_EXTENSIONS;
+		for (int i = 0; i < table.length && retval == null; i++) {
+			if (name.equals(table[i].name)) {
+				retval = createPersistentExtensionAt(target, i);
+			}
+		}
+		return retval;
+	}
+
+	/**
+	 * Creates a persistent extension
+	 * 
+	 * @param target
+	 *            the target object
+	 * @param i
+	 *            index to the persistent extensions array
+	 * @return the extension
+	 */
+	private TraceModelPersistentExtension createPersistentExtensionAt(
+			TraceObject target, int i) {
+		ClassNameWrapper wrapper = RulesEngineConstants.PERSISTENT_EXTENSIONS[i];
+		TraceModelPersistentExtension retval = null;
+		TraceModelPersistentExtension o = target.getExtension(wrapper.clasz);
+		if (o == null) {
+			try {
+				retval = wrapper.clasz.newInstance();
+			} catch (Exception e) {
+				if (TraceCompilerEngineConfiguration.ASSERTIONS_ENABLED) {
+					TraceCompilerEngineGlobals.getEvents().postAssertionFailed(
+							"Invalid extension - " + wrapper.name, null); //$NON-NLS-1$
+				}
+			}
+		}
+		return retval;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.model.TraceObjectRuleFactory#
+	 *      preProcessNewRules(com.nokia.tracecompiler.model.TraceObject)
+	 */
+	public void preProcessNewRules(TraceObject object) {
+		if (object instanceof TraceModel) {
+			// NOTE: This is only called once when builder is started
+			// There is no cleanup code
+			this.model = (TraceModel) object;
+			modelListener = new RulesEngineModelListener(this);
+			resetListener = new RulesEngineResetListener(this, model);
+			model.addModelListener(modelListener);
+			model.addResetListener(resetListener);
+			// Adds the plug-in trace parser / formatter manager to the model as
+			// extension. The plug-in manager delegates the formatters and
+			// parsers to this object when plug-in components register to
+			// TraceCompiler.
+			pluginManager = new RulesEnginePluginManager(this);
+			model.addExtension(pluginManager);
+			createTraceParsers();
+			createTraceAPIs();
+		}
+	}
+
+	/**
+	 * Creates the trace parsers and stores them to the model
+	 */
+	private void createTraceParsers() {
+		for (SourceParserRule element : RulesEngineConstants.TRACE_PARSERS) {
+			// Creates all source parsers specified in the constants
+			model.addExtension(element);
+		}
+	}
+
+	/**
+	 * Creates the default trace API's and adds them to the plug-in manager
+	 */
+	private void createTraceAPIs() {
+		for (TraceProjectAPI api : RulesEngineConstants.TRACE_APIS) {
+			pluginManager.addAPI(api);
+		}
+	}
+
+	/**
+	 * Creates the trace formatter and stores it to the model
+	 */
+	void setDefaultTraceAPI() {
+		// If the formatter did not exist in the project file, it is added based
+		// on the configuration default
+		if (model.getExtension(TraceProjectAPI.class) == null) {
+			String api = TraceCompilerEngineGlobals.getConfiguration().getText(
+					TraceCompilerEngineConfiguration.FORMATTER_NAME);
+			traceAPIChanged(api);
+		}
+	}
+
+	/**
+	 * API change notification
+	 * 
+	 * @param apiName
+	 *            the name of new api
+	 */
+	void traceAPIChanged(String apiName) {
+		TraceProjectAPI api = model.getExtension(TraceProjectAPI.class);
+		boolean found = false;
+		if (api != null) {
+			if (api.getName().equals(apiName)) {
+				found = true;
+			} else {
+				model.removeExtension(api);
+			}
+		}
+		if (!found) {
+			changeTraceAPI(apiName);
+		}
+	}
+
+	/**
+	 * Creates a trace API
+	 * 
+	 * @param apiName
+	 *            the name of the API to be created
+	 */
+	void changeTraceAPI(String apiName) {
+		if (apiName == null || apiName.length() == 0) {
+			apiName = OstTraceFormatRule.STORAGE_NAME;
+		}
+		Iterator<TraceProjectAPI> apis = pluginManager.getAPIs();
+		boolean apifound = false;
+		while (apis.hasNext()) {
+			TraceProjectAPI api = apis.next();
+			if (api.getName().equals(apiName)) {
+				model.addExtension(api);
+				apifound = true;
+			}
+		}
+		if (!apifound) {
+			// If API from configuration was not found, the first one is used
+			apis = pluginManager.getAPIs();
+			if (apis.hasNext()) {
+				model.addExtension(apis.next());
+			}
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.model.TraceObjectRuleFactory#
+	 *      postProcessNewRules(com.nokia.tracecompiler.model.TraceObject)
+	 */
+	public void postProcessNewRules(TraceObject object) {
+	}
+
+	/**
+	 * Checks the count and types of parameters of given trace and flags it with
+	 * ComplexParameterRule if necessary
+	 * 
+	 * @param trace
+	 *            the trace
+	 */
+	void checkParameterTypes(Trace trace) {
+		// When converting traces from source, the converter takes care of
+		// flagging the traces as complex. The complex flag needs to be checked
+		// when trace are modified via UI
+		if (!TraceCompilerEngineGlobals.getSourceContextManager().isConverting()) {
+			boolean complex = false;
+			int count = trace.getParameterCount();
+			Iterator<TraceParameter> itr = trace.getParameters();
+			while (itr.hasNext() && !complex) {
+				TraceParameter parameter = itr.next();
+				TraceParameterFormattingRule rule = parameter
+						.getExtension(TraceParameterFormattingRule.class);
+				boolean isShown = true;
+				if (rule != null && !rule.isShownInSource()) {
+					isShown = false;
+				}
+				if (isShown) {
+					complex = !SourceUtils.isSimpleType(parameter);
+				} else {
+					count--;
+				}
+			}
+			// Any trace with more than one parameter is a complex trace
+			if (!complex && count > SIMPLE_TRACE_MAX_PARAMETER_COUNT) {
+				complex = true;
+			}
+			ComplexHeaderRule rule = trace
+					.getExtension(ComplexHeaderRule.class);
+			if (complex && rule == null) {
+				trace.addExtension(new ComplexHeaderRuleImpl());
+			} else if (!complex && rule != null) {
+				trace.removeExtension(rule);
+			}
+		}
+	}
+
+	/**
+	 * Adds fillers to align trace parameters to 32-bit boundaries.
+	 * 
+	 * @param trace
+	 *            the trace to be updated
+	 * @throws TraceCompilerException 
+	 */
+	void checkFillerParameters(Trace trace) throws TraceCompilerException {
+		// Flags the model so listeners don't perform intermediate updates
+		trace.getModel().startProcessing();
+		try {
+			// Removes all existing fillers
+			for (int i = 0; i < trace.getParameterCount(); i++) {
+				TraceParameter parameter = trace.getParameter(i);
+				if (parameter.getExtension(FillerParameterRule.class) != null) {
+					trace.removeParameterAt(i);
+					i--;
+				}
+			}
+			int bytesInBlock = 0;
+			int parameterIndex = 0;
+			for (; parameterIndex < trace.getParameterCount(); parameterIndex++) {
+				TraceParameter parameter = trace.getParameter(parameterIndex);
+				int paramSize = SourceUtils.mapParameterTypeToSize(parameter);
+				// Parameters are aligned to 32 bits. Parameter after
+				// end-of-string is aligned dynamically and thus no filler is
+				// created for it
+				if (paramSize == 0 || paramSize == 4 || paramSize == 8) { // CodForChk_Dis_Magic
+					if (bytesInBlock > 0) {
+						int fillerCount = 4 - bytesInBlock; // CodForChk_Dis_Magic
+						for (int i = 0; i < fillerCount; i++) {
+							createFillerParameter(trace, parameterIndex++);
+						}
+						bytesInBlock = 0;
+					}
+				} else if (paramSize == 2) { // CodForChk_Dis_Magic
+					if (bytesInBlock == 1 || bytesInBlock == 3) { // CodForChk_Dis_Magic
+						createFillerParameter(trace, parameterIndex++);
+						// If there was 1 existing byte and filler was added,
+						// the number of bytes in the block is now 4 including
+						// the 2-byte parameter. If there was 3 bytes, the
+						// filler brings it to 4 and the 16-bit parameter
+						// changes it to 2
+						bytesInBlock += 3; // CodForChk_Dis_Magic
+					} else {
+						bytesInBlock += 2; // CodForChk_Dis_Magic
+					}
+					if (bytesInBlock >= 4) { // CodForChk_Dis_Magic
+						bytesInBlock -= 4; // CodForChk_Dis_Magic
+					}
+				} else {
+					bytesInBlock++;
+					if (bytesInBlock == 4) { // CodForChk_Dis_Magic
+						bytesInBlock = 0;
+					}
+				}
+			}
+			// Adds fillers also the the end of the parameter list
+			if (bytesInBlock > 0) {
+				int fillerCount = 4 - bytesInBlock; // CodForChk_Dis_Magic
+				for (int i = 0; i < fillerCount; i++) {
+					createFillerParameter(trace, parameterIndex++);
+				}
+				bytesInBlock = 0;
+			}
+		} finally {
+			trace.getModel().processingComplete();
+		}
+	}
+
+	/**
+	 * Creates a filler parameter
+	 * 
+	 * @param trace
+	 *            the trace for the parameter
+	 * @param parameterIndex
+	 *            the index where the filler is inserted
+	 * @throws TraceCompilerException 
+	 */
+	private void createFillerParameter(Trace trace, int parameterIndex) throws TraceCompilerException {
+		trace.getModel().getFactory().createTraceParameter(parameterIndex,
+				trace, trace.getParameterCount(),
+				"Filler", //$NON-NLS-1$
+				TraceParameter.HEX8,
+				new TraceModelExtension[] { new FillerParameterRuleImpl() });
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/RulesEngineConfigurationListener.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,58 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Configuration listener
+*
+*/
+package com.nokia.tracecompiler.engine.rules;
+
+import com.nokia.tracecompiler.engine.TraceCompilerEngineConfiguration;
+import com.nokia.tracecompiler.engine.TraceCompilerEngineConfigurationListener;
+import com.nokia.tracecompiler.engine.TraceCompilerEngineGlobals;
+
+/**
+ * Configuration listener for rule engine monitors the trace formatting
+ * 
+ */
+final class RulesEngineConfigurationListener implements
+		TraceCompilerEngineConfigurationListener {
+
+	/**
+	 * Rules engine
+	 */
+	private RulesEngine engine;
+
+	/**
+	 * Constructor
+	 * 
+	 * @param engine
+	 *            the rules engine
+	 */
+	RulesEngineConfigurationListener(RulesEngine engine) {
+		this.engine = engine;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engine.TraceCompilerConfigurationListener#configurationCreated()
+	 */
+	public void configurationCreated() {
+		if (TraceCompilerEngineConfiguration.ALLOW_FORMAT_CHANGE) {
+			engine.traceAPIChanged(TraceCompilerEngineGlobals.getConfiguration()
+					.getText(TraceCompilerEngineConfiguration.FORMATTER_NAME));
+		}
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/RulesEngineConstants.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,58 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Properties associated with formatting rules
+*
+*/
+package com.nokia.tracecompiler.engine.rules;
+
+import com.nokia.tracecompiler.engine.rules.osttrace.OstTraceFormatRule;
+import com.nokia.tracecompiler.engine.rules.osttrace.OstTraceParserRule;
+import com.nokia.tracecompiler.engine.source.SourceParserRule;
+import com.nokia.tracecompiler.project.TraceProjectAPI;
+
+/**
+ * Constants for rules engine
+ * 
+ */
+interface RulesEngineConstants {
+
+	/**
+	 * Trace parsers
+	 */
+	SourceParserRule[] TRACE_PARSERS = { new OstTraceParserRule() };
+
+	/**
+	 * Printf parsers
+	 */
+	String[] PRINTF_PARSERS = { "RDebug::Print", //$NON-NLS-1$
+			"Kern::Printf" //$NON-NLS-1$
+	};
+
+	/**
+	 * List of supported API's
+	 */
+	TraceProjectAPI[] TRACE_APIS = { new OstTraceFormatRule() };
+
+	/**
+	 * Persistent extensions
+	 */
+	ClassNameWrapper[] PERSISTENT_EXTENSIONS = {
+			new ClassNameWrapper(ParameterTypeMappingRule.STORAGE_NAME,
+					ParameterTypeMappingRule.class),
+			new ClassNameWrapper(ArrayParameterRuleImpl.STORAGE_NAME,
+					ArrayParameterRuleImpl.class) };
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/RulesEngineModelListener.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,119 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Trace model listener
+*
+*/
+package com.nokia.tracecompiler.engine.rules;
+
+import com.nokia.tracecompiler.model.Trace;
+import com.nokia.tracecompiler.model.TraceCompilerException;
+import com.nokia.tracecompiler.model.TraceModelListener;
+import com.nokia.tracecompiler.model.TraceObject;
+import com.nokia.tracecompiler.model.TraceParameter;
+import com.nokia.tracecompiler.rules.FillerParameterRule;
+
+/**
+ * Trace model listener
+ * 
+ */
+final class RulesEngineModelListener implements TraceModelListener {
+
+	/**
+	 * Rules engine
+	 */
+	private final RulesEngine engine;
+
+	/**
+	 * Constructor
+	 * 
+	 * @param engine
+	 *            rules engine
+	 */
+	RulesEngineModelListener(RulesEngine engine) {
+		this.engine = engine;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.model.TraceModelListener#
+	 *      objectAdded(com.nokia.tracecompiler.model.TraceObject,
+	 *      com.nokia.tracecompiler.model.TraceObject)
+	 */
+	public void objectAdded(TraceObject owner, TraceObject object) {
+		// Updated in objectCreationComplete
+	}
+
+
+	/* (non-Javadoc)
+	 * @see com.nokia.tracecompiler.model.TraceModelListener#objectRemoved(com.nokia.tracecompiler.model.TraceObject, com.nokia.tracecompiler.model.TraceObject)
+	 */
+	public void objectRemoved(TraceObject owner, TraceObject object) throws TraceCompilerException {
+		if (owner instanceof Trace && object instanceof TraceParameter) {
+			engine.checkParameterTypes((Trace) owner);
+			if (object.getExtension(FillerParameterRule.class) == null) {
+				engine.checkFillerParameters((Trace) owner);
+			}
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.model.TraceModelListener#
+	 *      propertyUpdated(com.nokia.tracecompiler.model.TraceObject, int)
+	 */
+	public void propertyUpdated(TraceObject object, int property) throws TraceCompilerException {
+		if (object.getModel().isValid() && object.isComplete()
+				&& object instanceof TraceParameter
+				&& property == TraceModelListener.TYPE) {
+			Trace owner = ((TraceParameter) object).getTrace();
+			if (owner.isComplete()) {
+				engine.checkParameterTypes(owner);
+				engine.checkFillerParameters(owner);
+			}
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.model.TraceModelListener#
+	 *      objectCreationComplete(com.nokia.tracecompiler.model.TraceObject)
+	 */
+	public void objectCreationComplete(TraceObject object) throws TraceCompilerException {
+		if (object.getModel().isValid()) {
+			if (object instanceof TraceParameter) {
+				Trace owner = ((TraceParameter) object).getTrace();
+				if (owner.isComplete()) {
+					engine.checkParameterTypes(owner);
+					// When adding fillers, the check is not done
+					if (object.getExtension(FillerParameterRule.class) == null) {
+						engine.checkFillerParameters(owner);
+					}
+				}
+			} else if (object instanceof Trace) {
+				// When a trace with multiple parameters is created, the
+				// above branch does not get entered since the trace is not
+				// yet complete. Check is made after trace is complete
+				if (((Trace) object).getParameterCount() > 0) {
+					engine.checkParameterTypes((Trace) object);
+					engine.checkFillerParameters((Trace) object);
+				}
+			}
+		}
+	}
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/RulesEnginePluginManager.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,129 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Plug-in formatter / parser management
+*
+*/
+package com.nokia.tracecompiler.engine.rules;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+
+import com.nokia.tracecompiler.engine.plugin.TraceAPIPluginManager;
+import com.nokia.tracecompiler.model.TraceModel;
+import com.nokia.tracecompiler.model.TraceObject;
+import com.nokia.tracecompiler.plugin.TraceAPIFormatter;
+import com.nokia.tracecompiler.plugin.TraceAPIParser;
+import com.nokia.tracecompiler.project.TraceProjectAPI;
+import com.nokia.tracecompiler.project.TraceProjectAPIList;
+
+/**
+ * Plug-in formatter / parser management
+ * 
+ */
+final class RulesEnginePluginManager implements TraceAPIPluginManager,
+		TraceProjectAPIList {
+
+	/**
+	 * Rules engine
+	 */
+	private RulesEngine engine;
+
+	/**
+	 * Trace model
+	 */
+	private TraceModel model;
+
+	/**
+	 * List of API's
+	 */
+	private ArrayList<TraceProjectAPI> apis = new ArrayList<TraceProjectAPI>();
+
+	/**
+	 * Constructor
+	 * 
+	 * @param engine
+	 *            the plug-in engine
+	 */
+	RulesEnginePluginManager(RulesEngine engine) {
+		this.engine = engine;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engine.plugin.TraceAPIPluginManager#
+	 *      addFormatters(com.nokia.tracecompiler.plugin.TraceAPIFormatter[])
+	 */
+	public void addFormatters(TraceAPIFormatter[] formatters) {
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engine.plugin.TraceAPIPluginManager#
+	 *      addParsers(com.nokia.tracecompiler.plugin.TraceAPIParser[])
+	 */
+	public void addParsers(TraceAPIParser[] parsers) {
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engine.plugin.TraceAPIPluginManager#createDefaultAPI()
+	 */
+	public void createDefaultAPI() {
+		engine.setDefaultTraceAPI();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.model.TraceModelExtension#getOwner()
+	 */
+	public TraceObject getOwner() {
+		return model;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.model.TraceModelExtension#
+	 *      setOwner(com.nokia.tracecompiler.model.TraceObject)
+	 */
+	public void setOwner(TraceObject owner) {
+		model = (TraceModel) owner;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.project.TraceProjectAPIList#getAPIs()
+	 */
+	public Iterator<TraceProjectAPI> getAPIs() {
+		return apis.iterator();
+	}
+
+	/**
+	 * Adds an API to the list
+	 * 
+	 * @param api
+	 *            the API
+	 */
+	void addAPI(TraceProjectAPI api) {
+		apis.add(api);
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/RulesEngineResetListener.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,96 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Model reset listener
+*
+*/
+package com.nokia.tracecompiler.engine.rules;
+
+import com.nokia.tracecompiler.model.Trace;
+import com.nokia.tracecompiler.model.TraceCompilerException;
+import com.nokia.tracecompiler.model.TraceGroup;
+import com.nokia.tracecompiler.model.TraceModel;
+import com.nokia.tracecompiler.model.TraceModelResetListener;
+import com.nokia.tracecompiler.project.TraceProjectAPI;
+
+/**
+ * Model reset listener
+ * 
+ */
+final class RulesEngineResetListener implements TraceModelResetListener {
+
+	/**
+	 * Rule engine
+	 */
+	private final RulesEngine engine;
+
+	/**
+	 * Trace model
+	 */
+	private final TraceModel model;
+
+	/**
+	 * Constructor
+	 * 
+	 * @param engine
+	 *            rule engine
+	 * @param model
+	 *            the trace model
+	 */
+	RulesEngineResetListener(RulesEngine engine, TraceModel model) {
+		this.engine = engine;
+		this.model = model;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.model.TraceModelResetListener#modelResetting()
+	 */
+	public void modelResetting() {
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.model.TraceModelResetListener#modelReset()
+	 */
+	public void modelReset() {
+		model.removeExtensions(TraceProjectAPI.class);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.model.TraceModelResetListener#modelValid(boolean)
+	 */
+	public void modelValid(boolean valid) throws TraceCompilerException {
+		if (valid) {
+			model.startProcessing();
+			try {
+				// Creates the trace API if it does not exist yet
+				engine.setDefaultTraceAPI();
+				// Adds filler parameters to correct places
+				for (TraceGroup group : model) {
+					for (Trace trace : group) {
+						engine.checkFillerParameters(trace);
+					}
+				}
+			} finally {
+				model.processingComplete();
+			}
+		}
+	}
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/SourceParserRuleBase.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,565 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Implementation of parser rule
+*
+*/
+package com.nokia.tracecompiler.engine.rules;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import com.nokia.tracecompiler.engine.TraceLocation;
+import com.nokia.tracecompiler.engine.TraceCompilerEngineErrorCodes.StringErrorParameters;
+import com.nokia.tracecompiler.engine.TraceCompilerEngineErrorCodes.TraceCompilerErrorCode;
+import com.nokia.tracecompiler.engine.source.SourceParserResult;
+import com.nokia.tracecompiler.engine.source.SourceParserRule;
+import com.nokia.tracecompiler.engine.utils.TraceUtils;
+import com.nokia.tracecompiler.model.Trace;
+import com.nokia.tracecompiler.model.TraceCompilerException;
+import com.nokia.tracecompiler.model.TraceModelExtension;
+import com.nokia.tracecompiler.project.TraceLocationParser;
+import com.nokia.tracecompiler.project.TraceProjectAPI;
+import com.nokia.tracecompiler.source.FormatMapping;
+import com.nokia.tracecompiler.source.SourceConstants;
+import com.nokia.tracecompiler.source.SourceExcludedArea;
+import com.nokia.tracecompiler.source.SourceIterator;
+import com.nokia.tracecompiler.source.SourceParser;
+import com.nokia.tracecompiler.source.SourceParserException;
+import com.nokia.tracecompiler.source.SourceUtils;
+
+/**
+ * Base class for parser rules. Instances of this class are added to the trace
+ * model. The source engine uses the parses it finds from the model to find
+ * trace locations from source files
+ * 
+ */
+public abstract class SourceParserRuleBase extends RuleBase implements
+		SourceParserRule, TraceLocationParser {
+
+	/**
+	 * Tag to be searched from source
+	 */
+	private String tag;
+
+	/**
+	 * Allowed tag suffixes
+	 */
+	private ArrayList<String> tagSuffixes = new ArrayList<String>();
+
+	/**
+	 * Default name for a parameter
+	 */
+	public static final String DEFAULT_PARAMETER_NAME = "arg"; //$NON-NLS-1$
+
+	/**
+	 * Pattern for trimming c++ cast operator away from trace parameters
+	 */
+	private Pattern cppCastTrimPattern = Pattern.compile("\\s*(.+<.+>)\\s*"); //$NON-NLS-1$
+
+	/**
+	 * Pattern for trimming c cast operator away from trace parameters
+	 */
+	private Pattern cCastTrimPattern = Pattern.compile("(\\([^(]+?\\))"); //$NON-NLS-1$
+
+	/**
+	 * Pattern for getting a valid token from parameter data
+	 */
+	private Pattern parameterNamePattern = Pattern
+			.compile("[a-zA-Z][a-zA-Z\\d]*"); //$NON-NLS-1$
+
+	/**
+	 * Symbian literal tags
+	 */
+	private String[] TRACE_TEXT_TAGS = { "_L8", //$NON-NLS-1$
+			"_T8", //$NON-NLS-1$
+			"_L", //$NON-NLS-1$
+			"_T" //$NON-NLS-1$
+	};	
+	
+	
+	/**
+	 * Constructor
+	 * 
+	 * @param tag
+	 *            the tag to be searched from source
+	 * @param tagSuffixes
+	 *            the list of allowed suffixes to the tag
+	 */
+	protected SourceParserRuleBase(String tag, String[] tagSuffixes) {
+		this.tag = tag;
+		// Adds the sub-formats to the parsers
+		if (tagSuffixes != null) {
+			int len = tagSuffixes.length;
+			for (int i = 0; i < len; i++) {
+				this.tagSuffixes.add(tagSuffixes[i]);
+			}
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engine.source.SourceParserRule#getSearchTag()
+	 */
+	public String getSearchTag() {
+		return tag;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engine.source.SourceParserRule#
+	 *      isAllowedTagSuffix(java.lang.String)
+	 */
+	public boolean isAllowedTagSuffix(String tag) {
+		boolean retval = false;
+		if (tag != null) {
+			if (tag.length() == 0 && tagSuffixes.isEmpty()) {
+				retval = true;
+			} else {
+				for (int i = 0; i < tagSuffixes.size() && !retval; i++) {
+					String s = tagSuffixes.get(i);
+					if (s.length() == tag.length()) {
+						retval = true;
+						for (int j = 0; j < s.length() && retval; j++) {
+							char c1 = s.charAt(j);
+							// '?' can be any character
+							if (c1 != '?') {
+								retval = tag.charAt(j) == c1;
+							}
+						}
+					}
+				}
+			}
+		}
+		return retval;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engine.source.SourceParserRule#getName()
+	 */
+	public String getName() {
+		return null;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engine.source.SourceParserRule#
+	 *      parseParameters(java.util.List)
+	 */
+	public SourceParserResult parseParameters(String tag, List<String> list)
+			throws TraceCompilerException {
+		SourceParserResult result = new SourceParserResult();
+		result.traceText = trimTraceText(list.get(0));
+		result.originalName = result.traceText;
+		result.convertedName = TraceUtils.convertName(
+				SourceUtils.removePrintfFormatting(result.traceText))
+				.toUpperCase();
+		result.parameters = list.subList(1, list.size());
+		return result;
+	}
+
+	/**
+	 * Converts a location to trace
+	 * 
+	 * @param location
+	 *            the location to be converted
+	 * @return the conversion result
+	 * @throws TraceCompilerException
+	 *             if conversion fails
+	 */
+	public TraceConversionResult convertLocation(TraceLocation location)
+			throws TraceCompilerException {
+		// All parameter types are supported by default -> false is passed to
+		// buildParameterTypeList.
+		List<FormatMapping> types = buildParameterTypeList(location
+				.getTraceText(), false);
+		// Parameter count must match the number of format elements in trace
+		// text -> true is passed to convertLocation by default
+		return convertLocation(location, true, types);
+	}
+	
+	/**
+	 * Converts a location to trace
+	 * 
+	 * @param location
+	 *            the location to be converted
+	 * @param useParametersFromLocation
+	 *            true if location parameters need to be checked
+	 * @param types
+	 *            the parameter types list
+	 * @return the conversion result
+	 * @throws TraceCompilerException
+	 *             if conversion fails
+	 */
+	protected TraceConversionResult convertLocation(TraceLocation location,
+			boolean useParametersFromLocation, List<FormatMapping> types)
+			throws TraceCompilerException {
+		TraceConversionResult result = new TraceConversionResult();
+		result.text = location.getTraceText();
+
+		// If trace text is in multiple lines, remove extra characters
+		int removableAreaBeging = -1;
+		for (int i = 0; i < result.text.length(); i++) {
+			char c = result.text.charAt(i);
+			if (c == SourceConstants.QUOTE_CHAR
+					&& (i == 0 || result.text.charAt(i - 1) != SourceConstants.BACKSLASH_CHAR)) {
+				if (removableAreaBeging != -1) {
+					String startString = result.text.substring(0,
+							removableAreaBeging);
+					String endString = result.text.substring(i + 1, result.text
+							.length());
+					result.text = startString + endString;
+					i = removableAreaBeging;
+					removableAreaBeging = -1;
+				} else {
+					removableAreaBeging = i;
+				}
+			}
+		}
+
+		result.name = location.getConvertedName();
+
+		// If location parameters are used, the count must match the number of
+		// formats parsed from the trace string.
+		if (!useParametersFromLocation
+				|| (types.size() == location.getParameterCount() && numberOfParametersInTagMatchSize(
+						location.getTag(), types.size()))) {
+			result.parameters = new ArrayList<ParameterConversionResult>(types
+					.size());
+			Iterator<String> itr = location.getParameters();
+			// The FormatMapping objects are converted to
+			// ParameterConversionResult objects:
+			// - Name is associated to the parameter
+			// - Extensions are created
+			for (int i = 0; i < types.size(); i++) {
+				FormatMapping mapping = types.get(i);
+				String name;
+				if (useParametersFromLocation) {
+					name = TraceUtils.convertName(trimParameter(itr.next(), i));
+				} else {
+					name = DEFAULT_PARAMETER_NAME + (i + 1);
+				}
+				ParameterConversionResult param = mapFormatToConversionResult(mapping);
+				param.name = modifyDuplicateName(result.parameters, name);
+				result.parameters.add(param);
+			}
+		} else {
+			throw new TraceCompilerException(
+					TraceCompilerErrorCode.PARAMETER_FORMAT_MISMATCH, null,
+					location);
+		}
+		return result;
+	}
+
+	
+	
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engine.source.SourceParserRule#
+	 *      processNewLocation(com.nokia.tracecompiler.engine.TraceLocation)
+	 */
+	public void processNewLocation(TraceLocation location) {
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.project.TraceLocationParser#getLocationGroup()
+	 */
+	public String getLocationGroup() {
+		return null;
+	}
+
+	/**
+	 * Maps a format to conversion result
+	 * 
+	 * @param mapping
+	 *            the mapping
+	 * @return the conversion result
+	 */
+	protected ParameterConversionResult mapFormatToConversionResult(
+			FormatMapping mapping) {
+		ParameterConversionResult param = new ParameterConversionResult();
+		param.type = mapping.type;
+		if (mapping.isArray) {
+			param.extensions = new ArrayList<TraceModelExtension>();
+			param.extensions.add(new ArrayParameterRuleImpl());
+		}
+		return param;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engine.source.SourceParserRule#
+	 *      findLocationComment(com.nokia.tracecompiler.engine.TraceLocation)
+	 */
+	public SourceExcludedArea findLocationComment(TraceLocation location) {
+		SourceParser parser = location.getParser();
+		SourceExcludedArea excludedArea = null;
+		if (parser != null) {
+			try {
+				int offset = location.getOffset() + location.getLength();
+				SourceIterator itr = parser.createIterator(offset,
+						SourceParser.SKIP_WHITE_SPACES);
+				char c = itr.next();
+				if (c == ';') {
+					offset = itr.currentIndex();
+					c = itr.next();
+				}
+				boolean skippedReturn = false;
+				int commentStart = itr.currentIndex();
+				for (int i = offset; i < commentStart; i++) {
+					c = parser.getData(i);
+					if (c == '\n') {
+						skippedReturn = true;
+					}
+				}
+				// Comment must be on same line
+				if (!skippedReturn) {
+					excludedArea = parser.getExcludedArea(commentStart);
+				}
+				if (excludedArea == null) {
+					// If comment is not on same line, the previous line is
+					// checked
+					offset = parser.findStartOfLine(location.getOffset(), true,
+							true);
+					excludedArea = parser.getExcludedArea(offset - 1);
+				}
+			} catch (SourceParserException e) {
+			}
+		}
+		return excludedArea;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engine.source.SourceParserRule#getLocationParser()
+	 */
+	public TraceLocationParser getLocationParser() {
+		return this;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.project.TraceLocationParser#
+	 *      isLocationConverted(com.nokia.tracecompiler.engine.TraceLocation)
+	 */
+	public boolean isLocationConverted(TraceLocation location) {
+		return false;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.project.TraceLocationParser#
+	 *      checkLocationValidity(com.nokia.tracecompiler.engine.TraceLocation)
+	 */
+	public TraceCompilerErrorCode checkLocationValidity(TraceLocation location) {
+		Trace trace = location.getTrace();
+		TraceCompilerErrorCode retval = TraceCompilerErrorCode.TRACE_DOES_NOT_EXIST;
+		if (trace != null) {
+			retval = TraceCompilerErrorCode.OK;
+		} else {
+			// If the API does not match the parser, the needs conversion flag
+			// is set
+			TraceProjectAPI api = getOwner().getModel().getExtension(
+					TraceProjectAPI.class);
+			if (!api.getName().equals(location.getParserRule().getName())) {
+				retval = TraceCompilerErrorCode.TRACE_NEEDS_CONVERSION;
+			}
+		}
+		return retval;
+	}
+
+	/**
+	 * Checks if the number of the parameters in the trace tag matches the size
+	 * of parameter list
+	 * 
+	 * @param tag
+	 *            the trace tag
+	 * @param size
+	 *            size of the parameter list
+	 * @return true is parameter count matches, false otherwise
+	 */
+	private boolean numberOfParametersInTagMatchSize(String tag, int size) {
+		boolean matches = true;
+		// Parse the last character of the tag to a integer
+		if (tag != null) {
+			try {
+
+				// Check the tag parameter count and compare it to the size of
+				// the parameter list
+				String tagParamStr = tag.substring(tag.length() - 1);
+				int tagParamCount = Integer.parseInt(tagParamStr);
+
+				if (tagParamCount != size) {
+					matches = false;
+				}
+			} catch (NumberFormatException e) {
+			}
+		}
+		return matches;
+	}
+
+	/**
+	 * Builds the parameter type array which is passed to convertLocation
+	 * 
+	 * @param text
+	 *            the trace text
+	 * @param simpleParameters
+	 *            true if only simple types are supported
+	 * @return the list of types
+	 * @throws TraceCompilerException
+	 *             if parser fails
+	 */
+	protected List<FormatMapping> buildParameterTypeList(String text,
+			boolean simpleParameters) throws TraceCompilerException {
+		Matcher matcher = SourceUtils.traceTextPattern.matcher(text);
+		ArrayList<FormatMapping> types = new ArrayList<FormatMapping>();
+		boolean found = true;
+		do {
+			found = matcher.find();
+			if (found) {
+				String tag = matcher.group();
+				FormatMapping mapping = SourceUtils
+						.mapFormatToParameterType(tag);
+				if (simpleParameters && !mapping.isSimple) {
+					StringErrorParameters param = new StringErrorParameters();
+					param.string = tag;
+					throw new TraceCompilerException(
+							TraceCompilerErrorCode.PARAMETER_FORMAT_NEEDS_EXT_MACRO,
+							param, null);
+				}
+				types.add(mapping);
+			}
+		} while (found);
+		return types;
+	}
+
+	/**
+	 * Changes a duplicate parameter name to unique
+	 * 
+	 * @param parameters
+	 *            the list of existing parameters
+	 * @param name
+	 *            the name
+	 * @return the modified name
+	 */
+	private String modifyDuplicateName(
+			List<ParameterConversionResult> parameters, String name) {
+		String retval = name;
+		for (ParameterConversionResult result : parameters) {
+			if (result.name.equals(name)) {
+				retval = name + (parameters.size() + 1);
+				break;
+			}
+		}
+		return retval;
+	}
+
+	/**
+	 * Trims extra stuff away from trace text
+	 * 
+	 * @param data
+	 *            the data to be trimmed
+	 * @return trimmed text
+	 */
+	protected String trimTraceText(String data) {
+		// Removes literal macros
+		for (String element : TRACE_TEXT_TAGS) {
+			if (data.startsWith(element)) {
+				data = data.substring(element.length());
+			}
+		}
+		data = data.trim();
+		// Removes the opening bracket and quotes
+		data = removeBrackets(data);
+		if (data.startsWith("\"") //$NON-NLS-1$
+				&& data.length() >= 2) { // CodForChk_Dis_Magic
+			data = data.substring(1, data.length() - 1);
+		}
+		return data;
+	}
+
+	/**
+	 * Removes the brackets around the given data
+	 * 
+	 * @param data
+	 *            the data
+	 * @return the modified data
+	 */
+	protected String removeBrackets(String data) {
+		boolean canRemove = true;
+		while (data.startsWith("(") //$NON-NLS-1$
+				&& data.endsWith(")") //$NON-NLS-1$
+				&& canRemove) {
+			// If closing bracket is found first, the first bracket cannot be
+			// removed.
+			// TODO: Does not work with for example ((Cast)abc).Func()
+			// -> (Cast)abc).Func(
+			for (int i = 1; i < data.length() - 1 && canRemove; i++) {
+				if (data.charAt(i) == '(') {
+					i = data.length();
+				} else if (data.charAt(i) == ')') {
+					canRemove = false;
+				}
+			}
+			if (canRemove) {
+				data = data.substring(1, data.length() - 1).trim();
+			}
+		}
+		return data;
+	}
+
+	/**
+	 * Trims extra stuff away from a parameter to create a parameter label
+	 * 
+	 * @param data
+	 *            the parameter data
+	 * @param index
+	 *            the parameter index. The index will be used as label if the
+	 *            label cannot be parsed
+	 * @return the parameter label
+	 */
+	protected String trimParameter(String data, int index) {
+		// Removes possible literal macros
+		data = trimTraceText(data);
+		// Removes casting operations.
+		Matcher matcher = cppCastTrimPattern.matcher(data);
+		data = removeBrackets(matcher.replaceFirst("")); //$NON-NLS-1$
+		matcher = cCastTrimPattern.matcher(data);
+		data = matcher.replaceFirst(""); //$NON-NLS-1$
+		// Finds the next valid token from the data
+		matcher = parameterNamePattern.matcher(data);
+		if (matcher.find()) {
+			data = matcher.group();
+		} else {
+			data = DEFAULT_PARAMETER_NAME + (index + 1);
+		}
+		return data;
+	}	
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/StartOfFunctionLocationRule.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,62 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Location rule for start of function
+*
+*/
+package com.nokia.tracecompiler.engine.rules;
+
+import com.nokia.tracecompiler.engine.source.SourceLocationRule;
+
+/**
+ * Location rule for start of function
+ * 
+ */
+final class StartOfFunctionLocationRule extends RuleBase implements
+		SourceLocationRule {
+
+	/**
+	 * Location rule offset. Should be large enough to cover a function
+	 */
+	private static final int OFFSET = -100000; // CodForChk_Dis_Magic
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engine.source.SourceLocationRule#getType()
+	 */
+	public int getLocationType() {
+		return SourceLocationRule.CONTEXT_RELATIVE;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engine.source.SourceLocationRule#getOffset()
+	 */
+	public int getLocationOffset() {
+		return OFFSET;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engine.source.SourceLocationRule#isRemovedAfterInsert()
+	 */
+	public boolean isRemovedAfterInsert() {
+		return true;
+	}
+
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/StateTraceRule.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,41 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Rule for state traces
+*
+*/
+package com.nokia.tracecompiler.engine.rules;
+
+import com.nokia.tracecompiler.engine.utils.TraceUtils;
+import com.nokia.tracecompiler.source.SourceContext;
+
+/**
+ * Rule for state traces
+ * 
+ */
+public class StateTraceRule extends AutomaticTraceTextRule {
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engine.rules.AutomaticTraceTextRule#
+	 *      formatTrace(com.nokia.tracecompiler.source.SourceContext)
+	 */
+	@Override
+	public String formatTrace(SourceContext context) {
+		return TraceUtils.formatTrace(RuleUtils.TEXT_FORMAT_BASE, context
+				.getClassName(), context.getFunctionName());
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/ThisPointerParameterTemplate.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,33 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Template for "this" pointer parameter.
+*
+*/
+package com.nokia.tracecompiler.engine.rules;
+
+
+/**
+ * Template for "this" pointer parameter.
+ * 
+ */
+final class ThisPointerParameterTemplate  {
+
+	/**
+	 * Parameter name
+	 */
+	static final String PARAMETER_NAME = "this"; //$NON-NLS-1$
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/TraceFormatRuleBase.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,53 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Implementation of formatting rule
+*
+*/
+package com.nokia.tracecompiler.engine.rules;
+
+import com.nokia.tracecompiler.engine.source.TraceFormattingRule;
+import com.nokia.tracecompiler.model.Trace;
+import com.nokia.tracecompiler.project.TraceProjectAPI;
+
+/**
+ * Base class for project API's. Instance of this is added to the model and
+ * affect all traces which do not have their own formatter.
+ * 
+ */
+public abstract class TraceFormatRuleBase extends RuleBase implements
+		TraceFormattingRule, TraceProjectAPI {
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engine.source.TraceFormattingRule#
+	 *      mapNameToSource(com.nokia.tracecompiler.model.Trace)
+	 */
+	public String mapNameToSource(Trace trace) {
+		return trace.getName();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engine.source.TraceFormattingRule#
+	 *      mapParameterCountToSource(com.nokia.tracecompiler.model.Trace, int)
+	 */
+	public String mapParameterCountToSource(Trace trace, int count) {
+		return String.valueOf(count);
+	}
+
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/TraceParameterFormattingRuleBase.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,50 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Base class for parameter formatting rules
+*
+*/
+package com.nokia.tracecompiler.engine.rules;
+
+import com.nokia.tracecompiler.engine.source.TraceParameterFormattingRule;
+
+/**
+ * Base class for parameter formatting rules
+ * 
+ */
+class TraceParameterFormattingRuleBase extends RuleBase implements
+		TraceParameterFormattingRule {
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engine.source.TraceParameterFormattingRule#
+	 *      isShownInSource()
+	 */
+	public boolean isShownInSource() {
+		return true;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engine.source.TraceParameterFormattingRule#
+	 *      mapNameToSource(java.lang.String)
+	 */
+	public String mapNameToSource(String originalName) {
+		return originalName;
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/ValueParameterTemplate.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,33 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Template for "value" parameter.
+*
+*/
+package com.nokia.tracecompiler.engine.rules;
+
+
+/**
+ * Template for "value" parameter.
+ * 
+ */
+final class ValueParameterTemplate {
+
+	/**
+	 * Parameter name
+	 */
+	static final String PARAMETER_NAME = "value"; //$NON-NLS-1$
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/messages.properties	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,11 @@
+AddFunctionParametersFlag.Title=Add function parameters
+AddThisPtrFlag.Title=Add "this" pointer parameter
+AddReturnParameterFlag.Title=Add return value to exit traces
+ArrayParameterFlag.Title=Array Parameter
+RuleUtils.FunctionEntryTitle=Function Entry-Exit
+RuleUtils.PerformanceEventTitle=Performance Event Entry-Exit
+RuleUtils.StateTraceTitle=State Trace
+FunctionReturnLocationMultiplierRule.InvalidReturnStatement=Exit trace was not added to source, since it might produce unwanted side effects
+RuleUtils.FailedToParseReturnValues=Failed to parse return values
+AutoAddFunctionParametersRule.UnrecognizedTypeWarning=Unrecognized type -> Traced as pointer
+AddMatchingTraceFlag.Title=Add exit traces
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/osttrace/OstConstants.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,67 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Constants for OST parser and formatter
+*
+*/
+package com.nokia.tracecompiler.engine.rules.osttrace;
+
+/**
+ * Constants for OST parser and formatter
+ * 
+ */
+interface OstConstants {
+
+	/**
+	 * API tag for macros which have the preprocessor level parameter
+	 */
+	String PREPROCESSOR_LEVEL_TAG = "Def"; //$NON-NLS-1$
+
+	/**
+	 * API tag for function entry traces
+	 */
+	String FUNCTION_ENTRY_TAG = "FunctionEntry"; //$NON-NLS-1$
+
+	/**
+	 * API tag for function exit traces
+	 */
+	String FUNCTION_EXIT_TAG = "FunctionExit"; //$NON-NLS-1$
+
+	/**
+	 * API tag for performance event start
+	 */
+	String PERFORMANCE_EVENT_START_TAG = "EventStart"; //$NON-NLS-1$
+
+	/**
+	 * API tag for performance event stop
+	 */
+	String PERFORMANCE_EVENT_STOP_TAG = "EventStop"; //$NON-NLS-1$
+
+	/**
+	 * API tag for traces with user-defined data format
+	 */
+	String DATA_TRACE_TAG = "Data"; //$NON-NLS-1$
+	
+	/**
+	 * API tag for state traces
+	 */
+	String STATE_TRACE_TAG = "State"; //$NON-NLS-1$
+
+	/**
+	 * API tag for traces with extension parameters
+	 */
+	String EXTENSION_TRACE_TAG = "Ext"; //$NON-NLS-1$
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/osttrace/OstTraceFormatRule.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,348 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "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:
+ *
+ * Description:
+ *
+ * Formatting rule for OST traces
+ *
+ */
+package com.nokia.tracecompiler.engine.rules.osttrace;
+
+import com.nokia.tracecompiler.engine.header.ComplexHeaderRule;
+import com.nokia.tracecompiler.engine.rules.AutomaticTraceTextRule;
+import com.nokia.tracecompiler.engine.rules.EntryTraceRule;
+import com.nokia.tracecompiler.engine.rules.ExitTraceRule;
+import com.nokia.tracecompiler.engine.rules.PerformanceEventRuleBase;
+import com.nokia.tracecompiler.engine.rules.PerformanceEventStartRule;
+import com.nokia.tracecompiler.engine.rules.PerformanceEventStopRule;
+import com.nokia.tracecompiler.engine.rules.StateTraceRule;
+import com.nokia.tracecompiler.engine.rules.TraceFormatRuleBase;
+import com.nokia.tracecompiler.model.Trace;
+import com.nokia.tracecompiler.model.TraceModelListener;
+import com.nokia.tracecompiler.model.TraceObject;
+import com.nokia.tracecompiler.model.TraceParameter;
+import com.nokia.tracecompiler.plugin.TraceFormatConstants;
+import com.nokia.tracecompiler.plugin.TraceHeaderContribution;
+import com.nokia.tracecompiler.plugin.TraceAPIFormatter.TraceFormatType;
+import com.nokia.tracecompiler.source.SourceUtils;
+
+/**
+ * Formatting rule for OST traces.
+ * 
+ */
+public final class OstTraceFormatRule extends TraceFormatRuleBase implements
+		TraceHeaderContribution, TraceModelListener {
+
+	/**
+	 * Separator for parameters within trace text
+	 */
+	private static final String PARAMETER_VALUE_SEPARATOR = "="; //$NON-NLS-1$
+
+	/**
+	 * Separator for parameter name value
+	 */
+	private static final String PARAMETER_SEPARATOR = ";"; //$NON-NLS-1$
+
+	/**
+	 * String parameter tag
+	 */
+	private static final String STRING_PARAMETER_TAG = "%s"; //$NON-NLS-1$
+
+	/**
+	 * Hex parameter tag
+	 */
+	private static final String HEX_PARAMETER_TAG = "0x%x"; //$NON-NLS-1$
+
+	/**
+	 * SDEC parameter tag
+	 */
+	private static final String SDEC_PARAMETER_TAG = "%d"; //$NON-NLS-1$
+
+	/**
+	 * UDEC parameter tag
+	 */
+	private static final String UDEC_PARAMETER_TAG = "%u"; //$NON-NLS-1$	
+
+	/**
+	 * Category for traces
+	 */
+	private static final String TRACE_CATEGORY = "EXTRACT_GROUP_ID(aTraceID)"; //$NON-NLS-1$
+
+	/**
+	 * Name for storage
+	 */
+	public static final String STORAGE_NAME = "OstTraceFormat"; //$NON-NLS-1$
+
+	/**
+	 * OstTraceEventStart tag
+	 */
+	public static final String OST_TRACE_EVENT_START_TAG = "OstTraceEventStart"; //$NON-NLS-1$
+
+	/**
+	 * OstTraceEventStop tag
+	 */
+	public static final String OST_TRACE_EVENT_STOP_TAG = "OstTraceEventStop"; //$NON-NLS-1$
+
+	/**
+	 * Ext-function declaration format
+	 */
+	private static final String HEADER_FORMAT = "OstTraceGen" //$NON-NLS-1$
+			+ TraceFormatConstants.PARAM_COUNT_FORMAT // Number of parameters
+			+ "( TUint32 aTraceID" //$NON-NLS-1$
+			+ TraceFormatConstants.PARAMETERS_FORMAT // Trace parameters
+			+ " )"; //$NON-NLS-1$
+
+	/**
+	 * Activation query formatting
+	 */
+	private static final String ACTIVATION_FORMAT = "BTraceFiltered8( " //$NON-NLS-1$
+			+ TRACE_CATEGORY + ", " //$NON-NLS-1$
+			+ "EOstTraceActivationQuery, KOstTraceComponentID, aTraceID )"; //$NON-NLS-1$
+
+	/**
+	 * Buffered trace format
+	 */
+	private static final String TRACE_BUFFER_FORMAT = "OstSendNBytes( " //$NON-NLS-1$
+			+ TRACE_CATEGORY + ", " //$NON-NLS-1$
+			+ "EOstTrace, KOstTraceComponentID, aTraceID, " //$NON-NLS-1$
+			+ TraceFormatConstants.DATA_BUFFER_FORMAT // Trace data
+			+ ", " //$NON-NLS-1$
+			+ TraceFormatConstants.DATA_LENGTH_FORMAT // Trace data length
+			+ " );"; //$NON-NLS-1$
+
+	/**
+	 * Packed trace format
+	 */
+	private static final String TRACE_PACKED_FORMAT = "BTraceFilteredContext12( " //$NON-NLS-1$
+			+ TRACE_CATEGORY + ", " //$NON-NLS-1$
+			+ "EOstTrace, KOstTraceComponentID, aTraceID, " //$NON-NLS-1$
+			+ TraceFormatConstants.DATA_BUFFER_FORMAT // Trace data
+			+ " );"; //$NON-NLS-1$
+
+	/**
+	 * Template for the OstTraceDefinitions.h header file
+	 */
+	private static final String[] MAIN_HEADER_TEMPLATE = { "\r\n" //$NON-NLS-1$
+			+ "// OST_TRACE_COMPILER_IN_USE flag has been added by Trace Compiler\r\n" //$NON-NLS-1$
+			+ "// REMOVE BEFORE CHECK-IN TO VERSION CONTROL\r\n" //$NON-NLS-1$
+			+ "#define OST_TRACE_COMPILER_IN_USE\r\n" //$NON-NLS-1$
+			+ "#include <opensystemtrace.h>\r\n#endif\r\n" }; //$NON-NLS-1$
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.project.TraceProjectAPI#getName()
+	 */
+	public String getName() {
+		return STORAGE_NAME;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engine.source.TraceFormattingRule#
+	 * getFormat(com.nokia.tracecompiler.model.Trace,
+	 * com.nokia.tracecompiler.plugin.TraceAPIFormatter.TraceFormatType)
+	 */
+	public String getFormat(Trace trace, TraceFormatType formatType) { // CodForChk_Dis_ComplexFunc
+		String retval;
+		if (formatType == TraceFormatType.HEADER) {
+			retval = HEADER_FORMAT;
+		} else if (formatType == TraceFormatType.TRACE_BUFFER) {
+			retval = TRACE_BUFFER_FORMAT;
+		} else if (formatType == TraceFormatType.TRACE_PACKED) {
+			retval = TRACE_PACKED_FORMAT;
+		} else if (formatType == TraceFormatType.TRACE_ACTIVATION) {
+			retval = ACTIVATION_FORMAT;
+		} else {
+			retval = null;
+		}
+
+		return retval;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engine.source.SourceFormatRule#
+	 * mapParameterCountToSource(com.nokia.tracecompiler.model.Trace, int)
+	 */
+	@Override
+	public String mapParameterCountToSource(Trace trace, int count) {
+		String retval;
+		ComplexHeaderRule rule = trace.getExtension(ComplexHeaderRule.class);
+		if (rule != null && rule.getTraceIDDefineExtension() != null || trace.getExtension(EntryTraceRule.class)!= null) {
+			// Uses the extension tag with extension headers
+			retval = OstConstants.EXTENSION_TRACE_TAG;
+		} else {
+			retval = String.valueOf(count);
+		}
+		return retval;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.project.TraceHeaderContribution#
+	 * getContribution(com.nokia.tracecompiler.project.TraceHeaderContribution.
+	 * TraceHeaderContributionType)
+	 */
+	public String[] getContribution(TraceHeaderContributionType type) {
+		String[] retval = null;
+		if (type == TraceHeaderContributionType.GLOBAL_DEFINES) {
+			retval = new String[] { "KOstTraceComponentID 0x" //$NON-NLS-1$
+					+ Integer.toHexString(getOwner().getModel().getID()) };
+		} else if (type == TraceHeaderContributionType.MAIN_HEADER_CONTENT) {
+			retval = MAIN_HEADER_TEMPLATE;
+		}
+		return retval;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * com.nokia.tracecompiler.engine.rules.ExtensionBase#setOwner(com.nokia
+	 * .tracecompiler.model.TraceObject)
+	 */
+	@Override
+	public void setOwner(TraceObject owner) {
+		if (getOwner() != null) {
+			getOwner().getModel().removeModelListener(this);
+		}
+		super.setOwner(owner);
+		if (owner != null) {
+			owner.getModel().addModelListener(this);
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.model.TraceModelListener#
+	 * objectAdded(com.nokia.tracecompiler.model.TraceObject,
+	 * com.nokia.tracecompiler.model.TraceObject)
+	 */
+	public void objectAdded(TraceObject owner, TraceObject object) {
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.model.TraceModelListener#
+	 * objectCreationComplete(com.nokia.tracecompiler.model.TraceObject)
+	 */
+	public void objectCreationComplete(TraceObject object) {
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.model.TraceModelListener#
+	 * objectRemoved(com.nokia.tracecompiler.model.TraceObject,
+	 * com.nokia.tracecompiler.model.TraceObject)
+	 */
+	public void objectRemoved(TraceObject owner, TraceObject object) {
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.model.TraceModelListener#
+	 * propertyUpdated(com.nokia.tracecompiler.model.TraceObject, int)
+	 */
+	public void propertyUpdated(TraceObject object, int property) {
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.project.TraceProjectAPI#
+	 * formatTraceForExport(com.nokia.tracecompiler.model.Trace,
+	 * com.nokia.tracecompiler.project.TraceProjectAPI.TraceFormatFlags)
+	 */
+	public String formatTraceForExport(Trace trace, TraceFormatFlags flags) {
+		// TODO: This uses default formats
+		// -> Should be configurable
+		// > for entry traces
+		// < for exit traces
+		// Logic analyzer format for performance traces
+		String retval = trace.getTrace();
+		AutomaticTraceTextRule rule = trace
+				.getExtension(AutomaticTraceTextRule.class);
+		int parameterCount = trace.getParameterCount();
+		if (rule != null) {
+			if (rule instanceof EntryTraceRule) {
+				retval = "> " //$NON-NLS-1$
+						+ retval;
+			} else if (rule instanceof ExitTraceRule) {
+				retval = "< " //$NON-NLS-1$
+						+ retval;
+			} else if (rule instanceof StateTraceRule) {
+				if (parameterCount == 2) { // CodForChk_Dis_Magic
+					retval = retval + "Machine" + PARAMETER_VALUE_SEPARATOR //$NON-NLS-1$
+							+ STRING_PARAMETER_TAG + PARAMETER_SEPARATOR
+							+ "State" + PARAMETER_VALUE_SEPARATOR //$NON-NLS-1$
+							+ STRING_PARAMETER_TAG;
+				} else {
+					retval = retval
+							+ "Machine" + PARAMETER_VALUE_SEPARATOR //$NON-NLS-1$
+							+ STRING_PARAMETER_TAG + PARAMETER_SEPARATOR
+							+ "State" + PARAMETER_VALUE_SEPARATOR //$NON-NLS-1$
+							+ STRING_PARAMETER_TAG + PARAMETER_SEPARATOR
+							+ "Instance" + PARAMETER_VALUE_SEPARATOR //$NON-NLS-1$
+							+ HEX_PARAMETER_TAG;
+				}
+			}
+
+			if (parameterCount >= 1 && !(rule instanceof StateTraceRule)) {
+				TraceParameter param;
+				for (int i = 0; i < parameterCount; i++) {
+					param = trace.getParameter(i);
+					retval += PARAMETER_SEPARATOR + param.getName()
+							+ PARAMETER_VALUE_SEPARATOR
+							+ SourceUtils.mapParameterTypeToFormat(param);
+				}
+			}
+		} else {
+			PerformanceEventRuleBase perf = trace
+					.getExtension(PerformanceEventRuleBase.class);
+			if (perf != null) {
+				if (perf instanceof PerformanceEventStartRule) {
+					retval = retval + ">" + PARAMETER_SEPARATOR //$NON-NLS-1$
+							+ "Value" + PARAMETER_VALUE_SEPARATOR //$NON-NLS-1$
+							+ SDEC_PARAMETER_TAG;
+				} else if (perf instanceof PerformanceEventStopRule) {
+					retval = retval
+							+ "<" //$NON-NLS-1$
+							+ PARAMETER_SEPARATOR
+							+ "Value" + PARAMETER_VALUE_SEPARATOR //$NON-NLS-1$
+							+ SDEC_PARAMETER_TAG
+							+ PARAMETER_SEPARATOR
+							+ "Start Event Trace ID" + PARAMETER_VALUE_SEPARATOR //$NON-NLS-1$
+							+ UDEC_PARAMETER_TAG;
+				}
+			}
+		}
+		// If formatting is not supported the format characters and parameters
+		// are removed.
+		if (!flags.isFormattingSupported) {
+			int index = retval.indexOf(PARAMETER_SEPARATOR);
+			if (index > 0) {
+				retval = retval.substring(0, index);
+			}
+			retval = SourceUtils.removePrintfFormatting(retval).trim();
+		}
+		return retval;
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/osttrace/OstTraceParserRule.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,645 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "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:
+ *
+ * Description:
+ *
+ * OST trace parser rule
+ *
+ */
+package com.nokia.tracecompiler.engine.rules.osttrace;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import com.nokia.tracecompiler.engine.TraceLocation;
+import com.nokia.tracecompiler.engine.TraceCompilerEngineErrorCodes.TraceCompilerErrorCode;
+import com.nokia.tracecompiler.engine.rules.AutoAddFunctionParametersRule;
+import com.nokia.tracecompiler.engine.rules.AutoAddReturnParameterRule;
+import com.nokia.tracecompiler.engine.rules.AutoAddThisPtrRule;
+import com.nokia.tracecompiler.engine.rules.AutoAddValueRule;
+import com.nokia.tracecompiler.engine.rules.AutomaticTraceTextRule;
+import com.nokia.tracecompiler.engine.rules.ComplexHeaderRuleImpl;
+import com.nokia.tracecompiler.engine.rules.EntryTraceRule;
+import com.nokia.tracecompiler.engine.rules.ExitTraceRule;
+import com.nokia.tracecompiler.engine.rules.PerformanceEventStartRule;
+import com.nokia.tracecompiler.engine.rules.PerformanceEventStopRule;
+import com.nokia.tracecompiler.engine.rules.ReadOnlyObjectRuleImpl;
+import com.nokia.tracecompiler.engine.rules.SourceParserRuleBase;
+import com.nokia.tracecompiler.engine.rules.StateTraceRule;
+import com.nokia.tracecompiler.engine.source.SourceParserResult;
+import com.nokia.tracecompiler.model.TraceCompilerException;
+import com.nokia.tracecompiler.model.TraceModelExtension;
+import com.nokia.tracecompiler.model.TraceParameter;
+import com.nokia.tracecompiler.source.FormatMapping;
+import com.nokia.tracecompiler.source.SourceContext;
+import com.nokia.tracecompiler.source.SourceParser;
+
+/**
+ * OST trace parser rule
+ * 
+ */
+public final class OstTraceParserRule extends SourceParserRuleBase {
+
+	/**
+	 * PERFORMANCE group name
+	 */
+	private static final String PERFORMANCE_GROUP_NAME = "TRACE_PERFORMANCE"; //$NON-NLS-1$
+
+	/**
+	 * STATE group name
+	 */
+	private static final String STATE_GROUP_NAME = "TRACE_STATE"; //$NON-NLS-1$
+
+	/**
+	 * FLOW group name
+	 */
+	private static final String FLOW_GROUP_NAME = "TRACE_FLOW"; //$NON-NLS-1$
+
+	/**
+	 * Data trace parameter count
+	 */
+	private static final int DATA_PARAMETER_COUNT = 2; // CodForChk_Dis_Magic
+
+	/**
+	 * Entry Ext trace parameter count
+	 */
+	private static final int ENTRY_EXT_PARAMETER_COUNT = 1; // CodForChk_Dis_Magic
+
+	/**
+	 * Exit Ext trace parameter count
+	 */
+	private static final int EXIT_EXT_PARAMETER_COUNT = 2; // CodForChk_Dis_Magic
+
+	/**
+	 * Trace parameter index list
+	 */
+	class TraceParameterIndexList {
+
+		/**
+		 * Minimum number of parameters needed to decode traces
+		 */
+		int minParamCount;
+
+		/**
+		 * Preprocessor level index
+		 */
+		int levelIndex;
+
+		/**
+		 * Trace name index
+		 */
+		int nameIndex;
+
+		/**
+		 * Trace text index
+		 */
+		int textIndex;
+
+		/**
+		 * Trace group index in case group name is free-form
+		 */
+		int groupIndex;
+
+		/**
+		 * Trace group name in case group name is pre-determined by rules
+		 */
+		String groupName;
+	}
+
+	/**
+	 * List of flags related to OST API macro
+	 */
+	class TraceParameterFlagList {
+
+		/**
+		 * Data tag
+		 */
+		boolean hasDataTag;
+
+		/**
+		 * State tag
+		 */
+		boolean hasStateTag;
+
+		/**
+		 * Ext tag
+		 */
+		boolean hasExtTag;
+
+		/**
+		 * Event start tag
+		 */
+		boolean hasEventStartTag;
+
+		/**
+		 * Event stop
+		 */
+		boolean hasEventStopTag;
+
+		/**
+		 * Function entry
+		 */
+		boolean hasFunctionEntryTag;
+
+		/**
+		 * Function exit
+		 */
+		boolean hasFunctionExitTag;
+
+		/**
+		 * Constructor
+		 * 
+		 * @param tag
+		 *            the trace tag
+		 */
+		TraceParameterFlagList(String tag) {
+			hasDataTag = tag.indexOf(OstConstants.DATA_TRACE_TAG) > 0;
+			hasStateTag = tag.indexOf(OstConstants.STATE_TRACE_TAG) > 0;
+			hasExtTag = tag.indexOf(OstConstants.EXTENSION_TRACE_TAG) > 0;
+			hasEventStartTag = tag
+					.indexOf(OstConstants.PERFORMANCE_EVENT_START_TAG) > 0;
+			hasEventStopTag = tag
+					.indexOf(OstConstants.PERFORMANCE_EVENT_STOP_TAG) > 0;
+			hasFunctionEntryTag = tag.indexOf(OstConstants.FUNCTION_ENTRY_TAG) > 0;
+			hasFunctionExitTag = tag.indexOf(OstConstants.FUNCTION_EXIT_TAG) > 0;
+		}
+
+		/**
+		 * Checks if any of the flags is set
+		 * 
+		 * @return true if flag is set
+		 */
+		boolean hasFlags() {
+			return hasDataTag || hasStateTag || hasExtTag || hasEventStartTag
+					|| hasEventStopTag || hasFunctionEntryTag
+					|| hasFunctionExitTag;
+		}
+
+	}
+
+	/**
+	 * Offset to preprocessor level
+	 */
+	private static final int PREPROCESSOR_LEVEL_OFFSET = 0; // CodForChk_Dis_Magic
+
+	/**
+	 * Offset to group name if preprocessor level is not in use
+	 */
+	private static final int GROUP_NAME_OFFSET = 0; // CodForChk_Dis_Magic
+
+	/**
+	 * Offset to trace name if preprocessor level is not in use
+	 */
+	private static final int TRACE_NAME_OFFSET = 1; // CodForChk_Dis_Magic
+
+	/**
+	 * Offset to trace text if preprocessor level is not in use
+	 */
+	private static final int TRACE_TEXT_OFFSET = 2; // CodForChk_Dis_Magic
+
+	/**
+	 * Minimum number of parameters if preprocessor level is not in use
+	 */
+	private static final int MIN_PARAMETER_COUNT = 3; // CodForChk_Dis_Magic
+
+	/**
+	 * Parser tag
+	 */
+	private static final String OST_TRACE_PARSER_TAG = "OstTrace"; //$NON-NLS-1$
+
+	/**
+	 * OstTrace parser formats
+	 */
+	private final static String[] OST_TRACE_PARSER_FORMATS = { "0", //$NON-NLS-1$
+			"1", //$NON-NLS-1$
+			"Data", //$NON-NLS-1$
+			"Ext?", //$NON-NLS-1$
+			"FunctionEntry0", //$NON-NLS-1$
+			"FunctionEntry1", //$NON-NLS-1$
+			"FunctionEntryExt", //$NON-NLS-1$
+			"FunctionExit0", //$NON-NLS-1$
+			"FunctionExit1", //$NON-NLS-1$
+			"FunctionExitExt", //$NON-NLS-1$
+			"EventStart0", //$NON-NLS-1$
+			"EventStart1", //$NON-NLS-1$
+			"EventStop", //$NON-NLS-1$
+			"Def0", //$NON-NLS-1$
+			"Def1", //$NON-NLS-1$
+			"DefData", //$NON-NLS-1$
+			"DefExt?", //$NON-NLS-1$
+			"State0", //$NON-NLS-1$
+			"State1" //$NON-NLS-1$
+	};
+
+	/**
+	 * Creates a new OstTrace parser rule
+	 */
+	public OstTraceParserRule() {
+		super(OST_TRACE_PARSER_TAG, OST_TRACE_PARSER_FORMATS);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engine.source.SourceParserRule#getName()
+	 */
+	@Override
+	public String getName() {
+		return OstTraceFormatRule.STORAGE_NAME;
+	}
+
+	/* (non-Javadoc)
+	 * @see com.nokia.tracecompiler.engine.rules.SourceParserRuleBase#parseParameters(java.lang.String, java.util.List)
+	 */
+	@Override
+	public SourceParserResult parseParameters(String tag, List<String> list)
+			throws TraceCompilerException {
+		SourceParserResult result = new SourceParserResult();
+		TraceParameterIndexList indexList = getIndexList(tag);
+		if (list.size() >= indexList.minParamCount) {
+			// Name must exist
+			result.originalName = list.get(indexList.nameIndex);
+			result.convertedName = result.originalName;
+			// Text is optional
+			if (indexList.textIndex >= 0) {
+				result.traceText = trimTraceText(list.get(indexList.textIndex));
+			} else {
+				result.traceText = ""; //$NON-NLS-1$
+			}
+			// Group ID and preprocessor level are stored into the
+			// parser-specific data
+			result.parserData = new ArrayList<String>();
+			if (indexList.levelIndex >= 0) {
+				result.parserData.add(list.get(indexList.levelIndex));
+			}
+			if (indexList.groupIndex >= 0) {
+				result.parserData.add(list.get(indexList.groupIndex));
+			} else if (indexList.groupName != null) {
+				result.parserData.add(indexList.groupName);
+			}
+
+			// Extra parameters are converted to trace parameters
+			result.parameters = new ArrayList<String>();
+			for (int i = indexList.minParamCount; i < list.size(); i++) {
+				result.parameters.add(list.get(i));
+			}
+		} else {
+			throw new TraceCompilerException(
+					TraceCompilerErrorCode.NOT_ENOUGH_PARAMETERS);
+		}
+		return result;
+	}
+
+	/**
+	 * Gets the parameter index list based on trace tag
+	 * 
+	 * @param tag
+	 *            the trace tag
+	 * @return the index list
+	 */
+	private TraceParameterIndexList getIndexList(String tag) {
+		TraceParameterIndexList indexes = new TraceParameterIndexList();
+		indexes.levelIndex = -1;
+		if (tag.indexOf(OstConstants.FUNCTION_ENTRY_TAG) > 0
+				|| tag.indexOf(OstConstants.FUNCTION_EXIT_TAG) > 0) {
+			indexes.minParamCount = 1; // Name is mandatory
+			indexes.textIndex = -1; // No trace text
+			indexes.nameIndex = 0; // Trace name at index 0
+			indexes.groupIndex = -1; // Group is fixed to TRACE_FLOW
+			indexes.groupName = FLOW_GROUP_NAME;
+		} else if (tag.indexOf(OstConstants.STATE_TRACE_TAG) > 0) {
+			indexes.minParamCount = 1; // Name is mandatory
+			indexes.textIndex = -1; // No trace text
+			indexes.nameIndex = 0; // Trace name at index 0
+			indexes.groupIndex = -1; // Group is fixed to TRACE_STATE
+			indexes.groupName = STATE_GROUP_NAME;
+		} else if (tag.indexOf(OstConstants.PERFORMANCE_EVENT_START_TAG) > 0) {
+			// Name and event name are mandatory
+			indexes.minParamCount = 2; // CodForChk_Dis_Magic
+			indexes.textIndex = 1; // Trace text at index 1
+			indexes.nameIndex = 0; // Trace name at index 0
+			indexes.groupIndex = -1; // Group is fixed to TRACE_PERFORMANCE
+			indexes.groupName = PERFORMANCE_GROUP_NAME;
+		} else if (tag.indexOf(OstConstants.PERFORMANCE_EVENT_STOP_TAG) > 0) {
+			// Name and event name are mandatory
+			indexes.minParamCount = 2; // CodForChk_Dis_Magic
+			indexes.textIndex = 1; // Trace text at index 1
+			indexes.nameIndex = 0; // Trace name at index 0
+			indexes.groupIndex = -1; // Group is fixed to TRACE_PERFORMANCE
+			indexes.groupName = PERFORMANCE_GROUP_NAME;
+		} else {
+			indexes.minParamCount = MIN_PARAMETER_COUNT;
+			indexes.textIndex = TRACE_TEXT_OFFSET;
+			indexes.nameIndex = TRACE_NAME_OFFSET;
+			indexes.groupIndex = GROUP_NAME_OFFSET;
+		}
+		// If the trace macro contains preprocessor level, the offsets are
+		// incremented by one
+		if (tag.indexOf(OstConstants.PREPROCESSOR_LEVEL_TAG) > 0) {
+			indexes.minParamCount++;
+			if (indexes.textIndex >= 0) {
+				indexes.textIndex++;
+			}
+			if (indexes.nameIndex >= 0) {
+				indexes.nameIndex++;
+			}
+			if (indexes.groupIndex >= 0) {
+				indexes.groupIndex++;
+			}
+			indexes.levelIndex = PREPROCESSOR_LEVEL_OFFSET;
+		}
+		return indexes;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engine.source.SourceParserRule#
+	 *      convertLocation(com.nokia.tracecompiler.engine.TraceLocation)
+	 */
+	@Override
+	public TraceConversionResult convertLocation(TraceLocation location)
+			throws TraceCompilerException { // CodForChk_Dis_ComplexFunc
+		TraceParameterFlagList flags = checkParameterCount(location);
+
+		// Data tag does not have parameters
+		boolean checkParameters = !flags.hasDataTag;
+
+		List<FormatMapping> typeList;
+		if (flags.hasExtTag
+				&& (flags.hasFunctionEntryTag || flags.hasFunctionExitTag)) {
+			// Parameters are generated by AutoAdd rules
+			typeList = new ArrayList<FormatMapping>();
+			checkParameters = false;
+		} else if (!flags.hasFlags() || flags.hasDataTag || flags.hasExtTag) {
+			// If the Ext, Data or EventStart tag is present, all formats
+			// are supported. If no flags is set, only 32-bit formats are
+			// supported.
+			typeList = buildParameterTypeList(location.getTraceText(),
+					!flags.hasDataTag && !flags.hasExtTag);
+		} else if (flags.hasEventStartTag) {
+			// In case of Start1 tag value parameter is supported
+			typeList = new ArrayList<FormatMapping>();
+			// Check that does optional value exist
+			if (location.getParameterCount() == 1) {
+				FormatMapping mapping = new FormatMapping(TraceParameter.SDEC32);
+				mapping.isSimple = true;
+				typeList.add(mapping);
+			}
+			checkParameters = false;
+		} else if (flags.hasEventStopTag) {
+			// If the Event stop tag is presented, start event trace
+			// id parameter is supported
+			typeList = new ArrayList<FormatMapping>();
+			FormatMapping mapping = new FormatMapping(TraceParameter.UDEC32);
+			mapping.isSimple = true;
+			typeList.add(mapping);
+			checkParameters = false;
+
+		} else if (flags.hasStateTag) {
+			// If the State tag is presented, two ascii parameters are supported
+			// in case of State0 tag (parameter count = 2). In case of State1
+			// tag (parameter count = 3) two ascii and one 32-bit hex parameters
+			// are supported
+			typeList = new ArrayList<FormatMapping>();
+			FormatMapping mapping = new FormatMapping(TraceParameter.ASCII);
+			mapping.isSimple = true;
+			typeList.add(mapping);
+			mapping = new FormatMapping(TraceParameter.ASCII);
+			mapping.isSimple = true;
+			typeList.add(mapping);
+
+			// Check that does optional instance identifier exist
+			if (location.getParameterCount() == 3) { // CodForChk_Dis_Magic
+				mapping = new FormatMapping(TraceParameter.HEX32);
+				mapping.isSimple = true;
+				typeList.add(mapping);
+			}
+			checkParameters = false;
+		} else {
+			// If some other flag than Data, State, Ext or EventStart is set,
+			// only one 32-bit hex parameter is supported
+			typeList = new ArrayList<FormatMapping>();
+			if (location.getParameterCount() == 1) {
+				FormatMapping mapping = new FormatMapping(TraceParameter.HEX32);
+				mapping.isSimple = true;
+				typeList.add(mapping);
+			}
+		}
+		// If no flags or Ext flag is present, the parameter count needs to be
+		// verified
+		TraceConversionResult result = super.convertLocation(location,
+				checkParameters, typeList);
+		// If the extension or state tag is present, zero parameters or a single
+		// 32-bit parameter is not accepted because they do not need to generate
+		// a function into the header
+		if (((flags.hasExtTag && !flags.hasFunctionExitTag && !flags.hasFunctionEntryTag) || (flags.hasStateTag))
+				&& (typeList.size() == 0 || (typeList.size() == 1 && typeList
+						.get(0).isSimple))) {
+			throw new TraceCompilerException(
+					TraceCompilerErrorCode.PARAMETER_FORMAT_UNNECESSARY_EXT_MACRO);
+		}
+		// Ext-macros are tagged with the complex header rule, so the header
+		// gets written when traces are exported. Data-macros are tagged with
+		// read-only rule, so they are not updated via UI. Other special cases
+		// are flagged with corresponding rule.
+		// If trace text does not exist, it is created based on context
+		AutomaticTraceTextRule rule = null;
+		if (flags.hasDataTag) {
+			addRule(result, new ReadOnlyObjectRuleImpl());
+		} else if (flags.hasStateTag) {
+			addRule(result, new StateTraceRule());
+			addRule(result, new ComplexHeaderRuleImpl());
+		} else if (flags.hasEventStartTag) {
+			addRule(result, new PerformanceEventStartRule());
+			// If event value is not defined then event value 1 is automatically
+			// added to event start macros
+			if (location.getParameterCount() == 0) {
+				addRule(result, new AutoAddValueRule());
+			}
+		} else if (flags.hasEventStopTag) {
+			addRule(result, new PerformanceEventStopRule());
+			addRule(result, new ComplexHeaderRuleImpl());
+			// Event value 0 is automatically added to event stop macros
+			addRule(result, new AutoAddValueRule());
+		} else if (flags.hasFunctionEntryTag) {
+			if (flags.hasExtTag) {
+				// Entry trace may contain Ext tag. In that case the trace
+				// parameters are an instance variable and function parameters
+				// parsed from source. It is also flagged as complex, so the
+				// function gets generated to the trace header
+				addRule(result, new ComplexHeaderRuleImpl());
+				addRule(result, new AutoAddFunctionParametersRule());
+				addRule(result, new AutoAddThisPtrRule());
+			}
+			rule = new EntryTraceRule();
+			addRule(result, rule);
+		} else if (flags.hasFunctionExitTag) {
+			if (flags.hasExtTag) {
+				// Exit trace may contain Ext tag. In that case the trace has
+				// two parameters: instance variable and return statement
+				// It is also flagged as complex, so the function gets generated
+				// to the trace header
+				addRule(result, new ComplexHeaderRuleImpl());
+				addRule(result, new AutoAddThisPtrRule());
+				addRule(result, new AutoAddReturnParameterRule());
+			}
+			rule = new ExitTraceRule();
+			addRule(result, rule);
+		} else if (flags.hasExtTag) {
+			addRule(result, new ComplexHeaderRuleImpl());
+		}
+		if (rule != null) {
+			setAutoTextToTrace(location, result, rule);
+		}
+		List<String> parserData = location.getParserData();
+		result.group = parserData.get(parserData.size() - 1);
+		// The convert flag is reset to prevent further conversions
+		location.locationConverted();
+		return result;
+	}
+
+	/**
+	 * Uses the auto-text rule to create trace text
+	 * 
+	 * @param location
+	 *            the location
+	 * @param result
+	 *            the conversion result
+	 * @param rule
+	 *            the auto-text rule
+	 * @throws TraceCompilerException
+	 *             if update fails
+	 */
+	private void setAutoTextToTrace(TraceLocation location,
+			TraceConversionResult result, AutomaticTraceTextRule rule)
+			throws TraceCompilerException {
+		// The trace text comes from the auto-text rule
+		SourceParser parser = location.getParser();
+		SourceContext context = parser.getContext(location.getOffset());
+		if (context != null) {
+			result.text = rule.formatTrace(context);
+		} else {
+			throw new TraceCompilerException(
+					TraceCompilerErrorCode.NO_CONTEXT_FOR_LOCATION);
+		}
+	}
+
+	/**
+	 * Checks parameter count
+	 * 
+	 * @param location
+	 *            the location
+	 * @return the location tag flags
+	 * @throws TraceCompilerException
+	 *             if parameter count is not valid
+	 */
+	private TraceParameterFlagList checkParameterCount(TraceLocation location)
+			throws TraceCompilerException {
+		TraceParameterFlagList flags = new TraceParameterFlagList(location
+				.getTag());
+
+		// If the trace has some tag, the parameter count is fixed
+		// Data has 2 parameters
+		// State has 2 or 3 parameters
+		// Function entry-exit has 0 or 1 parameters
+		// Event start has 0 or 1 parameters
+		// Event stop has 1 parameters
+		int parameterCount = location.getParameterCount();
+
+		// Entry trace may have zero or one parameter
+		// In case of Ext, it must have one parameter
+		if (flags.hasFunctionEntryTag
+				&& ((parameterCount > 1) || (flags.hasExtTag && (parameterCount != ENTRY_EXT_PARAMETER_COUNT)))) {
+			throw new TraceCompilerException(
+					TraceCompilerErrorCode.PARAMETER_COUNT_DOES_NOT_MATCH_API);
+		}
+
+		// Exit trace may have zero or one parameter
+		// In case of Ext, it must have two parameters
+		if (flags.hasFunctionExitTag
+				&& ((!flags.hasExtTag && (parameterCount > 1)) || (flags.hasExtTag && parameterCount != EXIT_EXT_PARAMETER_COUNT))) { // CodForChk_Dis_LengthyLine
+			throw new TraceCompilerException(
+					TraceCompilerErrorCode.PARAMETER_COUNT_DOES_NOT_MATCH_API);
+		}
+
+		// Event start may have zero or one parameter
+		if (flags.hasEventStartTag && (parameterCount > 1)) {
+			throw new TraceCompilerException(
+					TraceCompilerErrorCode.PARAMETER_COUNT_DOES_NOT_MATCH_API);
+		}
+
+		// Event stop have one parameters
+		if (flags.hasEventStopTag && (parameterCount != 1)) {
+			throw new TraceCompilerException(
+					TraceCompilerErrorCode.PARAMETER_COUNT_DOES_NOT_MATCH_API);
+		}
+
+		// Data trace has two parameters
+		if ((flags.hasDataTag && (parameterCount != DATA_PARAMETER_COUNT))) {
+			throw new TraceCompilerException(
+					TraceCompilerErrorCode.PARAMETER_COUNT_DOES_NOT_MATCH_API);
+		}
+
+		// State trace may have two or three parameter
+		if (flags.hasStateTag && (parameterCount < 2 || parameterCount > 3)) { // CodForChk_Dis_Magic
+			throw new TraceCompilerException(
+					TraceCompilerErrorCode.PARAMETER_COUNT_DOES_NOT_MATCH_API);
+		}
+
+		return flags;
+	}
+
+	/**
+	 * Adds a rule to result
+	 * 
+	 * @param result
+	 *            the result
+	 * @param rule
+	 *            the rule
+	 */
+	private void addRule(TraceConversionResult result, TraceModelExtension rule) {
+		if (result.extensions == null) {
+			result.extensions = new ArrayList<TraceModelExtension>();
+		}
+		result.extensions.add(rule);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.engine.rules.SourceParserRuleBase#
+	 * isLocationConverted(com.nokia.tracecompiler.engine.TraceLocation)
+	 */
+	@Override
+	public boolean isLocationConverted(TraceLocation location) {
+		boolean retval = location.hasChangedAfterConvert();
+		if (!retval) {
+			// Duplicate-location conversions need to be retried in case the
+			// location is no longer a duplicate
+			retval = (location.getValidityCode() == TraceCompilerErrorCode.TRACE_HAS_MULTIPLE_LOCATIONS);
+		}
+		return retval;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @seecom.nokia.tracecompiler.engine.rules.printf.PrintfTraceParserRule#
+	 * getLocationGroup()
+	 */
+	@Override
+	public String getLocationGroup() {
+		return null;
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/osttrace/package.html	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,3 @@
+<html><body>
+Implementation for OST format specific rules
+</body></html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/rules/package.html	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,9 @@
+<html><body>
+Provides compile-time configuration of TraceCompiler behavior. 
+The features that can be adjusted via this package are:
+<ul>
+<li>Dialog templates</li>
+<li>Trace object rules</li>
+<li>Dialog flags</li>
+</ul>
+</body></html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/source/Messages.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,57 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Localized strings for engine package
+*
+*/
+package com.nokia.tracecompiler.engine.source;
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+public class Messages {
+
+	/**
+	 * Bundle name
+	 */	
+	private static final String BUNDLE_NAME = "com.nokia.tracecompiler.engine.source.messages"; //$NON-NLS-1$
+
+	/**
+	 * Bundle
+	 */
+	private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
+			.getBundle(BUNDLE_NAME);
+
+	/**
+	 * Prevents construction
+	 */
+	private Messages() {
+	}
+
+	/**
+	 * Gets localized string based on key
+	 * 
+	 * @param key
+	 *            the resource key
+	 * @return the localized resource
+	 */
+	public static String getString(String key) {
+		try {
+			return RESOURCE_BUNDLE.getString(key);
+		} catch (MissingResourceException e) {
+			return '!' + key + '!';
+		}
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/source/SourceEngine.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,220 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Source engine manages source documents that are opened to Eclipse UI
+*
+*/
+package com.nokia.tracecompiler.engine.source;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+
+import com.nokia.tracecompiler.model.TraceCompilerException;
+import com.nokia.tracecompiler.model.TraceModel;
+import com.nokia.tracecompiler.source.SourceDocumentInterface;
+import com.nokia.tracecompiler.source.SourceDocumentMonitor;
+import com.nokia.tracecompiler.source.SourceDocumentProcessor;
+import com.nokia.tracecompiler.utils.DocumentFactory;
+
+/**
+ * Source engine manages source documents that are opened to Eclipse UI.
+ * 
+ */
+public class SourceEngine implements SourceDocumentProcessor,
+		Iterable<SourceProperties> {
+
+	/**
+	 * Document monitor
+	 */
+	private SourceDocumentMonitor documentMonitor;
+
+	/**
+	 * Trace model listener implementation
+	 */
+	private SourceEngineModelListener modelListener = new SourceEngineModelListener(
+			this);
+
+	/**
+	 * Trace model extension listener
+	 */
+	private SourceEngineModelExtensionListener extensionListener = new SourceEngineModelExtensionListener(
+			this);
+
+	/**
+	 * The callback interfaces are notified about source file changes
+	 */
+	private ArrayList<SourceListener> listeners = new ArrayList<SourceListener>();
+
+	/**
+	 * Running flag
+	 */
+	private boolean running;
+
+	/**
+	 * Trace model
+	 */
+	private TraceModel model;
+
+	/**
+	 * Source list
+	 */
+	private ArrayList<SourceProperties> tempList = new ArrayList<SourceProperties>();
+
+	/**
+	 * Read-only files
+	 */
+	private String[] READ_ONLY = { ".h" //$NON-NLS-1$
+	};
+
+	/**
+	 * Non-source file list
+	 */
+	private ArrayList<String> nonSourceFiles = new ArrayList<String>();
+
+	/**
+	 * Constructor
+	 * 
+	 * @param model
+	 *            the trace model
+	 */
+	public SourceEngine(TraceModel model) {
+		this.model = model;
+	}
+
+	/**
+	 * Starts this engine. Does nothing if already running
+	 * @throws Exception 
+	 */
+	public void start() throws Exception {
+		if (!running) {
+			documentMonitor = DocumentFactory.getDocumentMonitor();
+			documentMonitor.startMonitor(this);
+			running = true;
+			model.addModelListener(modelListener);
+			model.addExtensionListener(extensionListener);
+		}
+	}
+
+	/**
+	 * Shuts down the source engine. Does nothing if already stopped
+	 */
+	public void shutdown() {
+		if (running) {
+			documentMonitor.stopMonitor();
+			documentMonitor = null;
+			running = false;
+			model.removeModelListener(modelListener);
+			model.removeExtensionListener(extensionListener);
+		}
+	}
+
+	/**
+	 * Adds source listener callback interface
+	 * 
+	 * @param listener
+	 *            the new listener
+	 */
+	public void addSourceListener(SourceListener listener) {
+		listeners.add(listener);
+	}
+
+	/**
+	 * Removes a source listener
+	 * 
+	 * @param listener
+	 *            the listener to be removed
+	 */
+	public void removeSourceListener(SourceListener listener) {
+		listeners.remove(listener);
+	}
+
+	/**
+	 * Gets the sources
+	 * 
+	 * @return the sources
+	 */
+	public Iterator<SourceProperties> getSources() {
+		tempList.clear();
+		for (SourceDocumentInterface doc : documentMonitor) {
+			tempList.add((SourceProperties) doc.getOwner());
+		}
+		return tempList.iterator();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.lang.Iterable#iterator()
+	 */
+	public Iterator<SourceProperties> iterator() {
+		return getSources();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.source.SourceDocumentProcessor#
+	 *      sourceOpened(com.nokia.tracecompiler.source.SourceDocumentInterface)
+	 */
+	public void sourceOpened(SourceDocumentInterface source) throws TraceCompilerException {
+		SourceProperties properties = new SourceProperties(model,
+				documentMonitor.getFactory(), source);
+		// Headers are marked read-only
+		for (String s : READ_ONLY) {
+			String fileName = properties.getFileName();
+			if (fileName != null && fileName.endsWith(s)) {
+				properties.setReadOnly(true);
+				break;
+			}
+		}
+		properties.sourceOpened();
+		source.setOwner(properties);
+		for (SourceListener l : listeners) {
+			l.sourceOpened(properties);
+		}
+	}
+
+	/**
+	 * Adds a non-source file to this list.
+	 * 
+	 * @param filePath
+	 *            the non-source file path to added
+	 */
+	public void addNonSourceFile(String filePath) {
+		nonSourceFiles.add(filePath);
+	}
+
+	/**
+	 * Removes a non-source file from this list
+	 * 
+	 * @param filePath
+	 *            the non-source file path to be removed
+	 * @return true if removed
+	 */
+	public boolean removeNonSourceFile(String filePath) {
+		boolean retVal = nonSourceFiles.remove(filePath);
+		return retVal;
+	}
+
+	/**
+	 * Gets list of non-source files
+	 * 
+	 * @return the list of non-source file paths
+	 */
+	public ArrayList<String> getNonSourceFiles() {
+		return nonSourceFiles;
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/source/SourceEngineModelExtensionListener.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,62 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Trace model extension listener implementation for SourceEngine
+*
+*/
+package com.nokia.tracecompiler.engine.source;
+
+import com.nokia.tracecompiler.model.TraceModelExtension;
+import com.nokia.tracecompiler.model.TraceModelExtensionListener;
+import com.nokia.tracecompiler.model.TraceObject;
+
+/**
+ * Trace model extension listener implementation for SourceEngine
+ * 
+ */
+final class SourceEngineModelExtensionListener implements
+		TraceModelExtensionListener {
+
+	/**
+	 * Constructor
+	 * 
+	 * @param engine
+	 *            the source engine
+	 */
+	SourceEngineModelExtensionListener(SourceEngine engine) {
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.model.TraceModelListener#
+	 *      extensionAdded(com.nokia.tracecompiler.model.TraceObject,
+	 *      com.nokia.tracecompiler.model.TraceModelExtension)
+	 */
+	public void extensionAdded(TraceObject object, TraceModelExtension extension) {
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.model.TraceModelListener#
+	 *      extensionRemoved(com.nokia.tracecompiler.model.TraceObject,
+	 *      com.nokia.tracecompiler.model.TraceModelExtension)
+	 */
+	public void extensionRemoved(TraceObject object,
+			TraceModelExtension extension) {
+	}
+
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/source/SourceEngineModelListener.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,77 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Trace model listener implementation for SourceEngine
+*
+*/
+package com.nokia.tracecompiler.engine.source;
+
+import com.nokia.tracecompiler.model.TraceModelListener;
+import com.nokia.tracecompiler.model.TraceObject;
+
+/**
+ * Trace model listener implementation for SourceEngine
+ * 
+ */
+final class SourceEngineModelListener implements TraceModelListener {
+
+	/**
+	 * Constructor
+	 * 
+	 * @param engine
+	 *            the source engine
+	 */
+	SourceEngineModelListener(SourceEngine engine) {
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.model.TraceModelListener#
+	 *      objectAdded(com.nokia.tracecompiler.model.TraceObject,
+	 *      com.nokia.tracecompiler.model.TraceObject)
+	 */
+	public void objectAdded(TraceObject owner, TraceObject object) {
+		// Update is called from TraceCompiler engine
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.model.TraceModelListener#
+	 *      objectRemoved(com.nokia.tracecompiler.model.TraceObject,
+	 *      com.nokia.tracecompiler.model.TraceObject)
+	 */
+	public void objectRemoved(TraceObject owner, TraceObject object) {
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.model.TraceModelListener#
+	 *      objectCreationComplete(com.nokia.tracecompiler.model.TraceObject)
+	 */
+	public void objectCreationComplete(TraceObject object) {
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.model.TraceModelListener#
+	 *      propertyUpdated(com.nokia.tracecompiler.model.TraceObject, int)
+	 */
+	public void propertyUpdated(TraceObject object, int property) {
+	}
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/source/SourceFormatter.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,305 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "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:
+ *
+ * Description:
+ *
+ * Formatting rules are provided by Trace objects
+ *
+ */
+package com.nokia.tracecompiler.engine.source;
+
+import java.util.Iterator;
+
+import com.nokia.tracecompiler.engine.TraceCompilerEngineGlobals;
+import com.nokia.tracecompiler.engine.rules.StateTraceRule;
+import com.nokia.tracecompiler.model.Trace;
+import com.nokia.tracecompiler.model.TraceParameter;
+import com.nokia.tracecompiler.plugin.TraceFormatConstants;
+import com.nokia.tracecompiler.plugin.TraceAPIFormatter.TraceFormatType;
+import com.nokia.tracecompiler.source.SourceConstants;
+import com.nokia.tracecompiler.source.SourceUtils;
+import com.nokia.tracecompiler.source.SymbianConstants;
+
+/**
+ * Static functions for source formatting
+ * 
+ */
+public class SourceFormatter {
+
+	/**
+	 * Value parameter name
+	 */
+	public static final String VALUE_PARAMETER_NAME = "value"; //$NON-NLS-1$	
+
+	/**
+	 * Event start trace id parameter name
+	 */
+	public static final String EVENT_START_TRACE_ID_PARAMETER_NAME = "linkToStart"; //$NON-NLS-1$		
+
+	/**
+	 * Constructor is hidden
+	 */
+	private SourceFormatter() {
+	}
+
+	/**
+	 * Formats a trace to string format using the formatting rule from the trace
+	 * 
+	 * @param trace
+	 *            the trace
+	 * @param formatType
+	 *            the type of format
+	 * @return the trace string
+	 */
+	public static String formatTrace(Trace trace, TraceFormatType formatType) {
+		return formatTrace(trace, null, formatType, null, false);
+	}
+
+	/**
+	 * Formats a trace to string format
+	 * 
+	 * @param trace
+	 *            the trace
+	 * @param traceRule
+	 *            the formatting rule to be used
+	 * @param formatType
+	 *            the type of format
+	 * @param tags
+	 *            the tags for parameters or null if parameter names are used
+	 * @param fixedTags
+	 *            true if the <i>tags</i> iterator is fixed, false if the
+	 *            contents of <i>tags</i> should go through
+	 *            <code>SourceRule.mapNameToSource</code>
+	 * @return the trace string
+	 */
+	static String formatTrace(Trace trace, TraceFormattingRule traceRule,
+			TraceFormatType formatType, Iterator<String> tags, boolean fixedTags) {
+		StringBuffer data = new StringBuffer();
+		String format = null;
+		if (traceRule == null) {
+
+			// If rule is not explicitly provided, it is fetched from the trace
+			traceRule = trace.getExtension(TraceFormattingRule.class);
+			if (traceRule == null) {
+
+				// If trace does not have a formatting rule, the project API's
+				// should implement default rule
+				traceRule = trace.getModel().getExtension(
+						TraceFormattingRule.class);
+			}
+		}
+		if (traceRule != null) {
+			format = traceRule.getFormat(trace, formatType);
+		}
+		if (format != null && traceRule != null) {
+			data.append(format);
+			data.append(SourceConstants.LINE_FEED);
+			buildParameterList(trace, traceRule, data, formatType, tags,
+					fixedTags);
+
+			String traceName = traceRule.mapNameToSource(trace);
+			String traceGroupName = trace.getGroup().getName();
+
+			// %NAME% is replaced with rule-mapped trace name
+			replaceData(data, traceName, TraceFormatConstants.NAME_FORMAT);
+
+			// %GROUP% is replaced with group name
+			replaceData(data, traceGroupName, TraceFormatConstants.GROUP_FORMAT);
+
+			// %TEXT% is replaced with trace text
+			replaceData(data, "\"" + trace.getTrace() //$NON-NLS-1$
+					+ "\"", TraceFormatConstants.TEXT_FORMAT); //$NON-NLS-1$
+
+			// %FORMATTED_TRACE% is replaced with trace data
+			replaceData(data, trace.getTrace(),
+					TraceFormatConstants.FORMATTED_TRACE);
+
+			// Comment is inserted before the trace
+			int index = data.indexOf(TraceFormatConstants.COMMENT_FORMAT);
+			if (index >= 0) {
+				String comment = data.substring(index + 1);
+				data.delete(index, data.length());
+				data.insert(0, comment);
+				data.append(SourceConstants.LINE_FEED);
+			}
+		}
+
+		// If trace does not have formatting, it is not shown in source
+		return data.toString();
+	}
+
+	/**
+	 * Adds the parameters to the data buffer
+	 * 
+	 * @param trace
+	 *            the trace
+	 * @param format
+	 *            the formatter from trace
+	 * @param data
+	 *            the data buffer where the formatted data is stored
+	 * @param formatType
+	 *            the format type to be applied
+	 * @param tags
+	 *            the tags for parameters or null if parameter names are used
+	 * @param fixedTags
+	 *            true if the <i>tags</i> iterator is fixed, false if the
+	 *            contents of <i>tags</i> should go through
+	 *            <code>SourceRule.mapNameToSource</code>
+	 */
+	private static void buildParameterList(Trace trace,
+			TraceFormattingRule format, StringBuffer data,
+			TraceFormatType formatType, Iterator<String> tags, boolean fixedTags) {
+
+		int count = trace.getParameterCount();
+
+		Iterator<TraceParameter> itr = trace.getParameters();
+		StringBuffer paramList = new StringBuffer();
+		// Index is incremented by one for each parameter that has been added to
+		// source
+		int parameterIndex = 0;
+		while (itr.hasNext()) {
+			TraceParameter param = itr.next();
+			TraceParameterFormattingRule rule = param
+					.getExtension(TraceParameterFormattingRule.class);
+			String name;
+			// Count and name may be adjusted by rules provided by parameters
+			if (rule != null) {
+				boolean isInSource = rule.isShownInSource();
+				// If the parameter iterator is explicitly provided, the
+				// parameter name is fetched from it. If the parameter list does
+				// not have enough tags (for example when a new parameter is
+				// added to trace) the name of the parameter is used. The source
+				// rule is used to map the parameter name to correct format
+				if (isInSource) {
+					name = getTagWithoutMapping(tags, param);
+					addParameter(paramList, param, name, ++parameterIndex,
+							formatType);
+				} else {
+					// If the parameter is not shown in source, it is skipped
+					count--;
+				}
+			} else {
+				// If the parameter is not associated with a source rule, it is
+				// added without mapping
+				name = getTagWithoutMapping(tags, param);
+				addParameter(paramList, param, name, ++parameterIndex,
+						formatType);
+			}
+		}
+		// %PC% is replaced with adjusted parameter count
+		// In case of packed trace, the header engine does the count mapping
+		if (formatType != TraceFormatType.TRACE_PACKED) {
+			String val = format.mapParameterCountToSource(trace, count);
+
+			if (trace.getExtension(StateTraceRule.class) != null
+					&& data.toString().startsWith("OstTraceState")) { //$NON-NLS-1$
+
+				// In case of State Trace macro value in trace macro is
+				// parameter count - 2
+				if (count > 1) {
+					val = String.valueOf(count - 2); // CodForChk_Dis_Magic
+				} else {
+					val = String.valueOf(count);
+				}
+			}
+			replaceData(data, val, TraceFormatConstants.PARAM_COUNT_FORMAT);
+		}
+		// %PARAMETERS% is replaced with parameter names
+		replaceData(data, paramList.toString(),
+				TraceFormatConstants.PARAMETERS_FORMAT);
+	}
+
+	/**
+	 * Gets the name for a parameter without source rule mapping. If the tags
+	 * iterator contains a valid entry, the name is fetched from it. If not, the
+	 * parameter name is used instead.
+	 * 
+	 * @param tags
+	 *            the list of tags
+	 * @param param
+	 *            the parameter
+	 * @return the parameter name
+	 */
+	private static String getTagWithoutMapping(Iterator<String> tags,
+			TraceParameter param) {
+		String name;
+		// If the parameter iterator is explicitly provided, the
+		// parameter name is fetched from it
+		if (tags != null && tags.hasNext()) {
+			name = tags.next();
+			// The list may contain 0-length items to represent
+			// that that parameter name should be used instead
+			if (name == null || name.length() == 0) {
+				name = param.getName();
+			}
+		} else {
+			name = param.getName();
+		}
+		return name;
+	}
+
+	/**
+	 * Adds a parameter to the parameter list
+	 * 
+	 * @param paramList
+	 *            the parameter list
+	 * @param param
+	 *            the parameter to be added
+	 * @param name
+	 *            a name replacement for the parameter
+	 * @param parameterIndex
+	 *            the index of the parameter
+	 * @param formatType
+	 *            the type of the format
+	 */
+	private static void addParameter(StringBuffer paramList,
+			TraceParameter param, String name, int parameterIndex,
+			TraceFormatType formatType) {
+		paramList.append(SourceConstants.PARAMETER_SEPARATOR);
+		if (formatType == TraceFormatType.HEADER) {
+			paramList.append(SourceUtils.mapParameterTypeToSymbianType(param));
+			paramList.append(SourceConstants.SPACE_CHAR);
+			paramList.append(SymbianConstants.PARAMETER_DECLARATION_PREFIX);
+			paramList.append(parameterIndex);
+		} else if (formatType == TraceFormatType.EMPTY_MACRO) {
+			paramList.append(SymbianConstants.PARAMETER_DECLARATION_PREFIX);
+			paramList.append(parameterIndex);
+		}
+	}
+
+	/**
+	 * Replaces data from the stringbuffer
+	 * 
+	 * @param data
+	 *            the data
+	 * @param replaceData
+	 *            the data to be used
+	 * @param replaceFormat
+	 *            the format to be replaced
+	 */
+	private static void replaceData(StringBuffer data, String replaceData,
+			String replaceFormat) {
+		TraceCompilerEngineGlobals.getEvents().postInfoMessage(Messages.getString("SourceFormatter.replaceAllBeginText") + replaceFormat + Messages.getString("SourceFormatter.replaceAllMiddleText") + replaceData , null); //$NON-NLS-1$ //$NON-NLS-2$
+
+		int replaceOffset = 0;
+		do {
+			replaceOffset = data.indexOf(replaceFormat, replaceOffset);
+			if (replaceOffset >= 0) {
+				data.replace(replaceOffset, replaceOffset
+						+ replaceFormat.length(), replaceData);
+				replaceOffset += replaceData.length();
+			}
+		} while (replaceOffset != -1);
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/source/SourceListener.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,40 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Interface that is notified about changes in source documents
+*
+*/
+package com.nokia.tracecompiler.engine.source;
+
+import com.nokia.tracecompiler.model.TraceCompilerException;
+
+
+/**
+ * Interface that is notified about changes in source documents managed by
+ * {@link SourceEngine}
+ * 
+ */
+public interface SourceListener {
+
+	/**
+	 * Event that is fired when a source is opened
+	 * 
+	 * @param properties
+	 *            the source properties
+	 * @throws TraceCompilerException 
+	 */
+	public void sourceOpened(SourceProperties properties) throws TraceCompilerException;
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/source/SourceLocationRule.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,65 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Rules for mapping trace model entries into source code
+*
+*/
+package com.nokia.tracecompiler.engine.source;
+
+import com.nokia.tracecompiler.model.TraceObjectRule;
+
+/**
+ * Rules for relocating traces in source code
+ * 
+ */
+public interface SourceLocationRule extends TraceObjectRule {
+
+	/**
+	 * Rule type for context-relative location
+	 */
+	int CONTEXT_RELATIVE = 1;
+
+	/**
+	 * Rule type for absolute location
+	 */
+	int ABSOLUTE = 2;
+
+	/**
+	 * Gets the rule type
+	 * 
+	 * @return rule type
+	 */
+	public int getLocationType();
+
+	/**
+	 * Gets the offset where the trace is inserted
+	 * 
+	 * @return the offset
+	 */
+	public int getLocationOffset();
+
+	/**
+	 * Flag which determines whether this locator should be removed from the
+	 * trace after the trace has been inserted to source. If this is left to the
+	 * trace, the trace is relocated every time it is inserted.
+	 * <p>
+	 * Note that if this returns false, the extension should also be persistent
+	 * so that the relocations work over TraceCompiler restarts.
+	 * 
+	 * @return true if this should be removed after insertion
+	 */
+	public boolean isRemovedAfterInsert();
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/source/SourceParserResult.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,54 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Result from parameter parsing
+*
+*/
+package com.nokia.tracecompiler.engine.source;
+
+import java.util.List;
+
+/**
+ * Result from parameter parsing
+ * 
+ */
+public class SourceParserResult {
+
+	/**
+	 * Trace name as parsed from source
+	 */
+	public String originalName;
+
+	/**
+	 * Parsed name after conversion to valid name
+	 */
+	public String convertedName;
+
+	/**
+	 * Trace text as parsed from source
+	 */
+	public String traceText;
+
+	/**
+	 * Parameters parsed from source
+	 */
+	public List<String> parameters;
+
+	/**
+	 * List of parser-specific data
+	 */
+	public List<String> parserData;
+
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/source/SourceParserRule.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,131 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Rule interface for tags to be searched from source files
+*
+*/
+package com.nokia.tracecompiler.engine.source;
+
+import java.util.List;
+
+import com.nokia.tracecompiler.model.TraceCompilerException;
+import com.nokia.tracecompiler.model.TraceModelExtension;
+import com.nokia.tracecompiler.model.TraceObjectRule;
+import com.nokia.tracecompiler.project.TraceLocationParser;
+
+/**
+ * Rule interface for tags to be searched from source files
+ * 
+ */
+public interface SourceParserRule extends TraceObjectRule {
+
+	/**
+	 * Parameter conversion result
+	 */
+	public class ParameterConversionResult {
+
+		/**
+		 * Parameter name
+		 */
+		public String name;
+
+		/**
+		 * Parameter type
+		 */
+		public String type;
+
+		/**
+		 * Parameter extensions
+		 */
+		public List<TraceModelExtension> extensions;
+	}
+
+	/**
+	 * Trace location conversion result
+	 */
+	public class TraceConversionResult {
+
+		/**
+		 * Name of the group where the trace goes to
+		 */
+		public String group;
+
+		/**
+		 * Name for the trace
+		 */
+		public String name;
+
+		/**
+		 * Text for the trace
+		 */
+		public String text;
+
+		/**
+		 * List of parameters
+		 */
+		public List<ParameterConversionResult> parameters;
+
+		/**
+		 * Extensions for the trace
+		 */
+		public List<TraceModelExtension> extensions;
+
+	}
+
+	/**
+	 * Gets the name of this parser
+	 * 
+	 * @return the name
+	 */
+	public String getName();
+
+	/**
+	 * Gets the source tag to be located from source
+	 * 
+	 * @return the tag name
+	 */
+	public String getSearchTag();
+
+	/**
+	 * Checks if the trace tag suffix is allowed
+	 * 
+	 * @param tagSuffix
+	 *            the tag to be checked
+	 * @return true if allowed, false if not
+	 */
+	public boolean isAllowedTagSuffix(String tagSuffix);
+
+	/**
+	 * Parses a parameter list found from source
+	 * 
+	 * @param tag
+	 *            the location tag
+	 * @param list
+	 *            list of parameters
+	 * @return the parameter list
+	 * @throws TraceCompilerException
+	 *             if parameter list is not valid
+	 */
+	public SourceParserResult parseParameters(String tag, List<String> list)
+			throws TraceCompilerException;
+
+	/**
+	 * Gets the location parser interface
+	 * 
+	 * @return the location parser
+	 */
+	public TraceLocationParser getLocationParser();
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/source/SourceProperties.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,471 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "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:
+ *
+ * Description:
+ *
+ * Properties of a source document opened to Eclipse editor
+ *
+ */
+package com.nokia.tracecompiler.engine.source;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+
+import com.nokia.tracecompiler.engine.TraceCompilerEngineConfiguration;
+import com.nokia.tracecompiler.engine.TraceCompilerEngineGlobals;
+import com.nokia.tracecompiler.engine.TraceLocation;
+import com.nokia.tracecompiler.model.TraceModel;
+import com.nokia.tracecompiler.source.SourceDocumentFactory;
+import com.nokia.tracecompiler.source.SourceDocumentInterface;
+import com.nokia.tracecompiler.source.SourceIterator;
+import com.nokia.tracecompiler.source.SourceParser;
+import com.nokia.tracecompiler.source.SourceParserException;
+import com.nokia.tracecompiler.source.SourcePropertyProvider;
+import com.nokia.tracecompiler.source.SourceStringSearch;
+
+/**
+ * Properties of a source document which contains trace locations
+ * 
+ */
+public class SourceProperties implements Iterable<TraceLocation> {
+
+	/**
+	 * Trace locations within the source
+	 */
+	private ArrayList<TraceLocation> locations = new ArrayList<TraceLocation>();
+
+	/**
+	 * Source parser
+	 */
+	private SourceParser sourceParser;
+
+	/**
+	 * Offset is stored in preProcess and reset in postProcess.
+	 */
+	private int firstChangedLocation = -1;
+
+	/**
+	 * Offset is stored in preProcess and reset in postProcess.
+	 */
+	private int firstUnchangedLocation = -1;
+
+	/**
+	 * The searchers for trace identifiers
+	 */
+	private ArrayList<SourceStringSearch> searchers = new ArrayList<SourceStringSearch>();
+
+	/**
+	 * Start index for calls to parseTrace
+	 */
+	private int searchStartIndex;
+
+	/**
+	 * Read-only flag
+	 */
+	private boolean readOnly;
+
+	/**
+	 * Creates source properties for given source document
+	 * 
+	 * @param model
+	 *            the trace model
+	 * @param framework
+	 *            the document framework
+	 * @param document
+	 *            the document
+	 */
+	SourceProperties(TraceModel model, SourceDocumentFactory framework,
+			SourceDocumentInterface document) {
+		sourceParser = new SourceParser(framework, document);
+		Iterator<SourceParserRule> parsers = model
+				.getExtensions(SourceParserRule.class);
+		while (parsers.hasNext()) {
+			// The rule defines what to search and how to interpret the
+			// parameters. It is stored into the searcher as search data
+			addParserRule(parsers.next());
+		}
+	}
+
+	/**
+	 * Gets the source parser
+	 * 
+	 * @return the parser
+	 */
+	public SourceParser getSourceParser() {
+		return sourceParser;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.lang.Iterable#iterator()
+	 */
+	public Iterator<TraceLocation> iterator() {
+		return locations.iterator();
+	}
+
+	/**
+	 * Gets the file name of this source
+	 * 
+	 * @return the name
+	 */
+	public String getFileName() {
+		String retval = null;
+		if (sourceParser != null) {
+			SourceDocumentInterface source = sourceParser.getSource();
+			if (source != null) {
+				SourcePropertyProvider provider = source.getPropertyProvider();
+				if (provider != null) {
+					retval = provider.getFileName();
+				}
+			}
+		}
+		return retval;
+	}
+
+	/**
+	 * Sets the read-only flag for this source. Traces cannot be added to
+	 * read-only sources, but they can be parsed for data
+	 * 
+	 * @param readOnly
+	 *            the read-only flag
+	 */
+	void setReadOnly(boolean readOnly) {
+		this.readOnly = readOnly;
+	}
+
+	/**
+	 * Gets the read-only flag
+	 * 
+	 * @return read-only flag
+	 */
+	public boolean isReadOnly() {
+		return readOnly;
+	}
+
+	/**
+	 * Source opened notification
+	 */
+	void sourceOpened() {
+		updateTraces(0, sourceParser.getDataLength());
+	}
+
+	/**
+	 * Parses the document starting from given offset and locates the trace
+	 * entries from it. The first unchanged trace entry stops the search
+	 * 
+	 * @param startOffset
+	 *            the offset where to start the search
+	 * @param endOffset
+	 *            the offset where to end the search
+	 */
+	private void updateTraces(int startOffset, int endOffset) {
+		Iterator<SourceStringSearch> itr = searchers.iterator();
+		while (itr.hasNext()) {
+			SourceStringSearch searcher = itr.next();
+			searcher.resetSearch(startOffset, endOffset);
+			updateTraces(endOffset, searcher);
+		}
+	}
+
+	/**
+	 * Uses the given SourceSearch to parse traces
+	 * 
+	 * @param end
+	 *            the offset where parser should stop
+	 * @param searcher
+	 *            the searcher
+	 */
+	private void updateTraces(int end, SourceStringSearch searcher) {
+		int offset;
+		searchStartIndex = 0;
+		// If not updating, the entries contents are processed
+		do {
+			offset = searcher.findNext();
+			try {
+				if (offset != -1 && offset < end) {
+					String tag = isValidTrace(offset, searcher
+							.getSearchString().length(), searcher, false);
+					if (tag != null) {
+						parseTrace(offset, (SourceParserRule) searcher
+								.getSearchData(), tag);
+					}
+				}
+			} catch (SourceParserException e) {
+				TraceLocation location = new TraceLocation(this, offset,
+						offset + 80);
+				TraceCompilerEngineGlobals
+						.getEvents()
+						.postErrorMessage(
+								Messages
+										.getString("SourceProperties.parsingArrowAtBeginText") + location.getFilePath() + location.getFileName() + Messages.getString("SourceProperties.parsingArrownAtMiddleText") + location.getLineNumber(), null, true); //$NON-NLS-1$ //$NON-NLS-2$
+				// If the parameters cannot be parsed, the trace is
+				// not added to the array
+			}
+		} while (offset != -1 && offset < end);
+	}
+
+	/**
+	 * Parses a trace found from the document and adds it to the document's list
+	 * of positions. The position updater keeps the trace location up-to-date.
+	 * 
+	 * @param offset
+	 *            the offset to the trace
+	 * @param parserRule
+	 *            the parser to be attached to the location
+	 * @param locationTag
+	 *            the tag of the location
+	 * @throws SourceParserException
+	 *             if trace cannot be parsed
+	 */
+	private void parseTrace(int offset, SourceParserRule parserRule,
+			String locationTag) throws SourceParserException {
+		int arrayIndex = -1;
+		// Checks the changed locations. If a matching offset if found, the
+		// location is an existing one. In that case the location is not
+		// added to the array. If an offset larger than the new offset is
+		// found from the array, the location is inserted into that slot. If
+		// all locations within the array are smaller than the new offset,
+		// the new location is inserted before the first unchanged location.
+		// Since the locations in the array are ordered, the checking can
+		// always start from the latest location that has been found from
+		// the array. The caller of this function must set
+		// parseTraceStartIndex to 0 before starting a loop where this
+		// function is called. If firstUnchangedLocation is -1, this is the
+		// first time the file is being parsed and thus all locations are
+		// checked
+		boolean found = false;
+		int searchEndIndex;
+		int newSearchStartIndex = -1;
+		if (firstUnchangedLocation >= 0) {
+			searchEndIndex = firstUnchangedLocation;
+		} else {
+			searchEndIndex = locations.size();
+		}
+		for (int i = searchStartIndex; i < searchEndIndex && !found; i++) {
+			TraceLocation location = locations.get(i);
+			// Deleted locations are ignored. If a trace was replaced, the
+			// new offset will match the offset of the deleted one.
+			if (!location.isDeleted()) {
+				// If the offset of the trace matches an existing offset,
+				// the trace is old one. If the offset within the array is
+				// larger than the source offset, the trace found from
+				// source is new.
+				if (location.getOffset() == offset) {
+					found = true;
+					// Starts the next search from the value following the
+					// trace that was found
+					searchStartIndex = i + 1;
+					arrayIndex = -1;
+				} else if (location.getOffset() > offset) {
+					found = true;
+					// A new trace will be added into the current index, so
+					// the next search will start from the same location as
+					// was checked now. The index is updated after the trace has
+					// succesfully been created
+					newSearchStartIndex = i + 1;
+					arrayIndex = i;
+				}
+			}
+		}
+		// If trace was not found from the list, the trace is new and all
+		// traces following it are also new. The start index is set to point
+		// past the first unchanged location and thus the next search will
+		// ignore the above loop.
+		if (!found) {
+			arrayIndex = searchEndIndex;
+			searchStartIndex = firstUnchangedLocation + 1;
+		}
+		if (arrayIndex >= 0) {
+			// Creates a new location if it was not found
+			ArrayList<String> list = new ArrayList<String>();
+			int endOfTrace = sourceParser
+					.tokenizeParameters(offset, list, true);
+
+			TraceLocation location = new TraceLocation(this, offset, endOfTrace
+					- offset);
+
+			// The parser rules have been associated with the searchers. The
+			// parser rule that found the location is associated with the
+			// location and used to process its parameters
+			location.setTag(locationTag);
+			location.setParserRule(parserRule);
+			location.setData(list);
+
+			TraceCompilerEngineGlobals
+					.getEvents()
+					.postInfoMessage(
+							Messages
+									.getString("SourceProperties.newTraceLocationFoundBeginText") + location.getFilePath() + location.getFileName() + Messages.getString("SourceProperties.newTraceLocationFoundMiddleText") + location.getLineNumber() + Messages.getString("SourceProperties.newTraceLocationFoundEndText") + location.getTraceText(), null); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+
+			locations.add(arrayIndex, location);
+			// The changed flag is set to newly added traces. If a location
+			// is added prior to the first changed location, the index of first
+			// changed location needs to be adjusted so that the flag gets
+			// cleared in postprocessing. Also the index of first unchanged
+			// location needs to be updated to reflect the changed array
+			if (firstUnchangedLocation >= 0) {
+				location.setContentChanged(true);
+				if (arrayIndex < firstChangedLocation) {
+					firstChangedLocation = arrayIndex;
+				}
+				firstUnchangedLocation++;
+			}
+			// Updates the search start index if trace creation was succesful
+			if (newSearchStartIndex >= 0) {
+				searchStartIndex = newSearchStartIndex;
+			}
+		}
+	}
+
+	/**
+	 * Checks that a trace is valid
+	 * 
+	 * @param offset
+	 *            offset to trace identifier
+	 * @param length
+	 *            length of trace
+	 * @param searcher
+	 *            the source searcher
+	 * @param checkMainTag
+	 *            true if the main search tag needs to be checked, false if only
+	 *            the tag suffix is checked
+	 * @return the trace tag or null if trace is not valid
+	 */
+	private String isValidTrace(int offset, int length,
+			SourceStringSearch searcher, boolean checkMainTag) {
+		String retval = null;
+		try {
+			int idlen = searcher.getSearchString().length();
+			int idend = offset + idlen;
+			if (checkMainTag) {
+				if (length >= idlen
+						&& searcher.isSearchStringMatch(sourceParser.getData(
+								offset, idlen))) {
+					// The previous character must be a separator or white space
+					if (offset == 0
+							|| !Character.isJavaIdentifierPart(sourceParser
+									.getData(offset - 1))) {
+						retval = getSearchTag(offset, idend);
+					}
+				}
+			} else {
+				// If main tag is not checked
+				retval = getSearchTag(offset, idend);
+			}
+			retval = verifyTag(searcher, retval, idlen);
+		} catch (Exception e) {
+			if (TraceCompilerEngineConfiguration.ASSERTIONS_ENABLED) {
+				TraceCompilerEngineGlobals.getEvents().postAssertionFailed(
+						"Trace validity check failed", e); //$NON-NLS-1$
+			}
+		}
+		return retval;
+	}
+
+	/**
+	 * Verifies the tag against tag suffixes from parser
+	 * 
+	 * @param searcher
+	 *            the searcher
+	 * @param tag
+	 *            the tag include main tag and suffix
+	 * @param idlen
+	 *            the length of the main tag
+	 * @return the tag if it is valid, null if not
+	 */
+	private String verifyTag(SourceStringSearch searcher, String tag, int idlen) {
+		if (tag != null) {
+			// The trace suffix is verified by the parser. For example, if
+			// search data is "SymbianTrace" and the tag found from source
+			// is "SymbianTraceData1", the parser checks if "Data1" is a
+			// valid trace tag suffix.
+			if (!((SourceParserRule) searcher.getSearchData())
+					.isAllowedTagSuffix(tag.substring(idlen))) {
+				tag = null;
+			}
+		}
+		return tag;
+	}
+
+	/**
+	 * Gets the search tag between offset and next '(' character
+	 * 
+	 * @param offset
+	 *            the start of tag
+	 * @param idend
+	 *            the end of tag
+	 * @return the tag
+	 * @throws SourceParserException
+	 *             if parser fails
+	 */
+	private String getSearchTag(int offset, int idend)
+			throws SourceParserException {
+		// Locates the parameters starting from trace identifier
+		String retval = null;
+		SourceIterator srcitr = sourceParser.createIterator(idend - 1,
+				SourceParser.SKIP_ALL);
+		boolean found = false;
+		while (srcitr.hasNext() && !found) {
+			char c = srcitr.next();
+			if (c == ';') {
+				// Trace must have parameters
+				found = true;
+			} else if (c == '(') {
+				found = true;
+				// Stores the tag into location
+				retval = sourceParser.getData(offset, srcitr.previousIndex()
+						- offset + 1);
+			} else if (srcitr.hasSkipped()) {
+				// White spaces are not allowed within trace tag
+				found = true;
+			}
+		}
+		return retval;
+	}
+
+	/**
+	 * Checks if a trace can be inserted into given location
+	 * 
+	 * @param offset
+	 *            the offset to the location
+	 * @return true if location is valid
+	 */
+	boolean checkInsertLocation(int offset) {
+		boolean retval = true;
+		try {
+			offset = sourceParser.findStartOfLine(offset, false, true);
+			if (sourceParser.isInExcludedArea(offset)) {
+				retval = false;
+			}
+		} catch (SourceParserException e) {
+			retval = false;
+		}
+		return retval;
+	}
+
+	/**
+	 * Adds a new parser
+	 * 
+	 * @param rule
+	 *            the new parser rule
+	 */
+	void addParserRule(SourceParserRule rule) {
+		SourceStringSearch searcher = sourceParser.startStringSearch(rule
+				.getSearchTag(), 0, -1, SourceParser.MATCH_WORD_BEGINNING
+				| SourceParser.SKIP_ALL);
+		searcher.setSearchData(rule);
+		searchers.add(searcher);
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/source/TraceFormattingRule.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,64 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Formatting rules are provided by Trace objects
+*
+*/
+package com.nokia.tracecompiler.engine.source;
+
+import com.nokia.tracecompiler.model.Trace;
+import com.nokia.tracecompiler.model.TraceObjectRule;
+import com.nokia.tracecompiler.plugin.TraceAPIFormatter.TraceFormatType;
+
+/**
+ * Formatting rules are stored into traces as extension. When inserting a trace
+ * to source the formatting rules are used to convert the trace into source file
+ * representation.
+ * 
+ */
+public interface TraceFormattingRule extends TraceObjectRule {
+
+	/**
+	 * Gets the format for given trace
+	 * 
+	 * @param trace
+	 *            the trace
+	 * @param formatType
+	 *            the type of the format requested
+	 * @return the format
+	 */
+	public String getFormat(Trace trace, TraceFormatType formatType);
+
+	/**
+	 * Maps the trace name to name shown in source
+	 * 
+	 * @param trace
+	 *            the trace to be mapped
+	 * @return the name shown in source
+	 */
+	public String mapNameToSource(Trace trace);
+
+	/**
+	 * Maps the parameter count to source.
+	 * 
+	 * @param trace
+	 *            the trace
+	 * @param count
+	 *            the parameter count
+	 * @return mapped parameter count
+	 */
+	public String mapParameterCountToSource(Trace trace, int count);
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/source/TraceParameterFormattingRule.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,48 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Rule interface for parameters
+*
+*/
+package com.nokia.tracecompiler.engine.source;
+
+import com.nokia.tracecompiler.model.TraceObjectRule;
+
+/**
+ * Rule interface for parameters. Each parameter may provide replacement text
+ * for the %EXT% formatting.
+ * 
+ */
+public interface TraceParameterFormattingRule extends TraceObjectRule {
+
+	/**
+	 * Determines if this object should be shown in source
+	 * 
+	 * @return true if shown in source, false otherwise
+	 */
+	public boolean isShownInSource();
+
+	/**
+	 * Maps parameter name to name shown in source. Note that the original name
+	 * passed to this function is not necessarily the name returned by
+	 * getOwner().getName()
+	 * 
+	 * @param originalName
+	 *            the original name to be inserted to source
+	 * @return the name shown in source
+	 */
+	public String mapNameToSource(String originalName);
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/source/messages.properties	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,7 @@
+SourceFormatter.replaceAllBeginText=Replacing all : 
+SourceFormatter.replaceAllMiddleText=\ by 
+SourceProperties.newTraceLocationFoundBeginText=New TraceLocation found : 
+SourceProperties.newTraceLocationFoundEndText=. Trace text: 
+SourceProperties.newTraceLocationFoundMiddleText=. Line : 
+SourceProperties.parsingArrowAtBeginText=Parsing arror at 
+SourceProperties.parsingArrownAtMiddleText=. Line : 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/source/package.html	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,3 @@
+<html><body>
+Source engine monitors the source editors opened into Eclipse UI
+</body></html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/utils/TraceMultiplierRule.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,43 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Rule which can be used to create copies of new traces
+*
+*/
+package com.nokia.tracecompiler.engine.utils;
+
+import java.util.Iterator;
+
+import com.nokia.tracecompiler.model.Trace;
+import com.nokia.tracecompiler.model.TraceObjectRule;
+
+/**
+ * Rule which can be used to create copies of new traces
+ * 
+ */
+public interface TraceMultiplierRule extends TraceObjectRule {
+
+	/**
+	 * Gets copies of the given trace which is about to be inserted into given
+	 * context. The new trace is added first and the the copies will be inserted
+	 * after it in the order they are received from the iterator.
+	 * 
+	 * @param trace
+	 *            the new trace
+	 * @return a list of copies
+	 */
+	public Iterator<Trace> createCopies(Trace trace);
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/utils/TraceUtils.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,147 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Utility functions related to traces
+*
+*/
+package com.nokia.tracecompiler.engine.utils;
+
+import com.nokia.tracecompiler.plugin.TraceFormatConstants;
+
+/**
+ * Utility functions related to traces
+ * 
+ */
+public final class TraceUtils {
+
+	/**
+	 * Underscore character
+	 */
+	private static final String UNDERSCORE = "_"; //$NON-NLS-1$
+
+	/**
+	 * Underscore character
+	 */
+	private static final char UNDERSCORE_CHAR = '_';
+
+	/**
+	 * Cannot be constructed
+	 */
+	private TraceUtils() {
+	}
+
+	/**
+	 * Formats a trace
+	 * 
+	 * @param format
+	 *            the format specification
+	 * @param cname
+	 *            the class name
+	 * @param fname
+	 *            the function name
+	 * @return the formatted trace
+	 */
+	public static String formatTrace(String format, String cname, String fname) {
+		StringBuffer sb = new StringBuffer(format);
+		int cnindex = sb
+				.indexOf(TraceFormatConstants.FORMAT_CLASS_NAME_NORMAL_CASE);
+		if (cnindex >= 0) {
+			if (cname != null) {
+				sb.replace(cnindex, cnindex
+						+ TraceFormatConstants.FORMAT_CLASS_NAME_NORMAL_CASE
+								.length(), cname);
+			} else {
+				sb.replace(cnindex, cnindex
+						+ TraceFormatConstants.FORMAT_CLASS_NAME_NORMAL_CASE
+								.length(), ""); //$NON-NLS-1$
+			}
+		}
+		int cnup = sb
+				.indexOf(TraceFormatConstants.FORMAT_CLASS_NAME_UPPER_CASE);
+		if (cnup >= 0) {
+			if (cname != null) {
+				sb.replace(cnup, cnup
+						+ TraceFormatConstants.FORMAT_CLASS_NAME_UPPER_CASE
+								.length(), cname.toUpperCase());
+			} else {
+				sb.replace(cnup, cnup
+						+ TraceFormatConstants.FORMAT_CLASS_NAME_UPPER_CASE
+								.length(), ""); //$NON-NLS-1$
+			}
+		}
+		int fnindex = sb
+				.indexOf(TraceFormatConstants.FORMAT_FUNCTION_NAME_NORMAL_CASE);
+		if (fnindex >= 0) {
+			sb.replace(fnindex, fnindex
+					+ TraceFormatConstants.FORMAT_FUNCTION_NAME_NORMAL_CASE
+							.length(), fname);
+		}
+		int fnup = sb
+				.indexOf(TraceFormatConstants.FORMAT_FUNCTION_NAME_UPPER_CASE);
+		if (fnup >= 0) {
+			sb.replace(fnup, fnup
+					+ TraceFormatConstants.FORMAT_FUNCTION_NAME_UPPER_CASE
+							.length(), fname.toUpperCase());
+		}
+		return sb.toString();
+	}
+
+	/**
+	 * Replaces invalid characters with '_'
+	 * 
+	 * @param name
+	 *            name to be converted
+	 * @return the converted name
+	 */
+	public static String convertName(String name) {
+		StringBuffer sb;
+		if (name.length() > 0) {
+			boolean underscore = false;
+			sb = new StringBuffer(name);
+			if (Character.isDigit(name.charAt(0))) {
+				sb.insert(0, UNDERSCORE_CHAR);
+			}
+			for (int i = 0; i < sb.length(); i++) {
+				char c = sb.charAt(i);
+				if (!Character.isLetterOrDigit(c)) {
+					if (!underscore) {
+						sb.setCharAt(i, UNDERSCORE_CHAR);
+						underscore = true;
+					} else {
+						sb.deleteCharAt(i);
+						i--;
+					}
+				} else {
+					underscore = false;
+				}
+			}
+			if (sb.length() > 0) {
+				if (sb.charAt(sb.length() - 1) == UNDERSCORE_CHAR) {
+					sb.deleteCharAt(sb.length() - 1);
+				}
+			} else {
+				sb.append(UNDERSCORE);
+			}
+		} else {
+			sb = new StringBuffer();
+		}
+		// If parameter value is NULL, it would be used as name
+		String s = sb.toString();
+		if (s.equals("NULL")) { //$NON-NLS-1$
+			s = "_NULL"; //$NON-NLS-1$
+		}
+		return s;
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/utils/package.html	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,3 @@
+<html><body>
+Miscellaneus utility functions and interfaces that should not be in the public API
+</body></html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/file/FileCompareOutputStream.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,82 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Output stream which compares the data to existing file before writing
+*
+*/
+package com.nokia.tracecompiler.file;
+
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+
+/**
+ * Output stream which writes to a byte array. When writing is complete, the
+ * array contents are compared to existing file and the file is written only if
+ * there are changes
+ * 
+ */
+public class FileCompareOutputStream extends ByteArrayOutputStream {
+
+	/**
+	 * The header file
+	 */
+	private File file;
+
+	/**
+	 * Creates a new stream
+	 * 
+	 * @param file
+	 *            the header file
+	 */
+	public FileCompareOutputStream(File file) {
+		this.file = file;
+	}
+
+	/**
+	 * Writes the buffer to file if it has changed
+	 * 
+	 * @return true if header was written, false if it matched the existing
+	 *         header
+	 * @throws IOException
+	 *             if writing fails
+	 */
+	public boolean writeFile() throws IOException {
+		// Compares the file length to number of bytes in array
+		boolean writeHeader = true;
+		if (file.length() == count) {
+			FileInputStream fis = new FileInputStream(file);
+			byte[] temp = new byte[count];
+			fis.read(temp);
+			fis.close();
+			writeHeader = false;
+			// Compares the file content
+			for (int i = 0; i < count; i++) {
+				if (temp[i] != buf[i]) {
+					writeHeader = true;
+					i = count;
+				}
+			}
+		}
+		if (writeHeader) {
+			OutputStream fos = FileUtils.createOutputStream(file);
+			writeTo(fos);
+			fos.close();
+		}
+		return writeHeader;
+	}
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/file/FileUtils.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,218 @@
+/*
+* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* File utility functions
+*
+*/
+package com.nokia.tracecompiler.file;
+
+import java.io.BufferedOutputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+
+import com.nokia.tracecompiler.source.SourceConstants;
+
+/**
+ * File utility functions
+ * 
+ */
+public final class FileUtils {
+
+	/**
+	 * File copy buffer size
+	 */
+	private static final int COPY_BUFFER_SIZE = 4096; // CodForChk_Dis_Magic
+
+	/**
+	 * cpp extension
+	 */
+	public final static String CPP_EXTENSION = "cpp"; //$NON-NLS-1$	
+
+	/**
+	 * c extension
+	 */
+	public final static String C_EXTENSION = "c"; //$NON-NLS-1$	
+
+	/**
+	 * Allowed files
+	 */
+	private final static String[] FILE_FILTERS = { ".cpp", //$NON-NLS-1$
+			".c", //$NON-NLS-1$
+			".inl", //$NON-NLS-1$
+			".h" //$NON-NLS-1$
+	};
+
+	/**
+	 * MMP file extension
+	 */
+	public static final String MMP = ".mmp"; //$NON-NLS-1$
+
+	/**
+	 * number of times trying to create a directy(ies)
+	 */
+	private static final int MAX_DIRECTORY_CREATION_TRIES = 5;
+	
+	/**
+	 * Time to sleep between tries to create a directory(ies)
+	 */
+	private static final int SLEEP_TIME_BETWEEN_DIRECTORY_CREATION_TRIES = 100;
+
+	
+	/**
+	 * Creates a file output stream. This creates directories and overwriting
+	 * possible read-only flag
+	 * 
+	 * @param file
+	 *            the file
+	 * @return the file output stream
+	 * @throws FileNotFoundException
+	 *             if file cannot be created
+	 */
+	public static OutputStream createOutputStream(File file)
+			throws FileNotFoundException {
+		File parent = file.getParentFile();
+		if (!parent.exists()) {
+			createDirectories(parent);
+		}
+		FileOutputStream fos;
+		try {
+			fos = new FileOutputStream(file);
+		} catch (IOException e) {
+			if (file.exists()) {
+				file.delete();
+			}
+			fos = new FileOutputStream(file);
+		}
+		return new BufferedOutputStream(fos);
+	}
+
+	/**
+	 * Creates a copy of a file
+	 * 
+	 * @param source
+	 *            the source file
+	 * @param target
+	 *            the target file
+	 * @return true if written successfully
+	 */
+	public static boolean copyFile(File source, File target) {
+		boolean backup = true;
+		try {
+			byte[] buf = new byte[COPY_BUFFER_SIZE];
+			FileInputStream fis = new FileInputStream(source);
+			OutputStream fos = createOutputStream(target);
+			int len;
+			do {
+				len = fis.read(buf);
+				if (len > 0) {
+					fos.write(buf, 0, len);
+				}
+			} while (len > 0);
+			fis.close();
+			fos.close();
+		} catch (Exception e) {
+			backup = false;
+		}
+		return backup;
+	}
+
+	/**
+	 * Converts file separator characters
+	 * 
+	 * @param separator
+	 *            separator to be used
+	 * @param path
+	 *            string to be converted
+	 * @param addLast
+	 *            true if the converted string should end with a separator
+	 * @return the converted string
+	 */
+	public static String convertSeparators(char separator, String path,
+			boolean addLast) {
+		path = path.replace(SourceConstants.FORWARD_SLASH_CHAR, separator);
+		path = path.replace(SourceConstants.BACKSLASH_CHAR, separator);
+		String sepStr = String.valueOf(separator);
+		if (addLast && !path.endsWith(sepStr)) {
+			path += separator;
+		} else if (!addLast && path.endsWith(sepStr)) {
+			path = path.substring(0, path.length() - 1);
+		}
+		return path;
+	}
+
+	/**
+	 * Checks if given file is allowed to be opened into TraceCompiler
+	 * 
+	 * @param fileName
+	 *            the file to be checked
+	 * @return true if filtered, false if not
+	 */
+	public static boolean isFileAllowed(String fileName) {
+		boolean allowed = false;
+		fileName = fileName.toLowerCase();
+		for (String filter : FILE_FILTERS) {
+			if (fileName.endsWith(filter)) {
+				allowed = true;
+				break;
+			}
+		}
+		return allowed;
+	}
+
+	/**
+	 * Create directories safely in a multiple instances case
+	 * @param path
+	 * @param access
+	 * @return boolean pass/fail
+	 */
+	public static boolean createDirectories(File path) {
+
+		boolean retVal = true;
+
+		int tries = 0;
+
+		if (path.exists()) {
+			return retVal;
+		}
+
+		// try few times
+		while (tries < MAX_DIRECTORY_CREATION_TRIES) {
+
+			retVal = path.mkdirs();
+			// mkdirs can fail for a number of reasons including the case where
+			// the directory is open by another process. The API does not make
+			// any difference so we assume the latter case (worst case)
+			if (!retVal) { // sleep for moment and try again.
+
+				tries++;
+
+				try {
+					Thread.sleep(SLEEP_TIME_BETWEEN_DIRECTORY_CREATION_TRIES);
+				} catch (InterruptedException e) {
+					// Do nothing
+				}
+			} else { // pass
+				break;
+			}
+		}
+
+		return retVal;
+
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/licence.lic	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,17 @@
+/*
+* This is Default Licence added by TraceCompiler
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/licence_hash.lic	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,17 @@
+##
+# This is Default Licence added by TraceCompiler
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "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:
+#
+# Description: 
+#
+##
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/messages.properties	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,65 @@
+TraceCompiler.componentUidIsNotValidExceptionText=Component UID is not valid : 
+TraceCompiler.invalidMmpExceptionText=Invalid mmp file : 
+TraceCompiler.invalidTraceCompilerArgumetsExceptionText=Invalid trace compiler arguments
+TraceCompiler.noSourceFilesExceptionText=No source files provided.
+TraceCompiler.settingComponentPath=Component path set to : 
+TraceCompiler.settingTracesPath=Traces path set to : 
+TraceCompiler.mkdirFailed=Failed to create directory/ies :
+TraceCompiler.TracesPathWriteProtected=Traces path is write protected :
+TraceCompilerLogger.errorPrefix=error: 
+TraceCompilerLogger.infoPrefix=info: 
+TraceCompilerLogger.warningPrefix=warning: 
+TraceCompilerModelListener.lineNumberPrefix=, line 
+TraceCompiler.UnsupportedSwitch=Unsupported switch : 
+TraceCompiler.projectNameMissing=Project name missing.
+TraceCompiler.mmpPathMissing=MMP path missing.
+TraceCompiler.tracesPathMissing=Traces path missing.
+TraceCompiler.fileListMissing=Input file list empty.
+TraceCompiler.sourceFileDoesNotExist=Source file does not exist : 
+TraceCompiler.veboseEnabled=Verbose mode enabled.
+TraceCompiler.StopOnErrorEnabled=Stop On Error enabled.
+TraceCompiler.CompNameSet=Project name set to : 
+TraceCompiler.MMPPathSet=MMP path set to : 
+TraceCompiler.UidStwich=--uid
+TraceCompiler.UidText=component uid.
+TraceCompiler.ProjectSwitch=--project
+TraceCompiler.ProjectText=project name.
+TraceCompiler.MmpSwitch= --mmp
+TraceCompiler.MmpText=mmp path
+TraceCompiler.TracesSwitch=--traces
+TraceCompiler.TracesText=traces folder path.
+TraceCompiler.VersionSwitchLong=--version
+TraceCompiler.VersionSwitchShort=-v
+TraceCompiler.VersionText=print TraceCompiler version.
+TraceCompiler.HelpSwicthLong=--help
+TraceCompiler.HelpSwitchShort=-h
+TraceCompiler.HelpText=print help
+TraceCompiler.VerboseSwitchLong=--verbose
+TraceCompiler.VerboseSwitchShort=-d
+TraceCompiler.VerboseText=print info messages.
+TraceCompiler.StopSwitchLong=--stopOnError
+TraceCompiler.StopSwitchShort=-s
+TraceCompiler.StopText=On error, stop at the end of the compilation unit.
+TraceCompiler.DisplayVersionText=TraceCompiler version 
+TraceCompiler.Options=Options:
+TraceCompiler.Value=value
+TraceCompiler.Usage=Usage: 
+TraceCompiler.UsageText=tracecompiler [options] source_file...]
+TraceCompiler.EndOfList=*ENDOFSOURCEFILES*
+TraceCompiler.MmpExtension=.mmp
+TraceCompiler.PluginPath=com/nokia/tracecompiler/decodeplugins
+TraceCompiler.DecodeText1=<DECODE_PLUGIN_NAME>
+TraceCompiler.DecodeText2=<DECODE_PLUGIN_CLASS_NAME>
+TraceCompiler.DecodePluginsNameSpace=com.nokia.tracecompiler.decodeplugins.
+TraceCompiler.Took= took 
+TraceCompiler.MS= ms
+TraceCompiler.DecodePlugin=Decode plugin 
+TraceCompiler.AddingFailed= adding failed
+TraceCompiler.Added= added
+TraceCompiler.DecodePluginFile=Decode plugin file
+TraceCompiler.DoesNotExist= does not exist
+TraceCompiler.BuildingTracesMess=Building traces...
+TraceCompiler.ReadingFilesMess=parameters read from stdin (empty lines allowed) ending with 
+TraceCompiler.ProjectCancelledMess=Project creation was cancelled
+TraceCompiler.BuildFailed=Build trace files failed.
+TraceCompiler.InvalidMMP2=Missing or can not access MMP path: 
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/DuplicateParameterNameModifier.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,61 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Parameter name modifier
+*
+*/
+package com.nokia.tracecompiler.model;
+
+/**
+ * Parameter name modifier
+ * 
+ */
+final class DuplicateParameterNameModifier extends DuplicateValueModifier {
+
+	/**
+	 * The parameter owner
+	 */
+	private Trace owner;
+
+	/**
+	 * Constructor
+	 * 
+	 * @param owner
+	 *            the owner of the parameter
+	 * @param name
+	 *            the parameter name
+	 */
+	DuplicateParameterNameModifier(Trace owner, String name) {
+		super(name);
+		this.owner = owner;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.model.TraceObjectUtils.DuplicateValueModifier#
+	 *      findObject(java.lang.String)
+	 */
+	@Override
+	TraceObject findObject(String name) {
+		TraceObject retval;
+		if (owner != null) {
+			retval = owner.findParameterByName(name);
+		} else {
+			retval = null;
+		}
+		return retval;
+	}
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/DuplicateValueModifier.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,183 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Base class for value modifiers
+*
+*/
+package com.nokia.tracecompiler.model;
+
+/**
+ * Base class for value modifiers
+ * 
+ */
+abstract class DuplicateValueModifier implements TraceObjectModifier {
+
+	/**
+	 * Duplicate tag for values
+	 */
+	private static final String DUPLICATE_TAG = "DUP"; //$NON-NLS-1$
+
+	/**
+	 * Duplicate tag separator
+	 */
+	private static final char DUPLICATE_SEPARATOR = '_';
+
+	/**
+	 * Value
+	 */
+	private String value;
+
+	/**
+	 * Changed flag
+	 */
+	private boolean changed;
+
+	/**
+	 * Constructor
+	 * 
+	 * @param value
+	 *            the value
+	 */
+	DuplicateValueModifier(String value) {
+		this.value = value;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.model.TraceObjectUtils.TraceObjectModifier#getData()
+	 */
+	public String getData() {
+		return value;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.model.TraceObjectUtils.TraceObjectModifier#hasChanged()
+	 */
+	public boolean hasChanged() {
+		return changed;
+	}
+
+	/**
+	 * Gets the separator character
+	 * 
+	 * @return the char
+	 */
+	protected char getSeparator() {
+		return DUPLICATE_SEPARATOR;
+	}
+
+	/**
+	 * Processes the name and modifies if there are duplicates
+	 */
+	void processName() {
+		int index = getStartIndex(value);
+		TraceObject object;
+		do {
+			object = findObject(value);
+			if (object != null) {
+				changed = true;
+				value = appendIndexToString(value, index);
+				index++;
+			}
+		} while (object != null);
+	}
+
+	/**
+	 * Gets the start index from given text
+	 * 
+	 * @param value
+	 *            the value to be parsed
+	 * @return the start index
+	 */
+	private int getStartIndex(String value) {
+		String valueStr = null;
+		if (value.startsWith(DUPLICATE_TAG)) {
+			for (int i = DUPLICATE_TAG.length(); i < value.length(); i++) {
+				char c = value.charAt(i);
+				if (!Character.isDigit(c)) {
+					valueStr = value.substring(DUPLICATE_TAG.length(), i);
+					i = value.length();
+				}
+			}
+		}
+		int retval = -1;
+		if (valueStr != null && valueStr.length() > 0) {
+			retval = Integer.parseInt(valueStr);
+		}
+		return retval;
+	}
+
+	/**
+	 * Appends an index value to given string replacing existing index if it
+	 * exists
+	 * 
+	 * @param value
+	 *            the string
+	 * @param index
+	 *            the index
+	 * @return the changed string
+	 */
+	private String appendIndexToString(String value, int index) {
+		StringBuffer newValue = new StringBuffer();
+		if (index >= 0) {
+			String indexStr = String.valueOf(index);
+			newValue.append(DUPLICATE_TAG);
+			newValue.append(String.valueOf(index + 1));
+			newValue.append(getSeparator());
+			newValue.append(value.substring(DUPLICATE_TAG.length()
+					+ indexStr.length() + 1)); // Add separator
+		} else {
+			newValue.append(DUPLICATE_TAG);
+			newValue.append("1"); //$NON-NLS-1$
+			newValue.append(getSeparator());
+			newValue.append(value);
+		}
+		return newValue.toString();
+	}
+
+	/**
+	 * Gets the duplicate modifier from beginning of given text
+	 * 
+	 * @param text
+	 *            the text
+	 * @return the modifier
+	 */
+	static String getModifier(String text) {
+		String retval = null;
+		if (text.startsWith(DUPLICATE_TAG)) {
+			for (int i = DUPLICATE_TAG.length(); i < text.length(); i++) {
+				char c = text.charAt(i);
+				if (!Character.isDigit(c)) {
+					retval = text.substring(0, i + 1); // Add separator
+					i = text.length();
+				}
+			}
+		}
+		return retval;
+	}
+
+	/**
+	 * Finds the object from model
+	 * 
+	 * @param value
+	 *            the value
+	 * @return the object or null if not found
+	 */
+	abstract TraceObject findObject(String value);
+
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/Trace.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,273 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Represents the mapping of a trace ID into actual trace string
+*
+*/
+package com.nokia.tracecompiler.model;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+
+/**
+ * Represents the mapping of a trace ID into actual trace string. When a trace
+ * is decoded, the trace ID found from the binary trace file is converted to the
+ * text stored in this trace.
+ * 
+ */
+public class Trace extends TraceObject implements Iterable<TraceParameter> {
+
+	/**
+	 * The trace string
+	 */
+	private String trace = ""; //$NON-NLS-1$
+
+	/**
+	 * List of TraceParameter objects.
+	 */
+	private ArrayList<TraceParameter> parameters = new ArrayList<TraceParameter>();
+
+	/**
+	 * The trace group this trace belongs to
+	 */
+	private TraceGroup group;
+
+	/**
+	 * Creates a new trace and associates it with given TraceGroup
+	 * 
+	 * @param group
+	 *            the trace group
+	 */
+	Trace(TraceGroup group) {
+		setModel(group.getModel());
+		this.group = group;
+		group.addTrace(this);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.model.TraceObject#reset()
+	 */
+	@Override
+	void reset() {
+		super.reset();
+		for (TraceParameter parameter : parameters) {
+			// Model listeners are not notified on reset, but if the
+			// parameter itself implements a delete notification interface,
+			// it must be called to do appropriate cleanup
+			notifyOnDelete(parameter);
+			parameter.reset();
+		}
+		parameters.clear();
+	}
+
+	/**
+	 * Sets the trace string. Generates propertyUpdated event to model listeners
+	 * if the string changes
+	 * 
+	 * @see TraceModelListener#propertyUpdated(TraceObject, int)
+	 * @param trace
+	 *            the trace string
+	 * @throws TraceCompilerException 
+	 */
+	public void setTrace(String trace) throws TraceCompilerException {
+		if (trace == null) {
+			trace = ""; //$NON-NLS-1$
+		}
+		if (!trace.equals(this.trace)) {
+			this.trace = trace;
+			getModel().notifyPropertyUpdated(this, TraceModelListener.TRACE);
+		}
+	}
+
+	/**
+	 * Returns the trace string. This never returns null
+	 * 
+	 * @return the trace string
+	 */
+	public String getTrace() {
+		return trace;
+	}
+
+	/**
+	 * Returns the group to which this trace belongs
+	 * 
+	 * @return trace group
+	 */
+	public TraceGroup getGroup() {
+		return group;
+	}
+
+	/**
+	 * Adds a new parameter to the end of parameter list. Generates objectAdded
+	 * event to model listeners
+	 * 
+	 * @see TraceModelListener#objectAdded(TraceObject, TraceObject)
+	 * @param parameter
+	 *            the new parameter
+	 */
+	public void addParameter(TraceParameter parameter) {
+		parameters.add(parameter);
+		getModel().notifyObjectAdded(this, parameter);
+	}
+
+	/**
+	 * Inserts a new parameter to the given location. Generates objectAdded
+	 * event to model listeners
+	 * 
+	 * @see TraceModelListener#objectAdded(TraceObject, TraceObject)
+	 * @param index
+	 *            the index for new parameter
+	 * @param parameter
+	 *            the new parameter
+	 */
+	void insertParameter(int index, TraceParameter parameter) {
+		parameters.add(index, parameter);
+		getModel().notifyObjectAdded(this, parameter);
+	}
+
+	/**
+	 * Removes a parameter from this trace object. Generates a objectRemoved
+	 * event to model listeners if the parameter is actually removed
+	 * 
+	 * @see TraceModelListener#objectRemoved(TraceObject, TraceObject)
+	 * @param parameter
+	 *            the parameter to be removed
+	 * @throws TraceCompilerException 
+	 */
+	public void removeParameter(TraceParameter parameter) throws TraceCompilerException {
+		if (parameters.remove(parameter)) {
+			getModel().notifyObjectRemoved(this, parameter);
+			parameter.reset();
+		}
+	}
+
+	/**
+	 * Removes parameter at given index
+	 * 
+	 * @param index
+	 *            the index of the parameter
+	 * @throws TraceCompilerException 
+	 */
+	public void removeParameterAt(int index) throws TraceCompilerException {
+		if (index >= 0 && index < parameters.size()) {
+			TraceParameter parameter = parameters.get(index);
+			parameters.remove(index);
+			getModel().notifyObjectRemoved(this, parameter);
+			parameter.reset();
+		}
+	}
+
+	/**
+	 * Determines if this object has parameters.
+	 * 
+	 * @return true if this object has parameters
+	 */
+	public boolean hasParameters() {
+		return !parameters.isEmpty();
+	}
+
+	/**
+	 * Gets the number of parameters
+	 * 
+	 * @return the number of parameters
+	 */
+	public int getParameterCount() {
+		return parameters.size();
+	}
+
+	/**
+	 * Returns highest parameter ID + 1. Can be used to create an unique ID for
+	 * a new parameter.
+	 * 
+	 * @return the next parameter ID
+	 */
+	public int getNextParameterID() {
+		int max = 0;
+		for (TraceParameter parameter : parameters) {
+			int id = parameter.getID();
+			if (id > max) {
+				max = id;
+			}
+		}
+		return max + 1;
+	}
+
+	/**
+	 * Gets the parameter at given index
+	 * 
+	 * @param index
+	 *            the parameter index
+	 * @return the parameter at the index
+	 */
+	public TraceParameter getParameter(int index) {
+		return parameters.get(index);
+	}
+
+	/**
+	 * Returns the parameters of this object
+	 * 
+	 * @return iterator over the parameters
+	 */
+	public Iterator<TraceParameter> getParameters() {
+		return parameters.iterator();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.lang.Iterable#iterator()
+	 */
+	public Iterator<TraceParameter> iterator() {
+		return parameters.iterator();
+	}
+
+	/**
+	 * Gets a parameter by ID
+	 * 
+	 * @param id
+	 *            the parameter ID
+	 * @return the parameter or null
+	 */
+	public TraceParameter findParameterByID(int id) {
+		TraceParameter retval = null;
+		for (TraceParameter parameter : parameters) {
+			if (parameter.getID() == id) {
+				retval = parameter;
+				break;
+			}
+		}
+		return retval;
+	}
+
+	/**
+	 * Gets a parameter by name
+	 * 
+	 * @param name
+	 *            the name of a parameter
+	 * @return the parameter or null
+	 */
+	public TraceParameter findParameterByName(String name) {
+		TraceParameter retval = null;
+		for (TraceParameter parameter : parameters) {
+			if (parameter.getName().equals(name)) {
+				retval = parameter;
+				break;
+			}
+		}
+		return retval;
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceCompilerErrorParameters.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,27 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Parameters for errors
+*
+*/
+package com.nokia.tracecompiler.model;
+
+/**
+ * Parameters for errors
+ * 
+ */
+public class TraceCompilerErrorParameters {
+
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceCompilerException.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,164 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Exceptions thrown by TraceCompiler engine
+*
+*/
+package com.nokia.tracecompiler.model;
+
+/**
+ * Exceptions thrown by TraceCompiler engine
+ * 
+ */
+public class TraceCompilerException extends Exception {
+
+	/**
+	 * Error codes for TraceCompiler exceptions
+	 * 
+	 */
+	public interface TraceCompilerExceptionCode {
+	}
+
+	/**
+	 * UID
+	 */
+	private static final long serialVersionUID = -2991616409482985157L; // CodForChk_Dis_Magic
+
+	/**
+	 * Error code
+	 */
+	private TraceCompilerExceptionCode errorCode;
+
+	/**
+	 * Error parameters
+	 */
+	private TraceCompilerErrorParameters parameters;
+
+	/**
+	 * Source object
+	 */
+	private Object source;
+
+	/**
+	 * Flag that defines will event related to exception posted to trace event view
+	 */
+	private boolean postEvent = true;
+	
+	/**
+	 * Constructor with error code
+	 * 
+	 * @param errorCode
+	 *            the error code
+	 */
+	public TraceCompilerException(TraceCompilerExceptionCode errorCode) {
+		this.errorCode = errorCode;
+	}
+	
+	/**
+	 * Constructor with error code and postEvent flag
+	 * 
+	 * @param errorCode
+	 *            the error code
+	 * @param postEvent
+	 *            flag that defines will event related to exception posted to trace event view   
+	 */
+	public TraceCompilerException(TraceCompilerExceptionCode errorCode, boolean postEvent) {
+		this.errorCode = errorCode;
+		this.postEvent = postEvent;
+	}
+
+	/**
+	 * Constructor with error code and parameters
+	 * 
+	 * @param errorCode
+	 *            the error code
+	 * @param parameters
+	 *            the error parameters
+	 */
+	public TraceCompilerException(TraceCompilerExceptionCode errorCode,
+			TraceCompilerErrorParameters parameters) {
+		this.errorCode = errorCode;
+		this.parameters = parameters;
+	}
+
+	/**
+	 * Constructor with error code, parameters and source object
+	 * 
+	 * @param errorCode
+	 *            the error code
+	 * @param parameters
+	 *            the error parameters
+	 * @param source
+	 *            the source object
+	 */
+	public TraceCompilerException(TraceCompilerExceptionCode errorCode,
+			TraceCompilerErrorParameters parameters, Object source) {
+		this.errorCode = errorCode;
+		this.parameters = parameters;
+		this.source = source;
+	}
+	
+	/**
+	 * Constructor with error code and root cause
+	 * 
+	 * @param errorCode
+	 *            the error code
+	 * @param cause
+	 *            the reason for this exception
+	 */
+	public TraceCompilerException(TraceCompilerExceptionCode errorCode,
+			Throwable cause) {
+		super(cause);
+		this.errorCode = errorCode;
+	}
+
+	/**
+	 * Gets the error code
+	 * 
+	 * @return error code
+	 */
+	public TraceCompilerExceptionCode getErrorCode() {
+		return errorCode;
+	}
+
+	/**
+	 * Gets the parameters related to the error
+	 * 
+	 * @return the parameters
+	 */
+	public TraceCompilerErrorParameters getErrorParameters() {
+		return parameters;
+	}
+
+	/**
+	 * Gets the source of this error
+	 * 
+	 * @return the source
+	 */
+	public Object getErrorSource() {
+		return source;
+	}
+
+	/**
+	 * Is event related to exception wanted to post to trace event view
+	 * 
+	 * @return true is event is wanted to post trace event view
+	 *         false is event is not wanted to post trace event view
+	 */
+	public boolean isEventWantedToPost() {
+		return postEvent;
+	}
+	
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceConstantTable.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,253 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Integer-to-string mapping table for parameters
+*
+*/
+package com.nokia.tracecompiler.model;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+
+/**
+ * Integer-to-string mapping table for parameters
+ * 
+ */
+public class TraceConstantTable extends TraceObject implements
+		Iterable<TraceConstantTableEntry> {
+
+	/**
+	 * Table entries
+	 */
+	private ArrayList<TraceConstantTableEntry> entries = new ArrayList<TraceConstantTableEntry>();
+
+	/**
+	 * Table type
+	 */
+	private String type = TraceParameter.UDEC32;
+
+	/**
+	 * Parameter reference count
+	 */
+	private ArrayList<TraceParameter> parameterReferences = new ArrayList<TraceParameter>();
+
+	/**
+	 * Creates a new constant table
+	 * 
+	 * @param model
+	 *            the trace model
+	 */
+	TraceConstantTable(TraceModel model) {
+		setModel(model);
+		model.addConstantTable(this);
+	}
+
+	/**
+	 * Gets the type
+	 * 
+	 * @return the type
+	 */
+	public String getType() {
+		return type;
+	}
+
+	/**
+	 * Sets the constant type
+	 * 
+	 * @param type
+	 *            the parameter type
+	 */
+	public void setType(String type) {
+		this.type = type;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.model.TraceObject#setName(java.lang.String)
+	 */
+	@Override
+	public void setName(String name) throws TraceCompilerException {
+		super.setName(name);
+		// Note: Currently name changes are disabled when a table is referenced
+		// by parameters. If enabled at some point, a notification about this
+		// needs to be sent to the parameters
+	}
+
+	/**
+	 * Adds a constant table entry to this table. This is called from the
+	 * constant table entry constructor, to this is not public. Generates a
+	 * objectAdded event to model listeners
+	 * 
+	 * @see TraceModelListener#objectAdded(TraceObject, TraceObject)
+	 * @param entry
+	 *            the table entry
+	 */
+	void addEntry(TraceConstantTableEntry entry) {
+		entries.add(entry);
+		getModel().notifyObjectAdded(this, entry);
+	}
+
+	/**
+	 * Removes the given constant table entry. Creates a objectRemoved event to
+	 * the model listeners
+	 * 
+	 * @see TraceModelListener#objectRemoved(TraceObject, TraceObject)
+	 * @param entry
+	 *            the entry to be removed
+	 * @throws TraceCompilerException 
+	 */
+	public void removeEntry(TraceConstantTableEntry entry) throws TraceCompilerException {
+		if (entries.remove(entry)) {
+			getModel().notifyObjectRemoved(this, entry);
+			entry.reset();
+		}
+	}
+
+	/**
+	 * Gets the entry which has given ID
+	 * 
+	 * @param id
+	 *            the id
+	 * @return the entry or null
+	 */
+	public TraceConstantTableEntry findEntryByID(int id) {
+		TraceConstantTableEntry retval = null;
+		for (TraceConstantTableEntry entry : entries) {
+			if (entry.getID() == id) {
+				retval = entry;
+				break;
+			}
+		}
+		return retval;
+	}
+
+	/**
+	 * Gets the entry which has the given name
+	 * 
+	 * @param name
+	 *            the name
+	 * @return the entry or null
+	 */
+	public TraceConstantTableEntry findEntryByName(String name) {
+		TraceConstantTableEntry retval = null;
+		for (TraceConstantTableEntry entry : entries) {
+			if (entry.getName().equals(name)) {
+				retval = entry;
+				break;
+			}
+		}
+		return retval;
+	}
+
+	/**
+	 * Gets the constant table entries
+	 * 
+	 * @return the entries iterator
+	 */
+	public Iterator<TraceConstantTableEntry> getEntries() {
+		return entries.iterator();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.lang.Iterable#iterator()
+	 */
+	public Iterator<TraceConstantTableEntry> iterator() {
+		return entries.iterator();
+	}
+
+	/**
+	 * Determines if there are any entries in this table
+	 * 
+	 * @return true if there are entries
+	 */
+	public boolean hasEntries() {
+		return !entries.isEmpty();
+	}
+
+	/**
+	 * Adds a parameter reference
+	 * 
+	 * @param parameter
+	 *            the parameter to be added
+	 */
+	void addParameterReference(TraceParameter parameter) {
+		parameterReferences.add(parameter);
+	}
+
+	/**
+	 * Removes a parameter reference
+	 * 
+	 * @param parameter
+	 *            the reference to be removed
+	 */
+	void removeParameterReference(TraceParameter parameter) {
+		parameterReferences.remove(parameter);
+	}
+
+	/**
+	 * Checks if there are parameter references
+	 * 
+	 * @return true if this table is referenced from parameters
+	 */
+	public boolean hasParameterReferences() {
+		return !parameterReferences.isEmpty();
+	}
+
+	/**
+	 * Gets the parameter references
+	 * 
+	 * @return the iterator of the references
+	 */
+	public Iterator<TraceParameter> getParameterReferences() {
+		return parameterReferences.iterator();
+	}
+
+	/**
+	 * Gets the largest constant ID + 1
+	 * 
+	 * @return the ID
+	 */
+	public int getNextEntryID() {
+		int max = 0;
+		for (TraceConstantTableEntry entry : entries) {
+			int id = entry.getID();
+			if (id > max) {
+				max = id;
+			}
+		}
+		return max + 1;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.model.TraceObject#reset()
+	 */
+	@Override
+	void reset() {
+		for (TraceConstantTableEntry entry : entries) {
+			// Model listeners are not notified on reset, but if the
+			// entry itself implements a delete notification interface,
+			// it must be called to do appropriate cleanup
+			notifyOnDelete(entry);
+			entry.reset();
+		}
+		super.reset();
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceConstantTableEntry.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,53 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* One entry in the integer-to-string mapping table
+*
+*/
+package com.nokia.tracecompiler.model;
+
+/**
+ * One entry in the integer-to-string mapping table
+ * 
+ */
+public class TraceConstantTableEntry extends TraceObject {
+
+	/**
+	 * Constant table that owns this parameter
+	 */
+	private TraceConstantTable table;
+
+	/**
+	 * Constructor
+	 * 
+	 * @param table
+	 *            the constant table that owns this entry
+	 */
+	TraceConstantTableEntry(TraceConstantTable table) {
+		setModel(table.getModel());
+		this.table = table;
+		table.addEntry(this);
+	}
+
+	/**
+	 * Gets the table that owns this entry
+	 * 
+	 * @return the table
+	 */
+	public TraceConstantTable getTable() {
+		return table;
+	}
+
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceGroup.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,205 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Represents a logical collection of traces somehow related to each other
+*
+*/
+package com.nokia.tracecompiler.model;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Iterator;
+
+/**
+ * Represents a logical collection of traces somehow related to each other. Each
+ * trace group specifies a prefix that is attached to all trace lines made
+ * within that group.
+ * 
+ */
+public class TraceGroup extends TraceObject implements Iterable<Trace> {
+
+	/**
+	 * List of traces, sorted by ID
+	 */
+	private ArrayList<Trace> tracesByID = new ArrayList<Trace>();
+
+	/**
+	 * List of traces, sorted by name
+	 */
+	private ArrayList<Trace> tracesByName = new ArrayList<Trace>();
+
+	/**
+	 * Creates a new trace group and associates it with given trace model.
+	 * 
+	 * @param model
+	 *            the trace model
+	 */
+	TraceGroup(TraceModel model) {
+		setModel(model);
+		model.addGroup(this);
+	}
+
+	/**
+	 * Adds a trace to this group. Creates objectAdded event to model listeners
+	 * 
+	 * @see TraceModelListener#objectAdded(TraceObject, TraceObject)
+	 * @param trace
+	 *            the trace to be added
+	 */
+	void addTrace(Trace trace) {
+		// Sorted when ID is set to trace
+		tracesByID.add(trace);
+		// Sorted when name is set to trace
+		tracesByName.add(trace);
+		getModel().notifyObjectAdded(this, trace);
+	}
+
+	/**
+	 * Removes a trace from this group. Creates objectRemoved event to model
+	 * listeners
+	 * 
+	 * @see TraceModelListener#objectRemoved(TraceObject, TraceObject)
+	 * @param trace
+	 *            the trace to be removed
+	 * @throws TraceCompilerException 
+	 */
+	public void removeTrace(Trace trace) throws TraceCompilerException {
+		int index = Collections.binarySearch(tracesByID, trace,
+				TraceObjectUtils.traceObjectIDComparator);
+		if (index >= 0) {
+			tracesByID.remove(index);
+			index = Collections.binarySearch(tracesByName, trace,
+					TraceObjectUtils.traceObjectNameComparator);
+			tracesByName.remove(index);
+			getModel().notifyObjectRemoved(this, trace);
+			trace.reset();
+		}
+	}
+
+	/**
+	 * Determines if this group has traces.
+	 * 
+	 * @return true if the group contains traces
+	 */
+	public boolean hasTraces() {
+		return !tracesByID.isEmpty();
+	}
+
+	/**
+	 * Gets the number of traces in this group.
+	 * 
+	 * @return the number of traces
+	 */
+	public int getTraceCount() {
+		return tracesByID.size();
+	}
+
+	/**
+	 * Returns an iterator over the traces within this group.
+	 * 
+	 * @return the iterator
+	 */
+	public Iterator<Trace> getTraces() {
+		return tracesByID.iterator();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.lang.Iterable#iterator()
+	 */
+	public Iterator<Trace> iterator() {
+		return tracesByID.iterator();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.model.TraceObject#reset()
+	 */
+	@Override
+	void reset() {
+		// Reset removes constant table references
+		for (Trace trace : tracesByID) {
+			// Model listeners are not notified on reset, but if the
+			// trace itself implements a delete notification interface,
+			// it must be called to do appropriate cleanup
+			notifyOnDelete(trace);
+			trace.reset();
+		}
+		tracesByID.clear();
+		tracesByName.clear();
+		super.reset();
+	}
+
+	/**
+	 * Returns highest trace ID + 1. Can be used to create an unique ID for a
+	 * new trace.
+	 * 
+	 * @return the next trace ID
+	 */
+	public int getNextTraceID() {
+		int ret;
+		if (tracesByID.size() > 0) {
+			ret = tracesByID.get(tracesByID.size() - 1).getID() + 1;
+		} else {
+			ret = 1;
+		}
+		return ret;
+	}
+
+	/**
+	 * Gets the trace which has given ID
+	 * 
+	 * @param id
+	 *            the trace ID
+	 * @return the trace or null
+	 */
+	public Trace findTraceByID(int id) {
+		int index = Collections.binarySearch(tracesByID, id,
+				TraceObjectUtils.traceToIDComparator);
+		Trace retval;
+		if (index >= 0) {
+			retval = tracesByID.get(index);
+		} else {
+			retval = null;
+		}
+		return retval;
+	}
+
+	/**
+	 * Called by the model when a trace property is updated
+	 * 
+	 * @param source
+	 *            the trace that was changed
+	 * @param property
+	 *            the property that was changed
+	 */
+	void tracePropertyUpdated(TraceObject source, int property) {
+		if (property == TraceModelListener.NAME) {
+			Collections.sort(tracesByName,
+					TraceObjectUtils.traceObjectNameComparator);
+		} else if (property == TraceModelListener.ID) {
+			traceIDsUpdated();
+		}
+	}
+
+	/**
+	 * Sorts the trace array based on new ID configuration
+	 */
+	void traceIDsUpdated() {
+		Collections.sort(tracesByID, TraceObjectUtils.traceObjectIDComparator);
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceModel.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,997 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Trace model is a collection of trace groups
+*
+*/
+package com.nokia.tracecompiler.model;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Enumeration;
+import java.util.Iterator;
+import java.util.Properties;
+
+import com.nokia.tracecompiler.engine.TraceCompilerEngineGlobals;
+import com.nokia.tracecompiler.engine.TraceCompilerEngineErrorCodes.TraceCompilerErrorCode;
+import com.nokia.tracecompiler.engine.project.SortedProperties;
+import com.nokia.tracecompiler.project.FormattingUtils;
+import com.nokia.tracecompiler.source.SourceConstants;
+
+/**
+ * Trace model is a collection of trace groups. Listener interfaces can be
+ * attached to a trace model to receive change notifications when traces are
+ * added, removed or modified.
+ * 
+ */
+public class TraceModel extends TraceObject implements Iterable<TraceGroup> {
+
+	/**
+	 * Group property prefix
+	 */
+	public final String GROUP_PROPERTY_PREFIX = "[GROUP]"; //$NON-NLS-1$
+
+	/**
+	 * Trace property prefix
+	 */
+	public final String TRACE_PROPERTY_PREFIX = "[TRACE]"; //$NON-NLS-1$
+
+	/**
+	 * Obsolete property prefix
+	 */
+	public final String OBSOLETE_PROPERTY_PREFIX = "[[OBSOLETE]]"; //$NON-NLS-1$
+
+	/**
+	 * Group Id prefix
+	 */
+	public final String GROUP_ID_PREFIX = "["; //$NON-NLS-1$
+
+	/**
+	 * Group Id suffix
+	 */
+	public final String GROUP_ID_SUFFIX = "]"; //$NON-NLS-1$	
+
+	/**
+	 * Factory object for creating other trace objects
+	 */
+	private TraceObjectFactory factory;
+
+	/**
+	 * Property verifier interface
+	 */
+	private TraceObjectPropertyVerifier verifier;
+
+	/**
+	 * List of trace groups
+	 */
+	private ArrayList<TraceGroup> groups = new ArrayList<TraceGroup>();
+
+	/**
+	 * List of traces, sorted by name
+	 */
+	private ArrayList<Trace> tracesByName = new ArrayList<Trace>();
+
+	/**
+	 * List of model listeners
+	 */
+	private ArrayList<TraceModelListener> modelListeners = new ArrayList<TraceModelListener>();
+
+	/**
+	 * List of extension listeners
+	 */
+	private ArrayList<TraceModelExtensionListener> extensionListeners = new ArrayList<TraceModelExtensionListener>();
+
+	/**
+	 * List of reset listeners
+	 */
+	private ArrayList<TraceModelResetListener> resetListeners = new ArrayList<TraceModelResetListener>();
+
+	/**
+	 * Processing listeners
+	 */
+	private ArrayList<TraceProcessingListener> processingListeners = new ArrayList<TraceProcessingListener>();
+
+	/**
+	 * List of constant tables
+	 */
+	private ArrayList<TraceConstantTable> constantTables = new ArrayList<TraceConstantTable>();
+
+	/**
+	 * Validity flag
+	 */
+	private boolean valid;
+
+	/**
+	 * Number of nested calls to startProcessing
+	 */
+	private int isProcessing;
+
+	/**
+	 * Model was changed during processing
+	 */
+	private boolean modelChangedDuringProcessing;
+
+	/**
+	 * Fixed Ids from fixed Ids definition file
+	 */
+	private SortedProperties fixedIds;
+
+	/**
+	 * Hex radix
+	 */
+	public int HEX_RADIX = 16; // CodForChk_Dis_Magic
+
+	/**
+	 * Constructor
+	 * 
+	 * @param factory
+	 *            the rule factory
+	 * @param verifier
+	 *            the property verifier
+	 * @throws TraceCompilerException 
+	 */
+	public TraceModel(TraceObjectRuleFactory factory,
+			TraceObjectPropertyVerifier verifier) throws TraceCompilerException {
+		// Stored for callback purposes
+		setModel(this);
+		this.factory = new TraceObjectFactory(this, factory);
+		this.verifier = verifier;
+	}
+
+	/**
+	 * Adds a new trace model listener to this model
+	 * 
+	 * @param listener
+	 *            the new listener
+	 */
+	public void addModelListener(TraceModelListener listener) {
+		modelListeners.add(listener);
+	}
+
+	/**
+	 * Removes a trace model listener. Does nothing if the listener is not found
+	 * 
+	 * @param listener
+	 *            the listener to be removed
+	 */
+	public void removeModelListener(TraceModelListener listener) {
+		modelListeners.remove(listener);
+	}
+
+	/**
+	 * Adds a new trace model extension listener to this model
+	 * 
+	 * @param listener
+	 *            the new listener
+	 */
+	public void addExtensionListener(TraceModelExtensionListener listener) {
+		extensionListeners.add(listener);
+	}
+
+	/**
+	 * Removes a trace model extension listener. Does nothing if the listener is
+	 * not found
+	 * 
+	 * @param listener
+	 *            the listener to be removed
+	 */
+	public void removeExtensionListener(TraceModelExtensionListener listener) {
+		extensionListeners.remove(listener);
+	}
+
+	/**
+	 * Adds a new trace model reset listener to this model
+	 * 
+	 * @param listener
+	 *            the new listener
+	 */
+	public void addResetListener(TraceModelResetListener listener) {
+		resetListeners.add(listener);
+	}
+
+	/**
+	 * Removes a trace model reset listener. Does nothing if the listener is not
+	 * found
+	 * 
+	 * @param listener
+	 *            the listener to be removed
+	 */
+	public void removeResetListener(TraceModelResetListener listener) {
+		resetListeners.remove(listener);
+	}
+
+	/**
+	 * Adds a new trace model listener to this model
+	 * 
+	 * @param listener
+	 *            the new listener
+	 */
+	public void addProcessingListener(TraceProcessingListener listener) {
+		processingListeners.add(listener);
+	}
+
+	/**
+	 * Removes a processing listener. Does nothing if the listener is not found
+	 * 
+	 * @param listener
+	 *            the listener to be removed
+	 */
+	public void removeProcessingListener(TraceProcessingListener listener) {
+		processingListeners.remove(listener);
+	}
+
+	/**
+	 * Returns highest group ID + 1. Can be used to create an unique ID for a
+	 * new trace group.
+	 * 
+	 * @return the next trace group ID
+	 * @throws TraceCompilerException
+	 */
+	public int getNextGroupID() throws TraceCompilerException {
+		int currentMaxGroupId = 0;
+		int nextGroupId = 0;
+		// Check if there are some fixed Ids
+		if (fixedIds != null) {
+			Enumeration<Object> keys = this.fixedIds.keys();
+			// Go through fixed Ids and check if there are fixed group Ids
+			while (keys.hasMoreElements()) {
+				String key = (String) keys.nextElement();
+				if (key.startsWith(GROUP_PROPERTY_PREFIX)
+						|| key.startsWith(OBSOLETE_PROPERTY_PREFIX
+								+ GROUP_PROPERTY_PREFIX)) {
+					// Fixed group Id found. Try to covert it to int value.
+					String value = fixedIds.getProperty(key);
+					int fixedId = 0;
+					try {
+						fixedId = Integer.decode(value).intValue();
+					} catch (NumberFormatException e) {
+						// Corrupted. Get next group Id later on.
+						currentMaxGroupId = 0;
+						break;
+					}
+					// Check if found fixed Id is bigger than current max group
+					// Id
+					if (fixedId > currentMaxGroupId) {
+						currentMaxGroupId = fixedId;
+					}
+				}
+			}
+		}
+
+		// If there were fixed group Ids. Set next group Id to be current max
+		// group Id + 1
+		if (currentMaxGroupId != 0) {
+			nextGroupId = currentMaxGroupId + 1;
+		}
+
+		// Get current max group id in model
+		int maxGroupIdInModel = 0;
+		for (TraceGroup group : groups) {
+			int groupIdInModel = group.getID();
+			if (groupIdInModel > maxGroupIdInModel) {
+				maxGroupIdInModel = groupIdInModel;
+			}
+		}
+
+		// If next group Id is zero or smaller than current max group id in
+		// model + 1. Set it be same as current max group id in model + 1. This
+		// is done in case that we have added more than one new group after last
+		// fixed Id update
+		if (nextGroupId == 0 || nextGroupId < maxGroupIdInModel + 1) {
+			nextGroupId = maxGroupIdInModel + 1;
+		}
+
+		// Check that next group Id is not bigger than max group Id
+		if (nextGroupId > TraceCompilerEngineGlobals.MAX_GROUP_ID) {
+			throw new TraceCompilerException(
+					TraceCompilerErrorCode.RUN_OUT_OF_GROUP_IDS);
+		}
+
+		return nextGroupId;
+	}
+
+	/**
+	 * Returns highest constant table ID + 1. Can be used to create an unique ID
+	 * for a new constant table.
+	 * 
+	 * @return the next constant table ID
+	 */
+	public int getNextConstantTableID() {
+		int max = 0;
+		for (TraceConstantTable table : constantTables) {
+			int id = table.getID();
+			if (id > max) {
+				max = id;
+			}
+		}
+		return max + 1;
+	}
+
+	/**
+	 * Removes a trace group from this model. Create groupRemoved event to model
+	 * listeners
+	 * 
+	 * @param group
+	 *            the group to be removed
+	 * @throws TraceCompilerException 
+	 */
+	public void removeGroup(TraceGroup group) throws TraceCompilerException {
+		if (groups.remove(group)) {
+			notifyObjectRemoved(this, group);
+			group.reset();
+		}
+	}
+
+	/**
+	 * Determines if this model contains any trace groups
+	 * 
+	 * @return true if there are trace groups
+	 */
+	public boolean hasGroups() {
+		return !groups.isEmpty();
+	}
+
+	/**
+	 * Gets the number of trace groups
+	 * 
+	 * @return trace group count
+	 */
+	public int getGroupCount() {
+		return groups.size();
+	}
+
+	/**
+	 * Returns the trace groups of this model
+	 * 
+	 * @return the iterator over the groups
+	 */
+	public Iterator<TraceGroup> getGroups() {
+		return groups.iterator();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.lang.Iterable#iterator()
+	 */
+	public Iterator<TraceGroup> iterator() {
+		return groups.iterator();
+	}
+
+	/**
+	 * Removes all trace groups and parameters from this model. Extensions are
+	 * not removed. Notifies the reset listeners with modelResetting and
+	 * modelReset
+	 * 
+	 * @see TraceModelResetListener#modelResetting
+	 * @see TraceModelResetListener#modelReset
+	 */
+	@Override
+	public void reset() {
+		notifyModelResetting();
+		// Properties are removed, other extensions are left
+		removeExtensions(TraceObjectPropertyList.class);
+		groups.clear();
+		tracesByName.clear();
+		constantTables.clear();
+		fixedIds = null;
+		super.reset();
+		notifyModelReset();
+	}
+
+	/**
+	 * Gets the group which has given ID
+	 * 
+	 * @param id
+	 *            the id
+	 * @return group or null
+	 */
+	public TraceGroup findGroupByID(int id) {
+		TraceGroup retval = null;
+		for (TraceGroup group : groups) {
+			if (group.getID() == id) {
+				retval = group;
+				break;
+			}
+		}
+		return retval;
+	}
+
+	/**
+	 * Locates a trace group which has the given name.
+	 * 
+	 * @param name
+	 *            the name of the trace group
+	 * @return the group or null if not found
+	 * @see TraceObject#getName
+	 */
+	public TraceGroup findGroupByName(String name) {
+		TraceGroup retval = null;
+		for (TraceGroup group : groups) {
+			if (group.getName().equals(name)) {
+				retval = group;
+				break;
+			}
+		}
+		return retval;
+	}
+
+	/**
+	 * Locates a trace which has the given name.
+	 * 
+	 * @param name
+	 *            the name of the trace
+	 * @return the trace or null if not found
+	 * @see TraceObject#getName
+	 */
+	public Trace findTraceByName(String name) {
+		Trace retval;
+		int index = Collections.binarySearch(tracesByName, name,
+				TraceObjectUtils.traceToNameComparator);
+		if (index >= 0) {
+			retval = tracesByName.get(index);
+		} else {
+			retval = null;
+		}
+		return retval;
+	}
+
+	/**
+	 * Returns the group at given index
+	 * 
+	 * @param index
+	 *            the group index
+	 * @return the group
+	 */
+	public TraceGroup getGroupAt(int index) {
+		return groups.get(index);
+	}
+
+	/**
+	 * Removes a constant table from this model. Creates objectRemoved event to
+	 * model listeners
+	 * 
+	 * @see TraceModelListener#objectRemoved(TraceObject, TraceObject)
+	 * @param table
+	 *            the table to be removed
+	 * @throws TraceCompilerException 
+	 */
+	public void removeConstantTable(TraceConstantTable table) throws TraceCompilerException {
+		if (constantTables.remove(table)) {
+			notifyObjectRemoved(this, table);
+			table.reset();
+		}
+	}
+
+	/**
+	 * Gets the constant tables of this model
+	 * 
+	 * @return the tables iterator
+	 */
+	public Iterator<TraceConstantTable> getConstantTables() {
+		return constantTables.iterator();
+	}
+
+	/**
+	 * Gets a constant table by ID
+	 * 
+	 * @param id
+	 *            the ID
+	 * @return the table or null
+	 */
+	public TraceConstantTable findConstantTableByID(int id) {
+		TraceConstantTable retval = null;
+		for (TraceConstantTable table : constantTables) {
+			if (table.getID() == id) {
+				retval = table;
+				break;
+			}
+		}
+		return retval;
+	}
+
+	/**
+	 * Gets a constant table by name
+	 * 
+	 * @param tableName
+	 *            the name
+	 * @return the table or null
+	 */
+	public TraceConstantTable findConstantTableByName(String tableName) {
+		TraceConstantTable retval = null;
+		for (TraceConstantTable table : constantTables) {
+			if (table.getName().equals(tableName)) {
+				retval = table;
+				break;
+			}
+		}
+		return retval;
+	}
+
+	/**
+	 * Checks if this model contains constant tables
+	 * 
+	 * @return true if there are constant tables
+	 */
+	public boolean hasConstantTables() {
+		return !constantTables.isEmpty();
+	}
+
+	/**
+	 * Returns the constant table at given index
+	 * 
+	 * @param index
+	 *            the group index
+	 * @return the group
+	 */
+	public TraceConstantTable getConstantTableAt(int index) {
+		return constantTables.get(index);
+	}
+
+	/**
+	 * Adds a new trace group to this model. Creates objectAdded event to model
+	 * listeners. This is only intended to be called from TraceGroup
+	 * constructor, so this is not public.
+	 * 
+	 * @see TraceModelListener#objectAdded(TraceObject, TraceObject)
+	 * @param group
+	 *            the group to be added
+	 */
+	void addGroup(TraceGroup group) {
+		groups.add(group);
+		notifyObjectAdded(this, group);
+	}
+
+	/**
+	 * Adds a constant table to this model. Created objectAdded event to model
+	 * listeners. This is only intended to be called from constant table
+	 * constructor, so this is not public
+	 * 
+	 * @see TraceModelListener#objectAdded(TraceObject, TraceObject)
+	 * @param table
+	 *            the constant table
+	 */
+	void addConstantTable(TraceConstantTable table) {
+		constantTables.add(table);
+		notifyObjectAdded(this, table);
+	}
+
+	/**
+	 * Fires propertiesUpdated event. Called from trace objects when their
+	 * properties change.
+	 * 
+	 * @see TraceModelListener#propertyUpdated(TraceObject, int)
+	 * @param source
+	 *            the object that changed
+	 * @param property
+	 *            the property that changed
+	 * @throws TraceCompilerException 
+	 */
+	void notifyPropertyUpdated(TraceObject source, int property) throws TraceCompilerException {
+		if (source instanceof Trace) {
+			if (property == TraceModelListener.NAME) {
+				Collections.sort(tracesByName,
+						TraceObjectUtils.traceObjectNameComparator);
+			}
+			((Trace) source).getGroup().tracePropertyUpdated(source, property);
+		}
+		for (TraceModelListener l : modelListeners) {
+			l.propertyUpdated(source, property);
+		}
+		modelChangedDuringProcessing = true;
+	}
+
+	/**
+	 * Fires objectAdded event to listeners
+	 * 
+	 * @see TraceModelListener#objectAdded(TraceObject, TraceObject)
+	 * @param owner
+	 *            the owner object
+	 * @param object
+	 *            the object that was added
+	 */
+	void notifyObjectAdded(TraceObject owner, TraceObject object) {
+		// List is sorted when the name is set to the trace
+		if (object instanceof Trace) {
+			tracesByName.add((Trace) object);
+		}
+		for (TraceModelListener l : modelListeners) {
+			l.objectAdded(owner, object);
+		}
+		modelChangedDuringProcessing = true;
+	}
+
+	/**
+	 * Fires objectRemoved event to listeners
+	 * 
+	 * @see TraceModelListener#objectRemoved(TraceObject, TraceObject)
+	 * @param owner
+	 *            the owner object
+	 * @param object
+	 *            the object that was removed
+	 * @throws TraceCompilerException 
+	 */
+	void notifyObjectRemoved(TraceObject owner, TraceObject object) throws TraceCompilerException {
+		if (object instanceof Trace) {
+			int index = Collections.binarySearch(tracesByName, (Trace) object,
+					TraceObjectUtils.traceObjectNameComparator);
+			tracesByName.remove(index);
+		}
+		notifyOnDelete(object);
+		for (TraceModelListener l : modelListeners) {
+			l.objectRemoved(owner, object);
+		}
+		modelChangedDuringProcessing = true;
+	}
+
+	/**
+	 * Notifies that an object creation is complete
+	 * 
+	 * @see TraceModelListener#objectCreationComplete(TraceObject)
+	 * @param object
+	 *            the object
+	 * @throws TraceCompilerException 
+	 */
+	void notifyObjectCreationComplete(TraceObject object) throws TraceCompilerException {
+		for (TraceModelListener l : modelListeners) {
+			l.objectCreationComplete(object);
+		}
+	}
+
+	/**
+	 * Fires modelResetting event to all listeners
+	 * 
+	 * @see TraceModelResetListener#modelResetting()
+	 */
+	private void notifyModelResetting() {
+		for (TraceModelResetListener l : resetListeners) {
+			l.modelResetting();
+		}
+	}
+
+	/**
+	 * Fires modelReset event to all listeners
+	 * 
+	 * @see TraceModelResetListener#modelReset()
+	 */
+	private void notifyModelReset() {
+		for (TraceModelResetListener l : resetListeners) {
+			l.modelReset();
+		}
+	}
+
+	/**
+	 * Fires extensionAdded event. Called from TraceObject when extension is
+	 * added to it
+	 * 
+	 * @see TraceModelExtensionListener#extensionAdded(TraceObject,
+	 *      TraceModelExtension)
+	 * @param object
+	 *            the trace object
+	 * @param extension
+	 *            the new extension
+	 */
+	void notifyExtensionAdded(TraceObject object, TraceModelExtension extension) {
+		for (TraceModelExtensionListener l : extensionListeners) {
+			l.extensionAdded(object, extension);
+		}
+		modelChangedDuringProcessing = true;
+	}
+
+	/**
+	 * Fires extensionRemoved event. Called from TraceObject when extension is
+	 * removed from it
+	 * 
+	 * @see TraceModelExtensionListener#extensionRemoved(TraceObject,
+	 *      TraceModelExtension)
+	 * @param object
+	 *            the object
+	 * @param extension
+	 *            the removed extension
+	 */
+	void notifyExtensionRemoved(TraceObject object,
+			TraceModelExtension extension) {
+		for (TraceModelExtensionListener l : extensionListeners) {
+			l.extensionRemoved(object, extension);
+		}
+		modelChangedDuringProcessing = true;
+	}
+
+	/**
+	 * Gets the validity flag of this model
+	 * 
+	 * @return the validity flag
+	 */
+	public boolean isValid() {
+		return valid;
+	}
+
+	/**
+	 * Sets the validity flag
+	 * 
+	 * @param valid
+	 *            new flag value
+	 * @throws TraceCompilerException 
+	 */
+	public void setValid(boolean valid) throws TraceCompilerException {
+		if (valid != this.valid) {
+			this.valid = valid;
+			for (TraceModelResetListener l : resetListeners) {
+				l.modelValid(valid);
+			}
+		}
+	}
+
+	/**
+	 * Gets the trace object factory
+	 * 
+	 * @return the factory
+	 */
+	public TraceObjectFactory getFactory() {
+		return factory;
+	}
+
+	/**
+	 * Gets the object verifier interface. The verifier should be used before
+	 * updating object properties
+	 * 
+	 * @return the verifier
+	 */
+	public TraceObjectPropertyVerifier getVerifier() {
+		return verifier;
+	}
+
+	/**
+	 * Notifies the process listeners that a process the results in multiple
+	 * listener updates is about to start
+	 */
+	public void startProcessing() {
+		isProcessing++;
+		if (isProcessing == 1) {
+			modelChangedDuringProcessing = false;
+			for (TraceProcessingListener l : processingListeners) {
+				l.processingStarted();
+			}
+		}
+	}
+
+	/**
+	 * Notifies the process listeners that a process the results in multiple
+	 * listener updates has finished
+	 */
+	public void processingComplete() {
+		isProcessing--;
+		if (isProcessing == 0) {
+			for (TraceProcessingListener l : processingListeners) {
+				l.processingComplete(modelChangedDuringProcessing);
+			}
+			modelChangedDuringProcessing = false;
+		}
+	}
+
+	/**
+	 * Checks the state of the processing flag
+	 * 
+	 * @return the processing flag
+	 */
+	public boolean isProcessing() {
+		return isProcessing > 0;
+	}
+
+	/**
+	 * Checks if model has traces
+	 * 
+	 * @return true if there's traces, false if not
+	 */
+	public boolean hasTraces() {
+		boolean retval = false;
+		for (TraceGroup group : groups) {
+			if (group.hasTraces()) {
+				retval = true;
+				break;
+			}
+		}
+		return retval;
+	}
+
+	/**
+	 * Gets group ID from properties
+	 * 
+	 * @param properties
+	 *            the properties
+	 * @param group
+	 *            the group
+	 * @return the group ID
+	 * @throws TraceCompilerException
+	 */
+	public int getGroupID(Properties properties, TraceGroup group)
+			throws TraceCompilerException {
+		String value = properties.getProperty(GROUP_PROPERTY_PREFIX
+				+ group.getName());
+		int id;
+		if (value == null) {
+			// Not found, assign a proper ID
+			id = getNewIdForGroup(group);
+
+		} else {
+			try {
+				id = Integer.decode(value).intValue();
+				TraceGroup traceGroup = findGroupByID(id);
+				if (traceGroup != null && !traceGroup.equals(group)) {
+					// Id already in use, assign a proper ID
+					id = getNewIdForGroup(group);
+				}
+			} catch (NumberFormatException e) {
+				// Corrupted, assign a proper ID
+				id = getNewIdForGroup(group);
+			}
+		}
+		group.internalSetID(id);
+		return id;
+	}
+
+	/**
+	 * Gets a new ID for this group
+	 * 
+	 * @param group
+	 *            the group
+	 * @return a new ID for this group
+	 * @throws TraceCompilerException
+	 */
+	private int getNewIdForGroup(TraceGroup group) throws TraceCompilerException {
+		int id = FormattingUtils.getGroupID(group.getModel(), group.getName());
+		return id;
+	}
+
+	/**
+	 * Saves trace and group identifiers to given properties.
+	 * 
+	 * @param properties
+	 *            the properties to use
+	 */
+	public void saveIDs(Properties properties) {
+		properties.clear();
+		StringBuffer sb = new StringBuffer();
+		for (TraceGroup group : this) {
+			int groupId = group.getID();
+			properties.setProperty(GROUP_PROPERTY_PREFIX + group.getName(),
+					SourceConstants.HEX_PREFIX + Integer.toHexString(groupId));
+			for (Trace trace : group) {
+				int traceId = trace.getID();
+				properties.setProperty(TRACE_PROPERTY_PREFIX
+						+ createTraceName(sb, group, trace),
+						SourceConstants.HEX_PREFIX
+								+ Integer.toHexString(traceId));
+			}
+		}
+	}
+
+	/**
+	 * Merges the group and trace names together
+	 * 
+	 * @param sb
+	 *            the buffer where name is stored
+	 * @param group
+	 *            group
+	 * @param trace
+	 *            trace
+	 * @return the trace name
+	 */
+	public String createTraceName(StringBuffer sb, TraceGroup group, Trace trace) {
+		sb.setLength(0);
+		sb.append(group.getName());
+		sb.append(GROUP_ID_PREFIX);
+		int groupId = group.getID();
+		String groupIdString = SourceConstants.HEX_PREFIX
+				+ Integer.toString(groupId, HEX_RADIX).toUpperCase();
+		sb.append(groupIdString);
+		sb.append(GROUP_ID_SUFFIX);
+		sb.append(SourceConstants.UNDERSCORE);
+		sb.append(trace.getName());
+		return sb.toString();
+	}
+
+	/**
+	 * Gets fixed group and trace ids
+	 * 
+	 * @return fixed Ids
+	 */
+	public SortedProperties getFixedIds() {
+		return fixedIds;
+	}
+
+	/**
+	 * Set fixed group and trace ids
+	 * 
+	 * @param fixedIds
+	 *            fixed Ids
+	 */
+	public void setFixedIds(SortedProperties fixedIds) {
+		this.fixedIds = fixedIds;
+	}
+
+	/**
+	 * Gets next trace ID
+	 * 
+	 * @param group
+	 *            the group
+	 * @return the trace ID
+	 * @throws TraceCompilerException
+	 */
+	public int getNextTraceId(TraceGroup group) throws TraceCompilerException {
+		int currentMaxTraceID = 0;
+		int nextTraceId = 0;
+		// Check if there are some fixed Ids
+		if (fixedIds != null) {
+			Enumeration<Object> keys = this.fixedIds.keys();
+			String groupName = group.getName();
+			int groupId = group.getID();
+			String groupIdString = SourceConstants.HEX_PREFIX
+					+ Integer.toString(groupId, HEX_RADIX).toUpperCase();
+			// Go through fixed Ids and check if there are fixed trace Ids to
+			// this group
+			while (keys.hasMoreElements()) {
+				String key = (String) keys.nextElement();
+				if (key.startsWith(TRACE_PROPERTY_PREFIX + groupName
+						+ GROUP_ID_PREFIX + groupIdString + GROUP_ID_SUFFIX
+						+ SourceConstants.UNDERSCORE)
+						|| key.startsWith(OBSOLETE_PROPERTY_PREFIX
+								+ TRACE_PROPERTY_PREFIX + groupName
+								+ GROUP_ID_PREFIX + groupIdString
+								+ GROUP_ID_SUFFIX + SourceConstants.UNDERSCORE)) {
+					// Fixed trace Id to in this group found. Try to covert it
+					// to int value.
+					String value = fixedIds.getProperty(key);
+					int fixedId = 0;
+					try {
+						fixedId = Integer.decode(value).intValue();
+					} catch (NumberFormatException e) {
+						// Corrupted. Get next trace Id later on.
+						nextTraceId = 0;
+						break;
+					}
+					// Check if found fixed Id is bigger than current max trace
+					// Id in this group
+					if (fixedId > currentMaxTraceID) {
+						currentMaxTraceID = fixedId;
+					}
+				}
+			}
+			// If there were fixed trace Ids to this group. Set next trace Id to
+			// be current max trace Id + 1
+			if (currentMaxTraceID != 0) {
+				nextTraceId = currentMaxTraceID + 1;
+			}
+			// If next trace Id is zero or smaller than trace Id that group
+			// suggest. Set it be same as group suggest. This is done in case
+			// that we have added more than one new trace to same group after
+			// last fixed Id update
+			if (nextTraceId == 0 || nextTraceId < group.getNextTraceID()) {
+				nextTraceId = group.getNextTraceID();
+			}
+		} else {
+			// No fixed Ids. Get next trace Id from group
+			nextTraceId = group.getNextTraceID();
+		}
+		// Check that next trace Id is not bigger than max trace Id
+		if (nextTraceId > TraceCompilerEngineGlobals.MAX_TRACE_ID) {
+			throw new TraceCompilerException(
+					TraceCompilerErrorCode.RUN_OUT_OF_TRACE_IDS);
+		}
+
+		return nextTraceId;
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceModelExtension.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,43 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Interface implemented by trace model extensions
+*
+*/
+package com.nokia.tracecompiler.model;
+
+/**
+ * Interface implemented by trace model extensions
+ * 
+ */
+public interface TraceModelExtension {
+
+	/**
+	 * Sets the owner of this extension. Called when extension is added to a
+	 * trace object and called with null when removed from trace object
+	 * 
+	 * @param owner
+	 *            the owning object
+	 */
+	public void setOwner(TraceObject owner);
+
+	/**
+	 * Gets the owner of this extension
+	 * 
+	 * @return the owner
+	 */
+	public TraceObject getOwner();
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceModelExtensionListener.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,48 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Listener interface for trace model extension notifications
+*
+*/
+package com.nokia.tracecompiler.model;
+
+/**
+ * Listener interface for trace model extension notifications
+ * 
+ */
+public interface TraceModelExtensionListener {
+
+	/**
+	 * Notifies that an extension was added to the trace object
+	 * 
+	 * @param object
+	 *            the object where the extension was added
+	 * @param extension
+	 *            the new extension object
+	 */
+	public void extensionAdded(TraceObject object, TraceModelExtension extension);
+
+	/**
+	 * Notifies that an extension was removed from the trace object
+	 * 
+	 * @param object
+	 *            the object from where the extension was removed
+	 * @param extension
+	 *            the removed extension object
+	 */
+	public void extensionRemoved(TraceObject object,
+			TraceModelExtension extension);
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceModelListener.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,87 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Listener interface for trace model change notifications
+*
+*/
+package com.nokia.tracecompiler.model;
+
+/**
+ * Listener interface for trace model change notifications
+ * 
+ */
+public interface TraceModelListener {
+
+	/**
+	 * Object name has been updated
+	 */
+	int NAME = 1;
+
+	/**
+	 * Object ID has been updated
+	 */
+	int ID = 2;
+
+	/**
+	 * Trace text has been updated
+	 */
+	int TRACE = 3;
+
+	/**
+	 * Parameter type has been updated
+	 */
+	int TYPE = 4;
+
+	/**
+	 * Notification which is fired when a trace object has been added
+	 * 
+	 * @param owner
+	 *            the owner of the object
+	 * @param object
+	 *            the object
+	 */
+	public void objectAdded(TraceObject owner, TraceObject object);
+
+	/**
+	 * Notification that is fired a trace object is removed from the model
+	 * 
+	 * @param owner
+	 *            the owner of the object
+	 * @param object
+	 *            the removed object
+	 * @throws TraceCompilerException 
+	 */
+	public void objectRemoved(TraceObject owner, TraceObject object) throws TraceCompilerException;
+
+	/**
+	 * Notifies that the one of the properties of an object have been updated
+	 * 
+	 * @param object
+	 *            the object which was updated
+	 * @param property
+	 *            the property that was updated
+	 * @throws TraceCompilerException 
+	 */
+	public void propertyUpdated(TraceObject object, int property) throws TraceCompilerException;
+
+	/**
+	 * Notifies that object creation is complete
+	 * 
+	 * @param object
+	 *            the object
+	 * @throws TraceCompilerException 
+	 */
+	public void objectCreationComplete(TraceObject object) throws TraceCompilerException;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceModelPersistentExtension.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,56 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Interface implemented by trace model extensions that need to store themselves 
+* into persistent storage along with other model elements
+*
+*/
+package com.nokia.tracecompiler.model;
+
+/**
+ * Interface implemented by trace model extensions that need to store themselves
+ * into persistent storage along with other model elements. The storage format
+ * is left to the implementation. When loading, the trace provider calls
+ * TraceObjectFactory.createExtension with the storage name. The object factory
+ * returns an instance of this interface and the provider calls setData to
+ * initialize this.
+ * 
+ */
+public interface TraceModelPersistentExtension extends TraceModelExtension {
+
+	/**
+	 * Gets the name used when storing this extension
+	 * 
+	 * @return the storage name
+	 */
+	public String getStorageName();
+
+	/**
+	 * Gets the data of this extension
+	 * 
+	 * @return the extension data
+	 */
+	public String getData();
+
+	/**
+	 * Sets the data of this extension
+	 * 
+	 * @param data
+	 *            the data
+	 * @return true if extension should be added to model, false if not
+	 */
+	public boolean setData(String data);
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceModelResetListener.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,46 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Listener interface for trace model reset notifications
+*
+*/
+package com.nokia.tracecompiler.model;
+
+/**
+ * Listener interface for trace model reset notifications
+ * 
+ */
+public interface TraceModelResetListener {
+
+	/**
+	 * Notification that is fired before the model is reset.
+	 */
+	public void modelResetting();
+
+	/**
+	 * Notification that is fired after the model is reset.
+	 */
+	public void modelReset();
+
+	/**
+	 * Validity changed notification
+	 * 
+	 * @param valid
+	 *            the validity changed flag
+	 * @throws TraceCompilerException 
+	 */
+	public void modelValid(boolean valid) throws TraceCompilerException;
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceObject.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,273 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Base class for all trace model objects
+*
+*/
+package com.nokia.tracecompiler.model;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+
+/**
+ * Base class for all trace model objects
+ * 
+ */
+public abstract class TraceObject {
+
+	/**
+	 * The extensions can be used by trace providers to associate extra data to
+	 * the object.
+	 */
+	private ArrayList<TraceModelExtension> extensions = new ArrayList<TraceModelExtension>();
+
+	/**
+	 * Object ID.
+	 */
+	private int id;
+
+	/**
+	 * Object name.
+	 */
+	private String name = ""; //$NON-NLS-1$
+
+	/**
+	 * The trace model.
+	 */
+	private TraceModel model;
+
+	/**
+	 * Complete flag
+	 */
+	private boolean complete;
+
+	/**
+	 * Associates this object to a trace model.
+	 * 
+	 * @param model
+	 *            the model where this object belongs to
+	 */
+	void setModel(TraceModel model) {
+		this.model = model;
+	}
+
+	/**
+	 * Returns the trace model this object is associated to.
+	 * 
+	 * @return the trace model
+	 */
+	public TraceModel getModel() {
+		return model;
+	}
+
+	/**
+	 * Sets the ID of this object. Generates propertyUpdated event to model
+	 * listeners if the ID changes
+	 * 
+	 * @see TraceModelListener#propertyUpdated(TraceObject, int)
+	 * @param id
+	 *            the new ID
+	 * @throws TraceCompilerException 
+	 */
+	public void setID(int id) throws TraceCompilerException {
+		if (this.id != id) {
+			this.id = id;
+			model.notifyPropertyUpdated(this, TraceModelListener.ID);
+		}
+	}
+
+	/**
+	 * Sets the ID of this object but does not generate any notifications
+	 * 
+	 * @param id
+	 *            the new ID
+	 */
+	void internalSetID(int id) {
+		this.id = id;
+	}
+
+	/**
+	 * Returns the ID of this object.
+	 * 
+	 * @return the ID
+	 */
+	public int getID() {
+		return id;
+	}
+
+	/**
+	 * Sets the name of this object. Generates propertyUpdated event to model
+	 * listeners if the name changes
+	 * 
+	 * @see TraceModelListener#propertyUpdated(TraceObject, int)
+	 * @param name
+	 *            the new name
+	 * @throws TraceCompilerException 
+	 */
+	public void setName(String name) throws TraceCompilerException {
+		if (name == null) {
+			name = ""; //$NON-NLS-1$
+		}
+		if (!name.equals(this.name)) {
+			this.name = name;
+			model.notifyPropertyUpdated(this, TraceModelListener.NAME);
+		}
+	}
+
+	/**
+	 * Returns the name of this object. This never returns null
+	 * 
+	 * @return the name
+	 */
+	public String getName() {
+		return name;
+	}
+
+	/**
+	 * Adds an extension to this object. Generates extensionAdded event to model
+	 * listeners
+	 * 
+	 * @param extension
+	 *            the new extension
+	 */
+	public void addExtension(TraceModelExtension extension) {
+		if (extension == null) {
+			throw new NullPointerException();
+		}
+		extensions.add(extension);
+		extension.setOwner(this);
+		model.notifyExtensionAdded(this, extension);
+	}
+
+	/**
+	 * Removes an extension from this object. Generates extensionRemoved event
+	 * to model listeners if the extension was actually removed
+	 * 
+	 * @param extension
+	 *            the extension to be removed
+	 */
+	public void removeExtension(TraceModelExtension extension) {
+		if (extensions.remove(extension)) {
+			extension.setOwner(null);
+			model.notifyExtensionRemoved(this, extension);
+		}
+	}
+
+	/**
+	 * Removes all extensions which are of given type
+	 * 
+	 * @param <T>
+	 *            the type of the extension
+	 * @param extClass
+	 *            the extension type
+	 */
+	public <T extends TraceModelExtension> void removeExtensions(
+			Class<T> extClass) {
+		Iterator<TraceModelExtension> itr = extensions.iterator();
+		while (itr.hasNext()) {
+			TraceModelExtension ext = itr.next();
+			if (extClass.isAssignableFrom(ext.getClass())) {
+				itr.remove();
+				ext.setOwner(null);
+				model.notifyExtensionRemoved(this, ext);
+			}
+		}
+	}
+
+	/**
+	 * Returns the first extension which is of given type. The extensions are
+	 * stored in a list in the order they have been added. This returns the
+	 * first instance found from the list.
+	 * 
+	 * @param <T>
+	 *            the type of the extension
+	 * @param extClass
+	 *            the extension type
+	 * @return the extension or null if not found
+	 */
+	@SuppressWarnings("unchecked")
+	public <T extends TraceModelExtension> T getExtension(Class<T> extClass) {
+		T ret = null;
+		for (TraceModelExtension ext : extensions) {
+			if (extClass.isAssignableFrom(ext.getClass())) {
+				ret = (T) ext;
+				break;
+			}
+		}
+		return ret;
+	}
+
+	/**
+	 * Returns the extensions which are of given type.
+	 * 
+	 * @param <T>
+	 *            the type of the extension
+	 * @param extClass
+	 *            the extension type
+	 * @return iterator over the list of extension
+	 */
+	@SuppressWarnings("unchecked")
+	public <T extends TraceModelExtension> Iterator<T> getExtensions(
+			Class<T> extClass) {
+		ArrayList<T> list = new ArrayList<T>();
+		for (TraceModelExtension ext : extensions) {
+			if (extClass.isAssignableFrom(ext.getClass())) {
+				list.add((T) ext);
+			}
+		}
+		return list.iterator();
+	}
+
+	/**
+	 * Resets the ID and name
+	 */
+	void reset() {
+		id = 0;
+		name = ""; //$NON-NLS-1$
+	}
+
+	/**
+	 * Sets the complete flag and fires complete event
+	 * @throws TraceCompilerException 
+	 */
+	void setComplete() throws TraceCompilerException {
+		complete = true;
+		model.notifyObjectCreationComplete(this);
+	}
+
+	/**
+	 * Calls OnDelete rules if the object owns them
+	 * 
+	 * @param object
+	 *            the object that was removed
+	 */
+	protected void notifyOnDelete(TraceObject object) {
+		Iterator<TraceObjectRuleOnDelete> rules = object
+				.getExtensions(TraceObjectRuleOnDelete.class);
+		while (rules.hasNext()) {
+			rules.next().objectDeleted();
+		}
+	}
+
+	/**
+	 * Gets the complete flag
+	 * 
+	 * @return the flag
+	 */
+	public boolean isComplete() {
+		return complete;
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceObjectFactory.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,319 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Creates trace objects and provides configurable rules for trace object creation
+*
+*/
+package com.nokia.tracecompiler.model;
+
+import java.util.Iterator;
+
+/**
+ * Creates trace objects and provides configurable rules for trace object
+ * creation
+ * 
+ */
+public class TraceObjectFactory {
+
+	/**
+	 * The trace model
+	 */
+	private TraceModel model;
+
+	/**
+	 * Rule factory
+	 */
+	private TraceObjectRuleFactory ruleFactory;
+
+	/**
+	 * Creates a new factory
+	 * 
+	 * @param model
+	 *            the model
+	 * @param factory
+	 *            the rule factory
+	 * @throws TraceCompilerException 
+	 */
+	TraceObjectFactory(TraceModel model, TraceObjectRuleFactory factory) throws TraceCompilerException {
+		this.model = model;
+		this.ruleFactory = factory;
+		processNewObjectRules(model);
+		model.setComplete();
+	}
+
+	/**
+	 * Gets the rule factory
+	 * 
+	 * @return the rule factory
+	 */
+	public TraceObjectRuleFactory getRuleFactory() {
+		return ruleFactory;
+	}
+
+	/**
+	 * Creates a new trace group
+	 * 
+	 * @param id
+	 *            the group ID
+	 * @param name
+	 *            the name for the group
+	 * @param extensions
+	 *            list of extensions to be added to the group
+	 * @return the new group
+	 * @throws TraceCompilerException 
+	 */
+	public TraceGroup createTraceGroup(int id, String name,
+			TraceModelExtension[] extensions) throws TraceCompilerException {
+		TraceGroup group = new TraceGroup(model);
+		group.setID(id);
+		group.setName(name);
+		setExtensions(group, extensions);
+		processNewObjectRules(group);
+		group.setComplete();
+		return group;
+	}
+
+	/**
+	 * Creates a new trace
+	 * 
+	 * @param group
+	 *            the trace group
+	 * @param id
+	 *            the id for the trace
+	 * @param name
+	 *            the trace name
+	 * @param traceText
+	 *            the trace text
+	 * @param extensions
+	 *            list of extensions to be added to the trace
+	 * @return the new trace
+	 * @throws TraceCompilerException 
+	 */
+	public Trace createTrace(TraceGroup group, int id, String name,
+			String traceText, TraceModelExtension[] extensions) throws TraceCompilerException {
+		Trace trace = new Trace(group);
+		trace.setID(id);
+		trace.setName(name);
+		trace.setTrace(traceText);
+		setExtensions(trace, extensions);
+		processNewObjectRules(trace);
+		trace.setComplete();
+		return trace;
+	}
+
+	/**
+	 * Creates a new trace parameter
+	 * 
+	 * @param trace
+	 *            the trace the parameter is associated to
+	 * @param id
+	 *            the parameter ID
+	 * @param name
+	 *            the parameter name
+	 * @param type
+	 *            parameter type
+	 * @param extensions
+	 *            list of extensions to be added to the parameter
+	 * @return the new parameter
+	 * @throws TraceCompilerException 
+	 */
+	public TraceParameter createTraceParameter(Trace trace, int id,
+			String name, String type, TraceModelExtension[] extensions) throws TraceCompilerException {
+		TraceParameter parameter = new TraceParameter(trace);
+		initializeParameter(parameter, id, name, type, extensions);
+		return parameter;
+	}
+
+	/**
+	 * Creates a new trace parameter inserting it into the specified index
+	 * 
+	 * @param objectIndex
+	 *            the index for the object
+	 * @param trace
+	 *            the trace the parameter is associated to
+	 * @param id
+	 *            the parameter ID
+	 * @param name
+	 *            the parameter name
+	 * @param type
+	 *            parameter type
+	 * @param extensions
+	 *            list of extensions to be added to the parameter
+	 * @return the new parameter
+	 * @throws TraceCompilerException 
+	 */
+	public TraceParameter createTraceParameter(int objectIndex, Trace trace,
+			int id, String name, String type, TraceModelExtension[] extensions) throws TraceCompilerException {
+		TraceParameter parameter = new TraceParameter(trace, objectIndex);
+		initializeParameter(parameter, id, name, type, extensions);
+		return parameter;
+	}
+
+	/**
+	 * Initializes a parameter
+	 * 
+	 * @param parameter
+	 *            the parameter
+	 * @param id
+	 *            the parameter ID
+	 * @param name
+	 *            the parameter name
+	 * @param type
+	 *            parameter type
+	 * @param extensions
+	 *            list of extensions to be added to the parameter
+	 * @throws TraceCompilerException 
+	 */
+	private void initializeParameter(TraceParameter parameter, int id,
+			String name, String type, TraceModelExtension[] extensions) throws TraceCompilerException {
+		parameter.setID(id);
+		parameter.setName(name);
+		parameter.setType(type);
+		setExtensions(parameter, extensions);
+		processNewObjectRules(parameter);
+		parameter.setComplete();
+	}
+
+	/**
+	 * Creates a new constant table
+	 * 
+	 * @param id
+	 *            id for the table
+	 * @param typeName
+	 *            the name for the table
+	 * @param extensions
+	 *            list of extensions to be added to the table
+	 * @return the constant table
+	 * @throws TraceCompilerException 
+	 */
+	public TraceConstantTable createConstantTable(int id, String typeName,
+			TraceModelExtension[] extensions) throws TraceCompilerException {
+		TraceConstantTable table = new TraceConstantTable(model);
+		table.setID(id);
+		table.setName(typeName);
+		setExtensions(table, extensions);
+		processNewObjectRules(table);
+		table.setComplete();
+		for (TraceGroup group : model) {
+			for (Trace trace : group) {
+				for (TraceParameter param : trace) {
+					if (param.getType().equals(typeName)) {
+						table.addParameterReference(param);
+					}
+				}
+			}
+		}
+		return table;
+	}
+
+	/**
+	 * Creates a new constant table entry
+	 * 
+	 * @param table
+	 *            constant table
+	 * @param id
+	 *            id for the entry
+	 * @param value
+	 *            value for the entry
+	 * @param extensions
+	 *            list of extensions to be added to the constant
+	 * @return the constant table entry
+	 * @throws TraceCompilerException 
+	 */
+	public TraceConstantTableEntry createConstantTableEntry(
+			TraceConstantTable table, int id, String value,
+			TraceModelExtension[] extensions) throws TraceCompilerException {
+		TraceConstantTableEntry entry = new TraceConstantTableEntry(table);
+		entry.setID(id);
+		entry.setName(value);
+		setExtensions(entry, extensions);
+		processNewObjectRules(entry);
+		entry.setComplete();
+		return entry;
+	}
+
+	/**
+	 * Creates an extension based on its name. This does not add the extension
+	 * to the object, since the setData method should be called first
+	 * 
+	 * @param object
+	 *            the target object for the extension
+	 * @param name
+	 *            the extension name
+	 * @return the created extension
+	 */
+	public TraceModelPersistentExtension createExtension(TraceObject object,
+			String name) {
+		return ruleFactory.createExtension(object, name);
+	}
+
+	/**
+	 * Adds extensions to given object
+	 * 
+	 * @param object
+	 *            the object
+	 * @param extensions
+	 *            extensions to be added
+	 */
+	private void setExtensions(TraceObject object,
+			TraceModelExtension[] extensions) {
+		if (extensions != null) {
+			for (TraceModelExtension element : extensions) {
+				object.addExtension(element);
+			}
+		}
+	}
+
+	/**
+	 * Processes the rules of a new object
+	 * 
+	 * @param object
+	 *            the object to be processed
+	 * @throws TraceCompilerException 
+	 */
+	private void processNewObjectRules(TraceObject object) throws TraceCompilerException {
+		// Calls the factory to preprocess the extensions passed to
+		// create-function
+		ruleFactory.preProcessNewRules(object);
+		// The rules may contain object creation rules
+		Iterator<TraceObjectRule> rules = object
+				.getExtensions(TraceObjectRule.class);
+		while (rules.hasNext()) {
+			TraceObjectRule rule = rules.next();
+			if (rule instanceof TraceObjectRuleCreateObject) {
+				TraceObjectRuleCreateObject createRule = (TraceObjectRuleCreateObject) rule;
+				createRule.createObject();
+			}
+		}
+		// Some rules are removed after the objects have been created
+		Iterator<TraceObjectRuleRemoveOnCreate> itr;
+		boolean changed;
+		do {
+			changed = false;
+			itr = object.getExtensions(TraceObjectRuleRemoveOnCreate.class);
+			while (itr.hasNext() && !changed) {
+				TraceObjectRuleRemoveOnCreate ext = itr.next();
+				if (ext.canBeRemoved()) {
+					object.removeExtension(ext);
+					changed = true;
+				}
+			}
+		} while (changed);
+		// After processing is complete, the rule factory is used to do
+		// post-processing
+		ruleFactory.postProcessNewRules(object);
+	}
+
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceObjectModifier.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,42 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Modifier properties is returned by one of the TraceObjectUtils.modify methods
+*
+*/
+package com.nokia.tracecompiler.model;
+
+/**
+ * Modifier properties is returned by one of the TraceObjectUtils.modify
+ * methods.
+ * 
+ */
+public interface TraceObjectModifier {
+
+	/**
+	 * Gets the data
+	 * 
+	 * @return the data
+	 */
+	public String getData();
+
+	/**
+	 * Checks if the data was changed during the modify call
+	 * 
+	 * @return true if data was changed
+	 */
+	public boolean hasChanged();
+
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceObjectProperty.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,41 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Property associated with a trace object
+*
+*/
+package com.nokia.tracecompiler.model;
+
+/**
+ * Property associated with a trace object
+ * 
+ */
+public interface TraceObjectProperty {
+
+	/**
+	 * Gets the name of the property
+	 * 
+	 * @return the name
+	 */
+	public String getName();
+
+	/**
+	 * Gets the value of the property
+	 * 
+	 * @return the value
+	 */
+	public String getValue();
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceObjectPropertyList.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,37 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* List of properties associated to a trace object
+*
+*/
+package com.nokia.tracecompiler.model;
+
+/**
+ * List of properties associated to a trace object
+ * 
+ */
+public interface TraceObjectPropertyList extends TraceModelExtension,
+		Iterable<TraceObjectProperty> {
+
+	/**
+	 * Gets a property by name
+	 * 
+	 * @param name
+	 *            the property name
+	 * @return the property
+	 */
+	public TraceObjectProperty getProperty(String name);
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceObjectPropertyVerifier.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,143 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Content verifier interface for trace objects
+*
+*/
+package com.nokia.tracecompiler.model;
+
+/**
+ * Content verifier interface for trace objects
+ * 
+ */
+public interface TraceObjectPropertyVerifier {
+
+	/**
+	 * Checks the properties of a trace before it is created or modified
+	 * 
+	 * @param group
+	 *            the group for the trace
+	 * @param trace
+	 *            trace to be modified. If creating new, this is null
+	 * @param id
+	 *            the trace ID
+	 * @param name
+	 *            the name of the trace
+	 * @param data
+	 *            the trace data
+	 * @throws TraceCompilerException
+	 *             if properties are not valid. The error code from the
+	 *             exception is used to create an error dialog
+	 */
+	public void checkTraceProperties(TraceGroup group, Trace trace, int id,
+			String name, String data) throws TraceCompilerException;
+
+	/**
+	 * Checks the properties of a trace group before it is created or modified
+	 * 
+	 * @param owner
+	 *            the model owning the trace group
+	 * @param group
+	 *            group to be modified. If creating new, this is null
+	 * @param id
+	 *            the trace ID
+	 * @param name
+	 *            the name of the trace
+	 * @throws TraceCompilerException
+	 *             if properties are not valid. The error code from the
+	 *             exception is used to create an error dialog
+	 */
+	public void checkTraceGroupProperties(TraceModel owner, TraceGroup group,
+			int id, String name) throws TraceCompilerException;
+
+	/**
+	 * Checks the properties of a parameter before it is created or modified
+	 * 
+	 * @param owner
+	 *            the parameter owner
+	 * @param parameter
+	 *            parameter to be modified. If creating new, this is null
+	 * @param id
+	 *            the parameter ID
+	 * @param name
+	 *            the name of the parameter
+	 * @param type
+	 *            the type of the parameter
+	 * @throws TraceCompilerException
+	 *             if properties are not valid. The error code from the
+	 *             exception is used to create an error dialog
+	 */
+	public void checkTraceParameterProperties(Trace owner,
+			TraceParameter parameter, int id, String name, String type)
+			throws TraceCompilerException;
+
+	/**
+	 * Checks the properties of a constant table before it is created or
+	 * modified
+	 * 
+	 * @param owner
+	 *            the model owning the constant table
+	 * @param table
+	 *            the table to be changed. If creating new, this is null
+	 * @param id
+	 *            the ID of the table
+	 * @param tableName
+	 *            the name of the table
+	 * @throws TraceCompilerException
+	 *             if properties are not valid. The error code from the
+	 *             exception is used to create an error dialog
+	 */
+	public void checkConstantTableProperties(TraceModel owner,
+			TraceConstantTable table, int id, String tableName)
+			throws TraceCompilerException;
+
+	/**
+	 * Checks the properties of a constant table entry before it is created
+	 * 
+	 * @param table
+	 *            the constant table
+	 * @param entry
+	 *            the entry to be modified. If creating new, this is null
+	 * @param id
+	 *            the ID for the new entry
+	 * @param value
+	 *            the value for the new entry
+	 * @throws TraceCompilerException
+	 *             if properties are not valid. The error code from the
+	 *             exception is used to create an error dialog
+	 */
+	public void checkConstantProperties(TraceConstantTable table,
+			TraceConstantTableEntry entry, int id, String value)
+			throws TraceCompilerException;
+
+	/**
+	 * Checks the properties of trace model before it is modified
+	 * 
+	 * @param model
+	 *            the trace model
+	 * @param id
+	 *            the model ID
+	 * @param name
+	 *            the model name
+	 * @param path
+	 *            the model path
+	 * @throws TraceCompilerException
+	 *             if properties are not valid. The error code from the
+	 *             exception is used to create an error dialog
+	 */
+	public void checkTraceModelProperties(TraceModel model, int id,
+			String name, String path) throws TraceCompilerException;
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceObjectRule.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,26 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Base interface for trace model object processing rules
+*
+*/
+package com.nokia.tracecompiler.model;
+
+/**
+ * Base interface for trace model object processing rules
+ * 
+ */
+public interface TraceObjectRule extends TraceModelExtension {
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceObjectRuleCreateObject.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,33 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Rule for automatic object creation
+*
+*/
+package com.nokia.tracecompiler.model;
+
+/**
+ * Rule for automatic object creation
+ * 
+ */
+public interface TraceObjectRuleCreateObject extends TraceObjectRule {
+
+	/**
+	 * Called to create a new object into the owner of this rule
+	 * @throws TraceCompilerException 
+	 */
+	public void createObject() throws TraceCompilerException;
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceObjectRuleFactory.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,55 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Creates trace objects and provides configurable rules for trace object creation
+*
+*/
+package com.nokia.tracecompiler.model;
+
+/**
+ * Allows registration of rules into the trace object factory
+ * 
+ */
+public interface TraceObjectRuleFactory {
+
+	/**
+	 * Called before the rules of a new object are processed by object factory
+	 * 
+	 * @param object
+	 *            new object
+	 */
+	public void preProcessNewRules(TraceObject object);
+
+	/**
+	 * Called after the rules of a new object are processed by object factory
+	 * 
+	 * @param object
+	 *            new object
+	 */
+	public void postProcessNewRules(TraceObject object);
+
+	/**
+	 * Creates an extension based on extension name
+	 * 
+	 * @param object
+	 *            the target object
+	 * @param name
+	 *            the name of the extension
+	 * @return the new extension
+	 */
+	public TraceModelPersistentExtension createExtension(TraceObject object,
+			String name);
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceObjectRuleOnDelete.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,32 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Rule to perform processing when object is deleted
+*
+*/
+package com.nokia.tracecompiler.model;
+
+/**
+ * Rule to perform processing when object is deleted
+ * 
+ */
+public interface TraceObjectRuleOnDelete extends TraceObjectRule {
+
+	/**
+	 * Called when the object that owns this rule is deleted
+	 */
+	public void objectDeleted();
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceObjectRuleRemoveOnCreate.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,34 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Extension that is removed from the object after it has been created
+*
+*/
+package com.nokia.tracecompiler.model;
+
+/**
+ * Extension that is removed from the object after it has been created
+ * 
+ */
+public interface TraceObjectRuleRemoveOnCreate extends TraceObjectRule {
+
+	/**
+	 * Returns true if this rule can be removed
+	 * 
+	 * @return true if remove, false otherwise
+	 */
+	public boolean canBeRemoved();
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceObjectUtils.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,224 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Utility functions for checking properties of trace objects
+*
+*/
+package com.nokia.tracecompiler.model;
+
+import java.util.Comparator;
+
+/**
+ * Utility functions for checking properties of trace objects.
+ * 
+ */
+public class TraceObjectUtils {
+
+	/**
+	 * Compares a trace to trace ID
+	 */
+	static Comparator<Object> traceToIDComparator = new Comparator<Object>() {
+
+		/**
+		 * Compares a trace to trace name
+		 * 
+		 * @param t1
+		 *            the trace
+		 * @param t2
+		 *            the trace name
+		 * @return the comparison result
+		 */
+		public int compare(Object t1, Object t2) {
+			int n1 = ((Trace) t1).getID();
+			int n2 = (Integer) t2;
+			return n1 > n2 ? 1 : n1 < n2 ? -1 : 0;
+		}
+
+	};
+
+	/**
+	 * Compares a trace to trace name
+	 */
+	static Comparator<Object> traceToNameComparator = new Comparator<Object>() {
+
+		/**
+		 * Compares a trace to trace name
+		 * 
+		 * @param t1
+		 *            the trace
+		 * @param t2
+		 *            the trace name
+		 * @return the comparison result
+		 */
+		public int compare(Object t1, Object t2) {
+			String n1 = ((Trace) t1).getName();
+			String n2 = (String) t2;
+			if (n1 == null) {
+				n1 = ""; //$NON-NLS-1$
+			}
+			if (n2 == null) {
+				n2 = ""; //$NON-NLS-1$
+			}
+			return n1.compareTo(n2);
+		}
+
+	};
+
+	/**
+	 * Compares a trace to trace text
+	 */
+	static Comparator<Object> traceToTextComparator = new Comparator<Object>() {
+
+		/**
+		 * Compares a trace to trace text
+		 * 
+		 * @param t1
+		 *            the trace
+		 * @param t2
+		 *            the trace text
+		 * @return the comparison result
+		 */
+		public int compare(Object t1, Object t2) {
+			String n1 = ((Trace) t1).getTrace();
+			String n2 = (String) t2;
+			if (n1 == null) {
+				n1 = ""; //$NON-NLS-1$
+			}
+			if (n2 == null) {
+				n2 = ""; //$NON-NLS-1$
+			}
+			return n1.compareTo(n2);
+		}
+
+	};
+
+	/**
+	 * Compares trace objects by ID
+	 */
+	static Comparator<TraceObject> traceObjectIDComparator = new Comparator<TraceObject>() {
+
+		/**
+		 * Compares ID's of trace objects
+		 * 
+		 * @param t1
+		 *            trace 1
+		 * @param t2
+		 *            trace 2
+		 * @return the comparison result
+		 */
+		public int compare(TraceObject t1, TraceObject t2) {
+			int n1 = t1.getID();
+			int n2 = t2.getID();
+			return n1 > n2 ? 1 : n1 < n2 ? -1 : 0;
+		}
+
+	};
+
+	/**
+	 * Compares trace objects by name
+	 */
+	static Comparator<TraceObject> traceObjectNameComparator = new Comparator<TraceObject>() {
+
+		/**
+		 * Compares names of trace objects
+		 * 
+		 * @param t1
+		 *            trace 1
+		 * @param t2
+		 *            trace 2
+		 * @return the comparison result
+		 */
+		public int compare(TraceObject t1, TraceObject t2) {
+			String n1 = t1.getName();
+			String n2 = t2.getName();
+			if (n1 == null) {
+				n1 = ""; //$NON-NLS-1$
+			}
+			if (n2 == null) {
+				n2 = ""; //$NON-NLS-1$
+			}
+			return n1.compareTo(n2);
+		}
+
+	};
+
+	/**
+	 * Prevents construction
+	 */
+	private TraceObjectUtils() {
+	}
+
+	/**
+	 * Checks if trace parameter name is already in use and changes if it is.
+	 * 
+	 * @param owner
+	 *            the owner of the parameter
+	 * @param name
+	 *            the parameter name
+	 * @return the modifier interface
+	 */
+	public static TraceObjectModifier modifyDuplicateParameterName(Trace owner,
+			String name) {
+		DuplicateParameterNameModifier modifier = new DuplicateParameterNameModifier(
+				owner, name);
+		modifier.processName();
+		return modifier;
+	}
+
+	/**
+	 * Gets the duplicate modifier from given text
+	 * 
+	 * @param text
+	 *            the text
+	 * @return the duplicate modifier
+	 */
+	public static String removeDuplicateModifier(String text) {
+		String retval;
+		String s = DuplicateValueModifier.getModifier(text);
+		if (s != null) {
+			retval = text.substring(s.length());
+		} else {
+			retval = text;
+		}
+		return retval;
+	}
+
+	/**
+	 * Finds a property from a trace object. This returns an empty string if not
+	 * found
+	 * 
+	 * @param object
+	 *            the object
+	 * @param name
+	 *            the property name
+	 * @return the property value
+	 */
+	public static String findProperty(TraceObject object, String name) {
+		String retval = null;
+		TraceObjectPropertyList propertyList = object
+				.getExtension(TraceObjectPropertyList.class);
+		if (propertyList != null) {
+			TraceObjectProperty property = propertyList.getProperty(name);
+			if (property != null) {
+				retval = property.getValue();
+			}
+		}
+		if (retval == null) {
+			retval = ""; //$NON-NLS-1$
+		}
+		return retval;
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceParameter.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,249 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* All trace objects may contain parameters
+*
+*/
+package com.nokia.tracecompiler.model;
+
+/**
+ * Traces may contain parameters
+ * 
+ */
+public class TraceParameter extends TraceObject {
+
+	/**
+	 * The type of this parameter
+	 */
+	private String type;
+
+	/**
+	 * Hexadecimal (%p), pointer type
+	 */
+	public static final String POINTER = "void*"; //$NON-NLS-1$
+	
+	/**
+	 * Signed decimal (%d), 32-bit type
+	 */
+	public static final String SDEC32 = "int32"; //$NON-NLS-1$
+
+	/**
+	 * Hexadecimal (%x), 32-bit type
+	 */
+	public static final String HEX32 = "hex32"; //$NON-NLS-1$
+
+	/**
+	 * Unsigned decimal (%u), 32-bit type
+	 */
+	public static final String UDEC32 = "uint32"; //$NON-NLS-1$
+	
+	/**
+	 * Octal (%o), 32-bit type
+	 */
+	public static final String OCT32 = "oct32"; //$NON-NLS-1$	
+
+	/**
+	 * Signed decimal (%hd), 16-bit type
+	 */
+	public static final String SDEC16 = "int16"; //$NON-NLS-1$
+
+	/**
+	 * Hexadecimal (%hx), 16-bit type
+	 */
+	public static final String HEX16 = "hex16"; //$NON-NLS-1$
+
+	/**
+	 * Unsigned decimal (%hu), 16-bit type
+	 */
+	public static final String UDEC16 = "uint16"; //$NON-NLS-1$
+	
+	/**
+	 * Octal (%ho), 16-bit type
+	 */
+	public static final String OCT16 = "oct16"; //$NON-NLS-1$	
+
+	/**
+	 * Signed decimal (%hhd), 8-bit type
+	 */
+	public static final String SDEC8 = "int8"; //$NON-NLS-1$
+
+	/**
+	 * Hexadecimal (%hhx), 8-bit type
+	 */
+	public static final String HEX8 = "hex8"; //$NON-NLS-1$
+
+	/**
+	 * Unsigned decimal (%hhu), 8-bit type
+	 */
+	public static final String UDEC8 = "uint8"; //$NON-NLS-1$
+	
+	/**
+	 * Octal (%hho), 8-bit type
+	 */
+	public static final String OCT8 = "oct8"; //$NON-NLS-1$
+
+	/**
+	 * Signed decimal (%ld), 64-bit type
+	 */
+	public static final String SDEC64 = "int64"; //$NON-NLS-1$
+
+	/**
+	 * Time, 64-bit type
+	 */
+	public static final String TIME = "time"; //$NON-NLS-1$	
+	
+	/**
+	 * Hexadecimal (%lx), 64-bit type
+	 */
+	public static final String HEX64 = "hex64"; //$NON-NLS-1$
+
+	/**
+	 * Unsigned decimal (%lu), 64-bit type
+	 */
+	public static final String UDEC64 = "uint64"; //$NON-NLS-1$
+	
+	/**
+	 * Octal (%lo), 64-bit type
+	 */
+	public static final String OCT64 = "oct64"; //$NON-NLS-1$	
+
+	/**
+	 * Ascii string (%s) type
+	 */
+	public static final String ASCII = "ascii"; //$NON-NLS-1$
+
+	/**
+	 * Unicode string (%S) type
+	 */
+	public static final String UNICODE = "unicode"; //$NON-NLS-1$
+
+	/**
+	 * Fixed floating point (%f), 64-bit
+	 */
+	public static final String FLOAT_FIX = "ffix"; //$NON-NLS-1$
+
+	/**
+	 * Exponent floating point (%e), 64-bit
+	 */
+	public static final String FLOAT_EXP = "fexp"; //$NON-NLS-1$
+
+	/**
+	 * Fixed / exponential floating point (%g), 64-bit
+	 */
+	public static final String FLOAT_OPT = "fopt"; //$NON-NLS-1$
+
+	/**
+	 * The trace this parameter belongs to
+	 */
+	private Trace owner;
+
+	/**
+	 * Constructor
+	 * 
+	 * @param owner
+	 *            the object owning this parameter
+	 */
+	public TraceParameter(Trace owner) {
+		setModel(owner.getModel());
+		owner.addParameter(this);
+		this.owner = owner;
+	}
+
+	/**
+	 * Constructor, which inserts the parameter into specified index
+	 * 
+	 * @param owner
+	 *            the object owning this parameter
+	 * @param index
+	 *            the parameter index
+	 */
+	TraceParameter(Trace owner, int index) {
+		setModel(owner.getModel());
+		owner.insertParameter(index, this);
+		this.owner = owner;
+	}
+
+	/**
+	 * Gets the trace this parameter is associated to.
+	 * 
+	 * @return the trace
+	 */
+	public Trace getTrace() {
+		return owner;
+	}
+
+	/**
+	 * Sets the parameter type. Generates propertyUpdated event to model
+	 * listeners if type changes
+	 * 
+	 * @see TraceModelListener#propertyUpdated(TraceObject, int)
+	 * @param type
+	 *            the parameter type
+	 * @throws TraceCompilerException 
+	 */
+	public void setType(String type) throws TraceCompilerException {
+		if (!type.equals(this.type)) {
+			removeTableReference();
+			this.type = type;
+			addTableReference();
+			getModel().notifyPropertyUpdated(this, TraceModelListener.TYPE);
+		}
+	}
+
+	/**
+	 * Gets the parameter type
+	 * 
+	 * @return the parameter type
+	 */
+	public String getType() {
+		return type;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.model.TraceObject#reset()
+	 */
+	@Override
+	void reset() {
+		removeTableReference();
+		super.reset();
+	}
+
+	/**
+	 * Adds a constant table reference
+	 */
+	private void addTableReference() {
+		if (type != null) {
+			TraceConstantTable table = getModel().findConstantTableByName(type);
+			if (table != null) {
+				table.addParameterReference(this);
+			}
+		}
+	}
+
+	/**
+	 * Removes the constant table reference
+	 */
+	private void removeTableReference() {
+		if (type != null) {
+			TraceConstantTable table = getModel().findConstantTableByName(type);
+			if (table != null) {
+				table.removeParameterReference(this);
+			}
+		}
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceProcessingListener.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,42 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Multi-update optimization
+*
+*/
+package com.nokia.tracecompiler.model;
+
+/**
+ * Callback interface which should be notified when performing multiple updates
+ * to the trace model. The implementation of TraceModelListener can also
+ * implement this interface to avoid performing unnecessary updates.
+ * 
+ */
+public interface TraceProcessingListener {
+
+	/**
+	 * Called when a sequence of trace model updates is about to start
+	 */
+	public void processingStarted();
+
+	/**
+	 * Called when a sequence of trace model updates has finished
+	 * 
+	 * @param changed
+	 *            true if the model was changed while processing, false if not
+	 */
+	public void processingComplete(boolean changed);
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/package.html	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,3 @@
+<html><body>
+Contains the model of TraceCompiler.
+</body></html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/package.html	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,3 @@
+<html><body>
+TraceCompiler implementation.
+</body></html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/plugin/TraceAPIFormatter.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,86 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Trace API formatter plug-in
+*
+*/
+package com.nokia.tracecompiler.plugin;
+
+/**
+ * Trace API formatter plug-in
+ * 
+ */
+public interface TraceAPIFormatter {
+
+	/**
+	 * Formatting types for traces
+	 */
+	public enum TraceFormatType {
+
+		/**
+		 * Format for extension function header
+		 */
+		HEADER,
+
+		/**
+		 * Format for trace buffer function. Added to extension function
+		 * definition if trace contains more data than is supported by the API
+		 */
+		TRACE_BUFFER,
+
+		/**
+		 * Format for trace function if the extension function parameters can be
+		 * packed into normal trace API call. For example, if the extension
+		 * function takes 4 8-bit arguments, they are packed into a single
+		 * 32-bit parameter
+		 */
+		TRACE_PACKED,
+
+		/**
+		 * Format for trace activation check function. Added to extension
+		 * function definition
+		 */
+		TRACE_ACTIVATION,
+
+		/**
+		 * Empty declaration for an extension function header
+		 */
+		EMPTY_MACRO
+	}
+
+	/**
+	 * Gets the name of this formatter
+	 * 
+	 * @return the name
+	 */
+	public String getName();
+
+	/**
+	 * Gets the title shown in the API selection preferences dialog
+	 * 
+	 * @return the title
+	 */
+	public String getTitle();
+
+	/**
+	 * Gets the trace format based on format type
+	 * 
+	 * @param type
+	 *            the format type
+	 * @return the trace format
+	 */
+	public String getTraceFormat(TraceFormatType type);
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/plugin/TraceAPIParser.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,60 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Trace API parser plug-in
+*
+*/
+package com.nokia.tracecompiler.plugin;
+
+import com.nokia.tracecompiler.engine.TraceLocation;
+import com.nokia.tracecompiler.engine.TraceCompilerEngineErrorCodes.TraceCompilerErrorCode;
+
+/**
+ * Trace API parser plug-in
+ * 
+ */
+public interface TraceAPIParser {
+
+	/**
+	 * Gets the tag to be located from source
+	 * 
+	 * @return the tag
+	 */
+	public String getSourceTag();
+
+	/**
+	 * Gets the list of suffixes that are allowed with the source tag
+	 * 
+	 * @return the suffixes
+	 */
+	public String[] getTagSuffixes();
+
+	/**
+	 * Verifies the validity of given location
+	 * 
+	 * @param location
+	 *            the location to be checked
+	 * @return error code from TraceCompilerErrorCodes
+	 */
+	public TraceCompilerErrorCode checkLocationValidity(TraceLocation location);
+
+	/**
+	 * Gets the name of the group where locations created by this parser belong
+	 * 
+	 * @return the location group
+	 */
+	public String getLocationGroup();
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/plugin/TraceAPIPlugin.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,41 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Plug-in which provides trace API extensions
+*
+*/
+package com.nokia.tracecompiler.plugin;
+
+/**
+ * Plug-in which provides trace API extensions
+ * 
+ */
+public interface TraceAPIPlugin extends TraceCompilerPlugin {
+
+	/**
+	 * Gets the list of trace API formatters
+	 * 
+	 * @return the formatters
+	 */
+	public TraceAPIFormatter[] getFormatters();
+
+	/**
+	 * Gets the list of trace API parsers
+	 * 
+	 * @return the parsers
+	 */
+	public TraceAPIParser[] getParsers();
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/plugin/TraceCompilerExport.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,37 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Export plug-in interface for trace projects
+*
+*/
+package com.nokia.tracecompiler.plugin;
+
+import com.nokia.tracecompiler.model.TraceCompilerException;
+
+/**
+ * Export plug-in interface for trace projects.
+ * 
+ */
+public interface TraceCompilerExport extends TraceCompilerPlugin {
+
+	/**
+	 * Exports the trace project. This is called when the user selects the
+	 * export action from the menu
+	 * 
+	 * @throws TraceCompilerException
+	 *             if export fails
+	 */
+	public void exportTraceProject() throws TraceCompilerException;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/plugin/TraceCompilerPlugin.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,43 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* TraceCompiler plug-in interface
+*
+*/
+package com.nokia.tracecompiler.plugin;
+
+import com.nokia.tracecompiler.model.TraceModel;
+
+/**
+ * TraceCompiler plug-in interface
+ * 
+ */
+public interface TraceCompilerPlugin {
+
+	/**
+	 * Notification that the trace project has been opened. Provides the model
+	 * to this plug-in. The model is not changed until closeTraceProject and
+	 * thus no null-checks are needed.
+	 * 
+	 * @param model
+	 *            the trace model
+	 */
+	public void traceProjectOpened(TraceModel model);
+
+	/**
+	 * Notification that the trace project has been closed
+	 */
+	public void traceProjectClosed();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/plugin/TraceFormatConstants.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,123 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "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:
+ *
+ * Description:
+ *
+ * Formatting constants for traces
+ *
+ */
+package com.nokia.tracecompiler.plugin;
+
+/**
+ * Formatting constants for traces
+ * 
+ */
+public interface TraceFormatConstants {
+
+	/**
+	 * Function name in upper case
+	 */
+	String FORMAT_FUNCTION_NAME_UPPER_CASE = "{$FN}"; //$NON-NLS-1$
+
+	/**
+	 * Function name in normal case
+	 */
+	String FORMAT_FUNCTION_NAME_NORMAL_CASE = "{$fn}"; //$NON-NLS-1$
+
+	/**
+	 * Class name in upper case
+	 */
+	String FORMAT_CLASS_NAME_UPPER_CASE = "{$CN}"; //$NON-NLS-1$
+
+	/**
+	 * Class name in normal case
+	 */
+	String FORMAT_CLASS_NAME_NORMAL_CASE = "{$cn}"; //$NON-NLS-1$
+
+	/**
+	 * Tag which is replaced by trace text when inserting a trace to source
+	 */
+	String FORMATTED_TRACE = "%FORMATTED_TRACE%"; //$NON-NLS-1$
+
+	/**
+	 * Tag which is replaced by parameters when inserting a trace to source
+	 */
+	String PARAMETERS_FORMAT = "%PARAMETERS%"; //$NON-NLS-1$
+
+	/**
+	 * Insert format for include header
+	 */
+	String INCLUDE_FORMAT = "%INCLUDE%"; //$NON-NLS-1$
+
+	/**
+	 * Tag which is replaced by parameter count when inserting a trace to source
+	 */
+	String PARAM_COUNT_FORMAT = "%PC%"; //$NON-NLS-1$
+
+	/**
+	 * Tag which is replaced by group name when inserting a trace to source
+	 */
+	String GROUP_FORMAT = "%GROUP%"; //$NON-NLS-1$
+
+	/**
+	 * Tag which is replaced by trace name when inserting a trace to source
+	 */
+	String NAME_FORMAT = "%NAME%"; //$NON-NLS-1$
+
+	/**
+	 * Tag which is replaced by state machine name when inserting a trace to
+	 * source
+	 */
+	String STATE_MACHINE_NAME_FORMAT = "%STATE_MACHINE_NAME%"; //$NON-NLS-1$
+
+	/**
+	 * Tag which is replaced by state machine state when inserting a trace to
+	 * source
+	 */
+	String STATE_MACHINE_STATE_FORMAT = "%STATE_MACHINE_STATE%"; //$NON-NLS-1$
+
+	/**
+	 * Tag which is replaced by event name when inserting a trace to source
+	 */
+	String EVENT_NAME_FORMAT = "%EVENT_NAME%"; //$NON-NLS-1$
+
+	/**
+	 * Tag which is replaced by event start trace name when inserting a trace to
+	 * source
+	 */
+	String EVENT_START_TRACE_NAME_FORMAT = "%EVENT_START_TRACE_NAME%"; //$NON-NLS-1$
+
+	/**
+	 * Tag which is replaced by trace text when inserting a trace to source
+	 */
+	String TEXT_FORMAT = "%TEXT%"; //$NON-NLS-1$
+
+	/**
+	 * Tag which is replaced with the data buffer pointer when formatting
+	 * complex traces into the trace header
+	 */
+	String DATA_BUFFER_FORMAT = "%DATA%"; //$NON-NLS-1$
+
+	/**
+	 * Tag which is replaced with the data buffer length when formatting complex
+	 * traces into the trace header
+	 */
+	String DATA_LENGTH_FORMAT = "%LENGTH%"; //$NON-NLS-1$
+
+	/**
+	 * Comment format which needs to be used. Otherwise the comment before /
+	 * after trace configuration will not work
+	 */
+	String COMMENT_FORMAT = " //"; //$NON-NLS-1$
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/plugin/TraceHeaderContribution.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,61 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Trace header contribution
+*
+*/
+package com.nokia.tracecompiler.plugin;
+
+import com.nokia.tracecompiler.model.TraceModelExtension;
+
+/**
+ * Interface which can be added to model by plug-in's to contribute data to the
+ * trace header
+ * 
+ */
+public interface TraceHeaderContribution extends TraceModelExtension {
+
+	/**
+	 * List of possible contributions to the trace header file
+	 */
+	public enum TraceHeaderContributionType {
+
+		/**
+		 * #define statements to be added to the header
+		 */
+		GLOBAL_DEFINES,
+
+		/**
+		 * #include statements to be added to the header
+		 */
+		GLOBAL_INCLUDES,
+
+		/**
+		 * Content for the main header file
+		 */
+		MAIN_HEADER_CONTENT
+
+	}
+
+	/**
+	 * Gets data to be added to the trace header
+	 * 
+	 * @param type
+	 *            the contribution type
+	 * @return the data to be added, depends on type
+	 */
+	public String[] getContribution(TraceHeaderContributionType type);
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/plugin/package.html	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,3 @@
+<html><body>
+Interfaces for TraceCompiler plug-ins
+</body></html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/project/FormattingUtils.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,122 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Utilities for trace formatting
+*
+*/
+package com.nokia.tracecompiler.project;
+
+//import java.util.*;
+import com.nokia.tracecompiler.engine.TraceCompilerEngineGlobals;
+import com.nokia.tracecompiler.engine.TraceCompilerEngineErrorCodes.TraceCompilerErrorCode;
+import com.nokia.tracecompiler.model.TraceCompilerException;
+import com.nokia.tracecompiler.model.TraceGroup;
+import com.nokia.tracecompiler.model.TraceModel;
+
+
+/**
+ * Utilities for trace formatting
+ * 
+ */
+public final class FormattingUtils {
+
+	/**
+	 * Separator for prefix
+	 */
+	private static final String PREFIX_SEPARATOR = ": "; //$NON-NLS-1$
+
+	/**
+	 * Gets a group ID based on group name
+	 * 
+	 * @param model
+	 *            the trace model
+	 * @param name
+	 *            the group name
+	 * @return the group ID
+	 * @throws TraceCompilerException
+	 */
+	public static int getGroupID(TraceModel model, String name)
+			throws TraceCompilerException {
+
+		// First check that is group one of the default groups
+		int retval = GroupNames.getIdByName(name);
+		// If group was not one of the default groups then get next group Id from model
+		if (retval == 0) {
+			retval = model.getNextGroupID();
+			if (retval < GroupNames.USER_GROUP_ID_FIRST) {
+				retval = GroupNames.USER_GROUP_ID_FIRST;
+			}
+			else if(retval > GroupNames.USER_GROUP_ID_LAST){
+				String msg = "You have exceeded the number of Group IDs you have allocated."; //$NON-NLS-1$
+				TraceCompilerEngineGlobals.getEvents().postErrorMessage(msg, null, true);
+				throw new TraceCompilerException(
+						TraceCompilerErrorCode.RUN_OUT_OF_GROUP_IDS);		
+			}
+		}
+		return retval;
+	}
+
+	/**
+	 * Gets the default component prefix
+	 * 
+	 * @param model
+	 *            the model
+	 * @return the prefix
+	 */
+	public static String getDefaultComponentPrefix(TraceModel model) {
+		return model.getName() + PREFIX_SEPARATOR;
+	}
+
+	/**
+	 * Gets the default component suffix
+	 * 
+	 * @param model
+	 *            the model
+	 * @return the suffix
+	 */
+	public static String getDefaultComponentSuffix(TraceModel model) {
+		return ""; //$NON-NLS-1$
+	}
+
+	/**
+	 * Gets the default group prefix
+	 * 
+	 * @param group
+	 *            the group
+	 * @return the prefix
+	 */
+	public static String getDefaultGroupPrefix(TraceGroup group) {
+		String name = group.getName();
+		if (name.startsWith(GroupNames.DEFAULT_GROUP_PREFIX)) {
+			int start = GroupNames.DEFAULT_GROUP_PREFIX.length();
+			// First character retains case, others are converted to lower case
+			name = name.charAt(start) + name.substring(start + 1).toLowerCase();
+		}
+		name += PREFIX_SEPARATOR;
+		return name;
+	}
+
+	/**
+	 * Gets the default group suffix
+	 * 
+	 * @param group
+	 *            the group
+	 * @return the suffix
+	 */
+	public static String getDefaultGroupSuffix(TraceGroup group) {
+		return ""; //$NON-NLS-1$
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/project/GroupNameIdPair.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "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:
+ *
+ * Description:
+ *
+ * Class that include group name and id pair
+ *
+ */
+package com.nokia.tracecompiler.project;
+
+public class GroupNameIdPair {
+
+	// class associates a group name with an integer id
+	String name;
+	int id;
+
+	/**
+	 * Conctructor
+	 * 
+	 * @param name
+	 *            name of the group
+	 * @param id
+	 *            id of the group
+	 */
+	public GroupNameIdPair(String name, int id) {
+		if (name == null) {
+			this.name = ""; //$NON-NLS-1$
+			this.id = -1; // TODO - what is appropriate value here ?
+		} else {
+			this.name = name;
+			this.id = id;
+		}
+	}
+
+	/**
+	 * Get ID
+	 * 
+	 * @return id of the group
+	 */
+	public int Id() {
+		return this.id;
+	}
+
+	/**
+	 * Get name
+	 * 
+	 * @return name of the group
+	 */
+	public String Name() {
+		return this.name;
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/project/GroupNames.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,291 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "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:
+ *
+ * Description:
+ *
+ * Default names for trace groups
+ *
+ */
+package com.nokia.tracecompiler.project;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileReader;
+import java.io.IOException;
+import java.util.Enumeration;
+import java.util.Vector;
+
+import com.nokia.tracecompiler.TraceCompilerLogger;
+import com.nokia.tracecompiler.TraceCompilerRootException;
+import com.nokia.tracecompiler.engine.TraceCompilerEngineGlobals;
+import com.nokia.tracecompiler.model.TraceCompilerException;
+
+/**
+ * Default names for trace groups
+ * 
+ */
+public class GroupNames {
+
+	public static Vector<GroupNameIdPair> DEFAULT_GROUPS;
+
+	/**
+	 * epoc32 directory
+	 */
+	private static final String EPOC32_DIRECTORY = "epoc32"; //$NON-NLS-1$	
+	
+	/**
+	 * Start of user-defined groups
+	 */
+	public static int USER_GROUP_ID_FIRST = -1;
+
+	/**
+	 * end of user-defined groups
+	 */
+	public static int USER_GROUP_ID_LAST = -1;
+
+	/**
+	 * Constant to be used for EPOCROOT
+	 */
+	public static String EPOCROOT = "EPOCROOT"; //$NON-NLS-1$
+
+	/**
+	 * Constant to be used for the location of opensystemtrace_types.h
+	 */
+	public static String OST_TYPES = "epoc32" + File.separator + "include" + File.separator + "platform" + File.separator + "opensystemtrace_types.h"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+
+	/**
+	 * Prefix for all default groups
+	 */
+	public static String DEFAULT_GROUP_PREFIX = "TRACE_"; //$NON-NLS-1$
+
+	/**
+	 * TRACE_BORDER group name
+	 */
+	public static final String TRACE_BORDER = "TRACE_BORDER"; //$NON-NLS-1$
+
+	/**
+	 * TRACE_API group name
+	 */
+	public static final String TRACE_API = "TRACE_API"; //$NON-NLS-1$
+
+	/**
+	 * TRACE_DUMP group name
+	 */
+	public static final String TRACE_DUMP = "TRACE_DUMP"; //$NON-NLS-1$
+
+	/**
+	 * TRACE_DEBUG group name
+	 */
+	public static final String TRACE_DEBUG = "TRACE_DEBUG"; //$NON-NLS-1$
+
+	/**
+	 * TRACE_DETAILED group name
+	 */
+	public static final String TRACE_DETAILED = "TRACE_DETAILED"; //$NON-NLS-1$
+
+	/**
+	 * TRACE_INTERNALS group name
+	 */
+	public static final String TRACE_INTERNALS = "TRACE_INTERNALS"; //$NON-NLS-1$
+
+	/**
+	 * Calculates location of opensystemtrace_types.h Calls getGroupName Returns
+	 * false if there have been any errors
+	 * 
+	 * @throws TraceCompilerRootException
+	 */
+	public static void initialiseGroupName() throws TraceCompilerRootException {
+
+		String e32 = System.getenv(EPOCROOT);
+		TraceCompilerLogger.printInfo(e32);
+		if (e32 == null || (e32.length() == 0)) {
+			String msg = Messages.getString("GroupNames.0"); //$NON-NLS-1$
+			throw new TraceCompilerRootException(msg, null);
+		}
+
+		// need to check that e32 ends in a file separator
+		if (!e32.endsWith(File.separator)) {
+			TraceCompilerLogger.printInfo(Messages.getString("GroupNames.2")); //$NON-NLS-1$
+			e32 += File.separator;
+		}
+
+		// Check that EPOCROOT is valid
+		File epocRoot = new File(e32 + EPOC32_DIRECTORY);
+		if (epocRoot.exists() == false) {
+			throw new TraceCompilerRootException(Messages.getString("GroupNames.invalidEpocRoot"), null); //$NON-NLS-1$
+		}
+		
+		// tests parsing the opensystemtrace_types.h for expected values
+		String ostHeaderFilename = e32 + OST_TYPES;
+
+		// add the predefined names / ids
+		// this was changed from the previous mechanism to break array indexing
+		// dependency
+		// for linking group names to group ids
+		DEFAULT_GROUPS = new Vector<GroupNameIdPair>();
+
+		// The testing ranges are being hardcoded as the values are linked to
+		// e32btrace.h
+		// The TC would have to be redesigned to read in the values from this
+		// file, which would impact performance
+
+		DEFAULT_GROUPS.add(new GroupNameIdPair("TRACE_TESTING1", 254)); //$NON-NLS-1$
+		TraceCompilerLogger.printInfo(Messages.getString("GroupNames.1")); //$NON-NLS-1$
+		DEFAULT_GROUPS.add(new GroupNameIdPair("TRACE_TESTING2", 255)); //$NON-NLS-1$
+		TraceCompilerLogger.printInfo(Messages.getString("GroupNames.3")); //$NON-NLS-1$
+		try {
+			getGroupName(ostHeaderFilename);
+		} catch (Exception e) {
+			throw new TraceCompilerRootException(
+					Messages.getString("GroupNames.failedToProcessOstHeaderText"), e); //$NON-NLS-1$
+		}
+	}
+
+	/**
+	 * Reads opensystemtrace_types.h and extracts the GroupIds
+	 * 
+	 * @throws IOException
+	 *             if fail to read the header file
+	 * @throws TraceCompilerException
+	 */
+
+	private static void getGroupName(String headerFilename) throws Exception {
+		// TODO this method is buggy as it could process group ids even if there
+		// are commented out
+		// should use regular expression or better parser.
+
+		TraceCompilerLogger
+				.printInfo(Messages.getString("GroupNames.8") + headerFilename); //$NON-NLS-1$
+
+		BufferedReader in = new BufferedReader(new FileReader(headerFilename));
+		try {
+			String str;
+			while ((str = in.readLine()) != null) {
+				if (str.length() != 0) {
+					if (((str.indexOf("EUserDefinedRangeFirst")) != -1) && (USER_GROUP_ID_FIRST == -1)) { //$NON-NLS-1$
+						int val = getGroupIdFromString(str);
+						if (val != -1) {
+							// set user group id first
+							USER_GROUP_ID_FIRST = val;
+							TraceCompilerLogger.printInfo(Messages
+									.getString("GroupNames.4") + val); //$NON-NLS-1$
+						}
+					}
+
+					if (((str.indexOf("EUserDefinedRangeLast")) != -1) && (USER_GROUP_ID_LAST == -1)) { //$NON-NLS-1$
+						int val = getGroupIdFromString(str);
+						if (val != -1) {
+							// set user group id last
+							USER_GROUP_ID_LAST = val;
+							TraceCompilerLogger.printInfo(Messages
+									.getString("GroupNames.12") + val); //$NON-NLS-1$
+						}
+					}
+
+					if ((str.indexOf("enum TGroupIdReserved")) != -1) { //$NON-NLS-1$
+						// search for reserved
+						while ((str.indexOf("};") < 1) && (str.indexOf("} ;") < 1)) { //$NON-NLS-1$//$NON-NLS-2$
+
+							str = in.readLine();
+							if (((str.indexOf("=")) != -1) && ((str.indexOf("*")) < 1)) { //$NON-NLS-1$ //$NON-NLS-2$
+								String groupName = str.substring(0, (str
+										.indexOf("="))); //$NON-NLS-1$
+								groupName = groupName.trim();
+								String substr = str
+										.substring(
+												(str.indexOf("=")) + 1, (str.indexOf(','))); //$NON-NLS-1$
+								int groupId = -1;
+								String trim = substr.trim();
+								try {
+									groupId = Integer.parseInt(trim);
+								} catch (NumberFormatException e) {
+									// not an Int so could be a renaming
+									groupId = getIdByName(trim);
+									if (groupId == 0) {
+										TraceCompilerEngineGlobals
+												.getEvents()
+												.postErrorMessage(
+														Messages.getString("GroupNames.canNotresolveGroupIdPrefix") + trim, null, true); //$NON-NLS-1$
+										// not resolved to an existing name
+										throw new TraceCompilerException(null,
+												true);
+									}
+								}
+								DEFAULT_GROUPS.add(new GroupNameIdPair(
+										groupName, groupId));
+								TraceCompilerLogger.printInfo(groupName
+										+ " = " + groupId); //$NON-NLS-1$
+							}
+						}
+					}
+				}
+			}
+		} catch (Exception e) {
+			TraceCompilerEngineGlobals.getEvents().postErrorMessage(
+					e.getMessage(), null, true);
+			throw e;
+		} finally {
+			in.close();
+		}
+	}
+
+	/**
+	 * Reads opensystemtrace_types.h and extracts the GroupIds value from a
+	 * string containing GroupId name and value. 
+	 * Returns GroupId value, returns -1 if not found or resolved in case of group renaming
+	 */
+
+	private static int getGroupIdFromString(String str) {
+		int groupId = -1;
+		if ((str.indexOf("=")) != -1) { //$NON-NLS-1$
+			String substr = str.substring(
+					(str.indexOf("=")) + 1, (str.indexOf(','))); //$NON-NLS-1$
+
+			try {
+				// try to read the id from the header file
+				groupId = Integer.parseInt(substr.trim());
+			} catch (NumberFormatException e) {
+				// it's probably a rename, so get the id for the old name if
+				// there is one
+				groupId = getIdByName(substr.trim());
+				if (groupId == 0) {
+					// return -1 because we could not resolve it
+					groupId = -1;
+				}
+			}
+		}
+		return groupId;
+	}
+
+	/**
+	 * Searches all known GroupIds for name and then returns value. 
+	 * Returns GroupId value, 0 if not found in DEFAULT_GROUPS
+	 */
+
+	public static int getIdByName(String name) {
+		TraceCompilerLogger
+				.printInfo(Messages.getString("GroupNames.23") + name); //$NON-NLS-1$
+		for (Enumeration<GroupNameIdPair> e = GroupNames.DEFAULT_GROUPS
+				.elements(); e.hasMoreElements();) {
+			GroupNameIdPair gnidp = e.nextElement();
+			if (name.equals(gnidp.Name())) {
+				TraceCompilerLogger.printInfo(Messages
+						.getString("GroupNames.24") + gnidp.Id()); //$NON-NLS-1$
+				return gnidp.Id();
+			}
+		}
+		// the caller should decide what to do with value 0
+		return 0;
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/project/Messages.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,63 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Localized strings for project package
+*
+*/
+package com.nokia.tracecompiler.project;
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+/**
+ * Localized strings for project package
+ * 
+ */
+class Messages {
+
+	/**
+	 * Bundle name
+	 */
+	private static final String BUNDLE_NAME = "com.nokia.tracecompiler.project.messages"; //$NON-NLS-1$
+
+	/**
+	 * Bundle
+	 */
+	private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
+			.getBundle(BUNDLE_NAME);
+
+	/**
+	 * Prevents construction
+	 */
+	private Messages() {
+	}
+
+	/**
+	 * Gets localized string based on key
+	 * 
+	 * @param key
+	 *            the resource key
+	 * @return the localized resource
+	 */
+	public static String getString(String key) {
+		String value;
+		try {
+			value = RESOURCE_BUNDLE.getString(key);
+		} catch (MissingResourceException e) {
+			value = '!' + key + '!';
+		}
+		return value;
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/project/ProjectFileParser.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,85 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Base class for project file parsers
+*
+*/
+package com.nokia.tracecompiler.project;
+
+import java.io.File;
+
+import com.nokia.tracecompiler.engine.TraceCompilerEngineErrorCodes.FileErrorParameters;
+import com.nokia.tracecompiler.engine.TraceCompilerEngineErrorCodes.TraceCompilerErrorCode;
+import com.nokia.tracecompiler.model.TraceCompilerException;
+import com.nokia.tracecompiler.model.TraceModel;
+
+/**
+ * Base class for project file parsers
+ * 
+ */
+public abstract class ProjectFileParser {
+
+	/**
+	 * Trace model
+	 */
+	protected TraceModel model;
+
+	/**
+	 * Project file to be parsed
+	 */
+	protected File projectFile;
+
+	/**
+	 * Constructor
+	 * 
+	 * @param model
+	 *            the trace model
+	 * @param fileName
+	 *            the project file name
+	 * @throws TraceCompilerException
+	 *             if file does not exist
+	 */
+	protected ProjectFileParser(TraceModel model, String fileName)
+			throws TraceCompilerException {
+		File file = new File(fileName);
+		if (file.exists()) {
+			this.model = model;
+			this.projectFile = file;
+			createParser();
+		} else {
+			FileErrorParameters params = new FileErrorParameters();
+			params.file = fileName;
+			throw new TraceCompilerException(
+					TraceCompilerErrorCode.FILE_NOT_FOUND, params);
+		}
+	}
+
+	/**
+	 * Creates the file parser
+	 * 
+	 * @throws TraceCompilerException
+	 *             if creation fails
+	 */
+	protected abstract void createParser() throws TraceCompilerException;
+
+	/**
+	 * Parses the project file
+	 * 
+	 * @throws TraceCompilerException
+	 *             if parser fails
+	 */
+	public abstract void parse() throws TraceCompilerException;
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/project/ProjectUtils.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,271 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Project file utilities
+*
+*/
+package com.nokia.tracecompiler.project;
+
+import java.io.File;
+import java.util.ArrayList;
+
+import com.nokia.tracecompiler.engine.TraceCompilerEngineGlobals;
+import com.nokia.tracecompiler.engine.TraceCompilerEngineErrorCodes.TraceCompilerErrorCode;
+import com.nokia.tracecompiler.engine.project.ProjectEngine;
+import com.nokia.tracecompiler.model.TraceCompilerException;
+import com.nokia.tracecompiler.model.TraceModel;
+import com.nokia.tracecompiler.source.SymbianConstants;
+
+/**
+ * Project file utilities
+ *
+ */
+public final class ProjectUtils {
+
+
+	/**
+	 * Tries to locate existing file with given extension and if not found,
+	 * proposes a new location for that file. The new location will be
+	 * <i>createPath</i> or if that is null, the directory where the trace
+	 * project file (.tbprj) resides. Trace project must be open before this can
+	 * be called
+	 *
+	 * @param model
+	 *            the trace model
+	 * @param createPath
+	 *            the path to create if existing file is not found
+	 * @param fileName
+	 *            the name for the new file
+	 * @param appendProjectName
+	 *            true if the name is appended to end of model name
+	 * @return the project file path for the new file
+	 * @throws TraceCompilerException
+	 *             if the model does not have any project files
+	 */
+	public static String getLocationForFile(TraceModel model,
+			String createPath, String fileName, boolean appendProjectName)
+			throws TraceCompilerException {
+		TraceProjectFile projectFile = model
+				.getExtension(TraceProjectFile.class);
+		if (projectFile == null) {
+			throw new TraceCompilerException(
+					TraceCompilerErrorCode.MODEL_NOT_READY);
+		}
+		String projectName = ""; //$NON-NLS-1$
+		if (appendProjectName) {
+			projectName = projectFile.getProjectName();
+		}
+		return getLocationForFile(projectFile.getPath(), projectName,
+				createPath, fileName);
+	}
+
+	/**
+	 * Tries to locate existing file with given extension and if not found,
+	 * proposes a new location for that file. The new location will be
+	 * <i>createPath</i> or if that is null, the directory where the trace
+	 * project file resides. Trace project must be open before this can
+	 * be called
+	 *
+	 * @param projectPath
+	 *            path to the project
+	 * @param projectName
+	 *            name of the project
+	 * @param createPath
+	 *            the path to create if existing file is not found
+	 * @param extension
+	 *            the file extension for the new file
+	 * @return the project file path for the new file
+	 */
+	public static String getLocationForFile(String projectPath,
+			String projectName, String createPath, String extension) {
+		ArrayList<String> searchPaths = new ArrayList<String>();
+		if (createPath != null && createPath.length() > 0) {
+			// If create path is explicitly specified, it is added to the search
+			// path list
+			searchPaths.add(createPath);
+		}
+		// Default directories are always included into search
+		searchPaths.add(ProjectEngine.traceFolderName);
+		searchPaths.add(SymbianConstants.GROUP_DIRECTORY);
+		searchPaths.add(SymbianConstants.INCLUDE_DIRECTORY);
+		String[] pathArr = new String[searchPaths.size()];
+		searchPaths.toArray(pathArr);
+		return getLocationForFile(projectPath, projectName, pathArr,
+				createPath, extension);
+	}
+
+	/**
+	 * Tries to locate existing file and if not found, proposes a new location
+	 * for that file. The search starts from <i>projectPath</i>. If
+	 * <i>checkParents</i> is true, the parent directories are also checked if
+	 * the file is not found
+	 *
+	 * @param projectPath
+	 *            path where to start the search
+	 * @param projectName
+	 *            the name of the project
+	 * @param searchPaths
+	 *            the sub-paths to be searched
+	 * @param createPath
+	 *            the sub-path to create if file is not found
+	 * @param fileName
+	 *            extension of the file to be located
+	 * @return the project file path for the new file
+	 */
+	private static String getLocationForFile(String projectPath,
+			String projectName, String[] searchPaths, String createPath,
+			String fileName) {
+		// If the project file is in one of the search paths, the path is
+		// changed to its parent
+		File projectPathFile = new File(projectPath);
+		String projectPathName = projectPathFile.getName();
+		for (int i = 0; i < searchPaths.length; i++) {
+			if (searchPaths[i].equals(projectPathName)) {
+				projectPath = projectPathFile.getParent();
+				i = searchPaths.length;
+			}
+		}
+		// Tries to find an existing file based on project path and project name
+		String filePath = findProjectFile(projectPath, projectName,
+				searchPaths, fileName, false);
+		if (filePath == null) {
+			// If file is not found, this returns a new path
+			filePath = projectPath + File.separator + createPath
+					+ File.separator + projectName + fileName;
+		}
+		return filePath;
+	}
+
+	/**
+	 * Finds a project file or directory based on a file or directory
+	 *
+	 * @param startPath
+	 *            the file name or path where to start search
+	 * @param projectName
+	 *            the name of the project file
+	 * @param searchDirectories
+	 *            the directories to search
+	 * @param fileExtension
+	 *            the file extension to be located or null if locating one of
+	 *            the search directories
+	 * @param checkParents
+	 *            true if parent directories should be checked
+	 * @return the file or directory path if found or null if not
+	 */
+	private static String findProjectFile(String startPath, String projectName,
+			String[] searchDirectories, String fileExtension,
+			boolean checkParents) {
+		String foundFile = null;
+		if (startPath != null) {
+			File file = new File(startPath);
+			if (!file.isDirectory()) {
+				file = file.getParentFile();
+			}
+			if (file != null) {
+				do {
+					for (int i = 0; i < searchDirectories.length
+							&& foundFile == null; i++) {
+						foundFile = findProjectFile(searchDirectories[i],
+								projectName, fileExtension, file);
+					}
+					file = file.getParentFile();
+				} while (file != null && foundFile == null && checkParents);
+			}
+		}
+		return foundFile;
+	}
+
+	/**
+	 * Searches a single directory for a project file
+	 *
+	 * @param searchDirectory
+	 *            the directory to search
+	 * @param fileExtension
+	 *            the file extension to be located or null if locating one of
+	 *            the search directories
+	 * @param projectName
+	 *            the name of the project file
+	 * @param file
+	 *            the current file
+	 * @return the file or directory path if found or null if not
+	 */
+	private static String findProjectFile(String searchDirectory,
+			String projectName, String fileExtension, File file) {
+		String foundFile = null;
+		File projectPath = new File(file.getAbsolutePath() + File.separator
+				+ searchDirectory + File.separator);
+		if (projectPath.exists()) {
+			if (fileExtension == null) {
+				foundFile = projectPath.getAbsolutePath();
+			} else {
+				foundFile = findProjectFileFromDirectory(projectPath,
+					projectName, fileExtension);
+			}
+		}
+		return foundFile;
+	}
+
+	/**
+	 * Gets the first file with given extension from given directory
+	 *
+	 * @param path
+	 *            the path to search
+	 * @param projectName
+	 *            the name of the project file
+	 * @param fileExtension
+	 *            the file extension
+	 * @return the file name if found or null if not
+	 */
+	private static String findProjectFileFromDirectory(File path,
+			String projectName, String fileExtension) {
+		String proposal = null;
+		File[] files = path.listFiles();
+		if (projectName != null) {
+			// If project name is specified, only the file that matches the name
+			// is returned
+			String nameFromProjectFile = projectName + fileExtension;
+
+			// Check does user have access rights to the traces folder
+			if (path.canWrite() == false) {
+				TraceCompilerEngineGlobals
+						.getEvents()
+						.postErrorMessage(
+								Messages
+										.getString("ProjectUtils.accesRightErrorText"), null, true); //$NON-NLS-1$
+				System.exit(1);
+			}
+			
+			for (int i = 0; i < files.length && proposal == null; i++) {
+				String fname = files[i].getName();
+				if (fname.equals(nameFromProjectFile)) {
+					proposal = files[i].getAbsolutePath();
+				}
+			}
+		} else {
+			// If project name is not specified, this proposes the first file
+			// which ends with the file extension
+			for (int i = 0; i < files.length && proposal == null; i++) {
+				String fname = files[i].getName();
+				if (fname.length() > fileExtension.length()) {
+					int extstart = fname.length() - fileExtension.length();
+					if (fname.substring(extstart).equals(fileExtension)) {
+						proposal = files[i].getAbsolutePath();
+					}
+				}
+			}
+		}
+		return proposal;
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/project/PropertyNames.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,37 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* List of supported property names
+*
+*/
+package com.nokia.tracecompiler.project;
+
+/**
+ * List of supported property names
+ * 
+ */
+public interface PropertyNames {
+
+	/**
+	 * Group / component prefix
+	 */
+	public String PREFIX = "prefix"; //$NON-NLS-1$
+
+	/**
+	 * Group / component suffix
+	 */
+	public String SUFFIX = "suffix"; //$NON-NLS-1$
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/project/TraceLocationParser.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,91 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Interface to location parser
+*
+*/
+package com.nokia.tracecompiler.project;
+
+import com.nokia.tracecompiler.engine.TraceLocation;
+import com.nokia.tracecompiler.engine.TraceCompilerEngineErrorCodes.TraceCompilerErrorCode;
+import com.nokia.tracecompiler.engine.source.SourceParserRule.TraceConversionResult;
+import com.nokia.tracecompiler.model.TraceCompilerException;
+import com.nokia.tracecompiler.source.SourceExcludedArea;
+
+/**
+ * Interface to location parser. The parser is implemented into the project API
+ * 
+ */
+public interface TraceLocationParser {
+
+	/**
+	 * Processes a newly parsed location. The location has not yet been
+	 * associated with a trace.
+	 * 
+	 * @param location
+	 *            the new location
+	 */
+	public void processNewLocation(TraceLocation location);
+
+	/**
+	 * Gets the group where locations created by this parser belong
+	 * 
+	 * @return the location group
+	 */
+	public String getLocationGroup();
+
+	/**
+	 * Converts a location to trace
+	 * 
+	 * @param location
+	 *            the location to be parsed
+	 * @return properties for new trace
+	 * @throws TraceCompilerException
+	 *             if the location cannot be converted
+	 */
+	public TraceConversionResult convertLocation(TraceLocation location)
+			throws TraceCompilerException;
+
+	/**
+	 * Finds the comment related to given location
+	 * 
+	 * @param location
+	 *            the location to be checked
+	 * @return the comment related to the location or null if not found
+	 */
+	public SourceExcludedArea findLocationComment(TraceLocation location);
+
+	/**
+	 * Determines if a location parsed from source should be automatically
+	 * converted to a trace. This is called only if
+	 * isLocationAutoConvertSupported has returned true
+	 * 
+	 * @param location
+	 *            the location to be checked
+	 * 
+	 * @return true if automatically converted, false if not
+	 */
+	public boolean isLocationConverted(TraceLocation location);
+
+	/**
+	 * Checks if a location matches its trace
+	 * 
+	 * @param location
+	 *            the location to be checked
+	 * @return error code from TraceCompilerErrorCodes
+	 */
+	public TraceCompilerErrorCode checkLocationValidity(TraceLocation location);
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/project/TraceProjectAPI.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,60 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Interface to the properties of the trace API used by the currently open trace project
+*
+*/
+package com.nokia.tracecompiler.project;
+
+import com.nokia.tracecompiler.model.Trace;
+import com.nokia.tracecompiler.model.TraceModelExtension;
+
+/**
+ * Interface to the properties of the trace API used by the currently open trace
+ * project
+ * 
+ */
+public interface TraceProjectAPI extends TraceModelExtension {
+
+	/**
+	 * Formatting flags for formatTraceForExport
+	 */
+	public class TraceFormatFlags {
+
+		/**
+		 * Formatting characters supported flag
+		 */
+		public boolean isFormattingSupported;
+	}
+
+	/**
+	 * Gets the name of this API
+	 * 
+	 * @return the name
+	 */
+	public String getName();
+
+	/**
+	 * Formats a trace for into a string suitable for export
+	 * 
+	 * @param trace
+	 *            the trace to be formatted
+	 * @param flags
+	 *            the formatting flags
+	 * @return the formatted text
+	 */
+	public String formatTraceForExport(Trace trace, TraceFormatFlags flags);
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/project/TraceProjectAPIList.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,38 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Interface to the list of trace project API's registered to TraceCompiler
+*
+*/
+package com.nokia.tracecompiler.project;
+
+import java.util.Iterator;
+
+import com.nokia.tracecompiler.model.TraceModelExtension;
+
+/**
+ * Interface to the list of trace project API's registered to TraceCompiler
+ * 
+ */
+public interface TraceProjectAPIList extends TraceModelExtension {
+
+	/**
+	 * Gets the list of API's
+	 * 
+	 * @return the list
+	 */
+	public Iterator<TraceProjectAPI> getAPIs();
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/project/TraceProjectFile.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,291 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Generic trace project file properties
+*
+*/
+package com.nokia.tracecompiler.project;
+
+import java.io.File;
+
+import com.nokia.tracecompiler.engine.TraceCompilerEngineGlobals;
+import com.nokia.tracecompiler.file.FileUtils;
+import com.nokia.tracecompiler.model.TraceModel;
+import com.nokia.tracecompiler.model.TraceModelExtension;
+import com.nokia.tracecompiler.model.TraceModelListener;
+import com.nokia.tracecompiler.model.TraceObject;
+import com.nokia.tracecompiler.source.SourceConstants;
+
+/**
+ * Generic trace project file properties
+ * 
+ */
+public abstract class TraceProjectFile implements TraceModelExtension,
+		TraceModelListener {
+
+	/**
+	 * The trace model
+	 */
+	private TraceModel owner;
+
+	/**
+	 * Name of the project file
+	 */
+	private String name;
+
+	/**
+	 * Project file path
+	 */
+	private String path;
+
+	/**
+	 * Project file name is based on model name and updated when model changes
+	 */
+	protected boolean hasModelName;
+
+	/**
+	 * Constructor
+	 * 
+	 * @param path
+	 *            the path to the file
+	 * @param name
+	 *            the name of the project or empty if this file does not use the
+	 *            project name
+	 */
+	protected TraceProjectFile(String path, String name) {
+		this.path = path;
+		this.name = name;
+		if (name == null || name.length() == 0) {
+			this.hasModelName = false;
+		} else {
+			this.hasModelName = true;
+		}
+	}
+
+	/**
+	 * Constructor
+	 * 
+	 * @param absolutePath
+	 *            the absolute path to the file
+	 * @param hasModelName
+	 *            flag, which tells to update the project file name if model
+	 *            name changes
+	 */
+	protected TraceProjectFile(String absolutePath, boolean hasModelName) {
+		this.hasModelName = hasModelName;
+		updatePath(absolutePath);
+	}
+
+	/**
+	 * Gets the file extension of this project file
+	 * 
+	 * @return the extension
+	 */
+	protected abstract String getFileExtension();
+
+	/**
+	 * Gets the title to be shown in UI
+	 * 
+	 * @return the title
+	 */
+	public abstract String getTitle();
+
+	/**
+	 * Gets the name of the project
+	 * 
+	 * @return the project name
+	 */
+	public final String getProjectName() {
+		return name;
+	}
+
+	/**
+	 * Gets the path of this project file
+	 * 
+	 * @return the project file path
+	 */
+	public final String getPath() {
+		return path;
+	}
+
+	/**
+	 * Gets the name of this project file
+	 * 
+	 * @return the file name
+	 */
+	public final String getFileName() {
+		StringBuffer sb = new StringBuffer();
+		addFileName(sb, false);
+		return sb.toString();
+	}
+
+	/**
+	 * Checks if this file is valid
+	 * 
+	 * @return true if valid, false if not
+	 */
+	public boolean isValid() {
+		return path != null && name != null;
+	}
+
+	/**
+	 * Posts a project file written event
+	 * 
+	 * @param path
+	 *            the path where file was written
+	 */
+	public void postFileWrittenEvent(String path) {
+		String msg = Messages
+				.getString("TraceProjectFile.ProjectFileWrittenMiddle"); //$NON-NLS-1$
+		TraceCompilerEngineGlobals.getEvents().postInfoMessage(
+				getTitle() + msg + path, null);
+	}
+
+	/**
+	 * Updates the project file name and path
+	 * 
+	 * @param absolutePath
+	 *            the new path including the file name
+	 */
+	public void updatePath(String absolutePath) {
+		File file = new File(absolutePath);
+		path = file.getParent();
+		name = file.getName();
+		String ext = getFileExtension();
+		if (name.endsWith(ext)) {
+			name = name.substring(0, name.length() - ext.length());
+		}
+	}
+
+	/**
+	 * Gets the path including file name
+	 * 
+	 * @return the path
+	 */
+	public final String getAbsolutePath() {
+		String retval;
+		if (isValid()) {
+			StringBuffer sb = new StringBuffer();
+			sb.append(FileUtils.convertSeparators(
+					SourceConstants.FORWARD_SLASH_CHAR, path, true));
+			addFileName(sb, false);
+			retval = sb.toString();
+		} else {
+			retval = null;
+		}
+		return retval;
+	}
+
+	/**
+	 * Gets the absolute path to this file, including the model ID in file name
+	 * 
+	 * @return the path
+	 */
+	public final String getAbsolutePathWithID() {
+		String retval;
+		if (isValid()) {
+			StringBuffer sb = new StringBuffer();
+			sb.append(FileUtils.convertSeparators(
+					SourceConstants.FORWARD_SLASH_CHAR, path, true));
+			addFileName(sb, true);
+			retval = sb.toString();
+		} else {
+			retval = null;
+		}
+		return retval;
+	}
+
+	/**
+	 * Adds the file name to the given buffer
+	 * 
+	 * @param sb
+	 *            the buffer
+	 * @param addID
+	 *            true if ID needs to be added to name
+	 */
+	private void addFileName(StringBuffer sb, boolean addID) {
+		sb.append(name);
+		if (addID) {
+			sb.append("_0x"); //$NON-NLS-1$
+			sb.append(Integer.toHexString(getOwner().getModel().getID()));
+			sb.append("_"); //$NON-NLS-1$
+		}
+		sb.append(getFileExtension());
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.model.TraceModelExtension#getOwner()
+	 */
+	public TraceObject getOwner() {
+		return owner;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.model.TraceModelExtension#
+	 *      setOwner(com.nokia.tracecompiler.model.TraceObject)
+	 */
+	public void setOwner(TraceObject owner) {
+		if (this.owner != null) {
+			this.owner.removeModelListener(this);
+		}
+		if (owner instanceof TraceModel) {
+			this.owner = (TraceModel) owner;
+			this.owner.addModelListener(this);
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.model.TraceModelListener#
+	 *      objectAdded(com.nokia.tracecompiler.model.TraceObject,
+	 *      com.nokia.tracecompiler.model.TraceObject)
+	 */
+	public void objectAdded(TraceObject owner, TraceObject object) {
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.model.TraceModelListener#
+	 *      objectCreationComplete(com.nokia.tracecompiler.model.TraceObject)
+	 */
+	public void objectCreationComplete(TraceObject object) {
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.model.TraceModelListener#
+	 *      objectRemoved(com.nokia.tracecompiler.model.TraceObject,
+	 *      com.nokia.tracecompiler.model.TraceObject)
+	 */
+	public void objectRemoved(TraceObject owner, TraceObject object) {
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.model.TraceModelListener#
+	 *      propertyUpdated(com.nokia.tracecompiler.model.TraceObject, int)
+	 */
+	public void propertyUpdated(TraceObject object, int property) {
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/project/messages.properties	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,23 @@
+GroupNames.0=Need to set EPOCROOT env variable
+GroupNames.1=TRACE_TESTING1 = 254
+GroupNames.12=USER_GROUP_ID_LAST = 
+GroupNames.2=Appending file separator to EPOCROOT
+GroupNames.23=GetIdByName called name = 
+GroupNames.24=GetIdByName returning 
+GroupNames.25=getIdByName NOT FOUND returning 0
+GroupNames.26=GetNameById called id = 
+GroupNames.27=GetNameById returning 
+GroupNames.28=getNameById NOT FOUND  returning empty string 
+GroupNames.29=
+GroupNames.3=TRACE_TESTING2 = 255
+GroupNames.30=TC:
+GroupNames.4=USER_GROUP_ID_FIRST = 
+GroupNames.8=getGroupName() header name
+GroupNames.canNotresolveGroupIdPrefix=Can not resolve Group Id for 
+GroupNames.failedToProcessOstHeaderText=failed to process ost header.
+GroupNames.invalidEpocRoot=Invalid EPOCROOT
+ProjectUtils.accesRightErrorText=Trace compiler does not have access rights to the traces folder
+TraceProjectFile.ProjectFileRenamedPrefix=\ renamed from 
+TraceProjectFile.ProjectFileRenamedMiddle=\ to 
+TraceProjectFile.NotValid=Not Valid
+TraceProjectFile.ProjectFileWrittenMiddle=\ written to 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/project/package.html	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,3 @@
+<html><body>
+Interface to the trace project management
+</body></html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/rules/ArrayParameterRule.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,28 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Rule interface for parameters that represent array types
+*
+*/
+package com.nokia.tracecompiler.rules;
+
+import com.nokia.tracecompiler.model.TraceObjectRule;
+
+/**
+ * Rule interface for parameters that represent array types
+ * 
+ */
+public interface ArrayParameterRule extends TraceObjectRule {
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/rules/FillerParameterRule.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,28 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Rule that defines a filler parameter
+*
+*/
+package com.nokia.tracecompiler.rules;
+
+/**
+ * Rule that defines a filler parameter. A filler does not have a source or view
+ * representation, but does have a representation in the header and decoder
+ * files. It aligns trace parameters to 32-bit boundaries.
+ * 
+ */
+public interface FillerParameterRule extends HiddenTraceObjectRule {
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/rules/HiddenTraceObjectRule.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,28 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Rule that allows an object to be marked as hidden
+*
+*/
+package com.nokia.tracecompiler.rules;
+
+import com.nokia.tracecompiler.model.TraceObjectRule;
+
+/**
+ * Rule that allows an object to be marked as hidden in the view
+ * 
+ */
+public interface HiddenTraceObjectRule extends TraceObjectRule {
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/rules/ReadOnlyObjectRule.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,30 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Rule which marks an object "read-only"
+*
+*/
+package com.nokia.tracecompiler.rules;
+
+import com.nokia.tracecompiler.model.TraceObjectRule;
+
+/**
+ * Rule which marks an object "read-only". Read-only objects cannot be updated
+ * via UI
+ * 
+ */
+public interface ReadOnlyObjectRule extends TraceObjectRule {
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/rules/package.html	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,3 @@
+<html><body>
+Rules for trace objects
+</body></html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/ContextAreaParser.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,521 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Parser for source contexts
+*
+*/
+package com.nokia.tracecompiler.source;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+
+/**
+ * Parser for source contexts
+ * 
+ */
+class ContextAreaParser {
+
+	/**
+	 * Source parser
+	 */
+	private SourceParser parser;
+
+	/**
+	 * List of source file contexts
+	 */
+	protected ArrayList<SourceContext> contextAreas = new ArrayList<SourceContext>();
+
+	/**
+	 * Comparator for array sorting and searching
+	 */
+	private PositionArrayComparator arrayComparator = new PositionArrayComparator();
+
+	/**
+	 * "usingnamespace" text
+	 */
+	private static final String USINGNAMESPACE = "usingnamespace"; //$NON-NLS-1$
+
+	/**
+	 * Start index of "using" substring in "usingnamespace" string
+	 */
+	private static final int START_INDEX_OF_USING_SUBSTRING = 0; // CodForChk_Dis_Magic
+
+	/**
+	 * End index of "using" substring in "usingnamespace" string
+	 */
+	private static final int END_INDEX_OF_USING_SUBSTRING = 5; // CodForChk_Dis_Magic
+
+	/**
+	 * Start index of "namespace" substring in "usingnamespace" string
+	 */
+	private static final int START_INDEX_OF_NAMESPACE_SUBSTRING = 5; // CodForChk_Dis_Magic
+
+	/**
+	 * End index of "namespace" substring in "usingnamespace" string
+	 */
+	private static final int END_INDEX_OF_NAMESPACE_SUBSTRING = 14; // CodForChk_Dis_Magic
+
+	/**
+	 * Constructor
+	 * 
+	 * @param parser
+	 *            the source parser
+	 */
+	ContextAreaParser(SourceParser parser) {
+		this.parser = parser;
+	}
+
+	/**
+	 * Resets the context areas
+	 */
+	void reset() {
+		contextAreas.clear();
+	}
+
+	/**
+	 * Returns the context at given offset
+	 * 
+	 * @param offset
+	 *            the offset to the source data
+	 * @return the context at the offset or null if no context exists
+	 * @throws SourceParserException
+	 *             if parser fails
+	 */
+	SourceContext parseAndGet(int offset) throws SourceParserException {
+		if (contextAreas.isEmpty()) {
+			parseAll();
+		}
+		int index = find(offset);
+		SourceContext context = null;
+		if (index >= 0) {
+			context = contextAreas.get(index);
+		}
+		return context;
+	}
+
+	/**
+	 * Gets the context areas. If the areas have not been parsed, this parses
+	 * them
+	 * 
+	 * @return the areas
+	 * @throws SourceParserException
+	 *             if parser fails
+	 */
+	Iterator<SourceContext> parseAndGetAll() throws SourceParserException {
+		if (contextAreas.isEmpty()) {
+			parseAll();
+		}
+		return contextAreas.iterator();
+	}
+
+	/**
+	 * Gets the context area list. This does not parse the areas
+	 * 
+	 * @return the list of context areas
+	 */
+	List<SourceContext> getContextList() {
+		return contextAreas;
+	}
+
+	/**
+	 * Finds the array index of the context area which contains the offset. If
+	 * none of the areas contain the offset, returns negative integer indicating
+	 * the index of the context area following the offset
+	 * 
+	 * @param offset
+	 *            the offset to the data
+	 * @return the context area index
+	 */
+	int find(int offset) {
+		return Collections.binarySearch(contextAreas, new SourceLocationBase(
+				parser, offset), arrayComparator);
+	}
+
+	/**
+	 * Builds the context array
+	 * 
+	 * @throws SourceParserException
+	 *             if parser fails
+	 */
+	void parseAll() throws SourceParserException { // CodForChk_Dis_ComplexFunc
+		contextAreas.clear();
+		char value;
+		
+		int inBrackets = 0;
+		int inContext = 0;
+		int inNamespace = 0;
+
+		int usingIndex = START_INDEX_OF_USING_SUBSTRING;
+		int usingKeywordEnd = 0;
+		int namespaceIndex = START_INDEX_OF_NAMESPACE_SUBSTRING;
+		int nameSpaceKeywordEnd = 0;
+		int previousIndexBeforeNamespace = 0;
+		boolean checkNextCharacter = false;
+
+		SourceContext context = null;
+		SourceIterator itr = parser.createIterator(0, SourceParser.SKIP_ALL);
+
+		while (itr.hasNext()) {
+			value = itr.next();
+
+			// Next character check is need only if we have found "namespace"
+			// text
+			if (checkNextCharacter) {
+
+				// Next character after "namespace" text should be space.
+				// Because we have skipped spaces, current index should be
+				// bigger than nameSpaceKeywordEnd + 1. If it is not space then
+				// we are not inside namespace
+				if (itr.currentIndex() - nameSpaceKeywordEnd < 2) { // CodForChk_Dis_Magic
+					inNamespace--;
+				}
+				checkNextCharacter = false;
+			}
+
+			// Check is character part of "using" text
+			if (value == USINGNAMESPACE.charAt(usingIndex)) {
+				usingIndex++;
+			} else {
+
+				// Character not part of "using" text -> reset usingIndex
+				usingIndex = START_INDEX_OF_USING_SUBSTRING;
+			}
+
+			// Check that did we found "using" text
+			if (usingIndex == END_INDEX_OF_USING_SUBSTRING) {
+				usingKeywordEnd = itr.currentIndex();
+				usingIndex = START_INDEX_OF_USING_SUBSTRING;
+			}
+
+			// Check is character part of "namespace" text
+			if (value == USINGNAMESPACE.charAt(namespaceIndex)) {
+				if (previousIndexBeforeNamespace == 0) {
+					previousIndexBeforeNamespace = itr.previousIndex();
+				}
+				namespaceIndex++;
+			} else {
+
+				// Character not part of "namespace" text -> reset
+				// previousIndexBeforeNamespace and namespaceIndex
+				previousIndexBeforeNamespace = 0;
+				namespaceIndex = START_INDEX_OF_NAMESPACE_SUBSTRING;
+			}
+
+			// Check that did we found "namespace" text
+			if (namespaceIndex == END_INDEX_OF_NAMESPACE_SUBSTRING) {
+				nameSpaceKeywordEnd = itr.currentIndex();
+
+				// If there was "using" text just before "namespace" text, then
+				// namespace is defined like: "using namespace foo;" and we are
+				// not going inside namespace brackets
+				if (usingKeywordEnd != previousIndexBeforeNamespace) {
+					inNamespace++;
+					checkNextCharacter = true;
+				}
+				namespaceIndex = START_INDEX_OF_NAMESPACE_SUBSTRING;
+			}
+
+			if (value == '{') {
+				inBrackets++;
+
+				// Check that are we inside namespace or context
+				if (inBrackets > inNamespace) {
+					inContext++;
+					if (inContext == 1) {
+						int start = itr.currentIndex() + 1;
+						context = new SourceContext(parser, start);
+
+						// Includes the '{' character into the context
+						if (!createContext(context, start - 2)) { // CodForChk_Dis_Magic
+							context = null;
+						}
+					}
+				}
+			} else if (value == '}') {
+				// Check that are we exiting from context or namespace
+				if (inBrackets == inNamespace) {
+					inNamespace--;
+				} else {
+					inContext--;
+					if (inContext == 0 && context != null) {
+						context.setLength(itr.currentIndex() + 1
+								- context.getOffset());
+						contextAreas.add(context);
+					}
+				}
+
+				inBrackets--;
+			}
+		}
+	}
+
+	/**
+	 * Sets the data to the source context
+	 * 
+	 * @param context
+	 *            the source context to be updated
+	 * @param offset
+	 *            the index preceeding the '{' character
+	 * @return true if valid, false otherwise
+	 * @throws SourceParserException
+	 *             if processing fails
+	 */
+	private boolean createContext(SourceContext context, int offset)
+			throws SourceParserException {
+		ContextSearchData data = new ContextSearchData();
+		data.itr = parser.createIterator(offset, SourceParser.BACKWARD_SEARCH
+				| SourceParser.SKIP_ALL);
+		data.context = context;
+		while (data.itr.hasNext() && !data.finished) {
+			char c = data.itr.next();
+			// Function start or stop character or statement separator breaks
+			// the search in normal case. In case of nested class separator
+			// character breaks the search.
+			if (c == ';' || c == '}' || c == '{'
+					|| (c == ':' && data.itr.peek() == ':')
+					&& data.classStartIndex != -1) {
+				processContextTerminator(context, data, false);
+			} else if (!data.parametersFound) {
+				processParametersNotFoundCharacter(data, c);
+			} else if (c == ')' || c == '(' || c == ','
+					|| (c == ':' && data.itr.peek() != ':')) {
+				// Constructor member initializer list may contain brackets, ','
+				// and ':'. When one of the characters from member initializer
+				// list is encountered, this assumes that the previous
+				// one was not the actual function parameter list yet. All
+				// variables are reset in that case
+				data.parametersFound = false;
+				data.functionEndIndex = -1;
+				data.functionStartIndex = -1;
+				data.classEndIndex = -1;
+				processParametersNotFoundCharacter(data, c);
+			} else if (data.functionEndIndex == -1) {
+				processFunctionNameNotFoundCharacter(data, c);
+			} else if (data.functionStartIndex == -1) {
+				processFunctionNameCharacter(context, data, c);
+			} else if (data.classEndIndex == -1) {
+				processClassNameNotFoundCharacter(data);
+			} else if (data.classStartIndex == -1) {
+				processClassNameCharacter(context, data, c);
+			} else {
+				processReturnTypeCharacter(context, data);
+			}
+		}
+		if (!data.finished) {
+			processContextTerminator(context, data, true);
+		}
+		return data.valid;
+	}
+
+	/**
+	 * Processes a character after class and function names have been found
+	 * 
+	 * @param context
+	 *            the context
+	 * @param data
+	 *            the search data
+	 * @throws SourceParserException
+	 *             if processing fails
+	 */
+	private void processReturnTypeCharacter(SourceContext context,
+			ContextSearchData data) throws SourceParserException {
+		if (data.itr.hasSkipped()) {
+			// Collects all return type candidates to the context
+			addReturnType(context, data.itr.previousIndex(),
+					data.returnEndIndex);
+			data.returnEndIndex = data.itr.currentIndex();
+		}
+	}
+
+	/**
+	 * Processes a character after function name has been found, but class name
+	 * has not yet been found
+	 * 
+	 * @param data
+	 *            the search flags
+	 */
+	private void processClassNameNotFoundCharacter(ContextSearchData data) {
+		// After start of function and the separator has been found, the
+		// next character marks the end of class name
+		data.classEndIndex = data.itr.currentIndex() + 1;
+	}
+
+	/**
+	 * Parses a character which belongs to the class name
+	 * 
+	 * @param context
+	 *            the source context to be parsed
+	 * @param data
+	 *            the context search parameters
+	 * @param c
+	 *            the character
+	 * @throws SourceParserException
+	 *             if processing fails
+	 */
+	private void processClassNameCharacter(SourceContext context,
+			ContextSearchData data, char c) throws SourceParserException {
+		if (data.itr.hasSkipped() || (c == ':' && data.itr.peek() == ':')) {
+			// Start of class name is found when iterator skips over
+			// white space or comment characters or in case of nested class
+			// separator character has been found
+			context.setFunctionName(parser.getSource().get(
+					data.functionStartIndex,
+					data.functionEndIndex - data.functionStartIndex));
+			data.classStartIndex = data.itr.previousIndex();
+			data.returnEndIndex = data.itr.currentIndex();
+			context.setClassName(parser.getSource().get(data.classStartIndex,
+					data.classEndIndex - data.classStartIndex));
+
+			// In case of nested class skips over the second ':'
+			if (c == ':' && data.itr.peek() == ':') {
+				data.itr.next();
+			}
+		}
+	}
+
+	/**
+	 * Processes a character while within function name
+	 * 
+	 * @param context
+	 *            the source context under processing
+	 * @param data
+	 *            the context search flags
+	 * @param c
+	 *            the character
+	 * @throws SourceParserException
+	 *             if processing fails
+	 */
+	private void processFunctionNameCharacter(SourceContext context,
+			ContextSearchData data, char c) throws SourceParserException {
+		// After end of function has been found the separator character
+		// marks the start of function
+		if (c == ':') {
+			if (data.itr.hasNext() && data.itr.peek() == ':') {
+				data.functionStartIndex = data.itr.previousIndex();
+				context.setFunctionName(parser.getSource().get(
+						data.functionStartIndex,
+						data.functionEndIndex - data.functionStartIndex));
+				// Skips over the second ':'
+				data.itr.next();
+			} else {
+				// Only one ':' character -> Invalid
+				data.finished = true;
+			}
+		} else if (data.itr.hasSkipped()) {
+			// If the iterator skipped over some characters and the next
+			// character is not ':' the function is a non-member
+			data.functionStartIndex = data.itr.previousIndex();
+			context.setFunctionName(parser.getSource().get(
+					data.functionStartIndex,
+					data.functionEndIndex - data.functionStartIndex));
+			// Class name indices are set so parser does not search for them
+			data.classStartIndex = data.itr.previousIndex();
+			data.classEndIndex = data.itr.previousIndex();
+			data.returnEndIndex = data.itr.currentIndex();
+		}
+	}
+
+	/**
+	 * Processes a character when function name has not yet been found
+	 * 
+	 * @param data
+	 *            the search flags
+	 * @param c
+	 *            the character to be processed
+	 */
+	private void processFunctionNameNotFoundCharacter(ContextSearchData data,
+			char c) {
+		// The next character after parameters is the end of function
+		if (c == ':') {
+			data.finished = true;
+		}
+		data.functionEndIndex = data.itr.currentIndex() + 1;
+	}
+
+	/**
+	 * Checks if the character is '(' or ')' and updates the parametersFound
+	 * flag accordingly
+	 * 
+	 * @param data
+	 *            the search data
+	 * @param c
+	 *            the current character
+	 */
+	private void processParametersNotFoundCharacter(ContextSearchData data,
+			char c) {
+		if (c == ')') {
+			data.inParameters++;
+		} else if (c == '(') {
+			data.inParameters--;
+			if (data.inParameters == 0) {
+				data.context.setParametersStartIndex(data.itr.currentIndex());
+				data.parametersFound = true;
+			}
+		}
+	}
+
+	/**
+	 * Processes a context terminating character
+	 * 
+	 * @param context
+	 *            the context under processing
+	 * @param data
+	 *            the search data
+	 * @param startOfFile
+	 *            context was terminated due to start of file
+	 * @throws SourceParserException
+	 *             if processing fails
+	 */
+	private void processContextTerminator(SourceContext context,
+			ContextSearchData data, boolean startOfFile)
+			throws SourceParserException {
+		int offset = startOfFile ? data.itr.currentIndex() : data.itr
+				.previousIndex();
+		if (data.classStartIndex != -1) {
+			addReturnType(context, offset, data.returnEndIndex);
+			data.valid = true;
+		} else if (data.classEndIndex != -1) {
+			context.setClassName(parser.getSource().get(offset,
+					data.classEndIndex - offset));
+			data.valid = true;
+		} else if (data.functionEndIndex != -1) {
+			context.setFunctionName(parser.getSource().get(offset,
+					data.functionEndIndex - offset));
+			data.valid = true;
+		}
+		// Finished flag is set. If function name was not found, the valid flag
+		// remains false
+		data.finished = true;
+	}
+
+	/**
+	 * Adds a return type to the context
+	 * 
+	 * @param context
+	 *            the context to be searched
+	 * @param start
+	 *            the start index
+	 * @param end
+	 *            the end index
+	 * @throws SourceParserException
+	 *             if return type cannot be added
+	 */
+	private void addReturnType(SourceContext context, int start, int end)
+			throws SourceParserException {
+		context.addReturnType(parser.getSource().get(start, end - start + 1));
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/ContextSearchData.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,82 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Contains search variables during SourceParser.createContext call
+*
+*/
+package com.nokia.tracecompiler.source;
+
+/**
+ * Contains search variables during SourceParser.createContext call
+ * 
+ */
+final class ContextSearchData {
+
+	/**
+	 * Index is currently in parameters
+	 */
+	int inParameters;
+
+	/**
+	 * Parameters have been found
+	 */
+	boolean parametersFound;
+
+	/**
+	 * Start of function name
+	 */
+	int functionStartIndex = -1;
+
+	/**
+	 * End of function name
+	 */
+	int functionEndIndex = -1;
+
+	/**
+	 * Start of class name
+	 */
+	int classStartIndex = -1;
+
+	/**
+	 * End of class name
+	 */
+	int classEndIndex = -1;
+
+	/**
+	 * End of return statement
+	 */
+	int returnEndIndex = -1;
+
+	/**
+	 * Context is valid
+	 */
+	boolean valid;
+
+	/**
+	 * Processing is finished
+	 */
+	boolean finished;
+
+	/**
+	 * The iterator
+	 */
+	SourceIterator itr;
+
+	/**
+	 * The context
+	 */
+	SourceContext context;
+
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/ExcludedAreaParser.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,352 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Parser for comments and strings
+*
+*/
+package com.nokia.tracecompiler.source;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+/**
+ * Parser for comments and strings
+ * 
+ */
+final class ExcludedAreaParser {
+
+	/**
+	 * The check range is used to limit the effect of unterminated ' in code
+	 */
+	private static final int CHAR_CHECK_RANGE = 3; // CodForChk_Dis_Magic
+
+	/**
+	 * Source parser
+	 */
+	private SourceParser parser;
+
+	/**
+	 * List of source file areas that are not used in search
+	 */
+	private ArrayList<SourceExcludedArea> excludedAreas = new ArrayList<SourceExcludedArea>();
+
+	/**
+	 * Comparator for array sorting and searching
+	 */
+	private PositionArrayComparator arrayComparator = new PositionArrayComparator();
+
+	/**
+	 * Constructor
+	 * 
+	 * @param parser
+	 *            the source parser
+	 */
+	ExcludedAreaParser(SourceParser parser) {
+		this.parser = parser;
+	}
+
+	/**
+	 * Resets the excluded areas
+	 */
+	void reset() {
+		excludedAreas.clear();
+	}
+
+	/**
+	 * Finds the array index of the excluded area which contains the offset. If
+	 * none of the areas contain the offset, returns negative integer indicating
+	 * the index of the excluded area following the offset
+	 * 
+	 * @param offset
+	 *            the offset to the data
+	 * @return the excluded area index
+	 */
+	int find(int offset) {
+		return Collections.binarySearch(excludedAreas, new SourceLocationBase(
+				parser, offset), arrayComparator);
+	}
+
+	/**
+	 * Finds the excluded source file areas. Excluded areas include comments and
+	 * quoted strings. Overwrites possible old areas.
+	 * 
+	 * @throws SourceParserException
+	 *             if processing fails
+	 */
+	void parseAll() throws SourceParserException {
+		excludedAreas.clear();
+		ExcludedAreaSearchData data = new ExcludedAreaSearchData();
+		int length = parser.getSource().getLength();
+		SourceExcludedArea lastarea = parse(data, length);
+		if (data.inString || data.inChar || data.inComment
+				|| data.inLineComment || data.inPreprocessor) {
+			lastarea.setLength(parser.getSource().getLength()
+					- lastarea.getOffset());
+			excludedAreas.add(lastarea);
+		}
+	}
+
+	/**
+	 * Parses the excluded areas of source
+	 * 
+	 * @param data
+	 *            the search data
+	 * @param length
+	 *            the length of data to be parsed
+	 * @return the last area
+	 * @throws SourceParserException
+	 *             if parser fails
+	 */
+	private SourceExcludedArea parse(ExcludedAreaSearchData data, int length)
+			throws SourceParserException {
+		SourceExcludedArea area = null;
+		while (data.index < length) {
+			data.value = parser.getSource().getChar(data.index++);
+			// Line comments end at end-of-line
+			if (data.inLineComment) {
+				processInLineComment(data, area);
+			} else if (data.inComment) {
+				processInComment(data, area);
+			} else if (data.inPreprocessor) {
+				processInPreprocessor(data, area);
+			} else if (data.inString) {
+				processInString(data, area);
+			} else if (data.inChar) {
+				processInChar(data, area);
+			} else if (data.value == '/' && data.index < length) {
+				area = createCommentArea(data);
+			} else if (data.value == '\"') {
+				area = createStringArea(data);
+			} else if (data.value == '\'') {
+				area = createCharArea(data);
+			} else if (data.value == '#'
+					&& (data.index == 1 || parser.getSource().getChar(
+							data.index - 2) == '\n')) { // CodForChk_Dis_Magic
+				area = createPreprocessorArea(data);
+			}
+		}
+		return area;
+	}
+
+	/**
+	 * Gets the excluded area that contains given offset
+	 * 
+	 * @param offset
+	 *            the offset to the area
+	 * @return the area or null if offset does not hit any area
+	 */
+	SourceExcludedArea getArea(int offset) {
+		SourceExcludedArea retval;
+		int index = find(offset);
+		if (index >= 0) {
+			retval = excludedAreas.get(index);
+		} else {
+			retval = null;
+		}
+		return retval;
+	}
+
+	/**
+	 * Gets the list of excluded areas
+	 * 
+	 * @return the list of areas
+	 */
+	List<SourceExcludedArea> getAreas() {
+		return excludedAreas;
+	}
+
+	/**
+	 * Processes a quote (') character marking start of character area
+	 * 
+	 * @param data
+	 *            the search flags
+	 * @return the new area
+	 */
+	private SourceExcludedArea createCharArea(ExcludedAreaSearchData data) {
+		SourceExcludedArea area;
+		data.inChar = true;
+		area = new SourceExcludedArea(parser, data.index - 1,
+				SourceExcludedArea.CHARACTER);
+		return area;
+	}
+
+	/**
+	 * Processes a double quote (") character marking start of string area
+	 * 
+	 * @param data
+	 *            the search flags
+	 * @return the new area
+	 */
+	private SourceExcludedArea createStringArea(ExcludedAreaSearchData data) {
+		SourceExcludedArea area;
+		data.inString = true;
+		area = new SourceExcludedArea(parser, data.index - 1,
+				SourceExcludedArea.STRING);
+		return area;
+	}
+
+	/**
+	 * Processes a forward slash (/) character marking start of comment
+	 * 
+	 * @param data
+	 *            the search flags
+	 * @return the comment object
+	 * @throws SourceParserException
+	 *             if processing fails
+	 */
+	private SourceExcludedArea createCommentArea(ExcludedAreaSearchData data)
+			throws SourceParserException {
+		SourceExcludedArea area;
+		char next = parser.getSource().getChar(data.index);
+		if (next == '/') {
+			data.inLineComment = true;
+			area = new SourceExcludedArea(parser, data.index - 1,
+					SourceExcludedArea.LINE_COMMENT);
+			data.index++;
+		} else if (next == '*') {
+			data.inComment = true;
+			area = new SourceExcludedArea(parser, data.index - 1,
+					SourceExcludedArea.MULTILINE_COMMENT);
+			data.index++;
+		} else {
+			area = null;
+		}
+		return area;
+	}
+
+	/**
+	 * Processes a preprocessor definition
+	 * 
+	 * @param data
+	 *            the search flags
+	 * @return the preprocessor area representation
+	 */
+	private SourceExcludedArea createPreprocessorArea(
+			ExcludedAreaSearchData data) {
+		SourceExcludedArea area = new SourceExcludedArea(parser,
+				data.index - 1, SourceExcludedArea.PREPROCESSOR_DEFINITION);
+		data.inPreprocessor = true;
+		return area;
+	}
+
+	/**
+	 * Processes a character that belongs to '' area
+	 * 
+	 * @param data
+	 *            the search flags
+	 * @param area
+	 *            the area under processing
+	 * @throws SourceParserException
+	 *             if processing fails
+	 */
+	private void processInChar(ExcludedAreaSearchData data,
+			SourceExcludedArea area) throws SourceParserException {
+		// The check range is used to limit the effect of unterminated '
+		if ((data.value == '\'' && parser.getSource().getChar(data.index - 2) != '\\') // CodForChk_Dis_Magic
+				|| data.index - area.getOffset() > CHAR_CHECK_RANGE) {
+			data.inChar = false;
+			area.setLength(data.index - area.getOffset());
+			excludedAreas.add(area);
+		}
+	}
+
+	/**
+	 * Processes a character that belongs to "" area
+	 * 
+	 * @param data
+	 *            the search flags
+	 * @param area
+	 *            the area under processing
+	 * @throws SourceParserException
+	 *             if processing fails
+	 */
+	private void processInString(ExcludedAreaSearchData data,
+			SourceExcludedArea area) throws SourceParserException {
+		// Strings end with " unless escaped with \" (except \\")
+		if (data.value == '\"') {
+			if (parser.getSource().getChar(data.index - 2) != '\\' // CodForChk_Dis_Magic
+					|| parser.getSource().getChar(data.index - 3) == '\\') { // CodForChk_Dis_Magic
+				data.inString = false;
+				area.setLength(data.index - area.getOffset());
+				excludedAreas.add(area);
+			}
+		}
+	}
+
+	/**
+	 * Processes a character that belongs to multi-line comment
+	 * 
+	 * @param data
+	 *            the search flags
+	 * @param area
+	 *            the area under processing
+	 * @throws SourceParserException
+	 *             if processing fails
+	 */
+	private void processInComment(ExcludedAreaSearchData data,
+			SourceExcludedArea area) throws SourceParserException {
+		// Comments end with */
+		if (data.value == '*') {
+			if (data.index < parser.getSource().getLength()
+					&& parser.getSource().getChar(data.index) == '/') {
+				data.index++;
+				data.inComment = false;
+				area.setLength(data.index - area.getOffset());
+				excludedAreas.add(area);
+			}
+		}
+	}
+
+	/**
+	 * Processes a character that belongs to line comment
+	 * 
+	 * @param data
+	 *            the search flags
+	 * @param area
+	 *            the area under processing
+	 */
+	private void processInLineComment(ExcludedAreaSearchData data,
+			SourceExcludedArea area) {
+		if (data.value == '\n') {
+			data.inLineComment = false;
+			area.setLength(data.index - area.getOffset());
+			excludedAreas.add(area);
+		}
+	}
+
+	/**
+	 * Processes a character that belongs to preprocessor definition
+	 * 
+	 * @param data
+	 *            the search flags
+	 * @param area
+	 *            the area under processing
+	 * @throws SourceParserException
+	 *             if processing fails
+	 */
+	private void processInPreprocessor(ExcludedAreaSearchData data,
+			SourceExcludedArea area) throws SourceParserException {
+		if (data.value == '\n') {
+			char prev = parser.getSource().getChar(data.index - 2); // CodForChk_Dis_Magic
+			char prev2 = parser.getSource().getChar(data.index - 3); // CodForChk_Dis_Magic
+			if (!((prev == '\\') || (prev == '\r' && prev2 == '\\'))) {
+				data.inPreprocessor = false;
+				area.setLength(data.index - area.getOffset());
+				excludedAreas.add(area);
+			}
+		}
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/ExcludedAreaSearchData.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,61 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Contains search variables during SourceParser.findExcludedAreas call
+*
+*/
+package com.nokia.tracecompiler.source;
+
+/**
+ * Contains search variables during SourceParser.findExcludedAreas call
+ * 
+ */
+final class ExcludedAreaSearchData {
+
+	/**
+	 * Data index
+	 */
+	int index;
+
+	/**
+	 * Current character
+	 */
+	char value;
+
+	/**
+	 * Within line comment flag
+	 */
+	boolean inLineComment;
+
+	/**
+	 * Within comment flag
+	 */
+	boolean inComment;
+
+	/**
+	 * Within string flag
+	 */
+	boolean inString;
+
+	/**
+	 * Within character flag
+	 */
+	boolean inChar;
+
+	/**
+	 * Within preprocessor definition flag
+	 */
+	boolean inPreprocessor;
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/FormatMapping.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,52 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Format to parameter type mapping
+*
+*/
+package com.nokia.tracecompiler.source;
+
+/**
+ * Type returned by {@link SourceUtils#mapFormatToParameterType(String)}
+ * 
+ */
+public final class FormatMapping {
+
+	/**
+	 * The type
+	 */
+	public String type;
+
+	/**
+	 * Array type flag
+	 */
+	public boolean isArray;
+
+	/**
+	 * Simple 32-bit type flag
+	 */
+	public boolean isSimple;
+
+	/**
+	 * Constructor
+	 * 
+	 * @param type
+	 *            the type
+	 */
+	public FormatMapping(String type) {
+		this.type = type;
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/FunctionReturnValueParser.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,317 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Parser for function return values
+*
+*/
+package com.nokia.tracecompiler.source;
+
+import java.util.Collections;
+import java.util.List;
+
+/**
+ * Parser for function return values
+ * 
+ */
+class FunctionReturnValueParser {
+
+	/**
+	 * Source parser
+	 */
+	private SourceParser parser;
+
+	/**
+	 * Comparator for source return values
+	 */
+	private PositionArrayComparator comparator = new PositionArrayComparator();
+
+	/**
+	 * Macros representing return statement
+	 */
+	private List<String> returnExtensions;
+
+	/**
+	 * Constructor
+	 * 
+	 * @param parser
+	 *            the source parser
+	 */
+	FunctionReturnValueParser(SourceParser parser) {
+		this.parser = parser;
+	}
+
+	/**
+	 * Parses the return values of given source context
+	 * 
+	 * @param context
+	 *            the context to be parsed
+	 * @param list
+	 *            the list of return values
+	 */
+	void parseReturnValues(SourceContext context, List<SourceReturn> list) {
+		String statement = SourceConstants.RETURN;
+		try {
+			parseReturnValues(context, list, statement);
+		} catch (SourceParserException e) {
+		}
+		if (returnExtensions != null && returnExtensions.size() > 0) {
+			for (int i = 0; i < returnExtensions.size(); i++) {
+				try {
+					parseReturnValues(context, list, returnExtensions.get(i));
+				} catch (SourceParserException e) {
+				}
+			}
+			Collections.sort(list, comparator);
+		}
+		if (context.isVoid()) {
+			boolean addToEnd = true;
+			// If there were no return statements, the trace is added to end
+			// Otherwise the last return statement needs to be checked. If it is
+			// at the end of the function, the return trace is not added to
+			// the end
+			if (!list.isEmpty()) {
+				SourceReturn ret = list.get(list.size() - 1);
+				SourceIterator itr = parser.createIterator(ret.getOffset()
+						+ ret.getLength() + 1, SourceParser.SKIP_ALL);
+				try {
+					itr.next();
+					// If the next character after return statement is the end
+					// of function, the return is not added
+					if (itr.currentIndex() == context.getOffset()
+							+ context.getLength() - 1) {
+						addToEnd = false;
+					}
+				} catch (SourceParserException e) {
+					addToEnd = false;
+				}
+			}
+			if (addToEnd) {
+				list.add(new SourceReturn(parser, context.getOffset()
+						+ context.getLength() - 1, 0));
+			}
+		}
+	}
+
+	/**
+	 * Parses the return values of given source context that use the given
+	 * return statement
+	 * 
+	 * @param context
+	 *            the context to be parsed
+	 * @param list
+	 *            the list of return values
+	 * @param statement
+	 *            the return statement
+	 * @throws SourceParserException
+	 *             if processing fails
+	 */
+	private void parseReturnValues(SourceContext context,
+			List<SourceReturn> list, String statement)
+			throws SourceParserException {
+		FunctionReturnValueSearchData data = new FunctionReturnValueSearchData();
+		int offset = context.getOffset();
+		int end = offset + context.getLength();
+		SourceSearch search = parser.startStringSearch(statement, offset, end,
+				SourceParser.MATCH_WHOLE_WORD | SourceParser.SKIP_ALL);
+		boolean looping = true;
+		do {
+			data.index = search.findNext();
+			if (data.index != -1) {
+				data.itr = parser.createIterator(data.index
+						+ statement.length(), SourceParser.SKIP_ALL);
+				locateReturnStatement(data);
+				if (data.endOffset != -1 && data.startOffset != -1) {
+					SourceReturn ret = createReturnStatement(data);
+					list.add(ret);
+				} else {
+					// End of return statement missing
+					looping = false;
+				}
+			} else {
+				looping = false;
+			}
+		} while (looping);
+	}
+
+	/**
+	 * Locates the start and end offsets for the return statement
+	 * 
+	 * @param data
+	 *            the search data
+	 * @throws SourceParserException
+	 *             if parser fails
+	 */
+	private void locateReturnStatement(FunctionReturnValueSearchData data)
+			throws SourceParserException {
+		data.startOffset = -1;
+		data.endOffset = -1;
+		boolean found = false;
+		boolean colonAllowed = false;
+		while (data.itr.hasNext() && !found) {
+			char c = data.itr.next();
+			if (c == ';') {
+				data.endOffset = data.itr.previousIndex() + 1;
+				found = true;
+			} else if (c == '}') {
+				found = true;
+			} else if (c == '?') {
+				colonAllowed = true;
+			} else if (c == ':') {
+				if (data.itr.hasNext() && data.itr.peek() == ':') {
+					// Skips over ::
+					c = data.itr.next();
+				} else {
+					if (colonAllowed) {
+						colonAllowed = false;
+					} else {
+						data.endOffset = data.itr.previousIndex() + 1;
+						found = true;
+					}
+				}
+			}
+			if (data.startOffset == -1) {
+				data.startOffset = data.itr.currentIndex();
+			}
+		}
+	}
+
+	/**
+	 * Creates a return statement
+	 * 
+	 * @param data
+	 *            the parser data
+	 * @return the new statement
+	 * @throws SourceParserException
+	 *             if parser fails
+	 */
+	private SourceReturn createReturnStatement(
+			FunctionReturnValueSearchData data) throws SourceParserException {
+		SourceReturn ret = new SourceReturn(parser, data.startOffset,
+				data.endOffset - data.startOffset);
+		if (checkTag(data.startOffset, data.endOffset - data.startOffset)) {
+			ret.setTagHazard();
+		}
+		if (checkPreviousChar(data.index - 1)) {
+			ret.setPreviousCharHazard();
+		}
+		return ret;
+	}
+
+	/**
+	 * Checks if the tag is hazardous
+	 * 
+	 * @param start
+	 *            start offset
+	 * @param length
+	 *            tag length
+	 * @return true if there is a problem
+	 */
+	private boolean checkTag(int start, int length) {
+		boolean hazard = false;
+		boolean previous = false;
+		// Function calls and increment / decrement operators are not safe
+		for (int i = start; i < start + length && !hazard; i++) {
+			char c = parser.getData(i);
+			if (c == '(') {
+				// If return statement is within brackets, it is not hazardous
+				if (i != start || parser.getData(start + length - 1) != ')') {
+					hazard = true;
+				}
+			} else if (c == '?') {
+				hazard = true;
+			} else if (c == '-' || c == '+') {
+				if (previous) {
+					hazard = true;
+				} else {
+					previous = true;
+				}
+			} else {
+				previous = false;
+			}
+		}
+		return hazard;
+	}
+
+	/**
+	 * Checks if previous character is hazardous
+	 * 
+	 * @param index
+	 *            the index
+	 * @return true if hazard, false if not
+	 * @throws SourceParserException
+	 *             if processing fails
+	 */
+	private boolean checkPreviousChar(int index) throws SourceParserException {
+		boolean hazard = false;
+		SourceIterator previtr = parser.createIterator(index,
+				SourceParser.SKIP_ALL | SourceParser.BACKWARD_SEARCH);
+		char prevchar = previtr.next();
+		if (prevchar != ';' && prevchar != '{' && prevchar != '}') {
+			hazard = true;
+		}
+		return hazard;
+	}
+
+	/**
+	 * Finds the last return statement from the given context
+	 * 
+	 * @param context
+	 *            the context
+	 * @return the index to beginning of the return statement
+	 */
+	int findLast(SourceContext context) {
+		String statement = SourceConstants.RETURN;
+		int retval = findLast(context, statement);
+		if (returnExtensions != null && returnExtensions.size() > 0) {
+			int res;
+			for (int i = 0; i < returnExtensions.size(); i++) {
+				res = findLast(context, returnExtensions.get(i));
+				if (res > retval) {
+					retval = res;
+				}
+			}
+		}
+		if (retval == -1) {
+			retval = context.getOffset() + context.getLength();
+		}
+		return retval;
+	}
+
+	/**
+	 * Finds the last return statement from the given context
+	 * 
+	 * @param context
+	 *            the context
+	 * @param statement
+	 *            the statement to be searched
+	 * @return the index to beginning of the return statement
+	 */
+	private int findLast(SourceContext context, String statement) {
+		// TODO: Backwards string search
+		int start = context.getOffset();
+		int end = start + context.getLength();
+		SourceSearch search = parser.startStringSearch(statement, start, end,
+				SourceParser.MATCH_WHOLE_WORD | SourceParser.SKIP_ALL);
+		int index = 0;
+		int retval = -1;
+		do {
+			index = search.findNext();
+			if (index != -1) {
+				retval = index;
+			}
+		} while (index != -1);
+		return retval;
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/FunctionReturnValueSearchData.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,47 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Parser for function return values
+*
+*/
+package com.nokia.tracecompiler.source;
+
+/**
+ * Parse data for function return value parser
+ * 
+ */
+final class FunctionReturnValueSearchData {
+
+	/**
+	 * Data index
+	 */
+	int index;
+
+	/**
+	 * Iterator
+	 */
+	SourceIterator itr;
+
+	/**
+	 * Return statement start offset
+	 */
+	int startOffset;
+
+	/**
+	 * Return statement end offset
+	 */
+	int endOffset;
+
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/OffsetLength.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,36 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Wrapper for offset and length
+*
+*/
+package com.nokia.tracecompiler.source;
+
+/**
+ * Wrapper for offset and length
+ * 
+ */
+public final class OffsetLength {
+
+	/**
+	 * Offset
+	 */
+	public int offset;
+
+	/**
+	 * Length
+	 */
+	public int length;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/ParsedType.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,52 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Interface for types parsed from source files
+*
+*/
+package com.nokia.tracecompiler.source;
+
+/**
+ * Interface for types parsed from source files
+ * 
+ */
+public interface ParsedType {
+
+	/**
+	 * Checks if parameter is pointer (*) or pointer reference (*&)
+	 * 
+	 * @return true if pointer, false if not
+	 */
+	public boolean isPointer();
+
+	/**
+	 * Checks if parameter type equals given type
+	 * 
+	 * @param type
+	 *            the type to be checked
+	 * @return true if types match
+	 */
+	public boolean typeEquals(String type);
+
+	/**
+	 * Checks if the type has the given qualifier
+	 * 
+	 * @param qualifier
+	 *            the qualifier to be checked
+	 * @return true if qualifier exists, false if not
+	 */
+	public boolean hasQualifier(String qualifier);
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/PositionArrayComparator.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,50 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Comparator for position arrays
+*
+*/
+package com.nokia.tracecompiler.source;
+
+import java.util.Comparator;
+
+/**
+ * Comparator for position arrays
+ * 
+ */
+public final class PositionArrayComparator implements
+		Comparator<SourceLocationBase> {
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
+	 */
+	public int compare(SourceLocationBase arrayElement, SourceLocationBase key) {
+		int retval;
+		if (key.getOffset() < arrayElement.getOffset()) {
+			// Start is inclusive
+			retval = 1;
+		} else if (key.getOffset() >= arrayElement.getOffset()
+				+ arrayElement.getLength()) {
+			// End is exclusive
+			retval = -1;
+		} else {
+			retval = 0;
+		}
+		return retval;
+	}
+
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/SourceConstants.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,445 @@
+/*
+* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Constants related to source files
+*
+*/
+package com.nokia.tracecompiler.source;
+
+/**
+ * Constants related to source files
+ * 
+ */
+public interface SourceConstants {
+
+	/**
+	 * Space character as string
+	 */
+	final String SPACE = " "; //$NON-NLS-1$
+
+	/**
+	 * Quote character as string
+	 */
+	final String QUOTE = "\""; //$NON-NLS-1$
+
+	/**
+	 * '\' character as string
+	 */
+	final String BACKSLASH = "\\"; //$NON-NLS-1$
+
+	/**
+	 * '_' character as string
+	 */
+	final String UNDERSCORE = "_"; //$NON-NLS-1$
+
+	/**
+	 * Double underscore for header guards
+	 */
+	final String DOUBLE_UNDERSCORE = "__"; //$NON-NLS-1$
+
+	/**
+	 * Semicolon character as string
+	 */
+	final String SEMICOLON = ";"; //$NON-NLS-1$
+
+	/**
+	 * Colon character as string
+	 */
+	final String COLON = ":"; //$NON-NLS-1$
+
+	/**
+	 * Period character as string
+	 */
+	final String PERIOD = "."; //$NON-NLS-1$
+
+	/**
+	 * Tilde character as string
+	 */
+	final String TILDE = "~"; //$NON-NLS-1$
+
+	/**
+	 * Opening brace as string
+	 */
+	final String OPENING_BRACE = "{"; //$NON-NLS-1$
+
+	/**
+	 * Closing brace as string
+	 */
+	final String CLOSING_BRACE = "}"; //$NON-NLS-1$
+
+	/**
+	 * Asterisk character
+	 */
+	final String ASTERISK = "*"; //$NON-NLS-1$
+
+	/**
+	 * Space character
+	 */
+	final char SPACE_CHAR = ' ';
+
+	/**
+	 * Colon character
+	 */
+	final char COLON_CHAR = ':';
+	
+	/**
+	 * Quote character
+	 */
+	final char QUOTE_CHAR = '\"';
+
+	/**
+	 * '\' character
+	 */
+	final char BACKSLASH_CHAR = '\\';
+
+	/**
+	 * '/' character
+	 */
+	final char FORWARD_SLASH_CHAR = '/';
+
+	/**
+	 * '_' character
+	 */
+	final char UNDERSCORE_CHAR = '_';
+
+	/**
+	 * '.' character
+	 */
+	final char PERIOD_CHAR = '.';
+
+	/**
+	 * Line separator
+	 */
+	final String LINE_FEED = System.getProperty("line.separator"); //$NON-NLS-1$
+
+	/**
+	 * Header extension (.h)
+	 */
+	final String HEADER_EXTENSION = ".h"; //$NON-NLS-1$
+
+	/**
+	 * #define
+	 */
+	final String DEFINE = "#define"; //$NON-NLS-1$
+
+	/**
+	 * #undef
+	 */
+	final String UNDEF = "#undef"; //$NON-NLS-1$
+
+	/**
+	 * #include
+	 */
+	final String INCLUDE = "#include"; //$NON-NLS-1$
+
+	/**
+	 * #ifdef
+	 */
+	final String IFDEF = "#ifdef"; //$NON-NLS-1$
+
+	/**
+	 * #ifndef
+	 */
+	final String IFNDEF = "#ifndef"; //$NON-NLS-1$
+
+	/**
+	 * #if
+	 */
+	final String IF = "#if"; //$NON-NLS-1$
+
+	/**
+	 * defined
+	 */
+	final String DEFINED = "defined"; //$NON-NLS-1$
+
+	/**
+	 * #else
+	 */
+	final String ELSE = "#else"; //$NON-NLS-1$
+
+	/**
+	 * #endif
+	 */
+	final String ENDIF = "#endif"; //$NON-NLS-1$
+
+	/**
+	 * Or
+	 */
+	final String OR = "||"; //$NON-NLS-1$
+
+	/**
+	 * Return statement
+	 */
+	final String RETURN = "return"; //$NON-NLS-1$
+
+	/**
+	 * One step up in path ("../")
+	 */
+	final String PATH_UP = "../"; //$NON-NLS-1$
+
+	/**
+	 * This path ("./")
+	 */
+	final String THIS_PATH = "./"; //$NON-NLS-1$
+
+	/**
+	 * inline
+	 */
+	final String INLINE = "inline"; //$NON-NLS-1$
+
+	/**
+	 * void
+	 */
+	final String VOID = "void"; //$NON-NLS-1$
+
+	/**
+	 * char
+	 */
+	final String CHAR = "char"; //$NON-NLS-1$
+
+	/**
+	 * short
+	 */
+	final String SHORT = "short"; //$NON-NLS-1$
+
+	/**
+	 * int
+	 */
+	final String INT = "int"; //$NON-NLS-1$
+
+	/**
+	 * long
+	 */
+	final String LONG = "long"; //$NON-NLS-1$
+
+	/**
+	 * unsigned
+	 */
+	final String UNSIGNED = "unsigned"; //$NON-NLS-1$
+
+	/**
+	 * Parameter type qualifier list
+	 */
+	final String[] PARAMETER_QUALIFIERS = { "const", //$NON-NLS-1$
+			"volatile", UNSIGNED }; //$NON-NLS-1$
+
+	/**
+	 * No parameters
+	 */
+	final String NO_PARAMETERS = "()"; //$NON-NLS-1$
+
+	/**
+	 * Start of parameters
+	 */
+	final String START_PARAMETERS = "( "; //$NON-NLS-1$
+
+	/**
+	 * Start of parameters with quote
+	 */
+	final String START_PARAMETERS_QUOTE = "( \""; //$NON-NLS-1$
+
+	/**
+	 * Closing parenthesis with non-quoted last parameter
+	 */
+	final String END_PARAMETERS = " )"; //$NON-NLS-1$
+
+	/**
+	 * Closing parenthesis with quoted last parameter
+	 */
+	final String END_PARAMETERS_QUOTE = "\" )"; //$NON-NLS-1$
+
+	/**
+	 * Separator between end of quoted parameter and start of non-quoted
+	 * parameter
+	 */
+	final String QUOTE_PARAMETER_SEPARATOR = "\", "; //$NON-NLS-1$
+
+	/**
+	 * Separator between two parameters without quotes
+	 */
+	final String PARAMETER_SEPARATOR = ", "; //$NON-NLS-1$
+
+	/**
+	 * Separator within for
+	 */
+	final String FOR_SEPARATOR = "; "; //$NON-NLS-1$
+
+	/**
+	 * Separator between end of non-quoted parameter and start of quoted
+	 * parameter
+	 */
+	final String PARAMETER_SEPARATOR_QUOTE = ", \""; //$NON-NLS-1$
+
+	/**
+	 * if and the opening parenthesis
+	 */
+	final String START_IF = "if ( "; //$NON-NLS-1$
+
+	/**
+	 * Sizeof and the opening parenthesis
+	 */
+	final String START_SIZEOF = "sizeof ( "; //$NON-NLS-1$
+
+	/**
+	 * for and the opening parenthesis
+	 */
+	final String START_FOR = "for ( "; //$NON-NLS-1$
+
+	/**
+	 * Assignment operation with spaces
+	 */
+	final String ASSIGN_WITH_SPACES = " = "; //$NON-NLS-1$
+
+	/**
+	 * Assignment operation with out spaces
+	 */
+	final String ASSIGN_WITH_OUT_SPACES = "="; //$NON-NLS-1$
+	
+	/**
+	 * Less of equals for if-statements
+	 */
+	final String LESS_OR_EQUAL_THAN = " <= "; //$NON-NLS-1$
+
+	/**
+	 * Less for if statements
+	 */
+	final String LESS_THAN = " < "; //$NON-NLS-1$
+
+	/**
+	 * Starting bracket for array
+	 */
+	final String START_ARRAY = "[ "; //$NON-NLS-1$
+
+	/**
+	 * Ending bracket for array
+	 */
+	final String END_ARRAY = " ]"; //$NON-NLS-1$
+
+	/**
+	 * Pointer and space
+	 */
+	final String POINTER = "* "; //$NON-NLS-1$
+
+	/**
+	 * Add operation with spaces
+	 */
+	final String ADD = " + "; //$NON-NLS-1$
+
+	/**
+	 * Modulo operation with spaces
+	 */
+	final String MOD = " % "; //$NON-NLS-1$
+
+	/**
+	 * Subtract with assignment
+	 */
+	final String SUBTRACT_ASSIGN = " -= "; //$NON-NLS-1$
+
+	/**
+	 * Add with assignment
+	 */
+	final String ADD_ASSIGN = " += "; //$NON-NLS-1$
+
+	/**
+	 * Not equal check
+	 */
+	final String NOT_EQUALS = " != "; //$NON-NLS-1$
+
+	/**
+	 * Equal check
+	 */
+	final String EQUALS = " == "; //$NON-NLS-1$
+
+	/**
+	 * Increment operation
+	 */
+	final String INCREMENT = "++"; //$NON-NLS-1$
+
+	/**
+	 * Subtract operation with spaces
+	 */
+	final String SUBTRACT = " - "; //$NON-NLS-1$
+
+	/**
+	 * class
+	 */
+	final String CLASS = "class"; //$NON-NLS-1$
+
+	/**
+	 * public
+	 */
+	final String PUBLIC = "public"; //$NON-NLS-1$
+
+	/**
+	 * private
+	 */
+	final String PRIVATE = "private"; //$NON-NLS-1$
+
+	/**
+	 * Prefix for hex numbers
+	 */
+	final String HEX_PREFIX = "0x"; //$NON-NLS-1$
+
+	/**
+	 * Prefix for hex numbers, upper case
+	 */
+	final String HEX_PREFIX_U = "0X"; //$NON-NLS-1$
+
+	/**
+	 * Prefix for octal numbers
+	 */
+	final String OCTAL_PREFIX = "0"; //$NON-NLS-1$
+
+	/**
+	 * 64-bit integer postfix
+	 */
+	final String I64_POSTFIX = "i64"; //$NON-NLS-1$
+
+	/**
+	 * Size of long integer
+	 */
+	final int LONG_SIZE = 64; // CodForChk_Dis_Magic
+
+	/**
+	 * Size of integer
+	 */
+	final int INT_SIZE = 32; // CodForChk_Dis_Magic
+
+	/**
+	 * Size of short
+	 */
+	final int SHORT_SIZE = 16; // CodForChk_Dis_Magic
+
+	/**
+	 * Size of byte
+	 */
+	final int BYTE_SIZE = 8; // CodForChk_Dis_Magic
+
+	/**
+	 * Array type prefix
+	 */
+	final String OST_ARRAY_TYPE_PREFIX = "const TOstArray< "; //$NON-NLS-1$
+
+	/**
+	 * Array type postfix
+	 */
+	final String OST_ARRAY_TYPE_POSTFIX = " >&"; //$NON-NLS-1$
+	
+	/**
+	 * Variable argument list indicator
+	 */
+	final String VARIABLE_ARG_LIST_INDICATOR = "..."; //$NON-NLS-1$
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/SourceContext.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,320 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Source context is a representation of a range of source code
+*
+*/
+package com.nokia.tracecompiler.source;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+
+/**
+ * Source context is a representation of a range of source code. For example a
+ * function in source code could be represented with a context that has the name
+ * of the function
+ * 
+ */
+public class SourceContext extends SourceLocationBase implements ParsedType {
+
+	/**
+	 * No proposal
+	 */
+	public static final int NONE = 0; // CodForChk_Dis_Magic
+
+	/**
+	 * Start of function proposal type
+	 */
+	public static final int START_OF_FUNCTION = 1; // CodForChk_Dis_Magic
+
+	/**
+	 * End of function proposal type
+	 */
+	public static final int END_OF_FUNCTION = 2; // CodForChk_Dis_Magic
+
+	/**
+	 * Full selection proposal type
+	 */
+	public static final int FULL_SELECTION = 3; // CodForChk_Dis_Magic
+
+	/**
+	 * Class name
+	 */
+	private String className;
+
+	/**
+	 * Function name
+	 */
+	private String functionName;
+
+	/**
+	 * Index to start of parameters
+	 */
+	private int parameterStart;
+
+	/**
+	 * List of return types
+	 */
+	private ArrayList<String> returnTypes;
+
+	/**
+	 * Creates a new SourceContext starting from given offset
+	 * 
+	 * @param parser
+	 *            the parser owning this context
+	 * @param offset
+	 *            the offset
+	 */
+	SourceContext(SourceParser parser, int offset) {
+		super(parser, offset);
+	}
+
+	/**
+	 * Gets the class name of this context
+	 * 
+	 * @return the class name
+	 */
+	public String getClassName() {
+		return className;
+	}
+
+	/**
+	 * Gets the function name of this context
+	 * 
+	 * @return the function name
+	 */
+	public String getFunctionName() {
+		return functionName;
+	}
+
+	/**
+	 * Sets the class name. If the class name contains pointer or reference
+	 * characters, they are added to the return statements list
+	 * 
+	 * @param name
+	 *            the new class name
+	 */
+	void setClassName(String name) {
+		className = removePtrAndRef(name);
+	}
+
+	/**
+	 * Sets the function name. If the function name contains pointer or
+	 * reference characters, they are added to the return statements list
+	 * 
+	 * @param name
+	 *            the new function name
+	 */
+	void setFunctionName(String name) {
+		functionName = removePtrAndRef(name);
+	}
+
+	/**
+	 * Removes the * and & characters from the given tag and adds them as return
+	 * modifiers
+	 * 
+	 * @param name
+	 *            the name
+	 * @return the name with * and & removed
+	 */
+	private String removePtrAndRef(String name) {
+		String retval = name;
+		if (name != null) {
+			int start = 0;
+			int end = name.length();
+			boolean found = true;
+			while (start < end && found) {
+				char c = name.charAt(start);
+				if (c == '*' || c == '&') {
+					addReturnModifier(c);
+					start++;
+				} else {
+					found = false;
+				}
+			}
+			found = true;
+			while (end > start && found) {
+				char c = name.charAt(end - 1);
+				if (c == '*' || c == '&') {
+					addReturnModifier(c);
+					end--;
+				} else {
+					found = false;
+				}
+			}
+			retval = name.substring(start, end);
+		}
+		return retval;
+	}
+
+	/**
+	 * Sets the index for start of parameters
+	 * 
+	 * @param index
+	 *            the index
+	 */
+	void setParametersStartIndex(int index) {
+		parameterStart = index;
+	}
+
+	/**
+	 * Adds a return type string to the context
+	 * 
+	 * @param type
+	 *            the return type
+	 */
+	void addReturnType(String type) {
+		// Constructors and destructor do not have return types
+		if (className != null && functionName!= null && !className.equals(functionName)
+				&& !functionName.equals(SourceConstants.TILDE + className)) {
+			type = removePtrAndRef(type);
+			if (type.length() > 0) {
+				if (returnTypes == null) {
+					returnTypes = new ArrayList<String>();
+				}
+				returnTypes.add(type);
+			}
+		}
+	}
+
+	/**
+	 * Adds a return type modifier to the list of return types
+	 * 
+	 * @param c
+	 *            the modifier
+	 */
+	private void addReturnModifier(char c) {
+		if (returnTypes == null) {
+			returnTypes = new ArrayList<String>();
+		}
+		returnTypes.add(String.valueOf(c));
+	}
+
+	/**
+	 * Gets the return types of this context
+	 * 
+	 * @return the return types
+	 */
+	Iterator<String> getReturnTypes() {
+		List<String> list;
+		if (returnTypes != null) {
+			list = returnTypes;
+		} else {
+			list = Collections.emptyList();
+		}
+		return list.iterator();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.source.ParsedType#hasQualifier(java.lang.String)
+	 */
+	public boolean hasQualifier(String type) {
+		// All types and qualifiers are in the returnTypes list
+		return typeEquals(type);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.source.ParsedType#typeEquals(java.lang.String)
+	 */
+	public boolean typeEquals(String type) {
+		return (returnTypes != null && returnTypes.contains(type));
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.source.ParsedType#isPointer()
+	 */
+	public boolean isPointer() {
+		boolean retval = false;
+		if (returnTypes != null) {
+			for (int i = 0; i < returnTypes.size() && !retval; i++) {
+				if (returnTypes.get(i).equals(SourceConstants.ASTERISK)) {
+					retval = true;
+				}
+			}
+		}
+		return retval;
+	}
+
+	/**
+	 * Checks if return types list contains "void"
+	 * 
+	 * @return true if void, false if not
+	 */
+	public boolean isVoid() {
+		return (returnTypes == null || returnTypes
+				.contains(SourceConstants.VOID));
+	}
+
+	/**
+	 * Parses the parameters of this source context
+	 * 
+	 * @param parameterList
+	 *            the list where the parameters are stored
+	 * @throws SourceParserException
+	 *             if parsing fails
+	 */
+	public void parseParameters(List<SourceParameter> parameterList)
+			throws SourceParserException {
+		if (getParser() != null) {
+			getParser().parseFunctionParameters(parameterStart, parameterList);
+		} else {
+			throw new SourceParserException(
+					SourceErrorCodes.CONTEXT_MISSING_OWNER);
+		}
+	}
+
+	/**
+	 * Parses the return statements of this source context
+	 * 
+	 * @param returnList
+	 *            the list where the return values are stored
+	 * @throws SourceParserException
+	 *             if parsing fails
+	 */
+	public void parseReturnValues(List<SourceReturn> returnList)
+			throws SourceParserException {
+		if (getParser() != null) {
+			getParser().parseReturnValues(this, returnList);
+		} else {
+			throw new SourceParserException(
+					SourceErrorCodes.CONTEXT_MISSING_OWNER);
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.lang.Object#toString()
+	 */
+	@Override
+	public String toString() {
+		StringBuffer sb = new StringBuffer();
+		if (className != null) {
+			sb.append(getClassName());
+		}
+		sb.append("::"); //$NON-NLS-1$
+		sb.append(getFunctionName());
+		return sb.toString();
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/SourceDocumentFactory.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,50 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Interface to be implemented by document framework
+*
+*/
+package com.nokia.tracecompiler.source;
+
+/**
+ * Interface to be implemented by document framework
+ * 
+ */
+public interface SourceDocumentFactory {
+
+	/**
+	 * Creates a new location
+	 * 
+	 * @param base
+	 *            the location which owns the position
+	 * @param offset
+	 *            the position offset
+	 * @param length
+	 *            the position length
+	 * @return the location
+	 */
+	public SourceLocationInterface createLocation(SourceLocationBase base,
+			int offset, int length);
+
+	/**
+	 * Creates a new document
+	 * 
+	 * @param sourceData
+	 *            the document data
+	 * @return the document
+	 */
+	public SourceDocumentInterface createDocument(String sourceData);
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/SourceDocumentInterface.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,123 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Source document abstraction
+*
+*/
+package com.nokia.tracecompiler.source;
+
+/**
+ * Source document abstraction
+ * 
+ */
+public interface SourceDocumentInterface {
+
+	/**
+	 * Gets the property provider interface. This can return null if the
+	 * document framework does not support source properties
+	 * 
+	 * @return the property provider
+	 */
+	public SourcePropertyProvider getPropertyProvider();
+
+	/**
+	 * Gets a subset of document data
+	 * 
+	 * @param start
+	 *            the start offset
+	 * @param length
+	 *            the data length
+	 * @return the data
+	 * @throws SourceParserException
+	 *             if parameters are not valid
+	 */
+	public String get(int start, int length) throws SourceParserException;
+
+	/**
+	 * Gets a character
+	 * 
+	 * @param offset
+	 *            the offset
+	 * @return the character
+	 * @throws SourceParserException
+	 *             if offset is not valid
+	 */
+	public char getChar(int offset) throws SourceParserException;
+
+	/**
+	 * Gets the data length
+	 * 
+	 * @return the length
+	 */
+	public int getLength();
+
+	/**
+	 * Maps an offset to line number
+	 * 
+	 * @param offset
+	 *            the offset
+	 * @return the line number
+	 * @throws SourceParserException
+	 *             if offset is not valid
+	 */
+	public int getLineOfOffset(int offset) throws SourceParserException;
+
+	/**
+	 * Replaces data from the document
+	 * 
+	 * @param offset
+	 *            offset to removed data
+	 * @param length
+	 *            length of removed data
+	 * @param newText
+	 *            new data
+	 * @throws SourceParserException
+	 *             if parameters are not valid
+	 */
+	public void replace(int offset, int length, String newText)
+			throws SourceParserException;
+
+	/**
+	 * Adds a location to this source.
+	 * 
+	 * @param location
+	 *            the location to be added
+	 */
+	public void addLocation(SourceLocationInterface location);
+
+	/**
+	 * Removes a location from this source.
+	 * 
+	 * @param location
+	 *            the location to be removed
+	 */
+	public void removeLocation(SourceLocationInterface location);
+
+	/**
+	 * Gets the owner of this source
+	 * 
+	 * @return the owner
+	 */
+	public Object getOwner();
+
+	/**
+	 * Sets the owner of this source
+	 * 
+	 * @param owner
+	 *            the owner
+	 */
+	public void setOwner(Object owner);
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/SourceDocumentMonitor.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,50 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Monitor for source files
+*
+*/
+package com.nokia.tracecompiler.source;
+
+/**
+ * Monitor for source files
+ * 
+ */
+public interface SourceDocumentMonitor extends
+		Iterable<SourceDocumentInterface> {
+
+	/**
+	 * Gets a document factory, which is shared between all documents created
+	 * into this monitor
+	 * 
+	 * @return the factory
+	 */
+	public SourceDocumentFactory getFactory();
+
+	/**
+	 * Starts the monitor
+	 * 
+	 * @param processor
+	 *            document processor callback
+	 * @throws Exception 
+	 */
+	public void startMonitor(SourceDocumentProcessor processor) throws Exception;
+
+	/**
+	 * Stops the monitor
+	 */
+	public void stopMonitor();
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/SourceDocumentProcessor.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,37 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Document processor interface
+*
+*/
+package com.nokia.tracecompiler.source;
+
+import com.nokia.tracecompiler.model.TraceCompilerException;
+
+/**
+ * Document processor interface
+ * 
+ */
+public interface SourceDocumentProcessor {
+
+	/**
+	 * Notification about source opened
+	 * 
+	 * @param document
+	 *            the document
+	 * @throws TraceCompilerException 
+	 */
+	public void sourceOpened(SourceDocumentInterface document) throws TraceCompilerException;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/SourceErrorCodes.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,63 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Error codes for source parser
+*
+*/
+package com.nokia.tracecompiler.source;
+
+/**
+ * Error codes for source parser
+ * 
+ */
+public interface SourceErrorCodes {
+
+	/**
+	 * Something unexpected happened while parsing source. This should be
+	 * asserted
+	 */
+	int UNEXPECTED_EXCEPTION = 0; // CodForChk_Dis_Magic
+
+	/**
+	 * Missing owner from source context. This should be asserted
+	 */
+	int CONTEXT_MISSING_OWNER = 1; // CodForChk_Dis_Magic
+
+	/**
+	 * Unexpected separator while parsing parameters
+	 */
+	int UNEXPECTED_PARAMETER_SEPARATOR = 2; // CodForChk_Dis_Magic
+
+	/**
+	 * Unexpected end of file while parsing
+	 */
+	int UNEXPECTED_END_OF_FILE = 3; // CodForChk_Dis_Magic
+
+	/**
+	 * Unexpected quote character was encountered
+	 */
+	int UNEXPECTED_QUOTE_CHARACTER = 4; // CodForChk_Dis_Magic
+
+	/**
+	 * Bracket mismatch
+	 */
+	int BRACKET_MISMATCH = 5; // CodForChk_Dis_Magic
+
+	/**
+	 * Offset / length was not valid
+	 */
+	int BAD_LOCATION = 6; // CodForChk_Dis_Magic
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/SourceExcludedArea.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,81 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Comment or string ares are added to the excluded list
+*
+*/
+package com.nokia.tracecompiler.source;
+
+/**
+ * Comment or string ares are added to the excluded list
+ * 
+ */
+public class SourceExcludedArea extends SourceLocationBase {
+
+	/**
+	 * Line comment type
+	 */
+	public static final int LINE_COMMENT = 1; // CodForChk_Dis_Magic
+
+	/**
+	 * Multiline comment type
+	 */
+	public static final int MULTILINE_COMMENT = 2; // CodForChk_Dis_Magic
+
+	/**
+	 * String type
+	 */
+	public static final int STRING = 3; // CodForChk_Dis_Magic
+
+	/**
+	 * Character type
+	 */
+	public static final int CHARACTER = 4; // CodForChk_Dis_Magic
+
+	/**
+	 * Preprocessor definition area
+	 */
+	public static final int PREPROCESSOR_DEFINITION = 5; // CodForChk_Dis_Magic
+
+	/**
+	 * Type of area
+	 */
+	private int type;
+
+	/**
+	 * Constructor
+	 * 
+	 * @param parser
+	 *            the parser where this area belongs
+	 * @param offset
+	 *            offset to the area
+	 * @param type
+	 *            type of area
+	 */
+	SourceExcludedArea(SourceParser parser, int offset, int type) {
+		super(parser, offset);
+		this.type = type;
+	}
+
+	/**
+	 * Gets the type of this area
+	 * 
+	 * @return the type
+	 */
+	public int getType() {
+		return type;
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/SourceIterator.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,352 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* SourceIterator can be used to traverse through the source file character at a time
+*
+*/
+package com.nokia.tracecompiler.source;
+
+/**
+ * SourceIterator can be used to traverse through the source file character at a
+ * time.
+ * 
+ */
+public class SourceIterator {
+
+	/**
+	 * The source parser
+	 */
+	private SourceParser parser;
+
+	/**
+	 * Index of next excluded area
+	 */
+	private int nextExcludedIndex;
+
+	/**
+	 * The type of next excluded area
+	 */
+	private int nextExcludedAreaType;
+
+	/**
+	 * Offset to the start of next excluded area
+	 */
+	private int nextExcludedStart;
+
+	/**
+	 * Offset to the end of next excluded area
+	 */
+	private int nextExcludedEnd;
+
+	/**
+	 * Index of next character to be fetched
+	 */
+	private int nextIndex;
+
+	/**
+	 * Index of character returned by latest call to next
+	 */
+	private int currentIndex;
+
+	/**
+	 * Index of character returned by previous call to next
+	 */
+	private int previousIndex;
+
+	/**
+	 * Search flags
+	 */
+	private int flags;
+
+	/**
+	 * Constructor
+	 * 
+	 * @param parser
+	 *            source parser
+	 * @param startIndex
+	 *            the index where to start
+	 * @param flags
+	 *            the iterator flags
+	 */
+	SourceIterator(SourceParser parser, int startIndex, int flags) {
+		SourceDocumentInterface source = parser.getSource();
+		if (startIndex >= source.getLength()
+				&& ((flags & SourceParser.BACKWARD_SEARCH) != 0)) {
+			nextIndex = source.getLength() - 1;
+		} else {
+			nextIndex = startIndex;
+		}
+		this.parser = parser;
+		this.flags = flags;
+		if (hasNext()) {
+			boolean forward = (flags & SourceParser.BACKWARD_SEARCH) == 0;
+			nextExcludedIndex = parser.findExcludedAreaIndex(nextIndex);
+			if (nextExcludedIndex < 0) {
+				nextExcludedIndex = -1 - nextExcludedIndex;
+				if (forward) {
+					// Update increments the index, so it must be moved behind
+					// the start of search
+					nextExcludedIndex--;
+				}
+			}
+			// Increments / decrements the next excluded area according to
+			// search direction. If direction is backward, this decrements the
+			// index. In that case the above initialization has selected the
+			// index after the start of search index. If direction is forward,
+			// this increments the index.
+			updateExcludedIndex();
+			// After the excluded index has been set, the white spaces and
+			// comments are skipped
+			if (forward) {
+				forwardSeekNext();
+			} else {
+				backwardSeekNext();
+			}
+			previousIndex = startIndex;
+			currentIndex = startIndex;
+		}
+	}
+
+	/**
+	 * Determines if there are more characters to process
+	 * 
+	 * @return true if iterator has more characters
+	 */
+	public boolean hasNext() {
+		return (flags & SourceParser.BACKWARD_SEARCH) == 0 ? nextIndex < parser
+				.getSource().getLength() : nextIndex >= 0;
+	}
+
+	/**
+	 * Gets the next character from this iterator
+	 * 
+	 * @return the next character
+	 * @throws SourceParserException
+	 *             if there are no more characters
+	 */
+	public char next() throws SourceParserException {
+		char ret;
+		previousIndex = currentIndex;
+		currentIndex = nextIndex;
+		if ((flags & SourceParser.BACKWARD_SEARCH) == 0) {
+			ret = forwardNext();
+		} else {
+			ret = backwardNext();
+		}
+		return ret;
+	}
+
+	/**
+	 * Returns next character moving forward
+	 * 
+	 * @return the character
+	 * @throws SourceParserException
+	 *             if there are no more characters
+	 */
+	private char forwardNext() throws SourceParserException {
+		char c = parser.getSource().getChar(nextIndex);
+		nextIndex++;
+		forwardSeekNext();
+		return c;
+	}
+
+	/**
+	 * Skips to next index
+	 */
+	private void forwardSeekNext() {
+		// Skips over the excluded area if the index enters one
+		boolean didSkip;
+		SourceDocumentInterface source = parser.getSource();
+		try {
+			do {
+				didSkip = false;
+				if (nextIndex >= nextExcludedStart && nextExcludedStart != -1) {
+					// Skips if applicable. Otherwise just updates the next
+					// excluded
+					// area variables
+					if (isExcluded()) {
+						nextIndex = nextExcludedEnd;
+					}
+					updateExcludedIndex();
+				}
+				if ((flags & SourceParser.SKIP_WHITE_SPACES) != 0) {
+					// Skips over white spaces
+					boolean wspFound = true;
+					do {
+						// If a white space is skipped, the excluded area check
+						// needs to be done again. didSkip flag controls that
+						if (nextIndex < source.getLength()
+								&& Character.isWhitespace(source
+										.getChar(nextIndex))) {
+							nextIndex++;
+							didSkip = true;
+						} else {
+							wspFound = false;
+						}
+					} while (wspFound);
+				}
+			} while (didSkip);
+		} catch (SourceParserException e) {
+			// The exception must not be thrown out of this function
+		}
+	}
+
+	/**
+	 * Returns next character moving backward
+	 * 
+	 * @return the character
+	 * @throws SourceParserException
+	 *             if there are no more characters
+	 */
+	private char backwardNext() throws SourceParserException {
+		char c = parser.getSource().getChar(nextIndex);
+		nextIndex--;
+		backwardSeekNext();
+		return c;
+	}
+
+	/**
+	 * Skips to previous index
+	 */
+	private void backwardSeekNext() {
+		// Skips over the excluded area if the index enters one
+		boolean didSkip;
+		SourceDocumentInterface source = parser.getSource();
+		try {
+			do {
+				didSkip = false;
+				if (nextIndex <= nextExcludedEnd - 1) {
+					// Skips if applicable. Otherwise just updates the next
+					// excluded
+					// area variables
+					if (isExcluded()) {
+						nextIndex = nextExcludedStart - 1;
+					}
+					updateExcludedIndex();
+				}
+				if ((flags & SourceParser.SKIP_WHITE_SPACES) != 0) {
+					boolean wspFound = true;
+					do {
+						// If a white space is skipped, the excluded area check
+						// needs to be done again. didSkip flag controls that
+						if (nextIndex >= 0
+								&& Character.isWhitespace(source
+										.getChar(nextIndex))) {
+							nextIndex--;
+							didSkip = true;
+						} else {
+							wspFound = false;
+						}
+					} while (wspFound);
+				}
+			} while (didSkip);
+		} catch (SourceParserException e) {
+			// The exception must not be thrown out of this function
+		}
+	}
+
+	/**
+	 * Updates the excluded area index
+	 */
+	private void updateExcludedIndex() {
+		if ((flags & SourceParser.BACKWARD_SEARCH) == 0) {
+			nextExcludedIndex++;
+		} else {
+			nextExcludedIndex--;
+		}
+		// Updates the values using the next excluded area
+		if (nextExcludedIndex >= 0
+				&& nextExcludedIndex < parser.getExcludedAreas().size()) {
+			SourceExcludedArea p = parser.getExcludedAreas().get(
+					nextExcludedIndex);
+			nextExcludedStart = p.getOffset();
+			nextExcludedEnd = p.getOffset() + p.getLength();
+			nextExcludedAreaType = p.getType();
+		} else {
+			nextExcludedStart = -1;
+			nextExcludedEnd = -1;
+		}
+	}
+
+	/**
+	 * Returns the index where the next character will be fetched
+	 * 
+	 * @return the index
+	 */
+	public int nextIndex() {
+		return nextIndex;
+	}
+
+	/**
+	 * Gets the index of the character returned by last call to next
+	 * 
+	 * @return the index
+	 */
+	public int currentIndex() {
+		return currentIndex;
+	}
+
+	/**
+	 * Gets the index that preceeded the latest call to next
+	 * 
+	 * @return the index
+	 */
+	public int previousIndex() {
+		return previousIndex;
+	}
+
+	/**
+	 * Gets the next character but does not move the iterator
+	 * 
+	 * @return the next character
+	 * @throws SourceParserException
+	 *             if there are no more characters
+	 */
+	public char peek() throws SourceParserException {
+		return parser.getSource().getChar(nextIndex);
+	}
+
+	/**
+	 * Determines if the iterator skipped over characters during last call to
+	 * next
+	 * 
+	 * @return true if skipped, false otherwise
+	 */
+	public boolean hasSkipped() {
+		return (flags & SourceParser.BACKWARD_SEARCH) == 0 ? currentIndex > previousIndex + 1
+				: currentIndex < previousIndex - 1;
+	}
+
+	/**
+	 * Checks if the next area is skipped
+	 * 
+	 * @return true is skipped
+	 */
+	private boolean isExcluded() {
+		return isExcluded(nextExcludedAreaType);
+	}
+
+	/**
+	 * Checks if the given type is skipped
+	 * 
+	 * @param type
+	 *            the type
+	 * @return true is skipped
+	 */
+	private boolean isExcluded(int type) {
+		return SourceParser.isExcluded(type, flags);
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/SourceLocation.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,184 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Represents a location in source
+*
+*/
+package com.nokia.tracecompiler.source;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+
+/**
+ * Represents a location in source
+ * 
+ */
+public class SourceLocation extends SourceLocationBase {
+
+	/**
+	 * Location listeners
+	 */
+	private ArrayList<SourceLocationListener> locationListeners;
+
+	/**
+	 * Temporary array for callback purposes. Prevents concurrent modifications
+	 * if listeners are removed during a callback
+	 */
+	private ArrayList<SourceLocationListener> tempListeners;
+
+	/**
+	 * Reference count
+	 */
+	private int refCount = 0;
+
+	/**
+	 * Listener change flag
+	 */
+	private boolean listenersChanged = true;
+
+	/**
+	 * Constructor
+	 * 
+	 * @param parser
+	 *            the parser owning this location
+	 * @param offset
+	 *            offset of location
+	 * @param length
+	 *            length of location
+	 */
+	public SourceLocation(SourceParser parser, int offset, int length) {
+		super(parser, offset, length);
+		parser.addLocation(this);
+		refCount = 1;
+	}
+
+	/**
+	 * Gets the name of the class which owns this location
+	 * 
+	 * @return the class name
+	 */
+	public String getClassName() {
+		String retval = null;
+		if (getParser() != null) {
+			SourceContext context = getParser().getContext(getOffset());
+			if (context != null) {
+				retval = context.getClassName();
+			}
+		}
+		return retval;
+	}
+
+	/**
+	 * Gets the name of function which owns this location
+	 * 
+	 * @return the function name
+	 */
+	public String getFunctionName() {
+		String retval = null;
+		if (getParser() != null) {
+			SourceContext context = getParser().getContext(getOffset());
+			if (context != null) {
+				retval = context.getFunctionName();
+			}
+		}
+		return retval;
+	}
+
+	/**
+	 * Adds a location listener to this location
+	 * 
+	 * @param listener
+	 *            the location listener
+	 */
+	public void addLocationListener(SourceLocationListener listener) {
+		if (locationListeners == null) {
+			locationListeners = new ArrayList<SourceLocationListener>();
+		}
+		locationListeners.add(listener);
+		listenersChanged = true;
+	}
+
+	/**
+	 * Removes a location listener from this location
+	 * 
+	 * @param listener
+	 *            the location listener
+	 */
+	public void removeLocationListener(SourceLocationListener listener) {
+		if (locationListeners != null) {
+			if (locationListeners.remove(listener)) {
+				listenersChanged = true;
+			}
+		}
+	}
+
+	/**
+	 * Gets the listener interfaces
+	 * 
+	 * @return the listeners
+	 */
+	protected Iterator<SourceLocationListener> getListeners() {
+		List<SourceLocationListener> list;
+		if (locationListeners != null) {
+			if (listenersChanged) {
+				listenersChanged = false;
+				if (tempListeners == null) {
+					tempListeners = new ArrayList<SourceLocationListener>();
+				}
+				tempListeners.clear();
+				tempListeners.addAll(locationListeners);
+			}
+			list = tempListeners;
+		} else {
+			list = Collections.emptyList();
+		}
+		return list.iterator();
+	}
+
+	/**
+	 * Increases the reference count of this location.
+	 * 
+	 * @see #dereference()
+	 */
+	public void reference() {
+		refCount++;
+	}
+
+	/**
+	 * Decrements the reference count of this location. When reference count is
+	 * 0, this is removed from source. Note that a location can also be removed
+	 * from source even if it has outstanding references left. In that case it
+	 * can no longer be selected.
+	 */
+	public void dereference() {
+		if (--refCount <= 0) {
+			removeFromSource();
+		}
+	}
+
+	/**
+	 * Removes this location from the source
+	 */
+	private void removeFromSource() {
+		delete();
+		if (getParser() != null) {
+			getParser().removeLocation(this);
+			resetParser();
+		}
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/SourceLocationBase.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,215 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Base class for locations
+*
+*/
+package com.nokia.tracecompiler.source;
+
+/**
+ * Base class for locations
+ * 
+ */
+public class SourceLocationBase {
+
+	/**
+	 * Source parser
+	 */
+	private SourceParser parser;
+
+	/**
+	 * Position abstraction
+	 */
+	private SourceLocationInterface position;
+
+	/**
+	 * Line number is cached and updated when changes occur
+	 */
+	private int currentLine = -1;
+
+	/**
+	 * Constructor
+	 * 
+	 * @param parser
+	 *            the source parser
+	 * @param offset
+	 *            the offset to the location
+	 */
+	protected SourceLocationBase(SourceParser parser, int offset) {
+		this.parser = parser;
+		position = parser.getDocumentFramework()
+				.createLocation(this, offset, 0);
+	}
+
+	/**
+	 * Constructor
+	 * 
+	 * @param parser
+	 *            the source parser
+	 * @param offset
+	 *            the offset to the location
+	 * @param length
+	 *            the location length
+	 */
+	protected SourceLocationBase(SourceParser parser, int offset, int length) {
+		this.parser = parser;
+		position = parser.getDocumentFramework().createLocation(this, offset,
+				length);
+	}
+
+	/**
+	 * Gets the offset
+	 * 
+	 * @return offset
+	 */
+	public final int getOffset() {
+		return position.getOffset();
+	}
+
+	/**
+	 * Sets the offset
+	 * 
+	 * @param offset
+	 *            new offset
+	 */
+	public final void setOffset(int offset) {
+		position.setOffset(offset);
+	}
+
+	/**
+	 * Gets the length
+	 * 
+	 * @return length
+	 */
+	public final int getLength() {
+		return position.getLength();
+	}
+
+	/**
+	 * Sets the length
+	 * 
+	 * @param length
+	 *            the length
+	 */
+	public final void setLength(int length) {
+		position.setLength(length);
+	}
+
+	/**
+	 * Returns deleted flag
+	 * 
+	 * @return the flag
+	 */
+	public final boolean isDeleted() {
+		return position.isDeleted();
+	}
+
+	/**
+	 * Sets the deleted flag
+	 */
+	public final void delete() {
+		position.delete();
+	}
+
+	/**
+	 * Gets the location interface
+	 * 
+	 * @return the location interface
+	 */
+	final SourceLocationInterface getLocation() {
+		return position;
+	}
+
+	/**
+	 * Gets the source parser
+	 * 
+	 * @return the parser
+	 */
+	public SourceParser getParser() {
+		return parser;
+	}
+
+	/**
+	 * Resets the source parser
+	 */
+	protected void resetParser() {
+		parser = null;
+	}
+
+	/**
+	 * Gets the line number of this location
+	 * 
+	 * @return line number
+	 */
+	public int getLineNumber() {
+		// Line number is set to -1 when notifyUpdate is called
+		if (parser != null) {
+			if (currentLine == -1) {
+				currentLine = parser.getLineNumber(getOffset());
+			}
+		} else {
+			currentLine = -1;
+		}
+		return currentLine;
+	}
+
+	/**
+	 * Resets the line number
+	 */
+	protected void resetLineNumber() {
+		currentLine = -1;
+	}
+
+	/**
+	 * Gets the source file name
+	 * 
+	 * @return the file name
+	 */
+	public String getFileName() {
+		String retval = null;
+		if (parser != null) {
+			SourceDocumentInterface owner = parser.getSource();
+			if (owner != null) {
+				SourcePropertyProvider propertyProvider = owner
+						.getPropertyProvider();
+				if (propertyProvider != null) {
+					retval = propertyProvider.getFileName();
+				}
+			}
+		}
+		return retval;
+	}
+
+	/**
+	 * Gets the source file path
+	 * 
+	 * @return the path
+	 */
+	public String getFilePath() {
+		String retval = null;
+		if (parser != null) {
+			SourceDocumentInterface owner = parser.getSource();
+			if (owner != null) {
+				SourcePropertyProvider propertyProvider = owner
+						.getPropertyProvider();
+				if (propertyProvider != null) {
+					retval = propertyProvider.getFilePath();
+				}
+			}
+		}
+		return retval;
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/SourceLocationInterface.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,69 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Interface which abstracts the underlying position framework
+*
+*/
+package com.nokia.tracecompiler.source;
+
+/**
+ * Interface which abstracts the underlying position framework
+ * 
+ */
+public interface SourceLocationInterface {
+
+	/**
+	 * Gets the offset of the location
+	 * 
+	 * @return the offset
+	 */
+	int getOffset();
+
+	/**
+	 * Sets the offset
+	 * 
+	 * @param offset
+	 *            the new offset
+	 */
+	void setOffset(int offset);
+
+	/**
+	 * Gets the length of the location
+	 * 
+	 * @return the length
+	 */
+	int getLength();
+
+	/**
+	 * Sets the length
+	 * 
+	 * @param length
+	 *            the length
+	 */
+	void setLength(int length);
+
+	/**
+	 * Checks if the location has been deleted
+	 * 
+	 * @return true if deleted
+	 */
+	boolean isDeleted();
+
+	/**
+	 * Marks the location as deleted
+	 */
+	void delete();
+
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/SourceLocationListener.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,36 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Listener for source locations
+*
+*/
+package com.nokia.tracecompiler.source;
+
+import com.nokia.tracecompiler.engine.TraceLocation;
+
+/**
+ * Listener for source locations
+ * 
+ */
+public interface SourceLocationListener {
+
+	/**
+	 * Notification that location validity has changed
+	 * 
+	 * @param location
+	 *            the location that changed
+	 */
+	public void locationValidityChanged(TraceLocation location);	
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/SourceParameter.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,238 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Representation of a parameter parsed from source
+*
+*/
+package com.nokia.tracecompiler.source;
+
+import java.util.ArrayList;
+
+/**
+ * Representation of a parameter parsed from source
+ * 
+ */
+public class SourceParameter implements ParsedType {
+
+	/**
+	 * Parameter qualifiers
+	 */
+	private ArrayList<String> qualifiers;
+
+	/**
+	 * Parameter type
+	 */
+	private String type;
+
+	/**
+	 * Parameter name
+	 */
+	private String name;
+
+	/**
+	 * Flag specifying if parameter is reference
+	 */
+	private boolean isReference;
+
+	/**
+	 * Number of pointers in parameter
+	 */
+	private int pointerCount;
+
+	/**
+	 * The location of this parameter in source
+	 */
+	private SourceLocation location;
+
+	/**
+	 * Gets the parameter type
+	 * 
+	 * @return the type
+	 */
+	public String getType() {
+		return type;
+	}
+
+	/**
+	 * Gets the parameter name or null if parameter does not have a name
+	 * 
+	 * @return the name
+	 */
+	public String getName() {
+		return name;
+	}
+
+	/**
+	 * Checks if parameter is pointer (*) or pointer reference (*&)
+	 * 
+	 * @return true if pointer, false if not
+	 */
+	public boolean isPointer() {
+		return pointerCount > 0;
+	}
+
+	/**
+	 * Gets the number of pointers
+	 * 
+	 * @return the number of pointers
+	 */
+	public int getPointerCount() {
+		return pointerCount;
+	}
+
+	/**
+	 * Checks if a parameter is referece (&) or pointer reference (*&)
+	 * 
+	 * @return true if reference, false if not
+	 */
+	public boolean isReference() {
+		return isReference;
+	}
+
+	/**
+	 * Checks if paraemter is pointer (*), but not pointer reference (*&). Equal
+	 * to isPointer() && !isReference()
+	 * 
+	 * @return true if pointer, but not reference
+	 */
+	public boolean isPlainPointer() {
+		return pointerCount > 0 && !isReference;
+	}
+
+	/**
+	 * Checks if parameter is reference (&), but not pointer reference (*&).
+	 * Equal to !isPointer() && isReference()
+	 * 
+	 * @return true if reference to value
+	 */
+	public boolean isPlainReference() {
+		return pointerCount == 0 && isReference;
+	}
+
+	/**
+	 * Checks if parameter is a reference to a pointer (*&). Equal to
+	 * isPointer() && isReference()
+	 * 
+	 * @return true if reference to a pointer
+	 */
+	public boolean isPointerReference() {
+		return pointerCount > 0 && isReference;
+	}
+
+	/**
+	 * Checks if parameter is pointer (*) or reference (&). Equal to isPointer() ||
+	 * isReference()
+	 * 
+	 * @return true if pointer or reference
+	 */
+	public boolean isPointerOrReference() {
+		return pointerCount > 0 || isReference;
+	}
+
+	/**
+	 * Checks if parameter type equals given type
+	 * 
+	 * @param type
+	 *            the type to be checked
+	 * @return true if types match
+	 */
+	public boolean typeEquals(String type) {
+		return this.type != null && type != null && this.type.equals(type);
+	}
+
+	/**
+	 * Returns the source reference of this parameter
+	 * 
+	 * @return the source reference
+	 */
+	public SourceLocation getSourceLocation() {
+		return location;
+	}
+
+	/**
+	 * Sets the parameter type
+	 * 
+	 * @param type
+	 *            the new type
+	 */
+	void setType(String type) {
+		this.type = type;
+	}
+
+	/**
+	 * Sets the parameter name
+	 * 
+	 * @param name
+	 *            the new name
+	 */
+	void setName(String name) {
+		this.name = name;
+	}
+
+	/**
+	 * Sets the reference flag
+	 */
+	void setReference() {
+		isReference = true;
+	}
+
+	/**
+	 * Increments the pointer count
+	 */
+	void addPointer() {
+		pointerCount++;
+	}
+
+	/**
+	 * Adds a qualifier to this parameter
+	 * 
+	 * @param type
+	 *            the qualifier type
+	 */
+	void addQualifier(String type) {
+		if (qualifiers == null) {
+			qualifiers = new ArrayList<String>();
+		}
+		qualifiers.add(type);
+	}
+
+	/**
+	 * Sets the source location of this parameter
+	 * 
+	 * @param location
+	 *            the location
+	 */
+	void setSourceLocation(SourceLocation location) {
+		this.location = location;
+	}
+
+	/**
+	 * Checks if a qualifier exists
+	 * 
+	 * @param qualifier
+	 *            the qualifier to be checked
+	 * @return true if it exists
+	 */
+	public boolean hasQualifier(String qualifier) {
+		boolean retval;
+		if (qualifiers != null) {
+			retval = qualifiers.contains(qualifier);
+		} else {
+			retval = false;
+		}
+		return retval;
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/SourceParameterTokenizer.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,440 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Parameter tokenizer is used to parse function parameters lists
+*
+*/
+package com.nokia.tracecompiler.source;
+
+import java.util.List;
+
+/**
+ * Parameter tokenizer is used to parse function parameters lists
+ * 
+ */
+public class SourceParameterTokenizer {
+
+	/**
+	 * The source parser
+	 */
+	private SourceParser parser;
+
+	/**
+	 * The offset where to start the tokenizer
+	 */
+	private int offset;
+
+	/**
+	 * Slip next whitespace
+	 */
+	private boolean skipNextWhiteSpace;
+
+	/**
+	 * Constructor
+	 * 
+	 * @param parser
+	 *            the source parser
+	 * @param offset
+	 *            offset to the start of parameter
+	 */
+	public SourceParameterTokenizer(SourceParser parser, int offset) {
+		this.parser = parser;
+		this.offset = offset;
+	}
+
+	/**
+	 * Parses a list of parameters (a, b, c) and stores the values into the
+	 * given list.
+	 * 
+	 * @param list
+	 *            the list of parameters
+	 * @param findSeparator
+	 *            if true, the processing stops after ';' or '{' character. If
+	 *            false, processing stops after ')' at end of parameters
+	 * @return index at end of parameters
+	 * @throws SourceParserException
+	 *             if processing fails
+	 */
+	public int tokenize(List<String> list, boolean findSeparator)
+			throws SourceParserException {
+		TokenizerSearchData data = new TokenizerSearchData();
+		data.itr = parser.createIterator(offset, SourceParser.SKIP_WHITE_SPACES
+				| SourceParser.SKIP_COMMENTS);
+		boolean bracketsOpened = false;
+		boolean finished = false;
+		while (data.itr.hasNext() && !finished) {
+			data.value = data.itr.next();
+			if (!data.inQuotes && data.value == '\"') {
+				data.inQuotes = true;
+				data.hasData = true;
+			} else if (data.inQuotes) {
+				processInQuotesChar(data);
+			} else if (data.complete) {
+				processEndOfParametersChar(data);
+			} else if (data.value == '(') {
+				bracketsOpened = true;
+				processOpeningBracket(data);
+			} else if (data.value == ',' || data.value == ')') {
+				processCommaOrClosingBracket(list, data);
+			} else if (data.value == ';' && data.openBracketCount != 0 || data.value == '{'
+					|| data.value == '}' ) {
+				throw new SourceParserException(
+						SourceErrorCodes.UNEXPECTED_PARAMETER_SEPARATOR);
+			} else {
+				// Raises a flag that there is some data. processOpeningBracket
+				// no longer interprets the next bracket as opening bracket
+				if (data.openBracketCount > 0) {
+					data.hasData = true;
+				}
+			}
+			finished = ((data.complete && !findSeparator) || (data.endFound && findSeparator));
+			if (bracketsOpened && data.openBracketCount == 0) {
+				data.complete = true;
+				break;
+			}
+		}
+		if (!data.complete) {
+			throw new SourceParserException(
+					SourceErrorCodes.UNEXPECTED_END_OF_FILE);
+		}
+		if (data.openBracketCount != 0) {
+			throw new SourceParserException(SourceErrorCodes.BRACKET_MISMATCH);
+		}
+		
+		
+		return data.itr.currentIndex() + 1;
+	}
+
+	/**
+	 * Parses list of parameters with types (int a, int b, int c) and stores the
+	 * values into the given list.
+	 * 
+	 * @param list
+	 *            the list of parameters
+	 * @return index at end of parameters
+	 * @throws SourceParserException
+	 *             if processing fails
+	 */
+	public int tokenizeTyped(List<SourceParameter> list) 
+			throws SourceParserException {
+		TokenizerSearchData data = new TokenizerSearchData();
+
+		try {
+			data.itr = parser
+					.createIterator(offset, SourceParser.SKIP_WHITE_SPACES
+							| SourceParser.SKIP_COMMENTS);
+			data.sourceParameter = new SourceParameter();
+			while (data.itr.hasNext() && !data.complete) {
+				data.value = data.itr.next();
+
+				// Check if there was array start or end character and then
+				// space. It would mean that the parameter continues and more
+				// should be parsed.
+				if (skipNextWhiteSpace) {
+					skipNextWhiteSpace = false;
+					if (data.itr.hasSkipped()) {
+						data.value = data.itr.next();
+					}
+				}
+
+				if (data.value == '\"') {
+					throw new SourceParserException(
+							SourceErrorCodes.UNEXPECTED_QUOTE_CHARACTER);
+				} else if (data.value == '(') {
+					processOpeningBracket(data);
+				} else if (data.value == ',' || data.value == ')') {
+					processCommaOrClosingBracket(list, data);
+				} else if (data.value == ';' || data.value == '{'
+						|| data.value == '}') {
+					data.complete = true;
+					// Array start or end character.
+				} else if (data.value == '<' || data.value == '>') {
+					skipNextWhiteSpace = true;
+				} else if (data.itr.hasSkipped() && data.openBracketCount > 0) {
+					processNameValueSeparator(data);
+				}
+			}
+			if (!data.complete) {
+				throw new SourceParserException(
+						SourceErrorCodes.UNEXPECTED_END_OF_FILE);
+			}
+		} catch (SourceParserException e) {
+			// Resets all source locations if parser fails
+			for (int i = 0; i < list.size(); i++) {
+				list.get(i).getSourceLocation().dereference();
+			}
+			throw e;
+		}
+		return data.itr.currentIndex() + 1;
+	}
+
+	/**
+	 * Processes a separator character and updates the current SourceParameter
+	 * object in the search data
+	 * 
+	 * @param data
+	 *            the search data
+	 * @throws SourceParserException
+	 *             if processing fails
+	 */
+	private void processNameValueSeparator(TokenizerSearchData data)
+			throws SourceParserException {
+		// If the parameter is empty, the previous index will point
+		// to index preceeding tagStartIndex
+		int previous = data.itr.previousIndex();
+		if (previous >= data.tagStartIndex) {
+			int endIndex = previous + 1;
+			if (data.sourceParameter.getType() == null) {
+				processNameValueSeparatorNoType(data, endIndex);
+			} else if (data.sourceParameter.getName() == null) {
+				processNameValueSeparatorNoName(data, endIndex);
+			}
+			data.tagStartIndex = data.itr.currentIndex();
+		}
+	}
+
+	/**
+	 * Processes a name-value separator when there is no name
+	 * 
+	 * @param data
+	 *            the search data
+	 * @param endIndex
+	 *            the end index of the parameters
+	 * @throws SourceParserException
+	 *             if processing fails
+	 */
+	private void processNameValueSeparatorNoName(TokenizerSearchData data,
+			int endIndex) throws SourceParserException {
+		String name = parser.getSource().get(data.tagStartIndex,
+				endIndex - data.tagStartIndex);
+		boolean startFound = false;
+		int start = 0;
+		int end = name.length();
+		for (int i = 0; i < name.length(); i++) {
+			char c = name.charAt(i);
+			if (c == '&' || c == '*') {
+				if (c == '&') {
+					data.sourceParameter.setReference();
+				} else {
+					data.sourceParameter.addPointer();
+				}
+				if (!startFound) {
+					start++;
+				} else {
+					end--;
+				}
+			} else {
+				startFound = true;
+			}
+		}
+		name = name.substring(start, end);
+		if (name.length() > 0) {
+			if (isParameterTypeQualifier(name)) {
+				// Qualifiers between type and name are ignored
+				// For example TInt const* aValue
+			} else {
+				data.sourceParameter.setName(name);
+			}
+		}
+	}
+
+	/**
+	 * Processes a name-value separator when there is no value
+	 * 
+	 * @param data
+	 *            the search data
+	 * @param endIndex
+	 *            the end index of the parameters
+	 * @throws SourceParserException
+	 *             if processing fails
+	 */
+	private void processNameValueSeparatorNoType(TokenizerSearchData data,
+			int endIndex) throws SourceParserException {
+		String type = parser.getSource().get(data.tagStartIndex,
+				endIndex - data.tagStartIndex);
+		if (isParameterTypeQualifier(type)) {
+			data.sourceParameter.addQualifier(type);
+		} else {
+			for (int i = type.length() - 1; i >= 0; i--) {
+				if (type.charAt(i) == '&') {
+					data.sourceParameter.setReference();
+					if (i == 0) {
+						type = ""; //$NON-NLS-1$
+					}
+				} else if (type.charAt(i) == '*') {
+					data.sourceParameter.addPointer();
+					if (i == 0) {
+						type = ""; //$NON-NLS-1$
+					}
+				} else {
+					if (i != type.length() - 1) {
+						type = type.substring(0, i + 1);
+					}
+					i = -1;
+				}
+			}
+			if (type.length() > 0) {
+				// Remove spaces
+				type = type.replace(" ", ""); //$NON-NLS-1$ //$NON-NLS-2$
+				data.sourceParameter.setType(type);
+			}
+		}
+	}
+
+	/**
+	 * Checks if parameter type if a qualifier or not
+	 * 
+	 * @param type
+	 *            the type to be checked
+	 * @return true if qualifier, false if not
+	 */
+	private boolean isParameterTypeQualifier(String type) {
+		boolean retval = false;
+		for (String element : SourceConstants.PARAMETER_QUALIFIERS) {
+			if (type.equals(element)) {
+				retval = true;
+			}
+		}
+		return retval;
+	}
+
+	/**
+	 * Processes a parameter separator or closing bracket
+	 * 
+	 * @param list
+	 *            the list of existing parameters
+	 * @param data
+	 *            the search data
+	 * @throws SourceParserException
+	 *             if invalid character is encountered
+	 */
+	@SuppressWarnings("unchecked")
+	private void processCommaOrClosingBracket(List list,
+			TokenizerSearchData data) throws SourceParserException {
+		// This method is called from both tokenize functions. One uses
+		// List<String> and other List<SourceParameter>
+		// Thus this uses List and @SuppressWarnings
+		if (data.value == ')') {
+			data.openBracketCount--;
+		}
+		
+		if (data.value == ',') {
+			//we may have the case of OstTraceDef1( OST_TRACE_CATEGORY_ALL, TRACE_FATAL, TEST_OstTraceDef1, "EOstTraceDef1 - %u" , f(a,b));
+			//when processing the comma in f(a,b) that should not count as parameter separator
+			if (data.openBracketCount >1 ) {
+				return;
+			}
+		}
+		
+		if (data.value == ',' || data.openBracketCount == 0) {
+			//we have another parameter
+			if (data.sourceParameter != null) {
+				// If processing typed parameter list, the name and type are
+				// stored into a SourceParameter object, which is then added
+				// to list
+				processNameValueSeparator(data);
+				if (data.sourceParameter.getType() != null) {
+					SourceLocation location = new SourceLocation(parser,
+							data.paramStartIndex, data.itr.currentIndex()
+									- data.paramStartIndex);
+					data.sourceParameter.setSourceLocation(location);
+					list.add(data.sourceParameter);
+					data.sourceParameter = new SourceParameter();
+				}
+			} else {
+				// In this case the list contains strings.
+				int previous = data.itr.previousIndex();
+				String tracepoint = ""; //$NON-NLS-1$
+				if (previous >= data.tagStartIndex) {
+					int endIndex = data.itr.previousIndex() + 1;
+					tracepoint = parser.getSource().get(data.tagStartIndex,
+							endIndex - data.tagStartIndex);
+					list.add(tracepoint);
+				} else {
+					list.add(tracepoint);
+				}	
+			}
+			
+			// In case like below we have parsed all parameters and data is completed if next character after ')' is ':' 
+			// and open bracket count is 0:
+			// 		CNpeSendData::CNpeSendData(RMeDriver* aDriver, TUint16 aMaxMsgLength): CActive(EPriorityStandard),
+			//				iDriver(aDriver),
+			//				iMaxMsgLength(aMaxMsgLength)
+			if (data.itr.hasNext()){
+				char nextChar = data.itr.peek();
+				
+				if (data.value == ')' &&  nextChar == ':' && data.openBracketCount == 0) {
+					data.complete = true;
+				}
+			}
+			
+			if (data.value == ',') {
+				data.tagStartIndex = data.itr.nextIndex();
+				data.paramStartIndex = data.tagStartIndex;
+			}
+		}
+	}
+
+	/**
+	 * Processes an opening bracket
+	 * 
+	 * @param data
+	 *            the search data
+	 */
+	private void processOpeningBracket(TokenizerSearchData data) {
+		data.openBracketCount++;
+		if (!data.hasData && data.openBracketCount == 1 ) {
+			// The number of initial '(' characters is stored. The
+			// parameters are assumed to end when the corresponding ')'
+			// character is encountered
+			data.tagStartIndex = data.itr.nextIndex();
+			data.paramStartIndex = data.tagStartIndex;
+			data.initialBracketCount = data.openBracketCount;
+		}
+	}
+
+	/**
+	 * Process a character when in quotes
+	 * 
+	 * @param data
+	 *            the search data
+	 */
+	private void processInQuotesChar(TokenizerSearchData data) {
+		if (data.value == '\"' && data.previousValue != '\\') {
+			data.inQuotes = false;
+		}
+		data.previousValue = data.value;
+	}
+
+	/**
+	 * Processes a character found after the closing bracket
+	 * 
+	 * @param data
+	 *            the data
+	 * @throws SourceParserException
+	 *             if invalid characters are found
+	 */
+	private void processEndOfParametersChar(TokenizerSearchData data)
+			throws SourceParserException {
+		if (data.value == ';' || data.value == '{') {
+			data.endFound = true;
+		} else if (data.value == ')') {
+			data.openBracketCount--;
+		} else if (!Character.isWhitespace(data.value)) {
+			throw new SourceParserException(SourceErrorCodes.BRACKET_MISMATCH);
+		}
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/SourceParser.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,485 @@
+/*
+* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Parser for C++ source files
+*
+*/
+package com.nokia.tracecompiler.source;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Parser for C++ source files. Commented and quoted areas are located during
+ * the construction of this object and those areas are excluded from the
+ * searches.
+ * 
+ */
+public class SourceParser {
+
+	/**
+	 * Skip white spaces. Does not apply to string searches
+	 */
+	public final static int SKIP_WHITE_SPACES = 0x01; // CodForChk_Dis_Magic
+
+	/**
+	 * Skip string areas
+	 */
+	public final static int SKIP_STRINGS = 0x02; // CodForChk_Dis_Magic
+
+	/**
+	 * Search / iterate backwards
+	 */
+	public final static int BACKWARD_SEARCH = 0x04; // CodForChk_Dis_Magic
+
+	/**
+	 * Ignore character case in string searches
+	 */
+	public final static int IGNORE_CASE = 0x08; // CodForChk_Dis_Magic
+
+	/**
+	 * Skip commented areas
+	 */
+	public final static int SKIP_COMMENTS = 0x10; // CodForChk_Dis_Magic
+
+	/**
+	 * Skip preprocessor definitions
+	 */
+	public final static int SKIP_PREPROCESSOR = 0x80; // CodForChk_Dis_Magic
+
+	/**
+	 * Match beginning of word flag
+	 */
+	public final static int MATCH_WORD_BEGINNING = 0x20; // CodForChk_Dis_Magic
+
+	/**
+	 * Match end of word flag
+	 */
+	public final static int MATCH_WORD_END = 0x40; // CodForChk_Dis_Magic
+
+	/**
+	 * Match whole word flag
+	 */
+	public final static int MATCH_WHOLE_WORD = MATCH_WORD_BEGINNING
+			| MATCH_WORD_END;
+
+	/**
+	 * Ignore all special areas during search
+	 */
+	public final static int SKIP_ALL = SKIP_WHITE_SPACES | SKIP_STRINGS
+			| SKIP_COMMENTS | SKIP_PREPROCESSOR;
+
+	/**
+	 * Data to be searched.
+	 */
+	private SourceDocumentInterface source;
+
+	/**
+	 * List of source locations
+	 */
+	private ArrayList<SourceLocation> locations;
+
+	/**
+	 * Document factory for creating locations
+	 */
+	private SourceDocumentFactory documentFactory;
+
+	/**
+	 * Excluded area parser
+	 */
+	private ExcludedAreaParser excludedAreaParser;
+
+	/**
+	 * Context area parser
+	 */
+	private ContextAreaParser contextAreaParser;
+
+	/**
+	 * Function return value parser
+	 */
+	private FunctionReturnValueParser returnValueParser;
+
+	/**
+	 * Creates a new parser for given data
+	 * 
+	 * @param factory
+	 *            the document factory
+	 * @param sourceData
+	 *            the source data
+	 */
+	public SourceParser(SourceDocumentFactory factory, String sourceData) {
+		this(factory, factory.createDocument(sourceData));
+	}
+
+	/**
+	 * Creates a source parser from source document
+	 * 
+	 * @param factory
+	 *            the document factory
+	 * @param source
+	 *            the source document
+	 */
+	public SourceParser(SourceDocumentFactory factory,
+			SourceDocumentInterface source) {
+		this.documentFactory = factory;
+		this.source = source;
+		excludedAreaParser = new ExcludedAreaParser(this);
+		contextAreaParser = new ContextAreaParser(this);
+		returnValueParser = new FunctionReturnValueParser(this);
+		try {
+			findExcludedAreas();
+		} catch (SourceParserException e) {
+		}
+	}
+
+	/**
+	 * Gets the source document
+	 * 
+	 * @return the source
+	 */
+	public SourceDocumentInterface getSource() {
+		return source;
+	}
+
+	/**
+	 * Gets part of the source document data
+	 * 
+	 * @param start
+	 *            the start offset
+	 * @param length
+	 *            the data length
+	 * @return the data or null if offsets are not valid
+	 */
+	public String getData(int start, int length) {
+		String retval;
+		try {
+			retval = source.get(start, length);
+		} catch (SourceParserException e) {
+			retval = null;
+		}
+		return retval;
+	}
+
+	/**
+	 * Gets a character at given offset
+	 * 
+	 * @param offset
+	 *            the offset
+	 * @return the character
+	 */
+	public char getData(int offset) {
+		char retval;
+		try {
+			retval = source.getChar(offset);
+		} catch (SourceParserException e) {
+			retval = '\0';
+		}
+		return retval;
+	}
+
+	/**
+	 * Gets the source document length
+	 * 
+	 * @return the source length
+	 */
+	public int getDataLength() {
+		return source.getLength();
+	}
+
+	/**
+	 * Gets the line number of given offset
+	 * 
+	 * @param offset
+	 *            the offset
+	 * @return the line number or -1 if offset is not valid
+	 */
+	public int getLineNumber(int offset) {
+		int retval;
+		try {
+			retval = source.getLineOfOffset(offset) + 1;
+		} catch (SourceParserException e) {
+			retval = -1;
+		}
+		return retval;
+	}
+
+	/**
+	 * Starts a new string search from given offset
+	 * 
+	 * @param searchString
+	 *            the string to be searched
+	 * @param startOffset
+	 *            the offset to start of search
+	 * @param endOffset
+	 *            the end of search or -1 to search the whole document
+	 * @param searchFlags
+	 *            the search flags
+	 * @return the search object
+	 */
+	public SourceStringSearch startStringSearch(String searchString,
+			int startOffset, int endOffset, int searchFlags) {
+		return new SourceStringSearch(this, searchString, startOffset,
+				endOffset, searchFlags);
+	}
+
+	/**
+	 * Tokenizes the parameter list starting from next bracket. White spaces are
+	 * discarded. For example (a, b , c ) returns { "a", "b", "c" }. This method
+	 * is independent of the current string search and thus can be used during
+	 * one.
+	 * 
+	 * @param startIndex
+	 *            the index where to start
+	 * @param list
+	 *            the list where the parameters are added
+	 * @param findSeparator
+	 *            if true, the processing stops after ';' or '{' character. If
+	 *            false, processing stops after ')' at end of parameters
+	 * @return the offset at end of the parameters
+	 * @throws SourceParserException
+	 *             if parameters are not valid
+	 */
+	public int tokenizeParameters(int startIndex, List<String> list,
+			boolean findSeparator) throws SourceParserException {
+		SourceParameterTokenizer tokenizer = new SourceParameterTokenizer(this,
+				startIndex);
+		return tokenizer.tokenize(list, findSeparator);
+	}
+
+	/**
+	 * Parses the parameter list of given source context. Each entry added into
+	 * the list will be an instance of SourceParameter class. This method is
+	 * independent of the current string search and thus can be used during one.
+	 * 
+	 * @param parameterIndex
+	 *            the index where to start
+	 * @param list
+	 *            the list where the parameters are added
+	 * @return the offset at end of the parameters
+	 * @throws SourceParserException
+	 *             if context is not valid
+	 */
+	public int parseFunctionParameters(int parameterIndex, List<SourceParameter> list)
+			throws SourceParserException {
+		SourceParameterTokenizer tokenizer = new SourceParameterTokenizer(this,
+				parameterIndex);
+		return tokenizer.tokenizeTyped(list);
+	}
+
+	/**
+	 * Parses the return values of given source context
+	 * 
+	 * @param context
+	 *            the context to be parsed
+	 * @param list
+	 *            the list of return values
+	 */
+	void parseReturnValues(SourceContext context, List<SourceReturn> list) {
+		returnValueParser.parseReturnValues(context, list);
+	}
+
+	/**
+	 * Checks if the offset if within an excluded area
+	 * 
+	 * @param offset
+	 *            the offset
+	 * @return true if in excluded area
+	 */
+	public boolean isInExcludedArea(int offset) {
+		return findExcludedAreaIndex(offset) >= 0;
+	}
+
+	/**
+	 * Gets an excluded area
+	 * 
+	 * @param offset
+	 *            the data offset
+	 * @return the area or null
+	 */
+	public SourceExcludedArea getExcludedArea(int offset) {
+		return excludedAreaParser.getArea(offset);
+	}
+
+	/**
+	 * Creates a new source iterator
+	 * 
+	 * @param offset
+	 *            the offset where to start
+	 * @param iteratorFlags
+	 *            the flags for the iterator
+	 * @return the new iterator
+	 */
+	public SourceIterator createIterator(int offset, int iteratorFlags) {
+		return new SourceIterator(this, offset, iteratorFlags);
+	}
+
+	/**
+	 * Returns the context at given offset. This parses the source if it has not
+	 * been parsed before.
+	 * 
+	 * @param offset
+	 *            the offset to the source data
+	 * @return the context at the offset or null if no context exists
+	 */
+	public SourceContext getContext(int offset) {
+		SourceContext retval;
+		try {
+			retval = contextAreaParser.parseAndGet(offset);
+		} catch (SourceParserException e) {
+			retval = null;
+		}
+		return retval;
+	}
+
+	/**
+	 * Locates the start-of-line starting from given offset
+	 * 
+	 * @param offset
+	 *            the offset
+	 * @param cancelIfNotWhitespace
+	 *            flag that tells to stop processing and return the original
+	 *            value if a non-whitespace is found before start of line
+	 * @param stayInContext
+	 *            flag that tells to stay within the context offset currently
+	 *            resides. If this would come out of the context, this locates
+	 *            the start of the next line following offset
+	 * @return the start-of-line
+	 * @throws SourceParserException
+	 *             if the offset is not valid
+	 */
+	public int findStartOfLine(int offset, boolean cancelIfNotWhitespace,
+			boolean stayInContext) throws SourceParserException {
+		int retval = offset == 0 ? offset : offset - 1;
+		for (int i = retval; i >= 0; i--) {
+			char c = source.getChar(i);
+			if (source.getChar(i) == '\n') {
+				retval = i + 1;
+				i = -1;
+			} else if (cancelIfNotWhitespace && !Character.isWhitespace(c)) {
+				retval = offset;
+				i = -1;
+			}
+		}
+		if (stayInContext) {
+			SourceContext context = getContext(offset);
+			if (context != null && retval < context.getOffset()) {
+				retval = context.getOffset();
+				int end = context.getOffset() + context.getLength();
+				for (int i = retval; i < end; i++) {
+					if (source.getChar(i) == '\n') {
+						retval = i + 1;
+						i = end;
+					}
+				}
+			}
+		}
+		return retval;
+	}
+
+	/**
+	 * Finds the array index of the excluded area which contains the offset. If
+	 * none of the areas contain the offset, returns negative integer indicating
+	 * the index of the excluded area following the offset
+	 * 
+	 * @param offset
+	 *            the offset to the data
+	 * @return the excluded area index
+	 */
+	int findExcludedAreaIndex(int offset) {
+		return excludedAreaParser.find(offset);
+	}
+
+	/**
+	 * Finds the excluded source file areas. Excluded areas include comments and
+	 * quoted strings. Overwrites possible old areas.
+	 * 
+	 * @throws SourceParserException
+	 *             if parser fails
+	 */
+	public void findExcludedAreas() throws SourceParserException {
+		excludedAreaParser.parseAll();
+	}
+
+	/**
+	 * Gets the list of excluded areas
+	 * 
+	 * @return the list
+	 */
+	public List<SourceExcludedArea> getExcludedAreas() {
+		return excludedAreaParser.getAreas();
+	}
+
+	/**
+	 * Checks if the area is excluded with given flags
+	 * 
+	 * @param type
+	 *            the area type
+	 * @param flags
+	 *            the flags
+	 * @return true if skipped
+	 */
+	static boolean isExcluded(int type, int flags) {
+		boolean string = ((flags & SKIP_STRINGS) != 0)
+				&& (type == SourceExcludedArea.STRING);
+		boolean comment = ((flags & SKIP_COMMENTS) != 0)
+				&& (type == SourceExcludedArea.MULTILINE_COMMENT);
+		boolean linecomment = ((flags & SKIP_COMMENTS) != 0)
+				&& (type == SourceExcludedArea.LINE_COMMENT);
+		boolean preProcessor = ((flags & SKIP_PREPROCESSOR) != 0)
+				&& (type == SourceExcludedArea.PREPROCESSOR_DEFINITION);
+		return string || comment || linecomment || preProcessor;
+	}
+
+	/**
+	 * Adds a location to this parser
+	 * 
+	 * @param location
+	 *            the location
+	 */
+	void addLocation(SourceLocation location) {
+		if (locations == null) {
+			locations = new ArrayList<SourceLocation>();
+		}
+		locations.add(location);
+		if (source != null) {
+			source.addLocation(location.getLocation());
+		}
+	}
+
+	/**
+	 * Removes a location from this parser
+	 * 
+	 * @param location
+	 *            the location to be removed
+	 */
+	void removeLocation(SourceLocation location) {
+		if (locations != null) {
+			locations.remove(location);
+		}
+		if (source != null) {
+			source.removeLocation(location.getLocation());
+		}
+	}
+
+	/**
+	 * Gets the document framework
+	 * 
+	 * @return the document framework
+	 */
+	public SourceDocumentFactory getDocumentFramework() {
+		return documentFactory;
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/SourceParserException.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,57 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Exceptions thrown by source parser
+*
+*/
+package com.nokia.tracecompiler.source;
+
+/**
+ * Exceptions thrown by source parser
+ * 
+ * @see SourceParser
+ */
+public class SourceParserException extends Exception {
+
+	/**
+	 * UID
+	 */
+	private static final long serialVersionUID = -2332983004093789880L; // CodForChk_Dis_Magic
+
+	/**
+	 * Error type
+	 */
+	private int errorType;
+
+	/**
+	 * Constructor with message and source object
+	 * 
+	 * @param errorType
+	 *            the error type
+	 */
+	public SourceParserException(int errorType) {
+		this.errorType = errorType;
+	}
+
+	/**
+	 * Gets the error type
+	 * 
+	 * @return the type
+	 */
+	public int getErrorType() {
+		return errorType;
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/SourcePropertyProvider.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,42 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Property provider for SourceLocation objects
+*
+*/
+package com.nokia.tracecompiler.source;
+
+/**
+ * Property provider for SourceLocation objects
+ * 
+ */
+public interface SourcePropertyProvider {
+
+	/**
+	 * Gets a file name that can be shown in the UI when viewing a
+	 * SourceLocation
+	 * 
+	 * @return the source file name
+	 */
+	public String getFileName();
+
+	/**
+	 * Gets the path to the source file including the ending separator.
+	 * 
+	 * @return the path
+	 */
+	public String getFilePath();
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/SourceReturn.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,102 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Properties of function return statement
+*
+*/
+package com.nokia.tracecompiler.source;
+
+/**
+ * Properties of function return statement
+ * 
+ */
+public class SourceReturn extends SourceLocationBase {
+
+	/**
+	 * Previous character might cause a problem
+	 */
+	private boolean charHazard;
+
+	/**
+	 * The return statement itself might cause a problem
+	 */
+	private boolean tagHazard;
+
+	/**
+	 * Constructor
+	 * 
+	 * @param parser
+	 *            the parser owning this location
+	 * @param offset
+	 *            the offset to the beginning of return statement
+	 * @param length
+	 *            the return statement length
+	 */
+	SourceReturn(SourceParser parser, int offset, int length) {
+		super(parser, offset, length);
+	}
+
+	/**
+	 * Gets the return statement
+	 * 
+	 * @return the statement
+	 */
+	public String getReturnStatement() {
+		String retval = ""; //$NON-NLS-1$
+		if (getParser() != null) {
+			retval = getParser().getData(getOffset(), getLength());
+		}
+		return retval;
+	}
+
+	/**
+	 * Sets a flag which indicates that the character preceeding the return
+	 * statement might cause problems when a trace is added prior to the return
+	 * statement
+	 */
+	void setPreviousCharHazard() {
+		this.charHazard = true;
+	}
+
+	/**
+	 * Gets the flag which indicates if the character preceeding the return
+	 * statement might cause problems when a trace is added prior to the return
+	 * statement
+	 * 
+	 * @return the flag
+	 */
+	public boolean hasPreviousCharHazard() {
+		return charHazard;
+	}
+
+	/**
+	 * Sets a flag which indicates that the return statement might cause
+	 * problems when duplicated to a trace
+	 */
+	void setTagHazard() {
+		tagHazard = true;
+	}
+
+	/**
+	 * Gets the flag which indicates if the return statement might cause
+	 * problems when duplicated to a trace
+	 * 
+	 * @return the flag
+	 */
+	public boolean hasTagHazard() {
+		return tagHazard;
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/SourceSearch.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,178 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Base class for source search classes
+*
+*/
+package com.nokia.tracecompiler.source;
+
+import java.util.List;
+
+/**
+ * Base class for source search classes.
+ * 
+ */
+public abstract class SourceSearch {
+
+	/**
+	 * Source parser
+	 */
+	protected final SourceParser parser;
+
+	/**
+	 * Current index within data during search
+	 */
+	protected int searchIndex;
+
+	/**
+	 * End index for search
+	 */
+	protected int searchEnd;
+
+	/**
+	 * Index of the next excluded area during search.
+	 */
+	protected int searchExcludedIndex;
+
+	/**
+	 * Search flags
+	 */
+	protected int flags;
+
+	/**
+	 * Creates a new search
+	 * 
+	 * @param parser
+	 *            the parser containing the source
+	 * @param startOffset
+	 *            offset to the start of search
+	 * @param endOffset
+	 *            offset to end of search or -1 for rest of the document
+	 * @param flags
+	 *            search flags
+	 */
+	protected SourceSearch(SourceParser parser, int startOffset, int endOffset,
+			int flags) {
+		this.parser = parser;
+		this.flags = flags;
+		resetSearch(startOffset, endOffset);
+	}
+
+	/**
+	 * Resets the current search with a new offset
+	 * 
+	 * @param startOffset
+	 *            the offset to the start of search
+	 * @param endOffset
+	 *            offset to end of search or -1 for rest of the document
+	 */
+	public void resetSearch(int startOffset, int endOffset) {
+		searchIndex = startOffset;
+		searchEnd = endOffset == -1 ? parser.getDataLength() : endOffset;
+		// Calculates the starting position for the search based on the
+		// offset and excluded areas
+		int excluded = parser.findExcludedAreaIndex(startOffset);
+		if (excluded >= 0) {
+			SourceExcludedArea area = parser.getExcludedAreas().get(excluded);
+			searchIndex = area.getOffset() + area.getLength();
+			if (excluded < parser.getExcludedAreas().size() - 1) {
+				searchExcludedIndex = excluded + 1;
+			} else {
+				searchExcludedIndex = -1;
+			}
+		} else {
+			// If binarySearch returns < 0, startIndex was between some
+			// excluded areas.
+			searchExcludedIndex = -1 - excluded;
+			if (searchExcludedIndex > parser.getExcludedAreas().size()) {
+				searchExcludedIndex = -1;
+			}
+		}
+		skipNonExcludedAreas();
+	}
+
+	/**
+	 * Changes the index to point behind an excluded area if current index is
+	 * within one.
+	 */
+	protected void skipExcludedArea() {
+		// If data index is within an excluded area, it is moved to end of
+		// it and the next excluded area is selected
+		boolean changedExcludedArea;
+		do {
+			// If the excluded area changes, the flag is set and the next
+			// excluded area is also checked. Otherwise the excluded area index
+			// gets left behind if the search index jumps past multiple excluded
+			// areas
+			changedExcludedArea = false;
+			if (searchExcludedIndex >= 0
+					&& searchExcludedIndex < parser.getExcludedAreas().size()) {
+				SourceExcludedArea area = parser.getExcludedAreas().get(
+						searchExcludedIndex);
+				if (area.getOffset() <= searchIndex) {
+					// If the search offset has skipped past an excluded area,
+					// the index is not changed
+					if (area.getOffset() + area.getLength() > searchIndex) {
+						searchIndex = area.getOffset() + area.getLength();
+					}
+					searchExcludedIndex++;
+					skipNonExcludedAreas();
+					changedExcludedArea = true;
+				}
+			}
+		} while (changedExcludedArea);
+	}
+
+	/**
+	 * Skips past excluded areas which are not actually excluded due to flags
+	 */
+	private void skipNonExcludedAreas() {
+		if (searchExcludedIndex >= 0
+				&& searchExcludedIndex < parser.getExcludedAreas().size()) {
+			boolean notExcluded = true;
+			do {
+				// If an excluded area is not excluded due to flags,
+				// the excluded area index is moved past that area
+				SourceExcludedArea area = parser.getExcludedAreas().get(
+						searchExcludedIndex);
+				if (!SourceParser.isExcluded(area.getType(), flags)) {
+					searchExcludedIndex++;
+				} else {
+					notExcluded = false;
+				}
+			} while (notExcluded
+					&& searchExcludedIndex < parser.getExcludedAreas().size());
+		}
+	}
+
+	/**
+	 * Returns the next occurence
+	 * 
+	 * @return the index or -1
+	 */
+	public abstract int findNext();
+
+	/**
+	 * Finds all occurences
+	 * 
+	 * @param list
+	 *            the list where the data is stored
+	 * @throws SourceParserException
+	 *             if search fails
+	 */
+	public abstract void findAll(List<Integer> list)
+			throws SourceParserException;
+
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/SourceSelector.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,37 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Selects an area from a source
+*
+*/
+package com.nokia.tracecompiler.source;
+
+/**
+ * Selects an area from a source
+ * 
+ */
+public interface SourceSelector {
+
+	/**
+	 * Selects an area defined by given offset and length
+	 * 
+	 * @param offset
+	 *            the offset
+	 * @param length
+	 *            the length
+	 */
+	public void setSelection(int offset, int length);
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/SourceStringSearch.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,267 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* String search algorithm
+*
+*/
+package com.nokia.tracecompiler.source;
+
+import java.util.List;
+
+/**
+ * String search algorithm
+ * 
+ */
+public class SourceStringSearch extends SourceSearch {
+
+	/**
+	 * String to be searched from the source.
+	 */
+	private String searchString;
+
+	/**
+	 * Number of different characters in source file alphabet. Assumes that
+	 * 8-bit encoding is used
+	 */
+	private final static int CHARACTER_COUNT = 256; // CodForChk_Dis_Magic
+
+	/**
+	 * Mask for bad character shifts (0xFF)
+	 */
+	private static final int BAD_CHARACTER_MASK = 0xFF; // CodForChk_Dis_Magic
+
+	/**
+	 * String search shifts.
+	 */
+	private int[] badCharacterShifts = new int[CHARACTER_COUNT];
+
+	/**
+	 * User data associated with search
+	 */
+	private Object searchData;
+
+	/**
+	 * Creates a new string search
+	 * 
+	 * @param parser
+	 *            the parser containing the source to be searched
+	 * @param searchString
+	 *            the string to be searched
+	 * @param startOffset
+	 *            offset to the start of search
+	 * @param endOffset
+	 *            offset to end of search or -1 for rest of the document
+	 * @param flags
+	 *            the search flags
+	 */
+	public SourceStringSearch(SourceParser parser, String searchString,
+			int startOffset, int endOffset, int flags) {
+		super(parser, startOffset, endOffset, flags);
+		setSearchString(searchString);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.source.SourceSearch#findNext()
+	 */
+	@Override
+	public int findNext() {
+		try {
+			SourceDocumentInterface source = parser.getSource();
+			int stringIndex = searchString.length() - 1;
+			boolean found = false;
+			while (!found && searchIndex + stringIndex < searchEnd) {
+				char dataChar;
+				char searchChar;
+				boolean match = false;
+				do {
+					dataChar = source.getChar(searchIndex + stringIndex);
+					searchChar = searchString.charAt(stringIndex);
+					if ((flags & SourceParser.IGNORE_CASE) != 0) {
+						searchChar = Character.toLowerCase(searchChar);
+						dataChar = Character.toLowerCase(dataChar);
+					}
+					if (searchChar == '?' || searchChar == dataChar) {
+						match = true;
+						stringIndex--;
+					} else {
+						match = false;
+					}
+				} while (match && stringIndex >= 0);
+				// If string was not found, resets index and skips according
+				// to the shift table
+				if (stringIndex < 0) {
+					found = true;
+					// Checks the previous character if match beginning is set
+					if ((flags & SourceParser.MATCH_WORD_BEGINNING) != 0) {
+						if ((searchIndex > 0)
+								&& isPartOfWord(source.getChar(searchIndex - 1))) {
+							found = false;
+						}
+					}
+					// Checks the character after data if match end is set
+					if (found && ((flags & SourceParser.MATCH_WORD_END) != 0)) {
+						if (((searchIndex + searchString.length()) < source
+								.getLength())
+								&& isPartOfWord(source.getChar(searchIndex
+										+ searchString.length()))) {
+							found = false;
+						}
+					}
+				}
+				if (!found) {
+					int diff = searchString.length() - 1 - stringIndex;
+					stringIndex = searchString.length() - 1;
+					int skip;
+
+					if (dataChar > badCharacterShifts.length - 1) {
+						skip = 1;
+					} else {
+						skip = badCharacterShifts[dataChar] - diff;
+						if (skip <= 0) {
+							skip = 1;
+						}
+					}
+
+					searchIndex += skip;
+					skipExcludedArea();
+				}
+			}
+			if (!found) {
+				searchIndex = -1;
+			}
+		} catch (SourceParserException e) {
+			searchIndex = -1;
+		}
+		int ret = searchIndex;
+		if (searchIndex != -1) {
+			searchIndex += searchString.length();
+		}
+		return ret;
+	}
+
+	/**
+	 * Checks if the character is part of a word
+	 * 
+	 * @param c
+	 *            the character to be checked
+	 * @return true if part of word
+	 */
+	private boolean isPartOfWord(char c) {
+		return Character.isLetterOrDigit(c) || c == '_';
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.source.SourceSearch#findAll(java.util.List)
+	 */
+	@Override
+	public void findAll(List<Integer> list) throws SourceParserException {
+		resetSearch(0, -1);
+		int index;
+		do {
+			index = findNext();
+			if (index > 0) {
+				list.add(new Integer(index));
+			}
+		} while (index > 0);
+	}
+
+	/**
+	 * Changes the search string
+	 * 
+	 * @param searchString
+	 *            the string to be searched
+	 */
+	public void setSearchString(String searchString) {
+		this.searchString = searchString;
+		int length = searchString.length();
+		// Elements not found in the string get the maximum shift distance
+		for (int i = 0; i < badCharacterShifts.length; i++) {
+			badCharacterShifts[i] = searchString.length();
+		}
+		// Characters of the search string are mapped into the
+		// shift distances array. If a character is found multiple
+		// times, the smallest shitft distance is stored
+		for (int i = 0; i < searchString.length() - 1; i++) {
+			if ((flags & SourceParser.IGNORE_CASE) != 0) {
+				badCharacterShifts[Character
+						.toLowerCase(searchString.charAt(i))
+						& BAD_CHARACTER_MASK] = length - i - 1;
+
+			} else {
+				badCharacterShifts[searchString.charAt(i) & BAD_CHARACTER_MASK] = length
+						- i - 1;
+			}
+		}
+	}
+
+	/**
+	 * Returns the search string
+	 * 
+	 * @return the string
+	 */
+	public String getSearchString() {
+		return searchString;
+	}
+
+	/**
+	 * Checks if the given string matches the search string
+	 * 
+	 * @param string
+	 *            the string
+	 * @return true if they match
+	 */
+	public boolean isSearchStringMatch(String string) {
+		int index = 0;
+		boolean match = true;
+		while (index < string.length() && match) {
+			char dataChar = string.charAt(index);
+			char searchChar = searchString.charAt(index);
+			if ((flags & SourceParser.IGNORE_CASE) != 0) {
+				searchChar = Character.toLowerCase(searchChar);
+				dataChar = Character.toLowerCase(dataChar);
+			}
+			if (searchChar == '?' || searchChar == dataChar) {
+				index++;
+			} else {
+				match = false;
+			}
+		}
+		return match;
+	}
+
+	/**
+	 * Sets the user variable associated with this searcher
+	 * 
+	 * @param data
+	 *            the variable
+	 */
+	public void setSearchData(Object data) {
+		searchData = data;
+	}
+
+	/**
+	 * Gets the user variable associated with this searcher
+	 * 
+	 * @return the variable
+	 */
+	public Object getSearchData() {
+		return searchData;
+	}
+
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/SourceUtils.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,1146 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Static utility functions related to source files
+*
+*/
+package com.nokia.tracecompiler.source;
+
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import com.nokia.tracecompiler.engine.TraceCompilerEngineGlobals;
+import com.nokia.tracecompiler.engine.TraceCompilerEngineErrorCodes.StringErrorParameters;
+import com.nokia.tracecompiler.engine.TraceCompilerEngineErrorCodes.TraceCompilerErrorCode;
+import com.nokia.tracecompiler.model.TraceCompilerException;
+import com.nokia.tracecompiler.model.TraceConstantTable;
+import com.nokia.tracecompiler.model.TraceParameter;
+import com.nokia.tracecompiler.rules.ArrayParameterRule;
+
+/**
+ * Static utility functions related to source files
+ * 
+ */
+public class SourceUtils {
+
+	/**
+	 * Tag for array types
+	 */
+	private static final String ARRAY_TAG = "[]"; //$NON-NLS-1$
+
+	/**
+	 * Start tag for printf format specifier
+	 */
+	private static final String START_TAG = "%"; //$NON-NLS-1$
+
+	/**
+	 * Regular expression optional element tag
+	 */
+	private static final String OPTIONAL_TAG = "?"; //$NON-NLS-1$
+
+	/**
+	 * Optional parameter pattern. Quoted from Wikipedia:
+	 * 
+	 * <strong> Parameter can be omitted or can be: 'n$' Where n is the number
+	 * of the parameter to display using this format specifier, allowing the
+	 * parameters provided to be output multiple times, using varying format
+	 * specifiers or in different orders. This is a POSIX extension and not in
+	 * C99.</strong>
+	 * 
+	 * This has not been implemented -> Currently format specifier count must
+	 * match parameter count
+	 */
+	private final static String PARAMETER_PATTERN = "(\\d+\\$)"; //$NON-NLS-1$
+
+	/**
+	 * Optional flags pattern. Quoted from Wikipedia:
+	 * 
+	 * <strong> Flags can be zero or more (in any order) of:
+	 * <ul>
+	 * <li>'+' : Causes printf to always denote the sign '+' or '-' of a number
+	 * (the default is to omit the sign for positive numbers). Only applicable
+	 * to numeric types.
+	 * <li>'-' : Causes printf to left-align the output of this placeholder (the
+	 * default is to right-align the output).
+	 * <li>'#' : Alternate form. For 'g' and 'G', trailing zeros are not
+	 * removed. For 'f', 'F', 'e', 'E', 'g', 'G', the output always contains a
+	 * decimal point. For 'o', 'x', and 'X', a 0, 0x, and 0X, respectively, is
+	 * prepended to non-zero numbers.
+	 * <li>' ' : Causes printf to left-pad the output with spaces until the
+	 * required length of output is attained. If combined with '0' (see below),
+	 * it will cause the sign to become a space when positive, but the remaining
+	 * characters will be zero-padded
+	 * <li>'0' : Causes printf to use '0' (instead of spaces) to left fill a
+	 * fixed length field. For example (assume i = 3) printf("%2d", i) results
+	 * in " 3", while printf("%02d", i) results in "03"
+	 * </ul>
+	 * </strong>
+	 */
+	private final static String FLAGS_PATTERN = "([-+# 0])"; //$NON-NLS-1$
+
+	/**
+	 * Optional width pattern. Quoted from Wikipedia:
+	 * 
+	 * <strong>Width can be omitted or be any of:
+	 * <ul>
+	 * <li>a number : Causes printf to pad the output of this placeholder with
+	 * spaces until it is at least number characters wide. If number has a
+	 * leading '0', then padding is done with '0' characters.
+	 * <li>'*' : Causes printf to pad the output until it is n characters wide,
+	 * where n is an integer value stored in the a function argument just
+	 * preceding that represented by the modified type. For example
+	 * printf("%*d", 5, 10) will result in "10" being printed with a width of
+	 * 5.</strong>
+	 * </ul>
+	 * </strong>
+	 * 
+	 * '*' has not been implemented -> Currently format specifier count must
+	 * match parameter count
+	 */
+	private final static String WIDTH_PATTERN = "(\\d+|\\*)"; //$NON-NLS-1$
+
+	/**
+	 * Optional precision pattern. Quoted from Wikipedia:
+	 * 
+	 * Precision can be omitted or be any of: <strong>
+	 * <ul>
+	 * <li>a number : For non-integral numeric types, causes the decimal portion
+	 * of the output to be expressed in at least number digits. For the string
+	 * type, causes the output to be truncated at number characters.
+	 * <li>'*' : Same as the above, but uses an integer value in the intaken
+	 * argument to determine the number of decimal places or maximum string
+	 * length. For example, printf("%.*s", 3, "abcdef") will result in "abc"
+	 * being printed.
+	 * </ul>
+	 * </strong> If the precision is zero, nothing is printed for the
+	 * corresponding argument.
+	 * 
+	 * '*' has not been implemented -> Currently format specifier count must
+	 * match parameter count
+	 */
+	private final static String PRECISION_PATTERN = "(\\.(\\d+|\\*))"; //$NON-NLS-1$
+
+	/**
+	 * Optional length pattern. Quoted from Wikipedia:
+	 * 
+	 * Length can be omitted or be any of: <strong>
+	 * <ul>
+	 * <li>'hh' : For integer types, causes printf to expect an int sized
+	 * integer argument which was promoted from a char.
+	 * <li>'h' : For integer types, causes printf to expect a int sized integer
+	 * argument which was promoted from a short.
+	 * <li>'l' : (ell) For integer types, causes printf to expect a long sized
+	 * integer argument.
+	 * <li>'ll' : (ell ell) For integer types, causes printf to expect a long
+	 * long sized integer argument.
+	 * <li>'L' : For floating point types, causes printf to expect a long double
+	 * argument.
+	 * <li>'z' : For integer types, causes printf to expect a size_t sized
+	 * integer argument.
+	 * <li>'j' : For integer types, causes printf to expect a intmax_t sized
+	 * integer argument.
+	 * <li>'t' : For integer types, causes printf to expect a ptrdiff_t sized
+	 * integer argument.
+	 * </ul>
+	 * </strong>
+	 */
+	private final static String LENGTH_PATTERN = "([lh]?[hHlLZjt])"; //$NON-NLS-1$
+
+	/**
+	 * Type pattern. Quoted from Wikipedia:
+	 * 
+	 * <strong> type can be any of:
+	 * <ul>
+	 * <li>'d', 'i' : Print an int as a signed decimal number. '%d' and '%i' are
+	 * synonymous for output, but are different when used with scanf() for
+	 * input.
+	 * <li>'u' : Print decimal unsigned int.
+	 * <li>'f', 'F' : Print a double in normal (fixed-point) notation.
+	 * <li>'e', 'E' : Print a double value in standard form ([-]d.ddd
+	 * e[+/-]ddd).
+	 * <li>'g', 'G' : Print a double in either normal or exponential notation,
+	 * whichever is more appropriate for its magnitude. 'g' uses lower-case
+	 * letters, 'G' uses upper-case letters. This type differs slightly from
+	 * fixed-point notation in that insignificant zeroes to the right of the
+	 * decimal point are not included. Also, the decimal point is not included
+	 * on whole numbers.
+	 * <li>'x', 'X' : Print an unsigned int as a hexadecimal number. 'x' uses
+	 * lower-case letters and 'X' uses upper-case.
+	 * <li>'o' : Print an unsigned int in octal.
+	 * <li>'s' : Print a character string.
+	 * <li>'c' : Print a char (character).
+	 * <li>'p' : Print a void * (pointer to void) in an implementation-defined
+	 * format.
+	 * <li>'n' : Write number of characters successfully written so far into an
+	 * integer pointer parameter.
+	 * <li>'%' : Print a literal '%' character (this type doesn't accept any
+	 * flags, width, precision or length).
+	 * </ul>
+	 * </strong>
+	 * 
+	 * The pattern itself accepts all characters and the validity check is done
+	 * in {@link #mapFormatToParameterType mapFormatToType}
+	 */
+	private final static String TYPE_PATTERN = "([a-zA-Z%])"; //$NON-NLS-1$
+
+	/**
+	 * Regular expression pattern for printf
+	 * 
+	 * %[parameter][flags][width][.precision][length]type
+	 */
+	private static final String STANDARD_PRINTF_PATTERN = PARAMETER_PATTERN
+			+ OPTIONAL_TAG + FLAGS_PATTERN + OPTIONAL_TAG + WIDTH_PATTERN
+			+ OPTIONAL_TAG + PRECISION_PATTERN + OPTIONAL_TAG + LENGTH_PATTERN
+			+ OPTIONAL_TAG + TYPE_PATTERN;
+
+	/**
+	 * Regular expression pattern for Open System Trace printf extensions
+	 * %{Type}, %{Array[]}
+	 */
+	private static final String EXTENSION_PRINTF_PATTERN = "\\{[\\w_]+(\\[\\])?\\}"; //$NON-NLS-1$
+
+	/**
+	 * Regular expression pattern for printf
+	 */
+	public static final String PRINTF_PATTERN = START_TAG + "((" //$NON-NLS-1$
+			+ STANDARD_PRINTF_PATTERN + ")|(" //$NON-NLS-1$
+			+ EXTENSION_PRINTF_PATTERN + "))"; //$NON-NLS-1$
+
+	/**
+	 * The pattern for printf-formatted trace text
+	 */
+	public final static Pattern traceTextPattern = Pattern
+			.compile(PRINTF_PATTERN);
+
+	/**
+	 * The pattern for parameter length in printf specifier
+	 */
+	public final static Pattern lengthPattern = Pattern.compile(LENGTH_PATTERN);
+
+	/**
+	 * Hidden constructor
+	 */
+	private SourceUtils() {
+	}
+
+	/**
+	 * Creates a header guard
+	 * 
+	 * @param fileName
+	 *            the name of the file
+	 * @return the header guard
+	 */
+	public static String createHeaderGuard(String fileName) {
+		StringBuffer sb = new StringBuffer();
+		String uname = fileName.replace(SourceConstants.PERIOD_CHAR,
+				SourceConstants.UNDERSCORE_CHAR).toUpperCase();
+		sb.append(SourceConstants.IFNDEF);
+		sb.append(SourceConstants.SPACE);
+		sb.append(SourceConstants.DOUBLE_UNDERSCORE);
+		sb.append(uname);
+		sb.append(SourceConstants.DOUBLE_UNDERSCORE);
+		sb.append(SourceConstants.LINE_FEED);
+		sb.append(SourceConstants.DEFINE);
+		sb.append(SourceConstants.SPACE);
+		sb.append(SourceConstants.DOUBLE_UNDERSCORE);
+		sb.append(uname);
+		sb.append(SourceConstants.DOUBLE_UNDERSCORE);
+		return sb.toString();
+	}
+
+	/**
+	 * Checks the validity of name
+	 * 
+	 * @param name
+	 *            the name
+	 * @return true if valid
+	 */
+	public static boolean isValidName(String name) {
+		boolean retval;
+		if (name != null && name.length() > 0) {
+			retval = true;
+			if (!isValidNameStartChar(name.charAt(0))) {
+				retval = false;
+			} else {
+				for (int i = 1; i < name.length() && retval; i++) {
+					retval = isValidNameChar(name.charAt(i));
+				}
+			}
+		} else {
+			retval = false;
+		}
+		return retval;
+	}
+
+	/**
+	 * Checks the validity of parameter name
+	 * 
+	 * @param name
+	 *            the name
+	 * @return true if valid
+	 */
+	public static boolean isValidParameterName(String name) {
+		boolean retval;
+		if (name != null && name.length() > 0) {
+			retval = true;
+			if (!isValidNameStartChar(name.charAt(0))) {
+				retval = false;
+			} else {
+				for (int i = 1; i < name.length() && retval; i++) {
+
+					// Check validity of the character
+					char c = name.charAt(i);
+					retval = (isValidNameChar(c) || isValidSpecialChar(c));
+				}
+			}
+		} else {
+			retval = false;
+		}
+		return retval;
+	}
+
+	/**
+	 * Checks special character validity
+	 * 
+	 * @param c
+	 *            character
+	 * @return true if valid
+	 */
+	private static boolean isValidSpecialChar(char c) {
+		boolean retval = false;
+		// Check if the character is allowed
+		if (c == '.' || c == '-' || c == '>' || c == '(' || c == ')'
+				|| c == '[' || c == ']' || c == ' ' || c == '&' || c == '*') {
+			retval = true;
+		}
+		return retval;
+	}
+
+	/**
+	 * Checks start-of-name character validity
+	 * 
+	 * @param c
+	 *            character
+	 * @return true if valid
+	 */
+	private static boolean isValidNameStartChar(char c) {
+		// Ascii characters and underscore are allowed
+		return (c >= 0x41 && c <= 0x5A) || (c >= 0x61 && c <= 0x7A) // CodForChk_Dis_Magic
+				|| c == 0x5F; // CodForChk_Dis_Magic
+	}
+
+	/**
+	 * Checks name character validity
+	 * 
+	 * @param c
+	 *            character
+	 * @return true if valid
+	 */
+	private static boolean isValidNameChar(char c) {
+		// Numbers are allowed in addition to start characters
+		return isValidNameStartChar(c) || (c >= 0x30 && c <= 0x39); // CodForChk_Dis_Magic
+	}
+
+	/**
+	 * Maps a Symbian type to one of the TraceParameter types
+	 * 
+	 * @param parsedType
+	 *            the type parsed from source
+	 * @return the parameter type
+	 */
+	public static TypeMapping mapSymbianTypeToParameterType(
+			ParsedType parsedType) {
+		String type = null;
+		// The type map contains Symbian types
+		for (int i = 0; i < SymbianConstants.PARAMETER_TYPE_MAP.length
+				&& type == null; i++) {
+			if (parsedType
+					.typeEquals(SymbianConstants.PARAMETER_TYPE_MAP[i][0])) {
+				type = SymbianConstants.PARAMETER_TYPE_MAP[i][1];
+			}
+		}
+		if (type != null) {
+			if (parsedType.hasQualifier(SourceConstants.UNSIGNED)) {
+				type = convertToUnsigned(type);
+			}
+		}
+		TypeMapping retval = new TypeMapping(type);
+		if (type != null) {
+			// Value or a reference can be added to source as is
+			// Points needs to be cast to HEX32
+			if (parsedType.isPointer()) {
+				retval.type = TraceParameter.HEX32;
+				retval.needsCasting = true;
+			} else {
+				// TUint32 needs to be cast to TUint and TInt32 to TInt.
+				// Otherwise there will be some problems with extension
+				// headers
+				if (parsedType.typeEquals(SymbianConstants.TUINT32)
+						|| parsedType.typeEquals(SymbianConstants.TINT32)) {
+					retval.needsCasting = true;
+				}
+			}
+		} else if (parsedType.isPointer()) {
+			// Unrecognized pointer types are cast to Hex32
+			retval.type = TraceParameter.HEX32;
+			retval.needsCasting = true;
+		} else {
+			// Unrecognized value types are passed as pointer and cast to Hex32
+			retval.type = TraceParameter.HEX32;
+			retval.valueToPointer = true;
+			retval.needsCasting = true;
+		}
+		return retval;
+	}
+
+	/**
+	 * Maps the type of a parameter to a Symbian type
+	 * 
+	 * @param parameter
+	 *            the parameter
+	 * @return the parameter type as string
+	 */
+	public static String mapParameterTypeToSymbianType(TraceParameter parameter) {
+		String retval;
+		ArrayParameterRule rule = parameter
+				.getExtension(ArrayParameterRule.class);
+		String type = parameter.getType();
+		TraceConstantTable table = parameter.getModel()
+				.findConstantTableByName(type);
+		if (table != null) {
+			type = table.getType();
+		}
+		if (rule != null) {
+			retval = mapArrayTypeToSymbianType(type);
+		} else {
+			retval = mapBasicTypeToSymbianType(type);
+		}
+		return retval;
+	}
+
+	/**
+	 * Maps a basic parameter type to Symbian type
+	 * 
+	 * @param type
+	 *            the parameter type
+	 * @return the Symbian type
+	 */
+	public static String mapBasicTypeToSymbianType(String type) {
+		String retval;
+		// Unsigned and hex both use TUint types
+		// Signed uses TInt types
+		if (type.equals(TraceParameter.POINTER)) {
+			retval = SymbianConstants.CONST_TANY_PTR;
+		} else if (type.equals(TraceParameter.SDEC32)) {
+			retval = SymbianConstants.TINT;
+		} else if (type.equals(TraceParameter.UDEC32)
+				|| type.equals(TraceParameter.OCT32)
+				|| type.equals(TraceParameter.HEX32)) {
+			retval = SymbianConstants.TUINT;
+		} else if (type.equals(TraceParameter.SDEC16)) {
+			retval = SymbianConstants.TINT16;
+		} else if (type.equals(TraceParameter.UDEC16)
+				|| type.equals(TraceParameter.OCT16)
+				|| type.equals(TraceParameter.HEX16)) {
+			retval = SymbianConstants.TUINT16;
+		} else if (type.equals(TraceParameter.SDEC8)) {
+			retval = SymbianConstants.TINT8;
+		} else if (type.equals(TraceParameter.UDEC8)
+				|| type.equals(TraceParameter.OCT8)
+				|| type.equals(TraceParameter.HEX8)) {
+			retval = SymbianConstants.TUINT8;
+		} else if (type.equals(TraceParameter.SDEC64)
+				|| type.equals(TraceParameter.TIME)) {
+			retval = SymbianConstants.TINT64;
+		} else if (type.equals(TraceParameter.UDEC64)
+				|| type.equals(TraceParameter.OCT64)
+				|| type.equals(TraceParameter.HEX64)) {
+			retval = SymbianConstants.TUINT64;
+		} else if (type.equals(TraceParameter.ASCII)) {
+			retval = SymbianConstants.CONST_TDESC8_REF;
+		} else if (type.equals(TraceParameter.UNICODE)) {
+			retval = SymbianConstants.CONST_TDESC16_REF;
+		} else if (type.equals(TraceParameter.FLOAT_EXP)
+				|| type.equals(TraceParameter.FLOAT_FIX)
+				|| type.equals(TraceParameter.FLOAT_OPT)) {
+			retval = SymbianConstants.TREAL;
+		} else {
+			retval = SymbianConstants.TANY_PTR;
+		}
+		return retval;
+	}
+
+	/**
+	 * Maps an array parameter type to Symbian type
+	 * 
+	 * @param type
+	 *            the parameter type
+	 * @return the Symbian type
+	 */
+	public static String mapArrayTypeToSymbianType(String type) {
+		String basic = mapBasicTypeToSymbianType(type);
+		String retval = SourceConstants.OST_ARRAY_TYPE_PREFIX + basic
+				+ SourceConstants.OST_ARRAY_TYPE_POSTFIX;
+		return retval;
+	}
+
+	/**
+	 * Maps a format specifier into parameter type
+	 * 
+	 * @param formatSpecifier
+	 *            the format specifier
+	 * @return the parameter type or null if not recognized. If the type is one
+	 *         of the supported TraceParameter types, the string contains the
+	 *         integer value of the type
+	 * @throws TraceCompilerException
+	 *             if format specifier is not valid
+	 */
+	public static FormatMapping mapFormatToParameterType(String formatSpecifier)
+			throws TraceCompilerException {
+		String type;
+		boolean array = false;
+		boolean basic = false;
+		boolean extended = false;
+		int len = formatSpecifier.length();
+		// Extension format is checked first: %{x}
+		if (len > 3 && formatSpecifier.charAt(1) == '{' // CodForChk_Dis_Magic
+				&& formatSpecifier.charAt(len - 1) == '}') {
+			// Extension format can be an array: %{x[]}
+			// In that case it could also be a basic type
+			if (len > 3 + ARRAY_TAG.length() // CodForChk_Dis_Magic
+					&& formatSpecifier.charAt(len - 3) == '[' // CodForChk_Dis_Magic
+					&& formatSpecifier.charAt(len - 2) == ']') { // CodForChk_Dis_Magic
+				type = formatSpecifier.substring(2, len - 1 // CodForChk_Dis_Magic
+						- ARRAY_TAG.length());
+				array = true;
+				if (isStringType(type)) {
+					StringErrorParameters param = new StringErrorParameters();
+					param.string = type;
+					throw new TraceCompilerException(
+							TraceCompilerErrorCode.PARAMETER_FORMAT_NOT_SUPPORTED_IN_ARRAY,
+							param, null);
+				}
+			} else {
+				type = formatSpecifier.substring(2, len - 1); // CodForChk_Dis_Magic
+			}
+			extended = !isBasicType(type);
+		} else {
+			basic = true;
+			type = formatSpecifier;
+		}
+				
+		if (basic) {
+			type = mapBasicFormatToType(formatSpecifier);
+		}
+		if (type == null) {
+			StringErrorParameters params = new StringErrorParameters();
+			params.string = formatSpecifier;
+			throw new TraceCompilerException(
+					TraceCompilerErrorCode.PARAMETER_FORMAT_NOT_SUPPORTED,
+					params, null);
+		}
+		FormatMapping retval = new FormatMapping(type);
+		retval.isArray = array;
+		if (extended) {
+			// In case of extended types, a constant table can still be
+			// represented with normal trace macros.
+			TraceConstantTable table = TraceCompilerEngineGlobals.getTraceModel()
+					.findConstantTableByName(retval.type);
+			if (table != null) {
+				if (!array && isSimpleType(table.getType())) {
+					retval.isSimple = true;
+				}
+			} else {
+				// Extended type must be found from the property file
+				StringErrorParameters params = new StringErrorParameters();
+				params.string = formatSpecifier;
+				throw new TraceCompilerException(
+						TraceCompilerErrorCode.PARAMETER_FORMAT_NOT_SUPPORTED,
+						params, null);
+			}
+		} else if (!retval.isArray) {
+			retval.isSimple = isSimpleType(type);
+		}
+				
+		return retval;
+	}
+
+	/**
+	 * Maps basic format specifies to parameter type
+	 * 
+	 * @param formatSpecifier
+	 *            the format specifies
+	 * @return the type
+	 * @throws TraceCompilerException
+	 *             if mapping cannot be done
+	 */
+	private static String mapBasicFormatToType(String formatSpecifier)
+			throws TraceCompilerException { // CodForChk_Dis_ComplexFunc
+		String type;
+		int paramLength = SourceUtils
+				.mapFormatToParameterLength(formatSpecifier);
+		char formatChar = formatSpecifier.charAt(formatSpecifier.length() - 1);
+		switch (formatChar) {
+		case 'd':
+			type = SourceUtils.mapSignedToParameterType(paramLength);
+			break;
+		case 'x':
+		case 'X':
+			type = SourceUtils.mapHexToParameterType(paramLength);
+			break;
+		case 'u':
+			type = SourceUtils.mapUnsignedToParameterType(paramLength);
+			break;
+		case 'o':
+			type = SourceUtils.mapOctalToParameterType(paramLength);
+			break;
+		case 's':
+			type = TraceParameter.ASCII;
+			break;
+		case 'S': // Symbian extension
+			type = TraceParameter.UNICODE;
+			break;
+		case 'c':
+			type = TraceParameter.SDEC8;
+			break;
+		case 'p':
+			type = TraceParameter.POINTER;
+			break;
+		case 'f':
+		case 'F':
+			type = TraceParameter.FLOAT_FIX;
+			break;
+		case 'e':
+		case 'E':
+			type = TraceParameter.FLOAT_EXP;
+			break;
+		case 'g':
+		case 'G':
+			type = TraceParameter.FLOAT_OPT;
+			break;
+		default:
+			type = null;
+		}
+
+		return type;
+	}
+
+	/**
+	 * Maps a parameter type to format string
+	 * 
+	 * @param parameter
+	 *            the parameter
+	 * @return the format string
+	 */
+	public static String mapParameterTypeToFormat(TraceParameter parameter) {
+		String tag;
+		if (parameter.getExtension(ArrayParameterRule.class) != null) {
+			tag = mapArrayTypeToFormat(parameter.getType());
+		} else {
+			tag = mapNormalTypeToFormat(parameter.getType());
+		}
+		return tag;
+	}
+
+	/**
+	 * Maps an array type to basic type
+	 * 
+	 * @param arrayType
+	 *            the array type
+	 * @return the basic type or null if original type is not array type
+	 */
+	public static String mapArrayTypeToBasicType(String arrayType) {
+		String retval;
+		if (arrayType.endsWith(ARRAY_TAG)) {
+			retval = arrayType.substring(0, arrayType.length()
+					- ARRAY_TAG.length());
+		} else {
+			retval = null;
+		}
+		return retval;
+	}
+
+	/**
+	 * Parses a numeric value from source
+	 * 
+	 * @param number
+	 *            the number as string
+	 * @return the value
+	 */
+	public static int parseNumberFromSource(String number) {
+		int ret;
+		String low = number.toLowerCase();
+		int radix;
+		if (low.startsWith(SourceConstants.HEX_PREFIX)) {
+			radix = 16; // CodForChk_Dis_Magic
+			low = low.substring(SourceConstants.HEX_PREFIX.length());
+		} else if (low.startsWith(SourceConstants.OCTAL_PREFIX)
+				&& low.length() > SourceConstants.OCTAL_PREFIX.length()
+				&& Character.isDigit(low.charAt(SourceConstants.OCTAL_PREFIX
+						.length()))) {
+			radix = 8; // CodForChk_Dis_Magic
+			low = low.substring(SourceConstants.OCTAL_PREFIX.length());
+		} else {
+			radix = 10; // CodForChk_Dis_Magic
+		}
+		if (low.endsWith(SourceConstants.I64_POSTFIX)) {
+			low = low.substring(0, low.length()
+					- SourceConstants.I64_POSTFIX.length());
+		}
+		if (low.length() > 0) {
+			// Removes U / L characters from the end of value
+			int index = low.length() - 1;
+			boolean complete = false;
+			do {
+				char c = low.charAt(index);
+				if (c == 'u' || c == 'l') {
+					index--;
+				} else {
+					complete = true;
+				}
+			} while (!complete && index >= 0);
+			if (index < low.length() - 1 && index > 0) {
+				low = low.substring(0, index + 1);
+			}
+			ret = Integer.parseInt(low, radix);
+		} else {
+			ret = 0;
+		}
+		return ret;
+	}
+
+	/**
+	 * Calculates the size of parameter
+	 * 
+	 * @param parameter
+	 *            the parameter
+	 * @return the parameter size or 0 if the size is not known at compile time
+	 */
+	public static int mapParameterTypeToSize(TraceParameter parameter) {
+		int retval;
+		ArrayParameterRule rule = parameter
+				.getExtension(ArrayParameterRule.class);
+		if (rule != null) {
+			// Array parameters are dynamic
+			retval = 0;
+		} else {
+			String type = parameter.getType();
+			TraceConstantTable table = parameter.getModel()
+					.findConstantTableByName(type);
+			if (table != null) {
+				type = table.getType();
+			}
+			retval = mapParameterTypeToSize(type);
+		}
+		return retval;
+	}
+
+	/**
+	 * Calculates the size of parameter type
+	 * 
+	 * @param type
+	 *            the parameter type
+	 * @return the parameter size or 0 if size is not known at compile time
+	 */
+	public static int mapParameterTypeToSize(String type) {
+		int retval;
+		if (type.equals(TraceParameter.HEX32)
+				|| type.equals(TraceParameter.UDEC32)
+				|| type.equals(TraceParameter.SDEC32)
+				|| type.equals(TraceParameter.OCT32)
+				|| type.equals(TraceParameter.POINTER)) {
+			retval = 4; // CodForChk_Dis_Magic
+		} else if (type.equals(TraceParameter.HEX16)
+				|| type.equals(TraceParameter.UDEC16)
+				|| type.equals(TraceParameter.SDEC16)
+				|| type.equals(TraceParameter.OCT16)) {
+			retval = 2; // CodForChk_Dis_Magic
+		} else if (type.equals(TraceParameter.HEX8)
+				|| type.equals(TraceParameter.UDEC8)
+				|| type.equals(TraceParameter.SDEC8)
+				|| type.equals(TraceParameter.OCT8)) {
+			retval = 1;
+		} else if (type.equals(TraceParameter.HEX64)
+				|| type.equals(TraceParameter.UDEC64)
+				|| type.equals(TraceParameter.SDEC64)
+				|| type.equals(TraceParameter.OCT64)
+				|| type.equals(TraceParameter.FLOAT_EXP)
+				|| type.equals(TraceParameter.FLOAT_FIX)
+				|| type.equals(TraceParameter.FLOAT_OPT)) {
+			retval = 8; // CodForChk_Dis_Magic
+		} else {
+			retval = 0;
+		}
+		return retval;
+	}
+
+	/**
+	 * Removes printf formatting from trace text
+	 * 
+	 * @param text
+	 *            the text to be converted
+	 * @return the new text
+	 */
+	public static String removePrintfFormatting(String text) {
+		Matcher matcher = traceTextPattern.matcher(text);
+		return matcher.replaceAll(""); //$NON-NLS-1$
+	}
+
+	/**
+	 * Converts the given type to unsigned type
+	 * 
+	 * @param type
+	 *            the type
+	 * @return unsigned type
+	 */
+	private static String convertToUnsigned(String type) {
+		if (type.equals(TraceParameter.SDEC32)) {
+			type = TraceParameter.UDEC32;
+		} else if (type.equals(TraceParameter.SDEC16)) {
+			type = TraceParameter.UDEC16;
+		} else if (type.equals(TraceParameter.SDEC8)) {
+			type = TraceParameter.UDEC8;
+		} else if (type.equals(TraceParameter.SDEC64)) {
+			type = TraceParameter.UDEC64;
+		}
+		return type;
+	}
+
+	/**
+	 * Maps a normal parameter type for format character
+	 * 
+	 * @param type
+	 *            the parameter type
+	 * @return the format character
+	 */
+	public static String mapNormalTypeToFormat(String type) { // CodForChk_Dis_ComplexFunc
+		String tag;
+		if (type.equals(TraceParameter.SDEC32)) {
+			tag = "%d"; //$NON-NLS-1$
+		} else if (type.equals(TraceParameter.POINTER)) {
+			tag = "%p"; //$NON-NLS-1$
+		} else if (type.equals(TraceParameter.HEX32)) {
+			tag = "%x"; //$NON-NLS-1$
+		} else if (type.equals(TraceParameter.UDEC32)) {
+			tag = "%u"; //$NON-NLS-1$
+		} else if (type.equals(TraceParameter.OCT32)) {
+			tag = "%o"; //$NON-NLS-1$			
+		} else if (type.equals(TraceParameter.SDEC16)) {
+			tag = "%hd"; //$NON-NLS-1$
+		} else if (type.equals(TraceParameter.HEX16)) {
+			tag = "%hx"; //$NON-NLS-1$
+		} else if (type.equals(TraceParameter.UDEC16)) {
+			tag = "%hu"; //$NON-NLS-1$
+		} else if (type.equals(TraceParameter.OCT16)) {
+			tag = "%ho"; //$NON-NLS-1$			
+		} else if (type.equals(TraceParameter.SDEC8)) {
+			tag = "%hhd"; //$NON-NLS-1$
+		} else if (type.equals(TraceParameter.HEX8)) {
+			tag = "%hhx"; //$NON-NLS-1$
+		} else if (type.equals(TraceParameter.UDEC8)) {
+			tag = "%hhu"; //$NON-NLS-1$
+		} else if (type.equals(TraceParameter.OCT8)) {
+			tag = "%hho"; //$NON-NLS-1$			
+		} else if (type.equals(TraceParameter.SDEC64)) {
+			tag = "%Ld"; //$NON-NLS-1$
+		} else if (type.equals(TraceParameter.HEX64)) {
+			tag = "%Lx"; //$NON-NLS-1$
+		} else if (type.equals(TraceParameter.UDEC64)) {
+			tag = "%Lu"; //$NON-NLS-1$
+		} else if (type.equals(TraceParameter.OCT64)) {
+			tag = "%Lo"; //$NON-NLS-1$			
+		} else if (type.equals(TraceParameter.ASCII)) {
+			tag = "%s"; //$NON-NLS-1$
+		} else if (type.equals(TraceParameter.UNICODE)) {
+			tag = "%S"; //$NON-NLS-1$
+		} else if (type.equals(TraceParameter.FLOAT_FIX)) {
+			tag = "%f"; //$NON-NLS-1$
+		} else if (type.equals(TraceParameter.FLOAT_EXP)) {
+			tag = "%e"; //$NON-NLS-1$
+		} else if (type.equals(TraceParameter.FLOAT_OPT)) {
+			tag = "%g"; //$NON-NLS-1$
+		} else {
+			tag = "%{" //$NON-NLS-1$
+					+ type + "}"; //$NON-NLS-1$
+		}
+		return tag;
+	}
+
+	/**
+	 * Maps an array parameter type to format string
+	 * 
+	 * @param type
+	 *            the parameter type
+	 * @return the format string
+	 */
+	public static String mapArrayTypeToFormat(String type) {
+		String tag = "%{" //$NON-NLS-1$
+				+ type + "[]}"; //$NON-NLS-1$
+		return tag;
+	}
+
+	/**
+	 * Maps format specifier to parameter length
+	 * 
+	 * @param formatSpecifier
+	 *            the specifier
+	 * @return the length
+	 * @throws TraceCompilerException
+	 *             if length is not valid
+	 */
+	public static int mapFormatToParameterLength(String formatSpecifier)
+			throws TraceCompilerException {
+		Matcher matcher = SourceUtils.lengthPattern.matcher(formatSpecifier);
+		int paramLength = 0;
+		if (matcher.find()) {
+			String length = matcher.group();
+
+			if (length.length() == 2) { // CodForChk_Dis_Magic
+				if (length.charAt(0) == 'h' && length.charAt(1) == 'h') {
+					paramLength = SourceConstants.BYTE_SIZE;
+				} else if (length.charAt(0) == 'l' && length.charAt(1) == 'l') {
+					paramLength = SourceConstants.LONG_SIZE;
+				} else {
+					StringErrorParameters params = new StringErrorParameters();
+					params.string = formatSpecifier;
+					throw new TraceCompilerException(
+							TraceCompilerErrorCode.PARAMETER_FORMAT_NOT_SUPPORTED,
+							params, null);
+				}
+			} else if (length.length() == 1) {
+				switch (length.charAt(0)) {
+				case 'h':
+					paramLength = SourceConstants.SHORT_SIZE;
+					break;
+				case 'l':
+					paramLength = SourceConstants.INT_SIZE;
+					break;
+				case 'L':
+					paramLength = SourceConstants.LONG_SIZE;
+					break;
+				default:
+					StringErrorParameters params = new StringErrorParameters();
+					params.string = formatSpecifier;
+					throw new TraceCompilerException(
+							TraceCompilerErrorCode.PARAMETER_FORMAT_NOT_SUPPORTED,
+							params, null);
+				}
+			} else {
+				throw new TraceCompilerException(
+						TraceCompilerErrorCode.INVALID_TRACE_TEXT_FORMAT, null,
+						formatSpecifier);
+			}
+		}
+
+		return paramLength;
+	}
+
+	/**
+	 * Maps signed parameter length to type
+	 * 
+	 * @param paramLength
+	 *            the length
+	 * @return the type
+	 */
+	private static String mapSignedToParameterType(int paramLength) {
+		String retval;
+		if (paramLength == SourceConstants.BYTE_SIZE) {
+			retval = TraceParameter.SDEC8;
+		} else if (paramLength == SourceConstants.SHORT_SIZE) {
+			retval = TraceParameter.SDEC16;
+		} else if (paramLength == SourceConstants.LONG_SIZE) {
+			retval = TraceParameter.SDEC64;
+		} else {
+			retval = TraceParameter.SDEC32;
+		}
+		return retval;
+	}
+
+	/**
+	 * Maps unsigned parameter length to type
+	 * 
+	 * @param paramLength
+	 *            the length
+	 * @return the type
+	 */
+	public static String mapUnsignedToParameterType(int paramLength) {
+		String retval;
+		if (paramLength == SourceConstants.BYTE_SIZE) {
+			retval = TraceParameter.UDEC8;
+		} else if (paramLength == SourceConstants.SHORT_SIZE) {
+			retval = TraceParameter.UDEC16;
+		} else if (paramLength == SourceConstants.LONG_SIZE) {
+			retval = TraceParameter.UDEC64;
+		} else {
+			retval = TraceParameter.UDEC32;
+		}
+		return retval;
+	}
+
+	/**
+	 * Maps hex parameter length to type
+	 * 
+	 * @param paramLength
+	 *            the length
+	 * @return the type
+	 */
+	public static String mapHexToParameterType(int paramLength) {
+		String retval;
+		if (paramLength == SourceConstants.BYTE_SIZE) {
+			retval = TraceParameter.HEX8;
+		} else if (paramLength == SourceConstants.SHORT_SIZE) {
+			retval = TraceParameter.HEX16;
+		} else if (paramLength == SourceConstants.LONG_SIZE) {
+			retval = TraceParameter.HEX64;
+		} else {
+			retval = TraceParameter.HEX32;
+		}
+		return retval;
+	}
+
+	/**
+	 * Maps octal parameter length to type
+	 * 
+	 * @param paramLength
+	 *            the length
+	 * @return the type
+	 */
+	public static String mapOctalToParameterType(int paramLength) {
+		String retval;
+		if (paramLength == SourceConstants.BYTE_SIZE) {
+			retval = TraceParameter.OCT8;
+		} else if (paramLength == SourceConstants.SHORT_SIZE) {
+			retval = TraceParameter.OCT16;
+		} else if (paramLength == SourceConstants.LONG_SIZE) {
+			retval = TraceParameter.OCT64;
+		} else {
+			retval = TraceParameter.OCT32;
+		}
+
+		return retval;
+	}
+
+	/**
+	 * Checks if the parameter can be represented with default trace macros
+	 * 
+	 * @param parameter
+	 *            the parameter
+	 * @return true if parameter can be represented with default trace macros
+	 */
+	public static boolean isSimpleType(TraceParameter parameter) {
+		boolean retval;
+		if (parameter.getExtension(ArrayParameterRule.class) != null) {
+			// Arrays are always complex types
+			retval = false;
+		} else {
+			String type = parameter.getType();
+			TraceConstantTable table = parameter.getModel()
+					.findConstantTableByName(type);
+			if (table != null) {
+				type = table.getType();
+			}
+			retval = isSimpleType(type);
+		}
+		return retval;
+	}
+
+	/**
+	 * Simple type is 32-bit integer
+	 * 
+	 * @param type
+	 *            the type
+	 * @return true if simple, false if not
+	 */
+	private static boolean isSimpleType(String type) {
+		return type.equals(TraceParameter.SDEC32)
+				|| type.equals(TraceParameter.UDEC32)
+				|| type.equals(TraceParameter.OCT32)
+				|| type.equals(TraceParameter.HEX32);
+	}
+
+	/**
+	 * String type is either ascii or unicode
+	 * 
+	 * @param type
+	 *            the type
+	 * @return true if string, false if not
+	 */
+	private static boolean isStringType(String type) {
+		return type.equals(TraceParameter.ASCII)
+				|| type.equals(TraceParameter.UNICODE);
+	}
+
+	/**
+	 * Basic type is any of the built-in TraceParameter types
+	 * 
+	 * @param type
+	 *            the type
+	 * @return true if basic, false if not
+	 */
+	private static boolean isBasicType(String type) {
+		return isSimpleType(type) || type.equals(TraceParameter.SDEC8)
+				|| type.equals(TraceParameter.SDEC16)
+				|| type.equals(TraceParameter.UDEC8)
+				|| type.equals(TraceParameter.UDEC16)
+				|| type.equals(TraceParameter.OCT16)
+				|| type.equals(TraceParameter.HEX8)
+				|| type.equals(TraceParameter.HEX16)
+				|| type.equals(TraceParameter.SDEC64)
+				|| type.equals(TraceParameter.UDEC64)
+				|| type.equals(TraceParameter.OCT64)
+				|| type.equals(TraceParameter.HEX64)
+				|| type.equals(TraceParameter.ASCII)
+				|| type.equals(TraceParameter.UNICODE)
+				|| type.equals(TraceParameter.FLOAT_EXP)
+				|| type.equals(TraceParameter.FLOAT_FIX)
+				|| type.equals(TraceParameter.FLOAT_OPT)
+				|| type.equals(TraceParameter.POINTER);
+	}
+
+	/**
+	 * Checks if parameter size is dynamic
+	 * 
+	 * @param parameter
+	 *            the parameter to be checked
+	 * @return true if dynamic size
+	 */
+	public static boolean isParameterSizeDynamic(TraceParameter parameter) {
+		String type = parameter.getType();
+		ArrayParameterRule rule = parameter
+				.getExtension(ArrayParameterRule.class);
+		return rule != null || type.equals(TraceParameter.ASCII)
+				|| type.equals(TraceParameter.UNICODE);
+	}
+
+	/**
+	 * Checks if alignment is needed
+	 * 
+	 * @param type
+	 *            the parameter type
+	 * @return true if alignment is needed
+	 */
+	public static boolean isParameterAlignementNeeded(String type) {
+		int size = SourceUtils.mapParameterTypeToSize(type);
+		boolean retval = false;
+		if (size == 1 || size == 2) { // CodForChk_Dis_Magic
+			// 8 and 16-bit parameters need alignment
+			retval = true;
+		} else if (isStringType(type)) {
+			retval = true;
+		}
+		return retval;
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/SymbianConstants.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,241 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Constants related to Symbian sources
+*
+*/
+package com.nokia.tracecompiler.source;
+
+import com.nokia.tracecompiler.model.TraceParameter;
+
+/**
+ * Constants related to Symbian sources
+ * 
+ */
+public interface SymbianConstants {
+
+	/**
+	 * Include directory
+	 */
+	final String INCLUDE_DIRECTORY = "inc"; //$NON-NLS-1$
+
+	/**
+	 * Source directory
+	 */
+	final String SOURCE_DIRECTORY = "src"; //$NON-NLS-1$
+
+	/**
+	 * Group directory
+	 */
+	final String GROUP_DIRECTORY = "group"; //$NON-NLS-1$
+
+	/**
+	 * Mmpfiles directory
+	 */
+	final String MMPFILES_DIRECTORY = "mmpfiles"; //$NON-NLS-1$
+	
+	/**
+	 * ETrue
+	 */
+	final String ETRUE = "ETrue"; //$NON-NLS-1$
+
+	/**
+	 * EFalse
+	 */
+	final String EFALSE = "EFalse"; //$NON-NLS-1$
+
+	/**
+	 * TBool
+	 */
+	final String TBOOL = "TBool"; //$NON-NLS-1$
+
+	/**
+	 * TInt
+	 */
+	final String TINT = "TInt"; //$NON-NLS-1$
+
+	/**
+	 * TUint
+	 */
+	final String TUINT = "TUint"; //$NON-NLS-1$
+
+	/**
+	 * TInt64
+	 */
+	final String TINT64 = "TInt64"; //$NON-NLS-1$
+
+	/**
+	 * TUint64
+	 */
+	final String TUINT64 = "TUint64"; //$NON-NLS-1$
+
+	/**
+	 * TTime
+	 */
+	final String TTIME = "TTime"; //$NON-NLS-1$
+
+	/**
+	 * TInt32
+	 */
+	final String TINT32 = "TInt32"; //$NON-NLS-1$
+
+	/**
+	 * TUint32
+	 */
+	final String TUINT32 = "TUint32"; //$NON-NLS-1$
+
+	/**
+	 * TInt16
+	 */
+	final String TINT16 = "TInt16"; //$NON-NLS-1$
+
+	/**
+	 * TUint16
+	 */
+	final String TUINT16 = "TUint16"; //$NON-NLS-1$
+
+	/**
+	 * TInt8
+	 */
+	final String TINT8 = "TInt8"; //$NON-NLS-1$
+
+	/**
+	 * TUint8
+	 */
+	final String TUINT8 = "TUint8"; //$NON-NLS-1$
+
+	/**
+	 * TAny
+	 */
+	final String TANY = "TAny"; //$NON-NLS-1$
+
+	/**
+	 * TAny*
+	 */
+	final String TANY_PTR = "TAny*"; //$NON-NLS-1$
+	
+	/**
+	 * const TAny*
+	 */
+	final String CONST_TANY_PTR = "const TAny*"; //$NON-NLS-1$
+
+	/**
+	 * TDes8
+	 */
+	final String TDES8 = "TDes8"; //$NON-NLS-1$
+
+	/**
+	 * TDesC8
+	 */
+	final String TDESC8 = "TDesC8"; //$NON-NLS-1$
+
+	/**
+	 * TDes16
+	 */
+	final String TDES16 = "TDes16"; //$NON-NLS-1$
+
+	/**
+	 * TDesC16
+	 */
+	final String TDESC16 = "TDesC16"; //$NON-NLS-1$
+
+	/**
+	 * TDes
+	 */
+	final String TDES = "TDes"; //$NON-NLS-1$
+
+	/**
+	 * TDesC
+	 */
+	final String TDESC = "TDesC"; //$NON-NLS-1$
+
+	/**
+	 * TPtr8
+	 */
+	final String TPTR8 = "TPtr8"; //$NON-NLS-1$
+
+	/**
+	 * TPtrC8
+	 */
+	final String TPTRC8 = "TPtrC8"; //$NON-NLS-1$
+
+	/**
+	 * TPtr16
+	 */
+	final String TPTR16 = "TPtr16"; //$NON-NLS-1$
+
+	/**
+	 * TPtrC16
+	 */
+	final String TPTRC16 = "TPtrC16"; //$NON-NLS-1$
+
+	/**
+	 * TPtr
+	 */
+	final String TPTR = "TPtr"; //$NON-NLS-1$
+
+	/**
+	 * TPtrC
+	 */
+	final String TPTRC = "TPtrC"; //$NON-NLS-1$
+
+	/**
+	 * TReal
+	 */
+	final String TREAL = "TReal"; //$NON-NLS-1$
+
+	/**
+	 * const TDesC8&
+	 */
+	final String CONST_TDESC8_REF = "const TDesC8&"; //$NON-NLS-1$
+
+	/**
+	 * const TDesC8&
+	 */
+	final String CONST_TDESC16_REF = "const TDesC16&"; //$NON-NLS-1$
+
+	/**
+	 * Prefix for all parameters generated into header files
+	 */
+	final String PARAMETER_DECLARATION_PREFIX = "aParam"; //$NON-NLS-1$
+
+	/**
+	 * __KERNEL_MODE__
+	 */
+	final String KERNEL_MODE = "__KERNEL_MODE__"; //$NON-NLS-1$
+
+	/**
+	 * Symbian parameter types mapped to TraceParameter types
+	 */
+	final String PARAMETER_TYPE_MAP[][] = { { TANY, null },
+			{ SourceConstants.VOID, null }, { TINT, TraceParameter.SDEC32 },
+			{ TINT32, TraceParameter.SDEC32 },
+			{ TBOOL, TraceParameter.SDEC32 },
+			{ SourceConstants.INT, TraceParameter.SDEC32 },
+			{ SourceConstants.LONG, TraceParameter.SDEC32 },
+			{ TUINT, TraceParameter.UDEC32 },
+			{ TUINT32, TraceParameter.UDEC32 },
+			{ TINT16, TraceParameter.SDEC16 },
+			{ SourceConstants.SHORT, TraceParameter.SDEC16 },
+			{ TUINT16, TraceParameter.UDEC16 },
+			{ TINT8, TraceParameter.SDEC8 },
+			{ SourceConstants.CHAR, TraceParameter.SDEC8 },
+			{ TUINT8, TraceParameter.UDEC8 },
+			{ TINT64, TraceParameter.SDEC64 },
+			{ TTIME, TraceParameter.TIME },
+			{ TUINT64, TraceParameter.UDEC64 },
+			{ TREAL, TraceParameter.FLOAT_FIX } };
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/TokenizerSearchData.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,87 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Contains search variables during SourceParameterTokenizer.tokenizeParameters call
+*
+*/
+package com.nokia.tracecompiler.source;
+
+/**
+ * Contains search variables during SourceParameterTokenizer.tokenizeParameters
+ * call
+ * 
+ */
+final class TokenizerSearchData {
+
+	/**
+	 * Iterator over source characters
+	 */
+	SourceIterator itr;
+
+	/**
+	 * Current character
+	 */
+	char value;
+
+	/**
+	 * Previous character
+	 */
+	char previousValue = ' ';
+
+	/**
+	 * Number of '(' encountered without matching ')' character
+	 */
+	int openBracketCount;
+
+	/**
+	 * Index for start of parameter
+	 */
+	int tagStartIndex;
+
+	/**
+	 * Index for start of parameter
+	 */
+	int paramStartIndex;
+
+	/**
+	 * Initial count of '(' characters at beginning of parameter
+	 */
+	int initialBracketCount;
+
+	/**
+	 * Closing ')' character has been found.
+	 */
+	boolean complete;
+
+	/**
+	 * Ending ';' or '{' character has been found
+	 */
+	boolean endFound;
+
+	/**
+	 * Within quotes flag
+	 */
+	boolean inQuotes;
+
+	/**
+	 * Parameter definition object
+	 */
+	SourceParameter sourceParameter;
+
+	/**
+	 * Data flag
+	 */
+	boolean hasData;
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/TypeMapping.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,62 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Source to parameter type mapping
+*
+*/
+package com.nokia.tracecompiler.source;
+
+/**
+ * Type returned by
+ * {@link SourceUtils#mapSymbianTypeToParameterType(ParsedType)}
+ * 
+ */
+public final class TypeMapping {
+
+	/**
+	 * Parameter type
+	 */
+	public String type;
+
+	/**
+	 * Explicit casting needs to be used when calling trace function
+	 */
+	public boolean needsCasting;
+
+	/**
+	 * Value is changed to pointer before passing to trace function
+	 */
+	public boolean valueToPointer;
+
+	/**
+	 * Contructor
+	 * 
+	 * @param type
+	 *            the parameter type
+	 */
+	public TypeMapping(String type) {
+		this.type = type;
+	}
+
+	/**
+	 * Checks if type is void
+	 * 
+	 * @return true if type is void
+	 */
+	public boolean isVoid() {
+		return type == null;
+	}
+
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/package.html	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,3 @@
+<html><body>
+Contains parsers for source code
+</body></html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/utils/DocumentAdapter.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,130 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Adapter for document interface
+*
+*/
+package com.nokia.tracecompiler.utils;
+
+import com.nokia.tracecompiler.source.SourceDocumentInterface;
+import com.nokia.tracecompiler.source.SourceLocationInterface;
+import com.nokia.tracecompiler.source.SourceParserException;
+import com.nokia.tracecompiler.source.SourcePropertyProvider;
+
+/**
+ * Adapter for document interface
+ * 
+ */
+public class DocumentAdapter implements SourceDocumentInterface {
+
+	/**
+	 * Document owner
+	 */
+	private Object owner;
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.source.SourceDocumentInterface#
+	 *      addLocation(com.nokia.tracecompiler.source.SourceLocationInterface)
+	 */
+	public void addLocation(SourceLocationInterface location) {
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.source.SourceDocumentInterface#get(int, int)
+	 */
+	public String get(int start, int length) throws SourceParserException {
+		return ""; //$NON-NLS-1$
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.source.SourceDocumentInterface#getChar(int)
+	 */
+	public char getChar(int offset) throws SourceParserException {
+		return '\0';
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.source.SourceDocumentInterface#getLength()
+	 */
+	public int getLength() {
+		return 0;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.source.SourceDocumentInterface#
+	 *      getLineOfOffset(int)
+	 */
+	public int getLineOfOffset(int offset) throws SourceParserException {
+		return -1;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.source.SourceDocumentInterface#getOwner()
+	 */
+	public Object getOwner() {
+		return owner;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.source.SourceDocumentInterface#
+	 *      removeLocation(com.nokia.tracecompiler.source.SourceLocationInterface)
+	 */
+	public void removeLocation(SourceLocationInterface location) {
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.source.SourceDocumentInterface#replace(int,
+	 *      int, java.lang.String)
+	 */
+	public void replace(int offset, int length, String newText)
+			throws SourceParserException {
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.source.SourceDocumentInterface#
+	 *      setOwner(java.lang.Object)
+	 */
+	public void setOwner(Object owner) {
+		this.owner = owner;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.source.SourceDocumentInterface#getPropertyProvider()
+	 */
+	public SourcePropertyProvider getPropertyProvider() {
+		return null;
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/utils/DocumentFactory.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,57 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Factory class to create document interfaces
+*
+*/
+package com.nokia.tracecompiler.utils;
+
+import com.nokia.tracecompiler.source.SourceDocumentFactory;
+import com.nokia.tracecompiler.source.SourceDocumentMonitor;
+
+/**
+ * Factory class to create document interfaces
+ * 
+ */
+public final class DocumentFactory {
+
+	/**
+	 * Document monitor
+	 */
+	private static SourceDocumentMonitor monitor;
+
+
+	/**
+	 * Registers a document framework to be used by the engine
+	 * 
+	 * @param monitor
+	 *            the document monitor
+	 * @param factoryClass
+	 *            the document factory class
+	 */
+	public static void registerDocumentFramework(SourceDocumentMonitor monitor,
+			Class<? extends SourceDocumentFactory> factoryClass) {
+		DocumentFactory.monitor = monitor;
+	}
+
+	/**
+	 * Gets the document monitor
+	 * 
+	 * @return the monitor
+	 */
+	public static final SourceDocumentMonitor getDocumentMonitor() {
+		return monitor;
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/utils/DocumentFactoryBase.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,54 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Base class for document factories
+*
+*/
+package com.nokia.tracecompiler.utils;
+
+import com.nokia.tracecompiler.source.SourceDocumentFactory;
+import com.nokia.tracecompiler.source.SourceDocumentInterface;
+import com.nokia.tracecompiler.source.SourceLocationBase;
+import com.nokia.tracecompiler.source.SourceLocationInterface;
+
+/**
+ * Base class for document factories
+ * 
+ */
+public class DocumentFactoryBase implements SourceDocumentFactory {
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.source.SourceDocumentFactory#
+	 *      createDocument(java.lang.String)
+	 */
+	public SourceDocumentInterface createDocument(String sourceData) {
+		return new DocumentAdapter();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.source.SourceDocumentFactory#
+	 *      createLocation(com.nokia.tracecompiler.source.SourceLocationBase,
+	 *      int, int)
+	 */
+	public SourceLocationInterface createLocation(SourceLocationBase base,
+			int offset, int length) {
+		return new SimpleLocation(offset, length);
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/utils/DocumentMonitorBase.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,84 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Base class for document monitors
+*
+*/
+package com.nokia.tracecompiler.utils;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+
+import com.nokia.tracecompiler.source.SourceDocumentFactory;
+import com.nokia.tracecompiler.source.SourceDocumentInterface;
+import com.nokia.tracecompiler.source.SourceDocumentMonitor;
+import com.nokia.tracecompiler.source.SourceDocumentProcessor;
+
+/**
+ * Base class for document monitors.
+ * 
+ */
+public class DocumentMonitorBase implements SourceDocumentMonitor {
+
+	/**
+	 * Document factory adapter
+	 */
+	private DocumentFactoryBase factory;
+
+	/**
+	 * List of sources
+	 */
+	private ArrayList<SourceDocumentInterface> sources = new ArrayList<SourceDocumentInterface>();
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.source.SourceDocumentMonitor#getFactory()
+	 */
+	public SourceDocumentFactory getFactory() {
+		if (factory == null) {
+			factory = new DocumentFactoryBase();
+		}
+		return factory;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.lang.Iterable#iterator()
+	 */
+	public Iterator<SourceDocumentInterface> iterator() {
+		return sources.iterator();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.source.SourceDocumentMonitor#
+	 *      startMonitor(com.nokia.tracecompiler.source.SourceDocumentProcessor)
+	 */
+	public void startMonitor(SourceDocumentProcessor processor) throws Exception {
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.source.SourceDocumentMonitor#stopMonitor()
+	 */
+	public void stopMonitor() {
+		sources.clear();
+	}
+
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/utils/SimpleLocation.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,111 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Adapter for location interface
+*
+*/
+package com.nokia.tracecompiler.utils;
+
+import com.nokia.tracecompiler.source.SourceLocationInterface;
+
+/**
+ * Location interface implementation
+ * 
+ */
+class SimpleLocation implements SourceLocationInterface {
+
+	/**
+	 * Location offset
+	 */
+	private int offset;
+
+	/**
+	 * Location length
+	 */
+	private int length;
+
+	/**
+	 * Deleted flag
+	 */
+	private boolean deleted;
+
+	/**
+	 * Constructor
+	 * 
+	 * @param offset
+	 *            location offset
+	 * @param length
+	 *            location length
+	 */
+	SimpleLocation(int offset, int length) {
+		this.offset = offset;
+		this.length = length;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.source.SourceLocationInterface#delete()
+	 */
+	public void delete() {
+		deleted = true;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.source.SourceLocationInterface#getLength()
+	 */
+	public int getLength() {
+		return length;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.source.SourceLocationInterface#getOffset()
+	 */
+	public int getOffset() {
+		return offset;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.source.SourceLocationInterface#isDeleted()
+	 */
+	public boolean isDeleted() {
+		return deleted;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.source.SourceLocationInterface#setLength(int)
+	 */
+	public void setLength(int length) {
+		this.length = length;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.nokia.tracecompiler.source.SourceLocationInterface#setOffset(int)
+	 */
+	public void setOffset(int offset) {
+		this.offset = offset;
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/utils/TraceCompilerVersion.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,55 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* Version number abstraction
+*
+*/
+package com.nokia.tracecompiler.utils;
+
+/**
+ * Version number abstraction
+ * 
+ */
+public abstract class TraceCompilerVersion {
+
+	/**
+	 * Sub-class, which implements getVersion
+	 */
+	private static TraceCompilerVersion versionImpl;
+
+	/**
+	 * Gets TraceCompiler version number
+	 * 
+	 * @return version number
+	 */
+	public static String getVersion() {
+		String version = null;
+		if (versionImpl != null) {
+			version = versionImpl.getTraceCompilerVersion();
+		} else {
+			// TODO: This is used in console builds -> Maintenance needed
+			version = "2.3.0"; //$NON-NLS-1$
+		}
+		return version;
+	}
+
+	/**
+	 * Gets the version number as x.y.z
+	 * 
+	 * @return the version string
+	 */
+	protected abstract String getTraceCompilerVersion();
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/utils/package.html	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,3 @@
+<html><body>
+Exported utility classes
+</body></html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/FixedIdDefinitionsTestApp/data/reference_fid_file_1.txt	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,22 @@
+##
+# This is Default Licence added by TraceCompiler
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "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:
+#
+# Description: 
+#
+##
+#Fixed group and trace id definitions. If this file is removed, the identifiers are rebuilt.
+[GROUP]GROUP1=0xde
+[GROUP]GROUP2=0xdf
+[TRACE]GROUP1[0xDE]_TRACE0=0x1
+[TRACE]GROUP2[0xDF]_TRACE1=0x1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/FixedIdDefinitionsTestApp/data/reference_fid_file_2.txt	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,24 @@
+##
+# This is Default Licence added by TraceCompiler
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "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:
+#
+# Description: 
+#
+##
+#Fixed group and trace id definitions. If this file is removed, the identifiers are rebuilt.
+[GROUP]GROUP1=0xde
+[GROUP]GROUP2=0xdf
+[TRACE]GROUP1[0xDE]_TRACE0=0x1
+[TRACE]GROUP2[0xDF]_TRACE1=0x1
+[TRACE]GROUP2[0xDF]_TRACE2=0x2
+[TRACE]GROUP2[0xDF]_TRACE3=0x3
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/FixedIdDefinitionsTestApp/data/reference_fid_file_3.txt	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,24 @@
+##
+# This is Default Licence added by TraceCompiler
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "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:
+#
+# Description: 
+#
+##
+#Fixed group and trace id definitions. If this file is removed, the identifiers are rebuilt.
+[GROUP]GROUP2=0xdf
+[TRACE]GROUP2[0xDF]_TRACE2=0x2
+[TRACE]GROUP2[0xDF]_TRACE3=0x3
+[[OBSOLETE]][GROUP]GROUP1=0xde
+[[OBSOLETE]][TRACE]GROUP1[0xDE]_TRACE0=0x1
+[[OBSOLETE]][TRACE]GROUP2[0xDF]_TRACE1=0x1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/FixedIdDefinitionsTestApp/data/reference_fid_file_4.txt	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,29 @@
+##
+# This is Default Licence added by TraceCompiler
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "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:
+#
+# Description: 
+#
+##
+#Fixed group and trace id definitions. If this file is removed, the identifiers are rebuilt.
+[GROUP]GROUP1=0xe0
+[GROUP]GROUP2=0xdf
+[GROUP]TRACE_FATAL=0x81
+[TRACE]GROUP1[0xE0]_TRACE0=0x1
+[TRACE]GROUP2[0xDF]_TRACE1=0x4
+[TRACE]GROUP2[0xDF]_TRACE2=0x2
+[TRACE]TRACE_FATAL[0x81]_TRACE3=0x1
+[[OBSOLETE]][GROUP]GROUP1=0xde
+[[OBSOLETE]][TRACE]GROUP1[0xDE]_TRACE0=0x1
+[[OBSOLETE]][TRACE]GROUP2[0xDF]_TRACE1=0x1
+[[OBSOLETE]][TRACE]GROUP2[0xDF]_TRACE3=0x3
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/FixedIdDefinitionsTestApp/data/reference_fid_file_5.txt	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,28 @@
+##
+# This is Default Licence added by TraceCompiler
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "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:
+#
+# Description: 
+#
+##
+#Fixed group and trace id definitions. If this file is removed, the identifiers are rebuilt.
+[GROUP]GROUP1=0xe0
+[GROUP]GROUP2=0xdf
+[TRACE]GROUP1[0xE0]_TRACE0=0x1
+[TRACE]GROUP2[0xDF]_TRACE1=0x4
+[TRACE]GROUP2[0xDF]_TRACE2=0x2
+[[OBSOLETE]][GROUP]GROUP1=0xde
+[[OBSOLETE]][TRACE]GROUP1[0xDE]_TRACE0=0x1
+[[OBSOLETE]][TRACE]GROUP2[0xDF]_TRACE1=0x1
+[[OBSOLETE]][TRACE]GROUP2[0xDF]_TRACE3=0x3
+[[OBSOLETE]][TRACE]TRACE_FATAL[0x81]_TRACE3=0x1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/FixedIdDefinitionsTestApp/data/reference_fid_file_6_0.txt	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,27 @@
+##
+# This is Default Licence added by TraceCompiler
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "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:
+#
+# Description: 
+#
+##
+#Fixed group and trace id definitions. If this file is removed, the identifiers are rebuilt.
+[GROUP]GROUP1=0xe0
+[GROUP]GROUP2=0xdf
+[TRACE]GROUP1[0xE0]_TRACE0=0x1
+[TRACE]GROUP2[0xDF]_TRACE2=0x2
+[[OBSOLETE]][GROUP]GROUP1=0xde
+[[OBSOLETE]][TRACE]GROUP1[0xDE]_TRACE0=0x1
+[[OBSOLETE]][TRACE]GROUP2[0xDF]_TRACE1=0x4
+[[OBSOLETE]][TRACE]GROUP2[0xDF]_TRACE3=0x3
+[[OBSOLETE]][TRACE]TRACE_FATAL[0x81]_TRACE3=0x1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/FixedIdDefinitionsTestApp/data/reference_fid_file_6_1.txt	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,28 @@
+##
+# This is Default Licence added by TraceCompiler
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "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:
+#
+# Description: 
+#
+##
+#Fixed group and trace id definitions. If this file is removed, the identifiers are rebuilt.
+[GROUP]GROUP1=0xe0
+[GROUP]GROUP2=0xdf
+[TRACE]GROUP1[0xE0]_TRACE0=0x1
+[TRACE]GROUP2[0xDF]_TRACE1=0x5
+[TRACE]GROUP2[0xDF]_TRACE2=0x2
+[[OBSOLETE]][GROUP]GROUP1=0xde
+[[OBSOLETE]][TRACE]GROUP1[0xDE]_TRACE0=0x1
+[[OBSOLETE]][TRACE]GROUP2[0xDF]_TRACE1=0x4
+[[OBSOLETE]][TRACE]GROUP2[0xDF]_TRACE3=0x3
+[[OBSOLETE]][TRACE]TRACE_FATAL[0x81]_TRACE3=0x1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/FixedIdDefinitionsTestApp/data/reference_fid_file_6_2.txt	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,27 @@
+##
+# This is Default Licence added by TraceCompiler
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "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:
+#
+# Description: 
+#
+##
+#Fixed group and trace id definitions. If this file is removed, the identifiers are rebuilt.
+[GROUP]GROUP1=0xe0
+[GROUP]GROUP2=0xdf
+[TRACE]GROUP1[0xE0]_TRACE0=0x1
+[TRACE]GROUP2[0xDF]_TRACE2=0x2
+[[OBSOLETE]][GROUP]GROUP1=0xde
+[[OBSOLETE]][TRACE]GROUP1[0xDE]_TRACE0=0x1
+[[OBSOLETE]][TRACE]GROUP2[0xDF]_TRACE1=0x5
+[[OBSOLETE]][TRACE]GROUP2[0xDF]_TRACE3=0x3
+[[OBSOLETE]][TRACE]TRACE_FATAL[0x81]_TRACE3=0x1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/FixedIdDefinitionsTestApp/data/reference_fid_file_6_3.txt	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,28 @@
+##
+# This is Default Licence added by TraceCompiler
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "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:
+#
+# Description: 
+#
+##
+#Fixed group and trace id definitions. If this file is removed, the identifiers are rebuilt.
+[GROUP]GROUP1=0xe0
+[GROUP]GROUP2=0xdf
+[TRACE]GROUP1[0xE0]_TRACE0=0x1
+[TRACE]GROUP2[0xDF]_TRACE1=0x6
+[TRACE]GROUP2[0xDF]_TRACE2=0x2
+[[OBSOLETE]][GROUP]GROUP1=0xde
+[[OBSOLETE]][TRACE]GROUP1[0xDE]_TRACE0=0x1
+[[OBSOLETE]][TRACE]GROUP2[0xDF]_TRACE1=0x5
+[[OBSOLETE]][TRACE]GROUP2[0xDF]_TRACE3=0x3
+[[OBSOLETE]][TRACE]TRACE_FATAL[0x81]_TRACE3=0x1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/FixedIdDefinitionsTestApp/data/reference_fid_file_7_0.txt	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,28 @@
+##
+# This is Default Licence added by TraceCompiler
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "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:
+#
+# Description: 
+#
+##
+#Fixed group and trace id definitions. If this file is removed, the identifiers are rebuilt.
+[GROUP]GROUP2=0xdf
+[TRACE]GROUP2[0xDF]_TRACE0=0x7
+[TRACE]GROUP2[0xDF]_TRACE1=0x6
+[TRACE]GROUP2[0xDF]_TRACE2=0x2
+[[OBSOLETE]][GROUP]GROUP1=0xe0
+[[OBSOLETE]][TRACE]GROUP1[0xDE]_TRACE0=0x1
+[[OBSOLETE]][TRACE]GROUP1[0xE0]_TRACE0=0x1
+[[OBSOLETE]][TRACE]GROUP2[0xDF]_TRACE1=0x5
+[[OBSOLETE]][TRACE]GROUP2[0xDF]_TRACE3=0x3
+[[OBSOLETE]][TRACE]TRACE_FATAL[0x81]_TRACE3=0x1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/FixedIdDefinitionsTestApp/data/reference_fid_file_7_1.txt	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,30 @@
+##
+# This is Default Licence added by TraceCompiler
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "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:
+#
+# Description: 
+#
+##
+#Fixed group and trace id definitions. If this file is removed, the identifiers are rebuilt.
+[GROUP]GROUP2=0xdf
+[GROUP]TRACE_NORMAL=0x86
+[TRACE]GROUP2[0xDF]_TRACE1=0x6
+[TRACE]GROUP2[0xDF]_TRACE2=0x2
+[TRACE]TRACE_NORMAL[0x86]_TRACE0=0x1
+[[OBSOLETE]][GROUP]GROUP1=0xe0
+[[OBSOLETE]][TRACE]GROUP1[0xDE]_TRACE0=0x1
+[[OBSOLETE]][TRACE]GROUP1[0xE0]_TRACE0=0x1
+[[OBSOLETE]][TRACE]GROUP2[0xDF]_TRACE0=0x7
+[[OBSOLETE]][TRACE]GROUP2[0xDF]_TRACE1=0x5
+[[OBSOLETE]][TRACE]GROUP2[0xDF]_TRACE3=0x3
+[[OBSOLETE]][TRACE]TRACE_FATAL[0x81]_TRACE3=0x1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/FixedIdDefinitionsTestApp/data/reference_fid_file_7_2.txt	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,31 @@
+##
+# This is Default Licence added by TraceCompiler
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "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:
+#
+# Description: 
+#
+##
+#Fixed group and trace id definitions. If this file is removed, the identifiers are rebuilt.
+[GROUP]GROUP1=0xe1
+[GROUP]GROUP2=0xdf
+[TRACE]GROUP1[0xE1]_TRACE0=0x1
+[TRACE]GROUP2[0xDF]_TRACE1=0x6
+[TRACE]GROUP2[0xDF]_TRACE2=0x2
+[[OBSOLETE]][GROUP]GROUP1=0xe0
+[[OBSOLETE]][TRACE]GROUP1[0xDE]_TRACE0=0x1
+[[OBSOLETE]][TRACE]GROUP1[0xE0]_TRACE0=0x1
+[[OBSOLETE]][TRACE]GROUP2[0xDF]_TRACE0=0x7
+[[OBSOLETE]][TRACE]GROUP2[0xDF]_TRACE1=0x5
+[[OBSOLETE]][TRACE]GROUP2[0xDF]_TRACE3=0x3
+[[OBSOLETE]][TRACE]TRACE_FATAL[0x81]_TRACE3=0x1
+[[OBSOLETE]][TRACE]TRACE_NORMAL[0x86]_TRACE0=0x1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/FixedIdDefinitionsTestApp/data/reference_fid_file_8.txt	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,20 @@
+##
+# This is Default Licence added by TraceCompiler
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "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:
+#
+# Description: 
+#
+##
+#Fixed group and trace id definitions. If this file is removed, the identifiers are rebuilt.
+[GROUP]TRACE_FLOW=0x8a
+[TRACE]TRACE_FLOW[0x8A]_TRACE1=0x1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/FixedIdDefinitionsTestApp/data/reference_fid_file_9.txt	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,20 @@
+##
+# This is Default Licence added by TraceCompiler
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "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:
+#
+# Description: 
+#
+##
+#Fixed group and trace id definitions. If this file is removed, the identifiers are rebuilt.
+[GROUP]MY_GROUP=0xde
+[TRACE]MY_GROUP[0xDE]_TRACE1=0x1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/FixedIdDefinitionsTestApp/data/reference_tc_output_8.txt	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,3 @@
+warning: TC has detected a fixed_id.defintions using different Group Id values. This file will be regenerated with the correct values.
+FixedIdDefinitionsTestApp took
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/FixedIdDefinitionsTestApp/data/reference_tc_output_9.txt	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,3 @@
+warning: TC has detected a fixed_id.defintions using different Group Id values. This file will be regenerated with the correct values.
+FixedIdDefinitionsTestApp took
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/FixedIdDefinitionsTestApp/group/FixedIdDefinitionsTestApp.mmp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,36 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+
+TARGET		  FixedIdDefinitionsTestApp.exe
+TARGETTYPE	  exe
+UID			 0 0xE9FBE6EE
+
+OS_LAYER_SYSTEMINCLUDE
+
+USERINCLUDE	 ..\inc 
+USERINCLUDE  ..\traces
+
+SOURCEPATH	  ..\src
+SOURCE		  FixedIdDefinitionsTestApp.cpp
+
+LIBRARY		 euser.lib
+
+#ifdef ENABLE_ABIV2_MODE
+  DEBUGGABLE_UDEBONLY
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/FixedIdDefinitionsTestApp/group/bld.inf	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,24 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_MMPFILES
+FixedIdDefinitionsTestApp.mmp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/FixedIdDefinitionsTestApp/inc/FixedIdDefinitionsTestApp.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,31 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef __FIXEDIDDEFINITIONSTESTAPP_H__
+#define __FIXEDIDDEFINITIONSTESTAPP_H__
+
+//  Include Files
+
+#include <e32base.h>
+
+//  Function Prototypes
+
+GLDEF_C TInt E32Main();
+
+#endif  // __FIXEDIDDEFINITIONSTESTAPP_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/FixedIdDefinitionsTestApp/src/FixedIdDefinitionsTestApp.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,126 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+//  Include Files  
+#include "FixedIdDefinitionsTestApp.h"
+#include <e32base.h>
+#include <e32debug.h>
+#include <e32std.h>
+#include <e32cons.h>
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "FixedIdDefinitionsTestAppTraces.h"
+#endif
+// Console
+//  Constants
+_LIT(KTextConsoleTitle, "Console");
+_LIT(KTextFailed, " failed, leave code = %d");
+_LIT(KTextPressAnyKey, " [press any key]\n");
+
+//  Global Variables
+LOCAL_D CConsoleBase* console; // write all messages to this
+
+
+//  Local Functions
+
+LOCAL_C void MainL()
+    {
+//     OstTrace0(GROUP1, TRACE0, "trace 0"); // TRACE_USED_IN_TEST_CASE_1
+//     OstTrace0(GROUP2, TRACE1, "trace 1"); // TRACE_USED_IN_TEST_CASE_1
+ 
+//     OstTrace0(GROUP1, TRACE0, "trace 0"); // TRACE_USED_IN_TEST_CASE_2
+//     OstTrace0(GROUP2, TRACE2, "trace 2"); // TRACE_USED_IN_TEST_CASE_2 
+//     OstTrace0(GROUP2, TRACE1, "trace 1"); // TRACE_USED_IN_TEST_CASE_2
+//     OstTrace0(GROUP2, TRACE3, "trace 3"); // TRACE_USED_IN_TEST_CASE_2 
+    
+//     OstTrace0(GROUP2, TRACE2, "trace 2"); // TRACE_USED_IN_TEST_CASE_3 
+//     OstTrace0(GROUP2, TRACE3, "trace 3"); // TRACE_USED_IN_TEST_CASE_3
+    
+//     OstTrace0(GROUP1, TRACE0, "trace 0"); // TRACE_USED_IN_TEST_CASE_4
+//     OstTrace0(GROUP2, TRACE2, "trace 2"); // TRACE_USED_IN_TEST_CASE_4 
+//     OstTrace0(GROUP2, TRACE1, "trace 1"); // TRACE_USED_IN_TEST_CASE_4
+//     OstTrace0(TRACE_FATAL, TRACE3, "trace 3"); // TRACE_USED_IN_TEST_CASE_4
+
+//     OstTrace0(GROUP1, TRACE0, "trace 0"); // TRACE_USED_IN_TEST_CASE_5
+//     OstTrace0(GROUP2, TRACE2, "trace 2"); // TRACE_USED_IN_TEST_CASE_5 
+//     OstTrace0(GROUP2, TRACE1, "trace 1"); // TRACE_USED_IN_TEST_CASE_5
+
+//     OstTrace0(GROUP1, TRACE0, "trace 0"); // TRACE_USED_IN_TEST_CASE_6_0
+//     OstTrace0(GROUP2, TRACE2, "trace 2"); // TRACE_USED_IN_TEST_CASE_6_0 
+//     OstTrace0(GROUP1, TRACE0, "trace 0"); // TRACE_USED_IN_TEST_CASE_6_1 
+//     OstTrace0(GROUP2, TRACE2, "trace 2"); // TRACE_USED_IN_TEST_CASE_6_1 
+//     OstTrace0(GROUP2, TRACE1, "trace 1"); // TRACE_USED_IN_TEST_CASE_6_1
+//     OstTrace0(GROUP1, TRACE0, "trace 0"); // TRACE_USED_IN_TEST_CASE_6_2
+//     OstTrace0(GROUP2, TRACE2, "trace 2"); // TRACE_USED_IN_TEST_CASE_6_2 
+//     OstTrace0(GROUP1, TRACE0, "trace 0"); // TRACE_USED_IN_TEST_CASE_6_3
+//     OstTrace0(GROUP2, TRACE2, "trace 2"); // TRACE_USED_IN_TEST_CASE_6_3 
+//     OstTrace0(GROUP2, TRACE1, "trace 1"); // TRACE_USED_IN_TEST_CASE_6_3
+
+//     OstTrace0(GROUP2, TRACE0, "trace 0"); // TRACE_USED_IN_TEST_CASE_7_0
+//     OstTrace0(GROUP2, TRACE2, "trace 2"); // TRACE_USED_IN_TEST_CASE_7_0 
+//     OstTrace0(GROUP2, TRACE1, "trace 1"); // TRACE_USED_IN_TEST_CASE_7_0
+//     OstTrace0(TRACE_NORMAL, TRACE0, "trace 0"); // TRACE_USED_IN_TEST_CASE_7_1
+//     OstTrace0(GROUP2, TRACE2, "trace 2"); // TRACE_USED_IN_TEST_CASE_7_1
+//     OstTrace0(GROUP2, TRACE1, "trace 1"); // TRACE_USED_IN_TEST_CASE_7_1
+//     OstTrace0(GROUP1, TRACE0, "trace 0"); // TRACE_USED_IN_TEST_CASE_7_2
+//     OstTrace0(GROUP2, TRACE2, "trace 2"); // TRACE_USED_IN_TEST_CASE_7_2 
+//     OstTrace0(GROUP2, TRACE1, "trace 1"); // TRACE_USED_IN_TEST_CASE_7_2   
+   
+//     OstTrace0(TRACE_FLOW, TRACE1, "trace 1"); // TRACE_USED_IN_TEST_CASE_8      
+
+//     OstTrace0(MY_GROUP, TRACE1, "trace 1"); // TRACE_USED_IN_TEST_CASE_9                
+    }
+
+LOCAL_C void DoStartL()
+    {
+    // Create active scheduler (to run active objects)
+    CActiveScheduler* scheduler = new (ELeave) CActiveScheduler();
+    CleanupStack::PushL(scheduler);
+    CActiveScheduler::Install(scheduler);
+
+    MainL();
+
+    // Delete active scheduler
+    CleanupStack::PopAndDestroy(scheduler);
+
+    }
+
+//  Global Functions
+
+GLDEF_C TInt E32Main()
+    {
+    // Create cleanup stack
+    __UHEAP_MARK;
+    CTrapCleanup* cleanup = CTrapCleanup::New();
+    // Create output console
+    TRAPD(createError, console = Console::NewL(KTextConsoleTitle, TSize(
+                            KConsFullScreen, KConsFullScreen)));
+    if (createError)
+        return createError;
+    // Run application code inside TRAP harness, wait keypress when terminated
+    TRAPD(mainError, DoStartL());
+    if (mainError)
+        console->Printf(KTextFailed, mainError);
+    console->Printf(KTextPressAnyKey);
+    console->Getch();
+
+    delete console;
+    delete cleanup;
+    __UHEAP_MARKEND;
+    return KErrNone;
+    }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/MultipleCppTraceErrorApp/data/referencelog.txt	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,13 @@
+error: ExtraCppFile.cpp, line 37: Trace does not need to use extension macro
+error: ExtraCppFile.cpp, line 38: Trace does not need to use extension macro
+error: ExtraCppFile.cpp, line 42: Parameter count does not match the format specification
+error: You have exceeded the number of Group IDs you have allocated.
+warning: Deprecated group TRACE_API detected. Updating to TRACE_BORDER in dictionary. Please update source code!
+warning: Deprecated group TRACE_DETAILED detected. Updating to TRACE_INTERNALS in dictionary. Please update source code!
+warning: Deprecated group TRACE_DEBUG detected. Updating to TRACE_DUMP in dictionary. Please update source code!
+error: MultipleCppTraceErrorApp.cpp, line 52: Trace does not need to use extension macro
+error: MultipleCppTraceErrorApp.cpp, line 53: Trace does not need to use extension macro
+error: MultipleCppTraceErrorApp.cpp, line 57: Trace is used from multiple places
+error: MultipleCppTraceErrorApp.cpp, line 58: Trace is used from multiple places
+error: MultipleCppTraceErrorApp.cpp, line 65: Parameter count does not match the format specification
+error: MultipleCppTraceErrorApp.cpp, line 101: Run out of Group IDs. You can try to reuse unused group ids by deleting fixed id definition file.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/MultipleCppTraceErrorApp/group/MultipleCppTraceErrorApp.mmp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,37 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+
+TARGET		  MultipleCppTraceErrorApp.exe
+TARGETTYPE	  exe
+UID			 0 0xE8576D94
+
+APP_LAYER_SYSTEMINCLUDE
+
+USERINCLUDE	 ../inc
+USERINCLUDE  ../traces
+
+SOURCEPATH	  ../src
+SOURCE		  MultipleCppTraceErrorApp.cpp 
+SOURCE		  ExtraCppFile.cpp
+
+LIBRARY		 euser.lib
+
+#ifdef ENABLE_ABIV2_MODE
+DEBUGGABLE_UDEBONLY
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/MultipleCppTraceErrorApp/group/bld.inf	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,24 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_MMPFILES
+MultipleCppTraceErrorApp.mmp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/MultipleCppTraceErrorApp/inc/MultipleCppTraceErrorApp.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,32 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef __TRACEERRORAPP_H__
+#define __TRACEERRORAPP_H__
+
+//  Include Files
+
+#include <e32base.h>
+
+//  Function Prototypes
+
+GLDEF_C TInt E32Main();
+void CallSomeMoreTraceStatements();
+
+#endif  // __TRACEERRORAPP_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/MultipleCppTraceErrorApp/sis/TraceErrorApp_EKA2.pkg	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,39 @@
+;
+; Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "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:
+;
+; Description: 
+;
+; Installation file for Symbian OS 9.x for generic console application
+; Installation file for TraceErrorApp EXE
+;
+; This is an auto-generated PKG file by Carbide.
+; This file uses variables specific to Carbide builds that will not work
+; on command-line builds. If you want to use this generated PKG file from the
+; command-line tools you will need to modify the variables with the appropriate
+; values: $(EPOCROOT), $(PLATFORM), $(TARGET)
+;
+
+;
+; UID is the exe's UID
+;
+#{"TraceErrorApp EXE"},(0xE8576D92),1,0,0
+
+
+;Localised Vendor name
+%{"Vendor-EN"}
+
+;Unique Vendor name
+:"Vendor"
+
+"$(EPOCROOT)Epoc32\release\$(PLATFORM)\$(TARGET)\TraceErrorApp.exe"		  -"!:\sys\bin\TraceErrorApp.exe"
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/MultipleCppTraceErrorApp/src/ExtraCppFile.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,43 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+/*
+ * ExtraCppFile.cpp
+ *
+ *  Created on: Dec 7, 2009
+ *      Author: cajagu
+ */
+
+#include "MultipleCppTraceErrorApp.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "ExtraCppFileTraces.h"
+#endif
+
+void CallSomeMoreTraceStatements()
+    {
+    TInt32 x = 555;
+    TUint32 y = 666;
+    
+    //In these two cases Trace Compiler should give a error that an extension macro isn't necessary:
+    //"TraceErrorApp.cpp, line xx: Trace does not need to use extension macro"
+    OstTraceExt1( TRACE_FLOW, TEST1_CALLMORE, "CallSomeMoreTraceStatements(): x=%d" , x );
+    OstTraceExt1( TRACE_FLOW, TEST2_CALLMORE, "CallSomeMoreTraceStatements(): y=%u" , y );
+    
+    //Wrong API i.e more parameters than it takes
+    //"TraceErrorApp.cpp, line xx: Parameter count does not match the format specification"
+    OstTrace0( TRACE_FLOW, TEST3_CALLMORE, "CallSomeMoreTraceStatements(): x=%d" ,x);
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/MultipleCppTraceErrorApp/src/MultipleCppTraceErrorApp.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,158 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+//  Include Files  
+
+#include "MultipleCppTraceErrorApp.h"
+#include <e32base.h>
+#include <e32std.h>
+#include <e32cons.h>			// Console
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "MultipleCppTraceErrorAppTraces.h"
+#endif
+
+//  Constants
+
+_LIT(KTextConsoleTitle, "Console");
+_LIT(KTextFailed, " failed, leave code = %d");
+_LIT(KTextPressAnyKey, " [press any key]\n");
+
+//  Global Variables
+
+LOCAL_D CConsoleBase* console; // write all messages to this
+
+
+//  Local Functions
+
+LOCAL_C void MainL()
+    {
+    /****************************SHOULD GIVE ERRORS*******************************/
+    _LIT8(KTestDes,"Test Descriptor");
+    TInt32 x = 555;
+    TUint32 y = 666;
+    
+    //In these two cases Trace Compiler should give a error that an extension macro isn't necessary:
+    //"TraceErrorApp.cpp, line xx: Trace does not need to use extension macro"
+    OstTraceExt1( TRACE_FLOW, TEST1_MAINL, "MainL(): x=%d" , x );
+    OstTraceExt1( TRACE_FLOW, TEST2_MAINL, "MainL(): y=%u" , y );
+    
+    //This should give an error stating that the trace name is duplicated
+    //"TraceErrorApp.cpp, line xx: Trace is used from multiple places"
+    OstTrace0( TRACE_FLOW, TEST3_MAINL, "MainL()" );
+    OstTrace0( TRACE_FLOW, TEST3_MAINL, "MainL()" );
+    
+    //This should NOT give an error stating that the arguments don't match format spec
+    //OstTraceExt2( TRACE_FLOW, TEST4_MAINL, "MainL(): x=%d;KTestDes=%d", x, KTestDes );
+
+    //Wrong API i.e more parameters than it takes
+    //"TraceErrorApp.cpp, line xx: Parameter count does not match the format specification"
+    OstTrace0( TRACE_FLOW, TEST5_MAINL, "MainL(): x=%d" ,x);
+    
+    //Too many User-defined group ids should be max of 32 but there are 33 here), should get an error
+    //"You have exceeded the number of Group IDs you have allocated."
+    OstTrace0( MY_GROUP_ID1, TEST_MAINL6, "MainL()" );
+    OstTrace0( MY_GROUP_ID2, TEST_MAINL7, "MainL()" );
+    OstTrace0( MY_GROUP_ID3, TEST_MAINL8, "MainL()" );
+    OstTrace0( MY_GROUP_ID4, TEST_MAINL9, "MainL()" );
+    OstTrace0( MY_GROUP_ID5, TEST_MAINL10, "MainL()" );
+    OstTrace0( MY_GROUP_ID6, TEST_MAINL11, "MainL()" );
+    OstTrace0( MY_GROUP_ID7, TEST_MAINL12, "MainL()" );
+    OstTrace0( MY_GROUP_ID8, TEST_MAINL13, "MainL()" );
+    OstTrace0( MY_GROUP_ID9, TEST_MAINL14, "MainL()" );
+    OstTrace0( MY_GROUP_ID10, TEST_MAINL15, "MainL()" );
+    OstTrace0( MY_GROUP_ID11, TEST_MAINL16, "MainL()" );
+    OstTrace0( MY_GROUP_ID12, TEST_MAINL17, "MainL()" );
+    OstTrace0( MY_GROUP_ID13, TEST_MAINL18, "MainL()" );
+    OstTrace0( MY_GROUP_ID14, TEST_MAINL19, "MainL()" );
+    OstTrace0( MY_GROUP_ID15, TEST_MAINL20, "MainL()" );
+    OstTrace0( MY_GROUP_ID16, TEST_MAINL21, "MainL()" );
+    OstTrace0( MY_GROUP_ID17, TEST_MAINL22, "MainL()" );
+    OstTrace0( MY_GROUP_ID18, TEST_MAINL23, "MainL()" );
+    OstTrace0( MY_GROUP_ID19, TEST_MAINL24, "MainL()" );
+    OstTrace0( MY_GROUP_ID20, TEST_MAINL25, "MainL()" );
+    OstTrace0( MY_GROUP_ID21, TEST_MAINL26, "MainL()" );
+    OstTrace0( MY_GROUP_ID22, TEST_MAINL27, "MainL()" );
+    OstTrace0( MY_GROUP_ID23, TEST_MAINL28, "MainL()" );
+    OstTrace0( MY_GROUP_ID24, TEST_MAINL29, "MainL()" );
+    OstTrace0( MY_GROUP_ID25, TEST_MAINL30, "MainL()" );
+    OstTrace0( MY_GROUP_ID26, TEST_MAINL31, "MainL()" );
+    OstTrace0( MY_GROUP_ID27, TEST_MAINL32, "MainL()" );
+    OstTrace0( MY_GROUP_ID28, TEST_MAINL33, "MainL()" );
+    OstTrace0( MY_GROUP_ID29, TEST_MAINL34, "MainL()" );
+    OstTrace0( MY_GROUP_ID30, TEST_MAINL35, "MainL()" );
+    OstTrace0( MY_GROUP_ID31, TEST_MAINL36, "MainL()" );
+    OstTrace0( MY_GROUP_ID32, TEST_MAINL37, "MainL()" );
+    OstTrace0( MY_GROUP_ID33, TEST_MAINL38, "MainL()" );    
+    /*****************************************************************************/
+    
+    
+    /******************************SHOULD GIVE WARNINGS***************************/
+    //Should get warnings from using deprecated GIDs
+    //e.g. "Deprecated group TRACE_API detected. Updating to TRACE_BORDER in dictionary. Please update source code!"
+    OstTrace0( TRACE_API, TEST_MAINL39, "MainL()" );  
+    OstTrace0( TRACE_IMPORTANT, TEST_MAINL40, "MainL()" );  
+    OstTrace0( TRACE_DETAILED, TEST_MAINL41, "MainL()" );
+    OstTrace0( TRACE_DEBUG, TEST_MAINL42, "MainL()" );  
+    /*****************************************************************************/
+    
+    CallSomeMoreTraceStatements();
+    
+    console->Write(_L("Hello, world!\n"));
+    }
+
+LOCAL_C void DoStartL()
+    {
+    // Create active scheduler (to run active objects)
+    CActiveScheduler* scheduler = new (ELeave) CActiveScheduler();
+    CleanupStack::PushL(scheduler);
+    CActiveScheduler::Install(scheduler);
+
+    MainL();
+
+    // Delete active scheduler
+    CleanupStack::PopAndDestroy(scheduler);
+    }
+
+//  Global Functions
+
+GLDEF_C TInt E32Main()
+    {
+    // Create cleanup stack
+    __UHEAP_MARK;
+    CTrapCleanup* cleanup = CTrapCleanup::New();
+
+    // Create output console
+    TRAPD(createError, console = Console::NewL(KTextConsoleTitle, TSize(
+            KConsFullScreen, KConsFullScreen)));
+    if (createError)
+        return createError;
+
+    // Run application code inside TRAP harness, wait keypress when terminated
+    TRAPD(mainError, DoStartL());
+    if (mainError)
+        console->Printf(KTextFailed, mainError);
+    console->Printf(KTextPressAnyKey);
+    console->Getch();
+
+    delete console;
+    delete cleanup;
+    __UHEAP_MARKEND;
+    return KErrNone;
+    }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/MultipleCppTraceErrorApp/traces/OstTraceDefinitions.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,23 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+#ifndef __OSTTRACEDEFINITIONS_H__
+#define __OSTTRACEDEFINITIONS_H__
+// OST_TRACE_COMPILER_IN_USE flag has been added by Trace Compiler
+// REMOVE BEFORE CHECK-IN TO VERSION CONTROL
+#define OST_TRACE_COMPILER_IN_USE
+#include <OpenSystemTrace.h>
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/MultipleCppTraceErrorApp/traces/fixed_id.definitions	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,9 @@
+#Fixed group and trace id definitions. If this file is removed, the identifiers are rebuilt.
+[GROUP]TRACE_BORDER=0x84
+[GROUP]TRACE_DUMP=0x89
+[GROUP]TRACE_IMPORTANT=0x85
+[GROUP]TRACE_INTERNALS=0x88
+[TRACE]TRACE_BORDER[0x84]_TEST_MAINL39=0x1
+[TRACE]TRACE_DUMP[0x89]_TEST_MAINL42=0x1
+[TRACE]TRACE_IMPORTANT[0x85]_TEST_MAINL40=0x1
+[TRACE]TRACE_INTERNALS[0x88]_TEST_MAINL41=0x1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/MultipleMmpTraceErrorApps/data/referencelog.txt	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,13 @@
+error: ExtraCppFile2.cpp, line 37: Trace does not need to use extension macro
+error: ExtraCppFile2.cpp, line 38: Trace does not need to use extension macro
+error: ExtraCppFile2.cpp, line 42: Parameter count does not match the format specification
+error: You have exceeded the number of Group IDs you have allocated.
+warning: Deprecated group TRACE_API detected. Updating to TRACE_BORDER in dictionary. Please update source code!
+warning: Deprecated group TRACE_DETAILED detected. Updating to TRACE_INTERNALS in dictionary. Please update source code!
+warning: Deprecated group TRACE_DEBUG detected. Updating to TRACE_DUMP in dictionary. Please update source code!
+error: MultipleMmpTraceErrorApp2.cpp, line 52: Trace does not need to use extension macro
+error: MultipleMmpTraceErrorApp2.cpp, line 53: Trace does not need to use extension macro
+error: MultipleMmpTraceErrorApp2.cpp, line 57: Trace is used from multiple places
+error: MultipleMmpTraceErrorApp2.cpp, line 58: Trace is used from multiple places
+error: MultipleMmpTraceErrorApp2.cpp, line 65: Parameter count does not match the format specification
+error: MultipleMmpTraceErrorApp2.cpp, line 101: Run out of Group IDs. You can try to reuse unused group ids by deleting fixed id definition file.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/MultipleMmpTraceErrorApps/group/MultipleMmpTraceErrorApp1.mmp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,37 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+
+TARGET		  MultipleCppTraceErrorApp1.exe
+TARGETTYPE	  exe
+UID			 0 0xE8576D96
+
+APP_LAYER_SYSTEMINCLUDE
+
+USERINCLUDE	 ../inc
+USERINCLUDE  ../traces
+
+SOURCEPATH	  ../src
+SOURCE		  MultipleMmpTraceErrorApp1.cpp 
+SOURCE 		  ExtraCppFile1.cpp
+
+LIBRARY		 euser.lib
+
+#ifdef ENABLE_ABIV2_MODE
+DEBUGGABLE_UDEBONLY
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/MultipleMmpTraceErrorApps/group/MultipleMmpTraceErrorApp2.mmp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,37 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+
+TARGET		  MultipleCppTraceErrorApp2.exe
+TARGETTYPE	  exe
+UID			 0 0xE8576D95
+
+APP_LAYER_SYSTEMINCLUDE
+
+USERINCLUDE	 ..\inc
+USERINCLUDE  ..\traces
+
+SOURCEPATH	  ..\src
+SOURCE		  MultipleMmpTraceErrorApp2.cpp 
+SOURCE		  ExtraCppFile2.cpp
+
+LIBRARY		 euser.lib
+
+#ifdef ENABLE_ABIV2_MODE
+DEBUGGABLE_UDEBONLY
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/MultipleMmpTraceErrorApps/group/bld.inf	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,25 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_MMPFILES
+MultipleMmpTraceErrorApp1.mmp
+MultipleMmpTraceErrorApp2.mmp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/MultipleMmpTraceErrorApps/inc/MultipleMmpTraceErrorApp.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,32 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef __TRACEERRORAPP_H__
+#define __TRACEERRORAPP_H__
+
+//  Include Files
+
+#include <e32base.h>
+
+//  Function Prototypes
+
+GLDEF_C TInt E32Main();
+void CallSomeMoreTraceStatements();
+
+#endif  // __TRACEERRORAPP_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/MultipleMmpTraceErrorApps/sis/TraceErrorApp_EKA2.pkg	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,39 @@
+;
+; Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "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:
+;
+; Description: 
+;
+; Installation file for Symbian OS 9.x for generic console application
+; Installation file for TraceErrorApp EXE
+;
+; This is an auto-generated PKG file by Carbide.
+; This file uses variables specific to Carbide builds that will not work
+; on command-line builds. If you want to use this generated PKG file from the
+; command-line tools you will need to modify the variables with the appropriate
+; values: $(EPOCROOT), $(PLATFORM), $(TARGET)
+;
+
+;
+; UID is the exe's UID
+;
+#{"TraceErrorApp EXE"},(0xE8576D92),1,0,0
+
+
+;Localised Vendor name
+%{"Vendor-EN"}
+
+;Unique Vendor name
+:"Vendor"
+
+"$(EPOCROOT)Epoc32\release\$(PLATFORM)\$(TARGET)\TraceErrorApp.exe"		  -"!:\sys\bin\TraceErrorApp.exe"
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/MultipleMmpTraceErrorApps/src/ExtraCppFile1.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,43 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+/*
+ * ExtraCppFile.cpp
+ *
+ *  Created on: Dec 7, 2009
+ *      Author: cajagu
+ */
+
+#include "MultipleMmpTraceErrorApp.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "ExtraCppFile1Traces.h"
+#endif
+
+void CallSomeMoreTraceStatements()
+    {
+    TInt32 x = 555;
+    TUint32 y = 666;
+    
+    //In these two cases Trace Compiler should give a error that an extension macro isn't necessary:
+    //"TraceErrorApp.cpp, line xx: Trace does not need to use extension macro"
+    OstTraceExt1( TRACE_FLOW, TEST1_CALLMORE, "CallSomeMoreTraceStatements(): x=%d" , x );
+    OstTraceExt1( TRACE_FLOW, TEST2_CALLMORE, "CallSomeMoreTraceStatements(): y=%u" , y );
+    
+    //Wrong API i.e more parameters than it takes
+    //"TraceErrorApp.cpp, line xx: Parameter count does not match the format specification"
+    OstTrace0( TRACE_FLOW, TEST3_CALLMORE, "CallSomeMoreTraceStatements(): x=%d" ,x);
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/MultipleMmpTraceErrorApps/src/ExtraCppFile2.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,43 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+/*
+ * ExtraCppFile.cpp
+ *
+ *  Created on: Dec 7, 2009
+ *      Author: cajagu
+ */
+
+#include "MultipleMmpTraceErrorApp.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "ExtraCppFile2Traces.h"
+#endif
+
+void CallSomeMoreTraceStatements()
+    {
+    TInt32 x = 555;
+    TUint32 y = 666;
+    
+    //In these two cases Trace Compiler should give a error that an extension macro isn't necessary:
+    //"TraceErrorApp.cpp, line xx: Trace does not need to use extension macro"
+    OstTraceExt1( TRACE_FLOW, TEST1_CALLMORE, "CallSomeMoreTraceStatements(): x=%d" , x );
+    OstTraceExt1( TRACE_FLOW, TEST2_CALLMORE, "CallSomeMoreTraceStatements(): y=%u" , y );
+    
+    //Wrong API i.e more parameters than it takes
+    //"TraceErrorApp.cpp, line xx: Parameter count does not match the format specification"
+    OstTrace0( TRACE_FLOW, TEST3_CALLMORE, "CallSomeMoreTraceStatements(): x=%d" ,x);
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/MultipleMmpTraceErrorApps/src/MultipleMmpTraceErrorApp1.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,158 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+//  Include Files  
+
+#include "MultipleMmpTraceErrorApp.h"
+#include <e32base.h>
+#include <e32std.h>
+#include <e32cons.h>			// Console
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "MultipleMmpTraceErrorApp1Traces.h"
+#endif
+
+//  Constants
+
+_LIT(KTextConsoleTitle, "Console");
+_LIT(KTextFailed, " failed, leave code = %d");
+_LIT(KTextPressAnyKey, " [press any key]\n");
+
+//  Global Variables
+
+LOCAL_D CConsoleBase* console; // write all messages to this
+
+
+//  Local Functions
+
+LOCAL_C void MainL()
+    {
+    /****************************SHOULD GIVE ERRORS*******************************/
+    _LIT8(KTestDes,"Test Descriptor");
+    TInt32 x = 555;
+    TUint32 y = 666;
+    
+    //In these two cases Trace Compiler should give a error that an extension macro isn't necessary:
+    //"TraceErrorApp.cpp, line xx: Trace does not need to use extension macro"
+    OstTraceExt1( TRACE_FLOW, TEST1_MAINL, "MainL(): x=%d" , x );
+    OstTraceExt1( TRACE_FLOW, TEST2_MAINL, "MainL(): y=%u" , y );
+    
+    //This should give an error stating that the trace name is duplicated
+    //"TraceErrorApp.cpp, line xx: Trace is used from multiple places"
+    OstTrace0( TRACE_FLOW, TEST3_MAINL, "MainL()" );
+    OstTrace0( TRACE_FLOW, TEST3_MAINL, "MainL()" );
+    
+    //This should NOT give an error stating that the arguments don't match format spec
+    //OstTraceExt2( TRACE_FLOW, TEST4_MAINL, "MainL(): x=%d;KTestDes=%d", x, KTestDes );
+
+    //Wrong API i.e more parameters than it takes
+    //"TraceErrorApp.cpp, line xx: Parameter count does not match the format specification"
+    OstTrace0( TRACE_FLOW, TEST5_MAINL, "MainL(): x=%d" ,x);
+    
+    //Too many User-defined group ids should be max of 32 but there are 33 here), should get an error
+    //"You have exceeded the number of Group IDs you have allocated."
+    OstTrace0( MY_GROUP_ID1, TEST_MAINL6, "MainL()" );
+    OstTrace0( MY_GROUP_ID2, TEST_MAINL7, "MainL()" );
+    OstTrace0( MY_GROUP_ID3, TEST_MAINL8, "MainL()" );
+    OstTrace0( MY_GROUP_ID4, TEST_MAINL9, "MainL()" );
+    OstTrace0( MY_GROUP_ID5, TEST_MAINL10, "MainL()" );
+    OstTrace0( MY_GROUP_ID6, TEST_MAINL11, "MainL()" );
+    OstTrace0( MY_GROUP_ID7, TEST_MAINL12, "MainL()" );
+    OstTrace0( MY_GROUP_ID8, TEST_MAINL13, "MainL()" );
+    OstTrace0( MY_GROUP_ID9, TEST_MAINL14, "MainL()" );
+    OstTrace0( MY_GROUP_ID10, TEST_MAINL15, "MainL()" );
+    OstTrace0( MY_GROUP_ID11, TEST_MAINL16, "MainL()" );
+    OstTrace0( MY_GROUP_ID12, TEST_MAINL17, "MainL()" );
+    OstTrace0( MY_GROUP_ID13, TEST_MAINL18, "MainL()" );
+    OstTrace0( MY_GROUP_ID14, TEST_MAINL19, "MainL()" );
+    OstTrace0( MY_GROUP_ID15, TEST_MAINL20, "MainL()" );
+    OstTrace0( MY_GROUP_ID16, TEST_MAINL21, "MainL()" );
+    OstTrace0( MY_GROUP_ID17, TEST_MAINL22, "MainL()" );
+    OstTrace0( MY_GROUP_ID18, TEST_MAINL23, "MainL()" );
+    OstTrace0( MY_GROUP_ID19, TEST_MAINL24, "MainL()" );
+    OstTrace0( MY_GROUP_ID20, TEST_MAINL25, "MainL()" );
+    OstTrace0( MY_GROUP_ID21, TEST_MAINL26, "MainL()" );
+    OstTrace0( MY_GROUP_ID22, TEST_MAINL27, "MainL()" );
+    OstTrace0( MY_GROUP_ID23, TEST_MAINL28, "MainL()" );
+    OstTrace0( MY_GROUP_ID24, TEST_MAINL29, "MainL()" );
+    OstTrace0( MY_GROUP_ID25, TEST_MAINL30, "MainL()" );
+    OstTrace0( MY_GROUP_ID26, TEST_MAINL31, "MainL()" );
+    OstTrace0( MY_GROUP_ID27, TEST_MAINL32, "MainL()" );
+    OstTrace0( MY_GROUP_ID28, TEST_MAINL33, "MainL()" );
+    OstTrace0( MY_GROUP_ID29, TEST_MAINL34, "MainL()" );
+    OstTrace0( MY_GROUP_ID30, TEST_MAINL35, "MainL()" );
+    OstTrace0( MY_GROUP_ID31, TEST_MAINL36, "MainL()" );
+    OstTrace0( MY_GROUP_ID32, TEST_MAINL37, "MainL()" );
+    OstTrace0( MY_GROUP_ID33, TEST_MAINL38, "MainL()" );    
+    /*****************************************************************************/
+    
+    
+    /******************************SHOULD GIVE WARNINGS***************************/
+    //Should get warnings from using deprecated GIDs
+    //e.g. "Deprecated group TRACE_API detected. Updating to TRACE_BORDER in dictionary. Please update source code!"
+    OstTrace0( TRACE_API, TEST_MAINL39, "MainL()" );  
+    OstTrace0( TRACE_IMPORTANT, TEST_MAINL40, "MainL()" );  
+    OstTrace0( TRACE_DETAILED, TEST_MAINL41, "MainL()" );
+    OstTrace0( TRACE_DEBUG, TEST_MAINL42, "MainL()" );  
+    /*****************************************************************************/
+    
+    CallSomeMoreTraceStatements();
+    
+    console->Write(_L("Hello, world!\n"));
+    }
+
+LOCAL_C void DoStartL()
+    {
+    // Create active scheduler (to run active objects)
+    CActiveScheduler* scheduler = new (ELeave) CActiveScheduler();
+    CleanupStack::PushL(scheduler);
+    CActiveScheduler::Install(scheduler);
+
+    MainL();
+
+    // Delete active scheduler
+    CleanupStack::PopAndDestroy(scheduler);
+    }
+
+//  Global Functions
+
+GLDEF_C TInt E32Main()
+    {
+    // Create cleanup stack
+    __UHEAP_MARK;
+    CTrapCleanup* cleanup = CTrapCleanup::New();
+
+    // Create output console
+    TRAPD(createError, console = Console::NewL(KTextConsoleTitle, TSize(
+            KConsFullScreen, KConsFullScreen)));
+    if (createError)
+        return createError;
+
+    // Run application code inside TRAP harness, wait keypress when terminated
+    TRAPD(mainError, DoStartL());
+    if (mainError)
+        console->Printf(KTextFailed, mainError);
+    console->Printf(KTextPressAnyKey);
+    console->Getch();
+
+    delete console;
+    delete cleanup;
+    __UHEAP_MARKEND;
+    return KErrNone;
+    }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/MultipleMmpTraceErrorApps/src/MultipleMmpTraceErrorApp2.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,158 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+//  Include Files  
+
+#include "MultipleMmpTraceErrorApp.h"
+#include <e32base.h>
+#include <e32std.h>
+#include <e32cons.h>			// Console
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "MultipleMmpTraceErrorApp2Traces.h"
+#endif
+
+//  Constants
+
+_LIT(KTextConsoleTitle, "Console");
+_LIT(KTextFailed, " failed, leave code = %d");
+_LIT(KTextPressAnyKey, " [press any key]\n");
+
+//  Global Variables
+
+LOCAL_D CConsoleBase* console; // write all messages to this
+
+
+//  Local Functions
+
+LOCAL_C void MainL()
+    {
+    /****************************SHOULD GIVE ERRORS*******************************/
+    _LIT8(KTestDes,"Test Descriptor");
+    TInt32 x = 555;
+    TUint32 y = 666;
+    
+    //In these two cases Trace Compiler should give a error that an extension macro isn't necessary:
+    //"TraceErrorApp.cpp, line xx: Trace does not need to use extension macro"
+    OstTraceExt1( TRACE_FLOW, TEST1_MAINL, "MainL(): x=%d" , x );
+    OstTraceExt1( TRACE_FLOW, TEST2_MAINL, "MainL(): y=%u" , y );
+    
+    //This should give an error stating that the trace name is duplicated
+    //"TraceErrorApp.cpp, line xx: Trace is used from multiple places"
+    OstTrace0( TRACE_FLOW, TEST3_MAINL, "MainL()" );
+    OstTrace0( TRACE_FLOW, TEST3_MAINL, "MainL()" );
+    
+    //This should NOT give an error stating that the arguments don't match format spec
+    //OstTraceExt2( TRACE_FLOW, TEST4_MAINL, "MainL(): x=%d;KTestDes=%d", x, KTestDes );
+
+    //Wrong API i.e more parameters than it takes
+    //"TraceErrorApp.cpp, line xx: Parameter count does not match the format specification"
+    OstTrace0( TRACE_FLOW, TEST5_MAINL, "MainL(): x=%d" ,x);
+    
+    //Too many User-defined group ids should be max of 32 but there are 33 here), should get an error
+    //"You have exceeded the number of Group IDs you have allocated."
+    OstTrace0( MY_GROUP_ID1, TEST_MAINL6, "MainL()" );
+    OstTrace0( MY_GROUP_ID2, TEST_MAINL7, "MainL()" );
+    OstTrace0( MY_GROUP_ID3, TEST_MAINL8, "MainL()" );
+    OstTrace0( MY_GROUP_ID4, TEST_MAINL9, "MainL()" );
+    OstTrace0( MY_GROUP_ID5, TEST_MAINL10, "MainL()" );
+    OstTrace0( MY_GROUP_ID6, TEST_MAINL11, "MainL()" );
+    OstTrace0( MY_GROUP_ID7, TEST_MAINL12, "MainL()" );
+    OstTrace0( MY_GROUP_ID8, TEST_MAINL13, "MainL()" );
+    OstTrace0( MY_GROUP_ID9, TEST_MAINL14, "MainL()" );
+    OstTrace0( MY_GROUP_ID10, TEST_MAINL15, "MainL()" );
+    OstTrace0( MY_GROUP_ID11, TEST_MAINL16, "MainL()" );
+    OstTrace0( MY_GROUP_ID12, TEST_MAINL17, "MainL()" );
+    OstTrace0( MY_GROUP_ID13, TEST_MAINL18, "MainL()" );
+    OstTrace0( MY_GROUP_ID14, TEST_MAINL19, "MainL()" );
+    OstTrace0( MY_GROUP_ID15, TEST_MAINL20, "MainL()" );
+    OstTrace0( MY_GROUP_ID16, TEST_MAINL21, "MainL()" );
+    OstTrace0( MY_GROUP_ID17, TEST_MAINL22, "MainL()" );
+    OstTrace0( MY_GROUP_ID18, TEST_MAINL23, "MainL()" );
+    OstTrace0( MY_GROUP_ID19, TEST_MAINL24, "MainL()" );
+    OstTrace0( MY_GROUP_ID20, TEST_MAINL25, "MainL()" );
+    OstTrace0( MY_GROUP_ID21, TEST_MAINL26, "MainL()" );
+    OstTrace0( MY_GROUP_ID22, TEST_MAINL27, "MainL()" );
+    OstTrace0( MY_GROUP_ID23, TEST_MAINL28, "MainL()" );
+    OstTrace0( MY_GROUP_ID24, TEST_MAINL29, "MainL()" );
+    OstTrace0( MY_GROUP_ID25, TEST_MAINL30, "MainL()" );
+    OstTrace0( MY_GROUP_ID26, TEST_MAINL31, "MainL()" );
+    OstTrace0( MY_GROUP_ID27, TEST_MAINL32, "MainL()" );
+    OstTrace0( MY_GROUP_ID28, TEST_MAINL33, "MainL()" );
+    OstTrace0( MY_GROUP_ID29, TEST_MAINL34, "MainL()" );
+    OstTrace0( MY_GROUP_ID30, TEST_MAINL35, "MainL()" );
+    OstTrace0( MY_GROUP_ID31, TEST_MAINL36, "MainL()" );
+    OstTrace0( MY_GROUP_ID32, TEST_MAINL37, "MainL()" );
+    OstTrace0( MY_GROUP_ID33, TEST_MAINL38, "MainL()" );    
+    /*****************************************************************************/
+    
+    
+    /******************************SHOULD GIVE WARNINGS***************************/
+    //Should get warnings from using deprecated GIDs
+    //e.g. "Deprecated group TRACE_API detected. Updating to TRACE_BORDER in dictionary. Please update source code!"
+    OstTrace0( TRACE_API, TEST_MAINL39, "MainL()" );  
+    OstTrace0( TRACE_IMPORTANT, TEST_MAINL40, "MainL()" );  
+    OstTrace0( TRACE_DETAILED, TEST_MAINL41, "MainL()" );
+    OstTrace0( TRACE_DEBUG, TEST_MAINL42, "MainL()" );  
+    /*****************************************************************************/
+    
+    CallSomeMoreTraceStatements();
+    
+    console->Write(_L("Hello, world!\n"));
+    }
+
+LOCAL_C void DoStartL()
+    {
+    // Create active scheduler (to run active objects)
+    CActiveScheduler* scheduler = new (ELeave) CActiveScheduler();
+    CleanupStack::PushL(scheduler);
+    CActiveScheduler::Install(scheduler);
+
+    MainL();
+
+    // Delete active scheduler
+    CleanupStack::PopAndDestroy(scheduler);
+    }
+
+//  Global Functions
+
+GLDEF_C TInt E32Main()
+    {
+    // Create cleanup stack
+    __UHEAP_MARK;
+    CTrapCleanup* cleanup = CTrapCleanup::New();
+
+    // Create output console
+    TRAPD(createError, console = Console::NewL(KTextConsoleTitle, TSize(
+            KConsFullScreen, KConsFullScreen)));
+    if (createError)
+        return createError;
+
+    // Run application code inside TRAP harness, wait keypress when terminated
+    TRAPD(mainError, DoStartL());
+    if (mainError)
+        console->Printf(KTextFailed, mainError);
+    console->Printf(KTextPressAnyKey);
+    console->Getch();
+
+    delete console;
+    delete cleanup;
+    __UHEAP_MARKEND;
+    return KErrNone;
+    }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/MultipleMmpTraceErrorApps/traces/OstTraceDefinitions.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,23 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+#ifndef __OSTTRACEDEFINITIONS_H__
+#define __OSTTRACEDEFINITIONS_H__
+// OST_TRACE_COMPILER_IN_USE flag has been added by Trace Compiler
+// REMOVE BEFORE CHECK-IN TO VERSION CONTROL
+#define OST_TRACE_COMPILER_IN_USE
+#include <OpenSystemTrace.h>
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/MultipleMmpTraceErrorApps/traces/fixed_id.definitions	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,9 @@
+#Fixed group and trace id definitions. If this file is removed, the identifiers are rebuilt.
+[GROUP]TRACE_BORDER=0x84
+[GROUP]TRACE_DUMP=0x89
+[GROUP]TRACE_IMPORTANT=0x85
+[GROUP]TRACE_INTERNALS=0x88
+[TRACE]TRACE_BORDER[0x84]_TEST_MAINL39=0x1
+[TRACE]TRACE_DUMP[0x89]_TEST_MAINL42=0x1
+[TRACE]TRACE_IMPORTANT[0x85]_TEST_MAINL40=0x1
+[TRACE]TRACE_INTERNALS[0x88]_TEST_MAINL41=0x1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TraceErrorApp/data/referencelog.txt	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,10 @@
+error: You have exceeded the number of Group IDs you have allocated.
+warning: Deprecated group TRACE_API detected. Updating to TRACE_BORDER in dictionary. Please update source code!
+warning: Deprecated group TRACE_DETAILED detected. Updating to TRACE_INTERNALS in dictionary. Please update source code!
+warning: Deprecated group TRACE_DEBUG detected. Updating to TRACE_DUMP in dictionary. Please update source code!
+error: TraceErrorApp.cpp, line 52: Trace does not need to use extension macro
+error: TraceErrorApp.cpp, line 53: Trace does not need to use extension macro
+error: TraceErrorApp.cpp, line 57: Trace is used from multiple places
+error: TraceErrorApp.cpp, line 58: Trace is used from multiple places
+error: TraceErrorApp.cpp, line 65: Parameter count does not match the format specification
+error: TraceErrorApp.cpp, line 101: Run out of Group IDs. You can try to reuse unused group ids by deleting fixed id definition file.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TraceErrorApp/group/TraceErrorApp.mmp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,36 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+
+TARGET		  TraceErrorApp.exe
+TARGETTYPE	  exe
+UID			 0 0xE8576D92
+
+APP_LAYER_SYSTEMINCLUDE
+
+USERINCLUDE	 ../inc
+USERINCLUDE  ../traces
+
+SOURCEPATH	  ../src
+SOURCE		  TraceErrorApp.cpp
+
+LIBRARY		 euser.lib
+
+#ifdef ENABLE_ABIV2_MODE
+  DEBUGGABLE_UDEBONLY
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TraceErrorApp/group/bld.inf	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,24 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_MMPFILES
+TraceErrorApp.mmp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TraceErrorApp/inc/TraceErrorApp.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,31 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef __TRACEERRORAPP_H__
+#define __TRACEERRORAPP_H__
+
+//  Include Files
+
+#include <e32base.h>
+
+//  Function Prototypes
+
+GLDEF_C TInt E32Main();
+
+#endif  // __TRACEERRORAPP_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TraceErrorApp/sis/TraceErrorApp_EKA2.pkg	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,39 @@
+;
+; Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "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:
+;
+; Description: 
+;
+; Installation file for Symbian OS 9.x for generic console application
+; Installation file for TraceErrorApp EXE
+;
+; This is an auto-generated PKG file by Carbide.
+; This file uses variables specific to Carbide builds that will not work
+; on command-line builds. If you want to use this generated PKG file from the
+; command-line tools you will need to modify the variables with the appropriate
+; values: $(EPOCROOT), $(PLATFORM), $(TARGET)
+;
+
+;
+; UID is the exe's UID
+;
+#{"TraceErrorApp EXE"},(0xE8576D92),1,0,0
+
+
+;Localised Vendor name
+%{"Vendor-EN"}
+
+;Unique Vendor name
+:"Vendor"
+
+"$(EPOCROOT)Epoc32\release\$(PLATFORM)\$(TARGET)\TraceErrorApp.exe"		  -"!:\sys\bin\TraceErrorApp.exe"
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TraceErrorApp/src/TraceErrorApp.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,155 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+//  Include Files  
+
+#include "TraceErrorApp.h"
+#include <e32base.h>
+#include <e32std.h>
+#include <e32cons.h>			// Console
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "TraceErrorAppTraces.h"
+#endif
+
+//  Constants
+
+_LIT(KTextConsoleTitle, "Console");
+_LIT(KTextFailed, " failed, leave code = %d");
+_LIT(KTextPressAnyKey, " [press any key]\n");
+
+//  Global Variables
+
+LOCAL_D CConsoleBase* console; // write all messages to this
+
+
+//  Local Functions
+
+LOCAL_C void MainL()
+    {
+    /****************************SHOULD GIVE ERRORS*******************************/
+    _LIT8(KTestDes,"Test Descriptor");
+    TInt32 x = 555;
+    TUint32 y = 666;
+    
+    //In these two cases Trace Compiler should give a error that an extension macro isn't necessary:
+    //"TraceErrorApp.cpp, line xx: Trace does not need to use extension macro"
+    OstTraceExt1( TRACE_FLOW, TEST1_MAINL, "MainL(): x=%d" , x );
+    OstTraceExt1( TRACE_FLOW, TEST2_MAINL, "MainL(): y=%u" , y );
+    
+    //This should give an error stating that the trace name is duplicated
+    //"TraceErrorApp.cpp, line xx: Trace is used from multiple places"
+    OstTrace0( TRACE_FLOW, TEST3_MAINL, "MainL()" );
+    OstTrace0( TRACE_FLOW, TEST3_MAINL, "MainL()" );
+    
+    //This should NOT give an error stating that the arguments don't match format spec
+    //OstTraceExt2( TRACE_FLOW, TEST4_MAINL, "MainL(): x=%d;KTestDes=%d", x, KTestDes );
+
+    //Wrong API i.e more parameters than it takes
+    //"TraceErrorApp.cpp, line xx: Parameter count does not match the format specification"
+    OstTrace0( TRACE_FLOW, TEST5_MAINL, "MainL(): x=%d" ,x);
+    
+    //Too many User-defined group ids should be max of 32 but there are 33 here), should get an error
+    //"You have exceeded the number of Group IDs you have allocated."
+    OstTrace0( MY_GROUP_ID1, TEST_MAINL6, "MainL()" );
+    OstTrace0( MY_GROUP_ID2, TEST_MAINL7, "MainL()" );
+    OstTrace0( MY_GROUP_ID3, TEST_MAINL8, "MainL()" );
+    OstTrace0( MY_GROUP_ID4, TEST_MAINL9, "MainL()" );
+    OstTrace0( MY_GROUP_ID5, TEST_MAINL10, "MainL()" );
+    OstTrace0( MY_GROUP_ID6, TEST_MAINL11, "MainL()" );
+    OstTrace0( MY_GROUP_ID7, TEST_MAINL12, "MainL()" );
+    OstTrace0( MY_GROUP_ID8, TEST_MAINL13, "MainL()" );
+    OstTrace0( MY_GROUP_ID9, TEST_MAINL14, "MainL()" );
+    OstTrace0( MY_GROUP_ID10, TEST_MAINL15, "MainL()" );
+    OstTrace0( MY_GROUP_ID11, TEST_MAINL16, "MainL()" );
+    OstTrace0( MY_GROUP_ID12, TEST_MAINL17, "MainL()" );
+    OstTrace0( MY_GROUP_ID13, TEST_MAINL18, "MainL()" );
+    OstTrace0( MY_GROUP_ID14, TEST_MAINL19, "MainL()" );
+    OstTrace0( MY_GROUP_ID15, TEST_MAINL20, "MainL()" );
+    OstTrace0( MY_GROUP_ID16, TEST_MAINL21, "MainL()" );
+    OstTrace0( MY_GROUP_ID17, TEST_MAINL22, "MainL()" );
+    OstTrace0( MY_GROUP_ID18, TEST_MAINL23, "MainL()" );
+    OstTrace0( MY_GROUP_ID19, TEST_MAINL24, "MainL()" );
+    OstTrace0( MY_GROUP_ID20, TEST_MAINL25, "MainL()" );
+    OstTrace0( MY_GROUP_ID21, TEST_MAINL26, "MainL()" );
+    OstTrace0( MY_GROUP_ID22, TEST_MAINL27, "MainL()" );
+    OstTrace0( MY_GROUP_ID23, TEST_MAINL28, "MainL()" );
+    OstTrace0( MY_GROUP_ID24, TEST_MAINL29, "MainL()" );
+    OstTrace0( MY_GROUP_ID25, TEST_MAINL30, "MainL()" );
+    OstTrace0( MY_GROUP_ID26, TEST_MAINL31, "MainL()" );
+    OstTrace0( MY_GROUP_ID27, TEST_MAINL32, "MainL()" );
+    OstTrace0( MY_GROUP_ID28, TEST_MAINL33, "MainL()" );
+    OstTrace0( MY_GROUP_ID29, TEST_MAINL34, "MainL()" );
+    OstTrace0( MY_GROUP_ID30, TEST_MAINL35, "MainL()" );
+    OstTrace0( MY_GROUP_ID31, TEST_MAINL36, "MainL()" );
+    OstTrace0( MY_GROUP_ID32, TEST_MAINL37, "MainL()" );
+    OstTrace0( MY_GROUP_ID33, TEST_MAINL38, "MainL()" );    
+    /*****************************************************************************/
+    
+    
+    /******************************SHOULD GIVE WARNINGS***************************/
+    //Should get warnings from using deprecated GIDs
+    //e.g. "Deprecated group TRACE_API detected. Updating to TRACE_BORDER in dictionary. Please update source code!"
+    OstTrace0( TRACE_API, TEST_MAINL39, "MainL()" );  
+    OstTrace0( TRACE_IMPORTANT, TEST_MAINL40, "MainL()" );  
+    OstTrace0( TRACE_DETAILED, TEST_MAINL41, "MainL()" );
+    OstTrace0( TRACE_DEBUG, TEST_MAINL42, "MainL()" );  
+    /*****************************************************************************/
+    console->Write(_L("Hello, world!\n"));
+    }
+
+LOCAL_C void DoStartL()
+    {
+    // Create active scheduler (to run active objects)
+    CActiveScheduler* scheduler = new (ELeave) CActiveScheduler();
+    CleanupStack::PushL(scheduler);
+    CActiveScheduler::Install(scheduler);
+
+    MainL();
+
+    // Delete active scheduler
+    CleanupStack::PopAndDestroy(scheduler);
+    }
+
+//  Global Functions
+
+GLDEF_C TInt E32Main()
+    {
+    // Create cleanup stack
+    __UHEAP_MARK;
+    CTrapCleanup* cleanup = CTrapCleanup::New();
+
+    // Create output console
+    TRAPD(createError, console = Console::NewL(KTextConsoleTitle, TSize(
+            KConsFullScreen, KConsFullScreen)));
+    if (createError)
+        return createError;
+
+    // Run application code inside TRAP harness, wait keypress when terminated
+    TRAPD(mainError, DoStartL());
+    if (mainError)
+        console->Printf(KTextFailed, mainError);
+    console->Printf(KTextPressAnyKey);
+    console->Getch();
+
+    delete console;
+    delete cleanup;
+    __UHEAP_MARKEND;
+    return KErrNone;
+    }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TraceErrorApp/traces/OstTraceDefinitions.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,23 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+#ifndef __OSTTRACEDEFINITIONS_H__
+#define __OSTTRACEDEFINITIONS_H__
+// OST_TRACE_COMPILER_IN_USE flag has been added by Trace Compiler
+// REMOVE BEFORE CHECK-IN TO VERSION CONTROL
+#define OST_TRACE_COMPILER_IN_USE
+#include <OpenSystemTrace.h>
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TraceErrorApp/traces/fixed_id.definitions	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,9 @@
+#Fixed group and trace id definitions. If this file is removed, the identifiers are rebuilt.
+[GROUP]TRACE_BORDER=0x84
+[GROUP]TRACE_DUMP=0x89
+[GROUP]TRACE_IMPORTANT=0x85
+[GROUP]TRACE_INTERNALS=0x88
+[TRACE]TRACE_BORDER[0x84]_TEST_MAINL39=0x1
+[TRACE]TRACE_DUMP[0x89]_TEST_MAINL42=0x1
+[TRACE]TRACE_IMPORTANT[0x85]_TEST_MAINL40=0x1
+[TRACE]TRACE_INTERNALS[0x88]_TEST_MAINL41=0x1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/console/group/HelloTraceConsole.mmp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,37 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+
+TARGET		  HelloTraceConsole.exe
+TARGETTYPE	  exe
+UID			  0 0xE40349E4
+
+OS_LAYER_SYSTEMINCLUDE
+USERINCLUDE	   ../inc
+USERINCLUDE    ../../dll/inc
+USERINCLUDE    ../traces
+
+SOURCEPATH	  ../src
+SOURCE		  HelloTraceConsole.cpp
+
+LIBRARY		  euser.lib
+LIBRARY       HelloTraceDll.lib
+
+#ifdef ENABLE_ABIV2_MODE
+DEBUGGABLE_UDEBONLY
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/console/group/bld.inf	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,27 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXPORTS
+hellotraceconsole.iby             CORE_OS_LAYER_IBY_EXPORT_PATH(hellotraceconsole.iby)
+
+PRJ_MMPFILES
+HelloTraceConsole.mmp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/console/group/hellotraceconsole.iby	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,24 @@
+// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+// ROM build file for tracecore project
+
+#ifndef HELLOTRACECONSOLE_IBY
+#define HELLOTRACECONSOLE_IBY
+
+#include <core\os\hellotracedll.iby>
+
+file=ABI_DIR\BUILD_DIR\hellotraceconsole.exe    Sys\Bin\hellotraceconsole.exe
+
+#endif //HELLOTRACECONSOLE_IBY
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/console/inc/HelloTraceConsole.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,31 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef __HELLOTRACECONSOLE_H__
+#define __HELLOTRACECONSOLE_H__
+
+//  Include Files
+
+#include <e32base.h>
+
+//  Function Prototypes
+
+GLDEF_C TInt E32Main();
+
+#endif  // __HELLOTRACECONSOLE_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/console/src/HelloTraceConsole.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,124 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#include <e32cons.h>			// Console
+
+#include "HelloTraceConsole.h"
+#include "HelloTraceExample.h"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTraceConsoleTraces.h"
+#endif
+
+
+_LIT(KTextConsoleTitle, "HelloTrace");
+_LIT(KTextPressAnyKey, " [press any key]\n");
+
+LOCAL_D CConsoleBase* console; // write all messages to this
+
+LOCAL_C void DoExamples()
+    {
+    TInt err = KErrNone;
+
+    console->Printf(_L("Before main tracing examples ...\n"));
+
+    console->Printf(_L(" Before type examples ..."));
+    console->Printf(KTextPressAnyKey);
+    console->Getch();
+    TRAP(err, HelloTraceExample::JustTypes());    
+    if (err)
+        console->Printf(_L(" Failed with error %d\n"), err);
+
+    console->Printf(_L(" Before Interface examples ..."));
+    console->Printf(KTextPressAnyKey);
+    console->Getch();
+    TRAP(err, HelloTraceExample::Interface());    
+    if (err)
+        console->Printf(_L(" Failed with error %d\n"), err);
+    
+    console->Printf(_L(" Before FnEntryExit examples ..."));
+    console->Printf(KTextPressAnyKey);
+    console->Getch();
+    TRAP(err, HelloTraceExample::FnEntryExit());    
+    if (err)
+        console->Printf(_L(" Failed with error %d\n"), err);    
+    }
+
+LOCAL_C void DoStartL()
+    {
+    // Create active scheduler (to run active objects)
+    CActiveScheduler* scheduler = new (ELeave) CActiveScheduler();
+    CleanupStack::PushL(scheduler);
+    CActiveScheduler::Install(scheduler);
+
+    DoExamples();
+    
+    // Delete active scheduler
+    CleanupStack::PopAndDestroy(scheduler);
+    }
+
+//  Global Functions
+
+GLDEF_C TInt E32Main()
+    {
+    OstTraceFunctionEntry0( E32MAIN_ENTRY );
+    
+    // Create cleanup stack
+    __UHEAP_MARK;
+    CTrapCleanup* cleanup = CTrapCleanup::New();
+
+    // Create output console
+    TRAPD(createError, 
+          console = Console::NewL(KTextConsoleTitle, 
+                                  TSize(KConsFullScreen, KConsFullScreen)));    
+    if (createError)
+        {
+        delete cleanup;
+        OstTrace1( TRACE_ERROR, E32MAIN_CREATE_ERROR, "Failed to create console error: %d", createError);
+        OstTraceFunctionExit0( E32MAIN_EXIT_ERR );
+        return createError;
+        }
+
+    TRAPD(mainError, DoStartL());    
+    if (mainError)
+        {
+        OstTrace1( TRACE_ERROR, E32MAIN_START_ERROR, "DoStartL failed with error: %d", mainError);
+        console->Printf(_L("DoStartL failed with error: %d\n\n"), mainError);
+        }
+    else 
+        {
+        console->Printf(_L("Before panic tracing example ..."));
+        console->Printf(KTextPressAnyKey);
+        console->Getch();
+    
+        OstTrace0( TRACE_FLOW, E32MAIN_BEFORE_PANIC, "About to cause a panic ..." );
+        HelloTraceExample::PanicTrace();
+        
+        console->Printf(KTextPressAnyKey);
+        console->Getch();
+        }
+
+    delete console;
+    delete cleanup;
+    __UHEAP_MARKEND;
+    
+    OstTraceFunctionExit0( E32MAIN_EXIT );
+    return KErrNone;
+    }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/bwins/HelloTraceDllu.def	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,14 @@
+EXPORTS
+	?Version@CHelloTraceInterface@@SA?AVTVersion@@XZ @ 1 NONAME ; class TVersion CHelloTraceInterface::Version(void)
+	?NewLC@CHelloTraceInterface@@SAPAV1@XZ @ 2 NONAME ; class CHelloTraceInterface * CHelloTraceInterface::NewLC(void)
+	?JustTypes@HelloTraceExample@@SAXXZ @ 3 NONAME ; void HelloTraceExample::JustTypes(void)
+	?Interface@HelloTraceExample@@SAXXZ @ 4 NONAME ; void HelloTraceExample::Interface(void)
+	?FnEntryExit@HelloTraceExample@@SAXXZ @ 5 NONAME ; void HelloTraceExample::FnEntryExit(void)
+	?ResetString@CHelloTraceInterface@@QAEXXZ @ 6 NONAME ; void CHelloTraceInterface::ResetString(void)
+	?AddCharL@CHelloTraceInterface@@QAEXABVTChar@@@Z @ 7 NONAME ; void CHelloTraceInterface::AddCharL(class TChar const &)
+	?PanicTrace@HelloTraceExample@@SAXXZ @ 8 NONAME ; void HelloTraceExample::PanicTrace(void)
+	??1CHelloTraceInterface@@UAE@XZ @ 9 NONAME ; CHelloTraceInterface::~CHelloTraceInterface(void)
+	?String@CHelloTraceInterface@@QBE?BVTPtrC16@@XZ @ 10 NONAME ; class TPtrC16 const CHelloTraceInterface::String(void) const
+	?RemoveLast@CHelloTraceInterface@@QAEXXZ @ 11 NONAME ; void CHelloTraceInterface::RemoveLast(void)
+	?NewL@CHelloTraceInterface@@SAPAV1@XZ @ 12 NONAME ; class CHelloTraceInterface * CHelloTraceInterface::NewL(void)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/eabi/HelloTraceDllu.def	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,20 @@
+EXPORTS
+	_ZN17HelloTraceExample10PanicTraceEv @ 1 NONAME
+	_ZN17HelloTraceExample11FnEntryExitEv @ 2 NONAME
+	_ZN17HelloTraceExample9InterfaceEv @ 3 NONAME
+	_ZN17HelloTraceExample9JustTypesEv @ 4 NONAME
+	_ZN20CHelloTraceInterface10RemoveLastEv @ 5 NONAME
+	_ZN20CHelloTraceInterface11ResetStringEv @ 6 NONAME
+	_ZN20CHelloTraceInterface4NewLEv @ 7 NONAME
+	_ZN20CHelloTraceInterface5NewLCEv @ 8 NONAME
+	_ZN20CHelloTraceInterface7VersionEv @ 9 NONAME
+	_ZN20CHelloTraceInterface8AddCharLERK5TChar @ 10 NONAME
+	_ZN20CHelloTraceInterfaceD0Ev @ 11 NONAME
+	_ZN20CHelloTraceInterfaceD1Ev @ 12 NONAME
+	_ZN20CHelloTraceInterfaceD2Ev @ 13 NONAME
+	_ZNK20CHelloTraceInterface6StringEv @ 14 NONAME
+	_ZTI13CHelloTraceFn @ 15 NONAME
+	_ZTI20CHelloTraceInterface @ 16 NONAME
+	_ZTV13CHelloTraceFn @ 17 NONAME
+	_ZTV20CHelloTraceInterface @ 18 NONAME
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/group/HelloTraceDll.mmp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,40 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+
+TARGET		  HelloTraceDll.dll
+TARGETTYPE	  dll
+UID			  0x1000008d 0xE43DF43E
+CAPABILITY    ReadUserData
+
+OS_LAYER_SYSTEMINCLUDE
+USERINCLUDE  ../inc ../incDup
+USERINCLUDE  ../traces
+
+SOURCEPATH	 ../src
+SOURCE       HelloTraceExample.cpp 
+SOURCE       HelloTraceTypes.cpp
+SOURCE       HelloTraceInterface.cpp 
+SOURCE       HelloTraceFn.cpp 
+SOURCE       HelloTracePanic.cpp 
+
+LIBRARY		 euser.lib
+
+#ifdef ENABLE_ABIV2_MODE
+DEBUGGABLE_UDEBONLY
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/group/HelloTraceDll2.mmp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,40 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+
+TARGET		  HelloTraceDll2.dll
+TARGETTYPE	  dll
+UID			  0x1000008d 0xE43DF43F
+CAPABILITY    ReadUserData
+
+OS_LAYER_SYSTEMINCLUDE
+USERINCLUDE  ../inc ../incDup
+USERINCLUDE  ../traces
+
+SOURCEPATH	 ../src
+SOURCE       HelloTraceExample.cpp 
+SOURCE       HelloTraceTypes.cpp
+SOURCE       HelloTraceInterface.cpp 
+SOURCE       HelloTraceFn.cpp 
+SOURCE       HelloTracePanic.cpp 
+
+LIBRARY		 euser.lib
+
+#ifdef ENABLE_ABIV2_MODE
+DEBUGGABLE_UDEBONLY
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/group/bld.inf	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,28 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXPORTS
+hellotracedll.iby             CORE_OS_LAYER_IBY_EXPORT_PATH(hellotracedll.iby)
+
+PRJ_MMPFILES
+HelloTraceDll.mmp
+HelloTraceDll2.mmp
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/group/hellotracedll.iby	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,23 @@
+// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+// ROM build file for tracecore project
+
+#ifndef HELLOTRACEDLL_IBY
+#define HELLOTRACEDLL_IBY
+
+file=ABI_DIR\BUILD_DIR\hellotracedll.dll        Sys\Bin\hellotracedll.dll
+file=ABI_DIR\BUILD_DIR\hellotracedll2.dll        Sys\Bin\hellotracedll2.dll
+
+#endif //HELLOTRACEDLL_IBY
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/inc/HelloTraceExample.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,40 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef __HELLOTRACEEXAMPLE_H__
+#define __HELLOTRACEEXAMPLE_H__
+
+#include <e32std.h>
+
+class HelloTraceExample
+    {
+public:
+    IMPORT_C static void JustTypes();    
+    IMPORT_C static void Interface();    
+    IMPORT_C static void FnEntryExit();    
+    IMPORT_C static void PanicTrace();    
+
+    // @TODO add examples for state macros
+    // @TODO add examples for event macros
+    // @TODO add examples for OstTraceData
+    // @TODO add compile-time selector examples
+    // @TODO add macro wrapper examples
+    };
+
+#endif  // __HELLOTRACEEXAMPLE_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/inc/HelloTraceFn.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,122 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef HELLOTRACEFN_H_
+#define HELLOTRACEFN_H_
+
+#include <e32base.h>    // CBase
+
+class CHelloTraceFn : public CBase
+    {
+public:
+    
+    // Note the Trace Builder will only parse this if it's in a cpp file
+    // but not from here :(
+    // Also if you add a new enum you need to reparse the enum - it doesn't
+    // get automatically reparsed by the Trace Compiler :(
+    enum TFnEnum
+        {
+        EExample1,
+        EExample2 = 2, 
+        // EExample3 = EExample2 + 1, // The Trace Builder can't parse this :(
+        };
+    
+public:
+    static CHelloTraceFn* NewL();
+    static CHelloTraceFn* NewLC();
+    ~CHelloTraceFn();
+   
+public: // Fn entry / exit tracing examples 
+    void Simple();
+    void OutputsParams(TInt aParam, TFnEnum aEnumParam);
+    void OutputsSignedIntegers(TInt8 aParam8,   TInt16 aParam16, 
+                               TInt32 aParam32, TInt64 aParam64);
+    void OutputsUnsignedIntegers(TUint8 aParam8,   TUint16 aParam16, 
+                                 TUint32 aParam32, TUint64 aParam64);
+     
+    TInt OutputsTIntReturnValue();
+    TInt64 OutputsTInt64ReturnValue();
+    TFnEnum OutputsTFnEnumReturnValue();
+
+    CActive* OutputsUnknownPtrType(CActive* aActive);
+    CActive& OutputsUnknownRefType(CActive& aActive);
+    
+    void OutputMissingParams(TInt aUsedParam, TInt aCommentParam, TInt aMissingParam);
+
+#ifdef _DEBUG    
+    void PreProcessedFn(TInt aDbgParam);
+#else
+    void PreProcessedFn();
+#endif
+    
+    static void StaticOutputsParamsL(TInt aParam);  
+    
+    // duplicate all the function and put the impl in the header file HelloTraceFnDup.h
+    void SimpleDup();
+    void OutputsParamsDup(TInt aParam, TFnEnum aEnumParam);
+    void OutputsSignedIntegersDup(TInt8 aParam8,   TInt16 aParam16, 
+                               TInt32 aParam32, TInt64 aParam64);
+    void OutputsUnsignedIntegersDup(TUint8 aParam8,   TUint16 aParam16, 
+                                 TUint32 aParam32, TUint64 aParam64);
+     
+    TInt OutputsTIntReturnValueDup();
+    TInt64 OutputsTInt64ReturnValueDup();
+    TFnEnum OutputsTFnEnumReturnValueDup();
+
+    CActive* OutputsUnknownPtrTypeDup(CActive* aActive);
+    CActive& OutputsUnknownRefTypeDup(CActive& aActive);
+    
+    void OutputMissingParamsDup(TInt aUsedParam, TInt aCommentParam, TInt aMissingParam);
+
+#ifdef _DEBUG    
+    void PreProcessedFnDup(TInt aDbgParam);
+#else
+    void PreProcessedFnDup();
+#endif
+    static void StaticOutputsParamsDupL(TInt aParam);  
+    
+    // duplicate all the function again and put the impl in the header file HelloTraceFnDup2.h
+    void SimpleDup2();
+    void OutputsParamsDup2(TInt aParam, TFnEnum aEnumParam);
+    void OutputsSignedIntegersDup2(TInt8 aParam8,   TInt16 aParam16, 
+                               TInt32 aParam32, TInt64 aParam64);
+    void OutputsUnsignedIntegersDup2(TUint8 aParam8,   TUint16 aParam16, 
+                                 TUint32 aParam32, TUint64 aParam64);
+     
+    TInt OutputsTIntReturnValueDup2();
+    TInt64 OutputsTInt64ReturnValueDup2();
+    TFnEnum OutputsTFnEnumReturnValueDup2();
+
+    CActive* OutputsUnknownPtrTypeDup2(CActive* aActive);
+    CActive& OutputsUnknownRefTypeDup2(CActive& aActive);
+    
+    void OutputMissingParamsDup2(TInt aUsedParam, TInt aCommentParam, TInt aMissingParam);
+
+#ifdef _DEBUG    
+    void PreProcessedFnDup2(TInt aDbgParam);
+#else
+    void PreProcessedFnDup2();
+#endif
+    static void StaticOutputsParamsDup2L(TInt aParam);  
+
+
+private:
+    CHelloTraceFn();
+    };
+
+#endif /* HELLOTRACEFN_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/inc/HelloTraceFn2.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,122 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef HELLOTRACEFN2_H_
+#define HELLOTRACEFN2_H_
+
+#include <e32base.h>    // CBase
+
+class CHelloTraceFn : public CBase
+    {
+public:
+    
+    // Note the Trace Builder will only parse this if it's in a cpp file
+    // but not from here :(
+    // Also if you add a new enum you need to reparse the enum - it doesn't
+    // get automatically reparsed by the Trace Compiler :(
+    enum TFnEnum
+        {
+        EExample1,
+        EExample2 = 2, 
+        // EExample3 = EExample2 + 1, // The Trace Builder can't parse this :(
+        };
+    
+public:
+    static CHelloTraceFn* NewL();
+    static CHelloTraceFn* NewLC();
+    ~CHelloTraceFn();
+   
+public: // Fn entry / exit tracing examples 
+    void Simple();
+    void OutputsParams(TInt aParam, TFnEnum aEnumParam);
+    void OutputsSignedIntegers(TInt8 aParam8,   TInt16 aParam16, 
+                               TInt32 aParam32, TInt64 aParam64);
+    void OutputsUnsignedIntegers(TUint8 aParam8,   TUint16 aParam16, 
+                                 TUint32 aParam32, TUint64 aParam64);
+     
+    TInt OutputsTIntReturnValue();
+    TInt64 OutputsTInt64ReturnValue();
+    TFnEnum OutputsTFnEnumReturnValue();
+
+    CActive* OutputsUnknownPtrType(CActive* aActive);
+    CActive& OutputsUnknownRefType(CActive& aActive);
+    
+    void OutputMissingParams(TInt aUsedParam, TInt aCommentParam, TInt aMissingParam);
+
+#ifdef _DEBUG    
+    void PreProcessedFn(TInt aDbgParam);
+#else
+    void PreProcessedFn();
+#endif
+    
+    static void StaticOutputsParamsL(TInt aParam);  
+    
+    // duplicate all the function and put the impl in the header file HelloTraceFnDup.h
+    void SimpleDup();
+    void OutputsParamsDup(TInt aParam, TFnEnum aEnumParam);
+    void OutputsSignedIntegersDup(TInt8 aParam8,   TInt16 aParam16, 
+                               TInt32 aParam32, TInt64 aParam64);
+    void OutputsUnsignedIntegersDup(TUint8 aParam8,   TUint16 aParam16, 
+                                 TUint32 aParam32, TUint64 aParam64);
+     
+    TInt OutputsTIntReturnValueDup();
+    TInt64 OutputsTInt64ReturnValueDup();
+    TFnEnum OutputsTFnEnumReturnValueDup();
+
+    CActive* OutputsUnknownPtrTypeDup(CActive* aActive);
+    CActive& OutputsUnknownRefTypeDup(CActive& aActive);
+    
+    void OutputMissingParamsDup(TInt aUsedParam, TInt aCommentParam, TInt aMissingParam);
+
+#ifdef _DEBUG    
+    void PreProcessedFnDup(TInt aDbgParam);
+#else
+    void PreProcessedFnDup();
+#endif
+    static void StaticOutputsParamsDupL(TInt aParam);  
+    
+    // duplicate all the function again and put the impl in the header file HelloTraceFnDup2.h
+    void SimpleDup2();
+    void OutputsParamsDup2(TInt aParam, TFnEnum aEnumParam);
+    void OutputsSignedIntegersDup2(TInt8 aParam8,   TInt16 aParam16, 
+                               TInt32 aParam32, TInt64 aParam64);
+    void OutputsUnsignedIntegersDup2(TUint8 aParam8,   TUint16 aParam16, 
+                                 TUint32 aParam32, TUint64 aParam64);
+     
+    TInt OutputsTIntReturnValueDup2();
+    TInt64 OutputsTInt64ReturnValueDup2();
+    TFnEnum OutputsTFnEnumReturnValueDup2();
+
+    CActive* OutputsUnknownPtrTypeDup2(CActive* aActive);
+    CActive& OutputsUnknownRefTypeDup2(CActive& aActive);
+    
+    void OutputMissingParamsDup2(TInt aUsedParam, TInt aCommentParam, TInt aMissingParam);
+
+#ifdef _DEBUG    
+    void PreProcessedFnDup2(TInt aDbgParam);
+#else
+    void PreProcessedFnDup2();
+#endif
+    static void StaticOutputsParamsDup2L(TInt aParam);  
+
+
+private:
+    CHelloTraceFn();
+    };
+
+#endif /* HELLOTRACEFN2_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/inc/HelloTraceInterface.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,63 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef __HELLOTRACEINTERFACE_H__
+#define __HELLOTRACEINTERFACE_H__
+
+#include <e32base.h>	// CBase
+#include <e32std.h>	 // TBuf
+
+const TInt KHelloTraceDllBufferLength = 10;
+typedef TBuf<KHelloTraceDllBufferLength> THelloTraceDllExampleString;
+
+class CHelloTraceInterface : public CBase
+    {
+public:
+    IMPORT_C static CHelloTraceInterface* NewL();
+    IMPORT_C static CHelloTraceInterface* NewLC();
+    IMPORT_C ~CHelloTraceInterface();
+
+public:
+    IMPORT_C static TVersion Version();
+    IMPORT_C const TPtrC String() const;
+    IMPORT_C void AddCharL(const TChar& aChar);
+    IMPORT_C void RemoveLast();
+    IMPORT_C void ResetString();
+    
+    IMPORT_C static TVersion VersionDup();
+    IMPORT_C const TPtrC StringDup() const;
+    IMPORT_C void AddCharDupL(const TChar& aChar);
+    IMPORT_C void RemoveLastDup();
+    IMPORT_C void ResetStringDup();
+
+    IMPORT_C static TVersion VersionDup2();
+    IMPORT_C const TPtrC StringDup2() const;
+    IMPORT_C void AddCharDup2L(const TChar& aChar);
+    IMPORT_C void RemoveLastDup2();
+    IMPORT_C void ResetStringDup2();
+private:
+    CHelloTraceInterface();
+    void ConstructL();
+
+private:
+    // data
+    THelloTraceDllExampleString* iString;
+    };
+
+#endif  // __HELLOTRACEINTERFACE_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/inc/HelloTraceInterface2.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,63 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef __HELLOTRACEINTERFACE2_H__
+#define __HELLOTRACEINTERFACE2_H__
+
+#include <e32base.h>	// CBase
+#include <e32std.h>	 // TBuf
+
+const TInt KHelloTraceDllBufferLength = 10;
+typedef TBuf<KHelloTraceDllBufferLength> THelloTraceDllExampleString;
+
+class CHelloTraceInterface : public CBase
+    {
+public:
+    IMPORT_C static CHelloTraceInterface* NewL();
+    IMPORT_C static CHelloTraceInterface* NewLC();
+    IMPORT_C ~CHelloTraceInterface();
+
+public:
+    IMPORT_C static TVersion Version();
+    IMPORT_C const TPtrC String() const;
+    IMPORT_C void AddCharL(const TChar& aChar);
+    IMPORT_C void RemoveLast();
+    IMPORT_C void ResetString();
+    
+    IMPORT_C static TVersion VersionDup();
+    IMPORT_C const TPtrC StringDup() const;
+    IMPORT_C void AddCharDupL(const TChar& aChar);
+    IMPORT_C void RemoveLastDup();
+    IMPORT_C void ResetStringDup();
+
+    IMPORT_C static TVersion VersionDup2();
+    IMPORT_C const TPtrC StringDup2() const;
+    IMPORT_C void AddCharDup2L(const TChar& aChar);
+    IMPORT_C void RemoveLastDup2();
+    IMPORT_C void ResetStringDup2();
+private:
+    CHelloTraceInterface();
+    void ConstructL();
+
+private:
+    // data
+    THelloTraceDllExampleString* iString;
+    };
+
+#endif  // __HELLOTRACEINTERFACE2_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/inc/HelloTracePanic.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,35 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef __HELLOTRACEDLL_PAN__
+#define __HELLOTRACEDLL_PAN__
+
+//  Data Types
+
+enum THelloTraceDllPanic
+    {
+    EHelloTraceDllExamplePanic,
+    EHelloTraceDllNullPointer,
+    };
+
+//  Function Prototypes
+
+GLREF_C void Panic(THelloTraceDllPanic aPanic);
+
+#endif  // __HELLOTRACEDLL_PAN__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/inc/HelloTraceTypes.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,39 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef __HELLOTRACETYPES_H__
+#define __HELLOTRACETYPES_H__
+
+class HelloTraceTypes
+    {
+public:
+    static void SignedIntegers();
+    static void UnsignedIntegers();
+    static void Descriptors();
+    
+    static void SignedIntegersDup();
+    static void UnsignedIntegersDup();
+    static void DescriptorsDup();
+        
+    static void SignedIntegersDup2();
+    static void UnsignedIntegersDup2();
+    static void DescriptorsDup2();
+    };
+
+#endif  // __HELLOTRACETYPES_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/inc/HelloTraceTypes2.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,39 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef __HELLOTRACETYPES2_H__
+#define __HELLOTRACETYPES2_H__
+
+class HelloTraceTypes
+    {
+public:
+    static void SignedIntegers();
+    static void UnsignedIntegers();
+    static void Descriptors();
+    
+    static void SignedIntegersDup();
+    static void UnsignedIntegersDup();
+    static void DescriptorsDup();
+        
+    static void SignedIntegersDup2();
+    static void UnsignedIntegersDup2();
+    static void DescriptorsDup2();
+    };
+
+#endif  // __HELLOTRACETYPES2_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/incDup/HelloTraceFn2Dup.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,156 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+ 
+#ifndef HELLOTRACEFNDUP2_H_
+#define HELLOTRACEFNDUP2_H_
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTraceFn2DupTraces.h"
+#endif
+
+inline void CHelloTraceFn::SimpleDup()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_SIMPLE2_DUP_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_SIMPLE2_DUP_EXIT, this );
+    }
+
+inline void CHelloTraceFn::OutputsParamsDup(TInt aParam, TFnEnum aEnumParam)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSPARAMS2_DUP_ENTRY, this );
+    Simple();
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSPARAMS2_DUP_EXIT, this );
+    }
+
+inline void CHelloTraceFn::StaticOutputsParamsDupL(TInt aParam)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_STATICOUTPUTSPARAMS2_DUP_ENTRY, NULL );
+    CHelloTraceFn* example = CHelloTraceFn::NewLC();
+    example->SimpleDup();    
+    CleanupStack::PopAndDestroy(example);
+    OstTraceFunctionExit0( CHELLOTRACEFN_STATICOUTPUTSPARAMS2_DUP_EXIT );    
+    }
+
+inline void CHelloTraceFn::OutputsSignedIntegersDup(TInt8 aParam8,   TInt16 aParam16, 
+                                          TInt32 aParam32, TInt64 aParam64)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS2_DUP_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS2_DUP_EXIT, this );
+    }
+
+void CHelloTraceFn::OutputsUnsignedIntegersDup(TUint8 aParam8,   TUint16 aParam16, 
+                                            TUint32 aParam32, TUint64 aParam64)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS2_DUP_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS2_DUP_EXIT, this );
+    }
+
+
+inline TInt CHelloTraceFn::OutputsTIntReturnValueDup()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE2_DUP_ENTRY, this );
+    TInt ret = KErrNone;
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE2_DUP_EXIT, this, ret );
+    return ret;
+    }
+
+inline TInt64 CHelloTraceFn::OutputsTInt64ReturnValueDup()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE2_DUP_ENTRY, this );
+    TInt64 ret = (TInt64) 2 << 40;
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE2_DUP_EXIT, this, ret );
+    return ret;
+    }
+
+inline CHelloTraceFn::TFnEnum CHelloTraceFn::OutputsTFnEnumReturnValueDup()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE2_DUP_ENTRY, this );
+    TFnEnum ret = EExample1;
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE2_DUP_EXIT, this, ret );
+    return ret;    
+    }
+
+inline CActive* CHelloTraceFn::OutputsUnknownPtrTypeDup(CActive* aActive)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE2_DUP_ENTRY, this );    
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE2_DUP_EXIT, this, (TUint) aActive );
+    return aActive;
+    }
+
+inline CActive& CHelloTraceFn::OutputsUnknownRefTypeDup(CActive& aActive)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE2_DUP_ENTRY, this );
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE2_DUP_EXIT, this, (TUint) &aActive );    
+    return aActive;
+    }
+
+// The following doesn't compile as the Trace Compiler doesn't generate
+// the correct OstTraceGenExt(...) function for it
+//void CHelloTraceFn::OutputMissingParamsBug(TInt /*aCommentParam*/, TInt)
+//    {
+//    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_ENTRY, this );
+//    // ...
+//    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_EXIT, this );    
+//    }
+
+// The following compiles and works but outputs the following warning
+// warning: HelloTraceFn.cpp, line xxx: Parameter did not have a name and was not added to trace
+// The fact that this cannot be suppressed is a known problem we're working on.
+inline void CHelloTraceFn::OutputMissingParamsDup(TInt aUsedParam, TInt /*aCommentParam*/, TInt)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMS2_DUP_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMS2_DUP_EXIT, this );
+    }
+
+// The following doesn't work as the Trace Compiler outputs:
+// error: HelloTraceFn.cpp, line xxx: Class / function name for trace could not be determined x3
+//#ifdef _DEBUG
+//void CHelloTraceFn::PreProcessedFn(TInt aDbgParam)
+//    {
+//    OstTraceFunctionEntryExt( PRE_PROCESSED_ENTRTY_1, this );
+//#else
+//void CHelloTraceFn::PreProcessedFn()
+//    {
+//    OstTraceFunctionEntry1( PRE_PROCESSED_ENTRTY_2, this );
+//#endif
+//    Simple();
+//    OstTraceFunctionExit1( CHELLOTRACEFN_PREPROCESSEDFN_EXIT, this );
+//    }
+
+// Workaround example code until a proper fix is provided
+#ifdef _DEBUG
+inline void CHelloTraceFn::PreProcessedFnDup(TInt aDbgParam)
+    {
+    OstTraceExt2( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN2_DUP_ENTRY_1, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;aDbgParam=%d;this=%x", (TInt) aDbgParam, (TUint) this);
+#else
+    inline void CHelloTraceFn::PreProcessedFnDup()
+    {
+    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN2_DUP_ENTRY_2, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
+#endif
+    SimpleDup();
+    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN2_DUP_EXIT, "CHelloTraceFn::PreProcessedFn: < CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
+    }
+
+#endif /* HELLOTRACEFN2DUP_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/incDup/HelloTraceFn2Dup2.inl	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,156 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+ 
+#ifndef HELLOTRACEFN2DUP2_H_
+#define HELLOTRACEFN2DUP2_H_
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTraceFn2Dup2Traces.h"
+#endif
+
+inline void CHelloTraceFn::SimpleDup2()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_SIMPLE2_DUP2_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_SIMPLE2_DUP2_EXIT, this );
+    }
+
+inline void CHelloTraceFn::OutputsParamsDup2(TInt aParam, TFnEnum aEnumParam)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSPARAMS2_DUP2_ENTRY, this );
+    Simple();
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSPARAMS2_DUP2_EXIT, this );
+    }
+
+inline void CHelloTraceFn::StaticOutputsParamsDup2L(TInt aParam)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_STATICOUTPUTSPARAMS2_DUP2_ENTRY, NULL );
+    CHelloTraceFn* example = CHelloTraceFn::NewLC();
+    example->SimpleDup2();    
+    CleanupStack::PopAndDestroy(example);
+    OstTraceFunctionExit0( CHELLOTRACEFN_STATICOUTPUTSPARAMS2_DUP2_EXIT );    
+    }
+
+inline void CHelloTraceFn::OutputsSignedIntegersDup2(TInt8 aParam8,   TInt16 aParam16, 
+                                          TInt32 aParam32, TInt64 aParam64)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS2_DUP2_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS2_DUP2_EXIT, this );
+    }
+
+inline void CHelloTraceFn::OutputsUnsignedIntegersDup2(TUint8 aParam8,   TUint16 aParam16, 
+                                            TUint32 aParam32, TUint64 aParam64)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS2_DUP2_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS2_DUP2_EXIT, this );
+    }
+
+
+inline TInt CHelloTraceFn::OutputsTIntReturnValueDup2()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE2_DUP2_ENTRY, this );
+    TInt ret = KErrNone;
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE2_DUP2_EXIT, this, ret );
+    return ret;
+    }
+
+inline TInt64 CHelloTraceFn::OutputsTInt64ReturnValueDup2()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE2_DUP2_ENTRY, this );
+    TInt64 ret = (TInt64) 2 << 40;
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE2_DUP2_EXIT, this, ret );
+    return ret;
+    }
+
+inline CHelloTraceFn::TFnEnum CHelloTraceFn::OutputsTFnEnumReturnValueDup2()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE2_DUP2_ENTRY, this );
+    TFnEnum ret = EExample1;
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE2_DUP2_EXIT, this, ret );
+    return ret;    
+    }
+
+inline CActive* CHelloTraceFn::OutputsUnknownPtrTypeDup2(CActive* aActive)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE2_DUP2_ENTRY, this );    
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE2_DUP2_EXIT, this, (TUint) aActive );
+    return aActive;
+    }
+
+inline CActive& CHelloTraceFn::OutputsUnknownRefTypeDup2(CActive& aActive)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE2_DUP2_ENTRY, this );
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE2_DUP2_EXIT, this, (TUint) &aActive );    
+    return aActive;
+    }
+
+// The following doesn't compile as the Trace Compiler doesn't generate
+// the correct OstTraceGenExt(...) function for it
+//void CHelloTraceFn::OutputMissingParamsBug(TInt /*aCommentParam*/, TInt)
+//    {
+//    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_ENTRY, this );
+//    // ...
+//    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_EXIT, this );    
+//    }
+
+// The following compiles and works but outputs the following warning
+// warning: HelloTraceFn.cpp, line xxx: Parameter did not have a name and was not added to trace
+// The fact that this cannot be suppressed is a known problem we're working on.
+inline void CHelloTraceFn::OutputMissingParamsDup2(TInt aUsedParam, TInt /*aCommentParam*/, TInt)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMS2_DUP2_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMS2_DUP2_EXIT, this );
+    }
+
+// The following doesn't work as the Trace Compiler outputs:
+// error: HelloTraceFn.cpp, line xxx: Class / function name for trace could not be determined x3
+//#ifdef _DEBUG
+//void CHelloTraceFn::PreProcessedFn(TInt aDbgParam)
+//    {
+//    OstTraceFunctionEntryExt( PRE_PROCESSED_ENTRTY_1, this );
+//#else
+//void CHelloTraceFn::PreProcessedFn()
+//    {
+//    OstTraceFunctionEntry1( PRE_PROCESSED_ENTRTY_2, this );
+//#endif
+//    Simple();
+//    OstTraceFunctionExit1( CHELLOTRACEFN_PREPROCESSEDFN_EXIT, this );
+//    }
+
+// Workaround example code until a proper fix is provided
+#ifdef _DEBUG
+inline void CHelloTraceFn::PreProcessedFnDup2(TInt aDbgParam)
+    {
+    OstTraceExt2( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN2_DUP2_ENTRY_1, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;aDbgParam=%d;this=%x", (TInt) aDbgParam, (TUint) this);
+#else
+    inline void CHelloTraceFn::PreProcessedFnDup2()
+    {
+    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN2_DUP2_ENTRY_2, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
+#endif
+    SimpleDup2();
+    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN2_DUP2_EXIT, "CHelloTraceFn::PreProcessedFn: < CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
+    }
+
+#endif /* HELLOTRACEFN2DUP2_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/incDup/HelloTraceFnDup.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,157 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef HELLOTRACEFNDUP_H_
+#define HELLOTRACEFNDUP_H_
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTraceFnDupTraces.h"
+#endif
+
+inline void CHelloTraceFn::SimpleDup()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_SIMPLE_DUP_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_SIMPLE_DUP_EXIT, this );
+    }
+
+inline void CHelloTraceFn::OutputsParamsDup(TInt aParam, TFnEnum aEnumParam)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSPARAMS_DUP_ENTRY, this );
+    Simple();
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSPARAMS_DUP_EXIT, this );
+    }
+
+inline void CHelloTraceFn::StaticOutputsParamsDupL(TInt aParam)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_STATICOUTPUTSPARAMS_DUP_ENTRY, NULL );
+    CHelloTraceFn* example = CHelloTraceFn::NewLC();
+    example->SimpleDup();    
+    CleanupStack::PopAndDestroy(example);
+    OstTraceFunctionExit0( CHELLOTRACEFN_STATICOUTPUTSPARAMS_DUP_EXIT );    
+    }
+
+inline void CHelloTraceFn::OutputsSignedIntegersDup(TInt8 aParam8,   TInt16 aParam16, 
+                                          TInt32 aParam32, TInt64 aParam64)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS_DUP_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS_DUP_EXIT, this );
+    }
+
+void CHelloTraceFn::OutputsUnsignedIntegersDup(TUint8 aParam8,   TUint16 aParam16, 
+                                            TUint32 aParam32, TUint64 aParam64)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS_DUP_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS_DUP_EXIT, this );
+    }
+
+
+inline TInt CHelloTraceFn::OutputsTIntReturnValueDup()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_DUP_ENTRY, this );
+    TInt ret = KErrNone;
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_DUP_EXIT, this, ret );
+    return ret;
+    }
+
+inline TInt64 CHelloTraceFn::OutputsTInt64ReturnValueDup()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE_DUP_ENTRY, this );
+    TInt64 ret = (TInt64) 2 << 40;
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE_DUP_EXIT, this, ret );
+    return ret;
+    }
+
+inline CHelloTraceFn::TFnEnum CHelloTraceFn::OutputsTFnEnumReturnValueDup()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE_DUP_ENTRY, this );
+    TFnEnum ret = EExample1;
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE_DUP_EXIT, this, ret );
+    return ret;    
+    }
+
+inline CActive* CHelloTraceFn::OutputsUnknownPtrTypeDup(CActive* aActive)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_DUP_ENTRY, this );    
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_DUP_EXIT, this, (TUint) aActive );
+    return aActive;
+    }
+
+inline CActive& CHelloTraceFn::OutputsUnknownRefTypeDup(CActive& aActive)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE_DUP_ENTRY, this );
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE_DUP_EXIT, this, (TUint) &aActive );    
+    return aActive;
+    }
+
+// The following doesn't compile as the Trace Compiler doesn't generate
+// the correct OstTraceGenExt(...) function for it
+//void CHelloTraceFn::OutputMissingParamsBug(TInt /*aCommentParam*/, TInt)
+//    {
+//    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_ENTRY, this );
+//    // ...
+//    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_EXIT, this );    
+//    }
+
+// The following compiles and works but outputs the following warning
+// warning: HelloTraceFn.cpp, line xxx: Parameter did not have a name and was not added to trace
+// The fact that this cannot be suppressed is a known problem we're working on.
+inline void CHelloTraceFn::OutputMissingParamsDup(TInt aUsedParam, TInt /*aCommentParam*/, TInt)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMS_DUP_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMS_DUP_EXIT, this );
+    }
+
+// The following doesn't work as the Trace Compiler outputs:
+// error: HelloTraceFn.cpp, line xxx: Class / function name for trace could not be determined x3
+//#ifdef _DEBUG
+//void CHelloTraceFn::PreProcessedFn(TInt aDbgParam)
+//    {
+//    OstTraceFunctionEntryExt( PRE_PROCESSED_ENTRTY_1, this );
+//#else
+//void CHelloTraceFn::PreProcessedFn()
+//    {
+//    OstTraceFunctionEntry1( PRE_PROCESSED_ENTRTY_2, this );
+//#endif
+//    Simple();
+//    OstTraceFunctionExit1( CHELLOTRACEFN_PREPROCESSEDFN_EXIT, this );
+//    }
+
+// Workaround example code until a proper fix is provided
+#ifdef _DEBUG
+inline void CHelloTraceFn::PreProcessedFnDup(TInt aDbgParam)
+    {
+    OstTraceExt2( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_DUP_ENTRY_1, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;aDbgParam=%d;this=%x", (TInt) aDbgParam, (TUint) this);
+#else
+    inline void CHelloTraceFn::PreProcessedFnDup()
+    {
+    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_DUP_ENTRY_2, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
+#endif
+    SimpleDup();
+    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_DUP_EXIT, "CHelloTraceFn::PreProcessedFn: < CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
+    }
+
+#endif /* HELLOTRACEFNDUP_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/incDup/HelloTraceFnDup2.inl	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,157 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef HELLOTRACEFNDUP2_H_
+#define HELLOTRACEFNDUP2_H_
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTraceFnDup2Traces.h"
+#endif
+
+inline void CHelloTraceFn::SimpleDup2()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_SIMPLE_DUP2_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_SIMPLE_DUP2_EXIT, this );
+    }
+
+inline void CHelloTraceFn::OutputsParamsDup2(TInt aParam, TFnEnum aEnumParam)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSPARAMS_DUP2_ENTRY, this );
+    Simple();
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSPARAMS_DUP2_EXIT, this );
+    }
+
+inline void CHelloTraceFn::StaticOutputsParamsDup2L(TInt aParam)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_STATICOUTPUTSPARAMS_DUP2_ENTRY, NULL );
+    CHelloTraceFn* example = CHelloTraceFn::NewLC();
+    example->SimpleDup2();    
+    CleanupStack::PopAndDestroy(example);
+    OstTraceFunctionExit0( CHELLOTRACEFN_STATICOUTPUTSPARAMS_DUP2_EXIT );    
+    }
+
+inline void CHelloTraceFn::OutputsSignedIntegersDup2(TInt8 aParam8,   TInt16 aParam16, 
+                                          TInt32 aParam32, TInt64 aParam64)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS_DUP2_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS_DUP2_EXIT, this );
+    }
+
+inline void CHelloTraceFn::OutputsUnsignedIntegersDup2(TUint8 aParam8,   TUint16 aParam16, 
+                                            TUint32 aParam32, TUint64 aParam64)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS_DUP2_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS_DUP2_EXIT, this );
+    }
+
+
+inline TInt CHelloTraceFn::OutputsTIntReturnValueDup2()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_DUP2_ENTRY, this );
+    TInt ret = KErrNone;
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_DUP2_EXIT, this, ret );
+    return ret;
+    }
+
+inline TInt64 CHelloTraceFn::OutputsTInt64ReturnValueDup2()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE_DUP2_ENTRY, this );
+    TInt64 ret = (TInt64) 2 << 40;
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE_DUP2_EXIT, this, ret );
+    return ret;
+    }
+
+inline CHelloTraceFn::TFnEnum CHelloTraceFn::OutputsTFnEnumReturnValueDup2()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE_DUP2_ENTRY, this );
+    TFnEnum ret = EExample1;
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE_DUP2_EXIT, this, ret );
+    return ret;    
+    }
+
+inline CActive* CHelloTraceFn::OutputsUnknownPtrTypeDup2(CActive* aActive)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_DUP2_ENTRY, this );    
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_DUP2_EXIT, this, (TUint) aActive );
+    return aActive;
+    }
+
+inline CActive& CHelloTraceFn::OutputsUnknownRefTypeDup2(CActive& aActive)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE_DUP2_ENTRY, this );
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE_DUP2_EXIT, this, (TUint) &aActive );    
+    return aActive;
+    }
+
+// The following doesn't compile as the Trace Compiler doesn't generate
+// the correct OstTraceGenExt(...) function for it
+//void CHelloTraceFn::OutputMissingParamsBug(TInt /*aCommentParam*/, TInt)
+//    {
+//    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_ENTRY, this );
+//    // ...
+//    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_EXIT, this );    
+//    }
+
+// The following compiles and works but outputs the following warning
+// warning: HelloTraceFn.cpp, line xxx: Parameter did not have a name and was not added to trace
+// The fact that this cannot be suppressed is a known problem we're working on.
+inline void CHelloTraceFn::OutputMissingParamsDup2(TInt aUsedParam, TInt /*aCommentParam*/, TInt)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMS_DUP2_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMS_DUP2_EXIT, this );
+    }
+
+// The following doesn't work as the Trace Compiler outputs:
+// error: HelloTraceFn.cpp, line xxx: Class / function name for trace could not be determined x3
+//#ifdef _DEBUG
+//void CHelloTraceFn::PreProcessedFn(TInt aDbgParam)
+//    {
+//    OstTraceFunctionEntryExt( PRE_PROCESSED_ENTRTY_1, this );
+//#else
+//void CHelloTraceFn::PreProcessedFn()
+//    {
+//    OstTraceFunctionEntry1( PRE_PROCESSED_ENTRTY_2, this );
+//#endif
+//    Simple();
+//    OstTraceFunctionExit1( CHELLOTRACEFN_PREPROCESSEDFN_EXIT, this );
+//    }
+
+// Workaround example code until a proper fix is provided
+#ifdef _DEBUG
+inline void CHelloTraceFn::PreProcessedFnDup2(TInt aDbgParam)
+    {
+    OstTraceExt2( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_DUP2_ENTRY_1, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;aDbgParam=%d;this=%x", (TInt) aDbgParam, (TUint) this);
+#else
+    inline void CHelloTraceFn::PreProcessedFnDup2()
+    {
+    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_DUP2_ENTRY_2, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
+#endif
+    SimpleDup2();
+    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_DUP2_EXIT, "CHelloTraceFn::PreProcessedFn: < CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
+    }
+
+#endif /* HELLOTRACEFNDUP2_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/incDup/HelloTraceInterface2Dup.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,91 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef __HELLOTRACEINTERFACE2DUP_H__
+#define __HELLOTRACEINTERFACE2DUP_H__
+
+#include "HelloTracePanic.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTraceInterface2DupTraces.h"
+#endif
+
+ inline EXPORT_C TVersion CHelloTraceInterface::VersionDup()
+        {
+        const TInt KMajor = 1;
+        const TInt KMinor = 0;
+        const TInt KBuild = 1;
+        TVersion version = TVersion(KMajor, KMinor, KBuild);
+        OstTraceExt1( TRACE_BORDER, CHELLOTRACEDLL_VERSION2_DUP, "CHelloTraceInterface::Version = %S", version.Name());   
+        return version;
+        }
+
+ inline EXPORT_C const TPtrC CHelloTraceInterface::StringDup() const
+        {
+        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
+
+        OstTraceDefExt2( OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CHELLOTRACEDLL_STRING2_DUP, 
+                         "[0x%08x] Returned %S", (TUint32) this, *iString);   
+        return *iString;
+        }
+
+ inline EXPORT_C void CHelloTraceInterface::AddCharDupL(const TChar& aChar)
+        {
+        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
+
+        OstTraceExt3( TRACE_BORDER, CHELLOTRACEDLL_ADDCHARL2_DUP, 
+                      "[0x%08x] Adding %d to %S", (TUint32) this, (TInt32) aChar, *iString);   
+        if (iString->Length() >= KHelloTraceDllBufferLength)
+            {
+            OstTrace1( TRACE_ERROR, CHELLOTRACEDLL_ADDCHARL_ERR2_DUP,
+                       "[0x%08x] Not enough space to add character", (TUint32) this);
+            User::Leave( KErrTooBig);
+            }
+        iString->Append(aChar);
+        }
+
+ inline EXPORT_C void CHelloTraceInterface::RemoveLastDup()
+        {
+        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
+
+        OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_REMOVELAST2_DUP, 
+                      "[0x%08x] Attempting to remove last character from %S", (TUint32) this, *iString);
+        if (iString->Length() > 0)
+            {
+            iString->SetLength(iString->Length() - 1);
+            }
+        else
+            {
+            OstTrace1( TRACE_WARNING, CHELLOTRACEDLL_REMOVELAST_WARN2_DUP, "[0x%08x] String already empty", (TUint32) this);   
+            }
+        }
+
+ inline EXPORT_C void CHelloTraceInterface::ResetStringDup()
+        {
+        OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_RESETSTRING2_DUP, "[0x%08x] Reseting string %S", (TUint32) this, *iString);
+        if (iString == NULL)
+            {
+            iString = new (ELeave) THelloTraceDllExampleString;
+            }
+        else
+            {
+            iString->SetLength(0);
+            }
+        }
+#endif  // __HELLOTRACEINTERFACE2DUP_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/incDup/HelloTraceInterface2Dup2.inl	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,91 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef __HELLOTRACEINTERFACE2DUP2_H__
+#define __HELLOTRACEINTERFACE2DUP2_H__
+
+#include "HelloTracePanic.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTraceInterface2Dup2Traces.h"
+#endif
+
+ inline EXPORT_C TVersion CHelloTraceInterface::VersionDup2()
+        {
+        const TInt KMajor = 1;
+        const TInt KMinor = 0;
+        const TInt KBuild = 1;
+        TVersion version = TVersion(KMajor, KMinor, KBuild);
+        OstTraceExt1( TRACE_BORDER, CHELLOTRACEDLL_VERSION2_DUP2, "CHelloTraceInterface::Version = %S", version.Name());   
+        return version;
+        }
+
+ inline EXPORT_C const TPtrC CHelloTraceInterface::StringDup2() const
+        {
+        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
+
+        OstTraceDefExt2( OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CHELLOTRACEDLL_STRING2_DUP2, 
+                         "[0x%08x] Returned %S", (TUint32) this, *iString);   
+        return *iString;
+        }
+
+ inline EXPORT_C void CHelloTraceInterface::AddCharDup2L(const TChar& aChar)
+        {
+        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
+
+        OstTraceExt3( TRACE_BORDER, CHELLOTRACEDLL_ADDCHARL2_DUP2, 
+                      "[0x%08x] Adding %d to %S", (TUint32) this, (TInt32) aChar, *iString);   
+        if (iString->Length() >= KHelloTraceDllBufferLength)
+            {
+            OstTrace1( TRACE_ERROR, CHELLOTRACEDLL_ADDCHARL_ERR2_DUP2,
+                       "[0x%08x] Not enough space to add character", (TUint32) this);
+            User::Leave( KErrTooBig);
+            }
+        iString->Append(aChar);
+        }
+
+ inline EXPORT_C void CHelloTraceInterface::RemoveLastDup2()
+        {
+        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
+
+        OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_REMOVELAST2_DUP2, 
+                      "[0x%08x] Attempting to remove last character from %S", (TUint32) this, *iString);
+        if (iString->Length() > 0)
+            {
+            iString->SetLength(iString->Length() - 1);
+            }
+        else
+            {
+            OstTrace1( TRACE_WARNING, CHELLOTRACEDLL_REMOVELAST_WARN2_DUP2, "[0x%08x] String already empty", (TUint32) this);   
+            }
+        }
+
+ inline EXPORT_C void CHelloTraceInterface::ResetStringDup2()
+        {
+        OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_RESETSTRING2_DUP2, "[0x%08x] Reseting string %S", (TUint32) this, *iString);
+        if (iString == NULL)
+            {
+            iString = new (ELeave) THelloTraceDllExampleString;
+            }
+        else
+            {
+            iString->SetLength(0);
+            }
+        }
+#endif  // __HELLOTRACEINTERFACE2DUP2_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/incDup/HelloTraceInterfaceDup.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,91 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef __HELLOTRACEINTERFACEDUP_H__
+#define __HELLOTRACEINTERFACEDUP_H__
+
+#include "HelloTracePanic.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTraceInterfaceDupTraces.h"
+#endif
+
+ inline EXPORT_C TVersion CHelloTraceInterface::VersionDup()
+        {
+        const TInt KMajor = 1;
+        const TInt KMinor = 0;
+        const TInt KBuild = 1;
+        TVersion version = TVersion(KMajor, KMinor, KBuild);
+        OstTraceExt1( TRACE_BORDER, CHELLOTRACEDLL_VERSION_DUP, "CHelloTraceInterface::Version = %S", version.Name());   
+        return version;
+        }
+
+ inline EXPORT_C const TPtrC CHelloTraceInterface::StringDup() const
+        {
+        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
+
+        OstTraceDefExt2( OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CHELLOTRACEDLL_STRING_DUP, 
+                         "[0x%08x] Returned %S", (TUint32) this, *iString);   
+        return *iString;
+        }
+
+ inline EXPORT_C void CHelloTraceInterface::AddCharDupL(const TChar& aChar)
+        {
+        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
+
+        OstTraceExt3( TRACE_BORDER, CHELLOTRACEDLL_ADDCHARL_DUP, 
+                      "[0x%08x] Adding %d to %S", (TUint32) this, (TInt32) aChar, *iString);   
+        if (iString->Length() >= KHelloTraceDllBufferLength)
+            {
+            OstTrace1( TRACE_ERROR, CHELLOTRACEDLL_ADDCHARL_ERR_DUP,
+                       "[0x%08x] Not enough space to add character", (TUint32) this);
+            User::Leave( KErrTooBig);
+            }
+        iString->Append(aChar);
+        }
+
+ inline EXPORT_C void CHelloTraceInterface::RemoveLastDup()
+        {
+        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
+
+        OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_REMOVELAST_DUP, 
+                      "[0x%08x] Attempting to remove last character from %S", (TUint32) this, *iString);
+        if (iString->Length() > 0)
+            {
+            iString->SetLength(iString->Length() - 1);
+            }
+        else
+            {
+            OstTrace1( TRACE_WARNING, CHELLOTRACEDLL_REMOVELAST_WARN_DUP, "[0x%08x] String already empty", (TUint32) this);   
+            }
+        }
+
+ inline EXPORT_C void CHelloTraceInterface::ResetStringDup()
+        {
+        OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_RESETSTRING_DUP, "[0x%08x] Reseting string %S", (TUint32) this, *iString);
+        if (iString == NULL)
+            {
+            iString = new (ELeave) THelloTraceDllExampleString;
+            }
+        else
+            {
+            iString->SetLength(0);
+            }
+        }
+#endif  // __HELLOTRACEINTERFACEDUP_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/incDup/HelloTraceInterfaceDup2.inl	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,91 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef __HELLOTRACEINTERFACEDUP2_H__
+#define __HELLOTRACEINTERFACEDUP2_H__
+
+#include "HelloTracePanic.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTraceInterfaceDup2Traces.h"
+#endif
+
+ inline EXPORT_C TVersion CHelloTraceInterface::VersionDup2()
+        {
+        const TInt KMajor = 1;
+        const TInt KMinor = 0;
+        const TInt KBuild = 1;
+        TVersion version = TVersion(KMajor, KMinor, KBuild);
+        OstTraceExt1( TRACE_BORDER, CHELLOTRACEDLL_VERSION_DUP2, "CHelloTraceInterface::Version = %S", version.Name());   
+        return version;
+        }
+
+ inline EXPORT_C const TPtrC CHelloTraceInterface::StringDup2() const
+        {
+        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
+
+        OstTraceDefExt2( OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CHELLOTRACEDLL_STRING_DUP2, 
+                         "[0x%08x] Returned %S", (TUint32) this, *iString);   
+        return *iString;
+        }
+
+ inline EXPORT_C void CHelloTraceInterface::AddCharDup2L(const TChar& aChar)
+        {
+        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
+
+        OstTraceExt3( TRACE_BORDER, CHELLOTRACEDLL_ADDCHARL_DUP2, 
+                      "[0x%08x] Adding %d to %S", (TUint32) this, (TInt32) aChar, *iString);   
+        if (iString->Length() >= KHelloTraceDllBufferLength)
+            {
+            OstTrace1( TRACE_ERROR, CHELLOTRACEDLL_ADDCHARL_ERR_DUP2,
+                       "[0x%08x] Not enough space to add character", (TUint32) this);
+            User::Leave( KErrTooBig);
+            }
+        iString->Append(aChar);
+        }
+
+ inline EXPORT_C void CHelloTraceInterface::RemoveLastDup2()
+        {
+        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
+
+        OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_REMOVELAST_DUP2, 
+                      "[0x%08x] Attempting to remove last character from %S", (TUint32) this, *iString);
+        if (iString->Length() > 0)
+            {
+            iString->SetLength(iString->Length() - 1);
+            }
+        else
+            {
+            OstTrace1( TRACE_WARNING, CHELLOTRACEDLL_REMOVELAST_WARN_DUP2, "[0x%08x] String already empty", (TUint32) this);   
+            }
+        }
+
+ inline EXPORT_C void CHelloTraceInterface::ResetStringDup2()
+        {
+        OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_RESETSTRING_DUP2, "[0x%08x] Reseting string %S", (TUint32) this, *iString);
+        if (iString == NULL)
+            {
+            iString = new (ELeave) THelloTraceDllExampleString;
+            }
+        else
+            {
+            iString->SetLength(0);
+            }
+        }
+#endif  // __HELLOTRACEINTERFACEDUP2_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/incDup/HelloTraceTypes2Dup.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,75 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef __HELLOTRACETYPES2DUP_H__
+#define __HELLOTRACETYPES2DUP_H__
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTraceTypes2DupTraces.h"
+#endif
+
+inline void HelloTraceTypes::SignedIntegersDup()
+    {
+    TInt8  eightBit     = - (TInt8)  1 << 6;
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS2DUP_8, 
+                  "8 bit signed: %hhd", eightBit );
+    
+    TInt16 sixteenBit   = - (TInt16) 1 << 14; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS2DUP_16, 
+                  "16 bit signed: %hd", sixteenBit );
+
+    TInt32 thirtyTwoBit = - (TInt32) 1 << 30; 
+    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS2DUP_32, 
+               "32 bit signed: %d", thirtyTwoBit );
+
+    TInt64 sixtyFourBit = - (TInt64) 1 << 62; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS2DUP_64, 
+                  "64 bit signed: %Ld", sixtyFourBit );
+    }
+
+inline void HelloTraceTypes::UnsignedIntegersDup()
+    {
+    TUint8  eightBit     = (TUint8)  1 << 6;
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS2DUP_8, 
+                  "8 bit unsigned: %hhu", eightBit );
+    
+    TUint16 sixteenBit   = (TUint16) 1 << 14; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS2DUP_16, 
+                  "16 bit unsigned: %hu", sixteenBit );
+
+    TUint32 thirtyTwoBit = (TUint32) 1 << 30; 
+    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS2DUP_32, 
+               "32 bit unsigned: %u", thirtyTwoBit );
+
+    TUint64 sixtyFourBit = (TUint64) 1 << 62; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS2DUP_64, 
+                  "64 bit unsigned: %Lu", sixtyFourBit );
+    }
+
+inline void HelloTraceTypes::DescriptorsDup()
+    {
+    _LIT8(KAscii, "Some ASCII text");
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_ASCII2DUP, "8 bit descriptor: %s", KAscii() );
+
+    _LIT16(KUnicode, "Some unicode text");    
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNICODE2DUP, "16 bit descriptor: %S", KUnicode() );
+    }
+
+#endif  // __HELLOTRACETYPES2DUP_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/incDup/HelloTraceTypes2Dup2.inl	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,75 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef __HELLOTRACETYPES2DUP2_H__
+#define __HELLOTRACETYPES2DUP2_H__
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTraceTypes2Dup2Traces.h"
+#endif
+
+inline void HelloTraceTypes::SignedIntegersDup2()
+    {
+    TInt8  eightBit     = - (TInt8)  1 << 6;
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS2DUP2_8, 
+                  "8 bit signed: %hhd", eightBit );
+    
+    TInt16 sixteenBit   = - (TInt16) 1 << 14; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS2DUP2_16, 
+                  "16 bit signed: %hd", sixteenBit );
+
+    TInt32 thirtyTwoBit = - (TInt32) 1 << 30; 
+    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS2DUP2_32, 
+               "32 bit signed: %d", thirtyTwoBit );
+
+    TInt64 sixtyFourBit = - (TInt64) 1 << 62; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS2DUP2_64, 
+                  "64 bit signed: %Ld", sixtyFourBit );
+    }
+
+inline void HelloTraceTypes::UnsignedIntegersDup2()
+    {
+    TUint8  eightBit     = (TUint8)  1 << 6;
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS2DUP2_8, 
+                  "8 bit unsigned: %hhu", eightBit );
+    
+    TUint16 sixteenBit   = (TUint16) 1 << 14; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS2DUP2_16, 
+                  "16 bit unsigned: %hu", sixteenBit );
+
+    TUint32 thirtyTwoBit = (TUint32) 1 << 30; 
+    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS2DUP2_32, 
+               "32 bit unsigned: %u", thirtyTwoBit );
+
+    TUint64 sixtyFourBit = (TUint64) 1 << 62; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS2DUP2_64, 
+                  "64 bit unsigned: %Lu", sixtyFourBit );
+    }
+
+inline void HelloTraceTypes::DescriptorsDup2()
+    {
+    _LIT8(KAscii, "Some ASCII text");
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_ASCII2DUP2, "8 bit descriptor: %s", KAscii() );
+
+    _LIT16(KUnicode, "Some unicode text");    
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNICODE2DUP2, "16 bit descriptor: %S", KUnicode() );
+    }
+
+#endif  // __HELLOTRACETYPES2DUP2_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/incDup/HelloTraceTypesDup.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,75 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef __HELLOTRACETYPESDUP_H__
+#define __HELLOTRACETYPESDUP_H__
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTraceTypesDupTraces.h"
+#endif
+
+inline void HelloTraceTypes::SignedIntegersDup()
+    {
+    TInt8  eightBit     = - (TInt8)  1 << 6;
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP_8, 
+                  "8 bit signed: %hhd", eightBit );
+    
+    TInt16 sixteenBit   = - (TInt16) 1 << 14; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP_16, 
+                  "16 bit signed: %hd", sixteenBit );
+
+    TInt32 thirtyTwoBit = - (TInt32) 1 << 30; 
+    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP_32, 
+               "32 bit signed: %d", thirtyTwoBit );
+
+    TInt64 sixtyFourBit = - (TInt64) 1 << 62; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP_64, 
+                  "64 bit signed: %Ld", sixtyFourBit );
+    }
+
+inline void HelloTraceTypes::UnsignedIntegersDup()
+    {
+    TUint8  eightBit     = (TUint8)  1 << 6;
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP_8, 
+                  "8 bit unsigned: %hhu", eightBit );
+    
+    TUint16 sixteenBit   = (TUint16) 1 << 14; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP_16, 
+                  "16 bit unsigned: %hu", sixteenBit );
+
+    TUint32 thirtyTwoBit = (TUint32) 1 << 30; 
+    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP_32, 
+               "32 bit unsigned: %u", thirtyTwoBit );
+
+    TUint64 sixtyFourBit = (TUint64) 1 << 62; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP_64, 
+                  "64 bit unsigned: %Lu", sixtyFourBit );
+    }
+
+inline void HelloTraceTypes::DescriptorsDup()
+    {
+    _LIT8(KAscii, "Some ASCII text");
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_ASCIIDUP, "8 bit descriptor: %s", KAscii() );
+
+    _LIT16(KUnicode, "Some unicode text");    
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNICODEDUP, "16 bit descriptor: %S", KUnicode() );
+    }
+
+#endif  // __HELLOTRACETYPESDUP_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/incDup/HelloTraceTypesDup2.inl	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,75 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef __HELLOTRACETYPESDUP2_H__
+#define __HELLOTRACETYPESDUP2_H__
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTraceTypesDup2Traces.h"
+#endif
+
+inline void HelloTraceTypes::SignedIntegersDup2()
+    {
+    TInt8  eightBit     = - (TInt8)  1 << 6;
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP2_8, 
+                  "8 bit signed: %hhd", eightBit );
+    
+    TInt16 sixteenBit   = - (TInt16) 1 << 14; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP2_16, 
+                  "16 bit signed: %hd", sixteenBit );
+
+    TInt32 thirtyTwoBit = - (TInt32) 1 << 30; 
+    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP2_32, 
+               "32 bit signed: %d", thirtyTwoBit );
+
+    TInt64 sixtyFourBit = - (TInt64) 1 << 62; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP2_64, 
+                  "64 bit signed: %Ld", sixtyFourBit );
+    }
+
+inline void HelloTraceTypes::UnsignedIntegersDup2()
+    {
+    TUint8  eightBit     = (TUint8)  1 << 6;
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP2_8, 
+                  "8 bit unsigned: %hhu", eightBit );
+    
+    TUint16 sixteenBit   = (TUint16) 1 << 14; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP2_16, 
+                  "16 bit unsigned: %hu", sixteenBit );
+
+    TUint32 thirtyTwoBit = (TUint32) 1 << 30; 
+    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP2_32, 
+               "32 bit unsigned: %u", thirtyTwoBit );
+
+    TUint64 sixtyFourBit = (TUint64) 1 << 62; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP2_64, 
+                  "64 bit unsigned: %Lu", sixtyFourBit );
+    }
+
+inline void HelloTraceTypes::DescriptorsDup2()
+    {
+    _LIT8(KAscii, "Some ASCII text");
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_ASCIIDUP2, "8 bit descriptor: %s", KAscii() );
+
+    _LIT16(KUnicode, "Some unicode text");    
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNICODEDUP2, "16 bit descriptor: %S", KUnicode() );
+    }
+
+#endif  // __HELLOTRACETYPESDUP2_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/src/HelloTraceExample.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,106 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+
+#include "HelloTraceExample.h"
+#include "HelloTraceTypes.h"
+#include "HelloTraceInterface.h"
+#include "HelloTraceFn.h"
+#include "HelloTracePanic.h"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTraceExampleTraces.h"
+#endif
+
+EXPORT_C void HelloTraceExample::JustTypes()
+    {
+    OstTrace0( TRACE_EXAMPLE, HELLOTRACEEXAMPLE_JUSTTYPES, "*********************************************** " );
+    
+    HelloTraceTypes::SignedIntegers();
+    HelloTraceTypes::UnsignedIntegers();
+    HelloTraceTypes::Descriptors();    
+    }
+
+EXPORT_C void HelloTraceExample::Interface()
+    {
+    OstTrace0( TRACE_EXAMPLE, HELLOTRACEEXAMPLE_INTERFACE, "*********************************************** " );
+    
+    TVersion version = CHelloTraceInterface::Version();   
+    if (version.iMajor >= 1) 
+        {
+        CHelloTraceInterface* example = CHelloTraceInterface::NewLC();
+        example->AddCharL('H');
+        example->AddCharL('e');
+        example->AddCharL('l');
+        example->AddCharL('l');
+        example->AddCharL('o');
+        example->AddCharL('T');        
+        example->RemoveLast();        
+        example->AddCharL(' ');
+        example->AddCharL('T');
+        example->AddCharL('r');
+        example->AddCharL('a');
+        example->AddCharL('c');
+        example->AddCharL('e');
+        example->AddCharL('!');
+        CleanupStack::PopAndDestroy(example);
+        }
+    else
+        {
+        OstTrace0( TRACE_ERROR, HELLOTRACEEXAMPLE_UNSUPPORTED_VERSION, "Unsupported version!");
+        }
+    }
+
+EXPORT_C void HelloTraceExample::FnEntryExit()
+    {
+    OstTrace0( TRACE_EXAMPLE, HELLOTRACEEXAMPLE_FNENTRYEXIT, "*********************************************** " );
+       
+    CHelloTraceFn* example = CHelloTraceFn::NewLC();
+    CIdle* idle = CIdle::NewL(CActive::EPriorityIdle);
+    CleanupStack::PushL(idle);
+
+    CHelloTraceFn::StaticOutputsParamsL(1);
+   
+    example->Simple();
+    example->OutputsParams(2, CHelloTraceFn::EExample1);
+    example->OutputsParams(3, CHelloTraceFn::EExample2);
+    example->OutputsSignedIntegers(-4, -5, -6, -7);
+    example->OutputsUnsignedIntegers(8, 9, 10, 11);
+    example->OutputsTIntReturnValue();    
+    example->OutputsTInt64ReturnValue(); 
+    example->OutputsTFnEnumReturnValue();
+    example->OutputsUnknownPtrType(idle);    
+    example->OutputsUnknownRefType(*idle);
+#ifdef _DEBUG
+    example->PreProcessedFn(12);
+#else
+    example->PreProcessedFn();
+#endif
+    example->OutputMissingParams(13, 14, 15);
+
+    CleanupStack::PopAndDestroy(idle);
+    CleanupStack::PopAndDestroy(example);
+    }
+
+EXPORT_C void HelloTraceExample::PanicTrace()
+    {
+    OstTrace0( TRACE_EXAMPLE, HELLOTRACEEXAMPLE_PANIC, "*********************************************** " );
+
+    Panic(EHelloTraceDllExamplePanic);
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/src/HelloTraceFn.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,183 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+ 
+#include "HelloTraceFn.h"
+#include "HelloTraceFnDup.h"
+#include "HelloTraceFnDup2.inl"
+#include "HelloTracePanic.h"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTraceFnTraces.h"
+#endif
+
+CHelloTraceFn* CHelloTraceFn::NewLC()
+    {
+    CHelloTraceFn* self = new (ELeave) CHelloTraceFn;
+    CleanupStack::PushL(self);
+    return self;
+    }
+
+CHelloTraceFn* CHelloTraceFn::NewL()
+    {
+    CHelloTraceFn* self = CHelloTraceFn::NewLC();
+    CleanupStack::Pop(self);
+    return self;
+    }
+
+CHelloTraceFn::CHelloTraceFn()
+    {
+    OstTrace1( TRACE_NORMAL, CHELLOTRACEFN_CHELLOTRACEFN_CTOR, "[0x%08x] Constructor", this );    
+    }
+
+CHelloTraceFn::~CHelloTraceFn()
+    {
+    OstTrace1( TRACE_NORMAL, CHELLOTRACEFN_CHELLOTRACEFN_DTOR, "[0x%08x] Destructor", this );    
+    }
+
+void CHelloTraceFn::Simple()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_SIMPLE_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_SIMPLE_EXIT, this );
+    }
+
+void CHelloTraceFn::OutputsParams(TInt aParam, TFnEnum aEnumParam)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSPARAMS_ENTRY, this );
+    Simple();
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSPARAMS_EXIT, this );
+    }
+
+void CHelloTraceFn::StaticOutputsParamsL(TInt aParam)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_STATICOUTPUTSPARAMS_ENTRY, NULL );
+    CHelloTraceFn* example = CHelloTraceFn::NewLC();
+    example->Simple();    
+    CleanupStack::PopAndDestroy(example);
+    OstTraceFunctionExit0( CHELLOTRACEFN_STATICOUTPUTSPARAMS_EXIT );    
+    }
+
+void CHelloTraceFn::OutputsSignedIntegers(TInt8 aParam8,   TInt16 aParam16, 
+                                          TInt32 aParam32, TInt64 aParam64)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS_EXIT, this );
+    }
+
+void CHelloTraceFn::OutputsUnsignedIntegers(TUint8 aParam8,   TUint16 aParam16, 
+                                            TUint32 aParam32, TUint64 aParam64)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS_EXIT, this );
+    }
+
+
+TInt CHelloTraceFn::OutputsTIntReturnValue()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_ENTRY, this );
+    TInt ret = KErrNone;
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_EXIT, this, ret );
+    return ret;
+    }
+
+TInt64 CHelloTraceFn::OutputsTInt64ReturnValue()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE_ENTRY, this );
+    TInt64 ret = (TInt64) 2 << 40;
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE_EXIT, this, ret );
+    return ret;
+    }
+
+CHelloTraceFn::TFnEnum CHelloTraceFn::OutputsTFnEnumReturnValue()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE_ENTRY, this );
+    TFnEnum ret = EExample1;
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE_EXIT, this, ret );
+    return ret;    
+    }
+
+CActive* CHelloTraceFn::OutputsUnknownPtrType(CActive* aActive)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_ENTRY, this );    
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_EXIT, this, (TUint) aActive );
+    return aActive;
+    }
+
+CActive& CHelloTraceFn::OutputsUnknownRefType(CActive& aActive)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE_ENTRY, this );
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE_EXIT, this, (TUint) &aActive );    
+    return aActive;
+    }
+
+// The following doesn't compile as the Trace Compiler doesn't generate
+// the correct OstTraceGenExt(...) function for it
+//void CHelloTraceFn::OutputMissingParamsBug(TInt /*aCommentParam*/, TInt)
+//    {
+//    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_ENTRY, this );
+//    // ...
+//    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_EXIT, this );    
+//    }
+
+// The following compiles and works but outputs the following warning
+// warning: HelloTraceFn.cpp, line xxx: Parameter did not have a name and was not added to trace
+// The fact that this cannot be suppressed is a known problem we're working on.
+void CHelloTraceFn::OutputMissingParams(TInt aUsedParam, TInt /*aCommentParam*/, TInt)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMS_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMS_EXIT, this );
+    }
+
+// The following doesn't work as the Trace Compiler outputs:
+// error: HelloTraceFn.cpp, line xxx: Class / function name for trace could not be determined x3
+//#ifdef _DEBUG
+//void CHelloTraceFn::PreProcessedFn(TInt aDbgParam)
+//    {
+//    OstTraceFunctionEntryExt( PRE_PROCESSED_ENTRTY_1, this );
+//#else
+//void CHelloTraceFn::PreProcessedFn()
+//    {
+//    OstTraceFunctionEntry1( PRE_PROCESSED_ENTRTY_2, this );
+//#endif
+//    Simple();
+//    OstTraceFunctionExit1( CHELLOTRACEFN_PREPROCESSEDFN_EXIT, this );
+//    }
+
+// Workaround example code until a proper fix is provided
+#ifdef _DEBUG
+void CHelloTraceFn::PreProcessedFn(TInt aDbgParam)
+    {
+    OstTraceExt2( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_ENTRY_1, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;aDbgParam=%d;this=%x", (TInt) aDbgParam, (TUint) this);
+#else
+void CHelloTraceFn::PreProcessedFn()
+    {
+    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_ENTRY_2, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
+#endif
+    Simple();
+    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_EXIT, "CHelloTraceFn::PreProcessedFn: < CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
+    }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/src/HelloTraceInterface.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,121 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+
+#include "HelloTraceInterface.h"
+#include "HelloTraceInterfaceDup.h"
+#include "HelloTraceInterfaceDup2.inl"
+#include "HelloTracePanic.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTraceInterfaceTraces.h"
+#endif
+
+EXPORT_C CHelloTraceInterface* CHelloTraceInterface::NewLC()
+    {
+    CHelloTraceInterface* self = new (ELeave) CHelloTraceInterface;
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    return self;
+    }
+
+EXPORT_C CHelloTraceInterface* CHelloTraceInterface::NewL()
+    {
+    CHelloTraceInterface* self = CHelloTraceInterface::NewLC();
+    CleanupStack::Pop(self);
+    return self;
+    }
+
+CHelloTraceInterface::CHelloTraceInterface()
+    {
+    OstTrace1( TRACE_NORMAL, CHELLOTRACEDLL_CHELLOTRACEDLL_CTOR, "[0x%08x]", (TUint32) this );    
+    }
+
+void CHelloTraceInterface::ConstructL()
+    {
+    iString = new (ELeave) THelloTraceDllExampleString;
+    }
+
+EXPORT_C CHelloTraceInterface::~CHelloTraceInterface()
+    {
+    delete iString;
+    OstTrace1( TRACE_NORMAL, CHELLOTRACEDLL_CHELLOTRACEDLL_DTOR, "[0x%08x]", (TUint32) this );    
+    }
+
+EXPORT_C TVersion CHelloTraceInterface::Version()
+    {
+    const TInt KMajor = 1;
+    const TInt KMinor = 0;
+    const TInt KBuild = 1;
+    TVersion version = TVersion(KMajor, KMinor, KBuild);
+    OstTraceExt1( TRACE_BORDER, CHELLOTRACEDLL_VERSION, "CHelloTraceInterface::Version = %S", version.Name());   
+    return version;
+    }
+
+EXPORT_C const TPtrC CHelloTraceInterface::String() const
+    {
+    __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
+
+    OstTraceDefExt2( OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CHELLOTRACEDLL_STRING, 
+                     "[0x%08x] Returned %S", (TUint32) this, *iString);   
+    return *iString;
+    }
+
+EXPORT_C void CHelloTraceInterface::AddCharL(const TChar& aChar)
+    {
+    __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
+
+    OstTraceExt3( TRACE_BORDER, CHELLOTRACEDLL_ADDCHARL, 
+                  "[0x%08x] Adding %d to %S", (TUint32) this, (TInt32) aChar, *iString);   
+    if (iString->Length() >= KHelloTraceDllBufferLength)
+        {
+        OstTrace1( TRACE_ERROR, CHELLOTRACEDLL_ADDCHARL_ERR,
+                   "[0x%08x] Not enough space to add character", (TUint32) this);
+        User::Leave( KErrTooBig);
+        }
+    iString->Append(aChar);
+    }
+
+EXPORT_C void CHelloTraceInterface::RemoveLast()
+    {
+    __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
+
+    OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_REMOVELAST, 
+                  "[0x%08x] Attempting to remove last character from %S", (TUint32) this, *iString);
+    if (iString->Length() > 0)
+        {
+        iString->SetLength(iString->Length() - 1);
+        }
+    else
+        {
+        OstTrace1( TRACE_WARNING, CHELLOTRACEDLL_REMOVELAST_WARN, "[0x%08x] String already empty", (TUint32) this);   
+        }
+    }
+
+EXPORT_C void CHelloTraceInterface::ResetString()
+    {
+    OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_RESETSTRING, "[0x%08x] Reseting string %S", (TUint32) this, *iString);
+    if (iString == NULL)
+        {
+        iString = new (ELeave) THelloTraceDllExampleString;
+        }
+    else
+        {
+        iString->SetLength(0);
+        }
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/src/HelloTracePanic.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,32 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#include <e32std.h>		 // GLDEF_C
+
+#include "HelloTracePanic.h"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTracePanicTraces.h"
+#endif
+
+GLDEF_C void Panic(THelloTraceDllPanic aPanic)
+    {
+    OstTrace1( TRACE_FATAL, PANIC, "Panic(%{THelloTraceDllPanic})", (TUint) aPanic );    
+    User::Panic(_L("HelloTraceDll"), aPanic);
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/src/HelloTraceTypes.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,76 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+
+#include <e32std.h>
+
+#include "HelloTraceTypes.h"
+#include "HelloTraceTypesDup.h"
+#include "HelloTraceTypesDup2.inl"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTraceTypesTraces.h"
+#endif
+
+void HelloTraceTypes::SignedIntegers()
+    {
+    TInt8  eightBit     = - (TInt8)  1 << 6;
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS_8, 
+                  "8 bit signed: %hhd", eightBit );
+    
+    TInt16 sixteenBit   = - (TInt16) 1 << 14; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS_16, 
+                  "16 bit signed: %hd", sixteenBit );
+
+    TInt32 thirtyTwoBit = - (TInt32) 1 << 30; 
+    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS_32, 
+               "32 bit signed: %d", thirtyTwoBit );
+
+    TInt64 sixtyFourBit = - (TInt64) 1 << 62; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS_64, 
+                  "64 bit signed: %Ld", sixtyFourBit );
+    }
+
+void HelloTraceTypes::UnsignedIntegers()
+    {
+    TUint8  eightBit     = (TUint8)  1 << 6;
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS_8, 
+                  "8 bit unsigned: %hhu", eightBit );
+    
+    TUint16 sixteenBit   = (TUint16) 1 << 14; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS_16, 
+                  "16 bit unsigned: %hu", sixteenBit );
+
+    TUint32 thirtyTwoBit = (TUint32) 1 << 30; 
+    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS_32, 
+               "32 bit unsigned: %u", thirtyTwoBit );
+
+    TUint64 sixtyFourBit = (TUint64) 1 << 62; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS_64, 
+                  "64 bit unsigned: %Lu", sixtyFourBit );
+    }
+
+void HelloTraceTypes::Descriptors()
+    {
+    _LIT8(KAscii, "Some ASCII text");
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_ASCII, "8 bit descriptor: %s", KAscii() );
+
+    _LIT16(KUnicode, "Some unicode text");    
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNICODE, "16 bit descriptor: %S", KUnicode() );
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/dll/traces/trace.properties	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<trace_properties>
+<enum name="TFnEnum">
+<value id="0">EExample1</value>
+<value id="2">EExample2</value>
+</enum>
+<enum name="THelloTraceDllPanic">
+<value id="0">EHelloTraceDllExamplePanic</value>
+<value id="1">EHelloTraceDllNullPointer</value>
+</enum>
+<file>../incDup/HelloTraceInterfaceDup.h</file>
+<file>../incDup/HelloTraceInterfaceDup2.inl</file>
+<file>../incDup/HelloTraceFnDup.h</file>
+<file>../incDup/HelloTraceFnDup2.inl</file>
+<file>../incDup/HelloTraceTypesDup.h</file>
+<file>../incDup/HelloTraceTypesDup2.inl</file>
+<file>../incDup/HelloTraceInterface2Dup.h</file>
+<file>../incDup/HelloTraceInterface2Dup2.inl</file>
+<file>../incDup/HelloTraceFn2Dup.h</file>
+<file>../incDup/HelloTraceFn2Dup2.inl</file>
+<file>../incDup/HelloTraceTypes2Dup.h</file>
+<file>../incDup/HelloTraceTypes2Dup2.inl</file>
+</trace_properties>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/group/bld.inf	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,19 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+#include "../dll/group/bld.inf"
+#include "../console/group/bld.inf"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/console/group/HelloTraceConsole.mmp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,37 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+
+TARGET		  HelloTraceConsole.exe
+TARGETTYPE	  exe
+UID			  0 0xE40349E4
+
+OS_LAYER_SYSTEMINCLUDE
+USERINCLUDE	   ../inc
+USERINCLUDE    ../../dll/inc
+USERINCLUDE    ../traces
+
+SOURCEPATH	  ../src
+SOURCE		  HelloTraceConsole.cpp
+
+LIBRARY		  euser.lib
+LIBRARY       HelloTraceDll.lib
+
+#ifdef ENABLE_ABIV2_MODE
+DEBUGGABLE_UDEBONLY
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/console/group/bld.inf	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,27 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXPORTS
+hellotraceconsole.iby             CORE_OS_LAYER_IBY_EXPORT_PATH(hellotraceconsole.iby)
+
+PRJ_MMPFILES
+HelloTraceConsole.mmp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/console/group/hellotraceconsole.iby	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,24 @@
+// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+// ROM build file for tracecore project
+
+#ifndef HELLOTRACECONSOLE_IBY
+#define HELLOTRACECONSOLE_IBY
+
+#include <core\os\hellotracedll.iby>
+
+file=ABI_DIR\BUILD_DIR\hellotraceconsole.exe    Sys\Bin\hellotraceconsole.exe
+
+#endif //HELLOTRACECONSOLE_IBY
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/console/inc/HelloTraceConsole.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,31 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef __HELLOTRACECONSOLE_H__
+#define __HELLOTRACECONSOLE_H__
+
+//  Include Files
+
+#include <e32base.h>
+
+//  Function Prototypes
+
+GLDEF_C TInt E32Main();
+
+#endif  // __HELLOTRACECONSOLE_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/console/src/HelloTraceConsole.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,124 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#include <e32cons.h>			// Console
+
+#include "HelloTraceConsole.h"
+#include "HelloTraceExample.h"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTraceConsoleTraces.h"
+#endif
+
+
+_LIT(KTextConsoleTitle, "HelloTrace");
+_LIT(KTextPressAnyKey, " [press any key]\n");
+
+LOCAL_D CConsoleBase* console; // write all messages to this
+
+LOCAL_C void DoExamples()
+    {
+    TInt err = KErrNone;
+
+    console->Printf(_L("Before main tracing examples ...\n"));
+
+    console->Printf(_L(" Before type examples ..."));
+    console->Printf(KTextPressAnyKey);
+    console->Getch();
+    TRAP(err, HelloTraceExample::JustTypes());    
+    if (err)
+        console->Printf(_L(" Failed with error %d\n"), err);
+
+    console->Printf(_L(" Before Interface examples ..."));
+    console->Printf(KTextPressAnyKey);
+    console->Getch();
+    TRAP(err, HelloTraceExample::Interface());    
+    if (err)
+        console->Printf(_L(" Failed with error %d\n"), err);
+    
+    console->Printf(_L(" Before FnEntryExit examples ..."));
+    console->Printf(KTextPressAnyKey);
+    console->Getch();
+    TRAP(err, HelloTraceExample::FnEntryExit());    
+    if (err)
+        console->Printf(_L(" Failed with error %d\n"), err);    
+    }
+
+LOCAL_C void DoStartL()
+    {
+    // Create active scheduler (to run active objects)
+    CActiveScheduler* scheduler = new (ELeave) CActiveScheduler();
+    CleanupStack::PushL(scheduler);
+    CActiveScheduler::Install(scheduler);
+
+    DoExamples();
+    
+    // Delete active scheduler
+    CleanupStack::PopAndDestroy(scheduler);
+    }
+
+//  Global Functions
+
+GLDEF_C TInt E32Main()
+    {
+    OstTraceFunctionEntry0( E32MAIN_ENTRY );
+    
+    // Create cleanup stack
+    __UHEAP_MARK;
+    CTrapCleanup* cleanup = CTrapCleanup::New();
+
+    // Create output console
+    TRAPD(createError, 
+          console = Console::NewL(KTextConsoleTitle, 
+                                  TSize(KConsFullScreen, KConsFullScreen)));    
+    if (createError)
+        {
+        delete cleanup;
+        OstTrace1( TRACE_ERROR, E32MAIN_CREATE_ERROR, "Failed to create console error: %d", createError);
+        OstTraceFunctionExit0( E32MAIN_EXIT_ERR );
+        return createError;
+        }
+
+    TRAPD(mainError, DoStartL());    
+    if (mainError)
+        {
+        OstTrace1( TRACE_ERROR, E32MAIN_START_ERROR, "DoStartL failed with error: %d", mainError);
+        console->Printf(_L("DoStartL failed with error: %d\n\n"), mainError);
+        }
+    else 
+        {
+        console->Printf(_L("Before panic tracing example ..."));
+        console->Printf(KTextPressAnyKey);
+        console->Getch();
+    
+        OstTrace0( TRACE_FLOW, E32MAIN_BEFORE_PANIC, "About to cause a panic ..." );
+        HelloTraceExample::PanicTrace();
+        
+        console->Printf(KTextPressAnyKey);
+        console->Getch();
+        }
+
+    delete console;
+    delete cleanup;
+    __UHEAP_MARKEND;
+    
+    OstTraceFunctionExit0( E32MAIN_EXIT );
+    return KErrNone;
+    }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/dll/bwins/HelloTraceDllu.def	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,14 @@
+EXPORTS
+	?Version@CHelloTraceInterface@@SA?AVTVersion@@XZ @ 1 NONAME ; class TVersion CHelloTraceInterface::Version(void)
+	?NewLC@CHelloTraceInterface@@SAPAV1@XZ @ 2 NONAME ; class CHelloTraceInterface * CHelloTraceInterface::NewLC(void)
+	?JustTypes@HelloTraceExample@@SAXXZ @ 3 NONAME ; void HelloTraceExample::JustTypes(void)
+	?Interface@HelloTraceExample@@SAXXZ @ 4 NONAME ; void HelloTraceExample::Interface(void)
+	?FnEntryExit@HelloTraceExample@@SAXXZ @ 5 NONAME ; void HelloTraceExample::FnEntryExit(void)
+	?ResetString@CHelloTraceInterface@@QAEXXZ @ 6 NONAME ; void CHelloTraceInterface::ResetString(void)
+	?AddCharL@CHelloTraceInterface@@QAEXABVTChar@@@Z @ 7 NONAME ; void CHelloTraceInterface::AddCharL(class TChar const &)
+	?PanicTrace@HelloTraceExample@@SAXXZ @ 8 NONAME ; void HelloTraceExample::PanicTrace(void)
+	??1CHelloTraceInterface@@UAE@XZ @ 9 NONAME ; CHelloTraceInterface::~CHelloTraceInterface(void)
+	?String@CHelloTraceInterface@@QBE?BVTPtrC16@@XZ @ 10 NONAME ; class TPtrC16 const CHelloTraceInterface::String(void) const
+	?RemoveLast@CHelloTraceInterface@@QAEXXZ @ 11 NONAME ; void CHelloTraceInterface::RemoveLast(void)
+	?NewL@CHelloTraceInterface@@SAPAV1@XZ @ 12 NONAME ; class CHelloTraceInterface * CHelloTraceInterface::NewL(void)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/dll/eabi/HelloTraceDllu.def	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,20 @@
+EXPORTS
+	_ZN17HelloTraceExample10PanicTraceEv @ 1 NONAME
+	_ZN17HelloTraceExample11FnEntryExitEv @ 2 NONAME
+	_ZN17HelloTraceExample9InterfaceEv @ 3 NONAME
+	_ZN17HelloTraceExample9JustTypesEv @ 4 NONAME
+	_ZN20CHelloTraceInterface10RemoveLastEv @ 5 NONAME
+	_ZN20CHelloTraceInterface11ResetStringEv @ 6 NONAME
+	_ZN20CHelloTraceInterface4NewLEv @ 7 NONAME
+	_ZN20CHelloTraceInterface5NewLCEv @ 8 NONAME
+	_ZN20CHelloTraceInterface7VersionEv @ 9 NONAME
+	_ZN20CHelloTraceInterface8AddCharLERK5TChar @ 10 NONAME
+	_ZN20CHelloTraceInterfaceD0Ev @ 11 NONAME
+	_ZN20CHelloTraceInterfaceD1Ev @ 12 NONAME
+	_ZN20CHelloTraceInterfaceD2Ev @ 13 NONAME
+	_ZNK20CHelloTraceInterface6StringEv @ 14 NONAME
+	_ZTI13CHelloTraceFn @ 15 NONAME
+	_ZTI20CHelloTraceInterface @ 16 NONAME
+	_ZTV13CHelloTraceFn @ 17 NONAME
+	_ZTV20CHelloTraceInterface @ 18 NONAME
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/dll/group/HelloTraceDll.mmp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,40 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+
+TARGET		  HelloTraceDll.dll
+TARGETTYPE	  dll
+UID			  0x1000008d 0xE43DF43E
+CAPABILITY    ReadUserData
+
+OS_LAYER_SYSTEMINCLUDE
+USERINCLUDE  ../inc ../incDup
+USERINCLUDE  ../traces/HelloTraceDll_dll
+
+SOURCEPATH	 ../src
+SOURCE       HelloTraceExample.cpp 
+SOURCE       HelloTraceTypes.cpp
+SOURCE       HelloTraceInterface.cpp 
+SOURCE       HelloTraceFn.cpp 
+SOURCE       HelloTracePanic.cpp 
+
+LIBRARY		 euser.lib
+
+#ifdef ENABLE_ABIV2_MODE
+DEBUGGABLE_UDEBONLY
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/dll/group/HelloTraceDll2.mmp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,40 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+
+TARGET		  HelloTraceDll2.dll
+TARGETTYPE	  dll
+UID			  0x1000008d 0xE43DF43F
+CAPABILITY    ReadUserData
+
+OS_LAYER_SYSTEMINCLUDE
+USERINCLUDE  ../inc ../incDup
+USERINCLUDE  ../traces/HelloTraceDll2_dll
+
+SOURCEPATH	 ../src
+SOURCE       HelloTraceExample.cpp 
+SOURCE       HelloTraceTypes.cpp
+SOURCE       HelloTraceInterface.cpp 
+SOURCE       HelloTraceFn.cpp 
+SOURCE       HelloTracePanic.cpp 
+
+LIBRARY		 euser.lib
+
+#ifdef ENABLE_ABIV2_MODE
+DEBUGGABLE_UDEBONLY
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/dll/group/bld.inf	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,28 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXPORTS
+hellotracedll.iby             CORE_OS_LAYER_IBY_EXPORT_PATH(hellotracedll.iby)
+
+PRJ_MMPFILES
+HelloTraceDll.mmp
+HelloTraceDll2.mmp
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/dll/group/hellotracedll.iby	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,23 @@
+// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+// ROM build file for tracecore project
+
+#ifndef HELLOTRACEDLL_IBY
+#define HELLOTRACEDLL_IBY
+
+file=ABI_DIR\BUILD_DIR\hellotracedll.dll        Sys\Bin\hellotracedll.dll
+file=ABI_DIR\BUILD_DIR\hellotracedll2.dll        Sys\Bin\hellotracedll2.dll
+
+#endif //HELLOTRACEDLL_IBY
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/dll/inc/HelloTraceExample.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,40 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef __HELLOTRACEEXAMPLE_H__
+#define __HELLOTRACEEXAMPLE_H__
+
+#include <e32std.h>
+
+class HelloTraceExample
+    {
+public:
+    IMPORT_C static void JustTypes();    
+    IMPORT_C static void Interface();    
+    IMPORT_C static void FnEntryExit();    
+    IMPORT_C static void PanicTrace();    
+
+    // @TODO add examples for state macros
+    // @TODO add examples for event macros
+    // @TODO add examples for OstTraceData
+    // @TODO add compile-time selector examples
+    // @TODO add macro wrapper examples
+    };
+
+#endif  // __HELLOTRACEEXAMPLE_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/dll/inc/HelloTraceFn.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,122 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef HELLOTRACEFN_H_
+#define HELLOTRACEFN_H_
+
+#include <e32base.h>    // CBase
+
+class CHelloTraceFn : public CBase
+    {
+public:
+    
+    // Note the Trace Builder will only parse this if it's in a cpp file
+    // but not from here :(
+    // Also if you add a new enum you need to reparse the enum - it doesn't
+    // get automatically reparsed by the Trace Compiler :(
+    enum TFnEnum
+        {
+        EExample1,
+        EExample2 = 2, 
+        // EExample3 = EExample2 + 1, // The Trace Builder can't parse this :(
+        };
+    
+public:
+    static CHelloTraceFn* NewL();
+    static CHelloTraceFn* NewLC();
+    ~CHelloTraceFn();
+   
+public: // Fn entry / exit tracing examples 
+    void Simple();
+    void OutputsParams(TInt aParam, TFnEnum aEnumParam);
+    void OutputsSignedIntegers(TInt8 aParam8,   TInt16 aParam16, 
+                               TInt32 aParam32, TInt64 aParam64);
+    void OutputsUnsignedIntegers(TUint8 aParam8,   TUint16 aParam16, 
+                                 TUint32 aParam32, TUint64 aParam64);
+     
+    TInt OutputsTIntReturnValue();
+    TInt64 OutputsTInt64ReturnValue();
+    TFnEnum OutputsTFnEnumReturnValue();
+
+    CActive* OutputsUnknownPtrType(CActive* aActive);
+    CActive& OutputsUnknownRefType(CActive& aActive);
+    
+    void OutputMissingParams(TInt aUsedParam, TInt aCommentParam, TInt aMissingParam);
+
+#ifdef _DEBUG    
+    void PreProcessedFn(TInt aDbgParam);
+#else
+    void PreProcessedFn();
+#endif
+    
+    static void StaticOutputsParamsL(TInt aParam);  
+    
+    // duplicate all the function and put the impl in the header file HelloTraceFnDup.h
+    void SimpleDup();
+    void OutputsParamsDup(TInt aParam, TFnEnum aEnumParam);
+    void OutputsSignedIntegersDup(TInt8 aParam8,   TInt16 aParam16, 
+                               TInt32 aParam32, TInt64 aParam64);
+    void OutputsUnsignedIntegersDup(TUint8 aParam8,   TUint16 aParam16, 
+                                 TUint32 aParam32, TUint64 aParam64);
+     
+    TInt OutputsTIntReturnValueDup();
+    TInt64 OutputsTInt64ReturnValueDup();
+    TFnEnum OutputsTFnEnumReturnValueDup();
+
+    CActive* OutputsUnknownPtrTypeDup(CActive* aActive);
+    CActive& OutputsUnknownRefTypeDup(CActive& aActive);
+    
+    void OutputMissingParamsDup(TInt aUsedParam, TInt aCommentParam, TInt aMissingParam);
+
+#ifdef _DEBUG    
+    void PreProcessedFnDup(TInt aDbgParam);
+#else
+    void PreProcessedFnDup();
+#endif
+    static void StaticOutputsParamsDupL(TInt aParam);  
+    
+    // duplicate all the function again and put the impl in the header file HelloTraceFnDup2.h
+    void SimpleDup2();
+    void OutputsParamsDup2(TInt aParam, TFnEnum aEnumParam);
+    void OutputsSignedIntegersDup2(TInt8 aParam8,   TInt16 aParam16, 
+                               TInt32 aParam32, TInt64 aParam64);
+    void OutputsUnsignedIntegersDup2(TUint8 aParam8,   TUint16 aParam16, 
+                                 TUint32 aParam32, TUint64 aParam64);
+     
+    TInt OutputsTIntReturnValueDup2();
+    TInt64 OutputsTInt64ReturnValueDup2();
+    TFnEnum OutputsTFnEnumReturnValueDup2();
+
+    CActive* OutputsUnknownPtrTypeDup2(CActive* aActive);
+    CActive& OutputsUnknownRefTypeDup2(CActive& aActive);
+    
+    void OutputMissingParamsDup2(TInt aUsedParam, TInt aCommentParam, TInt aMissingParam);
+
+#ifdef _DEBUG    
+    void PreProcessedFnDup2(TInt aDbgParam);
+#else
+    void PreProcessedFnDup2();
+#endif
+    static void StaticOutputsParamsDup2L(TInt aParam);  
+
+
+private:
+    CHelloTraceFn();
+    };
+
+#endif /* HELLOTRACEFN_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/dll/inc/HelloTraceInterface.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,63 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef __HELLOTRACEINTERFACE_H__
+#define __HELLOTRACEINTERFACE_H__
+
+#include <e32base.h>	// CBase
+#include <e32std.h>	 // TBuf
+
+const TInt KHelloTraceDllBufferLength = 10;
+typedef TBuf<KHelloTraceDllBufferLength> THelloTraceDllExampleString;
+
+class CHelloTraceInterface : public CBase
+    {
+public:
+    IMPORT_C static CHelloTraceInterface* NewL();
+    IMPORT_C static CHelloTraceInterface* NewLC();
+    IMPORT_C ~CHelloTraceInterface();
+
+public:
+    IMPORT_C static TVersion Version();
+    IMPORT_C const TPtrC String() const;
+    IMPORT_C void AddCharL(const TChar& aChar);
+    IMPORT_C void RemoveLast();
+    IMPORT_C void ResetString();
+    
+    IMPORT_C static TVersion VersionDup();
+    IMPORT_C const TPtrC StringDup() const;
+    IMPORT_C void AddCharDupL(const TChar& aChar);
+    IMPORT_C void RemoveLastDup();
+    IMPORT_C void ResetStringDup();
+
+    IMPORT_C static TVersion VersionDup2();
+    IMPORT_C const TPtrC StringDup2() const;
+    IMPORT_C void AddCharDup2L(const TChar& aChar);
+    IMPORT_C void RemoveLastDup2();
+    IMPORT_C void ResetStringDup2();
+private:
+    CHelloTraceInterface();
+    void ConstructL();
+
+private:
+    // data
+    THelloTraceDllExampleString* iString;
+    };
+
+#endif  // __HELLOTRACEINTERFACE_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/dll/inc/HelloTracePanic.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,35 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef __HELLOTRACEDLL_PAN__
+#define __HELLOTRACEDLL_PAN__
+
+//  Data Types
+
+enum THelloTraceDllPanic
+    {
+    EHelloTraceDllExamplePanic,
+    EHelloTraceDllNullPointer,
+    };
+
+//  Function Prototypes
+
+GLREF_C void Panic(THelloTraceDllPanic aPanic);
+
+#endif  // __HELLOTRACEDLL_PAN__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/dll/inc/HelloTraceTypes.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,39 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef __HELLOTRACETYPES_H__
+#define __HELLOTRACETYPES_H__
+
+class HelloTraceTypes
+    {
+public:
+    static void SignedIntegers();
+    static void UnsignedIntegers();
+    static void Descriptors();
+    
+    static void SignedIntegersDup();
+    static void UnsignedIntegersDup();
+    static void DescriptorsDup();
+        
+    static void SignedIntegersDup2();
+    static void UnsignedIntegersDup2();
+    static void DescriptorsDup2();
+    };
+
+#endif  // __HELLOTRACETYPES_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/dll/incDup/HelloTraceFnDup.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,157 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef HELLOTRACEFNDUP_H_
+#define HELLOTRACEFNDUP_H_
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTraceFnDupTraces.h"
+#endif
+
+inline void CHelloTraceFn::SimpleDup()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_SIMPLE_DUP_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_SIMPLE_DUP_EXIT, this );
+    }
+
+inline void CHelloTraceFn::OutputsParamsDup(TInt aParam, TFnEnum aEnumParam)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSPARAMS_DUP_ENTRY, this );
+    Simple();
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSPARAMS_DUP_EXIT, this );
+    }
+
+inline void CHelloTraceFn::StaticOutputsParamsDupL(TInt aParam)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_STATICOUTPUTSPARAMS_DUP_ENTRY, NULL );
+    CHelloTraceFn* example = CHelloTraceFn::NewLC();
+    example->SimpleDup();    
+    CleanupStack::PopAndDestroy(example);
+    OstTraceFunctionExit0( CHELLOTRACEFN_STATICOUTPUTSPARAMS_DUP_EXIT );    
+    }
+
+inline void CHelloTraceFn::OutputsSignedIntegersDup(TInt8 aParam8,   TInt16 aParam16, 
+                                          TInt32 aParam32, TInt64 aParam64)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS_DUP_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS_DUP_EXIT, this );
+    }
+
+void CHelloTraceFn::OutputsUnsignedIntegersDup(TUint8 aParam8,   TUint16 aParam16, 
+                                            TUint32 aParam32, TUint64 aParam64)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS_DUP_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS_DUP_EXIT, this );
+    }
+
+
+inline TInt CHelloTraceFn::OutputsTIntReturnValueDup()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_DUP_ENTRY, this );
+    TInt ret = KErrNone;
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_DUP_EXIT, this, ret );
+    return ret;
+    }
+
+inline TInt64 CHelloTraceFn::OutputsTInt64ReturnValueDup()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE_DUP_ENTRY, this );
+    TInt64 ret = (TInt64) 2 << 40;
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE_DUP_EXIT, this, ret );
+    return ret;
+    }
+
+inline CHelloTraceFn::TFnEnum CHelloTraceFn::OutputsTFnEnumReturnValueDup()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE_DUP_ENTRY, this );
+    TFnEnum ret = EExample1;
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE_DUP_EXIT, this, ret );
+    return ret;    
+    }
+
+inline CActive* CHelloTraceFn::OutputsUnknownPtrTypeDup(CActive* aActive)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_DUP_ENTRY, this );    
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_DUP_EXIT, this, (TUint) aActive );
+    return aActive;
+    }
+
+inline CActive& CHelloTraceFn::OutputsUnknownRefTypeDup(CActive& aActive)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE_DUP_ENTRY, this );
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE_DUP_EXIT, this, (TUint) &aActive );    
+    return aActive;
+    }
+
+// The following doesn't compile as the Trace Compiler doesn't generate
+// the correct OstTraceGenExt(...) function for it
+//void CHelloTraceFn::OutputMissingParamsBug(TInt /*aCommentParam*/, TInt)
+//    {
+//    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_ENTRY, this );
+//    // ...
+//    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_EXIT, this );    
+//    }
+
+// The following compiles and works but outputs the following warning
+// warning: HelloTraceFn.cpp, line xxx: Parameter did not have a name and was not added to trace
+// The fact that this cannot be suppressed is a known problem we're working on.
+inline void CHelloTraceFn::OutputMissingParamsDup(TInt aUsedParam, TInt /*aCommentParam*/, TInt)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMS_DUP_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMS_DUP_EXIT, this );
+    }
+
+// The following doesn't work as the Trace Compiler outputs:
+// error: HelloTraceFn.cpp, line xxx: Class / function name for trace could not be determined x3
+//#ifdef _DEBUG
+//void CHelloTraceFn::PreProcessedFn(TInt aDbgParam)
+//    {
+//    OstTraceFunctionEntryExt( PRE_PROCESSED_ENTRTY_1, this );
+//#else
+//void CHelloTraceFn::PreProcessedFn()
+//    {
+//    OstTraceFunctionEntry1( PRE_PROCESSED_ENTRTY_2, this );
+//#endif
+//    Simple();
+//    OstTraceFunctionExit1( CHELLOTRACEFN_PREPROCESSEDFN_EXIT, this );
+//    }
+
+// Workaround example code until a proper fix is provided
+#ifdef _DEBUG
+inline void CHelloTraceFn::PreProcessedFnDup(TInt aDbgParam)
+    {
+    OstTraceExt2( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_DUP_ENTRY_1, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;aDbgParam=%d;this=%x", (TInt) aDbgParam, (TUint) this);
+#else
+    inline void CHelloTraceFn::PreProcessedFnDup()
+    {
+    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_DUP_ENTRY_2, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
+#endif
+    SimpleDup();
+    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_DUP_EXIT, "CHelloTraceFn::PreProcessedFn: < CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
+    }
+
+#endif /* HELLOTRACEFNDUP_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/dll/incDup/HelloTraceFnDup2.inl	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,157 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef HELLOTRACEFNDUP2_H_
+#define HELLOTRACEFNDUP2_H_
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTraceFnDup2Traces.h"
+#endif
+
+inline void CHelloTraceFn::SimpleDup2()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_SIMPLE_DUP2_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_SIMPLE_DUP2_EXIT, this );
+    }
+
+inline void CHelloTraceFn::OutputsParamsDup2(TInt aParam, TFnEnum aEnumParam)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSPARAMS_DUP2_ENTRY, this );
+    Simple();
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSPARAMS_DUP2_EXIT, this );
+    }
+
+inline void CHelloTraceFn::StaticOutputsParamsDup2L(TInt aParam)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_STATICOUTPUTSPARAMS_DUP2_ENTRY, NULL );
+    CHelloTraceFn* example = CHelloTraceFn::NewLC();
+    example->SimpleDup2();    
+    CleanupStack::PopAndDestroy(example);
+    OstTraceFunctionExit0( CHELLOTRACEFN_STATICOUTPUTSPARAMS_DUP2_EXIT );    
+    }
+
+inline void CHelloTraceFn::OutputsSignedIntegersDup2(TInt8 aParam8,   TInt16 aParam16, 
+                                          TInt32 aParam32, TInt64 aParam64)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS_DUP2_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS_DUP2_EXIT, this );
+    }
+
+inline void CHelloTraceFn::OutputsUnsignedIntegersDup2(TUint8 aParam8,   TUint16 aParam16, 
+                                            TUint32 aParam32, TUint64 aParam64)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS_DUP2_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS_DUP2_EXIT, this );
+    }
+
+
+inline TInt CHelloTraceFn::OutputsTIntReturnValueDup2()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_DUP2_ENTRY, this );
+    TInt ret = KErrNone;
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_DUP2_EXIT, this, ret );
+    return ret;
+    }
+
+inline TInt64 CHelloTraceFn::OutputsTInt64ReturnValueDup2()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE_DUP2_ENTRY, this );
+    TInt64 ret = (TInt64) 2 << 40;
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE_DUP2_EXIT, this, ret );
+    return ret;
+    }
+
+inline CHelloTraceFn::TFnEnum CHelloTraceFn::OutputsTFnEnumReturnValueDup2()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE_DUP2_ENTRY, this );
+    TFnEnum ret = EExample1;
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE_DUP2_EXIT, this, ret );
+    return ret;    
+    }
+
+inline CActive* CHelloTraceFn::OutputsUnknownPtrTypeDup2(CActive* aActive)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_DUP2_ENTRY, this );    
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_DUP2_EXIT, this, (TUint) aActive );
+    return aActive;
+    }
+
+inline CActive& CHelloTraceFn::OutputsUnknownRefTypeDup2(CActive& aActive)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE_DUP2_ENTRY, this );
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE_DUP2_EXIT, this, (TUint) &aActive );    
+    return aActive;
+    }
+
+// The following doesn't compile as the Trace Compiler doesn't generate
+// the correct OstTraceGenExt(...) function for it
+//void CHelloTraceFn::OutputMissingParamsBug(TInt /*aCommentParam*/, TInt)
+//    {
+//    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_ENTRY, this );
+//    // ...
+//    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_EXIT, this );    
+//    }
+
+// The following compiles and works but outputs the following warning
+// warning: HelloTraceFn.cpp, line xxx: Parameter did not have a name and was not added to trace
+// The fact that this cannot be suppressed is a known problem we're working on.
+inline void CHelloTraceFn::OutputMissingParamsDup2(TInt aUsedParam, TInt /*aCommentParam*/, TInt)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMS_DUP2_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMS_DUP2_EXIT, this );
+    }
+
+// The following doesn't work as the Trace Compiler outputs:
+// error: HelloTraceFn.cpp, line xxx: Class / function name for trace could not be determined x3
+//#ifdef _DEBUG
+//void CHelloTraceFn::PreProcessedFn(TInt aDbgParam)
+//    {
+//    OstTraceFunctionEntryExt( PRE_PROCESSED_ENTRTY_1, this );
+//#else
+//void CHelloTraceFn::PreProcessedFn()
+//    {
+//    OstTraceFunctionEntry1( PRE_PROCESSED_ENTRTY_2, this );
+//#endif
+//    Simple();
+//    OstTraceFunctionExit1( CHELLOTRACEFN_PREPROCESSEDFN_EXIT, this );
+//    }
+
+// Workaround example code until a proper fix is provided
+#ifdef _DEBUG
+inline void CHelloTraceFn::PreProcessedFnDup2(TInt aDbgParam)
+    {
+    OstTraceExt2( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_DUP2_ENTRY_1, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;aDbgParam=%d;this=%x", (TInt) aDbgParam, (TUint) this);
+#else
+    inline void CHelloTraceFn::PreProcessedFnDup2()
+    {
+    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_DUP2_ENTRY_2, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
+#endif
+    SimpleDup2();
+    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_DUP2_EXIT, "CHelloTraceFn::PreProcessedFn: < CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
+    }
+
+#endif /* HELLOTRACEFNDUP2_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/dll/incDup/HelloTraceInterfaceDup.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,91 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef __HELLOTRACEINTERFACEDUP_H__
+#define __HELLOTRACEINTERFACEDUP_H__
+
+#include "HelloTracePanic.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTraceInterfaceDupTraces.h"
+#endif
+
+ inline EXPORT_C TVersion CHelloTraceInterface::VersionDup()
+        {
+        const TInt KMajor = 1;
+        const TInt KMinor = 0;
+        const TInt KBuild = 1;
+        TVersion version = TVersion(KMajor, KMinor, KBuild);
+        OstTraceExt1( TRACE_BORDER, CHELLOTRACEDLL_VERSION_DUP, "CHelloTraceInterface::Version = %S", version.Name());   
+        return version;
+        }
+
+ inline EXPORT_C const TPtrC CHelloTraceInterface::StringDup() const
+        {
+        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
+
+        OstTraceDefExt2( OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CHELLOTRACEDLL_STRING_DUP, 
+                         "[0x%08x] Returned %S", (TUint32) this, *iString);   
+        return *iString;
+        }
+
+ inline EXPORT_C void CHelloTraceInterface::AddCharDupL(const TChar& aChar)
+        {
+        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
+
+        OstTraceExt3( TRACE_BORDER, CHELLOTRACEDLL_ADDCHARL_DUP, 
+                      "[0x%08x] Adding %d to %S", (TUint32) this, (TInt32) aChar, *iString);   
+        if (iString->Length() >= KHelloTraceDllBufferLength)
+            {
+            OstTrace1( TRACE_ERROR, CHELLOTRACEDLL_ADDCHARL_ERR_DUP,
+                       "[0x%08x] Not enough space to add character", (TUint32) this);
+            User::Leave( KErrTooBig);
+            }
+        iString->Append(aChar);
+        }
+
+ inline EXPORT_C void CHelloTraceInterface::RemoveLastDup()
+        {
+        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
+
+        OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_REMOVELAST_DUP, 
+                      "[0x%08x] Attempting to remove last character from %S", (TUint32) this, *iString);
+        if (iString->Length() > 0)
+            {
+            iString->SetLength(iString->Length() - 1);
+            }
+        else
+            {
+            OstTrace1( TRACE_WARNING, CHELLOTRACEDLL_REMOVELAST_WARN_DUP, "[0x%08x] String already empty", (TUint32) this);   
+            }
+        }
+
+ inline EXPORT_C void CHelloTraceInterface::ResetStringDup()
+        {
+        OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_RESETSTRING_DUP, "[0x%08x] Reseting string %S", (TUint32) this, *iString);
+        if (iString == NULL)
+            {
+            iString = new (ELeave) THelloTraceDllExampleString;
+            }
+        else
+            {
+            iString->SetLength(0);
+            }
+        }
+#endif  // __HELLOTRACEINTERFACEDUP_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/dll/incDup/HelloTraceInterfaceDup2.inl	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,91 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef __HELLOTRACEINTERFACEDUP2_H__
+#define __HELLOTRACEINTERFACEDUP2_H__
+
+#include "HelloTracePanic.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTraceInterfaceDup2Traces.h"
+#endif
+
+ inline EXPORT_C TVersion CHelloTraceInterface::VersionDup2()
+        {
+        const TInt KMajor = 1;
+        const TInt KMinor = 0;
+        const TInt KBuild = 1;
+        TVersion version = TVersion(KMajor, KMinor, KBuild);
+        OstTraceExt1( TRACE_BORDER, CHELLOTRACEDLL_VERSION_DUP2, "CHelloTraceInterface::Version = %S", version.Name());   
+        return version;
+        }
+
+ inline EXPORT_C const TPtrC CHelloTraceInterface::StringDup2() const
+        {
+        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
+
+        OstTraceDefExt2( OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CHELLOTRACEDLL_STRING_DUP2, 
+                         "[0x%08x] Returned %S", (TUint32) this, *iString);   
+        return *iString;
+        }
+
+ inline EXPORT_C void CHelloTraceInterface::AddCharDup2L(const TChar& aChar)
+        {
+        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
+
+        OstTraceExt3( TRACE_BORDER, CHELLOTRACEDLL_ADDCHARL_DUP2, 
+                      "[0x%08x] Adding %d to %S", (TUint32) this, (TInt32) aChar, *iString);   
+        if (iString->Length() >= KHelloTraceDllBufferLength)
+            {
+            OstTrace1( TRACE_ERROR, CHELLOTRACEDLL_ADDCHARL_ERR_DUP2,
+                       "[0x%08x] Not enough space to add character", (TUint32) this);
+            User::Leave( KErrTooBig);
+            }
+        iString->Append(aChar);
+        }
+
+ inline EXPORT_C void CHelloTraceInterface::RemoveLastDup2()
+        {
+        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
+
+        OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_REMOVELAST_DUP2, 
+                      "[0x%08x] Attempting to remove last character from %S", (TUint32) this, *iString);
+        if (iString->Length() > 0)
+            {
+            iString->SetLength(iString->Length() - 1);
+            }
+        else
+            {
+            OstTrace1( TRACE_WARNING, CHELLOTRACEDLL_REMOVELAST_WARN_DUP2, "[0x%08x] String already empty", (TUint32) this);   
+            }
+        }
+
+ inline EXPORT_C void CHelloTraceInterface::ResetStringDup2()
+        {
+        OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_RESETSTRING_DUP2, "[0x%08x] Reseting string %S", (TUint32) this, *iString);
+        if (iString == NULL)
+            {
+            iString = new (ELeave) THelloTraceDllExampleString;
+            }
+        else
+            {
+            iString->SetLength(0);
+            }
+        }
+#endif  // __HELLOTRACEINTERFACEDUP2_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/dll/incDup/HelloTraceTypesDup.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,75 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef __HELLOTRACETYPESDUP_H__
+#define __HELLOTRACETYPESDUP_H__
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTraceTypesDupTraces.h"
+#endif
+
+inline void HelloTraceTypes::SignedIntegersDup()
+    {
+    TInt8  eightBit     = - (TInt8)  1 << 6;
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP_8, 
+                  "8 bit signed: %hhd", eightBit );
+    
+    TInt16 sixteenBit   = - (TInt16) 1 << 14; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP_16, 
+                  "16 bit signed: %hd", sixteenBit );
+
+    TInt32 thirtyTwoBit = - (TInt32) 1 << 30; 
+    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP_32, 
+               "32 bit signed: %d", thirtyTwoBit );
+
+    TInt64 sixtyFourBit = - (TInt64) 1 << 62; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP_64, 
+                  "64 bit signed: %Ld", sixtyFourBit );
+    }
+
+inline void HelloTraceTypes::UnsignedIntegersDup()
+    {
+    TUint8  eightBit     = (TUint8)  1 << 6;
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP_8, 
+                  "8 bit unsigned: %hhu", eightBit );
+    
+    TUint16 sixteenBit   = (TUint16) 1 << 14; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP_16, 
+                  "16 bit unsigned: %hu", sixteenBit );
+
+    TUint32 thirtyTwoBit = (TUint32) 1 << 30; 
+    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP_32, 
+               "32 bit unsigned: %u", thirtyTwoBit );
+
+    TUint64 sixtyFourBit = (TUint64) 1 << 62; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP_64, 
+                  "64 bit unsigned: %Lu", sixtyFourBit );
+    }
+
+inline void HelloTraceTypes::DescriptorsDup()
+    {
+    _LIT8(KAscii, "Some ASCII text");
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_ASCIIDUP, "8 bit descriptor: %s", KAscii() );
+
+    _LIT16(KUnicode, "Some unicode text");    
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNICODEDUP, "16 bit descriptor: %S", KUnicode() );
+    }
+
+#endif  // __HELLOTRACETYPESDUP_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/dll/incDup/HelloTraceTypesDup2.inl	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,75 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef __HELLOTRACETYPESDUP2_H__
+#define __HELLOTRACETYPESDUP2_H__
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTraceTypesDup2Traces.h"
+#endif
+
+inline void HelloTraceTypes::SignedIntegersDup2()
+    {
+    TInt8  eightBit     = - (TInt8)  1 << 6;
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP2_8, 
+                  "8 bit signed: %hhd", eightBit );
+    
+    TInt16 sixteenBit   = - (TInt16) 1 << 14; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP2_16, 
+                  "16 bit signed: %hd", sixteenBit );
+
+    TInt32 thirtyTwoBit = - (TInt32) 1 << 30; 
+    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP2_32, 
+               "32 bit signed: %d", thirtyTwoBit );
+
+    TInt64 sixtyFourBit = - (TInt64) 1 << 62; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP2_64, 
+                  "64 bit signed: %Ld", sixtyFourBit );
+    }
+
+inline void HelloTraceTypes::UnsignedIntegersDup2()
+    {
+    TUint8  eightBit     = (TUint8)  1 << 6;
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP2_8, 
+                  "8 bit unsigned: %hhu", eightBit );
+    
+    TUint16 sixteenBit   = (TUint16) 1 << 14; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP2_16, 
+                  "16 bit unsigned: %hu", sixteenBit );
+
+    TUint32 thirtyTwoBit = (TUint32) 1 << 30; 
+    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP2_32, 
+               "32 bit unsigned: %u", thirtyTwoBit );
+
+    TUint64 sixtyFourBit = (TUint64) 1 << 62; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP2_64, 
+                  "64 bit unsigned: %Lu", sixtyFourBit );
+    }
+
+inline void HelloTraceTypes::DescriptorsDup2()
+    {
+    _LIT8(KAscii, "Some ASCII text");
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_ASCIIDUP2, "8 bit descriptor: %s", KAscii() );
+
+    _LIT16(KUnicode, "Some unicode text");    
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNICODEDUP2, "16 bit descriptor: %S", KUnicode() );
+    }
+
+#endif  // __HELLOTRACETYPESDUP2_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/dll/src/HelloTraceExample.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,106 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+
+#include "HelloTraceExample.h"
+#include "HelloTraceTypes.h"
+#include "HelloTraceInterface.h"
+#include "HelloTraceFn.h"
+#include "HelloTracePanic.h"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTraceExampleTraces.h"
+#endif
+
+EXPORT_C void HelloTraceExample::JustTypes()
+    {
+    OstTrace0( TRACE_EXAMPLE, HELLOTRACEEXAMPLE_JUSTTYPES, "*********************************************** " );
+    
+    HelloTraceTypes::SignedIntegers();
+    HelloTraceTypes::UnsignedIntegers();
+    HelloTraceTypes::Descriptors();    
+    }
+
+EXPORT_C void HelloTraceExample::Interface()
+    {
+    OstTrace0( TRACE_EXAMPLE, HELLOTRACEEXAMPLE_INTERFACE, "*********************************************** " );
+    
+    TVersion version = CHelloTraceInterface::Version();   
+    if (version.iMajor >= 1) 
+        {
+        CHelloTraceInterface* example = CHelloTraceInterface::NewLC();
+        example->AddCharL('H');
+        example->AddCharL('e');
+        example->AddCharL('l');
+        example->AddCharL('l');
+        example->AddCharL('o');
+        example->AddCharL('T');        
+        example->RemoveLast();        
+        example->AddCharL(' ');
+        example->AddCharL('T');
+        example->AddCharL('r');
+        example->AddCharL('a');
+        example->AddCharL('c');
+        example->AddCharL('e');
+        example->AddCharL('!');
+        CleanupStack::PopAndDestroy(example);
+        }
+    else
+        {
+        OstTrace0( TRACE_ERROR, HELLOTRACEEXAMPLE_UNSUPPORTED_VERSION, "Unsupported version!");
+        }
+    }
+
+EXPORT_C void HelloTraceExample::FnEntryExit()
+    {
+    OstTrace0( TRACE_EXAMPLE, HELLOTRACEEXAMPLE_FNENTRYEXIT, "*********************************************** " );
+       
+    CHelloTraceFn* example = CHelloTraceFn::NewLC();
+    CIdle* idle = CIdle::NewL(CActive::EPriorityIdle);
+    CleanupStack::PushL(idle);
+
+    CHelloTraceFn::StaticOutputsParamsL(1);
+   
+    example->Simple();
+    example->OutputsParams(2, CHelloTraceFn::EExample1);
+    example->OutputsParams(3, CHelloTraceFn::EExample2);
+    example->OutputsSignedIntegers(-4, -5, -6, -7);
+    example->OutputsUnsignedIntegers(8, 9, 10, 11);
+    example->OutputsTIntReturnValue();    
+    example->OutputsTInt64ReturnValue(); 
+    example->OutputsTFnEnumReturnValue();
+    example->OutputsUnknownPtrType(idle);    
+    example->OutputsUnknownRefType(*idle);
+#ifdef _DEBUG
+    example->PreProcessedFn(12);
+#else
+    example->PreProcessedFn();
+#endif
+    example->OutputMissingParams(13, 14, 15);
+
+    CleanupStack::PopAndDestroy(idle);
+    CleanupStack::PopAndDestroy(example);
+    }
+
+EXPORT_C void HelloTraceExample::PanicTrace()
+    {
+    OstTrace0( TRACE_EXAMPLE, HELLOTRACEEXAMPLE_PANIC, "*********************************************** " );
+
+    Panic(EHelloTraceDllExamplePanic);
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/dll/src/HelloTraceFn.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,183 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+ 
+#include "HelloTraceFn.h"
+#include "HelloTraceFnDup.h"
+#include "HelloTraceFnDup2.inl"
+#include "HelloTracePanic.h"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTraceFnTraces.h"
+#endif
+
+CHelloTraceFn* CHelloTraceFn::NewLC()
+    {
+    CHelloTraceFn* self = new (ELeave) CHelloTraceFn;
+    CleanupStack::PushL(self);
+    return self;
+    }
+
+CHelloTraceFn* CHelloTraceFn::NewL()
+    {
+    CHelloTraceFn* self = CHelloTraceFn::NewLC();
+    CleanupStack::Pop(self);
+    return self;
+    }
+
+CHelloTraceFn::CHelloTraceFn()
+    {
+    OstTrace1( TRACE_NORMAL, CHELLOTRACEFN_CHELLOTRACEFN_CTOR, "[0x%08x] Constructor", this );    
+    }
+
+CHelloTraceFn::~CHelloTraceFn()
+    {
+    OstTrace1( TRACE_NORMAL, CHELLOTRACEFN_CHELLOTRACEFN_DTOR, "[0x%08x] Destructor", this );    
+    }
+
+void CHelloTraceFn::Simple()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_SIMPLE_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_SIMPLE_EXIT, this );
+    }
+
+void CHelloTraceFn::OutputsParams(TInt aParam, TFnEnum aEnumParam)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSPARAMS_ENTRY, this );
+    Simple();
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSPARAMS_EXIT, this );
+    }
+
+void CHelloTraceFn::StaticOutputsParamsL(TInt aParam)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_STATICOUTPUTSPARAMS_ENTRY, NULL );
+    CHelloTraceFn* example = CHelloTraceFn::NewLC();
+    example->Simple();    
+    CleanupStack::PopAndDestroy(example);
+    OstTraceFunctionExit0( CHELLOTRACEFN_STATICOUTPUTSPARAMS_EXIT );    
+    }
+
+void CHelloTraceFn::OutputsSignedIntegers(TInt8 aParam8,   TInt16 aParam16, 
+                                          TInt32 aParam32, TInt64 aParam64)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS_EXIT, this );
+    }
+
+void CHelloTraceFn::OutputsUnsignedIntegers(TUint8 aParam8,   TUint16 aParam16, 
+                                            TUint32 aParam32, TUint64 aParam64)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS_EXIT, this );
+    }
+
+
+TInt CHelloTraceFn::OutputsTIntReturnValue()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_ENTRY, this );
+    TInt ret = KErrNone;
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_EXIT, this, ret );
+    return ret;
+    }
+
+TInt64 CHelloTraceFn::OutputsTInt64ReturnValue()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE_ENTRY, this );
+    TInt64 ret = (TInt64) 2 << 40;
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE_EXIT, this, ret );
+    return ret;
+    }
+
+CHelloTraceFn::TFnEnum CHelloTraceFn::OutputsTFnEnumReturnValue()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE_ENTRY, this );
+    TFnEnum ret = EExample1;
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE_EXIT, this, ret );
+    return ret;    
+    }
+
+CActive* CHelloTraceFn::OutputsUnknownPtrType(CActive* aActive)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_ENTRY, this );    
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_EXIT, this, (TUint) aActive );
+    return aActive;
+    }
+
+CActive& CHelloTraceFn::OutputsUnknownRefType(CActive& aActive)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE_ENTRY, this );
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE_EXIT, this, (TUint) &aActive );    
+    return aActive;
+    }
+
+// The following doesn't compile as the Trace Compiler doesn't generate
+// the correct OstTraceGenExt(...) function for it
+//void CHelloTraceFn::OutputMissingParamsBug(TInt /*aCommentParam*/, TInt)
+//    {
+//    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_ENTRY, this );
+//    // ...
+//    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_EXIT, this );    
+//    }
+
+// The following compiles and works but outputs the following warning
+// warning: HelloTraceFn.cpp, line xxx: Parameter did not have a name and was not added to trace
+// The fact that this cannot be suppressed is a known problem we're working on.
+void CHelloTraceFn::OutputMissingParams(TInt aUsedParam, TInt /*aCommentParam*/, TInt)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMS_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMS_EXIT, this );
+    }
+
+// The following doesn't work as the Trace Compiler outputs:
+// error: HelloTraceFn.cpp, line xxx: Class / function name for trace could not be determined x3
+//#ifdef _DEBUG
+//void CHelloTraceFn::PreProcessedFn(TInt aDbgParam)
+//    {
+//    OstTraceFunctionEntryExt( PRE_PROCESSED_ENTRTY_1, this );
+//#else
+//void CHelloTraceFn::PreProcessedFn()
+//    {
+//    OstTraceFunctionEntry1( PRE_PROCESSED_ENTRTY_2, this );
+//#endif
+//    Simple();
+//    OstTraceFunctionExit1( CHELLOTRACEFN_PREPROCESSEDFN_EXIT, this );
+//    }
+
+// Workaround example code until a proper fix is provided
+#ifdef _DEBUG
+void CHelloTraceFn::PreProcessedFn(TInt aDbgParam)
+    {
+    OstTraceExt2( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_ENTRY_1, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;aDbgParam=%d;this=%x", (TInt) aDbgParam, (TUint) this);
+#else
+void CHelloTraceFn::PreProcessedFn()
+    {
+    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_ENTRY_2, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
+#endif
+    Simple();
+    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_EXIT, "CHelloTraceFn::PreProcessedFn: < CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
+    }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/dll/src/HelloTraceInterface.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,121 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+
+#include "HelloTraceInterface.h"
+#include "HelloTraceInterfaceDup.h"
+#include "HelloTraceInterfaceDup2.inl"
+#include "HelloTracePanic.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTraceInterfaceTraces.h"
+#endif
+
+EXPORT_C CHelloTraceInterface* CHelloTraceInterface::NewLC()
+    {
+    CHelloTraceInterface* self = new (ELeave) CHelloTraceInterface;
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    return self;
+    }
+
+EXPORT_C CHelloTraceInterface* CHelloTraceInterface::NewL()
+    {
+    CHelloTraceInterface* self = CHelloTraceInterface::NewLC();
+    CleanupStack::Pop(self);
+    return self;
+    }
+
+CHelloTraceInterface::CHelloTraceInterface()
+    {
+    OstTrace1( TRACE_NORMAL, CHELLOTRACEDLL_CHELLOTRACEDLL_CTOR, "[0x%08x]", (TUint32) this );    
+    }
+
+void CHelloTraceInterface::ConstructL()
+    {
+    iString = new (ELeave) THelloTraceDllExampleString;
+    }
+
+EXPORT_C CHelloTraceInterface::~CHelloTraceInterface()
+    {
+    delete iString;
+    OstTrace1( TRACE_NORMAL, CHELLOTRACEDLL_CHELLOTRACEDLL_DTOR, "[0x%08x]", (TUint32) this );    
+    }
+
+EXPORT_C TVersion CHelloTraceInterface::Version()
+    {
+    const TInt KMajor = 1;
+    const TInt KMinor = 0;
+    const TInt KBuild = 1;
+    TVersion version = TVersion(KMajor, KMinor, KBuild);
+    OstTraceExt1( TRACE_BORDER, CHELLOTRACEDLL_VERSION, "CHelloTraceInterface::Version = %S", version.Name());   
+    return version;
+    }
+
+EXPORT_C const TPtrC CHelloTraceInterface::String() const
+    {
+    __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
+
+    OstTraceDefExt2( OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CHELLOTRACEDLL_STRING, 
+                     "[0x%08x] Returned %S", (TUint32) this, *iString);   
+    return *iString;
+    }
+
+EXPORT_C void CHelloTraceInterface::AddCharL(const TChar& aChar)
+    {
+    __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
+
+    OstTraceExt3( TRACE_BORDER, CHELLOTRACEDLL_ADDCHARL, 
+                  "[0x%08x] Adding %d to %S", (TUint32) this, (TInt32) aChar, *iString);   
+    if (iString->Length() >= KHelloTraceDllBufferLength)
+        {
+        OstTrace1( TRACE_ERROR, CHELLOTRACEDLL_ADDCHARL_ERR,
+                   "[0x%08x] Not enough space to add character", (TUint32) this);
+        User::Leave( KErrTooBig);
+        }
+    iString->Append(aChar);
+    }
+
+EXPORT_C void CHelloTraceInterface::RemoveLast()
+    {
+    __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
+
+    OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_REMOVELAST, 
+                  "[0x%08x] Attempting to remove last character from %S", (TUint32) this, *iString);
+    if (iString->Length() > 0)
+        {
+        iString->SetLength(iString->Length() - 1);
+        }
+    else
+        {
+        OstTrace1( TRACE_WARNING, CHELLOTRACEDLL_REMOVELAST_WARN, "[0x%08x] String already empty", (TUint32) this);   
+        }
+    }
+
+EXPORT_C void CHelloTraceInterface::ResetString()
+    {
+    OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_RESETSTRING, "[0x%08x] Reseting string %S", (TUint32) this, *iString);
+    if (iString == NULL)
+        {
+        iString = new (ELeave) THelloTraceDllExampleString;
+        }
+    else
+        {
+        iString->SetLength(0);
+        }
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/dll/src/HelloTracePanic.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,32 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#include <e32std.h>		 // GLDEF_C
+
+#include "HelloTracePanic.h"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTracePanicTraces.h"
+#endif
+
+GLDEF_C void Panic(THelloTraceDllPanic aPanic)
+    {
+    OstTrace1( TRACE_FATAL, PANIC, "Panic(%{THelloTraceDllPanic})", (TUint) aPanic );    
+    User::Panic(_L("HelloTraceDll"), aPanic);
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/dll/src/HelloTraceTypes.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,76 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+
+#include <e32std.h>
+
+#include "HelloTraceTypes.h"
+#include "HelloTraceTypesDup.h"
+#include "HelloTraceTypesDup2.inl"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTraceTypesTraces.h"
+#endif
+
+void HelloTraceTypes::SignedIntegers()
+    {
+    TInt8  eightBit     = - (TInt8)  1 << 6;
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS_8, 
+                  "8 bit signed: %hhd", eightBit );
+    
+    TInt16 sixteenBit   = - (TInt16) 1 << 14; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS_16, 
+                  "16 bit signed: %hd", sixteenBit );
+
+    TInt32 thirtyTwoBit = - (TInt32) 1 << 30; 
+    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS_32, 
+               "32 bit signed: %d", thirtyTwoBit );
+
+    TInt64 sixtyFourBit = - (TInt64) 1 << 62; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS_64, 
+                  "64 bit signed: %Ld", sixtyFourBit );
+    }
+
+void HelloTraceTypes::UnsignedIntegers()
+    {
+    TUint8  eightBit     = (TUint8)  1 << 6;
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS_8, 
+                  "8 bit unsigned: %hhu", eightBit );
+    
+    TUint16 sixteenBit   = (TUint16) 1 << 14; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS_16, 
+                  "16 bit unsigned: %hu", sixteenBit );
+
+    TUint32 thirtyTwoBit = (TUint32) 1 << 30; 
+    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS_32, 
+               "32 bit unsigned: %u", thirtyTwoBit );
+
+    TUint64 sixtyFourBit = (TUint64) 1 << 62; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS_64, 
+                  "64 bit unsigned: %Lu", sixtyFourBit );
+    }
+
+void HelloTraceTypes::Descriptors()
+    {
+    _LIT8(KAscii, "Some ASCII text");
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_ASCII, "8 bit descriptor: %s", KAscii() );
+
+    _LIT16(KUnicode, "Some unicode text");    
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNICODE, "16 bit descriptor: %S", KUnicode() );
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/dll/traces/hellotracedll2_dll/trace.properties	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<trace_properties>
+<enum name="TFnEnum">
+<value id="0">EExample1</value>
+<value id="2">EExample2</value>
+</enum>
+<enum name="THelloTraceDllPanic">
+<value id="0">EHelloTraceDllExamplePanic</value>
+<value id="1">EHelloTraceDllNullPointer</value>
+</enum>
+<file>../../incDup/HelloTraceInterfaceDup.h</file>
+<file>../../incDup/HelloTraceInterfaceDup2.inl</file>
+<file>../../incDup/HelloTraceFnDup.h</file>
+<file>../../incDup/HelloTraceFnDup2.inl</file>
+<file>../../incDup/HelloTraceTypesDup.h</file>
+<file>../../incDup/HelloTraceTypesDup2.inl</file>
+</trace_properties>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/dll/traces/hellotracedll_dll/trace.properties	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<trace_properties>
+<enum name="TFnEnum">
+<value id="0">EExample1</value>
+<value id="2">EExample2</value>
+</enum>
+<enum name="THelloTraceDllPanic">
+<value id="0">EHelloTraceDllExamplePanic</value>
+<value id="1">EHelloTraceDllNullPointer</value>
+</enum>
+<file>../../incDup/HelloTraceInterfaceDup.h</file>
+<file>../../incDup/HelloTraceInterfaceDup2.inl</file>
+<file>../../incDup/HelloTraceFnDup.h</file>
+<file>../../incDup/HelloTraceFnDup2.inl</file>
+<file>../../incDup/HelloTraceTypesDup.h</file>
+<file>../../incDup/HelloTraceTypesDup2.inl</file>
+</trace_properties>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/group/bld.inf	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,19 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+#include "../dll/group/bld.inf"
+#include "../console/group/bld.inf"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/console/group/HelloTraceConsole.mmp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,37 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+
+TARGET		  HelloTraceConsole.exe
+TARGETTYPE	  exe
+UID			  0 0xE40349E4
+
+OS_LAYER_SYSTEMINCLUDE
+USERINCLUDE	   ../inc
+USERINCLUDE    ../../dll/inc
+USERINCLUDE    ../traces
+
+SOURCEPATH	  ../src
+SOURCE		  HelloTraceConsole.cpp
+
+LIBRARY		  euser.lib
+LIBRARY       HelloTraceDll.lib
+
+#ifdef ENABLE_ABIV2_MODE
+DEBUGGABLE_UDEBONLY
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/console/group/bld.inf	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,27 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXPORTS
+hellotraceconsole.iby             CORE_OS_LAYER_IBY_EXPORT_PATH(hellotraceconsole.iby)
+
+PRJ_MMPFILES
+HelloTraceConsole.mmp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/console/group/hellotraceconsole.iby	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,24 @@
+// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+// ROM build file for tracecore project
+
+#ifndef HELLOTRACECONSOLE_IBY
+#define HELLOTRACECONSOLE_IBY
+
+#include <core\os\hellotracedll.iby>
+
+file=ABI_DIR\BUILD_DIR\hellotraceconsole.exe    Sys\Bin\hellotraceconsole.exe
+
+#endif //HELLOTRACECONSOLE_IBY
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/console/inc/HelloTraceConsole.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,31 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef __HELLOTRACECONSOLE_H__
+#define __HELLOTRACECONSOLE_H__
+
+//  Include Files
+
+#include <e32base.h>
+
+//  Function Prototypes
+
+GLDEF_C TInt E32Main();
+
+#endif  // __HELLOTRACECONSOLE_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/console/src/HelloTraceConsole.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,124 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#include <e32cons.h>			// Console
+
+#include "HelloTraceConsole.h"
+#include "HelloTraceExample.h"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTraceConsoleTraces.h"
+#endif
+
+
+_LIT(KTextConsoleTitle, "HelloTrace");
+_LIT(KTextPressAnyKey, " [press any key]\n");
+
+LOCAL_D CConsoleBase* console; // write all messages to this
+
+LOCAL_C void DoExamples()
+    {
+    TInt err = KErrNone;
+
+    console->Printf(_L("Before main tracing examples ...\n"));
+
+    console->Printf(_L(" Before type examples ..."));
+    console->Printf(KTextPressAnyKey);
+    console->Getch();
+    TRAP(err, HelloTraceExample::JustTypes());    
+    if (err)
+        console->Printf(_L(" Failed with error %d\n"), err);
+
+    console->Printf(_L(" Before Interface examples ..."));
+    console->Printf(KTextPressAnyKey);
+    console->Getch();
+    TRAP(err, HelloTraceExample::Interface());    
+    if (err)
+        console->Printf(_L(" Failed with error %d\n"), err);
+    
+    console->Printf(_L(" Before FnEntryExit examples ..."));
+    console->Printf(KTextPressAnyKey);
+    console->Getch();
+    TRAP(err, HelloTraceExample::FnEntryExit());    
+    if (err)
+        console->Printf(_L(" Failed with error %d\n"), err);    
+    }
+
+LOCAL_C void DoStartL()
+    {
+    // Create active scheduler (to run active objects)
+    CActiveScheduler* scheduler = new (ELeave) CActiveScheduler();
+    CleanupStack::PushL(scheduler);
+    CActiveScheduler::Install(scheduler);
+
+    DoExamples();
+    
+    // Delete active scheduler
+    CleanupStack::PopAndDestroy(scheduler);
+    }
+
+//  Global Functions
+
+GLDEF_C TInt E32Main()
+    {
+    OstTraceFunctionEntry0( E32MAIN_ENTRY );
+    
+    // Create cleanup stack
+    __UHEAP_MARK;
+    CTrapCleanup* cleanup = CTrapCleanup::New();
+
+    // Create output console
+    TRAPD(createError, 
+          console = Console::NewL(KTextConsoleTitle, 
+                                  TSize(KConsFullScreen, KConsFullScreen)));    
+    if (createError)
+        {
+        delete cleanup;
+        OstTrace1( TRACE_ERROR, E32MAIN_CREATE_ERROR, "Failed to create console error: %d", createError);
+        OstTraceFunctionExit0( E32MAIN_EXIT_ERR );
+        return createError;
+        }
+
+    TRAPD(mainError, DoStartL());    
+    if (mainError)
+        {
+        OstTrace1( TRACE_ERROR, E32MAIN_START_ERROR, "DoStartL failed with error: %d", mainError);
+        console->Printf(_L("DoStartL failed with error: %d\n\n"), mainError);
+        }
+    else 
+        {
+        console->Printf(_L("Before panic tracing example ..."));
+        console->Printf(KTextPressAnyKey);
+        console->Getch();
+    
+        OstTrace0( TRACE_FLOW, E32MAIN_BEFORE_PANIC, "About to cause a panic ..." );
+        HelloTraceExample::PanicTrace();
+        
+        console->Printf(KTextPressAnyKey);
+        console->Getch();
+        }
+
+    delete console;
+    delete cleanup;
+    __UHEAP_MARKEND;
+    
+    OstTraceFunctionExit0( E32MAIN_EXIT );
+    return KErrNone;
+    }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/bwins/HelloTraceDllu.def	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,14 @@
+EXPORTS
+	?Version@CHelloTraceInterface@@SA?AVTVersion@@XZ @ 1 NONAME ; class TVersion CHelloTraceInterface::Version(void)
+	?NewLC@CHelloTraceInterface@@SAPAV1@XZ @ 2 NONAME ; class CHelloTraceInterface * CHelloTraceInterface::NewLC(void)
+	?JustTypes@HelloTraceExample@@SAXXZ @ 3 NONAME ; void HelloTraceExample::JustTypes(void)
+	?Interface@HelloTraceExample@@SAXXZ @ 4 NONAME ; void HelloTraceExample::Interface(void)
+	?FnEntryExit@HelloTraceExample@@SAXXZ @ 5 NONAME ; void HelloTraceExample::FnEntryExit(void)
+	?ResetString@CHelloTraceInterface@@QAEXXZ @ 6 NONAME ; void CHelloTraceInterface::ResetString(void)
+	?AddCharL@CHelloTraceInterface@@QAEXABVTChar@@@Z @ 7 NONAME ; void CHelloTraceInterface::AddCharL(class TChar const &)
+	?PanicTrace@HelloTraceExample@@SAXXZ @ 8 NONAME ; void HelloTraceExample::PanicTrace(void)
+	??1CHelloTraceInterface@@UAE@XZ @ 9 NONAME ; CHelloTraceInterface::~CHelloTraceInterface(void)
+	?String@CHelloTraceInterface@@QBE?BVTPtrC16@@XZ @ 10 NONAME ; class TPtrC16 const CHelloTraceInterface::String(void) const
+	?RemoveLast@CHelloTraceInterface@@QAEXXZ @ 11 NONAME ; void CHelloTraceInterface::RemoveLast(void)
+	?NewL@CHelloTraceInterface@@SAPAV1@XZ @ 12 NONAME ; class CHelloTraceInterface * CHelloTraceInterface::NewL(void)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/eabi/HelloTraceDllu.def	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,20 @@
+EXPORTS
+	_ZN17HelloTraceExample10PanicTraceEv @ 1 NONAME
+	_ZN17HelloTraceExample11FnEntryExitEv @ 2 NONAME
+	_ZN17HelloTraceExample9InterfaceEv @ 3 NONAME
+	_ZN17HelloTraceExample9JustTypesEv @ 4 NONAME
+	_ZN20CHelloTraceInterface10RemoveLastEv @ 5 NONAME
+	_ZN20CHelloTraceInterface11ResetStringEv @ 6 NONAME
+	_ZN20CHelloTraceInterface4NewLEv @ 7 NONAME
+	_ZN20CHelloTraceInterface5NewLCEv @ 8 NONAME
+	_ZN20CHelloTraceInterface7VersionEv @ 9 NONAME
+	_ZN20CHelloTraceInterface8AddCharLERK5TChar @ 10 NONAME
+	_ZN20CHelloTraceInterfaceD0Ev @ 11 NONAME
+	_ZN20CHelloTraceInterfaceD1Ev @ 12 NONAME
+	_ZN20CHelloTraceInterfaceD2Ev @ 13 NONAME
+	_ZNK20CHelloTraceInterface6StringEv @ 14 NONAME
+	_ZTI13CHelloTraceFn @ 15 NONAME
+	_ZTI20CHelloTraceInterface @ 16 NONAME
+	_ZTV13CHelloTraceFn @ 17 NONAME
+	_ZTV20CHelloTraceInterface @ 18 NONAME
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/group/HelloTraceDll.mmp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,40 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+
+TARGET		  HelloTraceDll.dll
+TARGETTYPE	  dll
+UID			  0x1000008d 0xE43DF43E
+CAPABILITY    ReadUserData
+
+OS_LAYER_SYSTEMINCLUDE
+USERINCLUDE  ../inc ../incDup
+USERINCLUDE  ../traces
+
+SOURCEPATH	 ../src
+SOURCE       HelloTraceExample.cpp 
+SOURCE       HelloTraceTypes.cpp
+SOURCE       HelloTraceInterface.cpp 
+SOURCE       HelloTraceFn.cpp 
+SOURCE       HelloTracePanic.cpp 
+
+LIBRARY		 euser.lib
+
+#ifdef ENABLE_ABIV2_MODE
+DEBUGGABLE_UDEBONLY
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/group/HelloTraceDll2.mmp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,40 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+
+TARGET		  HelloTraceDll2.dll
+TARGETTYPE	  dll
+UID			  0x1000008d 0xE43DF43E
+CAPABILITY    ReadUserData
+
+OS_LAYER_SYSTEMINCLUDE
+USERINCLUDE  ../inc ../incDup
+USERINCLUDE  ../traces
+
+SOURCEPATH	 ../src
+SOURCE       HelloTraceExample2.cpp 
+SOURCE       HelloTraceTypes2.cpp
+SOURCE       HelloTraceInterface2.cpp 
+SOURCE       HelloTraceFn2.cpp 
+SOURCE       HelloTracePanic2.cpp 
+
+LIBRARY		 euser.lib
+
+#ifdef ENABLE_ABIV2_MODE
+DEBUGGABLE_UDEBONLY
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/group/bld.inf	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,28 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXPORTS
+hellotracedll.iby             CORE_OS_LAYER_IBY_EXPORT_PATH(hellotracedll.iby)
+
+PRJ_MMPFILES
+HelloTraceDll.mmp
+HelloTraceDll2.mmp
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/group/hellotracedll.iby	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,23 @@
+// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+// ROM build file for tracecore project
+
+#ifndef HELLOTRACEDLL_IBY
+#define HELLOTRACEDLL_IBY
+
+file=ABI_DIR\BUILD_DIR\hellotracedll.dll        Sys\Bin\hellotracedll.dll
+file=ABI_DIR\BUILD_DIR\hellotracedll2.dll        Sys\Bin\hellotracedll2.dll
+
+#endif //HELLOTRACEDLL_IBY
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/inc/HelloTraceExample.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,40 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef __HELLOTRACEEXAMPLE_H__
+#define __HELLOTRACEEXAMPLE_H__
+
+#include <e32std.h>
+
+class HelloTraceExample
+    {
+public:
+    IMPORT_C static void JustTypes();    
+    IMPORT_C static void Interface();    
+    IMPORT_C static void FnEntryExit();    
+    IMPORT_C static void PanicTrace();    
+
+    // @TODO add examples for state macros
+    // @TODO add examples for event macros
+    // @TODO add examples for OstTraceData
+    // @TODO add compile-time selector examples
+    // @TODO add macro wrapper examples
+    };
+
+#endif  // __HELLOTRACEEXAMPLE_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/inc/HelloTraceFn.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,122 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef HELLOTRACEFN_H_
+#define HELLOTRACEFN_H_
+
+#include <e32base.h>    // CBase
+
+class CHelloTraceFn : public CBase
+    {
+public:
+    
+    // Note the Trace Builder will only parse this if it's in a cpp file
+    // but not from here :(
+    // Also if you add a new enum you need to reparse the enum - it doesn't
+    // get automatically reparsed by the Trace Compiler :(
+    enum TFnEnum
+        {
+        EExample1,
+        EExample2 = 2, 
+        // EExample3 = EExample2 + 1, // The Trace Builder can't parse this :(
+        };
+    
+public:
+    static CHelloTraceFn* NewL();
+    static CHelloTraceFn* NewLC();
+    ~CHelloTraceFn();
+   
+public: // Fn entry / exit tracing examples 
+    void Simple();
+    void OutputsParams(TInt aParam, TFnEnum aEnumParam);
+    void OutputsSignedIntegers(TInt8 aParam8,   TInt16 aParam16, 
+                               TInt32 aParam32, TInt64 aParam64);
+    void OutputsUnsignedIntegers(TUint8 aParam8,   TUint16 aParam16, 
+                                 TUint32 aParam32, TUint64 aParam64);
+     
+    TInt OutputsTIntReturnValue();
+    TInt64 OutputsTInt64ReturnValue();
+    TFnEnum OutputsTFnEnumReturnValue();
+
+    CActive* OutputsUnknownPtrType(CActive* aActive);
+    CActive& OutputsUnknownRefType(CActive& aActive);
+    
+    void OutputMissingParams(TInt aUsedParam, TInt aCommentParam, TInt aMissingParam);
+
+#ifdef _DEBUG    
+    void PreProcessedFn(TInt aDbgParam);
+#else
+    void PreProcessedFn();
+#endif
+    
+    static void StaticOutputsParamsL(TInt aParam);  
+    
+    // duplicate all the function and put the impl in the header file HelloTraceFnDup.h
+    void SimpleDup();
+    void OutputsParamsDup(TInt aParam, TFnEnum aEnumParam);
+    void OutputsSignedIntegersDup(TInt8 aParam8,   TInt16 aParam16, 
+                               TInt32 aParam32, TInt64 aParam64);
+    void OutputsUnsignedIntegersDup(TUint8 aParam8,   TUint16 aParam16, 
+                                 TUint32 aParam32, TUint64 aParam64);
+     
+    TInt OutputsTIntReturnValueDup();
+    TInt64 OutputsTInt64ReturnValueDup();
+    TFnEnum OutputsTFnEnumReturnValueDup();
+
+    CActive* OutputsUnknownPtrTypeDup(CActive* aActive);
+    CActive& OutputsUnknownRefTypeDup(CActive& aActive);
+    
+    void OutputMissingParamsDup(TInt aUsedParam, TInt aCommentParam, TInt aMissingParam);
+
+#ifdef _DEBUG    
+    void PreProcessedFnDup(TInt aDbgParam);
+#else
+    void PreProcessedFnDup();
+#endif
+    static void StaticOutputsParamsDupL(TInt aParam);  
+    
+    // duplicate all the function again and put the impl in the header file HelloTraceFnDup2.h
+    void SimpleDup2();
+    void OutputsParamsDup2(TInt aParam, TFnEnum aEnumParam);
+    void OutputsSignedIntegersDup2(TInt8 aParam8,   TInt16 aParam16, 
+                               TInt32 aParam32, TInt64 aParam64);
+    void OutputsUnsignedIntegersDup2(TUint8 aParam8,   TUint16 aParam16, 
+                                 TUint32 aParam32, TUint64 aParam64);
+     
+    TInt OutputsTIntReturnValueDup2();
+    TInt64 OutputsTInt64ReturnValueDup2();
+    TFnEnum OutputsTFnEnumReturnValueDup2();
+
+    CActive* OutputsUnknownPtrTypeDup2(CActive* aActive);
+    CActive& OutputsUnknownRefTypeDup2(CActive& aActive);
+    
+    void OutputMissingParamsDup2(TInt aUsedParam, TInt aCommentParam, TInt aMissingParam);
+
+#ifdef _DEBUG    
+    void PreProcessedFnDup2(TInt aDbgParam);
+#else
+    void PreProcessedFnDup2();
+#endif
+    static void StaticOutputsParamsDup2L(TInt aParam);  
+
+
+private:
+    CHelloTraceFn();
+    };
+
+#endif /* HELLOTRACEFN_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/inc/HelloTraceFn2.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,122 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef HELLOTRACEFN2_H_
+#define HELLOTRACEFN2_H_
+
+#include <e32base.h>    // CBase
+
+class CHelloTraceFn : public CBase
+    {
+public:
+    
+    // Note the Trace Builder will only parse this if it's in a cpp file
+    // but not from here :(
+    // Also if you add a new enum you need to reparse the enum - it doesn't
+    // get automatically reparsed by the Trace Compiler :(
+    enum TFnEnum
+        {
+        EExample1,
+        EExample2 = 2, 
+        // EExample3 = EExample2 + 1, // The Trace Builder can't parse this :(
+        };
+    
+public:
+    static CHelloTraceFn* NewL();
+    static CHelloTraceFn* NewLC();
+    ~CHelloTraceFn();
+   
+public: // Fn entry / exit tracing examples 
+    void Simple();
+    void OutputsParams(TInt aParam, TFnEnum aEnumParam);
+    void OutputsSignedIntegers(TInt8 aParam8,   TInt16 aParam16, 
+                               TInt32 aParam32, TInt64 aParam64);
+    void OutputsUnsignedIntegers(TUint8 aParam8,   TUint16 aParam16, 
+                                 TUint32 aParam32, TUint64 aParam64);
+     
+    TInt OutputsTIntReturnValue();
+    TInt64 OutputsTInt64ReturnValue();
+    TFnEnum OutputsTFnEnumReturnValue();
+
+    CActive* OutputsUnknownPtrType(CActive* aActive);
+    CActive& OutputsUnknownRefType(CActive& aActive);
+    
+    void OutputMissingParams(TInt aUsedParam, TInt aCommentParam, TInt aMissingParam);
+
+#ifdef _DEBUG    
+    void PreProcessedFn(TInt aDbgParam);
+#else
+    void PreProcessedFn();
+#endif
+    
+    static void StaticOutputsParamsL(TInt aParam);  
+    
+    // duplicate all the function and put the impl in the header file HelloTraceFnDup.h
+    void SimpleDup();
+    void OutputsParamsDup(TInt aParam, TFnEnum aEnumParam);
+    void OutputsSignedIntegersDup(TInt8 aParam8,   TInt16 aParam16, 
+                               TInt32 aParam32, TInt64 aParam64);
+    void OutputsUnsignedIntegersDup(TUint8 aParam8,   TUint16 aParam16, 
+                                 TUint32 aParam32, TUint64 aParam64);
+     
+    TInt OutputsTIntReturnValueDup();
+    TInt64 OutputsTInt64ReturnValueDup();
+    TFnEnum OutputsTFnEnumReturnValueDup();
+
+    CActive* OutputsUnknownPtrTypeDup(CActive* aActive);
+    CActive& OutputsUnknownRefTypeDup(CActive& aActive);
+    
+    void OutputMissingParamsDup(TInt aUsedParam, TInt aCommentParam, TInt aMissingParam);
+
+#ifdef _DEBUG    
+    void PreProcessedFnDup(TInt aDbgParam);
+#else
+    void PreProcessedFnDup();
+#endif
+    static void StaticOutputsParamsDupL(TInt aParam);  
+    
+    // duplicate all the function again and put the impl in the header file HelloTraceFnDup2.h
+    void SimpleDup2();
+    void OutputsParamsDup2(TInt aParam, TFnEnum aEnumParam);
+    void OutputsSignedIntegersDup2(TInt8 aParam8,   TInt16 aParam16, 
+                               TInt32 aParam32, TInt64 aParam64);
+    void OutputsUnsignedIntegersDup2(TUint8 aParam8,   TUint16 aParam16, 
+                                 TUint32 aParam32, TUint64 aParam64);
+     
+    TInt OutputsTIntReturnValueDup2();
+    TInt64 OutputsTInt64ReturnValueDup2();
+    TFnEnum OutputsTFnEnumReturnValueDup2();
+
+    CActive* OutputsUnknownPtrTypeDup2(CActive* aActive);
+    CActive& OutputsUnknownRefTypeDup2(CActive& aActive);
+    
+    void OutputMissingParamsDup2(TInt aUsedParam, TInt aCommentParam, TInt aMissingParam);
+
+#ifdef _DEBUG    
+    void PreProcessedFnDup2(TInt aDbgParam);
+#else
+    void PreProcessedFnDup2();
+#endif
+    static void StaticOutputsParamsDup2L(TInt aParam);  
+
+
+private:
+    CHelloTraceFn();
+    };
+
+#endif /* HELLOTRACEFN2_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/inc/HelloTraceInterface.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,63 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef __HELLOTRACEINTERFACE_H__
+#define __HELLOTRACEINTERFACE_H__
+
+#include <e32base.h>	// CBase
+#include <e32std.h>	 // TBuf
+
+const TInt KHelloTraceDllBufferLength = 10;
+typedef TBuf<KHelloTraceDllBufferLength> THelloTraceDllExampleString;
+
+class CHelloTraceInterface : public CBase
+    {
+public:
+    IMPORT_C static CHelloTraceInterface* NewL();
+    IMPORT_C static CHelloTraceInterface* NewLC();
+    IMPORT_C ~CHelloTraceInterface();
+
+public:
+    IMPORT_C static TVersion Version();
+    IMPORT_C const TPtrC String() const;
+    IMPORT_C void AddCharL(const TChar& aChar);
+    IMPORT_C void RemoveLast();
+    IMPORT_C void ResetString();
+    
+    IMPORT_C static TVersion VersionDup();
+    IMPORT_C const TPtrC StringDup() const;
+    IMPORT_C void AddCharDupL(const TChar& aChar);
+    IMPORT_C void RemoveLastDup();
+    IMPORT_C void ResetStringDup();
+
+    IMPORT_C static TVersion VersionDup2();
+    IMPORT_C const TPtrC StringDup2() const;
+    IMPORT_C void AddCharDup2L(const TChar& aChar);
+    IMPORT_C void RemoveLastDup2();
+    IMPORT_C void ResetStringDup2();
+private:
+    CHelloTraceInterface();
+    void ConstructL();
+
+private:
+    // data
+    THelloTraceDllExampleString* iString;
+    };
+
+#endif  // __HELLOTRACEINTERFACE_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/inc/HelloTraceInterface2.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,63 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef __HELLOTRACEINTERFACE2_H__
+#define __HELLOTRACEINTERFACE2_H__
+
+#include <e32base.h>	// CBase
+#include <e32std.h>	 // TBuf
+
+const TInt KHelloTraceDllBufferLength = 10;
+typedef TBuf<KHelloTraceDllBufferLength> THelloTraceDllExampleString;
+
+class CHelloTraceInterface : public CBase
+    {
+public:
+    IMPORT_C static CHelloTraceInterface* NewL();
+    IMPORT_C static CHelloTraceInterface* NewLC();
+    IMPORT_C ~CHelloTraceInterface();
+
+public:
+    IMPORT_C static TVersion Version();
+    IMPORT_C const TPtrC String() const;
+    IMPORT_C void AddCharL(const TChar& aChar);
+    IMPORT_C void RemoveLast();
+    IMPORT_C void ResetString();
+    
+    IMPORT_C static TVersion VersionDup();
+    IMPORT_C const TPtrC StringDup() const;
+    IMPORT_C void AddCharDupL(const TChar& aChar);
+    IMPORT_C void RemoveLastDup();
+    IMPORT_C void ResetStringDup();
+
+    IMPORT_C static TVersion VersionDup2();
+    IMPORT_C const TPtrC StringDup2() const;
+    IMPORT_C void AddCharDup2L(const TChar& aChar);
+    IMPORT_C void RemoveLastDup2();
+    IMPORT_C void ResetStringDup2();
+private:
+    CHelloTraceInterface();
+    void ConstructL();
+
+private:
+    // data
+    THelloTraceDllExampleString* iString;
+    };
+
+#endif  // __HELLOTRACEINTERFACE2_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/inc/HelloTracePanic.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,35 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef __HELLOTRACEDLL_PAN__
+#define __HELLOTRACEDLL_PAN__
+
+//  Data Types
+
+enum THelloTraceDllPanic
+    {
+    EHelloTraceDllExamplePanic,
+    EHelloTraceDllNullPointer,
+    };
+
+//  Function Prototypes
+
+GLREF_C void Panic(THelloTraceDllPanic aPanic);
+
+#endif  // __HELLOTRACEDLL_PAN__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/inc/HelloTraceTypes.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,39 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef __HELLOTRACETYPES_H__
+#define __HELLOTRACETYPES_H__
+
+class HelloTraceTypes
+    {
+public:
+    static void SignedIntegers();
+    static void UnsignedIntegers();
+    static void Descriptors();
+    
+    static void SignedIntegersDup();
+    static void UnsignedIntegersDup();
+    static void DescriptorsDup();
+        
+    static void SignedIntegersDup2();
+    static void UnsignedIntegersDup2();
+    static void DescriptorsDup2();
+    };
+
+#endif  // __HELLOTRACETYPES_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/inc/HelloTraceTypes2.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,39 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef __HELLOTRACETYPES2_H__
+#define __HELLOTRACETYPES2_H__
+
+class HelloTraceTypes
+    {
+public:
+    static void SignedIntegers();
+    static void UnsignedIntegers();
+    static void Descriptors();
+    
+    static void SignedIntegersDup();
+    static void UnsignedIntegersDup();
+    static void DescriptorsDup();
+        
+    static void SignedIntegersDup2();
+    static void UnsignedIntegersDup2();
+    static void DescriptorsDup2();
+    };
+
+#endif  // __HELLOTRACETYPES2_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/incDup/HelloTraceFn2Dup.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,156 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+#ifndef HELLOTRACEFNDUP2_H_
+#define HELLOTRACEFNDUP2_H_
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTraceFn2DupTraces.h"
+#endif
+
+inline void CHelloTraceFn::SimpleDup()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_SIMPLE2_DUP_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_SIMPLE2_DUP_EXIT, this );
+    }
+
+inline void CHelloTraceFn::OutputsParamsDup(TInt aParam, TFnEnum aEnumParam)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSPARAMS2_DUP_ENTRY, this );
+    Simple();
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSPARAMS2_DUP_EXIT, this );
+    }
+
+inline void CHelloTraceFn::StaticOutputsParamsDupL(TInt aParam)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_STATICOUTPUTSPARAMS2_DUP_ENTRY, NULL );
+    CHelloTraceFn* example = CHelloTraceFn::NewLC();
+    example->SimpleDup();    
+    CleanupStack::PopAndDestroy(example);
+    OstTraceFunctionExit0( CHELLOTRACEFN_STATICOUTPUTSPARAMS2_DUP_EXIT );    
+    }
+
+inline void CHelloTraceFn::OutputsSignedIntegersDup(TInt8 aParam8,   TInt16 aParam16, 
+                                          TInt32 aParam32, TInt64 aParam64)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS2_DUP_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS2_DUP_EXIT, this );
+    }
+
+void CHelloTraceFn::OutputsUnsignedIntegersDup(TUint8 aParam8,   TUint16 aParam16, 
+                                            TUint32 aParam32, TUint64 aParam64)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS2_DUP_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS2_DUP_EXIT, this );
+    }
+
+
+inline TInt CHelloTraceFn::OutputsTIntReturnValueDup()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE2_DUP_ENTRY, this );
+    TInt ret = KErrNone;
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE2_DUP_EXIT, this, ret );
+    return ret;
+    }
+
+inline TInt64 CHelloTraceFn::OutputsTInt64ReturnValueDup()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE2_DUP_ENTRY, this );
+    TInt64 ret = (TInt64) 2 << 40;
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE2_DUP_EXIT, this, ret );
+    return ret;
+    }
+
+inline CHelloTraceFn::TFnEnum CHelloTraceFn::OutputsTFnEnumReturnValueDup()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE2_DUP_ENTRY, this );
+    TFnEnum ret = EExample1;
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE2_DUP_EXIT, this, ret );
+    return ret;    
+    }
+
+inline CActive* CHelloTraceFn::OutputsUnknownPtrTypeDup(CActive* aActive)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE2_DUP_ENTRY, this );    
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE2_DUP_EXIT, this, (TUint) aActive );
+    return aActive;
+    }
+
+inline CActive& CHelloTraceFn::OutputsUnknownRefTypeDup(CActive& aActive)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE2_DUP_ENTRY, this );
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE2_DUP_EXIT, this, (TUint) &aActive );    
+    return aActive;
+    }
+
+// The following doesn't compile as the Trace Compiler doesn't generate
+// the correct OstTraceGenExt(...) function for it
+//void CHelloTraceFn::OutputMissingParamsBug(TInt /*aCommentParam*/, TInt)
+//    {
+//    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_ENTRY, this );
+//    // ...
+//    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_EXIT, this );    
+//    }
+
+// The following compiles and works but outputs the following warning
+// warning: HelloTraceFn.cpp, line xxx: Parameter did not have a name and was not added to trace
+// The fact that this cannot be suppressed is a known problem we're working on.
+inline void CHelloTraceFn::OutputMissingParamsDup(TInt aUsedParam, TInt /*aCommentParam*/, TInt)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMS2_DUP_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMS2_DUP_EXIT, this );
+    }
+
+// The following doesn't work as the Trace Compiler outputs:
+// error: HelloTraceFn.cpp, line xxx: Class / function name for trace could not be determined x3
+//#ifdef _DEBUG
+//void CHelloTraceFn::PreProcessedFn(TInt aDbgParam)
+//    {
+//    OstTraceFunctionEntryExt( PRE_PROCESSED_ENTRTY_1, this );
+//#else
+//void CHelloTraceFn::PreProcessedFn()
+//    {
+//    OstTraceFunctionEntry1( PRE_PROCESSED_ENTRTY_2, this );
+//#endif
+//    Simple();
+//    OstTraceFunctionExit1( CHELLOTRACEFN_PREPROCESSEDFN_EXIT, this );
+//    }
+
+// Workaround example code until a proper fix is provided
+#ifdef _DEBUG
+inline void CHelloTraceFn::PreProcessedFnDup(TInt aDbgParam)
+    {
+    OstTraceExt2( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN2_DUP_ENTRY_1, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;aDbgParam=%d;this=%x", (TInt) aDbgParam, (TUint) this);
+#else
+    inline void CHelloTraceFn::PreProcessedFnDup()
+    {
+    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN2_DUP_ENTRY_2, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
+#endif
+    SimpleDup();
+    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN2_DUP_EXIT, "CHelloTraceFn::PreProcessedFn: < CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
+    }
+
+#endif /* HELLOTRACEFN2DUP_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/incDup/HelloTraceFn2Dup2.inl	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,157 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef HELLOTRACEFN2DUP2_H_
+#define HELLOTRACEFN2DUP2_H_
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTraceFn2Dup2Traces.h"
+#endif
+
+inline void CHelloTraceFn::SimpleDup2()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_SIMPLE2_DUP2_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_SIMPLE2_DUP2_EXIT, this );
+    }
+
+inline void CHelloTraceFn::OutputsParamsDup2(TInt aParam, TFnEnum aEnumParam)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSPARAMS2_DUP2_ENTRY, this );
+    Simple();
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSPARAMS2_DUP2_EXIT, this );
+    }
+
+inline void CHelloTraceFn::StaticOutputsParamsDup2L(TInt aParam)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_STATICOUTPUTSPARAMS2_DUP2_ENTRY, NULL );
+    CHelloTraceFn* example = CHelloTraceFn::NewLC();
+    example->SimpleDup2();    
+    CleanupStack::PopAndDestroy(example);
+    OstTraceFunctionExit0( CHELLOTRACEFN_STATICOUTPUTSPARAMS2_DUP2_EXIT );    
+    }
+
+inline void CHelloTraceFn::OutputsSignedIntegersDup2(TInt8 aParam8,   TInt16 aParam16, 
+                                          TInt32 aParam32, TInt64 aParam64)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS2_DUP2_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS2_DUP2_EXIT, this );
+    }
+
+inline void CHelloTraceFn::OutputsUnsignedIntegersDup2(TUint8 aParam8,   TUint16 aParam16, 
+                                            TUint32 aParam32, TUint64 aParam64)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS2_DUP2_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS2_DUP2_EXIT, this );
+    }
+
+
+inline TInt CHelloTraceFn::OutputsTIntReturnValueDup2()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE2_DUP2_ENTRY, this );
+    TInt ret = KErrNone;
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE2_DUP2_EXIT, this, ret );
+    return ret;
+    }
+
+inline TInt64 CHelloTraceFn::OutputsTInt64ReturnValueDup2()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE2_DUP2_ENTRY, this );
+    TInt64 ret = (TInt64) 2 << 40;
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE2_DUP2_EXIT, this, ret );
+    return ret;
+    }
+
+inline CHelloTraceFn::TFnEnum CHelloTraceFn::OutputsTFnEnumReturnValueDup2()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE2_DUP2_ENTRY, this );
+    TFnEnum ret = EExample1;
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE2_DUP2_EXIT, this, ret );
+    return ret;    
+    }
+
+inline CActive* CHelloTraceFn::OutputsUnknownPtrTypeDup2(CActive* aActive)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE2_DUP2_ENTRY, this );    
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE2_DUP2_EXIT, this, (TUint) aActive );
+    return aActive;
+    }
+
+inline CActive& CHelloTraceFn::OutputsUnknownRefTypeDup2(CActive& aActive)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE2_DUP2_ENTRY, this );
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE2_DUP2_EXIT, this, (TUint) &aActive );    
+    return aActive;
+    }
+
+// The following doesn't compile as the Trace Compiler doesn't generate
+// the correct OstTraceGenExt(...) function for it
+//void CHelloTraceFn::OutputMissingParamsBug(TInt /*aCommentParam*/, TInt)
+//    {
+//    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_ENTRY, this );
+//    // ...
+//    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_EXIT, this );    
+//    }
+
+// The following compiles and works but outputs the following warning
+// warning: HelloTraceFn.cpp, line xxx: Parameter did not have a name and was not added to trace
+// The fact that this cannot be suppressed is a known problem we're working on.
+inline void CHelloTraceFn::OutputMissingParamsDup2(TInt aUsedParam, TInt /*aCommentParam*/, TInt)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMS2_DUP2_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMS2_DUP2_EXIT, this );
+    }
+
+// The following doesn't work as the Trace Compiler outputs:
+// error: HelloTraceFn.cpp, line xxx: Class / function name for trace could not be determined x3
+//#ifdef _DEBUG
+//void CHelloTraceFn::PreProcessedFn(TInt aDbgParam)
+//    {
+//    OstTraceFunctionEntryExt( PRE_PROCESSED_ENTRTY_1, this );
+//#else
+//void CHelloTraceFn::PreProcessedFn()
+//    {
+//    OstTraceFunctionEntry1( PRE_PROCESSED_ENTRTY_2, this );
+//#endif
+//    Simple();
+//    OstTraceFunctionExit1( CHELLOTRACEFN_PREPROCESSEDFN_EXIT, this );
+//    }
+
+// Workaround example code until a proper fix is provided
+#ifdef _DEBUG
+inline void CHelloTraceFn::PreProcessedFnDup2(TInt aDbgParam)
+    {
+    OstTraceExt2( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN2_DUP2_ENTRY_1, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;aDbgParam=%d;this=%x", (TInt) aDbgParam, (TUint) this);
+#else
+    inline void CHelloTraceFn::PreProcessedFnDup2()
+    {
+    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN2_DUP2_ENTRY_2, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
+#endif
+    SimpleDup2();
+    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN2_DUP2_EXIT, "CHelloTraceFn::PreProcessedFn: < CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
+    }
+
+#endif /* HELLOTRACEFN2DUP2_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/incDup/HelloTraceFnDup.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,157 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef HELLOTRACEFNDUP_H_
+#define HELLOTRACEFNDUP_H_
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTraceFnDupTraces.h"
+#endif
+
+inline void CHelloTraceFn::SimpleDup()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_SIMPLE_DUP_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_SIMPLE_DUP_EXIT, this );
+    }
+
+inline void CHelloTraceFn::OutputsParamsDup(TInt aParam, TFnEnum aEnumParam)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSPARAMS_DUP_ENTRY, this );
+    Simple();
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSPARAMS_DUP_EXIT, this );
+    }
+
+inline void CHelloTraceFn::StaticOutputsParamsDupL(TInt aParam)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_STATICOUTPUTSPARAMS_DUP_ENTRY, NULL );
+    CHelloTraceFn* example = CHelloTraceFn::NewLC();
+    example->SimpleDup();    
+    CleanupStack::PopAndDestroy(example);
+    OstTraceFunctionExit0( CHELLOTRACEFN_STATICOUTPUTSPARAMS_DUP_EXIT );    
+    }
+
+inline void CHelloTraceFn::OutputsSignedIntegersDup(TInt8 aParam8,   TInt16 aParam16, 
+                                          TInt32 aParam32, TInt64 aParam64)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS_DUP_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS_DUP_EXIT, this );
+    }
+
+void CHelloTraceFn::OutputsUnsignedIntegersDup(TUint8 aParam8,   TUint16 aParam16, 
+                                            TUint32 aParam32, TUint64 aParam64)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS_DUP_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS_DUP_EXIT, this );
+    }
+
+
+inline TInt CHelloTraceFn::OutputsTIntReturnValueDup()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_DUP_ENTRY, this );
+    TInt ret = KErrNone;
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_DUP_EXIT, this, ret );
+    return ret;
+    }
+
+inline TInt64 CHelloTraceFn::OutputsTInt64ReturnValueDup()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE_DUP_ENTRY, this );
+    TInt64 ret = (TInt64) 2 << 40;
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE_DUP_EXIT, this, ret );
+    return ret;
+    }
+
+inline CHelloTraceFn::TFnEnum CHelloTraceFn::OutputsTFnEnumReturnValueDup()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE_DUP_ENTRY, this );
+    TFnEnum ret = EExample1;
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE_DUP_EXIT, this, ret );
+    return ret;    
+    }
+
+inline CActive* CHelloTraceFn::OutputsUnknownPtrTypeDup(CActive* aActive)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_DUP_ENTRY, this );    
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_DUP_EXIT, this, (TUint) aActive );
+    return aActive;
+    }
+
+inline CActive& CHelloTraceFn::OutputsUnknownRefTypeDup(CActive& aActive)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE_DUP_ENTRY, this );
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE_DUP_EXIT, this, (TUint) &aActive );    
+    return aActive;
+    }
+
+// The following doesn't compile as the Trace Compiler doesn't generate
+// the correct OstTraceGenExt(...) function for it
+//void CHelloTraceFn::OutputMissingParamsBug(TInt /*aCommentParam*/, TInt)
+//    {
+//    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_ENTRY, this );
+//    // ...
+//    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_EXIT, this );    
+//    }
+
+// The following compiles and works but outputs the following warning
+// warning: HelloTraceFn.cpp, line xxx: Parameter did not have a name and was not added to trace
+// The fact that this cannot be suppressed is a known problem we're working on.
+inline void CHelloTraceFn::OutputMissingParamsDup(TInt aUsedParam, TInt /*aCommentParam*/, TInt)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMS_DUP_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMS_DUP_EXIT, this );
+    }
+
+// The following doesn't work as the Trace Compiler outputs:
+// error: HelloTraceFn.cpp, line xxx: Class / function name for trace could not be determined x3
+//#ifdef _DEBUG
+//void CHelloTraceFn::PreProcessedFn(TInt aDbgParam)
+//    {
+//    OstTraceFunctionEntryExt( PRE_PROCESSED_ENTRTY_1, this );
+//#else
+//void CHelloTraceFn::PreProcessedFn()
+//    {
+//    OstTraceFunctionEntry1( PRE_PROCESSED_ENTRTY_2, this );
+//#endif
+//    Simple();
+//    OstTraceFunctionExit1( CHELLOTRACEFN_PREPROCESSEDFN_EXIT, this );
+//    }
+
+// Workaround example code until a proper fix is provided
+#ifdef _DEBUG
+inline void CHelloTraceFn::PreProcessedFnDup(TInt aDbgParam)
+    {
+    OstTraceExt2( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_DUP_ENTRY_1, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;aDbgParam=%d;this=%x", (TInt) aDbgParam, (TUint) this);
+#else
+    inline void CHelloTraceFn::PreProcessedFnDup()
+    {
+    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_DUP_ENTRY_2, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
+#endif
+    SimpleDup();
+    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_DUP_EXIT, "CHelloTraceFn::PreProcessedFn: < CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
+    }
+
+#endif /* HELLOTRACEFNDUP_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/incDup/HelloTraceFnDup2.inl	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,157 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef HELLOTRACEFNDUP2_H_
+#define HELLOTRACEFNDUP2_H_
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTraceFnDup2Traces.h"
+#endif
+
+inline void CHelloTraceFn::SimpleDup2()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_SIMPLE_DUP2_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_SIMPLE_DUP2_EXIT, this );
+    }
+
+inline void CHelloTraceFn::OutputsParamsDup2(TInt aParam, TFnEnum aEnumParam)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSPARAMS_DUP2_ENTRY, this );
+    Simple();
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSPARAMS_DUP2_EXIT, this );
+    }
+
+inline void CHelloTraceFn::StaticOutputsParamsDup2L(TInt aParam)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_STATICOUTPUTSPARAMS_DUP2_ENTRY, NULL );
+    CHelloTraceFn* example = CHelloTraceFn::NewLC();
+    example->SimpleDup2();    
+    CleanupStack::PopAndDestroy(example);
+    OstTraceFunctionExit0( CHELLOTRACEFN_STATICOUTPUTSPARAMS_DUP2_EXIT );    
+    }
+
+inline void CHelloTraceFn::OutputsSignedIntegersDup2(TInt8 aParam8,   TInt16 aParam16, 
+                                          TInt32 aParam32, TInt64 aParam64)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS_DUP2_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS_DUP2_EXIT, this );
+    }
+
+inline void CHelloTraceFn::OutputsUnsignedIntegersDup2(TUint8 aParam8,   TUint16 aParam16, 
+                                            TUint32 aParam32, TUint64 aParam64)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS_DUP2_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS_DUP2_EXIT, this );
+    }
+
+
+inline TInt CHelloTraceFn::OutputsTIntReturnValueDup2()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_DUP2_ENTRY, this );
+    TInt ret = KErrNone;
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_DUP2_EXIT, this, ret );
+    return ret;
+    }
+
+inline TInt64 CHelloTraceFn::OutputsTInt64ReturnValueDup2()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE_DUP2_ENTRY, this );
+    TInt64 ret = (TInt64) 2 << 40;
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE_DUP2_EXIT, this, ret );
+    return ret;
+    }
+
+inline CHelloTraceFn::TFnEnum CHelloTraceFn::OutputsTFnEnumReturnValueDup2()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE_DUP2_ENTRY, this );
+    TFnEnum ret = EExample1;
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE_DUP2_EXIT, this, ret );
+    return ret;    
+    }
+
+inline CActive* CHelloTraceFn::OutputsUnknownPtrTypeDup2(CActive* aActive)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_DUP2_ENTRY, this );    
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_DUP2_EXIT, this, (TUint) aActive );
+    return aActive;
+    }
+
+inline CActive& CHelloTraceFn::OutputsUnknownRefTypeDup2(CActive& aActive)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE_DUP2_ENTRY, this );
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE_DUP2_EXIT, this, (TUint) &aActive );    
+    return aActive;
+    }
+
+// The following doesn't compile as the Trace Compiler doesn't generate
+// the correct OstTraceGenExt(...) function for it
+//void CHelloTraceFn::OutputMissingParamsBug(TInt /*aCommentParam*/, TInt)
+//    {
+//    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_ENTRY, this );
+//    // ...
+//    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_EXIT, this );    
+//    }
+
+// The following compiles and works but outputs the following warning
+// warning: HelloTraceFn.cpp, line xxx: Parameter did not have a name and was not added to trace
+// The fact that this cannot be suppressed is a known problem we're working on.
+inline void CHelloTraceFn::OutputMissingParamsDup2(TInt aUsedParam, TInt /*aCommentParam*/, TInt)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMS_DUP2_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMS_DUP2_EXIT, this );
+    }
+
+// The following doesn't work as the Trace Compiler outputs:
+// error: HelloTraceFn.cpp, line xxx: Class / function name for trace could not be determined x3
+//#ifdef _DEBUG
+//void CHelloTraceFn::PreProcessedFn(TInt aDbgParam)
+//    {
+//    OstTraceFunctionEntryExt( PRE_PROCESSED_ENTRTY_1, this );
+//#else
+//void CHelloTraceFn::PreProcessedFn()
+//    {
+//    OstTraceFunctionEntry1( PRE_PROCESSED_ENTRTY_2, this );
+//#endif
+//    Simple();
+//    OstTraceFunctionExit1( CHELLOTRACEFN_PREPROCESSEDFN_EXIT, this );
+//    }
+
+// Workaround example code until a proper fix is provided
+#ifdef _DEBUG
+inline void CHelloTraceFn::PreProcessedFnDup2(TInt aDbgParam)
+    {
+    OstTraceExt2( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_DUP2_ENTRY_1, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;aDbgParam=%d;this=%x", (TInt) aDbgParam, (TUint) this);
+#else
+    inline void CHelloTraceFn::PreProcessedFnDup2()
+    {
+    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_DUP2_ENTRY_2, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
+#endif
+    SimpleDup2();
+    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_DUP2_EXIT, "CHelloTraceFn::PreProcessedFn: < CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
+    }
+
+#endif /* HELLOTRACEFNDUP2_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/incDup/HelloTraceInterface2Dup.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,91 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef __HELLOTRACEINTERFACE2DUP_H__
+#define __HELLOTRACEINTERFACE2DUP_H__
+
+#include "HelloTracePanic.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTraceInterface2DupTraces.h"
+#endif
+
+ inline EXPORT_C TVersion CHelloTraceInterface::VersionDup()
+        {
+        const TInt KMajor = 1;
+        const TInt KMinor = 0;
+        const TInt KBuild = 1;
+        TVersion version = TVersion(KMajor, KMinor, KBuild);
+        OstTraceExt1( TRACE_BORDER, CHELLOTRACEDLL_VERSION2_DUP, "CHelloTraceInterface::Version = %S", version.Name());   
+        return version;
+        }
+
+ inline EXPORT_C const TPtrC CHelloTraceInterface::StringDup() const
+        {
+        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
+
+        OstTraceDefExt2( OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CHELLOTRACEDLL_STRING2_DUP, 
+                         "[0x%08x] Returned %S", (TUint32) this, *iString);   
+        return *iString;
+        }
+
+ inline EXPORT_C void CHelloTraceInterface::AddCharDupL(const TChar& aChar)
+        {
+        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
+
+        OstTraceExt3( TRACE_BORDER, CHELLOTRACEDLL_ADDCHARL2_DUP, 
+                      "[0x%08x] Adding %d to %S", (TUint32) this, (TInt32) aChar, *iString);   
+        if (iString->Length() >= KHelloTraceDllBufferLength)
+            {
+            OstTrace1( TRACE_ERROR, CHELLOTRACEDLL_ADDCHARL_ERR2_DUP,
+                       "[0x%08x] Not enough space to add character", (TUint32) this);
+            User::Leave( KErrTooBig);
+            }
+        iString->Append(aChar);
+        }
+
+ inline EXPORT_C void CHelloTraceInterface::RemoveLastDup()
+        {
+        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
+
+        OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_REMOVELAST2_DUP, 
+                      "[0x%08x] Attempting to remove last character from %S", (TUint32) this, *iString);
+        if (iString->Length() > 0)
+            {
+            iString->SetLength(iString->Length() - 1);
+            }
+        else
+            {
+            OstTrace1( TRACE_WARNING, CHELLOTRACEDLL_REMOVELAST_WARN2_DUP, "[0x%08x] String already empty", (TUint32) this);   
+            }
+        }
+
+ inline EXPORT_C void CHelloTraceInterface::ResetStringDup()
+        {
+        OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_RESETSTRING2_DUP, "[0x%08x] Reseting string %S", (TUint32) this, *iString);
+        if (iString == NULL)
+            {
+            iString = new (ELeave) THelloTraceDllExampleString;
+            }
+        else
+            {
+            iString->SetLength(0);
+            }
+        }
+#endif  // __HELLOTRACEINTERFACE2DUP_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/incDup/HelloTraceInterface2Dup2.inl	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,91 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef __HELLOTRACEINTERFACE2DUP2_H__
+#define __HELLOTRACEINTERFACE2DUP2_H__
+
+#include "HelloTracePanic.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTraceInterface2Dup2Traces.h"
+#endif
+
+ inline EXPORT_C TVersion CHelloTraceInterface::VersionDup2()
+        {
+        const TInt KMajor = 1;
+        const TInt KMinor = 0;
+        const TInt KBuild = 1;
+        TVersion version = TVersion(KMajor, KMinor, KBuild);
+        OstTraceExt1( TRACE_BORDER, CHELLOTRACEDLL_VERSION2_DUP2, "CHelloTraceInterface::Version = %S", version.Name());   
+        return version;
+        }
+
+ inline EXPORT_C const TPtrC CHelloTraceInterface::StringDup2() const
+        {
+        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
+
+        OstTraceDefExt2( OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CHELLOTRACEDLL_STRING2_DUP2, 
+                         "[0x%08x] Returned %S", (TUint32) this, *iString);   
+        return *iString;
+        }
+
+ inline EXPORT_C void CHelloTraceInterface::AddCharDup2L(const TChar& aChar)
+        {
+        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
+
+        OstTraceExt3( TRACE_BORDER, CHELLOTRACEDLL_ADDCHARL2_DUP2, 
+                      "[0x%08x] Adding %d to %S", (TUint32) this, (TInt32) aChar, *iString);   
+        if (iString->Length() >= KHelloTraceDllBufferLength)
+            {
+            OstTrace1( TRACE_ERROR, CHELLOTRACEDLL_ADDCHARL_ERR2_DUP2,
+                       "[0x%08x] Not enough space to add character", (TUint32) this);
+            User::Leave( KErrTooBig);
+            }
+        iString->Append(aChar);
+        }
+
+ inline EXPORT_C void CHelloTraceInterface::RemoveLastDup2()
+        {
+        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
+
+        OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_REMOVELAST2_DUP2, 
+                      "[0x%08x] Attempting to remove last character from %S", (TUint32) this, *iString);
+        if (iString->Length() > 0)
+            {
+            iString->SetLength(iString->Length() - 1);
+            }
+        else
+            {
+            OstTrace1( TRACE_WARNING, CHELLOTRACEDLL_REMOVELAST_WARN2_DUP2, "[0x%08x] String already empty", (TUint32) this);   
+            }
+        }
+
+ inline EXPORT_C void CHelloTraceInterface::ResetStringDup2()
+        {
+        OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_RESETSTRING2_DUP2, "[0x%08x] Reseting string %S", (TUint32) this, *iString);
+        if (iString == NULL)
+            {
+            iString = new (ELeave) THelloTraceDllExampleString;
+            }
+        else
+            {
+            iString->SetLength(0);
+            }
+        }
+#endif  // __HELLOTRACEINTERFACE2DUP2_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/incDup/HelloTraceInterfaceDup.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,91 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef __HELLOTRACEINTERFACEDUP_H__
+#define __HELLOTRACEINTERFACEDUP_H__
+
+#include "HelloTracePanic.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTraceInterfaceDupTraces.h"
+#endif
+
+ inline EXPORT_C TVersion CHelloTraceInterface::VersionDup()
+        {
+        const TInt KMajor = 1;
+        const TInt KMinor = 0;
+        const TInt KBuild = 1;
+        TVersion version = TVersion(KMajor, KMinor, KBuild);
+        OstTraceExt1( TRACE_BORDER, CHELLOTRACEDLL_VERSION_DUP, "CHelloTraceInterface::Version = %S", version.Name());   
+        return version;
+        }
+
+ inline EXPORT_C const TPtrC CHelloTraceInterface::StringDup() const
+        {
+        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
+
+        OstTraceDefExt2( OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CHELLOTRACEDLL_STRING_DUP, 
+                         "[0x%08x] Returned %S", (TUint32) this, *iString);   
+        return *iString;
+        }
+
+ inline EXPORT_C void CHelloTraceInterface::AddCharDupL(const TChar& aChar)
+        {
+        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
+
+        OstTraceExt3( TRACE_BORDER, CHELLOTRACEDLL_ADDCHARL_DUP, 
+                      "[0x%08x] Adding %d to %S", (TUint32) this, (TInt32) aChar, *iString);   
+        if (iString->Length() >= KHelloTraceDllBufferLength)
+            {
+            OstTrace1( TRACE_ERROR, CHELLOTRACEDLL_ADDCHARL_ERR_DUP,
+                       "[0x%08x] Not enough space to add character", (TUint32) this);
+            User::Leave( KErrTooBig);
+            }
+        iString->Append(aChar);
+        }
+
+ inline EXPORT_C void CHelloTraceInterface::RemoveLastDup()
+        {
+        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
+
+        OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_REMOVELAST_DUP, 
+                      "[0x%08x] Attempting to remove last character from %S", (TUint32) this, *iString);
+        if (iString->Length() > 0)
+            {
+            iString->SetLength(iString->Length() - 1);
+            }
+        else
+            {
+            OstTrace1( TRACE_WARNING, CHELLOTRACEDLL_REMOVELAST_WARN_DUP, "[0x%08x] String already empty", (TUint32) this);   
+            }
+        }
+
+ inline EXPORT_C void CHelloTraceInterface::ResetStringDup()
+        {
+        OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_RESETSTRING_DUP, "[0x%08x] Reseting string %S", (TUint32) this, *iString);
+        if (iString == NULL)
+            {
+            iString = new (ELeave) THelloTraceDllExampleString;
+            }
+        else
+            {
+            iString->SetLength(0);
+            }
+        }
+#endif  // __HELLOTRACEINTERFACEDUP_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/incDup/HelloTraceInterfaceDup2.inl	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,91 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef __HELLOTRACEINTERFACEDUP2_H__
+#define __HELLOTRACEINTERFACEDUP2_H__
+
+#include "HelloTracePanic.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTraceInterfaceDup2Traces.h"
+#endif
+
+ inline EXPORT_C TVersion CHelloTraceInterface::VersionDup2()
+        {
+        const TInt KMajor = 1;
+        const TInt KMinor = 0;
+        const TInt KBuild = 1;
+        TVersion version = TVersion(KMajor, KMinor, KBuild);
+        OstTraceExt1( TRACE_BORDER, CHELLOTRACEDLL_VERSION_DUP2, "CHelloTraceInterface::Version = %S", version.Name());   
+        return version;
+        }
+
+ inline EXPORT_C const TPtrC CHelloTraceInterface::StringDup2() const
+        {
+        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
+
+        OstTraceDefExt2( OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CHELLOTRACEDLL_STRING_DUP2, 
+                         "[0x%08x] Returned %S", (TUint32) this, *iString);   
+        return *iString;
+        }
+
+ inline EXPORT_C void CHelloTraceInterface::AddCharDup2L(const TChar& aChar)
+        {
+        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
+
+        OstTraceExt3( TRACE_BORDER, CHELLOTRACEDLL_ADDCHARL_DUP2, 
+                      "[0x%08x] Adding %d to %S", (TUint32) this, (TInt32) aChar, *iString);   
+        if (iString->Length() >= KHelloTraceDllBufferLength)
+            {
+            OstTrace1( TRACE_ERROR, CHELLOTRACEDLL_ADDCHARL_ERR_DUP2,
+                       "[0x%08x] Not enough space to add character", (TUint32) this);
+            User::Leave( KErrTooBig);
+            }
+        iString->Append(aChar);
+        }
+
+ inline EXPORT_C void CHelloTraceInterface::RemoveLastDup2()
+        {
+        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
+
+        OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_REMOVELAST_DUP2, 
+                      "[0x%08x] Attempting to remove last character from %S", (TUint32) this, *iString);
+        if (iString->Length() > 0)
+            {
+            iString->SetLength(iString->Length() - 1);
+            }
+        else
+            {
+            OstTrace1( TRACE_WARNING, CHELLOTRACEDLL_REMOVELAST_WARN_DUP2, "[0x%08x] String already empty", (TUint32) this);   
+            }
+        }
+
+ inline EXPORT_C void CHelloTraceInterface::ResetStringDup2()
+        {
+        OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_RESETSTRING_DUP2, "[0x%08x] Reseting string %S", (TUint32) this, *iString);
+        if (iString == NULL)
+            {
+            iString = new (ELeave) THelloTraceDllExampleString;
+            }
+        else
+            {
+            iString->SetLength(0);
+            }
+        }
+#endif  // __HELLOTRACEINTERFACEDUP2_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/incDup/HelloTraceTypes2Dup.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,75 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef __HELLOTRACETYPES2DUP_H__
+#define __HELLOTRACETYPES2DUP_H__
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTraceTypes2DupTraces.h"
+#endif
+
+inline void HelloTraceTypes::SignedIntegersDup()
+    {
+    TInt8  eightBit     = - (TInt8)  1 << 6;
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS2DUP_8, 
+                  "8 bit signed: %hhd", eightBit );
+    
+    TInt16 sixteenBit   = - (TInt16) 1 << 14; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS2DUP_16, 
+                  "16 bit signed: %hd", sixteenBit );
+
+    TInt32 thirtyTwoBit = - (TInt32) 1 << 30; 
+    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS2DUP_32, 
+               "32 bit signed: %d", thirtyTwoBit );
+
+    TInt64 sixtyFourBit = - (TInt64) 1 << 62; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS2DUP_64, 
+                  "64 bit signed: %Ld", sixtyFourBit );
+    }
+
+inline void HelloTraceTypes::UnsignedIntegersDup()
+    {
+    TUint8  eightBit     = (TUint8)  1 << 6;
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS2DUP_8, 
+                  "8 bit unsigned: %hhu", eightBit );
+    
+    TUint16 sixteenBit   = (TUint16) 1 << 14; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS2DUP_16, 
+                  "16 bit unsigned: %hu", sixteenBit );
+
+    TUint32 thirtyTwoBit = (TUint32) 1 << 30; 
+    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS2DUP_32, 
+               "32 bit unsigned: %u", thirtyTwoBit );
+
+    TUint64 sixtyFourBit = (TUint64) 1 << 62; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS2DUP_64, 
+                  "64 bit unsigned: %Lu", sixtyFourBit );
+    }
+
+inline void HelloTraceTypes::DescriptorsDup()
+    {
+    _LIT8(KAscii, "Some ASCII text");
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_ASCII2DUP, "8 bit descriptor: %s", KAscii() );
+
+    _LIT16(KUnicode, "Some unicode text");    
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNICODE2DUP, "16 bit descriptor: %S", KUnicode() );
+    }
+
+#endif  // __HELLOTRACETYPES2DUP_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/incDup/HelloTraceTypes2Dup2.inl	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,75 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef __HELLOTRACETYPES2DUP2_H__
+#define __HELLOTRACETYPES2DUP2_H__
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTraceTypes2Dup2Traces.h"
+#endif
+
+inline void HelloTraceTypes::SignedIntegersDup2()
+    {
+    TInt8  eightBit     = - (TInt8)  1 << 6;
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS2DUP2_8, 
+                  "8 bit signed: %hhd", eightBit );
+    
+    TInt16 sixteenBit   = - (TInt16) 1 << 14; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS2DUP2_16, 
+                  "16 bit signed: %hd", sixteenBit );
+
+    TInt32 thirtyTwoBit = - (TInt32) 1 << 30; 
+    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS2DUP2_32, 
+               "32 bit signed: %d", thirtyTwoBit );
+
+    TInt64 sixtyFourBit = - (TInt64) 1 << 62; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS2DUP2_64, 
+                  "64 bit signed: %Ld", sixtyFourBit );
+    }
+
+inline void HelloTraceTypes::UnsignedIntegersDup2()
+    {
+    TUint8  eightBit     = (TUint8)  1 << 6;
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS2DUP2_8, 
+                  "8 bit unsigned: %hhu", eightBit );
+    
+    TUint16 sixteenBit   = (TUint16) 1 << 14; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS2DUP2_16, 
+                  "16 bit unsigned: %hu", sixteenBit );
+
+    TUint32 thirtyTwoBit = (TUint32) 1 << 30; 
+    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS2DUP2_32, 
+               "32 bit unsigned: %u", thirtyTwoBit );
+
+    TUint64 sixtyFourBit = (TUint64) 1 << 62; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS2DUP2_64, 
+                  "64 bit unsigned: %Lu", sixtyFourBit );
+    }
+
+inline void HelloTraceTypes::DescriptorsDup2()
+    {
+    _LIT8(KAscii, "Some ASCII text");
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_ASCII2DUP2, "8 bit descriptor: %s", KAscii() );
+
+    _LIT16(KUnicode, "Some unicode text");    
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNICODE2DUP2, "16 bit descriptor: %S", KUnicode() );
+    }
+
+#endif  // __HELLOTRACETYPES2DUP2_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/incDup/HelloTraceTypesDup.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,75 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef __HELLOTRACETYPESDUP_H__
+#define __HELLOTRACETYPESDUP_H__
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTraceTypesDupTraces.h"
+#endif
+
+inline void HelloTraceTypes::SignedIntegersDup()
+    {
+    TInt8  eightBit     = - (TInt8)  1 << 6;
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP_8, 
+                  "8 bit signed: %hhd", eightBit );
+    
+    TInt16 sixteenBit   = - (TInt16) 1 << 14; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP_16, 
+                  "16 bit signed: %hd", sixteenBit );
+
+    TInt32 thirtyTwoBit = - (TInt32) 1 << 30; 
+    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP_32, 
+               "32 bit signed: %d", thirtyTwoBit );
+
+    TInt64 sixtyFourBit = - (TInt64) 1 << 62; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP_64, 
+                  "64 bit signed: %Ld", sixtyFourBit );
+    }
+
+inline void HelloTraceTypes::UnsignedIntegersDup()
+    {
+    TUint8  eightBit     = (TUint8)  1 << 6;
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP_8, 
+                  "8 bit unsigned: %hhu", eightBit );
+    
+    TUint16 sixteenBit   = (TUint16) 1 << 14; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP_16, 
+                  "16 bit unsigned: %hu", sixteenBit );
+
+    TUint32 thirtyTwoBit = (TUint32) 1 << 30; 
+    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP_32, 
+               "32 bit unsigned: %u", thirtyTwoBit );
+
+    TUint64 sixtyFourBit = (TUint64) 1 << 62; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP_64, 
+                  "64 bit unsigned: %Lu", sixtyFourBit );
+    }
+
+inline void HelloTraceTypes::DescriptorsDup()
+    {
+    _LIT8(KAscii, "Some ASCII text");
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_ASCIIDUP, "8 bit descriptor: %s", KAscii() );
+
+    _LIT16(KUnicode, "Some unicode text");    
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNICODEDUP, "16 bit descriptor: %S", KUnicode() );
+    }
+
+#endif  // __HELLOTRACETYPESDUP_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/incDup/HelloTraceTypesDup2.inl	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,75 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef __HELLOTRACETYPESDUP2_H__
+#define __HELLOTRACETYPESDUP2_H__
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTraceTypesDup2Traces.h"
+#endif
+
+inline void HelloTraceTypes::SignedIntegersDup2()
+    {
+    TInt8  eightBit     = - (TInt8)  1 << 6;
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP2_8, 
+                  "8 bit signed: %hhd", eightBit );
+    
+    TInt16 sixteenBit   = - (TInt16) 1 << 14; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP2_16, 
+                  "16 bit signed: %hd", sixteenBit );
+
+    TInt32 thirtyTwoBit = - (TInt32) 1 << 30; 
+    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP2_32, 
+               "32 bit signed: %d", thirtyTwoBit );
+
+    TInt64 sixtyFourBit = - (TInt64) 1 << 62; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP2_64, 
+                  "64 bit signed: %Ld", sixtyFourBit );
+    }
+
+inline void HelloTraceTypes::UnsignedIntegersDup2()
+    {
+    TUint8  eightBit     = (TUint8)  1 << 6;
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP2_8, 
+                  "8 bit unsigned: %hhu", eightBit );
+    
+    TUint16 sixteenBit   = (TUint16) 1 << 14; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP2_16, 
+                  "16 bit unsigned: %hu", sixteenBit );
+
+    TUint32 thirtyTwoBit = (TUint32) 1 << 30; 
+    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP2_32, 
+               "32 bit unsigned: %u", thirtyTwoBit );
+
+    TUint64 sixtyFourBit = (TUint64) 1 << 62; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP2_64, 
+                  "64 bit unsigned: %Lu", sixtyFourBit );
+    }
+
+inline void HelloTraceTypes::DescriptorsDup2()
+    {
+    _LIT8(KAscii, "Some ASCII text");
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_ASCIIDUP2, "8 bit descriptor: %s", KAscii() );
+
+    _LIT16(KUnicode, "Some unicode text");    
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNICODEDUP2, "16 bit descriptor: %S", KUnicode() );
+    }
+
+#endif  // __HELLOTRACETYPESDUP2_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/src/HelloTraceExample.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,106 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+
+#include "HelloTraceExample.h"
+#include "HelloTraceTypes.h"
+#include "HelloTraceInterface.h"
+#include "HelloTraceFn.h"
+#include "HelloTracePanic.h"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTraceExampleTraces.h"
+#endif
+
+EXPORT_C void HelloTraceExample::JustTypes()
+    {
+    OstTrace0( TRACE_EXAMPLE, HELLOTRACEEXAMPLE_JUSTTYPES, "*********************************************** " );
+    
+    HelloTraceTypes::SignedIntegers();
+    HelloTraceTypes::UnsignedIntegers();
+    HelloTraceTypes::Descriptors();    
+    }
+
+EXPORT_C void HelloTraceExample::Interface()
+    {
+    OstTrace0( TRACE_EXAMPLE, HELLOTRACEEXAMPLE_INTERFACE, "*********************************************** " );
+    
+    TVersion version = CHelloTraceInterface::Version();   
+    if (version.iMajor >= 1) 
+        {
+        CHelloTraceInterface* example = CHelloTraceInterface::NewLC();
+        example->AddCharL('H');
+        example->AddCharL('e');
+        example->AddCharL('l');
+        example->AddCharL('l');
+        example->AddCharL('o');
+        example->AddCharL('T');        
+        example->RemoveLast();        
+        example->AddCharL(' ');
+        example->AddCharL('T');
+        example->AddCharL('r');
+        example->AddCharL('a');
+        example->AddCharL('c');
+        example->AddCharL('e');
+        example->AddCharL('!');
+        CleanupStack::PopAndDestroy(example);
+        }
+    else
+        {
+        OstTrace0( TRACE_ERROR, HELLOTRACEEXAMPLE_UNSUPPORTED_VERSION, "Unsupported version!");
+        }
+    }
+
+EXPORT_C void HelloTraceExample::FnEntryExit()
+    {
+    OstTrace0( TRACE_EXAMPLE, HELLOTRACEEXAMPLE_FNENTRYEXIT, "*********************************************** " );
+       
+    CHelloTraceFn* example = CHelloTraceFn::NewLC();
+    CIdle* idle = CIdle::NewL(CActive::EPriorityIdle);
+    CleanupStack::PushL(idle);
+
+    CHelloTraceFn::StaticOutputsParamsL(1);
+   
+    example->Simple();
+    example->OutputsParams(2, CHelloTraceFn::EExample1);
+    example->OutputsParams(3, CHelloTraceFn::EExample2);
+    example->OutputsSignedIntegers(-4, -5, -6, -7);
+    example->OutputsUnsignedIntegers(8, 9, 10, 11);
+    example->OutputsTIntReturnValue();    
+    example->OutputsTInt64ReturnValue(); 
+    example->OutputsTFnEnumReturnValue();
+    example->OutputsUnknownPtrType(idle);    
+    example->OutputsUnknownRefType(*idle);
+#ifdef _DEBUG
+    example->PreProcessedFn(12);
+#else
+    example->PreProcessedFn();
+#endif
+    example->OutputMissingParams(13, 14, 15);
+
+    CleanupStack::PopAndDestroy(idle);
+    CleanupStack::PopAndDestroy(example);
+    }
+
+EXPORT_C void HelloTraceExample::PanicTrace()
+    {
+    OstTrace0( TRACE_EXAMPLE, HELLOTRACEEXAMPLE_PANIC, "*********************************************** " );
+
+    Panic(EHelloTraceDllExamplePanic);
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/src/HelloTraceExample2.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,106 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+
+#include "HelloTraceExample.h"
+#include "HelloTraceTypes2.h"
+#include "HelloTraceInterface2.h"
+#include "HelloTraceFn2.h"
+#include "HelloTracePanic.h"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTraceExample2Traces.h"
+#endif
+
+EXPORT_C void HelloTraceExample::JustTypes()
+    {
+    OstTrace0( TRACE_EXAMPLE, HELLOTRACEEXAMPLE_JUSTTYPES, "*********************************************** " );
+    
+    HelloTraceTypes::SignedIntegers();
+    HelloTraceTypes::UnsignedIntegers();
+    HelloTraceTypes::Descriptors();    
+    }
+
+EXPORT_C void HelloTraceExample::Interface()
+    {
+    OstTrace0( TRACE_EXAMPLE, HELLOTRACEEXAMPLE_INTERFACE, "*********************************************** " );
+    
+    TVersion version = CHelloTraceInterface::Version();   
+    if (version.iMajor >= 1) 
+        {
+        CHelloTraceInterface* example = CHelloTraceInterface::NewLC();
+        example->AddCharL('H');
+        example->AddCharL('e');
+        example->AddCharL('l');
+        example->AddCharL('l');
+        example->AddCharL('o');
+        example->AddCharL('T');        
+        example->RemoveLast();        
+        example->AddCharL(' ');
+        example->AddCharL('T');
+        example->AddCharL('r');
+        example->AddCharL('a');
+        example->AddCharL('c');
+        example->AddCharL('e');
+        example->AddCharL('!');
+        CleanupStack::PopAndDestroy(example);
+        }
+    else
+        {
+        OstTrace0( TRACE_ERROR, HELLOTRACEEXAMPLE_UNSUPPORTED_VERSION, "Unsupported version!");
+        }
+    }
+
+EXPORT_C void HelloTraceExample::FnEntryExit()
+    {
+    OstTrace0( TRACE_EXAMPLE, HELLOTRACEEXAMPLE_FNENTRYEXIT, "*********************************************** " );
+       
+    CHelloTraceFn* example = CHelloTraceFn::NewLC();
+    CIdle* idle = CIdle::NewL(CActive::EPriorityIdle);
+    CleanupStack::PushL(idle);
+
+    CHelloTraceFn::StaticOutputsParamsL(1);
+   
+    example->Simple();
+    example->OutputsParams(2, CHelloTraceFn::EExample1);
+    example->OutputsParams(3, CHelloTraceFn::EExample2);
+    example->OutputsSignedIntegers(-4, -5, -6, -7);
+    example->OutputsUnsignedIntegers(8, 9, 10, 11);
+    example->OutputsTIntReturnValue();    
+    example->OutputsTInt64ReturnValue(); 
+    example->OutputsTFnEnumReturnValue();
+    example->OutputsUnknownPtrType(idle);    
+    example->OutputsUnknownRefType(*idle);
+#ifdef _DEBUG
+    example->PreProcessedFn(12);
+#else
+    example->PreProcessedFn();
+#endif
+    example->OutputMissingParams(13, 14, 15);
+
+    CleanupStack::PopAndDestroy(idle);
+    CleanupStack::PopAndDestroy(example);
+    }
+
+EXPORT_C void HelloTraceExample::PanicTrace()
+    {
+    OstTrace0( TRACE_EXAMPLE, HELLOTRACEEXAMPLE_PANIC, "*********************************************** " );
+
+    Panic(EHelloTraceDllExamplePanic);
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/src/HelloTraceFn.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,183 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+ 
+#include "HelloTraceFn.h"
+#include "HelloTraceFnDup.h"
+#include "HelloTraceFnDup2.inl"
+#include "HelloTracePanic.h"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTraceFnTraces.h"
+#endif
+
+CHelloTraceFn* CHelloTraceFn::NewLC()
+    {
+    CHelloTraceFn* self = new (ELeave) CHelloTraceFn;
+    CleanupStack::PushL(self);
+    return self;
+    }
+
+CHelloTraceFn* CHelloTraceFn::NewL()
+    {
+    CHelloTraceFn* self = CHelloTraceFn::NewLC();
+    CleanupStack::Pop(self);
+    return self;
+    }
+
+CHelloTraceFn::CHelloTraceFn()
+    {
+    OstTrace1( TRACE_NORMAL, CHELLOTRACEFN_CHELLOTRACEFN_CTOR, "[0x%08x] Constructor", this );    
+    }
+
+CHelloTraceFn::~CHelloTraceFn()
+    {
+    OstTrace1( TRACE_NORMAL, CHELLOTRACEFN_CHELLOTRACEFN_DTOR, "[0x%08x] Destructor", this );    
+    }
+
+void CHelloTraceFn::Simple()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_SIMPLE_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_SIMPLE_EXIT, this );
+    }
+
+void CHelloTraceFn::OutputsParams(TInt aParam, TFnEnum aEnumParam)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSPARAMS_ENTRY, this );
+    Simple();
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSPARAMS_EXIT, this );
+    }
+
+void CHelloTraceFn::StaticOutputsParamsL(TInt aParam)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_STATICOUTPUTSPARAMS_ENTRY, NULL );
+    CHelloTraceFn* example = CHelloTraceFn::NewLC();
+    example->Simple();    
+    CleanupStack::PopAndDestroy(example);
+    OstTraceFunctionExit0( CHELLOTRACEFN_STATICOUTPUTSPARAMS_EXIT );    
+    }
+
+void CHelloTraceFn::OutputsSignedIntegers(TInt8 aParam8,   TInt16 aParam16, 
+                                          TInt32 aParam32, TInt64 aParam64)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS_EXIT, this );
+    }
+
+void CHelloTraceFn::OutputsUnsignedIntegers(TUint8 aParam8,   TUint16 aParam16, 
+                                            TUint32 aParam32, TUint64 aParam64)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS_EXIT, this );
+    }
+
+
+TInt CHelloTraceFn::OutputsTIntReturnValue()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_ENTRY, this );
+    TInt ret = KErrNone;
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_EXIT, this, ret );
+    return ret;
+    }
+
+TInt64 CHelloTraceFn::OutputsTInt64ReturnValue()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE_ENTRY, this );
+    TInt64 ret = (TInt64) 2 << 40;
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE_EXIT, this, ret );
+    return ret;
+    }
+
+CHelloTraceFn::TFnEnum CHelloTraceFn::OutputsTFnEnumReturnValue()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE_ENTRY, this );
+    TFnEnum ret = EExample1;
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE_EXIT, this, ret );
+    return ret;    
+    }
+
+CActive* CHelloTraceFn::OutputsUnknownPtrType(CActive* aActive)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_ENTRY, this );    
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_EXIT, this, (TUint) aActive );
+    return aActive;
+    }
+
+CActive& CHelloTraceFn::OutputsUnknownRefType(CActive& aActive)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE_ENTRY, this );
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE_EXIT, this, (TUint) &aActive );    
+    return aActive;
+    }
+
+// The following doesn't compile as the Trace Compiler doesn't generate
+// the correct OstTraceGenExt(...) function for it
+//void CHelloTraceFn::OutputMissingParamsBug(TInt /*aCommentParam*/, TInt)
+//    {
+//    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_ENTRY, this );
+//    // ...
+//    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_EXIT, this );    
+//    }
+
+// The following compiles and works but outputs the following warning
+// warning: HelloTraceFn.cpp, line xxx: Parameter did not have a name and was not added to trace
+// The fact that this cannot be suppressed is a known problem we're working on.
+void CHelloTraceFn::OutputMissingParams(TInt aUsedParam, TInt /*aCommentParam*/, TInt)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMS_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMS_EXIT, this );
+    }
+
+// The following doesn't work as the Trace Compiler outputs:
+// error: HelloTraceFn.cpp, line xxx: Class / function name for trace could not be determined x3
+//#ifdef _DEBUG
+//void CHelloTraceFn::PreProcessedFn(TInt aDbgParam)
+//    {
+//    OstTraceFunctionEntryExt( PRE_PROCESSED_ENTRTY_1, this );
+//#else
+//void CHelloTraceFn::PreProcessedFn()
+//    {
+//    OstTraceFunctionEntry1( PRE_PROCESSED_ENTRTY_2, this );
+//#endif
+//    Simple();
+//    OstTraceFunctionExit1( CHELLOTRACEFN_PREPROCESSEDFN_EXIT, this );
+//    }
+
+// Workaround example code until a proper fix is provided
+#ifdef _DEBUG
+void CHelloTraceFn::PreProcessedFn(TInt aDbgParam)
+    {
+    OstTraceExt2( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_ENTRY_1, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;aDbgParam=%d;this=%x", (TInt) aDbgParam, (TUint) this);
+#else
+void CHelloTraceFn::PreProcessedFn()
+    {
+    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_ENTRY_2, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
+#endif
+    Simple();
+    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_EXIT, "CHelloTraceFn::PreProcessedFn: < CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
+    }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/src/HelloTraceFn2.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,183 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+ 
+#include "HelloTraceFn2.h"
+#include "HelloTraceFn2Dup.h"
+#include "HelloTraceFn2Dup2.inl"
+#include "HelloTracePanic.h"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTraceFn2Traces.h"
+#endif
+
+CHelloTraceFn* CHelloTraceFn::NewLC()
+    {
+    CHelloTraceFn* self = new (ELeave) CHelloTraceFn;
+    CleanupStack::PushL(self);
+    return self;
+    }
+
+CHelloTraceFn* CHelloTraceFn::NewL()
+    {
+    CHelloTraceFn* self = CHelloTraceFn::NewLC();
+    CleanupStack::Pop(self);
+    return self;
+    }
+
+CHelloTraceFn::CHelloTraceFn()
+    {
+    OstTrace1( TRACE_NORMAL, CHELLOTRACEFN_CHELLOTRACEFN_CTOR, "[0x%08x] Constructor", this );    
+    }
+
+CHelloTraceFn::~CHelloTraceFn()
+    {
+    OstTrace1( TRACE_NORMAL, CHELLOTRACEFN_CHELLOTRACEFN_DTOR, "[0x%08x] Destructor", this );    
+    }
+
+void CHelloTraceFn::Simple()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_SIMPLE_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_SIMPLE_EXIT, this );
+    }
+
+void CHelloTraceFn::OutputsParams(TInt aParam, TFnEnum aEnumParam)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSPARAMS_ENTRY, this );
+    Simple();
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSPARAMS_EXIT, this );
+    }
+
+void CHelloTraceFn::StaticOutputsParamsL(TInt aParam)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_STATICOUTPUTSPARAMS_ENTRY, NULL );
+    CHelloTraceFn* example = CHelloTraceFn::NewLC();
+    example->Simple();    
+    CleanupStack::PopAndDestroy(example);
+    OstTraceFunctionExit0( CHELLOTRACEFN_STATICOUTPUTSPARAMS_EXIT );    
+    }
+
+void CHelloTraceFn::OutputsSignedIntegers(TInt8 aParam8,   TInt16 aParam16, 
+                                          TInt32 aParam32, TInt64 aParam64)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS_EXIT, this );
+    }
+
+void CHelloTraceFn::OutputsUnsignedIntegers(TUint8 aParam8,   TUint16 aParam16, 
+                                            TUint32 aParam32, TUint64 aParam64)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS_EXIT, this );
+    }
+
+
+TInt CHelloTraceFn::OutputsTIntReturnValue()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_ENTRY, this );
+    TInt ret = KErrNone;
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_EXIT, this, ret );
+    return ret;
+    }
+
+TInt64 CHelloTraceFn::OutputsTInt64ReturnValue()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE_ENTRY, this );
+    TInt64 ret = (TInt64) 2 << 40;
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE_EXIT, this, ret );
+    return ret;
+    }
+
+CHelloTraceFn::TFnEnum CHelloTraceFn::OutputsTFnEnumReturnValue()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE_ENTRY, this );
+    TFnEnum ret = EExample1;
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE_EXIT, this, ret );
+    return ret;    
+    }
+
+CActive* CHelloTraceFn::OutputsUnknownPtrType(CActive* aActive)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_ENTRY, this );    
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_EXIT, this, (TUint) aActive );
+    return aActive;
+    }
+
+CActive& CHelloTraceFn::OutputsUnknownRefType(CActive& aActive)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE_ENTRY, this );
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE_EXIT, this, (TUint) &aActive );    
+    return aActive;
+    }
+
+// The following doesn't compile as the Trace Compiler doesn't generate
+// the correct OstTraceGenExt(...) function for it
+//void CHelloTraceFn::OutputMissingParamsBug(TInt /*aCommentParam*/, TInt)
+//    {
+//    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_ENTRY, this );
+//    // ...
+//    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_EXIT, this );    
+//    }
+
+// The following compiles and works but outputs the following warning
+// warning: HelloTraceFn.cpp, line xxx: Parameter did not have a name and was not added to trace
+// The fact that this cannot be suppressed is a known problem we're working on.
+void CHelloTraceFn::OutputMissingParams(TInt aUsedParam, TInt /*aCommentParam*/, TInt)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMS_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMS_EXIT, this );
+    }
+
+// The following doesn't work as the Trace Compiler outputs:
+// error: HelloTraceFn.cpp, line xxx: Class / function name for trace could not be determined x3
+//#ifdef _DEBUG
+//void CHelloTraceFn::PreProcessedFn(TInt aDbgParam)
+//    {
+//    OstTraceFunctionEntryExt( PRE_PROCESSED_ENTRTY_1, this );
+//#else
+//void CHelloTraceFn::PreProcessedFn()
+//    {
+//    OstTraceFunctionEntry1( PRE_PROCESSED_ENTRTY_2, this );
+//#endif
+//    Simple();
+//    OstTraceFunctionExit1( CHELLOTRACEFN_PREPROCESSEDFN_EXIT, this );
+//    }
+
+// Workaround example code until a proper fix is provided
+#ifdef _DEBUG
+void CHelloTraceFn::PreProcessedFn(TInt aDbgParam)
+    {
+    OstTraceExt2( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_ENTRY_1, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;aDbgParam=%d;this=%x", (TInt) aDbgParam, (TUint) this);
+#else
+void CHelloTraceFn::PreProcessedFn()
+    {
+    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_ENTRY_2, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
+#endif
+    Simple();
+    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_EXIT, "CHelloTraceFn::PreProcessedFn: < CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
+    }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/src/HelloTraceInterface.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,121 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+
+#include "HelloTraceInterface.h"
+#include "HelloTraceInterfaceDup.h"
+#include "HelloTraceInterfaceDup2.inl"
+#include "HelloTracePanic.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTraceInterfaceTraces.h"
+#endif
+
+EXPORT_C CHelloTraceInterface* CHelloTraceInterface::NewLC()
+    {
+    CHelloTraceInterface* self = new (ELeave) CHelloTraceInterface;
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    return self;
+    }
+
+EXPORT_C CHelloTraceInterface* CHelloTraceInterface::NewL()
+    {
+    CHelloTraceInterface* self = CHelloTraceInterface::NewLC();
+    CleanupStack::Pop(self);
+    return self;
+    }
+
+CHelloTraceInterface::CHelloTraceInterface()
+    {
+    OstTrace1( TRACE_NORMAL, CHELLOTRACEDLL_CHELLOTRACEDLL_CTOR, "[0x%08x]", (TUint32) this );    
+    }
+
+void CHelloTraceInterface::ConstructL()
+    {
+    iString = new (ELeave) THelloTraceDllExampleString;
+    }
+
+EXPORT_C CHelloTraceInterface::~CHelloTraceInterface()
+    {
+    delete iString;
+    OstTrace1( TRACE_NORMAL, CHELLOTRACEDLL_CHELLOTRACEDLL_DTOR, "[0x%08x]", (TUint32) this );    
+    }
+
+EXPORT_C TVersion CHelloTraceInterface::Version()
+    {
+    const TInt KMajor = 1;
+    const TInt KMinor = 0;
+    const TInt KBuild = 1;
+    TVersion version = TVersion(KMajor, KMinor, KBuild);
+    OstTraceExt1( TRACE_BORDER, CHELLOTRACEDLL_VERSION, "CHelloTraceInterface::Version = %S", version.Name());   
+    return version;
+    }
+
+EXPORT_C const TPtrC CHelloTraceInterface::String() const
+    {
+    __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
+
+    OstTraceDefExt2( OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CHELLOTRACEDLL_STRING, 
+                     "[0x%08x] Returned %S", (TUint32) this, *iString);   
+    return *iString;
+    }
+
+EXPORT_C void CHelloTraceInterface::AddCharL(const TChar& aChar)
+    {
+    __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
+
+    OstTraceExt3( TRACE_BORDER, CHELLOTRACEDLL_ADDCHARL, 
+                  "[0x%08x] Adding %d to %S", (TUint32) this, (TInt32) aChar, *iString);   
+    if (iString->Length() >= KHelloTraceDllBufferLength)
+        {
+        OstTrace1( TRACE_ERROR, CHELLOTRACEDLL_ADDCHARL_ERR,
+                   "[0x%08x] Not enough space to add character", (TUint32) this);
+        User::Leave( KErrTooBig);
+        }
+    iString->Append(aChar);
+    }
+
+EXPORT_C void CHelloTraceInterface::RemoveLast()
+    {
+    __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
+
+    OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_REMOVELAST, 
+                  "[0x%08x] Attempting to remove last character from %S", (TUint32) this, *iString);
+    if (iString->Length() > 0)
+        {
+        iString->SetLength(iString->Length() - 1);
+        }
+    else
+        {
+        OstTrace1( TRACE_WARNING, CHELLOTRACEDLL_REMOVELAST_WARN, "[0x%08x] String already empty", (TUint32) this);   
+        }
+    }
+
+EXPORT_C void CHelloTraceInterface::ResetString()
+    {
+    OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_RESETSTRING, "[0x%08x] Reseting string %S", (TUint32) this, *iString);
+    if (iString == NULL)
+        {
+        iString = new (ELeave) THelloTraceDllExampleString;
+        }
+    else
+        {
+        iString->SetLength(0);
+        }
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/src/HelloTraceInterface2.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,121 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+
+#include "HelloTraceInterface2.h"
+#include "HelloTraceInterface2Dup.h"
+#include "HelloTraceInterface2Dup2.inl"
+#include "HelloTracePanic.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTraceInterface2Traces.h"
+#endif
+
+EXPORT_C CHelloTraceInterface* CHelloTraceInterface::NewLC()
+    {
+    CHelloTraceInterface* self = new (ELeave) CHelloTraceInterface;
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    return self;
+    }
+
+EXPORT_C CHelloTraceInterface* CHelloTraceInterface::NewL()
+    {
+    CHelloTraceInterface* self = CHelloTraceInterface::NewLC();
+    CleanupStack::Pop(self);
+    return self;
+    }
+
+CHelloTraceInterface::CHelloTraceInterface()
+    {
+    OstTrace1( TRACE_NORMAL, CHELLOTRACEDLL_CHELLOTRACEDLL_CTOR, "[0x%08x]", (TUint32) this );    
+    }
+
+void CHelloTraceInterface::ConstructL()
+    {
+    iString = new (ELeave) THelloTraceDllExampleString;
+    }
+
+EXPORT_C CHelloTraceInterface::~CHelloTraceInterface()
+    {
+    delete iString;
+    OstTrace1( TRACE_NORMAL, CHELLOTRACEDLL_CHELLOTRACEDLL_DTOR, "[0x%08x]", (TUint32) this );    
+    }
+
+EXPORT_C TVersion CHelloTraceInterface::Version()
+    {
+    const TInt KMajor = 1;
+    const TInt KMinor = 0;
+    const TInt KBuild = 1;
+    TVersion version = TVersion(KMajor, KMinor, KBuild);
+    OstTraceExt1( TRACE_BORDER, CHELLOTRACEDLL_VERSION, "CHelloTraceInterface::Version = %S", version.Name());   
+    return version;
+    }
+
+EXPORT_C const TPtrC CHelloTraceInterface::String() const
+    {
+    __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
+
+    OstTraceDefExt2( OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CHELLOTRACEDLL_STRING, 
+                     "[0x%08x] Returned %S", (TUint32) this, *iString);   
+    return *iString;
+    }
+
+EXPORT_C void CHelloTraceInterface::AddCharL(const TChar& aChar)
+    {
+    __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
+
+    OstTraceExt3( TRACE_BORDER, CHELLOTRACEDLL_ADDCHARL, 
+                  "[0x%08x] Adding %d to %S", (TUint32) this, (TInt32) aChar, *iString);   
+    if (iString->Length() >= KHelloTraceDllBufferLength)
+        {
+        OstTrace1( TRACE_ERROR, CHELLOTRACEDLL_ADDCHARL_ERR,
+                   "[0x%08x] Not enough space to add character", (TUint32) this);
+        User::Leave( KErrTooBig);
+        }
+    iString->Append(aChar);
+    }
+
+EXPORT_C void CHelloTraceInterface::RemoveLast()
+    {
+    __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
+
+    OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_REMOVELAST, 
+                  "[0x%08x] Attempting to remove last character from %S", (TUint32) this, *iString);
+    if (iString->Length() > 0)
+        {
+        iString->SetLength(iString->Length() - 1);
+        }
+    else
+        {
+        OstTrace1( TRACE_WARNING, CHELLOTRACEDLL_REMOVELAST_WARN, "[0x%08x] String already empty", (TUint32) this);   
+        }
+    }
+
+EXPORT_C void CHelloTraceInterface::ResetString()
+    {
+    OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_RESETSTRING, "[0x%08x] Reseting string %S", (TUint32) this, *iString);
+    if (iString == NULL)
+        {
+        iString = new (ELeave) THelloTraceDllExampleString;
+        }
+    else
+        {
+        iString->SetLength(0);
+        }
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/src/HelloTracePanic.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,32 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#include <e32std.h>		 // GLDEF_C
+
+#include "HelloTracePanic.h"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTracePanicTraces.h"
+#endif
+
+GLDEF_C void Panic(THelloTraceDllPanic aPanic)
+    {
+    OstTrace1( TRACE_FATAL, PANIC, "Panic(%{THelloTraceDllPanic})", (TUint) aPanic );    
+    User::Panic(_L("HelloTraceDll"), aPanic);
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/src/HelloTracePanic2.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,32 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#include <e32std.h>		 // GLDEF_C
+
+#include "HelloTracePanic.h"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTracePanic2Traces.h"
+#endif
+
+GLDEF_C void Panic(THelloTraceDllPanic aPanic)
+    {
+    OstTrace1( TRACE_FATAL, PANIC, "Panic(%{THelloTraceDllPanic})", (TUint) aPanic );    
+    User::Panic(_L("HelloTraceDll"), aPanic);
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/src/HelloTraceTypes.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,76 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+
+#include <e32std.h>
+
+#include "HelloTraceTypes.h"
+#include "HelloTraceTypesDup.h"
+#include "HelloTraceTypesDup2.inl"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTraceTypesTraces.h"
+#endif
+
+void HelloTraceTypes::SignedIntegers()
+    {
+    TInt8  eightBit     = - (TInt8)  1 << 6;
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS_8, 
+                  "8 bit signed: %hhd", eightBit );
+    
+    TInt16 sixteenBit   = - (TInt16) 1 << 14; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS_16, 
+                  "16 bit signed: %hd", sixteenBit );
+
+    TInt32 thirtyTwoBit = - (TInt32) 1 << 30; 
+    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS_32, 
+               "32 bit signed: %d", thirtyTwoBit );
+
+    TInt64 sixtyFourBit = - (TInt64) 1 << 62; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS_64, 
+                  "64 bit signed: %Ld", sixtyFourBit );
+    }
+
+void HelloTraceTypes::UnsignedIntegers()
+    {
+    TUint8  eightBit     = (TUint8)  1 << 6;
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS_8, 
+                  "8 bit unsigned: %hhu", eightBit );
+    
+    TUint16 sixteenBit   = (TUint16) 1 << 14; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS_16, 
+                  "16 bit unsigned: %hu", sixteenBit );
+
+    TUint32 thirtyTwoBit = (TUint32) 1 << 30; 
+    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS_32, 
+               "32 bit unsigned: %u", thirtyTwoBit );
+
+    TUint64 sixtyFourBit = (TUint64) 1 << 62; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS_64, 
+                  "64 bit unsigned: %Lu", sixtyFourBit );
+    }
+
+void HelloTraceTypes::Descriptors()
+    {
+    _LIT8(KAscii, "Some ASCII text");
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_ASCII, "8 bit descriptor: %s", KAscii() );
+
+    _LIT16(KUnicode, "Some unicode text");    
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNICODE, "16 bit descriptor: %S", KUnicode() );
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/src/HelloTraceTypes2.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,76 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+
+#include <e32std.h>
+
+#include "HelloTraceTypes2.h"
+#include "HelloTraceTypes2Dup.h"
+#include "HelloTraceTypes2Dup2.inl"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTraceTypes2Traces.h"
+#endif
+
+void HelloTraceTypes::SignedIntegers()
+    {
+    TInt8  eightBit     = - (TInt8)  1 << 6;
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS_8, 
+                  "8 bit signed: %hhd", eightBit );
+    
+    TInt16 sixteenBit   = - (TInt16) 1 << 14; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS_16, 
+                  "16 bit signed: %hd", sixteenBit );
+
+    TInt32 thirtyTwoBit = - (TInt32) 1 << 30; 
+    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS_32, 
+               "32 bit signed: %d", thirtyTwoBit );
+
+    TInt64 sixtyFourBit = - (TInt64) 1 << 62; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS_64, 
+                  "64 bit signed: %Ld", sixtyFourBit );
+    }
+
+void HelloTraceTypes::UnsignedIntegers()
+    {
+    TUint8  eightBit     = (TUint8)  1 << 6;
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS_8, 
+                  "8 bit unsigned: %hhu", eightBit );
+    
+    TUint16 sixteenBit   = (TUint16) 1 << 14; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS_16, 
+                  "16 bit unsigned: %hu", sixteenBit );
+
+    TUint32 thirtyTwoBit = (TUint32) 1 << 30; 
+    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS_32, 
+               "32 bit unsigned: %u", thirtyTwoBit );
+
+    TUint64 sixtyFourBit = (TUint64) 1 << 62; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS_64, 
+                  "64 bit unsigned: %Lu", sixtyFourBit );
+    }
+
+void HelloTraceTypes::Descriptors()
+    {
+    _LIT8(KAscii, "Some ASCII text");
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_ASCII, "8 bit descriptor: %s", KAscii() );
+
+    _LIT16(KUnicode, "Some unicode text");    
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNICODE, "16 bit descriptor: %S", KUnicode() );
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/dll/traces/trace.properties	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<trace_properties>
+<enum name="TFnEnum">
+<value id="0">EExample1</value>
+<value id="2">EExample2</value>
+</enum>
+<enum name="THelloTraceDllPanic">
+<value id="0">EHelloTraceDllExamplePanic</value>
+<value id="1">EHelloTraceDllNullPointer</value>
+</enum>
+<file>../incDup/HelloTraceInterfaceDup.h</file>
+<file>../incDup/HelloTraceInterfaceDup2.inl</file>
+<file>../incDup/HelloTraceFnDup.h</file>
+<file>../incDup/HelloTraceFnDup2.inl</file>
+<file>../incDup/HelloTraceTypesDup.h</file>
+<file>../incDup/HelloTraceTypesDup2.inl</file>
+<file>../incDup/HelloTraceInterface2Dup.h</file>
+<file>../incDup/HelloTraceInterface2Dup2.inl</file>
+<file>../incDup/HelloTraceFn2Dup.h</file>
+<file>../incDup/HelloTraceFn2Dup2.inl</file>
+<file>../incDup/HelloTraceTypes2Dup.h</file>
+<file>../incDup/HelloTraceTypes2Dup2.inl</file>
+</trace_properties>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/group/bld.inf	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,19 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+#include "../dll/group/bld.inf"
+#include "../console/group/bld.inf"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/console/group/HelloTraceConsole.mmp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,37 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+
+TARGET		  HelloTraceConsole.exe
+TARGETTYPE	  exe
+UID			  0 0xE40349E4
+
+OS_LAYER_SYSTEMINCLUDE
+USERINCLUDE	   ../inc
+USERINCLUDE    ../../dll/inc
+USERINCLUDE    ../traces
+
+SOURCEPATH	  ../src
+SOURCE		  HelloTraceConsole.cpp
+
+LIBRARY		  euser.lib
+LIBRARY       HelloTraceDll.lib
+
+#ifdef ENABLE_ABIV2_MODE
+DEBUGGABLE_UDEBONLY
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/console/group/bld.inf	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,27 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXPORTS
+hellotraceconsole.iby             CORE_OS_LAYER_IBY_EXPORT_PATH(hellotraceconsole.iby)
+
+PRJ_MMPFILES
+HelloTraceConsole.mmp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/console/group/hellotraceconsole.iby	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,24 @@
+// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+// ROM build file for tracecore project
+
+#ifndef HELLOTRACECONSOLE_IBY
+#define HELLOTRACECONSOLE_IBY
+
+#include <core\os\hellotracedll.iby>
+
+file=ABI_DIR\BUILD_DIR\hellotraceconsole.exe    Sys\Bin\hellotraceconsole.exe
+
+#endif //HELLOTRACECONSOLE_IBY
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/console/inc/HelloTraceConsole.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,31 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef __HELLOTRACECONSOLE_H__
+#define __HELLOTRACECONSOLE_H__
+
+//  Include Files
+
+#include <e32base.h>
+
+//  Function Prototypes
+
+GLDEF_C TInt E32Main();
+
+#endif  // __HELLOTRACECONSOLE_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/dll/bwins/HelloTraceDllu.def	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,14 @@
+EXPORTS
+	?Version@CHelloTraceInterface@@SA?AVTVersion@@XZ @ 1 NONAME ; class TVersion CHelloTraceInterface::Version(void)
+	?NewLC@CHelloTraceInterface@@SAPAV1@XZ @ 2 NONAME ; class CHelloTraceInterface * CHelloTraceInterface::NewLC(void)
+	?JustTypes@HelloTraceExample@@SAXXZ @ 3 NONAME ; void HelloTraceExample::JustTypes(void)
+	?Interface@HelloTraceExample@@SAXXZ @ 4 NONAME ; void HelloTraceExample::Interface(void)
+	?FnEntryExit@HelloTraceExample@@SAXXZ @ 5 NONAME ; void HelloTraceExample::FnEntryExit(void)
+	?ResetString@CHelloTraceInterface@@QAEXXZ @ 6 NONAME ; void CHelloTraceInterface::ResetString(void)
+	?AddCharL@CHelloTraceInterface@@QAEXABVTChar@@@Z @ 7 NONAME ; void CHelloTraceInterface::AddCharL(class TChar const &)
+	?PanicTrace@HelloTraceExample@@SAXXZ @ 8 NONAME ; void HelloTraceExample::PanicTrace(void)
+	??1CHelloTraceInterface@@UAE@XZ @ 9 NONAME ; CHelloTraceInterface::~CHelloTraceInterface(void)
+	?String@CHelloTraceInterface@@QBE?BVTPtrC16@@XZ @ 10 NONAME ; class TPtrC16 const CHelloTraceInterface::String(void) const
+	?RemoveLast@CHelloTraceInterface@@QAEXXZ @ 11 NONAME ; void CHelloTraceInterface::RemoveLast(void)
+	?NewL@CHelloTraceInterface@@SAPAV1@XZ @ 12 NONAME ; class CHelloTraceInterface * CHelloTraceInterface::NewL(void)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/dll/eabi/HelloTraceDllu.def	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,20 @@
+EXPORTS
+	_ZN17HelloTraceExample10PanicTraceEv @ 1 NONAME
+	_ZN17HelloTraceExample11FnEntryExitEv @ 2 NONAME
+	_ZN17HelloTraceExample9InterfaceEv @ 3 NONAME
+	_ZN17HelloTraceExample9JustTypesEv @ 4 NONAME
+	_ZN20CHelloTraceInterface10RemoveLastEv @ 5 NONAME
+	_ZN20CHelloTraceInterface11ResetStringEv @ 6 NONAME
+	_ZN20CHelloTraceInterface4NewLEv @ 7 NONAME
+	_ZN20CHelloTraceInterface5NewLCEv @ 8 NONAME
+	_ZN20CHelloTraceInterface7VersionEv @ 9 NONAME
+	_ZN20CHelloTraceInterface8AddCharLERK5TChar @ 10 NONAME
+	_ZN20CHelloTraceInterfaceD0Ev @ 11 NONAME
+	_ZN20CHelloTraceInterfaceD1Ev @ 12 NONAME
+	_ZN20CHelloTraceInterfaceD2Ev @ 13 NONAME
+	_ZNK20CHelloTraceInterface6StringEv @ 14 NONAME
+	_ZTI13CHelloTraceFn @ 15 NONAME
+	_ZTI20CHelloTraceInterface @ 16 NONAME
+	_ZTV13CHelloTraceFn @ 17 NONAME
+	_ZTV20CHelloTraceInterface @ 18 NONAME
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/dll/group/HelloTraceDll.mmp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,40 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+
+TARGET		  HelloTraceDll.dll
+TARGETTYPE	  dll
+UID			  0x1000008d 0xE43DF43E
+CAPABILITY    ReadUserData
+
+OS_LAYER_SYSTEMINCLUDE
+USERINCLUDE  ../inc ../incDup
+USERINCLUDE  ../traces
+
+SOURCEPATH	 ../src
+SOURCE       HelloTraceExample.cpp 
+SOURCE       HelloTraceTypes.cpp
+SOURCE       HelloTraceInterface.cpp 
+SOURCE       HelloTraceFn.cpp 
+SOURCE       HelloTracePanic.cpp 
+
+LIBRARY		 euser.lib
+
+#ifdef ENABLE_ABIV2_MODE
+DEBUGGABLE_UDEBONLY
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/dll/group/bld.inf	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,28 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXPORTS
+hellotracedll.iby             CORE_OS_LAYER_IBY_EXPORT_PATH(hellotracedll.iby)
+../inc/hellotracefn.h		      OS_LAYER_PLATFORM_EXPORT_PATH(hellotracefn.h)
+
+PRJ_MMPFILES
+HelloTraceDll.mmp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/dll/group/hellotracedll.iby	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,22 @@
+// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+// ROM build file for tracecore project
+
+#ifndef HELLOTRACEDLL_IBY
+#define HELLOTRACEDLL_IBY
+
+file=ABI_DIR\BUILD_DIR\hellotracedll.dll        Sys\Bin\hellotracedll.dll
+
+#endif //HELLOTRACEDLL_IBY
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/dll/inc/HelloTraceExample.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,40 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef __HELLOTRACEEXAMPLE_H__
+#define __HELLOTRACEEXAMPLE_H__
+
+#include <e32std.h>
+
+class HelloTraceExample
+    {
+public:
+    IMPORT_C static void JustTypes();    
+    IMPORT_C static void Interface();    
+    IMPORT_C static void FnEntryExit();    
+    IMPORT_C static void PanicTrace();    
+
+    // @TODO add examples for state macros
+    // @TODO add examples for event macros
+    // @TODO add examples for OstTraceData
+    // @TODO add compile-time selector examples
+    // @TODO add macro wrapper examples
+    };
+
+#endif  // __HELLOTRACEEXAMPLE_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/dll/inc/HelloTraceFn.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,124 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+ 
+
+#ifndef HELLOTRACEFN_H_
+#define HELLOTRACEFN_H_
+
+#include <e32base.h>    // CBase
+
+class CHelloTraceFn : public CBase
+    {
+public:
+    
+    // Note the Trace Builder will only parse this if it's in a cpp file
+    // but not from here :(
+    // Also if you add a new enum you need to reparse the enum - it doesn't
+    // get automatically reparsed by the Trace Compiler :(
+    enum TFnEnum
+        {
+        EExample1,
+        EExample2 = 2, 
+        // EExample3 = EExample2 + 1, // The Trace Builder can't parse this :(
+        };
+    
+public:
+    static CHelloTraceFn* NewL();
+    static CHelloTraceFn* NewLC();
+    ~CHelloTraceFn();
+   
+public: // Fn entry / exit tracing examples 
+    void Simple();
+    void OutputsParams(TInt aParam, TFnEnum aEnumParam);
+    void OutputsParams2(TInt aParam, TFnEnum aEnumParam);
+    void OutputsParams3(TInt aParam, TFnEnum aEnumParam);
+    void OutputsSignedIntegers(TInt8 aParam8,   TInt16 aParam16, 
+                               TInt32 aParam32, TInt64 aParam64);
+    void OutputsUnsignedIntegers(TUint8 aParam8,   TUint16 aParam16, 
+                                 TUint32 aParam32, TUint64 aParam64);
+     
+    TInt OutputsTIntReturnValue();
+    TInt64 OutputsTInt64ReturnValue();
+    TFnEnum OutputsTFnEnumReturnValue();
+
+    CActive* OutputsUnknownPtrType(CActive* aActive);
+    CActive& OutputsUnknownRefType(CActive& aActive);
+    
+    void OutputMissingParams(TInt aUsedParam, TInt aCommentParam, TInt aMissingParam);
+
+#ifdef _DEBUG    
+    void PreProcessedFn(TInt aDbgParam);
+#else
+    void PreProcessedFn();
+#endif
+    
+    static void StaticOutputsParamsL(TInt aParam);  
+    
+    // duplicate all the function and put the impl in the header file HelloTraceFnDup.h
+    void SimpleDup();
+    void OutputsParamsDup(TInt aParam, TFnEnum aEnumParam);
+    void OutputsSignedIntegersDup(TInt8 aParam8,   TInt16 aParam16, 
+                               TInt32 aParam32, TInt64 aParam64);
+    void OutputsUnsignedIntegersDup(TUint8 aParam8,   TUint16 aParam16, 
+                                 TUint32 aParam32, TUint64 aParam64);
+     
+    TInt OutputsTIntReturnValueDup();
+    TInt64 OutputsTInt64ReturnValueDup();
+    TFnEnum OutputsTFnEnumReturnValueDup();
+
+    CActive* OutputsUnknownPtrTypeDup(CActive* aActive);
+    CActive& OutputsUnknownRefTypeDup(CActive& aActive);
+    
+    void OutputMissingParamsDup(TInt aUsedParam, TInt aCommentParam, TInt aMissingParam);
+
+#ifdef _DEBUG    
+    void PreProcessedFnDup(TInt aDbgParam);
+#else
+    void PreProcessedFnDup();
+#endif
+    static void StaticOutputsParamsDupL(TInt aParam);  
+    
+    // duplicate all the function again and put the impl in the header file HelloTraceFnDup2.h
+    void SimpleDup2();
+    void OutputsParamsDup2(TInt aParam, TFnEnum aEnumParam);
+    void OutputsSignedIntegersDup2(TInt8 aParam8,   TInt16 aParam16, 
+                               TInt32 aParam32, TInt64 aParam64);
+    void OutputsUnsignedIntegersDup2(TUint8 aParam8,   TUint16 aParam16, 
+                                 TUint32 aParam32, TUint64 aParam64);
+     
+    TInt OutputsTIntReturnValueDup2();
+    TInt64 OutputsTInt64ReturnValueDup2();
+    TFnEnum OutputsTFnEnumReturnValueDup2();
+
+    CActive* OutputsUnknownPtrTypeDup2(CActive* aActive);
+    CActive& OutputsUnknownRefTypeDup2(CActive& aActive);
+    
+    void OutputMissingParamsDup2(TInt aUsedParam, TInt aCommentParam, TInt aMissingParam);
+
+#ifdef _DEBUG    
+    void PreProcessedFnDup2(TInt aDbgParam);
+#else
+    void PreProcessedFnDup2();
+#endif
+    static void StaticOutputsParamsDup2L(TInt aParam);  
+
+
+private:
+    CHelloTraceFn();
+    };
+
+#endif /* HELLOTRACEFN_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/dll/inc/HelloTraceInterface.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,63 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef __HELLOTRACEINTERFACE_H__
+#define __HELLOTRACEINTERFACE_H__
+
+#include <e32base.h>	// CBase
+#include <e32std.h>	 // TBuf
+
+const TInt KHelloTraceDllBufferLength = 10;
+typedef TBuf<KHelloTraceDllBufferLength> THelloTraceDllExampleString;
+
+class CHelloTraceInterface : public CBase
+    {
+public:
+    IMPORT_C static CHelloTraceInterface* NewL();
+    IMPORT_C static CHelloTraceInterface* NewLC();
+    IMPORT_C ~CHelloTraceInterface();
+
+public:
+    IMPORT_C static TVersion Version();
+    IMPORT_C const TPtrC String() const;
+    IMPORT_C void AddCharL(const TChar& aChar);
+    IMPORT_C void RemoveLast();
+    IMPORT_C void ResetString();
+    
+    IMPORT_C static TVersion VersionDup();
+    IMPORT_C const TPtrC StringDup() const;
+    IMPORT_C void AddCharDupL(const TChar& aChar);
+    IMPORT_C void RemoveLastDup();
+    IMPORT_C void ResetStringDup();
+
+    IMPORT_C static TVersion VersionDup2();
+    IMPORT_C const TPtrC StringDup2() const;
+    IMPORT_C void AddCharDup2L(const TChar& aChar);
+    IMPORT_C void RemoveLastDup2();
+    IMPORT_C void ResetStringDup2();
+private:
+    CHelloTraceInterface();
+    void ConstructL();
+
+private:
+    // data
+    THelloTraceDllExampleString* iString;
+    };
+
+#endif  // __HELLOTRACEINTERFACE_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/dll/inc/HelloTracePanic.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,35 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef __HELLOTRACEDLL_PAN__
+#define __HELLOTRACEDLL_PAN__
+
+//  Data Types
+
+enum THelloTraceDllPanic
+    {
+    EHelloTraceDllExamplePanic,
+    EHelloTraceDllNullPointer,
+    };
+
+//  Function Prototypes
+
+GLREF_C void Panic(THelloTraceDllPanic aPanic);
+
+#endif  // __HELLOTRACEDLL_PAN__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/dll/inc/HelloTraceTypes.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,39 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef __HELLOTRACETYPES_H__
+#define __HELLOTRACETYPES_H__
+
+class HelloTraceTypes
+    {
+public:
+    static void SignedIntegers();
+    static void UnsignedIntegers();
+    static void Descriptors();
+    
+    static void SignedIntegersDup();
+    static void UnsignedIntegersDup();
+    static void DescriptorsDup();
+        
+    static void SignedIntegersDup2();
+    static void UnsignedIntegersDup2();
+    static void DescriptorsDup2();
+    };
+
+#endif  // __HELLOTRACETYPES_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/dll/incDup/HelloTraceFnDup.inl	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,156 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+#ifndef HELLOTRACEFNDUP_H_
+#define HELLOTRACEFNDUP_H_
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTraceFnDupTraces.h"
+#endif
+
+inline void CHelloTraceFn::SimpleDup()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_SIMPLE_DUP_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_SIMPLE_DUP_EXIT, this );
+    }
+
+inline void CHelloTraceFn::OutputsParamsDup(TInt aParam, TFnEnum aEnumParam)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSPARAMS_DUP_ENTRY, this );
+    Simple();
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSPARAMS_DUP_EXIT, this );
+    }
+
+inline void CHelloTraceFn::StaticOutputsParamsDupL(TInt aParam)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_STATICOUTPUTSPARAMS_DUP_ENTRY, NULL );
+    CHelloTraceFn* example = CHelloTraceFn::NewLC();
+    example->SimpleDup();    
+    CleanupStack::PopAndDestroy(example);
+    OstTraceFunctionExit0( CHELLOTRACEFN_STATICOUTPUTSPARAMS_DUP_EXIT );    
+    }
+
+inline void CHelloTraceFn::OutputsSignedIntegersDup(TInt8 aParam8,   TInt16 aParam16, 
+                                          TInt32 aParam32, TInt64 aParam64)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS_DUP_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS_DUP_EXIT, this );
+    }
+
+void CHelloTraceFn::OutputsUnsignedIntegersDup(TUint8 aParam8,   TUint16 aParam16, 
+                                            TUint32 aParam32, TUint64 aParam64)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS_DUP_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS_DUP_EXIT, this );
+    }
+
+
+inline TInt CHelloTraceFn::OutputsTIntReturnValueDup()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_DUP_ENTRY, this );
+    TInt ret = KErrNone;
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_DUP_EXIT, this, ret );
+    return ret;
+    }
+
+inline TInt64 CHelloTraceFn::OutputsTInt64ReturnValueDup()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE_DUP_ENTRY, this );
+    TInt64 ret = (TInt64) 2 << 40;
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE_DUP_EXIT, this, ret );
+    return ret;
+    }
+
+inline CHelloTraceFn::TFnEnum CHelloTraceFn::OutputsTFnEnumReturnValueDup()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE_DUP_ENTRY, this );
+    TFnEnum ret = EExample1;
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE_DUP_EXIT, this, ret );
+    return ret;    
+    }
+
+inline CActive* CHelloTraceFn::OutputsUnknownPtrTypeDup(CActive* aActive)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_DUP_ENTRY, this );    
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_DUP_EXIT, this, (TUint) aActive );
+    return aActive;
+    }
+
+inline CActive& CHelloTraceFn::OutputsUnknownRefTypeDup(CActive& aActive)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE_DUP_ENTRY, this );
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE_DUP_EXIT, this, (TUint) &aActive );    
+    return aActive;
+    }
+
+// The following doesn't compile as the Trace Compiler doesn't generate
+// the correct OstTraceGenExt(...) function for it
+//void CHelloTraceFn::OutputMissingParamsBug(TInt /*aCommentParam*/, TInt)
+//    {
+//    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_ENTRY, this );
+//    // ...
+//    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_EXIT, this );    
+//    }
+
+// The following compiles and works but outputs the following warning
+// warning: HelloTraceFn.cpp, line xxx: Parameter did not have a name and was not added to trace
+// The fact that this cannot be suppressed is a known problem we're working on.
+inline void CHelloTraceFn::OutputMissingParamsDup(TInt aUsedParam, TInt /*aCommentParam*/, TInt)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMS_DUP_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMS_DUP_EXIT, this );
+    }
+
+// The following doesn't work as the Trace Compiler outputs:
+// error: HelloTraceFn.cpp, line xxx: Class / function name for trace could not be determined x3
+//#ifdef _DEBUG
+//void CHelloTraceFn::PreProcessedFn(TInt aDbgParam)
+//    {
+//    OstTraceFunctionEntryExt( PRE_PROCESSED_ENTRTY_1, this );
+//#else
+//void CHelloTraceFn::PreProcessedFn()
+//    {
+//    OstTraceFunctionEntry1( PRE_PROCESSED_ENTRTY_2, this );
+//#endif
+//    Simple();
+//    OstTraceFunctionExit1( CHELLOTRACEFN_PREPROCESSEDFN_EXIT, this );
+//    }
+
+// Workaround example code until a proper fix is provided
+#ifdef _DEBUG
+inline void CHelloTraceFn::PreProcessedFnDup(TInt aDbgParam)
+    {
+    OstTraceExt2( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_DUP_ENTRY_1, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;aDbgParam=%d;this=%x", (TInt) aDbgParam, (TUint) this);
+#else
+    inline void CHelloTraceFn::PreProcessedFnDup()
+    {
+    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_DUP_ENTRY_2, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
+#endif
+    SimpleDup();
+    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_DUP_EXIT, "CHelloTraceFn::PreProcessedFn: < CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
+    }
+
+#endif /* HELLOTRACEFNDUP_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/dll/incDup/HelloTraceFnDup2.inl	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,157 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef HELLOTRACEFNDUP2_H_
+#define HELLOTRACEFNDUP2_H_
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTraceFnDup2Traces.h"
+#endif
+
+inline void CHelloTraceFn::SimpleDup2()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_SIMPLE_DUP2_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_SIMPLE_DUP2_EXIT, this );
+    }
+
+inline void CHelloTraceFn::OutputsParamsDup2(TInt aParam, TFnEnum aEnumParam)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSPARAMS_DUP2_ENTRY, this );
+    Simple();
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSPARAMS_DUP2_EXIT, this );
+    }
+
+inline void CHelloTraceFn::StaticOutputsParamsDup2L(TInt aParam)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_STATICOUTPUTSPARAMS_DUP2_ENTRY, NULL );
+    CHelloTraceFn* example = CHelloTraceFn::NewLC();
+    example->SimpleDup2();    
+    CleanupStack::PopAndDestroy(example);
+    OstTraceFunctionExit0( CHELLOTRACEFN_STATICOUTPUTSPARAMS_DUP2_EXIT );    
+    }
+
+inline void CHelloTraceFn::OutputsSignedIntegersDup2(TInt8 aParam8,   TInt16 aParam16, 
+                                          TInt32 aParam32, TInt64 aParam64)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS_DUP2_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS_DUP2_EXIT, this );
+    }
+
+inline void CHelloTraceFn::OutputsUnsignedIntegersDup2(TUint8 aParam8,   TUint16 aParam16, 
+                                            TUint32 aParam32, TUint64 aParam64)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS_DUP2_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS_DUP2_EXIT, this );
+    }
+
+
+inline TInt CHelloTraceFn::OutputsTIntReturnValueDup2()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_DUP2_ENTRY, this );
+    TInt ret = KErrNone;
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_DUP2_EXIT, this, ret );
+    return ret;
+    }
+
+inline TInt64 CHelloTraceFn::OutputsTInt64ReturnValueDup2()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE_DUP2_ENTRY, this );
+    TInt64 ret = (TInt64) 2 << 40;
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE_DUP2_EXIT, this, ret );
+    return ret;
+    }
+
+inline CHelloTraceFn::TFnEnum CHelloTraceFn::OutputsTFnEnumReturnValueDup2()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE_DUP2_ENTRY, this );
+    TFnEnum ret = EExample1;
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE_DUP2_EXIT, this, ret );
+    return ret;    
+    }
+
+inline CActive* CHelloTraceFn::OutputsUnknownPtrTypeDup2(CActive* aActive)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_DUP2_ENTRY, this );    
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_DUP2_EXIT, this, (TUint) aActive );
+    return aActive;
+    }
+
+inline CActive& CHelloTraceFn::OutputsUnknownRefTypeDup2(CActive& aActive)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE_DUP2_ENTRY, this );
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE_DUP2_EXIT, this, (TUint) &aActive );    
+    return aActive;
+    }
+
+// The following doesn't compile as the Trace Compiler doesn't generate
+// the correct OstTraceGenExt(...) function for it
+//void CHelloTraceFn::OutputMissingParamsBug(TInt /*aCommentParam*/, TInt)
+//    {
+//    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_ENTRY, this );
+//    // ...
+//    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_EXIT, this );    
+//    }
+
+// The following compiles and works but outputs the following warning
+// warning: HelloTraceFn.cpp, line xxx: Parameter did not have a name and was not added to trace
+// The fact that this cannot be suppressed is a known problem we're working on.
+inline void CHelloTraceFn::OutputMissingParamsDup2(TInt aUsedParam, TInt /*aCommentParam*/, TInt)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMS_DUP2_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMS_DUP2_EXIT, this );
+    }
+
+// The following doesn't work as the Trace Compiler outputs:
+// error: HelloTraceFn.cpp, line xxx: Class / function name for trace could not be determined x3
+//#ifdef _DEBUG
+//void CHelloTraceFn::PreProcessedFn(TInt aDbgParam)
+//    {
+//    OstTraceFunctionEntryExt( PRE_PROCESSED_ENTRTY_1, this );
+//#else
+//void CHelloTraceFn::PreProcessedFn()
+//    {
+//    OstTraceFunctionEntry1( PRE_PROCESSED_ENTRTY_2, this );
+//#endif
+//    Simple();
+//    OstTraceFunctionExit1( CHELLOTRACEFN_PREPROCESSEDFN_EXIT, this );
+//    }
+
+// Workaround example code until a proper fix is provided
+#ifdef _DEBUG
+inline void CHelloTraceFn::PreProcessedFnDup2(TInt aDbgParam)
+    {
+    OstTraceExt2( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_DUP2_ENTRY_1, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;aDbgParam=%d;this=%x", (TInt) aDbgParam, (TUint) this);
+#else
+    inline void CHelloTraceFn::PreProcessedFnDup2()
+    {
+    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_DUP2_ENTRY_2, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
+#endif
+    SimpleDup2();
+    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_DUP2_EXIT, "CHelloTraceFn::PreProcessedFn: < CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
+    }
+
+#endif /* HELLOTRACEFNDUP2_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/dll/incDup/HelloTraceInterfaceDup.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,91 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef __HELLOTRACEINTERFACEDUP_H__
+#define __HELLOTRACEINTERFACEDUP_H__
+
+#include "HelloTracePanic.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTraceInterfaceDupTraces.h"
+#endif
+
+ inline EXPORT_C TVersion CHelloTraceInterface::VersionDup()
+        {
+        const TInt KMajor = 1;
+        const TInt KMinor = 0;
+        const TInt KBuild = 1;
+        TVersion version = TVersion(KMajor, KMinor, KBuild);
+        OstTraceExt1( TRACE_BORDER, CHELLOTRACEDLL_VERSION_DUP, "CHelloTraceInterface::Version = %S", version.Name());   
+        return version;
+        }
+
+ inline EXPORT_C const TPtrC CHelloTraceInterface::StringDup() const
+        {
+        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
+
+        OstTraceDefExt2( OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CHELLOTRACEDLL_STRING_DUP, 
+                         "[0x%08x] Returned %S", (TUint32) this, *iString);   
+        return *iString;
+        }
+
+ inline EXPORT_C void CHelloTraceInterface::AddCharDupL(const TChar& aChar)
+        {
+        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
+
+        OstTraceExt3( TRACE_BORDER, CHELLOTRACEDLL_ADDCHARL_DUP, 
+                      "[0x%08x] Adding %d to %S", (TUint32) this, (TInt32) aChar, *iString);   
+        if (iString->Length() >= KHelloTraceDllBufferLength)
+            {
+            OstTrace1( TRACE_ERROR, CHELLOTRACEDLL_ADDCHARL_ERR_DUP,
+                       "[0x%08x] Not enough space to add character", (TUint32) this);
+            User::Leave( KErrTooBig);
+            }
+        iString->Append(aChar);
+        }
+
+ inline EXPORT_C void CHelloTraceInterface::RemoveLastDup()
+        {
+        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
+
+        OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_REMOVELAST_DUP, 
+                      "[0x%08x] Attempting to remove last character from %S", (TUint32) this, *iString);
+        if (iString->Length() > 0)
+            {
+            iString->SetLength(iString->Length() - 1);
+            }
+        else
+            {
+            OstTrace1( TRACE_WARNING, CHELLOTRACEDLL_REMOVELAST_WARN_DUP, "[0x%08x] String already empty", (TUint32) this);   
+            }
+        }
+
+ inline EXPORT_C void CHelloTraceInterface::ResetStringDup()
+        {
+        OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_RESETSTRING_DUP, "[0x%08x] Reseting string %S", (TUint32) this, *iString);
+        if (iString == NULL)
+            {
+            iString = new (ELeave) THelloTraceDllExampleString;
+            }
+        else
+            {
+            iString->SetLength(0);
+            }
+        }
+#endif  // __HELLOTRACEINTERFACEDUP_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/dll/incDup/HelloTraceInterfaceDup2.inl	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,91 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef __HELLOTRACEINTERFACEDUP2_H__
+#define __HELLOTRACEINTERFACEDUP2_H__
+
+#include "HelloTracePanic.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTraceInterfaceDup2Traces.h"
+#endif
+
+ inline EXPORT_C TVersion CHelloTraceInterface::VersionDup2()
+        {
+        const TInt KMajor = 1;
+        const TInt KMinor = 0;
+        const TInt KBuild = 1;
+        TVersion version = TVersion(KMajor, KMinor, KBuild);
+        OstTraceExt1( TRACE_BORDER, CHELLOTRACEDLL_VERSION_DUP2, "CHelloTraceInterface::Version = %S", version.Name());   
+        return version;
+        }
+
+ inline EXPORT_C const TPtrC CHelloTraceInterface::StringDup2() const
+        {
+        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
+
+        OstTraceDefExt2( OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CHELLOTRACEDLL_STRING_DUP2, 
+                         "[0x%08x] Returned %S", (TUint32) this, *iString);   
+        return *iString;
+        }
+
+ inline EXPORT_C void CHelloTraceInterface::AddCharDup2L(const TChar& aChar)
+        {
+        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
+
+        OstTraceExt3( TRACE_BORDER, CHELLOTRACEDLL_ADDCHARL_DUP2, 
+                      "[0x%08x] Adding %d to %S", (TUint32) this, (TInt32) aChar, *iString);   
+        if (iString->Length() >= KHelloTraceDllBufferLength)
+            {
+            OstTrace1( TRACE_ERROR, CHELLOTRACEDLL_ADDCHARL_ERR_DUP2,
+                       "[0x%08x] Not enough space to add character", (TUint32) this);
+            User::Leave( KErrTooBig);
+            }
+        iString->Append(aChar);
+        }
+
+ inline EXPORT_C void CHelloTraceInterface::RemoveLastDup2()
+        {
+        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
+
+        OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_REMOVELAST_DUP2, 
+                      "[0x%08x] Attempting to remove last character from %S", (TUint32) this, *iString);
+        if (iString->Length() > 0)
+            {
+            iString->SetLength(iString->Length() - 1);
+            }
+        else
+            {
+            OstTrace1( TRACE_WARNING, CHELLOTRACEDLL_REMOVELAST_WARN_DUP2, "[0x%08x] String already empty", (TUint32) this);   
+            }
+        }
+
+ inline EXPORT_C void CHelloTraceInterface::ResetStringDup2()
+        {
+        OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_RESETSTRING_DUP2, "[0x%08x] Reseting string %S", (TUint32) this, *iString);
+        if (iString == NULL)
+            {
+            iString = new (ELeave) THelloTraceDllExampleString;
+            }
+        else
+            {
+            iString->SetLength(0);
+            }
+        }
+#endif  // __HELLOTRACEINTERFACEDUP2_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/dll/incDup/HelloTraceTypesDup.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,75 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef __HELLOTRACETYPESDUP_H__
+#define __HELLOTRACETYPESDUP_H__
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTraceTypesDupTraces.h"
+#endif
+
+inline void HelloTraceTypes::SignedIntegersDup()
+    {
+    TInt8  eightBit     = - (TInt8)  1 << 6;
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP_8, 
+                  "8 bit signed: %hhd", eightBit );
+    
+    TInt16 sixteenBit   = - (TInt16) 1 << 14; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP_16, 
+                  "16 bit signed: %hd", sixteenBit );
+
+    TInt32 thirtyTwoBit = - (TInt32) 1 << 30; 
+    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP_32, 
+               "32 bit signed: %d", thirtyTwoBit );
+
+    TInt64 sixtyFourBit = - (TInt64) 1 << 62; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP_64, 
+                  "64 bit signed: %Ld", sixtyFourBit );
+    }
+
+inline void HelloTraceTypes::UnsignedIntegersDup()
+    {
+    TUint8  eightBit     = (TUint8)  1 << 6;
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP_8, 
+                  "8 bit unsigned: %hhu", eightBit );
+    
+    TUint16 sixteenBit   = (TUint16) 1 << 14; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP_16, 
+                  "16 bit unsigned: %hu", sixteenBit );
+
+    TUint32 thirtyTwoBit = (TUint32) 1 << 30; 
+    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP_32, 
+               "32 bit unsigned: %u", thirtyTwoBit );
+
+    TUint64 sixtyFourBit = (TUint64) 1 << 62; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP_64, 
+                  "64 bit unsigned: %Lu", sixtyFourBit );
+    }
+
+inline void HelloTraceTypes::DescriptorsDup()
+    {
+    _LIT8(KAscii, "Some ASCII text");
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_ASCIIDUP, "8 bit descriptor: %s", KAscii() );
+
+    _LIT16(KUnicode, "Some unicode text");    
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNICODEDUP, "16 bit descriptor: %S", KUnicode() );
+    }
+
+#endif  // __HELLOTRACETYPESDUP_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/dll/incDup/HelloTraceTypesDup2.inl	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,75 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef __HELLOTRACETYPESDUP2_H__
+#define __HELLOTRACETYPESDUP2_H__
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTraceTypesDup2Traces.h"
+#endif
+
+inline void HelloTraceTypes::SignedIntegersDup2()
+    {
+    TInt8  eightBit     = - (TInt8)  1 << 6;
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP2_8, 
+                  "8 bit signed: %hhd", eightBit );
+    
+    TInt16 sixteenBit   = - (TInt16) 1 << 14; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP2_16, 
+                  "16 bit signed: %hd", sixteenBit );
+
+    TInt32 thirtyTwoBit = - (TInt32) 1 << 30; 
+    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP2_32, 
+               "32 bit signed: %d", thirtyTwoBit );
+
+    TInt64 sixtyFourBit = - (TInt64) 1 << 62; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP2_64, 
+                  "64 bit signed: %Ld", sixtyFourBit );
+    }
+
+inline void HelloTraceTypes::UnsignedIntegersDup2()
+    {
+    TUint8  eightBit     = (TUint8)  1 << 6;
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP2_8, 
+                  "8 bit unsigned: %hhu", eightBit );
+    
+    TUint16 sixteenBit   = (TUint16) 1 << 14; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP2_16, 
+                  "16 bit unsigned: %hu", sixteenBit );
+
+    TUint32 thirtyTwoBit = (TUint32) 1 << 30; 
+    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP2_32, 
+               "32 bit unsigned: %u", thirtyTwoBit );
+
+    TUint64 sixtyFourBit = (TUint64) 1 << 62; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP2_64, 
+                  "64 bit unsigned: %Lu", sixtyFourBit );
+    }
+
+inline void HelloTraceTypes::DescriptorsDup2()
+    {
+    _LIT8(KAscii, "Some ASCII text");
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_ASCIIDUP2, "8 bit descriptor: %s", KAscii() );
+
+    _LIT16(KUnicode, "Some unicode text");    
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNICODEDUP2, "16 bit descriptor: %S", KUnicode() );
+    }
+
+#endif  // __HELLOTRACETYPESDUP2_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/dll/src/HelloTraceExample.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,107 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#include "HelloTraceExample.h"
+#include "HelloTraceTypes.h"
+#include "HelloTraceInterface.h"
+#include "HelloTraceFn.h"
+#include "HelloTracePanic.h"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTraceExampleTraces.h"
+#endif
+
+EXPORT_C void HelloTraceExample::JustTypes()
+    {
+    OstTrace0( TRACE_EXAMPLE, HELLOTRACEEXAMPLE_JUSTTYPES, "*********************************************** " );
+    
+    HelloTraceTypes::SignedIntegers();
+    HelloTraceTypes::UnsignedIntegers();
+    HelloTraceTypes::Descriptors();    
+    }
+
+EXPORT_C void HelloTraceExample::Interface()
+    {
+    OstTrace0( TRACE_EXAMPLE, HELLOTRACEEXAMPLE_INTERFACE, "*********************************************** " );
+    
+    TVersion version = CHelloTraceInterface::Version();   
+    if (version.iMajor >= 1) 
+        {
+        CHelloTraceInterface* example = CHelloTraceInterface::NewLC();
+        example->AddCharL('H');
+        example->AddCharL('e');
+        example->AddCharL('l');
+        example->AddCharL('l');
+        example->AddCharL('o');
+        example->AddCharL('T');        
+        example->RemoveLast();        
+        example->AddCharL(' ');
+        example->AddCharL('T');
+        example->AddCharL('r');
+        example->AddCharL('a');
+        example->AddCharL('c');
+        example->AddCharL('e');
+        example->AddCharL('!');
+        CleanupStack::PopAndDestroy(example);
+        }
+    else
+        {
+        OstTrace0( TRACE_ERROR, HELLOTRACEEXAMPLE_UNSUPPORTED_VERSION, "Unsupported version!");
+        }
+    }
+
+EXPORT_C void HelloTraceExample::FnEntryExit()
+    {
+    OstTrace0( TRACE_EXAMPLE, HELLOTRACEEXAMPLE_FNENTRYEXIT, "*********************************************** " );
+       
+    CHelloTraceFn* example = CHelloTraceFn::NewLC();
+    CIdle* idle = CIdle::NewL(CActive::EPriorityIdle);
+    CleanupStack::PushL(idle);
+
+    CHelloTraceFn::StaticOutputsParamsL(1);
+   
+    example->Simple();
+    example->OutputsParams(2, CHelloTraceFn::EExample1);
+    example->OutputsParams2(2, CHelloTraceFn::EExample1);
+    example->OutputsParams3(2, CHelloTraceFn::EExample1);
+    example->OutputsParams(3, CHelloTraceFn::EExample2);
+    example->OutputsSignedIntegers(-4, -5, -6, -7);
+    example->OutputsUnsignedIntegers(8, 9, 10, 11);
+    example->OutputsTIntReturnValue();    
+    example->OutputsTInt64ReturnValue(); 
+    example->OutputsTFnEnumReturnValue();
+    example->OutputsUnknownPtrType(idle);    
+    example->OutputsUnknownRefType(*idle);
+#ifdef _DEBUG
+    example->PreProcessedFn(12);
+#else
+    example->PreProcessedFn();
+#endif
+    example->OutputMissingParams(13, 14, 15);
+
+    CleanupStack::PopAndDestroy(idle);
+    CleanupStack::PopAndDestroy(example);
+    }
+
+EXPORT_C void HelloTraceExample::PanicTrace()
+    {
+    OstTrace0( TRACE_EXAMPLE, HELLOTRACEEXAMPLE_PANIC, "*********************************************** " );
+
+    Panic(EHelloTraceDllExamplePanic);
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/dll/src/HelloTraceFn.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,200 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+ 
+#include "HelloTraceFn.h"
+#include "HelloTraceFnDup.inl"
+#include "HelloTraceFnDup2.inl"
+#include "HelloTracePanic.h"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTraceFnTraces.h"
+#endif
+
+
+CHelloTraceFn* CHelloTraceFn::NewLC()
+    {
+    CHelloTraceFn* self = new (ELeave) CHelloTraceFn;
+    CleanupStack::PushL(self);
+    return self;
+    }
+
+CHelloTraceFn* CHelloTraceFn::NewL()
+    {
+    CHelloTraceFn* self = CHelloTraceFn::NewLC();
+    CleanupStack::Pop(self);
+    return self;
+    }
+
+CHelloTraceFn::CHelloTraceFn()
+    {
+    OstTrace1( TRACE_NORMAL, CHELLOTRACEFN_CHELLOTRACEFN_CTOR, "[0x%08x] Constructor", this );  
+    OstTrace1( TRACE_NORMAL, CHELLOTRACEFN_CHELLOTRACEFN_CTOR_TEXTWITHTAB, "[0x%08x] Constructor -   Trace text with tabs", this );
+    }
+
+CHelloTraceFn::~CHelloTraceFn()
+    {
+    OstTrace1( TRACE_NORMAL, CHELLOTRACEFN_CHELLOTRACEFN_DTOR, "[0x%08x] Destructor", this );    
+    }
+
+void CHelloTraceFn::Simple()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_SIMPLE_ENTRY, this );
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_SIMPLE_ENTRY_EXT_NO_PARAM, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_SIMPLE_EXIT, this );
+    }
+
+void CHelloTraceFn::OutputsParams(TInt aParam, TFnEnum aEnumParam)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSPARAMS_ENTRY, this );
+    Simple();
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSPARAMS_EXIT, this );
+    }
+void CHelloTraceFn::OutputsParams2(TInt /*aParam*/, TFnEnum aEnumParam)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSPARAMS2_PRAMCOMMENTED_ENTRY, this );
+    Simple();
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSPARAMS2_EXIT, this );
+    }
+    
+void CHelloTraceFn::OutputsParams3(TInt /*aParam*/, TFnEnum /*aEnumParam*/)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSPARAMS3_ALLPARAMCOMMENTED_ENTRY, this );
+    Simple();
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSPARAMS3_EXIT, this );
+    }    
+
+void CHelloTraceFn::StaticOutputsParamsL(TInt aParam)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_STATICOUTPUTSPARAMS_ENTRY, NULL );
+    CHelloTraceFn* example = CHelloTraceFn::NewLC();
+    example->Simple();    
+    CleanupStack::PopAndDestroy(example);
+    OstTraceFunctionExit0( CHELLOTRACEFN_STATICOUTPUTSPARAMS_EXIT );    
+    }
+
+void CHelloTraceFn::OutputsSignedIntegers(TInt8 aParam8,   TInt16 aParam16, 
+                                          TInt32 aParam32, TInt64 aParam64)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS_EXIT, this );
+    }
+
+void CHelloTraceFn::OutputsUnsignedIntegers(TUint8 aParam8,   TUint16 aParam16, 
+                                            TUint32 aParam32, TUint64 aParam64)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS_EXIT, this );
+    }
+
+
+TInt CHelloTraceFn::OutputsTIntReturnValue()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_ENTRY, this );
+    TInt ret = KErrNone;
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_EXIT, this, ret );
+    return ret;
+    }
+
+TInt64 CHelloTraceFn::OutputsTInt64ReturnValue()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE_ENTRY, this );
+    TInt64 ret = (TInt64) 2 << 40;
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE_EXIT, this, ret );
+    return ret;
+    }
+
+CHelloTraceFn::TFnEnum CHelloTraceFn::OutputsTFnEnumReturnValue()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE_ENTRY, this );
+    TFnEnum ret = EExample1;
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE_EXIT, this, ret );
+    return ret;    
+    }
+
+CActive* CHelloTraceFn::OutputsUnknownPtrType(CActive* aActive)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_ENTRY, this );    
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_EXIT, this, (TUint) aActive );
+    return aActive;
+    }
+
+CActive& CHelloTraceFn::OutputsUnknownRefType(CActive& aActive)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE_ENTRY, this );
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE_EXIT, this, (TUint) &aActive );    
+    return aActive;
+    }
+
+// The following doesn't compile as the Trace Compiler doesn't generate
+// the correct OstTraceGenExt(...) function for it
+//void CHelloTraceFn::OutputMissingParamsBug(TInt /*aCommentParam*/, TInt)
+//    {
+//    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_ENTRY, this );
+//    // ...
+//    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_EXIT, this );    
+//    }
+
+// The following compiles and works but outputs the following warning
+// warning: HelloTraceFn.cpp, line xxx: Parameter did not have a name and was not added to trace
+// The fact that this cannot be suppressed is a known problem we're working on.
+void CHelloTraceFn::OutputMissingParams(TInt aUsedParam, TInt /*aCommentParam*/, TInt)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMS_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMS_EXIT, this );
+    }
+
+// The following doesn't work as the Trace Compiler outputs:
+// error: HelloTraceFn.cpp, line xxx: Class / function name for trace could not be determined x3
+//#ifdef _DEBUG
+//void CHelloTraceFn::PreProcessedFn(TInt aDbgParam)
+//    {
+//    OstTraceFunctionEntryExt( PRE_PROCESSED_ENTRTY_1, this );
+//#else
+//void CHelloTraceFn::PreProcessedFn()
+//    {
+//    OstTraceFunctionEntry1( PRE_PROCESSED_ENTRTY_2, this );
+//#endif
+//    Simple();
+//    OstTraceFunctionExit1( CHELLOTRACEFN_PREPROCESSEDFN_EXIT, this );
+//    }
+
+// Workaround example code until a proper fix is provided
+#ifdef _DEBUG
+void CHelloTraceFn::PreProcessedFn(TInt aDbgParam)
+    {
+    OstTraceExt2( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_ENTRY_1, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;aDbgParam=%d;this=%x", (TInt) aDbgParam, (TUint) this);
+#else
+void CHelloTraceFn::PreProcessedFn()
+    {
+    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_ENTRY_2, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
+#endif
+    Simple();
+    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_EXIT, "CHelloTraceFn::PreProcessedFn: < CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
+    }
+
+	
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/dll/src/HelloTraceInterface.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,121 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+
+#include "HelloTraceInterface.h"
+#include "HelloTraceInterfaceDup.h"
+#include "HelloTraceInterfaceDup2.inl"
+#include "HelloTracePanic.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTraceInterfaceTraces.h"
+#endif
+
+EXPORT_C CHelloTraceInterface* CHelloTraceInterface::NewLC()
+    {
+    CHelloTraceInterface* self = new (ELeave) CHelloTraceInterface;
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    return self;
+    }
+
+EXPORT_C CHelloTraceInterface* CHelloTraceInterface::NewL()
+    {
+    CHelloTraceInterface* self = CHelloTraceInterface::NewLC();
+    CleanupStack::Pop(self);
+    return self;
+    }
+
+CHelloTraceInterface::CHelloTraceInterface()
+    {
+    OstTrace1( TRACE_NORMAL, CHELLOTRACEDLL_CHELLOTRACEDLL_CTOR, "[0x%08x]", (TUint32) this );    
+    }
+
+void CHelloTraceInterface::ConstructL()
+    {
+    iString = new (ELeave) THelloTraceDllExampleString;
+    }
+
+EXPORT_C CHelloTraceInterface::~CHelloTraceInterface()
+    {
+    delete iString;
+    OstTrace1( TRACE_NORMAL, CHELLOTRACEDLL_CHELLOTRACEDLL_DTOR, "[0x%08x]", (TUint32) this );    
+    }
+
+EXPORT_C TVersion CHelloTraceInterface::Version()
+    {
+    const TInt KMajor = 1;
+    const TInt KMinor = 0;
+    const TInt KBuild = 1;
+    TVersion version = TVersion(KMajor, KMinor, KBuild);
+    OstTraceExt1( TRACE_BORDER, CHELLOTRACEDLL_VERSION, "CHelloTraceInterface::Version = %S", version.Name());   
+    return version;
+    }
+
+EXPORT_C const TPtrC CHelloTraceInterface::String() const
+    {
+    __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
+
+    OstTraceDefExt2( OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CHELLOTRACEDLL_STRING, 
+                     "[0x%08x] Returned %S", (TUint32) this, *iString);   
+    return *iString;
+    }
+
+EXPORT_C void CHelloTraceInterface::AddCharL(const TChar& aChar)
+    {
+    __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
+
+    OstTraceExt3( TRACE_BORDER, CHELLOTRACEDLL_ADDCHARL, 
+                  "[0x%08x] Adding %d to %S", (TUint32) this, (TInt32) aChar, *iString);   
+    if (iString->Length() >= KHelloTraceDllBufferLength)
+        {
+        OstTrace1( TRACE_ERROR, CHELLOTRACEDLL_ADDCHARL_ERR,
+                   "[0x%08x] Not enough space to add character", (TUint32) this);
+        User::Leave( KErrTooBig);
+        }
+    iString->Append(aChar);
+    }
+
+EXPORT_C void CHelloTraceInterface::RemoveLast()
+    {
+    __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
+
+    OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_REMOVELAST, 
+                  "[0x%08x] Attempting to remove last character from %S", (TUint32) this, *iString);
+    if (iString->Length() > 0)
+        {
+        iString->SetLength(iString->Length() - 1);
+        }
+    else
+        {
+        OstTrace1( TRACE_WARNING, CHELLOTRACEDLL_REMOVELAST_WARN, "[0x%08x] String already empty", (TUint32) this);   
+        }
+    }
+
+EXPORT_C void CHelloTraceInterface::ResetString()
+    {
+    OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_RESETSTRING, "[0x%08x] Reseting string %S", (TUint32) this, *iString);
+    if (iString == NULL)
+        {
+        iString = new (ELeave) THelloTraceDllExampleString;
+        }
+    else
+        {
+        iString->SetLength(0);
+        }
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/dll/src/HelloTracePanic.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,32 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#include <e32std.h>		 // GLDEF_C
+
+#include "HelloTracePanic.h"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTracePanicTraces.h"
+#endif
+
+GLDEF_C void Panic(THelloTraceDllPanic aPanic)
+    {
+    OstTrace1( TRACE_FATAL, PANIC, "Panic(%{THelloTraceDllPanic})", (TUint) aPanic );    
+    User::Panic(_L("HelloTraceDll"), aPanic);
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/dll/src/HelloTraceTypes.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,76 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+
+#include <e32std.h>
+
+#include "HelloTraceTypes.h"
+#include "HelloTraceTypesDup.h"
+#include "HelloTraceTypesDup2.inl"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTraceTypesTraces.h"
+#endif
+
+void HelloTraceTypes::SignedIntegers()
+    {
+    TInt8  eightBit     = - (TInt8)  1 << 6;
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS_8, 
+                  "8 bit signed: %hhd", eightBit );
+    
+    TInt16 sixteenBit   = - (TInt16) 1 << 14; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS_16, 
+                  "16 bit signed: %hd", sixteenBit );
+
+    TInt32 thirtyTwoBit = - (TInt32) 1 << 30; 
+    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS_32, 
+               "32 bit signed: %d", thirtyTwoBit );
+
+    TInt64 sixtyFourBit = - (TInt64) 1 << 62; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS_64, 
+                  "64 bit signed: %Ld", sixtyFourBit );
+    }
+
+void HelloTraceTypes::UnsignedIntegers()
+    {
+    TUint8  eightBit     = (TUint8)  1 << 6;
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS_8, 
+                  "8 bit unsigned: %hhu", eightBit );
+    
+    TUint16 sixteenBit   = (TUint16) 1 << 14; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS_16, 
+                  "16 bit unsigned: %hu", sixteenBit );
+
+    TUint32 thirtyTwoBit = (TUint32) 1 << 30; 
+    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS_32, 
+               "32 bit unsigned: %u", thirtyTwoBit );
+
+    TUint64 sixtyFourBit = (TUint64) 1 << 62; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS_64, 
+                  "64 bit unsigned: %Lu", sixtyFourBit );
+    }
+
+void HelloTraceTypes::Descriptors()
+    {
+    _LIT8(KAscii, "Some ASCII text");
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_ASCII, "8 bit descriptor: %s", KAscii() );
+
+    _LIT16(KUnicode, "Some unicode text");    
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNICODE, "16 bit descriptor: %S", KUnicode() );
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/dll/traces/trace.properties	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<trace_properties>
+<enum name="TFnEnum">
+<value id="0">EExample1</value>
+<value id="2">EExample2</value>
+</enum>
+<enum name="THelloTraceDllPanic">
+<value id="0">EHelloTraceDllExamplePanic</value>
+<value id="1">EHelloTraceDllNullPointer</value>
+</enum>
+<file>../incDup/HelloTraceInterfaceDup.h</file>
+<file>../incDup/HelloTraceInterfaceDup2.inl</file>
+<file>../incDup/HelloTraceFnDup.inl</file>
+<file>../incDup/HelloTraceFnDup2.inl</file>
+<file>../incDup/HelloTraceTypesDup.h</file>
+<file>../incDup/HelloTraceTypesDup2.inl</file>
+</trace_properties>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/group/bld.inf	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,19 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+#include "../dll/group/bld.inf"
+#include "../console/group/bld.inf"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/console/group/HelloTraceConsole.mmp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,37 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+
+TARGET		  HelloTraceConsole.exe
+TARGETTYPE	  exe
+UID			  0 0xE40349E4
+
+OS_LAYER_SYSTEMINCLUDE
+USERINCLUDE	   ../inc
+USERINCLUDE    ../../dll/inc
+USERINCLUDE    ../traces
+
+SOURCEPATH	  ../src
+SOURCE		  HelloTraceConsole.cpp
+
+LIBRARY		  euser.lib
+LIBRARY       HelloTraceDll.lib
+
+#ifdef ENABLE_ABIV2_MODE
+DEBUGGABLE_UDEBONLY
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/console/group/bld.inf	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,27 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXPORTS
+hellotraceconsole.iby             CORE_OS_LAYER_IBY_EXPORT_PATH(hellotraceconsole.iby)
+
+PRJ_MMPFILES
+HelloTraceConsole.mmp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/console/group/hellotraceconsole.iby	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,24 @@
+// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+// ROM build file for tracecore project
+
+#ifndef HELLOTRACECONSOLE_IBY
+#define HELLOTRACECONSOLE_IBY
+
+#include <core\os\hellotracedll.iby>
+
+file=ABI_DIR\BUILD_DIR\hellotraceconsole.exe    Sys\Bin\hellotraceconsole.exe
+
+#endif //HELLOTRACECONSOLE_IBY
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/console/inc/HelloTraceConsole.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,31 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef __HELLOTRACECONSOLE_H__
+#define __HELLOTRACECONSOLE_H__
+
+//  Include Files
+
+#include <e32base.h>
+
+//  Function Prototypes
+
+GLDEF_C TInt E32Main();
+
+#endif  // __HELLOTRACECONSOLE_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/console/src/HelloTraceConsole.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,124 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#include <e32cons.h>			// Console
+
+#include "HelloTraceConsole.h"
+#include "HelloTraceExample.h"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTraceConsoleTraces.h"
+#endif
+
+
+_LIT(KTextConsoleTitle, "HelloTrace");
+_LIT(KTextPressAnyKey, " [press any key]\n");
+
+LOCAL_D CConsoleBase* console; // write all messages to this
+
+LOCAL_C void DoExamples()
+    {
+    TInt err = KErrNone;
+
+    console->Printf(_L("Before main tracing examples ...\n"));
+
+    console->Printf(_L(" Before type examples ..."));
+    console->Printf(KTextPressAnyKey);
+    console->Getch();
+    TRAP(err, HelloTraceExample::JustTypes());    
+    if (err)
+        console->Printf(_L(" Failed with error %d\n"), err);
+
+    console->Printf(_L(" Before Interface examples ..."));
+    console->Printf(KTextPressAnyKey);
+    console->Getch();
+    TRAP(err, HelloTraceExample::Interface());    
+    if (err)
+        console->Printf(_L(" Failed with error %d\n"), err);
+    
+    console->Printf(_L(" Before FnEntryExit examples ..."));
+    console->Printf(KTextPressAnyKey);
+    console->Getch();
+    TRAP(err, HelloTraceExample::FnEntryExit());    
+    if (err)
+        console->Printf(_L(" Failed with error %d\n"), err);    
+    }
+
+LOCAL_C void DoStartL()
+    {
+    // Create active scheduler (to run active objects)
+    CActiveScheduler* scheduler = new (ELeave) CActiveScheduler();
+    CleanupStack::PushL(scheduler);
+    CActiveScheduler::Install(scheduler);
+
+    DoExamples();
+    
+    // Delete active scheduler
+    CleanupStack::PopAndDestroy(scheduler);
+    }
+
+//  Global Functions
+
+GLDEF_C TInt E32Main()
+    {
+    OstTraceFunctionEntry0( E32MAIN_ENTRY );
+    
+    // Create cleanup stack
+    __UHEAP_MARK;
+    CTrapCleanup* cleanup = CTrapCleanup::New();
+
+    // Create output console
+    TRAPD(createError, 
+          console = Console::NewL(KTextConsoleTitle, 
+                                  TSize(KConsFullScreen, KConsFullScreen)));    
+    if (createError)
+        {
+        delete cleanup;
+        OstTrace1( TRACE_ERROR, E32MAIN_CREATE_ERROR, "Failed to create console error: %d", createError);
+        OstTraceFunctionExit0( E32MAIN_EXIT_ERR );
+        return createError;
+        }
+
+    TRAPD(mainError, DoStartL());    
+    if (mainError)
+        {
+        OstTrace1( TRACE_ERROR, E32MAIN_START_ERROR, "DoStartL failed with error: %d", mainError);
+        console->Printf(_L("DoStartL failed with error: %d\n\n"), mainError);
+        }
+    else 
+        {
+        console->Printf(_L("Before panic tracing example ..."));
+        console->Printf(KTextPressAnyKey);
+        console->Getch();
+    
+        OstTrace0( TRACE_FLOW, E32MAIN_BEFORE_PANIC, "About to cause a panic ..." );
+        HelloTraceExample::PanicTrace();
+        
+        console->Printf(KTextPressAnyKey);
+        console->Getch();
+        }
+
+    delete console;
+    delete cleanup;
+    __UHEAP_MARKEND;
+    
+    OstTraceFunctionExit0( E32MAIN_EXIT );
+    return KErrNone;
+    }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/dll/bwins/HelloTraceDllu.def	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,14 @@
+EXPORTS
+	?Version@CHelloTraceInterface@@SA?AVTVersion@@XZ @ 1 NONAME ; class TVersion CHelloTraceInterface::Version(void)
+	?NewLC@CHelloTraceInterface@@SAPAV1@XZ @ 2 NONAME ; class CHelloTraceInterface * CHelloTraceInterface::NewLC(void)
+	?JustTypes@HelloTraceExample@@SAXXZ @ 3 NONAME ; void HelloTraceExample::JustTypes(void)
+	?Interface@HelloTraceExample@@SAXXZ @ 4 NONAME ; void HelloTraceExample::Interface(void)
+	?FnEntryExit@HelloTraceExample@@SAXXZ @ 5 NONAME ; void HelloTraceExample::FnEntryExit(void)
+	?ResetString@CHelloTraceInterface@@QAEXXZ @ 6 NONAME ; void CHelloTraceInterface::ResetString(void)
+	?AddCharL@CHelloTraceInterface@@QAEXABVTChar@@@Z @ 7 NONAME ; void CHelloTraceInterface::AddCharL(class TChar const &)
+	?PanicTrace@HelloTraceExample@@SAXXZ @ 8 NONAME ; void HelloTraceExample::PanicTrace(void)
+	??1CHelloTraceInterface@@UAE@XZ @ 9 NONAME ; CHelloTraceInterface::~CHelloTraceInterface(void)
+	?String@CHelloTraceInterface@@QBE?BVTPtrC16@@XZ @ 10 NONAME ; class TPtrC16 const CHelloTraceInterface::String(void) const
+	?RemoveLast@CHelloTraceInterface@@QAEXXZ @ 11 NONAME ; void CHelloTraceInterface::RemoveLast(void)
+	?NewL@CHelloTraceInterface@@SAPAV1@XZ @ 12 NONAME ; class CHelloTraceInterface * CHelloTraceInterface::NewL(void)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/dll/eabi/HelloTraceDllu.def	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,20 @@
+EXPORTS
+	_ZN17HelloTraceExample10PanicTraceEv @ 1 NONAME
+	_ZN17HelloTraceExample11FnEntryExitEv @ 2 NONAME
+	_ZN17HelloTraceExample9InterfaceEv @ 3 NONAME
+	_ZN17HelloTraceExample9JustTypesEv @ 4 NONAME
+	_ZN20CHelloTraceInterface10RemoveLastEv @ 5 NONAME
+	_ZN20CHelloTraceInterface11ResetStringEv @ 6 NONAME
+	_ZN20CHelloTraceInterface4NewLEv @ 7 NONAME
+	_ZN20CHelloTraceInterface5NewLCEv @ 8 NONAME
+	_ZN20CHelloTraceInterface7VersionEv @ 9 NONAME
+	_ZN20CHelloTraceInterface8AddCharLERK5TChar @ 10 NONAME
+	_ZN20CHelloTraceInterfaceD0Ev @ 11 NONAME
+	_ZN20CHelloTraceInterfaceD1Ev @ 12 NONAME
+	_ZN20CHelloTraceInterfaceD2Ev @ 13 NONAME
+	_ZNK20CHelloTraceInterface6StringEv @ 14 NONAME
+	_ZTI13CHelloTraceFn @ 15 NONAME
+	_ZTI20CHelloTraceInterface @ 16 NONAME
+	_ZTV13CHelloTraceFn @ 17 NONAME
+	_ZTV20CHelloTraceInterface @ 18 NONAME
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/dll/group/HelloTraceDll.mmp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,40 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+
+TARGET		  HelloTraceDll.dll
+TARGETTYPE	  dll
+UID			  0x1000008d 0xE43DF43E
+CAPABILITY    ReadUserData
+
+OS_LAYER_SYSTEMINCLUDE
+USERINCLUDE  ../inc ../incDup
+USERINCLUDE  ../traces/HelloTraceDll_dll
+
+SOURCEPATH	 ../src
+SOURCE       HelloTraceExample.cpp 
+SOURCE       HelloTraceTypes.cpp
+SOURCE       HelloTraceInterface.cpp 
+SOURCE       HelloTraceFn.cpp 
+SOURCE       HelloTracePanic.cpp 
+
+LIBRARY		 euser.lib
+
+#ifdef ENABLE_ABIV2_MODE
+DEBUGGABLE_UDEBONLY
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/dll/group/bld.inf	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,27 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXPORTS
+hellotracedll.iby             CORE_OS_LAYER_IBY_EXPORT_PATH(hellotracedll.iby)
+
+PRJ_MMPFILES
+HelloTraceDll.mmp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/dll/group/hellotracedll.iby	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,22 @@
+// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+// ROM build file for tracecore project
+
+#ifndef HELLOTRACEDLL_IBY
+#define HELLOTRACEDLL_IBY
+
+file=ABI_DIR\BUILD_DIR\hellotracedll.dll        Sys\Bin\hellotracedll.dll
+
+#endif //HELLOTRACEDLL_IBY
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/dll/inc/HelloTraceExample.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,40 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef __HELLOTRACEEXAMPLE_H__
+#define __HELLOTRACEEXAMPLE_H__
+
+#include <e32std.h>
+
+class HelloTraceExample
+    {
+public:
+    IMPORT_C static void JustTypes();    
+    IMPORT_C static void Interface();    
+    IMPORT_C static void FnEntryExit();    
+    IMPORT_C static void PanicTrace();    
+
+    // @TODO add examples for state macros
+    // @TODO add examples for event macros
+    // @TODO add examples for OstTraceData
+    // @TODO add compile-time selector examples
+    // @TODO add macro wrapper examples
+    };
+
+#endif  // __HELLOTRACEEXAMPLE_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/dll/inc/HelloTraceFn.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,122 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef HELLOTRACEFN_H_
+#define HELLOTRACEFN_H_
+
+#include <e32base.h>    // CBase
+
+class CHelloTraceFn : public CBase
+    {
+public:
+    
+    // Note the Trace Builder will only parse this if it's in a cpp file
+    // but not from here :(
+    // Also if you add a new enum you need to reparse the enum - it doesn't
+    // get automatically reparsed by the Trace Compiler :(
+    enum TFnEnum
+        {
+        EExample1,
+        EExample2 = 2, 
+        // EExample3 = EExample2 + 1, // The Trace Builder can't parse this :(
+        };
+    
+public:
+    static CHelloTraceFn* NewL();
+    static CHelloTraceFn* NewLC();
+    ~CHelloTraceFn();
+   
+public: // Fn entry / exit tracing examples 
+    void Simple();
+    void OutputsParams(TInt aParam, TFnEnum aEnumParam);
+    void OutputsSignedIntegers(TInt8 aParam8,   TInt16 aParam16, 
+                               TInt32 aParam32, TInt64 aParam64);
+    void OutputsUnsignedIntegers(TUint8 aParam8,   TUint16 aParam16, 
+                                 TUint32 aParam32, TUint64 aParam64);
+     
+    TInt OutputsTIntReturnValue();
+    TInt64 OutputsTInt64ReturnValue();
+    TFnEnum OutputsTFnEnumReturnValue();
+
+    CActive* OutputsUnknownPtrType(CActive* aActive);
+    CActive& OutputsUnknownRefType(CActive& aActive);
+    
+    void OutputMissingParams(TInt aUsedParam, TInt aCommentParam, TInt aMissingParam);
+
+#ifdef _DEBUG    
+    void PreProcessedFn(TInt aDbgParam);
+#else
+    void PreProcessedFn();
+#endif
+    
+    static void StaticOutputsParamsL(TInt aParam);  
+    
+    // duplicate all the function and put the impl in the header file HelloTraceFnDup.h
+    void SimpleDup();
+    void OutputsParamsDup(TInt aParam, TFnEnum aEnumParam);
+    void OutputsSignedIntegersDup(TInt8 aParam8,   TInt16 aParam16, 
+                               TInt32 aParam32, TInt64 aParam64);
+    void OutputsUnsignedIntegersDup(TUint8 aParam8,   TUint16 aParam16, 
+                                 TUint32 aParam32, TUint64 aParam64);
+     
+    TInt OutputsTIntReturnValueDup();
+    TInt64 OutputsTInt64ReturnValueDup();
+    TFnEnum OutputsTFnEnumReturnValueDup();
+
+    CActive* OutputsUnknownPtrTypeDup(CActive* aActive);
+    CActive& OutputsUnknownRefTypeDup(CActive& aActive);
+    
+    void OutputMissingParamsDup(TInt aUsedParam, TInt aCommentParam, TInt aMissingParam);
+
+#ifdef _DEBUG    
+    void PreProcessedFnDup(TInt aDbgParam);
+#else
+    void PreProcessedFnDup();
+#endif
+    static void StaticOutputsParamsDupL(TInt aParam);  
+    
+    // duplicate all the function again and put the impl in the header file HelloTraceFnDup2.h
+    void SimpleDup2();
+    void OutputsParamsDup2(TInt aParam, TFnEnum aEnumParam);
+    void OutputsSignedIntegersDup2(TInt8 aParam8,   TInt16 aParam16, 
+                               TInt32 aParam32, TInt64 aParam64);
+    void OutputsUnsignedIntegersDup2(TUint8 aParam8,   TUint16 aParam16, 
+                                 TUint32 aParam32, TUint64 aParam64);
+     
+    TInt OutputsTIntReturnValueDup2();
+    TInt64 OutputsTInt64ReturnValueDup2();
+    TFnEnum OutputsTFnEnumReturnValueDup2();
+
+    CActive* OutputsUnknownPtrTypeDup2(CActive* aActive);
+    CActive& OutputsUnknownRefTypeDup2(CActive& aActive);
+    
+    void OutputMissingParamsDup2(TInt aUsedParam, TInt aCommentParam, TInt aMissingParam);
+
+#ifdef _DEBUG    
+    void PreProcessedFnDup2(TInt aDbgParam);
+#else
+    void PreProcessedFnDup2();
+#endif
+    static void StaticOutputsParamsDup2L(TInt aParam);  
+
+
+private:
+    CHelloTraceFn();
+    };
+
+#endif /* HELLOTRACEFN_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/dll/inc/HelloTraceInterface.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,63 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef __HELLOTRACEINTERFACE_H__
+#define __HELLOTRACEINTERFACE_H__
+
+#include <e32base.h>	// CBase
+#include <e32std.h>	 // TBuf
+
+const TInt KHelloTraceDllBufferLength = 10;
+typedef TBuf<KHelloTraceDllBufferLength> THelloTraceDllExampleString;
+
+class CHelloTraceInterface : public CBase
+    {
+public:
+    IMPORT_C static CHelloTraceInterface* NewL();
+    IMPORT_C static CHelloTraceInterface* NewLC();
+    IMPORT_C ~CHelloTraceInterface();
+
+public:
+    IMPORT_C static TVersion Version();
+    IMPORT_C const TPtrC String() const;
+    IMPORT_C void AddCharL(const TChar& aChar);
+    IMPORT_C void RemoveLast();
+    IMPORT_C void ResetString();
+    
+    IMPORT_C static TVersion VersionDup();
+    IMPORT_C const TPtrC StringDup() const;
+    IMPORT_C void AddCharDupL(const TChar& aChar);
+    IMPORT_C void RemoveLastDup();
+    IMPORT_C void ResetStringDup();
+
+    IMPORT_C static TVersion VersionDup2();
+    IMPORT_C const TPtrC StringDup2() const;
+    IMPORT_C void AddCharDup2L(const TChar& aChar);
+    IMPORT_C void RemoveLastDup2();
+    IMPORT_C void ResetStringDup2();
+private:
+    CHelloTraceInterface();
+    void ConstructL();
+
+private:
+    // data
+    THelloTraceDllExampleString* iString;
+    };
+
+#endif  // __HELLOTRACEINTERFACE_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/dll/inc/HelloTracePanic.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,35 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef __HELLOTRACEDLL_PAN__
+#define __HELLOTRACEDLL_PAN__
+
+//  Data Types
+
+enum THelloTraceDllPanic
+    {
+    EHelloTraceDllExamplePanic,
+    EHelloTraceDllNullPointer,
+    };
+
+//  Function Prototypes
+
+GLREF_C void Panic(THelloTraceDllPanic aPanic);
+
+#endif  // __HELLOTRACEDLL_PAN__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/dll/inc/HelloTraceTypes.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,39 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef __HELLOTRACETYPES_H__
+#define __HELLOTRACETYPES_H__
+
+class HelloTraceTypes
+    {
+public:
+    static void SignedIntegers();
+    static void UnsignedIntegers();
+    static void Descriptors();
+    
+    static void SignedIntegersDup();
+    static void UnsignedIntegersDup();
+    static void DescriptorsDup();
+        
+    static void SignedIntegersDup2();
+    static void UnsignedIntegersDup2();
+    static void DescriptorsDup2();
+    };
+
+#endif  // __HELLOTRACETYPES_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/dll/incDup/HelloTraceFnDup.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,157 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef HELLOTRACEFNDUP_H_
+#define HELLOTRACEFNDUP_H_
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTraceFnDupTraces.h"
+#endif
+
+inline void CHelloTraceFn::SimpleDup()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_SIMPLE_DUP_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_SIMPLE_DUP_EXIT, this );
+    }
+
+inline void CHelloTraceFn::OutputsParamsDup(TInt aParam, TFnEnum aEnumParam)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSPARAMS_DUP_ENTRY, this );
+    Simple();
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSPARAMS_DUP_EXIT, this );
+    }
+
+inline void CHelloTraceFn::StaticOutputsParamsDupL(TInt aParam)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_STATICOUTPUTSPARAMS_DUP_ENTRY, NULL );
+    CHelloTraceFn* example = CHelloTraceFn::NewLC();
+    example->SimpleDup();    
+    CleanupStack::PopAndDestroy(example);
+    OstTraceFunctionExit0( CHELLOTRACEFN_STATICOUTPUTSPARAMS_DUP_EXIT );    
+    }
+
+inline void CHelloTraceFn::OutputsSignedIntegersDup(TInt8 aParam8,   TInt16 aParam16, 
+                                          TInt32 aParam32, TInt64 aParam64)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS_DUP_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS_DUP_EXIT, this );
+    }
+
+void CHelloTraceFn::OutputsUnsignedIntegersDup(TUint8 aParam8,   TUint16 aParam16, 
+                                            TUint32 aParam32, TUint64 aParam64)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS_DUP_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS_DUP_EXIT, this );
+    }
+
+
+inline TInt CHelloTraceFn::OutputsTIntReturnValueDup()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_DUP_ENTRY, this );
+    TInt ret = KErrNone;
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_DUP_EXIT, this, ret );
+    return ret;
+    }
+
+inline TInt64 CHelloTraceFn::OutputsTInt64ReturnValueDup()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE_DUP_ENTRY, this );
+    TInt64 ret = (TInt64) 2 << 40;
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE_DUP_EXIT, this, ret );
+    return ret;
+    }
+
+inline CHelloTraceFn::TFnEnum CHelloTraceFn::OutputsTFnEnumReturnValueDup()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE_DUP_ENTRY, this );
+    TFnEnum ret = EExample1;
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE_DUP_EXIT, this, ret );
+    return ret;    
+    }
+
+inline CActive* CHelloTraceFn::OutputsUnknownPtrTypeDup(CActive* aActive)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_DUP_ENTRY, this );    
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_DUP_EXIT, this, (TUint) aActive );
+    return aActive;
+    }
+
+inline CActive& CHelloTraceFn::OutputsUnknownRefTypeDup(CActive& aActive)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE_DUP_ENTRY, this );
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE_DUP_EXIT, this, (TUint) &aActive );    
+    return aActive;
+    }
+
+// The following doesn't compile as the Trace Compiler doesn't generate
+// the correct OstTraceGenExt(...) function for it
+//void CHelloTraceFn::OutputMissingParamsBug(TInt /*aCommentParam*/, TInt)
+//    {
+//    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_ENTRY, this );
+//    // ...
+//    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_EXIT, this );    
+//    }
+
+// The following compiles and works but outputs the following warning
+// warning: HelloTraceFn.cpp, line xxx: Parameter did not have a name and was not added to trace
+// The fact that this cannot be suppressed is a known problem we're working on.
+inline void CHelloTraceFn::OutputMissingParamsDup(TInt aUsedParam, TInt /*aCommentParam*/, TInt)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMS_DUP_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMS_DUP_EXIT, this );
+    }
+
+// The following doesn't work as the Trace Compiler outputs:
+// error: HelloTraceFn.cpp, line xxx: Class / function name for trace could not be determined x3
+//#ifdef _DEBUG
+//void CHelloTraceFn::PreProcessedFn(TInt aDbgParam)
+//    {
+//    OstTraceFunctionEntryExt( PRE_PROCESSED_ENTRTY_1, this );
+//#else
+//void CHelloTraceFn::PreProcessedFn()
+//    {
+//    OstTraceFunctionEntry1( PRE_PROCESSED_ENTRTY_2, this );
+//#endif
+//    Simple();
+//    OstTraceFunctionExit1( CHELLOTRACEFN_PREPROCESSEDFN_EXIT, this );
+//    }
+
+// Workaround example code until a proper fix is provided
+#ifdef _DEBUG
+inline void CHelloTraceFn::PreProcessedFnDup(TInt aDbgParam)
+    {
+    OstTraceExt2( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_DUP_ENTRY_1, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;aDbgParam=%d;this=%x", (TInt) aDbgParam, (TUint) this);
+#else
+    inline void CHelloTraceFn::PreProcessedFnDup()
+    {
+    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_DUP_ENTRY_2, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
+#endif
+    SimpleDup();
+    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_DUP_EXIT, "CHelloTraceFn::PreProcessedFn: < CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
+    }
+
+#endif /* HELLOTRACEFNDUP_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/dll/incDup/HelloTraceFnDup2.inl	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,157 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef HELLOTRACEFNDUP2_H_
+#define HELLOTRACEFNDUP2_H_
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTraceFnDup2Traces.h"
+#endif
+
+inline void CHelloTraceFn::SimpleDup2()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_SIMPLE_DUP2_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_SIMPLE_DUP2_EXIT, this );
+    }
+
+inline void CHelloTraceFn::OutputsParamsDup2(TInt aParam, TFnEnum aEnumParam)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSPARAMS_DUP2_ENTRY, this );
+    Simple();
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSPARAMS_DUP2_EXIT, this );
+    }
+
+inline void CHelloTraceFn::StaticOutputsParamsDup2L(TInt aParam)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_STATICOUTPUTSPARAMS_DUP2_ENTRY, NULL );
+    CHelloTraceFn* example = CHelloTraceFn::NewLC();
+    example->SimpleDup2();    
+    CleanupStack::PopAndDestroy(example);
+    OstTraceFunctionExit0( CHELLOTRACEFN_STATICOUTPUTSPARAMS_DUP2_EXIT );    
+    }
+
+inline void CHelloTraceFn::OutputsSignedIntegersDup2(TInt8 aParam8,   TInt16 aParam16, 
+                                          TInt32 aParam32, TInt64 aParam64)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS_DUP2_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS_DUP2_EXIT, this );
+    }
+
+inline void CHelloTraceFn::OutputsUnsignedIntegersDup2(TUint8 aParam8,   TUint16 aParam16, 
+                                            TUint32 aParam32, TUint64 aParam64)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS_DUP2_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS_DUP2_EXIT, this );
+    }
+
+
+inline TInt CHelloTraceFn::OutputsTIntReturnValueDup2()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_DUP2_ENTRY, this );
+    TInt ret = KErrNone;
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_DUP2_EXIT, this, ret );
+    return ret;
+    }
+
+inline TInt64 CHelloTraceFn::OutputsTInt64ReturnValueDup2()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE_DUP2_ENTRY, this );
+    TInt64 ret = (TInt64) 2 << 40;
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE_DUP2_EXIT, this, ret );
+    return ret;
+    }
+
+inline CHelloTraceFn::TFnEnum CHelloTraceFn::OutputsTFnEnumReturnValueDup2()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE_DUP2_ENTRY, this );
+    TFnEnum ret = EExample1;
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE_DUP2_EXIT, this, ret );
+    return ret;    
+    }
+
+inline CActive* CHelloTraceFn::OutputsUnknownPtrTypeDup2(CActive* aActive)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_DUP2_ENTRY, this );    
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_DUP2_EXIT, this, (TUint) aActive );
+    return aActive;
+    }
+
+inline CActive& CHelloTraceFn::OutputsUnknownRefTypeDup2(CActive& aActive)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE_DUP2_ENTRY, this );
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE_DUP2_EXIT, this, (TUint) &aActive );    
+    return aActive;
+    }
+
+// The following doesn't compile as the Trace Compiler doesn't generate
+// the correct OstTraceGenExt(...) function for it
+//void CHelloTraceFn::OutputMissingParamsBug(TInt /*aCommentParam*/, TInt)
+//    {
+//    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_ENTRY, this );
+//    // ...
+//    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_EXIT, this );    
+//    }
+
+// The following compiles and works but outputs the following warning
+// warning: HelloTraceFn.cpp, line xxx: Parameter did not have a name and was not added to trace
+// The fact that this cannot be suppressed is a known problem we're working on.
+inline void CHelloTraceFn::OutputMissingParamsDup2(TInt aUsedParam, TInt /*aCommentParam*/, TInt)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMS_DUP2_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMS_DUP2_EXIT, this );
+    }
+
+// The following doesn't work as the Trace Compiler outputs:
+// error: HelloTraceFn.cpp, line xxx: Class / function name for trace could not be determined x3
+//#ifdef _DEBUG
+//void CHelloTraceFn::PreProcessedFn(TInt aDbgParam)
+//    {
+//    OstTraceFunctionEntryExt( PRE_PROCESSED_ENTRTY_1, this );
+//#else
+//void CHelloTraceFn::PreProcessedFn()
+//    {
+//    OstTraceFunctionEntry1( PRE_PROCESSED_ENTRTY_2, this );
+//#endif
+//    Simple();
+//    OstTraceFunctionExit1( CHELLOTRACEFN_PREPROCESSEDFN_EXIT, this );
+//    }
+
+// Workaround example code until a proper fix is provided
+#ifdef _DEBUG
+inline void CHelloTraceFn::PreProcessedFnDup2(TInt aDbgParam)
+    {
+    OstTraceExt2( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_DUP2_ENTRY_1, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;aDbgParam=%d;this=%x", (TInt) aDbgParam, (TUint) this);
+#else
+    inline void CHelloTraceFn::PreProcessedFnDup2()
+    {
+    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_DUP2_ENTRY_2, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
+#endif
+    SimpleDup2();
+    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_DUP2_EXIT, "CHelloTraceFn::PreProcessedFn: < CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
+    }
+
+#endif /* HELLOTRACEFNDUP2_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/dll/incDup/HelloTraceInterfaceDup.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,91 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef __HELLOTRACEINTERFACEDUP_H__
+#define __HELLOTRACEINTERFACEDUP_H__
+
+#include "HelloTracePanic.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTraceInterfaceDupTraces.h"
+#endif
+
+ inline EXPORT_C TVersion CHelloTraceInterface::VersionDup()
+        {
+        const TInt KMajor = 1;
+        const TInt KMinor = 0;
+        const TInt KBuild = 1;
+        TVersion version = TVersion(KMajor, KMinor, KBuild);
+        OstTraceExt1( TRACE_BORDER, CHELLOTRACEDLL_VERSION_DUP, "CHelloTraceInterface::Version = %S", version.Name());   
+        return version;
+        }
+
+ inline EXPORT_C const TPtrC CHelloTraceInterface::StringDup() const
+        {
+        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
+
+        OstTraceDefExt2( OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CHELLOTRACEDLL_STRING_DUP, 
+                         "[0x%08x] Returned %S", (TUint32) this, *iString);   
+        return *iString;
+        }
+
+ inline EXPORT_C void CHelloTraceInterface::AddCharDupL(const TChar& aChar)
+        {
+        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
+
+        OstTraceExt3( TRACE_BORDER, CHELLOTRACEDLL_ADDCHARL_DUP, 
+                      "[0x%08x] Adding %d to %S", (TUint32) this, (TInt32) aChar, *iString);   
+        if (iString->Length() >= KHelloTraceDllBufferLength)
+            {
+            OstTrace1( TRACE_ERROR, CHELLOTRACEDLL_ADDCHARL_ERR_DUP,
+                       "[0x%08x] Not enough space to add character", (TUint32) this);
+            User::Leave( KErrTooBig);
+            }
+        iString->Append(aChar);
+        }
+
+ inline EXPORT_C void CHelloTraceInterface::RemoveLastDup()
+        {
+        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
+
+        OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_REMOVELAST_DUP, 
+                      "[0x%08x] Attempting to remove last character from %S", (TUint32) this, *iString);
+        if (iString->Length() > 0)
+            {
+            iString->SetLength(iString->Length() - 1);
+            }
+        else
+            {
+            OstTrace1( TRACE_WARNING, CHELLOTRACEDLL_REMOVELAST_WARN_DUP, "[0x%08x] String already empty", (TUint32) this);   
+            }
+        }
+
+ inline EXPORT_C void CHelloTraceInterface::ResetStringDup()
+        {
+        OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_RESETSTRING_DUP, "[0x%08x] Reseting string %S", (TUint32) this, *iString);
+        if (iString == NULL)
+            {
+            iString = new (ELeave) THelloTraceDllExampleString;
+            }
+        else
+            {
+            iString->SetLength(0);
+            }
+        }
+#endif  // __HELLOTRACEINTERFACEDUP_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/dll/incDup/HelloTraceInterfaceDup2.inl	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,91 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef __HELLOTRACEINTERFACEDUP2_H__
+#define __HELLOTRACEINTERFACEDUP2_H__
+
+#include "HelloTracePanic.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTraceInterfaceDup2Traces.h"
+#endif
+
+ inline EXPORT_C TVersion CHelloTraceInterface::VersionDup2()
+        {
+        const TInt KMajor = 1;
+        const TInt KMinor = 0;
+        const TInt KBuild = 1;
+        TVersion version = TVersion(KMajor, KMinor, KBuild);
+        OstTraceExt1( TRACE_BORDER, CHELLOTRACEDLL_VERSION_DUP2, "CHelloTraceInterface::Version = %S", version.Name());   
+        return version;
+        }
+
+ inline EXPORT_C const TPtrC CHelloTraceInterface::StringDup2() const
+        {
+        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
+
+        OstTraceDefExt2( OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CHELLOTRACEDLL_STRING_DUP2, 
+                         "[0x%08x] Returned %S", (TUint32) this, *iString);   
+        return *iString;
+        }
+
+ inline EXPORT_C void CHelloTraceInterface::AddCharDup2L(const TChar& aChar)
+        {
+        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
+
+        OstTraceExt3( TRACE_BORDER, CHELLOTRACEDLL_ADDCHARL_DUP2, 
+                      "[0x%08x] Adding %d to %S", (TUint32) this, (TInt32) aChar, *iString);   
+        if (iString->Length() >= KHelloTraceDllBufferLength)
+            {
+            OstTrace1( TRACE_ERROR, CHELLOTRACEDLL_ADDCHARL_ERR_DUP2,
+                       "[0x%08x] Not enough space to add character", (TUint32) this);
+            User::Leave( KErrTooBig);
+            }
+        iString->Append(aChar);
+        }
+
+ inline EXPORT_C void CHelloTraceInterface::RemoveLastDup2()
+        {
+        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
+
+        OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_REMOVELAST_DUP2, 
+                      "[0x%08x] Attempting to remove last character from %S", (TUint32) this, *iString);
+        if (iString->Length() > 0)
+            {
+            iString->SetLength(iString->Length() - 1);
+            }
+        else
+            {
+            OstTrace1( TRACE_WARNING, CHELLOTRACEDLL_REMOVELAST_WARN_DUP2, "[0x%08x] String already empty", (TUint32) this);   
+            }
+        }
+
+ inline EXPORT_C void CHelloTraceInterface::ResetStringDup2()
+        {
+        OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_RESETSTRING_DUP2, "[0x%08x] Reseting string %S", (TUint32) this, *iString);
+        if (iString == NULL)
+            {
+            iString = new (ELeave) THelloTraceDllExampleString;
+            }
+        else
+            {
+            iString->SetLength(0);
+            }
+        }
+#endif  // __HELLOTRACEINTERFACEDUP2_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/dll/incDup/HelloTraceTypesDup.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,75 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef __HELLOTRACETYPESDUP_H__
+#define __HELLOTRACETYPESDUP_H__
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTraceTypesDupTraces.h"
+#endif
+
+inline void HelloTraceTypes::SignedIntegersDup()
+    {
+    TInt8  eightBit     = - (TInt8)  1 << 6;
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP_8, 
+                  "8 bit signed: %hhd", eightBit );
+    
+    TInt16 sixteenBit   = - (TInt16) 1 << 14; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP_16, 
+                  "16 bit signed: %hd", sixteenBit );
+
+    TInt32 thirtyTwoBit = - (TInt32) 1 << 30; 
+    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP_32, 
+               "32 bit signed: %d", thirtyTwoBit );
+
+    TInt64 sixtyFourBit = - (TInt64) 1 << 62; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP_64, 
+                  "64 bit signed: %Ld", sixtyFourBit );
+    }
+
+inline void HelloTraceTypes::UnsignedIntegersDup()
+    {
+    TUint8  eightBit     = (TUint8)  1 << 6;
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP_8, 
+                  "8 bit unsigned: %hhu", eightBit );
+    
+    TUint16 sixteenBit   = (TUint16) 1 << 14; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP_16, 
+                  "16 bit unsigned: %hu", sixteenBit );
+
+    TUint32 thirtyTwoBit = (TUint32) 1 << 30; 
+    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP_32, 
+               "32 bit unsigned: %u", thirtyTwoBit );
+
+    TUint64 sixtyFourBit = (TUint64) 1 << 62; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP_64, 
+                  "64 bit unsigned: %Lu", sixtyFourBit );
+    }
+
+inline void HelloTraceTypes::DescriptorsDup()
+    {
+    _LIT8(KAscii, "Some ASCII text");
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_ASCIIDUP, "8 bit descriptor: %s", KAscii() );
+
+    _LIT16(KUnicode, "Some unicode text");    
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNICODEDUP, "16 bit descriptor: %S", KUnicode() );
+    }
+
+#endif  // __HELLOTRACETYPESDUP_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/dll/incDup/HelloTraceTypesDup2.inl	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,75 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef __HELLOTRACETYPESDUP2_H__
+#define __HELLOTRACETYPESDUP2_H__
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTraceTypesDup2Traces.h"
+#endif
+
+inline void HelloTraceTypes::SignedIntegersDup2()
+    {
+    TInt8  eightBit     = - (TInt8)  1 << 6;
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP2_8, 
+                  "8 bit signed: %hhd", eightBit );
+    
+    TInt16 sixteenBit   = - (TInt16) 1 << 14; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP2_16, 
+                  "16 bit signed: %hd", sixteenBit );
+
+    TInt32 thirtyTwoBit = - (TInt32) 1 << 30; 
+    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP2_32, 
+               "32 bit signed: %d", thirtyTwoBit );
+
+    TInt64 sixtyFourBit = - (TInt64) 1 << 62; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP2_64, 
+                  "64 bit signed: %Ld", sixtyFourBit );
+    }
+
+inline void HelloTraceTypes::UnsignedIntegersDup2()
+    {
+    TUint8  eightBit     = (TUint8)  1 << 6;
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP2_8, 
+                  "8 bit unsigned: %hhu", eightBit );
+    
+    TUint16 sixteenBit   = (TUint16) 1 << 14; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP2_16, 
+                  "16 bit unsigned: %hu", sixteenBit );
+
+    TUint32 thirtyTwoBit = (TUint32) 1 << 30; 
+    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP2_32, 
+               "32 bit unsigned: %u", thirtyTwoBit );
+
+    TUint64 sixtyFourBit = (TUint64) 1 << 62; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP2_64, 
+                  "64 bit unsigned: %Lu", sixtyFourBit );
+    }
+
+inline void HelloTraceTypes::DescriptorsDup2()
+    {
+    _LIT8(KAscii, "Some ASCII text");
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_ASCIIDUP2, "8 bit descriptor: %s", KAscii() );
+
+    _LIT16(KUnicode, "Some unicode text");    
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNICODEDUP2, "16 bit descriptor: %S", KUnicode() );
+    }
+
+#endif  // __HELLOTRACETYPESDUP2_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/dll/src/HelloTraceExample.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,106 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+
+#include "HelloTraceExample.h"
+#include "HelloTraceTypes.h"
+#include "HelloTraceInterface.h"
+#include "HelloTraceFn.h"
+#include "HelloTracePanic.h"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTraceExampleTraces.h"
+#endif
+
+EXPORT_C void HelloTraceExample::JustTypes()
+    {
+    OstTrace0( TRACE_EXAMPLE, HELLOTRACEEXAMPLE_JUSTTYPES, "*********************************************** " );
+    
+    HelloTraceTypes::SignedIntegers();
+    HelloTraceTypes::UnsignedIntegers();
+    HelloTraceTypes::Descriptors();    
+    }
+
+EXPORT_C void HelloTraceExample::Interface()
+    {
+    OstTrace0( TRACE_EXAMPLE, HELLOTRACEEXAMPLE_INTERFACE, "*********************************************** " );
+    
+    TVersion version = CHelloTraceInterface::Version();   
+    if (version.iMajor >= 1) 
+        {
+        CHelloTraceInterface* example = CHelloTraceInterface::NewLC();
+        example->AddCharL('H');
+        example->AddCharL('e');
+        example->AddCharL('l');
+        example->AddCharL('l');
+        example->AddCharL('o');
+        example->AddCharL('T');        
+        example->RemoveLast();        
+        example->AddCharL(' ');
+        example->AddCharL('T');
+        example->AddCharL('r');
+        example->AddCharL('a');
+        example->AddCharL('c');
+        example->AddCharL('e');
+        example->AddCharL('!');
+        CleanupStack::PopAndDestroy(example);
+        }
+    else
+        {
+        OstTrace0( TRACE_ERROR, HELLOTRACEEXAMPLE_UNSUPPORTED_VERSION, "Unsupported version!");
+        }
+    }
+
+EXPORT_C void HelloTraceExample::FnEntryExit()
+    {
+    OstTrace0( TRACE_EXAMPLE, HELLOTRACEEXAMPLE_FNENTRYEXIT, "*********************************************** " );
+       
+    CHelloTraceFn* example = CHelloTraceFn::NewLC();
+    CIdle* idle = CIdle::NewL(CActive::EPriorityIdle);
+    CleanupStack::PushL(idle);
+
+    CHelloTraceFn::StaticOutputsParamsL(1);
+   
+    example->Simple();
+    example->OutputsParams(2, CHelloTraceFn::EExample1);
+    example->OutputsParams(3, CHelloTraceFn::EExample2);
+    example->OutputsSignedIntegers(-4, -5, -6, -7);
+    example->OutputsUnsignedIntegers(8, 9, 10, 11);
+    example->OutputsTIntReturnValue();    
+    example->OutputsTInt64ReturnValue(); 
+    example->OutputsTFnEnumReturnValue();
+    example->OutputsUnknownPtrType(idle);    
+    example->OutputsUnknownRefType(*idle);
+#ifdef _DEBUG
+    example->PreProcessedFn(12);
+#else
+    example->PreProcessedFn();
+#endif
+    example->OutputMissingParams(13, 14, 15);
+
+    CleanupStack::PopAndDestroy(idle);
+    CleanupStack::PopAndDestroy(example);
+    }
+
+EXPORT_C void HelloTraceExample::PanicTrace()
+    {
+    OstTrace0( TRACE_EXAMPLE, HELLOTRACEEXAMPLE_PANIC, "*********************************************** " );
+
+    Panic(EHelloTraceDllExamplePanic);
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/dll/src/HelloTraceFn.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,183 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+ 
+#include "HelloTraceFn.h"
+#include "HelloTraceFnDup.h"
+#include "HelloTraceFnDup2.inl"
+#include "HelloTracePanic.h"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTraceFnTraces.h"
+#endif
+
+CHelloTraceFn* CHelloTraceFn::NewLC()
+    {
+    CHelloTraceFn* self = new (ELeave) CHelloTraceFn;
+    CleanupStack::PushL(self);
+    return self;
+    }
+
+CHelloTraceFn* CHelloTraceFn::NewL()
+    {
+    CHelloTraceFn* self = CHelloTraceFn::NewLC();
+    CleanupStack::Pop(self);
+    return self;
+    }
+
+CHelloTraceFn::CHelloTraceFn()
+    {
+    OstTrace1( TRACE_NORMAL, CHELLOTRACEFN_CHELLOTRACEFN_CTOR, "[0x%08x] Constructor", this );    
+    }
+
+CHelloTraceFn::~CHelloTraceFn()
+    {
+    OstTrace1( TRACE_NORMAL, CHELLOTRACEFN_CHELLOTRACEFN_DTOR, "[0x%08x] Destructor", this );    
+    }
+
+void CHelloTraceFn::Simple()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_SIMPLE_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_SIMPLE_EXIT, this );
+    }
+
+void CHelloTraceFn::OutputsParams(TInt aParam, TFnEnum aEnumParam)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSPARAMS_ENTRY, this );
+    Simple();
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSPARAMS_EXIT, this );
+    }
+
+void CHelloTraceFn::StaticOutputsParamsL(TInt aParam)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_STATICOUTPUTSPARAMS_ENTRY, NULL );
+    CHelloTraceFn* example = CHelloTraceFn::NewLC();
+    example->Simple();    
+    CleanupStack::PopAndDestroy(example);
+    OstTraceFunctionExit0( CHELLOTRACEFN_STATICOUTPUTSPARAMS_EXIT );    
+    }
+
+void CHelloTraceFn::OutputsSignedIntegers(TInt8 aParam8,   TInt16 aParam16, 
+                                          TInt32 aParam32, TInt64 aParam64)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS_EXIT, this );
+    }
+
+void CHelloTraceFn::OutputsUnsignedIntegers(TUint8 aParam8,   TUint16 aParam16, 
+                                            TUint32 aParam32, TUint64 aParam64)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS_EXIT, this );
+    }
+
+
+TInt CHelloTraceFn::OutputsTIntReturnValue()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_ENTRY, this );
+    TInt ret = KErrNone;
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_EXIT, this, ret );
+    return ret;
+    }
+
+TInt64 CHelloTraceFn::OutputsTInt64ReturnValue()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE_ENTRY, this );
+    TInt64 ret = (TInt64) 2 << 40;
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE_EXIT, this, ret );
+    return ret;
+    }
+
+CHelloTraceFn::TFnEnum CHelloTraceFn::OutputsTFnEnumReturnValue()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE_ENTRY, this );
+    TFnEnum ret = EExample1;
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE_EXIT, this, ret );
+    return ret;    
+    }
+
+CActive* CHelloTraceFn::OutputsUnknownPtrType(CActive* aActive)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_ENTRY, this );    
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_EXIT, this, (TUint) aActive );
+    return aActive;
+    }
+
+CActive& CHelloTraceFn::OutputsUnknownRefType(CActive& aActive)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE_ENTRY, this );
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE_EXIT, this, (TUint) &aActive );    
+    return aActive;
+    }
+
+// The following doesn't compile as the Trace Compiler doesn't generate
+// the correct OstTraceGenExt(...) function for it
+//void CHelloTraceFn::OutputMissingParamsBug(TInt /*aCommentParam*/, TInt)
+//    {
+//    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_ENTRY, this );
+//    // ...
+//    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_EXIT, this );    
+//    }
+
+// The following compiles and works but outputs the following warning
+// warning: HelloTraceFn.cpp, line xxx: Parameter did not have a name and was not added to trace
+// The fact that this cannot be suppressed is a known problem we're working on.
+void CHelloTraceFn::OutputMissingParams(TInt aUsedParam, TInt /*aCommentParam*/, TInt)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMS_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMS_EXIT, this );
+    }
+
+// The following doesn't work as the Trace Compiler outputs:
+// error: HelloTraceFn.cpp, line xxx: Class / function name for trace could not be determined x3
+//#ifdef _DEBUG
+//void CHelloTraceFn::PreProcessedFn(TInt aDbgParam)
+//    {
+//    OstTraceFunctionEntryExt( PRE_PROCESSED_ENTRTY_1, this );
+//#else
+//void CHelloTraceFn::PreProcessedFn()
+//    {
+//    OstTraceFunctionEntry1( PRE_PROCESSED_ENTRTY_2, this );
+//#endif
+//    Simple();
+//    OstTraceFunctionExit1( CHELLOTRACEFN_PREPROCESSEDFN_EXIT, this );
+//    }
+
+// Workaround example code until a proper fix is provided
+#ifdef _DEBUG
+void CHelloTraceFn::PreProcessedFn(TInt aDbgParam)
+    {
+    OstTraceExt2( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_ENTRY_1, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;aDbgParam=%d;this=%x", (TInt) aDbgParam, (TUint) this);
+#else
+void CHelloTraceFn::PreProcessedFn()
+    {
+    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_ENTRY_2, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
+#endif
+    Simple();
+    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_EXIT, "CHelloTraceFn::PreProcessedFn: < CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
+    }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/dll/src/HelloTraceInterface.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,121 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+
+#include "HelloTraceInterface.h"
+#include "HelloTraceInterfaceDup.h"
+#include "HelloTraceInterfaceDup2.inl"
+#include "HelloTracePanic.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTraceInterfaceTraces.h"
+#endif
+
+EXPORT_C CHelloTraceInterface* CHelloTraceInterface::NewLC()
+    {
+    CHelloTraceInterface* self = new (ELeave) CHelloTraceInterface;
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    return self;
+    }
+
+EXPORT_C CHelloTraceInterface* CHelloTraceInterface::NewL()
+    {
+    CHelloTraceInterface* self = CHelloTraceInterface::NewLC();
+    CleanupStack::Pop(self);
+    return self;
+    }
+
+CHelloTraceInterface::CHelloTraceInterface()
+    {
+    OstTrace1( TRACE_NORMAL, CHELLOTRACEDLL_CHELLOTRACEDLL_CTOR, "[0x%08x]", (TUint32) this );    
+    }
+
+void CHelloTraceInterface::ConstructL()
+    {
+    iString = new (ELeave) THelloTraceDllExampleString;
+    }
+
+EXPORT_C CHelloTraceInterface::~CHelloTraceInterface()
+    {
+    delete iString;
+    OstTrace1( TRACE_NORMAL, CHELLOTRACEDLL_CHELLOTRACEDLL_DTOR, "[0x%08x]", (TUint32) this );    
+    }
+
+EXPORT_C TVersion CHelloTraceInterface::Version()
+    {
+    const TInt KMajor = 1;
+    const TInt KMinor = 0;
+    const TInt KBuild = 1;
+    TVersion version = TVersion(KMajor, KMinor, KBuild);
+    OstTraceExt1( TRACE_BORDER, CHELLOTRACEDLL_VERSION, "CHelloTraceInterface::Version = %S", version.Name());   
+    return version;
+    }
+
+EXPORT_C const TPtrC CHelloTraceInterface::String() const
+    {
+    __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
+
+    OstTraceDefExt2( OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CHELLOTRACEDLL_STRING, 
+                     "[0x%08x] Returned %S", (TUint32) this, *iString);   
+    return *iString;
+    }
+
+EXPORT_C void CHelloTraceInterface::AddCharL(const TChar& aChar)
+    {
+    __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
+
+    OstTraceExt3( TRACE_BORDER, CHELLOTRACEDLL_ADDCHARL, 
+                  "[0x%08x] Adding %d to %S", (TUint32) this, (TInt32) aChar, *iString);   
+    if (iString->Length() >= KHelloTraceDllBufferLength)
+        {
+        OstTrace1( TRACE_ERROR, CHELLOTRACEDLL_ADDCHARL_ERR,
+                   "[0x%08x] Not enough space to add character", (TUint32) this);
+        User::Leave( KErrTooBig);
+        }
+    iString->Append(aChar);
+    }
+
+EXPORT_C void CHelloTraceInterface::RemoveLast()
+    {
+    __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
+
+    OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_REMOVELAST, 
+                  "[0x%08x] Attempting to remove last character from %S", (TUint32) this, *iString);
+    if (iString->Length() > 0)
+        {
+        iString->SetLength(iString->Length() - 1);
+        }
+    else
+        {
+        OstTrace1( TRACE_WARNING, CHELLOTRACEDLL_REMOVELAST_WARN, "[0x%08x] String already empty", (TUint32) this);   
+        }
+    }
+
+EXPORT_C void CHelloTraceInterface::ResetString()
+    {
+    OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_RESETSTRING, "[0x%08x] Reseting string %S", (TUint32) this, *iString);
+    if (iString == NULL)
+        {
+        iString = new (ELeave) THelloTraceDllExampleString;
+        }
+    else
+        {
+        iString->SetLength(0);
+        }
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/dll/src/HelloTracePanic.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,32 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#include <e32std.h>		 // GLDEF_C
+
+#include "HelloTracePanic.h"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTracePanicTraces.h"
+#endif
+
+GLDEF_C void Panic(THelloTraceDllPanic aPanic)
+    {
+    OstTrace1( TRACE_FATAL, PANIC, "Panic(%{THelloTraceDllPanic})", (TUint) aPanic );    
+    User::Panic(_L("HelloTraceDll"), aPanic);
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/dll/src/HelloTraceTypes.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,76 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+
+#include <e32std.h>
+
+#include "HelloTraceTypes.h"
+#include "HelloTraceTypesDup.h"
+#include "HelloTraceTypesDup2.inl"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTraceTypesTraces.h"
+#endif
+
+void HelloTraceTypes::SignedIntegers()
+    {
+    TInt8  eightBit     = - (TInt8)  1 << 6;
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS_8, 
+                  "8 bit signed: %hhd", eightBit );
+    
+    TInt16 sixteenBit   = - (TInt16) 1 << 14; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS_16, 
+                  "16 bit signed: %hd", sixteenBit );
+
+    TInt32 thirtyTwoBit = - (TInt32) 1 << 30; 
+    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS_32, 
+               "32 bit signed: %d", thirtyTwoBit );
+
+    TInt64 sixtyFourBit = - (TInt64) 1 << 62; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS_64, 
+                  "64 bit signed: %Ld", sixtyFourBit );
+    }
+
+void HelloTraceTypes::UnsignedIntegers()
+    {
+    TUint8  eightBit     = (TUint8)  1 << 6;
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS_8, 
+                  "8 bit unsigned: %hhu", eightBit );
+    
+    TUint16 sixteenBit   = (TUint16) 1 << 14; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS_16, 
+                  "16 bit unsigned: %hu", sixteenBit );
+
+    TUint32 thirtyTwoBit = (TUint32) 1 << 30; 
+    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS_32, 
+               "32 bit unsigned: %u", thirtyTwoBit );
+
+    TUint64 sixtyFourBit = (TUint64) 1 << 62; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS_64, 
+                  "64 bit unsigned: %Lu", sixtyFourBit );
+    }
+
+void HelloTraceTypes::Descriptors()
+    {
+    _LIT8(KAscii, "Some ASCII text");
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_ASCII, "8 bit descriptor: %s", KAscii() );
+
+    _LIT16(KUnicode, "Some unicode text");    
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNICODE, "16 bit descriptor: %S", KUnicode() );
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/dll/traces/hellotracedll_dll/trace.properties	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<trace_properties>
+<enum name="TFnEnum">
+<value id="0">EExample1</value>
+<value id="2">EExample2</value>
+</enum>
+<enum name="THelloTraceDllPanic">
+<value id="0">EHelloTraceDllExamplePanic</value>
+<value id="1">EHelloTraceDllNullPointer</value>
+</enum>
+<file>../../incDup/HelloTraceInterfaceDup.h</file>
+<file>../../incDup/HelloTraceInterfaceDup2.inl</file>
+<file>../../incDup/HelloTraceFnDup.h</file>
+<file>../../incDup/HelloTraceFnDup2.inl</file>
+<file>../../incDup/HelloTraceTypesDup.h</file>
+<file>../../incDup/HelloTraceTypesDup2.inl</file>
+</trace_properties>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/group/bld.inf	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,19 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+#include "../dll/group/bld.inf"
+#include "../console/group/bld.inf"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_import/console/group/HelloTraceConsole.mmp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,37 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+
+TARGET		  HelloTraceConsole.exe
+TARGETTYPE	  exe
+UID			  0 0xE40349E4
+
+OS_LAYER_SYSTEMINCLUDE
+USERINCLUDE	   ../inc
+USERINCLUDE    ../../dll/inc
+USERINCLUDE    ../traces
+
+SOURCEPATH	  ../src
+SOURCE		  HelloTraceConsole.cpp
+
+LIBRARY		  euser.lib
+LIBRARY       HelloTraceDll.lib
+
+#ifdef ENABLE_ABIV2_MODE
+DEBUGGABLE_UDEBONLY
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_import/console/group/bld.inf	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,27 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXPORTS
+hellotraceconsole.iby             CORE_OS_LAYER_IBY_EXPORT_PATH(hellotraceconsole.iby)
+
+PRJ_MMPFILES
+HelloTraceConsole.mmp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_import/console/group/hellotraceconsole.iby	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,24 @@
+// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+// ROM build file for tracecore project
+
+#ifndef HELLOTRACECONSOLE_IBY
+#define HELLOTRACECONSOLE_IBY
+
+#include <core\os\hellotracedll.iby>
+
+file=ABI_DIR\BUILD_DIR\hellotraceconsole.exe    Sys\Bin\hellotraceconsole.exe
+
+#endif //HELLOTRACECONSOLE_IBY
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_import/console/inc/HelloTraceConsole.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,31 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef __HELLOTRACECONSOLE_H__
+#define __HELLOTRACECONSOLE_H__
+
+//  Include Files
+
+#include <e32base.h>
+
+//  Function Prototypes
+
+GLDEF_C TInt E32Main();
+
+#endif  // __HELLOTRACECONSOLE_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_import/console/src/HelloTraceConsole.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,124 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#include <e32cons.h>			// Console
+
+#include "HelloTraceConsole.h"
+#include "HelloTraceExample.h"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTraceConsoleTraces.h"
+#endif
+
+
+_LIT(KTextConsoleTitle, "HelloTrace");
+_LIT(KTextPressAnyKey, " [press any key]\n");
+
+LOCAL_D CConsoleBase* console; // write all messages to this
+
+LOCAL_C void DoExamples()
+    {
+    TInt err = KErrNone;
+
+    console->Printf(_L("Before main tracing examples ...\n"));
+
+    console->Printf(_L(" Before type examples ..."));
+    console->Printf(KTextPressAnyKey);
+    console->Getch();
+    TRAP(err, HelloTraceExample::JustTypes());    
+    if (err)
+        console->Printf(_L(" Failed with error %d\n"), err);
+
+    console->Printf(_L(" Before Interface examples ..."));
+    console->Printf(KTextPressAnyKey);
+    console->Getch();
+    TRAP(err, HelloTraceExample::Interface());    
+    if (err)
+        console->Printf(_L(" Failed with error %d\n"), err);
+    
+    console->Printf(_L(" Before FnEntryExit examples ..."));
+    console->Printf(KTextPressAnyKey);
+    console->Getch();
+    TRAP(err, HelloTraceExample::FnEntryExit());    
+    if (err)
+        console->Printf(_L(" Failed with error %d\n"), err);    
+    }
+
+LOCAL_C void DoStartL()
+    {
+    // Create active scheduler (to run active objects)
+    CActiveScheduler* scheduler = new (ELeave) CActiveScheduler();
+    CleanupStack::PushL(scheduler);
+    CActiveScheduler::Install(scheduler);
+
+    DoExamples();
+    
+    // Delete active scheduler
+    CleanupStack::PopAndDestroy(scheduler);
+    }
+
+//  Global Functions
+
+GLDEF_C TInt E32Main()
+    {
+    OstTraceFunctionEntry0( E32MAIN_ENTRY );
+    
+    // Create cleanup stack
+    __UHEAP_MARK;
+    CTrapCleanup* cleanup = CTrapCleanup::New();
+
+    // Create output console
+    TRAPD(createError, 
+          console = Console::NewL(KTextConsoleTitle, 
+                                  TSize(KConsFullScreen, KConsFullScreen)));    
+    if (createError)
+        {
+        delete cleanup;
+        OstTrace1( TRACE_ERROR, E32MAIN_CREATE_ERROR, "Failed to create console error: %d", createError);
+        OstTraceFunctionExit0( E32MAIN_EXIT_ERR );
+        return createError;
+        }
+
+    TRAPD(mainError, DoStartL());    
+    if (mainError)
+        {
+        OstTrace1( TRACE_ERROR, E32MAIN_START_ERROR, "DoStartL failed with error: %d", mainError);
+        console->Printf(_L("DoStartL failed with error: %d\n\n"), mainError);
+        }
+    else 
+        {
+        console->Printf(_L("Before panic tracing example ..."));
+        console->Printf(KTextPressAnyKey);
+        console->Getch();
+    
+        OstTrace0( TRACE_FLOW, E32MAIN_BEFORE_PANIC, "About to cause a panic ..." );
+        HelloTraceExample::PanicTrace();
+        
+        console->Printf(KTextPressAnyKey);
+        console->Getch();
+        }
+
+    delete console;
+    delete cleanup;
+    __UHEAP_MARKEND;
+    
+    OstTraceFunctionExit0( E32MAIN_EXIT );
+    return KErrNone;
+    }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_import/dll/bwins/HelloTraceDllu.def	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,14 @@
+EXPORTS
+	?Version@CHelloTraceInterface@@SA?AVTVersion@@XZ @ 1 NONAME ; class TVersion CHelloTraceInterface::Version(void)
+	?NewLC@CHelloTraceInterface@@SAPAV1@XZ @ 2 NONAME ; class CHelloTraceInterface * CHelloTraceInterface::NewLC(void)
+	?JustTypes@HelloTraceExample@@SAXXZ @ 3 NONAME ; void HelloTraceExample::JustTypes(void)
+	?Interface@HelloTraceExample@@SAXXZ @ 4 NONAME ; void HelloTraceExample::Interface(void)
+	?FnEntryExit@HelloTraceExample@@SAXXZ @ 5 NONAME ; void HelloTraceExample::FnEntryExit(void)
+	?ResetString@CHelloTraceInterface@@QAEXXZ @ 6 NONAME ; void CHelloTraceInterface::ResetString(void)
+	?AddCharL@CHelloTraceInterface@@QAEXABVTChar@@@Z @ 7 NONAME ; void CHelloTraceInterface::AddCharL(class TChar const &)
+	?PanicTrace@HelloTraceExample@@SAXXZ @ 8 NONAME ; void HelloTraceExample::PanicTrace(void)
+	??1CHelloTraceInterface@@UAE@XZ @ 9 NONAME ; CHelloTraceInterface::~CHelloTraceInterface(void)
+	?String@CHelloTraceInterface@@QBE?BVTPtrC16@@XZ @ 10 NONAME ; class TPtrC16 const CHelloTraceInterface::String(void) const
+	?RemoveLast@CHelloTraceInterface@@QAEXXZ @ 11 NONAME ; void CHelloTraceInterface::RemoveLast(void)
+	?NewL@CHelloTraceInterface@@SAPAV1@XZ @ 12 NONAME ; class CHelloTraceInterface * CHelloTraceInterface::NewL(void)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_import/dll/eabi/HelloTraceDllu.def	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,20 @@
+EXPORTS
+	_ZN17HelloTraceExample10PanicTraceEv @ 1 NONAME
+	_ZN17HelloTraceExample11FnEntryExitEv @ 2 NONAME
+	_ZN17HelloTraceExample9InterfaceEv @ 3 NONAME
+	_ZN17HelloTraceExample9JustTypesEv @ 4 NONAME
+	_ZN20CHelloTraceInterface10RemoveLastEv @ 5 NONAME
+	_ZN20CHelloTraceInterface11ResetStringEv @ 6 NONAME
+	_ZN20CHelloTraceInterface4NewLEv @ 7 NONAME
+	_ZN20CHelloTraceInterface5NewLCEv @ 8 NONAME
+	_ZN20CHelloTraceInterface7VersionEv @ 9 NONAME
+	_ZN20CHelloTraceInterface8AddCharLERK5TChar @ 10 NONAME
+	_ZN20CHelloTraceInterfaceD0Ev @ 11 NONAME
+	_ZN20CHelloTraceInterfaceD1Ev @ 12 NONAME
+	_ZN20CHelloTraceInterfaceD2Ev @ 13 NONAME
+	_ZNK20CHelloTraceInterface6StringEv @ 14 NONAME
+	_ZTI13CHelloTraceFn @ 15 NONAME
+	_ZTI20CHelloTraceInterface @ 16 NONAME
+	_ZTV13CHelloTraceFn @ 17 NONAME
+	_ZTV20CHelloTraceInterface @ 18 NONAME
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_import/dll/group/HelloTraceDll.mmp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,40 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+
+TARGET		  HelloTraceDll.dll
+TARGETTYPE	  dll
+UID			  0x1000008d 0xE43DF43E
+CAPABILITY    ReadUserData
+
+OS_LAYER_SYSTEMINCLUDE
+USERINCLUDE  ../inc ../incDup
+USERINCLUDE  ../traces
+
+SOURCEPATH	 ../src
+SOURCE       HelloTraceExample.cpp 
+SOURCE       HelloTraceTypes.cpp
+SOURCE       HelloTraceInterface.cpp 
+SOURCE       HelloTraceFn.cpp 
+SOURCE       HelloTracePanic.cpp 
+
+LIBRARY		 euser.lib
+
+#ifdef ENABLE_ABIV2_MODE
+DEBUGGABLE_UDEBONLY
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_import/dll/group/bld.inf	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,27 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXPORTS
+hellotracedll.iby             CORE_OS_LAYER_IBY_EXPORT_PATH(hellotracedll.iby)
+
+PRJ_MMPFILES
+HelloTraceDll.mmp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_import/dll/group/hellotracedll.iby	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,22 @@
+// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+// ROM build file for tracecore project
+
+#ifndef HELLOTRACEDLL_IBY
+#define HELLOTRACEDLL_IBY
+
+file=ABI_DIR\BUILD_DIR\hellotracedll.dll        Sys\Bin\hellotracedll.dll
+
+#endif //HELLOTRACEDLL_IBY
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_import/dll/inc/HelloTraceExample.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,40 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef __HELLOTRACEEXAMPLE_H__
+#define __HELLOTRACEEXAMPLE_H__
+
+#include <e32std.h>
+
+class HelloTraceExample
+    {
+public:
+    IMPORT_C static void JustTypes();    
+    IMPORT_C static void Interface();    
+    IMPORT_C static void FnEntryExit();    
+    IMPORT_C static void PanicTrace();    
+
+    // @TODO add examples for state macros
+    // @TODO add examples for event macros
+    // @TODO add examples for OstTraceData
+    // @TODO add compile-time selector examples
+    // @TODO add macro wrapper examples
+    };
+
+#endif  // __HELLOTRACEEXAMPLE_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_import/dll/inc/HelloTraceInterface.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,63 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef __HELLOTRACEINTERFACE_H__
+#define __HELLOTRACEINTERFACE_H__
+
+#include <e32base.h>	// CBase
+#include <e32std.h>	 // TBuf
+
+const TInt KHelloTraceDllBufferLength = 10;
+typedef TBuf<KHelloTraceDllBufferLength> THelloTraceDllExampleString;
+
+class CHelloTraceInterface : public CBase
+    {
+public:
+    IMPORT_C static CHelloTraceInterface* NewL();
+    IMPORT_C static CHelloTraceInterface* NewLC();
+    IMPORT_C ~CHelloTraceInterface();
+
+public:
+    IMPORT_C static TVersion Version();
+    IMPORT_C const TPtrC String() const;
+    IMPORT_C void AddCharL(const TChar& aChar);
+    IMPORT_C void RemoveLast();
+    IMPORT_C void ResetString();
+    
+    IMPORT_C static TVersion VersionDup();
+    IMPORT_C const TPtrC StringDup() const;
+    IMPORT_C void AddCharDupL(const TChar& aChar);
+    IMPORT_C void RemoveLastDup();
+    IMPORT_C void ResetStringDup();
+
+    IMPORT_C static TVersion VersionDup2();
+    IMPORT_C const TPtrC StringDup2() const;
+    IMPORT_C void AddCharDup2L(const TChar& aChar);
+    IMPORT_C void RemoveLastDup2();
+    IMPORT_C void ResetStringDup2();
+private:
+    CHelloTraceInterface();
+    void ConstructL();
+
+private:
+    // data
+    THelloTraceDllExampleString* iString;
+    };
+
+#endif  // __HELLOTRACEINTERFACE_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_import/dll/inc/HelloTracePanic.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,35 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef __HELLOTRACEDLL_PAN__
+#define __HELLOTRACEDLL_PAN__
+
+//  Data Types
+
+enum THelloTraceDllPanic
+    {
+    EHelloTraceDllExamplePanic,
+    EHelloTraceDllNullPointer,
+    };
+
+//  Function Prototypes
+
+GLREF_C void Panic(THelloTraceDllPanic aPanic);
+
+#endif  // __HELLOTRACEDLL_PAN__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_import/dll/inc/HelloTraceTypes.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,39 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef __HELLOTRACETYPES_H__
+#define __HELLOTRACETYPES_H__
+
+class HelloTraceTypes
+    {
+public:
+    static void SignedIntegers();
+    static void UnsignedIntegers();
+    static void Descriptors();
+    
+    static void SignedIntegersDup();
+    static void UnsignedIntegersDup();
+    static void DescriptorsDup();
+        
+    static void SignedIntegersDup2();
+    static void UnsignedIntegersDup2();
+    static void DescriptorsDup2();
+    };
+
+#endif  // __HELLOTRACETYPES_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_import/dll/incDup/HelloTraceFnDup.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,157 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef HELLOTRACEFNDUP_H_
+#define HELLOTRACEFNDUP_H_
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTraceFnDupTraces.h"
+#endif
+
+inline void CHelloTraceFn::SimpleDup()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_SIMPLE_DUP_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_SIMPLE_DUP_EXIT, this );
+    }
+
+inline void CHelloTraceFn::OutputsParamsDup(TInt aParam, TFnEnum aEnumParam)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSPARAMS_DUP_ENTRY, this );
+    Simple();
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSPARAMS_DUP_EXIT, this );
+    }
+
+inline void CHelloTraceFn::StaticOutputsParamsDupL(TInt aParam)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_STATICOUTPUTSPARAMS_DUP_ENTRY, NULL );
+    CHelloTraceFn* example = CHelloTraceFn::NewLC();
+    example->SimpleDup();    
+    CleanupStack::PopAndDestroy(example);
+    OstTraceFunctionExit0( CHELLOTRACEFN_STATICOUTPUTSPARAMS_DUP_EXIT );    
+    }
+
+inline void CHelloTraceFn::OutputsSignedIntegersDup(TInt8 aParam8,   TInt16 aParam16, 
+                                          TInt32 aParam32, TInt64 aParam64)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS_DUP_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS_DUP_EXIT, this );
+    }
+
+void CHelloTraceFn::OutputsUnsignedIntegersDup(TUint8 aParam8,   TUint16 aParam16, 
+                                            TUint32 aParam32, TUint64 aParam64)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS_DUP_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS_DUP_EXIT, this );
+    }
+
+
+inline TInt CHelloTraceFn::OutputsTIntReturnValueDup()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_DUP_ENTRY, this );
+    TInt ret = KErrNone;
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_DUP_EXIT, this, ret );
+    return ret;
+    }
+
+inline TInt64 CHelloTraceFn::OutputsTInt64ReturnValueDup()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE_DUP_ENTRY, this );
+    TInt64 ret = (TInt64) 2 << 40;
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE_DUP_EXIT, this, ret );
+    return ret;
+    }
+
+inline CHelloTraceFn::TFnEnum CHelloTraceFn::OutputsTFnEnumReturnValueDup()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE_DUP_ENTRY, this );
+    TFnEnum ret = EExample1;
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE_DUP_EXIT, this, ret );
+    return ret;    
+    }
+
+inline CActive* CHelloTraceFn::OutputsUnknownPtrTypeDup(CActive* aActive)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_DUP_ENTRY, this );    
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_DUP_EXIT, this, (TUint) aActive );
+    return aActive;
+    }
+
+inline CActive& CHelloTraceFn::OutputsUnknownRefTypeDup(CActive& aActive)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE_DUP_ENTRY, this );
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE_DUP_EXIT, this, (TUint) &aActive );    
+    return aActive;
+    }
+
+// The following doesn't compile as the Trace Compiler doesn't generate
+// the correct OstTraceGenExt(...) function for it
+//void CHelloTraceFn::OutputMissingParamsBug(TInt /*aCommentParam*/, TInt)
+//    {
+//    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_ENTRY, this );
+//    // ...
+//    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_EXIT, this );    
+//    }
+
+// The following compiles and works but outputs the following warning
+// warning: HelloTraceFn.cpp, line xxx: Parameter did not have a name and was not added to trace
+// The fact that this cannot be suppressed is a known problem we're working on.
+inline void CHelloTraceFn::OutputMissingParamsDup(TInt aUsedParam, TInt /*aCommentParam*/, TInt)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMS_DUP_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMS_DUP_EXIT, this );
+    }
+
+// The following doesn't work as the Trace Compiler outputs:
+// error: HelloTraceFn.cpp, line xxx: Class / function name for trace could not be determined x3
+//#ifdef _DEBUG
+//void CHelloTraceFn::PreProcessedFn(TInt aDbgParam)
+//    {
+//    OstTraceFunctionEntryExt( PRE_PROCESSED_ENTRTY_1, this );
+//#else
+//void CHelloTraceFn::PreProcessedFn()
+//    {
+//    OstTraceFunctionEntry1( PRE_PROCESSED_ENTRTY_2, this );
+//#endif
+//    Simple();
+//    OstTraceFunctionExit1( CHELLOTRACEFN_PREPROCESSEDFN_EXIT, this );
+//    }
+
+// Workaround example code until a proper fix is provided
+#ifdef _DEBUG
+inline void CHelloTraceFn::PreProcessedFnDup(TInt aDbgParam)
+    {
+    OstTraceExt2( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_DUP_ENTRY_1, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;aDbgParam=%d;this=%x", (TInt) aDbgParam, (TUint) this);
+#else
+    inline void CHelloTraceFn::PreProcessedFnDup()
+    {
+    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_DUP_ENTRY_2, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
+#endif
+    SimpleDup();
+    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_DUP_EXIT, "CHelloTraceFn::PreProcessedFn: < CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
+    }
+
+#endif /* HELLOTRACEFNDUP_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_import/dll/incDup/HelloTraceFnDup2.inl	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,157 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef HELLOTRACEFNDUP2_H_
+#define HELLOTRACEFNDUP2_H_
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTraceFnDup2Traces.h"
+#endif
+
+inline void CHelloTraceFn::SimpleDup2()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_SIMPLE_DUP2_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_SIMPLE_DUP2_EXIT, this );
+    }
+
+inline void CHelloTraceFn::OutputsParamsDup2(TInt aParam, TFnEnum aEnumParam)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSPARAMS_DUP2_ENTRY, this );
+    Simple();
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSPARAMS_DUP2_EXIT, this );
+    }
+
+inline void CHelloTraceFn::StaticOutputsParamsDup2L(TInt aParam)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_STATICOUTPUTSPARAMS_DUP2_ENTRY, NULL );
+    CHelloTraceFn* example = CHelloTraceFn::NewLC();
+    example->SimpleDup2();    
+    CleanupStack::PopAndDestroy(example);
+    OstTraceFunctionExit0( CHELLOTRACEFN_STATICOUTPUTSPARAMS_DUP2_EXIT );    
+    }
+
+inline void CHelloTraceFn::OutputsSignedIntegersDup2(TInt8 aParam8,   TInt16 aParam16, 
+                                          TInt32 aParam32, TInt64 aParam64)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS_DUP2_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS_DUP2_EXIT, this );
+    }
+
+inline void CHelloTraceFn::OutputsUnsignedIntegersDup2(TUint8 aParam8,   TUint16 aParam16, 
+                                            TUint32 aParam32, TUint64 aParam64)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS_DUP2_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS_DUP2_EXIT, this );
+    }
+
+
+inline TInt CHelloTraceFn::OutputsTIntReturnValueDup2()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_DUP2_ENTRY, this );
+    TInt ret = KErrNone;
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_DUP2_EXIT, this, ret );
+    return ret;
+    }
+
+inline TInt64 CHelloTraceFn::OutputsTInt64ReturnValueDup2()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE_DUP2_ENTRY, this );
+    TInt64 ret = (TInt64) 2 << 40;
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE_DUP2_EXIT, this, ret );
+    return ret;
+    }
+
+inline CHelloTraceFn::TFnEnum CHelloTraceFn::OutputsTFnEnumReturnValueDup2()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE_DUP2_ENTRY, this );
+    TFnEnum ret = EExample1;
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE_DUP2_EXIT, this, ret );
+    return ret;    
+    }
+
+inline CActive* CHelloTraceFn::OutputsUnknownPtrTypeDup2(CActive* aActive)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_DUP2_ENTRY, this );    
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_DUP2_EXIT, this, (TUint) aActive );
+    return aActive;
+    }
+
+inline CActive& CHelloTraceFn::OutputsUnknownRefTypeDup2(CActive& aActive)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE_DUP2_ENTRY, this );
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE_DUP2_EXIT, this, (TUint) &aActive );    
+    return aActive;
+    }
+
+// The following doesn't compile as the Trace Compiler doesn't generate
+// the correct OstTraceGenExt(...) function for it
+//void CHelloTraceFn::OutputMissingParamsBug(TInt /*aCommentParam*/, TInt)
+//    {
+//    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_ENTRY, this );
+//    // ...
+//    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_EXIT, this );    
+//    }
+
+// The following compiles and works but outputs the following warning
+// warning: HelloTraceFn.cpp, line xxx: Parameter did not have a name and was not added to trace
+// The fact that this cannot be suppressed is a known problem we're working on.
+inline void CHelloTraceFn::OutputMissingParamsDup2(TInt aUsedParam, TInt /*aCommentParam*/, TInt)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMS_DUP2_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMS_DUP2_EXIT, this );
+    }
+
+// The following doesn't work as the Trace Compiler outputs:
+// error: HelloTraceFn.cpp, line xxx: Class / function name for trace could not be determined x3
+//#ifdef _DEBUG
+//void CHelloTraceFn::PreProcessedFn(TInt aDbgParam)
+//    {
+//    OstTraceFunctionEntryExt( PRE_PROCESSED_ENTRTY_1, this );
+//#else
+//void CHelloTraceFn::PreProcessedFn()
+//    {
+//    OstTraceFunctionEntry1( PRE_PROCESSED_ENTRTY_2, this );
+//#endif
+//    Simple();
+//    OstTraceFunctionExit1( CHELLOTRACEFN_PREPROCESSEDFN_EXIT, this );
+//    }
+
+// Workaround example code until a proper fix is provided
+#ifdef _DEBUG
+inline void CHelloTraceFn::PreProcessedFnDup2(TInt aDbgParam)
+    {
+    OstTraceExt2( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_DUP2_ENTRY_1, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;aDbgParam=%d;this=%x", (TInt) aDbgParam, (TUint) this);
+#else
+    inline void CHelloTraceFn::PreProcessedFnDup2()
+    {
+    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_DUP2_ENTRY_2, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
+#endif
+    SimpleDup2();
+    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_DUP2_EXIT, "CHelloTraceFn::PreProcessedFn: < CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
+    }
+
+#endif /* HELLOTRACEFNDUP2_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_import/dll/incDup/HelloTraceInterfaceDup.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,91 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef __HELLOTRACEINTERFACEDUP_H__
+#define __HELLOTRACEINTERFACEDUP_H__
+
+#include "HelloTracePanic.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTraceInterfaceDupTraces.h"
+#endif
+
+ inline EXPORT_C TVersion CHelloTraceInterface::VersionDup()
+        {
+        const TInt KMajor = 1;
+        const TInt KMinor = 0;
+        const TInt KBuild = 1;
+        TVersion version = TVersion(KMajor, KMinor, KBuild);
+        OstTraceExt1( TRACE_BORDER, CHELLOTRACEDLL_VERSION_DUP, "CHelloTraceInterface::Version = %S", version.Name());   
+        return version;
+        }
+
+ inline EXPORT_C const TPtrC CHelloTraceInterface::StringDup() const
+        {
+        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
+
+        OstTraceDefExt2( OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CHELLOTRACEDLL_STRING_DUP, 
+                         "[0x%08x] Returned %S", (TUint32) this, *iString);   
+        return *iString;
+        }
+
+ inline EXPORT_C void CHelloTraceInterface::AddCharDupL(const TChar& aChar)
+        {
+        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
+
+        OstTraceExt3( TRACE_BORDER, CHELLOTRACEDLL_ADDCHARL_DUP, 
+                      "[0x%08x] Adding %d to %S", (TUint32) this, (TInt32) aChar, *iString);   
+        if (iString->Length() >= KHelloTraceDllBufferLength)
+            {
+            OstTrace1( TRACE_ERROR, CHELLOTRACEDLL_ADDCHARL_ERR_DUP,
+                       "[0x%08x] Not enough space to add character", (TUint32) this);
+            User::Leave( KErrTooBig);
+            }
+        iString->Append(aChar);
+        }
+
+ inline EXPORT_C void CHelloTraceInterface::RemoveLastDup()
+        {
+        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
+
+        OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_REMOVELAST_DUP, 
+                      "[0x%08x] Attempting to remove last character from %S", (TUint32) this, *iString);
+        if (iString->Length() > 0)
+            {
+            iString->SetLength(iString->Length() - 1);
+            }
+        else
+            {
+            OstTrace1( TRACE_WARNING, CHELLOTRACEDLL_REMOVELAST_WARN_DUP, "[0x%08x] String already empty", (TUint32) this);   
+            }
+        }
+
+ inline EXPORT_C void CHelloTraceInterface::ResetStringDup()
+        {
+        OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_RESETSTRING_DUP, "[0x%08x] Reseting string %S", (TUint32) this, *iString);
+        if (iString == NULL)
+            {
+            iString = new (ELeave) THelloTraceDllExampleString;
+            }
+        else
+            {
+            iString->SetLength(0);
+            }
+        }
+#endif  // __HELLOTRACEINTERFACEDUP_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_import/dll/incDup/HelloTraceInterfaceDup2.inl	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,91 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef __HELLOTRACEINTERFACEDUP2_H__
+#define __HELLOTRACEINTERFACEDUP2_H__
+
+#include "HelloTracePanic.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTraceInterfaceDup2Traces.h"
+#endif
+
+ inline EXPORT_C TVersion CHelloTraceInterface::VersionDup2()
+        {
+        const TInt KMajor = 1;
+        const TInt KMinor = 0;
+        const TInt KBuild = 1;
+        TVersion version = TVersion(KMajor, KMinor, KBuild);
+        OstTraceExt1( TRACE_BORDER, CHELLOTRACEDLL_VERSION_DUP2, "CHelloTraceInterface::Version = %S", version.Name());   
+        return version;
+        }
+
+ inline EXPORT_C const TPtrC CHelloTraceInterface::StringDup2() const
+        {
+        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
+
+        OstTraceDefExt2( OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CHELLOTRACEDLL_STRING_DUP2, 
+                         "[0x%08x] Returned %S", (TUint32) this, *iString);   
+        return *iString;
+        }
+
+ inline EXPORT_C void CHelloTraceInterface::AddCharDup2L(const TChar& aChar)
+        {
+        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
+
+        OstTraceExt3( TRACE_BORDER, CHELLOTRACEDLL_ADDCHARL_DUP2, 
+                      "[0x%08x] Adding %d to %S", (TUint32) this, (TInt32) aChar, *iString);   
+        if (iString->Length() >= KHelloTraceDllBufferLength)
+            {
+            OstTrace1( TRACE_ERROR, CHELLOTRACEDLL_ADDCHARL_ERR_DUP2,
+                       "[0x%08x] Not enough space to add character", (TUint32) this);
+            User::Leave( KErrTooBig);
+            }
+        iString->Append(aChar);
+        }
+
+ inline EXPORT_C void CHelloTraceInterface::RemoveLastDup2()
+        {
+        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
+
+        OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_REMOVELAST_DUP2, 
+                      "[0x%08x] Attempting to remove last character from %S", (TUint32) this, *iString);
+        if (iString->Length() > 0)
+            {
+            iString->SetLength(iString->Length() - 1);
+            }
+        else
+            {
+            OstTrace1( TRACE_WARNING, CHELLOTRACEDLL_REMOVELAST_WARN_DUP2, "[0x%08x] String already empty", (TUint32) this);   
+            }
+        }
+
+ inline EXPORT_C void CHelloTraceInterface::ResetStringDup2()
+        {
+        OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_RESETSTRING_DUP2, "[0x%08x] Reseting string %S", (TUint32) this, *iString);
+        if (iString == NULL)
+            {
+            iString = new (ELeave) THelloTraceDllExampleString;
+            }
+        else
+            {
+            iString->SetLength(0);
+            }
+        }
+#endif  // __HELLOTRACEINTERFACEDUP2_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_import/dll/incDup/HelloTraceTypesDup.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,75 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef __HELLOTRACETYPESDUP_H__
+#define __HELLOTRACETYPESDUP_H__
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTraceTypesDupTraces.h"
+#endif
+
+inline void HelloTraceTypes::SignedIntegersDup()
+    {
+    TInt8  eightBit     = - (TInt8)  1 << 6;
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP_8, 
+                  "8 bit signed: %hhd", eightBit );
+    
+    TInt16 sixteenBit   = - (TInt16) 1 << 14; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP_16, 
+                  "16 bit signed: %hd", sixteenBit );
+
+    TInt32 thirtyTwoBit = - (TInt32) 1 << 30; 
+    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP_32, 
+               "32 bit signed: %d", thirtyTwoBit );
+
+    TInt64 sixtyFourBit = - (TInt64) 1 << 62; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP_64, 
+                  "64 bit signed: %Ld", sixtyFourBit );
+    }
+
+inline void HelloTraceTypes::UnsignedIntegersDup()
+    {
+    TUint8  eightBit     = (TUint8)  1 << 6;
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP_8, 
+                  "8 bit unsigned: %hhu", eightBit );
+    
+    TUint16 sixteenBit   = (TUint16) 1 << 14; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP_16, 
+                  "16 bit unsigned: %hu", sixteenBit );
+
+    TUint32 thirtyTwoBit = (TUint32) 1 << 30; 
+    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP_32, 
+               "32 bit unsigned: %u", thirtyTwoBit );
+
+    TUint64 sixtyFourBit = (TUint64) 1 << 62; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP_64, 
+                  "64 bit unsigned: %Lu", sixtyFourBit );
+    }
+
+inline void HelloTraceTypes::DescriptorsDup()
+    {
+    _LIT8(KAscii, "Some ASCII text");
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_ASCIIDUP, "8 bit descriptor: %s", KAscii() );
+
+    _LIT16(KUnicode, "Some unicode text");    
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNICODEDUP, "16 bit descriptor: %S", KUnicode() );
+    }
+
+#endif  // __HELLOTRACETYPESDUP_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_import/dll/incDup/HelloTraceTypesDup2.inl	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,75 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef __HELLOTRACETYPESDUP2_H__
+#define __HELLOTRACETYPESDUP2_H__
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTraceTypesDup2Traces.h"
+#endif
+
+inline void HelloTraceTypes::SignedIntegersDup2()
+    {
+    TInt8  eightBit     = - (TInt8)  1 << 6;
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP2_8, 
+                  "8 bit signed: %hhd", eightBit );
+    
+    TInt16 sixteenBit   = - (TInt16) 1 << 14; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP2_16, 
+                  "16 bit signed: %hd", sixteenBit );
+
+    TInt32 thirtyTwoBit = - (TInt32) 1 << 30; 
+    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP2_32, 
+               "32 bit signed: %d", thirtyTwoBit );
+
+    TInt64 sixtyFourBit = - (TInt64) 1 << 62; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP2_64, 
+                  "64 bit signed: %Ld", sixtyFourBit );
+    }
+
+inline void HelloTraceTypes::UnsignedIntegersDup2()
+    {
+    TUint8  eightBit     = (TUint8)  1 << 6;
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP2_8, 
+                  "8 bit unsigned: %hhu", eightBit );
+    
+    TUint16 sixteenBit   = (TUint16) 1 << 14; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP2_16, 
+                  "16 bit unsigned: %hu", sixteenBit );
+
+    TUint32 thirtyTwoBit = (TUint32) 1 << 30; 
+    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP2_32, 
+               "32 bit unsigned: %u", thirtyTwoBit );
+
+    TUint64 sixtyFourBit = (TUint64) 1 << 62; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP2_64, 
+                  "64 bit unsigned: %Lu", sixtyFourBit );
+    }
+
+inline void HelloTraceTypes::DescriptorsDup2()
+    {
+    _LIT8(KAscii, "Some ASCII text");
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_ASCIIDUP2, "8 bit descriptor: %s", KAscii() );
+
+    _LIT16(KUnicode, "Some unicode text");    
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNICODEDUP2, "16 bit descriptor: %S", KUnicode() );
+    }
+
+#endif  // __HELLOTRACETYPESDUP2_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_import/dll/src/HelloTraceExample.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,106 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+
+#include "HelloTraceExample.h"
+#include "HelloTraceTypes.h"
+#include "HelloTraceInterface.h"
+#include "HelloTraceFn.h"
+#include "HelloTracePanic.h"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTraceExampleTraces.h"
+#endif
+
+EXPORT_C void HelloTraceExample::JustTypes()
+    {
+    OstTrace0( TRACE_EXAMPLE, HELLOTRACEEXAMPLE_JUSTTYPES, "*********************************************** " );
+    
+    HelloTraceTypes::SignedIntegers();
+    HelloTraceTypes::UnsignedIntegers();
+    HelloTraceTypes::Descriptors();    
+    }
+
+EXPORT_C void HelloTraceExample::Interface()
+    {
+    OstTrace0( TRACE_EXAMPLE, HELLOTRACEEXAMPLE_INTERFACE, "*********************************************** " );
+    
+    TVersion version = CHelloTraceInterface::Version();   
+    if (version.iMajor >= 1) 
+        {
+        CHelloTraceInterface* example = CHelloTraceInterface::NewLC();
+        example->AddCharL('H');
+        example->AddCharL('e');
+        example->AddCharL('l');
+        example->AddCharL('l');
+        example->AddCharL('o');
+        example->AddCharL('T');        
+        example->RemoveLast();        
+        example->AddCharL(' ');
+        example->AddCharL('T');
+        example->AddCharL('r');
+        example->AddCharL('a');
+        example->AddCharL('c');
+        example->AddCharL('e');
+        example->AddCharL('!');
+        CleanupStack::PopAndDestroy(example);
+        }
+    else
+        {
+        OstTrace0( TRACE_ERROR, HELLOTRACEEXAMPLE_UNSUPPORTED_VERSION, "Unsupported version!");
+        }
+    }
+
+EXPORT_C void HelloTraceExample::FnEntryExit()
+    {
+    OstTrace0( TRACE_EXAMPLE, HELLOTRACEEXAMPLE_FNENTRYEXIT, "*********************************************** " );
+       
+    CHelloTraceFn* example = CHelloTraceFn::NewLC();
+    CIdle* idle = CIdle::NewL(CActive::EPriorityIdle);
+    CleanupStack::PushL(idle);
+
+    CHelloTraceFn::StaticOutputsParamsL(1);
+   
+    example->Simple();
+    example->OutputsParams(2, CHelloTraceFn::EExample1);
+    example->OutputsParams(3, CHelloTraceFn::EExample2);
+    example->OutputsSignedIntegers(-4, -5, -6, -7);
+    example->OutputsUnsignedIntegers(8, 9, 10, 11);
+    example->OutputsTIntReturnValue();    
+    example->OutputsTInt64ReturnValue(); 
+    example->OutputsTFnEnumReturnValue();
+    example->OutputsUnknownPtrType(idle);    
+    example->OutputsUnknownRefType(*idle);
+#ifdef _DEBUG
+    example->PreProcessedFn(12);
+#else
+    example->PreProcessedFn();
+#endif
+    example->OutputMissingParams(13, 14, 15);
+
+    CleanupStack::PopAndDestroy(idle);
+    CleanupStack::PopAndDestroy(example);
+    }
+
+EXPORT_C void HelloTraceExample::PanicTrace()
+    {
+    OstTrace0( TRACE_EXAMPLE, HELLOTRACEEXAMPLE_PANIC, "*********************************************** " );
+
+    Panic(EHelloTraceDllExamplePanic);
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_import/dll/src/HelloTraceFn.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,183 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+ 
+#include <HelloTraceFn.h>
+#include "HelloTraceFnDup.h"
+#include "HelloTraceFnDup2.inl"
+#include "HelloTracePanic.h"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTraceFnTraces.h"
+#endif
+
+CHelloTraceFn* CHelloTraceFn::NewLC()
+    {
+    CHelloTraceFn* self = new (ELeave) CHelloTraceFn;
+    CleanupStack::PushL(self);
+    return self;
+    }
+
+CHelloTraceFn* CHelloTraceFn::NewL()
+    {
+    CHelloTraceFn* self = CHelloTraceFn::NewLC();
+    CleanupStack::Pop(self);
+    return self;
+    }
+
+CHelloTraceFn::CHelloTraceFn()
+    {
+    OstTrace1( TRACE_NORMAL, CHELLOTRACEFN_CHELLOTRACEFN_CTOR, "[0x%08x] Constructor", this );    
+    }
+
+CHelloTraceFn::~CHelloTraceFn()
+    {
+    OstTrace1( TRACE_NORMAL, CHELLOTRACEFN_CHELLOTRACEFN_DTOR, "[0x%08x] Destructor", this );    
+    }
+
+void CHelloTraceFn::Simple()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_SIMPLE_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_SIMPLE_EXIT, this );
+    }
+
+void CHelloTraceFn::OutputsParams(TInt aParam, TFnEnum aEnumParam)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSPARAMS_ENTRY, this );
+    Simple();
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSPARAMS_EXIT, this );
+    }
+
+void CHelloTraceFn::StaticOutputsParamsL(TInt aParam)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_STATICOUTPUTSPARAMS_ENTRY, NULL );
+    CHelloTraceFn* example = CHelloTraceFn::NewLC();
+    example->Simple();    
+    CleanupStack::PopAndDestroy(example);
+    OstTraceFunctionExit0( CHELLOTRACEFN_STATICOUTPUTSPARAMS_EXIT );    
+    }
+
+void CHelloTraceFn::OutputsSignedIntegers(TInt8 aParam8,   TInt16 aParam16, 
+                                          TInt32 aParam32, TInt64 aParam64)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS_EXIT, this );
+    }
+
+void CHelloTraceFn::OutputsUnsignedIntegers(TUint8 aParam8,   TUint16 aParam16, 
+                                            TUint32 aParam32, TUint64 aParam64)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS_EXIT, this );
+    }
+
+
+TInt CHelloTraceFn::OutputsTIntReturnValue()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_ENTRY, this );
+    TInt ret = KErrNone;
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_EXIT, this, ret );
+    return ret;
+    }
+
+TInt64 CHelloTraceFn::OutputsTInt64ReturnValue()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE_ENTRY, this );
+    TInt64 ret = (TInt64) 2 << 40;
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE_EXIT, this, ret );
+    return ret;
+    }
+
+CHelloTraceFn::TFnEnum CHelloTraceFn::OutputsTFnEnumReturnValue()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE_ENTRY, this );
+    TFnEnum ret = EExample1;
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE_EXIT, this, ret );
+    return ret;    
+    }
+
+CActive* CHelloTraceFn::OutputsUnknownPtrType(CActive* aActive)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_ENTRY, this );    
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_EXIT, this, (TUint) aActive );
+    return aActive;
+    }
+
+CActive& CHelloTraceFn::OutputsUnknownRefType(CActive& aActive)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE_ENTRY, this );
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE_EXIT, this, (TUint) &aActive );    
+    return aActive;
+    }
+
+// The following doesn't compile as the Trace Compiler doesn't generate
+// the correct OstTraceGenExt(...) function for it
+//void CHelloTraceFn::OutputMissingParamsBug(TInt /*aCommentParam*/, TInt)
+//    {
+//    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_ENTRY, this );
+//    // ...
+//    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_EXIT, this );    
+//    }
+
+// The following compiles and works but outputs the following warning
+// warning: HelloTraceFn.cpp, line xxx: Parameter did not have a name and was not added to trace
+// The fact that this cannot be suppressed is a known problem we're working on.
+void CHelloTraceFn::OutputMissingParams(TInt aUsedParam, TInt /*aCommentParam*/, TInt)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMS_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMS_EXIT, this );
+    }
+
+// The following doesn't work as the Trace Compiler outputs:
+// error: HelloTraceFn.cpp, line xxx: Class / function name for trace could not be determined x3
+//#ifdef _DEBUG
+//void CHelloTraceFn::PreProcessedFn(TInt aDbgParam)
+//    {
+//    OstTraceFunctionEntryExt( PRE_PROCESSED_ENTRTY_1, this );
+//#else
+//void CHelloTraceFn::PreProcessedFn()
+//    {
+//    OstTraceFunctionEntry1( PRE_PROCESSED_ENTRTY_2, this );
+//#endif
+//    Simple();
+//    OstTraceFunctionExit1( CHELLOTRACEFN_PREPROCESSEDFN_EXIT, this );
+//    }
+
+// Workaround example code until a proper fix is provided
+#ifdef _DEBUG
+void CHelloTraceFn::PreProcessedFn(TInt aDbgParam)
+    {
+    OstTraceExt2( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_ENTRY_1, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;aDbgParam=%d;this=%x", (TInt) aDbgParam, (TUint) this);
+#else
+void CHelloTraceFn::PreProcessedFn()
+    {
+    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_ENTRY_2, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
+#endif
+    Simple();
+    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_EXIT, "CHelloTraceFn::PreProcessedFn: < CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
+    }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_import/dll/src/HelloTraceInterface.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,120 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#include "HelloTraceInterface.h"
+#include "HelloTraceInterfaceDup.h"
+#include "HelloTraceInterfaceDup2.inl"
+#include "HelloTracePanic.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTraceInterfaceTraces.h"
+#endif
+
+EXPORT_C CHelloTraceInterface* CHelloTraceInterface::NewLC()
+    {
+    CHelloTraceInterface* self = new (ELeave) CHelloTraceInterface;
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    return self;
+    }
+
+EXPORT_C CHelloTraceInterface* CHelloTraceInterface::NewL()
+    {
+    CHelloTraceInterface* self = CHelloTraceInterface::NewLC();
+    CleanupStack::Pop(self);
+    return self;
+    }
+
+CHelloTraceInterface::CHelloTraceInterface()
+    {
+    OstTrace1( TRACE_NORMAL, CHELLOTRACEDLL_CHELLOTRACEDLL_CTOR, "[0x%08x]", (TUint32) this );    
+    }
+
+void CHelloTraceInterface::ConstructL()
+    {
+    iString = new (ELeave) THelloTraceDllExampleString;
+    }
+
+EXPORT_C CHelloTraceInterface::~CHelloTraceInterface()
+    {
+    delete iString;
+    OstTrace1( TRACE_NORMAL, CHELLOTRACEDLL_CHELLOTRACEDLL_DTOR, "[0x%08x]", (TUint32) this );    
+    }
+
+EXPORT_C TVersion CHelloTraceInterface::Version()
+    {
+    const TInt KMajor = 1;
+    const TInt KMinor = 0;
+    const TInt KBuild = 1;
+    TVersion version = TVersion(KMajor, KMinor, KBuild);
+    OstTraceExt1( TRACE_BORDER, CHELLOTRACEDLL_VERSION, "CHelloTraceInterface::Version = %S", version.Name());   
+    return version;
+    }
+
+EXPORT_C const TPtrC CHelloTraceInterface::String() const
+    {
+    __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
+
+    OstTraceDefExt2( OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CHELLOTRACEDLL_STRING, 
+                     "[0x%08x] Returned %S", (TUint32) this, *iString);   
+    return *iString;
+    }
+
+EXPORT_C void CHelloTraceInterface::AddCharL(const TChar& aChar)
+    {
+    __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
+
+    OstTraceExt3( TRACE_BORDER, CHELLOTRACEDLL_ADDCHARL, 
+                  "[0x%08x] Adding %d to %S", (TUint32) this, (TInt32) aChar, *iString);   
+    if (iString->Length() >= KHelloTraceDllBufferLength)
+        {
+        OstTrace1( TRACE_ERROR, CHELLOTRACEDLL_ADDCHARL_ERR,
+                   "[0x%08x] Not enough space to add character", (TUint32) this);
+        User::Leave( KErrTooBig);
+        }
+    iString->Append(aChar);
+    }
+
+EXPORT_C void CHelloTraceInterface::RemoveLast()
+    {
+    __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
+
+    OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_REMOVELAST, 
+                  "[0x%08x] Attempting to remove last character from %S", (TUint32) this, *iString);
+    if (iString->Length() > 0)
+        {
+        iString->SetLength(iString->Length() - 1);
+        }
+    else
+        {
+        OstTrace1( TRACE_WARNING, CHELLOTRACEDLL_REMOVELAST_WARN, "[0x%08x] String already empty", (TUint32) this);   
+        }
+    }
+
+EXPORT_C void CHelloTraceInterface::ResetString()
+    {
+    OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_RESETSTRING, "[0x%08x] Reseting string %S", (TUint32) this, *iString);
+    if (iString == NULL)
+        {
+        iString = new (ELeave) THelloTraceDllExampleString;
+        }
+    else
+        {
+        iString->SetLength(0);
+        }
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_import/dll/src/HelloTracePanic.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,32 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#include <e32std.h>		 // GLDEF_C
+
+#include "HelloTracePanic.h"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTracePanicTraces.h"
+#endif
+
+GLDEF_C void Panic(THelloTraceDllPanic aPanic)
+    {
+    OstTrace1( TRACE_FATAL, PANIC, "Panic(%{THelloTraceDllPanic})", (TUint) aPanic );    
+    User::Panic(_L("HelloTraceDll"), aPanic);
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_import/dll/src/HelloTraceTypes.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,76 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+
+#include <e32std.h>
+
+#include "HelloTraceTypes.h"
+#include "HelloTraceTypesDup.h"
+#include "HelloTraceTypesDup2.inl"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTraceTypesTraces.h"
+#endif
+
+void HelloTraceTypes::SignedIntegers()
+    {
+    TInt8  eightBit     = - (TInt8)  1 << 6;
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS_8, 
+                  "8 bit signed: %hhd", eightBit );
+    
+    TInt16 sixteenBit   = - (TInt16) 1 << 14; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS_16, 
+                  "16 bit signed: %hd", sixteenBit );
+
+    TInt32 thirtyTwoBit = - (TInt32) 1 << 30; 
+    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS_32, 
+               "32 bit signed: %d", thirtyTwoBit );
+
+    TInt64 sixtyFourBit = - (TInt64) 1 << 62; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS_64, 
+                  "64 bit signed: %Ld", sixtyFourBit );
+    }
+
+void HelloTraceTypes::UnsignedIntegers()
+    {
+    TUint8  eightBit     = (TUint8)  1 << 6;
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS_8, 
+                  "8 bit unsigned: %hhu", eightBit );
+    
+    TUint16 sixteenBit   = (TUint16) 1 << 14; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS_16, 
+                  "16 bit unsigned: %hu", sixteenBit );
+
+    TUint32 thirtyTwoBit = (TUint32) 1 << 30; 
+    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS_32, 
+               "32 bit unsigned: %u", thirtyTwoBit );
+
+    TUint64 sixtyFourBit = (TUint64) 1 << 62; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS_64, 
+                  "64 bit unsigned: %Lu", sixtyFourBit );
+    }
+
+void HelloTraceTypes::Descriptors()
+    {
+    _LIT8(KAscii, "Some ASCII text");
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_ASCII, "8 bit descriptor: %s", KAscii() );
+
+    _LIT16(KUnicode, "Some unicode text");    
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNICODE, "16 bit descriptor: %S", KUnicode() );
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_import/dll/traces/trace.properties	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<trace_properties>
+<enum name="TFnEnum">
+<value id="0">EExample1</value>
+<value id="2">EExample2</value>
+</enum>
+<enum name="THelloTraceDllPanic">
+<value id="0">EHelloTraceDllExamplePanic</value>
+<value id="1">EHelloTraceDllNullPointer</value>
+</enum>
+<file>../incDup/HelloTraceInterfaceDup.h</file>
+<file>../incDup/HelloTraceInterfaceDup2.inl</file>
+<file>../incDup/HelloTraceFnDup2.inl</file>
+<file>../incDup/HelloTraceTypesDup.h</file>
+<file>../incDup/HelloTraceTypesDup2.inl</file>
+</trace_properties>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_import/group/bld.inf	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,19 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+#include "../dll/group/bld.inf"
+#include "../console/group/bld.inf"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/console/group/HelloTraceConsole.mmp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,37 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+
+TARGET		  HelloTraceConsole.exe
+TARGETTYPE	  exe
+UID			  0 0xE40349E4
+
+OS_LAYER_SYSTEMINCLUDE
+USERINCLUDE	   ../inc
+USERINCLUDE    ../../dll/inc
+USERINCLUDE    ../traces
+
+SOURCEPATH	  ../src
+SOURCE		  HelloTraceConsole.cpp
+
+LIBRARY		  euser.lib
+LIBRARY       HelloTraceDll.lib
+
+#ifdef ENABLE_ABIV2_MODE
+DEBUGGABLE_UDEBONLY
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/console/group/bld.inf	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,27 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXPORTS
+hellotraceconsole.iby             CORE_OS_LAYER_IBY_EXPORT_PATH(hellotraceconsole.iby)
+
+PRJ_MMPFILES
+HelloTraceConsole.mmp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/console/group/hellotraceconsole.iby	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,24 @@
+// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+// ROM build file for tracecore project
+
+#ifndef HELLOTRACECONSOLE_IBY
+#define HELLOTRACECONSOLE_IBY
+
+#include <core\os\hellotracedll.iby>
+
+file=ABI_DIR\BUILD_DIR\hellotraceconsole.exe    Sys\Bin\hellotraceconsole.exe
+
+#endif //HELLOTRACECONSOLE_IBY
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/console/inc/HelloTraceConsole.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,31 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef __HELLOTRACECONSOLE_H__
+#define __HELLOTRACECONSOLE_H__
+
+//  Include Files
+
+#include <e32base.h>
+
+//  Function Prototypes
+
+GLDEF_C TInt E32Main();
+
+#endif  // __HELLOTRACECONSOLE_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/console/src/HelloTraceConsole.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,124 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#include <e32cons.h>			// Console
+
+#include "HelloTraceConsole.h"
+#include "HelloTraceExample.h"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTraceConsoleTraces.h"
+#endif
+
+
+_LIT(KTextConsoleTitle, "HelloTrace");
+_LIT(KTextPressAnyKey, " [press any key]\n");
+
+LOCAL_D CConsoleBase* console; // write all messages to this
+
+LOCAL_C void DoExamples()
+    {
+    TInt err = KErrNone;
+
+    console->Printf(_L("Before main tracing examples ...\n"));
+
+    console->Printf(_L(" Before type examples ..."));
+    console->Printf(KTextPressAnyKey);
+    console->Getch();
+    TRAP(err, HelloTraceExample::JustTypes());    
+    if (err)
+        console->Printf(_L(" Failed with error %d\n"), err);
+
+    console->Printf(_L(" Before Interface examples ..."));
+    console->Printf(KTextPressAnyKey);
+    console->Getch();
+    TRAP(err, HelloTraceExample::Interface());    
+    if (err)
+        console->Printf(_L(" Failed with error %d\n"), err);
+    
+    console->Printf(_L(" Before FnEntryExit examples ..."));
+    console->Printf(KTextPressAnyKey);
+    console->Getch();
+    TRAP(err, HelloTraceExample::FnEntryExit());    
+    if (err)
+        console->Printf(_L(" Failed with error %d\n"), err);    
+    }
+
+LOCAL_C void DoStartL()
+    {
+    // Create active scheduler (to run active objects)
+    CActiveScheduler* scheduler = new (ELeave) CActiveScheduler();
+    CleanupStack::PushL(scheduler);
+    CActiveScheduler::Install(scheduler);
+
+    DoExamples();
+    
+    // Delete active scheduler
+    CleanupStack::PopAndDestroy(scheduler);
+    }
+
+//  Global Functions
+
+GLDEF_C TInt E32Main()
+    {
+    OstTraceFunctionEntry0( E32MAIN_ENTRY );
+    
+    // Create cleanup stack
+    __UHEAP_MARK;
+    CTrapCleanup* cleanup = CTrapCleanup::New();
+
+    // Create output console
+    TRAPD(createError, 
+          console = Console::NewL(KTextConsoleTitle, 
+                                  TSize(KConsFullScreen, KConsFullScreen)));    
+    if (createError)
+        {
+        delete cleanup;
+        OstTrace1( TRACE_ERROR, E32MAIN_CREATE_ERROR, "Failed to create console error: %d", createError);
+        OstTraceFunctionExit0( E32MAIN_EXIT_ERR );
+        return createError;
+        }
+
+    TRAPD(mainError, DoStartL());    
+    if (mainError)
+        {
+        OstTrace1( TRACE_ERROR, E32MAIN_START_ERROR, "DoStartL failed with error: %d", mainError);
+        console->Printf(_L("DoStartL failed with error: %d\n\n"), mainError);
+        }
+    else 
+        {
+        console->Printf(_L("Before panic tracing example ..."));
+        console->Printf(KTextPressAnyKey);
+        console->Getch();
+    
+        OstTrace0( TRACE_FLOW, E32MAIN_BEFORE_PANIC, "About to cause a panic ..." );
+        HelloTraceExample::PanicTrace();
+        
+        console->Printf(KTextPressAnyKey);
+        console->Getch();
+        }
+
+    delete console;
+    delete cleanup;
+    __UHEAP_MARKEND;
+    
+    OstTraceFunctionExit0( E32MAIN_EXIT );
+    return KErrNone;
+    }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/dll/bwins/HelloTraceDllu.def	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,14 @@
+EXPORTS
+	?Version@CHelloTraceInterface@@SA?AVTVersion@@XZ @ 1 NONAME ; class TVersion CHelloTraceInterface::Version(void)
+	?NewLC@CHelloTraceInterface@@SAPAV1@XZ @ 2 NONAME ; class CHelloTraceInterface * CHelloTraceInterface::NewLC(void)
+	?JustTypes@HelloTraceExample@@SAXXZ @ 3 NONAME ; void HelloTraceExample::JustTypes(void)
+	?Interface@HelloTraceExample@@SAXXZ @ 4 NONAME ; void HelloTraceExample::Interface(void)
+	?FnEntryExit@HelloTraceExample@@SAXXZ @ 5 NONAME ; void HelloTraceExample::FnEntryExit(void)
+	?ResetString@CHelloTraceInterface@@QAEXXZ @ 6 NONAME ; void CHelloTraceInterface::ResetString(void)
+	?AddCharL@CHelloTraceInterface@@QAEXABVTChar@@@Z @ 7 NONAME ; void CHelloTraceInterface::AddCharL(class TChar const &)
+	?PanicTrace@HelloTraceExample@@SAXXZ @ 8 NONAME ; void HelloTraceExample::PanicTrace(void)
+	??1CHelloTraceInterface@@UAE@XZ @ 9 NONAME ; CHelloTraceInterface::~CHelloTraceInterface(void)
+	?String@CHelloTraceInterface@@QBE?BVTPtrC16@@XZ @ 10 NONAME ; class TPtrC16 const CHelloTraceInterface::String(void) const
+	?RemoveLast@CHelloTraceInterface@@QAEXXZ @ 11 NONAME ; void CHelloTraceInterface::RemoveLast(void)
+	?NewL@CHelloTraceInterface@@SAPAV1@XZ @ 12 NONAME ; class CHelloTraceInterface * CHelloTraceInterface::NewL(void)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/dll/eabi/HelloTraceDllu.def	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,20 @@
+EXPORTS
+	_ZN17HelloTraceExample10PanicTraceEv @ 1 NONAME
+	_ZN17HelloTraceExample11FnEntryExitEv @ 2 NONAME
+	_ZN17HelloTraceExample9InterfaceEv @ 3 NONAME
+	_ZN17HelloTraceExample9JustTypesEv @ 4 NONAME
+	_ZN20CHelloTraceInterface10RemoveLastEv @ 5 NONAME
+	_ZN20CHelloTraceInterface11ResetStringEv @ 6 NONAME
+	_ZN20CHelloTraceInterface4NewLEv @ 7 NONAME
+	_ZN20CHelloTraceInterface5NewLCEv @ 8 NONAME
+	_ZN20CHelloTraceInterface7VersionEv @ 9 NONAME
+	_ZN20CHelloTraceInterface8AddCharLERK5TChar @ 10 NONAME
+	_ZN20CHelloTraceInterfaceD0Ev @ 11 NONAME
+	_ZN20CHelloTraceInterfaceD1Ev @ 12 NONAME
+	_ZN20CHelloTraceInterfaceD2Ev @ 13 NONAME
+	_ZNK20CHelloTraceInterface6StringEv @ 14 NONAME
+	_ZTI13CHelloTraceFn @ 15 NONAME
+	_ZTI20CHelloTraceInterface @ 16 NONAME
+	_ZTV13CHelloTraceFn @ 17 NONAME
+	_ZTV20CHelloTraceInterface @ 18 NONAME
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/dll/group/HelloTraceDll.mmp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,40 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+
+TARGET		  HelloTraceDll.dll
+TARGETTYPE	  dll
+UID			  0x1000008d 0xE43DF43E
+CAPABILITY    ReadUserData
+
+OS_LAYER_SYSTEMINCLUDE
+USERINCLUDE  ../inc ../incDup
+USERINCLUDE  ../traces
+
+SOURCEPATH	 ../src
+SOURCE       HelloTraceExample.cpp 
+SOURCE       HelloTraceTypes.cpp
+SOURCE       HelloTraceInterface.cpp 
+SOURCE       HelloTraceFn.cpp 
+SOURCE       HelloTracePanic.cpp 
+
+LIBRARY		 euser.lib
+
+#ifdef ENABLE_ABIV2_MODE
+DEBUGGABLE_UDEBONLY
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/dll/group/bld.inf	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,27 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXPORTS
+hellotracedll.iby             CORE_OS_LAYER_IBY_EXPORT_PATH(hellotracedll.iby)
+
+PRJ_MMPFILES
+HelloTraceDll.mmp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/dll/group/hellotracedll.iby	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,22 @@
+// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+// ROM build file for tracecore project
+
+#ifndef HELLOTRACEDLL_IBY
+#define HELLOTRACEDLL_IBY
+
+file=ABI_DIR\BUILD_DIR\hellotracedll.dll        Sys\Bin\hellotracedll.dll
+
+#endif //HELLOTRACEDLL_IBY
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/dll/inc/HelloTraceExample.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,40 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef __HELLOTRACEEXAMPLE_H__
+#define __HELLOTRACEEXAMPLE_H__
+
+#include <e32std.h>
+
+class HelloTraceExample
+    {
+public:
+    IMPORT_C static void JustTypes();    
+    IMPORT_C static void Interface();    
+    IMPORT_C static void FnEntryExit();    
+    IMPORT_C static void PanicTrace();    
+
+    // @TODO add examples for state macros
+    // @TODO add examples for event macros
+    // @TODO add examples for OstTraceData
+    // @TODO add compile-time selector examples
+    // @TODO add macro wrapper examples
+    };
+
+#endif  // __HELLOTRACEEXAMPLE_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/dll/inc/HelloTraceFn.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,122 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef HELLOTRACEFN_H_
+#define HELLOTRACEFN_H_
+
+#include <e32base.h>    // CBase
+
+class CHelloTraceFn : public CBase
+    {
+public:
+    
+    // Note the Trace Builder will only parse this if it's in a cpp file
+    // but not from here :(
+    // Also if you add a new enum you need to reparse the enum - it doesn't
+    // get automatically reparsed by the Trace Compiler :(
+    enum TFnEnum
+        {
+        EExample1,
+        EExample2 = 2, 
+        // EExample3 = EExample2 + 1, // The Trace Builder can't parse this :(
+        };
+    
+public:
+    static CHelloTraceFn* NewL();
+    static CHelloTraceFn* NewLC();
+    ~CHelloTraceFn();
+   
+public: // Fn entry / exit tracing examples 
+    void Simple();
+    void OutputsParams(TInt aParam, TFnEnum aEnumParam);
+    void OutputsSignedIntegers(TInt8 aParam8,   TInt16 aParam16, 
+                               TInt32 aParam32, TInt64 aParam64);
+    void OutputsUnsignedIntegers(TUint8 aParam8,   TUint16 aParam16, 
+                                 TUint32 aParam32, TUint64 aParam64);
+     
+    TInt OutputsTIntReturnValue();
+    TInt64 OutputsTInt64ReturnValue();
+    TFnEnum OutputsTFnEnumReturnValue();
+
+    CActive* OutputsUnknownPtrType(CActive* aActive);
+    CActive& OutputsUnknownRefType(CActive& aActive);
+    
+    void OutputMissingParams(TInt aUsedParam, TInt aCommentParam, TInt aMissingParam);
+
+#ifdef _DEBUG    
+    void PreProcessedFn(TInt aDbgParam);
+#else
+    void PreProcessedFn();
+#endif
+    
+    static void StaticOutputsParamsL(TInt aParam);  
+    
+    // duplicate all the function and put the impl in the header file HelloTraceFnDup.h
+    void SimpleDup();
+    void OutputsParamsDup(TInt aParam, TFnEnum aEnumParam);
+    void OutputsSignedIntegersDup(TInt8 aParam8,   TInt16 aParam16, 
+                               TInt32 aParam32, TInt64 aParam64);
+    void OutputsUnsignedIntegersDup(TUint8 aParam8,   TUint16 aParam16, 
+                                 TUint32 aParam32, TUint64 aParam64);
+     
+    TInt OutputsTIntReturnValueDup();
+    TInt64 OutputsTInt64ReturnValueDup();
+    TFnEnum OutputsTFnEnumReturnValueDup();
+
+    CActive* OutputsUnknownPtrTypeDup(CActive* aActive);
+    CActive& OutputsUnknownRefTypeDup(CActive& aActive);
+    
+    void OutputMissingParamsDup(TInt aUsedParam, TInt aCommentParam, TInt aMissingParam);
+
+#ifdef _DEBUG    
+    void PreProcessedFnDup(TInt aDbgParam);
+#else
+    void PreProcessedFnDup();
+#endif
+    static void StaticOutputsParamsDupL(TInt aParam);  
+    
+    // duplicate all the function again and put the impl in the header file HelloTraceFnDup2.h
+    void SimpleDup2();
+    void OutputsParamsDup2(TInt aParam, TFnEnum aEnumParam);
+    void OutputsSignedIntegersDup2(TInt8 aParam8,   TInt16 aParam16, 
+                               TInt32 aParam32, TInt64 aParam64);
+    void OutputsUnsignedIntegersDup2(TUint8 aParam8,   TUint16 aParam16, 
+                                 TUint32 aParam32, TUint64 aParam64);
+     
+    TInt OutputsTIntReturnValueDup2();
+    TInt64 OutputsTInt64ReturnValueDup2();
+    TFnEnum OutputsTFnEnumReturnValueDup2();
+
+    CActive* OutputsUnknownPtrTypeDup2(CActive* aActive);
+    CActive& OutputsUnknownRefTypeDup2(CActive& aActive);
+    
+    void OutputMissingParamsDup2(TInt aUsedParam, TInt aCommentParam, TInt aMissingParam);
+
+#ifdef _DEBUG    
+    void PreProcessedFnDup2(TInt aDbgParam);
+#else
+    void PreProcessedFnDup2();
+#endif
+    static void StaticOutputsParamsDup2L(TInt aParam);  
+
+
+private:
+    CHelloTraceFn();
+    };
+
+#endif /* HELLOTRACEFN_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/dll/inc/HelloTraceInterface.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,63 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef __HELLOTRACEINTERFACE_H__
+#define __HELLOTRACEINTERFACE_H__
+
+#include <e32base.h>	// CBase
+#include <e32std.h>	 // TBuf
+
+const TInt KHelloTraceDllBufferLength = 10;
+typedef TBuf<KHelloTraceDllBufferLength> THelloTraceDllExampleString;
+
+class CHelloTraceInterface : public CBase
+    {
+public:
+    IMPORT_C static CHelloTraceInterface* NewL();
+    IMPORT_C static CHelloTraceInterface* NewLC();
+    IMPORT_C ~CHelloTraceInterface();
+
+public:
+    IMPORT_C static TVersion Version();
+    IMPORT_C const TPtrC String() const;
+    IMPORT_C void AddCharL(const TChar& aChar);
+    IMPORT_C void RemoveLast();
+    IMPORT_C void ResetString();
+    
+    IMPORT_C static TVersion VersionDup();
+    IMPORT_C const TPtrC StringDup() const;
+    IMPORT_C void AddCharDupL(const TChar& aChar);
+    IMPORT_C void RemoveLastDup();
+    IMPORT_C void ResetStringDup();
+
+    IMPORT_C static TVersion VersionDup2();
+    IMPORT_C const TPtrC StringDup2() const;
+    IMPORT_C void AddCharDup2L(const TChar& aChar);
+    IMPORT_C void RemoveLastDup2();
+    IMPORT_C void ResetStringDup2();
+private:
+    CHelloTraceInterface();
+    void ConstructL();
+
+private:
+    // data
+    THelloTraceDllExampleString* iString;
+    };
+
+#endif  // __HELLOTRACEINTERFACE_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/dll/inc/HelloTracePanic.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,35 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef __HELLOTRACEDLL_PAN__
+#define __HELLOTRACEDLL_PAN__
+
+//  Data Types
+
+enum THelloTraceDllPanic
+    {
+    EHelloTraceDllExamplePanic,
+    EHelloTraceDllNullPointer,
+    };
+
+//  Function Prototypes
+
+GLREF_C void Panic(THelloTraceDllPanic aPanic);
+
+#endif  // __HELLOTRACEDLL_PAN__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/dll/inc/HelloTraceTypes.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,39 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef __HELLOTRACETYPES_H__
+#define __HELLOTRACETYPES_H__
+
+class HelloTraceTypes
+    {
+public:
+    static void SignedIntegers();
+    static void UnsignedIntegers();
+    static void Descriptors();
+    
+    static void SignedIntegersDup();
+    static void UnsignedIntegersDup();
+    static void DescriptorsDup();
+        
+    static void SignedIntegersDup2();
+    static void UnsignedIntegersDup2();
+    static void DescriptorsDup2();
+    };
+
+#endif  // __HELLOTRACETYPES_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/dll/incDup/HelloTraceFn.inl	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,157 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef HELLOTRACEFNINL_H_
+#define HELLOTRACEFNINL_H_
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTraceFnTraces.h"
+#endif
+
+inline void CHelloTraceFn::SimpleDup2()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_SIMPLE_DUP2_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_SIMPLE_DUP2_EXIT, this );
+    }
+
+inline void CHelloTraceFn::OutputsParamsDup2(TInt aParam, TFnEnum aEnumParam)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSPARAMS_DUP2_ENTRY, this );
+    Simple();
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSPARAMS_DUP2_EXIT, this );
+    }
+
+inline void CHelloTraceFn::StaticOutputsParamsDup2L(TInt aParam)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_STATICOUTPUTSPARAMS_DUP2_ENTRY, NULL );
+    CHelloTraceFn* example = CHelloTraceFn::NewLC();
+    example->SimpleDup2();    
+    CleanupStack::PopAndDestroy(example);
+    OstTraceFunctionExit0( CHELLOTRACEFN_STATICOUTPUTSPARAMS_DUP2_EXIT );    
+    }
+
+inline void CHelloTraceFn::OutputsSignedIntegersDup2(TInt8 aParam8,   TInt16 aParam16, 
+                                          TInt32 aParam32, TInt64 aParam64)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS_DUP2_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS_DUP2_EXIT, this );
+    }
+
+inline void CHelloTraceFn::OutputsUnsignedIntegersDup2(TUint8 aParam8,   TUint16 aParam16, 
+                                            TUint32 aParam32, TUint64 aParam64)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS_DUP2_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS_DUP2_EXIT, this );
+    }
+
+
+inline TInt CHelloTraceFn::OutputsTIntReturnValueDup2()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_DUP2_ENTRY, this );
+    TInt ret = KErrNone;
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_DUP2_EXIT, this, ret );
+    return ret;
+    }
+
+inline TInt64 CHelloTraceFn::OutputsTInt64ReturnValueDup2()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE_DUP2_ENTRY, this );
+    TInt64 ret = (TInt64) 2 << 40;
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE_DUP2_EXIT, this, ret );
+    return ret;
+    }
+
+inline CHelloTraceFn::TFnEnum CHelloTraceFn::OutputsTFnEnumReturnValueDup2()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE_DUP2_ENTRY, this );
+    TFnEnum ret = EExample1;
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE_DUP2_EXIT, this, ret );
+    return ret;    
+    }
+
+inline CActive* CHelloTraceFn::OutputsUnknownPtrTypeDup2(CActive* aActive)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_DUP2_ENTRY, this );    
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_DUP2_EXIT, this, (TUint) aActive );
+    return aActive;
+    }
+
+inline CActive& CHelloTraceFn::OutputsUnknownRefTypeDup2(CActive& aActive)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE_DUP2_ENTRY, this );
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE_DUP2_EXIT, this, (TUint) &aActive );    
+    return aActive;
+    }
+
+// The following doesn't compile as the Trace Compiler doesn't generate
+// the correct OstTraceGenExt(...) function for it
+//void CHelloTraceFn::OutputMissingParamsBug(TInt /*aCommentParam*/, TInt)
+//    {
+//    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_ENTRY, this );
+//    // ...
+//    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_EXIT, this );    
+//    }
+
+// The following compiles and works but outputs the following warning
+// warning: HelloTraceFn.cpp, line xxx: Parameter did not have a name and was not added to trace
+// The fact that this cannot be suppressed is a known problem we're working on.
+inline void CHelloTraceFn::OutputMissingParamsDup2(TInt aUsedParam, TInt /*aCommentParam*/, TInt)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMS_DUP2_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMS_DUP2_EXIT, this );
+    }
+
+// The following doesn't work as the Trace Compiler outputs:
+// error: HelloTraceFn.cpp, line xxx: Class / function name for trace could not be determined x3
+//#ifdef _DEBUG
+//void CHelloTraceFn::PreProcessedFn(TInt aDbgParam)
+//    {
+//    OstTraceFunctionEntryExt( PRE_PROCESSED_ENTRTY_1, this );
+//#else
+//void CHelloTraceFn::PreProcessedFn()
+//    {
+//    OstTraceFunctionEntry1( PRE_PROCESSED_ENTRTY_2, this );
+//#endif
+//    Simple();
+//    OstTraceFunctionExit1( CHELLOTRACEFN_PREPROCESSEDFN_EXIT, this );
+//    }
+
+// Workaround example code until a proper fix is provided
+#ifdef _DEBUG
+inline void CHelloTraceFn::PreProcessedFnDup2(TInt aDbgParam)
+    {
+    OstTraceExt2( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_DUP2_ENTRY_1, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;aDbgParam=%d;this=%x", (TInt) aDbgParam, (TUint) this);
+#else
+    inline void CHelloTraceFn::PreProcessedFnDup2()
+    {
+    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_DUP2_ENTRY_2, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
+#endif
+    SimpleDup2();
+    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_DUP2_EXIT, "CHelloTraceFn::PreProcessedFn: < CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
+    }
+
+#endif /* HELLOTRACEFNINL_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/dll/incDup/HelloTraceFnDup.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,157 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef HELLOTRACEFNDUP_H_
+#define HELLOTRACEFNDUP_H_
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTraceFnDupTraces.h"
+#endif
+
+inline void CHelloTraceFn::SimpleDup()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_SIMPLE_DUP_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_SIMPLE_DUP_EXIT, this );
+    }
+
+inline void CHelloTraceFn::OutputsParamsDup(TInt aParam, TFnEnum aEnumParam)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSPARAMS_DUP_ENTRY, this );
+    Simple();
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSPARAMS_DUP_EXIT, this );
+    }
+
+inline void CHelloTraceFn::StaticOutputsParamsDupL(TInt aParam)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_STATICOUTPUTSPARAMS_DUP_ENTRY, NULL );
+    CHelloTraceFn* example = CHelloTraceFn::NewLC();
+    example->SimpleDup();    
+    CleanupStack::PopAndDestroy(example);
+    OstTraceFunctionExit0( CHELLOTRACEFN_STATICOUTPUTSPARAMS_DUP_EXIT );    
+    }
+
+inline void CHelloTraceFn::OutputsSignedIntegersDup(TInt8 aParam8,   TInt16 aParam16, 
+                                          TInt32 aParam32, TInt64 aParam64)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS_DUP_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS_DUP_EXIT, this );
+    }
+
+void CHelloTraceFn::OutputsUnsignedIntegersDup(TUint8 aParam8,   TUint16 aParam16, 
+                                            TUint32 aParam32, TUint64 aParam64)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS_DUP_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS_DUP_EXIT, this );
+    }
+
+
+inline TInt CHelloTraceFn::OutputsTIntReturnValueDup()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_DUP_ENTRY, this );
+    TInt ret = KErrNone;
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_DUP_EXIT, this, ret );
+    return ret;
+    }
+
+inline TInt64 CHelloTraceFn::OutputsTInt64ReturnValueDup()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE_DUP_ENTRY, this );
+    TInt64 ret = (TInt64) 2 << 40;
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE_DUP_EXIT, this, ret );
+    return ret;
+    }
+
+inline CHelloTraceFn::TFnEnum CHelloTraceFn::OutputsTFnEnumReturnValueDup()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE_DUP_ENTRY, this );
+    TFnEnum ret = EExample1;
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE_DUP_EXIT, this, ret );
+    return ret;    
+    }
+
+inline CActive* CHelloTraceFn::OutputsUnknownPtrTypeDup(CActive* aActive)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_DUP_ENTRY, this );    
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_DUP_EXIT, this, (TUint) aActive );
+    return aActive;
+    }
+
+inline CActive& CHelloTraceFn::OutputsUnknownRefTypeDup(CActive& aActive)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE_DUP_ENTRY, this );
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE_DUP_EXIT, this, (TUint) &aActive );    
+    return aActive;
+    }
+
+// The following doesn't compile as the Trace Compiler doesn't generate
+// the correct OstTraceGenExt(...) function for it
+//void CHelloTraceFn::OutputMissingParamsBug(TInt /*aCommentParam*/, TInt)
+//    {
+//    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_ENTRY, this );
+//    // ...
+//    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_EXIT, this );    
+//    }
+
+// The following compiles and works but outputs the following warning
+// warning: HelloTraceFn.cpp, line xxx: Parameter did not have a name and was not added to trace
+// The fact that this cannot be suppressed is a known problem we're working on.
+inline void CHelloTraceFn::OutputMissingParamsDup(TInt aUsedParam, TInt /*aCommentParam*/, TInt)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMS_DUP_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMS_DUP_EXIT, this );
+    }
+
+// The following doesn't work as the Trace Compiler outputs:
+// error: HelloTraceFn.cpp, line xxx: Class / function name for trace could not be determined x3
+//#ifdef _DEBUG
+//void CHelloTraceFn::PreProcessedFn(TInt aDbgParam)
+//    {
+//    OstTraceFunctionEntryExt( PRE_PROCESSED_ENTRTY_1, this );
+//#else
+//void CHelloTraceFn::PreProcessedFn()
+//    {
+//    OstTraceFunctionEntry1( PRE_PROCESSED_ENTRTY_2, this );
+//#endif
+//    Simple();
+//    OstTraceFunctionExit1( CHELLOTRACEFN_PREPROCESSEDFN_EXIT, this );
+//    }
+
+// Workaround example code until a proper fix is provided
+#ifdef _DEBUG
+inline void CHelloTraceFn::PreProcessedFnDup(TInt aDbgParam)
+    {
+    OstTraceExt2( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_DUP_ENTRY_1, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;aDbgParam=%d;this=%x", (TInt) aDbgParam, (TUint) this);
+#else
+    inline void CHelloTraceFn::PreProcessedFnDup()
+    {
+    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_DUP_ENTRY_2, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
+#endif
+    SimpleDup();
+    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_DUP_EXIT, "CHelloTraceFn::PreProcessedFn: < CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
+    }
+
+#endif /* HELLOTRACEFNDUP_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/dll/incDup/HelloTraceInterface.inl	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,91 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef __HELLOTRACEINTERFACEINL_H__
+#define __HELLOTRACEINTERFACEINL_H__
+
+#include "HelloTracePanic.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTraceInterfaceTraces.h"
+#endif
+
+ inline EXPORT_C TVersion CHelloTraceInterface::VersionDup2()
+        {
+        const TInt KMajor = 1;
+        const TInt KMinor = 0;
+        const TInt KBuild = 1;
+        TVersion version = TVersion(KMajor, KMinor, KBuild);
+        OstTraceExt1( TRACE_BORDER, CHELLOTRACEDLL_VERSION_DUP2, "CHelloTraceInterface::Version = %S", version.Name());   
+        return version;
+        }
+
+ inline EXPORT_C const TPtrC CHelloTraceInterface::StringDup2() const
+        {
+        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
+
+        OstTraceDefExt2( OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CHELLOTRACEDLL_STRING_DUP2, 
+                         "[0x%08x] Returned %S", (TUint32) this, *iString);   
+        return *iString;
+        }
+
+ inline EXPORT_C void CHelloTraceInterface::AddCharDup2L(const TChar& aChar)
+        {
+        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
+
+        OstTraceExt3( TRACE_BORDER, CHELLOTRACEDLL_ADDCHARL_DUP2, 
+                      "[0x%08x] Adding %d to %S", (TUint32) this, (TInt32) aChar, *iString);   
+        if (iString->Length() >= KHelloTraceDllBufferLength)
+            {
+            OstTrace1( TRACE_ERROR, CHELLOTRACEDLL_ADDCHARL_ERR_DUP2,
+                       "[0x%08x] Not enough space to add character", (TUint32) this);
+            User::Leave( KErrTooBig);
+            }
+        iString->Append(aChar);
+        }
+
+ inline EXPORT_C void CHelloTraceInterface::RemoveLastDup2()
+        {
+        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
+
+        OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_REMOVELAST_DUP2, 
+                      "[0x%08x] Attempting to remove last character from %S", (TUint32) this, *iString);
+        if (iString->Length() > 0)
+            {
+            iString->SetLength(iString->Length() - 1);
+            }
+        else
+            {
+            OstTrace1( TRACE_WARNING, CHELLOTRACEDLL_REMOVELAST_WARN_DUP2, "[0x%08x] String already empty", (TUint32) this);   
+            }
+        }
+
+ inline EXPORT_C void CHelloTraceInterface::ResetStringDup2()
+        {
+        OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_RESETSTRING_DUP2, "[0x%08x] Reseting string %S", (TUint32) this, *iString);
+        if (iString == NULL)
+            {
+            iString = new (ELeave) THelloTraceDllExampleString;
+            }
+        else
+            {
+            iString->SetLength(0);
+            }
+        }
+#endif  // __HELLOTRACEINTERFACEINL_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/dll/incDup/HelloTraceInterfaceDup.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,91 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef __HELLOTRACEINTERFACEDUP_H__
+#define __HELLOTRACEINTERFACEDUP_H__
+
+#include "HelloTracePanic.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTraceInterfaceDupTraces.h"
+#endif
+
+ inline EXPORT_C TVersion CHelloTraceInterface::VersionDup()
+        {
+        const TInt KMajor = 1;
+        const TInt KMinor = 0;
+        const TInt KBuild = 1;
+        TVersion version = TVersion(KMajor, KMinor, KBuild);
+        OstTraceExt1( TRACE_BORDER, CHELLOTRACEDLL_VERSION_DUP, "CHelloTraceInterface::Version = %S", version.Name());   
+        return version;
+        }
+
+ inline EXPORT_C const TPtrC CHelloTraceInterface::StringDup() const
+        {
+        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
+
+        OstTraceDefExt2( OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CHELLOTRACEDLL_STRING_DUP, 
+                         "[0x%08x] Returned %S", (TUint32) this, *iString);   
+        return *iString;
+        }
+
+ inline EXPORT_C void CHelloTraceInterface::AddCharDupL(const TChar& aChar)
+        {
+        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
+
+        OstTraceExt3( TRACE_BORDER, CHELLOTRACEDLL_ADDCHARL_DUP, 
+                      "[0x%08x] Adding %d to %S", (TUint32) this, (TInt32) aChar, *iString);   
+        if (iString->Length() >= KHelloTraceDllBufferLength)
+            {
+            OstTrace1( TRACE_ERROR, CHELLOTRACEDLL_ADDCHARL_ERR_DUP,
+                       "[0x%08x] Not enough space to add character", (TUint32) this);
+            User::Leave( KErrTooBig);
+            }
+        iString->Append(aChar);
+        }
+
+ inline EXPORT_C void CHelloTraceInterface::RemoveLastDup()
+        {
+        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
+
+        OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_REMOVELAST_DUP, 
+                      "[0x%08x] Attempting to remove last character from %S", (TUint32) this, *iString);
+        if (iString->Length() > 0)
+            {
+            iString->SetLength(iString->Length() - 1);
+            }
+        else
+            {
+            OstTrace1( TRACE_WARNING, CHELLOTRACEDLL_REMOVELAST_WARN_DUP, "[0x%08x] String already empty", (TUint32) this);   
+            }
+        }
+
+ inline EXPORT_C void CHelloTraceInterface::ResetStringDup()
+        {
+        OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_RESETSTRING_DUP, "[0x%08x] Reseting string %S", (TUint32) this, *iString);
+        if (iString == NULL)
+            {
+            iString = new (ELeave) THelloTraceDllExampleString;
+            }
+        else
+            {
+            iString->SetLength(0);
+            }
+        }
+#endif  // __HELLOTRACEINTERFACEDUP_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/dll/incDup/HelloTraceTypes.inl	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,75 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef __HELLOTRACETYPESINL_H__
+#define __HELLOTRACETYPESINL_H__
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTraceTypesTraces.h"
+#endif
+
+inline void HelloTraceTypes::SignedIntegersDup2()
+    {
+    TInt8  eightBit     = - (TInt8)  1 << 6;
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP2_8, 
+                  "8 bit signed: %hhd", eightBit );
+    
+    TInt16 sixteenBit   = - (TInt16) 1 << 14; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP2_16, 
+                  "16 bit signed: %hd", sixteenBit );
+
+    TInt32 thirtyTwoBit = - (TInt32) 1 << 30; 
+    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP2_32, 
+               "32 bit signed: %d", thirtyTwoBit );
+
+    TInt64 sixtyFourBit = - (TInt64) 1 << 62; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP2_64, 
+                  "64 bit signed: %Ld", sixtyFourBit );
+    }
+
+inline void HelloTraceTypes::UnsignedIntegersDup2()
+    {
+    TUint8  eightBit     = (TUint8)  1 << 6;
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP2_8, 
+                  "8 bit unsigned: %hhu", eightBit );
+    
+    TUint16 sixteenBit   = (TUint16) 1 << 14; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP2_16, 
+                  "16 bit unsigned: %hu", sixteenBit );
+
+    TUint32 thirtyTwoBit = (TUint32) 1 << 30; 
+    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP2_32, 
+               "32 bit unsigned: %u", thirtyTwoBit );
+
+    TUint64 sixtyFourBit = (TUint64) 1 << 62; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP2_64, 
+                  "64 bit unsigned: %Lu", sixtyFourBit );
+    }
+
+inline void HelloTraceTypes::DescriptorsDup2()
+    {
+    _LIT8(KAscii, "Some ASCII text");
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_ASCIIDUP2, "8 bit descriptor: %s", KAscii() );
+
+    _LIT16(KUnicode, "Some unicode text");    
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNICODEDUP2, "16 bit descriptor: %S", KUnicode() );
+    }
+
+#endif  // __HELLOTRACETYPESINL_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/dll/incDup/HelloTraceTypesDup.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,75 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef __HELLOTRACETYPESDUP_H__
+#define __HELLOTRACETYPESDUP_H__
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTraceTypesDupTraces.h"
+#endif
+
+inline void HelloTraceTypes::SignedIntegersDup()
+    {
+    TInt8  eightBit     = - (TInt8)  1 << 6;
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP_8, 
+                  "8 bit signed: %hhd", eightBit );
+    
+    TInt16 sixteenBit   = - (TInt16) 1 << 14; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP_16, 
+                  "16 bit signed: %hd", sixteenBit );
+
+    TInt32 thirtyTwoBit = - (TInt32) 1 << 30; 
+    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP_32, 
+               "32 bit signed: %d", thirtyTwoBit );
+
+    TInt64 sixtyFourBit = - (TInt64) 1 << 62; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP_64, 
+                  "64 bit signed: %Ld", sixtyFourBit );
+    }
+
+inline void HelloTraceTypes::UnsignedIntegersDup()
+    {
+    TUint8  eightBit     = (TUint8)  1 << 6;
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP_8, 
+                  "8 bit unsigned: %hhu", eightBit );
+    
+    TUint16 sixteenBit   = (TUint16) 1 << 14; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP_16, 
+                  "16 bit unsigned: %hu", sixteenBit );
+
+    TUint32 thirtyTwoBit = (TUint32) 1 << 30; 
+    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP_32, 
+               "32 bit unsigned: %u", thirtyTwoBit );
+
+    TUint64 sixtyFourBit = (TUint64) 1 << 62; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP_64, 
+                  "64 bit unsigned: %Lu", sixtyFourBit );
+    }
+
+inline void HelloTraceTypes::DescriptorsDup()
+    {
+    _LIT8(KAscii, "Some ASCII text");
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_ASCIIDUP, "8 bit descriptor: %s", KAscii() );
+
+    _LIT16(KUnicode, "Some unicode text");    
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNICODEDUP, "16 bit descriptor: %S", KUnicode() );
+    }
+
+#endif  // __HELLOTRACETYPESDUP_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/dll/src/HelloTraceExample.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,106 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+
+#include "HelloTraceExample.h"
+#include "HelloTraceTypes.h"
+#include "HelloTraceInterface.h"
+#include "HelloTraceFn.h"
+#include "HelloTracePanic.h"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTraceExampleTraces.h"
+#endif
+
+EXPORT_C void HelloTraceExample::JustTypes()
+    {
+    OstTrace0( TRACE_EXAMPLE, HELLOTRACEEXAMPLE_JUSTTYPES, "*********************************************** " );
+    
+    HelloTraceTypes::SignedIntegers();
+    HelloTraceTypes::UnsignedIntegers();
+    HelloTraceTypes::Descriptors();    
+    }
+
+EXPORT_C void HelloTraceExample::Interface()
+    {
+    OstTrace0( TRACE_EXAMPLE, HELLOTRACEEXAMPLE_INTERFACE, "*********************************************** " );
+    
+    TVersion version = CHelloTraceInterface::Version();   
+    if (version.iMajor >= 1) 
+        {
+        CHelloTraceInterface* example = CHelloTraceInterface::NewLC();
+        example->AddCharL('H');
+        example->AddCharL('e');
+        example->AddCharL('l');
+        example->AddCharL('l');
+        example->AddCharL('o');
+        example->AddCharL('T');        
+        example->RemoveLast();        
+        example->AddCharL(' ');
+        example->AddCharL('T');
+        example->AddCharL('r');
+        example->AddCharL('a');
+        example->AddCharL('c');
+        example->AddCharL('e');
+        example->AddCharL('!');
+        CleanupStack::PopAndDestroy(example);
+        }
+    else
+        {
+        OstTrace0( TRACE_ERROR, HELLOTRACEEXAMPLE_UNSUPPORTED_VERSION, "Unsupported version!");
+        }
+    }
+
+EXPORT_C void HelloTraceExample::FnEntryExit()
+    {
+    OstTrace0( TRACE_EXAMPLE, HELLOTRACEEXAMPLE_FNENTRYEXIT, "*********************************************** " );
+       
+    CHelloTraceFn* example = CHelloTraceFn::NewLC();
+    CIdle* idle = CIdle::NewL(CActive::EPriorityIdle);
+    CleanupStack::PushL(idle);
+
+    CHelloTraceFn::StaticOutputsParamsL(1);
+   
+    example->Simple();
+    example->OutputsParams(2, CHelloTraceFn::EExample1);
+    example->OutputsParams(3, CHelloTraceFn::EExample2);
+    example->OutputsSignedIntegers(-4, -5, -6, -7);
+    example->OutputsUnsignedIntegers(8, 9, 10, 11);
+    example->OutputsTIntReturnValue();    
+    example->OutputsTInt64ReturnValue(); 
+    example->OutputsTFnEnumReturnValue();
+    example->OutputsUnknownPtrType(idle);    
+    example->OutputsUnknownRefType(*idle);
+#ifdef _DEBUG
+    example->PreProcessedFn(12);
+#else
+    example->PreProcessedFn();
+#endif
+    example->OutputMissingParams(13, 14, 15);
+
+    CleanupStack::PopAndDestroy(idle);
+    CleanupStack::PopAndDestroy(example);
+    }
+
+EXPORT_C void HelloTraceExample::PanicTrace()
+    {
+    OstTrace0( TRACE_EXAMPLE, HELLOTRACEEXAMPLE_PANIC, "*********************************************** " );
+
+    Panic(EHelloTraceDllExamplePanic);
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/dll/src/HelloTraceFn.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,183 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+ 
+#include "HelloTraceFn.h"
+#include "HelloTraceFnDup.h"
+#include "HelloTraceFn.inl"
+#include "HelloTracePanic.h"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTraceFnTraces.h"
+#endif
+
+CHelloTraceFn* CHelloTraceFn::NewLC()
+    {
+    CHelloTraceFn* self = new (ELeave) CHelloTraceFn;
+    CleanupStack::PushL(self);
+    return self;
+    }
+
+CHelloTraceFn* CHelloTraceFn::NewL()
+    {
+    CHelloTraceFn* self = CHelloTraceFn::NewLC();
+    CleanupStack::Pop(self);
+    return self;
+    }
+
+CHelloTraceFn::CHelloTraceFn()
+    {
+    OstTrace1( TRACE_NORMAL, CHELLOTRACEFN_CHELLOTRACEFN_CTOR, "[0x%08x] Constructor", this );    
+    }
+
+CHelloTraceFn::~CHelloTraceFn()
+    {
+    OstTrace1( TRACE_NORMAL, CHELLOTRACEFN_CHELLOTRACEFN_DTOR, "[0x%08x] Destructor", this );    
+    }
+
+void CHelloTraceFn::Simple()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_SIMPLE_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_SIMPLE_EXIT, this );
+    }
+
+void CHelloTraceFn::OutputsParams(TInt aParam, TFnEnum aEnumParam)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSPARAMS_ENTRY, this );
+    Simple();
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSPARAMS_EXIT, this );
+    }
+
+void CHelloTraceFn::StaticOutputsParamsL(TInt aParam)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_STATICOUTPUTSPARAMS_ENTRY, NULL );
+    CHelloTraceFn* example = CHelloTraceFn::NewLC();
+    example->Simple();    
+    CleanupStack::PopAndDestroy(example);
+    OstTraceFunctionExit0( CHELLOTRACEFN_STATICOUTPUTSPARAMS_EXIT );    
+    }
+
+void CHelloTraceFn::OutputsSignedIntegers(TInt8 aParam8,   TInt16 aParam16, 
+                                          TInt32 aParam32, TInt64 aParam64)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS_EXIT, this );
+    }
+
+void CHelloTraceFn::OutputsUnsignedIntegers(TUint8 aParam8,   TUint16 aParam16, 
+                                            TUint32 aParam32, TUint64 aParam64)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS_EXIT, this );
+    }
+
+
+TInt CHelloTraceFn::OutputsTIntReturnValue()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_ENTRY, this );
+    TInt ret = KErrNone;
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_EXIT, this, ret );
+    return ret;
+    }
+
+TInt64 CHelloTraceFn::OutputsTInt64ReturnValue()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE_ENTRY, this );
+    TInt64 ret = (TInt64) 2 << 40;
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE_EXIT, this, ret );
+    return ret;
+    }
+
+CHelloTraceFn::TFnEnum CHelloTraceFn::OutputsTFnEnumReturnValue()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE_ENTRY, this );
+    TFnEnum ret = EExample1;
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE_EXIT, this, ret );
+    return ret;    
+    }
+
+CActive* CHelloTraceFn::OutputsUnknownPtrType(CActive* aActive)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_ENTRY, this );    
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_EXIT, this, (TUint) aActive );
+    return aActive;
+    }
+
+CActive& CHelloTraceFn::OutputsUnknownRefType(CActive& aActive)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE_ENTRY, this );
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE_EXIT, this, (TUint) &aActive );    
+    return aActive;
+    }
+
+// The following doesn't compile as the Trace Compiler doesn't generate
+// the correct OstTraceGenExt(...) function for it
+//void CHelloTraceFn::OutputMissingParamsBug(TInt /*aCommentParam*/, TInt)
+//    {
+//    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_ENTRY, this );
+//    // ...
+//    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_EXIT, this );    
+//    }
+
+// The following compiles and works but outputs the following warning
+// warning: HelloTraceFn.cpp, line xxx: Parameter did not have a name and was not added to trace
+// The fact that this cannot be suppressed is a known problem we're working on.
+void CHelloTraceFn::OutputMissingParams(TInt aUsedParam, TInt /*aCommentParam*/, TInt)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMS_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMS_EXIT, this );
+    }
+
+// The following doesn't work as the Trace Compiler outputs:
+// error: HelloTraceFn.cpp, line xxx: Class / function name for trace could not be determined x3
+//#ifdef _DEBUG
+//void CHelloTraceFn::PreProcessedFn(TInt aDbgParam)
+//    {
+//    OstTraceFunctionEntryExt( PRE_PROCESSED_ENTRTY_1, this );
+//#else
+//void CHelloTraceFn::PreProcessedFn()
+//    {
+//    OstTraceFunctionEntry1( PRE_PROCESSED_ENTRTY_2, this );
+//#endif
+//    Simple();
+//    OstTraceFunctionExit1( CHELLOTRACEFN_PREPROCESSEDFN_EXIT, this );
+//    }
+
+// Workaround example code until a proper fix is provided
+#ifdef _DEBUG
+void CHelloTraceFn::PreProcessedFn(TInt aDbgParam)
+    {
+    OstTraceExt2( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_ENTRY_1, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;aDbgParam=%d;this=%x", (TInt) aDbgParam, (TUint) this);
+#else
+void CHelloTraceFn::PreProcessedFn()
+    {
+    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_ENTRY_2, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
+#endif
+    Simple();
+    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_EXIT, "CHelloTraceFn::PreProcessedFn: < CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
+    }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/dll/src/HelloTraceInterface.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,121 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+
+#include "HelloTraceInterface.h"
+#include "HelloTraceInterfaceDup.h"
+#include "HelloTraceInterface.inl"
+#include "HelloTracePanic.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTraceInterfaceTraces.h"
+#endif
+
+EXPORT_C CHelloTraceInterface* CHelloTraceInterface::NewLC()
+    {
+    CHelloTraceInterface* self = new (ELeave) CHelloTraceInterface;
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    return self;
+    }
+
+EXPORT_C CHelloTraceInterface* CHelloTraceInterface::NewL()
+    {
+    CHelloTraceInterface* self = CHelloTraceInterface::NewLC();
+    CleanupStack::Pop(self);
+    return self;
+    }
+
+CHelloTraceInterface::CHelloTraceInterface()
+    {
+    OstTrace1( TRACE_NORMAL, CHELLOTRACEDLL_CHELLOTRACEDLL_CTOR, "[0x%08x]", (TUint32) this );    
+    }
+
+void CHelloTraceInterface::ConstructL()
+    {
+    iString = new (ELeave) THelloTraceDllExampleString;
+    }
+
+EXPORT_C CHelloTraceInterface::~CHelloTraceInterface()
+    {
+    delete iString;
+    OstTrace1( TRACE_NORMAL, CHELLOTRACEDLL_CHELLOTRACEDLL_DTOR, "[0x%08x]", (TUint32) this );    
+    }
+
+EXPORT_C TVersion CHelloTraceInterface::Version()
+    {
+    const TInt KMajor = 1;
+    const TInt KMinor = 0;
+    const TInt KBuild = 1;
+    TVersion version = TVersion(KMajor, KMinor, KBuild);
+    OstTraceExt1( TRACE_BORDER, CHELLOTRACEDLL_VERSION, "CHelloTraceInterface::Version = %S", version.Name());   
+    return version;
+    }
+
+EXPORT_C const TPtrC CHelloTraceInterface::String() const
+    {
+    __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
+
+    OstTraceDefExt2( OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CHELLOTRACEDLL_STRING, 
+                     "[0x%08x] Returned %S", (TUint32) this, *iString);   
+    return *iString;
+    }
+
+EXPORT_C void CHelloTraceInterface::AddCharL(const TChar& aChar)
+    {
+    __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
+
+    OstTraceExt3( TRACE_BORDER, CHELLOTRACEDLL_ADDCHARL, 
+                  "[0x%08x] Adding %d to %S", (TUint32) this, (TInt32) aChar, *iString);   
+    if (iString->Length() >= KHelloTraceDllBufferLength)
+        {
+        OstTrace1( TRACE_ERROR, CHELLOTRACEDLL_ADDCHARL_ERR,
+                   "[0x%08x] Not enough space to add character", (TUint32) this);
+        User::Leave( KErrTooBig);
+        }
+    iString->Append(aChar);
+    }
+
+EXPORT_C void CHelloTraceInterface::RemoveLast()
+    {
+    __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
+
+    OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_REMOVELAST, 
+                  "[0x%08x] Attempting to remove last character from %S", (TUint32) this, *iString);
+    if (iString->Length() > 0)
+        {
+        iString->SetLength(iString->Length() - 1);
+        }
+    else
+        {
+        OstTrace1( TRACE_WARNING, CHELLOTRACEDLL_REMOVELAST_WARN, "[0x%08x] String already empty", (TUint32) this);   
+        }
+    }
+
+EXPORT_C void CHelloTraceInterface::ResetString()
+    {
+    OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_RESETSTRING, "[0x%08x] Reseting string %S", (TUint32) this, *iString);
+    if (iString == NULL)
+        {
+        iString = new (ELeave) THelloTraceDllExampleString;
+        }
+    else
+        {
+        iString->SetLength(0);
+        }
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/dll/src/HelloTracePanic.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,32 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#include <e32std.h>		 // GLDEF_C
+
+#include "HelloTracePanic.h"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTracePanicTraces.h"
+#endif
+
+GLDEF_C void Panic(THelloTraceDllPanic aPanic)
+    {
+    OstTrace1( TRACE_FATAL, PANIC, "Panic(%{THelloTraceDllPanic})", (TUint) aPanic );    
+    User::Panic(_L("HelloTraceDll"), aPanic);
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/dll/src/HelloTraceTypes.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,76 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+
+#include <e32std.h>
+
+#include "HelloTraceTypes.h"
+#include "HelloTraceTypesDup.h"
+#include "HelloTraceTypes.inl"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTraceTypesTraces.h"
+#endif
+
+void HelloTraceTypes::SignedIntegers()
+    {
+    TInt8  eightBit     = - (TInt8)  1 << 6;
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS_8, 
+                  "8 bit signed: %hhd", eightBit );
+    
+    TInt16 sixteenBit   = - (TInt16) 1 << 14; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS_16, 
+                  "16 bit signed: %hd", sixteenBit );
+
+    TInt32 thirtyTwoBit = - (TInt32) 1 << 30; 
+    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS_32, 
+               "32 bit signed: %d", thirtyTwoBit );
+
+    TInt64 sixtyFourBit = - (TInt64) 1 << 62; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS_64, 
+                  "64 bit signed: %Ld", sixtyFourBit );
+    }
+
+void HelloTraceTypes::UnsignedIntegers()
+    {
+    TUint8  eightBit     = (TUint8)  1 << 6;
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS_8, 
+                  "8 bit unsigned: %hhu", eightBit );
+    
+    TUint16 sixteenBit   = (TUint16) 1 << 14; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS_16, 
+                  "16 bit unsigned: %hu", sixteenBit );
+
+    TUint32 thirtyTwoBit = (TUint32) 1 << 30; 
+    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS_32, 
+               "32 bit unsigned: %u", thirtyTwoBit );
+
+    TUint64 sixtyFourBit = (TUint64) 1 << 62; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS_64, 
+                  "64 bit unsigned: %Lu", sixtyFourBit );
+    }
+
+void HelloTraceTypes::Descriptors()
+    {
+    _LIT8(KAscii, "Some ASCII text");
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_ASCII, "8 bit descriptor: %s", KAscii() );
+
+    _LIT16(KUnicode, "Some unicode text");    
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNICODE, "16 bit descriptor: %S", KUnicode() );
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/dll/traces/trace.properties	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<trace_properties>
+<enum name="TFnEnum">
+<value id="0">EExample1</value>
+<value id="2">EExample2</value>
+</enum>
+<enum name="THelloTraceDllPanic">
+<value id="0">EHelloTraceDllExamplePanic</value>
+<value id="1">EHelloTraceDllNullPointer</value>
+</enum>
+<file>../incDup/HelloTraceInterfaceDup.h</file>
+<file>../incDup/HelloTraceInterface.inl</file>
+<file>../incDup/HelloTraceFnDup.h</file>
+<file>../incDup/HelloTraceFn.inl</file>
+<file>../incDup/HelloTraceTypesDup.h</file>
+<file>../incDup/HelloTraceTypes.inl</file>
+</trace_properties>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/group/bld.inf	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,19 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+#include "../dll/group/bld.inf"
+#include "../console/group/bld.inf"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/console/group/HelloTraceConsole.mmp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,37 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+
+TARGET		  HelloTraceConsole.exe
+TARGETTYPE	  exe
+UID			  0 0xE40349E4
+
+OS_LAYER_SYSTEMINCLUDE
+USERINCLUDE	   ../inc
+USERINCLUDE    ../../dll/inc
+USERINCLUDE    ../traces
+
+SOURCEPATH	  ../src
+SOURCE		  HelloTraceConsole.cpp
+
+LIBRARY		  euser.lib
+LIBRARY       HelloTraceDll.lib
+
+#ifdef ENABLE_ABIV2_MODE
+DEBUGGABLE_UDEBONLY
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/console/group/bld.inf	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,27 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXPORTS
+hellotraceconsole.iby             CORE_OS_LAYER_IBY_EXPORT_PATH(hellotraceconsole.iby)
+
+PRJ_MMPFILES
+HelloTraceConsole.mmp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/console/group/hellotraceconsole.iby	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,24 @@
+// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+// ROM build file for tracecore project
+
+#ifndef HELLOTRACECONSOLE_IBY
+#define HELLOTRACECONSOLE_IBY
+
+#include <core\os\hellotracedll.iby>
+
+file=ABI_DIR\BUILD_DIR\hellotraceconsole.exe    Sys\Bin\hellotraceconsole.exe
+
+#endif //HELLOTRACECONSOLE_IBY
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/console/inc/HelloTraceConsole.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,31 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef __HELLOTRACECONSOLE_H__
+#define __HELLOTRACECONSOLE_H__
+
+//  Include Files
+
+#include <e32base.h>
+
+//  Function Prototypes
+
+GLDEF_C TInt E32Main();
+
+#endif  // __HELLOTRACECONSOLE_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/console/src/HelloTraceConsole.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,124 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#include <e32cons.h>			// Console
+
+#include "HelloTraceConsole.h"
+#include "HelloTraceExample.h"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTraceConsoleTraces.h"
+#endif
+
+
+_LIT(KTextConsoleTitle, "HelloTrace");
+_LIT(KTextPressAnyKey, " [press any key]\n");
+
+LOCAL_D CConsoleBase* console; // write all messages to this
+
+LOCAL_C void DoExamples()
+    {
+    TInt err = KErrNone;
+
+    console->Printf(_L("Before main tracing examples ...\n"));
+
+    console->Printf(_L(" Before type examples ..."));
+    console->Printf(KTextPressAnyKey);
+    console->Getch();
+    TRAP(err, HelloTraceExample::JustTypes());    
+    if (err)
+        console->Printf(_L(" Failed with error %d\n"), err);
+
+    console->Printf(_L(" Before Interface examples ..."));
+    console->Printf(KTextPressAnyKey);
+    console->Getch();
+    TRAP(err, HelloTraceExample::Interface());    
+    if (err)
+        console->Printf(_L(" Failed with error %d\n"), err);
+    
+    console->Printf(_L(" Before FnEntryExit examples ..."));
+    console->Printf(KTextPressAnyKey);
+    console->Getch();
+    TRAP(err, HelloTraceExample::FnEntryExit());    
+    if (err)
+        console->Printf(_L(" Failed with error %d\n"), err);    
+    }
+
+LOCAL_C void DoStartL()
+    {
+    // Create active scheduler (to run active objects)
+    CActiveScheduler* scheduler = new (ELeave) CActiveScheduler();
+    CleanupStack::PushL(scheduler);
+    CActiveScheduler::Install(scheduler);
+
+    DoExamples();
+    
+    // Delete active scheduler
+    CleanupStack::PopAndDestroy(scheduler);
+    }
+
+//  Global Functions
+
+GLDEF_C TInt E32Main()
+    {
+    OstTraceFunctionEntry0( E32MAIN_ENTRY );
+    
+    // Create cleanup stack
+    __UHEAP_MARK;
+    CTrapCleanup* cleanup = CTrapCleanup::New();
+
+    // Create output console
+    TRAPD(createError, 
+          console = Console::NewL(KTextConsoleTitle, 
+                                  TSize(KConsFullScreen, KConsFullScreen)));    
+    if (createError)
+        {
+        delete cleanup;
+        OstTrace1( TRACE_ERROR, E32MAIN_CREATE_ERROR, "Failed to create console error: %d", createError);
+        OstTraceFunctionExit0( E32MAIN_EXIT_ERR );
+        return createError;
+        }
+
+    TRAPD(mainError, DoStartL());    
+    if (mainError)
+        {
+        OstTrace1( TRACE_ERROR, E32MAIN_START_ERROR, "DoStartL failed with error: %d", mainError);
+        console->Printf(_L("DoStartL failed with error: %d\n\n"), mainError);
+        }
+    else 
+        {
+        console->Printf(_L("Before panic tracing example ..."));
+        console->Printf(KTextPressAnyKey);
+        console->Getch();
+    
+        OstTrace0( TRACE_FLOW, E32MAIN_BEFORE_PANIC, "About to cause a panic ..." );
+        HelloTraceExample::PanicTrace();
+        
+        console->Printf(KTextPressAnyKey);
+        console->Getch();
+        }
+
+    delete console;
+    delete cleanup;
+    __UHEAP_MARKEND;
+    
+    OstTraceFunctionExit0( E32MAIN_EXIT );
+    return KErrNone;
+    }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/dll/bwins/HelloTraceDllu.def	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,14 @@
+EXPORTS
+	?Version@CHelloTraceInterface@@SA?AVTVersion@@XZ @ 1 NONAME ; class TVersion CHelloTraceInterface::Version(void)
+	?NewLC@CHelloTraceInterface@@SAPAV1@XZ @ 2 NONAME ; class CHelloTraceInterface * CHelloTraceInterface::NewLC(void)
+	?JustTypes@HelloTraceExample@@SAXXZ @ 3 NONAME ; void HelloTraceExample::JustTypes(void)
+	?Interface@HelloTraceExample@@SAXXZ @ 4 NONAME ; void HelloTraceExample::Interface(void)
+	?FnEntryExit@HelloTraceExample@@SAXXZ @ 5 NONAME ; void HelloTraceExample::FnEntryExit(void)
+	?ResetString@CHelloTraceInterface@@QAEXXZ @ 6 NONAME ; void CHelloTraceInterface::ResetString(void)
+	?AddCharL@CHelloTraceInterface@@QAEXABVTChar@@@Z @ 7 NONAME ; void CHelloTraceInterface::AddCharL(class TChar const &)
+	?PanicTrace@HelloTraceExample@@SAXXZ @ 8 NONAME ; void HelloTraceExample::PanicTrace(void)
+	??1CHelloTraceInterface@@UAE@XZ @ 9 NONAME ; CHelloTraceInterface::~CHelloTraceInterface(void)
+	?String@CHelloTraceInterface@@QBE?BVTPtrC16@@XZ @ 10 NONAME ; class TPtrC16 const CHelloTraceInterface::String(void) const
+	?RemoveLast@CHelloTraceInterface@@QAEXXZ @ 11 NONAME ; void CHelloTraceInterface::RemoveLast(void)
+	?NewL@CHelloTraceInterface@@SAPAV1@XZ @ 12 NONAME ; class CHelloTraceInterface * CHelloTraceInterface::NewL(void)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/dll/eabi/HelloTraceDllu.def	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,20 @@
+EXPORTS
+	_ZN17HelloTraceExample10PanicTraceEv @ 1 NONAME
+	_ZN17HelloTraceExample11FnEntryExitEv @ 2 NONAME
+	_ZN17HelloTraceExample9InterfaceEv @ 3 NONAME
+	_ZN17HelloTraceExample9JustTypesEv @ 4 NONAME
+	_ZN20CHelloTraceInterface10RemoveLastEv @ 5 NONAME
+	_ZN20CHelloTraceInterface11ResetStringEv @ 6 NONAME
+	_ZN20CHelloTraceInterface4NewLEv @ 7 NONAME
+	_ZN20CHelloTraceInterface5NewLCEv @ 8 NONAME
+	_ZN20CHelloTraceInterface7VersionEv @ 9 NONAME
+	_ZN20CHelloTraceInterface8AddCharLERK5TChar @ 10 NONAME
+	_ZN20CHelloTraceInterfaceD0Ev @ 11 NONAME
+	_ZN20CHelloTraceInterfaceD1Ev @ 12 NONAME
+	_ZN20CHelloTraceInterfaceD2Ev @ 13 NONAME
+	_ZNK20CHelloTraceInterface6StringEv @ 14 NONAME
+	_ZTI13CHelloTraceFn @ 15 NONAME
+	_ZTI20CHelloTraceInterface @ 16 NONAME
+	_ZTV13CHelloTraceFn @ 17 NONAME
+	_ZTV20CHelloTraceInterface @ 18 NONAME
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/dll/group/HelloTraceDll.mmp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,40 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+
+TARGET		  HelloTraceDll.dll
+TARGETTYPE	  dll
+UID			  0x1000008d 0xE43DF43E
+CAPABILITY    ReadUserData
+
+OS_LAYER_SYSTEMINCLUDE
+USERINCLUDE  ../inc ../incDup
+USERINCLUDE  ../traces/HelloTraceDll_dll
+
+SOURCEPATH	 ../src
+SOURCE       HelloTraceExample.cpp 
+SOURCE       HelloTraceTypes.cpp
+SOURCE       HelloTraceInterface.cpp 
+SOURCE       HelloTraceFn.cpp 
+SOURCE       HelloTracePanic.cpp 
+
+LIBRARY		 euser.lib
+
+#ifdef ENABLE_ABIV2_MODE
+DEBUGGABLE_UDEBONLY
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/dll/group/bld.inf	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,27 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXPORTS
+hellotracedll.iby             CORE_OS_LAYER_IBY_EXPORT_PATH(hellotracedll.iby)
+
+PRJ_MMPFILES
+HelloTraceDll.mmp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/dll/group/hellotracedll.iby	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,22 @@
+// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+// ROM build file for tracecore project
+
+#ifndef HELLOTRACEDLL_IBY
+#define HELLOTRACEDLL_IBY
+
+file=ABI_DIR\BUILD_DIR\hellotracedll.dll        Sys\Bin\hellotracedll.dll
+
+#endif //HELLOTRACEDLL_IBY
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/dll/inc/HelloTraceExample.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,40 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef __HELLOTRACEEXAMPLE_H__
+#define __HELLOTRACEEXAMPLE_H__
+
+#include <e32std.h>
+
+class HelloTraceExample
+    {
+public:
+    IMPORT_C static void JustTypes();    
+    IMPORT_C static void Interface();    
+    IMPORT_C static void FnEntryExit();    
+    IMPORT_C static void PanicTrace();    
+
+    // @TODO add examples for state macros
+    // @TODO add examples for event macros
+    // @TODO add examples for OstTraceData
+    // @TODO add compile-time selector examples
+    // @TODO add macro wrapper examples
+    };
+
+#endif  // __HELLOTRACEEXAMPLE_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/dll/inc/HelloTraceFn.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,122 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef HELLOTRACEFN_H_
+#define HELLOTRACEFN_H_
+
+#include <e32base.h>    // CBase
+
+class CHelloTraceFn : public CBase
+    {
+public:
+    
+    // Note the Trace Builder will only parse this if it's in a cpp file
+    // but not from here :(
+    // Also if you add a new enum you need to reparse the enum - it doesn't
+    // get automatically reparsed by the Trace Compiler :(
+    enum TFnEnum
+        {
+        EExample1,
+        EExample2 = 2, 
+        // EExample3 = EExample2 + 1, // The Trace Builder can't parse this :(
+        };
+    
+public:
+    static CHelloTraceFn* NewL();
+    static CHelloTraceFn* NewLC();
+    ~CHelloTraceFn();
+   
+public: // Fn entry / exit tracing examples 
+    void Simple();
+    void OutputsParams(TInt aParam, TFnEnum aEnumParam);
+    void OutputsSignedIntegers(TInt8 aParam8,   TInt16 aParam16, 
+                               TInt32 aParam32, TInt64 aParam64);
+    void OutputsUnsignedIntegers(TUint8 aParam8,   TUint16 aParam16, 
+                                 TUint32 aParam32, TUint64 aParam64);
+     
+    TInt OutputsTIntReturnValue();
+    TInt64 OutputsTInt64ReturnValue();
+    TFnEnum OutputsTFnEnumReturnValue();
+
+    CActive* OutputsUnknownPtrType(CActive* aActive);
+    CActive& OutputsUnknownRefType(CActive& aActive);
+    
+    void OutputMissingParams(TInt aUsedParam, TInt aCommentParam, TInt aMissingParam);
+
+#ifdef _DEBUG    
+    void PreProcessedFn(TInt aDbgParam);
+#else
+    void PreProcessedFn();
+#endif
+    
+    static void StaticOutputsParamsL(TInt aParam);  
+    
+    // duplicate all the function and put the impl in the header file HelloTraceFnDup.h
+    void SimpleDup();
+    void OutputsParamsDup(TInt aParam, TFnEnum aEnumParam);
+    void OutputsSignedIntegersDup(TInt8 aParam8,   TInt16 aParam16, 
+                               TInt32 aParam32, TInt64 aParam64);
+    void OutputsUnsignedIntegersDup(TUint8 aParam8,   TUint16 aParam16, 
+                                 TUint32 aParam32, TUint64 aParam64);
+     
+    TInt OutputsTIntReturnValueDup();
+    TInt64 OutputsTInt64ReturnValueDup();
+    TFnEnum OutputsTFnEnumReturnValueDup();
+
+    CActive* OutputsUnknownPtrTypeDup(CActive* aActive);
+    CActive& OutputsUnknownRefTypeDup(CActive& aActive);
+    
+    void OutputMissingParamsDup(TInt aUsedParam, TInt aCommentParam, TInt aMissingParam);
+
+#ifdef _DEBUG    
+    void PreProcessedFnDup(TInt aDbgParam);
+#else
+    void PreProcessedFnDup();
+#endif
+    static void StaticOutputsParamsDupL(TInt aParam);  
+    
+    // duplicate all the function again and put the impl in the header file HelloTraceFnDup2.h
+    void SimpleDup2();
+    void OutputsParamsDup2(TInt aParam, TFnEnum aEnumParam);
+    void OutputsSignedIntegersDup2(TInt8 aParam8,   TInt16 aParam16, 
+                               TInt32 aParam32, TInt64 aParam64);
+    void OutputsUnsignedIntegersDup2(TUint8 aParam8,   TUint16 aParam16, 
+                                 TUint32 aParam32, TUint64 aParam64);
+     
+    TInt OutputsTIntReturnValueDup2();
+    TInt64 OutputsTInt64ReturnValueDup2();
+    TFnEnum OutputsTFnEnumReturnValueDup2();
+
+    CActive* OutputsUnknownPtrTypeDup2(CActive* aActive);
+    CActive& OutputsUnknownRefTypeDup2(CActive& aActive);
+    
+    void OutputMissingParamsDup2(TInt aUsedParam, TInt aCommentParam, TInt aMissingParam);
+
+#ifdef _DEBUG    
+    void PreProcessedFnDup2(TInt aDbgParam);
+#else
+    void PreProcessedFnDup2();
+#endif
+    static void StaticOutputsParamsDup2L(TInt aParam);  
+
+
+private:
+    CHelloTraceFn();
+    };
+
+#endif /* HELLOTRACEFN_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/dll/inc/HelloTraceInterface.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,63 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef __HELLOTRACEINTERFACE_H__
+#define __HELLOTRACEINTERFACE_H__
+
+#include <e32base.h>	// CBase
+#include <e32std.h>	 // TBuf
+
+const TInt KHelloTraceDllBufferLength = 10;
+typedef TBuf<KHelloTraceDllBufferLength> THelloTraceDllExampleString;
+
+class CHelloTraceInterface : public CBase
+    {
+public:
+    IMPORT_C static CHelloTraceInterface* NewL();
+    IMPORT_C static CHelloTraceInterface* NewLC();
+    IMPORT_C ~CHelloTraceInterface();
+
+public:
+    IMPORT_C static TVersion Version();
+    IMPORT_C const TPtrC String() const;
+    IMPORT_C void AddCharL(const TChar& aChar);
+    IMPORT_C void RemoveLast();
+    IMPORT_C void ResetString();
+    
+    IMPORT_C static TVersion VersionDup();
+    IMPORT_C const TPtrC StringDup() const;
+    IMPORT_C void AddCharDupL(const TChar& aChar);
+    IMPORT_C void RemoveLastDup();
+    IMPORT_C void ResetStringDup();
+
+    IMPORT_C static TVersion VersionDup2();
+    IMPORT_C const TPtrC StringDup2() const;
+    IMPORT_C void AddCharDup2L(const TChar& aChar);
+    IMPORT_C void RemoveLastDup2();
+    IMPORT_C void ResetStringDup2();
+private:
+    CHelloTraceInterface();
+    void ConstructL();
+
+private:
+    // data
+    THelloTraceDllExampleString* iString;
+    };
+
+#endif  // __HELLOTRACEINTERFACE_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/dll/inc/HelloTracePanic.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,35 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef __HELLOTRACEDLL_PAN__
+#define __HELLOTRACEDLL_PAN__
+
+//  Data Types
+
+enum THelloTraceDllPanic
+    {
+    EHelloTraceDllExamplePanic,
+    EHelloTraceDllNullPointer,
+    };
+
+//  Function Prototypes
+
+GLREF_C void Panic(THelloTraceDllPanic aPanic);
+
+#endif  // __HELLOTRACEDLL_PAN__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/dll/inc/HelloTraceTypes.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,39 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef __HELLOTRACETYPES_H__
+#define __HELLOTRACETYPES_H__
+
+class HelloTraceTypes
+    {
+public:
+    static void SignedIntegers();
+    static void UnsignedIntegers();
+    static void Descriptors();
+    
+    static void SignedIntegersDup();
+    static void UnsignedIntegersDup();
+    static void DescriptorsDup();
+        
+    static void SignedIntegersDup2();
+    static void UnsignedIntegersDup2();
+    static void DescriptorsDup2();
+    };
+
+#endif  // __HELLOTRACETYPES_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/dll/incDup/HelloTraceFn.inl	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,157 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef HELLOTRACEFNINL_H_
+#define HELLOTRACEFNINL_H_
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTraceFnTraces.h"
+#endif
+
+inline void CHelloTraceFn::SimpleDup2()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_SIMPLE_DUP2_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_SIMPLE_DUP2_EXIT, this );
+    }
+
+inline void CHelloTraceFn::OutputsParamsDup2(TInt aParam, TFnEnum aEnumParam)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSPARAMS_DUP2_ENTRY, this );
+    Simple();
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSPARAMS_DUP2_EXIT, this );
+    }
+
+inline void CHelloTraceFn::StaticOutputsParamsDup2L(TInt aParam)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_STATICOUTPUTSPARAMS_DUP2_ENTRY, NULL );
+    CHelloTraceFn* example = CHelloTraceFn::NewLC();
+    example->SimpleDup2();    
+    CleanupStack::PopAndDestroy(example);
+    OstTraceFunctionExit0( CHELLOTRACEFN_STATICOUTPUTSPARAMS_DUP2_EXIT );    
+    }
+
+inline void CHelloTraceFn::OutputsSignedIntegersDup2(TInt8 aParam8,   TInt16 aParam16, 
+                                          TInt32 aParam32, TInt64 aParam64)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS_DUP2_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS_DUP2_EXIT, this );
+    }
+
+inline void CHelloTraceFn::OutputsUnsignedIntegersDup2(TUint8 aParam8,   TUint16 aParam16, 
+                                            TUint32 aParam32, TUint64 aParam64)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS_DUP2_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS_DUP2_EXIT, this );
+    }
+
+
+inline TInt CHelloTraceFn::OutputsTIntReturnValueDup2()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_DUP2_ENTRY, this );
+    TInt ret = KErrNone;
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_DUP2_EXIT, this, ret );
+    return ret;
+    }
+
+inline TInt64 CHelloTraceFn::OutputsTInt64ReturnValueDup2()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE_DUP2_ENTRY, this );
+    TInt64 ret = (TInt64) 2 << 40;
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE_DUP2_EXIT, this, ret );
+    return ret;
+    }
+
+inline CHelloTraceFn::TFnEnum CHelloTraceFn::OutputsTFnEnumReturnValueDup2()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE_DUP2_ENTRY, this );
+    TFnEnum ret = EExample1;
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE_DUP2_EXIT, this, ret );
+    return ret;    
+    }
+
+inline CActive* CHelloTraceFn::OutputsUnknownPtrTypeDup2(CActive* aActive)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_DUP2_ENTRY, this );    
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_DUP2_EXIT, this, (TUint) aActive );
+    return aActive;
+    }
+
+inline CActive& CHelloTraceFn::OutputsUnknownRefTypeDup2(CActive& aActive)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE_DUP2_ENTRY, this );
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE_DUP2_EXIT, this, (TUint) &aActive );    
+    return aActive;
+    }
+
+// The following doesn't compile as the Trace Compiler doesn't generate
+// the correct OstTraceGenExt(...) function for it
+//void CHelloTraceFn::OutputMissingParamsBug(TInt /*aCommentParam*/, TInt)
+//    {
+//    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_ENTRY, this );
+//    // ...
+//    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_EXIT, this );    
+//    }
+
+// The following compiles and works but outputs the following warning
+// warning: HelloTraceFn.cpp, line xxx: Parameter did not have a name and was not added to trace
+// The fact that this cannot be suppressed is a known problem we're working on.
+inline void CHelloTraceFn::OutputMissingParamsDup2(TInt aUsedParam, TInt /*aCommentParam*/, TInt)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMS_DUP2_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMS_DUP2_EXIT, this );
+    }
+
+// The following doesn't work as the Trace Compiler outputs:
+// error: HelloTraceFn.cpp, line xxx: Class / function name for trace could not be determined x3
+//#ifdef _DEBUG
+//void CHelloTraceFn::PreProcessedFn(TInt aDbgParam)
+//    {
+//    OstTraceFunctionEntryExt( PRE_PROCESSED_ENTRTY_1, this );
+//#else
+//void CHelloTraceFn::PreProcessedFn()
+//    {
+//    OstTraceFunctionEntry1( PRE_PROCESSED_ENTRTY_2, this );
+//#endif
+//    Simple();
+//    OstTraceFunctionExit1( CHELLOTRACEFN_PREPROCESSEDFN_EXIT, this );
+//    }
+
+// Workaround example code until a proper fix is provided
+#ifdef _DEBUG
+inline void CHelloTraceFn::PreProcessedFnDup2(TInt aDbgParam)
+    {
+    OstTraceExt2( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_DUP2_ENTRY_1, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;aDbgParam=%d;this=%x", (TInt) aDbgParam, (TUint) this);
+#else
+    inline void CHelloTraceFn::PreProcessedFnDup2()
+    {
+    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_DUP2_ENTRY_2, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
+#endif
+    SimpleDup2();
+    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_DUP2_EXIT, "CHelloTraceFn::PreProcessedFn: < CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
+    }
+
+#endif /* HELLOTRACEFNINL_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/dll/incDup/HelloTraceFnDup.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,157 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef HELLOTRACEFNDUP_H_
+#define HELLOTRACEFNDUP_H_
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTraceFnDupTraces.h"
+#endif
+
+inline void CHelloTraceFn::SimpleDup()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_SIMPLE_DUP_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_SIMPLE_DUP_EXIT, this );
+    }
+
+inline void CHelloTraceFn::OutputsParamsDup(TInt aParam, TFnEnum aEnumParam)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSPARAMS_DUP_ENTRY, this );
+    Simple();
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSPARAMS_DUP_EXIT, this );
+    }
+
+inline void CHelloTraceFn::StaticOutputsParamsDupL(TInt aParam)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_STATICOUTPUTSPARAMS_DUP_ENTRY, NULL );
+    CHelloTraceFn* example = CHelloTraceFn::NewLC();
+    example->SimpleDup();    
+    CleanupStack::PopAndDestroy(example);
+    OstTraceFunctionExit0( CHELLOTRACEFN_STATICOUTPUTSPARAMS_DUP_EXIT );    
+    }
+
+inline void CHelloTraceFn::OutputsSignedIntegersDup(TInt8 aParam8,   TInt16 aParam16, 
+                                          TInt32 aParam32, TInt64 aParam64)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS_DUP_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS_DUP_EXIT, this );
+    }
+
+void CHelloTraceFn::OutputsUnsignedIntegersDup(TUint8 aParam8,   TUint16 aParam16, 
+                                            TUint32 aParam32, TUint64 aParam64)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS_DUP_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS_DUP_EXIT, this );
+    }
+
+
+inline TInt CHelloTraceFn::OutputsTIntReturnValueDup()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_DUP_ENTRY, this );
+    TInt ret = KErrNone;
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_DUP_EXIT, this, ret );
+    return ret;
+    }
+
+inline TInt64 CHelloTraceFn::OutputsTInt64ReturnValueDup()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE_DUP_ENTRY, this );
+    TInt64 ret = (TInt64) 2 << 40;
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE_DUP_EXIT, this, ret );
+    return ret;
+    }
+
+inline CHelloTraceFn::TFnEnum CHelloTraceFn::OutputsTFnEnumReturnValueDup()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE_DUP_ENTRY, this );
+    TFnEnum ret = EExample1;
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE_DUP_EXIT, this, ret );
+    return ret;    
+    }
+
+inline CActive* CHelloTraceFn::OutputsUnknownPtrTypeDup(CActive* aActive)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_DUP_ENTRY, this );    
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_DUP_EXIT, this, (TUint) aActive );
+    return aActive;
+    }
+
+inline CActive& CHelloTraceFn::OutputsUnknownRefTypeDup(CActive& aActive)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE_DUP_ENTRY, this );
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE_DUP_EXIT, this, (TUint) &aActive );    
+    return aActive;
+    }
+
+// The following doesn't compile as the Trace Compiler doesn't generate
+// the correct OstTraceGenExt(...) function for it
+//void CHelloTraceFn::OutputMissingParamsBug(TInt /*aCommentParam*/, TInt)
+//    {
+//    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_ENTRY, this );
+//    // ...
+//    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_EXIT, this );    
+//    }
+
+// The following compiles and works but outputs the following warning
+// warning: HelloTraceFn.cpp, line xxx: Parameter did not have a name and was not added to trace
+// The fact that this cannot be suppressed is a known problem we're working on.
+inline void CHelloTraceFn::OutputMissingParamsDup(TInt aUsedParam, TInt /*aCommentParam*/, TInt)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMS_DUP_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMS_DUP_EXIT, this );
+    }
+
+// The following doesn't work as the Trace Compiler outputs:
+// error: HelloTraceFn.cpp, line xxx: Class / function name for trace could not be determined x3
+//#ifdef _DEBUG
+//void CHelloTraceFn::PreProcessedFn(TInt aDbgParam)
+//    {
+//    OstTraceFunctionEntryExt( PRE_PROCESSED_ENTRTY_1, this );
+//#else
+//void CHelloTraceFn::PreProcessedFn()
+//    {
+//    OstTraceFunctionEntry1( PRE_PROCESSED_ENTRTY_2, this );
+//#endif
+//    Simple();
+//    OstTraceFunctionExit1( CHELLOTRACEFN_PREPROCESSEDFN_EXIT, this );
+//    }
+
+// Workaround example code until a proper fix is provided
+#ifdef _DEBUG
+inline void CHelloTraceFn::PreProcessedFnDup(TInt aDbgParam)
+    {
+    OstTraceExt2( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_DUP_ENTRY_1, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;aDbgParam=%d;this=%x", (TInt) aDbgParam, (TUint) this);
+#else
+    inline void CHelloTraceFn::PreProcessedFnDup()
+    {
+    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_DUP_ENTRY_2, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
+#endif
+    SimpleDup();
+    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_DUP_EXIT, "CHelloTraceFn::PreProcessedFn: < CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
+    }
+
+#endif /* HELLOTRACEFNDUP_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/dll/incDup/HelloTraceInterface.inl	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,91 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef __HELLOTRACEINTERFACEINL_H__
+#define __HELLOTRACEINTERFACEINL_H__
+
+#include "HelloTracePanic.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTraceInterfaceTraces.h"
+#endif
+
+ inline EXPORT_C TVersion CHelloTraceInterface::VersionDup2()
+        {
+        const TInt KMajor = 1;
+        const TInt KMinor = 0;
+        const TInt KBuild = 1;
+        TVersion version = TVersion(KMajor, KMinor, KBuild);
+        OstTraceExt1( TRACE_BORDER, CHELLOTRACEDLL_VERSION_DUP2, "CHelloTraceInterface::Version = %S", version.Name());   
+        return version;
+        }
+
+ inline EXPORT_C const TPtrC CHelloTraceInterface::StringDup2() const
+        {
+        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
+
+        OstTraceDefExt2( OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CHELLOTRACEDLL_STRING_DUP2, 
+                         "[0x%08x] Returned %S", (TUint32) this, *iString);   
+        return *iString;
+        }
+
+ inline EXPORT_C void CHelloTraceInterface::AddCharDup2L(const TChar& aChar)
+        {
+        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
+
+        OstTraceExt3( TRACE_BORDER, CHELLOTRACEDLL_ADDCHARL_DUP2, 
+                      "[0x%08x] Adding %d to %S", (TUint32) this, (TInt32) aChar, *iString);   
+        if (iString->Length() >= KHelloTraceDllBufferLength)
+            {
+            OstTrace1( TRACE_ERROR, CHELLOTRACEDLL_ADDCHARL_ERR_DUP2,
+                       "[0x%08x] Not enough space to add character", (TUint32) this);
+            User::Leave( KErrTooBig);
+            }
+        iString->Append(aChar);
+        }
+
+ inline EXPORT_C void CHelloTraceInterface::RemoveLastDup2()
+        {
+        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
+
+        OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_REMOVELAST_DUP2, 
+                      "[0x%08x] Attempting to remove last character from %S", (TUint32) this, *iString);
+        if (iString->Length() > 0)
+            {
+            iString->SetLength(iString->Length() - 1);
+            }
+        else
+            {
+            OstTrace1( TRACE_WARNING, CHELLOTRACEDLL_REMOVELAST_WARN_DUP2, "[0x%08x] String already empty", (TUint32) this);   
+            }
+        }
+
+ inline EXPORT_C void CHelloTraceInterface::ResetStringDup2()
+        {
+        OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_RESETSTRING_DUP2, "[0x%08x] Reseting string %S", (TUint32) this, *iString);
+        if (iString == NULL)
+            {
+            iString = new (ELeave) THelloTraceDllExampleString;
+            }
+        else
+            {
+            iString->SetLength(0);
+            }
+        }
+#endif  // __HELLOTRACEINTERFACEINL_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/dll/incDup/HelloTraceInterfaceDup.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,91 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef __HELLOTRACEINTERFACEDUP_H__
+#define __HELLOTRACEINTERFACEDUP_H__
+
+#include "HelloTracePanic.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTraceInterfaceDupTraces.h"
+#endif
+
+ inline EXPORT_C TVersion CHelloTraceInterface::VersionDup()
+        {
+        const TInt KMajor = 1;
+        const TInt KMinor = 0;
+        const TInt KBuild = 1;
+        TVersion version = TVersion(KMajor, KMinor, KBuild);
+        OstTraceExt1( TRACE_BORDER, CHELLOTRACEDLL_VERSION_DUP, "CHelloTraceInterface::Version = %S", version.Name());   
+        return version;
+        }
+
+ inline EXPORT_C const TPtrC CHelloTraceInterface::StringDup() const
+        {
+        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
+
+        OstTraceDefExt2( OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CHELLOTRACEDLL_STRING_DUP, 
+                         "[0x%08x] Returned %S", (TUint32) this, *iString);   
+        return *iString;
+        }
+
+ inline EXPORT_C void CHelloTraceInterface::AddCharDupL(const TChar& aChar)
+        {
+        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
+
+        OstTraceExt3( TRACE_BORDER, CHELLOTRACEDLL_ADDCHARL_DUP, 
+                      "[0x%08x] Adding %d to %S", (TUint32) this, (TInt32) aChar, *iString);   
+        if (iString->Length() >= KHelloTraceDllBufferLength)
+            {
+            OstTrace1( TRACE_ERROR, CHELLOTRACEDLL_ADDCHARL_ERR_DUP,
+                       "[0x%08x] Not enough space to add character", (TUint32) this);
+            User::Leave( KErrTooBig);
+            }
+        iString->Append(aChar);
+        }
+
+ inline EXPORT_C void CHelloTraceInterface::RemoveLastDup()
+        {
+        __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
+
+        OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_REMOVELAST_DUP, 
+                      "[0x%08x] Attempting to remove last character from %S", (TUint32) this, *iString);
+        if (iString->Length() > 0)
+            {
+            iString->SetLength(iString->Length() - 1);
+            }
+        else
+            {
+            OstTrace1( TRACE_WARNING, CHELLOTRACEDLL_REMOVELAST_WARN_DUP, "[0x%08x] String already empty", (TUint32) this);   
+            }
+        }
+
+ inline EXPORT_C void CHelloTraceInterface::ResetStringDup()
+        {
+        OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_RESETSTRING_DUP, "[0x%08x] Reseting string %S", (TUint32) this, *iString);
+        if (iString == NULL)
+            {
+            iString = new (ELeave) THelloTraceDllExampleString;
+            }
+        else
+            {
+            iString->SetLength(0);
+            }
+        }
+#endif  // __HELLOTRACEINTERFACEDUP_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/dll/incDup/HelloTraceTypes.inl	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,75 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef __HELLOTRACETYPESINL_H__
+#define __HELLOTRACETYPESINL_H__
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTraceTypesTraces.h"
+#endif
+
+inline void HelloTraceTypes::SignedIntegersDup2()
+    {
+    TInt8  eightBit     = - (TInt8)  1 << 6;
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP2_8, 
+                  "8 bit signed: %hhd", eightBit );
+    
+    TInt16 sixteenBit   = - (TInt16) 1 << 14; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP2_16, 
+                  "16 bit signed: %hd", sixteenBit );
+
+    TInt32 thirtyTwoBit = - (TInt32) 1 << 30; 
+    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP2_32, 
+               "32 bit signed: %d", thirtyTwoBit );
+
+    TInt64 sixtyFourBit = - (TInt64) 1 << 62; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP2_64, 
+                  "64 bit signed: %Ld", sixtyFourBit );
+    }
+
+inline void HelloTraceTypes::UnsignedIntegersDup2()
+    {
+    TUint8  eightBit     = (TUint8)  1 << 6;
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP2_8, 
+                  "8 bit unsigned: %hhu", eightBit );
+    
+    TUint16 sixteenBit   = (TUint16) 1 << 14; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP2_16, 
+                  "16 bit unsigned: %hu", sixteenBit );
+
+    TUint32 thirtyTwoBit = (TUint32) 1 << 30; 
+    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP2_32, 
+               "32 bit unsigned: %u", thirtyTwoBit );
+
+    TUint64 sixtyFourBit = (TUint64) 1 << 62; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP2_64, 
+                  "64 bit unsigned: %Lu", sixtyFourBit );
+    }
+
+inline void HelloTraceTypes::DescriptorsDup2()
+    {
+    _LIT8(KAscii, "Some ASCII text");
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_ASCIIDUP2, "8 bit descriptor: %s", KAscii() );
+
+    _LIT16(KUnicode, "Some unicode text");    
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNICODEDUP2, "16 bit descriptor: %S", KUnicode() );
+    }
+
+#endif  // __HELLOTRACETYPESINL_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/dll/incDup/HelloTraceTypesDup.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,75 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef __HELLOTRACETYPESDUP_H__
+#define __HELLOTRACETYPESDUP_H__
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTraceTypesDupTraces.h"
+#endif
+
+inline void HelloTraceTypes::SignedIntegersDup()
+    {
+    TInt8  eightBit     = - (TInt8)  1 << 6;
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP_8, 
+                  "8 bit signed: %hhd", eightBit );
+    
+    TInt16 sixteenBit   = - (TInt16) 1 << 14; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP_16, 
+                  "16 bit signed: %hd", sixteenBit );
+
+    TInt32 thirtyTwoBit = - (TInt32) 1 << 30; 
+    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP_32, 
+               "32 bit signed: %d", thirtyTwoBit );
+
+    TInt64 sixtyFourBit = - (TInt64) 1 << 62; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERSDUP_64, 
+                  "64 bit signed: %Ld", sixtyFourBit );
+    }
+
+inline void HelloTraceTypes::UnsignedIntegersDup()
+    {
+    TUint8  eightBit     = (TUint8)  1 << 6;
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP_8, 
+                  "8 bit unsigned: %hhu", eightBit );
+    
+    TUint16 sixteenBit   = (TUint16) 1 << 14; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP_16, 
+                  "16 bit unsigned: %hu", sixteenBit );
+
+    TUint32 thirtyTwoBit = (TUint32) 1 << 30; 
+    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP_32, 
+               "32 bit unsigned: %u", thirtyTwoBit );
+
+    TUint64 sixtyFourBit = (TUint64) 1 << 62; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERSDUP_64, 
+                  "64 bit unsigned: %Lu", sixtyFourBit );
+    }
+
+inline void HelloTraceTypes::DescriptorsDup()
+    {
+    _LIT8(KAscii, "Some ASCII text");
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_ASCIIDUP, "8 bit descriptor: %s", KAscii() );
+
+    _LIT16(KUnicode, "Some unicode text");    
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNICODEDUP, "16 bit descriptor: %S", KUnicode() );
+    }
+
+#endif  // __HELLOTRACETYPESDUP_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/dll/src/HelloTraceExample.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,106 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+
+#include "HelloTraceExample.h"
+#include "HelloTraceTypes.h"
+#include "HelloTraceInterface.h"
+#include "HelloTraceFn.h"
+#include "HelloTracePanic.h"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTraceExampleTraces.h"
+#endif
+
+EXPORT_C void HelloTraceExample::JustTypes()
+    {
+    OstTrace0( TRACE_EXAMPLE, HELLOTRACEEXAMPLE_JUSTTYPES, "*********************************************** " );
+    
+    HelloTraceTypes::SignedIntegers();
+    HelloTraceTypes::UnsignedIntegers();
+    HelloTraceTypes::Descriptors();    
+    }
+
+EXPORT_C void HelloTraceExample::Interface()
+    {
+    OstTrace0( TRACE_EXAMPLE, HELLOTRACEEXAMPLE_INTERFACE, "*********************************************** " );
+    
+    TVersion version = CHelloTraceInterface::Version();   
+    if (version.iMajor >= 1) 
+        {
+        CHelloTraceInterface* example = CHelloTraceInterface::NewLC();
+        example->AddCharL('H');
+        example->AddCharL('e');
+        example->AddCharL('l');
+        example->AddCharL('l');
+        example->AddCharL('o');
+        example->AddCharL('T');        
+        example->RemoveLast();        
+        example->AddCharL(' ');
+        example->AddCharL('T');
+        example->AddCharL('r');
+        example->AddCharL('a');
+        example->AddCharL('c');
+        example->AddCharL('e');
+        example->AddCharL('!');
+        CleanupStack::PopAndDestroy(example);
+        }
+    else
+        {
+        OstTrace0( TRACE_ERROR, HELLOTRACEEXAMPLE_UNSUPPORTED_VERSION, "Unsupported version!");
+        }
+    }
+
+EXPORT_C void HelloTraceExample::FnEntryExit()
+    {
+    OstTrace0( TRACE_EXAMPLE, HELLOTRACEEXAMPLE_FNENTRYEXIT, "*********************************************** " );
+       
+    CHelloTraceFn* example = CHelloTraceFn::NewLC();
+    CIdle* idle = CIdle::NewL(CActive::EPriorityIdle);
+    CleanupStack::PushL(idle);
+
+    CHelloTraceFn::StaticOutputsParamsL(1);
+   
+    example->Simple();
+    example->OutputsParams(2, CHelloTraceFn::EExample1);
+    example->OutputsParams(3, CHelloTraceFn::EExample2);
+    example->OutputsSignedIntegers(-4, -5, -6, -7);
+    example->OutputsUnsignedIntegers(8, 9, 10, 11);
+    example->OutputsTIntReturnValue();    
+    example->OutputsTInt64ReturnValue(); 
+    example->OutputsTFnEnumReturnValue();
+    example->OutputsUnknownPtrType(idle);    
+    example->OutputsUnknownRefType(*idle);
+#ifdef _DEBUG
+    example->PreProcessedFn(12);
+#else
+    example->PreProcessedFn();
+#endif
+    example->OutputMissingParams(13, 14, 15);
+
+    CleanupStack::PopAndDestroy(idle);
+    CleanupStack::PopAndDestroy(example);
+    }
+
+EXPORT_C void HelloTraceExample::PanicTrace()
+    {
+    OstTrace0( TRACE_EXAMPLE, HELLOTRACEEXAMPLE_PANIC, "*********************************************** " );
+
+    Panic(EHelloTraceDllExamplePanic);
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/dll/src/HelloTraceFn.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,183 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+ 
+#include "HelloTraceFn.h"
+#include "HelloTraceFnDup.h"
+#include "HelloTraceFn.inl"
+#include "HelloTracePanic.h"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTraceFnTraces.h"
+#endif
+
+CHelloTraceFn* CHelloTraceFn::NewLC()
+    {
+    CHelloTraceFn* self = new (ELeave) CHelloTraceFn;
+    CleanupStack::PushL(self);
+    return self;
+    }
+
+CHelloTraceFn* CHelloTraceFn::NewL()
+    {
+    CHelloTraceFn* self = CHelloTraceFn::NewLC();
+    CleanupStack::Pop(self);
+    return self;
+    }
+
+CHelloTraceFn::CHelloTraceFn()
+    {
+    OstTrace1( TRACE_NORMAL, CHELLOTRACEFN_CHELLOTRACEFN_CTOR, "[0x%08x] Constructor", this );    
+    }
+
+CHelloTraceFn::~CHelloTraceFn()
+    {
+    OstTrace1( TRACE_NORMAL, CHELLOTRACEFN_CHELLOTRACEFN_DTOR, "[0x%08x] Destructor", this );    
+    }
+
+void CHelloTraceFn::Simple()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_SIMPLE_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_SIMPLE_EXIT, this );
+    }
+
+void CHelloTraceFn::OutputsParams(TInt aParam, TFnEnum aEnumParam)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSPARAMS_ENTRY, this );
+    Simple();
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSPARAMS_EXIT, this );
+    }
+
+void CHelloTraceFn::StaticOutputsParamsL(TInt aParam)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_STATICOUTPUTSPARAMS_ENTRY, NULL );
+    CHelloTraceFn* example = CHelloTraceFn::NewLC();
+    example->Simple();    
+    CleanupStack::PopAndDestroy(example);
+    OstTraceFunctionExit0( CHELLOTRACEFN_STATICOUTPUTSPARAMS_EXIT );    
+    }
+
+void CHelloTraceFn::OutputsSignedIntegers(TInt8 aParam8,   TInt16 aParam16, 
+                                          TInt32 aParam32, TInt64 aParam64)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS_EXIT, this );
+    }
+
+void CHelloTraceFn::OutputsUnsignedIntegers(TUint8 aParam8,   TUint16 aParam16, 
+                                            TUint32 aParam32, TUint64 aParam64)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS_EXIT, this );
+    }
+
+
+TInt CHelloTraceFn::OutputsTIntReturnValue()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_ENTRY, this );
+    TInt ret = KErrNone;
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_EXIT, this, ret );
+    return ret;
+    }
+
+TInt64 CHelloTraceFn::OutputsTInt64ReturnValue()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE_ENTRY, this );
+    TInt64 ret = (TInt64) 2 << 40;
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE_EXIT, this, ret );
+    return ret;
+    }
+
+CHelloTraceFn::TFnEnum CHelloTraceFn::OutputsTFnEnumReturnValue()
+    {
+    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE_ENTRY, this );
+    TFnEnum ret = EExample1;
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE_EXIT, this, ret );
+    return ret;    
+    }
+
+CActive* CHelloTraceFn::OutputsUnknownPtrType(CActive* aActive)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_ENTRY, this );    
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_EXIT, this, (TUint) aActive );
+    return aActive;
+    }
+
+CActive& CHelloTraceFn::OutputsUnknownRefType(CActive& aActive)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE_ENTRY, this );
+    // ...
+    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE_EXIT, this, (TUint) &aActive );    
+    return aActive;
+    }
+
+// The following doesn't compile as the Trace Compiler doesn't generate
+// the correct OstTraceGenExt(...) function for it
+//void CHelloTraceFn::OutputMissingParamsBug(TInt /*aCommentParam*/, TInt)
+//    {
+//    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_ENTRY, this );
+//    // ...
+//    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_EXIT, this );    
+//    }
+
+// The following compiles and works but outputs the following warning
+// warning: HelloTraceFn.cpp, line xxx: Parameter did not have a name and was not added to trace
+// The fact that this cannot be suppressed is a known problem we're working on.
+void CHelloTraceFn::OutputMissingParams(TInt aUsedParam, TInt /*aCommentParam*/, TInt)
+    {
+    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMS_ENTRY, this );
+    // ...
+    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMS_EXIT, this );
+    }
+
+// The following doesn't work as the Trace Compiler outputs:
+// error: HelloTraceFn.cpp, line xxx: Class / function name for trace could not be determined x3
+//#ifdef _DEBUG
+//void CHelloTraceFn::PreProcessedFn(TInt aDbgParam)
+//    {
+//    OstTraceFunctionEntryExt( PRE_PROCESSED_ENTRTY_1, this );
+//#else
+//void CHelloTraceFn::PreProcessedFn()
+//    {
+//    OstTraceFunctionEntry1( PRE_PROCESSED_ENTRTY_2, this );
+//#endif
+//    Simple();
+//    OstTraceFunctionExit1( CHELLOTRACEFN_PREPROCESSEDFN_EXIT, this );
+//    }
+
+// Workaround example code until a proper fix is provided
+#ifdef _DEBUG
+void CHelloTraceFn::PreProcessedFn(TInt aDbgParam)
+    {
+    OstTraceExt2( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_ENTRY_1, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;aDbgParam=%d;this=%x", (TInt) aDbgParam, (TUint) this);
+#else
+void CHelloTraceFn::PreProcessedFn()
+    {
+    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_ENTRY_2, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
+#endif
+    Simple();
+    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_EXIT, "CHelloTraceFn::PreProcessedFn: < CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
+    }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/dll/src/HelloTraceInterface.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,121 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+
+#include "HelloTraceInterface.h"
+#include "HelloTraceInterfaceDup.h"
+#include "HelloTraceInterface.inl"
+#include "HelloTracePanic.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTraceInterfaceTraces.h"
+#endif
+
+EXPORT_C CHelloTraceInterface* CHelloTraceInterface::NewLC()
+    {
+    CHelloTraceInterface* self = new (ELeave) CHelloTraceInterface;
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    return self;
+    }
+
+EXPORT_C CHelloTraceInterface* CHelloTraceInterface::NewL()
+    {
+    CHelloTraceInterface* self = CHelloTraceInterface::NewLC();
+    CleanupStack::Pop(self);
+    return self;
+    }
+
+CHelloTraceInterface::CHelloTraceInterface()
+    {
+    OstTrace1( TRACE_NORMAL, CHELLOTRACEDLL_CHELLOTRACEDLL_CTOR, "[0x%08x]", (TUint32) this );    
+    }
+
+void CHelloTraceInterface::ConstructL()
+    {
+    iString = new (ELeave) THelloTraceDllExampleString;
+    }
+
+EXPORT_C CHelloTraceInterface::~CHelloTraceInterface()
+    {
+    delete iString;
+    OstTrace1( TRACE_NORMAL, CHELLOTRACEDLL_CHELLOTRACEDLL_DTOR, "[0x%08x]", (TUint32) this );    
+    }
+
+EXPORT_C TVersion CHelloTraceInterface::Version()
+    {
+    const TInt KMajor = 1;
+    const TInt KMinor = 0;
+    const TInt KBuild = 1;
+    TVersion version = TVersion(KMajor, KMinor, KBuild);
+    OstTraceExt1( TRACE_BORDER, CHELLOTRACEDLL_VERSION, "CHelloTraceInterface::Version = %S", version.Name());   
+    return version;
+    }
+
+EXPORT_C const TPtrC CHelloTraceInterface::String() const
+    {
+    __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
+
+    OstTraceDefExt2( OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CHELLOTRACEDLL_STRING, 
+                     "[0x%08x] Returned %S", (TUint32) this, *iString);   
+    return *iString;
+    }
+
+EXPORT_C void CHelloTraceInterface::AddCharL(const TChar& aChar)
+    {
+    __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
+
+    OstTraceExt3( TRACE_BORDER, CHELLOTRACEDLL_ADDCHARL, 
+                  "[0x%08x] Adding %d to %S", (TUint32) this, (TInt32) aChar, *iString);   
+    if (iString->Length() >= KHelloTraceDllBufferLength)
+        {
+        OstTrace1( TRACE_ERROR, CHELLOTRACEDLL_ADDCHARL_ERR,
+                   "[0x%08x] Not enough space to add character", (TUint32) this);
+        User::Leave( KErrTooBig);
+        }
+    iString->Append(aChar);
+    }
+
+EXPORT_C void CHelloTraceInterface::RemoveLast()
+    {
+    __ASSERT_ALWAYS(iString != NULL, Panic(EHelloTraceDllNullPointer));
+
+    OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_REMOVELAST, 
+                  "[0x%08x] Attempting to remove last character from %S", (TUint32) this, *iString);
+    if (iString->Length() > 0)
+        {
+        iString->SetLength(iString->Length() - 1);
+        }
+    else
+        {
+        OstTrace1( TRACE_WARNING, CHELLOTRACEDLL_REMOVELAST_WARN, "[0x%08x] String already empty", (TUint32) this);   
+        }
+    }
+
+EXPORT_C void CHelloTraceInterface::ResetString()
+    {
+    OstTraceExt2( TRACE_BORDER, CHELLOTRACEDLL_RESETSTRING, "[0x%08x] Reseting string %S", (TUint32) this, *iString);
+    if (iString == NULL)
+        {
+        iString = new (ELeave) THelloTraceDllExampleString;
+        }
+    else
+        {
+        iString->SetLength(0);
+        }
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/dll/src/HelloTracePanic.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,32 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#include <e32std.h>		 // GLDEF_C
+
+#include "HelloTracePanic.h"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTracePanicTraces.h"
+#endif
+
+GLDEF_C void Panic(THelloTraceDllPanic aPanic)
+    {
+    OstTrace1( TRACE_FATAL, PANIC, "Panic(%{THelloTraceDllPanic})", (TUint) aPanic );    
+    User::Panic(_L("HelloTraceDll"), aPanic);
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/dll/src/HelloTraceTypes.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,76 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+
+#include <e32std.h>
+
+#include "HelloTraceTypes.h"
+#include "HelloTraceTypesDup.h"
+#include "HelloTraceTypes.inl"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloTraceTypesTraces.h"
+#endif
+
+void HelloTraceTypes::SignedIntegers()
+    {
+    TInt8  eightBit     = - (TInt8)  1 << 6;
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS_8, 
+                  "8 bit signed: %hhd", eightBit );
+    
+    TInt16 sixteenBit   = - (TInt16) 1 << 14; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS_16, 
+                  "16 bit signed: %hd", sixteenBit );
+
+    TInt32 thirtyTwoBit = - (TInt32) 1 << 30; 
+    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS_32, 
+               "32 bit signed: %d", thirtyTwoBit );
+
+    TInt64 sixtyFourBit = - (TInt64) 1 << 62; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS_64, 
+                  "64 bit signed: %Ld", sixtyFourBit );
+    }
+
+void HelloTraceTypes::UnsignedIntegers()
+    {
+    TUint8  eightBit     = (TUint8)  1 << 6;
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS_8, 
+                  "8 bit unsigned: %hhu", eightBit );
+    
+    TUint16 sixteenBit   = (TUint16) 1 << 14; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS_16, 
+                  "16 bit unsigned: %hu", sixteenBit );
+
+    TUint32 thirtyTwoBit = (TUint32) 1 << 30; 
+    OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS_32, 
+               "32 bit unsigned: %u", thirtyTwoBit );
+
+    TUint64 sixtyFourBit = (TUint64) 1 << 62; 
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS_64, 
+                  "64 bit unsigned: %Lu", sixtyFourBit );
+    }
+
+void HelloTraceTypes::Descriptors()
+    {
+    _LIT8(KAscii, "Some ASCII text");
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_ASCII, "8 bit descriptor: %s", KAscii() );
+
+    _LIT16(KUnicode, "Some unicode text");    
+    OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNICODE, "16 bit descriptor: %S", KUnicode() );
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/dll/traces/hellotracedll_dll/trace.properties	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<trace_properties>
+<enum name="TFnEnum">
+<value id="0">EExample1</value>
+<value id="2">EExample2</value>
+</enum>
+<enum name="THelloTraceDllPanic">
+<value id="0">EHelloTraceDllExamplePanic</value>
+<value id="1">EHelloTraceDllNullPointer</value>
+</enum>
+<file>../../incDup/HelloTraceInterfaceDup.h</file>
+<file>../../incDup/HelloTraceInterface.inl</file>
+<file>../../incDup/HelloTraceFnDup.h</file>
+<file>../../incDup/HelloTraceFn.inl</file>
+<file>../../incDup/HelloTraceTypesDup.h</file>
+<file>../../incDup/HelloTraceTypes.inl</file>
+</trace_properties>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/group/bld.inf	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,19 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+#include "../dll/group/bld.inf"
+#include "../console/group/bld.inf"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/group/bld.inf	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,29 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+* TraceCompiler
+*/
+
+prj_platforms
+TOOLS2
+
+
+
+
+prj_testextensions
+start   extension   tools\ant_launch
+option  build_xml   build.xml
+end
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/group/build.xml	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,235 @@
+<project name="OstTraceCompilerTest" default="build" basedir="..">
+
+<condition property="isLinux">
+    <os name="linux"/>
+</condition>
+
+<condition property="isWindows">
+	<not>
+		<os name="linux"/>
+	</not>
+</condition>
+
+<!-- EMMA configuration -->
+<path id="emma.lib" >
+	<pathelement location="${ant.home}/lib/emma.jar" />
+	<pathelement location="${ant.home}/lib/emma_ant.jar" />
+</path>
+
+<taskdef resource="emma_ant.properties" classpathref="emma.lib" />
+
+<target name="init_windows_epocroot" if="isWindows">
+	<property environment="env" />
+	<echo message="Init Windows epocroot"/>
+	<property name="epoc.root" value="${env.EPOCROOT}"/>
+</target>
+
+<target name="init_linux_epocroot" if="isLinux">
+	<property environment="env" />
+	<echo message="Init Linux epocroot"/>
+	<property name="epoc.root" value="${env.EPOCROOT}//" />
+</target>
+
+<target name="init" depends="init_windows_epocroot, init_linux_epocroot">
+	<property name="src.dir" value="src" />
+	<property name="build.dir" value="build" />
+	<property name="jar.dir" value="jar" />
+	<property name="instr.dir" location="instr"/>
+	<property name="testdata.dir" location="${epoc.root}testdata"/>
+	<property name="reports.dir" value="${epoc.root}testdata/reports" />	
+	<property name="emma.dir" location="${epoc.root}testdata/reports/emma"/>
+	<property name="tools.dir" location="${epoc.root}epoc32/tools"/>
+</target>
+
+<target name="clean" depends="init">
+	<echo>Cleaning the ${build.dir}</echo>
+	<delete dir="${build.dir}"/>
+	<echo>Creating the ${build.dir} directory</echo>
+	<mkdir dir="${build.dir}"/>
+	<echo>Cleaning the ${reports.dir}</echo>
+	<delete dir="${reports.dir}"/>
+	<echo>Creating the ${reports.dir} directory</echo>
+	<mkdir dir="${reports.dir}"/>
+	<echo>Cleaning the ${instr.dir}</echo>
+	<delete dir="${instr.dir}"/>
+	<echo>Creating the ${instr.dir} directory</echo>
+	<mkdir dir="${instr.dir}"/>
+	<echo>Deleting test exports</echo>
+	<delete file="${epoc.root}epoc32/include/platform/test_opensystemtrace_types.h"/>
+	<delete file="${epoc.root}epoc32/build/buildlog_tc.txt"/>
+	<delete file="${epoc.root}epoc32/build/parsedlogs_tc.txt"/>
+	<delete file="${epoc.root}epoc32/build/buildlog_sbs.txt"/>
+	<delete file="${epoc.root}epoc32/build/parsedlogs_sbs.txt"/>
+	<delete file="${epoc.root}epoc32/build/buildlog_mult_cpp.txt"/>
+	<delete file="${epoc.root}epoc32/build/parsedlogs_mult_cpp.txt"/>
+	<delete file="${epoc.root}epoc32/build/buildlog_mult_mmp.txt"/>
+	<delete file="${epoc.root}epoc32/build/parsedlogs_mult_mmp.txt"/>	
+	<delete dir="${testdata.dir}/TraceErrorApp"/>
+	<delete dir="${testdata.dir}/MultipleCppTraceErrorApp"/>
+	<delete dir="${testdata.dir}/MultipleMmpTraceErrorApps"/>
+	<delete dir="${testdata.dir}/FixedIdDefinitionsTestApp"/>
+	<delete dir="${testdata.dir}/MultipleMmpTestCases"/>
+	<delete dir="${epoc.root}testdata/MultipleMmpTestCases"/>
+	<delete dir="${testdata.dir}TracesInHeadersApps"/>
+	<delete dir="${epoc.root}epoc32/build/testdata/MultipleMmpTestCases"/>
+	<delete dir="${epoc.root}epoc32/build/testdata/MultipleCppTraceErrorApp"/>
+	<delete dir="${epoc.root}epoc32/build/testdata/TracesInHeadersApps"/>
+</target>
+
+<target name="build" depends="clean">
+	<property name="classpath" value="${build.dir}:lib/junit-4.7.jar:../jar/tracecompiler.jar" />
+	<copy todir="${epoc.root}epoc32/include/platform">
+		<fileset dir="testdata"/>
+	</copy>
+	<copy todir="${epoc.root}testdata/TraceErrorApp">
+		<fileset dir="TraceErrorApp"/>
+	</copy>	
+	<copy todir="${epoc.root}testdata/MultipleCppTraceErrorApp">
+		<fileset dir="MultipleCppTraceErrorApp"/>
+	</copy>	
+	<copy todir="${epoc.root}testdata/MultipleMmpTraceErrorApps">
+		<fileset dir="MultipleMmpTraceErrorApps"/>
+	</copy>
+	<copy todir="${epoc.root}testdata/FixedIdDefinitionsTestApp">
+		<fileset dir="FixedIdDefinitionsTestApp"/>
+	</copy>			
+	<copy todir="${epoc.root}testdata/MultipleMmpTestCases">
+		<fileset dir="MultipleMmpTestCases"/>
+	</copy>
+    	<copy todir="${epoc.root}testdata/TracesInHeadersApps">
+		<fileset dir="TracesInHeadersApps"/>
+	</copy>
+	<javac  classpath="${classpath}" srcdir="${src.dir}" destdir="${build.dir}" debug="false" target="1.5" >
+	</javac>
+</target>
+
+<target name="run" depends="build" description="run the junit tests">
+
+	<echo>---- Note ANT 1.7 or greater is required for the junit task ----</echo>
+
+	<!-- generate classpath -->
+	<path id="lib.path.ref">
+		<pathelement location="build"/>
+   		<fileset dir="lib" includes="*.jar"/>
+   		<fileset dir="../jar" includes="*.jar"/>
+ 	</path>
+	
+	<junit printsummary="yes" haltonfailure="yes">		
+	 	<classpath path="${toString:lib.path.ref}"/>
+	 	<formatter type="plain"/>
+	
+		<!--complete test code should be in the $src.dir so run all of them except ErrorLogsTestBase.java-->
+		<!--that is the base class of ErrorLogsTestUnit.java and ErrorLogsTestSystem.java-->	 	 	
+	 	<batchtest fork="yes" todir="${reports.dir}">
+	 		<fileset dir="${src.dir}">
+	      		<include name="*.java"/>
+	      		<exclude name="ErrorLogsTestBase.java"/>
+	 		</fileset>
+	 	</batchtest>	
+	</junit>
+
+</target>
+
+<!-- Instrumentation target, depends on JAR -->
+<target name="instr" depends="build">
+	<!-- Instrument the source code -->
+	<emma>
+		<instr instrpath="${tools.dir}/tracecompiler" metadatafile="${emma.dir}/metadata.emma" merge="true" mode="overwrite"/>
+	</emma>
+</target>
+
+<!--target to execute pure unit tests and measure test coverage-->		 
+<target name="run_unit_emma" depends="instr" description="run the TraceCompiler unit tests and measure test coverage">
+	<echo>---- Note ANT 1.7 or greater is required for the junit task ----</echo>
+
+	<!-- generate classpath -->
+	<path id="lib.path.ref">
+		<!-- Instrumented class files -->
+		<pathelement location="${epoc.root}epoc32/tools/tracecompiler"/>
+		<pathelement location="build"/>
+		<fileset dir="${instr.dir}" includes="*.class"/>
+		<fileset dir="lib" includes="*.jar"/>
+
+		<!-- EMMA -->
+		<pathelement path="${ant.home}/lib/emma.jar"/>
+ 	</path>
+	
+	<echo>${toString:lib.path.ref}</echo> 
+	
+	<junit printsummary="yes" haltonfailure="yes">		
+	 	<classpath path="${toString:lib.path.ref}"/>
+	 	<formatter type="plain"/>
+		<formatter type="xml"/>
+
+		<!-- Instrumentation arguments to JVM -->
+		<jvmarg value="-Demma.coverage.out.file=${emma.dir}/coverage.emma" />
+		<jvmarg value="-Demma.coverage.out.merge=true" />
+
+		<!--complete test code should be in the $src.dir so run all of them except ErrorLogsTestSystem.java, MultipleMmpTest.java and-->
+		<!--ErrorLogsTestBase.java that is the base class of ErrorLogsTestUnit.java and ErrorLogsTestSystem.java-->		 	
+	 	<batchtest fork="yes" todir="${reports.dir}">
+	 		<fileset dir="${src.dir}">
+	      		<include name="*.java"/>
+	      		<exclude name="ErrorLogsTestSystem.java"/>
+	      		<exclude name="ErrorLogsTestBase.java"/>
+	      		<exclude name="MultipleMmpTest.java"/>
+	      		<exclude name="TracesInHeadersTest.java"/>	      		
+                <exclude name="TraceHeadersLicenceTest.java"/>
+	 		</fileset>
+		</batchtest>
+	</junit>
+		
+	<!-- Create EMMA report -->
+	<emma>
+		<report sourcepath="src/" >
+			<fileset dir="${emma.dir}" >
+				<include name="*.emma" />
+			</fileset>
+			<xml outfile="${emma.dir}/coverage.xml" />
+		</report>
+	</emma>
+</target>
+
+<!--target to execute pure unit tests-->		 
+<target name="run_unit" depends="build" description="run the TraceCompiler unit tests">
+
+	<echo>---- Note ANT 1.7 or greater is required for the junit task ----</echo>
+
+	<!-- generate classpath -->
+	<path id="lib.path.ref">
+		<pathelement location="build"/>
+   		<fileset dir="lib" includes="*.jar"/>
+   		<fileset dir="../jar" includes="*.jar"/>
+ 	</path>
+	
+	<junit printsummary="yes" haltonfailure="yes">		
+	 	<classpath path="${toString:lib.path.ref}"/>
+	 	<formatter type="plain"/>
+	 	<formatter type="xml"/>
+	
+		<!--complete test code should be in the $src.dir so run all of them except ErrorLogsTestBase.java-->
+		<!--that is the base class of ErrorLogsTestUnit.java and ErrorLogsTestSystem.java-->	 	 	
+	 	<batchtest fork="yes" todir="${reports.dir}">
+	 		<fileset dir="${src.dir}">
+	      		<include name="*.java"/>
+	      		<exclude name="ErrorLogsTestSystem.java"/>
+	      		<exclude name="ErrorLogsTestBase.java"/>
+	      		<exclude name="MultipleMmpTest.java"/>
+	      		<exclude name="TracesInHeadersTest.java"/>	 
+	      		<exclude name="TraceHeadersLicenceTest.java"/>                
+	 		</fileset>
+	 	</batchtest>	
+	</junit>
+
+</target>
+
+<target name="jar" depends="build">
+	<mkdir dir="${jar.dir}"/>
+        <jar destfile="${jar.dir}/tests.jar" basedir="${build.dir}">
+            <manifest>
+                <attribute name="Main-Class" value="GroupNamesTest"/>
+            </manifest>
+        </jar>
+</target>
+
+</project>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/group/ccbuild.xml	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="com.nokia.tracecompiler" default="cc" basedir="..">
+
+	<target name="cc" depends="init, test, analyze" description="Run unit tests and analyze code"/>
+
+	<property name="javacVerbose" value="false"/>
+
+
+	<!-- declare ant4eclipse -->
+	<taskdef resource="net/sf/ant4eclipse/antlib.xml" />
+
+	
+	<!-- PMD configuration -->
+	<path id="pmd.lib" >
+    	<pathelement location="${ant.home}/lib/pmd-4.2.jar" />
+    	<pathelement location="${ant.home}/lib/asm-3.1.jar" />
+    	<pathelement location="${ant.home}/lib/jaxen-1.1.1.jar" />
+  	</path>
+	
+	<taskdef name="pmd" classname="net.sourceforge.pmd.ant.PMDTask" classpathref="pmd.lib" />
+
+	<!-- Init target -->
+	<target name="init">
+		<property environment="env"/>
+		<property name="testdata.dir" location="${env.EPOCROOT}testdata"/>
+		<property name="reports.dir" location="${env.EPOCROOT}testdata/reports"/>
+		<property name="hudson_reports.dir" location="reports"/>
+		
+		<echo>Cleaning the ${hudson_reports.dir}</echo>
+		<delete dir="${hudson_reports.dir}"/>
+		<echo>Creating the ${hudson_reports.dir} directory</echo>
+		<mkdir dir="${hudson_reports.dir}"/>
+	</target>
+
+	<!-- Test target -->
+	<target name="test" depends="init">
+		<ant antfile="group/build.xml" target="run_unit"/>
+		
+		<!-- Copy reports folder to reports forder in Hudson workspace, so reports can be used in Hudson -->
+		<copy todir="${hudson_reports.dir}">
+			<fileset dir="${reports.dir}"/>
+		</copy>
+	</target>
+
+	<!-- Analyze target -->
+	<target name="analyze" depends="init">
+		<!-- PMD -->
+		<pmd>
+			<!-- Rules -->
+			<ruleset>basic</ruleset>
+			<ruleset>codesize</ruleset>
+			<ruleset>coupling</ruleset>
+			<ruleset>design</ruleset>
+			<ruleset>strictexception</ruleset>
+			<ruleset>strings</ruleset>
+			<ruleset>sunsecure</ruleset>
+			<ruleset>unusedcode</ruleset>
+			
+			<!-- Output PMD report directly to reports forder in Hudson workspace, so report can be used in Hudson -->
+			<formatter type="xml" toFile="${hudson_reports.dir}/report.pmd.xml"/>
+			
+			<!-- Files to analyze -->
+			<fileset dir="../src/">
+				<include name="**/*.java"/>
+			</fileset>
+		</pmd>
+	</target>
+
+</project>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/group/readme.txt	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,6 @@
+build.xml adds ant support for running and building the tests
+
+
+ant build - builds test code
+ant run builds & runs test code
+ant jar generates executable jar file
Binary file tracesrv/tracecompiler/test/lib/junit-4.7.jar has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/multipleMmpTestCases/group/bld.inf	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,26 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+
+#include "../mmp_traces/group/bld.inf"
+#include "../mmp_traces_mmpname/group/bld.inf"
+#include "../mmp_traces_slash_target_ext/group/bld.inf"
+#include "../mmp_traces_target_type/group/bld.inf"
+#include "../mmp_traces_mixed/group/bld.inf"
+#include "../mmp_traces_slash_target_ext_commonsource/group/bld.inf"
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/multipleMmpTestCases/mmp_traces/group/bld.inf	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,25 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_MMPFILES
+mmp_traces1.mmp
+mmp_traces2.mmp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/multipleMmpTestCases/mmp_traces/group/mmp_traces1.mmp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,40 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+
+TARGET		  target1.exe
+TARGETTYPE	  exe
+UID			 0 0xE8576D96
+
+USERINCLUDE	 ../inc
+USERINCLUDE  ../traces
+
+APP_LAYER_SYSTEMINCLUDE
+
+SYSTEMINCLUDE   /epoc32/include
+
+SOURCEPATH	  ../src
+SOURCE		  MultipleMmpApp1.cpp 
+SOURCE 		  ExtraCppFile1.cpp
+
+LIBRARY		 euser.lib
+
+#ifdef ENABLE_ABIV2_MODE
+DEBUGGABLE_UDEBONLY
+#endif
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/multipleMmpTestCases/mmp_traces/group/mmp_traces2.mmp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,39 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+
+TARGET		  target2.exe
+TARGETTYPE	  exe
+UID			 0 0xE8576D95
+
+USERINCLUDE	 ../inc
+USERINCLUDE  ../traces
+
+APP_LAYER_SYSTEMINCLUDE
+
+SYSTEMINCLUDE   /epoc32/include
+
+SOURCEPATH	  ../src
+SOURCE		  MultipleMmpApp2.cpp 
+SOURCE		  ExtraCppFile2.cpp
+
+LIBRARY		 euser.lib
+
+#ifdef ENABLE_ABIV2_MODE
+DEBUGGABLE_UDEBONLY
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/multipleMmpTestCases/mmp_traces/inc/MultipleMmpApp.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,32 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef __MULTIPLEMMPAPP_H__
+#define __MULTIPLEMMPAPP_H__
+
+//  Include Files
+
+#include <e32base.h>
+
+//  Function Prototypes
+
+GLDEF_C TInt E32Main();
+void CallSomeMoreTraceStatements();
+
+#endif  // __MULTIPLEMMPAPP_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/multipleMmpTestCases/mmp_traces/src/ExtraCppFile1.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,37 @@
+/*
+* Copyriight (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+/*
+ * ExtraCppFile.cpp
+ *
+ *  Created on: Dec 7, 2009
+ *      Author: cajagu
+ */
+
+#include "MultipleMmpApp.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "ExtraCppFile1Traces.h"
+#endif
+
+void CallSomeMoreTraceStatements()
+    {
+    TInt32 x = 555;
+    TUint32 y = 666;
+
+    OstTrace1( TRACE_FLOW, TEST1_CALLMORE, "CallSomeMoreTraceStatements(): x=%d" , x );
+    OstTrace1( TRACE_FLOW, TEST2_CALLMORE, "CallSomeMoreTraceStatements(): y=%u" , y );
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/multipleMmpTestCases/mmp_traces/src/ExtraCppFile2.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,45 @@
+/*
+ * ExtraCppFile.cpp
+ *
+ *  Created on: Dec 7, 2009
+ *      Author: cajagu
+ */
+
+
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+/*
+ * ExtraCppFile.cpp
+ *
+ *  Created on: Dec 7, 2009
+ *      Author: cajagu
+ */
+
+#include "MultipleMmpApp.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "ExtraCppFile2Traces.h"
+#endif
+
+void CallSomeMoreTraceStatements()
+    {
+    TInt32 x = 555;
+    TUint32 y = 666;
+
+    OstTrace1( TRACE_FLOW, TEST1_CALLMORE, "CallSomeMoreTraceStatements(): x=%d" , x );
+    OstTrace1( TRACE_FLOW, TEST2_CALLMORE, "CallSomeMoreTraceStatements(): y=%u" , y );
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/multipleMmpTestCases/mmp_traces/src/MultipleMmpApp1.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,77 @@
+
+//  Include Files  
+
+#include "MultipleMmpApp.h"
+#include <e32base.h>
+#include <e32std.h>
+#include <e32cons.h>			// Console
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "MultipleMmpApp1Traces.h"
+#endif
+
+//  Constants
+
+_LIT(KTextConsoleTitle, "Console");
+_LIT(KTextFailed, " failed, leave code = %d");
+_LIT(KTextPressAnyKey, " [press any key]\n");
+
+//  Global Variables
+
+LOCAL_D CConsoleBase* console; // write all messages to this
+
+
+//  Local Functions
+
+LOCAL_C void MainL()
+    {
+    /****************************TRACE STATEMENTS*********************************/
+    OstTrace0( TRACE_FLOW, TEST1_MAINL, "MainL()" );
+    OstTrace0( TRACE_FLOW, TEST2_MAINL, "MainL()" );    
+    /*****************************************************************************/
+    
+    CallSomeMoreTraceStatements();
+    
+    console->Write(_L("Hello, world!\n"));
+    }
+
+LOCAL_C void DoStartL()
+    {
+    // Create active scheduler (to run active objects)
+    CActiveScheduler* scheduler = new (ELeave) CActiveScheduler();
+    CleanupStack::PushL(scheduler);
+    CActiveScheduler::Install(scheduler);
+
+    MainL();
+
+    // Delete active scheduler
+    CleanupStack::PopAndDestroy(scheduler);
+    }
+
+//  Global Functions
+
+GLDEF_C TInt E32Main()
+    {
+    // Create cleanup stack
+    __UHEAP_MARK;
+    CTrapCleanup* cleanup = CTrapCleanup::New();
+
+    // Create output console
+    TRAPD(createError, console = Console::NewL(KTextConsoleTitle, TSize(
+            KConsFullScreen, KConsFullScreen)));
+    if (createError)
+        return createError;
+
+    // Run application code inside TRAP harness, wait keypress when terminated
+    TRAPD(mainError, DoStartL());
+    if (mainError)
+        console->Printf(KTextFailed, mainError);
+    console->Printf(KTextPressAnyKey);
+    console->Getch();
+
+    delete console;
+    delete cleanup;
+    __UHEAP_MARKEND;
+    return KErrNone;
+    }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/multipleMmpTestCases/mmp_traces/src/MultipleMmpApp2.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,94 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+//  Include Files  
+
+#include "MultipleMmpApp.h"
+#include <e32base.h>
+#include <e32std.h>
+#include <e32cons.h>			// Console
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "MultipleMmpApp2Traces.h"
+#endif
+
+//  Constants
+
+_LIT(KTextConsoleTitle, "Console");
+_LIT(KTextFailed, " failed, leave code = %d");
+_LIT(KTextPressAnyKey, " [press any key]\n");
+
+//  Global Variables
+
+LOCAL_D CConsoleBase* console; // write all messages to this
+
+
+//  Local Functions
+
+LOCAL_C void MainL()
+    {
+    /****************************TRACE STATEMENTS*********************************/
+    OstTrace0( TRACE_FLOW, TEST1_MAINL, "MainL()" );
+    OstTrace0( TRACE_FLOW, TEST2_MAINL, "MainL()" );    
+    /*****************************************************************************/
+    
+    CallSomeMoreTraceStatements();
+    
+    console->Write(_L("Hello, world!\n"));
+    }
+
+LOCAL_C void DoStartL()
+    {
+    // Create active scheduler (to run active objects)
+    CActiveScheduler* scheduler = new (ELeave) CActiveScheduler();
+    CleanupStack::PushL(scheduler);
+    CActiveScheduler::Install(scheduler);
+
+    MainL();
+
+    // Delete active scheduler
+    CleanupStack::PopAndDestroy(scheduler);
+    }
+
+//  Global Functions
+
+GLDEF_C TInt E32Main()
+    {
+    // Create cleanup stack
+    __UHEAP_MARK;
+    CTrapCleanup* cleanup = CTrapCleanup::New();
+
+    // Create output console
+    TRAPD(createError, console = Console::NewL(KTextConsoleTitle, TSize(
+            KConsFullScreen, KConsFullScreen)));
+    if (createError)
+        return createError;
+
+    // Run application code inside TRAP harness, wait keypress when terminated
+    TRAPD(mainError, DoStartL());
+    if (mainError)
+        console->Printf(KTextFailed, mainError);
+    console->Printf(KTextPressAnyKey);
+    console->Getch();
+
+    delete console;
+    delete cleanup;
+    __UHEAP_MARKEND;
+    return KErrNone;
+    }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/multipleMmpTestCases/mmp_traces_mixed/group/bld.inf	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,25 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_MMPFILES
+mmp_traces_mixed1.mmp
+mmp_traces_mixed2.mmp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/multipleMmpTestCases/mmp_traces_mixed/group/mmp_traces_mixed1.mmp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,40 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+TARGET		  target3.dll
+TARGETTYPE	  kext
+UID			 0 0xE8576D96
+
+USERINCLUDE	 ..\inc
+USERINCLUDE  ..\traces
+USERINCLUDE  ..\traces_target3_kext
+USERINCLUDE  ..\traces\target3_dll //traces should be generated here
+
+OS_LAYER_SYSTEMINCLUDE
+
+SYSTEMINCLUDE   \epoc32\include
+
+SOURCEPATH	  ..\src
+SOURCE		  MultipleMmpApp1.cpp 
+SOURCE 		  ExtraCppFile1.cpp
+
+#include "kernel/kern_ext.mmh"
+
+#ifdef ENABLE_ABIV2_MODE
+DEBUGGABLE_UDEBONLY
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/multipleMmpTestCases/mmp_traces_mixed/group/mmp_traces_mixed2.mmp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,39 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+TARGET		  target4.dll
+TARGETTYPE	  kext
+UID			 0 0xE8576D95
+
+USERINCLUDE	 ..\inc
+USERINCLUDE  ..\traces
+USERINCLUDE  ..\traces_target4_kext //traces should be generated here
+
+OS_LAYER_SYSTEMINCLUDE
+
+SYSTEMINCLUDE   \epoc32\include
+
+SOURCEPATH	  ..\src
+SOURCE		  MultipleMmpApp2.cpp 
+SOURCE		  ExtraCppFile2.cpp
+
+#include "kernel/kern_ext.mmh"
+
+#ifdef ENABLE_ABIV2_MODE
+DEBUGGABLE_UDEBONLY
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/multipleMmpTestCases/mmp_traces_mixed/inc/MultipleMmpApp.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,32 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef __MULTIPLEMMPAPP_H__
+#define __MULTIPLEMMPAPP_H__
+
+//  Include Files
+
+#include <e32def.h>
+
+
+//  Function Prototypes
+
+void CallSomeMoreTraceStatements();
+
+#endif  // __MULTIPLEMMPAPP_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/multipleMmpTestCases/mmp_traces_mixed/src/ExtraCppFile1.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,37 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+/*
+ * ExtraCppFile.cpp
+ *
+ *  Created on: Dec 7, 2009
+ *      Author: cajagu
+ */
+
+#include "MultipleMmpApp.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "ExtraCppFile1Traces.h"
+#endif
+
+void CallSomeMoreTraceStatements()
+    {
+    TInt32 x = 555;
+    TUint32 y = 666;
+
+    OstTrace1( TRACE_FLOW, TEST1_CALLMORE, "CallSomeMoreTraceStatements(): x=%d" , x );
+    OstTrace1( TRACE_FLOW, TEST2_CALLMORE, "CallSomeMoreTraceStatements(): y=%u" , y );
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/multipleMmpTestCases/mmp_traces_mixed/src/ExtraCppFile2.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,37 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+/*
+ * ExtraCppFile.cpp
+ *
+ *  Created on: Dec 7, 2009
+ *      Author: cajagu
+ */
+
+#include "MultipleMmpApp.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "ExtraCppFile2Traces.h"
+#endif
+
+void CallSomeMoreTraceStatements()
+    {
+    TInt32 x = 555;
+    TUint32 y = 666;
+
+    OstTrace1( TRACE_FLOW, TEST1_CALLMORE, "CallSomeMoreTraceStatements(): x=%d" , x );
+    OstTrace1( TRACE_FLOW, TEST2_CALLMORE, "CallSomeMoreTraceStatements(): y=%u" , y );
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/multipleMmpTestCases/mmp_traces_mixed/src/MultipleMmpApp1.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,41 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+//  Include Files  
+
+#include "MultipleMmpApp.h"
+#include <kernel/kernel.h>
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "MultipleMmpApp1Traces.h"
+#endif
+
+
+
+DECLARE_STANDARD_EXTENSION()
+    {
+    /****************************TRACE STATEMENTS*********************************/
+    OstTrace0( TRACE_FLOW, TEST1_DECLARE_STANDARD_EXTENSION, "DECLARE_STANDARD_EXTENSION()" );
+    OstTrace0( TRACE_FLOW, TEST2_DECLARE_STANDARD_EXTENSION, "DECLARE_STANDARD_EXTENSION()" );    
+    /*****************************************************************************/
+    
+    CallSomeMoreTraceStatements();
+    
+    return 0;
+    }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/multipleMmpTestCases/mmp_traces_mixed/src/MultipleMmpApp2.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,39 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+//  Include Files  
+
+#include "MultipleMmpApp.h"
+#include <kernel/kernel.h>
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "MultipleMmpApp2Traces.h"
+#endif
+
+
+DECLARE_STANDARD_EXTENSION()
+    {
+    /****************************TRACE STATEMENTS*********************************/
+    OstTrace0( TRACE_FLOW, TEST1_MAINL, "MainL()" );
+    OstTrace0( TRACE_FLOW, TEST2_MAINL, "MainL()" );    
+    /*****************************************************************************/
+    
+    CallSomeMoreTraceStatements();
+    
+    return 0;
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/multipleMmpTestCases/mmp_traces_mmpname/group/bld.inf	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,25 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_MMPFILES
+mmp_traces_mmpname1.mmp
+mmp_traces_mmpname2.mmp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/multipleMmpTestCases/mmp_traces_mmpname/group/mmp_traces_mmpname1.mmp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,40 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+
+TARGET		  target5.exe
+TARGETTYPE	  exe
+UID			 0 0xE8576D96
+
+USERINCLUDE	 ../inc
+USERINCLUDE  ../traces
+USERINCLUDE  ../traces_mmp_traces_mmpname1
+
+APP_LAYER_SYSTEMINCLUDE
+
+SYSTEMINCLUDE   /epoc32/include
+
+SOURCEPATH	  ../src
+SOURCE		  MultipleMmpApp1.cpp 
+SOURCE 		  ExtraCppFile1.cpp
+
+LIBRARY		 euser.lib
+
+#ifdef ENABLE_ABIV2_MODE
+DEBUGGABLE_UDEBONLY
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/multipleMmpTestCases/mmp_traces_mmpname/group/mmp_traces_mmpname2.mmp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,40 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+
+TARGET		  target6.exe
+TARGETTYPE	  exe
+UID			 0 0xE8576D95
+
+USERINCLUDE	 ../inc
+USERINCLUDE  ../traces
+USERINCLUDE  ../traces_mmp_traces_mmpname2
+
+APP_LAYER_SYSTEMINCLUDE
+
+SYSTEMINCLUDE  /epoc32/include
+
+SOURCEPATH	  ../src
+SOURCE		  MultipleMmpApp2.cpp 
+SOURCE		  ExtraCppFile2.cpp
+
+LIBRARY		 euser.lib
+
+#ifdef ENABLE_ABIV2_MODE
+DEBUGGABLE_UDEBONLY
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/multipleMmpTestCases/mmp_traces_mmpname/inc/MultipleMmpApp.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,32 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef __MULTIPLEMMPAPP_H__
+#define __MULTIPLEMMPAPP_H__
+
+//  Include Files
+
+#include <e32base.h>
+
+//  Function Prototypes
+
+GLDEF_C TInt E32Main();
+void CallSomeMoreTraceStatements();
+
+#endif  // __MULTIPLEMMPAPP_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/multipleMmpTestCases/mmp_traces_mmpname/src/ExtraCppFile1.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,37 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+/*
+ * ExtraCppFile.cpp
+ *
+ *  Created on: Dec 7, 2009
+ *      Author: cajagu
+ */
+
+#include "MultipleMmpApp.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "ExtraCppFile1Traces.h"
+#endif
+
+void CallSomeMoreTraceStatements()
+    {
+    TInt32 x = 555;
+    TUint32 y = 666;
+
+    OstTrace1( TRACE_FLOW, TEST1_CALLMORE, "CallSomeMoreTraceStatements(): x=%d" , x );
+    OstTrace1( TRACE_FLOW, TEST2_CALLMORE, "CallSomeMoreTraceStatements(): y=%u" , y );
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/multipleMmpTestCases/mmp_traces_mmpname/src/ExtraCppFile2.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,37 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+/*
+ * ExtraCppFile.cpp
+ *
+ *  Created on: Dec 7, 2009
+ *      Author: cajagu
+ */
+
+#include "MultipleMmpApp.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "ExtraCppFile2Traces.h"
+#endif
+
+void CallSomeMoreTraceStatements()
+    {
+    TInt32 x = 555;
+    TUint32 y = 666;
+
+    OstTrace1( TRACE_FLOW, TEST1_CALLMORE, "CallSomeMoreTraceStatements(): x=%d" , x );
+    OstTrace1( TRACE_FLOW, TEST2_CALLMORE, "CallSomeMoreTraceStatements(): y=%u" , y );
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/multipleMmpTestCases/mmp_traces_mmpname/src/MultipleMmpApp1.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,94 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+//  Include Files  
+
+#include "MultipleMmpApp.h"
+#include <e32base.h>
+#include <e32std.h>
+#include <e32cons.h>			// Console
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "MultipleMmpApp1Traces.h"
+#endif
+
+//  Constants
+
+_LIT(KTextConsoleTitle, "Console");
+_LIT(KTextFailed, " failed, leave code = %d");
+_LIT(KTextPressAnyKey, " [press any key]\n");
+
+//  Global Variables
+
+LOCAL_D CConsoleBase* console; // write all messages to this
+
+
+//  Local Functions
+
+LOCAL_C void MainL()
+    {
+    /****************************TRACE STATEMENTS*********************************/
+    OstTrace0( TRACE_FLOW, TEST1_MAINL, "MainL()" );
+    OstTrace0( TRACE_FLOW, TEST2_MAINL, "MainL()" );    
+    /*****************************************************************************/
+    
+    CallSomeMoreTraceStatements();
+    
+    console->Write(_L("Hello, world!\n"));
+    }
+
+LOCAL_C void DoStartL()
+    {
+    // Create active scheduler (to run active objects)
+    CActiveScheduler* scheduler = new (ELeave) CActiveScheduler();
+    CleanupStack::PushL(scheduler);
+    CActiveScheduler::Install(scheduler);
+
+    MainL();
+
+    // Delete active scheduler
+    CleanupStack::PopAndDestroy(scheduler);
+    }
+
+//  Global Functions
+
+GLDEF_C TInt E32Main()
+    {
+    // Create cleanup stack
+    __UHEAP_MARK;
+    CTrapCleanup* cleanup = CTrapCleanup::New();
+
+    // Create output console
+    TRAPD(createError, console = Console::NewL(KTextConsoleTitle, TSize(
+            KConsFullScreen, KConsFullScreen)));
+    if (createError)
+        return createError;
+
+    // Run application code inside TRAP harness, wait keypress when terminated
+    TRAPD(mainError, DoStartL());
+    if (mainError)
+        console->Printf(KTextFailed, mainError);
+    console->Printf(KTextPressAnyKey);
+    console->Getch();
+
+    delete console;
+    delete cleanup;
+    __UHEAP_MARKEND;
+    return KErrNone;
+    }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/multipleMmpTestCases/mmp_traces_mmpname/src/MultipleMmpApp2.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,94 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+//  Include Files  
+
+#include "MultipleMmpApp.h"
+#include <e32base.h>
+#include <e32std.h>
+#include <e32cons.h>			// Console
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "MultipleMmpApp2Traces.h"
+#endif
+
+//  Constants
+
+_LIT(KTextConsoleTitle, "Console");
+_LIT(KTextFailed, " failed, leave code = %d");
+_LIT(KTextPressAnyKey, " [press any key]\n");
+
+//  Global Variables
+
+LOCAL_D CConsoleBase* console; // write all messages to this
+
+
+//  Local Functions
+
+LOCAL_C void MainL()
+    {
+    /****************************TRACE STATEMENTS*********************************/
+    OstTrace0( TRACE_FLOW, TEST1_MAINL, "MainL()" );
+    OstTrace0( TRACE_FLOW, TEST2_MAINL, "MainL()" );    
+    /*****************************************************************************/
+    
+    CallSomeMoreTraceStatements();
+    
+    console->Write(_L("Hello, world!\n"));
+    }
+
+LOCAL_C void DoStartL()
+    {
+    // Create active scheduler (to run active objects)
+    CActiveScheduler* scheduler = new (ELeave) CActiveScheduler();
+    CleanupStack::PushL(scheduler);
+    CActiveScheduler::Install(scheduler);
+
+    MainL();
+
+    // Delete active scheduler
+    CleanupStack::PopAndDestroy(scheduler);
+    }
+
+//  Global Functions
+
+GLDEF_C TInt E32Main()
+    {
+    // Create cleanup stack
+    __UHEAP_MARK;
+    CTrapCleanup* cleanup = CTrapCleanup::New();
+
+    // Create output console
+    TRAPD(createError, console = Console::NewL(KTextConsoleTitle, TSize(
+            KConsFullScreen, KConsFullScreen)));
+    if (createError)
+        return createError;
+
+    // Run application code inside TRAP harness, wait keypress when terminated
+    TRAPD(mainError, DoStartL());
+    if (mainError)
+        console->Printf(KTextFailed, mainError);
+    console->Printf(KTextPressAnyKey);
+    console->Getch();
+
+    delete console;
+    delete cleanup;
+    __UHEAP_MARKEND;
+    return KErrNone;
+    }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/multipleMmpTestCases/mmp_traces_slash_target_ext/group/bld.inf	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,24 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_MMPFILES
+mmp_traces_slash_target_ext1.mmp
+mmp_traces_slash_target_ext2.mmp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/multipleMmpTestCases/mmp_traces_slash_target_ext/group/mmp_traces_slash_target_ext1.mmp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,39 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+
+TARGET		  target7.dll
+TARGETTYPE	  kext
+UID			 0 0xE8576D96
+
+USERINCLUDE	 ..\inc
+USERINCLUDE  ..\traces\target7_dll
+
+OS_LAYER_SYSTEMINCLUDE
+
+SYSTEMINCLUDE   \epoc32\include
+
+SOURCEPATH	  ..\src
+SOURCE		  MultipleMmpApp1.cpp 
+SOURCE 		  ExtraCppFile1.cpp
+
+#include "kernel/kern_ext.mmh"
+
+#ifdef ENABLE_ABIV2_MODE
+DEBUGGABLE_UDEBONLY
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/multipleMmpTestCases/mmp_traces_slash_target_ext/group/mmp_traces_slash_target_ext2.mmp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,39 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+
+TARGET		  target8.dll
+TARGETTYPE	  kext
+UID			 0 0xE8576D95
+
+USERINCLUDE	 ..\inc
+USERINCLUDE  ..\traces\target8_dll
+
+OS_LAYER_SYSTEMINCLUDE
+
+SYSTEMINCLUDE   \epoc32\include
+
+SOURCEPATH	  ..\src
+SOURCE		  MultipleMmpApp2.cpp 
+SOURCE		  ExtraCppFile2.cpp
+
+#include "kernel/kern_ext.mmh"
+
+#ifdef ENABLE_ABIV2_MODE
+DEBUGGABLE_UDEBONLY
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/multipleMmpTestCases/mmp_traces_slash_target_ext/inc/MultipleMmpApp.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,32 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef __MULTIPLEMMPAPP_H__
+#define __MULTIPLEMMPAPP_H__
+
+//  Include Files
+
+#include <e32def.h>
+
+
+//  Function Prototypes
+
+void CallSomeMoreTraceStatements();
+
+#endif  // __MULTIPLEMMPAPP_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/multipleMmpTestCases/mmp_traces_slash_target_ext/src/ExtraCppFile1.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,37 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+/*
+ * ExtraCppFile.cpp
+ *
+ *  Created on: Dec 7, 2009
+ *      Author: cajagu
+ */
+
+#include "MultipleMmpApp.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "ExtraCppFile1Traces.h"
+#endif
+
+void CallSomeMoreTraceStatements()
+    {
+    TInt32 x = 555;
+    TUint32 y = 666;
+
+    OstTrace1( TRACE_FLOW, TEST1_CALLMORE, "CallSomeMoreTraceStatements(): x=%d" , x );
+    OstTrace1( TRACE_FLOW, TEST2_CALLMORE, "CallSomeMoreTraceStatements(): y=%u" , y );
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/multipleMmpTestCases/mmp_traces_slash_target_ext/src/ExtraCppFile2.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,37 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+/*
+ * ExtraCppFile.cpp
+ *
+ *  Created on: Dec 7, 2009
+ *      Author: cajagu
+ */
+
+#include "MultipleMmpApp.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "ExtraCppFile2Traces.h"
+#endif
+
+void CallSomeMoreTraceStatements()
+    {
+    TInt32 x = 555;
+    TUint32 y = 666;
+
+    OstTrace1( TRACE_FLOW, TEST1_CALLMORE, "CallSomeMoreTraceStatements(): x=%d" , x );
+    OstTrace1( TRACE_FLOW, TEST2_CALLMORE, "CallSomeMoreTraceStatements(): y=%u" , y );
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/multipleMmpTestCases/mmp_traces_slash_target_ext/src/MultipleMmpApp1.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,41 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+//  Include Files  
+
+#include "MultipleMmpApp.h"
+#include <kernel/kernel.h>
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "MultipleMmpApp1Traces.h"
+#endif
+
+
+
+DECLARE_STANDARD_EXTENSION()
+    {
+    /****************************TRACE STATEMENTS*********************************/
+    OstTrace0( TRACE_FLOW, TEST1_DECLARE_STANDARD_EXTENSION, "DECLARE_STANDARD_EXTENSION()" );
+    OstTrace0( TRACE_FLOW, TEST2_DECLARE_STANDARD_EXTENSION, "DECLARE_STANDARD_EXTENSION()" );    
+    /*****************************************************************************/
+    
+    CallSomeMoreTraceStatements();
+    
+    return 0;
+    }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/multipleMmpTestCases/mmp_traces_slash_target_ext/src/MultipleMmpApp2.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,39 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+//  Include Files  
+
+#include "MultipleMmpApp.h"
+#include <kernel/kernel.h>
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "MultipleMmpApp2Traces.h"
+#endif
+
+
+DECLARE_STANDARD_EXTENSION()
+    {
+    /****************************TRACE STATEMENTS*********************************/
+    OstTrace0( TRACE_FLOW, TEST1_MAINL, "MainL()" );
+    OstTrace0( TRACE_FLOW, TEST2_MAINL, "MainL()" );    
+    /*****************************************************************************/
+    
+    CallSomeMoreTraceStatements();
+    
+    return 0;
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/multipleMmpTestCases/mmp_traces_slash_target_ext_commonsource/group/bld.inf	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,25 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_MMPFILES
+mmp_traces_slash_target_cs_ext1.mmp
+mmp_traces_slash_target_cs_ext2.mmp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/multipleMmpTestCases/mmp_traces_slash_target_ext_commonsource/group/mmp_traces_slash_target_cs_ext1.mmp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,39 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+
+TARGET		  target9.dll
+TARGETTYPE	  kext
+UID			 0 0xE8576D96
+
+USERINCLUDE	 ..\inc
+USERINCLUDE  ..\traces\target9_dll
+
+OS_LAYER_SYSTEMINCLUDE
+
+SYSTEMINCLUDE   \epoc32\include
+
+SOURCEPATH	  ..\src
+SOURCE		  MultipleMmpApp1.cpp 
+SOURCE 		  ExtraCppFile1.cpp
+
+#include "kernel/kern_ext.mmh"
+
+#ifdef ENABLE_ABIV2_MODE
+DEBUGGABLE_UDEBONLY
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/multipleMmpTestCases/mmp_traces_slash_target_ext_commonsource/group/mmp_traces_slash_target_cs_ext2.mmp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,39 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+
+TARGET		  target10.dll
+TARGETTYPE	  kext
+UID			 0 0xE8576D95
+
+USERINCLUDE	 ..\inc
+USERINCLUDE  ..\traces\target10_dll
+
+OS_LAYER_SYSTEMINCLUDE
+
+SYSTEMINCLUDE   \epoc32\include
+
+SOURCEPATH	  ..\src
+SOURCE		  MultipleMmpApp1.cpp 
+SOURCE		  ExtraCppFile1.cpp
+
+#include "kernel/kern_ext.mmh"
+
+#ifdef ENABLE_ABIV2_MODE
+DEBUGGABLE_UDEBONLY
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/multipleMmpTestCases/mmp_traces_slash_target_ext_commonsource/inc/MultipleMmpApp.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,32 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef __MULTIPLEMMPAPP_H__
+#define __MULTIPLEMMPAPP_H__
+
+//  Include Files
+
+#include <e32def.h>
+
+
+//  Function Prototypes
+
+void CallSomeMoreTraceStatements();
+
+#endif  // __MULTIPLEMMPAPP_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/multipleMmpTestCases/mmp_traces_slash_target_ext_commonsource/src/ExtraCppFile1.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,37 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+/*
+ * ExtraCppFile.cpp
+ *
+ *  Created on: Dec 7, 2009
+ *      Author: cajagu
+ */
+
+#include "MultipleMmpApp.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "ExtraCppFile1Traces.h"
+#endif
+
+void CallSomeMoreTraceStatements()
+    {
+    TInt32 x = 555;
+    TUint32 y = 666;
+
+    OstTrace1( TRACE_FLOW, TEST1_CALLMORE, "CallSomeMoreTraceStatements(): x=%d" , x );
+    OstTrace1( TRACE_FLOW, TEST2_CALLMORE, "CallSomeMoreTraceStatements(): y=%u" , y );
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/multipleMmpTestCases/mmp_traces_slash_target_ext_commonsource/src/MultipleMmpApp1.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,41 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+//  Include Files  
+
+#include "MultipleMmpApp.h"
+#include <kernel/kernel.h>
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "MultipleMmpApp1Traces.h"
+#endif
+
+
+
+DECLARE_STANDARD_EXTENSION()
+    {
+    /****************************TRACE STATEMENTS*********************************/
+    OstTrace0( TRACE_FLOW, TEST1_DECLARE_STANDARD_EXTENSION, "DECLARE_STANDARD_EXTENSION()" );
+    OstTrace0( TRACE_FLOW, TEST2_DECLARE_STANDARD_EXTENSION, "DECLARE_STANDARD_EXTENSION()" );    
+    /*****************************************************************************/
+    
+    CallSomeMoreTraceStatements();
+    
+    return 0;
+    }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/multipleMmpTestCases/mmp_traces_target_type/group/bld.inf	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,25 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_MMPFILES
+mmp_traces_target_type1.mmp
+mmp_traces_target_type2.mmp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/multipleMmpTestCases/mmp_traces_target_type/group/mmp_traces_target_type1.mmp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,39 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+
+TARGET		  target11.exe
+TARGETTYPE	exe
+UID			 0 0xE8576D96
+
+USERINCLUDE	 ..\inc
+USERINCLUDE  ..\traces_target11_exe
+
+APP_LAYER_SYSTEMINCLUDE
+
+SYSTEMINCLUDE   \epoc32\include
+
+SOURCEPATH	  ..\src
+SOURCE		  MultipleMmpApp1.cpp 
+SOURCE 		  ExtraCppFile1.cpp
+
+LIBRARY		 euser.lib
+
+#ifdef ENABLE_ABIV2_MODE
+DEBUGGABLE_UDEBONLY
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/multipleMmpTestCases/mmp_traces_target_type/group/mmp_traces_target_type2.mmp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,39 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+
+TARGET		   target12.exe
+TARGETTYPE	  exe
+UID			 0 0xE8576D95
+
+USERINCLUDE	 ..\inc
+USERINCLUDE  ..\traces_target12_exe
+
+APP_LAYER_SYSTEMINCLUDE
+
+SYSTEMINCLUDE   \epoc32\include
+
+SOURCEPATH	  ..\src
+SOURCE		  MultipleMmpApp2.cpp 
+SOURCE		  ExtraCppFile2.cpp
+
+LIBRARY		 euser.lib
+
+#ifdef ENABLE_ABIV2_MODE
+DEBUGGABLE_UDEBONLY
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/multipleMmpTestCases/mmp_traces_target_type/inc/MultipleMmpApp.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,32 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+#ifndef __MULTIPLEMMPAPP_H__
+#define __MULTIPLEMMPAPP_H__
+
+//  Include Files
+
+#include <e32base.h>
+
+//  Function Prototypes
+
+GLDEF_C TInt E32Main();
+void CallSomeMoreTraceStatements();
+
+#endif  // __MULTIPLEMMPAPP_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/multipleMmpTestCases/mmp_traces_target_type/src/ExtraCppFile1.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,37 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+/*
+ * ExtraCppFile.cpp
+ *
+ *  Created on: Dec 7, 2009
+ *      Author: cajagu
+ */
+
+#include "MultipleMmpApp.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "ExtraCppFile1Traces.h"
+#endif
+
+void CallSomeMoreTraceStatements()
+    {
+    TInt32 x = 555;
+    TUint32 y = 666;
+
+    OstTrace1( TRACE_FLOW, TEST1_CALLMORE, "CallSomeMoreTraceStatements(): x=%d" , x );
+    OstTrace1( TRACE_FLOW, TEST2_CALLMORE, "CallSomeMoreTraceStatements(): y=%u" , y );
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/multipleMmpTestCases/mmp_traces_target_type/src/ExtraCppFile2.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,37 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+/*
+ * ExtraCppFile.cpp
+ *
+ *  Created on: Dec 7, 2009
+ *      Author: cajagu
+ */
+
+#include "MultipleMmpApp.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "ExtraCppFile2Traces.h"
+#endif
+
+void CallSomeMoreTraceStatements()
+    {
+    TInt32 x = 555;
+    TUint32 y = 666;
+
+    OstTrace1( TRACE_FLOW, TEST1_CALLMORE, "CallSomeMoreTraceStatements(): x=%d" , x );
+    OstTrace1( TRACE_FLOW, TEST2_CALLMORE, "CallSomeMoreTraceStatements(): y=%u" , y );
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/multipleMmpTestCases/mmp_traces_target_type/src/MultipleMmpApp1.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,94 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+//  Include Files  
+
+#include "MultipleMmpApp.h"
+#include <e32base.h>
+#include <e32std.h>
+#include <e32cons.h>			// Console
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "MultipleMmpApp1Traces.h"
+#endif
+
+//  Constants
+
+_LIT(KTextConsoleTitle, "Console");
+_LIT(KTextFailed, " failed, leave code = %d");
+_LIT(KTextPressAnyKey, " [press any key]\n");
+
+//  Global Variables
+
+LOCAL_D CConsoleBase* console; // write all messages to this
+
+
+//  Local Functions
+
+LOCAL_C void MainL()
+    {
+    /****************************TRACE STATEMENTS*********************************/
+    OstTrace0( TRACE_FLOW, TEST1_MAINL, "MainL()" );
+    OstTrace0( TRACE_FLOW, TEST2_MAINL, "MainL()" );    
+    /*****************************************************************************/
+    
+    CallSomeMoreTraceStatements();
+    
+    console->Write(_L("Hello, world!\n"));
+    }
+
+LOCAL_C void DoStartL()
+    {
+    // Create active scheduler (to run active objects)
+    CActiveScheduler* scheduler = new (ELeave) CActiveScheduler();
+    CleanupStack::PushL(scheduler);
+    CActiveScheduler::Install(scheduler);
+
+    MainL();
+
+    // Delete active scheduler
+    CleanupStack::PopAndDestroy(scheduler);
+    }
+
+//  Global Functions
+
+GLDEF_C TInt E32Main()
+    {
+    // Create cleanup stack
+    __UHEAP_MARK;
+    CTrapCleanup* cleanup = CTrapCleanup::New();
+
+    // Create output console
+    TRAPD(createError, console = Console::NewL(KTextConsoleTitle, TSize(
+            KConsFullScreen, KConsFullScreen)));
+    if (createError)
+        return createError;
+
+    // Run application code inside TRAP harness, wait keypress when terminated
+    TRAPD(mainError, DoStartL());
+    if (mainError)
+        console->Printf(KTextFailed, mainError);
+    console->Printf(KTextPressAnyKey);
+    console->Getch();
+
+    delete console;
+    delete cleanup;
+    __UHEAP_MARKEND;
+    return KErrNone;
+    }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/multipleMmpTestCases/mmp_traces_target_type/src/MultipleMmpApp2.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,94 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+//  Include Files  
+
+#include "MultipleMmpApp.h"
+#include <e32base.h>
+#include <e32std.h>
+#include <e32cons.h>			// Console
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "MultipleMmpApp2Traces.h"
+#endif
+
+//  Constants
+
+_LIT(KTextConsoleTitle, "Console");
+_LIT(KTextFailed, " failed, leave code = %d");
+_LIT(KTextPressAnyKey, " [press any key]\n");
+
+//  Global Variables
+
+LOCAL_D CConsoleBase* console; // write all messages to this
+
+
+//  Local Functions
+
+LOCAL_C void MainL()
+    {
+    /****************************TRACE STATEMENTS*********************************/
+    OstTrace0( TRACE_FLOW, TEST1_MAINL, "MainL()" );
+    OstTrace0( TRACE_FLOW, TEST2_MAINL, "MainL()" );    
+    /*****************************************************************************/
+    
+    CallSomeMoreTraceStatements();
+    
+    console->Write(_L("Hello, world!\n"));
+    }
+
+LOCAL_C void DoStartL()
+    {
+    // Create active scheduler (to run active objects)
+    CActiveScheduler* scheduler = new (ELeave) CActiveScheduler();
+    CleanupStack::PushL(scheduler);
+    CActiveScheduler::Install(scheduler);
+
+    MainL();
+
+    // Delete active scheduler
+    CleanupStack::PopAndDestroy(scheduler);
+    }
+
+//  Global Functions
+
+GLDEF_C TInt E32Main()
+    {
+    // Create cleanup stack
+    __UHEAP_MARK;
+    CTrapCleanup* cleanup = CTrapCleanup::New();
+
+    // Create output console
+    TRAPD(createError, console = Console::NewL(KTextConsoleTitle, TSize(
+            KConsFullScreen, KConsFullScreen)));
+    if (createError)
+        return createError;
+
+    // Run application code inside TRAP harness, wait keypress when terminated
+    TRAPD(mainError, DoStartL());
+    if (mainError)
+        console->Printf(KTextFailed, mainError);
+    console->Printf(KTextPressAnyKey);
+    console->Getch();
+
+    delete console;
+    delete cleanup;
+    __UHEAP_MARKEND;
+    return KErrNone;
+    }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/src/ErrorLogsTestBase.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,269 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+import static org.junit.Assert.fail;
+
+import java.io.BufferedReader;
+import java.io.DataInputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.PrintStream;
+
+public class ErrorLogsTestBase {
+	
+	/****************************************************UTILITY FUNCTIONS FOR TESTS************************************************************/
+	
+	/**
+	 * This function gets an environment variable value given the name.
+	 * @param variablename The name of the variable for which the value is required.
+	 * @return The variable value.
+	 */
+	public String GetEnvironmentVariablePath(String variablename) {
+		String variablevalue = System.getenv(variablename);
+		if(variablevalue == null || (variablevalue.length()==0)){
+			fail();
+		}
+		
+		// need to check that the path ends in a backslash
+		if(!variablevalue.endsWith(File.separator)){ 
+			variablevalue += File.separator; 
+		}
+		return variablevalue;
+	}
+	
+	/**
+	 * This function invokes the desired compiler for a particular test case depending
+	 * on the string passed
+	 * @param compiler String specifying the compiler to run, and also specifying where
+	 * 		  		   the logs should be stored.
+	 */
+	public void InvokeCompiler(String compiler) {
+		System.out.println ("InvokeCompiler()");
+		//get epocroot location
+		String e32=GetEnvironmentVariablePath("EPOCROOT");
+		
+		String TraceErrorAppPath = e32 + "testdata" + File.separator + "TraceErrorApp" + File.separator;
+		try{
+			File compilerpath = new File (e32 + "epoc32" + File.separator + "tools" + File.separator + "tracecompiler" + File.separator);
+			
+			if (compiler.compareTo("_sbs")==0){//raptor
+				compilerpath = new File (e32 + "testdata" + File.separator + "TraceErrorApp" + File.separator +"group" + File.separator);
+			}
+			else if (compiler.compareTo("_mult_cpp")==0){//raptor compiling project with multiple source files
+				compilerpath = new File (e32 + "testdata" + File.separator + "MultipleCppTraceErrorApp" + File.separator + "group" + File.separator);
+			}
+			else if (compiler.compareTo("_mult_mmp")==0){//raptor compiling project with multiple source files
+				compilerpath = new File (e32 + "testdata" + File.separator + "MultipleMmpTraceErrorApps" + File.separator + "group" + File.separator);
+			}
+			else if (compiler.compareTo("_tc")!=0){
+				System.out.println("Error: Unrecognised test case. Use either _tc, _sbs, _mult_cpp or _mult_mmp");
+				fail();
+			}
+			
+			//set up the process builder object
+	 		ProcessBuilder pb; 
+	 		//commands to be used to invoke the compiler
+	 		if (compiler.compareTo("_tc")==0){//tracecompiler
+	 			// These EMMA flags are added, because of EMMA reporting in Hudson
+				// EMMA lfags are commented out, because it does not work in Hudson at the moment
+//	 			String emmaOutputFileFlag = "-Demma.coverage.out.file=" + e32 + "testdata" + File.separator + "reports" + File.separator + "emma" + File.separator + "coverage.emma";
+//	 			String emmaOutputMergeFlag = "-Demma.coverage.out.merge=true";
+	 			String emmaOutputFileFlag = "";
+	 			String emmaOutputMergeFlag = "";
+	 			pb = new ProcessBuilder("java", emmaOutputFileFlag, emmaOutputMergeFlag, "-classpath",".", "com.nokia.tracecompiler.TraceCompiler", "E8576D92", "TraceErrorApp",TraceErrorAppPath+"group"+File.separator+"TraceErrorApp.mmp",TraceErrorAppPath+"src"+File.separator+"TraceErrorApp.cpp");
+	 		}
+	 		else /*if (compiler.compareTo("_sbs")==0)*/{//for all other raptor cases
+	 			pb = new ProcessBuilder("sbs.bat","-c","armv5.tracecompiler");
+	 		}
+	 		
+			pb.directory(compilerpath);
+			pb.redirectErrorStream(true);
+			
+			//start the compiler
+			Process p = pb.start();
+			InputStream inp = p.getInputStream();
+	        int c = -1;
+	        
+	        
+	        String str = "";
+	        
+	        /*
+	        //read the output from the compiler into the input stream
+	        while ((c = inp.read()) != -1) {
+	            str= str +((char)c);
+	        }
+	        */
+	        
+	        StringBuilder sb = new StringBuilder();
+	        //read the output from the compiler into the input stream
+	        while ((c = inp.read()) != -1) {
+	        	sb.append(((char)c));
+	        }
+	        str = sb.toString();
+	        
+	        
+	    	//Declare output file to write logs to
+	    	FileOutputStream outstream; 
+			PrintStream ps; 
+			System.out.println ("creating output logs in buildlog"+compiler+".txt");
+			outstream = new FileOutputStream(e32+"epoc32"+File.separator+"build"+File.separator+"buildlog"+compiler+".txt");
+			ps = new PrintStream( outstream );
+			ps.println (str);
+			
+			//check return code if tracecompiler.. we don't check error code for raptor:
+			int ret = p.exitValue();
+			if ((ret==0)&&(compiler.compareTo("_tc")==0)){
+				System.out.println("FAIL: TraceCompiler does not exit with error");
+				fail();
+			}
+			inp.close();
+			outstream.close();
+		}
+		
+    	catch (IOException e){//Catch IOException
+    		System.err.println("Error: " + e.getMessage());
+    		fail();
+        }
+		
+	}
+	
+	/**
+	 * This function parses the log files (as specified by the passed string) for errors and warnings
+	 *  and stores them in a separate file (also specified by the same passed string)
+	 * 
+	 * @param pathext  String specifying the part of the name of the build log file to parse which is 
+	 * 				   also part of the name of the file where parsed logs are written to.	  		   
+	 */
+	public void ParseLogFile(String pathext) {
+		System.out.println ("ParseLogFile()");
+		//get epocroot location
+		String e32=GetEnvironmentVariablePath("EPOCROOT");
+		
+		
+	    try{
+	    	// Open the file
+	    	System.out.println ("opening buildlog"+pathext+".txt");
+	    	FileInputStream fstream = new FileInputStream(e32+"epoc32"+File.separator+"build"+File.separator+"buildlog"+pathext+".txt");
+
+	    	// Get the object of DataInputStream
+	    	//System.out.println ("creating input stream");
+	    	DataInputStream in = new DataInputStream(fstream);
+	        BufferedReader br = new BufferedReader(new InputStreamReader(in));
+	    	String strLine;
+	    	
+	    	//Declare output file to write parsed logs to
+	    	FileOutputStream out; 
+			PrintStream p; 
+			//System.out.println ("creating output stream");
+			out = new FileOutputStream(e32+"epoc32"+File.separator+"build"+File.separator+"parsedlogs"+pathext+".txt");
+			p = new PrintStream( out );
+	    	
+	    	//Read File Line By Line and write to parsedlogs.txt
+	    	System.out.println ("Writing to parsedlogs"+pathext+".txt");
+	    	while ((strLine = br.readLine()) != null&&(strLine.length()) >= 9)   {
+	    		//remove any leading white spaces because there are spaces when printed to standard output.
+	    		strLine=strLine.trim();
+		    	if((strLine.startsWith("error:")==true)||(strLine.startsWith("warning:")==true)){
+			    	// Write to a separate file
+			    	p.println (strLine);
+	    	}
+      	
+    	}
+    	
+    	//Close the input and output streams
+    	in.close();
+    	out.close();
+    	}
+    	
+    	catch (IOException e){//Catch IOException
+    		System.err.println("Error: " + e.getMessage());
+    		fail();
+    	}
+	
+	}
+	
+	/**
+	 * This function validates the parsed log file by comparing it to a reference file containg
+	 * the knows warnings and errors 
+	 * @param project String specifying the name of the project folder that was compiled.
+	 * @param pathext String specifying the part of the name of the parsed log file to validate.	   
+	 */
+	public void ValidateLogs(String project, String pathext) {
+		System.out.println ("ValidateLogs()");
+		//get epocroot location
+		String e32=GetEnvironmentVariablePath("EPOCROOT");
+		
+	try{
+		// Open the files
+		System.out.println ("opening referencelog.txt and parsedlogs"+pathext+".txt");
+		FileInputStream fstream1 = new FileInputStream(e32+"testdata"+File.separator+project+File.separator+"data"+File.separator+"referencelog.txt");
+		FileInputStream fstream2 = new FileInputStream(e32+"epoc32"+File.separator+"build"+File.separator+"parsedlogs"+pathext+".txt");
+	
+		// Get the objects of DataInputStream
+		//System.out.println ("creating input streams");
+		DataInputStream in1 = new DataInputStream(fstream1);
+		DataInputStream in2 = new DataInputStream(fstream2);
+		//System.out.println ("creating buffered readers");
+	    BufferedReader br1 = new BufferedReader(new InputStreamReader(in1));
+	    BufferedReader br2 = new BufferedReader(new InputStreamReader(in2));
+		String strLine1;
+		String strLine2;
+		int i=1;
+		
+		//compare the two files
+		while (((strLine1 = br1.readLine()) != null)&&(((strLine2 = br2.readLine()) != null)))   {
+			if (pathext.compareTo("_mult_mmp")!=0){//if this is not the multiple mmp test, then compare the whole error string
+				if(strLine1.compareTo(strLine2)==0){
+					System.out.println ("Validated line "+i+": "+strLine1);
+				}
+				else{
+					System.out.println ("Line "+i+" ("+strLine2+") is not correct.");
+					fail();
+				}
+			}
+			else{//else if this is the multiple mmp test, compare only the last 40 characters of the string because
+				//raptor does not have a specified order in which it compiles mmps using trace compiler so we can't validate exactly
+				if(strLine1.substring(strLine1.length()-40, strLine1.length()).compareTo(strLine2.substring(strLine1.length()-40, strLine2.length()))==0){
+					System.out.println ("Validated line "+i+": "+strLine1);
+				}
+				else{
+					System.out.println ("Line "+i+" ("+strLine2+") is not correct.");
+					fail();
+				}			
+			}
+		i++;
+		}
+		
+		if (i==1) {//never entered loop therefore there were no errors or warnings in the build logs
+			System.out.println("FAIL: Compiler did not output any correct errors to logs");
+			fail();
+		}
+		in1.close();
+		in2.close();
+	}
+	
+	catch (IOException e){//Catch IOException
+		System.err.println("Error: " + e.getMessage());
+		fail();
+    }
+	}
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/src/ErrorLogsTestSystem.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,80 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+import org.junit.Test;
+
+public class ErrorLogsTestSystem extends ErrorLogsTestBase{
+	
+	public static void main(String args[]) {		
+	      	org.junit.runner.JUnitCore.main(ErrorLogsTestSystem.class.getName());
+	    }
+	
+	/**
+	 * This test calls Trace Compiler via Raptor and invokes it against a simple c++ project with one mmp file containing one cpp 
+	 * The logs from Raptor (written to std::out) are checked to ensure the errors and warnings from traceCompiler are correct.
+	 */
+	@Test
+	public void SystemTestTraceCompilerAndRaptor (){
+		System.out.println ("****************SystemTestTraceCompilerAndRaptor()**********************");
+		//Call Raptor
+		InvokeCompiler("_sbs");
+		
+		//Parse the Raptor log files (from standard output)
+		ParseLogFile("_sbs");
+		
+		//Validate the Raptor log files
+		ValidateLogs("TraceErrorApp","_sbs");		
+	}
+	
+	/**
+	 * This test calls Trace Compiler via Raptor and invokes it against a c++ project with one mmp file containing two cpp files.
+	 * The logs from Raptor (written to std::out) are checked to ensure the errors and warnings from traceCompiler are correct.
+	 * It is expected that all errors from all ccp files are written to the logs.
+	 */
+	@Test
+	public void SystemTestTraceCompilerAndRaptorMultipleCpps (){
+		System.out.println ("**********SystemTestTraceCompilerAndRaptorMultipleCpps()****************");
+		//Call Raptor
+		InvokeCompiler("_mult_cpp");
+		
+		//Parse the Raptor log files (from standard output)
+		ParseLogFile("_mult_cpp");
+		
+		//Validate the Raptor log files
+		ValidateLogs("MultipleCppTraceErrorApp","_mult_cpp");		
+	}
+	
+	/**
+	 * This test calls Trace Compiler via Raptor and invokes it against a c++ project with two mmp files each containing two cpp files.
+	 * The logs from Raptor (written to std::out) are checked to ensure the erros and warnings from traceCompiler are correct.
+	 * It is expected that all errors from all cpp files in the first mmp which is compiled are written to the logs. Any mmp after that
+	 * point is not compiled.
+	 */
+	@Test
+	public void SystemTestTraceCompilerAndRaptorMultipleMmps (){
+		System.out.println ("**********SystemTestTraceCompilerAndRaptorMultipleMmps()****************");
+		//Call Raptor
+		InvokeCompiler("_mult_mmp");
+		
+		//Parse the Raptor log files (from standard output)
+		ParseLogFile("_mult_mmp");
+		
+		//Validate the Raptor log files
+		ValidateLogs("MultipleMmpTraceErrorApps","_mult_mmp");	
+	}
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/src/ErrorLogsTestUnit.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,43 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+import org.junit.Test;
+
+public class ErrorLogsTestUnit extends ErrorLogsTestBase {
+	
+	public static void main(String args[]) {		
+	      	org.junit.runner.JUnitCore.main(ErrorLogsTestUnit.class.getName());
+	    }
+	
+	/**
+	 * This test calls Trace Compiler directly and invokes it against a simple c++ project with one cpp and one mmp file
+	 * The exit code from tracecompiler is checked to ensure an error is indicated and the logs are also checked
+	 */
+	@Test
+	public void UnitTestTraceCompiler (){
+		System.out.println ("*********************UnitTestTraceCompiler()****************************");
+		//Call Trace Compiler
+		InvokeCompiler("_tc");
+		
+		//Parse the Trace Compiler log files
+		ParseLogFile("_tc");
+		
+		//Validate the Trace Compiler log files
+		ValidateLogs("TraceErrorApp","_tc");		
+	}
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/src/FixedIdDefinitionsTest.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,597 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "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:
+ *
+ * Description:
+ *
+ * JUnit tests for fixed_id.definitions file
+ *
+ */
+
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
+import java.io.DataInputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileReader;
+import java.io.FileWriter;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.Writer;
+
+import junit.framework.TestCase;
+
+import org.junit.Test;
+
+import com.nokia.tracecompiler.file.FileUtils;
+import com.nokia.tracecompiler.source.SourceDocumentFactory;
+
+public class FixedIdDefinitionsTest extends TestCase {
+
+	/**
+	 * EMMA output prefix
+	 */
+	private static final String EMMA_OUTPUT_PREFIX = "EMMA: "; //$NON-NLS-1$
+	
+	/**
+	 * Fixed id definitions test app took note prefix
+	 */
+	private static final String FIXED_ID_DEFINITIONS_TEST_APP_TOOK_NOTE_PREFIX = "FixedIdDefinitionsTestApp took"; //$NON-NLS-1$
+
+	/**
+	 * UID3 of FixedIdDefinitionsTestApp
+	 */
+	private static final String FIXED_ID_DEFINITIONS_TEST_APP_UID3 = "E8576D92"; //$NON-NLS-1$
+
+	/**
+	 * txt extension
+	 */
+	private static final String TXT_EXTENSION = ".txt"; //$NON-NLS-1$
+
+	/**
+	 * Reference fid file name prefix
+	 */
+	private static final String REFERENCE_FID_FILE_NAME_PREFIX = "reference_fid_file_"; //$NON-NLS-1$
+
+	/**
+	 * Reference fid file name prefix
+	 */
+	private static final String REFERENCE_TC_OUTPUT_NAME_PREFIX = "reference_tc_output_"; //$NON-NLS-1$	
+
+	/**
+	 * data directory name
+	 */
+	private static final String DATA_DIRECTORY = "data"; //$NON-NLS-1$
+
+	/**
+	 * traces directory name
+	 */
+	private static final String TRACES_DIRECTORY = "traces"; //$NON-NLS-1$
+
+	/**
+	 * fixed_id.definitions file name
+	 */
+	private static final String FIXED_ID_DEFINITIONS_FILE_NAME = "fixed_id.definitions"; //$NON-NLS-1$
+
+	/**
+	 * Line comment tag
+	 */
+	private static final String LINE_COMMENT_TAG = "//"; //$NON-NLS-1$
+
+	/**
+	 * TRACE_USED_IN_TEST_CASE tag
+	 */
+	private static final String TRACE_USED_IN_TEST_CASE_TAG = "TRACE_USED_IN_TEST_CASE"; //$NON-NLS-1$
+
+	/**
+	 * Error text prefix
+	 */
+	private static final String ERROR_TEXT_PREFIX = "Error: "; //$NON-NLS-1$
+
+	/**
+	 * src directory name
+	 */
+	private static final String SRC_DIRECTORY = "src"; //$NON-NLS-1$
+
+	/**
+	 * .cpp extension
+	 */
+	private static final String CPP_EXTENSION = ".cpp"; //$NON-NLS-1$
+
+	/**
+	 * FixedIdDefinitionsTestApp
+	 */
+	private static final String FIXED_ID_DEFINITIONS_TEST_APP = "FixedIdDefinitionsTestApp"; //$NON-NLS-1$
+
+	/**
+	 * Variable for epocroot
+	 */
+	String e32;
+
+	/**
+	 * Path to FixedIdDefinitionsTestApp application
+	 */
+	String fixedIdDefinitionsTestAppPath;
+
+	/**
+	 * Process builder
+	 */
+	ProcessBuilder pb = null;
+
+	/**
+	 * Compiler path
+	 */
+	File compilerPath = null;
+
+	/**
+	 * Line separator
+	 */
+	String lineSeparator;
+
+	/**
+	 * Source file name with full path
+	 */
+	String sourceFileNameWithFullPath;
+
+	/**
+	 * fixed_id.definitions file name with full path
+	 */
+	String fixedIdDefinitionsFileNameWithFullPath;
+
+	/**
+	 * SourceDocumentFactory
+	 */
+	SourceDocumentFactory factory = null;
+
+	public static void main(String[] args) {
+		org.junit.runner.JUnitCore.main(FixedIdDefinitionsTest.class.getName());
+	}
+
+	/**
+	 * setup
+	 */
+	@Test
+	public void setUp() {
+		System.out.println("Setup class variables"); //$NON-NLS-1$
+
+		e32 = System.getenv("EPOCROOT"); //$NON-NLS-1$
+
+		if (!e32.endsWith(File.separator)) {
+			e32 += File.separator;
+		}
+
+		fixedIdDefinitionsTestAppPath = e32 + "testdata" + File.separator //$NON-NLS-1$
+				+ FIXED_ID_DEFINITIONS_TEST_APP + File.separator;
+				
+		// These EMMA flags are added, because of EMMA reporting in Hudson
+		String emmaOutputFileFlag = "-Demma.coverage.out.file=" + e32 + "testdata" + File.separator + "reports" + File.separator + "emma" + File.separator + "coverage.emma";
+		String emmaOutputMergeFlag = "-Demma.coverage.out.merge=true";
+
+		pb = new ProcessBuilder("java", emmaOutputFileFlag, emmaOutputMergeFlag, "-classpath", ".", //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
+				"com.nokia.tracecompiler.TraceCompiler", FIXED_ID_DEFINITIONS_TEST_APP_UID3, //$NON-NLS-1$
+				FIXED_ID_DEFINITIONS_TEST_APP, fixedIdDefinitionsTestAppPath
+						+ "group" + File.separator //$NON-NLS-1$
+						+ FIXED_ID_DEFINITIONS_TEST_APP + ".mmp", //$NON-NLS-1$
+				fixedIdDefinitionsTestAppPath + SRC_DIRECTORY + File.separator
+						+ FIXED_ID_DEFINITIONS_TEST_APP + CPP_EXTENSION);
+
+		compilerPath = new File(e32 + "epoc32" + File.separator + "tools" //$NON-NLS-1$//$NON-NLS-2$
+				+ File.separator + "tracecompiler" + File.separator); //$NON-NLS-1$
+
+		lineSeparator = System.getProperty("line.separator"); //$NON-NLS-1$
+
+		sourceFileNameWithFullPath = fixedIdDefinitionsTestAppPath
+				+ SRC_DIRECTORY + File.separator
+				+ FIXED_ID_DEFINITIONS_TEST_APP + CPP_EXTENSION;
+
+		fixedIdDefinitionsFileNameWithFullPath = fixedIdDefinitionsTestAppPath
+				+ TRACES_DIRECTORY + File.separator
+				+ FIXED_ID_DEFINITIONS_FILE_NAME;
+	}
+
+	/**
+	 * Check if fixed id file is created correctly when it doesn't already exist
+	 */
+	@Test
+	public void testFixedIdDefinitionsFunctionalityTestCase_1() {
+		int testCaseNumber = 1;
+		System.out
+				.println("*** Check if fixed id file is created correctly when it doesn't already exist ***"); //$NON-NLS-1$
+		executeTestCase(testCaseNumber, 0);
+	}
+
+	/**
+	 * Check new trace points are assigned values correctly (i.e. existing ones
+	 * don't change)
+	 */
+	@Test
+	public void testFixedIdDefinitionsFunctionalityTestCase_2() {
+		int testCaseNumber = 2;
+		System.out
+				.println("*** Check new trace points are assigned values correctly (i.e. existing ones don't change) ***"); //$NON-NLS-1$
+		executeTestCase(testCaseNumber, 0);
+	}
+
+	/**
+	 * Check removed trace points / user-defined groups are obsoleted correctly
+	 */
+	@Test
+	public void testFixedIdDefinitionsFunctionalityTestCase_3() {
+		int testCaseNumber = 3;
+		System.out
+				.println("*** Check removed trace points / user-defined groups are obsoleted correctly ***"); //$NON-NLS-1$
+		executeTestCase(testCaseNumber, 0);
+	}
+
+	/**
+	 * Check that adding a trace point with an obsoleted name is given a new
+	 * value.
+	 */
+	@Test
+	public void testFixedIdDefinitionsFunctionalityTestCase_4() {
+		int testCaseNumber = 4;
+		System.out
+				.println("*** Check that adding a trace point with an obsoleted name is given a new value. ***"); //$NON-NLS-1$
+		executeTestCase(testCaseNumber, 0);
+	}
+
+	/**
+	 * Check that obsoleting all trace points in a component that refer to a
+	 * common group id (e.g. TRACE_FLOW) does NOT mark group as obsolete
+	 */
+	@Test
+	public void testFixedIdDefinitionsFunctionalityTestCase_5() {
+		int testCaseNumber = 5;
+		System.out
+				.println("*** Check that obsoleting all trace points in a component that refer to a common group id (e.g. TRACE_FLOW) does NOT mark group as obsolete ***"); //$NON-NLS-1$
+		executeTestCase(testCaseNumber, 0);
+	}
+
+	/**
+	 * Check that repeatedly obsoleting a trace point does not mess
+	 * TraceCompiler.
+	 */
+	@Test
+	public void testFixedIdDefinitionsFunctionalityTestCase_6() {
+		int testCaseNumber = 6;
+		int subTestNumber = 1;
+		System.out
+				.println("*** Check that repeatedly obsoleting a trace point does not mess TraceCompiler. ***"); //$NON-NLS-1$
+		int numberOfSubTests = 4;
+		while (subTestNumber < numberOfSubTests) {
+			executeTestCase(testCaseNumber, subTestNumber);
+			subTestNumber++;
+		}
+	}
+
+	/**
+	 * Check that repeatedly changing group of the trace point does not mess
+	 * TraceCompiler.
+	 */
+	@Test
+	public void testFixedIdDefinitionsFunctionalityTestCase_7() {
+		int testCaseNumber = 7;
+		int subTestNumber = 1;
+		System.out
+				.println("*** Check that repeatedly changing group of the trace point does not mess TraceCompiler. ***"); //$NON-NLS-1$
+		int numberOfSubTests = 3;
+		while (subTestNumber < numberOfSubTests) {
+			executeTestCase(testCaseNumber, subTestNumber);
+			subTestNumber++;
+		}
+	}
+
+	/**
+	 * Check that a OSTv1 common group id values results in new fixed id file.
+	 */
+	@Test
+	public void testFixedIdDefinitionsFunctionalityTestCase_8() {
+		int testCaseNumber = 8;
+		System.out
+				.println("*** Check that a OSTv1 common group id values results in new fixed id file. ***"); //$NON-NLS-1$
+		executeTestCaseWithTraceCompilerOutputCheck(testCaseNumber, 0);
+	}
+
+	/**
+	 * Check that a OSTv1 user group id values results in new fixed id file.
+	 */
+	@Test
+	public void testFixedIdDefinitionsFunctionalityTestCase_9() {
+		int testCaseNumber = 9;
+		System.out
+				.println("*** Check that a OSTv1 user group id values results in new fixed id file. ***"); //$NON-NLS-1$
+		executeTestCaseWithTraceCompilerOutputCheck(testCaseNumber, 0);
+	}
+
+	/**
+	 * Sub function to execute test case with TraceCompiler output check
+	 * 
+	 * @param testCaseNumber
+	 *            Test case number
+	 */
+	private void executeTestCaseWithTraceCompilerOutputCheck(
+			int testCaseNumber, int subTestNumber) {
+		System.out
+				.println("Start to execute test case with TraceCompiler output check."); //$NON-NLS-1$
+		modifyFixedIdDefinitionsTestApp(testCaseNumber, subTestNumber);
+		InputStream traceCompilerOutput = runTraceCompiler();
+		verifyTraceCompilerOutput(testCaseNumber, subTestNumber,
+				traceCompilerOutput);
+		verifyTestResults(testCaseNumber, subTestNumber);
+	}
+
+	/**
+	 * Sub function to execute test case
+	 * 
+	 * @param testCaseNumber
+	 *            Test case number
+	 */
+	private void executeTestCase(int testCaseNumber, int subTestNumber) {
+		System.out.println("Start to execute test case."); //$NON-NLS-1$
+		modifyFixedIdDefinitionsTestApp(testCaseNumber, subTestNumber);
+		if (testCaseNumber > 1) {
+			initializeFixedIDDefinitionsFile(testCaseNumber, subTestNumber);
+		}
+		runTraceCompiler();
+		verifyTestResults(testCaseNumber, subTestNumber);
+	}
+
+	/**
+	 * Initialize fixed_id.defitions file
+	 * 
+	 * @param testCaseNumber
+	 *            Test case number
+	 */
+	private void initializeFixedIDDefinitionsFile(int testCaseNumber,
+			int subTestNumber) {
+		System.out.println("Initialize fixed_id.defitions file"); //$NON-NLS-1$
+		String refesenceFileName;
+		if (subTestNumber == 0) {
+			refesenceFileName = REFERENCE_FID_FILE_NAME_PREFIX
+					+ (testCaseNumber - 1);
+		} else {
+			refesenceFileName = REFERENCE_FID_FILE_NAME_PREFIX + testCaseNumber
+					+ "_" + (subTestNumber - 1); //$NON-NLS-1$
+		}
+		refesenceFileName = refesenceFileName + TXT_EXTENSION;
+		String sourceFile = fixedIdDefinitionsTestAppPath + DATA_DIRECTORY
+				+ File.separator + refesenceFileName;
+		File source = new File(sourceFile);
+		File target = new File(fixedIdDefinitionsFileNameWithFullPath);
+		FileUtils.copyFile(source, target);
+	}
+
+	/**
+	 * Modify FixedIdDefinitionsTestApp application source code
+	 * 
+	 * @param testCaseNumber
+	 *            test case number
+	 */
+	private void modifyFixedIdDefinitionsTestApp(int testCaseNumber,
+			int subTestNumber) {
+		System.out
+				.println("Modify FixedIdDefinitionsTestApp application source code"); //$NON-NLS-1$
+		try {
+			StringBuilder modifiedContents = new StringBuilder();
+			File sourceFile = new File(sourceFileNameWithFullPath);
+			BufferedReader input = new BufferedReader(
+					new FileReader(sourceFile));
+			String line;
+			String currentTestCaseTag = TRACE_USED_IN_TEST_CASE_TAG
+					+ "_" + testCaseNumber; //$NON-NLS-1$
+			if (subTestNumber != 0) {
+				currentTestCaseTag = currentTestCaseTag + "_" + subTestNumber; //$NON-NLS-1$
+			}
+			while ((line = input.readLine()) != null) {
+				if (line.indexOf(TRACE_USED_IN_TEST_CASE_TAG) != -1) {
+					if (line.indexOf(currentTestCaseTag) != -1) {
+						if (line.startsWith(LINE_COMMENT_TAG)) {
+							line = line.substring(LINE_COMMENT_TAG.length());
+						}
+					} else {
+						if (!line.startsWith(LINE_COMMENT_TAG)) {
+							line = LINE_COMMENT_TAG + line;
+						}
+					}
+				}
+				modifiedContents.append(line);
+				modifiedContents.append(lineSeparator);
+			}
+			input.close();
+			Writer sourceFileWriter = new BufferedWriter(new FileWriter(
+					sourceFileNameWithFullPath));
+			sourceFileWriter.write(modifiedContents.toString());
+			sourceFileWriter.close();
+
+			if (testCaseNumber == 8 || testCaseNumber == 9) {
+				String fileContent = "#Fixed group and trace id definitions. If this file is removed, the identifiers are rebuilt." + lineSeparator; //$NON-NLS-1$
+
+				if (testCaseNumber == 8) {
+					fileContent += "[GROUP]TRACE_FLOW=0x7" + lineSeparator //$NON-NLS-1$
+							+ "[TRACE]TRACE_FLOW[0x7]_TRACE1=0x1"; //$NON-NLS-1$
+				} else if (testCaseNumber == 9) {
+					fileContent += "[GROUP]MY_GROUP=0x70" + lineSeparator //$NON-NLS-1$
+							+ "[TRACE]MY_GROUP [0x70]_TRACE1=0x1"; //$NON-NLS-1$
+				}
+				Writer fixedIDDefinitionsFileWriter = new BufferedWriter(
+						new FileWriter(fixedIdDefinitionsFileNameWithFullPath));
+				fixedIDDefinitionsFileWriter.write(fileContent);
+				fixedIDDefinitionsFileWriter.close();
+			}
+
+		} catch (Exception e) {
+			System.err.println(ERROR_TEXT_PREFIX + e.getMessage());
+			fail();
+		}
+	}
+
+	/**
+	 * Run TraceCompiler
+	 */
+	private InputStream runTraceCompiler() {
+		System.out.println("Run TraceCompiler"); //$NON-NLS-1$
+		InputStream inp = null;
+		pb.directory(compilerPath);
+		pb.redirectErrorStream(true);
+		// start the compiler
+		try {
+			Process p = pb.start();
+			p.waitFor();
+			inp = p.getInputStream();
+		} catch (Exception e) {// Catch exception if any
+			System.err.println(ERROR_TEXT_PREFIX + e.getMessage());
+			fail();
+		}
+
+		return inp;
+	}
+
+	/**
+	 * Verify TraceCompiler output
+	 * 
+	 * @param traceCompilerOutput
+	 *            TraceCompiler output
+	 */
+	private void verifyTraceCompilerOutput(int testCaseNumber,
+			int subTestNumber, InputStream traceCompilerOutput) {
+		System.out.println("Verify TraceCompiler output"); //$NON-NLS-1$
+
+		String refesenceFileName = REFERENCE_TC_OUTPUT_NAME_PREFIX
+				+ testCaseNumber;
+		if (subTestNumber != 0) {
+			refesenceFileName = refesenceFileName + "_" + subTestNumber; //$NON-NLS-1$
+		}
+		refesenceFileName = refesenceFileName + TXT_EXTENSION;
+
+		try {
+			FileInputStream fstreamExpected = new FileInputStream(
+					fixedIdDefinitionsTestAppPath + DATA_DIRECTORY
+							+ File.separator + refesenceFileName);
+			compareExpectedAndActual(fstreamExpected, traceCompilerOutput);
+		} catch (FileNotFoundException e) {
+			System.err.println(ERROR_TEXT_PREFIX + e.getMessage());
+			fail();
+		}
+	}
+
+	/**
+	 * Verify test result
+	 * 
+	 * @param testCaseNumber
+	 *            test case number
+	 */
+	private void verifyTestResults(int testCaseNumber, int subTestNumber) {
+		System.out.println("Verify test result"); //$NON-NLS-1$
+		String refesenceFileName = REFERENCE_FID_FILE_NAME_PREFIX
+				+ testCaseNumber;
+
+		if (subTestNumber != 0) {
+			refesenceFileName = refesenceFileName + "_" + subTestNumber; //$NON-NLS-1$
+		}
+
+		refesenceFileName = refesenceFileName + TXT_EXTENSION;
+		try {
+			FileInputStream fstreamExpected = new FileInputStream(
+					fixedIdDefinitionsTestAppPath + DATA_DIRECTORY
+							+ File.separator + refesenceFileName);
+			FileInputStream fstreamActual = new FileInputStream(
+					fixedIdDefinitionsFileNameWithFullPath);
+			compareExpectedAndActual(fstreamExpected, fstreamActual);
+		} catch (FileNotFoundException e) {
+			System.err.println(ERROR_TEXT_PREFIX + e.getMessage());
+			fail();
+		}
+	}
+
+	/**
+	 * Compare expected and actual input streams
+	 * 
+	 * @param streamExpected
+	 *            Expected input stream
+	 * @param streamActual
+	 *            Actual input stream
+	 */
+	private void compareExpectedAndActual(InputStream streamExpected,
+			InputStream streamActual) {
+		System.out.println("Compare expected and actual input streams"); //$NON-NLS-1$
+		try {
+			// Get the objects of DataInputStream
+			DataInputStream inExpected = new DataInputStream(streamExpected);
+			DataInputStream inActual = new DataInputStream(streamActual);
+			BufferedReader brExpected = new BufferedReader(
+					new InputStreamReader(inExpected));
+			BufferedReader brActual = new BufferedReader(new InputStreamReader(
+					inActual));
+
+			String strLineExpected;
+			String strLineActual;
+			int i = 1;
+			// compare the expected and actual input streams
+			while (((strLineExpected = brExpected.readLine()) != null)
+					&& (((strLineActual = brActual.readLine()) != null))) {
+
+				// Skip EMMA outputs if those exists
+				if (strLineActual.trim().startsWith(EMMA_OUTPUT_PREFIX)) {
+						strLineActual = brActual.readLine();
+						if (strLineActual == null) {
+							break;
+						}
+				}
+
+				// Following check skips different TraceCompiler execution time
+				// values
+				if (strLineExpected
+						.indexOf(FIXED_ID_DEFINITIONS_TEST_APP_TOOK_NOTE_PREFIX) != -1
+						&& strLineActual
+								.indexOf(FIXED_ID_DEFINITIONS_TEST_APP_TOOK_NOTE_PREFIX) != -1) {
+					strLineActual = strLineActual.trim().substring(
+							0,
+							FIXED_ID_DEFINITIONS_TEST_APP_TOOK_NOTE_PREFIX
+									.length());
+
+				}
+				assertTrue(ERROR_TEXT_PREFIX + "Line \"" + strLineActual //$NON-NLS-1$
+						+ "\" does not match to \"" + strLineExpected + "\"", //$NON-NLS-1$ //$NON-NLS-2$
+						strLineExpected.compareTo(strLineActual) == 0);
+				i++;
+			}
+			
+			// Check that actual file does not contain any extra lines, it could be that there are some EMMA outputs and those are ok
+			while ((strLineActual = brActual.readLine()) != null) {
+				assertTrue(
+						ERROR_TEXT_PREFIX
+								+ "Actual file does contain extra lines", strLineActual.trim().startsWith(EMMA_OUTPUT_PREFIX)); //$NON-NLS-1$				
+			}
+			
+			// never entered loop therefore there actual file was empty or
+			// missing
+			assertTrue(ERROR_TEXT_PREFIX + "Actual file was empty or missing", //$NON-NLS-1$
+					i > 0);
+
+			inExpected.close();
+			inActual.close();
+		} catch (Exception e) {
+			System.err.println(ERROR_TEXT_PREFIX + e.getMessage());
+			fail();
+		}
+	}
+
+	/**
+	 * tearDown
+	 */
+	@Test
+	public void tearDown() {
+		System.out.println("Comment out all trace points in FixedIdDefinitionsTestApp"); //$NON-NLS-1$
+		modifyFixedIdDefinitionsTestApp(0, 0);
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/src/GroupNamesTest.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,226 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+import static org.junit.Assert.*;
+import java.io.*;
+
+import org.junit.Test;
+
+import com.nokia.tracecompiler.TraceCompilerRootException;
+import com.nokia.tracecompiler.project.*;
+
+public class GroupNamesTest { 
+
+	
+	public static void main(String args[]) {		
+	      	org.junit.runner.JUnitCore.main(GroupNamesTest.class.getName());
+	    }
+			
+	@Test
+	public void testGetGroupNameVector() {
+		
+	
+		try {
+			GroupNames.initialiseGroupName();
+		} catch (TraceCompilerRootException e) {
+			fail();
+		}
+					
+		// test group id values obtain by name
+		assertEquals("TRACE_FATAL gid check", GroupNames.getIdByName("TRACE_FATAL"), 129);
+		assertEquals("TRACE_ERROR gid check", GroupNames.getIdByName("TRACE_ERROR"), 130);
+		assertEquals("TRACE_WARNING gid check", GroupNames.getIdByName("TRACE_WARNING"), 131);
+		assertEquals("TRACE_BORDER gid check", GroupNames.getIdByName("TRACE_BORDER"), 132);	    
+		assertEquals("TRACE_API gid check", GroupNames.getIdByName("TRACE_API"), 132);
+		assertEquals("TRACE_IMPORTANT gid check", GroupNames.getIdByName("TRACE_IMPORTANT"), 133);
+		assertEquals("TRACE_NORMAL gid check", GroupNames.getIdByName("TRACE_NORMAL"), 134);
+		assertEquals("TRACE_STATE gid check", GroupNames.getIdByName("TRACE_STATE"), 135);
+		assertEquals("TRACE_INTERNALS gid check", GroupNames.getIdByName("TRACE_INTERNALS"), 136);
+		assertEquals("TRACE_DETAILED", GroupNames.getIdByName("TRACE_DETAILED"), 136);
+		assertEquals("TRACE_DUMP gid check", GroupNames.getIdByName("TRACE_DUMP"), 137);
+		assertEquals("TRACE_DEBUG gid check", GroupNames.getIdByName("TRACE_DEBUG"), 137);
+		assertEquals("TRACE_FLOW gid check", GroupNames.getIdByName("TRACE_FLOW"), 138);
+		assertEquals("TRACE_PERFORMANCE gid check", GroupNames.getIdByName("TRACE_PERFORMANCE"), 139);
+		assertEquals("TRACE_ADHOC gid check", GroupNames.getIdByName("TRACE_ADHOC"), 140);
+		assertEquals("TRACE_EXTENSION gid check", GroupNames.getIdByName("TRACE_EXTENSION"), 141);
+
+		// test GID strings obtained by id
+//		assertEquals("TRACE_FATAL string check", GroupNames.getNameById(129), "TRACE_FATAL");
+//		assertEquals("TRACE_ERROR string check", GroupNames.getNameById(130), "TRACE_ERROR");
+//		assertEquals("TRACE_WARNING string check", GroupNames.getNameById(131), "TRACE_WARNING");
+//		assertEquals("TRACE_BORDER string check", GroupNames.getNameById(132), "TRACE_BORDER");	    
+//		assertEquals("TRACE_IMPORTANT string check", GroupNames.getNameById(133), "TRACE_IMPORTANT");
+//		assertEquals("TRACE_NORMAL string check", GroupNames.getNameById(134), "TRACE_NORMAL");
+//		assertEquals("TRACE_STATE string check", GroupNames.getNameById(135), "TRACE_STATE");
+//		assertEquals("TRACE_INTERNALS string check", GroupNames.getNameById(136), "TRACE_INTERNALS");
+//		assertEquals("TRACE_DUMP string check", GroupNames.getNameById(137), "TRACE_DUMP");
+//		assertEquals("TRACE_FLOW string check", GroupNames.getNameById(138), "TRACE_FLOW");
+//		assertEquals("TRACE_PERFORMANCE string check", GroupNames.getNameById(139), "TRACE_PERFORMANCE");
+//		assertEquals("TRACE_ADHOC string check", GroupNames.getNameById(140), "TRACE_ADHOC");
+//		assertEquals("TRACE_EXTENSION string check", GroupNames.getNameById(141), "TRACE_EXTENSION");	
+//		assertEquals("TRACE_TESTING1 string check", GroupNames.getNameById(254), "TRACE_TESTING1");
+//		assertEquals("TRACE_TESTING2 string check", GroupNames.getNameById(255), "TRACE_TESTING2");	
+	}
+	
+	
+	@Test
+	public void testUserDefinedRange(){
+		// test that the user defined range starts at the expected value
+		assertEquals("user defined range check", GroupNames.USER_GROUP_ID_FIRST, 222);		
+		assertEquals("user defined range check", GroupNames.USER_GROUP_ID_LAST, 253);
+			
+	}
+	
+	@Test
+	public void testModifiedOstHeaderFile(){
+		// copy a modfified file to epoc32\platform\include, rename ost_types.h, run tests, and then replace original ost_types
+	    
+		String e32 = System.getenv("EPOCROOT");
+		if(e32 == null || (e32.length()==0)){
+			fail();
+		}
+		
+		// need to check that e32 ends in a backslash
+		if(!e32.endsWith(File.separator)){ 
+			e32 += File.separator; 
+		}
+		
+		e32 = e32 + "epoc32"+File.separator+"include"+File.separator+"platform"+File.separator;
+		
+		System.out.println(e32);
+		
+		System.setProperty("user.dir", e32);
+		
+		String curDir = System.getProperty("user.dir");
+		System.out.println(curDir);
+		
+		// File (or directory) with old name
+	    File file = new File(e32 + "opensystemtrace_types.h");
+	    
+	    // File (or directory) with new name
+	    File file2 = new File(e32 + "CBR_opensystemtrace_types.h");
+	    
+	    // File (or directory) with new name
+	    File file3 = new File(e32 + "test_opensystemtrace_types.h");
+	    
+	    // Rename file (or directory)
+	    boolean success = file.renameTo(file2);
+	    if (!success) {
+	        // File was not successfully renamed
+	    	fail();
+	    }
+	    
+	    // Rename file (or directory)
+	    success = file3.renameTo(file);
+	    if (!success) {
+	        // File was not successfully renamed
+	    	fail();
+	    }
+	    
+		try {
+			GroupNames.initialiseGroupName();
+		} catch (TraceCompilerRootException e) {
+			fail();
+		}
+		
+		// test group id values obtain by name
+		assertEquals("TRACE_FATAL gid check", GroupNames.getIdByName("TRACE_FATAL"), 149);
+		assertEquals("TRACE_ERROR gid check", GroupNames.getIdByName("TRACE_ERROR"), 150);
+		assertEquals("TRACE_WARNING gid check", GroupNames.getIdByName("TRACE_WARNING"), 151);
+		assertEquals("TRACE_BORDER gid check", GroupNames.getIdByName("TRACE_BORDER"), 152);	    
+		assertEquals("TRACE_API gid check", GroupNames.getIdByName("TRACE_API"), 152);
+		assertEquals("TRACE_IMPORTANT gid check", GroupNames.getIdByName("TRACE_IMPORTANT"), 153);
+		assertEquals("TRACE_NORMAL gid check", GroupNames.getIdByName("TRACE_NORMAL"), 154);
+		assertEquals("TRACE_STATE gid check", GroupNames.getIdByName("TRACE_STATE"), 155);
+		assertEquals("TRACE_INTERNALS gid check", GroupNames.getIdByName("TRACE_INTERNALS"), 156);
+		assertEquals("TRACE_DETAILED", GroupNames.getIdByName("TRACE_DETAILED"), 156);
+		assertEquals("TRACE_DUMP gid check", GroupNames.getIdByName("TRACE_DUMP"), 157);
+		assertEquals("TRACE_DEBUG gid check", GroupNames.getIdByName("TRACE_DEBUG"), 157);
+		assertEquals("TRACE_FLOW gid check", GroupNames.getIdByName("TRACE_FLOW"), 158);
+		assertEquals("TRACE_PERFORMANCE gid check", GroupNames.getIdByName("TRACE_PERFORMANCE"), 159);
+		assertEquals("TRACE_ADHOC gid check", GroupNames.getIdByName("TRACE_ADHOC"), 160);
+		assertEquals("TRACE_EXTENSION gid check", GroupNames.getIdByName("TRACE_EXTENSION"), 161);
+
+		// test GID strings obtained by id
+//		assertEquals("TRACE_FATAL string check", GroupNames.getNameById(149), "TRACE_FATAL");
+//		assertEquals("TRACE_ERROR string check", GroupNames.getNameById(150), "TRACE_ERROR");
+//		assertEquals("TRACE_WARNING string check", GroupNames.getNameById(151), "TRACE_WARNING");
+//		assertEquals("TRACE_BORDER string check", GroupNames.getNameById(152), "TRACE_BORDER");	    
+//		assertEquals("TRACE_IMPORTANT string check", GroupNames.getNameById(153), "TRACE_IMPORTANT");
+//		assertEquals("TRACE_NORMAL string check", GroupNames.getNameById(154), "TRACE_NORMAL");
+//		assertEquals("TRACE_STATE string check", GroupNames.getNameById(155), "TRACE_STATE");
+//		assertEquals("TRACE_INTERNALS string check", GroupNames.getNameById(156), "TRACE_INTERNALS");
+//		assertEquals("TRACE_DUMP string check", GroupNames.getNameById(157), "TRACE_DUMP");
+//		assertEquals("TRACE_FLOW string check", GroupNames.getNameById(158), "TRACE_FLOW");
+//		assertEquals("TRACE_PERFORMANCE string check", GroupNames.getNameById(159), "TRACE_PERFORMANCE");
+//		assertEquals("TRACE_ADHOC string check", GroupNames.getNameById(160), "TRACE_ADHOC");
+//		assertEquals("TRACE_EXTENSION string check", GroupNames.getNameById(161), "TRACE_EXTENSION");
+	} 
+   
+	@Test
+    public void tearDown() {
+        // release objects under test here, if necessary
+		
+		String e32 = System.getenv("EPOCROOT");
+		if(e32 == null || (e32.length()==0)){
+			fail();
+		}
+		
+		// need to check that e32 ends in a backslash
+		if(!e32.endsWith(File.separator)){ 
+			e32 += File.separator; 
+		}
+		
+		e32 = e32 + "epoc32"+File.separator+"include"+File.separator+"platform"+File.separator;
+		
+		System.out.println(e32);
+		
+		System.setProperty("user.dir", e32);
+		
+		String curDir = System.getProperty("user.dir");
+		System.out.println(curDir);
+		
+		// File (or directory) with old name
+	    File file = new File(e32 + "opensystemtrace_types.h");
+	    
+	    // File (or directory) with new name
+	    File file2 = new File(e32 + "CBR_opensystemtrace_types.h");
+	    
+	    	    
+	    boolean i = file.exists();
+	    System.out.println(i);
+	    
+	    // Rename file (or directory)
+	    boolean success = (file.delete());
+	    if (!success) {
+	        fail();
+	    }
+	    
+	    success = file2.renameTo(file);
+	    if (!success) {
+	        // File was not successfully renamed
+	    	fail();
+	    }
+	    
+
+		
+		// File (or directory) with old name
+	    
+	    
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/src/MacroWrappersTest.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,239 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+* JUnit tests for OST MacroWrappers
+*
+*/
+
+
+import static org.junit.Assert.assertTrue;
+
+import java.util.ArrayList;
+import org.junit.Assert;
+import org.junit.Test;
+import com.nokia.tracecompiler.source.*;
+import com.nokia.tracecompiler.document.*;
+
+public class MacroWrappersTest {
+
+	public static void main(String[] args) {
+		org.junit.runner.JUnitCore.main(MacroWrappersTest.class.getName());
+	}
+	
+	@Test
+	public void testMacroWrappers(){
+		
+		// this string should parse down to the following members in list	
+		final String REFERENCE_STR = 
+			"TRACE_DEBUG_ONLY ( mystuff,…, OstTraceExt3( TRACE_DEBUG,DUP7__CONSTRUCTL,\"::ConstructL;x=%d;y=%d;z=%d\",x,y,z ) );";
+		FileDocumentMonitor monitor = new FileDocumentMonitor();		
+		SourceDocumentFactory factory = monitor.getFactory();
+
+		// construct the reference parameter array
+		ArrayList<String> expectedTokens = new ArrayList<String>();
+		expectedTokens.add("TRACE_DEBUG");
+		expectedTokens.add("DUP7__CONSTRUCTL");
+		expectedTokens.add("\"::ConstructL;x=%d;y=%d;z=%d\"");
+		expectedTokens.add("x");
+		expectedTokens.add("y");
+		expectedTokens.add("z");
+
+		// construct the trace string from reference parameters
+		final String TRACE_STR = "OstTraceExt3( "+ expectedTokens.get(0) + 
+								 "," + expectedTokens.get(1) + 
+								 "," + expectedTokens.get(2) +
+								 "," + expectedTokens.get(3) + 
+								 "," + expectedTokens.get(4) +
+								 "," + expectedTokens.get(5) + " )";
+				
+		// first test the parser on an unwrapped string
+		SourceParser sourceParser = new SourceParser(factory, factory.createDocument(TRACE_STR));
+		ArrayList<String> actualTokens = new ArrayList<String>();
+		// parse string
+		try{
+			sourceParser.tokenizeParameters(0, actualTokens, true);			
+		}catch(SourceParserException e){
+			Assert.fail(e.getMessage());
+		}
+						
+		checkContents(actualTokens, expectedTokens); 
+						
+		// Create the wrapped OstTrace...  	
+		final String WRAPPED_STR = "TRACE_DEBUG_ONLY ( mystuff,…, " + TRACE_STR + " );";
+		
+		// do a quick check to see that the reference string matches the string generated from list
+		// we could use java.util.StringTokenizer to generate the expected list, 
+		// but this is test code for tracecompiler after all
+		assertTrue(REFERENCE_STR.compareTo(WRAPPED_STR) == 0 );
+
+		sourceParser = new SourceParser(factory, factory.createDocument(WRAPPED_STR));
+		
+
+		actualTokens.clear();
+		// this string should parse down to the following members in list
+		// [0]	"mystuff"	
+		// [1]	"…"	
+		// [2]	"OstTraceExt3( TRACE_DEBUG, DUP7__CONSTRUCTL, "::ConstructL;x=%d;y=%d;z=%d",x,y,z )"	
+		try{
+			sourceParser.tokenizeParameters(0, actualTokens, true);			
+		}catch(SourceParserException e){
+			Assert.fail(e.getMessage());
+		}
+
+		assertTrue(actualTokens.size() == 3);
+		assertTrue(((String)actualTokens.get(0)).compareTo("mystuff") == 0);
+		assertTrue(((String)actualTokens.get(1)).compareTo("…") == 0);
+		
+		// now check the extracted OstTrace part
+		String ostStr = (String)actualTokens.get(2);
+		assertTrue(ostStr.compareTo(TRACE_STR) == 0);
+		
+		sourceParser = new SourceParser(factory, factory.createDocument(ostStr));
+		actualTokens.clear();
+
+		try{
+			sourceParser.tokenizeParameters(0, actualTokens, true);			
+		}catch(SourceParserException e){
+			Assert.fail(e.getMessage());
+		}
+						
+		checkContents(actualTokens, expectedTokens); 
+	}
+	
+	
+	@Test
+	public void testMultipleMacroWrappers(){
+		
+		// testing parsing of macro in this format
+		//TRACE_DEBUG_ONLY (OstTrace0( TRACE_DETAILED, DUP5__CONSTRUCTL, "::ConstructL" )
+		// , OstTraceExt3( TRACE_BORDER, DUP99__CONSTRUCTL, "::ConstructL;x=%x;y=%x;z=%x",x,y, (x+y) ));
+		
+		final String REFERENCE_STR = 
+			"TRACE_DEBUG_ONLY (OstTrace0( TRACE_DETAILED,DUP5__CONSTRUCTL ),OstTraceExt3( TRACE_BORDER,DUP99__CONSTRUCTL,\"::ConstructL;x=%x;y=%x;z=%x\",x,y,(x+y) ));";
+
+		FileDocumentMonitor monitor = new FileDocumentMonitor();		
+		SourceDocumentFactory factory = monitor.getFactory();
+
+		
+		// construct the reference parameter array
+		ArrayList<String> expectedTokens1 = new ArrayList<String>();
+		expectedTokens1.add("TRACE_DETAILED");
+		expectedTokens1.add("DUP5__CONSTRUCTL");
+		
+		
+		ArrayList<String> expectedTokens2 = new ArrayList<String>();
+		expectedTokens2.add("TRACE_BORDER");
+		expectedTokens2.add("DUP99__CONSTRUCTL");
+		expectedTokens2.add("\"::ConstructL;x=%x;y=%x;z=%x\"");
+		expectedTokens2.add("x");
+		expectedTokens2.add("y");
+		expectedTokens2.add("(x+y)");
+
+		// construct the trace strings from reference parameters
+		final String TRACE_STR1 = "OstTrace0( "+ expectedTokens1.get(0) + 
+								 "," + expectedTokens1.get(1) + " )";
+
+		final String TRACE_STR2 = "OstTraceExt3( "+ expectedTokens2.get(0) + 
+								  "," + expectedTokens2.get(1) + 
+								  "," + expectedTokens2.get(2) +
+								  "," + expectedTokens2.get(3) + 
+								  "," + expectedTokens2.get(4) +
+								  "," + expectedTokens2.get(5) + " )";
+
+		// check it works with TRACE_STR1
+		SourceParser sourceParser = new SourceParser(factory, factory.createDocument(TRACE_STR1));
+		ArrayList<String> actualTokens = new ArrayList<String>();
+		// parse string
+		try{
+			sourceParser.tokenizeParameters(0, actualTokens, true);			
+		}catch(SourceParserException e){
+			Assert.fail(e.getMessage());
+		}
+						
+		checkContents(actualTokens, expectedTokens1); 
+
+		// check it works with TRACE_STR2
+		sourceParser = new SourceParser(factory, factory.createDocument(TRACE_STR2));
+		actualTokens.clear();
+		
+		// parse string
+		try{
+			sourceParser.tokenizeParameters(0, actualTokens, true);			
+		}catch(SourceParserException e){
+			Assert.fail(e.getMessage());
+		}
+						
+		checkContents(actualTokens, expectedTokens2); 
+
+		// create the composite string
+		String TRACE_STR3 = "TRACE_DEBUG_ONLY (" + TRACE_STR1 + "," + TRACE_STR2 + ");";
+
+		// do a quick check to see that the reference string matches the string generated from list
+		// we could use java.util.StringTokenizer to generate the expected list, 
+		// but this is test code for tracecompiler after all
+		assertTrue(REFERENCE_STR.compareTo(TRACE_STR3) == 0);
+		
+		sourceParser = new SourceParser(factory, factory.createDocument(TRACE_STR3));
+		actualTokens.clear();
+
+		// this string should parse down to the following members in list
+		// [0]	"OstTraceExt0( TRACE_DETAILED,DUP5__CONSTRUCTL )" (id=77)	
+		// [1]	"OstTraceExt3( TRACE_BORDER,DUP99__CONSTRUCTL,"::ConstructL;x=%d;y=%d;z=%d",x,y,z )" (id=78)	
+		try{
+			sourceParser.tokenizeParameters(0, actualTokens, true);			
+		}catch(SourceParserException e){
+			Assert.fail(e.getMessage());
+		}
+		
+		assertTrue(actualTokens.size() == 2);
+		final String OST_STR1 = actualTokens.get(0);
+		assertTrue(OST_STR1.compareTo(TRACE_STR1) == 0);
+		final String OST_STR2 = actualTokens.get(1);
+		assertTrue(OST_STR2.compareTo(TRACE_STR2) == 0);
+		
+		
+		// check parsing of first OST macro
+		sourceParser = new SourceParser(factory, factory.createDocument(OST_STR1));
+		actualTokens.clear();
+		try{
+			sourceParser.tokenizeParameters(0, actualTokens, true);			
+		}catch(SourceParserException e){
+			Assert.fail(e.getMessage());
+		}
+
+		checkContents(actualTokens, expectedTokens1);
+		
+
+		// check parsing of second OST macro
+		sourceParser = new SourceParser(factory, factory.createDocument(OST_STR2));
+		actualTokens.clear();
+		try{
+			sourceParser.tokenizeParameters(0, actualTokens, true);			
+		}catch(SourceParserException e){
+			Assert.fail(e.getMessage());
+		}
+
+		checkContents(actualTokens, expectedTokens2);
+		
+	}
+
+	
+	private static void checkContents(final ArrayList<String> ACTUAL, final ArrayList<String> EXPECTED ){
+		assertTrue(ACTUAL.size() == EXPECTED.size());
+		for(int i=0;i < ACTUAL.size();i++){
+			assertTrue( ACTUAL.get(i).compareTo(EXPECTED.get(i)) == 0);			
+		}		
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/src/MultipleMmpTest.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,754 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+import static org.junit.Assert.fail;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import com.nokia.tracecompiler.engine.TraceCompilerEngineGlobals;
+import com.nokia.tracecompiler.model.TraceCompilerException;
+
+
+public class MultipleMmpTest {
+	
+	public static void main(String args[]) {		
+	      	org.junit.runner.JUnitCore.main(MultipleMmpTest.class.getName());
+	    }
+	
+	/****************************************************UTILITY FUNCTIONS FOR TESTS************************************************************/
+	
+	private static String epocroot = null; 
+	private static String projectdir = "testdata\\MultipleMmpTestCases\\"; //$NON-NLS-1$
+	private static String dictpath= "epoc32\\ost_dictionaries\\"; //$NON-NLS-1$
+	private static String autogenpath= "epoc32\\include\\platform\\symbiantraces\\autogen\\"; //$NON-NLS-1$
+	private static Pattern versionPattern = Pattern.compile("^.*(\\d+\\.\\d+\\.\\d+).*$"); //$NON-NLS-1$
+	private static Pattern oldversionPat = Pattern.compile("^(1\\..*)|(2\\.1.*)"); //$NON-NLS-1$
+	//old TC version should be up to 2.12.5 as new functionality was submitted to 2.12.6 (we hope)
+	private static Pattern sbsoldversionPat = Pattern.compile("^(1\\..*)|(2\\.[01]\\..*)|(2\\.1[0-2]\\.[0-3].*)"); //$NON-NLS-1$
+	private static String TCversion = ""; //$NON-NLS-1$
+	private static String SBSversion = ""; //$NON-NLS-1$
+	private static File compilerpath;
+	private static boolean oldTC = false;
+	private static boolean oldBuilder = false; 
+	private static HashMap<String, List<File>> headers = new HashMap<String, List<File>>();
+	private static HashMap<String, List<File>> dicts = new HashMap<String, List<File>>();
+	private static HashMap<String, List<File>> sources = new HashMap<String, List<File>>();
+	private static ProcessBuilder sbs_build = new ProcessBuilder("sbs.bat","-k","-c","winscw_udeb.tracecompiler");
+	private static ProcessBuilder sbs_reallyclean = new ProcessBuilder("sbs.bat","-k","-c","winscw_udeb.tracecompiler", "reallyclean");
+	
+
+	@BeforeClass
+	static public void setEnvVariables() {
+		epocroot = System.getenv("EPOCROOT"); //$NON-NLS-1$
+		if(epocroot == null || (epocroot.length()==0)){
+			fail();
+		}
+		
+		// need to check that the path ends in a backslash
+		if(!epocroot.endsWith("\\")){ 
+			epocroot += "\\"; 
+		}
+
+		compilerpath = new File (epocroot + "epoc32" + File.separator + "tools" + File.separator +"tracecompiler" + File.separator); //default value to remove warnings. //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+
+		ProcessBuilder tc = new ProcessBuilder("java", "-classpath", compilerpath.getPath(), //$NON-NLS-1$//$NON-NLS-2$
+				"com.nokia.tracecompiler.TraceCompiler", "-v"); //$NON-NLS-1$//$NON-NLS-2$
+		System.out.println("compilerPath= " + compilerpath); //$NON-NLS-1$
+		tc.directory(compilerpath);
+		tc.redirectErrorStream(true);
+		try {
+		Process p = tc.start();
+		p.waitFor();	
+
+		
+		String str = readProcessOutput(p);
+		System.out.println("TC version = " + str); //$NON-NLS-1$
+		Matcher m = versionPattern.matcher(str.trim());
+		if (m.matches()) {
+			TCversion = m.group(1);
+			System.out.println("TC Version = " + TCversion); //$NON-NLS-1$
+		}
+		
+		m = oldversionPat.matcher(TCversion);
+		if (m.matches()){
+			oldTC=true;
+		}
+
+		System.out.println("TC version = " + TCversion); //$NON-NLS-1$ 
+		System.out.println("OLD TC version = " + oldTC); //$NON-NLS-1$
+
+		ProcessBuilder sbs = new ProcessBuilder("sbs.bat","-v"); //$NON-NLS-1$ //$NON-NLS-2$
+		sbs.directory(compilerpath);
+		sbs.redirectErrorStream(true);
+			
+		//start the compiler
+		p = sbs.start();
+		p.waitFor();
+			
+		InputStream inp = p.getInputStream();
+			
+	        str = ""; //$NON-NLS-1$
+	        int c;
+	        //read the output from the compiler into the input stream
+	        while ((c = inp.read()) != -1) {
+	           	 str= str +((char)c);
+	        }
+
+		System.out.println("SBS version = " + str); //$NON-NLS-1$
+		m = versionPattern.matcher(str.trim());
+		if (m.matches()) {
+			SBSversion = m.group(1);
+		}
+		
+		m = sbsoldversionPat.matcher(SBSversion);
+		if (m.matches()){
+			oldBuilder=true;
+		}
+		
+		} catch (Exception e) {// Catch exception if any
+			System.err.println(e.getMessage());
+		}
+	}
+	
+	
+	public void createListHeadersDicts(String builder)
+	{
+		//The whole logic of what is expected is built here whether we build with sbs 
+		//new TC or old, The structure is re-built for each case.
+		
+		
+		Matcher m = sbsoldversionPat.matcher(SBSversion);
+		if (m.matches()){
+			oldBuilder=true;
+		} else {
+			oldBuilder=false;
+		}
+		
+		
+		System.out.println("OLD Builder :" + builder + ": = " + oldBuilder); //$NON-NLS-1$
+		
+		File tracesHeader1;
+		File tracesHeader2;
+		File tracesHeader3;
+		File tracesHeader4;
+		File source1;
+		File source2;
+		File source3;
+		File source4;
+		File ostTraceDefinitions;
+		File fixedidDefinitions;
+		File ostDict1;
+		File ostDict2;
+		File autogenDict1;
+		File autogenDict2;
+		String loc = "traces\\"; //$NON-NLS-1$
+		
+		source1 = new File (epocroot+projectdir+"mmp_traces\\src\\MultipleMmpApp1.cpp"); //$NON-NLS-1$
+		source2 = new File (epocroot+projectdir+"mmp_traces\\src\\ExtraCppFile1.cpp"); //$NON-NLS-1$
+		source3 = new File (epocroot+projectdir+"mmp_traces\\src\\MultipleMmpApp2.cpp"); //$NON-NLS-1$
+		source4 = new File (epocroot+projectdir+"mmp_traces\\src\\ExtraCppFile2.cpp"); //$NON-NLS-1$
+		sources.put("_traces", Arrays.asList(source1, source2, source3, source4));
+		
+		tracesHeader1 = new File (epocroot+projectdir+"mmp_traces\\traces\\MultipleMmpApp1Traces.h"); //$NON-NLS-1$
+		tracesHeader2 = new File (epocroot+projectdir+"mmp_traces\\traces\\ExtraCppFile1Traces.h"); //$NON-NLS-1$
+		tracesHeader3 = new File (epocroot+projectdir+"mmp_traces\\traces\\MultipleMmpApp2Traces.h"); //$NON-NLS-1$
+		tracesHeader4 = new File (epocroot+projectdir+"mmp_traces\\traces\\ExtraCppFile2Traces.h"); //$NON-NLS-1$
+		
+		ostTraceDefinitions = new File(epocroot+projectdir+"mmp_traces\\traces\\OstTraceDefinitions.h"); //$NON-NLS-1$
+		fixedidDefinitions = new File(epocroot+projectdir+"mmp_traces\\traces\\fixed_id.definitions"); //$NON-NLS-1$)
+		headers.put("_traces", Arrays.asList(tracesHeader1,tracesHeader2,tracesHeader3,tracesHeader4,ostTraceDefinitions,fixedidDefinitions)); //$NON-NLS-1$
+		
+		ostDict1     = new File(epocroot+dictpath+"mmp_traces1_0xe8576d96_Dictionary.xml"); //$NON-NLS-1$
+		ostDict2     = new File(epocroot+dictpath+"mmp_traces2_0xe8576d95_Dictionary.xml"); //$NON-NLS-1$	
+		autogenDict1 = new File(epocroot+autogenpath+"mmp_traces1_0xe8576d96_TraceDefinitions.h"); //$NON-NLS-1$	
+		autogenDict2 = new File(epocroot+autogenpath+"mmp_traces2_0xe8576d95_TraceDefinitions.h"); //$NON-NLS-1$	
+		dicts.put("_traces", Arrays.asList(ostDict1, ostDict2, autogenDict1, autogenDict2)); //$NON-NLS-1$
+		
+		//=============================
+		
+		if (!oldBuilder && !oldTC) {
+			loc = "traces_mmp_traces_mmpname1\\"; //$NON-NLS-1$
+		}
+		tracesHeader1 = new File (epocroot+projectdir+"mmp_traces_mmpname\\"+ loc + "MultipleMmpApp1Traces.h"); //$NON-NLS-1$ //$NON-NLS-2$
+		tracesHeader2 = new File (epocroot+projectdir+"mmp_traces_mmpname\\" + loc + "ExtraCppFile1Traces.h"); //$NON-NLS-1$ //$NON-NLS-2$
+		if (!oldBuilder && !oldTC) {
+			loc = "traces_mmp_traces_mmpname2\\"; //$NON-NLS-1$
+		}
+		tracesHeader3 = new File (epocroot+projectdir+"mmp_traces_mmpname\\" + loc + "MultipleMmpApp2Traces.h"); //$NON-NLS-1$ //$NON-NLS-2$
+		tracesHeader4 = new File (epocroot+projectdir+"mmp_traces_mmpname\\" + loc + "ExtraCppFile2Traces.h"); //$NON-NLS-1$ //$NON-NLS-2$
+		ostTraceDefinitions = new File(epocroot+projectdir+"mmp_traces_mmpname\\" + loc + "OstTraceDefinitions.h"); //$NON-NLS-1$
+		fixedidDefinitions = new File(epocroot+projectdir+"mmp_traces_mmpname\\" + loc + "fixed_id.definitions"); //$NON-NLS-1$)
+
+		headers.put("_traces_mmpname", Arrays.asList(tracesHeader1,tracesHeader2,tracesHeader3,tracesHeader4,ostTraceDefinitions,fixedidDefinitions)); //$NON-NLS-1$
+		
+		source1 = new File (epocroot+projectdir+"mmp_traces_mmpname\\src\\MultipleMmpApp1.cpp"); //$NON-NLS-1$
+		source2 = new File (epocroot+projectdir+"mmp_traces_mmpname\\src\\ExtraCppFile1.cpp"); //$NON-NLS-1$
+		source3 = new File (epocroot+projectdir+"mmp_traces_mmpname\\src\\MultipleMmpApp2.cpp"); //$NON-NLS-1$
+		source4 = new File (epocroot+projectdir+"mmp_traces_mmpname\\src\\ExtraCppFile2.cpp"); //$NON-NLS-1$
+		sources.put("_traces_mmpname", Arrays.asList(source1, source2, source3, source4));
+		
+		ostDict1     = new File(epocroot+dictpath+"mmp_traces_mmpname1_0xe8576d96_Dictionary.xml"); //$NON-NLS-1$
+		ostDict2     = new File(epocroot+dictpath+"mmp_traces_mmpname2_0xe8576d95_Dictionary.xml"); //$NON-NLS-1$	
+		autogenDict1 = new File(epocroot+autogenpath+"mmp_traces_mmpname1_0xe8576d96_TraceDefinitions.h"); //$NON-NLS-1$	
+		autogenDict2 = new File(epocroot+autogenpath+"mmp_traces_mmpname2_0xe8576d95_TraceDefinitions.h"); //$NON-NLS-1$	
+		dicts.put("_traces_mmpname", Arrays.asList(ostDict1, ostDict2, autogenDict1, autogenDict2)); //$NON-NLS-1$
+
+	    //=============================
+	    
+	    loc = "traces\\"; //$NON-NLS-1$
+		if (!oldTC) {
+			loc = "traces\\target7_dll\\"; //$NON-NLS-1$
+		}
+		tracesHeader1 = new File (epocroot+projectdir+"mmp_traces_slash_target_ext\\" + loc + "MultipleMmpApp1Traces.h"); //$NON-NLS-1$ //$NON-NLS-2$
+		tracesHeader2 = new File (epocroot+projectdir+"mmp_traces_slash_target_ext\\" + loc + "ExtraCppFile1Traces.h"); //$NON-NLS-1$ //$NON-NLS-2$
+		if (!oldTC) {
+			loc = "traces\\target8_dll\\"; //$NON-NLS-1$
+		}
+		tracesHeader3 = new File (epocroot+projectdir+"mmp_traces_slash_target_ext\\" + loc + "MultipleMmpApp2Traces.h"); //$NON-NLS-1$ //$NON-NLS-2$
+		tracesHeader4 = new File (epocroot+projectdir+"mmp_traces_slash_target_ext\\" + loc + "ExtraCppFile2Traces.h"); //$NON-NLS-1$ //$NON-NLS-2$
+		ostTraceDefinitions = new File(epocroot+projectdir+"mmp_traces_slash_target_ext\\" + loc + "OstTraceDefinitions.h"); //$NON-NLS-1$
+		fixedidDefinitions = new File(epocroot+projectdir+"mmp_traces_slash_target_ext\\" + loc + "fixed_id.definitions"); //$NON-NLS-1$)
+
+		headers.put("_traces_slash_target_ext", Arrays.asList(tracesHeader1,tracesHeader2,tracesHeader3,tracesHeader4,ostTraceDefinitions,fixedidDefinitions)); //$NON-NLS-1$
+		
+		source1 = new File (epocroot+projectdir+"mmp_traces_slash_target_ext\\src\\MultipleMmpApp1.cpp"); //$NON-NLS-1$
+		source2 = new File (epocroot+projectdir+"mmp_traces_slash_target_ext\\src\\ExtraCppFile1.cpp"); //$NON-NLS-1$
+		source3 = new File (epocroot+projectdir+"mmp_traces_slash_target_ext\\src\\MultipleMmpApp2.cpp"); //$NON-NLS-1$
+		source4 = new File (epocroot+projectdir+"mmp_traces_slash_target_ext\\src\\ExtraCppFile2.cpp"); //$NON-NLS-1$
+		sources.put("_traces_slash_target_ext", Arrays.asList(source1, source2, source3, source4));
+
+		
+		String name1 = "";
+		String name2 = "";
+		if (oldTC) {
+			name1 = "mmp_traces_slash_target_ext1";
+			name2 = "mmp_traces_slash_target_ext2";
+		} else {
+			name1 = "target7_dll";
+			name2 = "target8_dll";
+		}
+		
+		ostDict1     = new File(epocroot+dictpath + name1 + "_0xe8576d96_Dictionary.xml"); //$NON-NLS-1$
+		ostDict2     = new File(epocroot+dictpath + name2 + "_0xe8576d95_Dictionary.xml"); //$NON-NLS-1$	
+		autogenDict1 = new File(epocroot+autogenpath + name1 + "_0xe8576d96_TraceDefinitions.h"); //$NON-NLS-1$	
+		autogenDict2 = new File(epocroot+autogenpath + name2 + "_0xe8576d95_TraceDefinitions.h"); //$NON-NLS-1$	
+		dicts.put("_traces_slash_target_ext", Arrays.asList(ostDict1, ostDict2, autogenDict1, autogenDict2)); //$NON-NLS-1$
+		
+	    //================================
+	    loc = "traces\\"; //$NON-NLS-1$
+		if (!oldTC) {
+			loc = "traces\\target9_dll\\"; //$NON-NLS-1$
+		}
+		tracesHeader1 = new File (epocroot+projectdir+"mmp_traces_slash_target_ext_commonsource\\" + loc + "MultipleMmpApp1Traces.h"); //$NON-NLS-1$ //$NON-NLS-2$
+		tracesHeader2 = new File (epocroot+projectdir+"mmp_traces_slash_target_ext_commonsource\\" + loc + "ExtraCppFile1Traces.h"); //$NON-NLS-1$ //$NON-NLS-2$
+		if (!oldTC) {
+			loc = "traces\\target10_dll\\"; //$NON-NLS-1$
+		}
+		tracesHeader3 = new File (epocroot+projectdir+"mmp_traces_slash_target_ext_commonsource\\" + loc + "MultipleMmpApp1Traces.h"); //$NON-NLS-1$ //$NON-NLS-2$
+		tracesHeader4 = new File (epocroot+projectdir+"mmp_traces_slash_target_ext_commonsource\\" + loc + "ExtraCppFile1Traces.h"); //$NON-NLS-1$ //$NON-NLS-2$
+		ostTraceDefinitions = new File(epocroot+projectdir+"mmp_traces_slash_target_ext_commonsource\\" + loc + "OstTraceDefinitions.h"); //$NON-NLS-1$
+		fixedidDefinitions = new File(epocroot+projectdir+"mmp_traces_slash_target_ext_commonsource\\" + loc + "fixed_id.definitions"); //$NON-NLS-1$)
+
+		headers.put("_traces_slash_target_ext_commonsource", Arrays.asList(tracesHeader1,tracesHeader2,tracesHeader3,tracesHeader4,ostTraceDefinitions,fixedidDefinitions)); //$NON-NLS-1$
+		
+		source1 = new File (epocroot+projectdir+"mmp_traces_slash_target_ext_commonsource\\src\\MultipleMmpApp1.cpp"); //$NON-NLS-1$
+		source2 = new File (epocroot+projectdir+"mmp_traces_slash_target_ext_commonsource\\src\\ExtraCppFile1.cpp"); //$NON-NLS-1$
+		source3 = new File (epocroot+projectdir+"mmp_traces_slash_target_ext_commonsource\\src\\MultipleMmpApp1.cpp"); //$NON-NLS-1$
+		source4 = new File (epocroot+projectdir+"mmp_traces_slash_target_ext_commonsource\\src\\ExtraCppFile1.cpp"); //$NON-NLS-1$
+		sources.put("_traces_slash_target_ext_commonsource", Arrays.asList(source1, source2, source3, source4));
+
+		
+		if (oldTC) {
+			name1 = "mmp_traces_slash_target_ext1_cs";
+			name2 = "mmp_traces_slash_target_ext2_cs";
+		} else {
+			name1 = "target9_dll";
+			name2 = "target10_dll";
+		}
+		ostDict1     = new File(epocroot+dictpath + name1 + "_0xe8576d96_Dictionary.xml"); //$NON-NLS-1$
+		ostDict2     = new File(epocroot+dictpath + name2 + "_0xe8576d95_Dictionary.xml"); //$NON-NLS-1$	
+		autogenDict1 = new File(epocroot+autogenpath + name1 + "_0xe8576d96_TraceDefinitions.h"); //$NON-NLS-1$	
+		autogenDict2 = new File(epocroot+autogenpath + name2 + "_0xe8576d95_TraceDefinitions.h"); //$NON-NLS-1$	
+		dicts.put("_traces_slash_target_ext_commonsource", Arrays.asList(ostDict1, ostDict2, autogenDict1, autogenDict2)); //$NON-NLS-1$
+		
+		//==================================
+		loc = "traces\\"; //$NON-NLS-1$
+		if (!oldTC && !oldBuilder) {
+			loc = "traces_target11_exe\\"; //$NON-NLS-1$
+		}
+		tracesHeader1 = new File (epocroot+projectdir+"mmp_traces_target_type\\" + loc +"MultipleMmpApp1Traces.h"); //$NON-NLS-1$ //$NON-NLS-2$
+		tracesHeader2 = new File (epocroot+projectdir+"mmp_traces_target_type\\" + loc +"ExtraCppFile1Traces.h"); //$NON-NLS-1$ //$NON-NLS-2$
+		if (!oldTC && !oldBuilder) {
+			loc = "traces_target12_exe\\"; //$NON-NLS-1$
+		}
+		tracesHeader3 = new File (epocroot+projectdir+"mmp_traces_target_type\\" + loc + "MultipleMmpApp2Traces.h"); //$NON-NLS-1$ //$NON-NLS-2$
+		tracesHeader4 = new File (epocroot+projectdir+"mmp_traces_target_type\\" + loc + "ExtraCppFile2Traces.h"); //$NON-NLS-1$ //$NON-NLS-2$
+		ostTraceDefinitions = new File(epocroot+projectdir+"mmp_traces_target_type\\" + loc + "OstTraceDefinitions.h"); //$NON-NLS-1$
+		fixedidDefinitions = new File(epocroot+projectdir+"mmp_traces_target_type\\" + loc + "fixed_id.definitions"); //$NON-NLS-1$)
+
+		headers.put("_traces_target_type", Arrays.asList(tracesHeader1,tracesHeader2,tracesHeader3,tracesHeader4,ostTraceDefinitions,fixedidDefinitions)); //$NON-NLS-1$
+		
+		
+		source1 = new File (epocroot+projectdir+"mmp_traces_target_type\\src\\MultipleMmpApp1.cpp"); //$NON-NLS-1$
+		source2 = new File (epocroot+projectdir+"mmp_traces_target_type\\src\\ExtraCppFile1.cpp"); //$NON-NLS-1$
+		source3 = new File (epocroot+projectdir+"mmp_traces_target_type\\src\\MultipleMmpApp2.cpp"); //$NON-NLS-1$
+		source4 = new File (epocroot+projectdir+"mmp_traces_target_type\\src\\ExtraCppFile2.cpp"); //$NON-NLS-1$
+		sources.put("_traces_target_type", Arrays.asList(source1, source2, source3, source4));
+
+		ostDict1     = new File(epocroot+dictpath+"target11_exe_0xe8576d96_Dictionary.xml"); //$NON-NLS-1$
+		ostDict2     = new File(epocroot+dictpath+"target12_exe_0xe8576d95_Dictionary.xml"); //$NON-NLS-1$	
+		autogenDict1 = new File(epocroot+autogenpath+"target11_exe_0xe8576d96_TraceDefinitions.h"); //$NON-NLS-1$	
+		autogenDict2 = new File(epocroot+autogenpath+"target12_exe_0xe8576d95_TraceDefinitions.h"); //$NON-NLS-1$	
+		dicts.put("_traces_target_type", Arrays.asList(ostDict1, ostDict2, autogenDict1, autogenDict2)); //$NON-NLS-1$	
+		
+		//==================================
+		
+		loc = "traces\\"; //$NON-NLS-1$
+		if (!oldTC && !oldBuilder) {
+			loc = "traces\\target3_dll\\"; //$NON-NLS-1$
+		}
+		tracesHeader1 = new File (epocroot+projectdir+"mmp_traces_mixed\\" + loc + "MultipleMmpApp1Traces.h"); //$NON-NLS-1$ //$NON-NLS-2$
+		tracesHeader2 = new File (epocroot+projectdir+"mmp_traces_mixed\\" + loc + "ExtraCppFile1Traces.h"); //$NON-NLS-1$ //$NON-NLS-2$
+		if (!oldTC && !oldBuilder) {
+			loc = "traces_target4_kext\\"; //$NON-NLS-1$ 
+		}
+		tracesHeader3 = new File (epocroot+projectdir+"mmp_traces_mixed\\" + loc + "MultipleMmpApp2Traces.h"); //$NON-NLS-1$ //$NON-NLS-2$
+		tracesHeader4 = new File (epocroot+projectdir+"mmp_traces_mixed\\" + loc + "ExtraCppFile2Traces.h"); //$NON-NLS-1$ //$NON-NLS-2$		
+		ostTraceDefinitions = new File(epocroot+projectdir+"mmp_traces_mixed\\" + loc + "OstTraceDefinitions.h"); //$NON-NLS-1$
+		fixedidDefinitions = new File(epocroot+projectdir+"mmp_traces_mixed\\" + loc + "fixed_id.definitions"); //$NON-NLS-1$)
+
+		headers.put("_traces_mixed", Arrays.asList(tracesHeader1,tracesHeader2,tracesHeader3,tracesHeader4,ostTraceDefinitions,fixedidDefinitions)); //$NON-NLS-1$		
+		
+		source1 = new File (epocroot+projectdir+"mmp_traces_mixed\\src\\MultipleMmpApp1.cpp"); //$NON-NLS-1$
+		source2 = new File (epocroot+projectdir+"mmp_traces_mixed\\src\\ExtraCppFile1.cpp"); //$NON-NLS-1$
+		source3 = new File (epocroot+projectdir+"mmp_traces_mixed\\src\\MultipleMmpApp2.cpp"); //$NON-NLS-1$
+		source4 = new File (epocroot+projectdir+"mmp_traces_mixed\\src\\ExtraCppFile2.cpp"); //$NON-NLS-1$
+		sources.put("_traces_mixed", Arrays.asList(source1, source2, source3, source4));
+
+		String suffix = ""; //$NON-NLS-1$
+		String name = "";
+		if (!oldBuilder) {
+			suffix = "_dll"; //$NON-NLS-1$
+			name = "target3";
+		} else {
+		        name = "mmp_traces_mixed1";
+		}
+
+		ostDict1     = new File(epocroot+dictpath+name + suffix + "_0xe8576d96_Dictionary.xml"); //$NON-NLS-1$
+		autogenDict1 = new File(epocroot+autogenpath+name + suffix + "_0xe8576d96_TraceDefinitions.h"); //$NON-NLS-1$
+		if (!oldBuilder) {
+			suffix = "_kext"; //$NON-NLS-1$
+			name = "target4";
+		} else {
+			name = "mmp_traces_mixed2";
+		}
+		ostDict2     = new File(epocroot+dictpath+name + suffix + "_0xe8576d95_Dictionary.xml"); //$NON-NLS-1$
+		autogenDict2 = new File(epocroot+autogenpath+name + suffix + "_0xe8576d95_TraceDefinitions.h"); //$NON-NLS-1$	
+		dicts.put("_traces_mixed", Arrays.asList(ostDict1, ostDict2, autogenDict1, autogenDict2)); //$NON-NLS-1$	
+	}
+	
+	
+	/**
+	 * This function invokes raptor on the desired test c++ project
+	 * 
+	 * @param path String specifying the path the compiler needs
+	 * 				  to run from
+	 */
+	public void InvokeCompiler(String path, String builder) {
+		System.out.println ("InvokeCompiler() for : " + builder);
+		
+		List<File> headersList;
+		List<File> dictsList;
+		try{
+			
+			//set up the directory from which the process will be called
+			if (path.compareTo("_traces")==0){ //$NON-NLS-1$
+				headersList = headers.get("_traces"); //$NON-NLS-1$
+				System.out.println("deleting file " + headersList.toString()); //$NON-NLS-1$
+				for (File header : headersList) {
+					if (header.exists()) header.delete();
+				}
+				
+				dictsList = dicts.get("_traces"); //$NON-NLS-1$
+				System.out.println("deleting file " + dictsList.toString()); //$NON-NLS-1$
+				for (File dict : dictsList) {
+					if (dict.exists()) dict.delete();
+				}
+				compilerpath = new File (epocroot+projectdir+"mmp_traces\\group\\"); //$NON-NLS-1$
+			}
+			else if (path.compareTo("_traces_mmpname")==0){ //$NON-NLS-1$
+				headersList = headers.get("_traces_mmpname"); //$NON-NLS-1$
+				System.out.println("deleting file " + headersList.toString()); //$NON-NLS-1$
+				for (File header : headersList) {
+					if (header.exists()) {
+						header.delete();
+					}
+				}
+				
+				dictsList = dicts.get("_traces_mmpname");
+				System.out.println("deleting file " + dictsList.toString());
+				for (File dict : dictsList) {
+					if (dict.exists()) {
+						dict.delete();
+					}
+				}
+				compilerpath = new File (epocroot+projectdir+"mmp_traces_mmpname\\group\\");
+			}
+			else if (path.compareTo("_traces_slash_target_ext")==0){
+				headersList = headers.get("_traces_slash_target_ext");
+				System.out.println("deleting file " + headersList.toString());
+				for (File header : headersList) {
+					if (header.exists()) header.delete();
+				}
+				
+				dictsList = dicts.get("_traces_slash_target_ext");
+				System.out.println("deleting file " + dictsList.toString());
+				for (File dict : dictsList) {
+					if (dict.exists()) dict.delete();
+				}
+				compilerpath = new File (epocroot+projectdir+"mmp_traces_slash_target_ext\\group\\");
+			}
+			else if (path.compareTo("_traces_slash_target_ext_commonsource")==0){
+				headersList = headers.get("_traces_slash_target_ext_commonsource");
+				System.out.println("deleting file " + headersList.toString());
+				for (File header : headersList) {
+					if (header.exists()) header.delete();
+				}
+				
+				dictsList = dicts.get("_traces_slash_target_ext_commonsource");
+				System.out.println("deleting file " + dictsList.toString());
+				for (File dict : dictsList) {
+					if (dict.exists()) dict.delete();
+				}
+				compilerpath = new File (epocroot+projectdir+"mmp_traces_slash_target_ext_commonsource\\group\\");
+			}
+			else if (path.compareTo("_traces_target_type")==0){
+				headersList = headers.get("_traces_target_type");
+				System.out.println("deleting file " + headersList.toString());
+				for (File header : headersList) {
+					if (header.exists()) header.delete();
+				}
+				
+				dictsList = dicts.get("_traces_target_type");
+				System.out.println("deleting file " + dictsList.toString());
+				for (File dict : dictsList) {
+					if (dict.exists()) dict.delete();
+				}
+				compilerpath = new File (epocroot+projectdir+"mmp_traces_target_type\\group\\");
+			}
+			else if (path.compareTo("_traces_mixed")==0){
+				headersList = headers.get("_traces_mixed");
+				System.out.println("deleting file " + headersList.toString());
+				for (File header : headersList) {
+					if (header.exists()) header.delete();
+				}
+				
+				dictsList = dicts.get("_traces_mixed");
+				System.out.println("deleting file " + dictsList.toString());
+				for (File dict : dictsList) {
+					if (dict.exists()) dict.delete();
+				}
+				compilerpath = new File (epocroot+projectdir+"mmp_traces_mixed\\group\\");
+			}
+			else{
+			
+				System.out.println("Error: Unrecognised test case.");
+				fail();
+			}
+			
+			//set up the process builder object
+			sbs_build.directory(compilerpath);
+			sbs_reallyclean.directory(compilerpath);
+			sbs_build.redirectErrorStream(true);
+			
+			
+			
+			Process p;
+			String str = "";
+			//start the compiler
+			System.out.println("Starting build process ....");
+			
+				System.out.println("Running sbs reallyclean on : " + compilerpath + " command: " + sbs_reallyclean.command().toString());
+				p = sbs_reallyclean.start();
+				readProcessOutput(p);
+				System.out.println("Running sbs on : " + compilerpath + " command: " + sbs_build.command().toString());
+				p = sbs_build.start();
+				str = readProcessOutput(p);
+			
+			
+			int ret = p.exitValue();
+			System.out.println("build process ended....");
+			if (ret!=0){
+				System.out.println("build process failed:"+str);
+			}
+		}
+		
+    	catch (Exception e){//Catch exception if any
+    		System.err.println("Error: " + e.getMessage());
+    		fail();
+        }
+		
+	}
+
+
+	static private String readProcessOutput(Process p) throws IOException {
+		InputStream inp = p.getInputStream();
+		
+			int c;
+			String str = "";	        
+			//read the output from the compiler into the input stream
+			while ((c = inp.read()) != -1) {
+		   	 str= str +((char)c);
+			}
+		return str;
+	}
+	
+	/**
+	 * This function checks that the traces header files have been generated in the expected locations
+	 * 
+	 * @param path  String specifying where to look for the traces header file.  		   
+	 */
+	public void CheckForTracesHeaders(String path) {
+		System.out.println ("CheckForTracesHeaders()");
+		System.out.println("Old Builder : " + oldBuilder + "......Old TC : " + oldTC);
+		List<File> headersList = headers.get(path);
+		List<File> sourceList =  sources.get(path);
+		System.out.println("checking files " + headersList.toString());
+		boolean error = false;
+		if ((path.compareTo("_traces_slash_target_ext")==0 || path.compareTo("_traces_slash_target_ext_commonsource")==0) && oldBuilder && !oldTC){
+			System.out.println("No need to check for header files as old sbs cannot call TC");
+		} else {
+			try {
+				TraceCompilerEngineGlobals.start();
+			} catch (TraceCompilerException e) {
+				fail();
+			}
+			for (File header : headersList) {
+				if (!header.exists()) {
+					error = true;
+					System.out.println("Error: "+header+" does not exist/hasn't been generated by TraceCompiler");
+				} else {
+					String licenceInSource = null;
+					String licenceInHeader = null;
+					File source = null;
+					// read the licence from the header file
+					if (header.getName().trim().equalsIgnoreCase("OstTraceDefinitions.h")) {
+						licenceInSource = TraceCompilerEngineGlobals.getDefaultLicence(true);
+						System.out.println("Reading default licence for OstTraceDefinitions.h" + licenceInSource);
+					} else {
+						if (header.getName().trim().equalsIgnoreCase("fixed_id.definitions")) {
+							licenceInSource = TraceCompilerEngineGlobals.getDefaultLicence(false);
+							System.out.println("Reading default licence for fixed_id.definitions" + licenceInSource);
+						} else {
+							licenceInHeader = readFirstMultiLineComment(header.getAbsolutePath());
+							System.out.println("Reading licence from " + header.getAbsolutePath() + " == " + licenceInHeader);
+							source = sourceList.get(headersList.indexOf(header));
+
+							licenceInSource = readFirstMultiLineComment(source.getAbsolutePath());
+							System.out.println("Reading licence from " + source.getAbsolutePath() + " == " + licenceInSource);
+							if (licenceInSource == null) {
+								//licence should be EPL
+								licenceInSource = TraceCompilerEngineGlobals.getDefaultLicence(true);
+								System.out.println("Reading default licence for " + header.getAbsolutePath() + " == " + licenceInSource);
+							}
+						}
+					}
+					if (licenceInHeader != licenceInHeader) {
+						System.out.println("Error: licence in header " + header + " is not the same in source." + source);
+						fail();
+					}
+				}
+			}
+		
+			if(!error){
+				System.out.println("All Traces Header files have been generated as expected");
+			}
+			else {
+				fail();
+				}
+		}
+	}
+
+
+	/**
+	 * @param path
+	 */
+	private String readFirstMultiLineComment(String path) {
+		StringBuffer sb = new StringBuffer();
+		try {
+			FileReader reader = new FileReader(new File(path));
+			BufferedReader br = new BufferedReader(reader);
+			String line;
+			boolean inComment = false;
+			
+			while ((line = br.readLine()) != null) {
+				if (line.trim().startsWith("/*")) {
+					inComment = true;
+				}
+				if (inComment) {
+					sb.append(line + System.getProperty("line.separator"));
+				}
+				if (line.trim().endsWith("*/") && inComment) {
+					break;
+				}
+			}
+			br.close();
+		} catch (Exception e) {
+			System.out.println("Failed to open/read file " + path + "  " + e.getMessage());
+			fail();
+		}
+		String licence = null;
+		if (sb.length()> 0) {
+			licence = sb.toString();
+			if (!licence.contains("Copyright")) {
+				licence = null;
+			}
+		}
+			
+		return licence;
+	}
+	
+	/**
+	 * This function checks that the dictionary files have been generated in the expected locations with the right name
+	 * 
+	 * @param path.  		   
+	 */
+	public void CheckForDictionary(String path) {
+		System.out.println ("CheckForDictionaries()");
+
+		List<File> dictsList = dicts.get(path);
+		System.out.println("checking files " + dictsList.toString());
+		boolean error = false;
+
+		if ((path.compareTo("_traces_slash_target_ext")==0 || path.compareTo("_traces_slash_target_ext_commonsource")==0) && oldBuilder && !oldTC){
+			System.out.println("No need to check for dictionary as old sbs cannot call TC");
+		} else {
+			for (File dict : dictsList) {
+				if(!dict.exists()) {
+					error = true;
+					System.out.println("Error: "+dict+" does not exist/hasn't been generated by TraceCompiler");
+				}
+			}
+
+			if (!error) {
+				System.out.println("Dictionary files have been generated as expected");
+			}
+			else {
+				fail();
+			}
+		}
+	}
+	
+
+	/****************************************************ACTUAL TESTS************************************************************/
+	@Test
+	public void MultipleMmpsTest1 (){
+		System.out.println ("*********************traces****************************");
+		createListHeadersDicts("sbs");
+		//Call Raptor
+		InvokeCompiler("_traces", "sbs");		
+		//Check for header files
+		CheckForTracesHeaders("_traces");
+		//Check dictionary
+		CheckForDictionary("_traces");	
+		
+	
+	}
+	
+
+	@Test
+	public void MultipleMmpsTest2 (){
+		System.out.println ("****************traces_mmpname**********************");
+		createListHeadersDicts("sbs");
+		//Call Raptor
+		InvokeCompiler("_traces_mmpname", "sbs");
+		//Check for header files
+		CheckForTracesHeaders("_traces_mmpname");
+		//Check dictionary
+		CheckForDictionary("_traces_mmpname");
+		
+		
+	}
+	
+
+	@Test
+	public void MultipleMmpsTest3 (){
+		System.out.println ("**********traces_slash_target_ext****************");
+		createListHeadersDicts("sbs");
+		//Call Raptor
+		InvokeCompiler("_traces_slash_target_ext", "sbs");
+		//Check for header files
+		CheckForTracesHeaders("_traces_slash_target_ext");
+		//Check dictionary
+		CheckForDictionary("_traces_slash_target_ext");	
+		
+		
+	}
+
+	@Test
+	public void MultipleMmpsTest4 (){
+		System.out.println ("**********traces_slash_target_ext_commonsource****************");
+		createListHeadersDicts("sbs");
+		//Call Raptor
+		InvokeCompiler("_traces_slash_target_ext_commonsource", "sbs");
+		//Check for header files
+		CheckForTracesHeaders("_traces_slash_target_ext_commonsource");
+		//Check dictionary
+		CheckForDictionary("_traces_slash_target_ext_commonsource");
+		
+		
+				
+	}
+
+	@Test
+	public void MultipleMmpsTest5 (){
+		System.out.println ("**********traces_target_type****************");
+		createListHeadersDicts("sbs");
+		//Call Raptor
+		InvokeCompiler("_traces_target_type", "sbs");
+		//Check for header files
+		CheckForTracesHeaders("_traces_target_type");
+		//Check dictionary
+		CheckForDictionary("_traces_target_type");
+		
+		
+	}
+
+	@Test
+	public void MultipleMmpsTest6 (){
+		System.out.println ("**********traces_mixed****************");
+		createListHeadersDicts("sbs");
+		//Call Raptor
+		InvokeCompiler("_traces_mixed", "sbs");
+		//Check for header files
+		CheckForTracesHeaders("_traces_mixed");
+		//Check dictionary
+		CheckForDictionary("_traces_mixed");	
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/src/ParseFunctionParametersTest.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,228 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "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:
+ *
+ * Description:
+ *
+ * JUnit tests for function parameters parsing
+ *
+ */
+
+import static org.junit.Assert.assertTrue;
+
+import java.util.ArrayList;
+import org.junit.Assert;
+import org.junit.Test;
+import com.nokia.tracecompiler.source.*;
+import com.nokia.tracecompiler.document.*;
+
+public class ParseFunctionParametersTest {
+
+	/**
+	 * SourceDocumentFactory
+	 */
+	SourceDocumentFactory iFactory = null;
+
+	public static void main(String[] args) {
+		org.junit.runner.JUnitCore.main(ParseFunctionParametersTest.class
+				.getName());
+	}
+
+	/**
+	 * jUnit test to test function parameter parsing
+	 */
+	@Test
+	public void testFunctionParameterParsing() {
+
+		FileDocumentMonitor monitor = new FileDocumentMonitor();
+		iFactory = monitor.getFactory();
+
+		ArrayList<String> expectedParameterNames = new ArrayList<String>();
+		ArrayList<String> expectedParameterTypes = new ArrayList<String>();
+		String functionHeader;
+
+		// Function header 1
+
+		// First expected parameter
+		expectedParameterNames.add("aLenght"); //$NON-NLS-1$
+		expectedParameterTypes.add("TUint32"); //$NON-NLS-1$
+
+		// Second expected parameter
+		expectedParameterNames.add("aWidth"); //$NON-NLS-1$
+		expectedParameterTypes.add("TUint16"); //$NON-NLS-1$
+
+		// Third expected parameter
+		expectedParameterNames.add("aDelay"); //$NON-NLS-1$
+		expectedParameterTypes.add("TUint32"); //$NON-NLS-1$
+
+		// construct the function header
+		functionHeader = "DHelloWorld::DHelloWorld(TUint32 aLenght, TUint16 aWidth, TUint32 aDelay)\n" //$NON-NLS-1$
+				+ "{"; //$NON-NLS-1$
+
+		System.out.println("Execute test to function header 1"); //$NON-NLS-1$
+		executeTest(expectedParameterNames, expectedParameterTypes,
+				functionHeader);
+
+		// Function header 2
+
+		// Clear expected names and types arrays
+		expectedParameterNames.clear();
+		expectedParameterTypes.clear();
+
+		// construct the function header
+		functionHeader = "EXPORT_C DMessageHandler::DMessageHandler()\n" //$NON-NLS-1$
+				+ ": iWriter( NULL )\n" //$NON-NLS-1$
+				+ ", iSettings( NULL )\n" //$NON-NLS-1$				
+				+ "{"; //$NON-NLS-1$
+
+		System.out.println("Execute test to function header 2"); //$NON-NLS-1$
+		executeTest(expectedParameterNames, expectedParameterTypes,
+				functionHeader);
+
+		// Test headers those caused defects in TraceCompiler version 2.1.0 and
+		// 2.1.1
+		// xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+		// x
+
+		System.out
+				.println("Execute tests to function headers those caused defects in TraceCompiler version 2.1.0 and 2.1.1"); //$NON-NLS-1$
+
+		// Clear expected names and types arrays
+		expectedParameterNames.clear();
+		expectedParameterTypes.clear();
+
+		// First expected parameter
+		expectedParameterNames.add("aObserver"); //$NON-NLS-1$
+		expectedParameterTypes.add("MModemLcsServerObserver"); //$NON-NLS-1$
+
+		// Second expected parameter
+		expectedParameterNames.add("aIsiMsgObserver"); //$NON-NLS-1$
+		expectedParameterTypes.add("MModemLcsIsiMsgObserver"); //$NON-NLS-1$
+
+		// construct the function header
+		functionHeader = "Cmodemlcsserverrrc::Cmodemlcsserverrrc(MModemLcsServerObserver *aObserver, MModemLcsIsiMsgObserver* aIsiMsgObserver):\n" //$NON-NLS-1$
+				+ " CActive(EPriorityStandard) // Standard priority\n" //$NON-NLS-1$
+				+ "{"; //$NON-NLS-1$
+
+		executeTest(expectedParameterNames, expectedParameterTypes,
+				functionHeader);
+
+		// Clear expected names and types arrays
+		expectedParameterNames.clear();
+		expectedParameterTypes.clear();
+
+		// First expected parameter
+		expectedParameterNames.add("aDriver"); //$NON-NLS-1$
+		expectedParameterTypes.add("RMeDriver"); //$NON-NLS-1$
+
+		// Second expected parameter
+		expectedParameterNames.add("aMaxMsgLength"); //$NON-NLS-1$
+		expectedParameterTypes.add("TUint16"); //$NON-NLS-1$
+
+		// construct the function header
+		functionHeader = "CNpeSendData::CNpeSendData(RMeDriver* aDriver, TUint16 aMaxMsgLength): CActive(EPriorityStandard),\n" //$NON-NLS-1$
+				+ "iDriver(aDriver),\n" //$NON-NLS-1$
+				+ "iMaxMsgLength(aMaxMsgLength)\n" //$NON-NLS-1$
+				+ "{"; //$NON-NLS-1$
+
+		executeTest(expectedParameterNames, expectedParameterTypes,
+				functionHeader);
+
+		// Same expected parameter names and types are used as previous case
+
+		// construct the function header
+		functionHeader = "CNpeReceiveData::CNpeReceiveData(RMeDriver* aDriver, TUint16 aMaxMsgLength): CActive(EPriorityStandard),\n" //$NON-NLS-1$
+				+ "iDriver(aDriver),\n" //$NON-NLS-1$
+				+ "iMaxMsgLength(aMaxMsgLength)\n" //$NON-NLS-1$
+				+ "{"; //$NON-NLS-1$
+
+		executeTest(expectedParameterNames, expectedParameterTypes,
+				functionHeader);
+		// x
+		// xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+
+	}
+
+	/**
+	 * Execute test for function header
+	 * 
+	 * @param expectedParameterNames
+	 *            expected parameter names
+	 * @param expectedParameterTypes
+	 *            expected parameter types
+	 * @param functionHeader
+	 *            function header to be parsed
+	 */
+	private void executeTest(ArrayList<String> expectedParameterNames,
+			ArrayList<String> expectedParameterTypes,
+			final String functionHeader) {
+
+		// first test the parser on an unwrapped string
+		SourceParser sourceParser = new SourceParser(iFactory, iFactory
+				.createDocument(functionHeader));
+
+		// ArrayList<String> actualTokens = new ArrayList<String>();
+		ArrayList<SourceParameter> actualParameters = new ArrayList<SourceParameter>();
+
+		// parse string
+		try {
+			sourceParser.parseFunctionParameters(0, actualParameters);
+
+		} catch (SourceParserException e) {
+			Assert.fail(e.getMessage());
+		}
+
+		checkContents(actualParameters, expectedParameterNames,
+				expectedParameterTypes);
+	}
+
+	/**
+	 * Check contents
+	 * 
+	 * @param actualParameters
+	 *            actual parsed parameters
+	 * @param expectedParameterNames
+	 *            expected parameter names
+	 * @param expectedParameterTypes
+	 *            expected parameter types
+	 */
+	private static void checkContents(
+			final ArrayList<SourceParameter> actualParameters,
+			final ArrayList<String> expectedParameterNames,
+			final ArrayList<String> expectedParameterTypes) {
+
+		// Confirm count of parsed parameters
+		
+		System.out.println("Confirm count of parsed parameters:"); //$NON-NLS-1$
+		System.out.println("actualParameters.size() = " + actualParameters.size()); //$NON-NLS-1$
+		System.out.println("expectedParameterNames() = " + expectedParameterNames.size()); //$NON-NLS-1$
+		assertTrue(actualParameters.size() == expectedParameterNames.size());
+		for (int i = 0; i < actualParameters.size(); i++) {
+
+			// Confirm parsed parameter names
+			
+			System.out.println("Confirm parsed parameter names:"); //$NON-NLS-1$
+			System.out.println("actualParameters name = " + actualParameters.get(i).getName()); //$NON-NLS-1$
+			System.out.println("expectedParameter name = " + expectedParameterNames.get(i)); //$NON-NLS-1$
+			assertTrue(actualParameters.get(i).getName().compareTo(
+					expectedParameterNames.get(i)) == 0);
+
+			// Confirm parsed parameter types
+			
+			System.out.println("Confirm parsed parameter types:"); //$NON-NLS-1$
+			System.out.println("actualParameters type = " + actualParameters.get(i).getType()); //$NON-NLS-1$
+			System.out.println("expectedParameter type = " + expectedParameterTypes.get(i)); //$NON-NLS-1$
+			assertTrue(actualParameters.get(i).getType().compareTo(
+					expectedParameterTypes.get(i)) == 0);
+		}
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/src/PluginTracePropertyVerifierTest.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,215 @@
+/*
+ * Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies). 
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "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:
+ *
+ * Description:
+ *
+ * JUnit tests for PluginTracePropertyVerifier
+ *
+ */
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.List;
+
+import junit.framework.Assert;
+import junit.framework.TestCase;
+
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+public class PluginTracePropertyVerifierTest extends TestCase {
+
+	/**
+	 * Class to PluginTracePropertyVerifier
+	 */
+	static Class<?> pluginTracePropertyVerifier;
+
+	/**
+	 * PluginTracePropertyVerifier object
+	 */
+	static Object ptpvObject;
+
+	/**
+	 * Empty string
+	 */
+	private static final String EMPTY_STRING = ""; //$NON-NLS-1$
+
+	/**
+	 * White space
+	 */
+	private static final String WHITE_SPACE = " "; //$NON-NLS-1$
+
+	/**
+	 * Enum for different functions to test
+	 * 
+	 */
+	private enum FunctionToTest {
+		ISVALIDDATA
+	}
+
+	/**
+	 * TestData class
+	 * 
+	 */
+	private class TestData {
+		String testString;
+		boolean expectedIsValidDataResult;
+
+		/**
+		 * 
+		 * Constructor
+		 * 
+		 * @param testStringParam
+		 *            the test string
+		 * @param expectedIsValidDataResultParam
+		 *            the expected return value in case of isValidData
+		 *            method
+		 */
+		TestData(String testStringParam, boolean expectedIsValidDataResultParam) {
+			this.testString = testStringParam;
+			this.expectedIsValidDataResult = expectedIsValidDataResultParam;
+		}
+	}
+
+	/**
+	 * List of test data
+	 */
+	List<TestData> testDataList = new ArrayList<TestData>();
+
+	/**
+	 * main
+	 * 
+	 * @param args
+	 */
+	public static void main(String[] args) {
+		org.junit.runner.JUnitCore
+				.main(PluginTracePropertyVerifierTest.class.getName());
+	}
+
+	/**
+	 * setUp
+	 */
+	@Before
+	public void setUp() {
+
+		if (testDataList.size() == 0) {
+			initializeTestDataList();
+		}
+
+		if (pluginTracePropertyVerifier == null && ptpvObject == null) {
+			try {
+				pluginTracePropertyVerifier = Class
+						.forName("com.nokia.tracecompiler.engine.plugin.PluginTracePropertyVerifier"); //$NON-NLS-1$
+				ptpvObject = pluginTracePropertyVerifier.newInstance();
+			} catch (Exception e) {
+				Assert.fail(e.toString());
+			}
+		}
+
+	}
+
+	/**
+	 * Initialize test data list
+	 */
+	private void initializeTestDataList() {
+		char VTAB = 0xB; //vertical TAB
+		testDataList.add(new TestData("Some valid text", true)); //valid text //$NON-NLS-1$
+		testDataList.add(new TestData("Some text with non-valid character - vertical TAB - : " + String.valueOf(VTAB) , false)); //$NON-NLS-1$
+		testDataList.add(new TestData("Some valid text with TAB	: " , true)); //$NON-NLS-1$
+		testDataList.add(new TestData("Some valid text with TABs				: " , true)); //$NON-NLS-1$
+	}
+
+	/**
+	 * Execute tests
+	 * 
+	 * @param nameOfFunctionUnderTest
+	 *            the name of the function that should be tested
+	 * @param testType
+	 *            the number of expected result column
+	 */
+	private void executeTests(String nameOfFunctionUnderTest,
+			FunctionToTest testType) {
+		for (int i = 0; i < testDataList.size(); i++) {
+			String testString = testDataList.get(i).testString;
+			boolean expectedResult = false;
+
+			switch (testType) {
+			case ISVALIDDATA:
+				expectedResult = testDataList.get(i).expectedIsValidDataResult;
+				break;
+			}
+
+			executeTest(nameOfFunctionUnderTest, testString, expectedResult);
+		}
+	}
+
+	/**
+	 * Execute test
+	 * 
+	 * @param nameOfFunctionUnderTest
+	 *            the name of the function that should be tested
+	 * @param testString
+	 *            the test string that is used in test
+	 * @param columNumberOfExpectedResult
+	 *            the number of expected result column
+	 */
+	private void executeTest(String nameOfFunctionUnderTest, String testString,
+			boolean expectedResult) {
+		Method functionUnderTest = null;
+		try {
+			functionUnderTest = pluginTracePropertyVerifier.getDeclaredMethod(
+					nameOfFunctionUnderTest, String.class);
+			// change access of the function under test because otherwise we can
+			// test to private functions
+			functionUnderTest.setAccessible(true);
+			// invoke the function and get result
+			Object retObj = null;
+
+			// remove white spaces from test string, because those those does
+			// not exist in real life either
+			retObj = functionUnderTest.invoke(ptpvObject, testString.replace(
+					WHITE_SPACE, EMPTY_STRING));
+
+			// cast the result to the expected return type.
+			Boolean res = (Boolean) retObj;
+
+			String msg = functionUnderTest.getName() + "  invoked on \"" //$NON-NLS-1$
+					+ testString + "\" returned " + res.toString(); //$NON-NLS-1$
+			Assert.assertEquals(msg, expectedResult, res.booleanValue());
+		} catch (Exception e) {
+			Assert.fail(e.getMessage());
+		}
+	}
+
+	/**
+	 * Test isValidData method
+	 */
+	@Test
+	public void testIsValidDataMethod() {
+		executeTests("isValidData", FunctionToTest.ISVALIDDATA); //$NON-NLS-1$
+	}
+
+	//add future methods tests after this point.
+	
+	/**
+	 * tearDown
+	 */
+	@After
+	public void tearDown() {
+		// nothing to do
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/src/TraceHeadersLicenceTest.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,600 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+import static org.junit.Assert.fail;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import com.nokia.tracecompiler.engine.TraceCompilerEngineGlobals;
+import com.nokia.tracecompiler.model.TraceCompilerException;
+
+
+public class TraceHeadersLicenceTest {
+	
+	public static void main(String args[]) {		
+	      	org.junit.runner.JUnitCore.main(TraceHeadersLicenceTest.class.getName());
+	    }
+	
+	/****************************************************UTILITY FUNCTIONS FOR TESTS************************************************************/
+	
+	private static String epocroot = null; 
+	private static String projectdir = "testdata\\MultipleMmpTestCases\\"; //$NON-NLS-1$
+	private static Pattern versionPattern = Pattern.compile("^.*(\\d+\\.\\d+\\.\\d+).*$"); //$NON-NLS-1$
+	private static Pattern oldversionPat = Pattern.compile("^(1\\..*)|(2\\.1.*)"); //$NON-NLS-1$
+	//old TC version should be up to 2.12.5 as new functionality was submitted to 2.12.6 (we hope)
+	private static Pattern sbsoldversionPat = Pattern.compile("^(1\\..*)|(2\\.[01]\\..*)|(2\\.1[0-2]\\.[0-3].*)"); //$NON-NLS-1$
+	private static String TCversion = ""; //$NON-NLS-1$
+	private static String SBSversion = ""; //$NON-NLS-1$
+	private static File compilerpath;
+	private static boolean oldTC = false;
+	private static boolean oldBuilder = false; 
+	private static HashMap<String, List<File>> headers = new HashMap<String, List<File>>();
+	private static HashMap<String, List<File>> sources = new HashMap<String, List<File>>();
+	private static ProcessBuilder sbs_build = new ProcessBuilder("sbs.bat","-k","-c","winscw_udeb.tracecompiler");
+	private static ProcessBuilder sbs_reallyclean = new ProcessBuilder("sbs.bat","-k","-c","winscw_udeb.tracecompiler", "reallyclean");
+	
+
+	@BeforeClass
+	static public void setEnvVariables() {
+		epocroot = System.getenv("EPOCROOT"); //$NON-NLS-1$
+		if(epocroot == null || (epocroot.length()==0)){
+			fail();
+		}
+		
+		// need to check that the path ends in a backslash
+		if(!epocroot.endsWith("\\")){ 
+			epocroot += "\\"; 
+		}
+
+		compilerpath = new File (epocroot + "epoc32" + File.separator + "tools" + File.separator +"tracecompiler" + File.separator); //default value to remove warnings. //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+
+		ProcessBuilder tc = new ProcessBuilder("java", "-classpath", compilerpath.getPath(), //$NON-NLS-1$//$NON-NLS-2$
+				"com.nokia.tracecompiler.TraceCompiler", "-v"); //$NON-NLS-1$//$NON-NLS-2$
+		System.out.println("compilerPath= " + compilerpath); //$NON-NLS-1$
+		tc.directory(compilerpath);
+		tc.redirectErrorStream(true);
+		try {
+		Process p = tc.start();
+		p.waitFor();	
+
+		
+		String str = readProcessOutput(p);
+		System.out.println("TC version = " + str); //$NON-NLS-1$
+		Matcher m = versionPattern.matcher(str.trim());
+		if (m.matches()) {
+			TCversion = m.group(1);
+			System.out.println("TC Version = " + TCversion); //$NON-NLS-1$
+		}
+		
+		m = oldversionPat.matcher(TCversion);
+		if (m.matches()){
+			oldTC=true;
+		}
+
+		System.out.println("TC version = " + TCversion); //$NON-NLS-1$ 
+		System.out.println("OLD TC version = " + oldTC); //$NON-NLS-1$
+
+		ProcessBuilder sbs = new ProcessBuilder("sbs.bat","-v"); //$NON-NLS-1$ //$NON-NLS-2$
+		sbs.directory(compilerpath);
+		sbs.redirectErrorStream(true);
+			
+		//start the compiler
+		p = sbs.start();
+		p.waitFor();
+			
+		InputStream inp = p.getInputStream();
+			
+	        str = ""; //$NON-NLS-1$
+	        int c;
+	        //read the output from the compiler into the input stream
+	        while ((c = inp.read()) != -1) {
+	           	 str= str +((char)c);
+	        }
+
+		System.out.println("SBS version = " + str); //$NON-NLS-1$
+		m = versionPattern.matcher(str.trim());
+		if (m.matches()) {
+			SBSversion = m.group(1);
+		}
+		
+		m = sbsoldversionPat.matcher(SBSversion);
+		if (m.matches()){
+			oldBuilder=true;
+		}
+		
+		} catch (Exception e) {// Catch exception if any
+			System.err.println(e.getMessage());
+		}
+	}
+	
+	
+	public void createListHeadersDicts(String builder)
+	{
+		//The whole logic of what is expected is built here whether we build with sbs 
+		//new TC or old, The structure is re-built for each case.
+		
+		
+		Matcher m = sbsoldversionPat.matcher(SBSversion);
+		if (m.matches()){
+			oldBuilder=true;
+		} else {
+			oldBuilder=false;
+		}
+		
+		
+		System.out.println("OLD Builder :" + builder + ": = " + oldBuilder); //$NON-NLS-1$
+		
+		File tracesHeader1;
+		File tracesHeader2;
+		File tracesHeader3;
+		File tracesHeader4;
+		File source1;
+		File source2;
+		File source3;
+		File source4;
+		File ostTraceDefinitions;
+		File fixedidDefinitions;
+		String loc = "traces\\"; //$NON-NLS-1$
+		
+		source1 = new File (epocroot+projectdir+"mmp_traces\\src\\MultipleMmpApp1.cpp"); //$NON-NLS-1$
+		source2 = new File (epocroot+projectdir+"mmp_traces\\src\\ExtraCppFile1.cpp"); //$NON-NLS-1$
+		source3 = new File (epocroot+projectdir+"mmp_traces\\src\\MultipleMmpApp2.cpp"); //$NON-NLS-1$
+		source4 = new File (epocroot+projectdir+"mmp_traces\\src\\ExtraCppFile2.cpp"); //$NON-NLS-1$
+		sources.put("_traces", Arrays.asList(source1, source2, source3, source4));
+		
+		tracesHeader1 = new File (epocroot+projectdir+"mmp_traces\\traces\\MultipleMmpApp1Traces.h"); //$NON-NLS-1$
+		tracesHeader2 = new File (epocroot+projectdir+"mmp_traces\\traces\\ExtraCppFile1Traces.h"); //$NON-NLS-1$
+		tracesHeader3 = new File (epocroot+projectdir+"mmp_traces\\traces\\MultipleMmpApp2Traces.h"); //$NON-NLS-1$
+		tracesHeader4 = new File (epocroot+projectdir+"mmp_traces\\traces\\ExtraCppFile2Traces.h"); //$NON-NLS-1$
+		
+		ostTraceDefinitions = new File(epocroot+projectdir+"mmp_traces\\traces\\OstTraceDefinitions.h"); //$NON-NLS-1$
+		fixedidDefinitions = new File(epocroot+projectdir+"mmp_traces\\traces\\fixed_id.definitions"); //$NON-NLS-1$)
+		headers.put("_traces", Arrays.asList(tracesHeader1,tracesHeader2,tracesHeader3,tracesHeader4,ostTraceDefinitions,fixedidDefinitions)); //$NON-NLS-1$
+		
+		
+		//=============================
+		
+		if (!oldBuilder && !oldTC) {
+			loc = "traces_mmp_traces_mmpname1\\"; //$NON-NLS-1$
+		}
+		tracesHeader1 = new File (epocroot+projectdir+"mmp_traces_mmpname\\"+ loc + "MultipleMmpApp1Traces.h"); //$NON-NLS-1$ //$NON-NLS-2$
+		tracesHeader2 = new File (epocroot+projectdir+"mmp_traces_mmpname\\" + loc + "ExtraCppFile1Traces.h"); //$NON-NLS-1$ //$NON-NLS-2$
+		if (!oldBuilder && !oldTC) {
+			loc = "traces_mmp_traces_mmpname2\\"; //$NON-NLS-1$
+		}
+		tracesHeader3 = new File (epocroot+projectdir+"mmp_traces_mmpname\\" + loc + "MultipleMmpApp2Traces.h"); //$NON-NLS-1$ //$NON-NLS-2$
+		tracesHeader4 = new File (epocroot+projectdir+"mmp_traces_mmpname\\" + loc + "ExtraCppFile2Traces.h"); //$NON-NLS-1$ //$NON-NLS-2$
+		ostTraceDefinitions = new File(epocroot+projectdir+"mmp_traces_mmpname\\" + loc + "OstTraceDefinitions.h"); //$NON-NLS-1$
+		fixedidDefinitions = new File(epocroot+projectdir+"mmp_traces_mmpname\\" + loc + "fixed_id.definitions"); //$NON-NLS-1$)
+
+		headers.put("_traces_mmpname", Arrays.asList(tracesHeader1,tracesHeader2,tracesHeader3,tracesHeader4,ostTraceDefinitions,fixedidDefinitions)); //$NON-NLS-1$
+		
+		source1 = new File (epocroot+projectdir+"mmp_traces_mmpname\\src\\MultipleMmpApp1.cpp"); //$NON-NLS-1$
+		source2 = new File (epocroot+projectdir+"mmp_traces_mmpname\\src\\ExtraCppFile1.cpp"); //$NON-NLS-1$
+		source3 = new File (epocroot+projectdir+"mmp_traces_mmpname\\src\\MultipleMmpApp2.cpp"); //$NON-NLS-1$
+		source4 = new File (epocroot+projectdir+"mmp_traces_mmpname\\src\\ExtraCppFile2.cpp"); //$NON-NLS-1$
+		sources.put("_traces_mmpname", Arrays.asList(source1, source2, source3, source4));
+		
+	    //=============================
+	    
+	    loc = "traces\\"; //$NON-NLS-1$
+		if (!oldTC) {
+			loc = "traces\\target7_dll\\"; //$NON-NLS-1$
+		}
+		tracesHeader1 = new File (epocroot+projectdir+"mmp_traces_slash_target_ext\\" + loc + "MultipleMmpApp1Traces.h"); //$NON-NLS-1$ //$NON-NLS-2$
+		tracesHeader2 = new File (epocroot+projectdir+"mmp_traces_slash_target_ext\\" + loc + "ExtraCppFile1Traces.h"); //$NON-NLS-1$ //$NON-NLS-2$
+		if (!oldTC) {
+			loc = "traces\\target8_dll\\"; //$NON-NLS-1$
+		}
+		tracesHeader3 = new File (epocroot+projectdir+"mmp_traces_slash_target_ext\\" + loc + "MultipleMmpApp2Traces.h"); //$NON-NLS-1$ //$NON-NLS-2$
+		tracesHeader4 = new File (epocroot+projectdir+"mmp_traces_slash_target_ext\\" + loc + "ExtraCppFile2Traces.h"); //$NON-NLS-1$ //$NON-NLS-2$
+		ostTraceDefinitions = new File(epocroot+projectdir+"mmp_traces_slash_target_ext\\" + loc + "OstTraceDefinitions.h"); //$NON-NLS-1$
+		fixedidDefinitions = new File(epocroot+projectdir+"mmp_traces_slash_target_ext\\" + loc + "fixed_id.definitions"); //$NON-NLS-1$)
+
+		headers.put("_traces_slash_target_ext", Arrays.asList(tracesHeader1,tracesHeader2,tracesHeader3,tracesHeader4,ostTraceDefinitions,fixedidDefinitions)); //$NON-NLS-1$
+		
+		source1 = new File (epocroot+projectdir+"mmp_traces_slash_target_ext\\src\\MultipleMmpApp1.cpp"); //$NON-NLS-1$
+		source2 = new File (epocroot+projectdir+"mmp_traces_slash_target_ext\\src\\ExtraCppFile1.cpp"); //$NON-NLS-1$
+		source3 = new File (epocroot+projectdir+"mmp_traces_slash_target_ext\\src\\MultipleMmpApp2.cpp"); //$NON-NLS-1$
+		source4 = new File (epocroot+projectdir+"mmp_traces_slash_target_ext\\src\\ExtraCppFile2.cpp"); //$NON-NLS-1$
+		sources.put("_traces_slash_target_ext", Arrays.asList(source1, source2, source3, source4));
+				
+	    //================================
+	    loc = "traces\\"; //$NON-NLS-1$
+		if (!oldTC) {
+			loc = "traces\\target9_dll\\"; //$NON-NLS-1$
+		}
+		tracesHeader1 = new File (epocroot+projectdir+"mmp_traces_slash_target_ext_commonsource\\" + loc + "MultipleMmpApp1Traces.h"); //$NON-NLS-1$ //$NON-NLS-2$
+		tracesHeader2 = new File (epocroot+projectdir+"mmp_traces_slash_target_ext_commonsource\\" + loc + "ExtraCppFile1Traces.h"); //$NON-NLS-1$ //$NON-NLS-2$
+		if (!oldTC) {
+			loc = "traces\\target10_dll\\"; //$NON-NLS-1$
+		}
+		tracesHeader3 = new File (epocroot+projectdir+"mmp_traces_slash_target_ext_commonsource\\" + loc + "MultipleMmpApp1Traces.h"); //$NON-NLS-1$ //$NON-NLS-2$
+		tracesHeader4 = new File (epocroot+projectdir+"mmp_traces_slash_target_ext_commonsource\\" + loc + "ExtraCppFile1Traces.h"); //$NON-NLS-1$ //$NON-NLS-2$
+		ostTraceDefinitions = new File(epocroot+projectdir+"mmp_traces_slash_target_ext_commonsource\\" + loc + "OstTraceDefinitions.h"); //$NON-NLS-1$
+		fixedidDefinitions = new File(epocroot+projectdir+"mmp_traces_slash_target_ext_commonsource\\" + loc + "fixed_id.definitions"); //$NON-NLS-1$)
+
+		headers.put("_traces_slash_target_ext_commonsource", Arrays.asList(tracesHeader1,tracesHeader2,tracesHeader3,tracesHeader4,ostTraceDefinitions,fixedidDefinitions)); //$NON-NLS-1$
+		
+		source1 = new File (epocroot+projectdir+"mmp_traces_slash_target_ext_commonsource\\src\\MultipleMmpApp1.cpp"); //$NON-NLS-1$
+		source2 = new File (epocroot+projectdir+"mmp_traces_slash_target_ext_commonsource\\src\\ExtraCppFile1.cpp"); //$NON-NLS-1$
+		source3 = new File (epocroot+projectdir+"mmp_traces_slash_target_ext_commonsource\\src\\MultipleMmpApp1.cpp"); //$NON-NLS-1$
+		source4 = new File (epocroot+projectdir+"mmp_traces_slash_target_ext_commonsource\\src\\ExtraCppFile1.cpp"); //$NON-NLS-1$
+		sources.put("_traces_slash_target_ext_commonsource", Arrays.asList(source1, source2, source3, source4));
+		
+		//==================================
+		loc = "traces\\"; //$NON-NLS-1$
+		if (!oldTC && !oldBuilder) {
+			loc = "traces_target11_exe\\"; //$NON-NLS-1$
+		}
+		tracesHeader1 = new File (epocroot+projectdir+"mmp_traces_target_type\\" + loc +"MultipleMmpApp1Traces.h"); //$NON-NLS-1$ //$NON-NLS-2$
+		tracesHeader2 = new File (epocroot+projectdir+"mmp_traces_target_type\\" + loc +"ExtraCppFile1Traces.h"); //$NON-NLS-1$ //$NON-NLS-2$
+		if (!oldTC && !oldBuilder) {
+			loc = "traces_target12_exe\\"; //$NON-NLS-1$
+		}
+		tracesHeader3 = new File (epocroot+projectdir+"mmp_traces_target_type\\" + loc + "MultipleMmpApp2Traces.h"); //$NON-NLS-1$ //$NON-NLS-2$
+		tracesHeader4 = new File (epocroot+projectdir+"mmp_traces_target_type\\" + loc + "ExtraCppFile2Traces.h"); //$NON-NLS-1$ //$NON-NLS-2$
+		ostTraceDefinitions = new File(epocroot+projectdir+"mmp_traces_target_type\\" + loc + "OstTraceDefinitions.h"); //$NON-NLS-1$
+		fixedidDefinitions = new File(epocroot+projectdir+"mmp_traces_target_type\\" + loc + "fixed_id.definitions"); //$NON-NLS-1$)
+
+		headers.put("_traces_target_type", Arrays.asList(tracesHeader1,tracesHeader2,tracesHeader3,tracesHeader4,ostTraceDefinitions,fixedidDefinitions)); //$NON-NLS-1$
+		
+		
+		source1 = new File (epocroot+projectdir+"mmp_traces_target_type\\src\\MultipleMmpApp1.cpp"); //$NON-NLS-1$
+		source2 = new File (epocroot+projectdir+"mmp_traces_target_type\\src\\ExtraCppFile1.cpp"); //$NON-NLS-1$
+		source3 = new File (epocroot+projectdir+"mmp_traces_target_type\\src\\MultipleMmpApp2.cpp"); //$NON-NLS-1$
+		source4 = new File (epocroot+projectdir+"mmp_traces_target_type\\src\\ExtraCppFile2.cpp"); //$NON-NLS-1$
+		sources.put("_traces_target_type", Arrays.asList(source1, source2, source3, source4));
+
+		
+		//==================================
+		
+		loc = "traces\\"; //$NON-NLS-1$
+		if (!oldTC && !oldBuilder) {
+			loc = "traces\\target3_dll\\"; //$NON-NLS-1$
+		}
+		tracesHeader1 = new File (epocroot+projectdir+"mmp_traces_mixed\\" + loc + "MultipleMmpApp1Traces.h"); //$NON-NLS-1$ //$NON-NLS-2$
+		tracesHeader2 = new File (epocroot+projectdir+"mmp_traces_mixed\\" + loc + "ExtraCppFile1Traces.h"); //$NON-NLS-1$ //$NON-NLS-2$
+		if (!oldTC && !oldBuilder) {
+			loc = "traces_target4_kext\\"; //$NON-NLS-1$ 
+		}
+		tracesHeader3 = new File (epocroot+projectdir+"mmp_traces_mixed\\" + loc + "MultipleMmpApp2Traces.h"); //$NON-NLS-1$ //$NON-NLS-2$
+		tracesHeader4 = new File (epocroot+projectdir+"mmp_traces_mixed\\" + loc + "ExtraCppFile2Traces.h"); //$NON-NLS-1$ //$NON-NLS-2$		
+		ostTraceDefinitions = new File(epocroot+projectdir+"mmp_traces_mixed\\" + loc + "OstTraceDefinitions.h"); //$NON-NLS-1$
+		fixedidDefinitions = new File(epocroot+projectdir+"mmp_traces_mixed\\" + loc + "fixed_id.definitions"); //$NON-NLS-1$)
+
+		headers.put("_traces_mixed", Arrays.asList(tracesHeader1,tracesHeader2,tracesHeader3,tracesHeader4,ostTraceDefinitions,fixedidDefinitions)); //$NON-NLS-1$		
+		
+		source1 = new File (epocroot+projectdir+"mmp_traces_mixed\\src\\MultipleMmpApp1.cpp"); //$NON-NLS-1$
+		source2 = new File (epocroot+projectdir+"mmp_traces_mixed\\src\\ExtraCppFile1.cpp"); //$NON-NLS-1$
+		source3 = new File (epocroot+projectdir+"mmp_traces_mixed\\src\\MultipleMmpApp2.cpp"); //$NON-NLS-1$
+		source4 = new File (epocroot+projectdir+"mmp_traces_mixed\\src\\ExtraCppFile2.cpp"); //$NON-NLS-1$
+		sources.put("_traces_mixed", Arrays.asList(source1, source2, source3, source4));
+	}
+	
+	
+	/**
+	 * This function invokes raptor on the desired test c++ project
+	 * 
+	 * @param path String specifying the path the compiler needs
+	 * 				  to run from
+	 */
+	public void InvokeCompiler(String path, String builder) {
+		System.out.println ("InvokeCompiler() for : " + builder);
+		
+		List<File> headersList;
+		try{
+			
+			//set up the directory from which the process will be called
+			if (path.compareTo("_traces")==0){ //$NON-NLS-1$
+				headersList = headers.get("_traces"); //$NON-NLS-1$
+				System.out.println("deleting file " + headersList.toString()); //$NON-NLS-1$
+				for (File header : headersList) {
+					if (header.exists()) header.delete();
+				}
+				
+				compilerpath = new File (epocroot+projectdir+"mmp_traces\\group\\"); //$NON-NLS-1$
+			}
+			else if (path.compareTo("_traces_mmpname")==0){ //$NON-NLS-1$
+				headersList = headers.get("_traces_mmpname"); //$NON-NLS-1$
+				System.out.println("deleting file " + headersList.toString()); //$NON-NLS-1$
+				for (File header : headersList) {
+					if (header.exists()) {
+						header.delete();
+					}
+				}
+				
+				compilerpath = new File (epocroot+projectdir+"mmp_traces_mmpname\\group\\");
+			}
+			else if (path.compareTo("_traces_slash_target_ext")==0){
+				headersList = headers.get("_traces_slash_target_ext");
+				System.out.println("deleting file " + headersList.toString());
+				for (File header : headersList) {
+					if (header.exists()) header.delete();
+				}
+				
+				compilerpath = new File (epocroot+projectdir+"mmp_traces_slash_target_ext\\group\\");
+			}
+			else if (path.compareTo("_traces_slash_target_ext_commonsource")==0){
+				headersList = headers.get("_traces_slash_target_ext_commonsource");
+				System.out.println("deleting file " + headersList.toString());
+				for (File header : headersList) {
+					if (header.exists()) header.delete();
+				}
+				
+				compilerpath = new File (epocroot+projectdir+"mmp_traces_slash_target_ext_commonsource\\group\\");
+			}
+			else if (path.compareTo("_traces_target_type")==0){
+				headersList = headers.get("_traces_target_type");
+				System.out.println("deleting file " + headersList.toString());
+				for (File header : headersList) {
+					if (header.exists()) header.delete();
+				}
+				
+				compilerpath = new File (epocroot+projectdir+"mmp_traces_target_type\\group\\");
+			}
+			else if (path.compareTo("_traces_mixed")==0){
+				headersList = headers.get("_traces_mixed");
+				System.out.println("deleting file " + headersList.toString());
+				for (File header : headersList) {
+					if (header.exists()) header.delete();
+				}
+				
+				compilerpath = new File (epocroot+projectdir+"mmp_traces_mixed\\group\\");
+			}
+			else{
+			
+				System.out.println("Error: Unrecognised test case.");
+				fail();
+			}
+			
+			//set up the process builder object
+			sbs_build.directory(compilerpath);
+			sbs_reallyclean.directory(compilerpath);
+			sbs_build.redirectErrorStream(true);
+			
+			
+			
+			Process p;
+			String str = "";
+			//start the compiler
+			System.out.println("Starting build process ....");
+			
+				System.out.println("Running sbs reallyclean on : " + compilerpath + " command: " + sbs_reallyclean.command().toString());
+				p = sbs_reallyclean.start();
+				readProcessOutput(p);
+				System.out.println("Running sbs on : " + compilerpath + " command: " + sbs_build.command().toString());
+				p = sbs_build.start();
+				str = readProcessOutput(p);
+			
+			
+			int ret = p.exitValue();
+			System.out.println("build process ended....");
+			if (ret!=0){
+				System.out.println("build process failed:"+str);
+			}
+		}
+		
+    	catch (Exception e){//Catch exception if any
+    		System.err.println("Error: " + e.getMessage());
+    		fail();
+        }
+		
+	}
+
+
+	static private String readProcessOutput(Process p) throws IOException {
+		InputStream inp = p.getInputStream();
+		
+			int c;
+			String str = "";	        
+			//read the output from the compiler into the input stream
+			while ((c = inp.read()) != -1) {
+		   	 str= str +((char)c);
+			}
+		return str;
+	}
+	
+	/**
+	 * This function checks that the traces header files have been generated in the expected locations
+	 * 
+	 * @param path  String specifying where to look for the traces header file.  		   
+	 */
+	public void checkForTracesHeadersAndLicence(String path) {
+		System.out.println ("CheckForTracesHeaders()");
+		System.out.println("Old Builder : " + oldBuilder + "......Old TC : " + oldTC);
+		List<File> headersList = headers.get(path);
+		List<File> sourceList =  sources.get(path);
+		System.out.println("checking files " + headersList.toString());
+		boolean error = false;
+		if ((path.compareTo("_traces_slash_target_ext")==0 || path.compareTo("_traces_slash_target_ext_commonsource")==0) && oldBuilder && !oldTC){
+			System.out.println("No need to check for header files as old sbs cannot call TC");
+		} else {
+			try {
+				TraceCompilerEngineGlobals.start();
+			} catch (TraceCompilerException e) {
+				fail();
+			}
+			for (File header : headersList) {
+				if (!header.exists()) {
+					error = true;
+					System.out.println("Error: "+header+" does not exist/hasn't been generated by TraceCompiler");
+				} else {
+					String licenceInSource = null;
+					String licenceInHeader = null;
+					File source = null;
+					// read the licence from the header file
+					if (header.getName().trim().equalsIgnoreCase("OstTraceDefinitions.h")) {
+						licenceInSource = TraceCompilerEngineGlobals.getDefaultLicence(true);
+						System.out.println("Reading default licence for OstTraceDefinitions.h" + licenceInSource);
+					} else {
+						if (header.getName().trim().equalsIgnoreCase("fixed_id.definitions")) {
+							licenceInSource = TraceCompilerEngineGlobals.getDefaultLicence(false);
+							System.out.println("Reading default licence for fixed_id.definitions" + licenceInSource);
+						} else {
+							licenceInHeader = readFirstMultiLineComment(header.getAbsolutePath());
+							System.out.println("Reading licence from " + header.getAbsolutePath() + " == " + licenceInHeader);
+							if (licenceInHeader == null) {
+								System.out.println("No licence found in header file, so fail().");
+								fail();
+							}
+							source = sourceList.get(headersList.indexOf(header));
+
+							licenceInSource = readFirstMultiLineComment(source.getAbsolutePath());
+							System.out.println("Reading licence from " + source.getAbsolutePath() + " == " + licenceInSource);
+							if (licenceInSource == null) {
+								//licence should be EPL
+								System.out.println("No licence found in source file, so get default one.");
+								licenceInSource = TraceCompilerEngineGlobals.getDefaultLicence(true);
+								System.out.println("Reading default licence for " + header.getAbsolutePath() + " == " + licenceInSource);
+							}
+						}
+					}
+					if (licenceInHeader != licenceInHeader) {
+						System.out.println("Error: licence in header " + header + " is not the same in source." + source);
+						fail();
+					}
+				}
+			}
+		
+			if(!error){
+				System.out.println("All Traces Header files have been generated as expected");
+			}
+			else {
+				fail();
+				}
+		}
+	}
+
+
+	/**
+	 * @param path
+	 */
+	private String readFirstMultiLineComment(String path) {
+		StringBuffer sb = new StringBuffer();
+		try {
+			FileReader reader = new FileReader(new File(path));
+			BufferedReader br = new BufferedReader(reader);
+			String line;
+			boolean inComment = false;
+			
+			while ((line = br.readLine()) != null) {
+				if (line.trim().startsWith("/*")) {
+					inComment = true;
+				}
+				if (inComment) {
+					sb.append(line + System.getProperty("line.separator"));
+				}
+				if (line.trim().endsWith("*/") && inComment) {
+					break;
+				}
+			}
+			br.close();
+		} catch (Exception e) {
+			System.out.println("Failed to open/read file " + path + "  " + e.getMessage());
+			fail();
+		}
+		String licence = null;
+		if (sb.length()> 0) {
+			licence = sb.toString();
+			if (!licence.contains("Copyright")) {
+				licence = null;
+			}
+		}
+			
+		return licence;
+	}
+	
+
+	/****************************************************ACTUAL TESTS************************************************************/
+	@Test
+	public void MultipleMmpsTest1 (){
+		System.out.println ("*********************traces****************************");
+		createListHeadersDicts("sbs");
+		//Call Raptor
+		InvokeCompiler("_traces", "sbs");		
+		//Check for header files
+		checkForTracesHeadersAndLicence("_traces");		
+	
+	}
+	
+
+	@Test
+	public void MultipleMmpsTest2 (){
+		System.out.println ("****************traces_mmpname**********************");
+		createListHeadersDicts("sbs");
+		//Call Raptor
+		InvokeCompiler("_traces_mmpname", "sbs");
+		//Check for header files
+		checkForTracesHeadersAndLicence("_traces_mmpname");		
+		
+	}
+	
+
+	@Test
+	public void MultipleMmpsTest3 (){
+		System.out.println ("**********traces_slash_target_ext****************");
+		createListHeadersDicts("sbs");
+		//Call Raptor
+		InvokeCompiler("_traces_slash_target_ext", "sbs");
+		//Check for header files
+		checkForTracesHeadersAndLicence("_traces_slash_target_ext");		
+		
+	}
+
+	@Test
+	public void MultipleMmpsTest4 (){
+		System.out.println ("**********traces_slash_target_ext_commonsource****************");
+		createListHeadersDicts("sbs");
+		//Call Raptor
+		InvokeCompiler("_traces_slash_target_ext_commonsource", "sbs");
+		//Check for header files
+		checkForTracesHeadersAndLicence("_traces_slash_target_ext_commonsource");						
+	}
+
+	@Test
+	public void MultipleMmpsTest5 (){
+		System.out.println ("**********traces_target_type****************");
+		createListHeadersDicts("sbs");
+		//Call Raptor
+		InvokeCompiler("_traces_target_type", "sbs");
+		//Check for header files
+		checkForTracesHeadersAndLicence("_traces_target_type");
+	}
+
+	@Test
+	public void MultipleMmpsTest6 (){
+		System.out.println ("**********traces_mixed****************");
+		createListHeadersDicts("sbs");
+		//Call Raptor
+		InvokeCompiler("_traces_mixed", "sbs");
+		//Check for header files
+		checkForTracesHeadersAndLicence("_traces_mixed");
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/src/TraceLocationConverterTest.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,82 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+
+import com.nokia.tracecompiler.TraceCompilerRootException;
+import com.nokia.tracecompiler.engine.*;
+import static org.junit.Assert.*;
+import java.io.*;
+
+import org.junit.Test;
+
+import com.nokia.tracecompiler.project.*;
+
+
+public class TraceLocationConverterTest { 
+
+	
+	public static void main(String args[]) {		
+	      	org.junit.runner.JUnitCore.main(TraceLocationConverterTest.class.getName());
+	    }
+	
+	@Test
+    public void searchForOldGroupIdsTest() {  
+		
+		
+		try {
+			GroupNames.initialiseGroupName();
+		} catch (TraceCompilerRootException e) {
+			fail();
+		}
+		
+		
+		assertTrue("Test case 1",TraceLocationConverter.searchForOldGroupIds(""));
+		assertTrue("Test case 1",TraceLocationConverter.searchForOldGroupIds("                              "));
+		assertTrue("Test case 1",TraceLocationConverter.searchForOldGroupIds("123456789"));
+		assertFalse("Test case 1",TraceLocationConverter.searchForOldGroupIds("TRACE_FATAL=0x1"));
+		assertFalse("Test case 1",TraceLocationConverter.searchForOldGroupIds("TRACE_IMPORTANT=0x2"));
+		assertFalse("Test case 1",TraceLocationConverter.searchForOldGroupIds("TRACE_NORMAL=0x77"));
+		assertFalse("Test case 1",TraceLocationConverter.searchForOldGroupIds("TRACE_PERFORMANCE=0x4"));
+		assertFalse("Test case 1",TraceLocationConverter.searchForOldGroupIds("TRACE_STATE=0x5"));
+		assertFalse("Test case 1",TraceLocationConverter.searchForOldGroupIds("TRACE_STATE=5"));
+		assertFalse("Test case 1",TraceLocationConverter.searchForOldGroupIds("TRACE_STATE=5555"));
+		assertFalse("Test case 1",TraceLocationConverter.searchForOldGroupIds("TRACE_STATE=565nh"));
+		assertFalse("Test case 1",TraceLocationConverter.searchForOldGroupIds("TRACE_API=0x6"));
+		assertFalse("Test case 1",TraceLocationConverter.searchForOldGroupIds("TRACE_FLOW=0x7"));
+		assertFalse("Test case 1",TraceLocationConverter.searchForOldGroupIds("TRACE_DETAILED=0x8"));
+		assertFalse("Test case 1",TraceLocationConverter.searchForOldGroupIds("TRACE_DEBUG=0x9"));
+		assertFalse("Test case 1",TraceLocationConverter.searchForOldGroupIds("USER_DEFINED_TRACE=0xA1"));
+		assertTrue("Test case 1",TraceLocationConverter.searchForOldGroupIds("USER_DEFINED_TRACE=0xEA"));
+		assertTrue("Test case 1",TraceLocationConverter.searchForOldGroupIds("TRACE_FATAL=0x81"));
+		assertTrue("Test case 1",TraceLocationConverter.searchForOldGroupIds("TRACE_ERROR=0x82"));
+		assertTrue("Test case 1",TraceLocationConverter.searchForOldGroupIds("TRACE_WARNING=0x83"));
+		assertTrue("Test case 1",TraceLocationConverter.searchForOldGroupIds("TRACE_BORDER=0x84"));
+		assertTrue("Test case 1",TraceLocationConverter.searchForOldGroupIds("TRACE_API=0x84"));
+		assertTrue("Test case 1",TraceLocationConverter.searchForOldGroupIds("TRACE_IMPORTANT=0x85"));
+		assertTrue("Test case 1",TraceLocationConverter.searchForOldGroupIds("TRACE_NORMAL=0x86"));
+		assertTrue("Test case 1",TraceLocationConverter.searchForOldGroupIds("TRACE_STATE=0x87"));
+		assertTrue("Test case 1",TraceLocationConverter.searchForOldGroupIds("TRACE_INTERNALS=0x88"));
+		assertTrue("Test case 1",TraceLocationConverter.searchForOldGroupIds("TRACE_DUMP=0x89"));
+		assertTrue("Test case 1",TraceLocationConverter.searchForOldGroupIds("TRACE_DEBUG=0x89"));
+		assertTrue("Test case 1",TraceLocationConverter.searchForOldGroupIds("TRACE_FLOW=0x8a"));
+		assertTrue("Test case 1",TraceLocationConverter.searchForOldGroupIds("TRACE_PERFORMANCE=0x8b"));
+		assertTrue("Test case 1",TraceLocationConverter.searchForOldGroupIds("TRACE_ADHOC=0x8c"));
+		assertTrue("Test case 1",TraceLocationConverter.searchForOldGroupIds("TRACE_EXTENSION=0x8d"));
+	}
+	
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/src/TracesInHeadersTest.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,210 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+
+import static org.junit.Assert.fail;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+
+public class TracesInHeadersTest {
+	
+		public static void main(String args[]) {		
+	      	org.junit.runner.JUnitCore.main(TracesInHeadersTest.class.getName());
+	    }
+	/****************************************************UTILITY FUNCTIONS FOR TESTS************************************************************/
+	
+	private static String epocroot = null; 
+	private static String projectdir = "testdata\\TracesInHeadersApps\\"; //$NON-NLS-1$
+	private static File compilerpath;
+	private static ProcessBuilder sbs_build = new ProcessBuilder("sbs.bat","-k","-c","winscw_udeb.tracecompiler");
+	private static ProcessBuilder sbs_reallyclean = new ProcessBuilder("sbs.bat","-k","-c","winscw_udeb.tracecompiler", "reallyclean");
+
+	@BeforeClass
+	static public void setEnvVariables() {
+		epocroot = System.getenv("EPOCROOT"); //$NON-NLS-1$
+		if(epocroot == null || (epocroot.length()==0)){
+			fail();
+		}
+		
+		// need to check that the path ends in a backslash
+		if(!epocroot.endsWith("\\")){ 
+			epocroot += "\\"; 
+		}
+	}
+	
+	
+	/**
+	 * This function invokes raptor on the desired test c++ project
+	 * 
+	 * @param path String specifying the path the compiler needs
+	 * 				  to run from
+	 */
+	public void InvokeCompiler(String path, String builder) {
+		System.out.println ("InvokeCompiler() for : " + builder);
+		
+		try{
+			
+			//set up the directory from which the process will be called
+			if (path.compareTo("_diffnames")==0){ //$NON-NLS-1$
+				
+				compilerpath = new File (epocroot+projectdir+"singlemmp_diffnames\\group\\"); //$NON-NLS-1$
+			} else if (path.compareTo("_samenames")==0){ //$NON-NLS-1$
+				
+				compilerpath = new File (epocroot+projectdir+"singlemmp_samenames\\group\\"); //$NON-NLS-1$
+			} else if (path.compareTo("_diffnames_tracesplus")==0){ //$NON-NLS-1$
+				
+				compilerpath = new File (epocroot+projectdir+"singlemmp_diffnames_tracesplus\\group\\"); //$NON-NLS-1$
+			} else if (path.compareTo("_samenames_tracesplus")==0){ //$NON-NLS-1$
+				
+				compilerpath = new File (epocroot+projectdir+"singlemmp_samenames_tracesplus\\group\\"); //$NON-NLS-1$
+			} else if (path.compareTo("_samenames")==0){ //$NON-NLS-1$
+				
+				compilerpath = new File (epocroot+projectdir+"singlemmp_samenames\\group\\"); //$NON-NLS-1$
+			} else if (path.compareTo("_separate_source")==0){ //$NON-NLS-1$
+				
+				compilerpath = new File (epocroot+projectdir+"multmmp_separate_source\\group\\"); //$NON-NLS-1$
+			} else if (path.compareTo("_comm_source")==0){ //$NON-NLS-1$
+				
+				compilerpath = new File (epocroot+projectdir+"multmmp_comm_source\\group\\"); //$NON-NLS-1$
+			} else if (path.compareTo("_comm_source_tracesplus")==0){ //$NON-NLS-1$
+				
+				compilerpath = new File (epocroot+projectdir+"multmmp_comm_source_tracesplus\\group\\"); //$NON-NLS-1$
+			} else if (path.compareTo("_import")==0){ //$NON-NLS-1$
+				
+				compilerpath = new File (epocroot+projectdir+"singlemmp_import\\group\\"); //$NON-NLS-1$
+			} 
+			else{
+			
+				System.out.println("Error: Unrecognised test case.");
+				fail();
+			}
+			
+			//set up the process builder object
+			sbs_build.directory(compilerpath);
+			sbs_reallyclean.directory(compilerpath);
+			sbs_build.redirectErrorStream(true);
+						
+			Process p = null;
+			String str = "";
+			//start the compiler
+			System.out.println("Starting build process ....");
+
+				System.out.println("Running sbs reallyclean on : " + compilerpath + " command: " + sbs_reallyclean.command().toString());
+				p = sbs_reallyclean.start();
+				readProcessOutput(p);
+				System.out.println("Running sbs on : " + compilerpath + " command: " + sbs_build.command().toString());
+				p = sbs_build.start();
+				str = readProcessOutput(p);
+			
+			int ret = p.exitValue();
+			System.out.println("build process ended....");
+			if (ret!=0){
+				if (path.compareTo("_import")==0){ //$NON-NLS-1$
+					System.out.println("build process expected to fail: "+str);
+				} else {
+					System.out.println("build process failed:"+str);
+					fail();
+				}
+			}
+		}
+		
+    	catch (Exception e){//Catch exception if any
+    		System.err.println("Error: " + e.getMessage());
+    		fail();
+        }
+		
+	}
+
+
+	static private String readProcessOutput(Process p) throws IOException {
+		InputStream inp = p.getInputStream();
+		
+			int c;
+			String str = "";	        
+			//read the output from the compiler into the input stream
+			while ((c = inp.read()) != -1) {
+		   	 str= str +((char)c);
+			}
+		return str;
+	}
+
+	
+
+	/****************************************************ACTUAL TESTS************************************************************/
+	@Test
+	public void TracesInHeradersTest1 (){
+		System.out.println ("*********************single mmp with diff names****************************");
+		//Call Raptor
+		InvokeCompiler("_diffnames", "sbs");
+	}
+	
+	@Test
+	public void TracesInHeradersTest2 (){
+		System.out.println ("*********************single mmp with same names****************************");
+		//Call Raptor
+		InvokeCompiler("_samenames", "sbs");
+	}
+	
+	@Test
+	public void TracesInHeradersTest3 (){
+		System.out.println ("*********************single mmp with diff names and using tarce/<taget>_<ext>****************************");
+		//Call Raptor
+		InvokeCompiler("_diffnames_tracesplus", "sbs");
+	}
+	
+	@Test
+	public void TracesInHeradersTest4 (){
+		System.out.println ("*********************single mmp with same names and using tarce/<taget>_<ext>****************************");
+		//Call Raptor
+		InvokeCompiler("_samenames_tracesplus", "sbs");
+	}
+	
+	@Test
+	public void TracesInHeradersTest5 (){
+		System.out.println ("*********************multiple mmp with separate source ****************************");
+		//Call Raptor
+		InvokeCompiler("_separate_source", "sbs");
+	}
+	
+	@Test
+	public void TracesInHeradersTest6 (){
+		System.out.println ("*********************multiple mmp with common source ****************************");
+		//Call Raptor
+		InvokeCompiler("_comm_source", "sbs");
+	}
+	
+	@Test
+	public void TracesInHeradersTest7 (){
+		System.out.println ("*********************multiple mmp with common source and traces/<target>_<ext> ****************************");
+		//Call Raptor
+		InvokeCompiler("_comm_source_tracesplus", "sbs");
+	}
+	
+	@Test
+	public void TracesInHeradersTest8 (){
+		System.out.println ("*********************Traces in header exported to epoc32 by another mmp****************************");
+		//Call Raptor
+		InvokeCompiler("_import", "sbs");
+	}
+	
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/testdata/test_opensystemtrace_types.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,532 @@
+/**
+* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+* Trace API
+*
+*/
+
+
+
+/**
+ @file
+ @publishedPartner
+ @prototype
+*/
+
+
+#ifndef OPENSYSTEMTRACE_TYPES_H
+#define OPENSYSTEMTRACE_TYPES_H
+
+#ifdef __KERNEL_MODE__
+#include <kernel.h>
+#else //__KERNEL_MODE__
+#include <e32std.h>
+#endif //__KERNEL_MODE__
+
+
+/**
+@file
+@publishedPartner
+@prototype
+*/
+
+
+/**
+ * Every trace point must be statically assigned a group ID. This is
+ * essentially a “label” that allows identification of the intended use of
+ * the trace packets generated by the trace point. The Group ID will either 
+ * reflect a system wide Tracing use cases, such as identifying why a panic 
+ * occurred, or is assigned a meaning specific to a component, such as the 
+ * heap trace output from the kernel. In essence the Group ID is a way of 
+ * indicating that trace points / packets are related in some way. 
+ * @see TGroupIdRange for more information.
+ */
+typedef TUint8  TGroupId;
+
+/**
+ * The maximum possible value for TGroupId
+ */
+const static TGroupId KMaxGroupId = 255; // 2^8 - 1
+
+/**
+ * @deprecated Use TGroupId instead
+ * @see TGroupId
+ */
+typedef TUint8  TClassification;
+
+/**
+ * @deprecated Use KMaxGroupId instead
+ * @see KMaxGroupId
+ */
+const static TClassification KMaxClassification = KMaxGroupId;
+
+/**
+ * Each trace point must be statically assigned a ComponentId to indicate the
+ * module in which the trace point is defined. It should always be the UID3
+ * of the binary containing the trace point associated with the component ID. 
+
+ * The ComponentId and Group ID attributes of a trace point are independent.
+ */
+typedef TUint32 TComponentId;
+
+/**
+ * The maximum possible value for TComponentId
+ */
+const static TComponentId KMaxComponentId = 0xFFFFFFFF; // 2^32 - 1, or 4294967295 - 1
+
+/**
+ * The EXECUTABLE_DEFAULT_COMPONENTID can be used to define your own default
+ * specific ComponentId. This is done by defining the macro to be your new
+ * default value.
+ */
+#ifdef EXECUTABLE_DEFAULT_COMPONENTID
+#define FW_DEFAULT_COMPONENTID EXECUTABLE_DEFAULT_COMPONENTID
+#else
+#define FW_DEFAULT_COMPONENTID TTraceContext::DefaultComponentId()
+#endif
+
+/**
+ * Trace IDs have two functions in a trace packet:
+ * 
+ * 1. They identify the individual trace point that created the trace packet.
+ * 2. They specify the format of the trace packet payload. 
+ * 
+ * This only works if the Trace ID value is unique for a given Group ID and 
+ * Component ID, if present, and should be statically assigned during development 
+ * when a trace point is created.  
+ * 
+ * The meaning of a TraceId is specific to the ComponentId and Group ID of the
+ * associated trace point.
+ */
+typedef TUint16 TTraceId;
+
+/**
+ * The maximum possible value for TTraceId
+ */
+const static TTraceId KMaxTraceId = 65535; // 2^16 - 1
+
+/**
+ * Used in packets produced by the Print and Printf functions.
+ *
+ * Note that this format should not be used on the
+ * device by clients of OST. This symbol is only marked
+ * as published to partners to give host side tools access to
+ * it.
+ *
+ * @deprecated No replacement is provided as this symbol is no 
+ * longer needed as a result of the alignment of trace attributes 
+ * in OSTv2.
+ * @see TTraceId
+ */
+const static TTraceId KFormatPrintf = 0;
+
+/**
+ * Used in packets produced by the Print and Printf functions 
+ * for unicode descriptors.
+ *
+ * Note that this format should not be used on the
+ * device by clients of OST. This symbol is only marked
+ * as published to partners to give host side tools access to
+ * it.
+ * 
+ * @deprecated No replacement is provided as this symbol is no 
+ * longer needed as a result of the alignment of trace attributes 
+ * in OSTv2.
+ * @see TTraceId
+ */
+const static TTraceId KFormatPrintfUnicode = 1;
+
+/**
+ * This value was used by UTFv2 clients to specify the start of 
+ * the range of enums used to define their format ids. This is 
+ * no longer necessary as in OSTv2 clients are allowed to use the
+ * whole range without exception. 
+ *
+ * @deprecated No replacement is provided as this symbol is no 
+ * longer needed as a result of the alignment of trace attributes 
+ * in OSTv2.
+ * @see TTraceId
+ */
+const static TTraceId KInitialClientFormat = 512;
+
+/**
+ * Include the thread identification into the trace packet at run-time.
+ * The thread identification is used as an identifier to resolve
+ * thread and process names in conjunction with
+ * Group ID EThreadIdentification = 3.
+ */
+enum THasThreadIdentification
+    {
+    /** Do add the thread identification to the trace packet */
+    EAddThreadIdentification = ETrue,
+    /** Don't add the thread identification */
+    ENoThreadIdentification = EFalse
+    };
+
+
+/**
+ * The EXECUTABLE_DEFAULT_HAS_THREAD_IDENTIFICATION can be used to
+ * define the default setting for adding or not adding the thread
+ * identification in a trace packet. This is done by defining
+ * the macro to be your new default value.
+ */
+#ifdef EXECUTABLE_DEFAULT_HAS_THREAD_IDENTIFICATION
+#define FW_DEFAULT_HAS_THREAD_IDENTIFICATION EXECUTABLE_DEFAULT_HAS_THREAD_IDENTIFICATION
+#else
+#define FW_DEFAULT_HAS_THREAD_IDENTIFICATION EAddThreadIdentification
+#endif
+
+
+/**
+ * Add the program counter into the trace packet at run-time.
+ * The program counter is used to indicate where the CPU is in the
+ * instruction sequence. This can be used to locate the line of code
+ * or routine the trace was sent from.
+ */
+enum THasProgramCounter
+    {
+    /** Do add the program counter to the trace packet. */
+    EAddProgramCounter = ETrue,
+    /** Don't add the program counter */
+    ENoProgramCounter = EFalse
+    };
+
+
+/**
+ * The EXECUTABLE_DEFAULT_HAS_PC can be used to
+ * define the default setting for adding or not adding the
+ * program counter in a trace packet. This is done by defining
+ * the macro to be your new default value.
+ */
+#ifdef EXECUTABLE_DEFAULT_HAS_PC
+#define FW_DEFAULT_HAS_PC EXECUTABLE_DEFAULT_HAS_PC
+#else
+#define FW_DEFAULT_HAS_PC ENoProgramCounter
+#endif
+
+/**
+ * The division of the Group IDs into different ranges aims to manage the
+ * contention for the namespace.
+ *
+ * It is recommended that all developers use the Reserved range as far as possible.
+ *
+ * @see TGroupId
+ */
+enum TGroupIdRange
+    {
+    /**
+     * The Group IDs in the Reserved range should be used by the majority of trace
+     * points. This range of Group IDs are intended to identify which of the
+     * most common trace use-cases a trace point is contributing to. They are unique
+     * across the system.
+     *
+     * The Group IDs in this series are defined solely by the Symbian Foundation but are
+     * intended for use by any software on a device.
+     *
+     * These Group IDs should only be enabled at run-time if the filtering on
+     * ComponentIds functionality is also enabled. This is to avoid accidentally causing
+     * trace live-locks from occurring when just the Group IDs is enabled. This could
+     * happen because trace points in components involved in the current trace output
+     * path might also be assigned these Group IDs. Filtering on ComponentIds means
+     * that those trace points can be activated only when it’s known to be safe to do
+     * so and not accidentally enabled with a Group IDs.
+     *
+     * @see TGroupIdReserved
+     */
+    EOstReservedRangeFirst = 0,
+
+    /**
+     * @see EOstReservedRangeFirst
+     */
+    EOstReservedRangeLast = 221,
+
+    /**
+     * The meaning of Group IDs in this range are defined on a per-component basis.
+     * They are to be unique within a component.
+     */
+    EUserDefinedRangeFirst = 222,
+
+    /**
+     * @see EUserDefinedRangeFirst
+     */
+    EUserDefinedRangeLast = 253,
+    
+    /**
+     * Only for use on the device by test code.
+     *
+     * Trace points with these Group IDs should not be released as part of a
+     * production device.
+     */
+    ETestingRangeFirst = 154,
+
+    /**
+     * @see ETestingRangeFirst
+     */
+    ETestingRangeLast = KMaxGroupId
+    };
+
+/**
+ * The Group IDs in the Reserved range should be used by the majority of
+ * trace points. This range of Group IDs are intended to identify which
+ * of the most common trace use-cases a trace point is contributing to.
+ *
+ * @see TGroupId
+ * @see TGroupIdRange
+ * @see EOstReservedRangeFirst
+ */
+enum TGroupIdReserved
+    {
+    /**
+     * Used when a fatal error, such as a panic, has occurred or when providing information 
+     * on the execution state immediately before the decision to panic.
+     *
+     * A trace point with this Group ID should be used when a fatal condition is detected 
+     * which will result in the flow of execution being halted in the thread associated with 
+     * the trace point.
+     *
+     * Can also provide information describing where a panic has been dealt with. 
+     *
+     * Trace points using this Group ID should be present in a release device. 
+     */
+    TRACE_FATAL = 149,
+
+    /**
+     * Used when an error has occurred which means that the current operation cannot continue 
+     * but is not sufficiently serious to cause a fatal error. These trace packets should 
+     * contain not just the error code but any relevant information about the execution state 
+     * when the error occurred.
+     *
+     * To be used for all types of error including include situations where the errors are 
+     * returned from a function or via a leave. 
+     *
+     * This Group ID also provides information describing where an error has been handled. 
+     */
+    TRACE_ERROR=150,
+
+    /**
+     * Used when something unexpected or unusual has occurred that does not stop the
+     * current operation from happening but may result in unintended side effects or
+     * actual errors later on.
+     */
+    TRACE_WARNING = 151,
+
+    /**
+     * Used to describe activity at the edges of a trace component. 
+     *
+     * Includes data about exported or published functions defined by a trace component as 
+     * well as calls out of the component to get significant information. Exactly what 
+     * is significant depends on the trace component in question. For instance, reading in a 
+     * setting from an INI file would be significant but calling RArray::Count() would not be. 
+     *
+     * The information in this Group ID should be enough to allow someone unfamiliar with the 
+     * trace component to get a high level understanding of what functionality it has executed.
+     */
+    TRACE_BORDER = 152,
+    
+    /**
+    * @deprecated Use TRACE_BORDER instead
+    */
+    TRACE_API = TRACE_BORDER,
+    
+    /**
+     * @deprecated Use TRACE_NORMAL or one of the other reserved Group IDs instead
+     */
+    TRACE_IMPORTANT = 153,
+    
+    /**
+     * Used to described the normal activity within a trace component that might be of interest
+     * to people who use the component.
+     *
+     * The information in this Group ID should be enough to allow someone unfamiliar with the 
+     * trace component to start to understand why a component is behaving the way it is perhaps 
+     * to help with diagnosing problems with the way the component is being used.
+     */
+    TRACE_NORMAL = 154,
+
+    /**
+     * Intended for tracing the state transitions of an application or service such as those
+     * performed by a machine.
+     *
+     * Trace packets using this Group ID should contain the name of the
+     * changed state variable and the new value.
+     */
+    TRACE_STATE  = 155,
+
+    /**
+     * Used to provide detailed information about the normal activity of a trace component
+     * to help a developer, who is familiar with the component, to understand what it is doing.
+     */
+    TRACE_INTERNALS = 156,
+
+    /**
+    * @deprecated Use TRACE_INTERNALS instead
+    */
+    TRACE_DETAILED = TRACE_INTERNALS,
+    
+    /**
+     * Used when there is a need to output large amounts of data through individual trace
+     * points that would likely cause significant intrusion if included under one of the
+     * other Group IDs.
+     *
+     * This Group ID is intended to be used in conjunction with the TRACE_INTERNALS
+     * Group ID to provide more details when debugging a specific trace component.
+     */
+    TRACE_DUMP = 157,
+
+    /**
+    * @deprecated Use TRACE_DUMP instead
+    */    
+    TRACE_DEBUG = TRACE_DUMP,
+    
+    /**
+     * Used to provide comprehensive information on what paths the execution takes within
+     * functions.
+     *
+     * This Group ID is intended mainly to be used by tools that add temporary instrumentation 
+     * points specifically to output this data.
+     */
+    TRACE_FLOW = 158,
+
+    /**
+     * Used to output data about the execution time, memory usage, disk usage, power
+     * utilisation and any other performance characteristics of the associated trace 
+     * component.
+     *
+     * This data may need to be processed before it can provide effective metrics. E.g.
+     * the time between two timestamps might need to be computed.
+     *
+     * Intended only to be used to output a small amount of data to ensure that it 
+     * creates the smallest possible intrusion since otherwise the act of tracing would 
+     * devalue the information it is intended to provide.
+     */
+    TRACE_PERFORMANCE = 159,
+
+    /**
+     * May be used when adding temporary trace points during a debugging session to 
+     * distinguish them from existing instrumentation. 
+     */
+    TRACE_ADHOC = 160,
+    
+    /**
+     * This Group ID is reserved for future use to allow the Group ID range to be expanded 
+     * to cover more than current 256 different values.
+     *
+     * If trace is output on this Group ID at some point in the future then this indicates 
+     * that another mechanism (yet to be decided) will be used to indicate the actual 
+     * Group ID for the trace.
+     */
+    TRACE_EXTENSION = 161,
+
+    /**
+	 * Not intended to be used by code including this header.
+	 * 
+     * Provided to allow the following compile time assert (should NOT be used):
+     * EGroupIdReservedHighWaterMark <= EOstReservedRangeLast + 1
+     *
+     */
+    EGroupIdReservedHighWaterMark
+    } ;
+
+// Check high water mark for the reserved Group ID range
+__ASSERT_COMPILE(EGroupIdReservedHighWaterMark <= EOstReservedRangeLast + 1);
+
+/**
+ * @see TGroupId
+ * @see ETestingRangeFirst
+ * @test
+ */
+enum TGroupIdTesting
+    {
+    /**
+     * This Group ID may be used for testing purposes and is not intended to be used in 
+     * production code. 
+     */
+    TRACE_TESTING1 = ETestingRangeFirst,
+
+    /**
+     * The same as for TRACE_TESTING1
+     */
+    TRACE_TESTING2 = 155,
+
+    /**
+	 * Not intended to be used by code including this header.
+	 * 
+     * Provided to allow the following compile time assert (should NOT be used):
+     * EGroupIdTestingHighWaterMark <= ETestingRangeLast + 1
+     *
+     */
+    EGroupIdTestingHighWaterMark
+    };
+
+// Check high water marks for the testing Group ID range
+__ASSERT_COMPILE(EGroupIdTestingHighWaterMark <= ETestingRangeLast + 1);
+
+/**
+ * @deprecated Use enumerations from TGroupIdReserved instead
+ * @see TGroupId
+ * @see TGroupIdRange
+ * @see EOstReservedRangeFirst
+ */
+enum TClassificationAll
+    {
+    EPanic = TRACE_FATAL,
+    EError = TRACE_ERROR,
+    EWarning = TRACE_WARNING,
+    EBorder = TRACE_BORDER,
+    EState = TRACE_STATE,
+    EInternals = TRACE_INTERNALS,
+    EDump = TRACE_DUMP,
+    EFlow = TRACE_FLOW,
+    ESystemCharacteristicMetrics = TRACE_PERFORMANCE,
+    EAdhoc = TRACE_ADHOC,
+    EClassificationAllHighWaterMark
+    };
+
+// Check high water mark for the 'All' classification range
+__ASSERT_COMPILE(EClassificationAllHighWaterMark <= EOstReservedRangeLast + 1);
+
+/**
+ * @deprecated Use enumerations from TGroupIdReserved instead
+ * @see TGroupId
+ * @see TGroupIdRange
+ * @see EOstReservedRangeFirst
+ */
+enum TClassificationSymbianTwo
+	{
+	EClassificationExtension = TRACE_EXTENSION,
+	EClassificationSymbianTwoHighWaterMark
+	};
+
+// Check high water marks for the Symbian Two classification range
+__ASSERT_COMPILE(EClassificationSymbianTwoHighWaterMark <= EOstReservedRangeLast + 1);
+
+/**
+ * @deprecated Use enumerations from TGroupIdTesting instead
+ * @see TGroupId
+ * @see TGroupIdRange
+ * @see ETestingRangeFirst
+ * @test
+ */
+enum TClassificationTesting
+	{
+	ETesting1 = TRACE_TESTING1,
+	ETesting2 = TRACE_TESTING2,
+	EClassificationTestingHighWaterMark,
+	};
+
+// Check high water marks for classification ranges
+__ASSERT_COMPILE(EClassificationTestingHighWaterMark <= ETestingRangeLast + 1);
+
+
+#endif //OPENSYSTEMTRACE_TYPES_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/tracecompiler/readme.txt	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,75 @@
+------------TraceCompiler------------
+
+
+
+----What is TraceCompiler?----
+
+TraceCompiler will find OST (Open System Trace) traces from source files and generate needed headers and decode files for them
+during component compilation time.
+
+
+
+----What are OST traces?----
+
+Open System Trace traces. Macros can be found from the header OpenSystemTrace.h. OST is a binary tracing concept for good performance
+and run-time activation of traces.
+
+
+
+----How to set up TraceCompiler?----
+
+Remove comments before exports from group folder bld.inf
+When compiled from the group folder, will export itself to /epoc32/tools folder.
+
+Usually TraceCompiler is already integrated to Symbian build system, so there is no need to run TraceCompiler separately. Symbian build system calls 
+TraceCompiler automatically during component compilation. 
+
+If TraceCompiler is not integrated to build system but is needed to be run automatically when building a component
+abld.pl in /epoc32/tools/ needs to be changed to call tracecompiler.pl file. Note that the change might already be there.
+
+Change is done after a line like this:
+  "foreach $LoopBld (@Blds) {"
+			
+And the change is this: (First line is comment)
+
+	# Add the TraceCompiler once to the Calls array when TARGET is called
+	$Command eq "TARGET" and not scalar grep(/tracecompiler\.pl/,@Calls) and push @Calls, "perl /epoc32/tools/tracecompiler.pl $Plat $Program";
+
+
+		
+----How to use TraceCompiler?----
+
+Usually TraceCompiler is already integrated to Symbian build system, so there is no need to run TraceCompiler separately. Symbian build system calls 
+TraceCompiler automatically during component compilation. 
+
+If there is need to run TraceCompiler manually, it can be done following way:
+
+   perl /epoc32/tools/tracecompiler.pl <platform> [program]
+
+   For example: perl /epoc32/tools/tracecompiler.pl armv5
+		
+
+
+----How to actually get the traces?----
+Open System Trace macros use Symbian BTrace framework to forward the traces. To get these traces, you must implement a trace handler which will
+register itself to the Symbian BTrace using command BTrace::SetHandler( MyHandler ). Then it's up to you what to do with the traces.
+
+
+
+----What is happening in TraceCompiler?----
+
+1. tracecompiler.pl first runs a Java check to ensure that Java 1.5 or newer is found from the system. If this fails, tracecompiler.pl will exit.
+	 
+   If Java check is OK, tracecompiler.pl opens a "abld.bat" file which is generated by command "bldmake bldfiles". From that file, a path to
+   MAKEFILE generated by "bldmake bldfiles" is searched. This MAKEFILE is then opened and is parsed for a list of project MMP files. These MMP
+   files are then forwarded to the tracecompiler_parse_mmp.pl script.
+	 
+2. tracecompiler_parse_mmp.pl gets a MMP file as a parameter. It parses the MMP file for UID of the component and paths to all the source files.
+	 NOTE that MACROS are NOT supported! If UID cannot be found from the MMP file, tracecompiler_parse_mmp.pl will exit. If UID is found,
+	 TraceCompiler Java application is started and the component UID is given to it as a parameter. After it's started, component name, the path
+	 to the MMP file of the component and a list of source paths are send to STDOUT of TraceCompiler Java application. When all source paths are
+	 send, tracecompiler_parse_mmp.pl sends end tag "*ENDOFSOURCEFILES*" to TraceCompiler so it knows all the sources are then sent.
+	 
+3. TraceCompiler Java application listens to STDIN for component name, MMP file path and the paths to the source files. When it receives
+   "*ENDOFSOURCEFILES*" tag, it starts processing the source files. It finds all OST traces from the source files and generates needed headers
+   for the application to compile properly. It also generates autogen header and Symbian Dictionary file from the traces.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/tracecompiler/release_note.txt	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,112 @@
+NOTE: JRE1.5 is needed to run TraceCompiler.
+
+TraceCompiler 2.3.0
+
+New stuff in 2.3.0
+	- TraceCompiler refactored for Symbian Foundation.
+
+
+New stuff in 2.2.4
+	- Bug Fix - Trace compiler entry/exit errors with no paramter or return value
+	- Allow TAB in trace point text.
+	- Allow trace point text to span over multiple lines but TraceCompiler removes the line-feed character.
+	- improve the code to create the trace folder path to avoid any hickups in multiple mmp projects
+	- Improve the build.xml for raptor to build only the rel version of TraceCompiler and therfore avoid the clash between rel and deb when creating traceCompiler.zip file.
+
+New stuff in 2.2.3
+	- Bug Fix - 10. DEF144527: Critical - Adding OST to .h or .inl files can cause OstTraceGenX(...) redefined errors
+	
+New stuff in 2.2.2
+	- Bug fix - TCF-525 Critical: (TSW:EJRK-842AW2) IDO BAT - KernelHooks_Component is missing from pmd file
+
+New stuff in 2.2.1
+
+	- Change - TraceCompiler now support mulitple mmps in one bld.inf by provinding an new command 
+		line interface wher users can pass the traces folder in. This is a continuation of the 
+		previous release to enable the new feature for abld.
+
+New stuff in 2.2.0
+
+	- Change - TraceCompiler now support mulitple mmps in one bld.inf by provinding an new command 
+		line interface wher users can pass the traces folder in.
+New stuff in 2.1.1 - 2.1.2
+
+	- Bug fix - TraceCompiler did not parse function parameter correctly in all cases
+	- Bug fix - TraceCompiler did not work in Linux
+  
+New stuff in 2.0.0 - 2.0.1
+
+	- Change - TraceCompiler automatically converts deprecated group names to valid group names
+               (TRACE_API -> TRACE_BORDER, TRACE_DEBUG- > TRACE_DUMP, TRACE_DETAILED -> TRACE_INTERNALS)
+	- Bug fix - TraceCompiler did not work in Linux 
+	
+New stuff in 1.3.0 - 1.3.1
+
+	- Change - Trace compiler now reads in the group IDs from opensystemtrace_types.h
+	- Change - Code cleanup
+  
+New stuff in 1.2.0 - 1.2.7
+
+	- Change - TraceCompiler source code separated from TraceBuilder source code
+	- Change - Decode plugins can be added or removed
+	- Bug fix - 32-bit alignment was not done correctly in generated OstTraceGen1 inline functions 
+	- Bug fix - TraceCompiler did not handle empty strings correctly
+	- Bug fix - Wrong type definition generated for Performance traces
+	- Bug fix - Long traces were corrupted
+	- Bug fix - TRACE_PERFORMANCE group is now reserved only to performance event traces and 
+	            TRACE_STATE group is now reserved only to event traces
+	- Bug fix - Trace garbled if there were 16 and 8 bit descriptors in same trace
+
+New stuff in 1.1.0 - 1.1.6
+
+	- Change - Changed Performance Event Trace output format
+	- Change - Symbian Foundation related changes
+	- Bug fix - OstTraceData did not work
+	- Bug fix - Traces that contained both string and number parameter did not work correctly	
+	- Bug fix - Sometimes trace ID's changed during every compilation
+	- Bug fix - Trace with octal parameter didn't compile
+	- Bug fix - If EPOCROOT was like C:\S60, Dictionaries were exported to C:\S60epoc32\ost_dictionaries\
+
+New stuff in 1.0.4 - 1.0.42
+
+	NOTE! Format of the fixed_id.definitions file has changed from TraceBuilder version 1.0.20
+
+	- New feature - TraceCompiler now adds trace name to the Dictionaries
+	- New feature - TraceCompiler support non-source files that are listed in trace.properties file
+	- New feature - Support both "traces_<component name>" and "traces" as trace project directory name
+	- New feature - Support for -clean and -final
+	- New feature - Support to fixed group and trace ids
+	- New feature - Get export path from EPOCROOT environment variable
+	- New feature - Added support to type "p" in the OST macro	
+	- New feature - Possible to send over 80 byte traces (max. 512)
+	- Bug fix - Problems tracing string parameters whose length was 3 or fewer bytes.	
+	- Bug fix - TraceCompiler did not to parse constant pointers
+	- Bug fix - Descriptor's length in trace is not checked
+	- Bug fix - TraceCompiler did not support state transition macros
+	- Bug fix - TraceCompiler did not understand namespaces
+	- Bug fix - TraceCompiler did not generate OstTraceGenExt inline function for TTime parameter type
+	- Bug fix - In some cases TraceCompiler skiped trace ids
+	- Bug fix - Traces folder was generated even component doesn't have any OST traces
+	- Bug fix - Wrong trace ID is assigned to new Flow trace
+	- Bug fix - Autogen file got corrupted with special characters in parameter name
+	- Bug fix - Trace with only parameters doesn't work sometimes
+	- Bug fix - Supports %X format character
+	- Bug fix - Supports more format characters like %lx and %llx
+
+New stuff in 1.0.2 - 1.0.3
+
+	- Bug fix - Special characters crashed TraceCompiler
+	- Bug fix - In some cases TraceCompiler created "Traces" folder to wrong place
+
+New stuff in 0.25 - 0.25.49:
+
+	- New feature - Release note added
+	- Bug fix - TraceCompiler did not handle path correctly if sourcepath was "."
+	- Bug fix - TraceCompiler did not try to find group or traces folder deep enough
+	- Bug fix - In some cases TraceCompiler created "Traces" folder to wrong place
+	- Bug fix - TraceCompiler did not understand "/" path separators
+	- Bug fix - TraceCompiler did not convert "&" to "&amp;" in trace text. Fixed again in 0.25.45
+	- Bug fix - TraceCompiler assigned same ID for two groups
+	- Bug fix - TraceCompiler / TraceBuilder added extra backslash marks to dictionary
+	- Bug fix - Autogen headers are not always generated
+	- Bug fix - TraceCompiler did not understand concatenation of strings
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/tracecompiler/tracecompiler.pl	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,296 @@
+#
+# Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "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:
+#
+# Description:
+#
+# Finds MMP paths from component makefiles and forwards them to MMP parser
+#
+#!perl -w
+use FindBin;
+my $trace_compiler_path;
+
+BEGIN
+{
+  # Get current directory as TraceCompiler path
+  $trace_compiler_path = $FindBin::Bin; # e.g. X:/epoc32/tools
+  $trace_compiler_path =~ s/\\/\//g; # Replace all "\" with "/"
+  $trace_compiler_path =~ s/\/$//; # Remove possible trailing slash
+}
+
+use lib $trace_compiler_path;
+
+use strict;
+use env;
+use Cwd;
+use tracecompiler;
+use tracecompiler_mmp_data;
+
+# EPOC root is two levels down from TraceCompiler level
+my $epocroot = tracecompiler::concatenatePath($trace_compiler_path, "../../");
+$epocroot =~ s/\/$//; # Remove possible trailing slash
+my $drive = substr($epocroot, 0, 2);
+my $build_target;
+my $project_name;
+my $action = "RUN";
+
+# Get Java command or EXIT if not found
+my $java_command = tracecompiler::getJavaCommand();
+
+if (not defined $java_command)
+{
+  print STDERR "Java 1.5 or newer required!\n";
+  exit;
+}
+
+#-------------------------------------------------------
+# Go through command line arguments
+#-------------------------------------------------------
+while ( @ARGV )
+{
+  my $arg = shift(@ARGV);
+  
+  # Print version information
+  if ($arg eq "-v")
+  {
+    my $version = tracecompiler::getTraceCompilerVersion();
+    print $version;
+    exit;
+  }
+  # Clean TraceCompiler generated files
+  elsif ($arg eq "-clean")
+  {
+    $action = "CLEAN";
+  }
+  # Finalize TraceCompiler running
+  elsif ($arg eq "-final")
+  {
+    $action = "FINAL";
+  }
+  # Build target (e.g. armv5)
+  elsif (not defined $build_target)
+  {
+    $build_target = $arg;
+  }
+  # Project name (e.g. MyComponent)
+  else
+  {
+    $project_name = $arg; 
+  }
+}
+
+#-------------------------------------------------------
+# Build target must now be defined or print usage info
+#-------------------------------------------------------
+if (not defined $build_target)
+{
+  my $version = tracecompiler::getTraceCompilerVersion();
+  print $version;
+  print "\nUsage: tracecompiler.pl build_target in the folder containing bld.inf. bldmake bldfiles must be run before this.\n";
+  print "Example: tracecompiler.pl armv5\n";
+  exit;
+}
+
+my $return_string = "";
+
+#-------------------------------------------------------
+# Find component makefile path from abld.bat
+#-------------------------------------------------------
+tracecompiler::debugTraceCompilerVersion();
+tracecompiler::debugMsg("Find component makefile path from abld.bat");
+open(ABLD, "<abld.bat") or die $!;
+my $makefile;
+while (<ABLD>)
+{
+  if (/ABLD.PL/)
+  {
+    my $makefilepath = $_;
+    $makefilepath =~ s/perl -S ABLD.PL "(.*)\\" .*$/$1/;
+    chop($makefilepath);
+    
+    # Change all "\" characters to "/"
+    $makefilepath =~ s/\\/\//g;
+    
+    $makefilepath = "$epocroot/epoc32/build".$makefilepath;
+    $makefile = $makefilepath.$build_target.".MAKE";
+  }
+}
+close ABLD or die $!;
+
+#-------------------------------------------------------
+# Find project makefile paths from component makefile
+#-------------------------------------------------------
+my @projectmakefiles;
+my $mmps;
+
+tracecompiler::debugMsg("Find project makefile paths from component makefile $makefile");
+
+open(MAKEFILE, "<$makefile") or (print STDERR "Cannot open makefile $makefile\n" and exit);
+while (<MAKEFILE>)
+{
+  my $line = $_;
+    
+  if ($line =~ /\"([^\"]+?)\"\s+\"PRJ_.*MMPFILES\s+MMP\"\s+\"([^\"]+?)\"/i)
+  {
+    my $bldinf = $1;
+    my $mmp = $2;
+    
+    tracecompiler::debugMsg("Found BLD file: $bldinf");
+    
+    # Remove bld.inf from the end of the path
+    $bldinf =~ s/(.*)[\\\/].*/$1\//;
+    
+    my $mmp_file = tracecompiler::concatenatePath($bldinf, $mmp);
+        
+    # Change all "//" to "/"
+    $mmp_file =~ s/\/\//\//g;
+    
+    # If .mmp is missing from the end, add it
+    if ($mmp_file !~ /\.mmp$/i)
+    {
+      $mmp_file .= ".mmp";
+    }
+        
+    tracecompiler::debugMsg("Found MMP file: $drive$mmp_file\n");
+    
+    # If project name is defined, only add that MMP to the list of mmp files
+    if (defined $project_name)
+    {
+        if ($mmp_file =~ /($project_name.mmp)$/i)
+        {
+          $mmps .= $drive . $mmp_file . " ";
+        }       
+    }
+    else
+    {
+      $mmps .= $drive . $mmp_file . " ";  
+    }
+  }
+
+}
+close MAKEFILE or die $!;
+
+#-------------------------------------------------------
+# Call the MMP parser for each MMP (or clean / final)
+#-------------------------------------------------------
+if (defined $mmps)
+{
+  foreach my $mmp (split(" ", $mmps))
+  {
+    # Pass MMP file path to Parse MMP
+    if ($action eq "RUN")
+    {
+      my $command = "perl $trace_compiler_path/tracecompiler_parse_mmp.pl $mmp";
+      tracecompiler::debugMsg("Call the MMP parser. Command: $command\n");
+      print qx($command);
+    }
+    
+    # Clean files using this MMP
+    elsif ($action eq "CLEAN")
+    {
+    	my $mmpObject = tracecompiler_mmp_data->new($mmp);
+      cleanTraceCompilerFiles($mmpObject);
+    }
+    
+    # Finalize files using this MMP
+    elsif ($action eq "FINAL")
+    {
+    	my $mmpObject = tracecompiler_mmp_data->new($mmp);
+      finalizeTraceCompilerRun($mmpObject);
+    }
+  }
+}
+else
+{
+  tracecompiler::debugMsg("Could not find any MMP files!");
+}
+
+
+
+
+
+#-------------------------------------------------------#
+#-------------------------------------------------------#
+#--------------------SUBROUTINES------------------------#
+#-------------------------------------------------------#
+#-------------------------------------------------------#
+
+#-------------------------------------------------------
+# Cleans TraceCompiler generated files
+#-------------------------------------------------------
+sub cleanTraceCompilerFiles
+{
+  tracecompiler::debugMsg("Clean TraceCompiler Files");
+  my $mmpObj = $_[0];
+  if($mmpObj->{tracespaths}) {
+  	foreach my $tracesFolder (@{$mmpObj->{tracespaths}})
+  	{
+    	if (-e $tracesFolder and opendir(DIR, $tracesFolder))
+    	{
+      	while (defined(my $file = readdir(DIR)))
+      	{
+        	# Delete files ending with *Traces.h
+        	if ($file =~ /Traces\.h$/i)
+        	{
+          	print "Cleaning: " . $tracesFolder . "/" . $file . "\n";
+          	unlink $tracesFolder . "/" . $file || print $!;
+        	}
+        	# Delete cache files
+        	elsif ($file =~ /\.cache$/i)
+        	{
+          	print "Cleaning: " . $tracesFolder . "/" . $file . "\n";
+          	unlink $tracesFolder . "/" . $file || print $!;
+        	}
+      	}
+      	closedir(DIR);
+    	}
+ 	 }
+ 	}
+  
+  tracecompiler::debugMsg("Cleaning TraceCompiler Files ready\n");
+  
+  # Finalize TraceCompiler run
+  finalizeTraceCompilerRun($mmpObj);
+}
+
+#-------------------------------------------------------
+# Finalizes TraceCompiler run
+#-------------------------------------------------------
+sub finalizeTraceCompilerRun
+{
+	tracecompiler::debugMsg("Finalize TraceCompiler Run");
+	my $mmpObj = $_[0];
+	if($mmpObj->{tracespaths}) {
+	foreach my $tracesFolder (@{$mmpObj->{tracespaths}})
+	{
+		my $defFile = $tracesFolder . "/" . "OstTraceDefinitions.h";
+		# Open OstTraceDefinitions.h and read stuff to array
+		if (-e $defFile and open(FILE,"<$defFile"))
+		{
+			my @lines = <FILE>;
+			close(FILE);
+
+			# Write stuff back to OstTraceDefinitions.h
+			open(FILE,">$defFile") || exit;
+			foreach my $line (@lines)
+			{
+				# Comment out the define
+				$line =~ s/(.*)#define OST_TRACE_COMPILER_IN_USE/\/\/ #define OST_TRACE_COMPILER_IN_USE/;
+				print FILE $line;
+			}
+			close(FILE);
+		}
+	}
+}
+
+tracecompiler::debugMsg("Finalizing TraceCompiler Run ready\n");
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/tracecompiler/tracecompiler.pm	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,174 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "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:
+#
+# Description:
+#
+# Module for TraceCompiler
+#
+package tracecompiler;
+
+# If this is 1, debug prints are shown
+my $DEBUG = 0;
+
+use FindBin;
+
+# Get current directory as TraceCompiler path
+my $trace_compiler_path = $FindBin::Bin;  # e.g. X:/epoc32/tools
+$trace_compiler_path =~ s/\\/\//g; # Replace all "\" with "/"
+$trace_compiler_path =~ s/\/$//; # Remove possible trailing slash
+
+#-------------------------------------------------------
+# Concatenate path
+#-------------------------------------------------------
+sub concatenatePath
+{
+  my $concatenatePathBase = $_[0];
+  my $concatenatePathFile = $_[1];
+  
+  my $backCount = 0;
+  
+  # Change all "\" characters to "/"
+  $concatenatePathBase =~ s/\\/\//g;
+  $concatenatePathFile =~ s/\\/\//g;
+  
+  # Replace all "/./" with "/"
+  $concatenatePathBase =~ s/\/\.\//\//g;
+  $concatenatePathFile =~ s/\/\.\//\//g;
+    
+  # Find how many back references there are and remove them
+  while ($concatenatePathFile =~ /\.\.\//g) 
+  { 
+    $backCount++ 
+  }
+  $concatenatePathFile =~ s/\.\.\///g;
+  
+  # If there is / in the end of the base remove it
+  $concatenatePathBase =~ s/\/$//;
+  
+  # Remove directories from the end of the path
+  $concatenatePathBase = reverse($concatenatePathBase);
+  for (my $i=0; $i<$backCount; $i++)
+  {
+    $concatenatePathBase =~ s/.*?\///;
+  }
+  $concatenatePathBase = reverse($concatenatePathBase);
+  
+  my $concatenatePathFullFilePath = "$concatenatePathBase\/$concatenatePathFile";
+  
+  # Replace again all "/./" with "/"
+  $concatenatePathFullFilePath =~ s/\/\.\//\//g;
+  
+  debugMsg("Concatenate returns $concatenatePathFullFilePath");
+  return $concatenatePathFullFilePath;
+}
+
+#-------------------------------------------------------
+# Get java command
+#-------------------------------------------------------
+sub getJavaCommand
+{
+  my @java_commands = ("/tools/ncp_tools/helium/external/jdk1.5/jre/bin/java.exe", "java.exe", "c:/apps/seeinstaller/jre/bin/java.exe");
+
+  my $java_command;
+  
+  foreach my $command (@java_commands)
+  {
+    if (checkJava($command))
+    {
+      $java_command = $command;
+      last;
+    }
+  }
+  
+  return $java_command;
+}
+
+#-------------------------------------------------------
+# Check java
+#-------------------------------------------------------
+sub checkJava
+{
+  open (IN, "$_[0] -version 2>&1 |");
+  while(<IN>)
+  {
+    if (/(\d+\.\d+)/)
+    {
+      if ($1 >= 1.5)
+      {
+        return 1;
+      }
+    } 
+  }
+  
+  return 0;
+}
+
+#-------------------------------------------------------
+# Gets TraceCompiler version number
+#-------------------------------------------------------
+sub getTraceCompilerVersion
+{
+  # Get Java command or EXIT if not found
+  my $java_command = getJavaCommand();
+
+  if (not defined $java_command)
+  {
+    return "Java 1.5 or newer required!\n";
+    exit;
+  }
+  
+   # run from class files class files
+  my $version_query_command = "$java_command -classpath $trace_compiler_path/tracecompiler com.nokia.tracecompiler.TraceCompilerMain -v";
+  
+  # run from jar  file	command
+  #my $version_query_command = "$java_command -jar $trace_compiler_path/tracecompiler.jar -version"; 
+
+  my $version = qx($version_query_command);
+    
+  return $version;
+}
+
+
+#-------------------------------------------------------
+# Debug Message. Writes to log file and outputs to screen.
+#-------------------------------------------------------
+sub debugMsg
+{
+  if ($DEBUG)
+  {
+    open FILE, ">>/tracecompiler_debug.txt" or die $!;
+    print FILE $_[0] . "\n";
+    close FILE;
+    
+    return print "DEBUG: $_[0]\n";
+  }
+}
+
+#-------------------------------------------------------
+# Writes TraceCompiler version to log and screen if Debug is on.
+#-------------------------------------------------------
+sub debugTraceCompilerVersion
+{
+  if ($DEBUG)
+  {   
+    open FILE, ">>/tracecompiler_debug.txt" or die $!;
+    my $version = getTraceCompilerVersion();
+    print FILE $version;
+    close FILE;
+    
+    return print "DEBUG: $version\n";
+  }
+}
+
+1;
+
Binary file tracesrv/tracecompiler/tracecompiler/tracecompiler.zip has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/tracecompiler/tracecompiler_mmp_data.pm	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,225 @@
+#
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "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:
+#
+# Description:
+#
+# Module for TraceCompiler. parse the mmp file and prepare an object to be re-used by tracecompiler.pl and tracecompiler_perse_mmp.pl
+#
+package tracecompiler_mmp_data;
+
+use strict;
+use warnings;
+use File::Basename;
+use tracecompiler;
+sub readMmp($);
+
+
+my $component_name;
+
+
+sub new
+{
+	my $pkg = shift;
+	my $self = {};
+	bless $self,$pkg;
+	my $mmp = shift;
+	if (defined($mmp) and -e $mmp) {
+	  tracecompiler::debugMsg("Starting to parse MMP file: $mmp");
+	  my $file_path = $mmp;
+	  $component_name =  basename $mmp;
+
+	  # Take the module name from the MMP file path. e.g. "X:/temp/mycomponent.mmp" would create "mycomponent"
+	  $component_name =~ s/([^\.]*).*/$1/;
+
+		$self->{mmpName} = $mmp;
+		$self->readMmp($mmp);
+	} else 
+	{
+		tracecompiler::debugMsg("tracecompiler_mmp_data :: Valid MMP file must be provided ...\n");
+	}
+
+	return $self;
+}
+
+# parse mmp and get the infos we need. This method moved from tracecompiler_parse_mmp.pl to here with some add-on
+sub readMmp($)
+{
+	my $self = shift;
+	my $file = shift;
+	if (-e $file)
+	{
+		tracecompiler::debugMsg("Starting to parse file: $file");
+		my @sources;
+		my @tracesfolders;
+		my $in_comment_block = 0;
+
+		# Get file path (remove file + extension)
+		my $file_path = dirname $file;
+
+		# Change "//" to "/"
+		$file_path =~ s/\/\//\//g;
+
+		my $current_src_path = $file_path;
+
+		# Go through lines
+		open FILE, "<$file" or die $!;
+		foreach my $line (<FILE>)
+		{
+			# Check if contains includes
+			if ($line =~ /#include.+\"(.*)?\"/i)
+			{
+				my $includedFile = $1;
+
+				# Get absolute path if the first character is not "\" or b"/"
+				if ($includedFile =~ /^[^\\\/]/)
+				{
+					$includedFile = tracecompiler::concatenatePath($file_path, $includedFile);
+				}
+				else
+				{
+					$includedFile = substr($file_path, 0, 2) . $includedFile;
+				}
+
+				if (defined $includedFile)
+				{
+					tracecompiler::debugMsg("Found #include from $file. Start parsing it..\n");
+					$self->readMmp($includedFile);
+				}
+			}
+
+			# Check if in comment block
+			if ($in_comment_block > 0)
+			{
+				if ($line =~ /\*\/(.*)/)
+				{
+					$line = $1;
+					$in_comment_block--;
+				}
+				if ($in_comment_block == 0)
+				{
+					# Comment block ended, continue parsing the line
+				}
+				else
+				{
+					# We are still in comment block, jump to next line
+					next;
+				}
+			}
+
+			# Delete possible comments in one line
+			$line =~ s/\/\/.*//; # //
+			$line =~ s/\/\*.*\*\///; # /* */
+
+			if ($line =~ /(.*?)\/\*/)
+			{
+				$line = $1;
+				$in_comment_block++;
+			}
+
+			# Find uid
+			if ($line =~ /uid.+0x([a-fA-F0-9]+)?/i)
+			{
+				$self->{uid} = $1;
+
+				tracecompiler::debugMsg("Found Uid: $self->{uid}");
+			}
+
+			#Find target
+			if($line =~ /target\s+(\S+)\.(\S+)/i)
+			{
+				$self->{target} = $1;
+				$self->{ext} = $2;
+			}
+
+			#Find target type
+			if($line =~ /targettype\s+(\S+)/i)
+			{
+				$self->{type} = $1;
+			}
+
+			# Find source path
+		if ($line =~ /sourcepath\s+([^\s]+)/i)
+			{
+				my $src_path = $1;
+
+				# Get absolute path if the first character is not "\" or "/"
+				if ($src_path =~ /^[^\\\/]/)
+				{
+					$current_src_path = tracecompiler::concatenatePath($file_path, $src_path . "/");
+				}
+				else
+				{
+					$current_src_path = substr($file_path, 0, 2) . $src_path;
+				}
+
+				tracecompiler::debugMsg("Source path changed to: $current_src_path");
+			}
+
+			# Find sources
+			while ($line =~ /source\s+([^\s]+)/i)
+			{
+				my $src = $1;
+
+				my $src_path = tracecompiler::concatenatePath($current_src_path, $src);
+
+				if (-e $src_path)
+				{
+					push(@sources, $src_path);
+
+					tracecompiler::debugMsg("Found source: $src_path");
+				}
+				else
+				{
+					tracecompiler::debugMsg("Source doesn't exist!: $src_path");
+				}
+
+				$line =~ s/\Q$src//;
+			}
+
+			#Find unserincludes
+			if ($line =~ /userinclude\s+([^\s]+)/i)
+			{
+				tracecompiler::debugMsg("Found userinclude: $line");
+				my $userinclude = $1;
+				$userinclude =~ s/\\/\//g;
+				my $tmp1 = $self->{target} . "_" . $self->{ext};
+				my $tmp2 = $self->{target} . "_" . $self->{type};
+				if (   $userinclude =~ /.*\/traces\/$tmp1$/i
+				or $userinclude =~ /.*\/traces_$tmp2$/i
+				or $userinclude =~ /.*\/traces_$component_name$/i
+				or $userinclude =~ /.*\/traces$/i)
+				{
+					tracecompiler::debugMsg("Found traces userinclude: $userinclude");
+					push(@tracesfolders, $userinclude);
+				}
+			}
+		}
+		if (scalar @sources > 0)
+		{
+			$self->{sources} = [@sources];
+		}
+		if (scalar @tracesfolders > 0)
+		{
+			$self->{tracespaths} = [@tracesfolders];
+		}
+		close FILE;
+
+		tracecompiler::debugMsg("Ending the parsing of MMP file: $file\n");
+	} else
+	{
+		tracecompiler::debugMsg("Could not find file: $file\n");
+	}
+
+}
+
+1;
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/tracecompiler/tracecompiler_parse_mmp.pl	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,226 @@
+#
+# Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "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:
+#
+# Description:
+#
+# Parses UID and source files from given MMP files. Starts TraceCompiler Java application.
+#
+#!perl -w
+use FindBin;
+my $trace_compiler_path;
+
+
+BEGIN
+{
+  # Get current directory as TraceCompiler path
+  $trace_compiler_path = $FindBin::Bin; # e.g. X:/epoc32/tools
+  $trace_compiler_path =~ s/\\/\//g; # Replace all "\" with "/"
+  $trace_compiler_path =~ s/\/$//; # Remove possible trailing slash
+}
+
+use lib $trace_compiler_path;
+
+use strict;
+use warnings;
+use env;
+use FileHandle;
+use IPC::Open3;
+use tracecompiler;
+use tracecompiler_mmp_data;
+
+my $java_command = tracecompiler::getJavaCommand();
+
+if (not defined $java_command)
+{
+  print STDERR "Java 1.5 or newer required!\n";
+  exit;
+}
+
+# Global variables
+my $project_name;
+my $traces_folder = "";
+
+
+# run from class files
+
+my $command = "$java_command -classpath $trace_compiler_path/tracecompiler com.nokia.tracecompiler.TraceCompilerMain";
+
+# run from jar file
+#my $command = "$java_command  -jar $trace_compiler_path/tracecompiler/tracecompiler.jar";
+
+# Open MMP file
+foreach my $mmp_file (@ARGV)
+{
+  $traces_folder = "";
+  $project_name = $mmp_file;
+  
+  # Take the module name from the MMP file path. e.g. "X:/temp/mycomponent.mmp" would create "mycomponent"
+  $project_name =~ s/.*\/([^\.]*).*/$1/;
+  
+  tracecompiler::debugMsg("Module name: $project_name");
+  
+  # Parse sources in an own function
+  my $mmpObject = tracecompiler_mmp_data->new($mmp_file);
+    
+  # There must be UID
+  if (!$mmpObject->{uid})
+  {
+    tracecompiler::debugMsg("UID is not defined, don't call TraceCompiler!"); 
+    exit;
+  }
+  if (!$mmpObject->{target})
+  {
+  	tracecompiler::debugMsg("Target not defined, don't call TraceCompiler!"); 
+  	exit;
+  }
+  if (!$mmpObject->{type})
+  {
+  	tracecompiler::debugMsg("Target type not defined, don't call TraceCompiler!"); 
+  	exit;
+  }
+  if (!$mmpObject->{ext})
+  {
+  	tracecompiler::debugMsg("Target extension not defined, don't call TraceCompiler!"); 
+  	exit;
+  }
+  
+  # find out the right traces folder to use if ther is more than one and set the project name accordingly.
+  # the following order of the code is very important.
+  my $tmp;
+  if ($mmpObject->{tracespaths})
+  {
+  	#Check if there is one of the expected format
+  	
+  	#search for /trace/<target>_<ext>
+  	$tmp = $mmpObject->{target} ."_" . $mmpObject->{ext};
+  	my @list = grep(/.*\/traces\/$tmp\s*$/i, @{$mmpObject->{tracespaths}});
+  	
+  	if (scalar @list > 0) 
+  	{
+  		$traces_folder = pop(@list);
+  		$project_name = $mmpObject->{target} ."_" . $mmpObject->{ext};
+  		tracecompiler::debugMsg("Found traces folder 1: $traces_folder" ); 
+  	}
+  	 
+  	if ($traces_folder eq "" ) 
+  	{
+  		#search for /traces_<target>_<type>
+  		$tmp = $mmpObject->{target} ."_" . $mmpObject->{type};
+  		@list = grep(/.*\/traces_$tmp\s*$/i, @{$mmpObject->{tracespaths}});
+  		if (scalar @list > 0) 
+  		{
+  			$traces_folder = pop(@list);
+  			$project_name = $mmpObject->{target} . "_" . $mmpObject->{type};
+  			tracecompiler::debugMsg("Found traces folder 2: $traces_folder" ); 
+  		}
+  	}
+  	
+  	if ($traces_folder eq "" ) 
+  	{
+  		#search for /traces_<mmpname>
+  		@list = grep(/.*\/traces_$project_name\s*$/i, @{$mmpObject->{tracespaths}});
+  		if (scalar @list > 0) 
+  		{
+  			$traces_folder = pop(@list);
+  			tracecompiler::debugMsg("Found traces folder 3: $traces_folder" ); 
+  		}
+  	}
+  		
+  	if ($traces_folder eq "" ) 
+  	{
+  		#search for /traces
+  		@list = grep(/.*\/traces\s*$/i, @{$mmpObject->{tracespaths}});
+  		if (scalar @list > 0) 
+  		{
+  			$traces_folder = pop(@list);
+  			tracecompiler::debugMsg("Found traces folder 4: $traces_folder" ); 
+  		}
+  	}
+  }
+  else 
+  {
+  	tracecompiler::debugMsg("No Traces folder was found in userinclude, don't call TraceCompiler!"); 
+  	exit;
+  }
+  
+  if (!$mmpObject->{sources})
+  {
+  	tracecompiler::debugMsg("No sources found!"); 
+  	exit; 	
+  }
+ 
+ 
+  # IMPORTANT NOTE:
+  # please note that IPC::open3() is the only suitable api available in the perl version 5.6.1 used in ONB
+  # but it has a limit. If the size of the command is more than 264, perl will crash and it seems to be a windows limit
+  # rather perl.
+  # Therefore we have to parse the mmp and the traces folder from the stdin (*WRITER in this case) and 
+  # relax the new TraceCompiler API to allow this if they are not specified on the command line.
+  # It's not an issue in Raptor as it calls TraceCompiler directly.
+  #
+  $command .= " --uid=" . $mmpObject->{uid} . " --project=" . $project_name;
+           
+  tracecompiler::debugMsg("\nCall the Java TraceCompiler. Command: $command\n");
+    
+  # Create TraceCompiler process
+  local (*READER, *WRITER);
+  my $ pid = open3(\*WRITER, \*READER, \*READER, $command);
+    
+  # Remove duplicates from the sources list
+  my %seen = ();
+  my @uniqueSources = ();
+  foreach my $item (@{$mmpObject->{sources}}) 
+  {
+    push(@uniqueSources, $item) unless $seen{$item}++;
+  }
+ 
+  tracecompiler::debugMsg("Send mmp file: $mmp_file");
+  print WRITER "--mmp=$mmp_file\n";
+  
+  tracecompiler::debugMsg("Send traces folder path: $traces_folder");
+  print WRITER "--traces=$traces_folder\n";
+    
+    
+  # Send sources to the TraceCompiler     
+  foreach my $source (@uniqueSources)
+  {
+    tracecompiler::debugMsg("Send source: $source");
+    print WRITER "$source\n";
+   }
+    
+  # Send the end of the source files tag
+  print WRITER "*ENDOFSOURCEFILES*\n";
+  WRITER->autoflush(1);
+    
+  # Gather up the response from the TraceCompiler
+  my $compilerReturn = "";
+  foreach my $line (<READER>)
+  {
+    tracecompiler::debugMsg("Response line from TraceCompiler: $line");
+    $compilerReturn .= $line;
+  }       
+
+  # If Compiler doesn't return anything or we get no class found error from Java, don't print anything
+  if ($compilerReturn ne "" and $compilerReturn !~ /NoClassDefFoundError/)
+  {
+    tracecompiler::debugMsg("TraceCompiler succeeded! Returned: $compilerReturn");
+    print "\n******************* TRACECOMPILER STARTS *******************\n\n";
+    print "Building traces for component $project_name. Component UID: 0x$mmpObject->{uid}.\n";
+    print $compilerReturn . "\n";
+    print "\n******************* TRACECOMPILER ENDS *********************\n\n";
+  }
+  else 
+  {
+    tracecompiler::debugMsg("No traces were generated. Returned:\n$compilerReturn\n");
+  }
+ }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/EABI/tracecoreu.def	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,94 @@
+EXPORTS
+	_ZN10DTraceCore11GetInstanceEv @ 1 NONAME
+	_ZN10DTraceCore14SwitchToWriterE11TWriterType @ 2 NONAME
+	_ZN10DTraceCore16DestroyTraceCoreEv @ 3 NONAME
+	_ZN10DTraceCore8IsLoadedEv @ 4 NONAME
+	_ZN16DTraceCoreWriter19WriteTraceCoreFrameEmmmmmmmmmmm @ 5 NONAME
+	_ZN16DTraceCoreWriter8RegisterEv @ 6 NONAME
+	_ZN16DTraceCoreWriterC2E11TWriterType @ 7 NONAME
+	_ZN16DTraceCoreWriterD0Ev @ 8 NONAME
+	_ZN16DTraceCoreWriterD1Ev @ 9 NONAME
+	_ZN16DTraceCoreWriterD2Ev @ 10 NONAME
+	_ZN18DTraceActivationIf13ActivateTraceEmm @ 11 NONAME
+	_ZN18DTraceActivationIf15DeactivateTraceEmm @ 12 NONAME
+	_ZN18DTraceActivationIf16IsTraceActivatedEmm @ 13 NONAME
+	_ZN18DTraceCoreOstLddIf6GetSetE24TTraceCoreOstLddIfGetSetm @ 14 NONAME
+	_ZN18DTraceCoreSettings8RegisterEv @ 15 NONAME
+	_ZN18DTraceCoreSettingsC2Ev @ 16 NONAME
+	_ZN18DTraceCoreSettingsD0Ev @ 17 NONAME
+	_ZN18DTraceCoreSettingsD1Ev @ 18 NONAME
+	_ZN18DTraceCoreSettingsD2Ev @ 19 NONAME
+	_ZN20DTraceCoreSubscriber11UnsubscribeEm @ 20 NONAME
+	_ZN20DTraceCoreSubscriber9SubscribeEm @ 21 NONAME
+	_ZN20DTraceCoreSubscriber9SubscribeEm20TMessageHeaderFormat @ 22 NONAME
+	_ZN20DTraceCoreSubscriberC2Ev @ 23 NONAME
+	_ZN20DTraceCoreSubscriberD0Ev @ 24 NONAME
+	_ZN20DTraceCoreSubscriberD1Ev @ 25 NONAME
+	_ZN20DTraceCoreSubscriberD2Ev @ 26 NONAME
+	_ZN21DTraceCoreMediaPlugin15MessageReceivedER13TTraceMessage @ 27 NONAME
+	_ZN21DTraceCoreMediaPlugin18MergeHeaderAndDataERK13TTraceMessageR5TDes8 @ 28 NONAME
+	_ZN21DTraceCoreMediaPlugin8RegisterEv @ 29 NONAME
+	_ZN21DTraceCoreMediaPluginC2Ev @ 30 NONAME
+	_ZN21DTraceCoreMediaPluginD0Ev @ 31 NONAME
+	_ZN21DTraceCoreMediaPluginD1Ev @ 32 NONAME
+	_ZN21DTraceCoreMediaPluginD2Ev @ 33 NONAME
+	_ZN22DBTraceCategoryHandler11AddCategoryEh @ 34 NONAME
+	_ZN22DBTraceCategoryHandler11SetSettingsEP18DTraceCoreSettings @ 35 NONAME
+	_ZN22DBTraceCategoryHandler16PrepareSetWriterEP16DTraceCoreWriter @ 36 NONAME
+	_ZN22DBTraceCategoryHandler8RegisterEv @ 37 NONAME
+	_ZN22DBTraceCategoryHandler9SetWriterEP16DTraceCoreWriter @ 38 NONAME
+	_ZN22DBTraceCategoryHandlerC2Ev @ 39 NONAME
+	_ZN22DBTraceCategoryHandlerD0Ev @ 40 NONAME
+	_ZN22DBTraceCategoryHandlerD1Ev @ 41 NONAME
+	_ZN22DBTraceCategoryHandlerD2Ev @ 42 NONAME
+	_ZN22DTraceCoreMediaSWriter10WriteStartE16TWriterEntryType @ 43 NONAME
+	_ZN22DTraceCoreMediaSWriter8RegisterEv @ 44 NONAME
+	_ZN22DTraceCoreMediaSWriter8WriteEndEm @ 45 NONAME
+	_ZN22DTraceCoreMediaSWriter9WriteDataEmh @ 46 NONAME
+	_ZN22DTraceCoreMediaSWriter9WriteDataEmm @ 47 NONAME
+	_ZN22DTraceCoreMediaSWriter9WriteDataEmt @ 48 NONAME
+	_ZN22DTraceCoreMediaSWriterC2Ev @ 49 NONAME
+	_ZN22DTraceCoreMediaSWriterD0Ev @ 50 NONAME
+	_ZN22DTraceCoreMediaSWriterD1Ev @ 51 NONAME
+	_ZN22DTraceCoreMediaSWriterD2Ev @ 52 NONAME
+	_ZN23DTraceCoreConfiguration6GetSetE23TTraceCoreConfigurationm @ 53 NONAME
+	_ZN30MTraceCoreNotificationReceiver10TraceErrorEmmi @ 54 NONAME
+	_ZN30MTraceCoreNotificationReceiver28RegisterNotificationReceiverEm @ 55 NONAME
+	_ZN30MTraceCoreNotificationReceiver28RegisterNotificationReceiverEml @ 56 NONAME
+	_ZN30MTraceCoreNotificationReceiver30UnregisterNotificationReceiverEm @ 57 NONAME
+	_ZN30MTraceCoreNotificationReceiver30UnregisterNotificationReceiverEml @ 58 NONAME
+	_ZN30MTraceCoreNotificationReceiverC2Ev @ 59 NONAME
+	_ZN30MTraceCoreNotificationReceiverD0Ev @ 60 NONAME
+	_ZN30MTraceCoreNotificationReceiverD1Ev @ 61 NONAME
+	_ZN30MTraceCoreNotificationReceiverD2Ev @ 62 NONAME
+	_ZTI16DTraceCoreWriter @ 63 NONAME
+	_ZTI18DTraceActivationIf @ 64 NONAME
+	_ZTI18DTraceCoreOstLddIf @ 65 NONAME
+	_ZTI18DTraceCoreSettings @ 66 NONAME
+	_ZTI20DTraceCoreSubscriber @ 67 NONAME
+	_ZTI21DTraceCoreMediaPlugin @ 68 NONAME
+	_ZTI22DBTraceCategoryHandler @ 69 NONAME
+	_ZTI22DTraceCoreMediaSWriter @ 70 NONAME
+	_ZTI23DTraceCoreConfiguration @ 71 NONAME
+	_ZTI30MTraceCoreNotificationReceiver @ 72 NONAME
+	_ZTV16DTraceCoreWriter @ 73 NONAME
+	_ZTV18DTraceActivationIf @ 74 NONAME
+	_ZTV18DTraceCoreOstLddIf @ 75 NONAME
+	_ZTV18DTraceCoreSettings @ 76 NONAME
+	_ZTV20DTraceCoreSubscriber @ 77 NONAME
+	_ZTV21DTraceCoreMediaPlugin @ 78 NONAME
+	_ZTV22DBTraceCategoryHandler @ 79 NONAME
+	_ZTV22DTraceCoreMediaSWriter @ 80 NONAME
+	_ZTV23DTraceCoreConfiguration @ 81 NONAME
+	_ZTV30MTraceCoreNotificationReceiver @ 82 NONAME
+	_ZN16DTraceCoreWriter8WriteEndERK15TWriteEndParams @ 83 NONAME
+	_ZN10DTraceCore23SetPreviousTraceDroppedEi @ 84 NONAME
+	_ZNK10DTraceCore20PreviousTraceDroppedEv @ 85 NONAME
+	_ZN16DTraceCoreWriter12TraceDroppedEi @ 86 NONAME
+	_ZNK16DTraceCoreWriter19WasLastTraceDroppedEv @ 87 NONAME
+	_ZN10DTraceCore14CreateInstanceEv @ 88 NONAME
+	_ZN18DTraceActivationIf18RefreshActivationsEv @ 89 NONAME
+	_ZN10DTraceCore20GetCurrentWriterTypeEv @ 90 NONAME
+	_ZN16DTraceCoreWriter11AbleToWriteEj @ 91 NONAME
+	_ZN10DTraceCore15GetActiveWriterEv @ 92 NONAME
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/bwins/tracecoreu.def	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,60 @@
+EXPORTS
+	??1DTraceCoreSubscriber@@UAE@XZ @ 1 NONAME ; DTraceCoreSubscriber::~DTraceCoreSubscriber(void)
+	?WriteStart@DTraceCoreMediaSWriter@@EAEKW4TWriterEntryType@@@Z @ 2 NONAME ; unsigned long DTraceCoreMediaSWriter::WriteStart(enum TWriterEntryType)
+	?IsTraceActivated@DTraceActivationIf@@SAHKK@Z @ 3 NONAME ; int DTraceActivationIf::IsTraceActivated(unsigned long, unsigned long)
+	??0DTraceCoreSubscriber@@QAE@XZ @ 4 NONAME ; DTraceCoreSubscriber::DTraceCoreSubscriber(void)
+	?GetSet@DTraceCoreOstLddIf@@SAKW4TTraceCoreOstLddIfGetSet@@K@Z @ 5 NONAME ; unsigned long DTraceCoreOstLddIf::GetSet(enum TTraceCoreOstLddIfGetSet, unsigned long)
+	?GetInstance@DTraceCore@@SAPAV1@XZ @ 6 NONAME ; class DTraceCore * DTraceCore::GetInstance(void)
+	?AddCategory@DBTraceCategoryHandler@@QAEHE@Z @ 7 NONAME ; int DBTraceCategoryHandler::AddCategory(unsigned char)
+	?Subscribe@DTraceCoreSubscriber@@QAEHK@Z @ 8 NONAME ; int DTraceCoreSubscriber::Subscribe(unsigned long)
+	?IsLoaded@DTraceCore@@SAHXZ @ 9 NONAME ; int DTraceCore::IsLoaded(void)
+	??1DTraceCoreSettings@@UAE@XZ @ 10 NONAME ; DTraceCoreSettings::~DTraceCoreSettings(void)
+	??1DTraceCoreMediaSWriter@@UAE@XZ @ 11 NONAME ; DTraceCoreMediaSWriter::~DTraceCoreMediaSWriter(void)
+	?Register@DTraceCoreWriter@@UAEHXZ @ 12 NONAME ; int DTraceCoreWriter::Register(void)
+	?Register@DTraceCoreMediaPlugin@@QAEHXZ @ 13 NONAME ; int DTraceCoreMediaPlugin::Register(void)
+	??0DBTraceCategoryHandler@@QAE@XZ @ 14 NONAME ; DBTraceCategoryHandler::DBTraceCategoryHandler(void)
+	?SetWriter@DBTraceCategoryHandler@@UAEXPAVDTraceCoreWriter@@@Z @ 15 NONAME ; void DBTraceCategoryHandler::SetWriter(class DTraceCoreWriter *)
+	?Register@DTraceCoreMediaSWriter@@UAEHXZ @ 16 NONAME ; int DTraceCoreMediaSWriter::Register(void)
+	?Register@DBTraceCategoryHandler@@QAEHXZ @ 17 NONAME ; int DBTraceCategoryHandler::Register(void)
+	?WriteData@DTraceCoreMediaSWriter@@EAEXKE@Z @ 18 NONAME ; void DTraceCoreMediaSWriter::WriteData(unsigned long, unsigned char)
+	?Subscribe@DTraceCoreSubscriber@@QAEHKW4TMessageHeaderFormat@@@Z @ 19 NONAME ; int DTraceCoreSubscriber::Subscribe(unsigned long, enum TMessageHeaderFormat)
+	?PrepareSetWriter@DBTraceCategoryHandler@@UAEXPAVDTraceCoreWriter@@@Z @ 20 NONAME ; void DBTraceCategoryHandler::PrepareSetWriter(class DTraceCoreWriter *)
+	?MessageReceived@DTraceCoreMediaPlugin@@QAEXAAVTTraceMessage@@@Z @ 21 NONAME ; void DTraceCoreMediaPlugin::MessageReceived(class TTraceMessage &)
+	??0DTraceCoreWriter@@QAE@W4TWriterType@@@Z @ 22 NONAME ; DTraceCoreWriter::DTraceCoreWriter(enum TWriterType)
+	?UnregisterNotificationReceiver@MTraceCoreNotificationReceiver@@QAEXK@Z @ 23 NONAME ; void MTraceCoreNotificationReceiver::UnregisterNotificationReceiver(unsigned long)
+	?TraceError@MTraceCoreNotificationReceiver@@UAEXKKH@Z @ 24 NONAME ; void MTraceCoreNotificationReceiver::TraceError(unsigned long, unsigned long, int)
+	??1MTraceCoreNotificationReceiver@@UAE@XZ @ 25 NONAME ; MTraceCoreNotificationReceiver::~MTraceCoreNotificationReceiver(void)
+	?DeactivateTrace@DTraceActivationIf@@SAXKK@Z @ 26 NONAME ; void DTraceActivationIf::DeactivateTrace(unsigned long, unsigned long)
+	?WriteData@DTraceCoreMediaSWriter@@EAEXKG@Z @ 27 NONAME ; void DTraceCoreMediaSWriter::WriteData(unsigned long, unsigned short)
+	?RegisterNotificationReceiver@MTraceCoreNotificationReceiver@@QAEHKJ@Z @ 28 NONAME ; int MTraceCoreNotificationReceiver::RegisterNotificationReceiver(unsigned long, long)
+	?Unsubscribe@DTraceCoreSubscriber@@QAEXK@Z @ 29 NONAME ; void DTraceCoreSubscriber::Unsubscribe(unsigned long)
+	?MergeHeaderAndData@DTraceCoreMediaPlugin@@QAEHABVTTraceMessage@@AAVTDes8@@@Z @ 30 NONAME ; int DTraceCoreMediaPlugin::MergeHeaderAndData(class TTraceMessage const &, class TDes8 &)
+	?WriteTraceCoreFrame@DTraceCoreWriter@@UAEXKKKKKKKKKKK@Z @ 31 NONAME ; void DTraceCoreWriter::WriteTraceCoreFrame(unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long)
+	??0DTraceCoreMediaPlugin@@QAE@XZ @ 32 NONAME ; DTraceCoreMediaPlugin::DTraceCoreMediaPlugin(void)
+	?DestroyTraceCore@DTraceCore@@SAXXZ @ 33 NONAME ; void DTraceCore::DestroyTraceCore(void)
+	?GetSet@DTraceCoreConfiguration@@SAKW4TTraceCoreConfiguration@@K@Z @ 34 NONAME ; unsigned long DTraceCoreConfiguration::GetSet(enum TTraceCoreConfiguration, unsigned long)
+	?Register@DTraceCoreSettings@@QAEHXZ @ 35 NONAME ; int DTraceCoreSettings::Register(void)
+	??1DBTraceCategoryHandler@@UAE@XZ @ 36 NONAME ; DBTraceCategoryHandler::~DBTraceCategoryHandler(void)
+	?WriteData@DTraceCoreMediaSWriter@@EAEXKK@Z @ 37 NONAME ; void DTraceCoreMediaSWriter::WriteData(unsigned long, unsigned long)
+	?SetSettings@DBTraceCategoryHandler@@UAEXPAVDTraceCoreSettings@@@Z @ 38 NONAME ; void DBTraceCategoryHandler::SetSettings(class DTraceCoreSettings *)
+	??1DTraceCoreWriter@@UAE@XZ @ 39 NONAME ; DTraceCoreWriter::~DTraceCoreWriter(void)
+	?WriteEnd@DTraceCoreMediaSWriter@@EAEXK@Z @ 40 NONAME ; void DTraceCoreMediaSWriter::WriteEnd(unsigned long)
+	?SwitchToWriter@DTraceCore@@QAEHW4TWriterType@@@Z @ 41 NONAME ; int DTraceCore::SwitchToWriter(enum TWriterType)
+	?RegisterNotificationReceiver@MTraceCoreNotificationReceiver@@QAEHK@Z @ 42 NONAME ; int MTraceCoreNotificationReceiver::RegisterNotificationReceiver(unsigned long)
+	?ActivateTrace@DTraceActivationIf@@SAXKK@Z @ 43 NONAME ; void DTraceActivationIf::ActivateTrace(unsigned long, unsigned long)
+	??0DTraceCoreMediaSWriter@@QAE@XZ @ 44 NONAME ; DTraceCoreMediaSWriter::DTraceCoreMediaSWriter(void)
+	?UnregisterNotificationReceiver@MTraceCoreNotificationReceiver@@QAEXKJ@Z @ 45 NONAME ; void MTraceCoreNotificationReceiver::UnregisterNotificationReceiver(unsigned long, long)
+	??1DTraceCoreMediaPlugin@@UAE@XZ @ 46 NONAME ; DTraceCoreMediaPlugin::~DTraceCoreMediaPlugin(void)
+	??0DTraceCoreSettings@@QAE@XZ @ 47 NONAME ; DTraceCoreSettings::DTraceCoreSettings(void)
+	??0MTraceCoreNotificationReceiver@@QAE@XZ @ 48 NONAME ; MTraceCoreNotificationReceiver::MTraceCoreNotificationReceiver(void)
+	?WriteEnd@DTraceCoreWriter@@UAEXABVTWriteEndParams@@@Z @ 49 NONAME ; void DTraceCoreWriter::WriteEnd(class TWriteEndParams const &)
+	?PreviousTraceDropped@DTraceCore@@QBEHXZ @ 50 NONAME ; int DTraceCore::PreviousTraceDropped(void) const
+	?SetPreviousTraceDropped@DTraceCore@@QAEXH@Z @ 51 NONAME ; void DTraceCore::SetPreviousTraceDropped(int)
+	?TraceDropped@DTraceCoreWriter@@QAEXH@Z @ 52 NONAME ; void DTraceCoreWriter::TraceDropped(int)
+	?WasLastTraceDropped@DTraceCoreWriter@@QBEHXZ @ 53 NONAME ; int DTraceCoreWriter::WasLastTraceDropped(void) const
+	?CreateInstance@DTraceCore@@SAPAV1@XZ @ 54 NONAME ; class DTraceCore * DTraceCore::CreateInstance(void)
+	?RefreshActivations@DTraceActivationIf@@SAHXZ @ 55 NONAME ; int DTraceActivationIf::RefreshActivations(void)
+	?GetCurrentWriterType@DTraceCore@@QAEHXZ @ 56 NONAME ; int DTraceCore::GetCurrentWriterType(void)
+	?AbleToWrite@DTraceCoreWriter@@UAEHI@Z @ 57 NONAME ; int DTraceCoreWriter::AbleToWrite(unsigned int)
+	?GetActiveWriter@DTraceCore@@QAEPAVDTraceCoreWriter@@XZ @ 58 NONAME ; class DTraceCoreWriter * DTraceCore::GetActiveWriter(void)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/group/BTraceHooks_0x2001022D_dictionary.xml	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,1300 @@
+<?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 "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:
+
+Description:
+BTrace Kernel trace dictionary
+ 
+ -->
+<tracedictionary xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="DictionarySchema.xsd">
+	<typedefs>
+		<object type="S32" size="4" formatchar="d" classification="integer"/>
+		<object type="H32" size="4" formatchar="x" classification="hex"/>
+		<object type="U32" size="4" formatchar="u" classification="integer"/>
+		<object type="S16" size="2" formatchar="hd" classification="integer"/>
+		<object type="H16" size="2" formatchar="hx" classification="hex"/>
+		<object type="U16" size="2" formatchar="hu" classification="integer"/>
+		<object type="S8" size="1" formatchar="hhd" classification="integer"/>
+		<object type="H8" size="1" formatchar="hhx" classification="hex"/>
+		<object type="U8" size="1" formatchar="hhu" classification="integer"/>
+		<object type="S64" size="8" formatchar="Ld" classification="integer"/>
+		<object type="H64" size="8" formatchar="Lx" classification="hex"/>
+		<object type="U64" size="8" formatchar="Lu" classification="integer"/>
+		<object type="ASCII" size="1" formatchar="s" classification="string"/>
+		<object type="UNICODE" size="2" formatchar="S" classification="string"/>
+	</typedefs>
+	<data>
+	
+	  <!-- SYMBIAN_KERNEL_THREAD_IDENTIFICATION traces -->
+		<def id="1" type="string">NThread created;NThread:0x%x</def>
+		<def id="2" type="string">NThread destroyed;NThread:0x%x</def>
+		<def id="3" type="string">Thread created;NThread:0x%x;DProcess:0x%x;Name:%{ASCII}</def>
+		<def id="4" type="string">Thread destroyed;NThread:0x%x;DProcess:0x%x;RThread ID:%u</def>
+		<def id="5" type="string">Thread name assigned;NThread:0x%x;DProcess:0x%x;Name:%{ASCII}</def>
+		<def id="6" type="string">Process name assigned;NThread:0x%x;DProcess:0x%x;Name:%{ASCII}</def>
+		<def id="7" type="string">Thread ID assigned;NThread:0x%x;DProcess:0x%x;RThread ID:%u</def>
+		<def id="8" type="string">Process created;DProcess:0x%x</def>
+		<def id="9" type="string">Process destroyed;DProcess:0x%x</def>
+		
+		
+		
+		<!-- SYMBIAN_KERNEL_CPU_USAGE traces -->
+		<def id="51" type="string">Irq start</def>
+		<def id="52" type="string">Irq end</def>
+		<def id="53" type="string">Fiq start</def>
+		<def id="54" type="string">Fiq end</def>
+		<def id="55" type="string">IDFC start</def>
+		<def id="56" type="string">IDFC end</def>
+		<def id="57" type="string">New context</def>
+		
+		
+		
+		<!-- SYMBIAN_KERNEL_CLIENT_SERVER traces -->
+		<def id="101" type="string">Server created;DServer:0x%x;DThread:0x%x;Name:%{ASCII}</def>
+		<def id="102" type="string">Server destroyed;DServer:0x%x</def>
+		<def id="103" type="string">Session attached;DSession:0x%x;DServer:0x%x;DObject:0x%x</def>
+		<def id="104" type="string">Session detached;DSession:0x%x;Reason:%d</def>
+		<def id="105" type="string">Message sent;Message handle:0x%x;iFunction:0x%x;DSession:0x%x</def>
+		<def id="106" type="string">Message received;Message handle:0x%x</def>
+		<def id="107" type="string">MessageComplete;Message handle:0x%x;Reason:%d</def>
+		
+		
+		
+		<!-- SYMBIAN_KERNEL_REQUESTS traces -->
+		<def id="151" type="string">Request completed;Signalled NThread:0x%x;TRequestStatus:0x%x;Reason:%d</def>
+		
+		
+		
+		<!-- SYMBIAN_KERNEL_CHUNKS traces -->
+		<def id="201" type="string">Chunk created;DChunk:0x%x;Max Size:%u;Name:%{ASCII}</def>
+		<def id="202" type="string">Chunk info;DChunk:0x%x;Type:%u;Attributes:0x%x</def>
+		<def id="203" type="string">Chunk destroyed;DChunk:0x%x</def>
+		<def id="204" type="string">Allocated memory from chunk;DChunk:0x%x;Block offset:0x%x;Block size:%u</def>
+		<def id="205" type="string">Deallocated memory from chunk;DChunk:0x%x;Block offset:0x%x;Block size:%u</def>
+		<def id="206" type="string">Committed memory to chunk;DChunk:0x%x;Block offset:0x%x;Block size:%u</def>
+		<def id="207" type="string">Decommitted memory from chunk;DChunk:0x%x;Block offset:0x%x;Block size:%u</def>
+		<def id="208" type="string">Chunk owner;DChunk:0x%x;DProcess:0x%x</def>
+		
+		
+		
+		<!-- SYMBIAN_KERNEL_CODE_SEGS traces -->
+		<def id="251" type="string">Code segment associated to file;DCodeSeg:0x%x;Name:%{ASCII}</def>
+		<def id="252" type="string">Code segment created;DCodeSeg:0x%x;Attributes:0x%x;text address:0x%x;text size:%u;rodata address:0x%x;rodata size:%u;data address:0x%x;data size:%u;bss address:0x%x;bss size:%u</def>
+		<def id="253" type="string">Code segment destroyed;DCodeSeg:0x%x</def>
+		<def id="254" type="string">Code segment mapped;DCodeSeg:0x%x;DProcess:0x%x</def>
+		<def id="255" type="string">Code segment unmapped;DCodeSeg:0x%x;DProcess:0x%x</def>
+		<def id="256" type="string">Memory allocated to code segment;DCodeSeg:0x%x;Block size:%u</def>
+		<def id="257" type="string">Memory deallocated from code segment;DCodeSeg:0x%x;Block size:%u</def>
+		
+		
+		
+		<!-- SYMBIAN_KERNEL_PAGING traces -->
+		<def id="301" type="string">Page in begin;Address:0x%x;pc:0x%x</def>
+		<def id="302" type="string">Page in unneeded</def>
+		<def id="303" type="string">Page in ROM;PhysAddr:0x%x;VirtualAddr:0x%x</def>
+		<def id="304" type="string">Page out ROM;PhysAddr:0x%x;VirtualAddr:0x%x</def>
+		<def id="305" type="string">Page in free;PhysAddr:0x%x</def>
+		<def id="306" type="string">Page out free;PhysAddr:0x%x</def>
+		<def id="307" type="string">Rejuvenate;PhysAddr:0x%x;VirtualAddr:0x%x;pc:0x%x</def>
+		<def id="308" type="string">Page nop;x;PhysAddr:0x%x;VirtualAddr:0x%x;pc:0x%x</def>
+		<def id="309" type="string">Page lock;PhysAddr:0x%x;LockCount:0x%x</def>
+		<def id="310" type="string">Page unlock;PhysAddr:0x%x;LockCount:0x%x</def>
+		<def id="311" type="string">Page out cache;PhysAddr:0x%x;VirtualAddr:0x%x</def>
+		<def id="312" type="string">Page in code;PhysAddr:0x%x;VirtualAddr:0x%x</def>
+		<def id="313" type="string">Page out code;PhysAddr:0x%x;VirtualAddr:0x%x</def>
+		<def id="314" type="string">Page map code;PhysAddr:0x%x;VirtualAddr:0x%x</def>
+		<def id="315" type="string">Page aged;PhysAddr:0x%x</def>
+		<def id="316" type="string">Page decompress start;Compression type:%d</def>
+		<def id="317" type="string">Page decompress end</def>
+		<def id="318" type="string">Page memory model %d</def>
+		<def id="319" type="string">Page donated to cache via RChunk::Unlock();Chunk ID:0x%x;Index:%d</def>
+		<def id="320" type="string">Page reclaimed from cache via RChunk::Lock();Chunk ID:0x%x;Index:%d</def>
+		<def id="321" type="string">Page has been paged in;PhysAddr:0x%x;Memory object ID:%x;Index:%d</def>
+		<def id="322" type="string">Page has been paged out;PhysAddr:0x%x</def>
+		<def id="323" type="string">Page in activity terminated. Page already paged but not mapped;PhysAddr:0x%x</def>
+		<def id="324" type="string">Page donated to the cache via RChunk::Unlock();PhysAddr:0x%x;Memory object ID:%x;Index:%d</def>
+		<def id="325" type="string">Page reclaimed from cache via RChunk::Lock();PhysAddr ID:0x%x</def>
+		<def id="326" type="string">Page moved to oldest clean list because it was the last old page and it was clean;PhysAddr:0x%x</def>
+		<def id="327" type="string">Page moved to oldest dirty list because it was the last old page and it was dirty;PhysAddr:0x%x</def>
+		<def id="328" type="string">Page allocated to hold the MMU page tables required to map demand paged memory;PhysAddr:0x%x</def>
+		
+		
+		
+		<!-- SYMBIAN_KERNEL_THREAD_PRIORITY traces -->
+		<def id="351" type="string">NThread priority changed;NThread:0x%x;Priority:%d</def>
+		<def id="352" type="string">DThread priority changed;NThread:0x%x;iThreadPriority:%d;Priority:%d</def>
+		<def id="353" type="string">Process priority changed;DProcess:0x%x;Priority:%d</def>
+		
+		
+		
+		<!-- SYMBIAN_KERNEL_PAGING_MEDIA traces -->
+		<def id="401" type="string">Page in begin;Write address:0x%x;Partition offset:%u;Num bytes read:%u;Drive:%d;Object address:0x%x</def>
+		<def id="402" type="string">Paged in;Object address:0x%x;Completion code:%d;Request Id:%d</def>
+		<def id="403" type="string">Page in deferred;Object address:0x%x;Request Id:%d</def>
+		<def id="404" type="string">Page in deferred reposted;Object address:0x%x;Request Id:%d</def>
+		<def id="405" type="string">Page in re-deferred;Object address:0x%x;Request Id:%d</def>
+		<def id="406" type="string">Page in quietly deferred;Object address:0x%x;Media state:%d;Request Id:%d</def>
+		<def id="407" type="string">Fragment begin;Object address:0x%x;Fragment Id:%u;Fragment length:%u;Fragment offset:%u;Partition offset:%u;DThread:0x%x</def>
+		<def id="408" type="string">Fragment end;Object address:0x%x;Completion code:%u</def>
+		<def id="409" type="string">Driver begin;Media device:%d;Object address:0x%x</def>
+		<def id="410" type="string">Driver write back;Media device:%d;Object address:0x%x;Buffer address:0x%x;Buffer offset:%u;Write length:%u</def>
+		<def id="411" type="string">Driver on-hold;Media device:%d;Object address:0x%x</def>
+		<def id="412" type="string">Data read by a 'page out' request is read from buffer;Type:%d;ObjectAddr:0x%x;BufAddr:0x%x;Offset:%d;Length:%d</def>
+		<def id="413" type="string">Data read by a 'page out' request is read from buffer;Type:%d;ObjectAddr:0x%x;BufAddr:0x%x;Offset:%d;Length:%d</def>
+		<def id="414" type="string">Request to 'page out' data is received by Local Media Subsystem;BufAddr:0x%x;Offset:%d;Length:%d;ObjectAddr:0x%x</def>
+		
+		
+		
+		<!-- SYMBIAN_KERNEL_KERNEL_MEMORY traces -->
+		<def id="451" type="string">Initial free RAM;Bytes:%d</def>
+		<def id="452" type="string">Current free RAM;Bytes:%d</def>
+		<def id="453" type="string">Misc kernel allocation;Size:%d</def>
+		<def id="454" type="string">Misc kernel free;Size:%d</def>
+		<def id="455" type="string">Demand paging cache;Size:%d</def>
+		<def id="456" type="string">Physical RAM allocation;Size:%d;Address:0x%x</def>
+		<def id="457" type="string">Physical RAM free;Size:%d;Address:0x%x</def>
+		
+		
+		
+		<!-- SYMBIAN_KERNEL_HEAP traces -->
+		<def id="501" type="string">Heap create;Heap ID:0x%x;Heap header overhead:%hd;Heap footer overhead:%hd</def>
+		<def id="502" type="string">Heap chunk create;Heap ID:0x%x;Chunk ID:0x%x</def>
+		<def id="503" type="string">Heap allocation;Heap ID:0x%x;Address:0x%x;Size:%d;Requested size:%d</def>
+		<def id="504" type="string">Heap reallocation;Heap ID:0x%x;Address:0x%x;Size:%d;Requested size:%d;Old address:0x%x</def>
+		<def id="505" type="string">Heap free;Heap ID:0x%x;Address:0x%x</def>
+		<def id="506" type="string">RHeap::Alloc() failed;Heap ID:0x%x;Requested size:%d</def>
+		<def id="507" type="string">RHeap::ReAlloc() failed;Heap ID:0x%x;Address:0x%x;Requested size:%d</def>
+		<def id="508" type="string">Heap memory corrupted;Heap ID:0x%x;Address:0x%x;Length:%d</def>
+		<def id="509" type="string">Heap call stack;Heap ID:0x%x;CallStack:%{S32[]}</def>
+		
+		
+		
+		<!-- SYMBIAN_KERNEL_META_TRACE traces -->
+		<def id="551" type="string">Timestamp info;Timestamp:%d;Timestamp2:%d;Flags:%d</def>
+		<def id="552" type="string">Measurement start;Value:%d;FurtherValue:%d;Info:%{ASCII}</def>
+		<def id="553" type="string">Measurement end;Value:%d;FurtherValue:%d</def>
+		<def id="554" type="string">Filter change;Category:%hhd;Filter:%hhd</def>
+		
+		
+		
+		<!-- SYMBIAN_KERNEL_RAM_ALLOCATOR traces -->
+		<def id="601" type="string">Number of RAM zones;Count:%d</def>
+		<def id="602" type="string">RAM zone info;PageCount:%d;PhysAddr:0x%x;ID:0x%x;Preference:%hhd;Flags:%hhd</def>
+		<def id="603" type="string">Boot allocation;AllocCount:%d;PhysAddr:0x%x</def>
+		<def id="604" type="string">Boot allocation end</def>
+		<def id="605" type="string">Flags modified;ZoneID:0x%x;Flags:%d</def>
+		<def id="606" type="string">RAM Pages claimed;NrOfPages:%d;BaseAddr:0x%x</def>
+		<def id="607" type="string">Mark allocated;PageType:%d;Addr:0x%x</def>
+		<def id="608" type="string">Contiguous RAM allocated;PageType:%d;NrOfPages:%d;BaseAddr:0x%x</def>
+		<def id="609" type="string">RAM page freed;PageType:%d;Addr:0x%x</def>
+		<def id="610" type="string">Contiguous RAM freed;NrOfPages:%d;BaseAddr:0x%x</def>
+		<def id="611" type="string">Allocate RAM pages;PageType:%d;NrOfPages:%d;BaseAddr:0x%x</def>
+		<def id="612" type="string">Free RAM pages;PageType:%d;NrOfPages:%d;BaseAddr:0x%x</def>
+		<def id="613" type="string">All pages allocated</def>
+		<def id="614" type="string">All pages freed</def>
+		<def id="615" type="string">Page type changed;NewPageType:%d;PhysAddr:0x%x</def>
+		<def id="616" type="string">Required pages allocated;PageType:%d;NrOfPages:%d;PhysAddr:0x%x</def>
+		<def id="617" type="string">All requested pages allocated</def>
+		<def id="618" type="string">Requested zone claimed;ID:0x%x</def>
+		
+		
+		
+		<!-- SYMBIAN_KERNEL_FAST_MUTEX traces -->
+		<def id="651" type="string">Acquire mutex;ID:0x%x</def>
+		<def id="652" type="string">Release mutex;ID:0x%x</def>
+		<def id="653" type="string">Mutex flashed;ID:0x%x</def>
+		<def id="654" type="string">Mutex name;ID:0x%x;Unspecified:0x%x;Name:%{ASCII}</def>
+		<def id="655" type="string">Thread blocks on a fast mutex;ID:0x%x</def>
+		
+		
+		
+		<!-- SYMBIAN_KERNEL_PROFILING traces -->
+		<def id="701" type="string">CPUFullSample;PC:0x%x;NThread:0x%x</def>
+		<def id="702" type="string">CpuOptimisedSample;PC:0x%x</def>
+		<def id="703" type="string">IDfcSample;PC:0x%x</def>
+		<def id="704" type="string">NonSymbianThreadSample</def>
+		
+		
+		
+		<!-- SYMBIAN_KERNEL_RESOURCE_MANAGER traces -->
+		<def id="751" type="string">Resource registration;ID:%d;Addr:0x%x;Data:0x%{H8[]}</def>
+		<def id="752" type="string">Client registration;ClientId:%d;Addr:0x%x;Name:%s</def>
+		<def id="753" type="string">Client deregistration;ClientId:%d;Addr:0x%x;Name:%s</def>
+		<def id="754" type="string">Resource state change start operation;ClientId:%d;Resource ID:%d;Data:0x%{H8[]}</def>
+		<def id="755" type="string">Resource state change end operation;ClientId:%d;Resource ID:%d;Data:0x%{H8[]}</def>
+		<def id="756" type="string">Registration for post notification;ClientId:%d;Resource ID:%d;CallbackAddr:0x%x;RetVal:%d</def>
+		<def id="757" type="string">Deregistration for post notification;ClientId:%d;Resource ID:%d;CallbackAddr:0x%x;RetVal:%d</def>
+		<def id="758" type="string">Post notification sent;ClientId:%d;Resource ID:%d</def>
+		<def id="759" type="string">Callback complete;ClientId:%d;Resource ID:%d</def>
+		<def id="760" type="string">Resource manager memory usage;Memory allocated:%d bytes</def>
+		<def id="761" type="string">Get resource state start operation;ClientId:%d;Resource ID:%d;Data:0x%{H8[]}</def>
+		<def id="762" type="string">Get resource state end operation;ClientId:%d;Resource ID:%d;Data:0x%{H8[]}</def>
+		<def id="763" type="string">Cancellation of long latency operation;ClientId:%d;Resource ID:%d;Data:0x%{H8[]}</def>
+		<def id="764" type="string">Booting of resource manager;Entry point:0x%x</def>
+		<def id="765" type="string">PSL resource state change operation start;ClientId:%d;Resource ID:%d;Data:0x%{H8[]}</def>
+		<def id="766" type="string">PSL resource state change operation end;ClientId:%d;Resource ID:%d;Data:0x%{H8[]}</def>
+		<def id="767" type="string">Get resource state start operation in PSL;ClientId:%d;Resource ID:%d;Name:%s</def>
+		<def id="768" type="string">Get resource state end operation in PSL;ClientId:%d;Resource ID:%d;Data:0x%{H8[]}</def>
+		<def id="769" type="string">Resource creation;MinValue:%d;MaxValue:%d;DefaultValue:%d;Properties:%d;Name:%s</def>
+		<def id="770" type="string">Static resource with dependency registration;ResourceId:%d;Addr:0x%x;Data:0x%{H8[]}</def>
+		<def id="771" type="string">Dynamic resource registration;ClientId:%d;ResourceId:%d;Data:0x%{H8[]}</def>
+		<def id="772" type="string">Dynamic resource deregistration;ClientId:%d;ResourceId:%d;Data:0x%{H8[]}</def>
+		<def id="773" type="string">Resource dependency registration;ClientId:%d;ResourceId:%d;Data:0x%{H8[]}</def>
+		<def id="774" type="string">Resource dependency deregistration;ClientId:%d;ResourceId:%d;Data:0x%{H8[]}</def>
+		
+		
+		
+		<!-- SYMBIAN_KERNEL_RESOURCE_MANAGER_US traces -->
+		<def id="801" type="string">Start opening channel;Unused:%d;ClientThreadId:0x%x;Name:%s</def>
+		<def id="802" type="string">End opening channel;Unused:%d;ClientId:%d;Name:%s</def>
+		<def id="803" type="string">Start registering client;SupportedOps:%d;SupportedNotifications:%d;Data:0x%{H8[]}</def>
+		<def id="804" type="string">End registering client;ClientId:%d;ReturnValue:%d</def>
+		<def id="805" type="string">Start de-registering client;Unused:%d;ClientId:%d;Name:%s</def>
+		<def id="806" type="string">End de-registering client;ClientId:%d</def>
+		<def id="807" type="string">Start of a GetResourceState request;ResourceId:%d;ClientId:%d;Name:%s</def>
+		<def id="808" type="string">End of a GetResourceState request;ResourceId:%d;ResourceLevel:%d;ClientId:%d;RetVal:%d</def>
+		<def id="809" type="string">Start of a ChangeResourceState request;ResourceId:%d;RequiredState:%d;Data:0x%{H8[]}</def>
+		<def id="810" type="string">End of a ChangeResourceState request;ResourceId:%d;RequestedState:%d;ClientId:%d;RetVal:%d</def>
+		<def id="811" type="string">Start of a cancel GetResourceState request;ResourceId:%d;ClientId:%d;Name:%s</def>
+		<def id="812" type="string">End of a cancel GetResourceState request;ResourceId:%d;ClientId:%d;Name:%s</def>
+		<def id="813" type="string">Start of a cancel ChangeResourceState request;ResourceId:%d;ClientId:%d;Name:%s</def>
+		<def id="814" type="string">End of a cancel ChangeResourceState request;ResourceId:%d;ClientId:%d;Name:%s</def>
+		
+		
+		
+		<!-- SYMBIAN_KERNEL_RAW_EVENT traces -->
+		<def id="851" type="string">Padding trace, enum starts from trace number 1</def>
+		<def id="852" type="string">Set Function in the TRawEvent class;Data:0x%{H8[]}</def>
+		<def id="853" type="string">User side SetTip Event;Tip info:%d</def>
+		<def id="854" type="string">SetTilt Event;Event type:%d;Phi polar coordinate:%d;Theta polar coordinate:%d</def>
+		<def id="855" type="string">SetRotation Event;Event type:%d;Rotation angle:%d</def>
+		<def id="856" type="string">SetPointerNumber Event;Pointer number:%d</def>
+		<def id="857" type="string">User side addevent (User::AddEvent);Event type:%d</def>
+		<def id="858" type="string">Kernel side addevent (Kern::AddEvent);Event type:%d</def>
+		
+		
+		
+		<!-- SYMBIAN_KERNEL_USB traces -->
+		<def id="901" type="string">Padding trace, no USB traces exist yet</def>
+	
+		
+		
+		<!-- SYMBIAN_KERNEL_SYNC traces -->
+		<def id="951" type="string">SemaphoreCreate;DSemaphore:0x%x;DProcess:0x%x;Name:%{ASCII}</def>
+		<def id="952" type="string">SemaphoreDestroy;DSemaphore:0x%x</def>
+		<def id="953" type="string">SemaphoreAcquire;DSemaphore:0x%x</def>
+		<def id="954" type="string">SemaphoreRelease;DSemaphore:0x%x</def>
+		<def id="955" type="string">SemaphoreBlock;DSemaphore:0x%x</def>
+		
+		<def id="956" type="string">MutexCreate;DMutex:0x%x;DProcess:0x%x;Name:%{ASCII}</def>
+		<def id="957" type="string">MutexDestroy;DMutex:0x%x</def>
+		<def id="958" type="string">MutexAcquire;DMutex:0x%x</def>
+		<def id="959" type="string">MutexRelease;DMutex:0x%x</def>
+		<def id="960" type="string">MutexBlock;DMutex:0x%x</def>
+		
+		<def id="961" type="string">CondVarCreate;DCondVar:0x%x;DProcess:0x%x;Name:%{ASCII}</def>
+		<def id="962" type="string">CondVarDestroy;DCondVar:0x%x</def>
+		<def id="963" type="string">CondVarBlock;DCondVar:0x%x;DMutex:0x%x</def>
+		<def id="964" type="string">CondVarWakeUp;DCondVar:0x%x;DMutex:0x%x</def>
+		<def id="965" type="string">CondVarSignal;DCondVar:0x%x;DMutex:0x%x</def>
+		<def id="966" type="string">CondVarBroadcast;DCondVar:0x%x;DMutex:0x%x</def>
+
+
+
+		<!-- SYMBIAN_KERNEL_FLEXIBLE_MEMMODEL traces -->
+		<def id="1001" type="string">Create memory object;DMemoryObject:0x%x;Size:0x%x</def>
+		<def id="1002" type="string">Destroy memory object;DMemoryObject:0x%x</def>
+		<def id="1003" type="string">Create memory mapping;DMemoryMapping:0x%x;DMemoryObject:0x%x;Offset:0x%x;Size:0x%x;ASID:0x%hx;Unspecified:0x%hx;VirtualAddr:0x%x;</def>
+		<def id="1004" type="string">Destroy memory mapping;DMemoryMapping:0x%x</def>
+		<def id="1005" type="string">Object is Chunk;DMemoryObject:0x%x;DChunk:0x%x</def>
+		<def id="1006" type="string">Object is CodeSeg;DMemoryObject:0x%x;DCodeSeg:0x%x</def>
+		<def id="1007" type="string">Object is Process static data;DMemoryObject:0x%x;DProcess:0x%x</def>
+		<def id="1008" type="string">Object is DLL static data;DMemoryObject:0x%x;DCodeSeg:0x%x;DProcess:0x%x</def>
+		<def id="1009" type="string">Object is threads supervisor stack;DMemoryObject:0x%x;DThread:0x%x</def>
+		<def id="1010" type="string">Object is user stack;DMemoryObject:0x%x;DThread:0x%x</def>
+		<def id="1011" type="string">Address Space ID;DMemoryObject:0x%x;ASID:0x%hx</def>
+		
+		
+		
+		<!-- SYMBIAN_KERNEL_IIC traces -->
+		<def id="1051" type="string">Register Chans Start PSL;Addr:0x%x;NrOfChans:%d</def>
+		<def id="1052" type="string">Register Chans Start PIL;Addr:0x%x;NrOfChans:%d;NrOfChansRegistered:%d</def>
+		<def id="1053" type="string">Register Chans End PIL;Addr:0x%x;NrOfChansRegistered:%d</def>
+		<def id="1054" type="string">Register Chans End PSL;Addr:0x%x;NrOfChansRegistered:%d;RetVal:%d</def>
+		<def id="1055" type="string">Deregister Chans Start PSL;Addr:0x%x</def>
+		<def id="1056" type="string">Deregister Chans Start PIL;Addr:0x%x;NrOfChansRegistered:%d</def>
+		<def id="1057" type="string">Deregister Chans End PIL;Addr:0x%x;NrOfChansRegistered:%d</def>
+		<def id="1058" type="string">Deregister Chans End PSL;Addr:0x%x;RetVal:%d</def>
+		<def id="1059" type="string">Sync queue transaction request Start PIL;BusVarToken:%d;TransObject:0x%x</def>
+		<def id="1060" type="string">Sync queue transaction request End PIL;BusVarToken:%d;RetVal:%d</def>
+		<def id="1061" type="string">Async queue transaction request Start PIL;BusVarToken:%d;TransObj:0x%x;CallbackObj:0x%x</def>
+		<def id="1062" type="string">Async queue transaction request End PIL;BusVarToken:%d;RetVal:%d</def>
+		<def id="1063" type="string">Cancel async queue transaction request Start PIL;BusVarToken:%d;TransObj:0x%x</def>
+		<def id="1064" type="string">Cancel async queue transaction request End PIL;TransObj:0x%x;RetVal:%d</def>
+		<def id="1065" type="string">Processing transaction request Start PIL;Addr:0x%x;TransObj:0x%x</def>
+		<def id="1066" type="string">Processing transaction request Start PSL;TransObj:0x%x</def>
+		<def id="1067" type="string">Processing transaction request End PSL;RetVal:%d</def>
+		<def id="1068" type="string">Processing transaction request End PIL;Addr:0x%x;TransObj:0x%x;RetVal:%d;CallbackObj:0x%x</def>
+		<def id="1069" type="string">Sync capturing Slave channel Start PIL;BusVarToken:%d;Configuration:0x%x</def>
+		<def id="1070" type="string">Sync capturing Slave channel Start PSL;Addr:0x%x;Configuration:0x%x</def>
+		<def id="1071" type="string">Sync capturing Slave channel End PSL;Addr:0x%x;RetVal:%d</def>
+		<def id="1072" type="string">Sync capturing Slave channel End PIL;BusVarToken:%d;ChanIdCookie:%d;RetVal:%d</def>
+		<def id="1073" type="string">ASync capturing Slave channel Start PIL;BusVarToken:%d;Configuration:0x%x;CallbackObj:0x%x</def>
+		<def id="1074" type="string">ASync capturing Slave channel Start PSL;ChannelObj:0x%x;Configuration:0x%x</def>
+		<def id="1075" type="string">ASync capturing Slave channel End PSL;ChannelObj:0x%x;RetVal:%d</def>
+		<def id="1076" type="string">ASync capturing Slave channel End PIL;ChannelObj:0x%x;RetVal:%d</def>
+		<def id="1077" type="string">Release Slave channel Start PIL;ChanIdCookie:%d</def>
+		<def id="1078" type="string">Release Slave channel Start PSL;ChannelObj:0x%x</def>
+		<def id="1079" type="string">Release Slave channel End PSL;ChannelObj:0x%x;RetVal:%d</def>
+		<def id="1080" type="string">Release Slave channel End PIL;ChanIdCookie:%d;RetVal:%d</def>
+		<def id="1081" type="string">Register RX buffer for Slave channel Start PIL;RXBuffer:0x%x;NrOfBytesPerWord:%d;NrOfWords:%d;Offset:%d</def>
+		<def id="1082" type="string">Register RX buffer for Slave channel Start PSL;ChannelObj:0x%x;RXBuffer:0x%x;NrOfBytesPerWord:%d;NrOfWords:%d;Offset:%d</def>
+		<def id="1083" type="string">Register RX buffer for Slave channel End PSL;ChannelObj:0x%x;RetVal:%d</def>
+		<def id="1084" type="string">Register RX buffer for Slave channel End PIL;RetVal:%d</def>
+		<def id="1085" type="string">Register TX buffer for Slave channel Start PIL;TXBuffer:0x%x;NrOfBytesPerWord:%d;NrOfWords:%d;Offset:%d</def>
+		<def id="1086" type="string">Register TX buffer for Slave channel Start PSL;ChannelObj:0x%x;TXBuffer:0x%x;NrOfBytesPerWord:%d;NrOfWords:%d;Offset:%d</def>
+		<def id="1087" type="string">Register TX buffer for Slave channel End PSL;ChannelObj:0x%x;RetVal:%d</def>
+		<def id="1088" type="string">Register TX buffer for Slave channel End PIL;RetVal:%d</def>
+		<def id="1089" type="string">Set notification for Slave channel Start PIL;ChanIdCookie:%d;TriggerVal:%d</def>
+		<def id="1090" type="string">Set notification for Slave channel Start PSL;TriggerVal:%d</def>
+		<def id="1091" type="string">Set notification for Slave channel End PSL;RetVal:%d</def>
+		<def id="1092" type="string">Set notification for Slave channel End PIL;ChanIdCookie:%d;RetVal:%d</def>
+		<def id="1093" type="string">StaticExtension operaton for MasterSlave channel Start PIL;IdToken:%d;FuncId:%d;arg1:%d;arg2:%d</def>
+		<def id="1094" type="string">StaticExtension operaton for MasterSlave channel End PIL;IdToken:%d;FuncId:%d;RetVal:%d</def>
+		<def id="1095" type="string">StaticExtension operaton for Master channel Start PIL;IdToken:%d;FuncId:%d;arg1:%d;arg2:%d</def>
+		<def id="1096" type="string">StaticExtension operaton for Master channel Start PSL;ChannelObj:0x%x;FuncId:%d;arg1:%d;arg2:%d</def>
+		<def id="1097" type="string">StaticExtension operaton for Master channel End PSL;ChannelObj:0x%x;FuncId:%d;RetVal:%d</def>
+		<def id="1098" type="string">StaticExtension operaton for Master channel End PIL;IdToken:%d;FuncId:%d;RetVal:%d</def>
+		<def id="1099" type="string">StaticExtension operaton for Slave channel Start PIL;IdToken:%d;FuncId:%d;arg1:%d;arg2:%d</def>
+		<def id="1100" type="string">StaticExtension operaton for Slave channel Start PSL;ChannelObj:0x%x;FuncId:%d;arg1:%d;arg2:%d</def>
+		<def id="1101" type="string">StaticExtension operaton for Slave channel End PSL;ChannelObj:0x%x;FuncId:%d;RetVal:%d</def>
+		<def id="1102" type="string">StaticExtension operaton for Slave channel End PSL;IdToken:%d;FuncId:%d;RetVal:%d</def>
+		
+		
+		<!-- PRINTF traces -->
+		<def id="2001" type="string">Printf;RThread ID:%u;Trace:%{ASCII}</def>
+		<def id="2002" type="string">Printf;RThread ID:%u;Trace:%{ASCII}</def>
+		<def id="2003" type="string">Printf;RThread ID:%u;Trace:%{ASCII}</def>
+		
+		
+	</data>
+	<locations>
+	</locations>
+	<component id="536937005" name="Symbian BTrace Hooks">		
+		
+		
+		<!-- SYMBIAN_KERNEL_THREAD_IDENTIFICATION traces -->
+		<group id="3" name="SYMBIAN_KERNEL_THREAD_IDENTIFICATION" prefix="Thread:">
+			<trace data-ref="1">
+				<instance id="0" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="2">
+				<instance id="1" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="3">
+				<instance id="2" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="4">
+				<instance id="3" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="5">
+				<instance id="4" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="6">
+				<instance id="5" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="7">
+				<instance id="6" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="8">
+				<instance id="7" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="9">
+				<instance id="8" loc-ref="0" line="0"/>
+			</trace>						
+		</group>
+		
+		
+		<!-- SYMBIAN_KERNEL_CPU_USAGE traces -->
+		<group id="4" name="SYMBIAN_KERNEL_CPU_USAGE" prefix="Cpu:">
+			<trace data-ref="51">
+				<instance id="0" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="52">
+				<instance id="1" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="53">
+				<instance id="2" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="54">
+				<instance id="3" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="55">
+				<instance id="4" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="56">
+				<instance id="5" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="57">
+				<instance id="6" loc-ref="0" line="0"/>
+			</trace>
+		</group>
+		
+		
+		<!-- SYMBIAN_KERNEL_CLIENT_SERVER traces -->
+		<group id="6" name="SYMBIAN_KERNEL_CLIENT_SERVER" prefix="Client-Server:">
+			<trace data-ref="101">
+				<instance id="0" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="102">
+				<instance id="1" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="103">
+				<instance id="2" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="104">
+				<instance id="3" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="105">
+				<instance id="4" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="106">
+				<instance id="5" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="107">
+				<instance id="6" loc-ref="0" line="0"/>
+			</trace>
+		</group>
+		
+		
+		<!-- SYMBIAN_KERNEL_REQUESTS traces -->
+		<group id="7" name="SYMBIAN_KERNEL_REQUESTS" prefix="Requests:">
+			<trace data-ref="151">
+				<instance id="0" loc-ref="0" line="0"/>
+			</trace>
+		</group>
+		
+		
+		<!-- SYMBIAN_KERNEL_CHUNKS traces -->
+		<group id="8" name="SYMBIAN_KERNEL_CHUNKS" prefix="Chunks:">
+			<trace data-ref="201">
+				<instance id="0" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="202">
+				<instance id="1" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="203">
+				<instance id="2" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="204">
+				<instance id="3" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="205">
+				<instance id="4" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="206">
+				<instance id="5" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="207">
+				<instance id="6" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="208">
+				<instance id="7" loc-ref="0" line="0"/>
+			</trace>
+		</group>
+		
+		
+		<!-- SYMBIAN_KERNEL_CODE_SEGS traces -->
+		<group id="9" name="SYMBIAN_KERNEL_CODE_SEGS" prefix="CodeSegs:">
+			<trace data-ref="251">
+				<instance id="0" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="252">
+				<instance id="1" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="253">
+				<instance id="2" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="254">
+				<instance id="3" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="255">
+				<instance id="4" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="256">
+				<instance id="5" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="257">
+				<instance id="6" loc-ref="0" line="0"/>
+			</trace>
+		</group>
+		
+		
+		<!-- SYMBIAN_KERNEL_PAGING traces -->
+		<group id="10" name="SYMBIAN_KERNEL_PAGING" prefix="Paging:">
+			<trace data-ref="301">
+				<instance id="0" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="302">
+				<instance id="1" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="303">
+				<instance id="2" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="304">
+				<instance id="3" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="305">
+				<instance id="4" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="306">
+				<instance id="5" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="307">
+				<instance id="6" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="308">
+				<instance id="7" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="309">
+				<instance id="8" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="310">
+				<instance id="9" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="311">
+				<instance id="10" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="312">
+				<instance id="11" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="313">
+				<instance id="12" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="314">
+				<instance id="13" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="315">
+				<instance id="14" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="316">
+				<instance id="15" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="317">
+				<instance id="16" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="318">
+				<instance id="17" loc-ref="0" line="0"/>
+			</trace>	
+			<trace data-ref="319">
+				<instance id="18" loc-ref="0" line="0"/>
+			</trace>	
+			<trace data-ref="320">
+				<instance id="19" loc-ref="0" line="0"/>
+			</trace>	
+			<trace data-ref="321">
+				<instance id="20" loc-ref="0" line="0"/>
+			</trace>	
+			<trace data-ref="322">
+				<instance id="21" loc-ref="0" line="0"/>
+			</trace>																
+			<trace data-ref="323">
+				<instance id="22" loc-ref="0" line="0"/>
+			</trace>	
+			<trace data-ref="324">
+				<instance id="23" loc-ref="0" line="0"/>
+			</trace>	
+			<trace data-ref="325">
+				<instance id="24" loc-ref="0" line="0"/>
+			</trace>	
+			<trace data-ref="326">
+				<instance id="25" loc-ref="0" line="0"/>
+			</trace>	
+			<trace data-ref="327">
+				<instance id="26" loc-ref="0" line="0"/>
+			</trace>	
+			<trace data-ref="328">
+				<instance id="27" loc-ref="0" line="0"/>
+			</trace>																						
+		</group>
+		
+		
+		<!-- SYMBIAN_KERNEL_THREAD_PRIORITY traces -->
+		<group id="11" name="SYMBIAN_KERNEL_THREAD_PRIORITY" prefix="Thread Priority:">
+			<trace data-ref="351">
+				<instance id="0" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="352">
+				<instance id="1" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="353">
+				<instance id="2" loc-ref="0" line="0"/>
+			</trace>
+		</group>
+		
+		
+		<!-- SYMBIAN_KERNEL_PAGING_MEDIA traces -->
+		<group id="12" name="SYMBIAN_KERNEL_PAGING_MEDIA" prefix="Paging Media:">
+			<trace data-ref="401">
+				<instance id="0" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="402">
+				<instance id="1" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="403">
+				<instance id="2" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="404">
+				<instance id="3" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="405">
+				<instance id="4" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="406">
+				<instance id="5" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="407">
+				<instance id="6" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="408">
+				<instance id="7" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="409">
+				<instance id="8" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="410">
+				<instance id="9" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="411">
+				<instance id="10" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="412">
+				<instance id="11" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="413">
+				<instance id="12" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="414">
+				<instance id="13" loc-ref="0" line="0"/>
+			</trace>									
+		</group>
+		
+		
+		<!-- SYMBIAN_KERNEL_KERNEL_MEMORY traces -->
+		<group id="13" name="SYMBIAN_KERNEL_KERNEL_MEMORY" prefix="Kernel Memory:">
+			<trace data-ref="451">
+				<instance id="0" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="452">
+				<instance id="1" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="453">
+				<instance id="2" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="454">
+				<instance id="3" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="455">
+				<instance id="4" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="456">
+				<instance id="5" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="457">
+				<instance id="6" loc-ref="0" line="0"/>
+			</trace>
+		</group>
+		
+		
+		
+		<!-- SYMBIAN_KERNEL_HEAP traces -->
+		<group id="14" name="SYMBIAN_KERNEL_HEAP" prefix="Heap:">
+			<trace data-ref="501">
+				<instance id="0" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="502">
+				<instance id="1" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="503">
+				<instance id="2" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="504">
+				<instance id="3" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="505">
+				<instance id="4" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="506">
+				<instance id="5" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="507">
+				<instance id="6" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="508">
+				<instance id="7" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="509">
+				<instance id="8" loc-ref="0" line="0"/>
+			</trace>												
+		</group>
+		
+		
+		<!-- SYMBIAN_KERNEL_META_TRACE traces -->
+		<group id="15" name="SYMBIAN_KERNEL_META_TRACE" prefix="Meta trace:">
+			<trace data-ref="551">
+				<instance id="0" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="552">
+				<instance id="1" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="553">
+				<instance id="2" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="554">
+				<instance id="3" loc-ref="0" line="0"/>
+			</trace>
+		</group>	
+		
+		
+		<!-- SYMBIAN_KERNEL_RAM_ALLOCATOR traces -->
+		<group id="16" name="SYMBIAN_KERNEL_RAM_ALLOCATOR" prefix="RAM allocator:">
+			<trace data-ref="601">
+				<instance id="0" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="602">
+				<instance id="1" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="603">
+				<instance id="2" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="604">
+				<instance id="3" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="605">
+				<instance id="4" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="606">
+				<instance id="5" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="607">
+				<instance id="6" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="608">
+				<instance id="7" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="609">
+				<instance id="8" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="610">
+				<instance id="9" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="611">
+				<instance id="10" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="612">
+				<instance id="11" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="613">
+				<instance id="12" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="614">
+				<instance id="13" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="615">
+				<instance id="14" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="616">
+				<instance id="15" loc-ref="0" line="0"/>
+			</trace>									
+			<trace data-ref="617">
+				<instance id="16" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="618">
+				<instance id="17" loc-ref="0" line="0"/>
+			</trace>							
+		</group>		
+		
+		
+		<!-- SYMBIAN_KERNEL_FAST_MUTEX traces -->
+		<group id="17" name="SYMBIAN_KERNEL_FAST_MUTEX" prefix="Fast mutex:">
+			<trace data-ref="651">
+				<instance id="0" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="652">
+				<instance id="1" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="653">
+				<instance id="2" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="654">
+				<instance id="3" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="655">
+				<instance id="4" loc-ref="0" line="0"/>
+			</trace>			
+		</group>	
+		
+		
+		<!-- SYMBIAN_KERNEL_PROFILING traces -->
+		<group id="18" name="SYMBIAN_KERNEL_PROFILING" prefix="Kernel profiling:">
+			<trace data-ref="701">
+				<instance id="0" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="702">
+				<instance id="1" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="703">
+				<instance id="2" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="704">
+				<instance id="3" loc-ref="0" line="0"/>
+			</trace>
+		</group>	
+		
+		
+		
+		<!-- SYMBIAN_KERNEL_RESOURCE_MANAGER traces -->
+		<group id="19" name="SYMBIAN_KERNEL_RESOURCE_MANAGER" prefix="Resource manager:">
+			<trace data-ref="751">
+				<instance id="0" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="752">
+				<instance id="1" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="753">
+				<instance id="2" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="754">
+				<instance id="3" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="755">
+				<instance id="4" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="756">
+				<instance id="5" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="757">
+				<instance id="6" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="758">
+				<instance id="7" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="759">
+				<instance id="8" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="760">
+				<instance id="9" loc-ref="0" line="0"/>
+			</trace>		
+			<trace data-ref="761">
+				<instance id="10" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="762">
+				<instance id="11" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="763">
+				<instance id="12" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="764">
+				<instance id="13" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="765">
+				<instance id="14" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="766">
+				<instance id="15" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="767">
+				<instance id="16" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="768">
+				<instance id="17" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="769">
+				<instance id="18" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="770">
+				<instance id="19" loc-ref="0" line="0"/>
+			</trace>				
+			<trace data-ref="771">
+				<instance id="20" loc-ref="0" line="0"/>
+			</trace>		
+			<trace data-ref="772">
+				<instance id="21" loc-ref="0" line="0"/>
+			</trace>		
+			<trace data-ref="773">
+				<instance id="22" loc-ref="0" line="0"/>
+			</trace>		
+			<trace data-ref="774">
+				<instance id="23" loc-ref="0" line="0"/>
+			</trace>																																										
+		</group>			
+		
+		
+		
+		<!-- SYMBIAN_KERNEL_RESOURCE_MANAGER_US traces -->
+		<group id="20" name="SYMBIAN_KERNEL_RESOURCE_MANAGER_US" prefix="Resource manager US:">
+			<trace data-ref="801">
+				<instance id="0" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="802">
+				<instance id="1" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="803">
+				<instance id="2" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="804">
+				<instance id="3" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="805">
+				<instance id="4" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="806">
+				<instance id="5" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="807">
+				<instance id="6" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="808">
+				<instance id="7" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="809">
+				<instance id="8" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="810">
+				<instance id="9" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="811">
+				<instance id="10" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="812">
+				<instance id="11" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="813">
+				<instance id="12" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="814">
+				<instance id="13" loc-ref="0" line="0"/>
+			</trace>																																							
+		</group>			
+		
+		
+		<!-- SYMBIAN_KERNEL_RAW_EVENT traces -->
+		<group id="21" name="SYMBIAN_KERNEL_RAW_EVENT" prefix="Raw event:">
+			<trace data-ref="851">
+				<instance id="0" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="852">
+				<instance id="1" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="853">
+				<instance id="2" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="854">
+				<instance id="3" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="855">
+				<instance id="4" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="856">
+				<instance id="5" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="857">
+				<instance id="6" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="858">
+				<instance id="7" loc-ref="0" line="0"/>
+			</trace>																					
+		</group>	
+		
+		
+		<!-- SYMBIAN_KERNEL_USB traces -->
+		<group id="22" name="SYMBIAN_KERNEL_USB" prefix="USB:">
+			<trace data-ref="901">
+				<instance id="0" loc-ref="0" line="0"/>
+			</trace>
+		</group>						
+		
+		
+		<!-- SYMBIAN_KERNEL_SYNC traces -->
+		<group id="23" name="SYMBIAN_KERNEL_SYNC" prefix="Kernel sync:">
+			<trace data-ref="951">
+				<instance id="0" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="952">
+				<instance id="1" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="953">
+				<instance id="2" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="954">
+				<instance id="3" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="955">
+				<instance id="4" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="956">
+				<instance id="16" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="957">
+				<instance id="17" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="958">
+				<instance id="18" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="959">
+				<instance id="19" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="960">
+				<instance id="20" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="961">
+				<instance id="32" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="962">
+				<instance id="33" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="963">
+				<instance id="34" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="964">
+				<instance id="35" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="965">
+				<instance id="36" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="966">
+				<instance id="37" loc-ref="0" line="0"/>
+			</trace>									
+		</group>
+		
+
+		<!-- SYMBIAN_KERNEL_FLEXIBLE_MEMMODEL traces -->
+		<group id="24" name="SYMBIAN_KERNEL_FLEXIBLE_MEMMODEL" prefix="Flexible memmodel:">
+			<trace data-ref="1001">
+				<instance id="0" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="1002">
+				<instance id="1" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="1003">
+				<instance id="2" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="1004">
+				<instance id="3" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="1005">
+				<instance id="4" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="1006">
+				<instance id="5" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="1007">
+				<instance id="6" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="1008">
+				<instance id="7" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="1009">
+				<instance id="8" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="1010">
+				<instance id="9" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="1011">
+				<instance id="10" loc-ref="0" line="0"/>
+			</trace>									
+		</group>
+		
+		
+		<!-- SYMBIAN_KERNEL_IIC traces -->
+		<group id="25" name="SYMBIAN_KERNEL_IIC" prefix="IIC:">
+			<trace data-ref="1051">
+				<instance id="0" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="1052">
+				<instance id="1" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="1053">
+				<instance id="2" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="1054">
+				<instance id="3" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="1055">
+				<instance id="4" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="1056">
+				<instance id="5" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="1057">
+				<instance id="6" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="1058">
+				<instance id="7" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="1059">
+				<instance id="8" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="1060">
+				<instance id="9" loc-ref="0" line="0"/>
+			</trace>		
+			<trace data-ref="1061">
+				<instance id="10" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="1062">
+				<instance id="11" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="1063">
+				<instance id="12" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="1064">
+				<instance id="13" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="1065">
+				<instance id="14" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="1066">
+				<instance id="15" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="1067">
+				<instance id="16" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="1068">
+				<instance id="17" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="1069">
+				<instance id="18" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="1070">
+				<instance id="19" loc-ref="0" line="0"/>
+			</trace>	
+			<trace data-ref="1071">
+				<instance id="20" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="1072">
+				<instance id="21" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="1073">
+				<instance id="22" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="1074">
+				<instance id="23" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="1075">
+				<instance id="24" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="1076">
+				<instance id="25" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="1077">
+				<instance id="26" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="1078">
+				<instance id="27" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="1079">
+				<instance id="28" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="1080">
+				<instance id="29" loc-ref="0" line="0"/>
+			</trace>	
+			<trace data-ref="1081">
+				<instance id="30" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="1082">
+				<instance id="31" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="1083">
+				<instance id="32" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="1084">
+				<instance id="33" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="1085">
+				<instance id="34" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="1086">
+				<instance id="35" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="1087">
+				<instance id="36" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="1088">
+				<instance id="37" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="1089">
+				<instance id="38" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="1090">
+				<instance id="39" loc-ref="0" line="0"/>
+			</trace>	
+			<trace data-ref="1091">
+				<instance id="40" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="1092">
+				<instance id="41" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="1093">
+				<instance id="42" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="1094">
+				<instance id="43" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="1095">
+				<instance id="44" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="1096">
+				<instance id="45" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="1097">
+				<instance id="46" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="1098">
+				<instance id="47" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="1099">
+				<instance id="48" loc-ref="0" line="0"/>
+			</trace>
+			<trace data-ref="1100">
+				<instance id="49" loc-ref="0" line="0"/>
+			</trace>																																						
+			<trace data-ref="1101">
+				<instance id="50" loc-ref="0" line="0"/>
+			</trace>	
+			<trace data-ref="1102">
+				<instance id="51" loc-ref="0" line="0"/>
+			</trace>							
+		</group>				
+		
+		
+		<!-- PRINTF traces -->
+		<group id="0" name="TRACECORE_RDEBUG_PRINT" prefix="RDebug:">
+			<trace data-ref="2002">
+				<instance id="0" loc-ref="0" line="0"/>
+			</trace>
+		</group>
+		<group id="1" name="TRACECORE_KERN_PRINTF" prefix="Kern:">
+			<trace data-ref="2001">
+				<instance id="0" loc-ref="0" line="0"/>
+			</trace>
+		</group>
+		<group id="2" name="TRACECORE_PLATSEC_PRINTF" prefix="Platsec:">
+			<trace data-ref="2003">
+				<instance id="0" loc-ref="0" line="0"/>
+			</trace>
+		</group>
+		
+		
+	</component>
+</tracedictionary>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/group/TraceCore.mmp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,72 @@
+// 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 "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:
+//
+// Description:
+// Trace Core 
+//
+// mmp file that builds the tracecore with a KEXT entry point
+
+#include "tracecore.mmh"
+
+targettype      KEXT
+target          tracecore.dll
+uid             0 0x20010221
+capability      all
+vendorid        VID_DEFAULT
+
+deffile         ../~/tracecore.def
+
+OS_LAYER_SYSTEMINCLUDE
+
+userinclude     ../inc
+userinclude     ../traces
+
+sourcepath      ../src
+
+source          TraceCore.cpp
+source          TraceCoreMediaIf.cpp
+source          TraceCorePluginIf.cpp
+source          TraceCoreMediaPlugin.cpp
+source          TraceCoreSendReceive.cpp
+source          TraceCoreRouter.cpp
+source          TraceCoreSubscriber.cpp
+source          TraceCoreWriter.cpp
+source          TraceCoreMediaSWriter.cpp
+source          TraceCoreHandler.cpp
+source          TraceCorePrintfTraceHandler.cpp
+source          TraceCoreBTraceHandler.cpp
+source          BTraceCategoryHandler.cpp
+source          TraceCoreInternalMessageHandler.cpp
+source          TraceCoreActivationBase.cpp
+source          TraceCoreTraceActivationIf.cpp
+source          BTraceKernelCategoryHandler.cpp
+source          TraceCoreSettings.cpp
+source          BTraceOstCategoryHandler.cpp
+source          BTraceOstCategoryBitmap.cpp
+source          TraceCoreNotificationReceiver.cpp
+source          TraceCoreNotifier.cpp
+source          TraceCoreConfiguration.cpp
+source          TraceCoreMessageUtils.cpp
+source          TraceCoreOstLddIf.cpp
+source 			tracecore_ext.cpp
+
+library         trace_certification.lib
+
+#if !defined( SMP )
+exportlibrary   tracecore.lib
+#else
+noexportlibrary
+#endif
+
+epocallowdlldata
+SMPSAFE
+macro	USE_OPTIMIZED_WRITE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/group/bld.inf	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,38 @@
+// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+// Trace Core 
+//
+
+
+#include "../../group/tracecore.hrh"
+
+PRJ_PLATFORMS
+DEFAULT
+ARMV5SMP
+
+PRJ_EXPORTS
+../inc/TraceCoreWriter.h                        OS_LAYER_PLATFORM_EXPORT_PATH(TraceCoreWriter.h)
+../inc/BTraceCategoryHandler.h                  OS_LAYER_PLATFORM_EXPORT_PATH(BTraceCategoryHandler.h)
+../inc/TraceCoreSubscriber.h                    OS_LAYER_PLATFORM_EXPORT_PATH(TraceCoreSubscriber.h)
+../inc/TraceCoreNotificationReceiver.h          OS_LAYER_PLATFORM_EXPORT_PATH(TraceCoreNotificationReceiver.h)
+../inc/TraceCoreMessageSender.h                 OS_LAYER_PLATFORM_EXPORT_PATH(TraceCoreMessageSender.h)
+../inc/TraceCoreMediaPlugin.h                   OS_LAYER_PLATFORM_EXPORT_PATH(TraceCoreMediaPlugin.h)
+../inc/TraceCoreSettings.h                      OS_LAYER_PLATFORM_EXPORT_PATH(TraceCoreSettings.h)
+../inc/TraceCoreTraceActivationIf.h             OS_LAYER_PLATFORM_EXPORT_PATH(TraceCoreTraceActivationIf.h)
+../inc/TraceCoreConstants.h             OS_LAYER_PLATFORM_EXPORT_PATH(TraceCoreConstants.h)
+
+BTraceHooks_0x2001022D_dictionary.xml           /epoc32/ost_dictionaries/BTraceHooks_0x2001022D_dictionary.xml
+
+PRJ_MMPFILES
+TraceCore
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/group/tracecore.mmh	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,26 @@
+
+
+// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+// 
+// Common include file for tracecore mmp files 
+
+#include "kernel/kern_ext.mmh"
+#include "../../group/tracecore.hrh"
+
+macro __ISI_SUPPORTED__            
+
+START WINS
+win32_library    kernel32.lib
+END
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/inc/BTraceCategoryHandler.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,147 @@
+// 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 "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:
+//
+// Description:
+// Base-class handler interface for BTrace categories 
+//
+
+#ifndef __BTRACECATEGORYHANDLER_H__
+#define __BTRACECATEGORYHANDLER_H__
+
+
+// Include files
+#include <kernel/kernel.h>
+
+
+// Forward declarations
+class DTraceCoreWriter;
+class DTraceCoreSettings;
+
+/**
+ * Saved activation item for multipart traces
+ */
+class TMultiPartActivationInfo
+    {
+public:
+
+    /**
+     * Constructor sets member variables to zero
+     */
+    TMultiPartActivationInfo()
+        {
+        iComponentId = 0;
+        iTraceWord = 0;
+        iMultiPartId = 0;
+        }
+    
+    TUint32 iComponentId;
+    TUint32 iTraceWord;
+    TUint32 iMultiPartId;
+    };
+
+/**
+ * Category-specific handler interface which can be registered to DTraceCoreBTraceHandler.
+ */
+class DBTraceCategoryHandler : public DBase
+    {
+public:
+
+    /**
+     * Constructor
+     */
+    IMPORT_C DBTraceCategoryHandler();
+
+    /**
+     * Destructor
+     */
+    IMPORT_C ~DBTraceCategoryHandler();
+    
+    /**
+     * Registers the categories to BTrace handler
+     */
+    IMPORT_C TInt Register();
+    
+    /**
+     * Called before SetWriter with interrupts enabled
+     *
+     * @param aWriter The writer to be used
+     */
+    IMPORT_C virtual void PrepareSetWriter( DTraceCoreWriter* aWriter );
+    
+    /**
+     * Sets the active writer.  This is called with interrupts disabled
+     *
+     * @param aWriter The writer to be used
+     */
+    IMPORT_C virtual void SetWriter( DTraceCoreWriter* aWriter );
+    
+    /**
+     * Sets the active settings.
+     *
+     * @param aSettings The settings to be used
+     */
+    IMPORT_C virtual void SetSettings( DTraceCoreSettings* aSettings );
+
+    /**
+     * Category-specific handler function.
+     *
+     * @param aHeader BTrace header
+     * @param aHeader2 Extra header data
+     * @param aContext The thread context in which this function was called
+     * @param a1 The first trace parameter
+     * @param a2 The second trace parameter
+     * @param a3 The third trace parameter
+     * @param aExtra Extra trace data
+     * @param aPc The program counter value
+     * @return ETrue if trace was processed, EFalse if not
+     */
+    virtual TBool HandleFrame( TUint32 aHeader, TUint32 aHeader2, const TUint32 aContext, 
+                               const TUint32 a1, const TUint32 a2, const TUint32 a3, 
+                               const TUint32 aExtra, const TUint32 aPc ) = 0;
+
+    /**
+     * Adds a category to the list of categories to be registered
+     *
+     * @param aCategory The category to be registered
+     */
+    IMPORT_C TInt AddCategory( TUint8 aCategory );
+
+private:
+
+    /**
+     * Unregisters from BTrace handler. Called from destructor
+     */
+    void Unregister();
+
+protected:
+
+    /**
+     * Currently active writer
+     */
+    DTraceCoreWriter* iWriter;
+    
+    /**
+     * Currently active settings
+     */
+    DTraceCoreSettings* iSettings;
+
+private:
+
+    /**
+     * The categories of this handler
+     */
+    RArray< TUint8 > iCategories;
+    };
+
+#endif
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/inc/BTraceKernelCategoryHandler.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,175 @@
+// 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 "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:
+//
+// Description:
+// Handler for BTrace kernel categories 
+//
+
+#ifndef __BTRACEKERNELCATEGORYHANDLER_H__
+#define __BTRACEKERNELCATEGORYHANDLER_H__
+
+
+// Include files
+#include <kernel/kernel.h>
+#include "BTraceCategoryHandler.h"
+#include "TraceCoreActivation.h"
+
+
+// Forward declarations
+class DBTraceOstCategoryBitmap;
+
+
+/**
+ * Category handler for Symbian BTrace categories.
+ */
+NONSHARABLE_CLASS( DBTraceKernelCategoryHandler ) : public DBTraceCategoryHandler, public MTraceCoreActivationNotification
+    {
+public:
+
+    /**
+     * Constructor
+     */
+    DBTraceKernelCategoryHandler();
+     
+     /**
+      * Destructor
+      */
+    ~DBTraceKernelCategoryHandler();
+        
+    /**
+     * Initializes this handler
+     * 
+     * @return one of the standard error codes
+     */
+    TInt Init();
+
+    /**
+     * Called before writer is changed
+     *
+     * @param aWriter The new writer
+     */
+    void PrepareSetWriter( DTraceCoreWriter* aWriter );
+    
+	/**
+ 	 * Primes the BTrace kernel categories    
+ 	 */
+	void PrimeKernelCategories();
+
+private:
+
+    /**
+     * Notification that the activation state has changed
+     * 
+     * @param aActivation the activation interface that was updated
+     * @param aFromSettings ETrue if activation was due to settings read, EFalse if from some other source
+     * @param aComponentId Component ID of the activation
+     */
+    void ActivationChanged( MTraceCoreActivation& aActivation, TBool aFromSettings,
+            TUint32 aComponentId);
+    
+    /**
+     * MTraceCoreBTraceCategoryHandler implementation for Symbian-specific BTrace categories
+     *
+     * @param aHeader BTrace header
+     * @param aHeader2 Extra header data
+     * @param aContext The thread context in which this function was called
+     * @param a1 The first trace parameter
+     * @param a2 The second trace parameter
+     * @param a3 The third trace parameter
+     * @param aExtra Extra trace data
+     * @param aPc The program counter value
+     * @return ETrue if trace was processed
+     */
+    TBool HandleFrame( TUint32 aHeader, TUint32 aHeader2, const TUint32 aContext, 
+                       const TUint32 a1, const TUint32 a2, const TUint32 a3, 
+                       const TUint32 aExtra, const TUint32 aPc );
+    
+    /**
+     * Maps the BTrace category / sub-category to group / trace ID
+     * 
+     * @param aCategory The BTrace category
+     * @param aSubCategory The BTrace sub-categoory
+     * @return the group / trace ID combination
+     */
+    TUint32 MapCategoryToID( TUint8 aCategory, TUint8 aSubCategory );
+    
+    /**
+     * Dfc function to prime the kernel categories
+     * 
+     * @param aHandler pointer to this handler
+     */
+    static void PrimeDfc( TAny* aHandler );
+    
+    /**
+     * Called from the static DFC function to prime kernel categories
+     */
+    void PrimeDfc();
+
+    /**
+     * Primes a category
+     * 
+     * @param aCategory the category to be primed
+     */
+    void PrimeCategory( TUint8 aCategory );
+    
+private:
+
+    /**
+     * Handles this Multipart trace
+     *
+     * @param aHeader BTrace header
+     * @param aHeader2 Extra header data
+     * @param aContext The thread context in which this function was called
+     * @param aTotalMessageLength Total message length of this multipart message 
+     * @param aComponentId Component ID
+     * @param aData The data
+     * @param aExtra Extra trace data
+     * @param aPc The program counter value
+     */
+    TBool HandleMultiPart( TUint32 aHeader, TUint32 aHeader2, const TUint32 aContext,
+                       const TUint32 aTotalMessageLength, const TUint32 aComponentId,
+                       const TUint32 aData, const TUint32 aExtra, const TUint32 aPc );
+    
+    /**
+     * Checks if given trace is a Multipart trace
+     *
+     * @param aHeader Header data
+     * @param aHeader2 Extra header data
+     */
+    inline TBool CheckMultiPart( TUint32 aHeader, TUint32 aHeader2 );
+    
+    /**
+     * Calculates data start offset
+     *
+     * @param aHeader BTrace header
+     */
+    TUint32 CalculateDataStartOffset( TUint32 aHeader );    
+    
+    /**
+     * This uses the same bitmap as the OST category handler
+     */
+    DBTraceOstCategoryBitmap* iTraceBitmap;
+    
+    /**
+     * Dfc used when priming kernel categories
+     */
+    TDfc iPrimeDfc;
+    
+    /**
+     * Saved activation item for multipart traces
+     */ 
+    RArray< TMultiPartActivationInfo > iMultiPartActivationInfos;
+    };
+    
+#endif
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/inc/BTraceOstCategoryBitmap.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,187 @@
+// 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 "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:
+//
+// Description:
+// Tracks the activation of BTrace OST categories  
+//
+
+#ifndef __BTRACEOSTCATEGORYBITMAP_H__
+#define __BTRACEOSTCATEGORYBITMAP_H__
+
+
+// Include files
+#include <opensystemtrace_types.h>
+#include "TraceCoreActivationBase.h"
+
+class DBTraceOstCategoryHandler;
+
+/**
+ * OST trace component.
+ */
+class TOstComponent
+    {
+public:
+    TUint32 iComponentId;
+    RArray< TUint > iGroups; //TODO: implement this as a bitmap rather than RArray
+    };
+    
+
+/**
+ * OST Trace bitmap (dynamic). This extends the subscriber base class to receive bitmap updates
+ */
+NONSHARABLE_CLASS( DBTraceOstCategoryBitmap ) : public DTraceCoreActivationBase
+    {
+public:
+
+    /**
+     * Constructor
+	 * @param aBTraceOstCategoryHandler Pointer to CBTraceOstCategoryHandler
+     */
+    DBTraceOstCategoryBitmap(DBTraceOstCategoryHandler* aBTraceOstCategoryHandler);
+    
+    /**
+     * Destructor
+     */
+    ~DBTraceOstCategoryBitmap();
+    
+    /**
+     * Initializes this bitmap. This subscribes to the bitmap update message
+     */
+    TInt Init();
+    
+    /**
+     * Checks if trace points with a specific component ID and group ID are
+     * currently active
+     *
+     * @param aComponentId The component ID
+     * @param aTraceWord The trace word containing the group ID to check
+     * @return ETrue if trace is active, EFalse if not
+     */
+    TBool IsTraceActivated( const TUint32 aComponentId, TUint32 aTraceWord );
+    
+    /**
+     * Activate trace group
+     *
+     * @param aComponentId The component ID
+     * @param aGroupId The group ID
+     */
+    void ActivateTrace( const TUint32 aComponentId, const TUint32 aGroupId );
+    
+    /**
+     * Deactivate trace group
+     *
+     * @param aComponentId The component ID
+     * @param aGroupId The group ID
+     */
+    void DeactivateTrace( const TUint32 aComponentId, const TUint32 aGroupId );
+ 
+    /**
+     * Deactivates all groups from a component
+     * 
+     * @param aComponentId The component ID
+     */
+    void DeactivateAll( const TUint32 aComponentId );
+    
+    /**
+     * Updates this activation object from the given settings
+     * 
+     * @param aSettings the settings to be read
+     */
+    void ReadFromSettings( DTraceCoreSettings& aSettings );
+    
+    /**
+     * Updates the settings with the content of this activation object
+     * 
+     * @param aSettings the settings to be written
+     */
+    void WriteToSettings( DTraceCoreSettings& aSettings );
+    
+    /**
+     * Gets activated groups for this component ID
+     * @param aComponentId the component ID
+     */
+    RArray< TUint > GetActivatedGroups( const TUint32 aComponentId );
+    
+    /**
+     * Reactivate all currently activated traces
+     * 
+     * This function deactivates all groups currently active and re-activates them.
+     * This results in kernel priming data being generated for all active kernel groups.
+     * 
+     * @return KErrNone if refresh successful
+     */
+    TInt RefreshActivations();
+    
+private:
+
+    TInt FindComponentId( TUint32 aComponentId, RArray<TOstComponent>& aOstComponents );
+    TInt AddComponentId( TUint32 aComponentId, RArray<TOstComponent>& aOstComponents );
+    TInt RemoveComponentId( TUint32 aComponentId, TBool aNotifyActivationListeners, 
+            RArray<TOstComponent>& aOstComponents, RArray< TOstComponent >& aChangedArray );
+    TInt AddGroupId( TUint32 aComponentId, TGroupId aGroupId, TInt aIndex, 
+            RArray<TOstComponent>& aOstComponents, RArray< TOstComponent >& aChangedArray );
+    TInt RemoveGroupId( TUint32 aComponentId, TGroupId aGroupId, TInt aIndex, 
+            RArray<TOstComponent>& aOstComponents, RArray< TOstComponent >& aChangedArray );
+    TInt OverwriteGroups (const TUint8* aFrameStart,
+                       TInt aComponentIndex, TUint32 aComponentId , TUint32 numberOfGroups, 
+                       RArray<TOstComponent>& aOstComponents, RArray< TOstComponent >& aChangedArray);
+    TInt ReadOstProtocolFrame(const TDesC8& aMessage, TUint32 aFrameStartIndex);
+    TInt ReadOstProtocolFrameGroups(const TDesC8& aMessage,
+            TInt aFrameStartIndex, TUint8 aActivationInfo, TInt aComponentIndex,
+            TUint32 aComponentId, RArray<TOstComponent>& aOstComponents, RArray< TOstComponent >& aChangedArray);
+    TInt ReadOstFrame( const TDesC8& aMessage, TUint32 aFrameStartIndex );
+    TInt ReadOstFrameGroups( const TDesC8& aMessage, TInt aFrameStartIndex, 
+            TUint8 aActivationInfo, TInt aComponentIndex, TUint32 aComponentId, 
+            RArray<TOstComponent>& aOstComponents, RArray< TOstComponent >& aChangedArray );
+    void MessageReceived( TTraceMessage &aMsg );
+    void OstProtocolMessage( TTraceMessage &aMsg );
+    TBool IsComponentSupported( TUint32 /*aComponentID*/ );
+ 	TInt AllocateActivationBuffer();
+    TUint32 Read32FromBuffer(TUint8*& aPtr);
+    TUint16 Read16FromBuffer(TUint8*& aPtr);
+    void WriteToBuffer(TUint8*& aPtr, TUint32 aData32);
+    void WriteToBuffer(TUint8*& aPtr, TUint16 aData16);    
+    void HandleTraceActivationChanges(RArray< TOstComponent >& aChangedArray);
+    
+    //used by locking mechanism
+    template <class T> void CopyArray(RArray<T>* aSrc, RArray<T>* aDst);
+    void SetNewComponentsArrayPtr(RArray<TOstComponent>*& aNewPtr);
+    
+    //utility methods
+    void CleanupComponentsArray(RArray< TOstComponent >& aComponentArray);
+    void CleanupComponentsArrays();
+    void AddGroupToChangedArray(RArray< TOstComponent >& aChangedArray, TUint32 aComponentId, TGroupId aGroupId);
+    
+private:
+
+    /**
+     * OST Components
+     */	
+	RArray< TOstComponent >* iOstComponents;
+	
+	//temporary array used in activation/deactivation methods
+	RArray< TOstComponent >* iTmpArray;
+	
+	//array used in to store changed components
+	RArray< TOstComponent >* iChangedArray;
+	
+	/**
+	 * Buffer for saving and loading activations
+	 */
+	TUint8* iActivationBuffer;
+    DBTraceOstCategoryHandler* iBTraceOstCategoryHandler;
+	
+    };
+
+#endif // __BTRACEOSTCATEGORYBITMAP_H__
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/inc/BTraceOstCategoryHandler.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,214 @@
+// 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 "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:
+//
+// Description:
+// Handler for BTrace OST categories  
+//
+
+#ifndef __BTRACEOSTCATEGORYHANDLER_H__
+#define __BTRACEOSTCATEGORYHANDLER_H__
+
+
+// Include files
+#include <kernel/kernel.h>
+#include "BTraceCategoryHandler.h"
+#include "TraceCoreActivation.h"
+
+#define MAX_TRACE_DATA_SIZE 512
+#define COMPONENT_GROUP_CACHE_SIZE 12 // 4 * (1 ComponentId + 1 groupId + activation info )
+#define MAX_MULTIPART_TRACES 4
+
+// Forward declarations
+class DBTraceOstCategoryBitmap;
+
+#ifndef __SMP__
+
+/**
+ * Multipart trace message.
+ */
+class TMultiPartTrace
+    {
+public:
+    TUint32 iMultiPartId;
+    TUint32 iHeader;
+    TUint32 iHeader2;
+    TUint32 iContext;
+    TUint32 iComponentId;
+    TUint32 iTraceWord;
+    TUint8 iData[MAX_TRACE_DATA_SIZE];
+    TUint32 iPc;
+    TUint32 iDataInserted;
+    };
+	
+#endif // !__SMP__
+
+/**
+ * Category handler for OST
+ */
+NONSHARABLE_CLASS( DBTraceOstCategoryHandler ) : public DBTraceCategoryHandler
+, public MTraceCoreActivationNotification
+    {
+public:
+
+    /**
+     * Constructor
+     */
+    DBTraceOstCategoryHandler();
+     
+     /**
+      * Destructor
+      */
+    ~DBTraceOstCategoryHandler();
+        
+    /**
+     * Initializes this handler
+     */
+    TInt Init();
+    
+    /**
+     * Set settings
+     * 
+     * @param aSettings Settings
+     */
+    void SetSettings( DTraceCoreSettings* aSettings );
+    
+    /**
+     * Traces deactivated
+     */
+     TBool iAllTracesDeactivated;
+     
+    /**
+     * Component/Group cache
+     */
+    TUint32  iComponentGroupCache[COMPONENT_GROUP_CACHE_SIZE];
+    TUint32* iCacheItem1;
+    TUint32* iCacheItem2;
+    TUint32* iCacheItem3;
+    TUint32* iCacheItem4;
+    
+    TUint32* iTemp;
+     
+private:
+
+    /**
+     * Notification that the activation state has changed
+     * 
+     * @param aActivation the activation interface that was updated
+     * @param aFromSettings ETrue if activation was due to settings read, EFalse if from some other source
+     * @param aComponentId Component ID of the activation
+     */
+    void ActivationChanged( MTraceCoreActivation& aActivation, TBool aFromSettings,
+            TUint32 aComponentId);
+    
+    /**
+     * MTraceCoreBTraceCategoryHandler implementation for KCategoryNokiaOst
+     *
+     * @param aHeader BTrace header
+     * @param aHeader2 Extra header data
+     * @param aContext The thread context in which this function was called
+     * @param a1 The first trace parameter
+     * @param a2 The second trace parameter
+     * @param a3 The third trace parameter
+     * @param aExtra Extra trace data
+     * @param aPc The program counter value
+     */
+    TBool HandleFrame( TUint32 aHeader, TUint32 aHeader2, const TUint32 aContext, 
+                       const TUint32 a1, const TUint32 a2, const TUint32 a3, 
+                       const TUint32 aExtra, const TUint32 aPc );
+    
+    /**
+     * Checks if given trace is a Multipart trace
+     *
+     * @param aHeader Header data
+     * @param aHeader2 Extra header data
+     */
+    inline TBool CheckMultiPart( TUint32 aHeader, TUint32 aHeader2 );
+    
+    /**
+     * Handles this Multipart trace
+     *
+     * @param aHeader BTrace header
+     * @param aHeader2 Extra header data
+     * @param aContext The thread context in which this function was called
+     * @param aTotalMessageLength Total message length of this multipart message 
+     * @param aComponentId Component ID
+     * @param aData The data
+     * @param aExtra Extra trace data
+     * @param aPc The program counter value
+     */
+    TBool HandleMultiPart( TUint32 aHeader, TUint32 aHeader2, const TUint32 aContext,
+                       const TUint32 aTotalMessageLength, const TUint32 aComponentId,
+                       const TUint32 aData, const TUint32 aExtra, const TUint32 aPc );
+    
+    /**
+     * Checks if there is a dropped trace and updates header if so
+     *
+     * @param aHeader Header data
+     */
+    inline TBool CheckDroppedTrace( TUint32& aHeader );
+    
+#ifndef __SMP__
+	
+    /**
+     * Calculates data start offset
+     *
+     * @param aHeader BTrace header
+     */
+    TUint32 CalculateDataStartOffset( TUint32 aHeader );
+	
+    /**
+     * Multipart traces
+     */ 
+    TMultiPartTrace iMultiPartTrace;
+	
+#else // !__SMP__
+
+    /**
+     * Find multi part id from multipart array
+     * @return index where the MultiPartActivationInfo with aMultiPartId is found.
+     */
+    TInt Find( TUint32 aMultiPartId );
+    
+	/**
+     * "Remove" multipart from array
+     */
+    void Remove( TUint32 aIndex );
+        
+    /**
+     * Insert multi part activation info to array if it doesn't exist yet.
+     * @return KErrNone if insert ok.
+     */
+    TInt InsertIfNotExist( TMultiPartActivationInfo &aMultiPartTrace );
+
+    /**
+     * Saved activation item for multipart traces
+     */ 
+    TMultiPartActivationInfo iMultipartArray[MAX_MULTIPART_TRACES];
+    
+	/**
+     * List of free/used multipart indexes
+     */ 
+	TInt iFreeList[MAX_MULTIPART_TRACES];
+
+#endif // __SMP__
+
+    /**
+     * Trace bitmap for OST category
+     */
+    DBTraceOstCategoryBitmap* iOstTraceBitmap;
+    
+
+    };
+    
+#endif
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/inc/TraceCore.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,346 @@
+// 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 "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:
+//
+// Description:
+// Trace Core
+//
+
+#ifndef __TRACECORE_H__
+#define __TRACECORE_H__
+
+
+// Include files
+#include <kernel/kernel.h>
+#include "TraceCoreWriter.h"
+
+
+// Forward declarations
+class DTraceCoreSendReceive;
+class DTraceCoreNotifier;
+class DTraceCoreConfiguration;
+class DTraceCoreInternalMessageHandler;
+class DTraceCoreRouter;
+class DTraceCoreHandler;
+class DTraceCoreBTraceHandler;
+class DTraceCorePrintfTraceHandler;
+class DTraceCoreSettings;
+class MTraceCoreActivation;
+
+
+/**
+ * TraceCore main class
+ */
+NONSHARABLE_CLASS( DTraceCore ) : public DBase
+    {
+public:
+
+    /**
+     * Gets the TraceCore instance.
+     * NULL is returned when no instance is created.
+     */
+    IMPORT_C static DTraceCore* GetInstance();
+    
+    /**
+     * Returns ETrue if tracecore is loaded already EFalse otherwies
+     */
+    IMPORT_C static TBool IsLoaded();
+
+    /*
+     * Destroy the static instance of tracecore and sets the instance to null
+     */
+    IMPORT_C static void DestroyTraceCore();
+    /**
+     * Gets the BTrace handler
+     */
+    static DTraceCoreBTraceHandler* GetBTraceHandler();
+    
+    /**
+     * Gets the router
+     */
+    inline DTraceCoreRouter& GetRouter();
+    
+    /**
+     * Gets the send-receive interface
+     */
+    inline DTraceCoreSendReceive& GetSendReceive();
+    
+    /**
+     * Gets the trace core notifier
+     */
+    inline DTraceCoreNotifier& GetNotifier();
+    
+    /**
+     * Registers a handler to TraceCore.
+     *
+     * @param aHandler The handler to be registered
+     */
+    TInt RegisterHandler( DTraceCoreHandler& aHandler );
+
+    /**
+     * Unregisters a handler from TraceCore.
+     *
+     * @param aHandler The handler to be unregistered
+     */
+    void UnregisterHandler( DTraceCoreHandler& aHandler );
+
+    /**
+     * Registers a writer to TraceCore.
+     *
+     * @param aWriter The writer to be registered
+     */
+    TInt RegisterWriter( DTraceCoreWriter& aWriter );
+
+    /**
+     * Unregisters a writer from TraceCore.
+     *
+     * @param aWriter The writer to be unregistered
+     */
+    void UnregisterWriter( DTraceCoreWriter& aWriter );
+
+    /**
+     * Registers a settings saver to TraceCore.
+     *
+     * @param aSettings The settings (saver) to be registered
+     */
+    TInt RegisterSettings( DTraceCoreSettings& aSettings );
+
+    /**
+     * Unregisters a settings saver from TraceCore.
+     *
+     * @param aSettings The Settings to be unregistered
+     */
+    void UnregisterSettings( DTraceCoreSettings& aSettings );
+    
+    /**
+     * Registers an activation interface
+     * 
+     * @param aActivation The activation interface
+     */
+    TInt RegisterActivation( MTraceCoreActivation& aActivation );
+
+    /**
+     * Gets an activation interface for a specific component ID
+     * 
+     * @param aComponentID The component ID
+     * @return The activation interface or NULL if none exist
+     */
+    MTraceCoreActivation* GetActivation( TUint32 aComponentID );
+     
+    /**
+     * Starts to use the specific writer
+     * 
+     * @return KErrNone if successful, KErrNotSupported if type is not valid
+     */
+    IMPORT_C TInt SwitchToWriter( TWriterType aWriterType );     
+    
+    /**
+     * Get current writer type
+     * 
+     * @return Current writer type
+     */
+    IMPORT_C TInt GetCurrentWriterType();
+    
+    
+    /**
+     * Returns pointer to TraceCore owned activation / deactivation TDfcQue object.
+     */
+    inline TDynamicDfcQue* ActivationQ() {
+        return iActivationQ;
+        }
+    
+    /**
+     * Static method that returns pointer to TraceCore activation / deactivation dfc queue.
+     */
+    static TDynamicDfcQue* GetActivationQ() {
+        DTraceCore* tCore = DTraceCore::GetInstance();
+        if(tCore)
+            return tCore->ActivationQ();
+        else
+            return NULL;
+        }
+    
+   
+    
+    /**
+     * @internalTechnology 
+     * Sets the "Trace Dropped" flag
+     * @param aTraceDropped ETrue if Trace Dropped, EFalse Otherwise
+     */
+    IMPORT_C void SetPreviousTraceDropped(TBool aTraceDropped);
+    
+    /**
+     * @internalTechnology 
+     * returns the state of the  "Trace Dropped" flag
+     * @param none
+     */
+    IMPORT_C TBool PreviousTraceDropped() const; 
+    
+    /**
+     * @internalTechnology
+     * @return DTraceCore instance or NULL if creation failed.
+     */
+    IMPORT_C static DTraceCore* CreateInstance();
+    
+    /**
+     * Reactivate all currently activated traces
+     * @param none
+     * @return KErrNone if refresh successful
+     */
+    TInt RefreshActivations();
+    
+    /**
+     * Returns whether or not tracing is certified.
+     * The certification status is checked when TraceCore is initialised and then stored for later use.
+     * This stored value is used throughout the session, even if the status of the certificate changes.
+     * This is done to avoid performance issues when performing the check with every trace outputted. 
+     * @param none
+     * @return ETrue if tracing is certified, EFalse otherwise
+     */
+    inline TBool IsTraceCertified() { return iTraceCertified; };
+
+    /**
+     * Get the active writer
+     * @param none
+     * @return a pointer to the current
+     */
+    IMPORT_C DTraceCoreWriter* GetActiveWriter(); 
+
+private:
+
+    /**
+     * Constructor
+     */
+	DTraceCore();
+	
+	/**
+	 * Destructor
+	 */
+	~DTraceCore();
+	
+    /**
+     * Initializes trace core
+     */
+    TInt Init();
+    
+    /**
+     * Starts the BTrace handler
+     */
+    TInt StartBTrace();
+    
+    /**
+     * Starts the Printf trace handler
+     */
+    TInt StartPrintfTraceHandler();
+
+    /**
+     * Starts to use the first writer from the writers list
+     */
+    void SwitchToFirstWriter();
+
+    /**
+     * Forwards the active writer to handlers
+     */
+    void SetWriterToHandlers();
+    
+private:
+
+    /**
+     * TraceCore instance
+     */
+    static DTraceCore* iInstance;
+    
+    /**
+     * List of writers
+     */
+    RPointerArray< DTraceCoreWriter > iWriters;
+    
+    /**
+     * List of handlers
+     */
+    RPointerArray< DTraceCoreHandler > iHandlers;
+
+    /**
+     * List of activation interfaces
+     */
+    RPointerArray< MTraceCoreActivation > iActivations;
+    
+    /**
+     * Message router
+     */
+    DTraceCoreRouter* iRouter;
+    
+    /**
+     * Message sender / receiver
+     */
+    DTraceCoreSendReceive* iSendReceive;
+    
+    /**
+     * Activation notifier
+     */
+    DTraceCoreNotifier* iNotifier;    
+    
+    /**
+     * Configuration
+     */
+    DTraceCoreConfiguration* iConfiguration;    
+    
+    /**
+     * Internal message handler
+     */
+    DTraceCoreInternalMessageHandler* iInternalMessageHandler;    
+    
+    
+    /**
+     * BTrace handler
+     */
+    DTraceCoreBTraceHandler* iBTrace;
+    
+    /**
+     * Printf trace handler
+     */
+    DTraceCorePrintfTraceHandler* iPrintf;
+    
+    /**
+     * TraceCore settings
+     */
+    DTraceCoreSettings* iTraceCoreSettings;
+     
+    /**
+     * Writer that is currently active
+     */
+    DTraceCoreWriter* iActiveWriter;
+    
+    /**
+     * Activation / Deactivation DFC queue.
+     */
+    TDynamicDfcQue* iActivationQ;
+
+    /**
+     * Previous missing trace flag
+     */
+    TBool iPreviousTraceDropped;
+
+    /**
+     * Trace certified flag.
+     * The certification status is checked when TraceCore is initialised and then stored in this variable.
+     * This stored value is used throughout the session, even if the status of the certificate changes.
+     * This is done to avoid performance issues when performing the check with every trace outputted. 
+     */
+    TBool iTraceCertified;
+
+    };
+
+#endif
+
+#include "TraceCore.inl"
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/inc/TraceCore.inl	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,53 @@
+// 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 "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:
+//
+// Description:
+// Trace Core
+//
+
+#ifndef __TRACECORE_INL__
+#define __TRACECORE_INL__
+
+
+/**
+ * Gets the trace core router
+ */
+inline DTraceCoreRouter& DTraceCore::GetRouter()
+    {
+    __ASSERT_DEBUG( iRouter,
+        Kern::Fault( "DTraceCore::GetRouter(): iRouter NULL", KErrGeneral ) );
+    return *iRouter;
+    }
+
+/**
+ * Gets the trace core send-receive interface
+ */
+inline DTraceCoreSendReceive& DTraceCore::GetSendReceive()
+    {
+    __ASSERT_DEBUG( iSendReceive,
+        Kern::Fault( "DTraceCore::GetSendReceive(): iSendReceive NULL", KErrGeneral ) );
+    return *iSendReceive;
+    }
+    
+/**
+ * Gets the trace core notifier
+ */
+inline DTraceCoreNotifier& DTraceCore::GetNotifier()
+    {
+    __ASSERT_DEBUG( iNotifier,
+        Kern::Fault( "DTraceCore::GetNotifier(): iNotifier NULL", KErrGeneral ) );
+    return *iNotifier;
+    }
+
+#endif
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/inc/TraceCoreActivation.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,118 @@
+// 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 "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:
+//
+// Description:
+// Interface to activation bitmap classes
+//
+
+#ifndef __TRACECOREACTIVATION_H__
+#define __TRACECOREACTIVATION_H__
+
+
+class MTraceCoreActivation;
+class DTraceCoreSettings;
+
+
+/**
+ * Interface to get change notification from activation classes
+ */
+NONSHARABLE_CLASS( MTraceCoreActivationNotification )
+    {
+public:
+
+    /**
+     * Notification that the activation state has changed
+     * 
+     * @param aActivation the activation interface that was updated
+     * @param aFromSettings ETrue if activation was due to settings read, EFalse if from some other source
+     * @param aComponentId Component ID of the activation
+     */
+    virtual void ActivationChanged( MTraceCoreActivation& aActivation, TBool aFromSettings,
+            TUint32 aComponentId ) = 0;
+    };
+
+
+/**
+ * Interface to activation classes
+ */
+NONSHARABLE_CLASS( MTraceCoreActivation )
+    {
+public:
+
+    /**
+     * Checks if this bitmap supports the given component ID
+     */
+    virtual TBool IsComponentSupported( TUint32 aComponentID ) = 0;
+    
+    /**
+     * Gets activated groups for this component ID
+     * @param aComponentId the component ID
+     */
+    virtual RArray<TUint> GetActivatedGroups( const TUint32 aComponentId ) = 0;
+    
+    /**
+     * Updates this activation object from the given settings
+     * 
+     * @param aSettings the settings to be read
+     */
+    virtual void ReadFromSettings( DTraceCoreSettings& aSettings ) = 0;
+    
+    /**
+     * Updates the settings with the content of this activation object
+     * 
+     * @param aSettings the settings to be written
+     */
+    virtual void WriteToSettings( DTraceCoreSettings& aSettings ) = 0;
+    
+    /**
+     * Registers an activation notification interface
+     */
+    virtual TInt RegisterActivationNotification( MTraceCoreActivationNotification& aNotification ) = 0;
+    
+     /**
+     * Activate trace group.
+     * Method can be called only from Symbian OS thread context. 
+     * Activation of groupID/ComponentID from IRQs, IDFCs is not allowed.
+     *
+     * @param aComponentId The component ID
+     * @param aGroupId The group ID
+     */
+    virtual void ActivateTrace( const TUint32 aComponentId, const TUint32 aGroupId ) = 0;
+    
+    /**
+     * Deactivate trace group
+     *
+     * Method can be called only from Symbian OS thread context.
+     * Activation of groupID/ComponentID from IRQs, IDFCs is not allowed.
+     * 
+     * @param aComponentId The component ID
+     * @param aGroupId The group ID
+     */
+    virtual void DeactivateTrace( const TUint32 aComponentId, const TUint32 aGroupId ) = 0;
+
+    /**
+     * Deactivates all groups from a component
+     * 
+     * @param aComponentId The component ID
+     */
+    virtual void DeactivateAll( const TUint32 aComponentId ) = 0;
+
+    /**
+     * Reactivate all currently activated traces
+     * 
+     * @return KErrNone if refresh successful
+     */
+    virtual TInt RefreshActivations() { return KErrNotFound; };
+    };
+
+    
+#endif // __TRACECOREACTIVATION_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/inc/TraceCoreActivationBase.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,121 @@
+// 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 "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:
+//
+// Description:
+// Base class for activation classes
+//
+
+#ifndef __TRACECOREACTIVATIONBASE_H__
+#define __TRACECOREACTIVATIONBASE_H__
+
+
+// Include files
+#include "TraceCoreSubscriber.h"
+#include "TraceCoreActivation.h"
+
+//forward declarations
+class DMutex;
+
+/**
+ * Base class for activation objects. This extends the subscriber base class to receive activation updates
+ */
+NONSHARABLE_CLASS( DTraceCoreActivationBase ) : public DTraceCoreSubscriber, public MTraceCoreActivation
+    {
+public:
+
+    /**
+     * Constructor
+     */
+    DTraceCoreActivationBase();
+    
+    /**
+     * Destructor
+     */
+    virtual ~DTraceCoreActivationBase();
+    
+    /**
+     * Registers an activation notification interface
+     * 
+     * @param aNotification the notification interface
+     */
+    TInt RegisterActivationNotification( MTraceCoreActivationNotification& aNotification );
+    
+protected:
+
+    /**
+     * Subscribes to message ID and registers to activation interface list
+     * 
+     * @param aMessageID the message id to be subscribed
+     */         
+    TInt Init( TUint32 aMessageId );
+
+    /**
+     * Subscribes to message ID and registers to activation interface list
+     * 
+     * @param aMessageID the message id to be subscribed
+     */
+    TInt SubscribeMessage( TUint32 aMessageId, TMessageHeaderFormat aMsgFormat );
+
+    /**
+     * Sends notification to TraceCore internal activation notification interfaces
+     * 
+     * @param aFromSettings ETrue if activation was due to settings read, EFalse if from some other source
+     * @param aComponentId Component ID of the activation
+     */
+    void NotifyInternalActivation( TBool aFromSettings, TUint32 aComponentId );
+    
+    /**
+     * Send response
+     * 
+     * @param aMessage Response message
+     */
+    void SendResponse( TTraceMessage &aMessage );
+    
+    /**
+     * Prevent read-check to internal structures (fast lock).
+     */
+    inline TInt ReadLock();
+    
+    /**
+     * Restore read-access to internal structures.
+     */
+    inline void ReadUnlock(TInt aIrqLevel);
+    
+    
+protected: //data
+    
+    /**
+     * Lock used in 'critical path' where performance is very important.
+     * It is used in those routines where structures are checked and not modified.
+     */
+#if defined(__SMP__)
+    TSpinLock   iActivationReadLock;
+#endif
+    
+    /**
+     * Used to store Irq level between spin lock/unlock operation.
+     */
+    TInt iIrqLevel;
+    
+private:
+
+    /**
+     * Array of activation notification interfaces
+     */
+    RPointerArray< MTraceCoreActivationNotification > iActivationNotification;
+    };
+
+
+#include "TraceCoreActivationBase.inl"
+
+
+#endif /* __TRACECOREACTIVATIONBASE_H__ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/inc/TraceCoreActivationBase.inl	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,45 @@
+// 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 "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:
+//
+// Description:
+// Base class for activation classes
+//
+
+#ifndef __TRACECOREACTIVATIONBASE_INL__
+#define __TRACECOREACTIVATIONBASE_INL__
+
+#include <kern_priv.h>
+#include "TraceCoreActivationBase.h"
+
+
+inline TInt DTraceCoreActivationBase::ReadLock()
+    {
+#if defined(__SMP__)
+   return __SPIN_LOCK_IRQSAVE(iActivationReadLock);
+#else
+    return NKern::DisableAllInterrupts();
+#endif
+    }
+
+
+inline void DTraceCoreActivationBase::ReadUnlock(TInt aIrqLevel)
+    {
+#if defined(__SMP__)
+    __SPIN_UNLOCK_IRQRESTORE(iActivationReadLock, aIrqLevel);
+#else
+    NKern::RestoreInterrupts(aIrqLevel);
+#endif
+    }
+
+
+#endif
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/inc/TraceCoreBTraceHandler.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,149 @@
+// 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 "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:
+//
+// Description:
+// Handler interface for BTrace categories
+//
+
+#ifndef __TRACECOREBTRACEHANDLER_H__
+#define __TRACECOREBTRACEHANDLER_H__
+
+
+// Include files
+#include "TraceCoreHandler.h"
+
+
+// Forward declarations
+class DTraceCoreWriter;
+class DTraceCoreSettings;
+class DBTraceCategoryHandler;
+class DBTraceOstCategoryHandler;
+class DBTraceKernelCategoryHandler;
+class DBTracePrintfCategoryHandler;
+
+
+/**
+ * TraceCoreHandler implementation for BTrace
+ */
+NONSHARABLE_CLASS( DTraceCoreBTraceHandler ) : public DTraceCoreHandler
+    {
+public:
+
+    /**
+     * Constructor
+     */
+    DTraceCoreBTraceHandler();
+    
+    /**
+     * Destructor
+     */
+    ~DTraceCoreBTraceHandler();
+    
+    /**
+     * Initializes this handler
+     */
+    TInt Init();
+    
+    /**
+     * Delegates the writer to category handlers
+     *
+     * @param aWriter The new writer
+     */
+    void PrepareSetWriter( DTraceCoreWriter* aWriter );
+    
+    /**
+     * Delegates the writer to category handlers
+     *
+     * @param aWriter The new writer
+     */
+    void SetWriter( DTraceCoreWriter* aWriter );
+  
+    /**
+     * Delegates the settings (saver) to category handlers
+     */
+    void SetSettings( DTraceCoreSettings* aSettings );
+  
+    /**
+     * Registers a category handler. This overwrites the existing category handler for given category
+     *
+     * @param aCategory The category to be processed with the category handler
+     * @param aHandler The handler which processes the category
+     */
+    void RegisterCategoryHandler( TUint8 aCategory, DBTraceCategoryHandler& aHandler );
+
+    /**
+     * Unregisters a category handler
+     *
+     * @param aCategory The category to be removed
+     */
+    void UnregisterCategoryHandler( TUint8 aCategory );
+
+private:
+
+    /**
+     * Callback function that is registered to BTrace
+     *
+     * @param aHeader BTrace header
+     * @param aHeader2 Extra header data
+     * @param aContext The thread context in which this function was called
+     * @param a1 The first trace parameter
+     * @param a2 The second trace parameter
+     * @param a3 The third trace parameter
+     * @param aExtra Extra trace data
+     * @param aPc The program counter value
+     */
+    static TBool BTraceHandlerFunc( TUint32 aHeader, TUint32 aHeader2, const TUint32 aContext, 
+        const TUint32 a1, const TUint32 a2, const TUint32 a3, const TUint32 aExtra, const TUint32 aPc );
+    
+    /**
+     * Gets the category handler for given BTrace header
+     *
+     * @param aHeader BTrace header
+     */
+    inline DBTraceCategoryHandler* GetCategoryHandler( TUint32 aHeader );
+    
+    /**
+     * Starts the OST category handler
+     */
+    TInt StartOstHandler();
+    /**
+     * Starts the kernel category handler
+     */
+    TInt StartKernelHandler();
+
+private:
+
+    /**
+     * Static instance, accessed from the BTrace handler callback
+     */
+    static DTraceCoreBTraceHandler* iInstance;
+
+    /**
+     * Registered category handlers
+     */
+    DBTraceCategoryHandler** iCategoryHandlers;
+    
+    /**
+     * Category handler for OST
+     */
+    DBTraceOstCategoryHandler* iOstHandler;
+
+    /**
+     * Category handler for Symbian BTrace categories
+     */
+    DBTraceKernelCategoryHandler* iKernelHandler;
+
+};
+
+#endif // __TRACECOREBTRACEHANDLER_H__
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/inc/TraceCoreCommon.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,66 @@
+// 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 "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:
+//
+// Description:
+// Trace Core
+//
+
+#ifndef __TRACECORECOMMON_H__
+#define __TRACECORECOMMON_H__
+
+#include <opensystemtrace.h>
+
+/**
+ * Checks whether a given Group ID is valid or not
+ *
+ * @param aGroupId The group ID
+ * @return ETrue if group ID is valid, EFalse if not
+ */
+inline TBool GroupIdIsValid( TUint32 aGroupId )
+    {
+    return aGroupId <= KMaxGroupId ;
+    }
+
+/**
+ * Checks whether a given Component ID is valid or not
+ *
+ * @param aComponentId The component ID
+ * @return ETrue if group ID is valid, EFalse if not
+ */
+inline TBool ComponentIdIsValid( TUint32 aComponentId )
+    {
+    return  aComponentId >0 ;
+    }
+
+/**
+ * Converts aGroupId from a trace word to a group ID:
+ * If aGroupId is 16-bit it is returned unchanged
+ * If aGroupId is 32-bit the top 16-bits are returned
+ * @param aGroupId The group ID
+ * @return The part of the input parameter containing the group ID
+ */
+inline TUint32 FixGroupId( TUint32 aGroupId )
+    {
+    TUint32 groupId = aGroupId;
+    // Get top 16 bits of groupId
+    TUint32 top16bits = (groupId & 0xffff0000) >> GROUPIDSHIFT;
+    // If top 16 bits are non-zero, assume they contain the Group ID
+    if ( top16bits != 0 )
+        {
+        groupId = top16bits;
+        }
+    return groupId;
+    }
+
+#endif
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/inc/TraceCoreConfiguration.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,54 @@
+// 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 "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:
+//
+// Description:
+// TraceCore configuration message subscriber
+//
+
+#ifndef __TRACECORECONFIGURATION_H__
+#define __TRACECORECONFIGURATION_H__
+
+#include <klib.h>
+
+/**
+ * TTraceCoreConfiguration function to choosed in DTraceCoreConfiguration::GetSet.
+ */
+enum TTraceCoreConfiguration
+    {
+    EGetCurrentWriterType = 0,     // Return type TWriterType
+    ESetWriter = 1,     // Return KErrNone/KErrNotFound
+    ELastFunction       // Return KErrNotSupported
+    };
+
+
+class DTraceCoreConfiguration : public DBase
+    {
+public:
+    DTraceCoreConfiguration();
+    virtual ~DTraceCoreConfiguration();
+    
+    /**
+     * Initializes configuration
+     */
+    TInt Init();
+    
+    
+    /**
+     * @param aFunc Function choosed (@see TTraceCoreConfiguration)
+     * @return Depending of aFunc paramter (@see TTraceCoreConfiguration9
+     */
+    IMPORT_C static TUint32 GetSet(TTraceCoreConfiguration aFunc, TUint32 aParam);
+    };
+
+#endif /* __TRACECORECONFIGURATION_H__*/
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/inc/TraceCoreConstants.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,141 @@
+// 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 "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:
+//
+// Description:
+// TraceCore constants
+//
+// @internalTechnology
+// Please do not use this header file as its content may chnage in future.
+//
+
+#ifndef __TRACECORECONSTANTS_H__
+#define __TRACECORECONSTANTS_H__
+
+#include <opensystemtrace_types.h>
+
+
+/**
+ * Enables statistics of media writer
+ */
+#define MEDIA_WRITER_STATISTICS
+
+/**
+ * Disables printf traces from media writer
+ */
+// #define MEDIA_WRITER_TRACE_DEBUG
+
+/**
+ * Trace bitmap default value
+ * 0xff -> All traces enabled at boot
+ * 0x00 -> All traces disabled at boot
+ */
+const TUint8 KDefaultTraceBitmapByte = 0x00;
+
+/**
+ * Byte size
+ */
+const TInt KByteSize = 8;
+
+/**
+ * Byte mask
+ */
+const TUint KByteMask = 0xFF;
+
+/** 
+ * Default DFC queue priority
+ */
+const TUint8 KDefaultDfcPriority = 3; 
+
+/**
+ * BTrace category ID for Autogen traces
+ */
+const TUint KCategoryNokiaAutogen = 0xA0;
+
+/**
+ * BTrace category ID for branch coverage traces
+ */
+const TUint KCategoryNokiaBranchCoverage = 0xA1;
+
+/**
+ * OST component UID for Symbian kernel hooks
+ */
+const TUint32 KKernelHooksOSTComponentUID = 0x2001022D;
+
+/**
+ * OST component UID for Autogen traces
+ */
+const TUint32 KOldNokiaAutogenOSTComponentUID = 0;
+
+/**
+ * Constants for BTrace header
+ */
+const TUint KHeaderSize = 4;
+const TUint KHeader2Size = 4;
+const TUint KTimestampSize = 4;
+const TUint KContextIdSize = 4;
+const TUint KExtraSize = 4;
+const TUint KPcSize = 4;
+const TUint KA1Size = 4;
+const TUint KA2Size = 4;
+const TUint KA3Size = 4;
+const TUint KComponentIDSize = 4;
+
+/**
+ * Number of categories in BTrace
+ */
+const TInt KBTraceCategoryCount = 256;
+
+/**
+ * Represents all groups of a component when registering with notifier
+ */
+const TUint KAllGroups = 0;
+
+
+#ifdef __WINS__
+/**
+ * Endian swapper for trace ID's
+ */
+#define SWAP_DATA( num ) ( num )
+
+/**
+ * Endian swapper for trace data
+ */
+#define SWAP_ID( num ) ( \
+    ( ( ( num ) & 0xff000000 ) >> 24 ) | ( ( ( num ) & 0x00ff0000 ) >> 8  ) | \
+    ( ( ( num ) & 0x0000ff00 ) <<  8 ) | ( ( ( num ) & 0x000000ff ) << 24 ) )
+
+#else
+
+
+/**
+ * Endian swapper for trace ID's
+ */
+#define SWAP_ID( num ) ( num )
+
+/**
+ * Endian swapper for trace data
+ */
+#define SWAP_DATA( num ) ( \
+    ( ( ( num ) & 0xff000000 ) >> 24 ) | ( ( ( num ) & 0x00ff0000 ) >> 8  ) | \
+    ( ( ( num ) & 0x0000ff00 ) <<  8 ) | ( ( ( num ) & 0x000000ff ) << 24 ) )
+#endif
+
+const TUint8 KMinKernelCategory = BTrace::EThreadIdentification;
+
+const TUint8 KMaxKernelCategory = BTrace::EPlatformSpecificFirst - 1;
+
+const TUint8 KMaxCategory = KMaxGroupId;
+
+
+#endif
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/inc/TraceCoreDebug.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,84 @@
+// 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 "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:
+//
+// Description:
+// TraceCore
+//
+
+#ifndef __TRACECOREDEBUG_H__
+#define __TRACECOREDEBUG_H__
+
+/**
+ * Trace levels
+ */
+typedef enum
+    {
+    // Panics only
+    ETraceLevelPanic,
+
+    // Errors
+    ETraceLevelError,
+
+    // Warnings
+    ETraceLevelWarning,
+
+    // Normal traces
+    ETraceLevelNormal,
+    
+    // Extra traces
+    ETraceLevelExtra,
+    
+    // Flow traces
+    ETraceLevelFlow,
+    
+    // Errors within trace functions
+    ETraceLevelTraceError,
+    
+    // Flow within trace functions. Note that all BTrace calls throughout the system will
+    // generate extra flow traces if this is set -> Slow...
+    ETraceLevelTraceFlow,
+    
+    // All traces on
+    ETraceLevelAll = KMaxTInt
+    } TTraceLevel;
+    
+/**
+ * Compile-time trace level for TraceCore debug purposes
+ */
+#define TC_TRACE_LEVEL ETraceLevelError
+
+/**
+ * Internal debug traces are on only in debug builds
+ */
+#ifdef _DEBUG
+#ifdef TC_TRACE_LEVEL
+#define TC_TRACE( level, trace ) /*lint -save -e506 -e522 -e774 -e834 -e960*/ { if ( level <= TC_TRACE_LEVEL ) { trace; } }	/*lint -restore*//* CodForChk_Dis_LengthyLine */
+#else
+#define TC_TRACE( level, trace ) {}
+#endif
+#else
+#define TC_TRACE( level, trace ) {}
+#endif // _DEBUG
+
+// When defined, POST code is printed out
+#define USE_POSTCODE
+
+#ifdef USE_POSTCODE
+#define POSTCODE( x ) {x}
+#else
+#define POSTCODE( x ) {}
+#endif
+
+
+#endif // __TRACECOREDEBUG_H__
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/inc/TraceCoreHandler.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,96 @@
+// 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 "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:
+//
+// Description:
+// Base class for trace core handlers.
+//
+
+#ifndef __TRACECOREHANDLER_H__
+#define __TRACECOREHANDLER_H__
+
+
+// Include files
+#include <kernel/kernel.h>
+
+
+// Forward declarations
+class DTraceCoreSettings;
+class DTraceCoreWriter;
+
+
+/**
+ * Base class for trace core handlers. A handler receives trace data and delegates it to writer
+ */
+NONSHARABLE_CLASS( DTraceCoreHandler ) : public DBase
+    {
+public:
+
+    /**
+     * Constructor
+     */
+    DTraceCoreHandler();
+    
+    /**
+     * Destructor
+     */
+    ~DTraceCoreHandler();
+
+    /**
+     * Registers this handler to trace core.
+     */
+    TInt Register();
+    
+    /**
+     * Called before SetWriter with interrupts enabled
+     *
+     * @param aWriter The new writer
+     */
+    virtual void PrepareSetWriter( DTraceCoreWriter* aWriter );
+
+    /**
+     * Sets the active writer. This is called with interrupts disabled
+     *
+     * @param aWriter The new writer
+     */
+    virtual void SetWriter( DTraceCoreWriter* aWriter );
+
+	/**
+     * Sets the settings (saver). Called by trace core
+     *
+     * @param aSettings The new settings
+     */
+    virtual void SetSettings( DTraceCoreSettings* aSettings );
+    
+private:
+
+    /**
+     * Unregisters this handler from trace core. Called from destructor
+     */
+    void Unregister();
+    
+protected:
+    
+    /**
+     * Writer interface
+     */
+ 	DTraceCoreWriter* iWriter;
+ 	
+ 	/**
+     * Settings interface
+     */
+ 	DTraceCoreSettings* iSettings;
+ 	
+};
+
+#endif
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/inc/TraceCoreInternalMessageHandler.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,76 @@
+// 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 "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:
+//
+// Description:
+// TraceCore configuration message subscriber
+//
+
+#ifndef __TRACECOREINTERNALMESSAGEHANDLER_H__
+#define __TRACECOREINTERNALMESSAGEHANDLER_H__
+
+
+// Include files
+#include "TraceCoreSubscriber.h"
+
+
+/**
+ * Trace configuration. This extends the subscriber base class to receive configuration requests
+ */
+NONSHARABLE_CLASS( DTraceCoreInternalMessageHandler ) : public DTraceCoreSubscriber
+    {
+public:
+
+    /**
+     * Constructor
+     */
+    DTraceCoreInternalMessageHandler();
+    
+    /**
+     * Destructor
+     */
+    ~DTraceCoreInternalMessageHandler();
+    
+    /**
+     * Initializes configuration
+     */
+    TInt Init();
+    
+    /**
+     * Message received callback
+     *
+     * @param aMessage The message
+     */
+    void MessageReceived( TTraceMessage& aMsg );
+    
+private:
+
+    /**
+     * Sends a response message
+     * 
+     * @param aMsg the incoming message
+     * @param aResult the result code
+     */
+    void SendResponse( TTraceMessage& aMsg, TInt aResult );
+    
+    /**
+     * Handle version query
+     * 
+     * @param aMsg the incoming message
+     * @param aResult the result code
+     */
+    void HandleOstVersionQuery( TTraceMessage& aMsg, TInt aMessageId );
+
+    };
+
+#endif // __TRACECOREINTERNALMESSAGEHANDLER_H__
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/inc/TraceCoreMediaIf.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,104 @@
+// 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 "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:
+//
+// Description:
+// Media interface base class
+//
+
+#ifndef __TRACECOREMEDIAIF_H__
+#define __TRACECOREMEDIAIF_H__
+
+
+// Include files
+#include <kernel/kernel.h>
+
+
+// Forward declarations
+class MTraceCoreMediaIfCallback;
+class TTraceMessage;
+
+/**
+ * Flag, which tells that this interface supports the Send function
+ */
+const TUint32 KMediaIfSendSupported        = 0x01;
+
+/**
+ * Flag, which tells that this interface supports the SendTrace function
+ */
+const TUint32 KMediaIfSendTraceSupported   = 0x02;
+
+/**
+ * Flag for the plug-in interface
+ */
+const TUint32 KMediaIfPluginSupported      = 0x04;
+
+
+/**
+ * Media interface base class
+ */
+NONSHARABLE_CLASS( DTraceCoreMediaIf ) : public DBase
+    {
+public:
+
+    /**
+     * Constructor
+     * 
+     * @param aFlags the media flags
+     */
+    DTraceCoreMediaIf( TUint32 aFlags );
+    
+    /**
+     * Initializes this interface
+     * 
+     * @param aCallback Callback interface which is notified when ISI messages are received
+     */
+	virtual TInt Init( MTraceCoreMediaIfCallback& aCallback ) = 0;
+
+    /**
+     * Gets the properties of this interface
+     */
+    inline TUint32 GetFlags();
+    
+	/**
+	 * Sends a message
+	 *
+	 * @param aMsg The message to be sent
+	 */
+	virtual TInt Send( TTraceMessage& aMsg );
+    
+    /**
+     * Sends a trace
+     *
+     * @param aMsg The trace to be sent
+     */
+    virtual TInt SendTrace( const TDesC8& aMsg );
+    
+protected:
+
+	/**
+	 * Callback to TraceCore
+	 */
+	MTraceCoreMediaIfCallback* iCallback;
+    
+private:
+
+    /**
+     * Media properties
+     */
+    TUint32 iFlags;
+    };
+
+#endif // __TRACECOREISAIF_H__
+
+#include "TraceCoreMediaIf.inl"
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/inc/TraceCoreMediaIf.inl	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,30 @@
+// 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 "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:
+//
+// Description:
+// Media interface base class inlines
+//
+
+#ifndef __TRACECOREMEDIAIF_INL__
+#define __TRACECOREMEDIAIF_INL__
+
+/**
+ * Gets the properties of this interface
+ */
+inline TUint32 DTraceCoreMediaIf::GetFlags()
+    {
+    return iFlags;
+    }
+
+#endif
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/inc/TraceCoreMediaIfCallback.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,50 @@
+// 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 "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:
+//
+// Description:
+// Callback interface for incoming messages from media interface
+//
+
+#ifndef __TRACECOREMEDIAIFCALLBACK_H__
+#define __TRACECOREMEDIAIFCALLBACK_H__
+
+// Forward declarations
+class TTraceMessage;
+class DTraceCoreMediaIf;
+
+/**
+ * Callback interface for incoming messages from media interface
+ */
+NONSHARABLE_CLASS( MTraceCoreMediaIfCallback )
+    {
+public:
+
+    /**
+     * Message was received
+     * 
+     * @param aMsg The message that was received
+     * @return KErrNotFound if the message id was not found (not subscribed), KErrNone if found
+     */
+    virtual TInt MessageReceived( TTraceMessage &aMsg ) = 0;
+    
+    /**
+     * Set sender media
+     * 
+     * @param aSenderMedia Pointer to the new sender
+     * @return KErrNone if media change ok
+     */
+    virtual TInt SetSenderMedia( DTraceCoreMediaIf* aSenderMedia ) = 0;
+    };
+
+#endif
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/inc/TraceCoreMediaPlugin.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,84 @@
+// 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 "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:
+//
+// Description:
+// Interface class for media plug-ins
+//
+
+#ifndef __TRACECOREMEDIAPLUGIN_H__
+#define __TRACECOREMEDIAPLUGIN_H__
+
+
+// Include files
+#include <kernel/kernel.h>
+
+// Forward declarations
+class DTraceCorePluginIf;
+class TTraceMessage;
+
+
+/**
+ * Media plug-in base class
+ */
+class DTraceCoreMediaPlugin : public DBase
+    {
+public:
+
+    /**
+     * Constructor
+     */
+    IMPORT_C DTraceCoreMediaPlugin();
+
+    /**
+     * Destructor
+     */
+    IMPORT_C ~DTraceCoreMediaPlugin();
+
+    /**
+     * Registers this plug-in to TraceCore
+     */
+    IMPORT_C TInt Register();
+    
+    /**
+     * Called by the plug-in to send an incoming message to TraceCore
+     * 
+     * @param aMsg The message that was received
+     */
+    IMPORT_C void MessageReceived( TTraceMessage &aMsg );
+    
+    /**
+     * Merges the header and data into a single buffer
+     * 
+     * @param aMsg Message to be sent.
+     * @param aMsgBlock The message block where data is merged
+     * @return KErrNone if successful
+     */
+    IMPORT_C TInt MergeHeaderAndData( const TTraceMessage& aMsg, TDes8& aTarget );
+
+    /**
+     * Called by TraceCore to send a message out
+     * 
+     * @param aMsg The message to be sent
+     */
+    virtual TInt SendMessage( TTraceMessage &aMsg ) = 0;
+
+private:
+
+    /**
+     * Unregisters this plug-in from TraceCore. Called from destructor
+     */
+    void Unregister();
+    };
+
+#endif // __TRACECOREMEDIAPLUGIN_H__
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/inc/TraceCoreMediaSWriter.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,216 @@
+// 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 "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:
+//
+// Description:
+// Trace Core
+//
+
+#ifndef TRACECOREMEDIASWRITER_H_
+#define TRACECOREMEDIASWRITER_H_
+
+
+// Include files
+#include "TraceCoreWriter.h"
+
+
+// Forward declarations
+class DTraceCoreMediaIf;
+class TMediaSWriterStatistics;
+
+/**
+ * Properties of a single trace
+ */
+class TTraceBuffer
+    {
+public:
+    TTraceBuffer* iNext;
+    TUint8* iBuffer;
+    TUint16 iLength;
+    TUint16 iMissedBefore;
+    TUint8 iType;
+    };
+
+
+/**
+ * Writer implementation, which uses the media interface to write data
+ */
+class DTraceCoreMediaSWriter : public DTraceCoreWriter
+    {
+public:
+    
+    /**
+     * Constructor
+     */
+    IMPORT_C DTraceCoreMediaSWriter();
+    
+    /**
+     * Destructor
+     */
+    IMPORT_C ~DTraceCoreMediaSWriter();
+    
+    /**
+     * Registers this writer to TraceCore
+     */
+    IMPORT_C TInt Register();
+    
+    /**
+     * Gets the number of traces allowed per second
+     */
+    virtual TInt GetTraceFrequency() = 0;
+    
+    /**
+     * Initializes a trace buffer
+     * 
+     * @param aType the entry type
+     * @param aBuffer the buffer
+     */
+    virtual void StartBuffer( TWriterEntryType aType, TTraceBuffer& aBuffer ) = 0;
+    
+    /**
+     * Finishes a trace buffer
+     * 
+     * @param aBuffer the buffer
+     * @return ETrue if trace can be 'dropped'
+     */
+    virtual TBool EndBuffer( TTraceBuffer& aBuffer ) = 0;
+    
+private:
+
+    /**
+     * Starts an entry
+     *
+     * @return the entry ID that is passed to other Write-functions
+     */
+    IMPORT_C TUint32 WriteStart( TWriterEntryType aType );
+
+    /**
+     * Ends an entry
+     *
+     * @param aEntryId the entry ID returned by WriteStart
+     */
+    IMPORT_C void WriteEnd( TUint32 aEntryId );
+
+    /**
+     * Writes 8-bit data to given entry
+     * 
+     * @param aEntryId the entry ID returned by WriteStart
+     * @param aData the trace data
+     */
+    IMPORT_C void WriteData( TUint32 aEntryId, TUint8 aData );
+
+    /**
+     * Writes 16-bit data to given entry
+     * 
+     * @param aEntryId the entry ID returned by WriteStart
+     * @param aData the trace data
+     */
+    IMPORT_C void WriteData( TUint32 aEntryId, TUint16 aData );
+
+    /**
+     * Writes 32-bit data to given entry
+     * 
+     * @param aEntryId the entry ID returned by WriteStart
+     * @param aData the trace data
+     */
+    IMPORT_C void WriteData( TUint32 aEntryId, TUint32 aData );
+    
+    /**
+     * DFC for sending data
+     *  
+     * @param aMediaWriter the media writer
+     */
+    static void SendDfc( TAny* aMediaWriter );
+    
+    /**
+     * Called from the static function to send data
+     */
+    void SendDfc();
+    
+    /**
+     * Initializes the statistics
+     */
+    TBool InitStatistics();
+    
+    
+private:
+        
+    /**
+     * Media interface for sending data
+     */
+    DTraceCoreMediaIf* iMediaIf;
+        
+    /**
+     * DFC for sending data
+     */
+    TDfc iSendDfc;
+        
+    /**
+     * Timer which is used to send traces
+     */
+    TTickLink iSendTimer;
+    
+    /**
+     * Flags which tells if the timer is active or not
+     */
+    TBool iSendTimerActive;
+    
+    /**
+     * Pointer to the list of free trace buffers
+     */
+    TTraceBuffer* iFirstFreeBuffer;
+    
+    /**
+     * Pointer to the next trace to be sent
+     */
+    TTraceBuffer* iFirstReadyBuffer;
+    
+    /**
+     * Pointer to the end of list where new traces are added
+     */
+    TTraceBuffer* iLastReadyBuffer;
+    
+    /**
+     * All trace buffers
+     */
+    TTraceBuffer* iTraceBuffers;
+
+    /**
+     * Number of free buffers
+     */
+    TUint32 iFreeBuffers;
+    
+    /**
+     * Thread which sends data
+     */
+    NThread* iSenderThread;
+
+    /**
+     * Timestamp of the last trace sent
+     */
+    TUint32 iLastTraceSent;
+    
+    /**
+     * Media writer statistics
+     */
+    TMediaSWriterStatistics* iStatistics;
+    
+    /**
+     * Number of FastCounter ticks between traces
+     */
+    TInt iFastCounterBetweenTraces;
+    
+    };
+
+
+#endif /*TRACECOREMEDIASWRITER_H_*/
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/inc/TraceCoreMediaWriter.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,232 @@
+// 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 "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:
+//
+// Description:
+// Trace Core
+//
+
+#ifndef __TRACECOREMEDIAWRITER_H__
+#define __TRACECOREMEDIAWRITER_H__
+
+
+// Include files
+#include "TraceCoreWriter.h"
+
+
+// Forward declarations
+class DTraceCoreMediaIf;
+class TMediaWriterStatistics;
+
+
+/**
+ * Properties of a single trace
+ */
+class TTraceBuffer
+    {
+public:
+    TTraceBuffer* iNext;
+    TUint8* iBuffer;
+    TUint16 iLength;
+    TUint16 iMissedBefore;
+    TUint8 iType;
+    };
+
+
+/**
+ * Writer implementation, which uses the media interface to write data
+ */
+class DTraceCoreMediaWriter : public DTraceCoreWriter
+    {
+public:
+    
+    /**
+     * Constructor
+     */
+    IMPORT_C DTraceCoreMediaWriter();
+    
+    /**
+     * Destructor
+     */
+    IMPORT_C ~DTraceCoreMediaWriter();
+    
+    /**
+     * Registers this writer to TraceCore
+     */
+    IMPORT_C TInt Register();
+    
+    /**
+     * Gets the number of traces allowed per second
+     */
+    virtual TInt GetTraceFrequency() = 0;
+    
+    /**
+     * Initializes a trace buffer
+     * 
+     * @param aType the entry type
+     * @param aBuffer the buffer
+     */
+    virtual void StartBuffer( TWriterEntryType aType, TTraceBuffer& aBuffer ) = 0;
+    
+    /**
+     * Finishes a trace buffer
+     * 
+     * @param aBuffer the buffer
+     */
+    virtual void EndBuffer( TTraceBuffer& aBuffer ) = 0;
+    
+private:
+
+    /**
+     * Starts an entry
+     *
+     * @return the entry ID that is passed to other Write-functions
+     */
+    IMPORT_C TUint32 WriteStart( TWriterEntryType aType );
+
+    /**
+     * Ends an entry
+     *
+     * @param aEntryId the entry ID returned by WriteStart
+     */
+    IMPORT_C void WriteEnd( TUint32 aEntryId );
+
+    /**
+     * Writes 8-bit data to given entry
+     * 
+     * @param aEntryId the entry ID returned by WriteStart
+     * @param aData the trace data
+     */
+    IMPORT_C void WriteData( TUint32 aEntryId, TUint8 aData );
+
+    /**
+     * Writes 16-bit data to given entry
+     * 
+     * @param aEntryId the entry ID returned by WriteStart
+     * @param aData the trace data
+     */
+    IMPORT_C void WriteData( TUint32 aEntryId, TUint16 aData );
+
+    /**
+     * Writes 32-bit data to given entry
+     * 
+     * @param aEntryId the entry ID returned by WriteStart
+     * @param aData the trace data
+     */
+    IMPORT_C void WriteData( TUint32 aEntryId, TUint32 aData );
+	
+    /**
+     * Timer which enques the send DFC
+     * 
+     * @param aMediaWriter the media writer
+     */
+    static void SendTimerCallback( TAny* aMediaWriter );
+    
+    /**
+     * Called from the static timer callback function
+     */
+    void SendTimerCallback();
+    
+	/**
+	 * DFC for sending data
+     * 
+     * @param aMediaWriter the media writer
+	 */
+	static void SendDfc( TAny* aMediaWriter );
+    
+    /**
+     * Called from the static function to send data
+     */
+    void SendDfc();
+    
+    /**
+     * Initializes the statistics
+     */
+    TBool InitStatistics();
+    
+    /**
+     * Blocks the current thread for a while
+     * 
+     * @param aType the context type from NThread::UserContextType
+     */
+    void Block( TInt aType );
+    
+private:
+	
+	/**
+	 * Media interface for sending data
+	 */
+    DTraceCoreMediaIf* iMediaIf;
+	
+	/**
+	 * DFC for sending data
+	 */
+	TDfc iSendDfc;
+	
+    /**
+     * Timer which is used to send traces
+     */
+    TTickLink iSendTimer;
+    
+    /**
+     * Flags which tells if the timer is active or not
+     */
+    TBool iSendTimerActive;
+    
+    /**
+     * Pointer to the list of free trace buffers
+     */
+    TTraceBuffer* iFirstFreeBuffer;
+    
+    /**
+     * Pointer to the next trace to be sent
+     */
+    TTraceBuffer* iFirstReadyBuffer;
+    
+    /**
+     * Pointer to the end of list where new traces are added
+     */
+    TTraceBuffer* iLastReadyBuffer;
+    
+    /**
+     * All trace buffers
+     */
+    TTraceBuffer* iTraceBuffers;
+
+    /**
+     * Number of free buffers
+     */
+    TUint32 iFreeBuffers;
+    
+    /**
+     * Thread which sends data
+     */
+    NThread* iSenderThread;
+
+    /**
+     * Timestamp of the last trace sent
+     */
+    TUint32 iLastTraceSent;
+    
+    /**
+     * Media writer statistics
+     */
+    TMediaWriterStatistics* iStatistics;
+    
+    /**
+     * Number of FastCounter ticks between traces
+     */
+    TInt iFastCounterBetweenTraces;
+    };
+
+#endif
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/inc/TraceCoreMessageReceiver.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,42 @@
+// 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 "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:
+//
+// Description:
+// Incoming message notifications
+// 
+
+#ifndef __TRACECOREMESSAGERECEIVER_H__
+#define __TRACECOREMESSAGERECEIVER_H__
+
+//Forward declarations
+class TTraceMessage;
+
+
+/**
+ * Incoming message notifications
+ */
+NONSHARABLE_CLASS( MTraceCoreMessageReceiver )
+    {
+public:
+
+    /**
+     * Message received notification
+     * 
+     * @param aMsg The message that was received
+     * @return KErrNotFound if the message id was not found (not subscribed), KErrNone if found
+     */
+    virtual TInt MessageReceived( TTraceMessage &aMsg ) = 0;
+    };
+
+#endif
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/inc/TraceCoreMessageSender.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,42 @@
+// 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 "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:
+//
+// Description:
+// Interface used by subscribers to send messages
+// 
+
+#ifndef __TRACECOREMESSAGESENDER_H__
+#define __TRACECOREMESSAGESENDER_H__
+
+
+// Forward declarations
+class TTraceMessage;
+
+
+/**
+ * Interface used by subscribers to send messages
+ */
+class MTraceCoreMessageSender
+    {
+public:
+
+    /**
+     * Sends a message
+     * 
+     * @param aMessage The message data
+     */
+    virtual TInt SendMessage( TTraceMessage &aMessage ) = 0;
+    };
+
+#endif
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/inc/TraceCoreMessageUtils.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,54 @@
+// 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 "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:
+//
+// Description:
+// Utility functions for messaging
+// 
+
+#ifndef __TRACECOREISAUTILS_H__
+#define __TRACECOREISAUTILS_H__
+
+
+// Include files
+#include <kernel/kernel.h>
+
+
+// Forward declarations
+class TTraceMessage;
+
+
+/**
+ * Utility functions for messaging
+ */
+class TTraceCoreMessageUtils
+	{
+public:
+    /**
+     * Get the message length 
+     * 
+     * @param aMsg Message to be sent.
+     * @return length of one of symbian error codes
+     */
+    static TInt GetMessageLength( const TTraceMessage& aMsg );
+    
+    /**
+     * Merges the header and data into a single buffer
+     * 
+     * @param aMsg Message to be sent.
+     * @param aMsgBlock The message block where data is merged
+     * @return Symbian error code
+     */
+    static TInt MergeHeaderAndData( const TTraceMessage& aMsg, TDes8& aTarget );
+	};
+    
+
+#endif /*__TRACECOREISAUTILS_H__*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/inc/TraceCoreNotificationReceiver.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,116 @@
+// 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 "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:
+//
+// Description:
+// Base class for notification receivers of TraceCore
+// 
+
+#ifndef __TRACECORENOTIFICATIONRECEIVER_H__
+#define __TRACECORENOTIFICATIONRECEIVER_H__
+
+// Include files
+#include <kernel/kernel.h>
+#include <opensystemtrace_types.h>
+
+
+
+/**
+ * Base class for notification receivers of TraceCore
+ */
+class MTraceCoreNotificationReceiver
+    {
+public:
+
+    /**
+     * Constructor
+     */
+    IMPORT_C MTraceCoreNotificationReceiver();
+
+    /**
+     * Destructor
+     */
+    IMPORT_C virtual ~MTraceCoreNotificationReceiver();
+
+    /**
+     * Register notification receiver by component id
+     * 
+     * @param aComponentId The component ID
+     */
+    IMPORT_C TInt RegisterNotificationReceiver( TUint32 aComponentId );
+
+    /**
+     * Register notification receiver
+     * 
+     * @param aComponentId The component ID
+     * @param aGroupId The group ID    
+     */
+    IMPORT_C TInt RegisterNotificationReceiver( TUint32 aComponentId, TInt32 aGroupId  );
+
+    /**
+     * Unregister notification receiver
+     * 
+     * @param aComponentId
+     */
+    IMPORT_C void UnregisterNotificationReceiver( TUint32 aComponentId );
+
+    /**
+     * Unregister notification receiver
+     * 
+     * @param aComponentId The component ID
+     * @param aGroupId The group ID    
+     */
+    IMPORT_C void UnregisterNotificationReceiver( TUint32 aComponentId, TInt32 aGroupId  );
+    
+    /**
+     * Callback function for Trace Activation
+     * 
+     * @param aComponentId
+     * @param aGroupId         
+     */
+    virtual void TraceActivated( TUint32 aComponentId, TUint16 aGroupId  ) = 0;
+    
+    /**
+     * Callback function for Trace Deactivation
+     * 
+     * @param aComponentId The component ID
+     * @param aGroupId The group ID    
+     */
+    virtual void TraceDeactivated( TUint32 aComponentId, TUint16 aGroupId  ) = 0;
+    
+    /**
+     * Callback function for trace error
+     * 
+     * @param aComponentId The component ID
+     * @param aGroupId The group ID    
+     * @param aError The reason for error
+     */
+    IMPORT_C virtual void TraceError( TUint32 aComponentId, TUint32 aGroupId, TInt aError  );
+
+private:
+
+    /**
+     * Unregister all components of this receiver. Called from destructor.
+     */
+    void UnregisterNotificationReceiver();
+
+    };
+
+/**
+ * @deprecated Please use MTraceCoreNotificationReceiver instead 
+ */
+class DTraceCoreNotificationReceiver : public DBase, public MTraceCoreNotificationReceiver
+    {
+    };
+
+#endif
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/inc/TraceCoreNotifier.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,143 @@
+// 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 "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:
+//
+// Description:
+// Registers / unregisters notification receivers and send notifications 
+// to them when needed.
+// 
+
+#ifndef __TRACECORENOTIFIER_H__
+#define __TRACECORENOTIFIER_H__
+
+
+// Include files
+#include <kernel/kernel.h>
+#include <opensystemtrace_types.h>
+
+// Forward declarations
+class MTraceCoreNotificationReceiver;
+
+/**
+ * Notification receiver item
+ */
+NONSHARABLE_CLASS( TNotificationReceiverItem )
+    {
+public:
+
+    /**
+     * Component ID
+     */
+    TUint32 iComponentID;
+    
+    /**
+     * Group ID
+     */
+    TUint32 iGroupID;
+
+    /**
+     * The notification receiver associated with the component id and group id
+     */
+    MTraceCoreNotificationReceiver* iReceiver;
+    };
+
+
+/**
+ * Notification receiver receives subscriptions and delegates messages to them
+ */
+NONSHARABLE_CLASS( DTraceCoreNotifier ) : public DBase
+    {
+public:
+		
+    /**
+    * Constructor
+    */
+    DTraceCoreNotifier();
+    
+    /**
+    * Destructor
+    */
+    ~DTraceCoreNotifier();
+    
+    /**
+    * Register notification receiver
+    *
+    * @param aItem The properties of the notification receiver
+    */
+	TInt RegisterNotificationReceiver( TNotificationReceiverItem& aItem );
+	
+	/**
+	* Unregister notification receiver
+    *
+	* @param aItem The properties of the notification receiver
+	*/
+	void UnregisterNotificationReceiver( TNotificationReceiverItem& aItem );
+	
+	/**
+	* Unregister all traces of given notification receiver
+	*
+	* @param aNotificationReceiver The notification receiver to be unregistered
+	*/
+	void UnregisterNotificationReceiver( MTraceCoreNotificationReceiver& aNotificationReceiver );
+
+	/**
+	* Get defined component's registered group IDs
+	*
+	* @param aComponentID The component id
+	* @param aGroupIDs Array for registered group IDs
+	*/
+	void GetComponentRegisteredGroupIDs( TUint32 aComponentID, RArray< TUint >& aGroupIDs );
+		
+	/**
+	* Callback when trace is activated
+	*
+	* @param aComponentID The component id
+	* @param aGroupId The group id 
+	*/
+    void TraceActivated( TUint32 aComponentId, TUint16 aGroupId );
+    
+    /**
+	* Callback when trace is deactivated
+	*
+	* @param aComponentID The component id
+	* @param aGroupId The group id 
+	*/
+    void TraceDeactivated( TUint32 aComponentId, TUint16 aGroupId );
+
+    /**
+     * Callback when there is a trace error
+     * 
+     * @param aComponentId The component ID
+     * @param aGroupId The group ID    
+     * @param aError The reason for error
+     */
+    void TraceError( TUint32 aComponentId, TUint32 aGroupId, TInt aError  );
+
+private:
+	
+    /**
+    * Active subscriptions
+    */
+	RArray< TNotificationReceiverItem > iNotificationReceiverItems;
+	
+    /**
+    * Notifies immediately if group was activated
+    *
+    * @param aComponentID The component id
+    * @param aGroupId The group id 
+    */
+    void NotifyImmediately( TUint32 aComponentId, TGroupId aGroupId );
+    
+    };
+
+#endif
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/inc/TraceCoreOstConnectionIf.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,43 @@
+// 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 "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:
+//
+// Description:
+// Trace Core
+// 
+
+#ifndef _TRACECOREOSTCONNECTIONIF_H_
+#define _TRACECOREOSTCONNECTIONIF_H_
+
+#include <kernel/kernel.h>
+
+
+/**
+
+Used in TraceCoreOstLdd for sending message (as callback) to registered component
+
+*/
+class MTraceCoreOstConnectionIf
+    {
+    public:
+    
+    /**
+     * TxMessage
+     *  
+     * Message from TraceCore to OST connection
+     * @param aDes Message to be sent
+     */
+    virtual void TxMessage( const TDesC8& aDes ) = 0;
+    
+    };
+
+#endif /*_TRACECOREOSTCONNECTIONIF_H_*/
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/inc/TraceCoreOstHeader.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,371 @@
+// 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 "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:
+//
+// Description:
+// Trace Core OST header
+// 
+
+#ifndef __TRACECOREOSTHEADER_H__
+#define __TRACECOREOSTHEADER_H__
+
+namespace OstHeader
+    {
+
+    namespace OstBaseProtocol
+        {
+        /**
+         * OST header size
+         */
+        const TInt KOstBaseHeaderSize = 4;
+
+        /**
+         * OST header Version offset
+         */
+        const TInt KOstHeaderVersionOffset = 0;
+
+        /**
+         * OST header version size
+         */
+        const TInt KOstHeaderVersionSize = 1;
+
+        /**
+         * OST header ProtocolId offset
+         */
+        const TInt KOstHeaderProtocolIdOffset = 1;
+
+        /**
+         * OST header ProtocolId size
+         */
+        const TInt KOstHeaderProtocolIdSize = 1;
+
+        /**
+         * OST header Length offset
+         */
+        const TInt KOstHeaderLengthOffset = 2;
+
+        /**
+         * OST header Length size
+         */
+        const TInt KOstHeaderLengthSize = 2;
+        }
+
+    namespace OstTraceActivation
+        {
+        /**
+         * OST header TransactionId offset
+         */
+        const TInt KOstHeaderTransactionIdOffset = 4;
+
+        /**
+         * OST header TransactionId size
+         */
+        const TInt KOstHeaderTransactionIdSize = 1;
+
+        /**
+         * OST header MessageId offset
+         */
+        const TInt KOstHeaderMessageIdOffset = 5;
+
+        /**
+         * OST header Length size
+         */
+        const TInt KOstHeaderMessageIdSize = 1;
+        
+        /**
+         * OST header Result offset
+         */
+        const TInt KOstHeaderResultOffset = 6;
+
+        /**
+         * OST header Result size
+         */
+        const TInt KOstHeaderResultSize = 1;
+        
+        
+        namespace SetApplicationStatusRequest
+            {
+            /**
+             * OST header ApplicationId offset
+             */
+            const TInt KApplicationIdOffset = 6;
+
+            /**
+             * OST header ApplicationId size
+             */
+            const TInt KApplicationIdSize = 4;
+
+            /**
+             * OST header Activation Status offset
+             */
+            const TInt KActivationStatusOffset = 10;
+
+            /**
+             * OST header Activation Status size
+             */
+            const TInt KActivationStatusSize = 1;
+            
+            /**
+             * OST header Filler offset
+             */
+            const TInt KFillerOffset = 11;
+
+            /**
+             * OST header Filler size
+             */
+            const TInt KFillerSize = 1;
+
+            /**
+             * OST header Filler offset
+             */
+            const TInt KGroupIdOffset = 12;
+
+            /**
+             * OST header Filler size
+             */
+            const TInt KGroupIdSize = 2;
+            
+            /*
+             readMessage[0]=0x01;  // Version 0.1
+             readMessage[1]=0x01;  // Protocol ID OST Trace Activation Protocol
+             readMessage[2]=0x00;  // Length high
+             readMessage[3]=0x0e;  // Length low
+             readMessage[4]=0x00;  // Transaction ID
+             readMessage[5]=0x06;  // SetApplicationStatusRequest
+             readMessage[6]=0x12;  // Application ID high (MSByte)
+             readMessage[7]=0x34;  // Application ID
+             readMessage[8]=0x56;  // Application ID
+             readMessage[9]=0x78;  // Application ID low (LSByte)
+             readMessage[10]=0x00; // Activation Status (0x00 deactivate, 0x01 activate)
+             readMessage[11]=0x00; // Filler
+             readMessage[12]=0x00; // Group ID 1 high
+             readMessage[13]=0x03; // Group ID 1 low
+             readMessage[14]=0x00; // Group ID 2 high
+             readMessage[15]=0x40; // Group ID 2 low
+             readMessage[16]=0x00; // Group ID 3 high
+             readMessage[17]=0x41; // Group ID 3 low
+             */
+            }
+        }
+
+    namespace OstAsciiTraceProtocol
+        {
+        /**
+         * OST TraceProtocol Timestamp
+         */
+        const TInt KTimeStampOffset = 4;
+
+        /**
+         * OST TraceProtocol Timestamp size
+         */
+        const TInt KTimestampSize = 8;
+        
+        /**
+         * OST TraceProtocol Timestamp
+         */
+        const TInt KAsciiTraceDataOffset = 12;
+        }
+    
+    namespace OstSimpleApplicationTraceProtocol
+        {
+        /**
+         * OST TraceProtocol Timestamp
+         */
+        const TInt KTimeStampOffset = 4;
+
+        /**
+         * OST TraceProtocol Timestamp size
+         */
+        const TInt KTimestampSize = 8;
+
+        /**
+         * OST TraceProtocol Timestamp
+         */
+        const TInt KApplicationIdOffset = 12;
+
+        /**
+         * OST TraceProtocol Timestamp size
+         */
+        const TInt KApplicationIdSize = 4;
+
+        /**
+         * OST TraceProtocol Timestamp
+         */
+        const TInt KTraceGroupIdOffset = 16;
+
+        /**
+         * OST TraceProtocol Timestamp size
+         */
+        const TInt KTraceGroupIdSize = 2; 
+
+        /**
+         * OST TraceProtocol Timestamp
+         */
+        const TInt KTraceIdOffset = 18;
+
+        /**
+         * OST TraceProtocol Timestamp size
+         */
+        const TInt KTraceIdSize = 2; 
+        
+        /**
+         * OST TraceProtocol Timestamp
+         */
+        const TInt KBinaryTraceDataOffset = 20;
+
+        }
+
+    namespace OstTraceCoreProtocol
+        {
+        /**
+         * OST TraceCore Protocol Header Size
+         */
+        const TInt KHeaderSize = 4;
+           
+        /**
+         * OST TraceCore Protocol Protocol ID offset in header
+         */
+        const TInt KProtocolIdOffset = 0;
+        
+        /**
+         * OST TraceCore Subscriber message ID offset in header if TraceCoreProtocol is KSubscriberProtocol
+         */
+        const TInt KSubscriberIdOffset = 1;
+        
+        /**
+         * OST TraceCore Protocol Subscriber Protocol ID
+         */
+        const TInt KSubscriberProtocol = 0x01;
+        }
+    }
+
+namespace OstConstants
+    {
+    
+    /**
+     * OST KOstHeaderVersion 0.1
+     */
+    const TInt KOstHeaderVersion                        = 0x01;
+    
+    namespace OstBaseProtocol
+        {
+        /**
+         * OST KOstSystemProtocol
+         */
+        const TInt KOstSystemProtocol                   = 0x00;
+
+        /**
+         * OST KOstTraceActivationProtocol
+         */
+        const TInt KOstTraceActivationProtocol          = 0x01;
+
+        /**
+         * OST KOstAsciiTraceProtocol
+         */
+        const TInt KOstAsciiTraceProtocol               = 0x02;
+
+        /**
+         * OST KOstSimpleApplicationTraceProtocol
+         */
+        const TInt KOstSimpleApplicationTraceProtocol   = 0x03;
+
+        /**
+         * OST KOstTrkDebuggerProtocol
+         */
+        const TInt KOstTrkDebuggerProtocol              = 0x90;
+
+        /**
+         * OST KOstTraceCoreProtocol
+         */
+        const TInt KOstTraceCoreProtocol                = 0x91;
+        
+        /**
+         * OST KOstTerminalKeyboardProtocol
+         */
+        const TInt KOstTerminalKeyboardProtocol         = 0x92;
+
+        
+        }
+
+    namespace OstTraceActivation
+        {
+        /**
+         * OST header TransactionId offset
+         */
+        const TInt KGetAsciiStatusRequest               = 0x00;
+
+        /**
+         * OST header TransactionId offset
+         */
+        const TInt KGetAsciiStatusResponse              = 0x01;
+        
+        /**
+         * OST header TransactionId offset
+         */
+        const TInt KSetAsciiStatusRequest               = 0x02;
+
+        /**
+         * OST header TransactionId offset
+         */
+        const TInt KSetAsciiStatusResponse              = 0x03;
+        
+        /**
+         * OST header TransactionId offset
+         */
+        const TInt KGetApplicationStatusRequest         = 0x04;
+                
+        /**
+         * OST header TransactionId offset
+         */
+        const TInt KGetApplicationStatusResponse        = 0x05;
+
+        /**
+         * OST header TransactionId offset
+         */
+        const TInt KSetApplicationStatusRequest         = 0x06;
+        
+        /**
+         * OST header TransactionId offset
+         */
+        const TInt KSetApplicationStatusResponse        = 0x07;
+
+        /**
+         * OST header TransactionId offset
+         */
+        const TInt KMessageSyntaxError                  = 0xFE;
+
+        /**
+         * OST header TransactionId offset
+         */
+        const TInt KUnknownMessageError                 = 0xFF;
+
+
+        namespace ActivationStatus
+            {
+
+            /**
+             * OST header Filler offset
+             */
+            const TInt KApplicationTracesDeactivated    = 0x00;
+
+            /**
+             * OST header Filler size
+             */
+            const TInt KApplicationTracesActivated      = 0x01;
+            
+
+            }
+        }
+    }
+
+#endif
+
+// End of File // __TRACECOREOSTHEADER_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/inc/TraceCoreOstLddIf.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,146 @@
+// 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 "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:
+//
+// Description:
+// Interface class for the TraceCoreOstLdd component. 
+// 
+
+#ifndef __TraceCoreOstLddIf_H__
+#define __TraceCoreOstLddIf_H__
+
+
+// Include files
+#include <kernel/kernel.h>
+#include "TraceCoreMediaIf.h"
+#include "TraceCoreOstConnectionIf.h"
+
+/**
+ * ETraceCoreOstLddIfGetSet function to choosed in DTraceCoreOstLddI::GetSet.
+ */
+enum TTraceCoreOstLddIfGetSet
+    {
+    EGetDfc = 0, // Return type TDfc*
+    EGetBuf = 1,     // Return type TDes8*
+    ESetWriter = 2,   // Return type 0
+    ERegister  // Return type 0
+    };
+
+/**
+ * Interface class for XTI
+ */
+class DTraceCoreOstLddIf : public DTraceCoreMediaIf
+    {
+public:
+
+    /**
+     * Constructor
+     */
+    DTraceCoreOstLddIf();
+    
+    /**
+     * Destructor
+     */
+    ~DTraceCoreOstLddIf();
+    
+    /**
+     * Initializes this interface
+     * 
+     * @param aCallback Callback interface which is notified when a message is received from the XTI driver
+     */
+	TInt Init( MTraceCoreMediaIfCallback& aCallback );
+	
+	/**
+	 * Sends a message
+	 *
+	 * @param aMessage The message to be sent
+	 */
+	TInt Send( TTraceMessage &aMessage );
+
+	/**
+	 * 
+	 * @param aFunc Function choosed (@see ETraceCoreOstLddIfGetSet)
+	 * @return TDfc* if aFunc is EGetDfc, TDes8* EGetBuf and 0 with ESetWriter.
+	 */
+	IMPORT_C static TUint32 GetSet(TTraceCoreOstLddIfGetSet aFunc, TUint32 aParam);
+	
+private:
+    
+    /**
+     * DFC function for incoming data from XTI driver
+     */
+    static void ReceiveDfc( TAny* aPtr );
+    
+    /**
+     * Called from the static DFC function to process incoming data
+     */
+    void ReceiveDfc();
+    
+    /**
+     * Forwards incoming message to callback
+     */
+    void NotifyCallback();
+
+    /**
+     * Sends message to XTI
+     * 
+     * @param aMsg Message to be sent.
+     * @return KErrNone if send successful
+     */
+    void SendData( TTraceMessage& aMsg );
+   
+    /**
+    * Similar to send, except does not generate traces, since they would loop back to this function
+    * 
+    * @param aMsg Message to be sent.
+    * @return KErrNone if send successful
+    */
+    TInt SendTrace( const TDesC8& aMsg );
+    
+private:
+
+    /**
+     * DFC which is used for incoming ISI-messages
+     */
+    TDfc iReceiveDfc;
+    
+    /**
+     * ISA Kernel IF Initialisation status
+     */
+    TInt iStatus;
+    
+    /** 
+     * Length variable for ISA Kernel interface usage
+     */
+    TUint16 iNeededLength;
+    
+    TBool iTraceCoreOstConnectionRegistered;
+    
+     /**
+     * Buffer for sending data
+     **/
+    TBuf8< 8204 > iSendBuffer;
+       
+    /**
+     * Buffer for incoming data
+     **/
+    TBuf8< 8204 > iReceiveBuffer;
+    
+    /**
+     * Pointer to TraceCoreOstConnectionIf
+     **/
+    MTraceCoreOstConnectionIf *iTraceCoreOstConnection;
+    
+    };
+
+#endif // __TraceCoreOstLddIf_H__
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/inc/TraceCorePluginIf.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,88 @@
+// 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 "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:
+//
+// Description:
+// Interface class for media plug-ins
+// 
+
+#ifndef __TRACECOREPLUGINIF_H__
+#define __TRACECOREPLUGINIF_H__
+
+
+// Include files
+#include <kernel/kernel.h>
+#include "TraceCoreMediaIf.h"
+
+
+// Forward declarations
+class DTraceCoreMediaPlugin;
+class TTraceMessage;
+
+/**
+ * Interface class for media plug-ins
+ */
+NONSHARABLE_CLASS( DTraceCorePluginIf ) : public DTraceCoreMediaIf
+    {
+public:
+
+    /**
+     * Constructor
+     */
+    DTraceCorePluginIf();
+    
+    /**
+     * Destructor
+     */
+    ~DTraceCorePluginIf();
+    
+    /**
+     * Initializes this interface
+     * 
+     * @param aCallback Callback interface which is notified when ISI messages are received
+     */
+	TInt Init( MTraceCoreMediaIfCallback& aCallback );
+	
+	/**
+	 * Sends a message
+	 *
+	 * @param aMsg The message to be sent
+	 */
+	TInt Send( TTraceMessage& aMsg );
+	
+	/**
+	 * Registers a media plug-in
+	 */
+	TInt RegisterPlugin( DTraceCoreMediaPlugin& aPlugin );
+	
+	/**
+	 * Unregisters a media plug-in
+	 */
+	void UnregisterPlugin( DTraceCoreMediaPlugin& aPlugin );
+	
+	/**
+	 * Message was received by plug-in
+     * 
+     * @param aMsg The message that was received
+	 */
+	void MessageReceived( TTraceMessage &aMsg );
+	
+private:
+
+    /**
+     * Media plug-in. Currently only one supported
+     */
+    DTraceCoreMediaPlugin* iMediaPlugin;
+    };
+
+#endif // __TRACECOREPLUGINIF_H__
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/inc/TraceCorePrintfTraceHandler.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,124 @@
+// 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 "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:
+//
+// Description:
+// Handler implementation for ascii printf
+//
+
+#ifndef __TRACECOREPRINTFTRACEHANDLER_H__
+#define __TRACECOREPRINTFTRACEHANDLER_H__
+
+
+// Include files
+#include <kernel/kernel.h>
+#include <TraceCoreNotificationReceiver.h>
+#include "TraceCoreHandler.h"
+
+
+// Forward declarations
+class DTraceCoreWriter;
+class DTraceCoreSettings;
+
+
+/**
+ * Handler implementation for ascii printf
+ */
+NONSHARABLE_CLASS( DTraceCorePrintfTraceHandler ) : public MTraceCoreNotificationReceiver, 
+													public DTraceCoreHandler
+		                                                   
+    {
+public:
+
+	/**
+     * Constructor
+     */
+    DTraceCorePrintfTraceHandler();
+    
+    /**
+     * Destructor
+     */
+    ~DTraceCorePrintfTraceHandler();
+    
+    /**
+     * Initializes this handler
+     */
+    TInt Init();
+    
+    /**
+     * Prepares the change in writer
+     * 
+     * @param aWriter the new writer
+     */
+    void PrepareSetWriter( DTraceCoreWriter* aWriter );
+  
+    /**
+     * Kern/RDebug::Printf handler function
+     */
+    static TBool PrintfHandler( const TDesC8& aText, TTraceSource aTraceSource );
+    
+    /**
+     * Callback function for Trace Activation
+     * from MTraceCoreNotificationReceiver
+     * 
+     * @param aComponentId
+     * @param aGroupId
+     * @return None          
+     */
+    void TraceActivated( TUint32 aComponentId, TUint16 aGroupId  );
+    
+    /**
+     * Callback function for Trace Deactivation
+     * from MTraceCoreNotificationReceiver
+     * 
+     * @param aComponentId
+     * @param aGroupId
+     * @return None     
+     */
+    void TraceDeactivated( TUint32 aComponentId, TUint16 aGroupId  );
+    
+private:
+    
+    /**
+     * Checks if there is a dropped trace and sends dropped trace message and
+     * normal trace as well if writer is ready to write that data.
+     *
+     * @param aHandler Printf trace handler
+     */
+    inline static void HandleTrace(const TDesC8& aText);    
+
+    /**
+     * Trace output function
+     */
+	void DebugPrint( const TDesC8& aDes );
+    
+    /**
+     * Static instance, accessed from the printf trace handler callback
+     */
+    static DTraceCorePrintfTraceHandler* iInstance;
+    
+    /**
+     * Printf trace handler
+     */
+    TBool ( *iPrintfHandler )( const TDesC8&, TTraceSource );
+    
+    /**
+	 * State of the Printf activations
+ 	 */
+	static TBool iKernPrintfActive;
+	static TBool iRDebugPrintfActive;
+	static TBool iPlatSecPrintfActive;
+
+    };
+
+#endif
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/inc/TraceCoreRouter.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,131 @@
+// 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 "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:
+//
+// Description:
+// Router receives subscriptions and delegates messages to them
+//
+
+#ifndef __TRACECOREROUTER_H__
+#define __TRACECOREROUTER_H__
+
+
+// Include files
+#include <kernel/kernel.h>
+#include "TraceCoreMessageReceiver.h"
+
+
+// Forward declarations
+class DTraceCoreSendReceive;
+class DTraceCoreSubscriber;
+class MTraceCoreMessageSender;
+
+/**
+ * Routing item
+ */
+NONSHARABLE_CLASS( TRoutingItem )
+    {
+public:
+
+    /**
+     * Message ID
+     * Higest bit (MSB) is set when subscribed OST Protocol Id
+     */
+    TUint32 iMessageID;
+    
+    /**
+     * The subscriber associated with the message ID
+     */
+    DTraceCoreSubscriber* iSubscriber;
+    
+    /**
+     * Header format (TMessageHeaderFormat)
+     */
+    TUint32 iMsgFormat;
+    
+    };
+
+
+/**
+ * Router receives subscriptions and delegates messages to them
+ */
+NONSHARABLE_CLASS( DTraceCoreRouter ) : public DBase, public MTraceCoreMessageReceiver
+    {
+public:
+
+    /**
+     * Constructor
+     */
+    DTraceCoreRouter();
+    
+    /**
+     * Destructor
+     */
+    ~DTraceCoreRouter();
+    
+    /**
+     * Initializes this router
+     *
+     * @param aSender Interface to send messages
+     */
+    TInt Init( MTraceCoreMessageSender& aSender );
+    
+    /**
+     * Subscribes to a message
+     *
+     * @param aItem The properties of the subscription
+     */
+	TInt Subscribe( TRoutingItem& aItem );
+	
+	/**
+	 * Unsubscribes from a message
+	 *
+	 * @param aItem The message to be unregistered
+	 */
+	void Unsubscribe( TRoutingItem& aItem );
+	
+	/**
+	 * Unsubscribes all messages of given subscriber
+	 *
+	 * @param aSubscriber The subscriber to be unregistered
+	 */
+	void Unsubscribe( DTraceCoreSubscriber& aSubscriber );
+	
+	/**
+	 * Callback when message is received
+     * 
+     * @param aMsg The message that was received
+     * @return KErrNotFound if the message id was not found (not subscribed), KErrNone if found
+	 */
+    TInt MessageReceived( TTraceMessage &aMsg );
+
+private:
+
+    /**
+     * Active subscriptions
+     */
+	RArray< TRoutingItem > iRoutingItems;
+
+    /**
+     * Sender abstracts the messaging interface. 
+     * The pointer is passed to subscribers during call to Subscribe
+     */
+    MTraceCoreMessageSender* iMessageSender;
+    
+    /**
+     * Lock to protect internal structurees.
+     */
+    DMutex* iLock;
+    };
+
+#endif
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/inc/TraceCoreSendReceive.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,138 @@
+// 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 "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:
+//
+// Description:
+// Send-receive class abstracts the media used by subscribers to send / receive messages
+//
+
+#ifndef __TRACECORESENDRECEIVE_H__
+#define __TRACECORESENDRECEIVE_H__
+
+
+// Include files
+#include <kernel/kernel.h>
+#include "TraceCoreMediaIfCallback.h"
+#include "TraceCoreMessageSender.h"
+
+
+// Forward declarations
+class DTraceCoreMediaIf;
+class DTraceCorePluginIf;
+class MTraceCoreMessageReceiver;
+
+
+/**
+ * Send-receive class abstracts the media used by subscribers to send / receive messages
+ */
+NONSHARABLE_CLASS( DTraceCoreSendReceive ) : public DBase, public MTraceCoreMediaIfCallback, public MTraceCoreMessageSender
+    {
+public:
+
+    /**
+     * Constructor
+     */
+    DTraceCoreSendReceive();
+    
+    /**
+     * Destructor
+     */
+    ~DTraceCoreSendReceive();
+    
+    /**
+     * Initializes this sender / receiver
+     * 
+     * @param aReceiver Interface where incoming messages are routed
+     */
+    TInt Init( MTraceCoreMessageReceiver& aReceiver );
+    
+    /**
+     * Gets the media interface that is used by media writer
+     */
+    inline DTraceCoreMediaIf* GetMediaWriterIf();
+    
+    /**
+     * Gets the media plug-in interface or NULL if it does not exist
+     */
+    inline DTraceCorePluginIf* GetPluginIf();
+    
+private:
+
+    /**
+     * MTraceCoreMediaIfCallback implementation for incoming messages
+     * 
+     * @param aMsg The message that was received
+     * @return KErrNotFound if the message id was not found (not subscribed), KErrNone if found
+     */
+    TInt MessageReceived( TTraceMessage &aMsg );
+    
+    /**
+     * Set Sender Media
+     *
+     * @param Sender media
+     */
+    TInt SetSenderMedia( DTraceCoreMediaIf* aSenderMedia );
+    
+    /**
+     * MTraceCoreMessageSender implementation for outgoing messages
+     * 
+     * @param aMessage The message to be sent
+     */
+    TInt SendMessage( TTraceMessage &aMessage );
+
+    /**
+     * Initializes a media interface
+     */
+    TInt InitMediaInterface( DTraceCoreMediaIf* aMediaIf );
+
+    /**
+     * Creates the media interfaces
+     */
+    TInt CreateInterfaces();
+    
+    /**
+     * Deletes the media interfaces
+     */
+    void DeleteInterfaces();
+
+private:
+    
+    /**
+     * Media interfaces that receive data.
+     */
+    RPointerArray< DTraceCoreMediaIf > iMediaInterfaces;
+    
+    /**
+     * Plug-in interface
+     */
+    DTraceCorePluginIf* iPluginInterface;
+
+    /**
+     * Media interface for sending data
+     */
+    DTraceCoreMediaIf* iSendInterface;
+
+    /**
+     * Media interface used by the media writer
+     */
+    DTraceCoreMediaIf* iMediaWriterInterface;
+
+    /**
+     * Target for incoming messages
+     */
+    MTraceCoreMessageReceiver* iReceiver;
+    };
+
+#endif
+
+#include "TraceCoreSendReceive.inl"
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/inc/TraceCoreSendReceive.inl	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,41 @@
+// 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 "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:
+//
+// Description:
+// Trace Core
+//
+
+#ifndef __TRACECORESENDRECEIVE_INL__
+#define __TRACECORESENDRECEIVE_INL__
+
+
+/**
+ * Gets the media writer interface
+ */
+inline DTraceCoreMediaIf* DTraceCoreSendReceive::GetMediaWriterIf()
+    {
+    return iMediaWriterInterface;
+    }
+
+
+/**
+ * Gets the media plug-in interface
+ */
+inline DTraceCorePluginIf* DTraceCoreSendReceive::GetPluginIf()
+    {
+    return iPluginInterface;
+    }
+
+
+#endif
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/inc/TraceCoreSettings.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,74 @@
+// 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 "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:
+//
+// Description:
+// Trace Core
+//
+
+#ifndef __TRACECORESETTINGS_H__
+#define __TRACECORESETTINGS_H__
+
+
+// Include files
+#include <kernel/kernel.h>
+
+
+/**
+ * Interface for saving and restoring trace activation settings
+ */
+class DTraceCoreSettings : public DBase
+    {
+public:
+
+    /**
+     * Constructor
+     *
+     * @param aWriterType Type of writer 
+     */
+    IMPORT_C DTraceCoreSettings();
+
+    /**
+     * Destructor
+     */    
+    IMPORT_C virtual ~DTraceCoreSettings();
+
+    /**
+     * Registers this activation settings saver to TraceCore. Only one saver can register.
+     */
+    IMPORT_C TInt Register();
+    
+    /**
+     * Write settings
+     * 
+     * @param aBuffer Buffer to save
+     */
+    virtual void Write( const TUint8* aBuffer, TUint32 aLength ) = 0;
+    
+    /**
+     * Read settings
+     * 
+     * @param aBuffer Buffer where to read
+     * @return ETrue if buffer copied
+     */
+    virtual TBool Read( TUint8* aBuffer, TUint32 aLength ) = 0;
+    
+private:
+    
+    /**
+     * Unregisters this activation settings saver from TraceCore.
+     */
+    TInt Unregister();
+    };
+
+#endif //__TRACECOREACTIVATIONSETTINGSIF_H__
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/inc/TraceCoreSubscriber.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,126 @@
+// 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 "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:
+//
+// Description:
+// Base class for subscribers of TraceCore
+//
+
+#ifndef __TRACECORESUBSCRIBER_H__
+#define __TRACECORESUBSCRIBER_H__
+
+#ifdef __KERNEL_MODE__
+// Include files
+#include <kernel/kernel.h>
+#endif // __KERNEL_MODE__
+
+/**
+ * Header format
+ */	
+enum TMessageHeaderFormat
+	{
+	/**
+	 * Proprietary Format (Header Format 0 is also considered as proprietary)
+	 */
+	EMessageHeaderFormatProprietary = 1,
+	EMessageHeaderFormatOst         = 2
+	
+	};
+
+
+/**
+ * Trace Message
+ */
+class TTraceMessage
+	{
+public:
+	TMessageHeaderFormat iMsgFormat;
+	TDesC8 *iHeader;
+	TDesC8 *iData;
+	TUint8 iMessageId;
+	};
+
+#ifdef __KERNEL_MODE__
+
+// Forward declarations
+class MTraceCoreMessageSender;
+
+/**
+ * Base class for subscribers of TraceCore
+ */
+class DTraceCoreSubscriber : public DBase
+    {
+public:
+
+    /**
+     * Constructor
+     */
+    IMPORT_C DTraceCoreSubscriber();
+
+    /**
+     * Destructor
+     */
+    IMPORT_C ~DTraceCoreSubscriber();
+    
+    /**
+     * Subscribes to a message by message ID / protocol ID
+     * depending of the header format. First byte of aMessageID is always used
+     * for header format.
+     * 
+     * @param aMessageId The message ID to be subscribed
+     * @param aMsgFormat Message format e.g. EMessageHeaderFormatOst
+     */
+    IMPORT_C TInt Subscribe( TUint32 aMessageID, TMessageHeaderFormat aHeaderFormat );
+    
+    /**
+     * Subscribes to message ID
+     * 
+     * @param aMessageId The ID to subscribe
+     */
+    IMPORT_C TInt Subscribe( TUint32 aMessageID );
+
+    /**
+     * Unsubscribes from message ID
+     * 
+     * @param aMessageId The ID to unsubscribe
+     */
+    IMPORT_C void Unsubscribe( TUint32 aMessageID );
+    
+    /**
+     * Callback function for messages
+     */
+    virtual void MessageReceived( TTraceMessage &aMsg ) = 0;
+
+    /**
+     * Sets the message sender interface. This is called during Subscribe
+     */
+    void SetMessageSender( MTraceCoreMessageSender& aMessageSender );
+    
+private:
+
+    /**
+     * Unsubscribes all message ID's of this subscriber. Called from destructor
+     */
+    void Unsubscribe();
+
+protected:
+
+    /**
+     * Message sender interface
+     */
+    MTraceCoreMessageSender* iMessageSender;
+    };
+
+#endif // __KERNEL_MODE__
+
+#endif // __TRACECORESUBSCRIBER_H__
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/inc/TraceCoreTComArgMacro.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,36 @@
+// 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 "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:
+//
+// Description:
+// TraceCore TraceCompiler Arguments Macro
+//
+
+#ifndef __TRACECORETCOMARGMACRO_H__
+#define __TRACECORETCOMARGMACRO_H__
+
+/**
+ * Macro used to suppress build warnings when OST_TRACE_COMPILER_IN_USE is not defined
+ */
+#if defined( OST_TRACE_COMPILER_IN_USE )
+
+#define TCOM_ARG(x)  x
+
+#else
+
+#define TCOM_ARG(x)
+
+#endif
+
+
+#endif
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/inc/TraceCoreTraceActivationIf.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,74 @@
+// 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 "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:
+//
+// Description:
+// Trace Core
+//
+
+#ifndef DTRACECORETRACEACTIVATIONIF_H_
+#define DTRACECORETRACEACTIVATIONIF_H_
+
+#include <kernel/kernel.h>
+
+/**
+ * Interface to activate and deactivate trace groups
+ */
+class DTraceActivationIf : public DBase
+    {
+public:
+
+    /**
+     * Activate trace group
+     *
+     * @param aComponentId The component ID
+     * @param aGroupId The group ID
+     */
+	IMPORT_C static void ActivateTrace( TUint32 aComponentId, TUint32 aGroupId );
+	
+    /**
+     * Deactivate trace group
+     *
+     * @param aComponentId The component ID
+     * @param aGroupId The group ID
+     */    
+	IMPORT_C static void DeactivateTrace( TUint32 aComponentId, TUint32 aGroupId );
+	
+	/**
+	 * Check if a Trace is activated for the supplied component and group id
+	 *
+	 * @param aComponentId The component ID
+	 * @param aGroupId The group ID
+	 * @return returns ETrue if trace is activated otherwise EFalse
+	 */    
+	IMPORT_C static TBool IsTraceActivated(TUint32 aComponentId, TUint32 aGroupId);
+
+    /**
+     * Reactivate all currently activated traces
+     *
+     * @return KErrNone if refresh successful
+     */
+    IMPORT_C static TInt RefreshActivations();
+
+private:
+
+    /**
+     * Constructor
+     */
+    DTraceActivationIf();
+    
+    /**
+     * Destructor
+     */
+    ~DTraceActivationIf();    
+    };
+
+#endif /*DTRACECORETRACEACTIVATIONIF_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/inc/TraceCoreWriter.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,281 @@
+// 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 "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:
+//
+// Description:
+// Trace Core
+//
+
+#ifndef __TRACECOREWRITER_H__
+#define __TRACECOREWRITER_H__
+
+
+// Include files
+#include <kernel/kernel.h>
+
+
+/**
+ * Types for WriteStart
+ */
+enum TWriterEntryType
+    {
+	
+	/**
+	 * Ascii printf trace
+	 */
+    EWriterEntryAscii       = 1,
+    
+    /**
+     * Binary trace
+     */
+    EWriterEntryTrace       = 2
+    };
+
+/**
+ * Writer types for constructor
+ */
+enum TWriterType
+    {
+	/**
+	 * No writer, can be used to remove writer
+	 */
+    EWriterTypeNone    		= 0,
+    
+	/**
+	 * XTI writer
+	 */
+    EWriterTypeXTI          = 1,
+    
+    /**
+     * USB phonet writer
+     */
+    EWriterTypeUSBPhonet    = 2,
+  
+    /**
+     * Wins writer
+     */
+    EWriterTypeWins    = 3,
+    
+    /**
+     * Custom writer 1
+     */
+    EWriterTypeCustom1 = 4,
+    
+    /**
+     * Custom writer 2
+     */
+    EWriterTypeCustom2 = 5,
+
+	/**
+     * test writer
+     */
+    EWriterTypeTest    = 6,
+    
+    /**
+     * Ost Buffer writer
+     */
+    EWriterTypeOstBuffer = 7
+    
+    
+    };
+
+/**
+ * Write parameters for WriteEnd functions.
+ * This structure can contain some output channel specific information.
+ */
+class TWriteEndParams
+{
+    public:
+    TWriteEndParams(TUint32  aEntryId, TBool aWriteZero){ iEntryId = aEntryId; iWriteZero = aWriteZero; };
+	TUint32 iEntryId;
+	TBool iWriteZero;    
+};
+
+
+
+/**
+ * Base class for trace core writers
+ */
+class DTraceCoreWriter : public DBase
+    {
+public:
+
+    /**
+     * Constructor
+     *
+     * @param aWriterType Type of writer 
+     */
+    IMPORT_C DTraceCoreWriter( TWriterType aWriterType );
+
+    /**
+     * Destructor
+     */    
+    IMPORT_C virtual ~DTraceCoreWriter();
+
+    /**
+     * Registers this writer to TraceCore. The first writer to register becomes the active writer.
+     */
+    IMPORT_C virtual TInt Register();
+
+    /**
+     * Outputs a TraceCore frame. This calls WriteStart, writes the component and trace ID's,
+     * calls WriteBTraceFrame and calls WriteEnd
+     *
+     * @param aComponentId the component ID
+     * @param aTraceWord The trace word containing the group ID and the Trace ID for the frame
+     * @param aHeader BTrace header
+     * @param aHeader2 Extra header data
+     * @param aContext The thread context in which this function was called
+     * @param a1 The first trace parameter
+     * @param a2 The second trace parameter
+     * @param a3 The third trace parameter
+     * @param aExtra Extra trace data
+     * @param aPc The program counter value
+     * @param aRecordSize The record size
+     */
+    IMPORT_C virtual void WriteTraceCoreFrame( const TUint32 aComponentId, const TUint32 aTraceId, 
+    		TUint32 aHeader, TUint32 aHeader2, const TUint32 aContext, const TUint32 a1, 
+    		const TUint32 a2, const TUint32 a3, const TUint32 aExtra, const TUint32 aPc, TUint32 aRecordSize );
+
+    /**
+     * Ends an entry. 
+	 * This function should be overwritten in writers that derive from DTraceCoreWriter 
+	 * and require non standard implementation.
+     *
+     * @param aWriteEndParams structure containing 'end of message' information. @see TWriteEndParams
+     */
+    IMPORT_C virtual void WriteEnd( const TWriteEndParams& aWriteEndParams );
+    
+    
+    //TODO: assert that BtraceLock is held in Write Start!!!!
+    //TODO: Write WritePreStart() or something
+    
+    /**
+     * Starts an entry
+     *
+     * @return the entry ID that is passed to other Write-functions
+     */
+    virtual TUint32 WriteStart( TWriterEntryType aType ) = 0;
+
+    /**
+     * Ends an entry
+     *
+     * @param aEntryId the entry ID returned by WriteStart
+     */
+    virtual void WriteEnd( TUint32 aEntryId ) = 0;
+
+
+
+    /**
+     * Writes 8-bit data to given entry
+     * 
+     * @param aEntryId the entry ID returned by WriteStart
+     * @param aData the trace data
+     */
+	virtual void WriteData( TUint32 aEntryId, TUint8 aData ) = 0;
+
+    /**
+     * Writes 16-bit data to given entry
+     * 
+     * @param aEntryId the entry ID returned by WriteStart
+     * @param aData the trace data
+     */
+    virtual void WriteData( TUint32 aEntryId, TUint16 aData ) = 0;
+
+    /**
+     * Writes 32-bit data to given entry
+     * 
+     * @param aEntryId the entry ID returned by WriteStart
+     * @param aData the trace data
+     */
+	virtual void WriteData( TUint32 aEntryId, TUint32 aData ) = 0;
+	
+	/**
+	 * Gets the type of this writer
+	 */
+	TWriterType GetWriterType();
+	
+
+	/**
+	 * Signal to TraceCore if there has been a dropped trace
+	 * 
+     * @param aDropped ETrue if the writer dropped the trace - otherwise EFalse
+     * 
+	 */
+    IMPORT_C void TraceDropped(TBool aDropped);
+
+
+
+
+    /**
+      * Interrogates tracecore if the last trace was dropped
+      * 
+      * @return  returns ETrue if the trace was dropped otherwise EFalse
+      * 
+    */
+
+    IMPORT_C TBool WasLastTraceDropped() const ;
+
+    
+    /**
+     * Checks whether writer can handle incoming trace data with specific size.
+     * This method is useful in case where Trace Core must report dropped traces.
+     * Currently it is used only in printf-handler and only in case where 
+     * the "dropped trace" flag is set.
+     * Typical implementation of this method should check writer internal state and answer
+     * whether trace with specific size and type can be sent.
+     * Default implementation of this method assumes writer is able to handle incoming 
+     * trace (ETrue is returned).
+     * 
+     * @param aTraceSize Size of incomming trace.
+     * @return ETrue if writer state is correct and it is able to send incomming data; EFalse otherwise.
+     */
+    IMPORT_C virtual TBool AbleToWrite(TUint aTraceSize); 
+
+private:
+    
+    /**
+     * Outputs a BTrace frame
+     *
+     * @param aEntryId the entry ID returned by WriteStart
+     * @param aHeader BTrace header
+     * @param aHeader2 Extra header data
+     * @param aContext The thread context in which this function was called
+     * @param a1 The first trace parameter
+     * @param a2 The second trace parameter
+     * @param a3 The third trace parameter
+     * @param aExtra Extra trace data
+     * @param aPc The program counter value
+     * @param aRecordSize The record size
+     */
+    void WriteBTraceFrame( const TUint32 aEntryId, TUint32 aHeader, TUint32 aHeader2, 
+    		const TUint32 aContext, const TUint32 a1, const TUint32 a2, const TUint32 a3, 
+    		const TUint32 aExtra, const TUint32 aPc, TUint32 aRecordSize );
+
+    /**
+     * Unregisters this writer from TraceCore. Called from destructor
+     */
+    void Unregister();
+
+    /**
+     * Writes the remaining bytes if data is not 32-bit aligned
+     */
+    void WriteRemainingBytes( TUint32 aEntryId, TUint32 aSize, TUint32 a3 );
+
+    /**
+     * Writer type
+     */
+    TWriterType iWriterType;
+    };
+
+#endif
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/inc/tracecore_shared.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,29 @@
+// 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 "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:
+//
+// Description:
+// Trace Core
+//
+
+#ifndef TRACECORE_SHARED_H_
+#define TRACECORE_SHARED_H_
+
+
+// names used with loading & unloading ldd
+_LIT(KTraceCoreLdd, "tracecore.ldd");
+_LIT(KTraceCoreName,"tracecore");
+
+
+_LIT(KOstMemoryWriterLdd, "ostmemorywriter.ldd");
+_LIT(KOstMemoryWriterName,"ostmemorywriter");
+
+#endif /* TRACECORE_SHARED_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/src/BTraceCategoryHandler.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,141 @@
+// 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 "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:
+//
+// Description:
+// Trace Core 
+//
+
+#include "BTraceCategoryHandler.h"
+#include "TraceCore.h"
+#include "TraceCoreBTraceHandler.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "BTraceCategoryHandlerTraces.h"
+#endif
+
+
+
+/**
+ * Constructor
+ */	
+EXPORT_C DBTraceCategoryHandler::DBTraceCategoryHandler()
+: iWriter( NULL )
+, iSettings( NULL )
+    {
+    }
+
+
+/**
+ * Destructor
+ */	
+EXPORT_C DBTraceCategoryHandler::~DBTraceCategoryHandler()
+    {
+    Unregister();
+    iCategories.Close();
+    }
+
+
+/**
+ * Called before SetWriter with interrupts enabled
+ * 
+ * @param aWriter The new writer
+ */
+EXPORT_C void DBTraceCategoryHandler::PrepareSetWriter( DTraceCoreWriter* /*aWriter*/ )
+    {
+    }
+
+
+/**
+ * Sets active writer
+ * 
+ * @param aWriter The new writer
+ */
+EXPORT_C void DBTraceCategoryHandler::SetWriter( DTraceCoreWriter* aWriter )
+    {
+    iWriter = aWriter;
+    }
+
+
+/**
+ * Sets settings saver
+ * 
+ * @param aSettings Settings saver
+ */    
+EXPORT_C void DBTraceCategoryHandler::SetSettings( DTraceCoreSettings* aSettings )
+    {
+	iSettings = aSettings;
+    }
+
+
+/**
+ * Adds a category to be registered
+ *
+ * @param aCategory The category
+ */
+EXPORT_C TInt DBTraceCategoryHandler::AddCategory( TUint8 aCategory )
+    {
+    OstTrace1( TRACE_BORDER, DBTRACECATEGORYHANDLER_ADDCATEGORY_ENTRY, "> DBTraceCategoryHandler::AddCategory 0x%x", aCategory );
+    TInt ret = iCategories.Append( aCategory );
+    OstTrace1( TRACE_BORDER, DBTRACECATEGORYHANDLER_ADDCATEGORY_EXIT, "< DBTraceCategoryHandler::AddCategory. Ret:%d", ret );
+    return ret;
+    }
+
+    
+/**
+ * Registers this handler to BTrace
+ */
+EXPORT_C TInt DBTraceCategoryHandler::Register()
+    {
+    TInt ret = KErrNone;
+    
+    // Get BTrace handler
+    DTraceCoreBTraceHandler* handler = DTraceCore::GetBTraceHandler();
+    if ( handler != NULL )
+        {       
+        // Loop through all categories
+        for ( TInt i = 0; i < iCategories.Count(); i++ )
+            {
+            handler->RegisterCategoryHandler( iCategories[ i ], *this );
+            }
+        ret = KErrNone;
+        }
+    else
+        {
+        ret = KErrGeneral;
+        }
+    OstTrace1( TRACE_BORDER, DBTRACECATEGORYHANDLER_REGISTER_EXIT, "< DBTraceCategoryHandler::Register. Ret:%d", ret );
+    
+    return ret;
+    }
+    
+
+/**
+ * Unregisters this handler from BTrace
+ */    
+void DBTraceCategoryHandler::Unregister()
+    {
+    OstTrace0( TRACE_FLOW, DBTRACECATEGORYHANDLER_UNREGISTER_ENTRY, "> DBTraceCategoryHandler::Unregister");
+    // Get BTrace handler
+    DTraceCoreBTraceHandler* handler = DTraceCore::GetBTraceHandler();
+    if ( handler != NULL )
+        {
+        
+        // Loop through all categories
+        for ( TInt i = 0; i < iCategories.Count(); i++ )
+            {
+            handler->UnregisterCategoryHandler( iCategories[ i ] );
+            }
+        }
+    }
+
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/src/BTraceKernelCategoryHandler.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,575 @@
+// 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 "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:
+//
+// Description:
+// Trace Core 
+//
+
+// Include files
+#include "BTraceKernelCategoryHandler.h"
+#include "BTraceOstCategoryBitmap.h"
+#include "TraceCore.h"
+#include "TraceCoreDebug.h"
+#include "TraceCoreConstants.h"
+
+#include "OstTraceDefinitions.h"
+
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "BTraceKernelCategoryHandlerTraces.h"
+#endif
+
+#include "TraceCoreTComArgMacro.h"
+
+//Split: These needed from TraceCoreAutogen.h (which is removed):
+#define SYMBIAN_CF_SERVERDEN 0xC2
+#define SYMBIAN_CF_MESHMACHINE 0xC3
+#define SYMBIAN_CF_FACTORIES 0xC4
+
+/**
+ * Length of BTrace header
+ */
+const TUint KBTraceHeaderLen = 4;
+
+/**
+ * Length of single BTrace variable
+ */
+const TUint KBTraceVariableLen = 4;
+
+/**
+ * Four bytes
+ */
+const TUint KFourBytes = 4;
+
+// Trace group shift when checking if group is active
+#define GRP_SHIFT 16
+
+// BTrace category shift for unknown categories
+#define CATEGORY_SHIFT 8
+
+/**
+ * Constructor
+ */
+DBTraceKernelCategoryHandler::DBTraceKernelCategoryHandler()
+: iPrimeDfc( DBTraceKernelCategoryHandler::PrimeDfc, this, DTraceCore::GetActivationQ(), KDefaultDfcPriority )
+, iMultiPartActivationInfos(2, _FOFF( TMultiPartActivationInfo, iMultiPartId ))
+    {
+    }
+
+
+/**
+ * Destructor
+ */
+DBTraceKernelCategoryHandler::~DBTraceKernelCategoryHandler()
+    {
+    iMultiPartActivationInfos.Close();
+    }
+
+
+/**
+ * Initializes this handler
+ *
+ * @param aHandler The BTrace handler
+ */
+TInt DBTraceKernelCategoryHandler::Init()
+    {
+    TInt ret( KErrGeneral );
+
+    DTraceCore* traceCore = DTraceCore::GetInstance();
+    if ( traceCore != NULL )
+        {
+        // Gets the Autogen category bitmap from the list of registered activation interfaces
+        iTraceBitmap = static_cast< DBTraceOstCategoryBitmap* >( 
+                traceCore->GetActivation( KKernelHooksOSTComponentUID ) );
+        if ( iTraceBitmap != NULL )
+            {
+            // Registers to bitmap for change notifications. The primary BTrace filters are
+            // updated when the bitmap changes
+            iTraceBitmap->RegisterActivationNotification( *this );
+            ret = KErrNone;
+            }
+        }
+    
+    // Registers kernel categories to BTrace
+    if ( ret == KErrNone )
+        {
+        for ( TInt i = KMinKernelCategory; ( ret == KErrNone ) && ( i <= KMaxKernelCategory ); i++ )
+            {
+            ret = AddCategory( i );
+            }
+
+        if ( ret == KErrNone )
+            {
+            ret = Register();
+            }
+        }
+    TC_TRACE( ETraceLevelFlow, Kern::Printf( "<DBTraceKernelCategoryHandler::Init() - %d", ret ) );
+    return ret;
+    }
+
+
+/**
+ * Called before SetWriter with interrupts enabled
+ * 
+ * @param aWriter The new writer
+ */
+void DBTraceKernelCategoryHandler::PrepareSetWriter( DTraceCoreWriter* aWriter )
+    {
+    OstTrace1( TRACE_FLOW, DBTRACEKERNELCATEGORYHANDLER_PREPARESETWRITER_ENTRY,"> DBTraceKernelCategoryHandler::PrepareSetWriter 0x%x", ( TUint )( aWriter ) );
+    if ( iWriter == NULL && aWriter != NULL )
+        {
+        DBTraceCategoryHandler::PrepareSetWriter( aWriter );
+        // When writer is set, the kernel categories are primed
+        // Priming is done via DFC.
+        PrimeKernelCategories();
+        }
+    else
+        {
+        DBTraceCategoryHandler::PrepareSetWriter( aWriter );
+        if ( aWriter == NULL )
+            {
+            // If writer is set to NULL, the kernel categories are disabled. 
+            // This needs to be done immediately, not via timer
+            PrimeDfc();
+            }
+        }
+    if ( aWriter != NULL && aWriter->GetWriterType() == EWriterTypeUSBPhonet )
+        {
+        // CPU events must be disabled when using media writer
+        PrimeCategory( BTrace::ECpuUsage );
+        }
+    }
+
+
+/**
+ * Handler for KCategoryNokiaAutogen
+ *
+ * @param aHeader BTrace header
+ * @param aHeader2 Extra header data
+ * @param aContext The thread context in which this function was called
+ * @param a1 The first trace parameter
+ * @param a2 The second trace parameter
+ * @param a3 The third trace parameter
+ * @param aExtra Extra trace data
+ * @param aPc The program counter value
+ * @return ETrue if trace was processed, EFalse if not
+ */
+TBool DBTraceKernelCategoryHandler::HandleFrame( TUint32 aHeader, TUint32 aHeader2, const TUint32 aContext, 
+                                                  const TUint32 a1, const TUint32 a2, const TUint32 a3, 
+                                                  const TUint32 aExtra, const TUint32 aPc )
+    {
+    TBool retval;
+    if ( iWriter != NULL )
+        {
+        //deal with any possible missing traces
+        DTraceCore* tracecore = DTraceCore::GetInstance();
+        if(!tracecore)
+            return EFalse;
+        
+        // Check if tracing is certified
+        if (!tracecore->IsTraceCertified())
+            return EFalse;
+
+        if ((tracecore->PreviousTraceDropped())) //if previous trace was dropped 
+            {
+            //set flags back to EFalse first
+            tracecore->SetPreviousTraceDropped(EFalse);
+
+            //set missing flag in BTrace
+            aHeader |= BTrace::EMissingRecord<<(BTrace::EFlagsIndex * KByteSize);
+            }
+        
+        TUint8 category = ( aHeader >> ( BTrace::ECategoryIndex * KByteSize ) ) & KByteMask;
+        TUint8 subCategory = ( aHeader >> ( BTrace::ESubCategoryIndex * KByteSize ) ) & KByteMask;
+        TUint32 traceWord = MapCategoryToID( category, subCategory );
+        if ( traceWord > 0 )
+            {
+            
+            // Check if the trace is a multipart trace
+            TBool isMultiPart = CheckMultiPart(aHeader, aHeader2);
+            if (isMultiPart)
+                {
+                // Handle the multipart trace
+                retval = HandleMultiPart(aHeader, aHeader2, aContext, traceWord, a2, a3, aExtra, aPc);
+                }
+            
+            // Not a multipart trace
+            else 
+                {
+                // If previous trace was discarded, add info about it to the header
+                if (tracecore->PreviousTraceDropped())
+                    {
+                    aHeader |= BTrace::EMissingRecord<<(BTrace::EFlagsIndex * KByteSize);
+                    tracecore->SetPreviousTraceDropped(EFalse);
+                    }
+                
+                TUint8 recordSize = static_cast< TUint8 >( ( aHeader >> ( BTrace::ESizeIndex * KByteSize ) ) & KByteMask );
+                iWriter->WriteTraceCoreFrame( KKernelHooksOSTComponentUID, 
+                    traceWord, aHeader, aHeader2, aContext, a1, a2, a3, aExtra, aPc, recordSize );
+
+                retval = ETrue;
+                }
+            }
+        else
+            {
+            retval = EFalse;
+            }
+        }
+    else
+        {
+        retval = EFalse;
+        }
+    TC_TRACE( ETraceLevelTraceFlow, Kern::Printf("<DBTraceKernelCategoryHandler::HandleFrame - return %d", retval ) );
+    return retval;
+    }
+
+
+/**
+ * Maps a BTrace category / sub-category to group / trace ID
+ *
+ * @param aCategory The BTrace category
+ * @param aSubCategory The BTrace sub-categoory
+ * @return The group / trace ID combination
+ */
+TUint32 DBTraceKernelCategoryHandler::MapCategoryToID( TUint8 aCategory, TUint8 aSubCategory )
+    {
+    TUint32 ret;
+    
+    switch( aCategory )
+        {
+        case BTrace::EThreadIdentification:
+        case BTrace::ECpuUsage:
+        case BTrace::EClientServer:
+        case BTrace::ERequests:
+        case BTrace::EChunks:
+        case BTrace::ECodeSegs:
+        case BTrace::EPaging:
+        case BTrace::EThreadPriority:
+        case BTrace::EPagingMedia:
+            ret = ( aCategory << GRP_SHIFT ) | aSubCategory;
+            break;
+            
+        // Symbian 9.4 categories
+        case BTrace::EKernelMemory:
+        case BTrace::EHeap:
+        case BTrace::EMetaTrace:
+        case BTrace::ERamAllocator:
+        case BTrace::EFastMutex:     
+        case BTrace::EProfiling:
+            ret = ( aCategory << GRP_SHIFT ) | aSubCategory;
+            break;
+            
+        // Symbian 9.5 categories            
+        case BTrace::EResourceManager:
+        case BTrace::EResourceManagerUs:
+        case BTrace::ERawEvent:
+        case BTrace::EUsb:
+        case BTrace::ESymbianKernelSync:
+        case BTrace::EFlexibleMemModel:
+            ret = ( aCategory << GRP_SHIFT ) | aSubCategory;
+            break;
+            
+        // Symbian 9.6 categories            
+        case BTrace::EIic:
+            ret = ( aCategory << GRP_SHIFT ) | aSubCategory;
+            break;                                                   
+
+        // These are for Symbian for debugging purposes
+		case 194:
+			ret = ( SYMBIAN_CF_SERVERDEN << GRP_SHIFT ) | aSubCategory;
+			break;
+		case 195:
+			ret = ( SYMBIAN_CF_MESHMACHINE << GRP_SHIFT ) | aSubCategory;
+			break;
+		case 196:
+			ret = ( SYMBIAN_CF_FACTORIES << GRP_SHIFT ) | aSubCategory;
+			break;
+				
+        default:
+            // Unknown category but let's still use the same ID as we received
+            ret = ( aCategory << GRP_SHIFT ) | aSubCategory;
+            break;
+        }
+
+    return ret;
+    }
+
+
+/**
+ * Called when an activation bitmap state changes
+ * 
+ * @param aActivation the activation object
+ * @param aFromSettings ETrue if changes was due to settings read
+ * @param aComponentId Component ID of the activation
+ */
+void DBTraceKernelCategoryHandler::ActivationChanged( MTraceCoreActivation& TCOM_ARG(aActivation), TBool TCOM_ARG(aFromSettings),
+        TUint32 aComponentId)
+    {
+    OstTraceExt2( TRACE_FLOW, DBTRACEKERNELCATEGORYHANDLER_ACTIVATIONCHANGED_ENTRY,"> DBTraceKernelCategoryHandler::ActivationChanged 0x%x. FromSettings:%d",( TUint )( &aActivation ), aFromSettings );
+    
+    // Kernel categories are primed when activation bitmap changes
+    if (aComponentId == KOldNokiaAutogenOSTComponentUID || aComponentId == KKernelHooksOSTComponentUID)
+        {
+        PrimeKernelCategories();
+        }
+    }
+
+
+/**
+ * Primes the kernel categories    
+ */
+void DBTraceKernelCategoryHandler::PrimeKernelCategories()
+    {
+    // Priming is done asynchronously to avoid blocking this thread
+    iPrimeDfc.Enque();
+    }
+
+
+/**
+ * Dfc function to prime kernel categories
+ */
+void DBTraceKernelCategoryHandler::PrimeDfc( TAny* aHandler )
+    {
+    OstTrace1( TRACE_FLOW, DBTRACEKERNELCATEGORYHANDLER_PRIMEDFC_ENTRY,"> DBTraceKernelCategoryHandler::PrimeDfc 0x%x", ( TUint )( aHandler ) );
+    
+    // Get handler and prime kernel categories
+    DBTraceKernelCategoryHandler* handler = static_cast< DBTraceKernelCategoryHandler* >( aHandler );
+    handler->PrimeDfc();
+    }
+
+
+/**
+ * Called from the static DFC callback function
+ */
+void DBTraceKernelCategoryHandler::PrimeDfc()
+    {
+    OstTrace0( TRACE_FLOW, DBTRACEKERNELCATEGORYHANDLER_PRIMEDFC,
+    		"> DBTraceKernelCategoryHandler::PrimeDfc" );
+    		
+    // Start from Thread Identification as we don't want to active Printfs from the BTrace
+    for ( TInt i = KMinKernelCategory; i <= KMaxKernelCategory; i++ )
+        {
+        PrimeCategory( i );
+        }
+    }
+
+
+/**
+ * Primes a category
+ * 
+ * @param aCategory the category to be primed
+ */
+void DBTraceKernelCategoryHandler::PrimeCategory( TUint8 aCategory )
+    {
+    TUint32 traceWord = MapCategoryToID( aCategory, 0 );
+    // CPU events are not possible when using USB phonet writer
+    // They result in context switch trace loop
+    if ( iWriter != NULL &&
+         (iTraceBitmap->IsTraceActivated( KKernelHooksOSTComponentUID, traceWord ) )
+            && ( aCategory != BTrace::ECpuUsage || iWriter->GetWriterType() != EWriterTypeUSBPhonet ) )
+        {
+        TInt ret = BTrace::SetFilter( aCategory, 1 );
+        if ( ret == KErrNone )
+            {
+            OstTrace1( TRACE_NORMAL, DBTRACEKERNELCATEGORYHANDLER_PRIMEDFC__,"DBTraceKernelCategoryHandler::PrimeDfc - Priming 0x%x", aCategory );
+            BTrace::Prime( aCategory );
+            }
+        else if ( ret == KErrNotSupported )
+            {
+            OstTrace1( TRACE_INTERNAL, DBTRACEKERNELCATEGORYHANDLER_PRIMEDFC_NOT_SUPPORTED,"DBTraceKernelCategoryHandler::PrimeDfc - Category not supported 0x%x", aCategory );
+            }
+        }
+    else
+        {
+        (void) BTrace::SetFilter( aCategory, 0 );
+        }
+    }
+
+/**
+ * Handles this Multipart trace
+ *
+ * @param aHeader BTrace header
+ * @param aHeader2 Extra header data
+ * @param aContext The thread context in which this function was called
+ * @param aTraceWord Trace Word
+ * @param a1 First parameter
+ * @param aData The data
+ * @param aExtra Extra trace data
+ * @param aPc The program counter value
+ * @return ETrue if trace was processed
+ */
+TBool DBTraceKernelCategoryHandler::HandleMultiPart( TUint32 aHeader, TUint32 aHeader2, const TUint32 aContext,
+                   const TUint32 aTraceWord, const TUint32 a1, const TUint32 aData, const TUint32 aExtra,
+                   const TUint32 aPc)
+    {
+    TC_TRACE( ETraceLevelTraceFlow, Kern::Printf( ">DBTraceOstCategoryHandler::HandleMultiPart" ) );
+    TBool retval = ETrue;
+    TInt multiPartOffset = aHeader2 & BTrace::EMultipartFlagMask;
+    TUint8 recordSize = static_cast< TUint8 >( ( aHeader >> ( BTrace::ESizeIndex * KByteSize ) ) & KByteMask );
+    
+    // First part of multipart trace
+    if (multiPartOffset == BTrace::EMultipartFirst)
+        {
+        // Create new MultiPart activation info and save it to the array
+        TMultiPartActivationInfo activationInfo;
+        activationInfo.iComponentId = KKernelHooksOSTComponentUID;
+        activationInfo.iTraceWord = aTraceWord;
+        activationInfo.iMultiPartId = aExtra;
+   
+        // Insert the item to the array        
+        TInt ret = iMultiPartActivationInfos.InsertInUnsignedKeyOrder(activationInfo);
+        
+        if (KErrNone == ret)
+            {            
+            TUint32* ptr = reinterpret_cast< TUint32* >(aData);
+            TUint32 a2 = *ptr++;
+            
+            // Write the trace. Move pointer by 4 bytes because first 4 bytes is moved from aData
+            // to a2. Decrease record size by 4 bytes because the original a2 is not written
+            iWriter->WriteTraceCoreFrame( activationInfo.iComponentId, activationInfo.iTraceWord, 
+                    aHeader, aHeader2, aContext, a1, a2, 
+                    aData + 4, aExtra, aPc, recordSize - 4);
+            }
+        else
+            {
+            retval = EFalse;
+            DTraceCore* tcore = DTraceCore::GetInstance();
+            if(tcore)
+                tcore->SetPreviousTraceDropped(ETrue);
+            }
+        }
+     
+    // Middle or last part of multipart trace
+    else if (multiPartOffset == BTrace::EMultipartMiddle || multiPartOffset == BTrace::EMultipartLast)
+        {
+        // Check index of component id in array
+        TMultiPartActivationInfo tempInfo;
+        tempInfo.iMultiPartId = aExtra;
+        TInt index = iMultiPartActivationInfos.FindInUnsignedKeyOrder(tempInfo);
+        
+        if (index != KErrNotFound)
+            {
+            TMultiPartActivationInfo activationInfo = iMultiPartActivationInfos[index];
+
+            TUint32 a1 = 0;
+            TUint32 a2 = 0;
+            TUint32 movePointerOffset = 0;
+            
+            // Calculate if we can move data from the aData to a1 and a2
+            TUint32 dataStartOffset = CalculateDataStartOffset(aHeader);
+            if ( recordSize - dataStartOffset >= 4 )
+                {
+                TUint32* ptr = reinterpret_cast< TUint32* >(aData);
+                a1 = *ptr++;
+                movePointerOffset += 4;
+                
+                if ( recordSize - dataStartOffset >= 8 )
+                    {
+                    a2 = *ptr++;
+                    movePointerOffset += 4;
+                    }
+                }
+                        
+            // Write the trace. Decrease the record size by 8 because of the original a1 and a2
+            // are not written
+            iWriter->WriteTraceCoreFrame( activationInfo.iComponentId, activationInfo.iTraceWord, 
+                    aHeader, aHeader2, aContext, a1, a2, 
+                    aData + movePointerOffset, aExtra, aPc, recordSize - 8);
+            
+            // Last part, remove the item from the array
+            if (multiPartOffset == BTrace::EMultipartLast)
+                {
+                iMultiPartActivationInfos.Remove(index);
+                }
+            }
+        }
+    TC_TRACE( ETraceLevelTraceFlow, Kern::Printf( "<DBTraceOstCategoryHandler::HandleMultiPart > return %d", retval ) );
+    return retval;
+    }
+
+/**
+ * Checks if the given trace is a Multipart trace
+ *
+ * @param aHeader Header data
+ * @param aHeader2 Extra header data
+ * @return ETrue if trace is a Multipart trace, EFalse if not
+ */
+inline TBool DBTraceKernelCategoryHandler::CheckMultiPart( TUint32 aHeader, TUint32 aHeader2 )
+    {
+    TC_TRACE( ETraceLevelTraceFlow, Kern::Printf( ">DBTraceKernelCategoryHandler::CheckMultiPart()" ) );
+    TBool retval = EFalse;
+    TUint8 flags = static_cast< TUint8 >( ( aHeader >> ( BTrace::EFlagsIndex * KByteSize ) ) & KByteMask );
+    if (flags & BTrace::EHeader2Present)
+        {
+        // First, middle or last part of Multipart trace
+        if (aHeader2 & BTrace::EMultipartFlagMask)
+            {
+            retval = ETrue;
+            }
+        }
+    TC_TRACE( ETraceLevelTraceFlow, Kern::Printf( "<DBTraceKernelCategoryHandler::CheckMultiPart > return %d", retval ) );
+    return retval;
+    }
+
+/**
+ * Calculates data start offset
+ *
+ * @param aHeader BTrace header
+ */
+TUint32 DBTraceKernelCategoryHandler::CalculateDataStartOffset( TUint32 aHeader )
+    {
+    TC_TRACE( ETraceLevelTraceFlow, Kern::Printf( ">DBTraceOstCategoryHandler::CalculateDataStartOffset()" ) );
+    TUint32 offset = 0;
+    TUint8 flags = static_cast< TUint8 >( ( aHeader >> ( BTrace::EFlagsIndex * KByteSize ) ) & KByteMask );
+    
+    // First add header length
+    offset += KBTraceHeaderLen;
+    
+    // Header2 is present
+    if ( flags & BTrace::EHeader2Present )
+        {
+        offset += KBTraceVariableLen;
+        }
+    // Timestamp is present
+    if ( flags & BTrace::ETimestampPresent )
+        {
+        offset += KBTraceVariableLen;
+        }
+    // Timestamp2 is present
+    if ( flags & BTrace::ETimestamp2Present )
+        {
+        offset += KBTraceVariableLen;
+        }
+    // Context ID is present
+    if ( flags & BTrace::EContextIdPresent )
+        {
+        offset += KBTraceVariableLen;
+        }
+    // Program counter is present
+    if ( flags & BTrace::EPcPresent )
+        {
+        offset += KBTraceVariableLen;
+        }
+    // Extra value is present
+    if ( flags & BTrace::EExtraPresent )
+        {
+        offset += KBTraceVariableLen;
+        }
+    
+    // Next 8 bytes came with first and second parameter of the multipart trace
+    offset += KFourBytes;
+    offset += KFourBytes;
+    
+    TC_TRACE( ETraceLevelTraceFlow, Kern::Printf( "<DBTraceOstCategoryHandler::CalculateDataStartOffset > return %d", offset ) );
+    return offset;
+    }
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/src/BTraceOstCategoryBitmap.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,1446 @@
+// 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 "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:
+//
+// Description:
+// Trace Core 
+//
+
+#include <e32def.h>
+#include <e32btrace.h>
+
+#include "BTraceOstCategoryBitmap.h"
+#include "TraceCoreOstHeader.h"
+#include "TraceCoreCommon.h"
+#include "TraceCore.h"
+#include "TraceCoreNotifier.h"
+#include "TraceCoreConstants.h"
+#include "TraceCoreDebug.h"
+#include "TraceCoreSettings.h"
+#include "BTraceOstCategoryHandler.h"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "BTraceOstCategoryBitmapTraces.h"
+#endif
+
+
+//Split: These needed from sos_mon_isi_m.h (which is removed):
+#define SOS_MON_TRACECORE_OST_ACTIVATION_REQ 0xD4
+
+// OST message type
+#define SOS_MON_TRACECORE_OST_ACTIVATION 1
+#define SOS_MON_TRACECORE_OST_ACTIVATION_QUERY 2
+
+/**
+ * OST activation message types
+ */
+#define SOS_MON_TRACECORE_OST_DEACTIVATE 0
+#define SOS_MON_TRACECORE_OST_ACTIVATE 1
+#define SOS_MON_TRACECORE_OST_DEACTIVATE_ALL 2
+#define SOS_MON_TRACECORE_OST_ACTIVATE_ALL 3
+#define SOS_MON_TRACECORE_OST_OVERWRITE 4
+
+
+/**
+ * Offset to OST message id
+ * Field length 1 byte
+ */
+const TInt KOstMessageIdOffset = 0;
+
+/**
+ * Offset to activation info
+ * Field length 1 byte
+ */
+const TInt KOstActivationInfoOffset = 3;
+
+/**
+ * Offset to Number of groups field
+ * Field length 4 bytes
+ */
+const TInt KOstNumberOfGroupsOffset = 4;
+
+/**
+ * Offset to Component id
+ * Field length 4 bytes
+ */
+const TInt KOstComponentIdOffset = 8;
+
+/**
+ * Offset to 1st Group Id
+ * Field length 2 bytes
+ */
+const TInt KOstGroupIdOffset = 12;
+
+/**
+ * Minimum OST frame length
+ *  - Message ID            (1 byte)
+ *  - Fillers               (2 bytes)
+ *  - Activation info       (1 byte)
+ *  - Number of groups      (4 bytes)
+ *  - Component ID          (4 bytes)
+ */
+const TInt KOstMinFrameLength = 12;
+
+/**
+ * Group id length, 16bits, 2 bytes
+ */
+const TUint KGroupIdLength = 2;
+
+/**
+ * Increase array size
+ */
+const TUint KOstComponentsArrayGranularity = 8;
+
+/**
+ * Maximum activation buffer length
+ */
+const TUint32 KMaxActivationBufferLength = 1024 * 16;
+
+/**
+ * Constants for bit manipulation
+ */
+const TInt K8BitShift = 8;
+const TInt K16BitShift = 16;
+const TInt K24BitShift = 24;
+const TInt K8BitMask = 0xff;
+const TInt K4Bytes = 4;
+const TInt K2Bytes = 2;
+
+/**
+ * Number of bytes to shift the group ID
+ */
+#define GRP_SHIFT 16
+
+/**
+ * Number of bytes to shift the group ID
+ */
+#define GRP_MASK 0x00ff0000
+
+/**
+ * Dummy handler used when no traces activated
+ */
+TBool DummyBTraceHandler(TUint32,TUint32,const TUint32,const TUint32,const TUint32,const TUint32,const TUint32,const TUint32)
+	{
+	return EFalse;
+	}
+
+BTrace::THandler oldHandler;
+
+/**
+ * Reads 16 bits from buffer
+ */
+TUint32 Read16(const TUint8* aPtr)
+    {
+    return ( (TUint32 )*aPtr ) | ( ( (TUint32 )*(aPtr + 1 ) ) << K8BitShift ); // CodForChk_Dis_Magic
+    }
+
+/**
+ * Reads 32 bits from buffer
+ */
+TUint32 Read32(const TUint8* aPtr)
+    {
+    return ( (TUint32 )*aPtr ) |
+           ( ( (TUint32 )*(aPtr + 1 ) ) << K8BitShift ) | // CodForChk_Dis_Magic
+           ( ( (TUint32 )*(aPtr + 2 ) ) << K16BitShift ) | // CodForChk_Dis_Magic
+           ( ( (TUint32 )*(aPtr + 3 ) ) << K24BitShift ); // CodForChk_Dis_Magic
+    }
+
+/**
+ * Endian swapper for 32-bit variable
+ */
+#define SWAP32( num ) ( \
+    ( ( ( num ) & 0xff000000 ) >> K24BitShift ) | ( ( ( num ) & 0x00ff0000 ) >> K8BitShift  ) | \
+    ( ( ( num ) & 0x0000ff00 ) <<  K8BitShift ) | ( ( ( num ) & 0x000000ff ) << K24BitShift ) )
+
+/**
+ * Endian swapper for 16-bit variable
+ */
+#define SWAP16( num ) ( ( ( ( num ) & 0xff00 ) >> K8BitShift ) | ( ( ( num ) & 0x00ff ) << K8BitShift  ) )
+
+/**
+ * Constructor
+ */
+DBTraceOstCategoryBitmap::DBTraceOstCategoryBitmap(DBTraceOstCategoryHandler* aBTraceOstCategoryHandler) :
+      iOstComponents(NULL),
+      iTmpArray(NULL),
+      iChangedArray(NULL),
+      iActivationBuffer(NULL),
+      iBTraceOstCategoryHandler( aBTraceOstCategoryHandler )
+    {
+    }
+
+/**
+ * Destructor
+ */
+DBTraceOstCategoryBitmap::~DBTraceOstCategoryBitmap()
+    {
+    Kern::Free( iActivationBuffer );
+    iActivationBuffer = NULL;
+    
+    CleanupComponentsArrays();
+    }
+
+/**
+ * Init TraceBitmap
+ */
+TInt DBTraceOstCategoryBitmap::Init()
+    {
+    iOstComponents = new RArray<TOstComponent>(KOstComponentsArrayGranularity);
+    if(!iOstComponents)
+        return KErrNoMemory;
+    iTmpArray = new RArray<TOstComponent>(KOstComponentsArrayGranularity);
+    if(!iTmpArray)
+        {
+        CleanupComponentsArrays();
+        return KErrNoMemory;
+        }
+    iChangedArray = new RArray<TOstComponent>(1);
+    if(!iChangedArray)
+        {
+        CleanupComponentsArrays();
+        return KErrNoMemory;
+        }
+    
+    AllocateActivationBuffer();
+        
+    // Init bitmap
+    TInt err = DTraceCoreActivationBase::Init( SOS_MON_TRACECORE_OST_ACTIVATION_REQ);
+    if (err == KErrNone)
+        {
+        // Subscribe message
+        err = DTraceCoreActivationBase::SubscribeMessage(OstConstants::OstBaseProtocol::KOstTraceActivationProtocol,
+                EMessageHeaderFormatOst);
+
+        // Save old BTrace handler and use dummy for better performance
+        oldHandler = BTrace::SetHandler(DummyBTraceHandler);
+        }
+    
+    return err;
+    }
+
+/**
+ * Activate trace group
+ *
+ * @param aComponentId The component ID
+ * @param aGroupId The group ID
+ */
+void DBTraceOstCategoryBitmap::ActivateTrace(const TUint32 aComponentId, const TUint32 aGroupId)
+    {
+    OstTraceExt2( TRACE_FLOW, DBTRACEOSTCATEGORYBITMAP_ACTIVATETRACE_ENTRY,"> DBTraceOstCategoryBitmap::ActivateTrace CID:0x%x GID:0x%x", aComponentId, aGroupId );
+    //TODO: check is thread context (assert)
+    //TODO: can be executed only from iActivationQ (__ASSERT_DEBUG)
+    
+    if (GroupIdIsValid(aGroupId))
+      {
+    //TODO: check how many users use this array (use atomics to increment/decrement)
+      CopyArray<TOstComponent>(iOstComponents, iTmpArray);
+      CleanupComponentsArray(*iChangedArray);
+      
+      TInt index = AddComponentId(aComponentId, *iTmpArray);
+      AddGroupId(aComponentId, aGroupId, index, *iTmpArray, *iChangedArray);
+      SetNewComponentsArrayPtr( iTmpArray );
+      
+      //notify internal listeners and update internal activation cache
+      HandleTraceActivationChanges(*iChangedArray);
+      NotifyInternalActivation( EFalse, aComponentId );
+      }
+    else
+      {
+      OstTrace0( TRACE_IMPORTANT , DBTRACEOSTCATEGORYBITMAP_ACTIVATETRACE_INVALID_GROUP,"DBTraceOstCategoryBitmap::ActivateTrace - Invalid group ID");
+      // Notifies activation interfaces of invalid group ID
+      DTraceCore* traceCore = DTraceCore::GetInstance();
+      if ( traceCore != NULL )
+          {
+          traceCore->GetNotifier().TraceError( aComponentId, aGroupId, KErrArgument );
+          }
+      }
+    }
+
+/**
+ * Deactivate trace group
+ *
+ * @param aComponentId The component ID
+ * @param aGroupId The group ID
+ */
+void DBTraceOstCategoryBitmap::DeactivateTrace(const TUint32 aComponentId, const TUint32 aGroupId)
+    {
+    OstTraceExt2( TRACE_FLOW, DBTRACEOSTCATEGORYBITMAP_DEACTIVATETRACE_ENTRY,"> DBTraceOstCategoryBitmap::DeactivateTrace. CID:0x%x GID:0x%x", aComponentId, aGroupId );
+    if (ComponentIdIsValid(aComponentId) )
+        {
+        if (GroupIdIsValid(aGroupId))
+            {
+            
+            TInt componentIndex = FindComponentId(aComponentId, *iOstComponents);
+            if (componentIndex >= 0)
+                {
+                CopyArray<TOstComponent>(iOstComponents, iTmpArray);
+                CleanupComponentsArray(*iChangedArray);
+                RemoveGroupId(aComponentId, aGroupId, componentIndex, *iTmpArray, *iChangedArray);
+                if ((*iTmpArray)[ componentIndex ].iGroups.Count() == 0)
+                    {
+                    RemoveComponentId(aComponentId, EFalse, *iTmpArray, *iChangedArray);
+                    }
+                
+                //Swap pointers.
+                SetNewComponentsArrayPtr( iTmpArray );
+             
+                //notify internal listeners and update internal activation cache
+                HandleTraceActivationChanges(*iChangedArray);
+                NotifyInternalActivation( EFalse, aComponentId );
+                }
+            }
+        else
+            {
+            OstTrace0( TRACE_IMPORTANT , DBTRACEOSTCATEGORYBITMAP_DEACTIVATETRACE_INVALID_GROUP,"DBTraceOstCategoryBitmap::DeactivateTrace - Invalid group ID");
+            // Notifies activation interfaces of invalid group ID
+            DTraceCore* traceCore = DTraceCore::GetInstance();
+            if ( traceCore != NULL )
+                {
+                traceCore->GetNotifier().TraceError( aComponentId, aGroupId, KErrArgument );
+                }
+            }
+        }
+    }
+
+/**
+ * Deactivates all groups from a component
+ * 
+ * @param aComponentId The component ID
+ */
+void DBTraceOstCategoryBitmap::DeactivateAll(const TUint32 aComponentId)
+    {
+    OstTrace1( TRACE_IMPORTANT , DBTRACEOSTCATEGORYBITMAP_DEACTIVATEALL_ENTRY,"> DBTraceOstCategoryBitmap::DeactivateAll. CID:0x%x", aComponentId );
+
+    CopyArray<TOstComponent>(iOstComponents, iTmpArray);
+    CleanupComponentsArray(*iChangedArray);
+    
+    if( RemoveComponentId(aComponentId, ETrue, *iTmpArray, *iChangedArray) != KErrNotFound)
+        SetNewComponentsArrayPtr( iTmpArray );
+    
+    //notify internal listeners and update internal activation cache
+    HandleTraceActivationChanges(*iChangedArray);
+    NotifyInternalActivation( EFalse, aComponentId );
+    }
+
+/**
+ * Reads the bitmap from the settings. If the settings does 
+ * not have a bitmap, the current bitmap is written to it
+ * 
+ * @param aSettings the settings
+ */
+void DBTraceOstCategoryBitmap::ReadFromSettings(DTraceCoreSettings& aSettings)
+    {
+    // Read buffer
+    if ( aSettings.Read( iActivationBuffer, KMaxActivationBufferLength ) )
+    	{
+        CopyArray<TOstComponent>(iOstComponents, iTmpArray);
+        CleanupComponentsArray(*iChangedArray);
+        
+	    TUint8* ptr = iActivationBuffer;
+	    TInt componentcount = Read32FromBuffer(ptr);
+	    TC_TRACE( ETraceLevelFlow, Kern::Printf( " DBTraceOstCategoryBitmap::ReadFromSettings() components=%d", componentcount ) );
+	    TInt groupcount = 0;
+	    TUint32 componentID = 0;
+	    TUint16 groupID = 0;
+	    TInt index = 0;
+	    for ( TInt i = 0; i < componentcount; ++i )
+	    	{
+	    	// Read number of group IDs (4 bytes)
+	    	groupcount = Read32FromBuffer(ptr);
+	    	// Read component ID (4 bytes)
+	    	componentID = Read32FromBuffer(ptr);
+	    	index = AddComponentId(componentID, *iTmpArray);
+	    	// Read group IDs (2 bytes each)
+	    	for ( TInt k = 0; k < groupcount; ++k )
+	    		{
+	    		groupID = Read16FromBuffer(ptr);
+	            if (GroupIdIsValid(groupID))
+	                {
+	                AddGroupId(componentID, groupID, index, *iTmpArray, *iChangedArray);
+	                }
+	            else
+	                {
+	                // Notifies activation interfaces of invalid group ID
+	                DTraceCore* traceCore = DTraceCore::GetInstance();
+	                if ( traceCore != NULL )
+	                    {
+	                    traceCore->GetNotifier().TraceError( componentID, groupID, KErrArgument );
+	                    }
+	                }            
+	    		}
+	    	}
+	    
+	    //swap pointers and clean up
+	    SetNewComponentsArrayPtr( iTmpArray );
+	    HandleTraceActivationChanges(*iChangedArray);
+	    NotifyInternalActivation( ETrue, componentID );
+    	}
+    }
+
+/**
+ * Writes the bitmap to given settings
+ * 
+ * @param aSettings the settings where bitmap is written
+ */
+void DBTraceOstCategoryBitmap::WriteToSettings(DTraceCoreSettings& aSettings)
+    { 
+    TUint8* ptr = iActivationBuffer;
+    TInt componentcount = iOstComponents->Count();
+    WriteToBuffer(ptr, (TUint32)(componentcount));
+    for ( TInt i = 0; i < componentcount; ++i )
+        {
+        // Add number of group IDs (4 bytes)
+        TInt groupcount = (*iOstComponents)[i].iGroups.Count();
+        WriteToBuffer(ptr, (TUint32)(groupcount));
+        // Add component ID (4 bytes)
+        WriteToBuffer(ptr, (*iOstComponents)[i].iComponentId);
+        TC_TRACE( ETraceLevelFlow, Kern::Printf( " DBTraceOstCategoryBitmap::WriteToSettings() component=0x%x with %d groups",(*iOstComponents)[i].iComponentId, groupcount ) );
+        // Add group IDs (2 bytes each)
+        for ( TInt k = 0; k < groupcount; ++k )
+            {
+            WriteToBuffer(ptr, (TUint16)((*iOstComponents)[i].iGroups[k]) );
+            }
+        }
+    // Save buffer
+    aSettings.Write( iActivationBuffer, KMaxActivationBufferLength );
+    }
+
+/**
+ * Checks if trace points with a specific component ID and group ID are
+ * currently active
+ *
+ * @param aComponentId The component ID
+ * @param aTraceWord The trace word containing the group ID to check
+ * @return ETrue if trace is active, EFalse if not
+ */
+TBool DBTraceOstCategoryBitmap::IsTraceActivated(const TUint32 aComponentId, TUint32 aTraceWord)
+    {
+    // Find component
+    TOstComponent ostComponent;
+    ostComponent.iComponentId = aComponentId;
+    TInt irq = ReadLock();
+    TInt index = iOstComponents->FindInUnsignedKeyOrder(ostComponent);
+    if (index != KErrNotFound)
+        {
+        index = (*iOstComponents)[ index ].iGroups.FindInOrder((aTraceWord & GRP_MASK) >> GRP_SHIFT);
+        }
+    TBool ret = (index != KErrNotFound );
+    ReadUnlock(irq);
+    return ret;
+    }
+
+/**
+ * Find component id index in array
+ * 
+ * @param aComponentId Component id to be searched
+ * @param aOstComponents Array to search through
+ * @return index of component id in array if found, otherwise KErrNotFound
+ */
+TInt DBTraceOstCategoryBitmap::FindComponentId(TUint32 aComponentId, RArray<TOstComponent>& aOstComponents)
+    {
+    OstTrace1( TRACE_FLOW, DBTRACEOSTCATEGORYBITMAP_FINDCOMPONENTID_ENTRY,"> DBTraceOstCategoryBitmap::FindComponentId 0x%x", aComponentId );
+    TOstComponent tempComponent;
+    tempComponent.iComponentId = aComponentId;
+    // Check index of component id in array
+    TInt index = aOstComponents.FindInUnsignedKeyOrder(tempComponent);
+    OstTrace1( TRACE_FLOW, DBTRACEOSTCATEGORYBITMAP_FINDCOMPONENTID_EXIT,"< DBTraceOstCategoryBitmap::FindComponentId. Index:%d", index );
+    return index;
+    }
+
+/**
+ * Add component id to array
+ * 
+ * @param aComponentId Component id to be added
+ * @return index of (added of existing) component id in array or an error code
+ */
+TInt DBTraceOstCategoryBitmap::AddComponentId(TUint32 aComponentId, RArray<TOstComponent>& aOstComponents)
+    {
+    OstTrace1( TRACE_FLOW, DBTRACEOSTCATEGORYBITMAP_ADDCOMPONENTID_ENTRY,"> DBTraceOstCategoryBitmap::AddComponentId 0x%x", aComponentId );
+    TOstComponent tempComponent;
+    tempComponent.iComponentId = aComponentId;
+    TInt index(KErrNotFound);
+    // Add component id
+    TInt err = aOstComponents.InsertInUnsignedKeyOrder(tempComponent);
+    OstTraceExt2( TRACE_IMPORTANT , DBTRACEOSTCATEGORYBITMAP_ADDCOMPONENTID_INSERT_FAILED,"DBTraceOstCategoryBitmap::AddComponentId - Insert returned. CID:0x%x Err:%d",(TUint)aComponentId, (TInt)err );
+    if ( (err == KErrNone ) || (err == KErrAlreadyExists ))
+        {
+        // Check index of component id in array
+        index = aOstComponents.FindInUnsignedKeyOrder(tempComponent);
+        }
+        
+    OstTrace1( TRACE_FLOW, DBTRACEOSTCATEGORYBITMAP_ADDCOMPONENTID_EXIT,"< DBTraceOstCategoryBitmap::AddComponentId. Index:%d", index );
+    return index;
+    }
+
+/**
+ * Remove component id in array.
+ * 
+ * @param aComponentId Component id to be removed
+ * @param aNotifyActivationListeners if true, inform activation notification listeners
+ * @param aOstComponents array from which component has to be removed 
+ * @param aChangedArray Array that will be updated to contain the changed TOstComponent objects
+ * @return index of removed component id if found, otherwise KErrNotFound
+ */
+TInt DBTraceOstCategoryBitmap::RemoveComponentId(TUint32 aComponentId, TBool aNotifyActivationListeners, 
+        RArray<TOstComponent>& aOstComponents, RArray< TOstComponent >& aChangedArray )
+    {
+    OstTraceExt2( TRACE_FLOW, DBTRACEOSTCATEGORYBITMAP_REMOVECOMPONENTID_ENTRY, "> DBTraceOstCategoryBitmap::RemoveComponentId 0x%x %d", aComponentId, aNotifyActivationListeners );
+    
+    // Check index of component id in array
+    TInt index = FindComponentId(aComponentId, aOstComponents);
+    if (index >= 0)
+        {
+        // Component id found - Remove it
+        aOstComponents.Remove(index);
+        
+        // Inform about removal if aNotifyActivationListeners is true
+        if ( aNotifyActivationListeners )
+        	{
+            AddGroupToChangedArray(aChangedArray, aComponentId, KAllGroups);
+        	}
+        }
+	
+    OstTrace1( TRACE_FLOW, DBTRACEOSTCATEGORYBITMAP_REMOVECOMPONENTID_EXIT,"< DBTraceOstCategoryBitmap::RemoveComponentId. Index:%d", index );
+    return index;
+    }
+
+/**
+ * Adds group id to array
+ * 
+ * @param aComponentId Component where the group belongs
+ * @param aGroupId Group id to be added
+ * @param aIndex Index of component array where to add the groupId
+ * @param aOstComponents Array with TOstComponent objects.
+ * @param aChangedArray Array that will be updated to contain the changed TOstComponent objects
+ */
+TInt DBTraceOstCategoryBitmap::AddGroupId(TUint32 aComponentId, TGroupId aGroupId, TInt aIndex, 
+        RArray<TOstComponent>& aOstComponents, RArray<TOstComponent>& aChangedArray)
+    {
+    OstTraceExt2( TRACE_FLOW, DBTRACEOSTCATEGORYBITMAP_ADDGROUPID_ENTRY,"> DBTraceOstCategoryBitmap::AddGroupId. GID:0x%x. Index:%d", (TUint32) aGroupId, (TUint32) aIndex );
+    TInt ret = KErrNone;
+
+    if (aIndex >= 0 && aIndex < aOstComponents.Count() )
+        {
+        // Add group Id
+        ret = aOstComponents[ aIndex ].iGroups.InsertInOrder(aGroupId);
+        if (ret == KErrNone)
+            {
+            // Inform notifier that trace has been activated
+            DTraceCore* traceCore = DTraceCore::GetInstance();
+            if (traceCore != NULL)
+                {
+                // Don't activate Kernel groups from BTrace here, it will be done in KernelHandler
+                if ((TUint) aGroupId > KMaxKernelCategory)
+                    {
+                    BTrace::SetFilter((TUint) aGroupId, 1);
+                    }
+                
+                // Add group to changed array
+                AddGroupToChangedArray(aChangedArray, aComponentId, aGroupId);
+                }
+            else
+                {
+                ret = KErrGeneral;
+                }
+            }
+        else
+            if (ret == KErrAlreadyExists)
+                {
+                ret = KErrNone;
+                }
+        }
+    else
+        {
+        ret = KErrArgument;
+        }
+    
+    OstTrace1( TRACE_FLOW, DBTRACEOSTCATEGORYBITMAP_ADDGROUPID_EXIT,"< DBTraceOstCategoryBitmap::AddGroupId. Ret:%d", ret );
+    return ret;
+    }
+
+/**
+ * Removes group id from array
+ * 
+ * @param aComponentId Component where the group belongs
+ * @param aGroupId Group id to be removed
+ * @param aIndex Index of component array from where to remove the groupId
+ * @param aOstComponents Array with TOstComponent objects.
+ * @param aChangedArray Array that will be updated to contain the changed TOstComponent objects
+ */
+TInt DBTraceOstCategoryBitmap::RemoveGroupId(TUint32 aComponentId, TGroupId aGroupId, TInt aIndex, 
+        RArray<TOstComponent>& aOstComponents, RArray< TOstComponent >& aChangedArray)
+    {
+    OstTraceExt2( TRACE_FLOW, DBTRACEOSTCATEGORYBITMAP_REMOVEGROUPID_ENTRY,"> DBTraceOstCategoryBitmap::RemoveGroupId. GID:0x%x. Idx:%d", (TUint32) aGroupId, (TUint32) aIndex );
+    TInt ret = KErrNone;
+    if (aIndex >= 0 && aIndex < aOstComponents.Count() )
+        {
+        // Component id found, remove group ID
+        TInt groupIndex = aOstComponents[ aIndex ].iGroups.FindInOrder(aGroupId);
+        if (groupIndex >= 0)
+            {
+            aOstComponents[ aIndex ].iGroups.Remove(groupIndex);
+            // Inform notifier that trace has been deactivated
+            DTraceCore* traceCore = DTraceCore::GetInstance();
+            if (traceCore != NULL)
+                {
+                BTrace::SetFilter((TUint) aGroupId, 0);                        
+                OstTrace1( TRACE_INTERNAL, DBTRACEOSTCATEGORYBITMAP_REMOVEGROUPID_NOTIFIER_DEACTIVATED,"DBTraceOstCategoryBitmap::RemoveGroupId - Group deactivated, calling notifier. GID:0x%x",(TUint32) aGroupId );
+                
+                AddGroupToChangedArray(aChangedArray, aComponentId, aGroupId);                
+                ret = KErrNone;
+                }
+            else
+                {
+                ret = KErrGeneral;
+                }
+            }
+        else
+            {
+            ret = KErrNone;
+            }
+        }
+    else
+        {
+        ret = KErrArgument;
+        }
+
+    OstTrace1( TRACE_FLOW, DBTRACEOSTCATEGORYBITMAP_REMOVEGROUPID_EXIT,"< DBTraceOstCategoryBitmap::RemoveGroupId. Ret:%d", ret );
+    return ret;
+    }
+
+/**
+ * Read OST Protocol frame from OST protocol message.
+ * 
+ * @pre On entry to this methods writer mutex (iActivationWriteLock) must be held.
+ * 
+ * @param aMessage Received message
+ * @param aFrameStartIndex Start offset of the frame in message
+ * @return Offset after read frame
+ */
+TInt DBTraceOstCategoryBitmap::ReadOstProtocolFrame(const TDesC8& aMessage, TUint32 aFrameStartIndex)
+    {
+    OstTraceExt2( TRACE_FLOW, DBTRACEOSTCATEGORYBITMAP_READOSTPROTOCOLFRAME_ENTRY, "< DBTraceOstCategoryBitmap::ReadOstProtocolFrame. aMessage:%s, aFrameStartIndex:%u", aMessage,aFrameStartIndex );
+    
+    //__ASSERT_MUTEX(iActivationWriteLock);
+    TInt retPosition = 0;
+    TInt length = aMessage.Length();
+
+    TInt ostBaseHeaderSize = OstHeader::OstBaseProtocol::KOstBaseHeaderSize;
+    TInt applicationIdOffset = OstHeader::OstTraceActivation::SetApplicationStatusRequest::KApplicationIdOffset-ostBaseHeaderSize;
+    TInt activationStatusOffset = 
+                      OstHeader::OstTraceActivation::SetApplicationStatusRequest::KActivationStatusOffset-ostBaseHeaderSize;
+    
+    TInt groupIdOffset = OstHeader::OstTraceActivation::SetApplicationStatusRequest::KGroupIdOffset-ostBaseHeaderSize;
+    TInt activated = OstConstants::OstTraceActivation::ActivationStatus::KApplicationTracesActivated;
+    TInt deactivated = OstConstants::OstTraceActivation::ActivationStatus::KApplicationTracesDeactivated;
+
+    // Checks that buffer is large enough for the frame
+    if (length >= (activationStatusOffset +1 /*1==activatin status  size*/- ostBaseHeaderSize ))
+        {
+        const TUint8* frameStart = aMessage.Ptr() + aFrameStartIndex;
+        // Check if activation or deactivation
+        TUint8 activationStatus = *(frameStart + activationStatusOffset );
+
+        if ( (activationStatus == activated ) || (activationStatus == deactivated ))
+            {
+            // One frame may contain multiple group ID's. Each occupy 2 bytes
+            TUint32 numberOfGroups = (length-groupIdOffset)/2; // CodForChk_Dis_Magic
+
+            if ((length-groupIdOffset)%2!=0) // CodForChk_Dis_Magic
+                {
+                numberOfGroups--;
+                }
+            // One frame contains one component id
+            TUint32 applicationId = Read32(frameStart + applicationIdOffset);
+
+            // Swap byte order
+            applicationId = SWAP32( applicationId );
+            
+            CopyArray<TOstComponent>(iOstComponents, iTmpArray);
+            CleanupComponentsArray(*iChangedArray);
+            
+            TInt index(0); 
+            if (activationStatus == activated)
+                {
+                index = AddComponentId(applicationId, *iTmpArray);
+                }
+            else
+                {
+                index = FindComponentId(applicationId, *iTmpArray);
+                }
+
+            if (index >= 0)
+                {
+                // Updates the group ID's that have changed
+                retPosition = ReadOstProtocolFrameGroups(aMessage, aFrameStartIndex, activationStatus, index, applicationId, *iTmpArray, *iChangedArray);
+                aFrameStartIndex = retPosition;
+                }
+            else
+                {
+                OstTrace1( TRACE_INTERNAL, DBTRACEOSTCATEGORYBITMAP_READOSTFRAME_NOT_FOUND,"DBTraceOstCategoryBitmap::ReadOstFrame - Component ID not found: 0x%x", applicationId );
+                }
+            
+            //swap pointers and cleanup
+            SetNewComponentsArrayPtr(iTmpArray);
+           
+            //notify internal listeners and update internal activation cache
+            HandleTraceActivationChanges(*iChangedArray);
+            NotifyInternalActivation( EFalse, applicationId );
+            
+            }
+        }
+
+    OstTrace1( TRACE_FLOW, DBTRACEOSTCATEGORYBITMAP_READOSTFRAME_EXIT, "< DBTraceOstCategoryBitmap::ReadOstFrame. Ret:%d", retPosition );
+    return retPosition;
+    }
+
+/**
+ * Read the groups from an OST frame
+ * 
+ * @param aMessage Received message
+ * @param aFrameStartIndex Start offset of the frame in message
+ * @param aActivationInfo Activation / deactivation flag
+ * @param aComponentIndex The index of the component where the groups belong to
+ * @param aComponentId The component ID
+ * @param aOstComponents Array with TOstComponent objects.
+ * @param aChangedArray Array that will be updated to contain the changed TOstComponent objects
+ * @return Offset after read frame
+ */
+TInt DBTraceOstCategoryBitmap::ReadOstProtocolFrameGroups(const TDesC8& aMessage, TInt aFrameStartIndex, TUint8 aActivationInfo,
+        TInt aComponentIndex, TUint32 aComponentId, RArray<TOstComponent>& aOstComponents, RArray< TOstComponent >& aChangedArray)
+    {
+    OstTraceExt3( TRACE_FLOW, DBTRACEOSTCATEGORYBITMAP_READOSTPROTOCOLFRAMEGROUPS_ENTRY,"< DBTraceOstCategoryBitmap::ReadOstProtocolFrameGroups. aMessage:%s, aFrameStartIndex:%u, aActivationInfo:%u", aMessage,aFrameStartIndex, aActivationInfo );
+   
+    TInt length(aMessage.Length() );
+    TInt ostBaseHeaderSize = OstHeader::OstBaseProtocol::KOstBaseHeaderSize;
+    TInt groupIdOffset = OstHeader::OstTraceActivation::SetApplicationStatusRequest::KGroupIdOffset-ostBaseHeaderSize;
+    TInt activated = OstConstants::OstTraceActivation::ActivationStatus::KApplicationTracesActivated;
+    TInt deactivated = OstConstants::OstTraceActivation::ActivationStatus::KApplicationTracesDeactivated;
+
+    const TUint8* frameStart = aMessage.Ptr() + aFrameStartIndex;
+    
+    TInt offset = groupIdOffset;
+    TInt retPosition( 0);
+    
+    // One frame may contain multiple group ID's. Each occupy 2 bytes
+    TUint32 numberOfGroups = (length-groupIdOffset) / 2; // CodForChk_Dis_Magic
+    
+    if ((length-groupIdOffset) % 2 != 0) // CodForChk_Dis_Magic
+        {
+        numberOfGroups--;
+        }
+
+    TBool swapGroups = ETrue;
+    // This is supporting both byte orders
+    if (numberOfGroups > KMaxGroupId)
+        {
+        swapGroups = ETrue;
+        numberOfGroups = SWAP32( numberOfGroups );
+        }
+    
+    // Read Group ids and remove from array
+    for (TUint i = 0; i < numberOfGroups; i++)
+        {
+        TUint16 groupId = Read16(frameStart + offset);
+        if (swapGroups)
+            {
+            groupId = SWAP16( groupId );
+            }
+        offset += KGroupIdLength;
+        if (GroupIdIsValid(groupId)) 
+        	{
+			if (aActivationInfo == activated)
+				{
+				AddGroupId(aComponentId, groupId, aComponentIndex, aOstComponents, aChangedArray);
+				}
+			else
+				{
+				RemoveGroupId(aComponentId, groupId, aComponentIndex, aOstComponents, aChangedArray);
+				}
+        	}
+        else
+            {
+            // Notifies activation interfaces of invalid group ID
+            DTraceCore* traceCore = DTraceCore::GetInstance();
+            if ( traceCore != NULL )
+                {
+                traceCore->GetNotifier().TraceError( aComponentId, groupId, KErrArgument );
+                }
+            }
+        }
+    // If all groups were removed from the component, it can also be removed
+    if ( (aActivationInfo == deactivated ) && (aOstComponents[ aComponentIndex ].iGroups.Count() == 0 ))
+        {
+        RemoveComponentId(aComponentId, EFalse, aOstComponents, aChangedArray);
+        }
+    // The next frame offset is returned
+    retPosition = aFrameStartIndex + offset;
+        
+    OstTrace1( TRACE_FLOW, DBTRACEOSTCATEGORYBITMAP_READOSTPROTOCOLFRAMEGROUPS_EXIT,"< DBTraceOstCategoryBitmap::ReadOstFrameGroups. Ret:%d", retPosition );
+    return retPosition;
+    }
+
+/**
+ * Read OST frame from ISI message.
+ * 
+ * @pre On entry to this methods writer mutex (iActivationWriteLock) must be held.
+ * 
+ * @param aMessage Received message
+ * @param aFrameStartIndex Start offset of the frame in message
+ * @return Offset after read frame
+ */
+TInt DBTraceOstCategoryBitmap::ReadOstFrame(const TDesC8& aMessage, TUint32 aFrameStartIndex)
+    {
+    TInt retPosition = 0;
+    TUint length = aMessage.Length();
+    // Checks that buffer is large enough for the frame
+    if (length >= (aFrameStartIndex + KOstMinFrameLength ))
+        {
+        const TUint8* frameStart = aMessage.Ptr() + aFrameStartIndex;
+        // Check if activation or deactivation
+        TUint8 activationInfo = *(frameStart + KOstActivationInfoOffset );
+        
+        if ( (activationInfo == SOS_MON_TRACECORE_OST_DEACTIVATE ) || (activationInfo == SOS_MON_TRACECORE_OST_ACTIVATE )
+                || (activationInfo == SOS_MON_TRACECORE_OST_OVERWRITE ))
+            {
+            // One frame may contain multiple group ID's. Each occupy 2 bytes
+            (void) Read32(frameStart + KOstNumberOfGroupsOffset); // This is the numberOfGroups
+            // One frame contains one component id
+            TUint32 componentId = Read32(frameStart + KOstComponentIdOffset);
+            // Component Id in message is in Big Endian format so it need to be swap to Little Endian format
+            componentId = SWAP32( componentId );
+
+            CopyArray<TOstComponent>(iOstComponents, iTmpArray);
+            CleanupComponentsArray(*iChangedArray);
+            
+            TInt index( 0);
+            if ( (activationInfo == SOS_MON_TRACECORE_OST_ACTIVATE ) || (activationInfo == SOS_MON_TRACECORE_OST_OVERWRITE ))
+                {
+                index = AddComponentId(componentId, *iTmpArray);
+                }
+            else
+                {
+                index = FindComponentId(componentId, *iTmpArray);
+                }
+            if (index >= 0)
+                {
+                // Updates the group ID's that have changed
+                retPosition = ReadOstFrameGroups(aMessage, aFrameStartIndex, activationInfo, index, componentId, *iTmpArray, *iChangedArray);
+                }
+            
+            //swap pointers and cleanup
+            SetNewComponentsArrayPtr(iTmpArray);
+            
+            //notify internal listeners and update internal activation cache
+            HandleTraceActivationChanges(*iChangedArray);
+            NotifyInternalActivation( EFalse, componentId );
+            }
+        else
+            if (activationInfo == SOS_MON_TRACECORE_OST_DEACTIVATE_ALL)
+                {
+                // Deactivate all groups from component
+                TUint32 componentId = Read32(frameStart + KOstComponentIdOffset);
+                // Component Id in message is in Big Endian format so it need to be swap to Little Endian format
+                componentId = SWAP32( componentId );
+                
+                CopyArray<TOstComponent>(iOstComponents, iTmpArray);
+                CleanupComponentsArray(*iChangedArray);
+                RemoveComponentId(componentId, ETrue, *iTmpArray, *iChangedArray);
+                SetNewComponentsArrayPtr(iTmpArray);
+                
+                //notify internal listeners and update internal activation cache
+                HandleTraceActivationChanges(*iChangedArray);
+                NotifyInternalActivation( EFalse, componentId );
+                }
+        }
+
+    OstTrace1( TRACE_FLOW, DBTRACEOSTCATEGORYBITMAP_READOSTFRAME_EXIT_,"< DBTraceOstCategoryBitmap::ReadOstFrame position:%d", retPosition );
+    return retPosition;
+    }
+
+/**
+ * Read the groups from an OST frame
+ * 
+ * @param aMessage Received message
+ * @param aFrameStartIndex Start offset of the frame in message
+ * @param aActivationInfo Activation / deactivation flag
+ * @param aComponentIndex The index of the component where the groups belong to
+ * @param aComponentId The component ID
+ * @param aOstComponents Array with TOstComponent objects.
+ * @param aChangedArray Array with changed TOstComponent objects. 
+ * @return Offset after read frame
+ */
+TInt DBTraceOstCategoryBitmap::ReadOstFrameGroups(const TDesC8& aMessage, TInt aFrameStartIndex, TUint8 aActivationInfo,
+        TInt aComponentIndex, TUint32 aComponentId, RArray<TOstComponent>& aOstComponents, RArray< TOstComponent >& aChangedArray)
+    {
+    OstTraceExt2( TRACE_FLOW, DBTRACEOSTCATEGORYBITMAP_READOSTFRAMEGROUPS_ENTRY,"> DBTraceOstCategoryBitmap::ReadOstFrameGroups startIdx:%d componentIdx:%d", aFrameStartIndex, aComponentIndex );
+    
+    const TUint8* frameStart = aMessage.Ptr() + aFrameStartIndex;
+    TUint frameLen(aMessage.Length() - aFrameStartIndex);
+    TUint offset = KOstGroupIdOffset;
+    TInt retPosition( 0);
+    // One frame may contain multiple group ID's. Each occupy 2 bytes
+    TUint32 numberOfGroups = Read32(frameStart + KOstNumberOfGroupsOffset);
+
+    TUint i = 0;
+
+    // Number of groups in message is in Big Endian format so it need to be swap to Little Endian format
+    numberOfGroups = SWAP32( numberOfGroups );
+
+    if (frameLen >= (offset + numberOfGroups * KGroupIdLength ))
+        {
+        if (aActivationInfo == SOS_MON_TRACECORE_OST_OVERWRITE)
+            {
+            offset = OverwriteGroups(frameStart, aComponentIndex, aComponentId, numberOfGroups, aOstComponents, aChangedArray);
+            }
+        else
+            if (aActivationInfo == SOS_MON_TRACECORE_OST_DEACTIVATE || aActivationInfo == SOS_MON_TRACECORE_OST_ACTIVATE)
+                {
+                // Read Group ids and remove from array
+                for (i = 0; i < numberOfGroups; i++)
+                    {
+                    TUint16 groupId = Read16(frameStart + offset);
+                    // Group Id in message is in Big Endian format so it need to be swap to Little Endian format
+                    groupId = SWAP16( groupId );
+
+                    offset += KGroupIdLength;
+                    if (GroupIdIsValid(groupId)) 
+                    	{
+                        if (aActivationInfo == SOS_MON_TRACECORE_OST_ACTIVATE)
+                            {
+                            AddGroupId(aComponentId, groupId, aComponentIndex, aOstComponents, aChangedArray);
+                            }
+                        else
+                            {
+                            RemoveGroupId(aComponentId, groupId, aComponentIndex, aOstComponents, aChangedArray);
+                            }
+                    	}
+                    else
+                        {
+			            // Notifies activation interfaces of invalid group ID
+			            DTraceCore* traceCore = DTraceCore::GetInstance();
+			            if ( traceCore != NULL )
+			                {
+			                traceCore->GetNotifier().TraceError( aComponentId, groupId, KErrArgument );
+			                }
+                        }
+                    }
+                }
+            else
+                {
+                OstTrace1( TRACE_IMPORTANT , DBTRACEOSTCATEGORYBITMAP_READOSTFRAMEGROUPS__,"DBTraceOstCategoryBitmap::ReadOstFrameGroups - Unknow activation type %d", aActivationInfo);
+                }
+
+        // If all groups were removed from the component, it can also be removed
+        if ( ( (aActivationInfo == SOS_MON_TRACECORE_OST_DEACTIVATE ) || (aActivationInfo == SOS_MON_TRACECORE_OST_OVERWRITE ) )
+                && (aOstComponents[ aComponentIndex ].iGroups.Count() == 0 ))
+            {
+            RemoveComponentId(aComponentId, EFalse, aOstComponents, aChangedArray);
+            }
+        // The next frame offset is returned
+        retPosition = aFrameStartIndex + offset;
+        }
+    else
+        {
+        OstTraceExt2( TRACE_IMPORTANT , DBTRACEOSTCATEGORYBITMAP_READOSTFRAME_TOO_SHORT_FRAME,"DBTraceOstCategoryBitmap::ReadOstFrame - Too short frame nrOfGroups:%u len:%d",numberOfGroups, (TInt32)frameLen );
+        }
+    OstTrace1( TRACE_FLOW, DBTRACEOSTCATEGORYBITMAP_READOSTFRAMEGROUPS_EXIT_,"< DBTraceOstCategoryBitmap::ReadOstFrameGroups position:%d", retPosition );
+    return retPosition;
+    }
+
+/**
+ * Callback when a trace activation message is received
+ *
+ * @param aMsg Reference to message
+ */
+void DBTraceOstCategoryBitmap::MessageReceived(TTraceMessage &aMsg)
+    {
+    TInt len(aMsg.iData->Length() );
+    
+    // Message header is in proprietary format
+    if (aMsg.iMsgFormat == EMessageHeaderFormatProprietary)
+        {
+        
+        // Check that message length is big enough 
+        if (len >= KOstMinFrameLength)
+            {
+            // Get OST message ID
+            TUint8 ostMessageId = *(aMsg.iData->Ptr() + KOstMessageIdOffset );
+            switch (ostMessageId)
+                {
+                case SOS_MON_TRACECORE_OST_ACTIVATION:
+                    {
+                    TInt nextFrameStart( 0);
+                    TInt lastFrameStart( -1);
+                    
+                    // Go through OST frames
+                    while (lastFrameStart < nextFrameStart)
+                        {
+                        lastFrameStart = nextFrameStart;
+                        nextFrameStart = ReadOstFrame( *aMsg.iData, nextFrameStart);
+                        }
+                    break;
+                    }
+                case SOS_MON_TRACECORE_OST_ACTIVATION_QUERY:
+                    {
+                    OstTrace0( TRACE_NORMAL, DBTRACEOSTCATEGORYBITMAP_MESSAGERECEIVED_ACTIVATION_QUERY_NOT_IMPLEMENTED,"DBTraceOstCategoryBitmap::MessageReceived - Activation query not implemented");
+                    break;
+                    }
+                default:
+                    {
+                    OstTrace1( TRACE_IMPORTANT , DBTRACEOSTCATEGORYBITMAP_MESSAGERECEIVED_INVALID_MESSAGE_ID,"DBTraceOstCategoryBitmap::MessageReceived - Invalid message ID - %d", ostMessageId);
+                    break;
+                    }
+                }
+            }
+        }
+    
+    // Message header is in OST format
+    else
+        if (aMsg.iMsgFormat == EMessageHeaderFormatOst)
+            {
+            OstProtocolMessage(aMsg);
+            }
+    }
+
+/**
+ * Ost Protocol Message handler
+ *
+ * @param aMessage The message
+ */
+void DBTraceOstCategoryBitmap::OstProtocolMessage(TTraceMessage &aMsg)
+    {
+    if ((*aMsg.iData)[OstHeader::OstTraceActivation::KOstHeaderMessageIdOffset-OstHeader::OstBaseProtocol::KOstBaseHeaderSize]
+            == OstConstants::OstTraceActivation::KSetApplicationStatusRequest)
+        {
+        ReadOstProtocolFrame( *aMsg.iData, 0);
+        
+        // Send KSetApplicationResponse
+        TBuf8<256> responseMessageHeader; // CodForChk_Dis_Magic
+        responseMessageHeader.Append(OstConstants::KOstHeaderVersion);
+        responseMessageHeader.Append(OstConstants::OstBaseProtocol::KOstTraceActivationProtocol); // 
+        responseMessageHeader.Append( 0); // Data size MSB
+        responseMessageHeader.Append( 4); // Data size LSB // CodForChk_Dis_Magic
+
+        TBuf8<256> responseMessageData; // CodForChk_Dis_Magic
+        TInt headerSize =
+             OstHeader::OstTraceActivation::KOstHeaderTransactionIdOffset-OstHeader::OstBaseProtocol::KOstBaseHeaderSize;
+        responseMessageData.Append((*aMsg.iData)[headerSize]);
+        responseMessageData.Append(OstConstants::OstTraceActivation::KSetApplicationStatusResponse);
+        responseMessageData.Append( 0x00); // Response request succeded TODO add constant to header
+        responseMessageData.Append( 0x00); // Filler
+
+        // Create TraceMessage
+        TTraceMessage msg;
+        msg.iMsgFormat = EMessageHeaderFormatOst;
+        msg.iHeader = &responseMessageHeader;
+        msg.iData = &responseMessageData;
+        msg.iMessageId = OstConstants::OstTraceActivation::KSetApplicationStatusResponse;
+        DTraceCoreActivationBase::SendResponse(msg);
+        }
+    }
+
+/**
+ * Overwite trace groups
+ *
+ * @param aComponentIndex The index of the component where the groups belong to
+ * @param aComponentId The component ID
+ * @param numberOfGroups Number of groups in overwrite message
+ * @param aOstComponents Array with TOstComponent objects.
+ * @param aChangedArray Array with changed TOstComponent objects.
+ * @return Offset after read frame
+ */
+TInt DBTraceOstCategoryBitmap::OverwriteGroups(const TUint8* aFrameStart, TInt aComponentIndex, TUint32 aComponentId,
+        TUint32 numberOfGroups, RArray<TOstComponent>& aOstComponents, RArray< TOstComponent >& aChangedArray)
+    {
+    OstTraceExt3( TRACE_FLOW, DBTRACEOSTCATEGORYBITMAP_OVERWRITEGROUPS_ENTRY,"> DBTraceOstCategoryBitmap::OverwriteGroups. ComponentIdx:%d CID:0x%x NoOfGroups:%u",(TInt)aComponentIndex, (TUint)aComponentId , (TUint)numberOfGroups );
+    RArray<TUint> groupsInMessage;
+    TInt ret = 0;
+    TUint i = 0;
+    TUint offset = KOstGroupIdOffset;
+
+    // Read Group ids and remove from array
+    for (i = 0; i < numberOfGroups; i++)
+        {
+        TUint16 groupId = Read16(aFrameStart + offset);
+        // Group Id in message is in Big Endian format so it need to be swap to Little Endian format
+        groupId = SWAP16( groupId );
+
+        offset += KGroupIdLength;
+
+        ret = groupsInMessage.InsertInOrder(groupId);
+        }
+
+    
+    TUint numberOfGroupsInComponent = aOstComponents[ aComponentIndex ].iGroups.Count();
+    TUint numberOfRemovedGroups = 0;
+
+    // First remove those groups that are not any more activated
+    for (i = 0; i < numberOfGroupsInComponent; i++)
+        {
+
+        ret = groupsInMessage.FindInOrder(aOstComponents[ aComponentIndex ].iGroups[ i - numberOfRemovedGroups ]);
+
+        if (ret == KErrNotFound)
+            {
+            RemoveGroupId(aComponentId, aOstComponents[ aComponentIndex ].iGroups[ i - numberOfRemovedGroups ], aComponentIndex,
+                    aOstComponents, aChangedArray);
+            numberOfRemovedGroups++;
+            }
+        }
+
+    // Add groups that are not already added   
+    numberOfGroups = groupsInMessage.Count();
+    for (i = 0; i < numberOfGroups; i++)
+        {
+        ret = aOstComponents[ aComponentIndex ].iGroups.FindInOrder(groupsInMessage[ i ]);
+
+        if (ret == KErrNotFound)
+            {
+            if (GroupIdIsValid(groupsInMessage[ i ]))
+                {
+            
+                AddGroupId(aComponentId, groupsInMessage[ i ], aComponentIndex, aOstComponents, aChangedArray);
+                }
+            else
+                {
+                OstTrace1( TRACE_ERROR, DBTRACEOSTCATEGORYBITMAP_OVERWRITEGROUPS_ERROR, "DBTraceOstCategoryBitmap::OverwriteGroups - Invalid group ID: 0x%x", groupsInMessage[ i ] );
+                // Notifies activation interfaces of invalid group ID
+                DTraceCore* traceCore = DTraceCore::GetInstance();
+                if ( traceCore != NULL )
+                    {
+                    traceCore->GetNotifier().TraceError( aComponentId, groupsInMessage[ i ], KErrArgument );
+                    }
+                }            
+            }
+        }
+
+	groupsInMessage.Close();
+    OstTraceExt2( TRACE_FLOW, DBTRACEOSTCATEGORYBITMAP_OVERWRITEGROUPS_EXIT,"< DBTraceOstCategoryBitmap::OverwriteGroups. Offset:%u, ret:%d", offset, ret );
+    return offset;
+
+    }
+
+/**
+ * Checks if a component ID is supported by this activation object
+ * 
+ * @param aComponentID the component ID to be checked
+ * @return ETrue if supported, EFalse if not
+ */
+TBool DBTraceOstCategoryBitmap::IsComponentSupported(TUint32 /*aComponentID*/)
+    {
+    // All components are supported
+    return ETrue;
+    }
+
+/**
+ * Allocates memory for activation buffer
+ *
+ * @return KErrNone if allocation succesfull otherwise KErrNoMemory
+ */
+TInt DBTraceOstCategoryBitmap::AllocateActivationBuffer()
+	{  
+    TInt ret = KErrNone;
+    iActivationBuffer = ( TUint8* )Kern::Alloc( KMaxActivationBufferLength );
+    if ( iActivationBuffer == NULL )
+        {
+        ret = KErrNoMemory;
+        }
+    return ret;
+	}
+
+/**
+  * Read and write helper functions for activation buffer
+  */
+TUint32 DBTraceOstCategoryBitmap::Read32FromBuffer(TUint8*& aPtr)
+	{
+	TUint32 ret = 0;
+	if ( aPtr >= iActivationBuffer 
+		&& aPtr < iActivationBuffer+KMaxActivationBufferLength-K4Bytes)
+		{
+		ret = Read32(aPtr);
+		aPtr += K4Bytes;
+		}
+	return ret;
+	}
+
+TUint16 DBTraceOstCategoryBitmap::Read16FromBuffer(TUint8*& aPtr)
+	{
+	TUint16 ret = 0;
+	if ( aPtr >= iActivationBuffer 
+		&& aPtr < iActivationBuffer+KMaxActivationBufferLength-K2Bytes)
+		{
+		ret = Read16(aPtr);
+		aPtr += K2Bytes;
+		}
+	return ret;
+	}
+
+void DBTraceOstCategoryBitmap::WriteToBuffer(TUint8*& aPtr, TUint32 aData32)
+	{
+	if ( aPtr >= iActivationBuffer 
+		&& aPtr < iActivationBuffer+KMaxActivationBufferLength-K4Bytes)
+		{
+		*aPtr++ = aData32 & K8BitMask;
+		*aPtr++ = (aData32 >> K8BitShift) & K8BitMask;
+		*aPtr++ = (aData32 >> K16BitShift) & K8BitMask;
+		*aPtr++ = (aData32 >> K24BitShift) & K8BitMask;
+		}
+	}
+
+void DBTraceOstCategoryBitmap::WriteToBuffer(TUint8*& aPtr, TUint16 aData16)
+	{
+	if ( aPtr >= iActivationBuffer 
+		&& aPtr < iActivationBuffer+KMaxActivationBufferLength-K2Bytes)
+		{
+		*aPtr++ = aData16 & K8BitMask;
+		*aPtr++ = (aData16 >> K8BitShift) & K8BitMask;
+		}
+	}
+
+/**
+ * Handles trace activation changes
+ * 
+ * @pre On entry to this method writer mutex (iActivationWriteLock) must be help.
+ * @param aChangedArray Array with changed TOstComponent objects. 
+ */
+void DBTraceOstCategoryBitmap::HandleTraceActivationChanges(RArray< TOstComponent >& aChangedArray)
+    {
+    TC_TRACE( ETraceLevelFlow, Kern::Printf("Activated components count: %d", iOstComponents->Count()));
+    *(iBTraceOstCategoryHandler->iCacheItem1) = 0;
+    *(iBTraceOstCategoryHandler->iCacheItem2) = 0;
+    *(iBTraceOstCategoryHandler->iCacheItem3) = 0;
+    *(iBTraceOstCategoryHandler->iCacheItem4) = 0;
+    
+    TInt count = iOstComponents->Count();
+    // No traces activated, use Dummy handler    
+    if (count == 0)
+        {
+        iBTraceOstCategoryHandler->iAllTracesDeactivated = ETrue;
+        BTrace::SetHandler(DummyBTraceHandler);
+        TC_TRACE( ETraceLevelFlow, Kern::Printf("Dummy trace handler in use 1"));
+        }
+        
+    // Check if only printf traces are activated
+    else if (count == 1 && (*iOstComponents)[0].iComponentId == KKernelHooksOSTComponentUID)
+        {
+        	
+        // Check if there are other groups than printfs activated
+        RArray< TUint > groups = (*iOstComponents)[0].iGroups;
+        TInt groupcount = groups.Count();
+        TBool onlyPrintfs = ETrue;
+        for ( TInt i = 0; i < groupcount; ++i )
+            {
+            if (groups[i] > BTrace::EPlatsecPrintf)
+            	{
+            		onlyPrintfs = EFalse;
+            		break;
+            	}
+            }
+            
+        // If there are only printfs, keep using Dummy handler
+        if (onlyPrintfs)
+            {
+            iBTraceOstCategoryHandler->iAllTracesDeactivated = ETrue;
+            BTrace::SetHandler(DummyBTraceHandler);
+            TC_TRACE( ETraceLevelFlow, Kern::Printf("Dummy trace handler in use 2"));
+            }
+            
+        // Something else than printfs activated, use normal handler
+        else
+            {
+            iBTraceOstCategoryHandler->iAllTracesDeactivated = EFalse;
+            BTrace::SetHandler(oldHandler);
+            TC_TRACE( ETraceLevelFlow, Kern::Printf("Normal trace handler in use 1"));
+            }
+        }
+        
+    // More than 1 component activated, use normal handler
+    else
+        {
+        iBTraceOstCategoryHandler->iAllTracesDeactivated = EFalse;
+        BTrace::SetHandler(oldHandler);
+        TC_TRACE( ETraceLevelFlow, Kern::Printf("Normal trace handler in use 2"));
+        }
+    
+    
+    // Notify listeners about the changed groups
+    DTraceCore* traceCore = DTraceCore::GetInstance();
+    if ( traceCore != NULL )
+        {
+        count = aChangedArray.Count();
+        for (TInt i = 0; i < count; i++)
+            {
+            TUint32 componentId = aChangedArray[i].iComponentId;
+            RArray< TUint > groups = aChangedArray[i].iGroups;
+            TInt groupCount = groups.Count();
+            for (TInt j=0;j < groupCount;j++)
+                {
+                TUint32 group = groups[j];
+    
+                // Shift to be able to use IsTraceActivated function
+                if (IsTraceActivated(componentId, group << GRP_SHIFT))
+                    {
+                    traceCore->GetNotifier().TraceActivated(componentId, group);
+                    }
+                else
+                    {
+                    traceCore->GetNotifier().TraceDeactivated(componentId, group);
+                    }
+                }
+            }
+        }
+    }
+
+/**
+ * Gets activated groups for this component ID
+ * @param aComponentId the component ID
+ */
+RArray< TUint > DBTraceOstCategoryBitmap::GetActivatedGroups( const TUint32 aComponentId )
+    {
+    RArray< TUint > groups;
+    // Check index of component id in array
+    TInt index = FindComponentId(aComponentId, *iOstComponents);
+    if (index >= 0)
+        {
+        // Component id found, get groups
+        groups = (*iOstComponents)[ index ].iGroups;
+        }
+    return groups;
+    }
+
+/**
+ * Adds a group to array of changed activation groups
+ * @param aChangedArray Array with changed TOstComponent objects
+ * @param aComponentId Component ID
+ * @param aGroupId Group ID
+ */
+void DBTraceOstCategoryBitmap::AddGroupToChangedArray(RArray< TOstComponent >& aChangedArray, TUint32 aComponentId, TGroupId aGroupId)
+    {
+    TOstComponent newComponent;
+    newComponent.iComponentId = aComponentId;
+    aChangedArray.InsertInUnsignedKeyOrder(newComponent);
+    TInt changedIndex = FindComponentId(aComponentId, aChangedArray);
+    if(changedIndex != KErrNotFound)
+        aChangedArray[ changedIndex ].iGroups.InsertInOrder(aGroupId);
+    }
+
+/**
+* Utility method to copy data between two RArray objects.
+*/
+template <class T>
+void DBTraceOstCategoryBitmap::CopyArray(RArray<T>* aSrc, RArray<T>* aDst)
+    {
+    aDst->Reset();
+    TInt c = aSrc->Count();
+    for(TInt i=0; i<c; ++i)
+        aDst->Append( (*aSrc)[i] );
+    }
+
+
+//TODO: use this doxygen comment instead of old one
+//TODO: don't pass any args as swap occurs only between iOstComponents and tmpArray
+/**
+ * Sets new pointer for array with activated components.
+ * This operation is protected by spin lock on SMP systems.
+ * 
+ * @param aNewPtr Pointer to new array containing TOstComponent objects.
+ */
+void DBTraceOstCategoryBitmap::SetNewComponentsArrayPtr(RArray<TOstComponent>*& aNewPtr)
+    {
+    TInt irq = ReadLock();
+    RArray<TOstComponent>* tmpPtr = iOstComponents;
+    iOstComponents = aNewPtr;
+    aNewPtr = tmpPtr;
+    ReadUnlock(irq);
+    }
+
+/**
+ * Internal method to destroy array used to store activated components.
+ */
+void DBTraceOstCategoryBitmap::CleanupComponentsArray(RArray< TOstComponent >& aComponentArray)
+    {
+    TInt componentCount = aComponentArray.Count();
+    for (TInt i=0; i<componentCount; i++)
+        {
+        aComponentArray[i].iGroups.Reset();
+        }
+    aComponentArray.Reset();
+    }
+
+/**
+ * Internal method to destroy arrays used to store activated components.
+ */
+void DBTraceOstCategoryBitmap::CleanupComponentsArrays()
+    {
+    if(iOstComponents)
+        {
+        CleanupComponentsArray(*iOstComponents);
+        iOstComponents->Close();
+        Kern::Free(iOstComponents);
+        iOstComponents = NULL;
+        }
+        
+    if(iTmpArray)
+        {
+        CleanupComponentsArray(*iTmpArray);
+        iTmpArray->Close();
+        Kern::Free(iTmpArray);
+        iTmpArray = NULL;
+        }
+    
+    if (iChangedArray)
+        {
+        CleanupComponentsArray(*iChangedArray);
+        iChangedArray->Close();
+        Kern::Free(iChangedArray);
+        iChangedArray = NULL;
+        }
+    }
+    
+/**
+ * Reactivate all currently activated traces
+ *
+ * @return KErrNone if refresh successful
+ */
+TInt DBTraceOstCategoryBitmap::RefreshActivations()
+    {
+    RArray< TOstComponent >* tmpArray = new RArray<TOstComponent>(KOstComponentsArrayGranularity);
+    if(!tmpArray)
+        return KErrNoMemory;
+
+    CopyArray<TOstComponent>(iOstComponents, tmpArray);
+    // Go through all components in array and refresh activations for each
+    TInt componentCount = tmpArray->Count();
+    for (TInt i=0; i<componentCount; i++)
+        {
+        TUint32 componentId = (*tmpArray)[ i ].iComponentId;
+        RArray< TUint > groups = (*tmpArray)[ i ].iGroups;
+        // Go through all groups for this component and refresh activations for each
+        TInt groupCount = groups.Count();
+        for (TInt j=0; j<groupCount; j++)
+            {
+            TUint groupId = groups[ j ];
+            // Don't refresh EMetaTrace as this messes up the meta traces outputted
+            if (componentId != KKernelHooksOSTComponentUID || groupId != BTrace::EMetaTrace)
+                {
+                DeactivateTrace(componentId, groupId);
+                ActivateTrace(componentId, groupId);
+                }
+            }
+        }
+    tmpArray->Close();
+    Kern::Free(tmpArray);
+    return KErrNone;
+    }
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/src/BTraceOstCategoryHandler.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,671 @@
+// 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 "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:
+//
+// Description:
+// Trace Core 
+//
+
+#include "TraceCore.h"
+#include "BTraceOstCategoryHandler.h"
+#include "BTraceOstCategoryBitmap.h"
+#include "TraceCoreWriter.h"
+#include "TraceCoreDebug.h"
+#include "TraceCoreConstants.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "BTraceOstCategoryHandlerTraces.h"
+#endif
+
+#ifndef __SMP__
+/**
+ * Length of Trace group ID + Trace ID in the MultiPart traces data part
+ */
+const TUint KTraceGroupIdLen = 4;
+
+/**
+ * Length of BTrace header
+ */
+const TUint KBTraceHeaderLen = 4;
+
+/**
+ * Length of single BTrace variable
+ */
+const TUint KBTraceVariableLen = 4;
+
+/**
+ * Four bytes
+ */
+const TUint KFourBytes = 4;
+
+#endif // !__SMP__
+/**
+ * Group value in GroupId
+ */
+const TUint32 KGroupMask = 0xffff0000;
+
+
+/**
+ * Constructor
+ */
+DBTraceOstCategoryHandler::DBTraceOstCategoryHandler()
+: iAllTracesDeactivated( ETrue )
+, iCacheItem1( iComponentGroupCache )   // One "cache" item contains ComponentId, groupId, and activation info (3*32bit)
+, iCacheItem2( iComponentGroupCache+3 ) //CodForChk_Dis_Magic
+, iCacheItem3( iComponentGroupCache+6 ) //CodForChk_Dis_Magic
+, iCacheItem4( iComponentGroupCache+9 ) //CodForChk_Dis_Magic
+, iOstTraceBitmap( NULL )
+    {
+    }
+
+
+/**
+ * Destructor
+ */
+DBTraceOstCategoryHandler::~DBTraceOstCategoryHandler()
+    {
+	// Delete trace bitmap
+	delete iOstTraceBitmap;
+    }
+
+
+/**
+ * Initializes this handler
+ *
+ * @param aHandler The BTrace handler
+ */
+TInt DBTraceOstCategoryHandler::Init()
+    {    
+    TInt ret = KErrNone;
+
+#ifdef __SMP__	    
+    for( TInt i = 0; i<MAX_MULTIPART_TRACES; i++ )
+        {
+        iMultipartArray[i].iMultiPartId = 0xffffffff;
+        iFreeList[i] = 1; // Set Free
+        }
+#endif // __SMP__
+    
+    for (TUint category = KMaxKernelCategory + 1; category <= KMaxCategory; category++)
+    	{
+    	if (category != KCategoryNokiaBranchCoverage) // Is this exception needed? 
+    		{
+    		ret = AddCategory( category );
+        	if (ret != KErrNone)
+        		{
+        		break;
+        		}
+    		}
+    	}
+    
+    if (ret == KErrNone)
+    	{    
+		iOstTraceBitmap = new DBTraceOstCategoryBitmap( this );	
+		if ( iOstTraceBitmap != NULL )
+			{
+			// Initialize TraceBitmap
+			ret = iOstTraceBitmap->Init();
+			if ( ret == KErrNone )
+				{
+				ret = iOstTraceBitmap->RegisterActivationNotification( *this );
+				if ( ret == KErrNone )
+					{
+	                ret = Register();
+	                if ( ret == KErrNone )
+	                    {
+	                    TC_TRACE( ETraceLevelNormal, Kern::Printf( 
+	                            "DBTraceAutogenCategoryHandler::Init - Register OK" ) );
+	                    }
+	                // Register failed
+	                else
+						{
+						ret = KErrGeneral;
+						}
+					}
+				// RegisterActivationNotification failed
+				else
+					{
+					ret = KErrGeneral;
+					}
+				}
+			}
+		// Memory allocation failed
+		else
+			{
+			TC_TRACE( ETraceLevelError, Kern::Printf( "DBTraceOstCategoryHandler::Init - Memory allocation failed" ) );
+			ret = KErrNoMemory;
+			}
+    	}
+    TC_TRACE( ETraceLevelError, Kern::Printf( "<DBTraceOstCategoryHandler::Init() - %d", ret ) );  
+    return ret;
+    }
+    
+/**
+ * Set settings
+ * 
+ * @param aSettings Settings
+ */
+void DBTraceOstCategoryHandler::SetSettings( DTraceCoreSettings* aSettings )
+	{
+    OstTrace1( TRACE_FLOW, DBTRACEOSTCATEGORYHANDLER_SETSETTINGS_ENTRY, "> DBTraceOstCategoryHandler::SetSettings 0x%x", ( TUint )( aSettings ) );
+    DBTraceCategoryHandler::SetSettings( aSettings );
+    if ( iOstTraceBitmap != NULL && aSettings != NULL )
+        {
+        // Reads the bitmap configuration from settings
+        iOstTraceBitmap->ReadFromSettings( *aSettings );
+        }
+	}
+
+/**
+ * Notification that the activation state has changed.
+ * 
+ * @param aActivation the activation interface that was updated
+ * @param aFromSettings ETrue if activation was due to settings read, EFalse if from some other source
+ * @param aComponentId Component ID of the activation
+ */
+void DBTraceOstCategoryHandler::ActivationChanged( MTraceCoreActivation& aActivation, TBool aFromSettings,
+        TUint32 /*aComponentId*/)
+    {
+    OstTrace1( TRACE_FLOW, DBTRACEOSTCATEGORYHANDLER_ACTIVATIONCHANGED_ENTRY, "> DBTraceOstCategoryHandler::ActivationChanged 0x%x", ( TUint )&( aActivation ) );
+    
+    // Call the bitmap to write changes to settings saver
+    if ( !aFromSettings )
+        {
+        if ( iSettings != NULL )
+            {
+            aActivation.WriteToSettings( *iSettings );
+            }
+        }
+    }
+
+/**
+ * Handler for KCategoryNokiaOst
+ *
+ * @param aHeader BTrace header
+ * @param aHeader2 Extra header data
+ * @param aContext The thread context in which this function was called
+ * @param a1 The first trace parameter
+ * @param a2 The second trace parameter
+ * @param a3 The third trace parameter
+ * @param aExtra Extra trace data
+ * @param aPc The program counter value
+ * @return ETrue if trace was processed, EFalse if not
+ */
+TBool DBTraceOstCategoryHandler::HandleFrame( TUint32 aHeader, TUint32 aHeader2, const TUint32 aContext, 
+                                              const TUint32 a1, const TUint32 a2, const TUint32 a3, 
+                                              const TUint32 aExtra, const TUint32 aPc )
+    {
+    TBool retval(EFalse);
+    if ( iWriter != NULL && !iAllTracesDeactivated )
+        {
+        __ASSERT_DEBUG( iOstTraceBitmap != NULL, 
+                Kern::Fault( "DBTraceOstCategoryHandler::HandleFrame - NULL", KErrGeneral ) );
+        
+        // Check if tracing is certified
+        DTraceCore* tracecore = DTraceCore::GetInstance();
+        if (!tracecore || !tracecore->IsTraceCertified())
+            {
+            return EFalse;
+            }
+        
+        // Check if the trace is a multipart trace
+        TBool isMultiPart = CheckMultiPart(aHeader, aHeader2);
+        
+        if (isMultiPart)
+            {
+		
+#ifdef __SMP__
+            // Handle the multipart trace
+            retval = HandleMultiPart(aHeader, aHeader2, aContext, a1, a2, a3, aExtra, aPc);
+#else
+            // Handle the multipart trace. Returns EFalse if trace is not activated.
+            TBool isActivatedMultiPart = HandleMultiPart(aHeader, aHeader2, aContext, a1, a2, a3, aExtra, aPc);
+            if (isActivatedMultiPart)
+                {
+                retval = ETrue;    
+                }
+            else
+                {
+                retval = EFalse;
+                }
+#endif // __SMP__
+
+            }
+        // Not a multipart trace
+        else
+            {
+        
+            // Take group and leave trace id away
+            TUint32 group = a2 & KGroupMask;
+
+            if ((*iCacheItem1) == a1 && (*(iCacheItem1 + 1)) == group)
+                {
+                retval = *(iCacheItem1 + 2); //CodForChk_Dis_Magic
+                }
+            else if ((*iCacheItem2) == a1 && (*(iCacheItem2 + 1)) == group)
+                {
+                retval = *(iCacheItem2 + 2); //CodForChk_Dis_Magic
+                }
+            else if ((*iCacheItem3) == a1 && (*(iCacheItem3 + 1)) == group)
+                {
+                retval = *(iCacheItem3 + 2); //CodForChk_Dis_Magic
+                }
+            else if ((*iCacheItem4) == a1 && (*(iCacheItem4 + 1)) == group)
+                {
+                retval = *(iCacheItem4 + 2); //CodForChk_Dis_Magic
+                }
+            else
+                {
+                retval = iOstTraceBitmap->IsTraceActivated(a1, a2);
+
+                iTemp = iCacheItem1;
+                iCacheItem1 = iCacheItem4;
+                iCacheItem4 = iCacheItem3;
+                iCacheItem3 = iCacheItem2;
+                iCacheItem2 = iTemp;
+                *iCacheItem1 = a1;
+                *(iCacheItem1 + 1) = group;
+                *(iCacheItem1 + 2) = retval;
+
+                }
+                
+            if ( ( ( aHeader >> ( BTrace::ESubCategoryIndex * KByteSize ) ) & KByteMask ) == EOstTraceActivationQuery )
+                {
+                //Trace from here is not allowed
+                }
+            else if ( retval )
+                {                
+                CheckDroppedTrace( aHeader ); // Update header if there is a dropped trace
+                TUint8 recordSize = static_cast< TUint8 >( ( aHeader >> ( BTrace::ESizeIndex * KByteSize ) ) & KByteMask );
+                iWriter->WriteTraceCoreFrame( a1, a2, aHeader, aHeader2, aContext, a1, a2, a3, aExtra, aPc, recordSize );
+                }
+            }
+        }
+    else
+        {        
+        if( iWriter == NULL )
+            {
+            //Trace from here is not allowed
+            retval = EFalse;
+            }
+            
+        }
+
+    //Trace from here is not allowed
+    return retval;
+    }
+   
+/**
+ * Checks if the given trace is a Multipart trace
+ *
+ * @param aHeader Header data
+ * @param aHeader2 Extra header data
+ * @return ETrue if trace is a Multipart trace, EFalse if not
+ */
+inline TBool DBTraceOstCategoryHandler::CheckMultiPart( TUint32 aHeader, TUint32 aHeader2 )
+    {
+    TBool retval = EFalse;
+    TUint8 flags = static_cast< TUint8 >( ( aHeader >> ( BTrace::EFlagsIndex * KByteSize ) ) & KByteMask );
+    if (flags & BTrace::EHeader2Present)
+        {
+        // First, middle or last part of Multipart trace
+        if (aHeader2 & BTrace::EMultipartFlagMask)
+            {
+            retval = ETrue;
+            }
+        }
+    
+    //Trace from here is not allowed
+    return retval;
+    }
+
+/**
+ * Checks if there is a dropped trace and updates header if so
+ *
+ * @param aHeader Header data
+ */
+inline TBool DBTraceOstCategoryHandler::CheckDroppedTrace( TUint32& aHeader )
+    {
+    TBool ret(EFalse);
+    
+    DTraceCore* tracecore = DTraceCore::GetInstance();
+    if (tracecore && (tracecore->PreviousTraceDropped())) //if previous trace was dropped 
+        {
+        //set flags back to EFalse first
+        tracecore->SetPreviousTraceDropped(EFalse);
+        
+        //set missing flag in BTrace
+        aHeader |= BTrace::EMissingRecord<<(BTrace::EFlagsIndex * KByteSize);
+        
+        ret = ETrue;
+        }
+    
+    return ret;
+    }
+
+#ifdef __SMP__
+
+
+TInt DBTraceOstCategoryHandler::Find( TUint32 aMultiPartId )
+    {
+    TInt ret(KErrNotFound);
+    for( TInt i = 0; i<MAX_MULTIPART_TRACES; i++ )
+        {
+        if( iMultipartArray[i].iMultiPartId == aMultiPartId )
+            {
+            ret = i;
+            break;
+            }
+        }
+    return ret;
+    }
+    
+void DBTraceOstCategoryHandler::Remove( TUint32 aIndex )
+    {
+    iMultipartArray[aIndex].iMultiPartId = 0xffffffff;    
+    iFreeList[aIndex] = 1; // Set free
+    }
+    
+    /**
+     * 
+     * @return KErrNone if added, otherwise KErrNotFound.
+     */
+TInt DBTraceOstCategoryHandler::InsertIfNotExist( TMultiPartActivationInfo &aMultiPartTrace )
+    {
+    TInt ret = Find( aMultiPartTrace.iMultiPartId );
+    if( ret == KErrNotFound )
+        {
+        // Find free slot
+        for( TInt freeIndex = 0; freeIndex<MAX_MULTIPART_TRACES; freeIndex++ )
+            {
+            if( iFreeList[freeIndex] )
+                {
+                iFreeList[freeIndex] = 0; // Set reserved
+                iMultipartArray[freeIndex].iComponentId = aMultiPartTrace.iComponentId;
+                iMultipartArray[freeIndex].iTraceWord = aMultiPartTrace.iTraceWord;
+                iMultipartArray[freeIndex].iMultiPartId = aMultiPartTrace.iMultiPartId;
+                ret = KErrNone;
+                break;
+                }
+            }
+
+        }
+    return ret;
+    }
+ 
+
+/**
+ * Handles this Multipart trace
+ *
+ * @param aHeader BTrace header
+ * @param aHeader2 Extra header data
+ * @param aContext The thread context in which this function was called
+ * @param a1 First parameter
+ * @param a2 Second parameter
+ * @param aData The data
+ * @param aExtra Extra trace data
+ * @param aPc The program counter value
+ * @return ETrue if trace is activated
+ */
+TBool DBTraceOstCategoryHandler::HandleMultiPart( TUint32 aHeader, TUint32 aHeader2, const TUint32 aContext,
+                   const TUint32 a1, const TUint32 a2, const TUint32 aData, const TUint32 aExtra,
+                   const TUint32 aPc)
+    {
+    TBool retval = ETrue;
+    TInt multiPartOffset = aHeader2 & BTrace::EMultipartFlagMask;
+    TUint8 recordSize = static_cast< TUint8 >( ( aHeader >> ( BTrace::ESizeIndex * KByteSize ) ) & KByteMask );
+    
+    // First part of multipart trace
+    if (multiPartOffset == BTrace::EMultipartFirst)
+        {
+        // Create new MultiPart activation info and save it to the array
+        TMultiPartActivationInfo activationInfo;
+        activationInfo.iComponentId = a2;
+        
+        // This should be safe operation as if there is not enough data, the trace should not
+        // be first part of multipart trace
+        TUint32* ptr = reinterpret_cast< TUint32* >(aData);
+        activationInfo.iTraceWord = *ptr++;
+        activationInfo.iMultiPartId = aExtra;
+        retval = iOstTraceBitmap->IsTraceActivated( activationInfo.iComponentId, activationInfo.iTraceWord );
+        
+        if (retval)
+            {
+            // Insert the item to the array        
+            TInt ret = InsertIfNotExist( activationInfo );
+			
+            if (KErrNone == ret)
+                {
+                CheckDroppedTrace( aHeader ); // Update header if there is a dropped trace
+                
+                // Write the trace. Skip first 4 bytes as it's the traceWord which is given in different parameter
+                iWriter->WriteTraceCoreFrame( activationInfo.iComponentId, activationInfo.iTraceWord, 
+                        aHeader, aHeader2, aContext, activationInfo.iComponentId, 
+                        activationInfo.iTraceWord, aData + 4, aExtra, aPc, recordSize - 4 );
+                }
+            else
+                {
+                retval = EFalse;
+                }
+            }
+        }
+    // Middle or last part of multipart trace
+    else if (multiPartOffset == BTrace::EMultipartMiddle || multiPartOffset == BTrace::EMultipartLast)
+        {
+        // Check index of component id in array
+        TMultiPartActivationInfo tempInfo;
+        tempInfo.iMultiPartId = aExtra;
+        
+		TInt index = Find( aExtra );
+        
+        if (index != KErrNotFound)
+            {
+            CheckDroppedTrace( aHeader ); // Update header if there is a dropped trace
+        
+            TMultiPartActivationInfo activationInfo;
+            activationInfo.iComponentId = iMultipartArray[index].iComponentId;
+            activationInfo.iTraceWord = iMultipartArray[index].iTraceWord;
+            activationInfo.iMultiPartId = iMultipartArray[index].iMultiPartId;
+            
+            // Write the trace
+            iWriter->WriteTraceCoreFrame( activationInfo.iComponentId, activationInfo.iTraceWord, aHeader, aHeader2, 
+                    aContext, activationInfo.iComponentId, activationInfo.iTraceWord, aData, aExtra, aPc, recordSize );
+            
+            // Last part, remove the item from the array
+            if (multiPartOffset == BTrace::EMultipartLast)
+                {
+                Remove(index);
+                }
+            }
+        }
+    
+    //Trace from here is not allowed
+        
+    return retval;
+    }
+
+#else // __SMP__
+
+/**
+ * Handles this Multipart trace
+ *
+ * @param aHeader BTrace header
+ * @param aHeader2 Extra header data
+ * @param aContext The thread context in which this function was called
+ * @param a1 First parameter
+ * @param a2 Second parameter
+ * @param aData The data
+ * @param aExtra Extra trace data
+ * @param aPc The program counter value
+ * @return ETrue if trace was processed, EFalse if not
+ */
+TBool DBTraceOstCategoryHandler::HandleMultiPart( TUint32 aHeader, TUint32 aHeader2, const TUint32 aContext,
+                   const TUint32 a1, const TUint32 a2, const TUint32 aData, const TUint32 aExtra,
+                   const TUint32 aPc)
+    {
+    TBool retval = EFalse;
+    
+    if (iMultiPartTrace.iMultiPartId == 0 || iMultiPartTrace.iMultiPartId == aExtra)
+        {    
+        // First part of multipart trace
+        if ((aHeader2 & BTrace::EMultipartFlagMask) == BTrace::EMultipartFirst)
+            {
+            TUint32 componentId = a2;
+            TUint32* ptr = ( TUint32* )aData;
+            TUint32 traceWord = *ptr++;
+            retval = iOstTraceBitmap->IsTraceActivated( componentId, traceWord );
+            if (retval)
+                {
+                CheckDroppedTrace( aHeader ); // Update header if there is a dropped trace
+            
+                // Set values
+                iMultiPartTrace.iMultiPartId = aExtra;
+                iMultiPartTrace.iComponentId = componentId;
+                iMultiPartTrace.iTraceWord = traceWord;
+                iMultiPartTrace.iContext = aContext;
+                iMultiPartTrace.iPc = aPc;
+                iMultiPartTrace.iHeader = aHeader;
+                
+                // Remove the multipart information from the header2
+                aHeader2 &= ~BTrace::EMultipartFlagMask;
+                iMultiPartTrace.iHeader2 = aHeader2;
+    
+                // Copy the data
+                TUint8 recordSize = static_cast< TUint8 >( ( aHeader >> ( BTrace::ESizeIndex * KByteSize ) ) & KByteMask );
+                TUint32 dataSize = recordSize - CalculateDataStartOffset(aHeader);
+                memcpy(iMultiPartTrace.iData, (TUint8*)aData + KTraceGroupIdLen, dataSize - KTraceGroupIdLen);
+                iMultiPartTrace.iDataInserted = dataSize - KTraceGroupIdLen;
+                }
+            }      
+        // Middle part of multipart trace
+        else if ((aHeader2 & BTrace::EMultipartFlagMask) == BTrace::EMultipartMiddle)
+            {
+            retval = ETrue;
+            // Add to the data buffer
+            TUint8 recordSize = static_cast< TUint8 >( ( aHeader >> ( BTrace::ESizeIndex * KByteSize ) ) & KByteMask );
+            TUint32 dataSize = recordSize - CalculateDataStartOffset(aHeader);
+            
+            // Check that trace is not too big
+            if (iMultiPartTrace.iDataInserted + dataSize < MAX_TRACE_DATA_SIZE)
+                {
+                CheckDroppedTrace( aHeader ); // Update header if there is a dropped trace
+                memcpy(iMultiPartTrace.iData + iMultiPartTrace.iDataInserted, (TUint8*)aData, dataSize);
+                iMultiPartTrace.iDataInserted += dataSize;
+                }
+            }
+        // Last part of multipart trace
+        else if ((aHeader2 & BTrace::EMultipartFlagMask) == BTrace::EMultipartLast)
+            {
+            retval = ETrue;
+            TUint32 totalDataLen = a1;
+            TUint32 offset = a2;
+            
+            // Add to the data buffer
+            TUint32 partLen = totalDataLen - offset;
+            TUint32 dataStartOffset = CalculateDataStartOffset(iMultiPartTrace.iHeader);
+                           
+            // Check that trace is not too big
+            if (iMultiPartTrace.iDataInserted + partLen <= MAX_TRACE_DATA_SIZE)
+                {
+                CheckDroppedTrace( aHeader ); // Update header if there is a dropped trace
+                
+                // If the last part contains only last four bytes, it's a value instead of pointer
+                if (partLen == KFourBytes)
+                    {
+                    iMultiPartTrace.iData[iMultiPartTrace.iDataInserted] = aData & KByteMask;
+                    iMultiPartTrace.iData[iMultiPartTrace.iDataInserted + 1] = (aData >> 8) & KByteMask; //CodForChk_Dis_Magic
+                    iMultiPartTrace.iData[iMultiPartTrace.iDataInserted + 2] = (aData >> 16) & KByteMask; //CodForChk_Dis_Magic
+                    iMultiPartTrace.iData[iMultiPartTrace.iDataInserted + 3] = (aData >> 24) & KByteMask; //CodForChk_Dis_Magic
+                    }
+                else 
+                    {
+                    memcpy(iMultiPartTrace.iData + iMultiPartTrace.iDataInserted, (TUint8*)aData, partLen);   
+                    }
+                    
+                // Total data length. Four bytes is taken out because it was parsed out from the data
+                // array when parsing first part of the trace
+                totalDataLen = totalDataLen + dataStartOffset - KFourBytes;    
+                    
+                }
+            else
+                {
+                	// Total data length. Four bytes is taken out because it was parsed out from the data
+                  // array when parsing first part of the trace
+                	totalDataLen = iMultiPartTrace.iDataInserted + dataStartOffset - KFourBytes;
+                }
+                	
+            // Write the trace
+            iWriter->WriteTraceCoreFrame( iMultiPartTrace.iComponentId, iMultiPartTrace.iTraceWord,
+            iMultiPartTrace.iHeader, iMultiPartTrace.iHeader2, iMultiPartTrace.iContext,
+            iMultiPartTrace.iComponentId, iMultiPartTrace.iTraceWord, (TUint32)iMultiPartTrace.iData,
+            iMultiPartTrace.iMultiPartId, iMultiPartTrace.iPc, totalDataLen);
+                
+            iMultiPartTrace.iMultiPartId = 0;
+            }
+        }
+
+    return retval;
+    }
+
+/**
+ * Calculates data start offset
+ *
+ * @param aHeader BTrace header
+ */
+TUint32 DBTraceOstCategoryHandler::CalculateDataStartOffset( TUint32 aHeader )
+    {
+    TUint32 offset = 0;
+    TUint8 flags = static_cast< TUint8 >( ( aHeader >> ( BTrace::EFlagsIndex * KByteSize ) ) & KByteMask );
+    
+    // First add header length
+    offset += KBTraceHeaderLen;
+    
+    // Header2 is present
+    if ( flags & BTrace::EHeader2Present )
+        {
+        offset += KBTraceVariableLen;
+        }
+    // Timestamp is present
+    if ( flags & BTrace::ETimestampPresent )
+        {
+        offset += KBTraceVariableLen;
+        }
+    // Timestamp2 is present
+    if ( flags & BTrace::ETimestamp2Present )
+        {
+        offset += KBTraceVariableLen;
+        }
+    // Context ID is present
+    if ( flags & BTrace::EContextIdPresent )
+        {
+        offset += KBTraceVariableLen;
+        }
+    // Program counter is present
+    if ( flags & BTrace::EPcPresent )
+        {
+        offset += KBTraceVariableLen;
+        }
+    // Extra value is present
+    if ( flags & BTrace::EExtraPresent )
+        {
+        offset += KBTraceVariableLen;
+        }
+    
+    // Next 8 bytes came with first and second parameter of the multipart trace
+    offset += KFourBytes;
+    offset += KFourBytes;
+    
+    return offset;
+    }
+	
+#endif // !__SMP__
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/src/TraceCore.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,589 @@
+// 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 "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:
+//
+// Description:
+//  Trace Core main instance implementation
+//
+//
+
+#include <e32def.h>
+#include <e32btrace.h>
+#include <trace_certification.h>
+
+#include "TraceCore.h"
+#include "TraceCoreSendReceive.h"
+#include "TraceCoreRouter.h"
+#include "TraceCoreDebug.h"
+#include "TraceCoreBTraceHandler.h"
+#include "TraceCorePrintfTraceHandler.h"
+#include "TraceCoreNotifier.h"
+#include "TraceCoreConfiguration.h"
+#include "TraceCoreInternalMessageHandler.h"
+#include "TraceCoreActivation.h"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "TraceCoreTraces.h"
+#endif
+
+/**
+ * TraceCore global instance
+ */
+DTraceCore* DTraceCore::iInstance = NULL;
+
+
+/**
+ * Gets the TraceCore instance,
+ * @return DTraceCore object or NULL if TraceCore is not created yet.
+ */
+EXPORT_C DTraceCore* DTraceCore::GetInstance()
+    {
+    return iInstance;
+    }
+
+/**
+ * Returns ETrue if tracecore is loaded already EFalse otherwies
+ */
+EXPORT_C TBool DTraceCore::IsLoaded()
+    {
+    return ( iInstance != NULL );
+    }
+
+/**
+ * Gets the BTrace handler
+ */
+DTraceCoreBTraceHandler* DTraceCore::GetBTraceHandler()
+    {
+    DTraceCoreBTraceHandler* retval = NULL;
+    DTraceCore* traceCore = DTraceCore::GetInstance();
+    // BTrace handler is the first one to be registered
+    if ( traceCore != NULL && traceCore->iHandlers.Count() > 0 )
+        {
+        retval = ( DTraceCoreBTraceHandler* )traceCore->iHandlers[ 0 ];
+        }
+    return retval;
+    }
+
+/**
+ * Constructor
+ */
+DTraceCore::DTraceCore()
+: iRouter( NULL )
+, iSendReceive( NULL )
+, iNotifier( NULL )
+, iConfiguration( NULL )
+, iInternalMessageHandler( NULL )
+, iBTrace( NULL )
+, iPrintf( NULL )
+, iTraceCoreSettings( NULL )
+, iActiveWriter( NULL )
+, iActivationQ(NULL)
+, iPreviousTraceDropped(EFalse)
+, iTraceCertified(EFalse)
+    {
+    }
+
+/**
+ * Destructor
+ */
+DTraceCore::~DTraceCore()
+    {
+    // Writers and handlers are deleted first
+    //  -> They call unregister functions
+    delete iBTrace;
+    delete iPrintf;
+
+    iHandlers.Reset();
+    iWriters.Reset();
+    iActivations.Reset();
+
+    delete iRouter;
+    delete iSendReceive;
+    delete iNotifier;
+    delete iConfiguration;
+	//destroy iActivationQue
+    if (iActivationQ)
+        iActivationQ->Destroy();
+    }
+
+
+/*
+ * Init TraceCore
+ */
+TInt DTraceCore::Init()
+    {
+    TC_TRACE( ETraceLevelFlow, Kern::Printf( ">DTraceCore::Init()" ) );
+    TInt ret;
+
+    //TODO: measure how much time it takes to boot up
+    //TODO: measure how much memory is consumed by TraceCore
+   //TODO: check granularity of internal RArrays - update this for most used use case
+
+    //TODO: check dfc que (if we have any) that deals with pulling trace data from buffer
+
+   // Store the trace certified flag, used to suppress tracing on production images.
+   // This stored value is used throughout the session, even if the status of the certificate changes.
+   // This is done to avoid performance issues when performing the check with every trace outputted.
+   iTraceCertified = TraceCertification::IsTraceCertified();
+
+    //create activation/deactivation queue
+   const TInt KTCDfcThreadPriority = 24; // Kern::DfcQ0 is 27
+   //TODO: put this const to a header
+   //TODO: check if I can use constants for this (DFCQ0-1) ?
+   _LIT(KTCDfcQueue, "TraceCoreActivationDfcQ");
+   Kern::Printf("Creating TC dfc - %S...", &KTCDfcQueue);
+   ret = Kern::DynamicDfcQCreate(iActivationQ, KTCDfcThreadPriority, KTCDfcQueue);
+   Kern::Printf("returned code: %d, ptr: 0x%x", ret, iActivationQ);
+   if (ret==KErrNone)
+       //disable real-time state of the dfcq
+       iActivationQ->SetRealtimeState(ERealtimeStateOff);
+
+    // Disable Component ID filtering in BTrace
+    BTrace::SetFilter2(1);
+
+    // Create needed components
+    iRouter = new DTraceCoreRouter();
+    iSendReceive = new DTraceCoreSendReceive();
+    iNotifier = new DTraceCoreNotifier();
+    iConfiguration = new DTraceCoreConfiguration();
+    iInternalMessageHandler = new DTraceCoreInternalMessageHandler();
+
+    // Check that creating of the components was succesfull
+    if ( iRouter != NULL && iSendReceive != NULL && iNotifier != NULL && iConfiguration != NULL )
+        {
+        ret = iSendReceive->Init( *iRouter );
+        if ( ret == KErrNone )
+            {
+            ret = iRouter->Init( *iSendReceive );
+            if ( ret == KErrNone )
+                {
+                ret = iConfiguration->Init();
+                if ( ret == KErrNone )
+                    {
+                    ret = iInternalMessageHandler->Init();
+                    }
+                }
+            }
+        }
+    else
+        {
+        ret = KErrNoMemory;
+        }
+
+    // BTrace handler is integrated to TraceCore
+    if ( ret == KErrNone )
+        {
+        ret = StartBTrace();
+        }
+
+    // Printf handler is integrated to TraceCore
+    if ( ret == KErrNone )
+        {
+        ret = StartPrintfTraceHandler();
+        }
+    TC_TRACE( ETraceLevelFlow, Kern::Printf( "<DTraceCore::Init() - %d", ret ) );
+
+    return ret;
+    }
+
+/**
+ * Starts the BTrace handler
+ */
+TInt DTraceCore::StartBTrace()
+    {
+    TInt ret = KErrNone;
+
+    // Create BTrace handler
+    iBTrace = new DTraceCoreBTraceHandler();
+    if ( iBTrace != NULL )
+        {
+        // Init calls RegisterHandler
+        ret = iBTrace->Init();
+        }
+    else
+        {
+        ret = KErrNoMemory;
+        }
+    TC_TRACE( ETraceLevelFlow, Kern::Printf( "<DTraceCore::StartBTrace() - %d", ret ) );
+    return ret;
+    }
+
+
+/**
+ * Starts the Printf trace handler
+ */
+TInt DTraceCore::StartPrintfTraceHandler()
+    {
+    TInt ret;
+
+    // Create PrintF handler
+    iPrintf = new DTraceCorePrintfTraceHandler();
+    if ( iPrintf != NULL )
+        {
+        // Init calls RegisterHandler
+        ret = iPrintf->Init();
+        }
+    else
+        {
+        ret = KErrNoMemory;
+        }
+    TC_TRACE( ETraceLevelFlow, Kern::Printf( "<DTraceCore::StartPrintfTraceHandler() - %d", ret ) );
+    return ret;
+    }
+
+
+/**
+ * Registers an activation interface
+ */
+TInt DTraceCore::RegisterActivation( MTraceCoreActivation& aActivation )
+    {
+    return iActivations.Append( &aActivation );
+    }
+
+
+/**
+ * Gets an activation interface.
+ * Tracing from this method is not allowed.
+ */
+MTraceCoreActivation* DTraceCore::GetActivation( TUint32 aComponentId )
+    {
+    MTraceCoreActivation* retval = NULL;
+
+    // Find the correct activation interface from the list
+    for ( int i = 0; i < iActivations.Count(); i++ )
+        {
+        if ( iActivations[ i ]->IsComponentSupported( aComponentId ) )
+            {
+            retval = iActivations[ i ];
+            }
+        }
+
+    return retval;
+    }
+
+
+/**
+ * Registers a handler
+ *
+ * @param aHandler The handler
+ */
+TInt DTraceCore::RegisterHandler( DTraceCoreHandler& aHandler )
+    {
+    OstTrace1( TRACE_FLOW, DTRACECORE_REGISTERHANDLER_ENTRY, "> DTraceCore::RegisterHandler 0x%x", ( TUint )&( aHandler ) );
+    TInt ret = iHandlers.Append( &aHandler );
+
+    // If there is not yet active writer, set the new one
+    if ( ret == KErrNone && iActiveWriter != NULL )
+        {
+        aHandler.SetWriter( iActiveWriter );
+        }
+
+    // Set settings to the handler
+    if ( ret == KErrNone && iTraceCoreSettings != NULL )
+     	{
+     	aHandler.SetSettings( iTraceCoreSettings );
+    	}
+    OstTrace1( TRACE_FLOW, DTRACECORE_REGISTERHANDLER_EXIT, "< DTraceCore::RegisterHandler. Ret:%d", ret );
+
+    return ret;
+    }
+
+
+/**
+ * Unregisters a handler
+ *
+ * @param aHandler The handler
+ */
+void DTraceCore::UnregisterHandler( DTraceCoreHandler& aHandler )
+    {
+    // Find thiss handler from the list of handlers
+    for ( TInt i = 0; i < iHandlers.Count(); i++ )
+        {
+        if ( iHandlers[ i ] == &aHandler )
+            {
+            OstTrace1( TRACE_NORMAL, DTRACECORE_UNREGISTERHANDLER_HANDLER_REMOVED, "DTraceCore::UnregisterHandler - Handler removed 0x%x", ( TUint )&aHandler );
+            iHandlers.Remove( i );
+            i = iHandlers.Count();
+            }
+        }
+    }
+
+/**
+ * Registers the settings
+ *
+ * @param aSettings The settings saver
+ * @return KErrNone if registration successful
+ */
+TInt DTraceCore::RegisterSettings( DTraceCoreSettings& aSettings )
+    {
+    iTraceCoreSettings = &aSettings;
+    for ( TInt i = 0; i < iHandlers.Count(); i++ )
+        {
+        iHandlers[ i ]->SetSettings( iTraceCoreSettings );
+        }
+    return KErrNone;
+    }
+
+
+/**
+ * Unregisters the settings
+ *
+ * @param aSettings The settings
+ */
+void DTraceCore::UnregisterSettings( DTraceCoreSettings& aSettings )
+    {
+    if ( &aSettings == iTraceCoreSettings )
+        {
+        iTraceCoreSettings = NULL;
+
+        // Remove settings from all the handlers
+        for ( TInt i = 0; i < iHandlers.Count(); i++ )
+            {
+            iHandlers[ i ]->SetSettings( NULL );
+            }
+        }
+    }
+
+
+/**
+ * Registers a writer
+ *
+ * @param aWriter The writer
+ */
+TInt DTraceCore::RegisterWriter( DTraceCoreWriter& aWriter )
+    {
+    OstTrace1( TRACE_FLOW, DTRACECORE_REGISTERWRITER_ENTRY, "> DTraceCore::RegisterWriter 0x%x", ( TUint )&( aWriter ) );
+
+    TInt ret = iWriters.Append( &aWriter );
+    if ( ret == KErrNone )
+        {
+        // First writer that registers is selected as the active one
+        if ( iActiveWriter == NULL )
+            {
+            iActiveWriter = &aWriter;
+            SetWriterToHandlers();
+            }
+        }
+
+    OstTrace1( TRACE_FLOW, DTRACECORE_REGISTERWRITER_EXIT, "< DTraceCore::RegisterWriter %d", ret );
+    return ret;
+    }
+
+
+/**
+ * Unregisters a writer
+ *
+ * @param aWriter The writer
+ */
+void DTraceCore::UnregisterWriter( DTraceCoreWriter& aWriter )
+    {
+    for ( TInt i = 0; i < iWriters.Count(); i++ )
+        {
+        if ( iWriters[ i ] == &aWriter )
+            {
+            OstTraceExt2( TRACE_NORMAL, DTRACECORE_UNREGISTERHANDLER_WRITER_UNREGISTERED, "DTraceCore::UnregisterWriter - Writer unregistered WriterType:%d Addr:0x%x", ( TInt )aWriter.GetWriterType(), ( TUint )&aWriter );
+            iWriters.Remove( i );
+            i = iWriters.Count();
+            // If the active writer was removed, another writer needs to be activated
+            if ( &aWriter == iActiveWriter )
+                {
+                SwitchToFirstWriter();
+                }
+            }
+        }
+    }
+
+
+/**
+ * Starts to use the first writer from the writers list
+ */
+void DTraceCore::SwitchToFirstWriter()
+    {
+    if ( iWriters.Count() > 0 )
+        {
+        iActiveWriter = iWriters[ 0 ];
+        }
+    else
+        {
+        iActiveWriter = NULL;
+        }
+    SetWriterToHandlers();
+    }
+
+
+/**
+ * Starts to use a writer of the specific type. Does nothing if the writer is already active
+ */
+EXPORT_C TInt DTraceCore::SwitchToWriter( TWriterType aWriterType )
+    {
+    OstTrace1( TRACE_FLOW, DTRACECORE_SWITCHTOWRITER_ENTRY,"> DTraceCore::SwitchToWriter WriterType:%d", ( TUint )( aWriterType ) );
+    TInt retval( KErrNone );
+
+    // Remove writer
+    if ( aWriterType == EWriterTypeNone )
+        {
+        if ( iActiveWriter != NULL )
+            {
+            iActiveWriter = NULL;
+            SetWriterToHandlers();
+            }
+        }
+    else
+        {
+        if ( iActiveWriter == NULL || iActiveWriter->GetWriterType() != aWriterType )
+            {
+            retval = KErrNotSupported;
+
+            // Find the correct writer from the list
+            for ( int i = 0; i < iWriters.Count() && retval != KErrNone; i++ )
+                {
+                DTraceCoreWriter* writer = iWriters[ i ];
+
+                // revert this
+                TWriterType wt = writer->GetWriterType();
+
+                if ( wt == aWriterType )
+                    {
+                    iActiveWriter = writer;
+                    retval = KErrNone;
+                    }
+                }
+
+            // Set writer to all handlers
+            if ( retval == KErrNone )
+                {
+                SetWriterToHandlers();
+                }
+            }
+        }
+    OstTrace1( TRACE_FLOW, DTRACECORE_SWITCHTOWRITER_EXIT, "< DTraceCore::SwitchToWriter %d", retval );
+    return retval;
+    }
+
+/**
+ * Sets the active writer to all registered handlers
+ */
+void DTraceCore::SetWriterToHandlers()
+    {
+    if ( iActiveWriter != NULL )
+        {
+        OstTraceExt2( TRACE_NORMAL, DTRACECORE_SETWRITERTOHANDLERS_WRITER_SELECTED, "DTraceCore::SetWriterToHandlers - Writer selected 0x%x WriterType:%d", (TUint) iActiveWriter, (TInt) iActiveWriter->GetWriterType() );
+        }
+
+    // PrepareSetWriter method is called with interrupts enabled
+    // SetWriter is called with interrupts disabled to prevent tracing
+    // while switching the writer
+    for ( TInt i = 0; i < iHandlers.Count(); i++ )
+        {
+        iHandlers[ i ]->PrepareSetWriter( iActiveWriter );
+        }
+    //TODO: this is not SMP safe but it's rare case - update it later
+    TInt interrupts = NKern::DisableAllInterrupts();
+    for ( TInt j = 0; j < iHandlers.Count(); j++ )
+        {
+        iHandlers[ j ]->SetWriter( iActiveWriter );
+        }
+    NKern::RestoreInterrupts( interrupts );
+    }
+
+/**
+ * Get current writer type
+ *
+ * @return Current writer type
+ */
+EXPORT_C TInt DTraceCore::GetCurrentWriterType()
+    {
+    TInt ret(0);
+    ret = iActiveWriter->GetWriterType();
+    return ret;
+    }
+
+/*
+ * Destroy the static instance of tracecore
+ */
+EXPORT_C void DTraceCore::DestroyTraceCore()
+    {
+    TC_TRACE( ETraceLevelNormal, Kern::Printf( "StopTraceCore started" ) );
+    delete DTraceCore::GetInstance();
+    DTraceCore::iInstance = NULL;
+    TC_TRACE( ETraceLevelNormal, Kern::Printf( "StopTraceCore Finished" ) );
+    }
+
+
+/**
+ * Sets the "Trace Dropped" flag
+ *
+ * @param aTraceDropped ETrue if Trace Dropped, EFalse Otherwise
+ */
+EXPORT_C void DTraceCore::SetPreviousTraceDropped(TBool aTraceDropped)
+    {
+    iPreviousTraceDropped = aTraceDropped;
+    }
+
+/**
+ * returns the state of the  "Trace Dropped" flag
+ *
+ * @param none
+ */
+EXPORT_C TBool DTraceCore::PreviousTraceDropped() const
+    {
+    return iPreviousTraceDropped;
+    }
+
+
+EXPORT_C DTraceCore* DTraceCore::CreateInstance()
+    {
+    if(iInstance == NULL)
+      {
+        DTraceCore* instance = new DTraceCore();
+        if ( instance != NULL )
+            {
+            iInstance = instance;
+            TInt ret = iInstance->Init();
+            if(ret != KErrNone)
+                {
+                delete iInstance;
+                iInstance = NULL;
+                }
+            }
+        }
+
+    return iInstance;
+    }
+
+
+EXPORT_C DTraceCoreWriter* DTraceCore::GetActiveWriter()
+    {
+    return iActiveWriter;
+    }
+
+/**
+ * Reactivate all currently activated traces
+ *
+ * @param none
+ * @return KErrNone if refresh successful
+ */
+TInt DTraceCore::RefreshActivations()
+    {
+    TInt ret = KErrNone;
+    // Go through all activation interfaces from the list
+    TInt activationsCount = iActivations.Count();
+    for ( int i = 0; i < activationsCount; i++ )
+        {
+        TInt err = iActivations[ i ]->RefreshActivations();
+        if (err != KErrNone)
+            {
+            ret = err;
+            }
+        }
+    return ret;
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/src/TraceCoreActivationBase.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,125 @@
+// 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 "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:
+//
+// Description:
+// Base class for activation objects
+//
+#ifdef __SMP__
+#include <nkernsmp/nkern.h>
+#endif
+#include "TraceCoreActivationBase.h"
+#include "TraceCore.h"
+#include "TraceCoreDebug.h"
+#include "TraceCoreMessageSender.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "TraceCoreActivationBaseTraces.h"
+#endif
+
+
+
+/**
+ * Constructor
+ */
+DTraceCoreActivationBase::DTraceCoreActivationBase()
+#if defined(__SMP__)
+: iActivationReadLock(TSpinLock::EOrderBTrace-1)
+#endif 
+    {
+    }
+
+
+/**
+ * Destructor
+ */
+DTraceCoreActivationBase::~DTraceCoreActivationBase()
+    {
+    }
+
+
+/**
+ * Subscribes to message ID and registers to activation interface list
+ * 
+ * @param aMessageID the message id to be subscribed
+ */         
+TInt DTraceCoreActivationBase::Init( TUint32 aMessageId )
+    {
+    // Subscribes to a message by message ID
+    TInt err = Subscribe( aMessageId );
+    if ( err == KErrNone )
+        {
+        // If subscribe succeeds, GetInstance will not return NULL
+        err = DTraceCore::GetInstance()->RegisterActivation( *this );
+        }
+ 
+    TC_TRACE( ETraceLevelFlow, Kern::Printf( "<DTraceCoreActivationBase::Init() - %d", err ) );
+    return err;
+    }
+
+    
+/**
+ * Subscribes to message ID and registers to activation interface list
+ * 
+ * @param aMessageID the message id to be subscribed
+ * @param aMsgFormat Message format e.g. EMessageHeaderFormatOst
+ */
+TInt DTraceCoreActivationBase::SubscribeMessage(TUint32 aMessageId, TMessageHeaderFormat aMsgFormat)
+    {
+    return Subscribe(aMessageId, aMsgFormat) ;
+    }
+
+
+/**
+ * Registers an activation notification interface
+ * 
+ * @param aNotification the notification interface
+ */
+TInt DTraceCoreActivationBase::RegisterActivationNotification( MTraceCoreActivationNotification& aNotification )
+    {
+    OstTrace1( TRACE_FLOW, DBTRACECOREACTIVATIONBASE_REGISTERACTIVATIONNOTIFICATION_ENTRY, "> DBTraceCoreActivationBase::RegisterActivationNotification 0x%x", ( TUint )&( aNotification ) );
+    
+    TInt retval = iActivationNotification.Append( &aNotification );
+    
+    OstTrace1( TRACE_FLOW, DBTRACECOREACTIVATIONBASE_REGISTERACTIVATIONNOTIFICATION_EXIT, "< DBTraceCoreActivationBase::RegisterActivationNotification Ret:%d", retval );
+    return retval;
+    }
+
+
+/**
+ * Sends notification to TraceCore internal activation notification interfaces.
+ * 
+ * @pre Method should be called with writer lock (iActivationWriteLock) held.
+ * 
+ * @param aFromSettings ETrue if activation was due to settings read, EFalse if from some other source
+ * @param aComponentId Component ID of the activation 
+ */
+void DTraceCoreActivationBase::NotifyInternalActivation( TBool aFromSettings, TUint32 aComponentId )
+    {
+    OstTraceExt2( TRACE_FLOW, DBTRACECOREACTIVATIONBASE_NOTIFYINTERNALACTIVATION_ENTRY, "> DBTraceCoreActivationBase::NotifyInternalActivation. FromSettings:%d, ComponentID:%x", (TUint32)aFromSettings, (TUint32) aComponentId );
+
+    for ( int i = 0; i < iActivationNotification.Count(); i++ )
+        {
+        iActivationNotification[ i ]->ActivationChanged( *this, aFromSettings, aComponentId );
+        }
+    }
+    
+
+/**
+ * Send response
+ * 
+ * @param aMessage Response message
+ */
+void DTraceCoreActivationBase::SendResponse( TTraceMessage& aMessage )
+    {
+    iMessageSender->SendMessage( aMessage );
+    }
+    
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/src/TraceCoreBTraceHandler.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,328 @@
+// 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 "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:
+//
+// Description:
+// Trace Core
+//
+
+#include "TraceCoreBTraceHandler.h"
+#include "TraceCoreWriter.h"
+#include "TraceCoreDebug.h"
+#include "TraceCoreConstants.h"
+#include "BTraceOstCategoryHandler.h"
+#include "BTraceKernelCategoryHandler.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "TraceCoreBTraceHandlerTraces.h"
+#endif
+
+
+/**
+ * Static instance is needed when calling traces from handler function
+ */
+DTraceCoreBTraceHandler* DTraceCoreBTraceHandler::iInstance = NULL;
+
+
+/**
+ * Constructor
+ */
+DTraceCoreBTraceHandler::DTraceCoreBTraceHandler()
+: iCategoryHandlers( NULL )
+, iOstHandler( NULL )
+, iKernelHandler( NULL )
+	{
+	}
+
+
+/**
+ * Destructor
+ */
+DTraceCoreBTraceHandler::~DTraceCoreBTraceHandler()
+	{
+    // Handlers are deleted first -> They call UnregisterCategoryHandler
+	delete iOstHandler;
+	delete iKernelHandler;
+    delete[] iCategoryHandlers;
+    DTraceCoreBTraceHandler::iInstance = NULL;
+	}
+	
+
+/**
+ * Initializes BTrace handler
+ */
+TInt DTraceCoreBTraceHandler::Init()
+	{
+    iCategoryHandlers = new DBTraceCategoryHandler*[ KBTraceCategoryCount ];
+    TInt ret;
+    if ( iCategoryHandlers != NULL )
+        {
+        memset( iCategoryHandlers, 0, sizeof ( DBTraceCategoryHandler* ) * KBTraceCategoryCount );
+        // Registers this handler to TraceCore
+        ret = Register();
+        if ( ret == KErrNone )
+            {
+            // Registers the callback function to BTrace
+            BTrace::SetHandler( BTraceHandlerFunc );
+            DTraceCoreBTraceHandler::iInstance = this;
+            }
+        }
+    else
+        {
+        ret = KErrNoMemory;
+        }
+
+    // Autogen, OST and Symbian kernel category handlers are integrated to TraceCore
+    if ( ret == KErrNone )
+        {
+
+        ret = StartOstHandler();
+
+        if ( ret == KErrNone )
+            {
+            ret = StartKernelHandler();
+            }
+        }
+    
+    TC_TRACE( ETraceLevelFlow, Kern::Printf( "<DTraceCoreBTraceHandler::Init - return %d", ret ) );
+    return ret;
+    }
+
+
+    
+/**
+ * Starts the OST category handler
+ */
+TInt DTraceCoreBTraceHandler::StartOstHandler()
+    {
+    TInt ret = KErrNoMemory;
+    iOstHandler = new DBTraceOstCategoryHandler();
+    if ( iOstHandler != NULL )
+        {
+        // Init calls RegisterCategoryHandler
+        ret = iOstHandler->Init();
+        }
+    TC_TRACE( ETraceLevelError,Kern::Printf( "DTraceCoreBTraceHandler::StartOstHandler - %d", ret ) );
+    return ret;
+    }
+
+
+/**
+ * Starts the kernel category handler
+ */
+TInt DTraceCoreBTraceHandler::StartKernelHandler()
+    {
+    TInt ret = KErrGeneral;
+    if ( iOstHandler != NULL )
+        {
+        iKernelHandler = new DBTraceKernelCategoryHandler();
+        if ( iKernelHandler != NULL )
+            {
+            // Init calls RegisterCategoryHandler
+            ret = iKernelHandler->Init();
+            }
+        // Memory allocation failed
+        else
+            {
+            ret = KErrNoMemory;
+            }
+        }
+    // noelse
+
+    TC_TRACE( ETraceLevelError, Kern::Printf("DTraceCoreBTraceHandler::StartKernelHandler - %d", ret ) );
+    return ret;
+    }
+
+
+/**
+ * Called before SetWriter with interrupts enabled
+ * 
+ * @param aWriter Pointer to writer
+ */       
+void DTraceCoreBTraceHandler::PrepareSetWriter( DTraceCoreWriter* aWriter )
+    {
+    if ( iCategoryHandlers != NULL )
+        {
+        DTraceCoreHandler::PrepareSetWriter( aWriter );
+        // Delegates the writer to category handlers
+        DBTraceCategoryHandler* previousHandler = NULL;
+        for ( TInt i = 0; i < KBTraceCategoryCount; i++ )
+            {
+            DBTraceCategoryHandler* handler = iCategoryHandlers[ i ];
+            if ( handler != NULL && handler != previousHandler )
+                {
+                handler->PrepareSetWriter( aWriter );
+                previousHandler = handler;
+                }
+            }
+        }
+    }
+
+
+/**
+ * Sets the writer to be used for trace output
+ * 
+ * @param aWriter Pointer to writer
+ */       
+void DTraceCoreBTraceHandler::SetWriter( DTraceCoreWriter* aWriter )
+    {
+    OstTrace1( TRACE_FLOW, DTRACECOREBTRACEHANDLER_SETWRITER_ENTRY, "> DTraceCoreBTraceHandler::SetWriter 0x%x", ( TUint )&( aWriter ) );
+    if (aWriter)
+    	{
+		OstTrace1( TRACE_INTERNALS, DTRACECOREBTRACEHANDLER_SETWRITER_WRITERTYPE, "Writer type: %d", aWriter->GetWriterType() );
+		}
+    
+    if ( iCategoryHandlers != NULL )
+        {
+        DTraceCoreHandler::SetWriter( aWriter );
+        // Delegates the writer to category handlers
+        DBTraceCategoryHandler* previousHandler = NULL;
+        for ( TInt i = 0; i < KBTraceCategoryCount; i++ )
+            {
+            DBTraceCategoryHandler* handler = iCategoryHandlers[ i ];
+            if ( handler != NULL && handler != previousHandler )
+                {
+                handler->SetWriter( aWriter );
+                previousHandler = handler;
+                }
+            }
+        }
+    }
+
+
+/**
+ * Sets settings
+ * 
+ * @param aSettings Pointer to settings
+ */       
+void DTraceCoreBTraceHandler::SetSettings( DTraceCoreSettings* aSettings )
+    {
+    OstTrace1( TRACE_FLOW, DTRACECOREBTRACEHANDLER_SETSETTINGS_ENTRY, "> DTraceCoreBTraceHandler::SetSettings 0x%x", ( TUint )&( aSettings ) );
+    if ( iCategoryHandlers != NULL )
+        {
+        DTraceCoreHandler::SetSettings( aSettings );
+        // Delegates the settings saver to category handlers
+        DBTraceCategoryHandler* previousHandler = NULL;
+        for ( TInt i = 0; i < KBTraceCategoryCount; i++ )
+            {
+            DBTraceCategoryHandler* handler = iCategoryHandlers[ i ];
+            if ( handler != NULL && handler != previousHandler )
+                {
+                handler->SetSettings( aSettings );
+                previousHandler = handler;
+                }
+            }
+        }
+    }
+
+
+
+/**
+ * Registers a category handler
+ *
+ * @param aCategory The category to be processed with the category handler
+ * @param aHandler The handler which processes the category
+ */
+void DTraceCoreBTraceHandler::RegisterCategoryHandler( TUint8 aCategory, DBTraceCategoryHandler& aHandler )
+    {
+    OstTraceExt2( TRACE_FLOW, DTRACECOREBTRACEHANDLER_REGISTERCATEGORYHANDLER_ENTRY, "> DTraceCoreBTraceHandler::RegisterCategoryHandler. ID:0x%x Addr:0x%x", aCategory, ( TUint )&( aHandler ) );
+    if ( iCategoryHandlers != NULL )
+        {
+        iCategoryHandlers[ aCategory ] = &aHandler;
+
+        // BTrace kernel categories are not enabled by default
+        // MF added - commented out this code
+
+        if ( iWriter != NULL )
+            {
+            aHandler.SetWriter( iWriter );
+            }
+        if ( iSettings != NULL )
+            {
+            aHandler.SetSettings( iSettings );
+            }
+        OstTraceExt2( TRACE_NORMAL, DTRACECOREBTRACEHANDLER_REGISTERCATEGORYHANDLER_HANDLER_REGISTERED, "DTraceCoreBTraceHandler::RegisterCategoryHandler - Handler registered. ID:0x%x Addr:0x%x", aCategory, ( TUint )&( aHandler ) );
+        }
+    }
+
+
+/**
+ * Unregisters a category handler
+ *
+ * @param aCategory The category to be unregistered
+ */
+void DTraceCoreBTraceHandler::UnregisterCategoryHandler( TUint8 aCategory )
+    {
+    OstTrace1( TRACE_FLOW, DTRACECOREBTRACEHANDLER_UNREGISTERCATEGORYHANDLER_ENTRY, "> DTraceCoreBTraceHandler::UnregisterCategoryHandler. ID:0x%x", aCategory );
+    
+    // Unregister category handler
+    if ( iCategoryHandlers != NULL )
+        {
+        iCategoryHandlers[ aCategory ] = NULL;
+        BTrace::SetFilter( aCategory, 0 );
+        OstTrace1( TRACE_NORMAL, DTRACECOREBTRACEHANDLER_UNREGISTERCATEGORYHANDLER_UNREGISTERED, "DTraceCoreBTraceHandler::UnregisterCategoryHandler - Handler unregistered. ID:0x%x", aCategory );
+        }
+    }
+
+
+/**
+ * Callback function that is registered to BTrace.
+ * 
+ * Tracing is not allowed from this method.
+ *
+ * @param aHeader BTrace header
+ * @param aHeader2 Extra header data
+ * @param aContext The thread context in which this function was called
+ * @param a1 The first trace parameter
+ * @param a2 The second trace parameter
+ * @param a3 The third trace parameter
+ * @param aExtra Extra trace data
+ * @param aPc The program counter value
+ * @return ETrue if trace was processed, EFalse if not
+ */
+TBool DTraceCoreBTraceHandler::BTraceHandlerFunc( TUint32 aHeader, TUint32 aHeader2, const TUint32 aContext, 
+                                                  const TUint32 a1, const TUint32 a2, const TUint32 a3, 
+                                                  const TUint32 aExtra, const TUint32 aPc )
+    {
+    TBool retval;
+    DTraceCoreBTraceHandler* handler = DTraceCoreBTraceHandler::iInstance;
+    if ( handler != NULL && handler->iWriter != NULL )
+        {
+        DBTraceCategoryHandler* categoryHandler = handler->GetCategoryHandler( aHeader );
+        if ( categoryHandler != NULL )
+            {
+            retval = categoryHandler->HandleFrame( aHeader, aHeader2, aContext, a1, a2, a3, aExtra, aPc );
+            }
+        else
+            {
+            retval = EFalse;
+            }
+        }
+    else
+        {
+        retval = EFalse;
+        }
+    return retval;
+    }
+
+
+/**
+ * Gets the category handler for given BTrace header
+ *
+ * @param aHeader BTrace header
+ */
+inline DBTraceCategoryHandler* DTraceCoreBTraceHandler::GetCategoryHandler( TUint32 aHeader )
+    {
+    __ASSERT_DEBUG( iCategoryHandlers != NULL, Kern::Fault( "DTraceCoreBTraceHandler::GetCategoryHandler - NULL", KErrGeneral ) );
+    return iCategoryHandlers[ ( aHeader >> ( BTrace::ECategoryIndex * KByteSize ) ) & KByteMask ];
+    }
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/src/TraceCoreConfiguration.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,67 @@
+// 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 "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:
+//
+// Description:
+// TraceCore configuration message subscriber
+//
+
+#include "TraceCore.h"
+#include "TraceCoreConfiguration.h"
+
+
+DTraceCoreConfiguration::DTraceCoreConfiguration()
+    {
+    }
+
+DTraceCoreConfiguration::~DTraceCoreConfiguration()
+    {
+    }
+
+/**
+ * Init configuration
+ */         
+TInt DTraceCoreConfiguration::Init()
+    {
+    TInt err(KErrNone);
+    return err;
+    }
+
+/**
+ * GetSet
+ * 
+ * @param aFunc Function choosed (@see TTraceCoreConfiguration)
+ * @return Depending of aFunc paramter (@see TTraceCoreConfiguration)
+ */
+EXPORT_C TUint32 DTraceCoreConfiguration::GetSet(TTraceCoreConfiguration aFunc, TUint32 aParam)
+    {
+    TUint32 ret(0);
+    switch(aFunc)
+        {
+        case EGetCurrentWriterType:
+            {
+            ret = (TUint32) DTraceCore::GetInstance()->GetCurrentWriterType();
+            break;
+            }
+        case ESetWriter:
+            {
+            DTraceCore::GetInstance()->SwitchToWriter((TWriterType) aParam);
+            break;
+            }
+        case ELastFunction: // Go through
+        default:
+            __ASSERT_DEBUG( EFalse, 
+            Kern::Fault( "DTraceCoreConfiguration::GetSet: Default case!", KErrArgument ) );
+            ret = (TUint32) KErrNotSupported;
+        }
+    
+    return ret;
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/src/TraceCoreHandler.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,113 @@
+// 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 "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:
+//
+// Description:
+// Trace Core
+//
+
+#include "TraceCoreHandler.h"
+#include "TraceCore.h"
+#include "TraceCoreDebug.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "TraceCoreHandlerTraces.h"
+#endif
+
+
+
+/**
+ * Constructor
+ */
+DTraceCoreHandler::DTraceCoreHandler()
+: iWriter( NULL )
+, iSettings( NULL )
+    {
+    }
+
+
+/**
+ * Destructor
+ */
+DTraceCoreHandler::~DTraceCoreHandler()
+    {
+    iWriter = NULL;
+    Unregister();
+    }
+    
+
+/**
+ * Called before SetWriter with interrupts enabled
+ * 
+ * @param aWriter The new writer
+ */       
+void DTraceCoreHandler::PrepareSetWriter( DTraceCoreWriter* /*aWriter*/ )
+    {
+    }
+
+
+/**
+ * Sets active writer
+ * 
+ * @param aWriter The new writer
+ */       
+void DTraceCoreHandler::SetWriter( DTraceCoreWriter* aWriter )
+    {
+    iWriter = aWriter;
+    }
+
+
+/**
+ * Sets active settings (saver)
+ * 
+ * @param aSettings The new settings
+ */       
+void DTraceCoreHandler::SetSettings( DTraceCoreSettings* aSettings )
+    {
+    iSettings = aSettings;
+    }
+
+
+/**
+ * Registers this handler to TraceCore
+ */
+TInt DTraceCoreHandler::Register()
+    {
+    TInt ret = KErrGeneral;
+    
+    // Get TraceCore
+    DTraceCore* traceCore = DTraceCore::GetInstance();
+    if ( traceCore != NULL )
+        {      
+        // Register this as a handler
+        ret = traceCore->RegisterHandler( *this );
+        }
+    OstTrace1( TRACE_IMPORTANT , DTRACECOREHANDLER_REGISTER_NO_TRACECORE, "DTraceCoreHandler::Register - %d", ret);
+    return ret;
+    }
+
+
+/**
+ * Unregisters this handler from trace core
+ */
+void DTraceCoreHandler::Unregister()
+    {
+    OstTrace0( TRACE_FLOW, DTRACECOREHANDLER_UNREGISTER_ENTRY, "> DTraceCoreHandler::Unregister");
+    // Get TraceCore
+    DTraceCore* traceCore = DTraceCore::GetInstance();
+    if ( traceCore != NULL )
+        {
+        // Unregister this handler
+        traceCore->UnregisterHandler( *this );
+        }
+    }
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/src/TraceCoreInternalMessageHandler.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,333 @@
+// 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 "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:
+//
+// Description:
+// TraceCore configuration message subscriber
+//
+
+#include "TraceCoreInternalMessageHandler.h"
+#include "TraceCoreConstants.h"
+#include "TraceCoreDebug.h"
+#include "TraceCore.h"
+#include "TraceCoreMessageSender.h"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "TraceCoreInternalMessageHandlerTraces.h"
+#endif
+
+
+
+/**
+ * TraceCore protocol id
+ */
+const TInt KOSTTraceCoreProtocolId = 0x91;
+
+/**
+ * Version for version query
+ */
+const TInt KOSTVersionForVersionQuery = 0x00;
+
+/**
+ * Version / System protocol id
+ */
+const TInt KOSTVersionSystemProtocolId= 0x00;
+
+/**
+ * Version align request
+ */
+const TInt KOSTAlignVersionRequest = 0x00;
+
+/**
+ * Version align response
+ */
+const TInt KOSTAlignVersionResponse = 0x01;
+
+/**
+ * Version unsupported version error
+ * const TInt KOSTUnsupportedVersionError = 0xFD;
+ */
+
+/**
+ * Version MessageSyntaxError
+ * const TInt KOSTMessageSyntaxError = 0xFE;
+ */
+
+/**
+ * Version UnknownMessageError
+ * const TInt KOSTUnknownMessageError = 0xFF;
+ */
+
+/**
+ * Version MessageSyntaxError
+ */
+const TInt KOSTNoMatchingVersion = 0xFE;
+
+/**
+ * Version UnknownMessageError
+ * const TInt KOSTUnknownError = 0xFF;
+ */
+
+/**
+ * Higest supported version
+ */
+const TInt KOstHigestSupportedVersion = 0x01;
+
+/**
+ * Version protocol's transaction id offset after length
+ * offset related to data after header(4bytes)
+ * (4) 0 transaction id
+ * (5) 1 Message id
+ * (6) 2 Result
+ * (7) 3 Filler
+ */
+const TInt KOstVersionProtocolTransactionIdOffset = 0x00;
+
+/**
+ * Version protocol's message id offset after length
+ * offset related to data after header(4bytes)
+ */
+const TInt KOstVersionProtocolMessageIdOffset = 0x01;
+
+/**
+ * Version protocol's Result offset after length
+ * offset related to data after header(4bytes)
+ * used only in response
+ */
+const TInt KOstVersionProtocolResultRespOffset = 0x02;
+
+/**
+ * Version protocol's Filler offset after length
+ * offset related to data after header(4bytes)
+ * used only in response
+ */
+const TInt KOstVersionProtocolFillerRespOffset = 0x03;
+
+/**
+ * Version protocol's Versions field offset after length
+ * offset related to data after header(4bytes)
+ * used only in request
+ */
+const TInt KOstVersionProtocolVersionsRequestOffset = 0x02;
+
+/**
+ * Version protocol's Supported Version field offset after length
+ * offset related to data after header(4bytes)
+ * used only in response
+ */
+const TInt KOstVersionProtocolSupportedVersionsRespOffset = 0x04;
+
+/**
+ * KAlignVersionResponseDataLength
+ */
+const TInt KAlignVersionResponseDataLength = 0x05;
+
+/**
+ * Offset to message ID within configuration request
+ * const TInt KMessageIDOffset = 0;
+ */
+
+/**
+ * Media selection request length
+ */
+const TInt KPingReqLength = 1;
+
+/**
+ * Data length of response
+ */
+const TInt KResponseDataLength = 4;
+
+
+/**
+ * Offset to response message
+ */
+const TInt KRespMessageIdOffset = 0;
+
+/**
+ * Offset to response code
+ */
+const TInt KRespCodeOffset = 1;
+
+/**
+ * Offset to fillers
+ */
+const TInt KFillerOffset = 2;
+
+/**
+ * Filler byte value
+ */
+const TUint8 KFiller = 0;
+
+
+/**
+ * Constructor
+ */
+DTraceCoreInternalMessageHandler::DTraceCoreInternalMessageHandler()
+    {
+    }
+
+
+/**
+ * Destructor
+ */    
+DTraceCoreInternalMessageHandler::~DTraceCoreInternalMessageHandler()
+    {
+    }
+
+
+/**
+ * Init configuration
+ */         
+TInt DTraceCoreInternalMessageHandler::Init()
+    {
+    // Subscribe OST
+    TInt err = Subscribe( KOSTTraceCoreProtocolId, EMessageHeaderFormatOst );
+    if(err == KErrNone)
+        {
+        err = Subscribe( KOSTVersionSystemProtocolId, EMessageHeaderFormatOst );
+        }
+    TC_TRACE( ETraceLevelFlow, Kern::Printf( "< DTraceCoreInternalMessageHandler::Init - ret: %d", err ) );
+    return err;
+    }
+
+
+/**
+ * Callback when a trace activation message is received
+ *
+ * @param aMsg Reference to message
+ */
+void DTraceCoreInternalMessageHandler::MessageReceived( TTraceMessage &aMsg )
+    {
+    OstTrace1( TRACE_FLOW, DTraceCoreInternalMessageHandler_MESSAGERECEIVED_ENTRY, "> DTraceCoreInternalMessageHandler::MessageReceived - %d", aMsg.iMessageId);
+    TInt aVersion( ( *aMsg.iHeader )[ 0 ] );
+    
+    if (aVersion > KOSTVersionForVersionQuery)
+        {
+        // Add version check later and return KOSTUnsupportedVersionError if version not supported
+        
+        //Check that there is enough data
+        if ( aMsg.iData->Length() >= KPingReqLength )
+            {
+            TInt messageID( ( *aMsg.iData )[ 0 ] );
+            
+            // Select media request message
+            if ( messageID == 0x00 /* ping subprotocolId 0x00 in side TraceCore protocol 0x91 */ )
+                {
+                SendResponse( aMsg, messageID );
+                }
+            }
+        }
+    else
+        {
+        // Version query        
+        HandleOstVersionQuery( aMsg, 0 );
+        }        
+    }
+
+
+/**
+ * Sends a response message
+ * 
+ * @param aMsg the incoming message
+ * @param aResult the result code
+ */
+void DTraceCoreInternalMessageHandler::SendResponse( TTraceMessage& aMsg, TInt aMessageId )
+    {
+    OstTrace1( TRACE_FLOW, DTraceCoreInternalMessageHandler_SENDRESPONSE_ENTRY, "> DTraceCoreInternalMessageHandler::SendResponse - Msg.id %d", aMsg.iMessageId);
+    TUint8 respCode;
+    if ( aMessageId == 0x00 )
+        {
+        respCode = 0x01;
+        }
+    else
+        {
+        respCode = 0x02;
+        }
+        
+    TTraceMessage resp;
+    TBuf8< KResponseDataLength > respData;
+    respData.SetLength( KResponseDataLength );
+    respData[ KRespMessageIdOffset ] = aMessageId;
+    respData[ KRespCodeOffset ] = respCode;
+    for ( TInt i = KFillerOffset; i < KResponseDataLength; i++ )
+        {
+        respData[ i ] = KFiller;
+        }
+    // The original header from the request is set back to the message
+    //  -> Media API takes care of formatting the header
+    resp.iHeader = aMsg.iHeader;
+    resp.iData = &respData;
+    resp.iMessageId = KOSTTraceCoreProtocolId;
+    resp.iMsgFormat = aMsg.iMsgFormat;
+    iMessageSender->SendMessage( resp );
+    }
+
+/**
+ * Handle version query
+ * 
+ * @param aMsg the incoming message
+ * @param aResult the result code
+ */
+void DTraceCoreInternalMessageHandler::HandleOstVersionQuery( TTraceMessage& aMsg, TInt /*aMessageId*/ )
+    {
+    OstTrace1( TRACE_NORMAL, DTraceCoreInternalMessageHandler_HandleOstVersionQuery_entry, "DTraceCoreInternalMessageHandler::HandleOstVersionQuery Msg.id - %d", aMsg.iMessageId);
+    // Check if align request (should be! not other request under version protocol)
+    TInt higestSupportedVersion( 0x00 ); // 0x00 is sent if no  supported version
+    TInt messageId( ( *aMsg.iData )[ KOstVersionProtocolMessageIdOffset ] );
+    
+    if( messageId == KOSTAlignVersionRequest)
+        {    
+        // Read the list of supported versions in sender side and compare to phone side version
+        TInt versions = aMsg.iData->Length() - 2;
+        for( TInt i = 0; i < versions ; i++ )
+            {
+            TInt version( ( *aMsg.iData )[ KOstVersionProtocolVersionsRequestOffset+i ] );
+            
+            // Compare versions to supported version
+            // (When more version supported, create list and compare to it)
+            if ( version == KOstHigestSupportedVersion )
+                {
+                // Supported version found
+                higestSupportedVersion = version;
+                }
+            }
+            
+        TUint8 respResult = KOSTNoMatchingVersion;
+        
+        if ( higestSupportedVersion !=  0x00)
+            {
+            // Supported version found
+            respResult = 0x00; // Succeed
+            }
+        
+        TTraceMessage resp;
+        TBuf8< KAlignVersionResponseDataLength > respData;
+        respData.SetLength( KAlignVersionResponseDataLength ); // AlignVersionResponseDataLength
+        respData[ KOstVersionProtocolTransactionIdOffset ] = 0x00;
+        respData[ KOstVersionProtocolMessageIdOffset ] = KOSTAlignVersionResponse;
+        respData[ KOstVersionProtocolResultRespOffset ] = respResult;
+        respData[ KOstVersionProtocolFillerRespOffset ] = 0x00; // Filler
+        respData[ KOstVersionProtocolSupportedVersionsRespOffset ] = higestSupportedVersion;
+        
+        // The original header from the request is set back to the message
+        //  -> Media API takes care of formatting the header
+        resp.iHeader = aMsg.iHeader;
+        resp.iData = &respData;
+        resp.iMessageId = KOSTVersionSystemProtocolId;
+        resp.iMsgFormat = aMsg.iMsgFormat;
+        
+        iMessageSender->SendMessage( resp );
+        
+        }
+}
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/src/TraceCoreMediaIf.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,54 @@
+// 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 "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:
+//
+// Description:
+// Trace Core
+//
+
+#include "TraceCoreMediaIf.h"
+
+
+/**
+ * Constructor
+ * 
+ * @param aFlags the media flags
+ */
+DTraceCoreMediaIf::DTraceCoreMediaIf( TUint32 aFlags )
+: iCallback( NULL )
+, iFlags( aFlags )
+    {
+    }
+
+
+/**
+ * Sends a message
+ *
+ * @param aMsg The message to be sent
+ */
+TInt DTraceCoreMediaIf::Send( TTraceMessage& /*aMsg*/ )
+    {
+    return KErrNotSupported;
+    }
+
+
+/**
+ * Sends a trace
+ *
+ * @param aMsg The trace to be sent
+ */
+TInt DTraceCoreMediaIf::SendTrace( const TDesC8& /*aMsg*/ )
+    {
+    return KErrNotSupported;
+    }
+
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/src/TraceCoreMediaPlugin.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,142 @@
+// 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 "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:
+//
+// Description:
+// Trace Core media plugin
+//
+
+#include "TraceCoreMediaPlugin.h"
+#include "TraceCorePluginIf.h" 
+#include "TraceCore.h"
+#include "TraceCoreSendReceive.h"
+#include "TraceCoreMessageUtils.h"
+#include "OstTraceDefinitions.h"
+#include "TraceCoreSubscriber.h"
+
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "TraceCoreMediaPluginTraces.h"
+#endif
+
+
+
+/**
+ * Constructor
+ */
+EXPORT_C DTraceCoreMediaPlugin::DTraceCoreMediaPlugin()
+    {
+    }
+
+
+/**
+ * Destructor
+ */
+EXPORT_C DTraceCoreMediaPlugin::~DTraceCoreMediaPlugin()
+    {
+    Unregister();
+    }
+
+
+/**
+ * Registers this plug-in to TraceCore
+ */
+EXPORT_C TInt DTraceCoreMediaPlugin::Register()
+    {
+    TInt ret = KErrNone;
+    
+    // Get TraceCore
+    DTraceCore* traceCore = DTraceCore::GetInstance();
+    if ( traceCore != NULL )
+        {
+        
+        // Get TraceCore Plugin interface and register this as a plugin
+        DTraceCorePluginIf* media = traceCore->GetSendReceive().GetPluginIf();
+        if ( media != NULL )
+            {
+            ret = media->RegisterPlugin( *this );
+            }
+        else
+            {
+            ret = KErrGeneral;
+            }
+        }
+    else
+        {
+        ret = KErrGeneral;
+        }
+    OstTrace1( TRACE_BORDER, DTRACECOREMEDIAPLUGIN_REGISTER_EXIT, "< DTraceCoreMediaPlugin::Register. Ret:%d", ret );
+    return ret;
+    }
+
+
+/**
+ * Called by the plug-in to notify TraceCore that message was received
+ * 
+ * @param aMsg The message that was received
+ */
+EXPORT_C void DTraceCoreMediaPlugin::MessageReceived( TTraceMessage &aMsg )
+    {
+    OstTraceExt1( TRACE_BORDER, DTRACECOREMEDIAPLUGIN_MESSAGERECEIVED_ENTRY, "> DTraceCoreMediaPlugin::MessageReceived. MsgId:0x%hhx", aMsg.iMessageId );
+    DTraceCore* traceCore = DTraceCore::GetInstance();
+    if ( traceCore != NULL )
+        {
+        DTraceCorePluginIf* media = traceCore->GetSendReceive().GetPluginIf();
+        if ( media != NULL )
+            {
+            media->MessageReceived( aMsg );
+            }
+        }
+    }
+    
+
+/**
+ * Merges the header and data into a single buffer
+ * 
+ * @param aMsg Message to be sent.
+ * @param aMsgBlock The message block where data is merged
+ * @return Symbian error code
+ */
+EXPORT_C TInt DTraceCoreMediaPlugin::MergeHeaderAndData( const TTraceMessage& aMsg, TDes8& aTarget )
+	{
+	TInt ret = KErrNone;
+	TInt len = TTraceCoreMessageUtils::GetMessageLength( aMsg );
+	if ( len > 0 )
+		{
+		ret = TTraceCoreMessageUtils::MergeHeaderAndData( aMsg, aTarget );
+		}
+	else
+		{
+		ret = len;
+		}
+	OstTrace1( TRACE_FLOW, DTRACECOREMEDIAPLUGIN_MERGEHEADERANDDATA_EXIT, "< DTraceCoreMediaPlugin::MergeHeaderAndData. Ret:%d", ret );
+	return ret;
+	}
+ 
+/**
+ * Unregisters this plug-in
+ */
+void DTraceCoreMediaPlugin::Unregister()
+    {
+    // Get TraceCore
+    DTraceCore* traceCore = DTraceCore::GetInstance();
+    if ( traceCore != NULL )
+        {
+        
+        // Get Plugin interface and unregister this from it
+        DTraceCorePluginIf* media = traceCore->GetSendReceive().GetPluginIf();
+        if ( media != NULL )
+            {
+            media->UnregisterPlugin( *this );
+            }
+        }
+    }
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/src/TraceCoreMediaSWriter.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,363 @@
+// 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 "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:
+//
+// Description:
+// Trace Core
+//
+
+#include <kernel/kernel.h>
+
+#include "TraceCoreMediaSWriter.h"
+#include "TraceCoreMediaIf.h"
+#include "TraceCoreConstants.h"
+#include "TraceCore.h"
+#include "TraceCoreSendReceive.h"
+#include "TraceCoreDebug.h"
+
+
+//- Internal definitions ----------------------------------------------------
+#ifdef MEDIA_WRITER_STATISTICS
+
+/**
+ * Collects statistics about the media writer
+ */
+class TMediaSWriterStatistics
+    {
+public:
+    TUint32 iTraces;                // Number of traces received
+    TUint32 iSent;                  // Number of traces sent
+    TUint32 iFailed;                // Number of traces failed to send
+    TUint32 iMissed;                // Number of traces missed due to not enough buffers
+    TUint32 iSleepCount;            // Number of times the threads have slept waiting for buffers
+    TUint32 iCannotSleepCount;      // Number of times a thread could not be slept when it should
+    TUint32 iBlockCount;            // Number of times a thread has been blocked waiting for buffers
+    TUint32 iCannotBlockCount;      // Number of times a thread could not be blocked when it should
+    TUint32 iWaitDidNotHelp;        // Number of waits that did not help
+    TUint32 iMinFreeBuffers;        // Minimum number of free buffers since boot
+    TUint32 iInvalidContextTrace;   // Number of IRQ / IDFC traces ignored
+    TUint32 iIdlePings;             // Statistics are written after some idle time
+    TBool iStatisticsChanged;       // Flags indicating change in statistics
+    };
+
+/**
+ * Macro to wrap statistics-related code
+ */
+#define STATS( x ) x
+
+/**
+ * Initializes the statistics structure
+ */
+TBool DTraceCoreMediaSWriter::InitStatistics()
+    {
+    iStatistics = new TMediaSWriterStatistics();
+    return iStatistics != NULL;
+    }
+
+#else
+
+/**
+ * Empty class for statistics if flag is not set
+ */
+class TMediaSWriterStatistics {};
+
+#define STATS( x )
+
+#endif
+
+
+/**
+ * Max length of one trace
+ */
+const TUint32 KMaxBufLength = 256;
+
+/**
+ * Number of traces that can be buffered
+ */
+const TUint32 KBufCount = 1;
+
+/**
+ * Constructor
+ */
+EXPORT_C DTraceCoreMediaSWriter::DTraceCoreMediaSWriter()
+: DTraceCoreWriter( EWriterTypeUSBPhonet )
+, iSendDfc( DTraceCoreMediaSWriter::SendDfc, this, DTraceCore::GetActivationQ(), KDefaultDfcPriority )
+, iSendTimerActive( EFalse )
+, iFirstFreeBuffer( NULL )
+, iFirstReadyBuffer( NULL )
+, iLastReadyBuffer( NULL )
+, iTraceBuffers( NULL )
+, iFreeBuffers( KBufCount )
+, iSenderThread( NULL )
+, iLastTraceSent( 0 )
+, iStatistics( NULL )
+    {
+    // No implementation in constructor
+    }
+
+
+/**
+ * Destructor
+ */
+EXPORT_C DTraceCoreMediaSWriter::~DTraceCoreMediaSWriter()
+    {
+    // Delete all trace buffers
+    for ( TUint i = 0; i < KBufCount; i++ )
+        {
+        delete[] iTraceBuffers[ i ].iBuffer;
+        }
+
+    delete[] iTraceBuffers;
+    delete iStatistics;
+    }
+
+
+/**
+ * Registers this writer to TraceCore
+ *
+ * @return KErrNone if successful
+ */
+EXPORT_C TInt DTraceCoreMediaSWriter::Register()
+    {
+    // Media writer uses the media interface from SendReceive
+    TInt retval( KErrGeneral );
+
+    // Get TraceCore
+    DTraceCore* traceCore = DTraceCore::GetInstance();
+    if ( traceCore != NULL )
+        {
+
+        // Get MediaWriter interface
+        DTraceCoreMediaIf* writerIf = traceCore->GetSendReceive().GetMediaWriterIf();
+        if ( writerIf != NULL )
+            {
+            // Allocates memory for the trace buffers
+            TBool memOK = ETrue;
+            STATS( memOK = InitStatistics() );
+            if(memOK)
+                {
+                iTraceBuffers = new TTraceBuffer[ KBufCount ];
+                }
+            if (iTraceBuffers == NULL)
+                {
+                memOK=EFalse;
+                }
+            if ( memOK )
+                {
+                for ( TUint i = 0; i < KBufCount && memOK; i++ )
+                    {
+                    iTraceBuffers[ i ].iBuffer = new TUint8[ KMaxBufLength ];
+                    if (iTraceBuffers[ i ].iBuffer == NULL )
+                        {
+                        memOK = EFalse;
+                        }
+                    if ( memOK )
+                        {
+                        // Initially all buffers are linked to iFirstFreeBuffer
+                        // Casting needed to work around armv5 "pointless comparison of unsigned integer with zero" warning
+                        if ( (TInt) i < (TInt) ( KBufCount - 1 ) )
+                            {
+                            iTraceBuffers[ i ].iNext = &( iTraceBuffers[ i + 1 ] );
+                            }
+                        }
+                    else
+                        {
+                        memOK = EFalse;
+                        }
+                    }
+                }
+            else
+                {
+                memOK = EFalse;
+                }
+
+            // Memory was allocated succesfully
+            if ( memOK )
+                {
+                iFastCounterBetweenTraces = NKern::FastCounterFrequency() / GetTraceFrequency();
+                iFirstFreeBuffer = iTraceBuffers;
+
+                // Register to the TraceCore
+                retval = DTraceCoreWriter::Register();
+                if ( retval == KErrNone )
+                    {
+                    iMediaIf = writerIf;
+                    }
+                }
+            else
+                {
+                retval = KErrNoMemory;
+                }
+            }
+        }
+    TC_TRACE( ETraceLevelFlow, Kern::Printf("<DTraceCoreMediaSWriter::Register - %d", retval) );
+    return retval;
+    }
+
+
+/**
+ * Starts an entry
+ *
+ * @param aType the type of the trace entry
+ * @return the entry ID that is passed to other Write-functions
+ */
+EXPORT_C TUint32 DTraceCoreMediaSWriter::WriteStart( TWriterEntryType aType )
+    {
+
+    // Detaches the first free buffer from the free buffers list
+    TInt context( NKern::CurrentContext() );
+    TTraceBuffer* freeBuf = NULL;
+
+    if ( context == NKern::EThread || context == NKern::EIDFC )
+        {
+#ifndef __SMP__
+        // In non SMP env the __SPIN_LOCK macro is empty. We need Kern::Lock.
+		NKern::Lock(); // Unlocked in WriteEnd
+#else
+		//already locked by BTrace spin lock
+#endif
+
+		freeBuf = iFirstFreeBuffer;
+
+        if ( freeBuf != NULL )
+            {
+            StartBuffer( aType, *freeBuf );
+            }
+        }
+    else
+        {
+        freeBuf = NULL;
+        }
+
+    return ( TUint32 )freeBuf;
+    }
+
+
+/**
+ * Ends an entry
+ *
+ * @param aEntryId the entry ID returned by WriteStart
+ * @param aWriteEndingZero If ETrue, write ending zero.
+ */
+EXPORT_C void DTraceCoreMediaSWriter::WriteEnd( TUint32 aEntryId  )
+    {
+
+    if ( aEntryId != 0 )
+        {
+        TTraceBuffer* buf = ( TTraceBuffer* )aEntryId;
+        TBool drop = EndBuffer( *buf );
+
+        if( !drop ) //trace isn't dropped
+            {
+            iSendDfc.RawAdd();
+            }
+
+        // Locked in WriteStart
+#ifndef __SMP__
+        // In non SMP the __SPIN_LOCK macro is empty. We need Kern::Unlock.
+		NKern::Unlock(); // Locked in WriteStart
+#else
+		//BTrace lock is used from outside of this method.
+#endif
+        }
+    }
+
+
+/**
+ * Writes 8-bit data to given entry
+ *
+ * @param aEntryId the entry ID returned by WriteStart
+ * @param aData the trace data
+ */
+EXPORT_C void DTraceCoreMediaSWriter::WriteData( TUint32 aEntryId, TUint8 aData )
+    {
+    if ( aEntryId != 0 )
+        {
+        TTraceBuffer* buf = ( TTraceBuffer* )aEntryId;
+        if ( buf->iLength < KMaxBufLength )
+            {
+            *( buf->iBuffer + buf->iLength ) = aData;
+            buf->iLength++;
+            }
+        }
+    }
+
+
+/**
+ * Writes 16-bit data to given entry
+ *
+ * @param aEntryId the entry ID returned by WriteStart
+ * @param aData the trace data
+ */
+EXPORT_C void DTraceCoreMediaSWriter::WriteData( TUint32 aEntryId, TUint16 aData )
+    {
+    if ( aEntryId != 0 )
+        {
+        TTraceBuffer* buf = ( TTraceBuffer* )aEntryId;
+        if ( buf->iLength + sizeof ( TUint16 ) <= KMaxBufLength )
+            {
+            *( ( TUint16* )( buf->iBuffer + buf->iLength ) ) = aData;
+            buf->iLength += sizeof ( TUint16 );
+            }
+        }
+    }
+
+
+/**
+ * Writes 32-bit data to given entry
+ *
+ * @param aEntryId the entry ID returned by WriteStart
+ * @param aData the trace data
+ */
+EXPORT_C void DTraceCoreMediaSWriter::WriteData( TUint32 aEntryId, TUint32 aData )
+    {
+    if ( aEntryId != 0 )
+        {
+        TTraceBuffer* buf = ( TTraceBuffer* )aEntryId;
+        if ( buf->iLength + sizeof ( TUint32 ) <= KMaxBufLength )
+            {
+            *( ( TUint32* )( buf->iBuffer + buf->iLength ) ) = SWAP_DATA( aData );
+            buf->iLength += sizeof ( TUint32 );
+            }
+        }
+    }
+
+
+/**
+ * DFC for sending data
+ *
+ * @param aMediaWriter the media writer
+ */
+void DTraceCoreMediaSWriter::SendDfc( TAny* aMediaWriter )
+    {
+    DTraceCoreMediaSWriter* writer = static_cast< DTraceCoreMediaSWriter* >( aMediaWriter );
+    writer->SendDfc();
+    }
+
+
+/**
+ * Called from static DFC function to send a buffer
+ */
+void DTraceCoreMediaSWriter::SendDfc()
+    {
+    // Create and send note random values
+    TBuf8<64> note; // CodForChk_Dis_Magic
+    note.Append(0xAE); // Dont care, CodForChk_Dis_Magic
+    note.Append(0xAE); // Dont care, CodForChk_Dis_Magic
+    note.Append(0x00); // Lentght MSB, CodForChk_Dis_Magic
+    note.Append(0x02); // Length LSB, CodForChk_Dis_Magic
+    note.Append(0xED); // Dont care, CodForChk_Dis_Magic
+    note.Append(0xED); // Dont care, CodForChk_Dis_Magic
+
+    iMediaIf->SendTrace( note );
+    }
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/src/TraceCoreMediaWriter.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,587 @@
+// 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 "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:
+//
+// Description:
+// Trace Core
+//
+
+#include <kernel/kernel.h>
+#include <nkern/nk_priv.h> // Symbian internal -> Needed for kernel lock and NThread mutex state
+
+#include "TraceCoreMediaWriter.h" 
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "TraceCoreMediaWriterTraces.h"
+#endif
+
+
+
+//- Internal definitions ----------------------------------------------------
+#ifdef MEDIA_WRITER_STATISTICS
+
+/**
+ * Collects statistics about the media writer
+ */
+class TMediaWriterStatistics
+    {
+public:
+    TUint32 iTraces;                // Number of traces received
+    TUint32 iSent;                  // Number of traces sent
+    TUint32 iFailed;                // Number of traces failed to send
+    TUint32 iMissed;                // Number of traces missed due to not enough buffers
+    TUint32 iSleepCount;            // Number of times the threads have slept waiting for buffers
+    TUint32 iCannotSleepCount;      // Number of times a thread could not be slept when it should
+    TUint32 iBlockCount;            // Number of times a thread has been blocked waiting for buffers
+    TUint32 iCannotBlockCount;      // Number of times a thread could not be blocked when it should
+    TUint32 iWaitDidNotHelp;        // Number of waits that did not help
+    TUint32 iMinFreeBuffers;        // Minimum number of free buffers since boot
+    TUint32 iInvalidContextTrace;   // Number of IRQ / IDFC traces ignored
+    TUint32 iIdlePings;             // Statistics are written after some idle time
+    TBool iStatisticsChanged;       // Flags indicating change in statistics
+    };
+
+/**
+ * Macro to wrap statistics-related code
+ */
+#define STATS( x ) x
+    
+/**
+ * Initializes the statistics structure
+ */
+TBool DTraceCoreMediaWriter::InitStatistics()
+    {
+    iStatistics = new TMediaWriterStatistics();
+    return iStatistics != NULL;
+    }
+
+/**
+ * Number of idle timer pings before sending statistics
+ */
+const TUint KPingsBeforeStatistics = 640;
+
+#else
+
+/**
+ * Empty class for statistics if flag is not set
+ */
+class TMediaWriterStatistics {};
+
+#define STATS( x )
+    
+#endif
+
+
+/**
+ * Max length of one trace
+ */
+const TUint32 KMaxBufLength = 256;
+
+/**
+ * Number of traces that can be buffered
+ */
+const TUint32 KBufCount = 2048;
+
+/**
+ * Send timer ping frequency in milliseconds
+ */
+const TUint KTimerPing = 10000;
+
+/**
+ * Starts to sleep threads when lots of buffers are in use
+ */
+const TUint32 KSleepBufLimit = 512;
+
+/**
+ * Ticks to sleep when using NKern::Sleep
+ */
+const TUint32 KSleepTicks = 1;
+
+/**
+ * Ticks to sleep when using Kern::NanoWait
+ */
+const TUint32 KNanoWaitTicks = 10000;
+
+/**
+ * Starts to block threads when running out of buffers
+ */
+const TUint32 KBlockBufLimit = 32;
+
+/**
+ * Maximum number of loops to run when blocking
+ */
+const TInt KMaxBlockLoops = 100;
+
+
+/**
+ * Constructor
+ */
+EXPORT_C DTraceCoreMediaWriter::DTraceCoreMediaWriter()
+: DTraceCoreWriter( EWriterTypeUSBPhonet )
+, iSendDfc( DTraceCoreMediaWriter::SendDfc, this, DTraceCore::GetActivationQ()), KDefaultDfcPriority )
+, iSendTimerActive( EFalse )
+, iFirstFreeBuffer( NULL )
+, iFirstReadyBuffer( NULL )
+, iLastReadyBuffer( NULL )
+, iTraceBuffers( NULL )
+, iFreeBuffers( KBufCount )
+, iSenderThread( NULL )
+, iLastTraceSent( 0 )
+, iStatistics( NULL )
+    {
+    // No implementation in constructor 
+    }
+
+
+/**
+ * Destructor
+ */
+EXPORT_C DTraceCoreMediaWriter::~DTraceCoreMediaWriter()
+    {
+    
+    // Delete all trace buffers
+    for ( int i = 0; i < KBufCount; i++ )
+        {
+        delete[] iTraceBuffers[ i ].iBuffer;
+        }
+    
+    delete[] iTraceBuffers;
+    delete iStatistics;
+    }
+
+
+/**
+ * Registers this writer to TraceCore
+ * 
+ * @return KErrNone if successful
+ */
+EXPORT_C TInt DTraceCoreMediaWriter::Register()
+    {
+    // Media writer uses the media interface from SendReceive
+    TInt retval( KErrGeneral );
+    
+    // Get TraceCore
+    DTraceCore* traceCore = DTraceCore::GetInstance();
+    if ( traceCore != NULL )
+        {
+        
+        // Get MediaWriter interface
+        DTraceCoreMediaIf* writerIf = traceCore->GetSendReceive().GetMediaWriterIf();
+        if ( writerIf != NULL )
+            {
+            // Allocates memory for the trace buffers
+            TBool memOK = ETrue;
+            STATS( memOK = InitStatistics() );
+            if (memOK)
+                {
+                iTraceBuffers = new TTraceBuffer[ KBufCount ];
+                }
+            if ( iTraceBuffers == NULL )
+                {
+                memOK = EFalse;
+                }
+            if ( memOK  )
+                {
+                for ( int i = 0; i < KBufCount && memOK; i++ )
+                    {
+                    iTraceBuffers[ i ].iBuffer = new TUint8[ KMaxBufLength ];
+                    if (iTraceBuffers[ i ].iBuffer == NULL)
+                        {
+                        memOK = EFalse;
+                        }
+                    if ( memOK )
+                        {
+                        // Initially all buffers are linked to iFirstFreeBuffer
+                        if ( i < ( KBufCount - 1 ) )
+                            {
+                            iTraceBuffers[ i ].iNext = &( iTraceBuffers[ i + 1 ] );
+                            }
+                        }
+                    else
+                        {
+                        memOK = EFalse;
+                        }
+                    }
+                }
+            else
+                {
+                memOK = EFalse;
+                }
+            
+            // Memory was allocated succesfully
+            if ( memOK )
+                {
+                iFastCounterBetweenTraces = NKern::FastCounterFrequency() / GetTraceFrequency();
+                iFirstFreeBuffer = iTraceBuffers;
+                
+                // Register to the TraceCore
+                retval = DTraceCoreWriter::Register();
+                if ( retval == KErrNone )
+                    {
+                    OstTrace0( TRACE_NORMAL, DTRACECOREMEDIAWRITER_REGISTER_WRITER_REGISTERED,
+                    		"DTraceCoreMediaWriter::Register - Media writer registered");
+                    iMediaIf = writerIf;
+                    }
+                }
+            else
+                {
+                OstTrace0( TRACE_IMPORTANT , DTRACECOREMEDIAWRITER_REGISTER_MEM_ALLOC_FAILED,
+                		"DTraceCoreMediaWriter::Register - Failed to allocate memory");
+                retval = KErrNoMemory;
+                }
+            }
+        }
+    OstTrace1( TRACE_BORDER, DTRACECOREMEDIAWRITER_REGISTER_EXIT, "< DTraceCoreMediaWriter::Register. Ret:%d", retval );
+    return retval;
+    }
+
+
+/*
+ * Timer callback enques the DFC
+ * 
+ * @param aMediaWriter the media writer
+ */
+void DTraceCoreMediaWriter::SendTimerCallback( TAny* aMediaWriter )
+    {
+    DTraceCoreMediaWriter* writer = static_cast< DTraceCoreMediaWriter* >( aMediaWriter );
+    writer->SendTimerCallback();
+    }
+
+
+/*
+ * Called from the static timer callback function
+ */
+void DTraceCoreMediaWriter::SendTimerCallback()
+    {
+    NKern::Lock();
+    if ( iFreeBuffers < KBufCount )
+        {
+        STATS( iStatistics->iIdlePings = 0 );
+        
+        // Kernel locked, can call DoEnque
+        iSendDfc.DoEnque(); 
+        }
+    else
+        {
+        STATS( iStatistics->iIdlePings++ );
+#ifndef MEDIA_WRITER_STATISTICS
+        // The callback timer is stopped unless writing statistics
+        iSendTimer.Cancel();
+        iSendTimerActive = EFalse;
+#endif
+        }
+    NKern::Unlock();
+#ifdef MEDIA_WRITER_STATISTICS
+    if ( iStatistics->iIdlePings == KPingsBeforeStatistics && iStatistics->iStatisticsChanged )
+        {
+        
+        // Print out trace statistics
+        OstTraceExt4( TRACE_INTERNAL, DTRACECOREMEDIAWRITER_STATISTICS,
+        		"DTraceCoreMediaWriter - Statistics. Traces:%u Missed:%u Sent:%u Failed:%u",
+        		iStatistics->iTraces, iStatistics->iMissed, iStatistics->iSent, iStatistics->iFailed );
+        
+        // Print out sleep / wait statistics
+        OstTraceExt4( TRACE_INTERNAL, DTRACECOREMEDIAWRITER_SLEEPS,
+        		"DTraceCoreMediaWriter - Sleep / wait statistics. Sleeps:%u CannotSleeps:%u Blocks:%u CannotBlocks:%u",
+        		iStatistics->iSleepCount, iStatistics->iCannotSleepCount, iStatistics->iBlockCount,
+        		iStatistics->iCannotBlockCount );
+        
+        // Print out timer values
+        OstTraceExt4( TRACE_INTERNAL, DTRACECOREMEDIAWRITER_TIMERS,
+        		"DTraceCoreMediaWriter - Timer values %d %d %d %d",
+        		(TInt)NKern::TickCount(), (TInt)NKern::FastCounter(), (TInt)NKern::TickPeriod(),
+        		(TInt)NKern::FastCounterFrequency() );
+        
+        // Print out misc statistics
+        OstTraceExt3( TRACE_INTERNAL, DTRACECOREMEDIAWRITER_MISC,
+        		"DTraceCoreMediaWriter - Misc statistics WaitDidntHelp:%u MinFreeBuffers:%u InvalidContextTraces%u",
+        		iStatistics->iWaitDidNotHelp, iStatistics->iMinFreeBuffers, iStatistics->iInvalidContextTrace );
+        iStatistics->iStatisticsChanged = EFalse;
+        }
+#endif
+    }
+
+
+/**
+ * Starts an entry
+ * 
+ * @param aType the type of the trace entry
+ * @return the entry ID that is passed to other Write-functions
+ */
+EXPORT_C TUint32 DTraceCoreMediaWriter::WriteStart( TWriterEntryType aType )
+    {
+    // Detaches the first free buffer from the free buffers list
+    TInt context( NKern::CurrentContext() );
+    TTraceBuffer* freeBuf = NULL;
+    STATS( iStatistics->iStatisticsChanged = ETrue );
+    if ( context == NKern::EThread )
+        {
+        NKern::Lock();
+        freeBuf = iFirstFreeBuffer;
+        if ( freeBuf != NULL )
+            {
+            iFirstFreeBuffer = freeBuf->iNext;
+            freeBuf->iNext = NULL;
+            freeBuf->iMissedBefore = 0;
+            iFreeBuffers--;
+            STATS( iStatistics->iMinFreeBuffers = ( iFreeBuffers < iStatistics->iMinFreeBuffers )
+                    ? iFreeBuffers : iStatistics->iMinFreeBuffers );
+            // Timer is activated and stays active until all buffers are empty
+            if ( !iSendTimerActive )
+                {
+                iSendTimer.Periodic( KTimerPing, SendTimerCallback, this );
+                iSendTimerActive = ETrue;
+                }
+            }
+        else
+            {
+            iFirstReadyBuffer->iMissedBefore++;
+            STATS( iStatistics->iMissed++ );
+            }
+        NKern::Unlock();
+        if ( freeBuf != NULL )
+            {
+            StartBuffer( aType, *freeBuf );
+            }
+        }
+    else
+        {
+        STATS( iStatistics->iInvalidContextTrace++ );
+        freeBuf = NULL;
+        }
+    return ( TUint32 )freeBuf;
+    }
+
+
+/**
+ * Ends an entry
+ *
+ * @param aEntryId the entry ID returned by WriteStart
+ */
+EXPORT_C void DTraceCoreMediaWriter::WriteEnd( TUint32 aEntryId )
+    {
+    if ( aEntryId != 0 )
+        {
+        TTraceBuffer* buf = ( TTraceBuffer* )aEntryId;
+        EndBuffer( *buf );
+        // If there's no existing ready buffers, the new buffer is set as first.
+        // Otherwise, it is assigned to the end of the ready buffers queue
+        NKern::Lock();
+        if ( iFirstReadyBuffer == NULL )
+            {
+            iFirstReadyBuffer = buf;
+            }
+        else
+            {
+            iLastReadyBuffer->iNext = buf;
+            }
+        iLastReadyBuffer = buf;
+        STATS( iStatistics->iTraces++ );
+        NKern::Unlock();
+        // Queues the DFC that sends the trace out. The DFC checks the timestamp of the 
+        // last trace sent, so the trace might not be immediately sent out.
+        iSendDfc.Enque();
+
+        // If the number of buffers is below the sleep limit, this thread is slept for a while.
+        // If the number of buffers is below the block limit after sleep, 
+        // this thread is slept for longer time
+        // Pre-conditions for Sleep:
+        //  - Sleeping thread must not be the one sending traces out
+        //  - Kernel must not be locked
+        //  - Fast mutex must not be held by the thread
+        if ( iFreeBuffers < KSleepBufLimit )
+            {
+            NThread* thread( NKern::CurrentThread() );
+            if ( thread != iSenderThread && thread->iHeldFastMutex == NULL && !TScheduler::Ptr()->iKernCSLocked )
+                {
+                STATS( iStatistics->iSleepCount++ );
+                // User-side threads can use NKern::Sleep
+#ifdef __WINS__
+                TInt type = 0;
+#else
+                TInt type = NKern::CurrentThread()->UserContextType();
+#endif
+                Block( type );
+                if ( iFreeBuffers < KBlockBufLimit )
+                    {
+                    STATS( iStatistics->iBlockCount++ );
+                    TInt loops = 0;
+                    while ( ( iFreeBuffers < KBlockBufLimit ) && ( ++loops ) < KMaxBlockLoops )
+                        {
+                        iSendDfc.Enque();
+                        Block( type );
+                        }
+                    if ( loops == KMaxBlockLoops )
+                        {
+                        STATS( iStatistics->iWaitDidNotHelp++ );
+                        }
+                    }
+                }
+            else
+                {
+                STATS( iStatistics->iCannotSleepCount++ );
+                if ( iFreeBuffers < KBlockBufLimit )
+                    {
+                    STATS( iStatistics->iCannotBlockCount++ );
+                    }
+                }
+            }
+        }
+    }
+
+
+/**
+ * Blocks the current thread for a while
+ * 
+ * @param aType the context type from NThread::UserContextType
+ */
+void DTraceCoreMediaWriter::Block( TInt aType )
+    {
+#ifdef __WINS__
+    ( void )aType;
+    NKern::Sleep( KSleepTicks );
+#else
+    if ( aType == NThread::EContextExec )
+        {
+        NKern::Sleep( KSleepTicks );
+        }
+    else
+        {
+        Kern::NanoWait( KNanoWaitTicks );
+        }
+#endif
+    }
+
+
+/**
+ * Writes 8-bit data to given entry
+ * 
+ * @param aEntryId the entry ID returned by WriteStart
+ * @param aData the trace data
+ */
+EXPORT_C void DTraceCoreMediaWriter::WriteData( TUint32 aEntryId, TUint8 aData )
+    {
+    if ( aEntryId != 0 )
+        {
+        TTraceBuffer* buf = ( TTraceBuffer* )aEntryId;
+        if ( buf->iLength < KMaxBufLength )
+            {
+            *( buf->iBuffer + buf->iLength ) = aData;
+            buf->iLength++;
+            }
+        }
+    }
+
+
+/**
+ * Writes 16-bit data to given entry
+ * 
+ * @param aEntryId the entry ID returned by WriteStart
+ * @param aData the trace data
+ */
+EXPORT_C void DTraceCoreMediaWriter::WriteData( TUint32 aEntryId, TUint16 aData )
+    {
+    if ( aEntryId != 0 )
+        {
+        TTraceBuffer* buf = ( TTraceBuffer* )aEntryId;
+        if ( buf->iLength + sizeof ( TUint16 ) <= KMaxBufLength )
+            {
+            *( ( TUint16* )( buf->iBuffer + buf->iLength ) ) = aData;
+            buf->iLength += sizeof ( TUint16 );
+            }
+        }
+    }
+
+
+/**
+ * Writes 32-bit data to given entry
+ * 
+ * @param aEntryId the entry ID returned by WriteStart
+ * @param aData the trace data
+ */
+EXPORT_C void DTraceCoreMediaWriter::WriteData( TUint32 aEntryId, TUint32 aData )
+    {
+    if ( aEntryId != 0 )
+        {
+        TTraceBuffer* buf = ( TTraceBuffer* )aEntryId;
+        if ( buf->iLength + sizeof ( TUint32 ) <= KMaxBufLength )
+            {
+            *( ( TUint32* )( buf->iBuffer + buf->iLength ) ) = SWAP_DATA( aData );
+            buf->iLength += sizeof ( TUint32 );
+            }
+        }
+    }
+
+
+/**
+ * DFC for sending data
+ * 
+ * @param aMediaWriter the media writer
+ */
+void DTraceCoreMediaWriter::SendDfc( TAny* aMediaWriter )
+    {
+    DTraceCoreMediaWriter* writer = static_cast< DTraceCoreMediaWriter* >( aMediaWriter );
+    writer->SendDfc();
+    }
+
+
+/**
+ * Called from static DFC function to send a buffer
+ */
+void DTraceCoreMediaWriter::SendDfc()
+    {
+    if ( iSenderThread == NULL )
+        {
+        iSenderThread = NKern::CurrentThread();
+        }
+    TUint32 time = NKern::FastCounter();
+    // Timestamp is checked so that this does not send too frequently
+    // Otherwise the USB Phonet Link will crash
+    // FastCounter may overflow, so the less than check is also needed
+    if ( time > ( iLastTraceSent + iFastCounterBetweenTraces ) || ( time < iLastTraceSent ) )
+        {
+        // Gets the first buffer that is ready for sending.
+        // Assigns the next buffer as first ready buffer
+        NKern::Lock();
+        TTraceBuffer* buf = iFirstReadyBuffer;
+        if ( buf != NULL )
+            {
+            iFirstReadyBuffer = buf->iNext;
+            }
+        NKern::Unlock();
+        if ( buf != NULL )
+            {
+            TPtrC8 ptr( buf->iBuffer, buf->iLength );
+            TInt res = iMediaIf->SendTrace( ptr );
+            // After sending the buffer is moved to the free buffers list
+            NKern::Lock();
+            if ( res != KErrNone )
+                {
+                STATS( iStatistics->iFailed++ );
+                if ( iFirstReadyBuffer != NULL )
+                    {
+                    iFirstReadyBuffer->iMissedBefore += buf->iMissedBefore;
+                    }
+                }
+            else
+                {
+                STATS( iStatistics->iSent++ );
+                }
+            buf->iNext = iFirstFreeBuffer;
+            iFirstFreeBuffer = buf;
+            iFreeBuffers++;
+            NKern::Unlock();
+            iLastTraceSent = time;
+            }
+        }
+    }
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/src/TraceCoreMessageUtils.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,223 @@
+// 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 "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:
+//
+// Description:
+// Utility functions for ISI messaging
+//
+
+/*
+
+NOTE these following values are lifted from s60 env
+for example pn_const.h is in epoc32\internal
+
+but this just includes another version accordinng to variant
+these are
+
+icpr82
+icpr91
+icpr92
+
+The same is true for  phonetisi.h
+
+The #defined values ARE THE SAME for all these variants - thats not to say they wont change in future
+*/
+
+#define ISI_HEADER_OFFSET_MEDIA          0
+#define ISI_HEADER_OFFSET_RECEIVERDEVICE 1
+#define ISI_HEADER_OFFSET_SENDERDEVICE   2
+#define ISI_HEADER_OFFSET_RESOURCEID     3
+#define ISI_HEADER_OFFSET_LENGTH         4
+#define ISI_HEADER_OFFSET_RECEIVEROBJECT 6
+#define ISI_HEADER_OFFSET_SENDEROBJECT   7
+#define ISI_HEADER_OFFSET_TRANSID        8
+#define ISI_HEADER_OFFSET_MESSAGEID      9
+#define ISI_HEADER_OFFSET_SUBMESSAGEID  10
+
+#define ISI_HEADER_SIZE                  8
+
+// For extended resourc id handling
+#define ISI_HEADER_OFFSET_TYPE          10
+#define ISI_HEADER_OFFSET_SUBTYPE       11
+
+
+#define PN_HEADER_SIZE                  0x06 /* 6, Note data[0]/[1] excluded */
+
+#include "TraceCoreMessageUtils.h"
+#include "TraceCoreSubscriber.h"
+#include "TraceCoreOstHeader.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "TraceCoreMessageUtilsTraces.h"
+#endif
+
+/*
+ * ISI header remainder length, 2 + 2 filler bytes
+ */
+#ifdef __ISI_SUPPORTED__
+const TInt KIsiHeaderRemainder = 4;
+#endif
+
+/*
+ * Shift one byte
+ */
+const TInt KByteShift = 8;
+
+/*
+ * Byte mask value
+ */
+const TInt KByteMask = 0xFF;
+
+
+/**
+ * Merges the header and data into a single buffer
+ *
+ * @param aMsg Message to be sent.
+ * @param aMsgBlock The message block where data is merged
+ * @return Symbian error code
+ */
+TInt TTraceCoreMessageUtils::MergeHeaderAndData( const TTraceMessage& aMsg, TDes8& aTarget )
+	{
+    TInt ret(KErrNotSupported);
+    if ( aMsg.iMsgFormat == EMessageHeaderFormatProprietary )
+        {
+#ifdef __ISI_SUPPORTED__
+        // Merge header and data
+        aTarget.Copy( *aMsg.iHeader );
+        aTarget.Append( *aMsg.iData );
+
+        // Flip receiver and sender devices
+        TUint8 tmp = aTarget[ ISI_HEADER_OFFSET_RECEIVERDEVICE ];
+        aTarget[ ISI_HEADER_OFFSET_RECEIVERDEVICE ] = aTarget[ ISI_HEADER_OFFSET_SENDERDEVICE ];
+        aTarget[ ISI_HEADER_OFFSET_SENDERDEVICE ] = tmp;
+
+        // Flip receiver and sender objects
+        tmp = aTarget[ ISI_HEADER_OFFSET_RECEIVEROBJECT ];
+        aTarget[ ISI_HEADER_OFFSET_RECEIVEROBJECT ] = aTarget[ ISI_HEADER_OFFSET_SENDEROBJECT ];
+        aTarget[ ISI_HEADER_OFFSET_SENDEROBJECT ] = tmp;
+
+        // Assign message length
+        TInt length = aMsg.iHeader->Length() + aMsg.iData->Length() - PN_HEADER_SIZE;
+
+#ifndef __WINS__
+        aTarget[ ISI_HEADER_OFFSET_LENGTH ] = length & 0xFF; // CodForChk_Dis_Magic
+        aTarget[ ISI_HEADER_OFFSET_LENGTH + 1 ] = ( length >> 8 ) & 0xFF; // CodForChk_Dis_Magic
+#else
+        aTarget[ ISI_HEADER_OFFSET_LENGTH + 1 ] = length & 0xFF; // CodForChk_Dis_Magic
+        aTarget[ ISI_HEADER_OFFSET_LENGTH] = ( length >> 8 ) & 0xFF; // CodForChk_Dis_Magic
+#endif
+
+        // Assign new message ID
+        aTarget[ ISI_HEADER_OFFSET_MESSAGEID ] = aMsg.iMessageId;
+        ret = KErrNone;
+#endif  // __ISI_SUPPORTED__
+        }
+    else
+        if (aMsg.iMsgFormat == EMessageHeaderFormatOst)
+            {
+            // Merge header and data
+            aTarget.Copy( *aMsg.iHeader);
+            aTarget.Append( *aMsg.iData);
+
+
+            // Assign message length
+            TUint16 length = aMsg.iHeader->Length() + aMsg.iData->Length()
+                    - OstHeader::OstBaseProtocol::KOstBaseHeaderSize;
+
+            aTarget[ OstHeader::OstBaseProtocol::KOstHeaderLengthOffset ] = (length >> KByteShift ) & KByteMask;
+            aTarget[ OstHeader::OstBaseProtocol::KOstHeaderLengthOffset + 1 ] = length & KByteMask;
+
+            // Assign new message ID
+            aTarget[ OstHeader::OstBaseProtocol::KOstHeaderProtocolIdOffset ] = aMsg.iMessageId;
+            ret = KErrNone;
+            }
+    return ret;
+    }
+
+
+/**
+ * Get the message length
+ *
+ * @param aMsg Message to be sent.
+ * @return length or -1 if not valid
+ */
+TInt TTraceCoreMessageUtils::GetMessageLength( const TTraceMessage& aMsg )
+    {
+    TInt msgLength = -1;
+    if ( aMsg.iMsgFormat == EMessageHeaderFormatProprietary )
+        {
+#ifdef __ISI_SUPPORTED__
+        // Get message length
+        msgLength = aMsg.iData->Length();
+        if ( aMsg.iHeader != NULL )
+            {
+            TInt hdrLen( aMsg.iHeader->Length() );
+            // Message header length must be valid
+            if ( hdrLen == ( ISI_HEADER_SIZE + KIsiHeaderRemainder ) )
+                {
+                msgLength += hdrLen;
+                }
+            else
+                {
+                OstTrace1( TRACE_IMPORTANT , TTRACECOREISAUTILS_GETMESSAGELENGTH_INVALID_HEADER_LENGTH, "TTraceCoreIsaUtils::GetMessageLength - ISI header length was not valid. Len:%d", hdrLen );
+                msgLength = -1;
+                }
+            }
+        else
+            {
+            // If message length is not enough for valid ISI message, an error is returned
+            if ( msgLength < ( ISI_HEADER_SIZE + KIsiHeaderRemainder ) )
+                {
+                OstTrace1( TRACE_IMPORTANT , TTRACECOREISAUTILS_GETMESSAGELENGTH_MESSAGE_TOO_SHORT, "TTraceCoreIsaUtils::GetMessageLength - Message is too short. Len:%d", msgLength );
+                msgLength = -1;
+                }
+            }
+#endif // __ISI_SUPPORTED__
+        }
+    else
+        if (aMsg.iMsgFormat == EMessageHeaderFormatOst)
+            {
+            // Get message length
+            msgLength = aMsg.iData->Length();
+            if (aMsg.iHeader != NULL)
+                {
+                TInt hdrLen(aMsg.iHeader->Length() );
+
+                // Message header length must be valid
+                if (hdrLen == ( OstHeader::OstBaseProtocol::KOstBaseHeaderSize ))
+                    {
+                    msgLength += hdrLen;
+                    }
+                else
+                    {
+                    msgLength = -1;
+                    }
+                }
+            else
+                {
+#ifdef __ISI_SUPPORTED__
+                // If message length is not enough for valid ISI message, an error is returned
+                if (msgLength < ( ISI_HEADER_SIZE + KIsiHeaderRemainder ))
+                    {
+                    msgLength = -1;
+                    }
+#endif // __ISI_SUPPORTED__
+                }
+
+            }
+        else
+			{
+			OstTrace0( TRACE_IMPORTANT , TRACECOREMESSAGEUTILS_GETMESSAGELENGTH_NOT_SUPPORTED, "TraceCoreMessageUtils::GetMessageLength - Format not supported");
+			msgLength = -1;
+			}
+    OstTrace1( TRACE_FLOW, TRACECOREMESSAGEUTILS_GETMESSAGELENGTH_EXIT, "< TraceCoreMessageUtils::GetMessageLength. Len:%d", msgLength );
+    return msgLength;
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/src/TraceCoreNotificationReceiver.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,148 @@
+// 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 "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:
+//
+// Description:
+// Base class for notification receivers of TraceCore
+//
+
+#include "TraceCoreNotificationReceiver.h"
+#include "TraceCore.h"
+#include "TraceCoreNotifier.h"
+#include "TraceCoreDebug.h"
+#include "TraceCoreConstants.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "TraceCoreNotificationReceiverTraces.h"
+#endif
+
+#include "TraceCoreTComArgMacro.h"
+
+/**
+ * Constructor
+ */
+EXPORT_C MTraceCoreNotificationReceiver::MTraceCoreNotificationReceiver()
+    {
+    }
+
+
+/**
+ * Destructor
+ */
+EXPORT_C MTraceCoreNotificationReceiver::~MTraceCoreNotificationReceiver()
+    {
+    UnregisterNotificationReceiver();
+    }
+
+
+/**
+ * Register notification receiver by component id
+ * 
+ * @param aComponentId The component ID
+ */
+EXPORT_C TInt MTraceCoreNotificationReceiver::RegisterNotificationReceiver( TUint32 aComponentId )
+    {
+    return RegisterNotificationReceiver( aComponentId, KAllGroups );
+    }
+    
+/**
+ * Register notification receiver by component id and group id
+ * 
+ * @param aComponentId The component ID
+ * @param aGroupId The group ID 
+ */
+EXPORT_C TInt MTraceCoreNotificationReceiver::RegisterNotificationReceiver( TUint32 aComponentId, TInt32 aGroupId )
+    {
+    OstTraceExt2( TRACE_BORDER, MTRACECORENOTIFICATIONRECEIVER_REGISTERNOTIFICATIONRECEIVER_ENTRY, "> MTraceCoreNotificationReceiver::RegisterNotificationReceiver. CID:0x%x GID:0x%x", aComponentId, aGroupId );
+    TInt ret;
+    
+    // Get TraceCore
+    DTraceCore* traceCore = DTraceCore::GetInstance();
+    if ( traceCore != NULL )
+        {
+        TNotificationReceiverItem notificationReceiverItem;
+        notificationReceiverItem.iComponentID = aComponentId;
+        notificationReceiverItem.iGroupID = aGroupId;
+        notificationReceiverItem.iReceiver = this;
+        
+        // Register notification receiver
+        ret = traceCore->GetNotifier().RegisterNotificationReceiver( notificationReceiverItem );
+        }
+    else
+        {
+        ret = KErrGeneral;
+        }
+    OstTrace1( TRACE_BORDER, MTRACECORENOTIFICATIONRECEIVER_REGISTERNOTIFICATIONRECEIVER_EXIT, "< MTraceCoreNotificationReceiver::RegisterNotificationReceiver. Ret:%d", ret );
+    return ret;
+    }
+    
+
+/**
+ * Unregister notification receiver by component id
+ * 
+ * @param aComponentId The component ID
+ */
+EXPORT_C void MTraceCoreNotificationReceiver::UnregisterNotificationReceiver( TUint32 aComponentId )
+    {
+    
+    UnregisterNotificationReceiver( aComponentId, KAllGroups );
+    }
+    
+/**
+ * Unregister notification receiver by component id and group id
+ * 
+ * @param aComponentId The component ID
+ * @param aGroupId The group ID  
+ */
+EXPORT_C void MTraceCoreNotificationReceiver::UnregisterNotificationReceiver( TUint32 aComponentId, TInt32 aGroupId )
+    {
+    OstTraceExt2( TRACE_BORDER, MTRACECORENOTIFICATIONRECEIVER_UNREGISTERNOTIFICATIONRECEIVER_ENTRY, "> MTraceCoreNotificationReceiver::UnregisterNotificationReceiver. CID:0x%x GID:0x%x", aComponentId, aGroupId );
+    DTraceCore* traceCore = DTraceCore::GetInstance();
+    if ( traceCore != NULL )
+        {
+        TNotificationReceiverItem notificationReceiverItem;
+        notificationReceiverItem.iComponentID = aComponentId;
+        notificationReceiverItem.iGroupID = aGroupId;
+        notificationReceiverItem.iReceiver = this;
+        traceCore->GetNotifier().UnregisterNotificationReceiver( notificationReceiverItem );
+        }
+    }
+
+/**
+ * Unsubscribes all message ID's of this notification receiver
+ */
+void MTraceCoreNotificationReceiver::UnregisterNotificationReceiver()
+    {
+    // Get TraceCore
+    DTraceCore* traceCore = DTraceCore::GetInstance();
+    if ( traceCore != NULL )
+        {
+        
+        // Unregister notification receiver
+        traceCore->GetNotifier().UnregisterNotificationReceiver( *this );
+        }
+    }
+
+/**
+ * Callback function for trace error
+ * 
+ * @param aComponentId The component ID
+ * @param aGroupId The group ID    
+ * @param aError The reason for error
+ */
+EXPORT_C void MTraceCoreNotificationReceiver::TraceError( TUint32 TCOM_ARG(aComponentId), 
+                                                          TUint32 TCOM_ARG(aGroupId), 
+                                                          TInt TCOM_ARG(aError)  )
+    {
+    OstTraceExt3( TRACE_BORDER, MTRACECORENOTIFICATIONRECEIVER_TRACEERROR_ENTRY, "> MTraceCoreNotificationReceiver::TraceError. CID:0x%x GID:0x%x Err:%d", aComponentId, aGroupId, (TInt32) aError );
+    }
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/src/TraceCoreNotifier.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,315 @@
+// 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 "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:
+//
+// Description:
+// Registers / unregisters notification receivers and send notifications 
+// to them when needed.
+// 
+
+#include "TraceCore.h"
+#include "TraceCoreNotifier.h"
+#include "TraceCoreNotificationReceiver.h"
+#include "TraceCoreActivation.h"
+#include "TraceCoreDebug.h"
+#include "TraceCoreConstants.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "TraceCoreNotifierTraces.h"
+#endif
+
+#include "TraceCoreTComArgMacro.h"
+
+   
+/** 
+ * Constructor
+ */
+DTraceCoreNotifier::DTraceCoreNotifier()
+    {
+    }
+
+
+/** 
+ * Destructor
+ */
+DTraceCoreNotifier::~DTraceCoreNotifier()
+    {
+    iNotificationReceiverItems.Reset();
+    }
+
+/**
+ * Callback for trace activation
+ *
+ * @param aComponentId The component ID
+ * @param aGroupId The group ID
+ */
+void DTraceCoreNotifier::TraceActivated( TUint32 aComponentId, TUint16 aGroupId )
+    {
+    //TODO assert that this method can be run only on iActivationQ thread. (assert debug)
+    OstTraceExt2( TRACE_FLOW, DTRACECORENOTIFIER_TRACEACTIVATED_ENTRY, "> DTraceCoreNotifier::TraceActivated CID:0x%x GID:0x%hx", aComponentId, (TUint32) aGroupId );
+   
+    // Go through notification receivers
+    for ( TInt i = 0; i < iNotificationReceiverItems.Count(); i++ )
+        {
+        if ( ( iNotificationReceiverItems[ i ].iComponentID == aComponentId 
+                && iNotificationReceiverItems[ i ].iGroupID == aGroupId )
+          || ( iNotificationReceiverItems[ i ].iComponentID == aComponentId 
+                && iNotificationReceiverItems[ i ].iGroupID == KAllGroups ) )
+            {
+
+            iNotificationReceiverItems[ i ].iReceiver->TraceActivated( aComponentId, aGroupId );
+            }
+            //no else
+        }
+	}
+	
+/**
+ * Callback for trace deactivation
+ *
+ * @param aComponentId The componet ID
+ * @param aGroupId The group ID
+ */
+void DTraceCoreNotifier::TraceDeactivated( TUint32 aComponentId, TUint16 aGroupId )
+    {
+    OstTraceExt2( TRACE_FLOW, DTRACECORENOTIFIER_TRACEDEACTIVATED_ENTRY, "> DTraceCoreNotifier::TraceDeactivated CID:0x%x GID:0x%hx", aComponentId, (TUint32) aGroupId );
+    
+    // Go through notification receivers
+    for ( TInt i = 0; i < iNotificationReceiverItems.Count(); i++ )
+        {
+        if ( ( iNotificationReceiverItems[ i ].iComponentID == aComponentId 
+                && iNotificationReceiverItems[ i ].iGroupID ==  aGroupId )
+          || ( iNotificationReceiverItems[ i ].iComponentID == aComponentId 
+                && iNotificationReceiverItems[ i ].iGroupID == KAllGroups )
+         || ( iNotificationReceiverItems[ i ].iComponentID == aComponentId 
+                && aGroupId ==  KAllGroups ) )
+            {
+            
+            // If whole component was deactivated, get group ID's from the notification array
+            if ( aGroupId ==  KAllGroups )
+            	{
+            	iNotificationReceiverItems[ i ].iReceiver->TraceDeactivated( aComponentId, iNotificationReceiverItems[ i ].iGroupID  );
+            	}
+            
+            // One group was deactivated
+            else
+            	{
+                iNotificationReceiverItems[ i ].iReceiver->TraceDeactivated( aComponentId, aGroupId  );
+            	}
+            }
+        }
+	}
+
+/**
+ * Callback when there is a trace error
+ * 
+ * @param aComponentId The component ID
+ * @param aGroupId The group ID    
+ * @param aError The reason for error
+ */
+void DTraceCoreNotifier::TraceError( TUint32 aComponentId, TUint32 aGroupId, TInt TCOM_ARG(aError)  )
+    {
+    OstTraceExt3( TRACE_FLOW, DTRACECORENOTIFIER_TRACEERROR_ENTRY, "> DTraceCoreNotifier::TraceError CID:0x%x GID:0x%x Err:%d", aComponentId, aGroupId, (TInt32) aError );
+    
+    // Go through notification receivers
+    for ( TInt i = 0; i < iNotificationReceiverItems.Count(); i++ )
+        {
+        if ( ( iNotificationReceiverItems[ i ].iComponentID == aComponentId 
+                && iNotificationReceiverItems[ i ].iGroupID == aGroupId )
+          || ( iNotificationReceiverItems[ i ].iComponentID == aComponentId 
+                && iNotificationReceiverItems[ i ].iGroupID == KAllGroups ) )
+            {
+            iNotificationReceiverItems[ i ].iReceiver->TraceError( aComponentId, aGroupId, KErrArgument );
+            OstTrace0( TRACE_API, DTRACECORENOTIFIER_TRACEERROR_RETURNED_FROM_NOTIFICATION_RECEIVER, "DTraceCoreNotifier::TraceError - Returned from notification receiver");
+            }
+            //no else
+        }
+    
+    OstTrace0( TRACE_FLOW, DTRACECORENOTIFIER_TRACEERROR_EXIT, "< DTraceCoreNotifier::TraceError");
+    }
+
+/**
+ * Register notification receiver
+ * 
+ * @param aItem The properties of the notification receiver
+ */
+TInt DTraceCoreNotifier::RegisterNotificationReceiver( TNotificationReceiverItem& aNotificationReceiverItem )
+    {
+    OstTrace1( TRACE_FLOW, DTRACECORENOTIFIER_REGISTERNOTIFICATIONRECEIVER_ENTRY, "> DTraceCoreNotifier::RegisterNotificationReceiver 0x%x", ( TUint )&( aNotificationReceiverItem ) );
+   
+    TInt err = KErrNone;
+    if ( aNotificationReceiverItem.iReceiver != NULL )
+        {
+        TBool itemExist( EFalse );     
+        // Check if already notification receiver to the combination
+        for ( TInt i = 0; i < iNotificationReceiverItems.Count(); i++ )
+            {
+            if ( iNotificationReceiverItems[ i ].iComponentID == aNotificationReceiverItem.iComponentID
+                    && iNotificationReceiverItems[ i ].iGroupID == aNotificationReceiverItem.iGroupID 
+                    && iNotificationReceiverItems[ i ].iReceiver == aNotificationReceiverItem.iReceiver )
+                {
+                itemExist = ETrue;
+                break;	
+                }
+                //no else
+            }
+
+        // If not yet receiving, append to receiver items
+        if ( !itemExist )
+            {      
+            err = iNotificationReceiverItems.Append( aNotificationReceiverItem );
+            if ( err == KErrNone )
+                {
+                OstTraceExt2( TRACE_NORMAL, DTRACECORENOTIFIER_REGISTERNOTIFICATIONRECEIVER_REGISTERED, "DTraceCoreNotifier::RegisterNotificationReceiver - Registered CID:0x%x GID:0x%x", (TUint) aNotificationReceiverItem.iComponentID, (TUint)aNotificationReceiverItem.iGroupID );
+                
+                // Send notification immediately if group is active
+                TGroupId groupId = aNotificationReceiverItem.iGroupID;
+                NotifyImmediately(aNotificationReceiverItem.iComponentID, groupId);       
+                }
+            }
+        // Already registered
+        else
+            {
+            err = KErrAlreadyExists;
+            }
+        }
+    // Item was null
+    else
+        {
+        err = KErrArgument;
+        }
+        
+    OstTrace1( TRACE_FLOW, DTRACECORENOTIFIER_REGISTERNOTIFICATIONRECEIVER_EXIT, "< DTraceCoreNotifier::RegisterNotificationReceiver. Err:%d", err );
+    return err;
+    }
+
+
+/**
+* Get registered group IDs
+*
+* @param aComponentId The componet ID
+* @param aGroupIDs The array of group IDs
+*/
+void DTraceCoreNotifier::GetComponentRegisteredGroupIDs( TUint32 aComponentID, RArray< TUint >& aGroupIDs )
+	{
+    OstTrace1( TRACE_FLOW, DTRACECORENOTIFIER_GETCOMPONENTREGISTEREDGROUPIDS_ENTRY, "> DTraceCoreNotifier::GetComponentRegisteredGroupIDs CID:0x%x", aComponentID );
+	
+    TBool itemExist( EFalse );
+    TInt err = KErrNone;
+   
+    // Go through notification receivers
+	for ( TInt i = 0; i < iNotificationReceiverItems.Count(); i++ )
+	    {
+	    if ( iNotificationReceiverItems[ i ].iComponentID == aComponentID )
+	        {
+	        itemExist = EFalse;
+	        
+	        // Check if the item exists already
+	        for ( TInt j = 0; j < aGroupIDs.Count(); j++ )
+	            {
+	            if ( aGroupIDs[ j ] == iNotificationReceiverItems[ i ].iGroupID )
+	                {
+	                itemExist = ETrue;
+	                break;	                    	
+	                }
+	            }
+            
+	        if (!itemExist)
+	            {
+	            err = aGroupIDs.Append( iNotificationReceiverItems[ i ].iGroupID );
+	            }
+	        }	
+	    }
+   
+	OstTrace1( TRACE_FLOW, DTRACECORENOTIFIER_GETCOMPONENTREGISTEREDGROUPIDS_EXIT, "< DTraceCoreNotifier::GetComponentRegisteredGroupIDs - %d", err );
+    
+	err++; //just to remove arm compiler warning about not using this variable when ost is compiled out
+	}
+
+
+ /**
+ * Unregister notification receiver
+ *
+ * @param aItem The properties of the notification receiver
+ */
+void DTraceCoreNotifier::UnregisterNotificationReceiver( TNotificationReceiverItem& aNotificationReceiverItem )
+    {
+    OstTrace1( TRACE_FLOW, DTRACECORENOTIFIER_UNREGISTERNOTIFICATIONRECEIVER_ENTRY, "> DTraceCoreNotifier::UnregisterNotificationReceiver 0x%x", ( TUint )&( aNotificationReceiverItem ) );
+    
+    // Go through notification receivers
+	for ( TInt i = 0; i < iNotificationReceiverItems.Count(); i++ )
+        {
+        if ( ( iNotificationReceiverItems[ i ].iComponentID == aNotificationReceiverItem.iComponentID
+                && iNotificationReceiverItems[ i ].iGroupID == aNotificationReceiverItem.iGroupID 
+                && iNotificationReceiverItems[ i ].iReceiver == aNotificationReceiverItem.iReceiver )
+            ||
+                ( iNotificationReceiverItems[ i ].iComponentID == aNotificationReceiverItem.iComponentID
+                        && KAllGroups == aNotificationReceiverItem.iGroupID 
+                        && iNotificationReceiverItems[ i ].iReceiver == aNotificationReceiverItem.iReceiver ) )
+            {            
+            // Unregister notification receiver
+            iNotificationReceiverItems.Remove( i );
+            i--;
+            }
+            //no else
+        }
+    }
+
+
+ /**
+ * Unregister all traces of given notification receiver
+ *
+ * @param aNotificationReceiver The notification receiver to be unregistered
+ */
+void DTraceCoreNotifier::UnregisterNotificationReceiver( MTraceCoreNotificationReceiver& aNotificationReceiver )
+    {
+    OstTrace1( TRACE_FLOW, DTRACECORENOTIFIER_UNREGISTERNOTIFICATIONRECEIVERALL_ENTRY, "> DTraceCoreNotifier::UnregisterNotificationReceiver - All IDs 0x%x", ( TUint )&( aNotificationReceiver ) );
+    
+    for ( TInt i = 0; i < iNotificationReceiverItems.Count(); i++ )
+	    {
+	    if ( iNotificationReceiverItems[ i ].iReceiver == &aNotificationReceiver )
+	        {
+            OstTraceExt2( TRACE_NORMAL, DTRACECORENOTIFIER_UNREGISTERNOTIFICATIONRECEIVER_UNREGISTERED_, "DTraceCoreNotifier::UnregisterNotificationReceiver - Unregistered CID:0x%x GID:0x%x", (TUint)iNotificationReceiverItems[ i ].iComponentID, (TUint)iNotificationReceiverItems[ i ].iGroupID );
+            iNotificationReceiverItems.Remove( i );
+	        i--;
+	        }
+	        //no else
+	    }
+	}
+
+/**
+* Notifies immediately if group was activated
+*
+* @param aComponentID The component id
+* @param aGroupId The group id 
+*/
+void DTraceCoreNotifier::NotifyImmediately( TUint32 aComponentId, TGroupId aGroupId )
+   {
+   OstTraceExt2( TRACE_FLOW, NOTIFY_IMMEDIATELY_ENTRY, "> DTraceCoreNotifier::NotifyImmediately. GID: 0x%x, GID: 0x%hx", aComponentId, (TUint32) aGroupId );
+   
+   // Send notification about activated groups immediately
+   DTraceCore* traceCore = DTraceCore::GetInstance();
+   if ( traceCore != NULL )
+       {
+       MTraceCoreActivation *activation = traceCore->GetActivation( aComponentId );
+       RArray< TUint > groups = activation->GetActivatedGroups( aComponentId );
+       for (TInt i = 0; i < groups.Count(); i++)
+           {
+           if ( aGroupId == KAllGroups || groups[ i ] == aGroupId )
+               {
+               OstTrace1( TRACE_BORDER , SEND_NOTIFICATION_IMMEDIATELY, "Send activation notification immediately. Group ID:%x", groups[ i ] );
+               this->TraceActivated( aComponentId, groups[ i ] );
+               }
+           }
+       }
+   }
+
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/src/TraceCoreOstLddIf.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,313 @@
+// 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 "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:
+//
+// Description:
+// Trace Core
+// 
+
+#include "TraceCore.h"
+#include "TraceCoreOstLddIf.h" 
+#include "TraceCoreDebug.h"
+#include "TraceCoreMediaIfCallback.h"
+#include "TraceCoreSubscriber.h"
+#include "TraceCoreMessageUtils.h"
+#include "TraceCoreOstHeader.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "TraceCoreOstLddIfTraces.h"
+#endif
+
+/** 
+ * Default DFC queue priority
+ */
+const TUint8 KDefaultDfcPriority = 3;
+
+/**
+ * Prints a message
+ *
+ * @param aMsg Reference to a message. 
+ */
+static void DebugPrintMsg( const TDesC8& /*aMsg*/ )            
+    {
+    // Message structure print
+    }
+
+static DTraceCoreOstLddIf* TraceCoreOstLddIf = NULL;
+
+/**
+ * Constructor
+ */
+DTraceCoreOstLddIf::DTraceCoreOstLddIf()
+: DTraceCoreMediaIf( KMediaIfSendSupported | KMediaIfSendTraceSupported  )
+, iReceiveDfc( DTraceCoreOstLddIf::ReceiveDfc, this, DTraceCore::GetActivationQ(), KDefaultDfcPriority )
+, iStatus( 0 )
+, iTraceCoreOstConnectionRegistered( EFalse )
+, iTraceCoreOstConnection( NULL )
+    {
+    // No implementation in constructor
+    }
+
+
+/**
+ * Destructor
+ */
+DTraceCoreOstLddIf::~DTraceCoreOstLddIf()
+    {
+    iCallback = NULL; 
+    }
+
+
+/**
+ * Initializes the OstLddIf
+ *
+ * @param aCallBack Callback to TraceCore
+ */
+TInt DTraceCoreOstLddIf::Init( MTraceCoreMediaIfCallback& aCallback )
+    {
+    iCallback = &aCallback;
+    TraceCoreOstLddIf = this;
+    return KErrNone;
+    }
+
+
+/**
+ * Handle incoming messages from OstConnection
+ * 
+ * @param aPtr Pointer to DTraceCoreOstLddIf class.
+ */
+void DTraceCoreOstLddIf::ReceiveDfc( TAny* aPtr )
+    {
+    DTraceCoreOstLddIf* TraceCoreOstLddIf = static_cast< DTraceCoreOstLddIf* >( aPtr );
+    __ASSERT_DEBUG( TraceCoreOstLddIf != NULL, Kern::Fault( "DTraceCoreOstLddIf::ReceiveDfc - NULL", KErrGeneral ) );
+    TraceCoreOstLddIf->ReceiveDfc();
+    }
+
+
+/**
+ * Processes incoming OST messages
+ */
+void DTraceCoreOstLddIf::ReceiveDfc()
+    {
+    // Determine the message we received
+    if ( iReceiveBuffer.Length() > OstHeader::OstBaseProtocol::KOstHeaderLengthOffset )
+        {
+        DebugPrintMsg ( iReceiveBuffer );
+        if ( iCallback != NULL )
+            {
+            NotifyCallback();
+            }
+        }
+    }
+
+
+/**
+ * Notifies the callback with the incoming message
+ * 
+ * @return one of symbian error codes
+ */
+void DTraceCoreOstLddIf::NotifyCallback()
+    {
+    // Header length is header size + remainders
+    TInt headerLength = OstHeader::OstBaseProtocol::KOstBaseHeaderSize;
+
+    // Check message ID
+    TTraceMessage traceMsg;
+    traceMsg.iMessageId = iReceiveBuffer[ OstHeader::OstBaseProtocol::KOstHeaderProtocolIdOffset ];
+    
+    // If message ID is TraceCore Protocol, the header is longer and the message ID might be in different place
+    if (traceMsg.iMessageId == OstConstants::OstBaseProtocol::KOstTraceCoreProtocol)
+        {
+        headerLength += OstHeader::OstTraceCoreProtocol::KHeaderSize;
+        
+        // Subscriber protocol
+        if (iReceiveBuffer[ OstHeader::OstBaseProtocol::KOstBaseHeaderSize + 
+                            OstHeader::OstTraceCoreProtocol::KProtocolIdOffset ] == 
+                OstHeader::OstTraceCoreProtocol::KSubscriberProtocol)
+            {
+            traceMsg.iMessageId = iReceiveBuffer[ OstHeader::OstBaseProtocol::KOstBaseHeaderSize + 
+                                                  OstHeader::OstTraceCoreProtocol::KSubscriberIdOffset ];
+            }
+        }
+    
+    if ( iReceiveBuffer.Length() < headerLength ) 
+        {
+        headerLength = iReceiveBuffer.Length();
+        }
+
+    // Create TraceMessage
+    TPtrC header( iReceiveBuffer.Ptr(), headerLength );
+    TPtrC data( NULL, 0 );
+    if ( iReceiveBuffer.Length() > headerLength ) {
+        data.Set( iReceiveBuffer.Ptr() + headerLength, iReceiveBuffer.Length() - headerLength );
+    }
+
+    traceMsg.iMsgFormat = EMessageHeaderFormatOst;
+    traceMsg.iHeader = &header;
+    traceMsg.iData = &data;
+    
+    // Set Sender media to be same as receiver
+    iCallback->SetSenderMedia(this);
+    
+    iCallback->MessageReceived( traceMsg );
+    }
+
+
+/**
+ * Sends messages to USB OstConnection
+ * 
+ * @param aMsg Message to be sent.
+ * @return KErrNone if send successful
+ */
+TInt DTraceCoreOstLddIf::Send( TTraceMessage& aMsg )
+    {
+    TInt ret = KErrArgument;
+    if ( aMsg.iData != NULL )
+        {
+        ret = TTraceCoreMessageUtils::GetMessageLength( aMsg );
+        if ( ret > 0 )
+            {
+            // First send the phone formatted start character
+            // Send trace data and end trace
+            SendData( aMsg );
+            if ( aMsg.iHeader != NULL ) 
+                {
+                DebugPrintMsg( iSendBuffer );
+                }
+            else
+                {
+                DebugPrintMsg( *aMsg.iData );
+                }
+            }
+        else
+            {
+            ret = KErrArgument;
+            }
+        }
+    
+    return ret;
+    }
+    
+
+/**
+ * Sends message to TraceCoreOstLdd
+ * 
+ * @param aMsg Message to be sent.
+ */
+void DTraceCoreOstLddIf::SendData( TTraceMessage& aMsg )
+    {
+    if ( aMsg.iHeader != NULL )
+        {
+        // Utility function is used to merge the data
+        TInt ret = TTraceCoreMessageUtils::MergeHeaderAndData( aMsg, iSendBuffer );
+        
+        if ( ret == KErrNone )
+            {
+            if(iTraceCoreOstConnection)
+                {
+                iTraceCoreOstConnection->TxMessage( iSendBuffer );
+                }
+            }
+        }
+    else
+        {
+         // Header doesn't exists, all data is in data part
+        }
+    }
+
+
+/**
+ * Similar to send, except does not generate traces, since they would loop back to this function
+ * 
+ * @param aMsg Message to be sent.
+ * @return KErrNone if send successful
+ */
+TInt DTraceCoreOstLddIf::SendTrace(const TDesC8& aMsg)
+    {
+    TInt ret(KErrNone);
+    
+    if ( iTraceCoreOstConnection && iTraceCoreOstConnectionRegistered )
+        {
+        iTraceCoreOstConnection->TxMessage(aMsg);
+        }
+    else
+        {
+        ret = KErrGeneral;
+        }
+    
+    return ret;
+    }
+
+
+/**
+ * GetSet
+ * 
+ * @param aFunc Function choosed (@see ETraceCoreOstLddIfGetSet)
+ * @return TDfc* if aFunc is EGetDfc, TDes8* EGetBuf and 0 with ESetWriter.
+ */
+EXPORT_C TUint32 DTraceCoreOstLddIf::GetSet(TTraceCoreOstLddIfGetSet aFunc, TUint32 aParam)
+    {
+    OstTraceExt2( TRACE_FLOW, DTRACECOREOSTLDDIF_GETSET_ENTRY, "> DTraceCoreOstLddIf::GetSet aFunc:%d, aParam:%d", aFunc, aParam );
+    
+    TUint32 ret(0);
+    switch(aFunc)
+        {
+        case EGetDfc:
+            {
+            TraceCoreOstLddIf->iTraceCoreOstConnectionRegistered = ETrue;
+            ret = reinterpret_cast<TUint32>(&(TraceCoreOstLddIf->iReceiveDfc));
+            break;
+            }
+        case EGetBuf:
+            {
+            ret = reinterpret_cast<TUint32>(&(TraceCoreOstLddIf->iReceiveBuffer));
+            break;
+            }
+        case ESetWriter:
+            {
+            // Set Writer to XTI if parameter is 0, otherwise USB
+            DTraceCore* traceCore = DTraceCore::GetInstance();
+            if ( traceCore != NULL )
+                {
+                // TraceSwitch uses 0 for XTI writer and 1 to OST writer
+                // So it is not mapping one to one to enum found in TraceCoreWriter.h
+                // for example to EWriterTypeXTI = 1
+                // See TraceCoreWriter.h
+                if(aParam==0)
+                    {
+                    traceCore->SwitchToWriter(EWriterTypeXTI);
+                    }
+                else if(aParam==1)
+                    {
+                    traceCore->SwitchToWriter(EWriterTypeUSBPhonet);
+                    }
+                // For other writers (>2) we use same as the enum
+                else if(aParam > EWriterTypeUSBPhonet)
+                    {
+                    traceCore->SwitchToWriter((TWriterType) aParam);
+                    }
+                }
+            break;
+            }
+        case ERegister:
+            {
+            TraceCoreOstLddIf->iTraceCoreOstConnection = (MTraceCoreOstConnectionIf*)aParam;
+            break;
+            }    
+        default:
+            __ASSERT_DEBUG( EFalse, Kern::Fault( "DTraceCoreOstLddIf::GetSet: Default case!", KErrArgument ) );
+            break;
+        }
+    
+    return ret;
+    }
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/src/TraceCorePluginIf.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,136 @@
+// 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 "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:
+//
+// Description:
+// TraceCore Plugin Interface
+// 
+
+//- Include Files  ----------------------------------------------------------
+
+#include "TraceCorePluginIf.h" 
+#include "TraceCoreDebug.h"
+#include "TraceCoreMediaIfCallback.h"
+#include "TraceCoreMediaPlugin.h"
+#include "TraceCoreSubscriber.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "TraceCorePluginIfTraces.h"
+#endif
+
+
+/**
+ * Constructor
+ */
+DTraceCorePluginIf::DTraceCorePluginIf()
+: DTraceCoreMediaIf( KMediaIfSendSupported | KMediaIfPluginSupported )
+, iMediaPlugin( NULL )
+    {
+    }
+
+
+/**
+ * Destructor
+ */
+DTraceCorePluginIf::~DTraceCorePluginIf()
+    {
+    iMediaPlugin = NULL;
+    }
+
+
+/**
+ * Initializes the plugin IF
+ *
+ * @param aCallBack Callback to TraceCore
+ */
+TInt DTraceCorePluginIf::Init( MTraceCoreMediaIfCallback& aCallback )
+    {
+    iCallback = &aCallback;
+    return KErrNone;
+    }
+
+/**
+ * Sends messages to plug-in
+ * 
+ * @param aMsg Message to be sent.
+ * @return KErrNone if send successful
+ */
+TInt DTraceCorePluginIf::Send( TTraceMessage& aMsg )
+    {
+    OstTraceExt1( TRACE_FLOW, DTRACECOREPLUGINIF_SEND_ENTRY, "> DTraceCorePluginIf::Send. MsgId:0x%hhx", aMsg.iMessageId );
+    TInt retval = KErrNotSupported;
+    if ( iMediaPlugin != NULL )
+        {
+        retval = iMediaPlugin->SendMessage( aMsg );
+        }
+    OstTrace1( TRACE_FLOW, DTRACECOREPLUGINIF_SEND_EXIT, "< DTraceCorePluginIf::Send %d", retval );
+    return retval;
+    }
+    
+
+/**
+ * Message was received by plug-in
+ * 
+ * @param aMsg The message that was received
+ */
+void DTraceCorePluginIf::MessageReceived( TTraceMessage &aMsg )
+    {
+    OstTraceExt1( TRACE_FLOW, DTRACECOREPLUGINIF_MESSAGERECEIVED_ENTRY, "> DTraceCorePluginIf::MessageReceived. MsgId:0x%hhx", aMsg.iMessageId );
+    if ( iCallback != NULL )
+        {
+        iCallback->SetSenderMedia( this ); // Added for SPLIT
+        iCallback->MessageReceived( aMsg );
+        }
+    }
+
+
+/**
+ * Registers a media Plug-In
+ */
+TInt DTraceCorePluginIf::RegisterPlugin( DTraceCoreMediaPlugin& aPlugin )
+    {
+    OstTrace1( TRACE_FLOW, DTRACECOREPLUGINIF_REGISTERPLUGIN_ENTRY, "> DTraceCorePluginIf::RegisterPlugin 0x%x", ( TUint )&( aPlugin ) );
+    TInt retval = KErrNone;
+    
+    // Register given media Plug-In
+    if ( iMediaPlugin == NULL )
+        {
+        iMediaPlugin = &aPlugin;
+        retval = KErrNone;
+        }
+    
+    // Plug-In was already registered
+    else
+        {
+        retval = KErrNotSupported;
+        }
+    OstTrace1( TRACE_FLOW, DTRACECOREPLUGINIF_REGISTERPLUGIN_EXIT, "< DTraceCorePluginIf::RegisterPlugin %d", retval );
+    
+    return retval;
+    }
+
+
+/**
+ * Unregisters a media Plug-In
+ */
+void DTraceCorePluginIf::UnregisterPlugin( DTraceCoreMediaPlugin& aPlugin )
+    {
+    OstTrace1( TRACE_FLOW, DTRACECOREPLUGINIF_UNREGISTERPLUGIN_ENTRY, "> DTraceCorePluginIf::UnregisterPlugin 0x%x", ( TUint )&( aPlugin ) );
+    
+    // Unregister given media Plug-In
+    if ( iMediaPlugin == &aPlugin )
+        {
+        OstTrace1( TRACE_NORMAL, DTRACECOREPLUGINIF_UNREGISTERPLUGIN_UNREGISTERED, "DTraceCorePluginIf::UnregisterPlugin - Plugin unregistered 0x%x", ( TUint )&( aPlugin ) );
+        iMediaPlugin = NULL;
+        }
+    }
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/src/TraceCorePrintfTraceHandler.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,414 @@
+// 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 "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:
+//
+// Description:
+// Trace Core
+// 
+
+#include <e32def.h>
+#include <e32btrace.h>
+
+#include "TraceCore.h"
+#include "TraceCorePrintfTraceHandler.h"
+#include "TraceCoreDebug.h"
+#include "TraceCoreConstants.h"
+#include "TraceCoreActivation.h"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "TraceCorePrintfTraceHandlerTraces.h"
+#endif
+#include "TraceCoreTComArgMacro.h"
+
+
+#ifdef __SMP__
+#include <nkernsmp/nkern.h>
+static TInt gIrqState = 0;
+TSpinLock gSpinLock(TSpinLock::TSpinLock::EOrderBTrace);
+#define __LOCK() gIrqState=__SPIN_LOCK_IRQSAVE( gSpinLock );
+#define __UNLOCK() __SPIN_UNLOCK_IRQRESTORE(gSpinLock, gIrqState);
+#else 
+#define __LOCK()
+#define __UNLOCK()
+#endif
+
+// Constants
+#define GRP_SHIFT 16
+
+#ifdef ADD_OST_HEADER_TO_PRINTF
+const TUint KDWordShift = 32;
+const TUint KDWordMask = 0xFFFFFFFF;
+const TUint KNanoSeconds = 1000000000;
+
+/**
+ * Musti timestamp mask. First 4 bits are reserved for flags
+ */
+const TUint KTimestampMask = 0x0FFFFFFF;
+
+/**
+ * Musti timestamp flags for XTIv2
+ */
+const TUint KTimestampFlags = 0xD0000000;
+
+const TUint KTimestampLenght(8);
+#endif
+
+/**
+ * String that is send to indicate a trace has been dropped
+ */
+_LIT8(KDroppedTrace,"* Dropped Trace");
+
+/**
+ * Static instance is needed when calling traces from handler function
+ */
+DTraceCorePrintfTraceHandler* DTraceCorePrintfTraceHandler::iInstance = NULL;
+
+/**
+ * State of the Printf activations
+ */
+TBool DTraceCorePrintfTraceHandler::iKernPrintfActive = ETrue;
+TBool DTraceCorePrintfTraceHandler::iRDebugPrintfActive = ETrue;
+TBool DTraceCorePrintfTraceHandler::iPlatSecPrintfActive = ETrue;
+
+/**
+ * Constructor
+ */
+DTraceCorePrintfTraceHandler::DTraceCorePrintfTraceHandler()
+: iPrintfHandler( NULL )
+    {
+    }
+
+
+/**
+ * Destructor
+ */
+DTraceCorePrintfTraceHandler::~DTraceCorePrintfTraceHandler()
+    {
+    DTraceCorePrintfTraceHandler::iInstance = NULL;
+    }
+	
+
+/**
+ * Initializes Printf handler
+ */
+TInt DTraceCorePrintfTraceHandler::Init()
+    {    
+    TC_TRACE( ETraceLevelFlow, Kern::Printf( ">DTraceCorePrintfTraceHandler::Init()" ) );
+    // Register to TraceCore
+    TInt ret = Register();
+    if ( ret == KErrNone )
+        {
+        DTraceCorePrintfTraceHandler::iInstance = this;      
+        RegisterNotificationReceiver( KKernelHooksOSTComponentUID, BTrace::ERDebugPrintf );
+    	RegisterNotificationReceiver( KKernelHooksOSTComponentUID, BTrace::EKernPrintf );
+    	RegisterNotificationReceiver( KKernelHooksOSTComponentUID, BTrace::EPlatsecPrintf );
+        }
+    
+    //activate printf group IDs by default
+    DTraceCore* traceCore = DTraceCore::GetInstance();
+    if (traceCore)
+        {
+        MTraceCoreActivation* activation = traceCore->GetActivation( KKernelHooksOSTComponentUID );
+        if ( activation )
+            {
+             activation->ActivateTrace( KKernelHooksOSTComponentUID, BTrace::ERDebugPrintf );
+             activation->ActivateTrace( KKernelHooksOSTComponentUID, BTrace::EKernPrintf  );
+             activation->ActivateTrace( KKernelHooksOSTComponentUID, BTrace::EPlatsecPrintf  );
+            }
+        }
+    
+    TC_TRACE( ETraceLevelFlow, Kern::Printf( "<DTraceCorePrintfTraceHandler::Init() - %d", ret ) );
+    return ret;
+    }
+
+    
+/**
+ * Prepares for writer change
+ * 
+ * @param aWriter Pointer to writer
+ */       
+void DTraceCorePrintfTraceHandler::PrepareSetWriter( DTraceCoreWriter* aWriter )
+    {
+    OstTrace1( TRACE_FLOW, DTRACECOREPRINTFTRACEHANDLER_PREPARESETWRITER_ENTRY, "> DTraceCorePrintfTraceHandler::PrepareSetWriter 0x%x", ( TUint )( aWriter ) );
+
+    TBool validMedia = aWriter != NULL;
+    
+    if ( validMedia )
+        {
+        DTraceCoreHandler::PrepareSetWriter( aWriter );
+        // SetTraceHandler is not called if it has already been called before
+        if ( iPrintfHandler == NULL )
+            {
+#ifndef TRACECORE_HANDLE_PRINTF_EXCLUDED  // define TRACECORE_HANDLE_PRINTF_EXCLUDED when debugging using printfs
+            iPrintfHandler = Kern::SetTraceHandler( DTraceCorePrintfTraceHandler::PrintfHandler );
+#endif
+            OstTraceExt2( TRACE_NORMAL, DTRACECOREPRINTFTRACEHANDLER_SETWRITER_HANDLER_STARTED,"DTraceCorePrintfTraceHandler::PrepareSetWriter - Printf trace routing started. Addr:0x%x WriterType:%d",(TInt)aWriter, (TInt) aWriter->GetWriterType() );
+            }
+        }
+    else
+        {
+        if ( aWriter == NULL )
+            {
+            OstTrace0( TRACE_NORMAL, DTRACECOREPRINTFTRACEHANDLER_PREPARESETWRITER_HANDLER_RESET,"DTraceCorePrintfTraceHandler::PrepareSetWriter - Printf trace routing stopped");
+            DTraceCoreHandler::PrepareSetWriter( aWriter );
+            
+#ifndef TRACECORE_HANDLE_PRINTF_EXCLUDED // define TRACECORE_HANDLE_PRINTF_EXCLUDED when debugging using printfs
+            Kern::SetTraceHandler( iPrintfHandler );
+#endif
+            iPrintfHandler = NULL;
+            }
+        else
+            {
+            OstTraceExt2( TRACE_NORMAL, DTRACECOREPRINTFTRACEHANDLER_PREPARESETWRITER_HANDLER_NOT_CHANGED,"DTraceCorePrintfTraceHandler::PrepareSetWriter - Printf trace routing was not changed Addr:0x%x WriterType:%d",(TUint)iWriter, (TInt) iWriter->GetWriterType() );
+            }
+        }
+    }
+
+
+/*
+	Trace handler hook.
+	Should be able to run in any content (including ISR).
+	@param aText      Debug log. The content of the descriptor resides in kernel memory.
+	@param aTraceType Identifies the origin of the debug log.
+	@return Specifies whether the log is processed or not.
+		If ETrue,  the log is processed. Kernel will drop the log (it won't be passed to trace port - UART)
+        If EFalse, the log is not processed. Kernel will pass the log to the trace port, as well.
+*/
+TBool DTraceCorePrintfTraceHandler::PrintfHandler( const TDesC8& aText, TTraceSource aTraceSource )
+    {
+    __LOCK();
+    
+    // Print
+    switch( aTraceSource )
+        {
+        case EKernelTrace:
+            // Check if Kernel traces are on
+            if ( DTraceCorePrintfTraceHandler::iKernPrintfActive )
+                {
+                HandleTrace( aText );
+                }
+            break;  
+        case EPlatSecTrace:
+            // Check if PlatSec traces are on
+            if ( DTraceCorePrintfTraceHandler::iPlatSecPrintfActive )
+                {
+                HandleTrace( aText );
+                }
+            break;           
+        case EUserTrace:
+            // Check if User traces are on
+            if ( DTraceCorePrintfTraceHandler::iRDebugPrintfActive )
+                {
+                HandleTrace( aText );
+                }
+
+            break;
+        default:
+            break;            
+        }
+    
+    __UNLOCK();
+       
+    return ETrue;
+    }
+
+
+/**
+	Send the string to the active writer
+ 	@param aDes String to be printed out
+ 	
+ 	@note CR, LF and other special characters are not checked
+ 	@note, Tracing is not allowed from this method (esspecially on SMP system)
+*/
+void DTraceCorePrintfTraceHandler::DebugPrint( const TDesC8& aDes )
+    {
+    // When a writer registers, Kern::SetTraceHandler is called to start printf routing
+    // However, the iWriter member will be NULL for a brief period after Kern::SetTraceHandler
+    //  -> Printf from an interrupt could crash this if NULL-check is not made
+    if ( iWriter != NULL )
+        {
+        const TText8* pS = aDes.Ptr();
+#ifdef ADD_OST_HEADER_TO_PRINTF		
+        TUint length = aDes.Length();
+        const TText8* pE = pS + length;
+#else
+        const TText8* pE = pS + aDes.Length();
+#endif
+        const TUint32* chS_ptr = reinterpret_cast< const TUint32* >( pS );
+        const TUint32* chE_ptr = reinterpret_cast< const TUint32* >( pE );
+        
+        if ( chS_ptr != chE_ptr )
+            {
+            // First send the printf start character
+            TUint32 entryId = iWriter->WriteStart( EWriterEntryAscii );
+            
+#ifdef ADD_OST_HEADER_TO_PRINTF    
+            // DEBUG make sure we use this printfhandler:
+            //iWriter->WriteData( entryId, (TUint8)0x39 );
+            //  version(0x05);    // OST Base Protocol version "1.0" (v00-80-00_r1-04.pdf)
+            //  entityId(0x01);   // Entity id TODO: check if this needs to change with CPU
+            //  protocolId(0x02); // Ascii Trace Protocol (Not in MIPI specs 08 yet)
+            
+            iWriter->WriteData( entryId, ( TUint8 )0x05 ); // Version "0.5" because BTrace header included with protocol id 0x03
+            iWriter->WriteData( entryId, ( TUint8 )0x01 ); // EntityId
+            iWriter->WriteData( entryId, ( TUint8 )0x02 ); // Ascii trace ProtocolId (not specified in MIPI specs yet)
+            
+            length += KTimestampLenght;
+            // Set length
+            // If write size less than 256
+            if(length < 256 )
+            {
+                //  length(size);
+                iWriter->WriteData( entryId, ( TUint8 )length );
+            
+            }
+            else
+            {
+                //  extendedLengthBits0_7(0x00);
+                //  extendedLengthBits8_15(0x00);
+                //  extendedLengthBits16_23(0x00);
+                //  extendedLengthBits24_31(0x00);
+                iWriter->WriteData( entryId, ( TUint8 )0x00 ); // length field 0 if extended length in use
+                iWriter->WriteData( entryId, ( TUint32 )length ); // No swap, Length in protocol is little endian //SWAP_DATA( length ) );
+            }
+            
+            // Write timestamp
+        
+            TUint64 timestamp = NKern::FastCounter();
+            timestamp = (timestamp * KNanoSeconds ) / NKern::FastCounterFrequency();
+            
+            TUint32 timestampLSB = timestamp & KDWordMask;
+            TUint32 timestampMSB = ( (timestamp >> KDWordShift ) & KTimestampMask ) | KTimestampFlags;
+            
+            iWriter->WriteData( entryId, SWAP_ID( timestampMSB ) );
+        	iWriter->WriteData( entryId, SWAP_ID( timestampLSB ) );
+            
+            // DEBUG - END
+
+#endif
+        	
+            while ( chS_ptr + 1 <= chE_ptr )
+                {
+                // Print using 32bit write
+                TUint32 val = *( chS_ptr++ );
+                iWriter->WriteData( entryId, SWAP_DATA( val ) );
+                }    
+            
+            // Print the rest
+            pS = ( TText8* )chS_ptr;
+            if ( pS != pE )
+                {
+                while ( pS < pE )
+                    {
+                    iWriter->WriteData( entryId, *( pS++ ) );
+                    }
+                }
+            
+            // End trace
+            iWriter->WriteData( entryId, static_cast< TUint8 >( 0x00 ) );
+            
+            TWriteEndParams params(entryId, ETrue);
+            iWriter->WriteEnd( params );
+            }
+        }
+    }
+
+/**
+ * Callback function for Trace Activation
+ * 
+ * @param aComponentId
+ * @param aGroupId         
+ */   
+void DTraceCorePrintfTraceHandler::TraceActivated( TUint32 TCOM_ARG(aComponentId), TUint16 aGroupId  )
+    {
+    OstTraceExt2( TRACE_FLOW, DTRACECOREPRINTFTRACEHANDLER_TRACEACTIVATED,"> DTraceCorePrintfTraceHandler::TraceActivated;aComponentId=0x%x;aGroupId=0x%x", (TUint) aComponentId, (TUint) aGroupId );
+    
+    switch( aGroupId )
+    	{
+    	case BTrace::EKernPrintf:
+    		DTraceCorePrintfTraceHandler::iKernPrintfActive = ETrue;
+    		break;
+    	case BTrace::ERDebugPrintf:
+    		DTraceCorePrintfTraceHandler::iRDebugPrintfActive = ETrue;
+    		break;
+    	case BTrace::EPlatsecPrintf:
+    		DTraceCorePrintfTraceHandler::iPlatSecPrintfActive = ETrue;
+    		break;
+    	default:
+    		break;	
+    	}
+    }
+		
+/**
+ * Callback function for Trace Deactivation
+ * 
+ * @param aComponentId
+ * @param aGroupId     
+ */  
+void DTraceCorePrintfTraceHandler::TraceDeactivated( TUint32 TCOM_ARG(aComponentId), TUint16 aGroupId  )
+    {
+    OstTraceExt2( TRACE_FLOW, DTRACECOREPRINTFTRACEHANDLER_TRACEDEACTIVATED,"> DTraceCorePrintfTraceHandler::TraceDeactivated;aComponentId=0x%x;aGroupId=0x%x", (TUint) aComponentId, (TUint) aGroupId );
+    
+    switch( aGroupId )
+    	{
+    	case BTrace::EKernPrintf:
+    		DTraceCorePrintfTraceHandler::iKernPrintfActive = EFalse;
+    		break;
+    	case BTrace::ERDebugPrintf:
+    		DTraceCorePrintfTraceHandler::iRDebugPrintfActive = EFalse;
+    		break;
+    	case BTrace::EPlatsecPrintf:
+    		DTraceCorePrintfTraceHandler::iPlatSecPrintfActive = EFalse;
+    		break;
+    	default:
+    		break;	
+    	}
+    }
+
+/**
+ * This method check if "dropped trace" notification must be sent and if so it
+ * verify whether writer is able to send "dropped trace" and "new incomming trace".
+ * If no the incomming trace is dropped and "dropped traces" flag is kept as set.
+ *
+ * @param aText Text-trace to send.
+ */
+inline void DTraceCorePrintfTraceHandler::HandleTrace( const TDesC8& aText )
+    {    
+    if(!DTraceCorePrintfTraceHandler::iInstance || !DTraceCorePrintfTraceHandler::iInstance->iWriter)
+        return; //no writer or no handler instance - don't even try to send data
+    
+    DTraceCore* tracecore = DTraceCore::GetInstance();
+    DTraceCorePrintfTraceHandler* handler = DTraceCorePrintfTraceHandler::iInstance;
+    DTraceCoreWriter* writer = handler->iWriter;
+    
+    if (tracecore->PreviousTraceDropped() )
+        {
+        if( writer->AbleToWrite(KDroppedTrace().Length()+aText.Length()))
+            { 
+            //send a "dropped trace" text trace and then the actual trace
+            handler->DebugPrint(KDroppedTrace);
+            handler->DebugPrint(aText);
+            tracecore->SetPreviousTraceDropped(EFalse); //rested "dropped trace" flag
+            }
+		else
+			{
+			//don't send anything to the buffer
+			}
+        }
+    else
+        {
+        // send the actual trace
+        handler->DebugPrint(aText);    
+        }
+    }
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/src/TraceCoreRouter.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,179 @@
+// 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 "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:
+//
+// Description:
+// Trace Core
+// 
+#include <kern_priv.h>
+#include "TraceCoreRouter.h"
+#include "TraceCoreSubscriber.h"
+#include "TraceCoreDebug.h"
+#include "OstTraceDefinitions.h"
+
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "TraceCoreRouterTraces.h"
+#endif
+
+// Constants
+
+/** 
+ * Constructor
+ */
+DTraceCoreRouter::DTraceCoreRouter()
+: iMessageSender( NULL )
+    {
+    }
+
+
+/** 
+ * Destructor
+ */
+DTraceCoreRouter::~DTraceCoreRouter()
+    {
+    Kern::MutexWait(*iLock);
+    iRoutingItems.Reset();
+    Kern::MutexSignal(*iLock);
+    iLock->Close(NULL);
+    }
+
+
+/**
+ * Initializes this router
+ *
+ * @param aMessageSender The message sender interface
+ */
+TInt DTraceCoreRouter::Init( MTraceCoreMessageSender& aMessageSender )
+    {
+    iMessageSender = &aMessageSender;
+    _LIT(KTraceCoreRouterLock, "DTraceCoreRouter_Lock");
+    TInt err = Kern::MutexCreate(iLock, KTraceCoreRouterLock, KMutexOrdGeneral0);
+    return err;
+    }
+
+
+/**
+ * Callback for incoming messages
+ *
+ * @param aMsg The message
+ * @return KErrNotFound if the message id was not found (not subscribed), KErrNone if found
+ */
+TInt DTraceCoreRouter::MessageReceived( TTraceMessage &aMsg )
+    {
+    OstTraceExt1( TRACE_FLOW, DTRACECOREROUTER_MESSAGERECEIVED_ENTRY, "> DTraceCoreRouter::MessageReceived. MsgId:0x%hhx", aMsg.iMessageId );
+   
+    TInt ret( KErrNotFound );
+    TUint32 messageId = aMsg.iMessageId;
+    TUint32 msgFormat = aMsg.iMsgFormat;
+    
+    Kern::MutexWait(*iLock);
+    for ( TInt i = 0; i < iRoutingItems.Count(); i++ )
+        {
+        if ( iRoutingItems[ i ].iMessageID == messageId && iRoutingItems[ i ].iMsgFormat == msgFormat )
+            {
+            iRoutingItems[ i ].iSubscriber->MessageReceived( aMsg );
+            ret = KErrNone;
+            }
+        }
+    Kern::MutexSignal(*iLock);
+        
+	OstTrace1( TRACE_FLOW, DTRACECOREROUTER_MESSAGERECEIVED_EXIT, "< DTraceCoreRouter::MessageReceived. Ret:%d", ret );
+	return ret;
+	}
+
+
+/**
+ * Subscribes to a message
+ * 
+ * @param aRoutingItem The subscription properties.
+ */
+TInt DTraceCoreRouter::Subscribe( TRoutingItem& aRoutingItem )
+    {
+    OstTrace1( TRACE_FLOW, DTRACECOREROUTER_SUBSCRIBE_ENTRY, "> DTraceCoreRouter::Subscribe 0x%x", ( TUint )&( aRoutingItem ) );
+    
+    TInt err = KErrNone;
+    if ( iMessageSender != NULL ) 
+        {
+        if ( aRoutingItem.iSubscriber != NULL )
+            {
+            Kern::MutexWait(*iLock);
+            // Add to routingItems array
+            err = iRoutingItems.Append( aRoutingItem );
+            Kern::MutexSignal(*iLock);
+            if ( err == KErrNone )                
+                {
+                // Set message sender to routing item
+                aRoutingItem.iSubscriber->SetMessageSender( *iMessageSender );
+                OstTraceExt2( TRACE_NORMAL, DTRACECOREROUTER_SUBSCRIBE_SUBSCRIBED_TO_MESSAGE, "DTraceCoreRouter::Subscribe - Subscribed to message. Subscriber:0x%x MsgId:0x%x", (TUint)aRoutingItem.iSubscriber, (TUint)aRoutingItem.iMessageID );
+                }
+            }
+        // Subscriber was NULL
+        else
+            {         
+            err = KErrArgument;
+            }
+        }
+    // Message sender not set
+    else
+        {
+        err = KErrGeneral;
+        }                                    
+    OstTrace1( TRACE_FLOW, DTRACECOREROUTER_SUBSCRIBE_EXIT, "< DTraceCoreRouter::Subscribe. Err:%d", err );
+    return err;
+    }
+
+
+/**
+ * Unsubscribes from a message
+ * 
+ * @param aRoutingItem The subscription properties
+ */
+void DTraceCoreRouter::Unsubscribe( TRoutingItem& aRoutingItem )
+    {
+    // Make sure not to delete item while going through items somewhere else
+    Kern::MutexWait(*iLock);
+	for ( TInt i = 0; i < iRoutingItems.Count(); i++ )
+	    {
+	    if ( iRoutingItems[ i ].iMessageID == aRoutingItem.iMessageID
+	            && iRoutingItems[ i ].iSubscriber == aRoutingItem.iSubscriber )
+	        {
+	        OstTraceExt2( TRACE_NORMAL, DTRACECOREROUTER_UNSUBSCRIBE_UNSUBSCRIBED, "DTraceCoreRouter::Unsubscribe - Unsubscribed 0x%x MsgID:0x%x", (TUint)aRoutingItem.iSubscriber, (TUint)aRoutingItem.iMessageID );
+	        iRoutingItems.Remove( i );
+	        i--;
+	        }
+	    }
+	Kern::MutexSignal(*iLock); 
+    }
+
+
+/**
+ * Unsubscribes from all messages of given subscriber
+ * 
+ * @param aSubscriber The subscriber to be unregistered
+ */
+void DTraceCoreRouter::Unsubscribe( DTraceCoreSubscriber& aSubscriber )
+    {
+    OstTrace1( TRACE_FLOW, DTRACECOREROUTER_UNSUBSCRIBEALL_ENTRY, "> DTraceCoreRouter::UnsubscribeAll 0x%x", ( TUint )&( aSubscriber ) );
+    
+    Kern::MutexWait(*iLock);
+	for ( TInt i = 0; i < iRoutingItems.Count(); i++ )
+	    {
+	    if ( iRoutingItems[ i ].iSubscriber == &aSubscriber )
+	        {
+	        OstTraceExt2( TRACE_NORMAL, DTRACECOREROUTER_UNSUBSCRIBEALL_UNSUBSCRIBED, "DTraceCoreRouter::UnsubscribeAll - Unsubscribed 0x%x MsgID:%d", (TUint)&aSubscriber, (TInt)iRoutingItems[ i ].iMessageID );
+	        iRoutingItems.Remove( i );
+	        i--;
+	        }
+	    }
+	Kern::MutexSignal(*iLock);
+    }
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/src/TraceCoreSendReceive.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,222 @@
+// 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 "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:
+//
+// Description:
+// Trace Core
+// 
+
+#include "TraceCoreSendReceive.h"
+#include "TraceCorePluginIf.h"
+#include "TraceCoreRouter.h"
+#include "TraceCoreDebug.h"
+#include "TraceCoreOstLddIf.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "TraceCoreSendReceiveTraces.h"
+#endif
+
+
+/**
+ * Constructor
+ */
+DTraceCoreSendReceive::DTraceCoreSendReceive()
+: iPluginInterface( NULL )
+, iSendInterface( NULL )
+, iMediaWriterInterface( NULL )
+, iReceiver( NULL )
+    {
+    }
+
+
+/**
+ * Destructor
+ */                                       
+DTraceCoreSendReceive::~DTraceCoreSendReceive()
+    {
+    DeleteInterfaces();
+    iReceiver = NULL;
+    }
+
+
+/**
+ * Initializer creates the ISA IF and router
+ */
+TInt DTraceCoreSendReceive::Init( MTraceCoreMessageReceiver& aReceiver )
+    {
+    // Create interfaces
+    TInt ret = CreateInterfaces();
+    if ( ret == KErrNone )
+        {        
+        // Initialize all Media interfaces
+        for ( int i = 0; i < iMediaInterfaces.Count() && ret == KErrNone; i++ )
+            {
+            DTraceCoreMediaIf* mediaIf = iMediaInterfaces[ i ];
+            ret = InitMediaInterface( mediaIf );
+            }
+        if ( ret == KErrNone )
+            {
+            iReceiver = &aReceiver;
+            }
+        else
+            {
+            DeleteInterfaces();
+            }
+        }
+    TC_TRACE( ETraceLevelFlow, Kern::Printf( "<DTraceCoreSendReceive::Init() - %d", ret ) )
+    return ret;
+    }
+
+
+/**
+ * Initializes a media interface
+ */
+TInt DTraceCoreSendReceive::InitMediaInterface( DTraceCoreMediaIf* aMediaIf )
+    {
+    TInt ret = aMediaIf->Init( *this );
+    if ( ret == KErrNone )
+        {
+        TUint32 flags = aMediaIf->GetFlags();
+        // First interface that supports sending is stored as the send interface.
+        // TODO: Add a TraceCore message which can select the interface used for sending
+        if ( iSendInterface == NULL && ( flags & KMediaIfSendSupported ) )
+            {
+            iSendInterface = aMediaIf;
+            }
+        // First interface that can write traces is stored to iMediaWriterInterface
+        // TODO: Add a TraceCore message which can select the interface used by the writer
+        if ( iMediaWriterInterface == NULL && ( flags & KMediaIfSendTraceSupported ) )
+            {
+            iMediaWriterInterface = aMediaIf;
+            }
+        // If the plug-in interface is present, it is stored to iPluginInterface
+        if ( iPluginInterface == NULL && ( flags & KMediaIfPluginSupported ) )
+            {
+            iPluginInterface = static_cast< DTraceCorePluginIf* >( aMediaIf );
+            }
+        }
+    TC_TRACE( ETraceLevelFlow, Kern::Printf( "<DTraceCoreSendReceive::InitMediaInterface() - %d", ret ) );
+    return ret;
+    }
+
+
+/**
+ * Creates the media interfaces. This is platform-specific code
+ */
+TInt DTraceCoreSendReceive::CreateInterfaces()
+    {
+    TInt ret( KErrNoMemory );
+#ifdef __WINS__
+    DTraceCoreMediaIf* pluginIf = new DTraceCorePluginIf();
+    if ( pluginIf != NULL )
+        {
+        ret = iMediaInterfaces.Append( pluginIf );
+        }
+    // this is a bit of a hack here for now
+    // we create a DTraceCoreOstLddIf as the writer interface
+    if( ret == KErrNone)
+        {
+        DTraceCoreMediaIf* ostLddIf = new DTraceCoreOstLddIf();
+        if ( ostLddIf != NULL)
+            {
+            ret = iMediaInterfaces.Append( ostLddIf );
+            }
+        }
+#else
+    //  - Plug-in API for media plug-in's. Incoming / outgoing messages.
+    //  - ISA for incoming messages and media writer output
+    DTraceCoreMediaIf* pluginIf = new DTraceCorePluginIf();
+    DTraceCoreMediaIf* usbIf = new DTraceCoreOstLddIf();
+   
+    if ( pluginIf != NULL && usbIf!= NULL )
+        {
+        ret = iMediaInterfaces.Append( pluginIf );
+        ret = ( ret == KErrNone ) ? iMediaInterfaces.Append( usbIf ) : ret;
+        }
+#endif // __WINS__
+
+    TC_TRACE( ETraceLevelFlow, Kern::Printf( "<DTraceCoreSendReceive::CreateInterfaces()" ) );
+    return ret;
+    }
+
+
+/**
+ * Deletes the media interfaces
+ */
+void DTraceCoreSendReceive::DeleteInterfaces()
+    {
+    // Delete all interfaces
+    iMediaInterfaces.ResetAndDestroy();
+    iSendInterface = NULL;
+    iMediaWriterInterface = NULL;
+    iPluginInterface = NULL;
+    }
+
+
+/**
+ * Delegates the incoming message to the router
+ *
+ * @param aMsg The message that was received
+ * @return KErrNotFound if the message id was not found (not subscribed), KErrNone if found
+ */
+TInt DTraceCoreSendReceive::MessageReceived( TTraceMessage &aMsg )
+    {
+    OstTrace1( TRACE_FLOW, DTRACECORESENDRECEIVE_MESSAGERECEIVED_ENTRY, "> DTraceCoreSendReceive::MessageReceived - %d", &aMsg);
+    TInt ret( KErrNotFound );
+    if ( iReceiver != NULL )
+        {
+        ret = iReceiver->MessageReceived( aMsg );
+        }
+    OstTrace1( TRACE_FLOW, DTRACECORESENDRECEIVE_MESSAGERECEIVED_EXIT, "< DTraceCoreSendReceive::MessageReceived - %d",ret);
+    return ret;
+    }
+
+/**
+ * Set Sender Media
+ *
+ * @param Sender media
+ */
+TInt DTraceCoreSendReceive::SetSenderMedia(DTraceCoreMediaIf* aSenderMedia)
+    {
+    if (aSenderMedia != NULL)
+        {
+        TUint32 flags = aSenderMedia->GetFlags();
+        if (flags & KMediaIfSendSupported)
+            {
+            iSendInterface = aSenderMedia;
+            }
+        if (flags & KMediaIfSendTraceSupported)
+            {
+            iMediaWriterInterface = aSenderMedia;
+            }
+        }
+    return KErrNone;
+    }
+
+
+/**
+ * Sends a message to media interface
+ *
+ * @param aMessage The message to be sent
+ */
+TInt DTraceCoreSendReceive::SendMessage( TTraceMessage &aMessage )
+    {
+    TInt retval = KErrGeneral;
+    if ( iSendInterface != NULL )
+        {      
+        // Send the message
+        retval = iSendInterface->Send( aMessage );
+        }
+    OstTrace1( TRACE_FLOW, DTRACECORESENDRECEIVE_SENDMESSAGE_EXIT, "DTraceCoreSendReceive::SendMessage %d", retval );
+    return retval;
+    }
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/src/TraceCoreSettings.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,82 @@
+// 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 "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:
+//
+// Description:
+// Trace Core
+// 
+
+#include "TraceCore.h"
+#include "TraceCoreSettings.h"
+#include "TraceCoreDebug.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "TraceCoreSettingsTraces.h"
+#endif
+
+
+
+/**
+ * Constructor
+ */
+EXPORT_C DTraceCoreSettings::DTraceCoreSettings()
+    {
+    }
+
+
+/**
+ * Destructor
+ */
+EXPORT_C DTraceCoreSettings::~DTraceCoreSettings()
+    {
+    Unregister();
+    }
+
+
+/**
+ * Registers this settings saver to TraceCore
+ */
+EXPORT_C TInt DTraceCoreSettings::Register()
+    {
+    TInt ret = KErrGeneral;
+    
+    // Get TraceCore
+    DTraceCore* traceCore = DTraceCore::GetInstance();
+    if ( traceCore != NULL )
+        {        
+        // Register to settings
+        ret = traceCore->RegisterSettings( *this );
+        }
+    OstTrace1( TRACE_BORDER, DTRACECORESETTINGS_REGISTER_EXIT, "< DTraceCoreSettings::Register. Ret:%d", ret );
+    return ret;
+    }
+
+
+/**
+ * Unregisters this settings saver from TraceCore
+ */
+TInt DTraceCoreSettings::Unregister()
+    {
+    // Get TraceCore
+    DTraceCore* traceCore = DTraceCore::GetInstance();
+    TInt ret = KErrGeneral;
+    if ( traceCore != NULL )
+        {       
+        // Unregister from settings
+        traceCore->UnregisterSettings( *this );
+        }
+    OstTrace1( TRACE_FLOW, DTRACECORESETTINGS_UNREGISTER_EXIT, "< DTraceCoreSettings::Unregister. Ret:%d", ret );
+    return ret;
+    }
+
+
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/src/TraceCoreSubscriber.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,145 @@
+// 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 "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:
+//
+// Description:
+// Trace Core
+
+
+#include "TraceCore.h"
+#include "TraceCoreSubscriber.h"
+#include "TraceCoreRouter.h"
+#include "TraceCoreDebug.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "TraceCoreSubscriberTraces.h"
+#endif
+
+
+
+/**
+ * Constructor
+ */
+EXPORT_C DTraceCoreSubscriber::DTraceCoreSubscriber()
+: iMessageSender( NULL )
+    {
+    }
+
+
+/**
+ * Destructor
+ */
+EXPORT_C DTraceCoreSubscriber::~DTraceCoreSubscriber()
+    {
+    iMessageSender = NULL;
+    Unsubscribe();
+    }
+
+/**
+ * Subscribes to a message by message ID / protocol ID
+ * depending of the header format. First byte of aMessageID is always used
+ * for header format.
+ * 
+ * @param aMessageId The message ID to be subscribed
+ * @param aMsgFormat Message format e.g. EMessageHeaderFormatOst
+ * 
+ */
+EXPORT_C TInt DTraceCoreSubscriber::Subscribe( TUint32 aMessageID, TMessageHeaderFormat aHeaderFormat )
+    {
+    TInt ret(KErrNone);
+    // Use MSByte only for header format
+    TUint32 combined = aHeaderFormat << 24 | (aMessageID & 0x00FFFFFF); // CodForChk_Dis_Magic
+    DTraceCoreSubscriber::Subscribe( combined );
+    return ret;
+    }
+
+/**
+ * Subscribes to a message by message ID
+ * 
+ * @param aMessageId The message ID to be subscribed
+ */
+EXPORT_C TInt DTraceCoreSubscriber::Subscribe( TUint32 aMessageID )
+    {
+    OstTrace1( TRACE_BORDER, DTRACECORESUBSCRIBER_SUBSCRIBE_ENTRY, "> DTraceCoreSubscriber::Subscribe 0x%x", aMessageID );
+    TInt ret = KErrGeneral;
+    DTraceCore* traceCore = DTraceCore::GetInstance();
+    if ( traceCore != NULL )
+        {
+        TRoutingItem routingItem;
+        
+        // If MSByte is empty it is Proprietary message -> Add Proprietary header format id
+        // Otherwise take it from aMessageId (MSByte)
+        if( !(aMessageID & 0xFF000000) ) // CodForChk_Dis_Magic explained in comment
+            {
+            routingItem.iMsgFormat = EMessageHeaderFormatProprietary;
+            }
+        else
+            {
+            // Extract Header Format from aMessageID
+            routingItem.iMsgFormat = (aMessageID >> 24) & 0x000000FF; // CodForChk_Dis_Magic
+            }
+        
+        // Remove Header format
+        aMessageID = (aMessageID & 0x00FFFFFF); // CodForChk_Dis_Magic
+        
+        routingItem.iMessageID = aMessageID;
+        routingItem.iSubscriber = this;
+           
+        ret = traceCore->GetRouter().Subscribe( routingItem );
+        }
+    OstTrace1( TRACE_API, DTRACECORESUBSCRIBER_SUBSCRIBE_EXIT, "DTraceCoreSubscriber::Subscribe. Return code:%d", ret );
+    return ret;
+    }
+    
+
+/**
+ * Unsubscribes a message ID
+ * 
+ * @param aMessageId The message ID to be unsubscribed
+ */
+EXPORT_C void DTraceCoreSubscriber::Unsubscribe( TUint32 aMessageID )
+    {
+    OstTrace1( TRACE_BORDER, DTRACECORESUBSCRIBER_UNSUBSCRIBE_ENTRY, "> DTraceCoreSubscriber::Unsubscribe. MsgId:%d", aMessageID );
+    DTraceCore* traceCore = DTraceCore::GetInstance();
+    if ( traceCore != NULL )
+        {
+        TRoutingItem routingItem;
+        routingItem.iMessageID = aMessageID;
+        routingItem.iSubscriber = this;
+        traceCore->GetRouter().Unsubscribe( routingItem );
+        }
+    }
+
+
+/**
+ * Called by router to set the message sender interface
+ */
+void DTraceCoreSubscriber::SetMessageSender( MTraceCoreMessageSender& aMessageSender )
+    {
+    iMessageSender = &aMessageSender;
+    }
+
+
+/**
+ * Unsubscribes all message ID's of this subscriber
+ */
+void DTraceCoreSubscriber::Unsubscribe()
+    {
+    DTraceCore* traceCore = DTraceCore::GetInstance();
+    
+    // Unsubsribe if TraceCore exists
+    if ( traceCore != NULL )
+        {
+        traceCore->GetRouter().Unsubscribe( *this );
+        }
+    }
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/src/TraceCoreTraceActivationIf.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,149 @@
+// 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 "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:
+//
+// Description:
+// Implementation of Trace activation interface
+// 
+
+#include "TraceCore.h"
+#include "TraceCoreTraceActivationIf.h"
+#include "BTraceOstCategoryBitmap.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "TraceCoreTraceActivationIfTraces.h"
+#endif
+
+
+
+
+/**
+ * Constructor
+ */
+DTraceActivationIf::DTraceActivationIf()
+    {
+    }
+
+
+/**
+ * Destructor
+ */
+DTraceActivationIf::~DTraceActivationIf()
+    {
+    }
+    
+    
+/**
+ * Activate trace group
+ *
+ * @param aComponentId The component ID
+ * @param aGroupId The group ID
+ */
+EXPORT_C void DTraceActivationIf::ActivateTrace( TUint32 aComponentId, TUint32 aGroupId )
+    {    
+    // Get TraceCore
+    DTraceCore* traceCore = DTraceCore::GetInstance();
+    if ( traceCore != NULL )
+        {
+        MTraceCoreActivation* activation = traceCore->GetActivation( aComponentId );
+        if ( activation != NULL )
+            {
+            activation->ActivateTrace( aComponentId, aGroupId );
+            }
+        }
+    }
+    
+    
+/**
+ * Deactivate trace group
+ *
+ * @param aComponentId The component ID
+ * @param aGroupId The group ID
+ */    
+EXPORT_C void DTraceActivationIf::DeactivateTrace( TUint32 aComponentId, TUint32 aGroupId )
+    {
+    OstTraceExt2( TRACE_BORDER, DTRACEACTIVATIONIF_DEACTIVATETRACE_ENTRY,"> DTraceActivationIf::DeactivateTrace. CID:0x%x GID:0x%x", aComponentId, aGroupId );
+    // Get TraceCore
+    DTraceCore* traceCore = DTraceCore::GetInstance();
+    if ( traceCore != NULL )
+        {
+        MTraceCoreActivation* activation = traceCore->GetActivation( aComponentId );
+        if ( activation != NULL )
+            {
+            activation->DeactivateTrace( aComponentId, aGroupId );
+            }
+        }
+
+    }
+
+/**
+ * Check if a Trace is activated for the supplied component and group id
+ *
+ * @param aComponentId The component ID
+ * @param aGroupId The group ID
+ * @return returns ETrue if trace is activated otherwise EFalse
+ */    
+EXPORT_C TBool DTraceActivationIf::IsTraceActivated(TUint32 aComponentId, TUint32 aGroupId)
+    {
+    TBool ret = EFalse;
+    
+    DTraceCore* traceCore = DTraceCore::GetInstance();
+    if (traceCore != NULL)
+        {
+        MTraceCoreActivation* activation = traceCore->GetActivation(aComponentId);
+        if (activation != NULL)
+            {
+            if(activation->IsComponentSupported(aComponentId))
+                {
+                RArray<TUint> groups = activation->GetActivatedGroups(aComponentId);
+                
+                const TUint8 KGroupId = (TUint8)aGroupId;
+                
+                for(TInt i=0;i<groups.Count();i++)
+                    {
+                    if( (TUint8)groups[i] == KGroupId)
+                        {
+                        ret = ETrue;
+                        break;
+                        }
+                    }
+                }
+            } 
+        else
+            {
+            OstTrace0(TRACE_IMPORTANT,DTRACEACTIVATIONIF_DEACTIVATETRACE_NO_ACTIVATION,"DTraceActivationIf::IsTraceActivated - No activation interface");
+            }
+        }
+    else
+        {
+        OstTrace0(TRACE_IMPORTANT,DTRACEACTIVATIONIF_DEACTIVATETRACE_NULL_TRACECORE,"DTraceActivationIf::IsTraceActivated - NULL TraceCore");
+        }
+   
+    return ret;    
+    }
+
+
+/**
+ * Reactivate all currently activated traces
+ *
+ * @return KErrNone if refresh successful
+ */
+EXPORT_C TInt DTraceActivationIf::RefreshActivations()
+    {    
+    // Get TraceCore
+    DTraceCore* traceCore = DTraceCore::GetInstance();
+    if ( traceCore != NULL )
+        {
+        return traceCore->RefreshActivations();
+        }
+    return KErrNotReady;
+    }
+    
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/src/TraceCoreWriter.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,449 @@
+// 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 "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:
+//
+// Description:
+// Trace Core
+// 
+
+#include "TraceCoreWriter.h"
+#include "TraceCore.h"
+#include "TraceCoreDebug.h"
+
+#include "TraceCoreConstants.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "TraceCoreWriterTraces.h"
+#endif
+
+#ifdef WRITE_OST_HEADER
+
+const TUint KDWordShift = 32;
+const TUint KDWordMask = 0xFFFFFFFF;
+const TUint KNanoSeconds = 1000000000;
+
+/**
+ * Musti timestamp mask. First 4 bits are reserved for flags
+ */
+const TUint KTimestampMask = 0x0FFFFFFF;
+
+/**
+ * Musti timestamp flags for XTIv2
+ */
+const TUint KTimestampFlags = 0xD0000000;
+
+const TUint KComponentIdLength(4);
+const TUint KGroupIdLength(4);
+const TUint KTimestampLenght(8);
+
+#endif // WRITE_OST_HEADER
+
+/**
+ * Constructor
+ */
+EXPORT_C DTraceCoreWriter::DTraceCoreWriter( TWriterType aWriterType )
+: iWriterType( aWriterType )
+    {
+    }
+
+
+/**
+ * Destructor
+ */
+EXPORT_C DTraceCoreWriter::~DTraceCoreWriter()
+    {
+    Unregister();
+    }
+
+
+/**
+ * Registers this writer to TraceCore
+ */
+EXPORT_C TInt DTraceCoreWriter::Register()
+    {
+    TInt ret= KErrGeneral;  
+    // Get TraceCore
+    DTraceCore* traceCore = DTraceCore::GetInstance();
+    if ( traceCore != NULL )
+        {
+        // Register this writer
+        ret = traceCore->RegisterWriter( *this );
+        }
+    OstTrace1( TRACE_BORDER, DTRACECOREWRITER_REGISTER_EXIT, "< DTraceCoreWriter::Register %d", ret );
+    return ret;
+    }
+
+
+/**
+ * Unregisters this writer from TraceCore
+ */
+void DTraceCoreWriter::Unregister()
+    {
+    // Get TraceCore
+    DTraceCore* traceCore = DTraceCore::GetInstance();
+    if ( traceCore != NULL )
+        {
+        // Unregister this writer
+        traceCore->UnregisterWriter( *this );
+        }
+    }
+
+
+/**
+ * Gets the writer type
+ */
+TWriterType DTraceCoreWriter::GetWriterType()
+    {
+    return iWriterType;
+    }
+    
+    
+/**
+ * Outputs a TraceCore frame. This calls WriteStart, writes the component and group ID's,
+ * calls WriteBTraceFrame and calls WriteEnd.
+ * 
+ * Tracing is not allowed from this method.
+ *
+ * @param aComponentId the component ID
+ * @param aTraceWord The trace word containing the group ID and the trace ID to write
+ * @param aHeader BTrace header
+ * @param aHeader2 Extra header data
+ * @param aContext The thread context in which this function was called
+ * @param a1 The first trace parameter
+ * @param a2 The second trace parameter
+ * @param a3 The third trace parameter
+ * @param aExtra Extra trace data
+ * @param aPc The program counter value
+ * @param aRecordSize The record size
+ */
+EXPORT_C void DTraceCoreWriter::WriteTraceCoreFrame( const TUint32 aComponentId, const TUint32 aTraceWord, 
+        TUint32 aHeader, TUint32 aHeader2, const TUint32 aContext, const TUint32 a1, 
+        const TUint32 a2, const TUint32 a3, const TUint32 aExtra, const TUint32 aPc, TUint32 aRecordSize )
+    {    
+    //TODO: tidy up code from #ifdef's
+    
+#ifdef USE_OPTIMIZED_WRITE
+	if ( iWriterType == EWriterTypeXTI ) 
+#else
+    if ( false )
+#endif
+		{
+		}
+	else
+		{
+	    TUint32 entryId = WriteStart( EWriterEntryTrace );
+
+#ifdef WRITE_OST_HEADER
+	if ( iWriterType == EWriterTypeXTI )
+	    {
+        // Size is in the beginning of the 
+        TUint32 size = aRecordSize + KTimestampLenght + KComponentIdLength + KGroupIdLength; //+(aHeader & 0xff)
+    #ifdef AUTOGEN_ADD_BTRACE_TIMESTAMP
+        size += KTimestampSize;
+    #endif
+    
+        // Decrease component, group and trace ID (8 bytes) from the size as they are also included in the BTrace
+        // variables and they won't be written in the BTrace packet anymore
+        size -= ( KA1Size + KA2Size );
+        
+        //  version(0x05);    // OST Base Protocol version "1.0" (v00-80-00_r1-04.pdf)
+        //  entityId(0x01);   // Entity id TODO: check if this needs to change with CPU
+        //  protocolId(0x03); // Simple Application Trace Protocol (Not in MIPI specs 08 yet)
+        
+        WriteData( entryId, ( TUint8 )0x05 ); // Version "0.5" because BTrace header included with protocol id 0x03
+        WriteData( entryId, ( TUint8 )0x01 ); // EntityId
+        WriteData( entryId, ( TUint8 )0x03 ); // ProtocolId (not specified in MIPI specs yet)
+        
+        // Set length
+        // If write size less than 256
+        if(size < 256 )
+            {
+            //  length(size);
+            WriteData( entryId, ( TUint8 )size );
+            
+            }
+        else
+            {
+            //  extendedLengthBits0_7(0x00);
+            //  extendedLengthBits8_15(0x00);
+            //  extendedLengthBits16_23(0x00);
+            //  extendedLengthBits24_31(0x00);
+            WriteData( entryId, ( TUint8 )0x00 ); // length field 0 if extended length in use
+            //WriteData( entryId, ( TUint32 )size );// No swap, Length in protocol is little endian //SWAP_DATA( size ) );
+            // Swap needed after all to make little endian in XTI trace??
+            WriteData( entryId, ( TUint32 )SWAP_DATA( size ) );
+            }
+            
+        // Write timestamp
+        TUint64 timestamp = NKern::FastCounter();
+        timestamp = (timestamp * KNanoSeconds ) / NKern::FastCounterFrequency();
+        
+        TUint32 timestampLSB = timestamp & KDWordMask;
+        TUint32 timestampMSB = ( (timestamp >> KDWordShift ) & KTimestampMask ) | KTimestampFlags;
+        
+        WriteData( entryId, SWAP_ID( timestampMSB ) );
+        WriteData( entryId, SWAP_ID( timestampLSB ) );
+	    }
+        
+    // Write Component  and groupid (including traceid )
+    WriteData( entryId, SWAP_ID( aComponentId ) );
+    WriteData( entryId, SWAP_ID( aTraceWord ) );          
+        
+#else // WRITE_OST_HEADER 
+    WriteData( entryId, SWAP_ID( aComponentId ) );
+    WriteData( entryId, SWAP_ID( aTraceWord ) );
+#endif
+    WriteBTraceFrame( entryId, aHeader, aHeader2, aContext, a1, a2, a3, aExtra, aPc, aRecordSize );
+    
+    WriteEnd( entryId );
+		}
+		
+    }
+
+
+/**
+ * Outputs a BTrace frame into this writer.
+ * Tracing is not allowed from this method.
+ *
+ * @param aEntryId the entry ID returned by WriteStart
+ * @param aHeader BTrace header
+ * @param aHeader2 Extra header data
+ * @param aContext The thread context in which this function was called
+ * @param a1 The first trace parameter
+ * @param a2 The second trace parameter
+ * @param a3 The third trace parameter
+ * @param aExtra Extra trace data
+ * @param aPc The program counter value
+ * @param aRecordSize The record size
+ */
+void DTraceCoreWriter::WriteBTraceFrame( const TUint32 aEntryId, TUint32 aHeader, TUint32 aHeader2, 
+        const TUint32 aContext, const TUint32 a1, const TUint32 a2, const TUint32 a3, 
+        const TUint32 aExtra, const TUint32 aPc, TUint32 aRecordSize )
+    {
+    // BTrace frame header. Don't read size from the header because Multipart trace can bigger than can fit to one byte.
+    TUint32 size = aRecordSize;
+    TUint8 flags = static_cast< TUint8 >( ( aHeader >> ( BTrace::EFlagsIndex * KByteSize ) ) & KByteMask );
+    TUint8 category = static_cast< TUint8 >( ( aHeader >> ( BTrace::ECategoryIndex * KByteSize ) ) & KByteMask );
+    TUint8 subcategory = static_cast< TUint8 >( ( aHeader >> ( BTrace::ESubCategoryIndex * KByteSize ) ) & KByteMask );
+    
+    #ifdef __SMP__
+	// Header 2 always present and contains CPU number
+	// If Header2 not originally there, add 4 to size
+	if (!( flags & BTrace::EHeader2Present))
+		{
+        flags |= BTrace::EHeader2Present;
+        aHeader2 = 0;
+        size += KHeader2Size;
+	    }
+	aHeader2 = (aHeader2 &~ BTrace::ECpuIdMask) | (NKern::CurrentCpu()<<20); 
+	#endif
+    
+    // If timestamp is added to frame, the timestamp flag is also set to the header
+    // and the header size is increased by the size of the timestamp
+#ifdef AUTOGEN_ADD_BTRACE_TIMESTAMP
+	if (!( flags & BTrace::ETimestampPresent))
+	    {
+	    size += KTimestampSize;
+	    flags |= BTrace::ETimestampPresent;
+	    }
+#endif
+
+    // In case of autogen and OST categories, the BTrace frame size needs to be adjusted
+    // depending on whether the group / trace ID info is replicated into the
+    // frame or not.
+    if ( category == KCategoryNokiaAutogen )
+        {
+        // Group and trace ID's are not written -> Skip a1
+        size -= KA1Size;
+        }
+        
+    // Same applies to OST categories
+    else if (category >= KMaxKernelCategory    && // category <= KMaxCategory && // Not needed since category is a TUint8
+       	     category != KCategoryNokiaBranchCoverage)
+        {
+        // Component, group and trace ID's from a1 and a2 are skipped
+        size -= ( KA1Size + KA2Size );
+        }
+    else
+        {
+        // Other categories do not have component / group / trace ID's
+        // -> No flagging is needed here
+        }
+
+    // Insert possibly changed values to BTrace header
+    TUint8 sizeToHeader = size;
+    if (size >= KByteMask )
+        {
+        sizeToHeader = KByteMask;
+        }
+    
+    aHeader = ( sizeToHeader << ( BTrace::ESizeIndex * KByteSize ) )
+            | ( flags << ( BTrace::EFlagsIndex * KByteSize ) )
+            | ( category << ( BTrace::ECategoryIndex * KByteSize ) )
+            | ( subcategory << ( BTrace::ESubCategoryIndex * KByteSize ) );
+    
+    // Writes the header
+    WriteData( aEntryId, SWAP_DATA( aHeader ) );
+    size -= KHeaderSize; // Subtract header size
+    
+    if ( flags & BTrace::EHeader2Present )
+        {
+        WriteData( aEntryId, SWAP_DATA( aHeader2 ) );
+    	size -= KHeader2Size;
+        }
+
+#ifdef AUTOGEN_ADD_BTRACE_TIMESTAMP
+    // Timestamp is written after header2
+    TUint32 timestamp = NKern::FastCounter();
+    WriteData( aEntryId, SWAP_DATA( timestamp ) );
+    size -= KTimestampSize;
+#endif
+
+    if ( flags & BTrace::EContextIdPresent )
+        {
+        WriteData( aEntryId, SWAP_DATA( aContext ) );
+        size -= KContextIdSize;
+        }
+    if ( flags & BTrace::EPcPresent )
+        {
+        WriteData( aEntryId, SWAP_DATA( aPc ) );
+        size -= KPcSize;
+        }
+    if ( flags & BTrace::EExtraPresent )
+        {
+        WriteData( aEntryId, SWAP_DATA( aExtra ) );
+        size -= KExtraSize;
+        }
+    // If A1 is present, it is written
+    if ( size >= KA1Size )
+        {
+        if ( category == KCategoryNokiaAutogen )
+            {
+            // Don't write anything
+            }
+        else if (category >= KMaxKernelCategory    && // category <= KMaxCategory && // Not needed since category is a TUint8
+           	     category != KCategoryNokiaBranchCoverage)
+            {
+            // Don't write anything
+            }
+        else
+            {
+            WriteData( aEntryId, SWAP_DATA( a1 ) );
+            size -= KA1Size;
+            }
+    
+        // If A2 is present, it is written
+        if ( size >= KA2Size )
+            {
+            if (category >= KMaxKernelCategory    && // category <= KMaxCategory && // Not needed since category is a TUint8
+                category != KCategoryNokiaBranchCoverage)
+                {
+                // In OST, group / trace ID is in a2 -> Not written
+                }
+            else
+                {
+                WriteData( aEntryId, SWAP_DATA( a2 ) );
+                size -= KA2Size;
+                }
+            
+            // If there is 4 bytes of data left, A3 is written as is
+            // If more, the data is read from buffer pointed by A3
+            if ( size <= KA3Size && size > 0 )
+                {
+                WriteData( aEntryId, SWAP_DATA( a3 ) );
+                }
+            else if ( size > 0 )
+                {
+                WriteRemainingBytes( aEntryId, size, a3 );
+                }
+            }
+        }
+    }
+
+    
+/**
+ * Writes the remaining bytes if data is not 32-bit aligned
+ */
+void DTraceCoreWriter::WriteRemainingBytes( TUint32 aEntryId, TUint32 aSize, TUint32 a3 )
+    {
+    TUint8 extra = aSize % 4; // CodForChk_Dis_Magic
+    TUint32* ptr = ( TUint32* )a3;
+    TUint32* end = ( TUint32* )( ( ( TUint8* )a3 ) + ( aSize - extra ) );
+    TUint32 val;
+    while( ptr < end )
+        {
+        val = *ptr++;
+        WriteData( aEntryId, SWAP_DATA( val ) );
+        }
+    // Write remaining bytes and aligns to 32-bit boundary
+    if ( extra > 0 )
+        {
+        TUint8* ptr8 = ( TUint8* )ptr;
+        TUint8* end8 = ptr8 + extra;
+        TUint8* alignEnd = ( TUint8* )( end + 1 );
+        while ( ptr8 < alignEnd )
+            {
+            if ( ptr8 < end8 )
+                {
+                WriteData( aEntryId, *ptr8++ );
+                }
+            else
+                {
+                WriteData( aEntryId, ( TUint8 )0 );
+                ptr8++;
+                }
+            }
+        }
+    }
+
+   
+EXPORT_C void DTraceCoreWriter::WriteEnd( const TWriteEndParams& aWriteEndParams )
+    {
+    WriteEnd( aWriteEndParams.iEntryId );
+    }
+
+
+/**
+ * Signal to TraceCore if there has been a dropped trace
+ * 
+ * @param aDropped ETrue if the writer dropped the trace - otherwise EFalse
+ * 
+ */
+
+EXPORT_C void DTraceCoreWriter::TraceDropped(TBool aDropped)
+    {
+    DTraceCore* tracecore = DTraceCore::GetInstance();
+    tracecore->SetPreviousTraceDropped(aDropped);
+    }
+
+
+/**
+  * Interrogates tracecore if the last trace was dropped
+  * 
+  * @return  returns ETrue if the trace was dropped otherwise EFalse
+  * 
+  */
+EXPORT_C TBool DTraceCoreWriter::WasLastTraceDropped() const 
+    {
+    TBool ret = EFalse;
+    DTraceCore* tracecore = DTraceCore::GetInstance();
+    ret = tracecore->PreviousTraceDropped();
+    return ret;
+    }
+
+
+
+EXPORT_C TBool DTraceCoreWriter::AbleToWrite(TUint /*aTraceSize*/)
+    {
+    return ETrue;
+    }
+   
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/src/tracecore_ext.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,42 @@
+// 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 "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:
+//
+// Description:
+// Trace Core 
+//
+
+#include <e32def.h>
+#include <e32btrace.h>
+
+#include "TraceCore.h"
+#include "TraceCoreDebug.h"
+
+DECLARE_STANDARD_EXTENSION()
+    {    
+    TC_TRACE( ETraceLevelNormal, Kern::Printf( "DECLARE_STANDARD_EXTENSION Start Trace Core" ) );
+    TInt ret;
+    DTraceCore* tracecore = DTraceCore::CreateInstance();
+    if ( tracecore != NULL )
+        {
+        ret = KErrNone;
+        POSTCODE( Kern::Printf("[POST][TraceCore][Start][OK]"); )
+        }
+    else
+        {
+        //TODO: don't fail phone's startup sequence when DTraceCore obj is not created
+        //TODO: fail only in debug mode
+        ret = KErrNoMemory;
+        POSTCODE( Kern::Printf("[POST][TraceCore][Start][FAIL][%d]", ret ); )
+        }
+    
+    return ret;
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/test/TEF/group/bld.inf	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,16 @@
+// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+//
+
+#include "../te_tracecore/group/bld.inf"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/test/TEF/te_tracecore/group/bld.inf	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,26 @@
+// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+//
+
+#include "../../../../../group/tracecore.hrh"
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_TESTEXPORTS
+../inc/te_tracecore_datawrapper.h                    OS_LAYER_PLATFORM_EXPORT_PATH(test/te_tracecore_datawrapper.h)
+
+PRJ_TESTMMPFILES
+te_tracecore_datawrapper.mmp
+te_tracecore_suite.mmp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/test/TEF/te_tracecore/group/te_tracecore_datawrapper.mmp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,31 @@
+// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+//
+
+TARGET      te_tracecore_datawrapper.lib
+TARGETTYPE  lib
+CAPABILITY  CommDD NetworkControl LocalServices DiskAdmin
+
+OS_LAYER_SYSTEMINCLUDE
+
+USERINCLUDE     ../inc
+
+SOURCEPATH      ../src
+SOURCE          te_tracecore_datawrapper.cpp
+SOURCE          te_processcreator.cpp
+
+//Define so macro implementations will not be empty
+//although trace compiler isn't actually being run
+//for these tests
+MACRO OST_TRACE_COMPILER_IN_USE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/test/TEF/te_tracecore/group/te_tracecore_suite.mmp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,39 @@
+// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+//
+
+#include "../../../../../group/tracecore.hrh"
+
+TARGET      te_tracecoreserver.exe
+TARGETTYPE  exe
+VENDORID    VID_DEFAULT
+CAPABILITY  CommDD NetworkControl LocalServices DiskAdmin
+
+OS_LAYER_SYSTEMINCLUDE
+
+USERINCLUDE     ../inc
+
+SOURCEPATH      ../src
+SOURCE          te_tracecore_server.cpp
+SOURCE          te_tracecore_controller.cpp
+
+LIBRARY         euser.lib
+LIBRARY         testexecuteutils.lib 
+LIBRARY         testexecutelogclient.lib 
+LIBRARY         efsrv.lib
+LIBRARY         bafl.lib 
+LIBRARY         tracedataparser.lib 
+STATICLIBRARY   te_tracecore_datawrapper.lib
+
+UNPAGED
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/test/TEF/te_tracecore/inc/te_processcreator.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,44 @@
+/**
+* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+*/
+
+
+
+/**
+ @file
+ @internalTechnology
+*/
+#ifndef __TE_PROCESSCREATOR_H__
+#define __TE_PROCESSCREATOR_H__
+
+#include <e32base.h>
+
+struct TProcessCreatorResults
+    {
+	TInt iCode;
+	TExitType iExitType;
+	TBuf<64> iDesc;
+    };
+
+class CProcessCreator : public CBase
+{
+public:
+	static TProcessCreatorResults StartProgram(const TDesC& aProgramName, 
+			const TDesC& aCommandLineArgs, TBool aWaitForCompletion=ETrue);
+	
+};
+
+#endif // __TE_PROCESSCREATOR_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/test/TEF/te_tracecore/inc/te_tracecore_controller.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,42 @@
+/**
+* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+*/
+
+#ifndef __TE_TRACECORE_CONTROLLER_H_INCLUDED__
+#define __TE_TRACECORE_CONTROLLER_H_INCLUDED__
+
+#include <test/testblockcontroller.h>
+#include <test/datadictionary.h>
+
+#include <e32base.h>
+#include <e32math.h>
+
+_LIT(KTraceCoreTest, "TraceCoreTest");
+
+class CTraceCoreController : public CTestBlockController
+	{
+public:
+    static CTraceCoreController* NewLC();
+    static CTraceCoreController* NewL();
+    ~CTraceCoreController();
+
+    virtual CDataWrapper* CreateDataL( const TDesC& aData );
+
+private:
+    CTraceCoreController();
+	};
+
+#endif // __TE_TRACECORE_CONTROLLER_H_INCLUDED__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/test/TEF/te_tracecore/inc/te_tracecore_datawrapper.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,133 @@
+// Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+//
+// 
+//
+
+#ifndef TE_TRACECORE_DATAWRAPPER_H_
+#define TE_TRACECORE_DATAWRAPPER_H_
+
+#include <test/datawrapper.h>
+#include <test/TraceOnActivationIf.h>
+#include <TraceCoreOstDriverIf.h> //TraceCoreOstLdd
+#include <TcDriverIf.h> //TcLdd
+
+const TInt KNoOfSlots = 5;
+
+class CTraceCoreDataWrapper : public CDataWrapper
+    {
+public:
+    static CTraceCoreDataWrapper* NewLC();
+    static CTraceCoreDataWrapper* NewL();
+    ~CTraceCoreDataWrapper();
+    
+    TAny* GetObject();
+    TBool DoCommandL(const TTEFFunction& aCommand,
+                     const TTEFSectionName& aSection, 
+                     const TInt aAsyncErrorIndex);
+    
+    TBool GetStringFromConfig(const TDesC& aSectName, const TDesC& aKeyName, TPtrC& aResult);
+    TBool GetBoolFromConfig(const TDesC& aSectName, const TDesC& aKeyName, TBool& aResult);
+    TBool GetIntFromConfig(const TDesC& aSectName, const TDesC& aKeyName, TInt& aResult);
+    TBool GetHexFromConfig(const TDesC& aSectName, const TDesC& aKeyName, TInt& aResult);
+    
+    TBool GetPathFromConfig(const TTEFSectionName& aSection, const TDesC& aPathKey, TFileName& aPath);
+    TBool GetArgsFromConfig(const TTEFSectionName& aSection, TDes& aArgs);
+    TBool GetLongStringFromConfig(const TTEFSectionName& aSection, const TDesC& aKeyName, TDes& aResult);
+
+protected:
+    CTraceCoreDataWrapper();
+    void ConstructL();
+
+    // Command functions
+    void DoCmdCopyFileL(const TTEFSectionName& aSection);
+    void DoCmdDeleteFileFromAllDrivesL(const TTEFSectionName& aSection);
+    void DoCmdDeleteFileL(const TTEFSectionName& aSection);
+    void DoCmdDeleteEmptyFolder(const TTEFSectionName& aSection);
+    void DoCmdFileExists(const TTEFSectionName& aSection);
+    void DoCmdCheckFileSize(const TTEFSectionName& aSection);
+    void DoCmdRunProcess(const TTEFSectionName& aSection);
+    void DoCmdCreateSubstDrive(const TTEFSectionName& aSection);
+    void DoCmdUnSubstDrive(const TTEFSectionName& aSection);
+    void DoCmdCheckMaxFileSizeL(const TTEFSectionName& aSection);
+    void DoCmdCheckFileIsAppendedL(const TTEFSectionName& aSection);
+    void DoCmdVerifyTraceDataL(const TTEFSectionName& aSection);
+    void DoCmdVerifyPrimingDataL(const TTEFSectionName& aSection);
+    void DoCmdVerifyDroppedTracesL(const TTEFSectionName& aSection);
+    void DoCmdVerifySlot(const TTEFSectionName& aSection);
+    void DoCmdFileChangeNotification(const TTEFSectionName& aSection, const TInt aAsyncErrorIndex);
+    void DoCmdRegisterNotifReceiver(const TTEFSectionName& aSection);
+    void DoCmdUnregisterNotifReceiver(const TTEFSectionName& aSection);
+    void DoCmdInstrumentTraceSequence(const TTEFSectionName& aSection);
+    void DoCmdSetUpTcLdd(const TTEFSectionName& aSection);
+    void DoCmdCleanUpTcLdd(const TTEFSectionName& aSection);
+    void DoCmdSetUpTcOstLdd(const TTEFSectionName& aSection);
+    void DoCmdCleanUpTcOstLdd(const TTEFSectionName& aSection);
+    void DoCmdSetUpTraceOnActivation(const TTEFSectionName& aSection);
+    void DoCmdCleanUpTraceOnActivation(const TTEFSectionName& aSection);
+    void DoCmdActivateDeactivateTrace(const TTEFSectionName& aSection);
+    void DoCmdReadTracesFromBuffer();
+    
+protected:
+    // Helper methods
+    void CopyFileL(const TDesC& aSrcFile, const TDesC& aDstFile);
+    void DeleteFileFromAllDrivesL(const TDesC& aFile);
+    void DeleteFileL(const TDesC& aFile, TInt aStrictMode = ETrue);
+    void DeleteEmptyFolder(const TDesC& aFolder);
+    TBool FileExists(const TDesC& aFile);
+    TInt CheckFileSize(const TDesC& aFile, TInt aMinSize, TInt aMaxSize);
+    void RunProcess(const TDesC& aProgramName, const TDesC& aCmdLineArgs, TInt aNoOfCalls = 1, TInt aAllowedErrorCode = KErrNone);
+    void CreateSubstDrive(const TDesC& aFolderPath, TDriveNumber aDrive);
+    void UnSubstDrive(TDriveNumber aDrive);
+    TBool DriveNumberFromString(const TDesC& aDriveString, TDriveNumber& aDriveNumber);
+    void VerifyPrimingDataL(const TDesC& aFile, TInt aGroupId, TBool aVerifyData, TInt& aNumTraces, TInt& aNumPrimingTraces);
+    void VerifyDroppedPrintfTracesL(const TDesC& aFile, const TDesC& aFindString, TInt& aLastNumberFound, TInt& aNumDroppedTraces);
+    void VerifyDroppedBinaryTracesL(const TDesC& aFile, TInt aGroupId, TInt aComponentId, TInt& aLastNumberFound, TInt& aNumDroppedTraces);
+    void StoreInSlot(TInt aEntry, TInt aSlot);
+    TInt ReadFromSlot(TInt aSlot);
+    TInt GetSlotValue(const TTEFSectionName& aSection, const TDesC& aValueKey, const TDesC& aSlotNumberKey);
+    void FileHasPrintfStringL(const TDesC& aFile, const TDesC& aFindString, TInt& aNumFound);
+    void BufferHasPrintfStringL(TDesC8& aBuffer, const TDesC& aFindString, TInt& aNumFound);
+    void InstrumentBinaryTracePoint(TInt aGroupId, TInt aComponentId, TInt aData, TInt aTraceId = 1);
+    void InstrumentBinaryTraceSequence(TInt aSequenceLength, TInt aGroupId, TInt aComponentId);
+    void InstrumentPrintfTraceSequence(TInt aSequenceLength, const TDesC& aString);
+    TInt LoadLdd(const TDesC& aLddName, TBool aSingleUse);
+    TInt FreeLdd(const TDesC& aLddName);
+    TBool LoadLdd(const TDesC& aLddName, const TTEFSectionName& aSection);
+    template <class T> TInt OpenLdd(const TDesC& aLddName, T& aLdd);
+    template <class T> TBool OpenLdd(const TDesC& aLddName, T& aLdd, const TTEFSectionName& aSection);
+
+    //  MActiveCallback implementation
+    void RunL(CActive* aActive, TInt aIndex);
+    void DoCancel(CActive* aActive, TInt aIndex);
+
+protected:
+    // Member variables
+    RFs                             iFs;
+    RTimer                          iTimer;
+    TFixedArray<TInt, KNoOfSlots>   iSlots;
+    CActiveCallback*                iActiveFileChangeNotification;
+    CActiveCallback*                iActiveFileChangeNotificationTimeout;
+    TPtrC                           iCurrentSectionName;
+    RTraceOnActivation              iTraceOnActivationLdd;
+    RTcDriver                       iTcLdd;
+    RTraceCoreOstDriver             iTraceCoreOstLdd;
+    RBuf8                           iTraceBuffer;
+    TBool                           iTcLddLoadedAtStart;
+    TBool                           iTcOstLddLoadedAtStart;
+    TBool                           iTraceOnActivationLoadedAtStart;
+    };
+
+
+#endif /* TE_TRACECORE_DATAWRAPPER_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/test/TEF/te_tracecore/inc/te_tracecore_server.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,30 @@
+/**
+* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+*/
+
+#ifndef __TE_TRACECORE_SERVER_H_INCLUDED__
+#define __TE_TRACECORE_SERVER_H_INCLUDED__
+
+#include <test/testserver2.h>
+
+class CTe_TraceCoreSuite : public CTestServer2
+    {
+public:
+    static CTe_TraceCoreSuite* NewL();
+    virtual CTestBlockController* CreateTestBlock();
+    };
+
+#endif // __TE_TRACECORE_SERVER_H_INCLUDED__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/test/TEF/te_tracecore/src/te_processcreator.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,61 @@
+// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+//
+
+
+
+/**
+ @file
+ @internalTechnology
+*/
+#include "te_processcreator.h"
+
+
+TProcessCreatorResults CProcessCreator::StartProgram(const TDesC& aProgramName, 
+													 const TDesC& aCommandLineArgs, 
+													 TBool aWaitForCompletion)
+    {
+    RProcess process;
+	TProcessCreatorResults res;
+	res.iExitType = EExitPending;
+	res.iCode = process.Create(aProgramName, aCommandLineArgs);
+	if(res.iCode == KErrNone)
+		{
+		if(aWaitForCompletion)
+		    {
+            TRequestStatus status = KRequestPending;
+			process.Logon(status);
+			process.Resume();
+			User::WaitForRequest(status);
+            if(status.Int() == KErrNone)
+                {
+                res.iCode = process.ExitReason();
+                res.iExitType = process.ExitType();
+                res.iDesc.Copy(process.ExitCategory());
+                }
+            else
+                {
+                res.iCode = status.Int();
+                }
+            }
+		else
+		    {
+            process.Resume();
+		    }
+		}
+	process.Close();
+	
+	return res;
+    }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/test/TEF/te_tracecore/src/te_tracecore_controller.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,62 @@
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+//
+// 
+//
+
+#include "te_tracecore_controller.h"
+#include "te_tracecore_datawrapper.h"
+
+CTraceCoreController::CTraceCoreController()
+    {  
+    }
+
+CTraceCoreController::~CTraceCoreController()
+    {  
+    }
+
+CTraceCoreController* CTraceCoreController::NewLC()
+    {
+    CTraceCoreController* self = new (ELeave)CTraceCoreController();
+    CleanupStack::PushL(self);
+    // No ConstructL()
+    return self;
+    }
+
+CTraceCoreController* CTraceCoreController::NewL()
+    {
+    CTraceCoreController* self=CTraceCoreController::NewLC();
+    CleanupStack::Pop(self);
+    return self;
+    }
+
+CDataWrapper*  CTraceCoreController::CreateDataL( const TDesC& aData ) 
+    {
+    CDataWrapper* dataWrapper = NULL;
+    
+    if(aData == KTraceCoreTest)
+        {
+        dataWrapper = CTraceCoreDataWrapper::NewL();
+        }
+    
+    return dataWrapper; 
+    }
+    
+
+
+
+
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/test/TEF/te_tracecore/src/te_tracecore_datawrapper.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,2012 @@
+// Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+//
+// 
+//
+#include <bautils.h> 
+#include <test/tracedataparser.h>
+
+#include "te_tracecore_datawrapper.h"
+#include "te_processcreator.h"
+
+_LIT(KConstantsSectionName,             "Constants");
+
+_LIT(KCmdCopyFile,                      "CopyFile");
+_LIT(KCmdDeleteFile,                    "DeleteFile");
+_LIT(KCmdDeleteFileFromAllDrives,       "DeleteFileFromAllDrives");
+_LIT(KCmdDeleteEmptyFolder,             "DeleteEmptyFolder");
+_LIT(KCmdFileExists,                    "FileExists");
+_LIT(KCmdRunProcess,                    "RunProcess");
+_LIT(KCmdCheckFileSize,                 "CheckFileSize");
+_LIT(KCmdCreateSubstDrive,              "CreateSubstDrive");
+_LIT(KCmdUnSubstDrive,                  "UnSubstDrive");
+_LIT(KCmdCheckMaxFileSize,              "CheckMaxFileSize");
+_LIT(KCmdCheckFileIsAppended,           "CheckFileIsAppended");
+_LIT(KCmdVerifyTraceData,               "VerifyTraceData");
+_LIT(KCmdVerifyPrimingData,             "VerifyPrimingData");
+_LIT(KCmdVerifyDroppedTraces,           "VerifyDroppedTraces");
+_LIT(KCmdVerifySlot,                    "VerifySlot");
+_LIT(KCmdFileChangeNotification,        "FileChangeNotification");
+_LIT(KCmdSetUpTraceOnActivation,        "SetUpTraceOnActivation");
+_LIT(KCmdRegisterNotifReceiver,         "RegisterNotifReceiver");
+_LIT(KCmdUnregisterNotifReceiver,       "UnregisterNotifReceiver");
+_LIT(KCmdCleanUpTraceOnActivation,      "CleanUpTraceOnActivation");
+_LIT(KCmdInstrumentTraceSequence,       "InstrumentTraceSequence");
+_LIT(KCmdSetUpTcLdd,                    "SetUpTcLdd");
+_LIT(KCmdCleanUpTcLdd,                  "CleanUpTcLdd");
+_LIT(KCmdSetUpTcOstLdd,                 "SetUpTcOstLdd");
+_LIT(KCmdCleanUpTcOstLdd,               "CleanUpTcOstLdd");
+_LIT(KCmdActivateDeactivateTrace,       "ActivateDeactivateTrace");
+_LIT(KCmdReadTracesFromBuffer,          "ReadTracesFromBuffer");
+
+_LIT(KSrcFileKey,                       "src_file");
+_LIT(KDstFileKey,                       "dst_file");
+_LIT(KFileKey,                          "file");
+_LIT(KExeNameKey,                       "exe_name");
+_LIT(KArgsKey,                          "args");
+_LIT(KNoOfCallsKey,                     "calls");
+_LIT(KNoOfAllowedTimeoutsKey,           "allowed_timeouts");
+_LIT(KFolderPathKey,                    "path");
+_LIT(KDriveKey,                         "drive");
+_LIT(KSizeKey,                          "size");
+_LIT(KMinSizeKey,                       "min_size");
+_LIT(KMaxSizeKey,                       "max_size");
+_LIT(KSystemDriveKey,                   "system_drive");
+_LIT(KUnfetteredKey,                    "unfettered");
+_LIT(KDurationKey,                      "duration");
+_LIT(KMinIncreaseKey,                   "min_increase");
+_LIT(KGroupIdKey,                       "group_id");
+_LIT(KComponentIdKey,                   "component_id");
+_LIT(KSlotNumberKey,                    "slot");
+_LIT(KTracesSlotNumberKey,              "traces_slot");
+_LIT(KPrimingTracesSlotNumberKey,       "priming_traces_slot");
+_LIT(KSlotANumberKey,                   "slot_a");
+_LIT(KSlotBNumberKey,                   "slot_b");
+_LIT(KValueAKey,                        "value_a");
+_LIT(KValueBKey,                        "value_b");
+_LIT(KDifferenceKey,                    "difference");
+_LIT(KMinDifferenceKey,                 "min_difference");
+_LIT(KMaxDifferenceKey,                 "max_difference");
+_LIT(KVerifyData,                       "verify_data");
+_LIT(KFindStringKey,                    "find_string");
+_LIT(KExpectedKey,                      "expected");
+_LIT(KLengthKey,                        "length");
+_LIT(KStringKey,                        "string");
+_LIT(KActivateKey,                      "activate");
+_LIT(KBufferSizeKey,                    "buffer_size");
+_LIT(KAllowErrorKey,                    "allow_error");
+_LIT(KSingleUseKey,                     "single_use");
+_LIT(KOpenLddKey,                       "open_ldd");
+_LIT(KCloseLddKey,                      "close_ldd");
+
+_LIT(KSpace,                            " ");
+_LIT(KInt,                              "%d");
+
+_LIT(KTcLdd,                            "TcLdd");
+_LIT(KTraceCoreOstLdd,                  "TraceCoreOstLdd");
+_LIT(KTraceOnActivationLdd,             "d_traceonactivation.ldd");
+
+const TInt KSecondsToMicroSeconds       = 1000000;
+const TInt KDefaultBufferSize           = 1024;
+const TInt KLongStringLength            = 512;
+
+
+CTraceCoreDataWrapper::CTraceCoreDataWrapper()
+:   iActiveFileChangeNotification(NULL)
+,   iActiveFileChangeNotificationTimeout(NULL)
+,   iTcLddLoadedAtStart(EFalse)
+,   iTcOstLddLoadedAtStart(EFalse)
+,   iTraceOnActivationLoadedAtStart(EFalse)
+    {  
+    }
+
+CTraceCoreDataWrapper::~CTraceCoreDataWrapper()
+    {  
+    delete iActiveFileChangeNotification;
+    delete iActiveFileChangeNotificationTimeout;
+    iFs.Close();
+    iTimer.Close();
+    iTraceBuffer.Close();
+    iTcLdd.Close();
+    iTraceCoreOstLdd.Close();
+    iTraceOnActivationLdd.Close();
+    }
+
+CTraceCoreDataWrapper* CTraceCoreDataWrapper::NewLC()
+    {
+    CTraceCoreDataWrapper* self = new (ELeave)CTraceCoreDataWrapper();
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    return self;
+    }
+
+CTraceCoreDataWrapper* CTraceCoreDataWrapper::NewL()
+    {
+    CTraceCoreDataWrapper* self=CTraceCoreDataWrapper::NewLC();
+    CleanupStack::Pop(self); 
+    return self;
+    }
+
+void CTraceCoreDataWrapper::ConstructL()
+    {
+    User::LeaveIfError(iFs.Connect());
+    User::LeaveIfError(iTimer.CreateLocal());
+    iActiveFileChangeNotification = CActiveCallback::NewL(*this);
+    iActiveFileChangeNotificationTimeout = CActiveCallback::NewL(*this);
+    }
+
+TAny* CTraceCoreDataWrapper::GetObject()
+    {
+    return this;
+    }
+
+TBool CTraceCoreDataWrapper::GetStringFromConfig(const TDesC& aSectName, const TDesC& aKeyName, TPtrC& aResult)
+    {
+    TBool found = CDataWrapper::GetStringFromConfig(aSectName, aKeyName, aResult);    
+    if (found)
+        {
+        TPtrC constantName(aResult);
+        CDataWrapper::GetStringFromConfig(KConstantsSectionName(), constantName, aResult);
+        }
+    return found;
+    }
+
+TBool CTraceCoreDataWrapper::GetBoolFromConfig(const TDesC& aSectName, const TDesC& aKeyName, TBool& aResult)
+    {
+    TBool found = CDataWrapper::GetIntFromConfig(aSectName, aKeyName, aResult);
+    if (!found)
+        {
+        TPtrC constantName;
+        found = CDataWrapper::GetStringFromConfig(aSectName, aKeyName, constantName);
+        if (found)
+            {
+            found = CDataWrapper::GetBoolFromConfig(KConstantsSectionName(), constantName, aResult);
+            if (!found)
+                {
+                found = CDataWrapper::GetBoolFromConfig(aSectName, aKeyName, aResult);
+                }
+            }
+        }
+    return found;
+    }
+
+TBool CTraceCoreDataWrapper::GetIntFromConfig(const TDesC& aSectName, const TDesC& aKeyName, TInt& aResult)
+    {
+    TBool found = CDataWrapper::GetIntFromConfig(aSectName, aKeyName, aResult);
+    if (!found)
+        {
+        TPtrC constantName;
+        found = CDataWrapper::GetStringFromConfig(aSectName, aKeyName, constantName);
+        if (found)
+            {
+            found = CDataWrapper::GetIntFromConfig(KConstantsSectionName(), constantName, aResult);
+            }
+        }
+    return found;
+    }
+
+TBool CTraceCoreDataWrapper::GetHexFromConfig(const TDesC& aSectName, const TDesC& aKeyName, TInt& aResult)
+    {
+    TBool found = CDataWrapper::GetIntFromConfig(aSectName, aKeyName, aResult);
+    if (!found)
+        {
+        TPtrC constantName;
+        found = CDataWrapper::GetStringFromConfig(aSectName, aKeyName, constantName);
+        if (found)
+            {
+            found = CDataWrapper::GetHexFromConfig(KConstantsSectionName(), constantName, aResult);
+            if (!found)
+                {
+                found = CDataWrapper::GetHexFromConfig(aSectName, aKeyName, aResult);
+                }
+            }
+        }
+    else
+        {
+        found = CDataWrapper::GetHexFromConfig(aSectName, aKeyName, aResult);
+        }
+    return found;
+    }
+
+TBool CTraceCoreDataWrapper::GetPathFromConfig(const TTEFSectionName& aSection, const TDesC& aPathKey, TFileName& aPath)
+    {
+    TBool found = EFalse;
+    TPtrC file;
+    if (GetStringFromConfig(aSection, aPathKey, file))
+        {
+        found = ETrue;
+        TBool useSysDrive = EFalse;
+        GetBoolFromConfig(aSection, KSystemDriveKey(), useSysDrive);
+        TPtrC driveString;
+        if (GetStringFromConfig(aSection, KDriveKey(), driveString))
+            {
+            aPath.Zero();
+            aPath.Append(driveString);
+            aPath.Append(_L(":"));
+            aPath.Append(file);
+            }
+        else if (useSysDrive)
+            {
+            aPath.Zero();
+            aPath.Append(RFs::GetSystemDriveChar());
+            aPath.Append(_L(":"));
+            aPath.Append(file);
+            }
+        else
+            {
+            aPath.Copy(file);
+            }
+        }
+    else
+        {
+        ERR_PRINTF2(_L("No %S in INI file"), &aPathKey);
+        SetBlockResult(EFail);
+        }
+    return found;
+    }
+
+TBool CTraceCoreDataWrapper::GetArgsFromConfig(const TTEFSectionName& aSection, TDes& aArgs)
+    {
+    TPtrC cmdLineArgs(KNullDesC);
+    TBool found = GetStringFromConfig(aSection, KArgsKey(), cmdLineArgs);
+    aArgs.Copy(cmdLineArgs);
+    if (!found)
+        {
+        // Args may be seperated
+        TInt argNumber = 0;
+        TBuf<KTEFMaxNameLength> argKeyName;
+        found = ETrue;
+        
+        while (found)
+            {
+            argNumber++;
+            argKeyName.Copy(KArgsKey());
+            argKeyName.AppendFormat(KInt(), argNumber);
+            found = GetStringFromConfig(aSection, argKeyName, cmdLineArgs);
+            if (found)
+                {
+                if (argNumber > 1)
+                    {
+                    aArgs.Append(KSpace());
+                    }
+                aArgs.Append(cmdLineArgs);
+                }
+            }
+        
+        if (argNumber > 1)
+            {
+            found = ETrue;
+            }
+        }
+    if (found)
+        {
+        INFO_PRINTF2(_L("Found args \"%S\" in INI file"), &aArgs);
+        }
+    return found;
+    }
+
+TBool CTraceCoreDataWrapper::GetLongStringFromConfig(const TTEFSectionName& aSection, const TDesC& aKeyName, TDes& aResult)
+    {
+    TPtrC stringLine;
+    TBool found = GetStringFromConfig(aSection, aKeyName, stringLine);
+    if (found)
+        {
+        aResult.Copy(stringLine);
+        }
+    else
+        {
+        TInt lineNumber = 0;
+        TBuf<KTEFMaxNameLength> keyName;
+        found = ETrue;
+        aResult.Zero();
+        
+        while (found)
+            {
+            lineNumber++;
+            keyName.Copy(aKeyName);
+            keyName.AppendFormat(KInt(), lineNumber);
+            found = GetStringFromConfig(aSection, keyName, stringLine);
+            if (found)
+                {
+                aResult.Append(stringLine);
+                }
+            }
+        
+        if (lineNumber > 1)
+            {
+            found = ETrue;
+            }
+        }
+    return found;
+    }
+
+TBool CTraceCoreDataWrapper::DoCommandL(const TTEFFunction& aCommand,
+                                             const TTEFSectionName& aSection,
+                                             const TInt aAsyncErrorIndex)
+    {
+    TBool ret = ETrue;
+    if (aCommand == KCmdCopyFile())
+        {
+        DoCmdCopyFileL(aSection);
+        }
+    else if (aCommand == KCmdDeleteFile())
+        {
+        DoCmdDeleteFileL(aSection);
+        }
+    else if (aCommand == KCmdDeleteFileFromAllDrives())
+        {
+        DoCmdDeleteFileFromAllDrivesL(aSection);
+        }
+    else if (aCommand == KCmdDeleteEmptyFolder())
+        {
+        DoCmdDeleteEmptyFolder(aSection);
+        }
+    else if (aCommand == KCmdFileExists())
+        {
+        DoCmdFileExists(aSection);
+        }
+    else if (aCommand == KCmdCheckFileSize())
+        {
+        DoCmdCheckFileSize(aSection);
+        }
+    else if (aCommand == KCmdRunProcess())
+        {
+        DoCmdRunProcess(aSection);
+        }
+    else if (aCommand == KCmdCreateSubstDrive())
+        {
+        DoCmdCreateSubstDrive(aSection);
+        }
+    else if (aCommand == KCmdUnSubstDrive())
+        {
+        DoCmdUnSubstDrive(aSection);
+        }
+    else if (aCommand == KCmdCheckMaxFileSize())
+        {
+        DoCmdCheckMaxFileSizeL(aSection);
+        }
+    else if (aCommand == KCmdCheckFileIsAppended())
+        {
+        DoCmdCheckFileIsAppendedL(aSection);
+        }
+    else if (aCommand == KCmdVerifyTraceData())
+        {
+        DoCmdVerifyTraceDataL(aSection);
+        }
+    else if (aCommand == KCmdVerifyPrimingData())
+        {
+        DoCmdVerifyPrimingDataL(aSection);
+        }
+    else if (aCommand == KCmdVerifyDroppedTraces())
+        {
+        DoCmdVerifyDroppedTracesL(aSection);
+        }
+    else if (aCommand == KCmdVerifySlot())
+        {
+        DoCmdVerifySlot(aSection);
+        }
+    else if (aCommand == KCmdFileChangeNotification())
+        {
+        DoCmdFileChangeNotification(aSection, aAsyncErrorIndex);
+        }
+    else if (aCommand == KCmdSetUpTraceOnActivation())
+        {
+        DoCmdSetUpTraceOnActivation(aSection);
+        }
+    else if (aCommand == KCmdRegisterNotifReceiver())
+        {
+        DoCmdRegisterNotifReceiver(aSection);
+        }
+    else if (aCommand == KCmdUnregisterNotifReceiver())
+        {
+        DoCmdUnregisterNotifReceiver(aSection);
+        }
+    else if (aCommand == KCmdCleanUpTraceOnActivation())
+        {
+        DoCmdCleanUpTraceOnActivation(aSection);
+        }
+    else if (aCommand == KCmdInstrumentTraceSequence())
+        {
+        DoCmdInstrumentTraceSequence(aSection);
+        }
+    else if (aCommand == KCmdSetUpTcLdd())
+        {
+        DoCmdSetUpTcLdd(aSection);
+        }
+    else if (aCommand == KCmdCleanUpTcLdd())
+        {
+        DoCmdCleanUpTcLdd(aSection);
+        }
+    else if (aCommand == KCmdSetUpTcOstLdd())
+        {
+        DoCmdSetUpTcOstLdd(aSection);
+        }
+    else if (aCommand == KCmdCleanUpTcOstLdd())
+        {
+        DoCmdCleanUpTcOstLdd(aSection);
+        }
+    else if (aCommand == KCmdActivateDeactivateTrace())
+        {
+        DoCmdActivateDeactivateTrace(aSection);
+        }
+    else if (aCommand == KCmdReadTracesFromBuffer())
+        {
+        DoCmdReadTracesFromBuffer();
+        }
+    else
+        {
+        ret = EFalse;
+        }
+    return ret;
+    }
+
+void CTraceCoreDataWrapper::CopyFileL(const TDesC& aSrcFile,
+                                            const TDesC& aDstFile)
+    {
+    INFO_PRINTF3(_L("CopyFile aSrcFile (%S) aDestFile (%S)"), &aSrcFile, &aDstFile);
+
+    TInt err = KErrNone;
+    
+    // attempt to create the folder if it does not exist
+    if (!BaflUtils::FolderExists(iFs, aDstFile))
+        {
+        err = iFs.MkDirAll(aDstFile);
+        if (err != KErrNone)
+            {
+            ERR_PRINTF3(_L("CopyFile MKDIRALL FAILED aDestFile (%S) err (%d)"), &aDstFile, err);
+            SetError(err);
+            }
+        }
+    
+    CFileMan* fileMan = CFileMan::NewL(iFs);
+
+    // Make file read-write
+    err = fileMan->Attribs(aDstFile, 0, KEntryAttReadOnly, TTime(0), CFileMan::ERecurse);
+    if (err != KErrNone && err != KErrNotFound)
+        {
+        ERR_PRINTF3(_L("CopyFile ATTRIBS FAILED aDestFile (%S) err (%d)"), &aDstFile, err);
+        SetError(err);
+        }
+    
+    err = fileMan->Copy(aSrcFile, aDstFile);
+    if (err != KErrNone)
+        {
+        ERR_PRINTF4(_L("CopyFile COPY FAILED aSrcFile (%S) aDestFile (%S) err (%d)"), &aSrcFile, &aDstFile, err);
+        SetError(err);
+        }
+    else
+        {
+        INFO_PRINTF3(_L("CopyFile copied file OK aSrcFile (%S) aDestFile (%S)"), &aSrcFile, &aDstFile);
+        }
+    
+    delete fileMan;
+    }
+
+void CTraceCoreDataWrapper::DeleteFileFromAllDrivesL(const TDesC& aFile)
+    {
+    INFO_PRINTF2(_L("DeleteFileFromAllDrives aFile (%S)"), &aFile);
+
+    TDriveList driveList;
+    TInt err =  iFs.DriveList(driveList);
+    if (err != KErrNone)
+        {
+        ERR_PRINTF2(_L("DeleteFileFromAllDrives DRIVELIST FAILED err (%d)"), err);
+        SetError(err);
+        }
+    else
+        {
+        CFileMan* fileMan = CFileMan::NewL(iFs);
+        TChar drives[] = {'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'};
+        for (TInt i=0; i<driveList.Size(); i++)
+            {
+            if (driveList[i])
+                {
+                TFileName file;
+                file.Zero();
+                file.Append(drives[i]);
+                file.Append(_L(":"));
+                file.Append(aFile);
+                
+                DeleteFileL(file, EFalse);
+                }
+            }
+        delete fileMan;
+        }
+    }
+
+void CTraceCoreDataWrapper::DeleteFileL(const TDesC& aFile, TInt aStrictMode)
+    {
+    if (aStrictMode)
+        {
+        INFO_PRINTF2(_L("DeleteFile aFile (%S)"), &aFile);
+        }
+    
+    CFileMan* fileMan = CFileMan::NewL(iFs);
+
+    // Make file read-write
+    TInt err = fileMan->Attribs(aFile, 0, KEntryAttReadOnly, TTime(0), CFileMan::ERecurse);
+    if (err == KErrNone)
+        {
+        err = fileMan->Delete(aFile);
+        if (err == KErrNone)
+            {
+            INFO_PRINTF2(_L("DeleteFile deleted file OK file (%S)"), &aFile);
+            }
+        else
+            {
+            ERR_PRINTF3(_L("DeleteFile DELETE FAILED file (%S) err (%d)"), &aFile, err);
+            SetError(err);
+            }
+        }                
+    else if (err == KErrAccessDenied && !aStrictMode)
+        {
+        WARN_PRINTF2(_L("DeleteFile file (%S) READONLY"), &aFile);
+        }
+    else if (err == KErrNotReady && !aStrictMode)
+        {
+        WARN_PRINTF2(_L("DeleteFile file (%S) NOT READY"), &aFile);
+        }
+    else if (err != KErrNotFound && err != KErrPathNotFound)
+        {
+        ERR_PRINTF3(_L("DeleteFile ATTRIBS error (%d) file (%S)"), err, &aFile);
+        SetError(err);
+        }    
+    else if (aStrictMode)
+        {
+        INFO_PRINTF2(_L("DeleteFile aFile (%S) DOES NOT EXIST"), &aFile);
+        }
+    
+    delete fileMan;
+    }
+
+/**
+ * Deletes an empty folder. If folder is not empty the current test is failed with KErrInUse
+ */
+void CTraceCoreDataWrapper::DeleteEmptyFolder(const TDesC& aFolder)
+    {
+    INFO_PRINTF2(_L("DeleteEmptyFolder aFolder (%S)"), &aFolder);
+    
+    if (BaflUtils::PathExists(iFs, aFolder))
+        {
+        TInt err = iFs.SetAtt(aFolder, 0, KEntryAttReadOnly);
+        if (err != KErrNone)
+            {
+            ERR_PRINTF3(_L("DeleteEmptyFolder SETATT FAILED aFolder (%S) err (%d)"), &aFolder, err);
+            SetError(err);
+            }
+        else
+            {
+            err = iFs.RmDir(aFolder);
+            if (err != KErrNone)
+                {
+                ERR_PRINTF3(_L("DeleteEmptyFolder DELETE FAILED aFolder (%S) err (%d)"), &aFolder, err);
+                SetError(err);
+                }
+            else
+                {
+                INFO_PRINTF2(_L("DeleteEmptyFolder deleted folder OK aFolder (%S)"), &aFolder);
+                }        
+            }
+        }
+    else
+        {
+        INFO_PRINTF2(_L("DeleteEmptyFolder aFolder DOES NOT EXIST (%S)"), &aFolder);
+        }
+    }
+
+TBool CTraceCoreDataWrapper::FileExists(const TDesC& aFile)
+    {
+    INFO_PRINTF2(_L("FileExists aFile (%S)"), &aFile);
+    TBool fileExists = EFalse;
+    
+    if (BaflUtils::FileExists(iFs, aFile))
+        {
+        INFO_PRINTF2(_L("FileExists file exists OK aFile (%S)"), &aFile);
+        fileExists = ETrue;
+        }
+    else
+        {
+        ERR_PRINTF2(_L("FileExists aFile DOES NOT EXIST (%S)"), &aFile);
+        SetError(KErrNotFound);
+        }
+    
+    return fileExists;
+    }
+
+/**
+ * Checks that a given file has size within given limits
+ * 
+ * @return Size of file on success otherwise symbian error code 
+ *
+ */
+TInt CTraceCoreDataWrapper::CheckFileSize(const TDesC& aFile, TInt aMinSize, TInt aMaxSize)
+    {
+    INFO_PRINTF2(_L("CheckFileSize aFile (%S)"), &aFile);
+    TInt result = KErrNotFound;
+    
+    if (FileExists(aFile))
+        {
+        TEntry entry;
+        result = iFs.Entry(aFile, entry);
+        if (result != KErrNone)
+            {
+            ERR_PRINTF3(_L("CheckFileSize ENTRY FAILED aFile (%S) err (%d)"), &aFile, result);
+            }
+        else
+            {
+            TInt fileSize = entry.iSize;
+            INFO_PRINTF3(_L("CheckFileSize aFile (%S) fileSize (%d)"), &aFile, fileSize);    
+            if ( (aMinSize == -1) && (aMaxSize == -1) )
+                {
+                ERR_PRINTF2(_L("CheckFileSize failed - need to specify max and / or min"), result);
+                result = KErrArgument;
+                }
+            else if ( (aMinSize == -1 || fileSize >= aMinSize) &&
+                      (aMaxSize == -1 || fileSize <= aMaxSize) )
+                {
+                INFO_PRINTF3(_L("CheckFileSize file size OK aFile (%S) fileSize (%d)"), &aFile, fileSize);
+                result = fileSize;
+                }
+            else
+                {
+                ERR_PRINTF3(_L("CheckFileSize FAILED aFile (%S) fileSize (%d)"), &aFile, fileSize);
+                result = KErrGeneral;
+                }
+            }
+        }
+    
+    if (result < 0)
+        {
+        SetError(result);
+        }
+    
+    return result;
+    }
+
+void CTraceCoreDataWrapper::RunProcess(const TDesC& aProgramName, const TDesC& aCmdLineArgs, TInt aNoOfCalls, TInt aAllowedErrorCode)
+    {
+    for (TInt i=0; i<aNoOfCalls; i++)
+        {
+        TProcessCreatorResults res = CProcessCreator::StartProgram(aProgramName, aCmdLineArgs);
+        if (res.iCode == KErrNone || res.iCode == aAllowedErrorCode)
+            {
+            INFO_PRINTF7(_L("\"%S %S\" executes with code: %d, exitType: %d, desc: \"%S\" on call number %d"), &aProgramName, &aCmdLineArgs, res.iCode, res.iExitType, &(res.iDesc), i+1);
+            }
+        else
+            {
+            ERR_PRINTF7(_L("\"%S %S\" executes with code: %d, exitType: %d, desc: \"%S\" on call number %d"), &aProgramName, &aCmdLineArgs, res.iCode, res.iExitType, &(res.iDesc), i+1);
+            SetError(res.iCode);
+            }
+        }
+    }
+
+void CTraceCoreDataWrapper::CreateSubstDrive(const TDesC& aFolderPath, TDriveNumber aDrive)
+    {
+    TInt err = KErrNone;
+    
+    // attempt to create the folder if it does not exist
+    if (!BaflUtils::FolderExists(iFs, aFolderPath))
+        {
+        err = iFs.MkDirAll(aFolderPath);
+        if (err != KErrNone)
+            {
+            ERR_PRINTF3(_L("CreateSubstDrive MKDIRALL FAILED aFile (%S) err (%d)"), &aFolderPath, err);
+            SetError(err);
+            }
+        }
+    
+    if (err == KErrNone)
+        {
+        err = iFs.SetSubst(aFolderPath, aDrive);
+        if (err != KErrNone)
+            {
+            ERR_PRINTF4(_L("CreateSubstDrive SETSUBST FAILED aFolderPath (%S) aDrive (%d) err (%d)"), &aFolderPath, aDrive, err);
+            SetError(err);
+            }
+        else
+            {
+            INFO_PRINTF3(_L("CreateSubstDrive substed drive OK aFolderPath (%S) aDrive (%d)"), &aFolderPath, aDrive);
+            }    
+        }
+    }
+
+void CTraceCoreDataWrapper::UnSubstDrive(TDriveNumber aDrive)
+    {
+    TInt err = iFs.SetSubst(KNullDesC, aDrive);
+    if (err != KErrNone)
+        {
+        ERR_PRINTF3(_L("UnSubstDrive SETSUBST FAILED aDrive (%d) err (%d)"), aDrive, err);
+        SetError(err);
+        }
+    else
+        {
+        INFO_PRINTF2(_L("UnSubstDrive unsubsted drive OK aDrive (%d)"), aDrive);
+        }    
+    }
+
+
+// Macro for matching drive letter
+#define DRIVE_CONDITION(aDrv) if (aDriveString == _L(#aDrv)) { aDriveNumber = EDrive##aDrv; found = ETrue; }
+
+TBool CTraceCoreDataWrapper::DriveNumberFromString(const TDesC& aDriveString, TDriveNumber& aDriveNumber)
+    {
+    TBool found = EFalse;
+    
+    DRIVE_CONDITION(A)
+    DRIVE_CONDITION(B)
+    DRIVE_CONDITION(C)
+    DRIVE_CONDITION(D)
+    DRIVE_CONDITION(E)
+    DRIVE_CONDITION(F)
+    DRIVE_CONDITION(G)
+    DRIVE_CONDITION(H)
+    DRIVE_CONDITION(I)
+    DRIVE_CONDITION(J)
+    DRIVE_CONDITION(K)
+    DRIVE_CONDITION(L)
+    DRIVE_CONDITION(M)
+    DRIVE_CONDITION(N)
+    DRIVE_CONDITION(O)
+    DRIVE_CONDITION(P)
+    DRIVE_CONDITION(Q)
+    DRIVE_CONDITION(R)
+    DRIVE_CONDITION(S)
+    DRIVE_CONDITION(T)
+    DRIVE_CONDITION(U)
+    DRIVE_CONDITION(V)
+    DRIVE_CONDITION(W)
+    DRIVE_CONDITION(X)
+    DRIVE_CONDITION(Y)
+    DRIVE_CONDITION(Z)
+    
+    return found;
+    }
+
+void CTraceCoreDataWrapper::DoCmdCopyFileL(const TTEFSectionName& aSection)
+    {
+    TPtrC srcFile;
+    if (GetStringFromConfig(aSection, KSrcFileKey(), srcFile))
+        {
+        TFileName dstFile;
+        if (GetPathFromConfig(aSection, KDstFileKey(), dstFile))
+            {
+            CopyFileL(srcFile, dstFile);
+            }
+        }
+    else
+        {
+        ERR_PRINTF2(_L("No %S in INI file"), &KSrcFileKey());
+        SetBlockResult(EFail);
+        }
+    }
+
+void CTraceCoreDataWrapper::DoCmdDeleteFileFromAllDrivesL(const TTEFSectionName& aSection)
+    {
+    TFileName file;
+    if (GetPathFromConfig(aSection, KFileKey(), file))
+        {
+        DeleteFileFromAllDrivesL(file);
+        }
+    }
+
+void CTraceCoreDataWrapper::DoCmdDeleteFileL(const TTEFSectionName& aSection)
+    {
+    TFileName file;
+    if (GetPathFromConfig(aSection, KFileKey(), file))
+        {
+        DeleteFileL(file);
+        }
+    }
+
+void CTraceCoreDataWrapper::DoCmdDeleteEmptyFolder(const TTEFSectionName& aSection)
+    {
+    TFileName folder;
+    if (GetPathFromConfig(aSection, KFolderPathKey(), folder))
+        {
+        DeleteEmptyFolder(folder);
+        }
+    }
+
+void CTraceCoreDataWrapper::DoCmdFileExists(const TTEFSectionName& aSection)
+    {
+    TFileName file;
+    if (GetPathFromConfig(aSection, KFileKey(), file))
+        {
+        FileExists(file);
+        }
+    }
+
+void CTraceCoreDataWrapper::DoCmdCheckFileSize(const TTEFSectionName& aSection)
+    {
+    TFileName file;
+    if (GetPathFromConfig(aSection, KFileKey(), file))
+        {
+        TInt minSize = -1;
+        TInt maxSize = -1;
+        TInt size = -1;
+        if (GetIntFromConfig(aSection, KSizeKey(), size))
+            {
+            minSize = size;
+            maxSize = size;
+            }
+        else
+            {
+            GetIntFromConfig(aSection, KMinSizeKey(), minSize);
+            GetIntFromConfig(aSection, KMaxSizeKey(), maxSize);
+            }
+        TInt fileSize = CheckFileSize(file, minSize, maxSize);
+        
+        // Store number in slot for future use, if slot number is given
+        TInt slotNumber;
+        if (GetIntFromConfig(aSection, KSlotNumberKey(), slotNumber))
+            {
+            StoreInSlot(fileSize, slotNumber);
+            }
+        }
+    }
+
+void CTraceCoreDataWrapper::DoCmdRunProcess(const TTEFSectionName& aSection)
+    {
+    TPtrC programName;
+    if (GetStringFromConfig(aSection, KExeNameKey(), programName))
+        {
+        TBuf<KTEFMaxNameLength> cmdLineArgs;
+        GetArgsFromConfig(aSection, cmdLineArgs);
+        TInt noOfCalls = 1;
+        GetIntFromConfig(aSection, KNoOfCallsKey(), noOfCalls);
+        TInt allowedErrorCode = KErrNone;
+        GetIntFromConfig(aSection, KAllowErrorKey(), allowedErrorCode);
+        RunProcess(programName, cmdLineArgs, noOfCalls, allowedErrorCode);
+        }
+    else
+        {
+        ERR_PRINTF2(_L("No %S in INI file"), &KExeNameKey());
+        SetBlockResult(EFail);
+        }
+    }
+
+void CTraceCoreDataWrapper::DoCmdCreateSubstDrive(const TTEFSectionName& aSection)
+    {
+    TPtrC folderPath;
+    if (GetStringFromConfig(aSection, KFolderPathKey(), folderPath))
+        {
+        TPtrC driveString;
+        if (GetStringFromConfig(aSection, KDriveKey(), driveString))
+            {
+            TDriveNumber driveNumber;
+            if (DriveNumberFromString(driveString, driveNumber))
+                {
+                CreateSubstDrive(folderPath, driveNumber);
+                }
+            else
+                {
+                ERR_PRINTF2(_L("Could not parse drive %S in INI file"), &driveString);
+                SetBlockResult(EFail);
+                }
+            }
+        else
+            {
+            ERR_PRINTF2(_L("No %S in INI file"), &KDriveKey());
+            SetBlockResult(EFail);
+            }
+        }
+    else
+        {
+        ERR_PRINTF2(_L("No %S in INI file"), &KFolderPathKey());
+        SetBlockResult(EFail);
+        }
+    }
+
+void CTraceCoreDataWrapper::DoCmdUnSubstDrive(const TTEFSectionName& aSection)
+    {
+    TPtrC driveString;
+    if (GetStringFromConfig(aSection, KDriveKey(), driveString))
+        {
+        TDriveNumber driveNumber;
+        if (DriveNumberFromString(driveString, driveNumber))
+            {
+            UnSubstDrive(driveNumber);
+            }
+        else
+            {
+            ERR_PRINTF2(_L("Could not parse drive %S in INI file"), &driveString);
+            SetBlockResult(EFail);
+            }
+        }
+    else
+        {
+        ERR_PRINTF2(_L("No %S in INI file"), &KDriveKey());
+        SetBlockResult(EFail);
+        }
+    }
+
+/**
+ * Test command to verify the max file size of output file
+ * 
+ * Tracing needs to be started for this command to complete
+ *
+ */
+void CTraceCoreDataWrapper::DoCmdCheckMaxFileSizeL(const TTEFSectionName& aSection)
+    {
+    TFileName   file;
+    TInt        maxSize;
+    TPtrC       programName;
+    // Get all required parameters from INI file
+    if ( GetPathFromConfig(aSection, KFileKey(), file) &&
+         GetIntFromConfig(aSection, KMaxSizeKey(), maxSize) && 
+         GetStringFromConfig(aSection, KExeNameKey(), programName) )
+        {        
+        // Get optional params from INI file
+        TBool unfetteredSize = EFalse;
+        GetBoolFromConfig(aSection, KUnfetteredKey(), unfetteredSize);
+        TBuf<KTEFMaxNameLength> cmdLineArgs;
+        GetArgsFromConfig(aSection, cmdLineArgs);
+        TInt noOfCalls = 1;
+        GetIntFromConfig(aSection, KNoOfCallsKey(), noOfCalls);
+        TInt minSize = 0;
+        if (!unfetteredSize)
+            {
+            GetIntFromConfig(aSection, KMinSizeKey(), minSize);
+            }
+        
+        // Number of seconds to perform test for (for unfettered case)
+        TBool useTimer = EFalse;
+        RTimer timer;
+        TRequestStatus timerStatus(KRequestPending);
+        TInt duration;
+        if (unfetteredSize && GetIntFromConfig(aSection, KDurationKey(), duration))
+            {
+            TInt err = timer.CreateLocal();
+            CleanupClosePushL(timer);
+            if (err == KErrNone)
+                {
+                useTimer = ETrue;
+                INFO_PRINTF2(_L("Running timer for %d seconds"), duration);
+                timer.After(timerStatus, duration * KSecondsToMicroSeconds);
+                }
+            else
+                {
+                ERR_PRINTF2(_L("Error in creating timer %d"), err);
+                SetBlockResult(EFail);
+                }
+            }
+
+        // Keep calling an EXE so that trace data is appended to output file
+        // Tracing must be started and the EXE must generate trace data for the config file used
+        TBool finished = EFalse;
+        TInt lastFileSize = 0;
+        TInt currentFileSize = 0;
+        while (!finished)
+            {
+            // Call the EXE
+            RunProcess(programName, cmdLineArgs, noOfCalls);
+            if (unfetteredSize)
+                {
+                // Get the size of output file
+                currentFileSize = CheckFileSize(file, 0, -1);
+                }
+            else
+                {
+                // Check the size of output file is smaller than max file size
+                currentFileSize = CheckFileSize(file, 0, maxSize);
+                }
+            if (currentFileSize < 0)
+                {
+                // An error has occurred in checking the file size. Stop and fail the test 
+                ERR_PRINTF2(_L("Error in file size %d"), currentFileSize);
+                SetBlockResult(EFail);
+                finished = ETrue;
+                }
+            else if (currentFileSize < lastFileSize)
+                {
+                // Output file size has decreased rather than increased. Stop and fail the test
+                ERR_PRINTF2(_L("File size (%d) has decreased rather than increased"), currentFileSize);
+                SetBlockResult(EFail);
+                finished = ETrue;
+                }
+            else if (unfetteredSize)
+                {
+                if (currentFileSize > maxSize)
+                    {
+                    // File size got to required size. Test has passed.
+                    INFO_PRINTF1(_L("File size checking completed successfully"));
+                    finished = ETrue;
+                    }
+                else if (currentFileSize == lastFileSize)
+                    {
+                    // File size has not increased. Print a warning and continue
+                    WARN_PRINTF2(_L("File size (%d) has not increased"), currentFileSize);
+                    }
+                }
+            else if (currentFileSize == lastFileSize)
+                {
+                if (currentFileSize < minSize)
+                    {
+                    // File size has not reached required minimum. Stop and fail the test
+                    ERR_PRINTF3(_L("File size (%d) has not met the minimum required (%d)"), currentFileSize, minSize);
+                    SetBlockResult(EFail);
+                    }
+                else
+                    {
+                    // File size got to minimum required and has stopped increasing, staying below required max size. Test has passed.
+                    INFO_PRINTF1(_L("File size checking completed successfully"));
+                    }
+                finished = ETrue;
+                }
+            lastFileSize = currentFileSize;
+            if (useTimer && timerStatus == KErrNone)
+                {
+                // File size has been increasing for required number of seconds. Test has passed.
+                INFO_PRINTF2(_L("File size checking completed successfully after %d seconds"), duration);
+                finished = ETrue;
+                }
+            }
+        if (useTimer)
+            {
+            timer.Cancel();
+            CleanupStack::PopAndDestroy(&timer);
+            }
+        }
+    else
+        {
+        ERR_PRINTF3(_L("Need %S and %S in INI file"), &KMaxSizeKey(), &KExeNameKey());
+        SetBlockResult(EFail);
+        }
+    }
+
+/**
+ * Test command to verify the output file is appended to and not overwritten
+ * 
+ * Tracing needs to be started for this command to complete and
+ * an output file containing some data must exist
+ *
+ */
+void CTraceCoreDataWrapper::DoCmdCheckFileIsAppendedL(const TTEFSectionName& aSection)
+    {
+    TFileName   file;
+    TPtrC       programName;
+    TInt        maxSize;
+    TInt        duration;
+    // Get all required parameters from INI file
+    if ( GetPathFromConfig(aSection, KFileKey(), file) &&
+         GetIntFromConfig(aSection, KMaxSizeKey(), maxSize) &&
+         GetIntFromConfig(aSection, KDurationKey(), duration) &&
+         GetStringFromConfig(aSection, KExeNameKey(), programName) )
+        {
+        // Get optional params from INI file
+        TBuf<KTEFMaxNameLength> cmdLineArgs;
+        GetArgsFromConfig(aSection, cmdLineArgs);
+        TInt noOfCalls = 1;
+        GetIntFromConfig(aSection, KNoOfCallsKey(), noOfCalls);
+        TInt minSize = 1;
+        GetIntFromConfig(aSection, KMinSizeKey(), minSize);
+        TInt noOfAllowedTimeouts = 0;
+        GetIntFromConfig(aSection, KNoOfAllowedTimeoutsKey(), noOfAllowedTimeouts);
+        TInt minIncrease = 0;
+        GetIntFromConfig(aSection, KMinIncreaseKey(), minIncrease);
+        
+        // Create timer for time-outs
+        RTimer timer;
+        TInt err = timer.CreateLocal();
+        CleanupClosePushL(timer);
+        if (err != KErrNone)
+            {
+            ERR_PRINTF2(_L("Create timer error %d"), err);
+            SetBlockResult(EFail);
+            }    
+        
+        // Keep calling an EXE so that trace data is created in output file
+        // Tracing must be started and the EXE must generate trace data for the config file used
+        // The output file must exist and already contain some data
+        // Get current size of output file, and check it is non-zero or min provided
+        TInt originalFileSize = CheckFileSize(file, minSize, -1);
+        if (originalFileSize < 0)
+            {
+            // An error has occurred in checking the file size. Stop and fail the test 
+            ERR_PRINTF2(_L("Error in file size %d"), originalFileSize);
+            SetBlockResult(EFail);
+            }
+        else
+            {
+            TInt currentFileSize = 0;
+            TInt noOfTimeouts = 0;
+            while (currentFileSize < maxSize)
+                {
+                TRequestStatus notifyStatus(KRequestPending);
+                TRequestStatus timerStatus(KRequestPending);
+                // Start timeout timer
+                timer.After(timerStatus, duration * KSecondsToMicroSeconds);
+                // Request notification of file change
+                iFs.NotifyChange(ENotifyAll, notifyStatus, file);
+                
+                // Call the EXE
+                RunProcess(programName, cmdLineArgs, noOfCalls);
+
+                // Wait for file to update or timeout
+                User::WaitForRequest(notifyStatus, timerStatus);
+
+                if (timerStatus == KErrNone)
+                    {
+                    // We have timed out
+                    noOfTimeouts++;
+                    WARN_PRINTF3(_L("Have not received notification of file change in %d seconds (%d tries remaining)"), duration, noOfAllowedTimeouts-noOfTimeouts+1);
+                    }
+                else
+                    {
+                    // Cancel timer
+                    timer.Cancel();
+                    }
+                
+                if (notifyStatus == KErrNone)
+                    {
+                    // We have received file change notification
+                    INFO_PRINTF2(_L("Have received notification of file change (%S)"), &file);
+                    }
+                else
+                    {
+                    // Cancel file change notification
+                    iFs.NotifyChangeCancel();
+                    }
+                
+                // We get a timeout when output file is not updated and so there are dropped traces.
+                // This test is only checking append functionality so we allow this for a user-defined number of times.
+                if (noOfTimeouts > noOfAllowedTimeouts)
+                    {
+                    // We have timed out too many times, so fail the test
+                    ERR_PRINTF2(_L("File has not been updated %d times"), noOfTimeouts);
+                    SetBlockResult(EFail);
+                    break;
+                    }
+                
+                // Check the size of output file is expected size
+                currentFileSize = CheckFileSize(file, originalFileSize + minIncrease, -1);
+                if (currentFileSize < 0)
+                    {
+                    // An error has occurred in checking the file size. Stop and fail the test 
+                    ERR_PRINTF2(_L("Error in file size %d"), currentFileSize);
+                    SetBlockResult(EFail);
+                    break;
+                    }
+                originalFileSize = currentFileSize;
+                }             
+            }
+        CleanupStack::PopAndDestroy(&timer); // close timer
+        }
+    else
+        {
+        ERR_PRINTF4(_L("Need %S, %S and %S in INI file"), &KMaxSizeKey(), &KExeNameKey(), &KDurationKey());
+        SetBlockResult(EFail);
+        }
+    }
+
+/**
+ * Test command to verify the trace buffer contains the expected number of given printf traces
+ */
+void CTraceCoreDataWrapper::DoCmdVerifyTraceDataL(const TTEFSectionName& aSection)
+    {
+    TBuf<KLongStringLength> findString;
+    // Get all required parameters from INI file
+    if (GetLongStringFromConfig(aSection, KFindStringKey(), findString))
+        {
+        TInt expectedNumFound = 1;
+        GetIntFromConfig(aSection, KExpectedKey(), expectedNumFound);
+        TInt numFound = 0;
+        BufferHasPrintfStringL(iTraceBuffer, findString, numFound);
+        if (numFound != expectedNumFound)
+            {
+            ERR_PRINTF3(_L("Expected printf %d times, found it %d times"), expectedNumFound, numFound);
+            if (numFound == 0)
+                {
+                SetError(KErrNotFound);
+                }
+            else
+                {
+                SetError(KErrGeneral);
+                }
+            }
+        }
+    else
+        {
+        ERR_PRINTF2(_L("Need %S in INI file"), &KFindStringKey());
+        SetBlockResult(EFail);
+        }
+    }
+
+/**
+ * Test command to verify the output file contains the expected number of traces / priming traces
+ * and optionally validates that the priming data contains the correct values
+ * 
+ * This function gets the number of traces / priming traces and stores them in the required slots
+ * so the values can be verified later
+ */
+void CTraceCoreDataWrapper::DoCmdVerifyPrimingDataL(const TTEFSectionName& aSection)
+    {
+    TFileName   filePath;
+    TInt        groupId;
+    // Get all required parameters from INI file
+    if ( GetPathFromConfig(aSection, KFileKey(), filePath) &&
+         GetIntFromConfig(aSection, KGroupIdKey(), groupId) )
+        {
+        // Get optional params from INI file
+        TBool verifyData = EFalse;
+        GetBoolFromConfig(aSection, KVerifyData(), verifyData);
+        
+        TInt numTraces = 0;
+        TInt numPrimingTraces = 0;
+        VerifyPrimingDataL(filePath, groupId, verifyData, numTraces, numPrimingTraces);
+
+        // Store numbers in slots for future use, if slot numbers are given
+        TInt slotNumber;
+        if (GetIntFromConfig(aSection, KTracesSlotNumberKey(), slotNumber))
+            {
+            StoreInSlot(numTraces, slotNumber);
+            }
+        if (GetIntFromConfig(aSection, KPrimingTracesSlotNumberKey(), slotNumber))
+            {
+            StoreInSlot(numPrimingTraces, slotNumber);
+            }
+        }
+    else
+        {
+        ERR_PRINTF2(_L("Need %S in INI file"), &KGroupIdKey());
+        SetBlockResult(EFail);
+        }
+    }
+
+/**
+ * This function gets the number of traces / priming traces from the data file given for the required GID
+ * It optionally validates that the priming data contains the correct values
+ */
+void CTraceCoreDataWrapper::VerifyPrimingDataL(const TDesC& aFile, TInt aGroupId, TBool aVerifyData, TInt& aNumTraces, TInt& aNumPrimingTraces)
+    {
+    INFO_PRINTF3(_L("VerifyPrimingData aFile (%S) aGroupId (%d)"), &aFile, aGroupId);
+
+    aNumTraces = 0;
+    aNumPrimingTraces = 0;
+
+    INFO_PRINTF3(_L("Calling TTraceDataParser::ParsePrimingDataL(%S, %d)"), &aFile, aGroupId);
+    TInt err = TTraceDataParser::ParsePrimingDataL(aFile, iFs, aGroupId, aNumPrimingTraces, aNumTraces, aVerifyData);
+    INFO_PRINTF3(_L("Number of traces for GID %d: %d"), aGroupId, aNumTraces);
+    INFO_PRINTF3(_L("Number of priming traces for GID %d: %d"), aGroupId, aNumPrimingTraces);
+    if (err != KErrNone)
+        {
+        ERR_PRINTF2(_L("ParsePrimingDataL() error %d"), err);
+        SetError(err);
+        }
+    }
+
+/**
+ * Test command to verify the output file contains the expected sequence of traces
+ * and checks that any dropped traces are correctly handled
+ */
+void CTraceCoreDataWrapper::DoCmdVerifyDroppedTracesL(const TTEFSectionName& aSection)
+    {
+    TFileName filePath;
+    // Get all required parameters from INI file
+    if (GetPathFromConfig(aSection, KFileKey(), filePath))
+        {
+        TInt lastNumberFound = 0;
+        TInt numDroppedTraces = 0;
+    
+        TPtrC findString;
+        // Look to see if we have a string to fing
+        if (GetStringFromConfig(aSection, KFindStringKey(), findString))
+            {
+            VerifyDroppedPrintfTracesL(filePath, findString, lastNumberFound, numDroppedTraces);
+            }
+        else
+            {
+            TInt groupId = 0;
+            GetIntFromConfig(aSection, KGroupIdKey(), groupId);
+            TInt componentId = 0;
+            GetHexFromConfig(aSection, KComponentIdKey(), componentId);
+            VerifyDroppedBinaryTracesL(filePath, groupId, componentId, lastNumberFound, numDroppedTraces);
+            }
+        
+        TInt expectedLastNumberFound;
+        if (GetIntFromConfig(aSection, KExpectedKey(), expectedLastNumberFound))
+            {
+            if (expectedLastNumberFound == lastNumberFound)
+                {
+                INFO_PRINTF2(_L("Last number found (%d) as expected"), lastNumberFound);
+                }
+            else
+                {
+                ERR_PRINTF3(_L("Last number found (%d) not as expected (%d)"), lastNumberFound, expectedLastNumberFound);
+                SetBlockResult(EFail);
+                }
+            }
+        }
+    }
+
+/**
+ * This function verifies the given file contains the expected sequence of printf traces
+ * and checks that any dropped traces are correctly handled
+ */
+void CTraceCoreDataWrapper::VerifyDroppedPrintfTracesL(const TDesC& aFile, const TDesC& aFindString, TInt& aLastNumberFound, TInt& aNumDroppedTraces)
+    {
+    INFO_PRINTF3(_L("VerifyDroppedPrintfTracesL aFile (%S) aFindString (%S)"), &aFile, &aFindString);
+
+    aLastNumberFound = 0;
+    aNumDroppedTraces = 0;
+
+    TBuf8<KTEFMaxNameLength> findString;
+    findString.Copy(aFindString);
+    INFO_PRINTF3(_L("Calling TTraceDataParser::DataHasTraceSequenceL(%S, \"%S\")"), &aFile, &aFindString);
+    TInt err = TTraceDataParser::DataHasTraceSequenceL(aFile, iFs, aLastNumberFound, aNumDroppedTraces, &findString);
+    INFO_PRINTF3(_L("Last number found is %d, (%d dropped traces)"), aLastNumberFound, aNumDroppedTraces);
+    if (err != KErrNone)
+        {
+        ERR_PRINTF2(_L("DataHasTraceSequenceL() error %d"), err);
+        SetError(err);
+        }    
+    }
+
+/**
+ * This function verifies the given file contains the expected sequence of binary traces
+ * and checks that any dropped traces are correctly handled
+ */
+void CTraceCoreDataWrapper::VerifyDroppedBinaryTracesL(const TDesC& aFile, TInt aGroupId, TInt aComponentId, TInt& aLastNumberFound, TInt& aNumDroppedTraces)
+    {
+    INFO_PRINTF4(_L("VerifyDroppedBinaryTracesL aFile (%S) aGroupId (%d) aComponentId (0x%x)"), &aFile, aGroupId, aComponentId);
+
+    aLastNumberFound = 0;
+    aNumDroppedTraces = 0;
+
+    INFO_PRINTF4(_L("Calling TTraceDataParser::DataHasTraceSequenceL(%S, %d, 0x%x)"), &aFile, aGroupId, aComponentId);
+    TInt err = TTraceDataParser::DataHasTraceSequenceL(aFile, iFs, aLastNumberFound, aNumDroppedTraces, NULL, aGroupId, aComponentId);
+    INFO_PRINTF3(_L("Last number found is %d, (%d dropped traces)"), aLastNumberFound, aNumDroppedTraces);
+    if (err != KErrNone)
+        {
+        ERR_PRINTF2(_L("DataHasTraceSequenceL() error %d"), err);
+        SetError(err);
+        }    
+    }
+
+/**
+ * This function checks if printf traces in the data file given contain a given string
+ */
+void CTraceCoreDataWrapper::FileHasPrintfStringL(const TDesC& aFile, const TDesC& aFindString, TInt& aNumFound)
+    {
+    INFO_PRINTF3(_L("FileHasPrintfStringL aFile (%S) aFindString (%S)"), &aFile, &aFindString);
+    aNumFound = 0;
+    TBuf8<KTEFMaxNameLength> findString;
+    findString.Copy(aFindString);
+    INFO_PRINTF3(_L("Calling TTraceDataParser::DataHasPrintfStringL(%S, \"%S\")"), &aFile, &aFindString);
+    TInt err = TTraceDataParser::DataHasPrintfStringL(aFile, iFs, findString, aNumFound);
+    INFO_PRINTF2(_L("Data in file contains string %d times"), aNumFound);
+    if (err != KErrNone)
+        {
+        ERR_PRINTF2(_L("DataHasPrintfString() error %d"), err);
+        SetError(err);
+        }
+    }
+
+/**
+ * This function checks if printf traces in the data buffer given contain a given string
+ */
+void CTraceCoreDataWrapper::BufferHasPrintfStringL(TDesC8& aBuffer, const TDesC& aFindString, TInt& aNumFound)
+    {
+    INFO_PRINTF2(_L("BufferHasPrintfStringL aFindString (%S)"), &aFindString);
+    aNumFound = 0;
+    TBuf8<KTEFMaxNameLength> findString;
+    findString.Copy(aFindString);
+    INFO_PRINTF2(_L("Calling TTraceDataParser::DataHasPrintfString(\"%S\")"), &aFindString);
+    TInt err = TTraceDataParser::DataHasPrintfString(aBuffer, findString, aNumFound);
+    INFO_PRINTF2(_L("Data in buffer contains string %d times"), aNumFound);
+    if (err != KErrNone)
+        {
+        ERR_PRINTF2(_L("DataHasPrintfString() error %d"), err);
+        SetError(err);
+        }
+    }
+
+TInt CTraceCoreDataWrapper::GetSlotValue(const TTEFSectionName& aSection, const TDesC& aValueKey, const TDesC& aSlotNumberKey)
+    {
+    TInt value = 0;
+    TInt slot;
+    if (GetIntFromConfig(aSection, aValueKey, value))
+        {
+        // Value given directly in INI file, so don't need slot number
+        if (GetIntFromConfig(aSection, aSlotNumberKey, slot))
+            {
+            ERR_PRINTF3(_L("Cannot have %S and %S in INI file"), &aValueKey, &aSlotNumberKey);
+            SetBlockResult(EFail);
+            }
+        }
+    else if (GetIntFromConfig(aSection, aSlotNumberKey, slot))
+        {
+        // Slot number given in INI file, so get value from it
+        value = ReadFromSlot(slot);
+        }
+    else
+        {
+        ERR_PRINTF3(_L("Need %S or %S in INI file"), &aValueKey, &aSlotNumberKey);
+        SetBlockResult(EFail);
+        }
+    return value;
+    }
+
+void CTraceCoreDataWrapper::DoCmdVerifySlot(const TTEFSectionName& aSection)
+    {
+    // Get values to compare
+    TInt valueA = GetSlotValue(aSection, KValueAKey(), KSlotANumberKey());
+    TInt valueB = GetSlotValue(aSection, KValueBKey(), KSlotBNumberKey());
+
+    // Compare the values
+    INFO_PRINTF3(_L("Comparing value A (%d) with value B (%d)"), valueA, valueB);
+
+    TInt difference = 0;
+    TInt minDifference = -1;
+    TInt maxDifference = -1;
+    if (GetIntFromConfig(aSection, KDifferenceKey(), difference))
+        {
+        if (difference != 0)
+            {
+            minDifference = difference;
+            maxDifference = difference;
+            }
+        }
+    else
+        {
+        GetIntFromConfig(aSection, KMinDifferenceKey(), minDifference);
+        GetIntFromConfig(aSection, KMaxDifferenceKey(), maxDifference);
+        }
+    if ( (minDifference == -1) && (maxDifference == -1) && (valueA != valueB) )
+        {
+        ERR_PRINTF1(_L("Values are not the same"));
+        SetBlockResult(EFail);
+        }
+    else if ( (minDifference != -1 && valueB - valueA < minDifference) ||
+              (maxDifference != -1 && valueB - valueA > maxDifference) )
+        {
+        ERR_PRINTF1(_L("Difference in values not in given range"));
+        SetBlockResult(EFail);
+        }
+    else
+        {
+        INFO_PRINTF1(_L("Slot value successfully verified"));
+        }
+    }
+
+void CTraceCoreDataWrapper::StoreInSlot(TInt aEntry, TInt aSlot)
+    {
+    if (aSlot >= 1 && aSlot <= iSlots.Count())
+        {
+        iSlots[aSlot-1] = aEntry;
+        INFO_PRINTF3(_L("Storing number %d in slot %d"), aEntry, aSlot);
+        }
+    else
+        {
+        ERR_PRINTF3(_L("Cannot store number in slot %d - not in range [1,%d]"), aSlot, iSlots.Count());
+        SetBlockResult(EFail);
+        }
+    }
+
+TInt CTraceCoreDataWrapper::ReadFromSlot(TInt aSlot)
+    {
+    TInt entry = 0;
+    if (aSlot >= 1 && aSlot <= iSlots.Count())
+        {
+        entry = iSlots[aSlot-1];
+        INFO_PRINTF3(_L("Reading number %d from slot %d"), entry, aSlot);
+        }
+    else
+        {
+        ERR_PRINTF3(_L("Cannot read number from slot %d - not in range [1,%d]"), aSlot, iSlots.Count());
+        SetBlockResult(EFail);
+        }
+    return entry;
+    }
+
+void CTraceCoreDataWrapper::DoCmdFileChangeNotification(const TTEFSectionName& aSection, const TInt aAsyncErrorIndex)
+    {
+    TFileName   file;
+    TInt        duration;
+    // Get all required parameters from INI file
+    if ( GetPathFromConfig(aSection, KFileKey(), file) &&
+         GetIntFromConfig(aSection, KDurationKey(), duration) )
+        {
+        INFO_PRINTF2(_L("Requesting file change notification for file %S"), &file);
+        // Request notification of file change
+        iFs.NotifyChange(ENotifyAll, iActiveFileChangeNotification->iStatus, file);
+        iActiveFileChangeNotification->Activate(aAsyncErrorIndex);
+        IncOutstanding();
+        // Start timeout timer
+        iTimer.After(iActiveFileChangeNotificationTimeout->iStatus, duration * KSecondsToMicroSeconds);
+        iActiveFileChangeNotificationTimeout->Activate(aAsyncErrorIndex);
+        IncOutstanding();
+        iCurrentSectionName.Set(aSection);
+        }
+    else
+        {
+        ERR_PRINTF2(_L("Need %S in INI file"), &KDurationKey());
+        SetBlockResult(EFail);
+        }
+    }
+
+void CTraceCoreDataWrapper::RunL(CActive* aActive, TInt aIndex)
+    {
+    if (aActive == iActiveFileChangeNotification)
+        {
+        TInt err = iActiveFileChangeNotification->iStatus.Int();
+        if (err == KErrNone)
+            {
+            INFO_PRINTF1(_L("Received file change notification"));
+            }
+        else
+            {
+            WARN_PRINTF2(_L("File change notification error %d"), err);
+            }
+        
+        TBool fileReady = ETrue;
+        if (err != KErrNone)
+            {
+            fileReady = EFalse;
+            }
+        TPtrC findString;
+        // Look to see if we have a string to find
+        if (GetStringFromConfig(iCurrentSectionName, KFindStringKey(), findString))
+            {
+            fileReady = EFalse;
+            TFileName file;
+            if (GetPathFromConfig(iCurrentSectionName, KFileKey(), file))
+                {
+                // The file is ready if it contains the string given in the INI file
+                TInt expectedNumFound = 1;
+                GetIntFromConfig(iCurrentSectionName, KExpectedKey(), expectedNumFound);
+                TInt numFound = 0;
+                FileHasPrintfStringL(file, findString, numFound);
+                if (numFound == expectedNumFound)
+                    {
+                    fileReady = ETrue;
+                    }
+                }
+            if (!fileReady && err == KErrNone)
+                {
+                // File isn't ready, so request notification again
+                // Keep doing this until file is ready or it times out
+                INFO_PRINTF2(_L("Requesting file change notification for file %S"), &file);
+                iFs.NotifyChange(ENotifyAll, iActiveFileChangeNotification->iStatus, file);
+                iActiveFileChangeNotification->Activate(aIndex);
+                IncOutstanding();
+                }
+            }
+        if (fileReady)
+            {
+            // Cancel file change notification timeout
+            iTimer.Cancel();
+            }
+        else if (err != KErrNone)
+            {
+            ERR_PRINTF2(_L("File change notification error %d"), err);
+            SetAsyncError(aIndex, err);
+            }
+        DecOutstanding();
+        }
+    else if (aActive == iActiveFileChangeNotificationTimeout)
+        {
+        TInt err = iActiveFileChangeNotificationTimeout->iStatus.Int();
+        if (err == KErrNone)
+            {
+            INFO_PRINTF1(_L("File change notification has timed out"));
+            // Cancel file change notification
+            iFs.NotifyChangeCancel();
+            }
+        else if (err != KErrCancel) 
+            {
+            ERR_PRINTF2(_L("File change notification timeout error %d"), err);
+            SetAsyncError(aIndex, err);
+            }
+        DecOutstanding();
+        }
+    else
+        {
+        ERR_PRINTF1(_L("Stray signal"));
+        SetBlockResult(EFail);
+        }
+    }
+
+void CTraceCoreDataWrapper::DoCancel(CActive* aActive, TInt /*aIndex*/)
+    {
+    if (aActive == iActiveFileChangeNotification)
+        {
+        INFO_PRINTF1(_L("File change notification cancelled"));
+        }
+    else if (aActive == iActiveFileChangeNotificationTimeout)
+        {
+        INFO_PRINTF1(_L("File change notification timeout cancelled"));
+        }
+    else
+        {
+        ERR_PRINTF1(_L("Stray signal"));
+        SetBlockResult(EFail);
+        }
+    }
+
+void CTraceCoreDataWrapper::DoCmdRegisterNotifReceiver(const TTEFSectionName& aSection)
+    {
+    TInt    groupId;
+    TInt    componentId;
+    // Get all required parameters from INI file
+    if ( GetIntFromConfig(aSection, KGroupIdKey(), groupId) &&
+         GetHexFromConfig(aSection, KComponentIdKey(), componentId) )
+        {
+        TTraceOnActivationParams traceOnActivationParams;
+        traceOnActivationParams.iGroupId = groupId;
+        traceOnActivationParams.iComponentId = componentId;
+        
+        TInt err = iTraceOnActivationLdd.RegisterNotificationReceiver(traceOnActivationParams);
+        if (err != KErrNone)
+            {
+            ERR_PRINTF4(_L("RegisterNotificationReceiver(%d,0x%x) error %d"), groupId, componentId, err);
+            SetError(err);
+            }
+        else
+            {
+            INFO_PRINTF3(_L("RegisterNotificationReceiver(%d,0x%x) returns no error"), groupId, componentId);
+            }
+        }
+    else
+        {
+        ERR_PRINTF3(_L("Need %S and %S in INI file"), &KGroupIdKey(), &KComponentIdKey());
+        SetBlockResult(EFail);
+        }
+    }
+
+void CTraceCoreDataWrapper::DoCmdUnregisterNotifReceiver(const TTEFSectionName& aSection)
+    {
+    TInt    groupId;
+    TInt    componentId;
+    // Get all required parameters from INI file
+    if ( GetIntFromConfig(aSection, KGroupIdKey(), groupId) &&
+         GetHexFromConfig(aSection, KComponentIdKey(), componentId) )
+        {
+        TTraceOnActivationParams traceOnActivationParams;
+        traceOnActivationParams.iGroupId = groupId;
+        traceOnActivationParams.iComponentId = componentId;
+    
+        TInt err = iTraceOnActivationLdd.UnregisterNotificationReceiver(traceOnActivationParams);
+        if (err != KErrNone)
+            {
+            ERR_PRINTF4(_L("UnregisterNotificationReceiver(%d,0x%x) error %d"), groupId, componentId, err);
+            SetError(err);
+            }
+        else
+            {
+            INFO_PRINTF3(_L("UnregisterNotificationReceiver(%d,0x%x) returns no error"), groupId, componentId);
+            }
+        }
+    else
+        {
+        ERR_PRINTF3(_L("Need %S and %S in INI file"), &KGroupIdKey(), &KComponentIdKey());
+        SetBlockResult(EFail);
+        }
+    }
+
+void CTraceCoreDataWrapper::InstrumentBinaryTracePoint(TInt aGroupId, TInt aComponentId, TInt aData, TInt aTraceId)
+    {
+    TComponentId KOstTraceComponentID = aComponentId;
+    // Calculate trace word from Group ID
+    TUint32 traceWord = (aGroupId << GROUPIDSHIFT) | aTraceId;
+    OstTrace1(aGroupId, traceWord, "You will only see this text in Trace Viewer: %d", aData);    
+    }
+
+void CTraceCoreDataWrapper::InstrumentBinaryTraceSequence(TInt aSequenceLength, TInt aGroupId, TInt aComponentId)
+    {
+    for (TInt i=1; i<=aSequenceLength; i++)
+        {
+        InstrumentBinaryTracePoint(aGroupId, aComponentId, i, i);
+        }    
+    }
+
+void CTraceCoreDataWrapper::InstrumentPrintfTraceSequence(TInt aSequenceLength, const TDesC& aString)
+    {
+    INFO_PRINTF3(_L("InstrumentPrintfTraceSequence(%d, \"%S\""), aSequenceLength, &aString);
+    TBuf8<KTEFMaxNameLength> givenString;
+    givenString.Copy(aString);
+    for (TInt i=1; i<=aSequenceLength; i++)
+        {
+        TBuf8<KTEFMaxNameLength> formattedString;
+        formattedString.Format(givenString, i);
+        RDebug::Printf("%S", &formattedString);
+        }    
+    }
+
+void CTraceCoreDataWrapper::DoCmdInstrumentTraceSequence(const TTEFSectionName& aSection)
+    {
+    TInt sequenceLength;
+    // Get all required parameters from INI file
+    if (GetIntFromConfig(aSection, KLengthKey(), sequenceLength))
+        {
+        TPtrC printfString;
+        if (GetStringFromConfig(aSection, KStringKey(), printfString))
+            {
+            InstrumentPrintfTraceSequence(sequenceLength, printfString);
+            }
+        else
+            {
+            TInt groupId = 0;
+            GetIntFromConfig(aSection, KGroupIdKey(), groupId);
+            TInt componentId = 0;
+            GetHexFromConfig(aSection, KComponentIdKey(), componentId);
+            InstrumentBinaryTraceSequence(sequenceLength, groupId, componentId);
+            }
+        }
+    else
+        {
+        ERR_PRINTF2(_L("Need %S in INI file"), &KLengthKey());
+        SetBlockResult(EFail);
+        }
+    }
+
+TInt CTraceCoreDataWrapper::LoadLdd(const TDesC& aLddName, TBool aSingleUse)
+    {  
+    TInt err = User::LoadLogicalDevice(aLddName);
+    if (err == KErrNone)
+        {
+        INFO_PRINTF2(_L("LDD %S successfully loaded with no error"), &aLddName);
+        }
+    else if (err == KErrAlreadyExists && !aSingleUse)
+        {
+        INFO_PRINTF2(_L("LDD %S was already loaded"), &aLddName);
+        }
+    else
+        {
+        ERR_PRINTF3(_L("LoadLogicalDevice(%S) error %d"), &aLddName, err);
+        SetError(err);
+        }
+    return err;
+    }
+
+TBool CTraceCoreDataWrapper::LoadLdd(const TDesC& aLddName, const TTEFSectionName& aSection)
+    {
+    TBool singleUse = EFalse;
+    GetBoolFromConfig(aSection, KSingleUseKey(), singleUse);
+    
+    TBool isLoadedAlready = EFalse;    
+    TInt err = LoadLdd(aLddName, singleUse);
+    if (!singleUse)
+        {
+        isLoadedAlready = (err == KErrAlreadyExists);
+        }    
+    
+    return isLoadedAlready;
+    }
+
+TInt CTraceCoreDataWrapper::FreeLdd(const TDesC& aLddName)
+    {  
+    TInt err = User::FreeLogicalDevice(aLddName);
+    if (err == KErrNone)
+        {
+        INFO_PRINTF2(_L("LDD %S successfully freed with no error"), &aLddName);
+        }
+    else
+        {
+        ERR_PRINTF3(_L("FreeLogicalDevice(%S) error %d"), &aLddName, err);
+        //Won't set error from this until
+        //issue with always returning KErrInUse
+        //User::FreeLogicalDevice() is resolved
+        //SetError(err);
+        }
+    return err;
+    }
+
+template <class T>
+TInt CTraceCoreDataWrapper::OpenLdd(const TDesC& aLddName, T& aLdd)
+    {  
+    TInt err = aLdd.Open();
+    if (err != KErrNone)
+        {
+        ERR_PRINTF3(_L("%S Open() error %d"), &aLddName, err);
+        SetError(err);
+        }
+    else
+        {
+        INFO_PRINTF2(_L("%S successfully set up"), &aLddName);
+        }
+    return err;
+    }
+
+template <class T>
+TBool CTraceCoreDataWrapper::OpenLdd(const TDesC& aLddName, T& aLdd, const TTEFSectionName& aSection)
+    {  
+    TBool openLdd = ETrue;
+    GetBoolFromConfig(aSection, KOpenLddKey(), openLdd);
+    
+    if (openLdd)
+        {
+        OpenLdd(aLddName, aLdd);
+        }
+
+    return openLdd;
+    }
+
+void CTraceCoreDataWrapper::DoCmdSetUpTcLdd(const TTEFSectionName& aSection)
+    {
+    iTcLddLoadedAtStart = LoadLdd(KTcLdd(), aSection);
+    
+    OpenLdd(KTcLdd(), iTcLdd, aSection);
+    }
+
+void CTraceCoreDataWrapper::DoCmdCleanUpTcLdd(const TTEFSectionName& aSection)
+    {
+    TBool closeLdd = ETrue;
+    GetBoolFromConfig(aSection, KCloseLddKey(), closeLdd);
+    
+    if (closeLdd)
+        {
+        iTcLdd.Close();
+        }
+
+    if (!iTcLddLoadedAtStart)
+        {
+        FreeLdd(KTcLdd());
+        }
+    }
+
+void CTraceCoreDataWrapper::DoCmdSetUpTcOstLdd(const TTEFSectionName& aSection)
+    {
+    iTcOstLddLoadedAtStart = LoadLdd(KTraceCoreOstLdd(), aSection);
+    
+    if (OpenLdd(KTraceCoreOstLdd(), iTraceCoreOstLdd, aSection))
+        {
+        //Switch to OstMemoryWriter
+        TUint32 writer(1);
+        iTraceCoreOstLdd.ChangeWriter(writer);
+        
+        TUint32 handle;
+        TInt err = iTraceCoreOstLdd.GetChunkHandle(handle);
+        if (err != KErrNone)
+            {
+            ERR_PRINTF2(_L("GetChunkHandle() error %d"), err);
+            SetError(err);
+            }
+    
+        TInt bufferSize = KDefaultBufferSize;
+        GetIntFromConfig(aSection, KBufferSizeKey(), bufferSize);
+        INFO_PRINTF2(_L("Calling SetBufferSize(%d)"), bufferSize);
+        err = iTraceCoreOstLdd.SetBufferSize((TUint32&) bufferSize);
+        if (err != KErrNone)
+            {
+            ERR_PRINTF2(_L("SetBufferSize() error %d"), err);
+            SetError(err);
+            }
+        }
+    }
+
+void CTraceCoreDataWrapper::DoCmdCleanUpTcOstLdd(const TTEFSectionName& aSection)
+    {
+    TBool closeLdd = ETrue;
+    GetBoolFromConfig(aSection, KCloseLddKey(), closeLdd);
+    
+    if (closeLdd)
+        {
+        iTraceBuffer.Close();
+        //Switch back to XtiWriter
+        TUint32 writer(0);
+        iTraceCoreOstLdd.ChangeWriter(writer);    
+        iTraceCoreOstLdd.Close();
+        }
+
+    if (!iTcOstLddLoadedAtStart)
+        {
+        FreeLdd(KTraceCoreOstLdd());
+        }
+    }
+
+void CTraceCoreDataWrapper::DoCmdSetUpTraceOnActivation(const TTEFSectionName& aSection)
+    {
+    iTraceOnActivationLoadedAtStart = LoadLdd(KTraceOnActivationLdd(), aSection);
+    
+    OpenLdd(KTraceOnActivationLdd(), iTraceOnActivationLdd, aSection);
+    }
+
+void CTraceCoreDataWrapper::DoCmdCleanUpTraceOnActivation(const TTEFSectionName& aSection)
+    {    
+    TBool closeLdd = ETrue;
+    GetBoolFromConfig(aSection, KCloseLddKey(), closeLdd);
+    
+    if (closeLdd)
+        {
+        iTraceOnActivationLdd.Close();
+        }
+
+    if (!iTraceOnActivationLoadedAtStart)
+        {
+        FreeLdd(KTraceOnActivationLdd());
+        }
+    }
+
+void CTraceCoreDataWrapper::DoCmdActivateDeactivateTrace(const TTEFSectionName& aSection)
+    {
+    TInt groupId;
+    TInt componentId;
+    TBool activate;
+    // Get all required parameters from INI file
+    if ( GetIntFromConfig(aSection, KGroupIdKey(), groupId) &&
+         GetHexFromConfig(aSection, KComponentIdKey(), componentId) &&
+         GetBoolFromConfig(aSection, KActivateKey(), activate) )
+        {
+        RTcDriverParameters tcDriverParameters;
+        tcDriverParameters.iGroupId = groupId;
+        tcDriverParameters.iComponentId = componentId;
+        tcDriverParameters.iActivation = EFalse;
+        TInt err = KErrNone;
+        if (activate)
+            {
+            INFO_PRINTF3(_L("Calling ActivateTrace(%d,0x%x)"), groupId, componentId);
+            err = iTcLdd.ActivateTrace(tcDriverParameters);
+            if (err != KErrNone)
+                {
+                ERR_PRINTF4(_L("ActivateTrace(%d,0x%x) error %d"), groupId, componentId, err);
+                SetError(err);
+                }
+            }
+        else
+            {
+            INFO_PRINTF3(_L("Calling DeactivateTrace(%d,0x%x)"), groupId, componentId);
+            err = iTcLdd.DeactivateTrace(tcDriverParameters);
+            if (err != KErrNone)
+                {
+                ERR_PRINTF4(_L("DeactivateTrace(%d,0x%x) error %d"), groupId, componentId, err);
+                SetError(err);
+                }
+            }
+        }
+    else
+        {
+        ERR_PRINTF4(_L("Need %S, %S and %S in INI file"), &KGroupIdKey(), &KComponentIdKey(), &KActivateKey());
+        SetBlockResult(EFail);
+        }
+    }
+
+void CTraceCoreDataWrapper::DoCmdReadTracesFromBuffer()
+    {
+    iTraceBuffer.Close();
+    TInt bufferSize = iTraceCoreOstLdd.GetBufferSize();
+    
+    TInt err = iTraceBuffer.ReAlloc(bufferSize);
+    if (err != KErrNone)
+        {
+        ERR_PRINTF3(_L("ReAlloc(%d) error %d"), bufferSize, err);
+        SetError(err);
+        }
+
+    INFO_PRINTF2(_L("Calling ReadNTraces() with buffer size %d"), bufferSize);
+    err = iTraceCoreOstLdd.ReadNTraces(iTraceBuffer);
+    if (err != KErrNone)
+        {
+        ERR_PRINTF2(_L("ReadNTraces() error %d"), err);
+        SetError(err);
+        }
+    else
+        {
+        INFO_PRINTF2(_L("%d bytes of trace data read"), iTraceBuffer.Size());
+        // Print the trace data to the log, if there's not too much of it
+        if (iTraceBuffer.Size() <= KDefaultBufferSize && iTraceBuffer.Size() > 0)
+            {
+            TBuf<KDefaultBufferSize> tempBuffer;
+            tempBuffer.Copy(iTraceBuffer);
+            INFO_PRINTF2(_L("Trace data:\r\n%S"), &tempBuffer);
+            }
+        }
+
+    err = iTraceCoreOstLdd.ClearBuffer();
+    if (err != KErrNone)
+        {
+        ERR_PRINTF2(_L("ClearBuffer() error %d"), err);
+        SetError(err);
+        }
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/test/TEF/te_tracecore/src/te_tracecore_server.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,73 @@
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+// 
+//
+
+
+#include <e32base.h>
+#include <e32std.h>
+
+#include "te_tracecore_server.h"
+#include "te_tracecore_controller.h"
+
+CTe_TraceCoreSuite* CTe_TraceCoreSuite::NewL()
+    {
+    CTe_TraceCoreSuite* self=new (ELeave) CTe_TraceCoreSuite;
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    CleanupStack::Pop(self);
+    return self;
+    }
+
+CTestBlockController* CTe_TraceCoreSuite::CreateTestBlock()
+    {
+    CTestBlockController* controller=NULL;
+    TRAP_IGNORE(
+            {
+            controller = CTraceCoreController::NewL();
+            });
+    return controller;
+    }
+
+
+LOCAL_C void MainL()
+    {
+    CActiveScheduler* scheduler = new(ELeave)CActiveScheduler();
+    CActiveScheduler::Install(scheduler);
+    CTe_TraceCoreSuite* server=NULL;
+    TRAPD(err,server = CTe_TraceCoreSuite::NewL());
+    if(!err)
+        {
+        RProcess::Rendezvous(KErrNone);
+        scheduler->Start();
+        }
+    delete server;
+    delete scheduler;
+    }
+
+GLDEF_C TInt E32Main()
+    {
+    __UHEAP_MARK;
+    CTrapCleanup* cleanup = CTrapCleanup::New();
+    if(! cleanup )
+        {
+        return KErrNoMemory;
+        }
+    TRAP_IGNORE(MainL());
+    delete cleanup;
+    __UHEAP_MARKEND;
+    return KErrNone;
+    }
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/test/d_tracecore/group/bld.inf	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,23 @@
+// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+//
+
+#include "../../../../group/tracecore.hrh"
+
+PRJ_PLATFORMS
+DEFAULT
+ARMV5SMP
+
+PRJ_TESTMMPFILES
+d_tracecore
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/test/d_tracecore/group/d_tracecore.mmp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,42 @@
+// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+// e32test\group\d_tracecore.mmp
+//
+
+#include <kernel/kern_ext.mmh>
+#include "../../../../group/tracecore.hrh"
+
+target			d_tracecore.ldd        
+targettype		ldd
+capability		all
+vendorid		0x70000001
+
+OS_LAYER_SYSTEMINCLUDE
+
+USERINCLUDE ../inc
+USERINCLUDE ../../../../btrace_handler/inc
+
+SOURCEPATH		../src
+SOURCE			d_tracecore.cpp 
+SOURCE			TestDataWriter.cpp 
+SOURCE 			TraceCoreTestWriter.cpp
+
+LIBRARY		tracecore.lib
+
+
+start wins
+win32_headers
+end
+
+epocallowdlldata
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/test/d_tracecore/inc/TestDataWriter.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,50 @@
+// 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 "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:
+//
+// Description:
+//
+//
+
+#ifndef __TEST_DATA_WRITER_H_INCLUDED___
+#define __TEST_DATA_WRITER_H_INCLUDED___
+
+#include <kernel.h>
+#include <TraceCoreWriter.h>
+
+#include "TestDataWriterNotifier.h"
+
+
+class DTestDataWriter : public DTraceCoreWriter {
+public:
+    DTestDataWriter();
+    ~DTestDataWriter();
+
+    TInt Init();
+    TInt Close();
+
+    TUint32 WriteStart( TWriterEntryType aType );  
+    void WriteEnd( TUint32 aEntry );
+    void WriteData( TUint32 aEntry, TUint8 aData );  
+    void WriteData( TUint32 aEntry, TUint16 aData );
+    void WriteData( TUint32 aEntry, TUint32 aData );
+    TWriterType GetWriterType();
+    
+ private:
+     TInt iInterrupts;
+     TBuf8<KTcTdwBufSize> iBuffer;     
+     MTestWriterNotifier* iNotifier;
+   
+     friend class DTraceCoreTestWriter;
+};
+
+
+#endif  // __TEST_DATA_WRITER_H_INCLUDED___
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/test/d_tracecore/inc/TestDataWriterNotifier.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,60 @@
+// 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 "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:
+//
+// Description:
+//
+//
+#ifndef __TESTDATAWRITERNOTIFIER_H_INCLUDED__
+#define __TESTDATAWRITERNOTIFIER_H_INCLUDED__
+
+const int SYMBIAN_TRACE = 0x91;
+const int PRINTF_TRACE  = 0x83;
+const TInt KTcTdwBufSize = 4096;   
+
+#ifdef _DEBUG
+#define TDW_PRINTF(fmt, args...) Kern::Printf(fmt, ## args)
+#else
+#define TDW_PRINTF(fmt, args...)
+#endif
+
+
+struct TNotifyData
+    {
+    TNotifyData(TUint32 aAddr, TInt aLen)  
+    : iAddr(aAddr)
+    , iLen(aLen)
+    {    
+    }
+    
+    TInt iAddr;
+    TInt iLen;
+    
+private:
+    TNotifyData()
+    : iAddr(0)
+    , iLen(0)
+    {    
+    }
+
+};
+
+class MTestWriterNotifier
+    {
+public:
+    virtual void WriteStart() = 0;
+    virtual void WriteComplete(TNotifyData aNotifyData) = 0;
+    };
+
+
+
+
+#endif /* __TESTDATAWRITERNOTIFIER_H_INCLUDED__ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/test/d_tracecore/inc/TraceCoreTestWriter.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,47 @@
+// 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 "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:
+//
+// Description:
+//
+//
+
+#ifndef __TRACE_CORE_TEST_WRITER_H_INCLUDED__
+#define __TRACE_CORE_TEST_WRITER_H_INCLUDED__
+
+
+#include <kernel.h>
+
+#include "TestDataWriterNotifier.h"
+
+
+class DTestDataWriter;
+
+class DTraceCoreTestWriter  : public DBase 
+    { 
+
+public:
+    static DTraceCoreTestWriter* GetInstance();
+    void SetNotifier(MTestWriterNotifier* aNotifier);
+
+    virtual ~DTraceCoreTestWriter();
+
+private:
+    TInt Init();    
+    
+    DTraceCoreTestWriter();
+   
+private:
+    DTestDataWriter* iDataWriter;
+    static DTraceCoreTestWriter* iInstance;
+};
+
+#endif  // __TRACE_CORE_TEST_WRITER_H_INCLUDED__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/test/d_tracecore/inc/d_tracecore.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,120 @@
+// Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+// e32test\debug\d_tracecore.h
+// 
+//
+
+#ifndef D_TRACECORE_H
+#define D_TRACECORE_H
+
+#include <e32cmn.h>
+#include <e32ver.h>
+#ifndef __KERNEL_MODE__
+#include <e32std.h>
+#include <e32debug.h>
+#endif
+
+/**
+
+TcDriverParameters
+
+Parameters for activation/notification requests
+
+*/
+class TcDriverParameters
+    {
+    public:
+    TUint32 iComponentId;
+    TUint32 iGroupId;
+    };
+	
+/**
+Interface to the trace activation/deactivation mechanism
+*/
+class RTraceCoreTest : public RBusLogicalChannel
+	{
+public:
+    
+    enum TControl
+        {
+        EActivateTrace
+        , EDeactivateTrace
+        , ERefreshActivations
+        , ERequestTraceData
+        , EValidateFilterSync
+        , EDropNextTrace
+        , ERegisterActivationNotification
+        , ECheckActivationNotificationOk
+        };
+    
+#ifndef __KERNEL_MODE__
+	inline TInt Open()
+		{
+            return DoCreate(Name(),TVersion(0,1,1),KNullUnit,NULL,NULL,EOwnerThread);
+		}
+
+	inline TInt ActivateTrace(const TcDriverParameters& aDriverParameters, TInt aNumTraces=1)
+		{
+		return DoControl( EActivateTrace, (TAny*) &aDriverParameters, (TAny*)(aNumTraces));
+		}
+	
+    inline TInt DeactivateTrace(const TcDriverParameters& aDriverParameters, TInt aNumTraces=1)
+        {
+        return DoControl( EDeactivateTrace, (TAny*) &aDriverParameters, (TAny*)(aNumTraces) );
+        }	
+
+    inline TInt RefreshActivations()
+        {
+        return DoControl( ERefreshActivations );
+        }
+    
+    inline TInt ValidateFilterSync(const TcDriverParameters& aParams)
+        {
+        return DoControl( EValidateFilterSync, (TAny*)&aParams);
+        }   
+    
+    inline TInt DropNextTrace(TBool aDrop)
+        {
+        return DoControl( EDropNextTrace, (TAny*)(aDrop));
+        }
+    
+    inline TInt RegisterActivationNotification(const TcDriverParameters& aParams, TBool aRegister)
+        {
+        return DoControl( ERegisterActivationNotification, (TAny*) &aParams, (TAny*)(aRegister));
+        }     
+
+    inline TInt CheckActivationNotificationOk(TBool aShouldBeNotified)
+        {
+        return DoControl( ECheckActivationNotificationOk, (TAny*)(aShouldBeNotified));
+        }  
+
+    inline void RequestTraceData(TRequestStatus& aStatus, TDes8& aDes, TInt aFrameCount = 1)
+        {
+        TDes8* p = &aDes;
+        DoRequest( ERequestTraceData, aStatus, (TAny*) p, (TAny*)aFrameCount);
+        }   
+
+#endif //__KERNEL_MODE__
+
+	inline static const TDesC& Name();
+    
+	};
+
+inline const TDesC& RTraceCoreTest::Name()
+	{
+	_LIT(KTraceCoreName,"d_tracecore");
+	return KTraceCoreName;
+	}
+
+#endif //D_TRACECORE_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/test/d_tracecore/src/TestDataWriter.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,116 @@
+// 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 "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:
+//
+// Description:
+//
+//
+
+#include <memmodel/epoc/platform.h>
+#include <kernel.h>
+
+#include "TestDataWriter.h"
+
+
+#if defined _DEBUG
+
+void Panic(TInt aReason)
+    {
+    TDW_PRINTF("Panic with reason %d", aReason);
+    Kern::PanicCurrentThread(_L("Trace core TestDataWriter PANIC"), aReason);
+    }
+
+#endif
+
+DTestDataWriter::DTestDataWriter()
+: DTraceCoreWriter(EWriterTypeTest)
+, iNotifier(NULL)
+	{
+	}
+
+DTestDataWriter::~DTestDataWriter()
+	{
+	}
+
+TInt DTestDataWriter::Close()
+    {  
+    return KErrNone; 
+    }
+
+TInt DTestDataWriter::Init()
+    {    
+    return Register();
+    }
+  
+TUint32 DTestDataWriter::WriteStart( TWriterEntryType aType )
+	{        
+    if(iNotifier)
+	    {
+        iNotifier->WriteStart();
+	    }
+
+  iBuffer.Zero();
+  if ( aType == EWriterEntryTrace )
+    {
+	iBuffer.SetLength( 1 );
+	iBuffer[0] = SYMBIAN_TRACE;
+    }
+  else if ( aType == EWriterEntryAscii )
+    {
+	iBuffer.SetLength( 1 );
+	iBuffer[0] = PRINTF_TRACE;
+    }
+  
+    return 0;
+	}
+
+void DTestDataWriter::WriteEnd( TUint32 /*aEntryId*/ )
+    { 
+    if(iNotifier)
+        {
+        iNotifier->WriteComplete(TNotifyData((TUint32)iBuffer.Ptr(), iBuffer.Length()));
+        }
+    }
+
+void DTestDataWriter::WriteData( TUint32 /*aEntryId*/, TUint8 aData )
+	{
+	TInt len = iBuffer.Length();
+	TInt sz =  sizeof( TUint8 );
+	
+	if(len + sz  < iBuffer.MaxLength())
+	    {
+        iBuffer.Append((TUint8*) &aData, sz);
+        }
+	}
+
+void DTestDataWriter::WriteData( TUint32 /*aEntryId*/, TUint16 aData )
+	{
+    TInt len = iBuffer.Length();
+    TInt sz =  sizeof( TUint16 );
+    if(len + sz < iBuffer.MaxLength())
+        {
+        iBuffer.Append((TUint8*) &aData, sz);
+        }
+	}
+
+void DTestDataWriter::WriteData( TUint32 /*aEntryId*/, TUint32 aData )
+	{
+
+	TInt len = iBuffer.Length();
+    TInt sz =  sizeof( TUint32 );
+
+    if(len + sz < iBuffer.MaxLength())
+        {        
+        iBuffer.Append((TUint8*) &aData, sz);
+	    }
+	}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/test/d_tracecore/src/TraceCoreTestWriter.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,89 @@
+// 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 "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:
+//
+// Description:
+//
+
+//
+
+#include "TraceCore.h"
+#include "TestDataWriter.h"
+#include "TraceCoreTestWriter.h"
+
+DTraceCoreTestWriter* DTraceCoreTestWriter::iInstance = NULL;    
+
+DTraceCoreTestWriter* DTraceCoreTestWriter::GetInstance()
+    { 
+    if ( iInstance == NULL )
+        {    
+        DTraceCoreTestWriter* instance = new DTraceCoreTestWriter();
+
+        if ( instance != NULL )
+            {
+            iInstance = instance;            
+            TInt ret = instance->Init();
+            if ( ret != KErrNone )
+                {
+                TDW_PRINTF("TraceCoreTestWriter::GetInstance() Init failed ret = %d !!)", ret);
+                delete instance;
+                iInstance = NULL;
+                }
+            }
+        else
+            {
+            TDW_PRINTF("DTraceCoreTestWriter New returned null");
+            }
+        }
+
+    TDW_PRINTF("TraceCoreTestWriter::GetInstance() iInstance = 0x%x)", iInstance);
+    
+    return iInstance;
+    }
+
+void DTraceCoreTestWriter::SetNotifier(MTestWriterNotifier* aNotifier)
+    {
+    if(iDataWriter)
+        {
+        iDataWriter->iNotifier = aNotifier;  
+        }
+    }
+
+DTraceCoreTestWriter::DTraceCoreTestWriter()
+: iDataWriter(NULL)
+    {
+    }
+
+DTraceCoreTestWriter::~DTraceCoreTestWriter()
+	{
+	  delete iDataWriter;	  
+	  iInstance = NULL;
+	}
+
+
+TInt DTraceCoreTestWriter::Init()
+    {
+    TInt ret = KErrNoMemory;
+    if(!iDataWriter)
+        {
+        iDataWriter = new DTestDataWriter();
+        iDataWriter->Init();
+        
+        // now make sure that we are the writer in use 
+        DTraceCore* traceCore = DTraceCore::GetInstance();
+        if(traceCore)
+            {     
+            traceCore->SwitchToWriter(EWriterTypeTest); 
+            ret = KErrNone;
+            }
+        }
+    return ret;
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/test/d_tracecore/src/d_tracecore.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,508 @@
+// Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+// e32test\debug\d_tracecore.cpp
+// 
+//
+
+#include <kernel/kern_priv.h>
+#include <kernel/kernel.h>
+
+#include <e32btrace.h>
+#include <opensystemtrace_types.h>
+
+#ifndef __SMP__
+#include <nkern/nkern.h>
+#else
+#include <nkernsmp/nkern.h>
+#endif //__SMP__
+#include <TraceCoreTraceActivationIf.h>
+#include <TraceCoreNotificationReceiver.h>
+#include "TraceCore.h"
+#include "d_tracecore.h"
+
+
+#include "TraceCoreTestWriter.h"
+#include "TestDataWriterNotifier.h"
+
+const TInt KFrameBufferLength = 4096;
+
+class DTraceCoreTestFactory : public DLogicalDevice 
+	{
+public:
+	virtual TInt Install();
+	virtual void GetCaps(TDes8& aDes) const;
+	virtual TInt Create(DLogicalChannelBase*& aChannel);
+	};
+
+class DTraceCoreTestChannel : public DLogicalChannel, MTestWriterNotifier, MTraceCoreNotificationReceiver
+	{
+public:
+	DTraceCoreTestChannel();
+	virtual ~DTraceCoreTestChannel();
+	//	Inherited from DObject
+	virtual TInt RequestUserHandle(DThread* aThread, TOwnerType aType);
+	// Inherited from DLogicalChannelBase
+	virtual TInt DoCreate(TInt aUnit, const TDesC8* anInfo, const TVersion& aVer);
+	virtual void HandleMsg(TMessageBase* aMsg);
+	TInt DoControl(TInt aFunction, TAny* a1, TAny* a2);
+	TInt DoRequest(TInt aId, TRequestStatus* aStatus, TAny* a1, TAny* a2);
+	
+    // Virtual from MTraceCoreNotificationReceiver. Called from TraceCore.
+    void TraceActivated( TUint32 aComponentId, TUint16 aGroupId  );
+    void TraceDeactivated( TUint32 aComponentId, TUint16 aGroupId  );
+	
+
+private:
+	DThread* iClient;
+	
+private:
+	void ActivateTrace(TcDriverParameters& aDriverParameters, TInt aNumTraces);
+	void DeactivateTrace(TcDriverParameters& aDriverParameters, TInt aNumTraces);
+    TInt RefreshActivations();
+    TInt ValidateFilterSync(TcDriverParameters& aDriverParams);
+    void DropNextTrace(TBool aDrop);
+    void RegisterActivationNotification(TcDriverParameters& aDriverParameters, TBool aRegister);
+    TInt CheckActivationNotificationOk(TBool aShouldBeNotified);
+	
+	TInt CreateWriter();
+	// from MTestWriterNotifier
+    virtual void WriteComplete(TNotifyData aData);
+    virtual void WriteStart();
+private:
+  
+    TRequestStatus* iTraceDataRequestStatus;      // request status for asynct trace requests
+    TDes8*          iTraceDataDestination;        // pointer to write trace data to
+    TDynamicDfcQue* iOstTestDriverDfcQ;           // Dedicated non-realtime DfcQ
+    TBool           iDropTrace;                   // if test doesn't want trace to actually be sent
+    TInt                            iFrameCount;  // Number of frames to capture before notify is issued 
+    TBuf8<KFrameBufferLength>       iFrameBuffer; // the frame buffer
+    TBool           iFilterInSyncWhenNotified;    // If true, filter in TraceCore was in sync with the notification
+    TBool           iNotificationReceived;        // If true, trace activation notification was received
+	};
+
+const TInt KTestOstDriverThreadPriority = 24;
+_LIT(KTestOstDriverThread,"d_tracecore_dfcq");
+
+
+//
+// DTraceCoreTestFactory
+//
+
+TInt DTraceCoreTestFactory::Install()
+	{
+	return SetName(&RTraceCoreTest::Name());
+	}
+
+void DTraceCoreTestFactory::GetCaps(TDes8& aDes) const
+	{
+	Kern::InfoCopy(aDes,0,0);
+	}
+
+TInt DTraceCoreTestFactory::Create(DLogicalChannelBase*& aChannel)
+	{
+	aChannel=new DTraceCoreTestChannel();
+	if(!aChannel)
+		return KErrNoMemory;
+	return KErrNone;
+	}
+
+
+//
+// DTraceCoreTestChannel
+//
+
+DTraceCoreTestChannel::DTraceCoreTestChannel()
+: iTraceDataRequestStatus(NULL)
+, iTraceDataDestination(NULL)
+, iDropTrace(EFalse)
+, iFilterInSyncWhenNotified(EFalse)
+    {
+	}
+
+DTraceCoreTestChannel::~DTraceCoreTestChannel()
+	{	
+	// Detatch (stop notifications) from writer	     
+    DTraceCoreTestWriter* testWriter = DTraceCoreTestWriter::GetInstance();
+    if(testWriter)
+        {
+        testWriter->SetNotifier(NULL);        
+        }           
+    delete testWriter;
+    
+    //destroy dfcq
+    if (iOstTestDriverDfcQ)
+        {
+        iOstTestDriverDfcQ->Destroy();
+        }
+	}
+
+TInt DTraceCoreTestChannel::DoCreate(TInt /*aUnit*/, const TDesC8* /*aInfo*/, const TVersion& /*aVer*/)
+	{
+    TDynamicDfcQue* q;
+    TInt ret = Kern::DynamicDfcQCreate(q, KTestOstDriverThreadPriority , KTestOstDriverThread);
+    if (ret==KErrNone)
+        {
+        //disable real-time state of the dfcq
+        q->SetRealtimeState(ERealtimeStateOff);
+        iOstTestDriverDfcQ=q;
+        SetDfcQ(iOstTestDriverDfcQ);
+        iMsgQ.Receive();
+        }
+    else
+        {
+        Kern::Printf("Kern::DynamicDfcQCreate returned with error: %d",ret);
+        return ret;
+        }
+	iClient = &Kern::CurrentThread();			
+	return CreateWriter();
+	}
+
+void DTraceCoreTestChannel::WriteStart()
+    {
+    }
+
+void DTraceCoreTestChannel::WriteComplete(TNotifyData aNotifyData) 
+    {
+
+    if(iTraceDataRequestStatus && iFrameCount > 0 )
+        {    
+
+        // append the data into the frame buffer if it fits
+        if( iFrameBuffer.Length() + aNotifyData.iLen < KFrameBufferLength)
+            {        
+            iFrameBuffer.Append(TPtrC8((TUint8*)aNotifyData.iAddr, aNotifyData.iLen ));
+            }
+        else
+            {
+            // force a send of what we have
+            iFrameCount = 1;
+            }
+                       
+        if( --iFrameCount == 0)
+            {    
+            if (iDropTrace)
+                {
+                // test client is requesting we force tracecore to drop the next trace
+                // so we call the same function that a writer would call ( SetPreviousTraceDropped )
+                // in order to notify tracecore that a trace has been dropped            
+                DTraceCore* tracecore = DTraceCore::GetInstance();
+                tracecore->SetPreviousTraceDropped(ETrue);
+                }
+            else//send the trace
+                {
+                Kern::KUDesPut(*iTraceDataDestination,iFrameBuffer);
+                }
+            
+            // complete the clients request
+            Kern::RequestComplete(iTraceDataRequestStatus, 0);
+            iTraceDataRequestStatus = NULL;
+            iFrameBuffer.Zero();            
+            }
+        }    
+    }
+
+TInt DTraceCoreTestChannel::CreateWriter()
+    {
+    TInt r = KErrNoMemory;
+    DTraceCoreTestWriter* testWriter = DTraceCoreTestWriter::GetInstance(); 
+    if(testWriter)
+        {
+        r = KErrNone;
+        testWriter->SetNotifier(this);
+        }       
+    return r;
+    }
+
+TInt DTraceCoreTestChannel::RequestUserHandle(DThread* aThread, TOwnerType aType)
+	{
+	if (aType!=EOwnerThread || aThread!=iClient)
+		return KErrAccessDenied;
+	return KErrNone;
+	}
+
+void DTraceCoreTestChannel::HandleMsg(TMessageBase* aMsg)
+	{    
+    TThreadMessage& msg = *(static_cast<TThreadMessage*>(aMsg));    
+    TInt id = msg.iValue;
+    
+    if ( id == static_cast<TInt>( ECloseMsg ) )
+        {
+
+        // Don't receive any more messages
+        msg.Complete( KErrNone, EFalse );
+
+        // Complete all outstanding messages on this queue
+        iMsgQ.CompleteAll( KErrServerTerminated );
+        }
+    else if ( id == KMaxTInt )
+        {
+        // 'DoCancel' message
+        TRequestStatus* pS = reinterpret_cast<TRequestStatus*>( msg.Ptr0() );
+        Kern::RequestComplete(iClient,pS,KErrCancel);
+        msg.Complete( KErrNone, ETrue );
+        }
+    else if ( id < 0 )
+        {
+        // DoRequest
+        TRequestStatus* pS = reinterpret_cast<TRequestStatus*>( msg.Ptr0() );
+        
+        TInt ret = DoRequest( ~id, pS, msg.Ptr1(), msg.Ptr2());
+        if ( ret != KErrNone )
+            {
+            Kern::RequestComplete( iClient, pS, ret );
+            }//noelse
+        
+        msg.Complete( KErrNone, ETrue );
+        }
+    else
+        {
+        // DoControl
+        TInt ret = DoControl( id, msg.Ptr0(), msg.Ptr1() );
+        msg.Complete( ret, ETrue );
+        }
+
+	}
+
+TInt DTraceCoreTestChannel::DoControl(TInt aFunction, TAny* a1, TAny* a2)
+    {
+    switch(aFunction)
+          {
+    // test functions
+          case RTraceCoreTest::EActivateTrace:
+              {
+//            Kern::Printf("DTraceCoreTestChannel::DoControl() RTraceCoreTest::EActivateTrace");
+              TcDriverParameters* tcDriverParameters = static_cast<TcDriverParameters*>(a1); 
+              __ASSERT_ALWAYS(tcDriverParameters!=NULL, Kern::Fault("DTraceCoreTestChannel::DoControl: NULL parameter!", __LINE__) );
+              ActivateTrace(*tcDriverParameters, (TInt)(a2));
+              return KErrNone;
+              }
+         case RTraceCoreTest::EDeactivateTrace:
+              {
+//            Kern::Printf("DTraceCoreTestChannel::DoControl()  RTraceCoreTest::EDeactivateTrace");
+              TcDriverParameters* tcDriverParameters = static_cast<TcDriverParameters*>(a1); 
+              __ASSERT_ALWAYS(tcDriverParameters!=NULL, Kern::Fault("DTraceCoreTestChannel::DoControl: NULL parameter!", __LINE__) );              
+              DeactivateTrace(*tcDriverParameters, (TInt)(a2));
+              return KErrNone;
+              }
+         case RTraceCoreTest::ERefreshActivations:
+             {
+//            Kern::Printf("DTraceCoreTestChannel::DoControl() RTraceCoreTest::ERefreshActivations");
+             return RefreshActivations();
+             }
+              
+         case RTraceCoreTest::EValidateFilterSync:
+             {
+//           Kern::Printf("DTraceCoreTestChannel::ReqDoControluest()  RTraceCoreTest::EValidateFilterSync");
+             TcDriverParameters* tcDriverParameters = static_cast<TcDriverParameters*>(a1); 
+             __ASSERT_ALWAYS(tcDriverParameters!=NULL, Kern::Fault("DTraceCoreTestChannel::DoControl: NULL parameter!", __LINE__) );             
+             return ValidateFilterSync(*tcDriverParameters);
+             }
+             
+         case RTraceCoreTest::EDropNextTrace:
+             {
+//           Kern::Printf("DTraceCoreTestChannel::DoControl()  RTraceCoreTest::EDropNextTrace");        
+             DropNextTrace(TBool(a1));
+             return KErrNone;
+             }
+         case RTraceCoreTest::ERegisterActivationNotification:
+             {
+//           Kern::Printf("DTraceCoreTestChannel::DoControl()  RTraceCoreTest::ERegisterActivationNotification");
+             TcDriverParameters* tcDriverParameters = static_cast<TcDriverParameters*>(a1); 
+             __ASSERT_ALWAYS(tcDriverParameters!=NULL, Kern::Fault("DTraceCoreTestChannel::DoControl: NULL parameter!", __LINE__) );
+             RegisterActivationNotification(*tcDriverParameters, (TBool)(a2));
+             return KErrNone;
+             }       
+         case RTraceCoreTest::ECheckActivationNotificationOk:
+             {
+//             Kern::Printf("DTraceCoreTestChannel::DoControl()  RTraceCoreTest::ECheckActivationNotificationOk");        
+             return CheckActivationNotificationOk((TBool)(a1));
+             }                  
+            
+         default:
+             break;
+              }
+    return KErrNotSupported;
+    }
+
+TInt DTraceCoreTestChannel::DoRequest(TInt aId, TRequestStatus* aStatus, TAny* a1, TAny* a2)
+    {
+    switch(aId)
+        {
+        case RTraceCoreTest::ERequestTraceData:  // async request
+            {                     
+            iTraceDataRequestStatus   = aStatus;           
+            if(a1)
+                {
+                TDes8* p = NULL;
+                XTRAPD(r, XT_DEFAULT, kumemget(&p, &a1, sizeof(TAny*)); )                
+                iTraceDataDestination = (r == KErrNone) ? p : NULL;                
+                }
+            
+            iFrameCount = (a2) ? (TInt)a2 : 1;
+            iFrameBuffer.Zero();
+            
+            return KErrNone;
+                }
+          
+         default:
+            break;
+        }
+    return KErrNotSupported;
+    }
+
+void DTraceCoreTestChannel::ActivateTrace(TcDriverParameters& aDriverParameters, TInt aNumTraces)
+    {
+    TcDriverParameters tcDriverParams;
+    TInt ret = Kern::ThreadRawRead(iClient, (const TAny *)&aDriverParameters,(TAny*)&tcDriverParams, sizeof(TcDriverParameters) );
+    __ASSERT_ALWAYS(KErrDied!=ret, Kern::Fault("DTraceCoreTestChannel::ActivateTrace: ThreadRawRead: iClient died!", __LINE__) );    
+    
+    NKern::ThreadEnterCS();
+    for (TInt i=0; i<aNumTraces; i++)
+        {
+        DTraceActivationIf::ActivateTrace((tcDriverParams.iComponentId)+i,(tcDriverParams.iGroupId)+i);
+        }
+    NKern::ThreadLeaveCS();    
+    }
+
+void DTraceCoreTestChannel::DeactivateTrace(TcDriverParameters& aDriverParameters, TInt aNumTraces)
+    {    
+    TcDriverParameters tcDriverParams;    
+    TInt ret = Kern::ThreadRawRead(iClient, (const TAny *)&aDriverParameters,(TAny*)&tcDriverParams, sizeof(TcDriverParameters) );
+    __ASSERT_ALWAYS(KErrDied!=ret,Kern::Fault("DTraceCoreTestChannel::DeactivateTrace: ThreadRawRead: iClient died!", __LINE__) );
+
+    NKern::ThreadEnterCS();    
+    for (TInt i=0; i<aNumTraces; i++)
+        {
+        DTraceActivationIf::DeactivateTrace((tcDriverParams.iComponentId)+i,(tcDriverParams.iGroupId)+i);
+        }
+    NKern::ThreadLeaveCS();    
+    }
+
+TInt DTraceCoreTestChannel::RefreshActivations()
+    {
+    NKern::ThreadEnterCS();
+    TInt err = DTraceActivationIf::RefreshActivations();
+    NKern::ThreadLeaveCS();
+    return err;
+    }
+
+/**
+ * Validate that the BTrace::Filter matches the tracecore filters 
+ * for all OST categories
+ * 
+ * returns KErrNone if filters match - KErrGeneral otherwise
+ */
+TInt  DTraceCoreTestChannel::ValidateFilterSync(TcDriverParameters& aDriverParameters)
+    {
+    TcDriverParameters tcDriverParams;
+    TInt ret = Kern::ThreadRawRead(iClient, (const TAny *)&aDriverParameters,(TAny*)&tcDriverParams, sizeof(TcDriverParameters) );
+    __ASSERT_ALWAYS(ret == KErrNone, Kern::Fault("DTraceCoreTestChannel::ValidateFilterSync: ThreadRawRead: iClient died!", __LINE__) );    
+    
+    TBool tcFilter = DTraceActivationIf::IsTraceActivated(tcDriverParams.iComponentId, tcDriverParams.iGroupId);
+    TBool btFilter = BTrace::CheckFilter(tcDriverParams.iGroupId);                    
+    if( tcFilter != btFilter)
+        {
+        ret = KErrGeneral;
+        }            
+
+    return ret;
+    }
+
+/**
+ * Adds or removes a activation notification listener
+ * 
+ * returns KErrNone if filters match - KErrGeneral otherwise
+ */
+void DTraceCoreTestChannel::RegisterActivationNotification(TcDriverParameters& aDriverParameters, TBool aRegister)
+    {
+    TcDriverParameters tcDriverParams;
+    TInt ret = Kern::ThreadRawRead(iClient, (const TAny *)&aDriverParameters,(TAny*)&tcDriverParams, sizeof(TcDriverParameters) );
+    __ASSERT_ALWAYS(ret == KErrNone, Kern::Fault("DTraceCoreTestChannel::ValidateFilterSync: ThreadRawRead: iClient died!", __LINE__) );
+        
+    if (aRegister)
+        {
+        MTraceCoreNotificationReceiver::RegisterNotificationReceiver(tcDriverParams.iComponentId, tcDriverParams.iGroupId);
+        }
+    else
+        {
+        MTraceCoreNotificationReceiver::UnregisterNotificationReceiver(tcDriverParams.iComponentId, tcDriverParams.iGroupId);
+        }
+    }
+
+/**
+ * Add a activation notification listener, then activate a trace group and check if the activation  
+ * has really happened when the notification arrives
+ * 
+ * returns KErrNone if filters match - KErrGeneral otherwise
+ */
+TInt DTraceCoreTestChannel::CheckActivationNotificationOk(TBool aShouldBeNotified)
+    {
+    TInt ret = KErrGeneral;
+    
+    // Everything OK if we should've got notification and we got and filters were in sync
+    if (aShouldBeNotified && iNotificationReceived && iFilterInSyncWhenNotified)
+        {
+        ret = KErrNone;
+        }
+    
+    // Everything OK if we should NOT got notification and we didn't
+    else if (!aShouldBeNotified && !iNotificationReceived)
+        {
+        ret = KErrNone;
+        }
+    
+    // Reset the variables for next test
+    iFilterInSyncWhenNotified = EFalse;
+    iNotificationReceived = EFalse;
+    
+    return ret;
+    }
+
+/**
+ * Callback function from TraceCore when the trace is activated
+ */
+void DTraceCoreTestChannel::TraceActivated( TUint32 aComponentId, TUint16 aGroupId  )
+    {
+    TBool tcFilter = DTraceActivationIf::IsTraceActivated(aComponentId, aGroupId);
+    iFilterInSyncWhenNotified = tcFilter;
+    iNotificationReceived = ETrue;
+    }
+
+/**
+ * Callback function from TraceCore when the trace is deactivated
+ */
+void DTraceCoreTestChannel::TraceDeactivated( TUint32 aComponentId, TUint16 aGroupId  )
+    {
+    TBool tcFilter = DTraceActivationIf::IsTraceActivated(aComponentId, aGroupId);
+    iFilterInSyncWhenNotified = !tcFilter;
+    iNotificationReceived = ETrue;
+    }
+
+/*
+ * Tells the test writer that we don't actually want to 
+ * send a trace... this is to test that the handlers
+ * are formatting the data to include "missing" info.
+ */
+void DTraceCoreTestChannel::DropNextTrace(TBool aDrop)
+    {
+    iDropTrace=aDrop;
+    }
+
+DECLARE_STANDARD_LDD()
+	{
+	Kern::Printf("d_tracecore.ldd creating DTraceCoreTestFactory");
+	return new DTraceCoreTestFactory;
+	}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/test/d_traceonactivation/group/bld.inf	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,26 @@
+// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+//
+
+#include "../../../../group/tracecore.hrh"
+
+PRJ_PLATFORMS
+DEFAULT
+ARMV5SMP
+
+PRJ_TESTEXPORTS
+../inc/TraceOnActivationIf.h                    OS_LAYER_PLATFORM_EXPORT_PATH(test/TraceOnActivationIf.h)
+
+PRJ_TESTMMPFILES
+d_traceonactivation
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/test/d_traceonactivation/group/d_traceonactivation.mmp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,39 @@
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+//
+
+#include    <kernel/kern_ext.mmh>
+#include "../../../../group/tracecore.hrh"
+
+TARGET          d_traceonactivation.ldd
+TARGETTYPE      ldd
+CAPABILITY      ALL
+VENDORID        0x70000001
+
+OS_LAYER_SYSTEMINCLUDE
+
+USERINCLUDE     ../inc
+USERINCLUDE 	../../../inc
+
+SOURCEPATH      ../src
+SOURCE          TraceOnActivation.cpp
+SOURCE          TraceConnection.cpp
+
+LIBRARY         tracecore.lib
+
+START WINS
+win32_library   kernel32.lib
+END
+
+MACRO OST_TRACE_COMPILER_IN_USE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/test/d_traceonactivation/inc/TraceConnection.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,54 @@
+// 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 "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:
+//
+// Description:
+//
+
+#ifndef _TRACECONNECTION_H_
+#define _TRACECONNECTION_H_
+
+#include <kernel/kernel.h>
+#include <TraceCoreSubscriber.h>
+
+/**
+
+Handles TraceCore connection
+
+*/
+NONSHARABLE_CLASS(DTraceConnection) : public MTraceCoreNotificationReceiver, 
+									  public DTraceCoreSubscriber
+    {
+    public:
+    DTraceConnection( );
+    DTraceConnection( DTcChannel* aTCChannel );
+    ~DTraceConnection();
+    
+    // Virtual from MTraceCoreNotificationReceiver. Called from TraceCore.
+    void TraceActivated( TUint32 aComponentId, TUint16 aGroupId  );
+    void TraceDeactivated( TUint32 aComponentId, TUint16 aGroupId  );
+    
+    // Called from DTcChannel
+    TInt RegisterNotificationReceiver( TUint32 aComponentId, TInt32 aGroupId );
+    void UnregisterNotificationReceiver( TUint32 aComponentId, TInt32 aGroupId  );
+    
+    // From DTraceCoreSubscriber
+    void MessageReceived( TTraceMessage &aMsg );
+    
+    TInt DoSendMessage( TTraceMessage &aMsg );
+    
+    private:
+    DTcChannel* iTcChannel;
+    
+    };
+
+#endif /*_TRACECONNECTION_H_*/
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/test/d_traceonactivation/inc/TraceOnActivation.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,69 @@
+// 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 "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:
+//
+// Description:
+//
+
+#ifndef     __TRACEONACTIVATION_H__
+#define     __TRACEONACTIVATION_H__
+
+#include <kernel/kernel.h>
+#include <kernel/kern_priv.h>
+#include <TraceCoreNotificationReceiver.h>
+
+//- Forward Declarations ----------------------------------------------------
+class TTraceOnActivationParams;
+class DTcChannel;
+class DTraceConnection;
+
+/**
+
+Logical device factory object
+
+*/
+class DTcFactory : public DLogicalDevice
+    {
+    public:
+        DTcFactory();
+        virtual ~DTcFactory();
+        virtual TInt Install();
+        virtual void GetCaps(TDes8& aDes) const;
+        virtual TInt Create(DLogicalChannelBase*& aChannel);	
+    };
+
+
+/**
+
+The Kernel side logical channel
+
+*/
+class DTcChannel : public DLogicalChannel
+    {
+    public:
+        DTcChannel(DLogicalDevice* aDevice);
+        virtual ~DTcChannel();
+        virtual TInt DoCreate(TInt aUnit, const TDesC8* aInfo, const TVersion& aVer);
+
+        virtual void HandleMsg(TMessageBase* aMsg);
+        TInt DoControl(TInt aFunction, TAny* a1);
+        TInt RegisterNotificationReceiver( TTraceOnActivationParams* aParameters );
+        TInt UnregisterNotificationReceiver( TTraceOnActivationParams* aParameters );
+        virtual TInt TraceActivated( TUint32 aComponentId, TUint16 aGroupId );
+        virtual TInt TraceDeactivated( TUint32 aComponentId, TUint16 aGroupId );
+
+    private:
+        DThread* iClientThread;   // Store the pointer to the user thread
+        DTraceConnection* iTraceConnection;
+        TDfcQue* iActivationQue;
+    };
+
+#endif      //  __TRACEONACTIVATION_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/test/d_traceonactivation/inc/TraceOnActivationIf.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,119 @@
+// 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 "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:
+//
+// Description:
+//
+
+#ifndef     __TRACEONACTIVATIONIF_H__
+#define     __TRACEONACTIVATIONIF_H__
+
+
+//- Include Files  ----------------------------------------------------------
+
+#include <e32ver.h>
+#include <e32cmn.h>
+#include <TraceCoreSubscriber.h>
+
+//- Constants ---------------------------------------------------------------
+
+/** Name of logical driver */
+_LIT( KTraceOnActivationDriverName, "TraceOnActivation" );
+
+	
+/**
+
+TTraceOnActivationParams
+
+Parameters for activation/notification requests
+
+*/
+class TTraceOnActivationParams
+    {
+    public:
+    TUint32 iComponentId;
+    TUint32 iGroupId;
+    };
+
+/**
+
+RTraceOnActivation
+
+User side interface
+
+*/
+class RTraceOnActivation : public RBusLogicalChannel
+    {
+    public:
+        enum TVer
+            {
+            EMajorVersionNumber = 1,
+            EMinorVersionNumber = 1,
+            EBuildVersionNumber = KE32BuildVersionNumber
+            };
+
+        /** A set of bits identifying the request numbers which are valid */
+        enum TControl
+            {
+            ERegisterNotificationReceiver,
+            EUnregisterNotificationReceiver
+            };
+                 
+    public:
+#ifndef __KERNEL_MODE__
+
+
+        /**
+            Create the logical channel for the current thread and open a handle to it
+
+            @param  aUnit  Parameter that contains unit info
+
+            @return KErrNone, if successful
+        */
+        inline TInt Open(TInt aUnit = KNullUnit) 
+            { return DoCreate( KTraceOnActivationDriverName, VersionRequired(), aUnit, NULL, NULL ); };
+	
+        /**
+            Returns version information
+
+            @return Version information
+        */
+        inline TVersion VersionRequired() const
+            { return TVersion( EMajorVersionNumber, EMinorVersionNumber, EBuildVersionNumber ); };
+
+
+         /**
+         Register notification receiver
+         
+         @param aParameters Contains component ID and group ID
+         
+         @return KErrNone, if successful
+        */
+        inline TInt RegisterNotificationReceiver( TTraceOnActivationParams& aParameters )
+            { return DoControl( ERegisterNotificationReceiver, static_cast<TAny*>(&aParameters) ); };
+        
+        
+        /**
+         Unregister notification receiver
+         
+         @param aParameters Contains component ID and group ID
+        
+         @return KErrNone, if successful
+         */
+        inline TInt UnregisterNotificationReceiver( TTraceOnActivationParams& aParameters )
+            { return DoControl( EUnregisterNotificationReceiver, static_cast<TAny*>(&aParameters) ); };
+        
+#endif
+    };
+
+#endif      //  __TRACEONACTIVATIONIF_H__
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/test/d_traceonactivation/src/TraceConnection.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,130 @@
+// 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 "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:
+//
+// Description:
+//
+
+#include "TraceOnActivation.h"
+#include "TraceCoreTraceActivationIf.h"
+#include "TraceConnection.h"
+
+#include <TraceCoreMessageSender.h>
+
+
+//---------------------------------------------------------------------------
+/**
+    Constructor
+
+*/
+DTraceConnection::DTraceConnection( )
+: iTcChannel( NULL )
+    {
+
+    }
+
+//---------------------------------------------------------------------------
+/**
+    Constructor
+
+    @param  aTcChannel  A pointer to the DTcChannel
+
+*/
+DTraceConnection::DTraceConnection( DTcChannel* aTcChannel )
+: iTcChannel( aTcChannel )
+    {
+    }
+    
+//---------------------------------------------------------------------------
+/**
+    Destructor
+
+*/
+DTraceConnection::~DTraceConnection()
+    {
+    }
+    
+//---------------------------------------------------------------------------
+/**
+    RegisterNotificationReceiver
+
+    @param  aComponentId  ComponentId
+    @param  aGroupId GroupId
+
+*/
+TInt DTraceConnection::RegisterNotificationReceiver( TUint32 aComponentId, TInt32 aGroupId )
+    {
+    return MTraceCoreNotificationReceiver::RegisterNotificationReceiver( aComponentId, aGroupId );
+    }
+
+    
+//---------------------------------------------------------------------------
+/**
+    UnregisterNotificationReceiver
+
+    @param  aComponentId  ComponentId
+    @param  aGroupId GroupId
+
+*/
+void DTraceConnection::UnregisterNotificationReceiver( TUint32 aComponentId, TInt32 aGroupId  )
+    {
+    MTraceCoreNotificationReceiver::UnregisterNotificationReceiver( aComponentId, aGroupId );
+    }    
+
+//---------------------------------------------------------------------------
+/**
+    TraceActivated
+
+    @param  aComponentId  ComponentId
+    @param  aGroupId GroupId
+
+*/
+void DTraceConnection::TraceActivated( TUint32 aComponentId, TUint16 aGroupId  )
+    {
+    if(iTcChannel)
+        {
+        iTcChannel->TraceActivated( aComponentId, aGroupId );
+        }
+    }
+
+//---------------------------------------------------------------------------
+/**
+    TraceDeactivated
+
+    @param  aComponentId  ComponentId
+    @param  aGroupId GroupId
+
+*/    
+void DTraceConnection::TraceDeactivated( TUint32 aComponentId, TUint16 aGroupId  )
+    {
+    if(iTcChannel)
+        {
+        iTcChannel->TraceDeactivated( aComponentId, aGroupId );
+        }
+    }
+
+//---------------------------------------------------------------------------
+
+void DTraceConnection::MessageReceived( TTraceMessage& /*aMsg*/ )
+	{
+	}
+
+
+TInt DTraceConnection::DoSendMessage( TTraceMessage &aMsg )
+	{
+	TInt err = KErrNotFound;
+	if ( iMessageSender )
+		{
+		err = iMessageSender->SendMessage( aMsg );
+		}	
+	return err;
+	}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/test/d_traceonactivation/src/TraceOnActivation.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,401 @@
+// 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 "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:
+//
+// Description:
+//
+
+#include <kernel/arm/assp.h>
+#include <kernel/kernel.h>
+#include <TraceCoreCommon.h>
+
+#include "TraceCore.h"
+#include "TraceCoreConstants.h"
+#include "TraceOnActivation.h"
+#include "TraceOnActivationIf.h"
+#include "TraceConnection.h"
+
+
+//===========================================================================
+// DTcFactory Class
+//===========================================================================
+
+//---------------------------------------------------------------------------
+/**
+    DTcFactory Constructor
+*/
+DTcFactory::DTcFactory()
+: DLogicalDevice()
+    {
+    // The version of this logical device
+    iVersion = TVersion( RTraceOnActivation::EMajorVersionNumber,
+                         RTraceOnActivation::EMinorVersionNumber,
+                         RTraceOnActivation::EBuildVersionNumber );
+
+    // A bitmasks that indicates device properties
+    iParseMask = 0;
+    iUnitsMask = 0;
+    }
+
+
+//---------------------------------------------------------------------------
+/**
+    DTcFactory Destructor
+*/
+DTcFactory::~DTcFactory()
+    {
+    }
+
+
+//---------------------------------------------------------------------------
+/**
+    Completes the installation of this logical device i.e. to do secondary
+    initialization
+
+    @return KErrNone, if successful
+*/
+TInt DTcFactory::Install()
+    {
+    return SetName( &KTraceOnActivationDriverName );
+    }
+
+
+//---------------------------------------------------------------------------
+/**
+    Gets the capabilities of this logical device. Current implementation does
+    nothing.
+
+    @param  aDes  On return, contains information describing
+                  the capabilities of the device
+
+*/
+void DTcFactory::GetCaps(TDes8& /*aDes*/) const
+    {
+    }
+
+
+//---------------------------------------------------------------------------
+/**
+    Creates a logical channel
+
+    @param  aChannel Set to point to the created Logical Channel
+
+    @return KErrNone, if successfull
+*/
+TInt DTcFactory::Create(DLogicalChannelBase*& aChannel)
+    {
+	TInt r(KErrNone);
+    aChannel = new DTcChannel( this );
+
+    if ( aChannel == NULL )
+        {
+        r = KErrNoMemory;
+        }
+
+    return r;
+    }
+ 
+//===========================================================================
+// DTcChannel Class
+//===========================================================================
+
+//---------------------------------------------------------------------------
+/**
+    Constructor
+
+    @param  aDevice  A pointer to the LDD factory object that
+                    is constructing this logical channel
+
+*/
+DTcChannel::DTcChannel(DLogicalDevice* /*aDevice*/)
+        : DLogicalChannel()
+        , iClientThread( NULL )
+        , iActivationQue(NULL)
+    {   
+    }
+
+
+//---------------------------------------------------------------------------
+
+/**
+    Destructor
+*/
+DTcChannel::~DTcChannel()
+    {
+    delete iTraceConnection;
+    iTraceConnection = NULL;
+
+    // Close our reference on the client thread
+    Kern::SafeClose( reinterpret_cast<DObject*&>( iClientThread ), NULL );
+
+#ifdef __SMP_
+    __e32_memory_barrier();
+#endif
+    }
+
+
+//---------------------------------------------------------------------------
+/**
+    Completes the outstanding request identified by the specified request
+    number.
+
+    @param  aMsg  System message from user side
+*/
+
+void DTcChannel::HandleMsg(TMessageBase* aMsg)
+    {
+    // Synchronous kernel-side message. There is one per thread, and the
+    // thread always blocks while the message is outstanding.
+    TThreadMessage& msg = *( 
+    				static_cast<TThreadMessage*>( aMsg ) ); 
+    
+    TInt id = msg.iValue;
+
+    if ( id == static_cast<TInt>( ECloseMsg ) )
+        {
+        // Don't receive any more messages
+        msg.Complete( KErrNone, EFalse );
+
+        // Complete all outstanding messages on this queue
+        iMsgQ.CompleteAll( KErrServerTerminated );
+        }
+    else
+        {
+        // DoControl
+        TInt ret = DoControl( id, msg.Ptr0() );
+        msg.Complete( ret, ETrue );
+        }
+    }
+
+//---------------------------------------------------------------------------
+/**
+    Performs secondary initialisation of the logical channel
+
+    @param  aUnit  parameter to the user side handle
+    @param  anInfo  extra information for the device
+    @param  aVer  version requested by the thread
+
+    @return KErrNone, if succesfull
+*/
+TInt DTcChannel::DoCreate(TInt aUnit, const  TDesC8* /*anInfo*/,
+                                             const  TVersion& aVer)
+    {
+    // Get pointer to client threads DThread object
+    iClientThread = &Kern::CurrentThread();
+        
+    TInt ret = iClientThread->Open();
+    if(ret != KErrNone)
+        return ret;
+       
+    DTraceCore* tCore = DTraceCore::GetInstance();
+    if(!tCore)
+        return KErrNotReady;
+    iActivationQue = tCore->ActivationQ();
+      
+    // This device driver framework does not apply meaning to the idea of a unit.
+    if ( aUnit != KNullUnit || !iDevice->QueryVersionSupported( aVer ) )
+        {
+        ret = KErrNotSupported;
+        }
+    else
+        {
+        // security check
+        if ( !Kern::CurrentThreadHasCapability( ECapabilityCommDD, 
+                        __PLATSEC_DIAGNOSTIC_STRING("Checked by Tc driver") ) )
+            {
+            ret = KErrPermissionDenied;
+            }
+        if(ret==KErrNone)
+            {
+            iTraceConnection = new DTraceConnection(this);
+            if(!iTraceConnection)
+                {
+                ret=KErrNoMemory;
+                }
+            }
+        if(ret==KErrNone)
+            {
+            // Set the DFC queue to be used by this logical channel to
+            // low priority DFC queue (owned by the TraceCore)
+            SetDfcQ( iActivationQue  );
+            // Mark queue ready to accept messages
+            iMsgQ.Receive();
+            }
+        }
+    
+    return ret;
+    }
+
+
+//---------------------------------------------------------------------------
+/**
+    Handles a synchronous request
+
+    @param  aFunction  A number identifying specific functionality
+    @param  a1  If specified, a parameter from the user side
+    @param  a2  If specified, a parameter from the user side
+
+    @return KErrNone, if successful
+*/
+TInt DTcChannel::DoControl(TInt aFunction, TAny* a1 = NULL)
+    {
+    TInt ret( KErrNotSupported );
+
+    switch ( aFunction )
+        {
+        case RTraceOnActivation::ERegisterNotificationReceiver:
+            {
+            ret = RegisterNotificationReceiver( static_cast<TTraceOnActivationParams*>(a1) );
+            break;
+            }
+        case RTraceOnActivation::EUnregisterNotificationReceiver:
+            {
+            ret = UnregisterNotificationReceiver( static_cast<TTraceOnActivationParams*>(a1) );
+            break;
+            }
+        default:
+            break;
+        }
+
+    return ret;
+    }
+
+
+//---------------------------------------------------------------------------
+/**
+    Read parameters from user-side thread and call TraceConnection::RegisterNotificationReceiver
+    
+    @param  aParameters Parameters from user-side
+*/
+TInt DTcChannel::RegisterNotificationReceiver( TTraceOnActivationParams* aParameters )
+    {
+    TTraceOnActivationParams params;
+    TInt ret(KErrNone);
+     //get userside information
+	ret = Kern::ThreadRawRead(iClientThread, (const TAny *)aParameters,
+			(TAny*)&params, sizeof(TTraceOnActivationParams) );
+			
+	if(ret != KErrNone)
+	    {
+	    return ret;
+	    }
+			
+    if(iTraceConnection)
+        {
+        // Use correct part of iGroupId
+        params.iGroupId = FixGroupId( params.iGroupId );
+        // Check if iGroupId is valid
+        if (!GroupIdIsValid(params.iGroupId))
+            {
+            ret = KErrArgument;
+            }
+        else
+            {
+            iTraceConnection->RegisterNotificationReceiver( params.iComponentId, params.iGroupId );
+            }
+        }
+    else
+        {
+        ret = KErrGeneral;
+        }
+    
+    return ret;
+    }
+    
+//---------------------------------------------------------------------------
+/**
+    Read parameters from user-side thread and call TraceConnection::UnregisterNotificationReceiver
+    
+    @param  aParameters Parameters from user-side
+*/
+TInt DTcChannel::UnregisterNotificationReceiver( TTraceOnActivationParams* aParameters )
+    {
+    TTraceOnActivationParams params;
+    TInt ret(KErrNone);
+     //get userside information
+	ret = Kern::ThreadRawRead(iClientThread, (const TAny *)aParameters,
+			(TAny*)&params, sizeof(TTraceOnActivationParams) );
+			
+	if(ret != KErrNone)
+	    return ret;
+
+    if(iTraceConnection)
+        {
+        // Use correct part of iGroupId
+        params.iGroupId = FixGroupId( params.iGroupId );
+        // Check if iGroupId is valid
+        if (!GroupIdIsValid(params.iGroupId))
+            {
+            ret = KErrArgument;
+            }
+        else
+            {
+            iTraceConnection->UnregisterNotificationReceiver( params.iComponentId, params.iGroupId );
+            }
+        }
+    else
+        {
+        ret = KErrGeneral;
+        }
+    
+    return ret;
+    }
+
+
+/**
+    TraceActivated Notification
+    
+    Called from TraceConnection-TraceCore
+    
+    @param  aComponentId ComponentId of activated trace
+    @param  aGroupId GroupId of activated trace
+*/
+TInt DTcChannel::TraceActivated( TUint32 aComponentId, TUint16 aGroupId )
+    {    
+    // Set component ID used in trace point
+    TComponentId KOstTraceComponentID = aComponentId;
+
+    // Calculate trace word from Group ID
+    TUint32 traceWord = (aGroupId << GROUPIDSHIFT) | 1;
+
+    // Instrument a trace point, as a simulated priming trace
+    OstTrace0(aGroupId, traceWord, "Priming trace");
+
+    return KErrNone;
+    }
+
+
+/**
+    TraceDeactivated Notification
+    
+    Called from TraceConnection-TraceCore
+    
+    @param  aComponentId ComponentId of activated trace
+    @param  aGroupId GroupId of activated trace
+    @return 
+*/
+TInt DTcChannel::TraceDeactivated( TUint32 /*aComponentId*/, TUint16 /*aGroupId*/ )
+    {
+    return KErrNone;
+    }
+
+
+//---------------------------------------------------------------------------
+/**
+    DECLARE_STANDARD_LDD
+
+    @return DTcFactory object
+*/
+DECLARE_STANDARD_LDD()
+    {
+    return new DTcFactory;
+    }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/test/flush_page_cache/group/bld.inf	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,21 @@
+// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+//
+
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_TESTMMPFILES
+flush_page_cache
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/test/flush_page_cache/group/flush_page_cache.mmp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,34 @@
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+// e32test\group\flush_page_cache.mmp
+// 
+//
+
+#include "../../../../group/tracecore.hrh"
+
+target         	flush_page_cache.exe
+targettype     	exe
+vendorid	    VID_DEFAULT
+capability	    readdevicedata writedevicedata protserv
+
+OS_LAYER_SYSTEMINCLUDE
+
+userinclude		../../inc
+
+sourcepath		../src
+source        	flush_page_cache.cpp 
+
+library		euser.lib 
+library		dptest.lib
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/test/flush_page_cache/src/flush_page_cache.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,68 @@
+// Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+// e32test\ost\flush_page_cache.cpp
+// Overview:
+// Tests WDP TraceCore 
+// kernel - side APIs
+//
+
+#define __E32TEST_EXTENSION__
+#include <e32std.h>
+#include <dptest.h>
+#include "t_rtest_panic.h"
+
+RTest test(_L("FLUSH_PAGE_CACHE"));
+
+TInt ContinueFlushingPageCache()
+    {
+    RTimer timer;
+    TRequestStatus status;
+    TInt ret = timer.CreateLocal();
+    if (ret!=KErrNone)
+        {
+        test.Printf(_L("\nUnable to create RTimer object. Error: %d"), ret);
+        return ret;
+        }
+    //repeat flush for 7 minutes
+    timer.After(status, 420000000);
+    
+    while (status==KRequestPending)
+        {
+        //Flush the cache
+        DPTest::FlushCache();
+        //wait for 100 microseconds
+        User::After(100);
+        }
+    return KErrNone;
+    }
+
+
+
+GLDEF_C TInt E32Main()
+    {
+
+    test.Title();
+    test.Start(_L("Flushing Page Cache"));
+
+    test.Next(_L("Flush every 100us for 7 minutes"));
+    TInt err = ContinueFlushingPageCache();
+    
+    TEST_KErrNone(err);
+    
+    test.Printf(_L("\nFinished Flushing Page Cache!!!"));
+
+    test.End();
+    test.Close();
+    return (0);
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/test/group/bld.inf	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,22 @@
+// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+//
+
+#include "../tracedataparser/group/bld.inf"
+#include "../d_tracecore/group/bld.inf"
+#include "../d_traceonactivation/group/bld.inf"
+#include "../t_tracecore/group/bld.inf"
+#include "../t_tracecore_wdp/group/bld.inf"
+#include "../flush_page_cache/group/bld.inf"
+#include "../TEF/group/bld.inf"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/test/inc/t_rtest_panic.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,61 @@
+// Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+//
+
+#ifndef __T_RTEST_PANIC_H_INCLUDED__
+#define __T_RTEST_PANIC_H_INCLUDED__
+
+#define __E32TEST_EXTENSION__
+
+#include <e32test.h>
+
+#ifdef USE_RTEST_MACROS
+
+#define TEST_FAILED()       { User::Panic(_L("USER"),84); }
+#define TEST_EQUAL(e, a)    test_Equal(e, a)
+#define TEST_COMPARE(a,b,c) test_Compare(a,b,c)
+#define TEST_KErrNone(x)    test_KErrNone(x)
+#define TEST(x)             test(x)
+
+#else
+
+static TPtrC GetCurrentSourceFileName(const TText* aFilePath)
+    {
+    TPtrC filePath(aFilePath);
+    TInt pos = filePath.LocateReverse('\\');
+    if (pos < 0)
+        {
+        pos = filePath.LocateReverse('/');
+        }
+    TPtrC fileName;
+    if (pos < 0)
+        {
+        fileName.Set(filePath);
+        }
+    else
+        {
+        fileName.Set(filePath.Right(filePath.Length() - pos - 1));
+        }
+    return fileName;
+    }
+
+#define TEST_FAILED()       { User::Panic(GetCurrentSourceFileName(__S(__FILE__)),__LINE__); }
+#define TEST_EQUAL(e, a)    { TInt _e = TInt(e); TInt _a = TInt(a); if (_e != _a) TEST_FAILED(); }
+#define TEST_COMPARE(a,b,c) { TInt _a = TInt(a); TInt _c = TInt(c); if (!(_a b _c)) TEST_FAILED(); }
+#define TEST_KErrNone(x)    { TInt _r = (x); if (_r !=KErrNone) TEST_FAILED(); }
+#define TEST(x)             { if (!(x)) TEST_FAILED(); }
+
+#endif // USE_RTEST_MACROS
+
+#endif // __T_RTEST_PANIC_H_INCLUDED__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/test/t_tracecore/group/bld.inf	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,24 @@
+// Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+//
+
+#include "../../../../group/tracecore.hrh"
+
+PRJ_PLATFORMS
+DEFAULT
+ARMV5SMP
+
+PRJ_TESTMMPFILES
+t_tracecore.mmp
+t_tracecore_disabled.mmp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/test/t_tracecore/group/t_tracecore.mmh	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,38 @@
+// Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+// Generic MMH file for TraceCore tests
+//
+
+#include "../../../../group/tracecore.hrh"
+
+OS_LAYER_SYSTEMINCLUDE
+
+userinclude         ../inc
+userinclude         ../../d_tracecore/inc
+userinclude         ../../../inc
+userinclude         ../../inc
+
+sourcepath          ../src
+source              t_tracecore.cpp 
+
+LIBRARY             euser.lib
+LIBRARY             tracecore.lib		
+LIBRARY             tracedataparser.lib 
+        
+// Define so macro implementations will not be empty
+// although trace compiler isn't actually being run
+// for this test
+MACRO OST_TRACE_COMPILER_IN_USE
+
+SMPSAFE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/test/t_tracecore/group/t_tracecore.mmp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,24 @@
+// Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+// e32test\group\t_tracecore.mmp
+// 
+//
+
+#include "t_tracecore.mmh"
+
+target              t_tracecore.exe
+targettype          exe
+vendorid            VID_DEFAULT
+capability          readdevicedata writedevicedata protserv
+LIBRARY             testexecuteutils.lib
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/test/t_tracecore/group/t_tracecore.pkg	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,17 @@
+// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+//
+
+
+"\epoc32\data\z\testdata\scripts\RunTraceCoreBasicTests.script"-"c:\testdata\scripts\RunTraceCoreBasicTests.script"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/test/t_tracecore/group/t_tracecore_disabled.mmp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,25 @@
+// Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+// Negative tests for TraceCore with trace disabled, to be run on a
+// device where the RnD cert check will fail (e.g. production image)
+//
+
+#include "t_tracecore.mmh"
+
+target              t_tracecore_disabled.exe
+targettype          exe
+vendorid            VID_DEFAULT
+capability          readdevicedata writedevicedata protserv
+
+MACRO               TRACECORE_TRACE_DISABLED
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/test/t_tracecore/inc/t_tracecore.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,38 @@
+// Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+// e32test\ost\t_tracecore.h
+// Overview:
+// Tests activation/deactivation of traces using the TraceCore 
+// kernel - side APIs
+//
+
+#ifndef T_TRACECORE_H 
+#define T_TRACECORE_H
+
+#include <opensystemtrace.h>
+
+const TComponentId KTestComponentID1 = 0x89abcdef;
+const TComponentId KTestComponentID2 = KTestComponentID1 - 1;
+const TGroupId KTestGroupId1 = TRACE_NORMAL;
+const TGroupId KTestGroupId2 = TRACE_IMPORTANT;
+const TUint32 KTestData = 0x333;
+const TInt KNumTraces=64;
+
+#define KTestPrintfTraceString "Test Printf Trace"
+_LIT8(KTestPrintfTraceLiteral, KTestPrintfTraceString);
+
+#define TEST_TRACE 0x860001
+
+
+#endif //T_TRACECORE_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/test/t_tracecore/src/t_tracecore.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,729 @@
+// Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+// e32test\ost\t_tracecore.cpp
+// Overview:
+// Tests activation/deactivation of traces using the TraceCore 
+// kernel - side APIs
+//
+
+#define __E32TEST_EXTENSION__
+#include <e32svr.h>
+#include <e32def.h>
+#include <e32def_private.h>
+#include <e32btrace.h>
+#include <test/tracedataparser.h>
+#include "t_rtest_panic.h"
+
+
+// the following definition is mutually exclusive
+// with loading tracecore as extension 
+// eg epoc.ini extension tracecore.dll
+
+
+#include "TraceCoreConstants.h"
+#include "d_tracecore.h"
+#include "t_tracecore.h"
+#include "TestDataWriterNotifier.h"
+
+#define __TRACE_LINE__()    test.Printf(_L("%d\n"),__LINE__)
+
+RTest test(_L("T_TRACECORE"));
+
+RTraceCoreTest TraceTest;
+TComponentId KOstTraceComponentID;
+TUint32 KTraceMultipartTestData[60];
+TBuf8<KTcTdwBufSize> buf;
+
+
+
+/**
+ * Validate all filters are in sync for the component ids in this test
+ * @param aComponentId the component id to check group id (category) filters on 
+ */
+void ValidateGroupIdFiltersInSync(TUint32 aComponentId)
+    {
+    TInt r = KErrNone;
+    TcDriverParameters p;
+    
+    p.iComponentId = aComponentId;
+    for (TInt i = BTrace::EThreadIdentification; i < KMaxGroupId; i++)
+        {
+        p.iGroupId = i;
+        r = TraceTest.ValidateFilterSync(p);
+        TEST_KErrNone(r);
+        }
+    }
+
+void ValidateAllFiltersInSync()
+    {
+    ValidateGroupIdFiltersInSync(KTestComponentID1);
+    ValidateGroupIdFiltersInSync(KTestComponentID2);
+    }
+
+/*
+ * Activate a trace depending on aMatch
+ * 
+ * @param aMatch if aMatch is true then activate the correct GID  and CID
+ * @param aNum Number of group id's and component id pairs to activate
+ * 
+ */
+void ActivateTrace(TBool aMatch, TInt aNum = 1)
+    {
+    test.Printf(_L("In ActivateTrace()\n"));
+    TcDriverParameters p;
+    TInt r = 0;
+    p.iComponentId = (aMatch) ? KTestComponentID1 : KTestComponentID2;
+    p.iGroupId = (aMatch) ? KTestGroupId1 : KTestGroupId2;
+
+    r = TraceTest.ValidateFilterSync(p);
+    TEST_KErrNone(r);
+
+    //if we want to activate correct gids &cids, activate the correct number of them
+    //starting from KTestGroupId1 and KTestComponentID1 else just activate one incorrect 
+    //pair i.e KTestComponentID2 & KTestGroupId1
+    if (aMatch)
+        r = TraceTest.ActivateTrace(p, aNum);
+    else
+        r = TraceTest.ActivateTrace(p);
+    TEST_KErrNone(r);
+
+    r = TraceTest.ValidateFilterSync(p);
+    TEST_KErrNone(r);
+
+    }
+
+/*
+ * Deactivate a trace depending on aMatch
+ * 
+ * @param aMatch if aMatch is true then deactivate the correct GID  and CID
+ * @param aNum Number of group id's to deactivate
+ * 
+ */
+void DeactivateTrace(TBool aMatch, TInt aNum = 1)
+    {
+    test.Printf(_L("In DeactivateTrace()\n"));
+    TcDriverParameters p;
+    TInt r = 0;
+    p.iComponentId = (aMatch) ? KTestComponentID1 : KTestComponentID2;
+    p.iGroupId = (aMatch) ? KTestGroupId1 : KTestGroupId2;
+
+    r = TraceTest.ValidateFilterSync(p);
+    TEST_KErrNone(r);
+
+    //if we want to deactivate correct gids &cids, deactivate the correct number of them
+    //starting from KTestGroupId1 and KTestComponentID1 else just deactivate one incorrect 
+    //pair i.e KTestComponentID2 & KTestGroupId1  
+    if (aMatch)
+        r = TraceTest.DeactivateTrace(p, aNum);
+    else
+        r = TraceTest.DeactivateTrace(p);
+    TEST_KErrNone(r);
+
+    r = TraceTest.ValidateFilterSync(p);
+    TEST_KErrNone(r);
+    }
+
+/*
+ * Tell the test writer to start/stop dropping
+ * traces
+ * 
+ * @param aDrop ETrue to drop Traces, EFalse to stop
+ *              dropping them
+ */
+void DropNextTrace(TBool aDrop)
+    {
+    TInt r = KErrNone;
+    r = TraceTest.DropNextTrace(aDrop);
+    TEST_KErrNone(r);
+    }
+
+/*
+ * Activate/deactivate the printf handler
+ *
+ * TBool aActivate to activate(ETrue)/deactivate(EFalse)
+ *
+ * Activate/Deactivate    TRACECORE_KERN_PRINTF=BTrace::EKernPrintf=0
+ *                        TRACECORE_RDEBUG_PRINT=BTrace::ERDebugPrintf=1
+ *                        TRACECORE_PLATSEC_PRINTF=BTrace::EPlatsecPrintf=2
+ *
+ */
+void ActivatePrintfHandler(TBool aActivate, TInt aMaxCategory = BTrace::EPlatsecPrintf)
+    {
+    TcDriverParameters p;
+    TInt r=0;
+    TInt maxPrintfCategory = aMaxCategory;
+    p.iComponentId = 0x2001022D; //from BTraceHooks_0x2001022D_dictionary.xml
+    p.iGroupId = BTrace::ERDebugPrintf;
+
+    for(TInt i=0; i<=maxPrintfCategory; i++)
+        {
+        if(aActivate)
+            r = TraceTest.ActivateTrace(p);
+        else
+            r = TraceTest.DeactivateTrace(p);
+        if (r!=KErrNone)
+            {
+            test.Printf(_L("Unable to activate/deactivate printf handler for printf %d: error: %d"), i, r);
+            }
+        TEST_KErrNone(r);
+        p.iGroupId++;
+        }
+    r = TraceTest.ValidateFilterSync(p);
+    TEST_KErrNone(r);
+    }
+
+/*
+ * Activate/deactivate kernel GIDs
+ *
+ * TBool aActivate to activate(ETrue)/deactivate(EFalse)
+ * TBool aFirstGID start of range of GIDs to activate/deactivate
+ * TBool aLastGID end of range of GIDs to activate/deactivate
+ *
+ */
+void ActivateKernelTraces(TBool aActivate, TInt aFirstGID = -1, TInt aLastGID = -1)
+    {
+    TInt r=KErrNone;
+
+    if(aFirstGID == -1)
+        {
+        aFirstGID = KMinKernelCategory;
+        if(aLastGID == -1)
+            {
+            aLastGID = KMaxKernelCategory;
+            }
+        }
+    if(aLastGID < aFirstGID)
+        {
+        aLastGID = aFirstGID;
+        }
+        
+    TcDriverParameters p;
+    p.iComponentId = 0x2001022D; //from BTraceHooks_0x2001022D_dictionary.xml
+
+    for(TInt i=aFirstGID; i<=aLastGID; i++)
+        {
+        p.iGroupId = i;
+        if(aActivate)
+            r = TraceTest.ActivateTrace(p);
+        else
+            r = TraceTest.DeactivateTrace(p);
+        if (r<KErrNone)
+            {
+            test.Printf(_L("Unable to activate/deactivate kernel trace for GID %d: error: %d"), i, r);
+            }
+        TEST_KErrNone(r);
+        }
+    }
+
+/*
+ * Validate the trace data in memory buffer
+ * 
+ * @param aTracePresent determines if trace data should be present or not
+ * @param aBuffer the buffer containing the trace data
+ * @param aSize size of the trace buffer
+ * @param aGID expected GID
+ * @param aCID expected CID
+ * 
+ */
+TInt ValidatePayload(TBool aTracePresent, TUint8 aGID, TUint32 aCID, TBool aMissingTrace=EFalse, TBool aPrintfTrace=EFalse, TDesC8* aExpectedPrintfTrace=NULL)
+    {
+#ifdef TRACECORE_TRACE_DISABLED
+    if (!aPrintfTrace)
+        {
+        aTracePresent = EFalse;
+        }
+#endif
+    return TTraceDataParser::ValidatePayload(buf, aTracePresent, 
+            (TGroupId) aGID, (TComponentId)aCID, KTestData, aPrintfTrace, aMissingTrace, aExpectedPrintfTrace);
+    }
+
+/*
+ * Make a request to the test writer to start watching for data
+ * 
+ * @param aStatus holds the status of the request
+ * @param aNumTraces number of traces to write
+ * 
+ */
+void RequestDataNotification(TRequestStatus& aStatus, TInt aNumTraces=1)
+    {
+    buf.Zero();
+    TraceTest.RequestTraceData(aStatus, buf, aNumTraces);
+    }
+
+/*
+ * Read the trace data in memory buffer
+ * 
+ * @param aBuffer on return, buffer containing the trace data
+ * @param aSize on return, size of the trace buffer
+ * @return
+ * 
+ */
+TInt ReadTraceFromBuffer(TRequestStatus& aStatus, TUint8*& aBuffer,
+        TInt& aSize)
+    {
+    RTimer timer;
+    TRequestStatus status;
+    TInt ret = timer.CreateLocal();
+    // wait for WriteComplete to complete
+
+    timer.After(status, 10000);
+    User::WaitForRequest(status,aStatus);
+
+    if (aStatus.Int() != KErrNone)
+        //if the read request didn't complete, force it to look like it completed (this doesn't cancel the request tho)
+        aStatus = KErrNone;
+
+    aBuffer = (TUint8*) buf.Ptr();
+    aSize = buf.Size();
+
+    //test.Printf(_L("In ReadTraceFromBuffer()\n"));
+    timer.Close();
+    return KErrNone;
+    }
+
+/*
+ * Send Simple (<80 bytes) Test Traces. 
+ * Each trace has the same payload containing numbers
+ * starting from KTestData and incrementing until the required size is filled up.
+ * Each trace has a different group id and component id pair incrementing up from
+ * KTestGroupId1 and KTestComponentID1.
+ * 
+ * @param aTracePresent indicates id a trace packet should be present or not
+ * @param aSize size of trace to send in words (groups of 4 bytes),defaults to 1.
+ * @param aNum Number of traces to send, defaults to 1.
+ */
+TInt SendAndValidateTestTraces(TBool aTracePresent, TInt aSize = 1,
+        TInt aNum = 1, TBool aPrintfTrace = EFalse, TInt aNumberDropped = 0)
+    {
+    if (aSize > 18)
+        {
+        test.Printf(
+                _L("Incorrect argument... Please use a trace size that is <=18 words (72bytes)"));
+        return KErrArgument;
+        }
+    
+    if (aNumberDropped>=aNum)
+        {
+        test.Printf(
+                _L("Incorrect argument... Please use aNumberDropped less than number you wish to send)"));
+        return KErrArgument;
+        }
+    
+    test.Printf(_L("In SendTestTraces()\n"));
+    TUint32 traceword = TEST_TRACE;
+    KOstTraceComponentID = KTestComponentID1;
+    TRequestStatus status;
+    TUint8* buffer = NULL;
+
+    //Drop next Trace
+    DropNextTrace(ETrue);
+    TBool dropped = ETrue;
+    TBool missing = EFalse;
+    
+    for (TInt i = 0; i < aNum; i++)
+        {
+        if (i>=aNumberDropped)
+            {
+            DropNextTrace(EFalse); //stop dropping traces
+            dropped = EFalse;
+            }
+        
+        if ((i==aNumberDropped)&&(i!=0))
+            missing = ETrue;
+        else
+            missing = EFalse;
+        
+        TInt size = 0;
+        
+        //make request to read trace data from memory
+        TInt bufferedTraces=1;
+        if (aPrintfTrace&&missing&&!dropped)              // if it's a printf trace and we're dropped traces
+            bufferedTraces++;                             // and the one we're currently sending isn't to be dropped
+        RequestDataNotification(status, bufferedTraces);
+        
+        if (!aPrintfTrace)
+            OstTraceData(TRACE_NORMAL+i, traceword, "You will only see this text in Trace Viewer: %d", KTraceMultipartTestData,(aSize*4));
+        else
+            {
+            ActivatePrintfHandler(ETrue,BTrace::ERDebugPrintf);
+            RDebug::Printf(KTestPrintfTraceString);
+            ActivatePrintfHandler(EFalse,BTrace::ERDebugPrintf);
+            }
+            
+        //read traces from memory
+        TEST_KErrNone(ReadTraceFromBuffer(status, buffer, size));
+
+        //Validate Traces
+        //test.Next(_L("Validate payload"));
+        TPtrC8 expectedPrintfData(KTestPrintfTraceLiteral);
+        TInt r = ValidatePayload((aTracePresent&&!dropped), TRACE_NORMAL+i, KOstTraceComponentID, missing, aPrintfTrace, &expectedPrintfData);
+        TEST_KErrNone(r);
+        traceword += (1 << GROUPIDSHIFT); //incrememnt the group id part of the trace word...
+        KOstTraceComponentID++;
+        }
+
+    return KErrNone;
+    }
+
+/*
+ * Send a big (>80bytes)Test Trace
+ * 
+ * @param aTracePresent indicates id a trace packet should be present or not
+ */
+void SendAndValidateBigTestTrace(TBool aTracePresent)
+    {
+    test.Printf(_L("In SendBigTestTrace()\n"));
+    KOstTraceComponentID = KTestComponentID1;
+    TRequestStatus status;
+
+    TUint8* buffer = NULL;
+    TInt size = 0;
+
+    //make request to read trace data from memory
+    RequestDataNotification(status);
+
+    OstTraceData(TRACE_NORMAL, TEST_TRACE, "You will only see this text in Trace Viewer", KTraceMultipartTestData,240);
+    TEST_KErrNone(ReadTraceFromBuffer(status, buffer, size));
+
+    //Validate Traces
+    test.Next(_L("Validate payload for test big trace"));
+    TEST_KErrNone(ValidatePayload(aTracePresent,TRACE_NORMAL,KOstTraceComponentID));
+    }
+
+/*
+ * Test Trace Activation in Trace core
+ * 
+ * @pre Trace Core settings must be cleared before trying to activate correct attributes
+ */
+void TestBasicActivation()
+    {
+    test.Printf(_L("In TestBasicActivation()\n"));
+
+    //Send Activation
+    test.Next(_L("Send Activation message to TraceCore"));
+    ActivateTrace(ETrue);
+
+    //Send and Validate Traces
+    TEST_KErrNone(SendAndValidateTestTraces(ETrue));
+
+    //Deactivate when done sending trace
+    DeactivateTrace(ETrue);
+    }
+
+/*
+ * Test Trace Deactivation in Trace core
+ * 
+ */
+void TestBasicDeactivation()
+    {
+    test.Printf(_L("In TestBasicDeactivation()\n"));
+
+    //Have correct trace attributes activated, then try to deactivate them
+    ActivateTrace(ETrue);
+
+    //Send Deactivation
+    test.Next(_L("Send Deactivation message to TraceCore"));
+    DeactivateTrace(ETrue);
+
+    //Send and Validate Traces
+    TEST_KErrNone(SendAndValidateTestTraces(EFalse));
+    }
+
+/*
+ * Negative Test Trace Activation in Trace core
+ * 
+ * @pre Trace Core settings must be cleared before trying to activate wrong attributes
+ */
+void NegativeTestActivation()
+    {
+    test.Printf(_L("In NegativeTestActivation()\n"));
+
+    //Send Activation
+    test.Next(_L("Send Negative Activation message to TraceCore"));
+    ActivateTrace(EFalse);
+
+    //Send and Validate Traces
+    TEST_KErrNone(SendAndValidateTestTraces(EFalse));
+
+    //Deactivate when done sending trace
+    DeactivateTrace(EFalse);
+    }
+
+/*
+ * Test Trace Deactivation in Trace core
+ * 
+ */
+void NegativeTestDeactivation()
+    {
+    test.Printf(_L("In NegativeTestDeactivation()\n"));
+
+    //Have correct trace attributes activated, then try to deactivate the wrong ones
+    ActivateTrace(ETrue);
+
+    //Send Deactivation
+    test.Next(_L("Send Negative Deactivation message to TraceCore"));
+    DeactivateTrace(EFalse);
+
+    //Send and Validate Traces
+    TEST_KErrNone(SendAndValidateTestTraces(ETrue));
+
+    //Deactivate when done sending trace
+    DeactivateTrace(ETrue);
+    }
+
+/*
+ * Test Trace Activation in Trace core when multiple (16 here) GID and CID pairs are activated
+ * 
+ * @pre Trace Core settings must be cleared before trying to activate correct attributes
+ */
+void TestMultipleActivation()
+    {
+    test.Printf(_L("In TestMultipleActivation()\n"));
+
+    //Send Activation
+    test.Next(_L("Send Activation message to TraceCore"));
+    ActivateTrace(ETrue, 16);
+
+    //Send and Validate Traces
+    TEST_KErrNone(SendAndValidateTestTraces(ETrue,1,16));
+
+    //Deactivate when done sending trace
+    DeactivateTrace(ETrue, 16);
+    }
+
+/*
+ * Test Trace Deactivation in Trace core when multiple (64 here) GID and CID pairs are activated
+ * 
+ * @pre Trace Core settings must be cleared before trying to activate correct attributes
+ */
+void TestMultipleDeactivation()
+    {
+    test.Printf(_L("In TestMultipleDeactivation()\n"));
+
+    //Have correct trace attributes activated, then try to deactivate them
+    ActivateTrace(ETrue, 16);
+
+    //Send Deactivation
+    test.Next(_L("Send Deactivation message to TraceCore"));
+    DeactivateTrace(ETrue, 16);
+
+    //Send Traces
+    TEST_KErrNone(SendAndValidateTestTraces(EFalse,1,16));
+    }
+
+/*
+ * Test Trace Activation when big traces are sent
+ * 
+ */
+void TestBigTrace()
+    {
+    test.Printf(_L("In TestBigTrace()\n"));
+
+    //Send Activation
+    test.Next(_L("Send Activation message to TraceCore"));
+    ActivateTrace(ETrue);
+
+    //Send and Validate Big Trace
+    SendAndValidateBigTestTrace(ETrue);
+
+    //Deactivate when done sending trace
+    DeactivateTrace(ETrue);
+
+    }
+
+/*
+ * Test that TraceCore Handlers ouput missing data notification when traces are dropped
+ */
+void TestDroppedTraces()
+    {
+    test.Printf(_L("In TestDroppedTraces()\n"));
+
+    //Send Activation
+    test.Next(_L("Send Activation message to TraceCore"));
+    ActivateTrace(ETrue, 5);
+    
+    //Send and Validate 5 Traces when no traces are dropped
+    TEST_KErrNone(SendAndValidateTestTraces(ETrue,1,5,EFalse,0));
+
+    //Send and Validate 5 Traces where 1st 2 traces are dropped (check for missing flag on 3rd)
+    TEST_KErrNone(SendAndValidateTestTraces(ETrue,1,5,EFalse,2));
+
+    //Send and Validate 1 Printf Trace where no traces are dropped
+    TEST_KErrNone(SendAndValidateTestTraces(ETrue,1,5,ETrue,0));
+    
+    //Send and Validate 2 Printf Trace where 1st trace is dropped
+    TEST_KErrNone(SendAndValidateTestTraces(ETrue,1,2,ETrue,1));//(check for "dropped trace" on 2nd)
+    
+    //Send and Validate 7 Printf Trace where 1st 5 traces are dropped
+    TEST_KErrNone(SendAndValidateTestTraces(ETrue,1,7,ETrue,5));//(check for "dropped trace" on 6th)
+    
+    //Deactivate when done sending traces
+    DeactivateTrace(ETrue, 5);
+    }
+
+/*
+ * Test that when activation notification is received, the group is actually activated from TraceCore
+ */
+void TestActivationNotification()
+    {
+    test.Printf(_L("In TestActivationNotification()\n"));
+    
+    // Create activation parameters
+    TcDriverParameters p; p.iComponentId = 5; p.iGroupId = 7;
+    TcDriverParameters p2; p2.iComponentId = 6; p2.iGroupId = 8;
+    
+    // Register activation notification listener
+    TraceTest.RegisterActivationNotification(p, ETrue);
+    
+    // Activate and test that we receive notification and it's in sync with TraceCore
+    for (TInt i=0;i<5;i++)
+        {
+        TraceTest.ActivateTrace(p);
+        TEST_KErrNone(TraceTest.CheckActivationNotificationOk(ETrue));
+        TraceTest.DeactivateTrace(p);
+        TEST_KErrNone(TraceTest.CheckActivationNotificationOk(ETrue));
+        }
+    
+    // Activate with different ID's, we shouldn't get notification
+    TraceTest.ActivateTrace(p2);
+    TEST_KErrNone(TraceTest.CheckActivationNotificationOk(EFalse));
+    
+    // Unregister activation notification listener
+    TraceTest.RegisterActivationNotification(p, EFalse);
+    }
+
+/*
+ * Test RefreshActivations() method for kernel GIDs
+ * 
+ * The purpose of this test is to make sure TraceCore can refresh all activations with no error when
+ * different numbers of kernel GIDs have been activated
+ */
+void TestRefreshActivations()
+    {
+    test.Printf(_L("In TestRefreshActivations()\n"));
+
+    test.Next(_L("Test RefreshActivations() when all kernel GIDs are deactivated\n"));
+
+    //Deactivate all kernel GIDs
+    ActivateKernelTraces(EFalse);
+    
+    //deactivate and reactivate all active GIDs
+    TEST_KErrNone(TraceTest.RefreshActivations());    
+    
+    test.Next(_L("Test RefreshActivations() when all some kernel GIDs are activated\n"));
+
+    //Activate some kernel GIDs
+    ActivateKernelTraces(ETrue,BTrace::EThreadIdentification);
+    ActivateKernelTraces(ETrue,BTrace::EPaging);
+    ActivateKernelTraces(ETrue,BTrace::EClientServer);
+    
+    //deactivate and reactivate all active GIDs
+    TEST_KErrNone(TraceTest.RefreshActivations());    
+
+    //Deactivate the kernel GIDs previously activated
+    ActivateKernelTraces(EFalse,BTrace::EThreadIdentification);
+    ActivateKernelTraces(EFalse,BTrace::EPaging);
+    ActivateKernelTraces(EFalse,BTrace::EClientServer);
+
+    test.Next(_L("Test RefreshActivations() when all kernel GIDs are activated\n"));
+
+    //Activate all kernel GIDs
+    ActivateKernelTraces(ETrue);
+
+    //deactivate and reactivate all active GIDs
+    TEST_KErrNone(TraceTest.RefreshActivations());    
+
+    //Deactivate all kernel GIDs
+    ActivateKernelTraces(EFalse);
+    }
+
+/*
+ * Utility function for generating a trace packet 
+ * until the test memory writer is available
+ * 
+ */
+void GenerateTraceData()
+    {
+
+    //actual data that will be sent in trace tests    
+    for (TInt i = 0; i < 60; i++)
+        KTraceMultipartTestData[i] = KTestData + i;
+    }
+
+GLDEF_C TInt E32Main()
+    {
+
+    test.Title();
+
+    test.Start(_L("Trace Core tests"));
+
+    GenerateTraceData();
+
+    // free the tcore related LDD's this is because 
+    // if one of the other tests say t_tracecoreostldd
+    // panics the LDDs will not be released
+    User::FreeLogicalDevice(_L("TraceCoreOstLdd"));
+    User::FreeLogicalDevice(_L("TcLdd"));
+
+    TInt r = KErrNone;
+
+    
+    test.Next(_L("Open test LDD"));
+    r = User::LoadLogicalDevice(RTraceCoreTest::Name());
+    TEST(r==KErrNone || r==KErrAlreadyExists);
+    r = TraceTest.Open();
+    TEST_KErrNone(r);
+
+    ValidateAllFiltersInSync();
+    
+    ActivatePrintfHandler(EFalse);
+    
+    test.Next(_L("Test Basic TraceCore Activation"));
+    TestBasicActivation();
+    test.Next(_L("Test Basic TraceCore Deactivation"));
+    TestBasicDeactivation();
+    test.Next(_L("Negative Test TraceCore Activation"));
+    NegativeTestActivation();
+    test.Next(_L("Negative Test TraceCore Deactivation"));
+    NegativeTestDeactivation();
+    test.Next(_L("Test Multiple TraceCore Activation"));
+    TestMultipleActivation();
+    test.Next(_L("Test Multiple TraceCore Deactivation"));
+    TestMultipleDeactivation();
+    test.Next(_L("Test Big Trace"));
+    TestBigTrace();
+    test.Next(_L("Test Dropped Traces"));
+    TestDroppedTraces();
+    test.Next(_L("Test Activation Notification"));
+    TestActivationNotification();
+    test.Next(_L("Test Refresh Activations"));
+    TestRefreshActivations();
+
+    
+    ActivatePrintfHandler(ETrue);
+    
+    ValidateAllFiltersInSync();
+    
+    test.Next(_L("Close LDD"));
+    TraceTest.Close();
+    User::FreeLogicalDevice(RTraceCoreTest::Name());
+
+
+    
+    test.Printf(_L("\nFinished Simple Activation/Deactivation tests in trace Core!!!"));
+    //test.Getch();
+    test.End();
+    test.Close();
+    return (0);
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/test/t_tracecore_wdp/group/bld.inf	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,21 @@
+// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+//
+
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_TESTMMPFILES
+t_tracecore_wdp
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/test/t_tracecore_wdp/group/t_tracecore_wdp.mmp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,35 @@
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+// e32test\group\t_tracecore_wdp.mmp
+// 
+//
+
+#include "../../../../group/tracecore.hrh"
+
+target         	t_tracecore_wdp.exe
+targettype     	exe
+vendorid	    VID_DEFAULT
+capability	    readdevicedata writedevicedata protserv
+
+OS_LAYER_SYSTEMINCLUDE
+
+userinclude		../inc
+userinclude		../../inc
+
+sourcepath		../src
+source        	t_tracecore_wdp.cpp 
+
+library		euser.lib 
+library		dptest.lib
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/test/t_tracecore_wdp/inc/t_tracecore_wdp.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,33 @@
+// Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+// e32test\ost\t_tracecore_wdp.h
+// Overview:
+// Tests WDP TraceCore 
+// kernel - side APIs
+//
+
+#ifndef T_TRACECORE_WDP_H 
+#define T_TRACECORE_WDP_H 
+
+_LIT(KNullCmd,"");
+_LIT(KTTraceCore,"t_tracecore");
+_LIT(KTTraceCoreOstLdd,"t_tracecoreostldd");
+_LIT(KTraceCoreTestApp,"TraceCoreTestApp");
+_LIT(KTOstBuffer,"t_ostbuffer");
+_LIT(KTOstBufferStress,"t_ostbuffer_stress");
+_LIT(KTRTraceBuffer,"t_rtracebuffer");
+_LIT(KTMultipart,"t_multipart");
+_LIT(KExitCategoryUser,"USER");
+
+#endif //T_TRACECORE_WDP_H 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/test/t_tracecore_wdp/src/t_tracecore_wdp.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,185 @@
+// Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+// t_tracecore_wdp.cpp
+// Overview:
+// Tests WDP TraceCore 
+// kernel - side APIs
+//
+
+#define __E32TEST_EXTENSION__
+#include <e32std.h>
+#include <dptest.h>
+#include "t_tracecore_wdp.h"
+#include "t_rtest_panic.h"
+
+
+RTest test(_L("T_TRACECORE_WDP"));
+
+TInt CreateProcess (const TDesC &aProcessName, const TDesC &aCommand, RProcess &aProcess)
+    {
+    TInt err = aProcess.Create(aProcessName,aCommand);
+    
+    if (err != KErrNone)
+        test.Printf(_L("Unable to create process handle. Error: %d"),err);
+    
+    return err;
+    }
+
+void StartProcess (RProcess &aProcess, TRequestStatus &aStatus)
+    {
+    aProcess.Logon(aStatus);
+    aProcess.Resume();
+    }
+
+TInt CreateAndStartProcess (const TDesC &aProcessName, const TDesC &aCommand, RProcess &aProcess, TRequestStatus &aStatus)
+    {
+    TInt err = CreateProcess(aProcessName,aCommand,aProcess);
+    if (err != KErrNone)
+        return err;
+    
+    StartProcess(aProcess,aStatus);
+    return KErrNone;
+    }
+
+TInt ContinueFlushingPageCache(TRequestStatus &aTestStatus)
+    {
+    while (aTestStatus==KRequestPending)
+        {
+        //Flush the cache
+        DPTest::FlushCache();
+        //wait for 100 microseconds
+        User::After(100);
+        }
+    return KErrNone;
+    }
+
+TInt CheckExecutableReturn(const TDesC &aProcessName, RProcess &aTestProcess)
+    {
+    TInt exitreason = aTestProcess.ExitReason();
+    TPtrC exitcategory(KExitCategoryUser);
+    
+    //if the test didn't complete with error, just return KErrNone
+    if (exitreason == KErrNone) 
+        return exitreason;
+    
+    //most of this next bit will not be needed tests pass
+    
+    //if it completed with error ensure it wasn't t_tracecore.exe because
+    //that test should pass. If it was t_tracecore.exe return the exit reason
+    //and fail the test.
+        if (((aProcessName.Compare(KTTraceCore))==0)||((aProcessName.Compare(KTRTraceBuffer))==0)||((aProcessName.Compare(KTOstBuffer))==0)
+		||((aProcessName.Compare(KTOstBufferStress))==0)||((aProcessName.Compare(KTMultipart))==0)||((aProcessName.Compare(KTTraceCoreOstLdd))==0))
+        {
+        test.Printf(_L("Test completed with error where it shouldn't: Category: %S, Code: %d"),&exitcategory,exitreason);
+        return exitreason;
+        }
+    
+    //if it was any of the other executables i.e t_tracecoreostldd.exe 
+    //or TraceCoreTestApp.exe that completed with error check it's USER 84
+    //because that is what is expected at the moment. If that wasn't the panic
+    //return the exit reason and fail the test. Else return KErrNone.
+    if ((exitreason==84)&&((exitcategory.Compare(KExitCategoryUser))==0))
+        return KErrNone;
+    else
+        {
+        test.Printf(_L("Test completed with unknown error: Category: %S, Code: %d"),&exitcategory,exitreason);
+        }
+    return exitreason;
+    }
+
+TInt RunTestExecutable(const TDesC &aProcessName)
+    {
+    TInt err = KErrNone;
+    RProcess testprocess;
+    TRequestStatus teststatus;
+    
+    //Create and start the test process
+    err = CreateAndStartProcess(aProcessName,KNullCmd,testprocess,teststatus);
+    if (err!=KErrNone)
+        {
+        testprocess.Close();
+        return err;
+        }
+    
+    //Flush Cache every 100us until test finishes running
+    err = ContinueFlushingPageCache(teststatus);
+    if (err!=KErrNone)
+        {
+        testprocess.Close();
+        return err;
+        }
+    
+    //Check return from test executable
+    err = CheckExecutableReturn(aProcessName,testprocess);
+    if (err!=KErrNone)
+        {
+        TExitCategoryName exitCategory = testprocess.ExitCategory();
+        testprocess.Close();
+        if ((err==84)&&((exitCategory.Compare(KExitCategoryUser))==0))
+            {
+            // If process exited with RTest panic, then use process name as panic category
+            User::Panic(aProcessName, err);
+            }
+        else
+            {
+            // If process exited with any other panic, use that as the panic category
+            User::Panic(exitCategory, err);
+            }
+        }
+    
+    return err;
+    }
+
+GLDEF_C TInt E32Main()
+    {
+
+    test.Title();
+    test.Start(_L("Trace Core WDP tests"));
+    TInt err = KErrNone;
+    
+    test.Next(_L("Run t_tracecore.exe while repeatedly flushing the page cache"));
+    err = RunTestExecutable(KTTraceCore);
+    TEST_KErrNone(err);
+    
+    test.Next(_L("Run t_ostbuffer_stress.exe while repeatedly flushing the page cache"));
+    err = RunTestExecutable(KTOstBufferStress);
+    TEST_KErrNone(err);
+    
+    test.Next(_L("Run t_multipart.exe while repeatedly flushing the page cache"));
+    err = RunTestExecutable(KTMultipart);
+    TEST_KErrNone(err);
+    
+    test.Next(_L("Run t_rtracebuffer.exe while repeatedly flushing the page cache"));
+    err = RunTestExecutable(KTRTraceBuffer);
+    TEST_KErrNone(err);
+    
+    test.Next(_L("Run t_ostbuffer.exe while repeatedly flushing the page cache"));
+    err = RunTestExecutable(KTOstBuffer);
+    TEST_KErrNone(err);
+    
+//    test.Next(_L("Run t_tracecoreostldd.exe while repeatedly flushing the page cache"));
+//    err = RunTestExecutable(KTTraceCoreOstLdd);
+//    TEST_KErrNone(err);
+//    
+//    test.Next(_L("Run TraceCoreTestApp.exe while repeatedly flushing the page cache"));
+//    err = RunTestExecutable(KTraceCoreTestApp);
+//    TEST_KErrNone(err);
+
+    
+    test.Printf(_L("\nFinished Trace Core WDP tests!!!"));
+
+    test.End();
+    test.Close();
+    return (0);
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/test/tracedataparser/bwins/tracedataparseru.def	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,14 @@
+EXPORTS
+	?ValidatePayload@TTraceDataParser@@SAHAAVTDesC8@@HEKKHHPAV2@@Z @ 1 NONAME ; int TTraceDataParser::ValidatePayload(class TDesC8 &, int, unsigned char, unsigned long, unsigned long, int, int, class TDesC8 *)
+	?ValidatePayload@TTraceDataParser@@SAHAAVTDesC8@@HKEKKHHHHH@Z @ 2 NONAME ; int TTraceDataParser::ValidatePayload(class TDesC8 &, int, unsigned long, unsigned char, unsigned long, unsigned long, int, int, int, int, int)
+	?ReadUint32FromBuf@TTraceDataParser@@SAKAAPAEH@Z @ 3 NONAME ; unsigned long TTraceDataParser::ReadUint32FromBuf(unsigned char * &, int)
+	?Swap@TTraceDataParser@@SAKK@Z @ 4 NONAME ; unsigned long TTraceDataParser::Swap(unsigned long)
+	?DataHasPrintfStringL@TTraceDataParser@@SAHABVTDesC16@@AAVRFs@@ABVTDesC8@@AAH@Z @ 5 NONAME ; int TTraceDataParser::DataHasPrintfStringL(class TDesC16 const &, class RFs &, class TDesC8 const &, int &)
+	?DataHasPrintfString@TTraceDataParser@@SAHAAVTDesC8@@ABV2@AAH@Z @ 6 NONAME ; int TTraceDataParser::DataHasPrintfString(class TDesC8 &, class TDesC8 const &, int &)
+	?ParsePrimingDataL@TTraceDataParser@@SAHABVTDesC16@@AAVRFs@@EAAH2HKK@Z @ 7 NONAME ; int TTraceDataParser::ParsePrimingDataL(class TDesC16 const &, class RFs &, unsigned char, int &, int &, int, unsigned long, unsigned long)
+	?DataHasTraceSequenceL@TTraceDataParser@@SAHABVTDesC16@@AAVRFs@@AAH2PAVTDesC8@@EK@Z @ 8 NONAME ; int TTraceDataParser::DataHasTraceSequenceL(class TDesC16 const &, class RFs &, int &, int &, class TDesC8 *, unsigned char, unsigned long)
+	?GetPrintfFromTrace@TTraceDataParser@@SAHAAVTDesC8@@AAVTDes8@@@Z @ 9 NONAME ; int TTraceDataParser::GetPrintfFromTrace(class TDesC8 &, class TDes8 &)
+	?ParsePrimingDataL@TTraceDataParser@@SAHAAVTDesC8@@EAAH1HKK@Z @ 10 NONAME ; int TTraceDataParser::ParsePrimingDataL(class TDesC8 &, unsigned char, int &, int &, int, unsigned long, unsigned long)
+	?ReadUint16FromBuf@TTraceDataParser@@SAGAAPAE@Z @ 11 NONAME ; unsigned short TTraceDataParser::ReadUint16FromBuf(unsigned char * &)
+	?ValidateMultipartTraces@TTraceDataParser@@SAHAAVTDesC8@@EKAAH1@Z @ 12 NONAME ; int TTraceDataParser::ValidateMultipartTraces(class TDesC8 &, unsigned char, unsigned long, int &, int &)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/test/tracedataparser/eabi/tracedataparseru.def	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,14 @@
+EXPORTS
+	_ZN16TTraceDataParser15ValidatePayloadER6TDesC8ihmmiiPS0_ @ 1 NONAME
+	_ZN16TTraceDataParser15ValidatePayloadER6TDesC8imhmmiiiii @ 2 NONAME
+	_ZN16TTraceDataParser17ParsePrimingDataLER6TDesC8hRiS2_imm @ 3 NONAME
+	_ZN16TTraceDataParser17ParsePrimingDataLERK7TDesC16R3RFshRiS5_imm @ 4 NONAME
+	_ZN16TTraceDataParser17ReadUint16FromBufERPh @ 5 NONAME
+	_ZN16TTraceDataParser17ReadUint32FromBufERPhi @ 6 NONAME
+	_ZN16TTraceDataParser18GetPrintfFromTraceER6TDesC8R5TDes8 @ 7 NONAME
+	_ZN16TTraceDataParser19DataHasPrintfStringER6TDesC8RKS0_Ri @ 8 NONAME
+	_ZN16TTraceDataParser20DataHasPrintfStringLERK7TDesC16R3RFsRK6TDesC8Ri @ 9 NONAME
+	_ZN16TTraceDataParser21DataHasTraceSequenceLERK7TDesC16R3RFsRiS5_P6TDesC8hm @ 10 NONAME
+	_ZN16TTraceDataParser4SwapEm @ 11 NONAME
+	_ZN16TTraceDataParser23ValidateMultipartTracesER6TDesC8hmRiS2_ @ 12 NONAME
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/test/tracedataparser/group/bld.inf	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,28 @@
+// 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 "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:
+//
+// Description:
+// Trace data parser
+//
+
+#include "../../../../group/tracecore.hrh"
+
+PRJ_PLATFORMS
+DEFAULT
+ARMV5SMP
+
+PRJ_TESTEXPORTS
+../inc/tracedataparser.h			OS_LAYER_PLATFORM_EXPORT_PATH(test/tracedataparser.h)
+tracedataparser.iby					CORE_IBY_EXPORT_PATH(tools,tracedataparser.iby)
+
+PRJ_TESTMMPFILES
+tracedataparser.mmp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/test/tracedataparser/group/tracedataparser.iby	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,21 @@
+// Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+//
+
+#ifndef __TRACE_DATA_PARSER_IBY__
+#define __TRACE_DATA_PARSER_IBY__
+
+file=ABI_DIR\BUILD_DIR\tracedataparser.dll                                            \sys\bin\tracedataparser.dll
+
+#endif // __TRACE_DATA_PARSER_IBY__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/test/tracedataparser/group/tracedataparser.mmp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,35 @@
+// Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+// Trace Data parser
+//
+
+
+TARGET                   tracedataparser.dll
+TARGETTYPE               dll
+
+UID                      0x1000008C 0x2002E860
+
+CAPABILITY ALL -TCB
+
+SOURCEPATH               ../src
+SOURCE                   tracedataparser.cpp
+
+LIBRARY                  euser.lib 
+LIBRARY                  efsrv.lib
+
+USERINCLUDE              ../inc
+USERINCLUDE              ../../d_tracecore/inc
+USERINCLUDE              ../../../inc
+
+OS_LAYER_SYSTEMINCLUDE_SYMBIAN
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/test/tracedataparser/inc/tracedataparser.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,342 @@
+// Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+// Trace Data parser
+//
+
+#ifndef __TRACEDATAPARSER_H__
+#define __TRACEDATAPARSER_H__
+
+#include <e32base.h>
+#include <opensystemtrace.h>
+#include <bautils.h> 
+
+// Constants
+const TUint32 KHeaderVersion            = 0x01;
+const TUint32 KProtocolIdAscii          = 0x02;
+const TUint32 KProtocolIdSimpleTrace    = 0x03;
+const TUint32 KXtiHeaderVersion         = 0x1D;
+const TUint32 KXtiProtocolIdSimpleTrace = 0x08;
+const TInt KXtiTraceTypeIndex           = 20;
+const TInt KXtiLengthIndex              = 5;
+const TInt KMinimumPrimingTracesInBatch = 2;
+const TInt KMinMilliSecondsBatchGap     = 10;
+const TInt KExpectedPrintfMaxLength     = 32;
+const TInt KFileBufferSize              = 1024*10;
+const TInt KMaxNumberBufferLength       = 8;
+const TInt KMinSizeOstHeader            = 3;
+const TInt KMinSizeOstBinaryHeader      = 8;
+const TInt KMinSizeOstAsciiHeader       = 8;
+const TInt KMinSizeBinaryHeader         = 12;
+const TInt KMinSizeXtiHeader            = 20;
+
+// Literals
+_LIT8(KDroppedTrace,            "* Dropped Trace");
+_LIT8(KFastMutexNameSystemLock, "System Lock");
+_LIT8(KFastMutexNameMsgLock,    "MsgLock");
+_LIT8(KFastMutexNameObjLock,    "ObjLock");
+_LIT8(KFastMutexNameLogonLock,  "LogonLock");
+_LIT8(KCodeSegsName1,           "EKern.exe");
+_LIT8(KCodeSegsName2,           "EFile.exe");
+
+
+// Class containing trace header settings
+class TTraceHeaderSettings
+{
+public:
+    TUint8          iCategory;
+    TUint8          iSubCategory;
+    TComponentId    iComponentID;
+    TUint32         iTraceWord;
+    TUint32         iTimestamp;
+    TInt            iLengthOfPayload;
+    TUint8          iHeaderFlags;
+    TInt            iMultiPartType;
+    TBool           iPrintfTrace;
+    TBool           iFromTestWriter;
+    TUint32         iMultiPartTraceID;
+};
+
+/*
+ * Trace Data Parser class of static parsing functions
+ * 
+ * The following trace types are supported:
+ *     OST traces (ascii and binary)
+ *     XTIv3 traces (ascii and binary)
+ *     Traces from the Test Writer (ascii and binary)
+ */
+class TTraceDataParser
+{
+public:
+
+    IMPORT_C static TUint32 Swap(TUint32 x);
+    IMPORT_C static TUint32 ReadUint32FromBuf(TUint8*& aBuf, TBool aFromTestWriter = EFalse);
+    IMPORT_C static TUint16 ReadUint16FromBuf(TUint8*& aBuf);
+
+    
+/*
+ * Validate the trace data in buffer
+ *
+ * @param aBuffer the buffer containing the trace data
+ * @param aExpectedNum expected number of traces
+ * @param aComponentID component ID of traces
+ * @param aGroupID group ID of traces
+ * @param aData expected trace data
+ * @param aTraceWord trace word of traces
+ * @param aIdentical indicates that the payload of each trace packet should be identical
+ * @param aBufferMode The mode of the trace buffer.. 0=straight, 1=circular.
+ * @param aOrdinalData indicates whether the payload data reflects its position in the stream of trace packets
+ * @param aNumTraces number of traces written to circular buffer
+ * @param aMaxTraces maximum number of traces circular buffer can hold
+ * @return Standard Symbian error code
+ */
+    IMPORT_C static TInt ValidatePayload(TDesC8&        aBuffer,
+                                         TInt           aExpectedNum,
+                                         TComponentId   aComponentID,
+                                         TGroupId       aGroupID, 
+                                         TUint32        aData, 
+                                         TUint32        aTraceWord,
+                                         TBool          aIdentical      =EFalse, 
+                                         TInt           aBufferMode     =0, 
+                                         TBool          aOrdinalData    =EFalse,
+                                         TInt           aNumTraces      =0,
+                                         TInt           aMaxTraces      =0);
+
+/*
+ * Validate the single trace data in buffer
+ * 
+ * @param aBuffer the buffer containing the trace data
+ * @param aTracePresent determines if trace data should be present or not
+ * @param aGroupID expected GID
+ * @param aComponentID expected CID
+ * @param aData expected trace data
+ * @param aPrintfTrace determines if trace data should be printf data or not
+ * @param aMissingTrace determines if trace data should indicate missing data or not
+ * @param aExpectedPrintfTrace expected printf trace data
+ * @return Standard Symbian error code
+ */
+    IMPORT_C static TInt ValidatePayload(TDesC8&        aBuffer, 
+                                         TBool          aTracePresent, 
+                                         TGroupId       aGroupID, 
+                                         TComponentId   aComponentID, 
+                                         TUint32        aData,
+                                         TBool          aPrintfTrace         =EFalse,
+                                         TBool          aMissingTrace        =EFalse,
+                                         TDesC8*        aExpectedPrintfTrace =NULL);
+
+/*
+ * Parse trace data for kernel priming data
+ * 
+ * Note that this function can only verify priming data if the group ID is EThreadIdentification, EFastMutex or ECodeSegs,
+ * otherwise KErrNotSupported is returned if aVerifyData is ETrue
+ *
+ * @param aBuffer Buffer containing the trace data
+ * @param aGroupId Group ID of traces to parse
+ * @param aNumPrimingTraces Output parameter set to number of priming traces found for given group ID
+ * @param aNumTraces Output parameter set to total number of traces found for given group ID
+ * @param aVerifyData Flag indicating if priming data should be verified
+ * @param aVerificationData1 Optional first data required for verifying priming data
+ * @param aVerificationData1 Optional second data required for verifying priming data
+ * @return Standard Symbian error code
+ */
+    IMPORT_C static TInt ParsePrimingDataL(TDesC8&       aBuffer,
+                                           TGroupId      aGroupId,
+                                           TInt&         aNumPrimingTraces,
+                                           TInt&         aNumTraces,
+                                           TBool         aVerifyData         = EFalse, 
+                                           TUint32       aVerificationData1  = 0, 
+                                           TUint32       aVerificationData2  = 0);
+
+/*
+ * Parse trace data for kernel priming data
+ * 
+ * Note that this function can only verify priming data if the group ID is EThreadIdentification, EFastMutex or ECodeSegs,
+ * otherwise KErrNotSupported is returned if aVerifyData is ETrue
+ *
+ * @param aFilePath Full path of file containing the trace data
+ * @param aFs File system object
+ * @param aGroupId Group ID of traces to parse
+ * @param aNumPrimingTraces Output parameter set to number of priming traces found for given group ID
+ * @param aNumTraces Output parameter set to total number of traces found for given group ID
+ * @param aVerifyData Flag indicating if priming data should be verified
+ * @param aVerificationData1 Optional first data required for verifying priming data
+ * @param aVerificationData1 Optional second data required for verifying priming data
+ * @return Standard Symbian error code
+ */
+    IMPORT_C static TInt ParsePrimingDataL(const TDesC&  aFilePath,
+                                           RFs&          aFs,
+                                           TGroupId      aGroupId,
+                                           TInt&         aNumPrimingTraces,
+                                           TInt&         aNumTraces,
+                                           TBool         aVerifyData         = EFalse, 
+                                           TUint32       aVerificationData1  = 0, 
+                                           TUint32       aVerificationData2  = 0);
+
+/*
+ * Parse trace data for Printf data, returning the number of occurances of a given string
+ *
+ * @param aBuffer Buffer containing the trace data
+ * @param aFindString String to search for
+ * @param aNumFound Output parameter set to number of occurances of given string
+ * @return Standard Symbian error code
+ */
+    IMPORT_C static TInt DataHasPrintfString(TDesC8&        aBuffer,
+                                             const TDesC8&  aFindString,
+                                             TInt&          aNumFound);
+
+    
+/*
+ * Parse trace data file for Printf data, returning the number of occurances of a given string
+ *
+ * @param aFilePath Full path of file containing the trace data
+ * @param aFs File system object
+ * @param aFindString String to search for
+ * @param aNumFound Output parameter set to number of occurances of given string
+ * @return Standard Symbian error code
+ */
+    IMPORT_C static TInt DataHasPrintfStringL(const TDesC&   aFilePath,
+                                              RFs&           aFs,
+                                              const TDesC8&  aFindString,
+                                              TInt&          aNumFound);
+
+    
+/*
+ * Parse trace data file for a sequence of traces
+ *
+ * @param aFilePath Full path of file containing the trace data
+ * @param aFs File system object
+ * @param aLastNumberFound Output parameter set to number in last occurances of given string
+ * @param aNumDroppedTraces Output parameter set to number of dropped traces
+ * @param aFindPrintfPattern Pattern that indicates where in the printf string the number will be, using an asterisk
+ *                           This is only used if aGroupId = BTrace::ERDebugPrintf
+ * @param aGroupId Group ID of traces to parse
+ * @param aComponentID Component ID of traces to parse
+ * @return Standard Symbian error code
+ */
+    IMPORT_C static TInt DataHasTraceSequenceL(const TDesC&   aFilePath,
+                                               RFs&           aFs,
+                                               TInt&          aLastNumberFound,
+                                               TInt&          aNumDroppedTraces, 
+                                               TDesC8*        aFindPrintfPattern,
+                                               TGroupId       aGroupId = BTrace::ERDebugPrintf,
+                                               TComponentId   aComponentID = 0);
+
+/*
+ * Get Printf string from single trace data
+ *
+ * @param aBuffer Buffer containing the trace data
+ * @param aPrintfString Output parameter set to the print string in the trace data
+ * @return Standard Symbian error code
+ */
+    IMPORT_C static TInt GetPrintfFromTrace(TDesC8& aBuffer, TDes8& aPrintfString);
+
+/*
+ * Parse trace data for multipart data, returning the number of traces found and total size of trace data
+ * The data is expected to contain a sequence of integers, starting at 0
+ *
+ * @param aBuffer Buffer containing the trace data
+ * @param aGroupId Group ID of traces to parse
+ * @param aComponentID Component ID of traces to parse
+ * @param aMultipartDataSize Output parameter set to total size of data in multipart trace
+ * @param aNumMultipartTraces Output parameter set to number of traces that make up multipart trace
+ * @return Standard Symbian error code
+ */
+    IMPORT_C static TInt ValidateMultipartTraces(TDesC8&        aBuffer,
+                                                 TGroupId       aGroupID, 
+                                                 TComponentId   aComponentID, 
+                                                 TInt&          aMultipartDataSize, 
+                                                 TInt&          aNumMultipartTraces);
+
+private:
+
+    static TBool IsStartOfKernelPrimingBatch(TUint8* aBuffer, TGroupId aGroupId, TUint8 aCategory, TUint8 aSubCategory);
+    static TInt IsPotentialPrimingTrace(TUint8 aCategory, TUint8 aSubCategory, TBool& aIsPotentialPrimingTrace);
+    static TBool StringsMatch(const TDesC8& aString1, const TDesC8& aString2);
+    static TPtr8 ReadTracePrintf(TUint8* aData, TInt aSize);
+    static TInt ParseStringForNumber(const TDesC8& aBuffer, const TDesC8& aFindStringPattern, TInt& aNumberFound);
+
+    static TInt ParseHeader(TUint8*&                aData, 
+                            TInt                    aSize, 
+                            TTraceHeaderSettings&   aTraceHeaderSettings);
+    
+    static TInt IsInPrimingBatch(TUint8  aCategory, 
+                                 TUint8  aSubCategory, 
+                                 TUint32 aTimeDifference, 
+                                 TBool&  aIsInPrimingBatch, 
+                                 TBool&  aFirstTrace, 
+                                 TBool&  aStartOfBatch);
+
+    static TInt GetPrimingVerificationDataL(TUint8*  aBuffer, 
+                                            TInt     aSize, 
+                                            TGroupId aGroupId, 
+                                            TUint32& aVerificationData1, 
+                                            TUint32& aVerificationData2,
+                                            RFile*   aFile = NULL);
+
+    static TInt GetThreadPrimingVerificationDataL(TUint8*  aBuffer, 
+                                                  TInt     aSize, 
+                                                  TUint32& aThreadAddr, 
+                                                  TUint32& aProcessAddr,
+                                                  RFile*   aFile = NULL);
+
+    static TInt GetCodeSegsVerificationDataL(TUint8*  aBuffer, 
+                                             TInt     aSize, 
+                                             TUint32& aSegAddr1, 
+                                             TUint32& aSegAddr2,
+                                             RFile*   aFile = NULL);
+
+    static TInt VerifyPrimingData(TUint8* aBuffer, 
+                                  TInt    aSize, 
+                                  TUint8  aCategory, 
+                                  TUint8  aSubCategory, 
+                                  TInt&   aElementsFound,
+                                  TBool   aFromTestWriter, 
+                                  TUint32 aVerificationData1, 
+                                  TUint32 aVerificationData2);    
+
+    static TInt VerifyThreadPrimingData(TUint8* aBuffer, 
+                                        TInt    aSize, 
+                                        TUint8  aSubCategory, 
+                                        TInt&   aElementsFound,
+                                        TBool   aFromTestWriter, 
+                                        TUint32 aThreadAddr, 
+                                        TUint32 aProcessAddr);    
+
+    static TInt VerifyFastMutexPrimingData(TUint8* aBuffer, 
+                                           TInt    aSize, 
+                                           TUint8  aSubCategory, 
+                                           TInt&   aElementsFound,
+                                           TBool   aFromTestWriter);    
+
+    static TInt VerifyCodeSegsPrimingData(TUint8* aBuffer, 
+                                          TInt    aSize, 
+                                          TUint8  aSubCategory, 
+                                          TInt&   aElementsFound,
+                                          TBool   aFromTestWriter, 
+                                          TUint32 aSegAddr1, 
+                                          TUint32 aSegAddr2);    
+
+    static TInt ReadNextChunkFromFile(TDes8&   aFileBuffer, 
+                                      RFile&   aFile, 
+                                      TInt&    aFilePosition,
+                                      TUint8*& aData,
+                                      TUint8*& aStartOfData,
+                                      TUint8*& aEndOfData);
+
+    static TInt CreateFileBuffer(RBuf8&  aFileBuffer, 
+                                 RFile&  aFile);
+    
+};
+
+#endif // __TRACEDATAPARSER_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/test/tracedataparser/src/tracedataparser.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,2403 @@
+// Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+// Trace Data parser
+//
+
+#include <e32svr.h>
+#include <e32def.h>
+#include <e32def_private.h>
+#include <e32btrace.h>
+
+#include "tracedataparser.h"
+#include "testdatawriternotifier.h"
+#include "tracecoreconstants.h"
+#include "d32tracebuffer.h"
+
+
+EXPORT_C TUint32 TTraceDataParser::Swap(TUint32 x)
+    {
+    return  (x>>24) | ((x<<8) & 0x00FF0000) | ((x>>8) & 0x0000FF00) | (x<<24);
+    }
+
+EXPORT_C TUint32 TTraceDataParser::ReadUint32FromBuf(TUint8*& aBuf, TBool aFromTestWriter)
+    {
+#ifdef __WINS__
+    aFromTestWriter = EFalse;
+#endif
+    // reads a 4 byte integer of expected endianess
+    TUint32 n;
+    if (!aFromTestWriter)
+        {
+        n = *(aBuf+3) + (*(aBuf+2) << 8) + (*(aBuf+1) << 16) + (*aBuf << 24);
+        }
+    else
+        {
+        // endianess order is reversed for TestWriter on hw
+        n = (*aBuf) + (*(aBuf+1) << 8) + (*(aBuf+2) << 16) + (*(aBuf+3) << 24);    
+        }
+    aBuf += sizeof(TUint32);
+    return n;
+    }
+
+EXPORT_C TUint16 TTraceDataParser::ReadUint16FromBuf(TUint8*& aBuf)
+    {
+    // reads a 2 byte integer of expected endianess
+    TUint16 n = (*aBuf << 8)+ (*(aBuf+1));
+    aBuf += sizeof(TUint16);
+    return n;
+    }
+
+TPtr8 TTraceDataParser::ReadTracePrintf(TUint8* aData, TInt aSize)
+    {
+    TPtr8 printfString(aData, aSize, aSize);
+    TInt endPosition = printfString.Locate(TChar(0));
+    if (endPosition >= 0)
+        {
+        printfString = printfString.Left(endPosition);
+        }
+    else
+        {
+        printfString.Trim();
+        }
+    return printfString;
+    }
+
+TBool TTraceDataParser::StringsMatch(const TDesC8& aString1, const TDesC8& aString2)
+    {
+    TInt compareLength = (aString1.Length() > aString2.Length()) ? aString2.Length() : aString1.Length();
+    if ( (aString2.Left(compareLength).Compare(aString1) == 0) ||
+         (aString1.Left(compareLength).Compare(aString2) == 0) )
+        {
+        return ETrue;
+        }
+    return EFalse;
+    }
+
+/**
+ * Function to string for a number
+ * @param aBuffer Trace data descriptor
+ * @param aFindStringPattern Pattern that indicates where in the string the number will be, using an asterisk
+ * @param aNumberFound If found, the number in the string
+ * @return Symbian error code
+ */
+TInt TTraceDataParser::ParseStringForNumber(const TDesC8& aBuffer, const TDesC8& aFindStringPattern, TInt& aNumberFound)
+    {
+    TInt err = KErrNotFound;
+    TInt posOfNum = aFindStringPattern.Locate('*');
+    TInt lengthOfNum = 1 + aBuffer.Length() - aFindStringPattern.Length();
+    if (posOfNum >= 0 && lengthOfNum >= 1)
+        {
+        TBuf<KMaxNumberBufferLength> numberBuffer;
+        numberBuffer.Copy(aBuffer.Mid(posOfNum, lengthOfNum));
+        TLex lex(numberBuffer);
+        err = lex.Val(aNumberFound);
+        }
+    return err;
+    }
+
+/*
+ * Validate the trace data in buffer
+ *
+ * @param aBuffer the buffer containing the trace data
+ * @param aExpectedNum expected number of traces
+ * @param aComponentID component ID of traces
+ * @param aGroupID group ID of traces
+ * @param aData first expected trace data
+ * @param aTraceWord trace word of traces
+ * @param aIdentical indicates that the payload of each trace packet should be identical
+ * @param aBufferMode The mode of the trace buffer.. 0=straight, 1=circular.
+ * @param aOrdinalData indicates whether the payload data reflects its position in the stream of trace packets
+ * @param aNumTraces number of traces written to circular buffer
+ * @param aMaxTraces maximum number of traces circular buffer can hold
+ * @return Standard Symbian error code
+ */
+EXPORT_C TInt TTraceDataParser::ValidatePayload(TDesC8&         aBuffer,
+                                                TInt            aExpectedNum,
+                                                TComponentId    aComponentID, 
+                                                TGroupId        aGroupID, 
+                                                TUint32         aData, 
+                                                TUint32         aTraceWord,
+                                                TBool           aIdentical, 
+                                                TInt            aBufferMode, 
+                                                TBool           aOrdinalData, 
+                                                TInt            aNumTraces, 
+                                                TInt            aMaxTraces)
+    {
+    if ((aBuffer.Length() == 0) && (aExpectedNum <= 0))    // size is zero and there should be no traces
+        {
+        return KErrNone;
+        }
+    if ((aBuffer.Length() == 0) && (aExpectedNum > 0))     // size is zero and there should be traces
+        {
+        return KErrCorrupt;
+        }
+    if (aBuffer.Length() != 0 && (aExpectedNum <= 0))      // size is non-zero and there should be no traces
+        {
+        return KErrCorrupt;
+        }
+
+    TUint32 lastData = aData;
+    TBool firstInStream = ETrue;
+
+    // get the current position on the stream of traces so we can determine what the payload value should be.
+    TInt overwrites = 0;
+    if (aBufferMode == RTraceBuffer::EFreeRunning)
+        {
+        TInt overwrittenTraces = aNumTraces; // initialise to number of traces we wrote to the buffer for circular test
+        while (overwrittenTraces > aMaxTraces)
+            {
+            overwrittenTraces = overwrittenTraces - aMaxTraces; // aMaxTraces is the max the buffer can hold 
+            overwrites++;
+            }
+        lastData = (aMaxTraces * (overwrites - 1)) + overwrittenTraces + 1; // get where we are in the buffer
+        }
+
+    TInt            numberOSTtraces = 0;
+    TUint8*         data            = (TUint8*) aBuffer.Ptr();
+    TUint8*         endOfData       = data + aBuffer.Size();    
+    TUint8          testGID         = aGroupID;
+    TUint32         testCID         = aComponentID;
+    TUint32         testTraceWord   = 0;
+
+    TTraceHeaderSettings  traceHeaderSettings;
+
+    // Loop through all traces
+    while (data < endOfData)
+        {
+        // Get trace info from header
+        TInt err = ParseHeader(data, endOfData-data, traceHeaderSettings);
+        
+        if (err != KErrNone)
+            {
+            return err;
+            }
+
+        //check the missing flag if we expect it
+        if ((firstInStream&&(overwrites>0)))
+            {
+            if(!(traceHeaderSettings.iHeaderFlags & BTrace::EMissingRecord))
+                {
+                return KErrCorrupt;
+                }
+            }
+
+        if (!traceHeaderSettings.iPrintfTrace)
+            {
+            testTraceWord = ((TUint32) (testGID << GROUPIDSHIFT)) + 1;
+            
+            // check group ID
+            if (traceHeaderSettings.iCategory != testGID)
+                {
+                return KErrCorrupt;
+                }
+            // check component ID
+            if (traceHeaderSettings.iComponentID != testCID)
+                {
+                return KErrCorrupt;
+                }
+            // check trace word
+            if (traceHeaderSettings.iTraceWord != testTraceWord)
+                {
+                return KErrCorrupt;
+                }
+            
+            TBool lastTrace = EFalse;
+            if ( (traceHeaderSettings.iMultiPartType == BTrace::EMultipartLast) || (!traceHeaderSettings.iMultiPartType) )
+                {
+                lastTrace = ETrue;
+                }
+
+            // check trace payload
+            for (TInt i=0; traceHeaderSettings.iLengthOfPayload>0; i++)
+                {
+                TUint32 param = Swap(ReadUint32FromBuf(data, traceHeaderSettings.iFromTestWriter));
+                // For circular case, we try to estimate to within +/- 2 where we are in payload
+                // for straight case we should get it exactly correct.
+                if ( ((param != lastData) && (aBufferMode == 0)) || 
+                      ( ((param > lastData + 2) || (param < lastData - 2)) && (aBufferMode == RTraceBuffer::EFreeRunning) ) )
+                    {
+                    return KErrCorrupt;
+                    }
+                lastData = param; // in case we weren't accurate in circular case.
+                traceHeaderSettings.iLengthOfPayload -= 4;
+                lastData++;
+                }
+            lastData = (!aOrdinalData)? aData : lastData;
+            if (!aOrdinalData)
+                {
+                lastData = (lastTrace || aIdentical) ? aData : lastData;
+                }
+
+            if (traceHeaderSettings.iMultiPartType || aIdentical || aOrdinalData)
+                {
+                testGID = aGroupID;
+                testCID = aComponentID;
+                testTraceWord = aTraceWord;
+                }
+            else
+                {
+                testGID++;
+                testCID++;
+                testTraceWord += (1 << GROUPIDSHIFT);
+                }
+            numberOSTtraces++;
+            }
+        else
+            {
+            // Go to the next trace
+            data += traceHeaderSettings.iLengthOfPayload;
+            }
+        firstInStream = EFalse; //after this, it's defnitely not the first trace in the stream.
+        }
+
+    // Check that we're getting the correct number of traces
+    //or approximate ammount (+/-1) for circular buffer because
+    //the arithmetic to overwrite traces sometimes also skips one
+    //extra trace
+
+    if (numberOSTtraces != aExpectedNum)
+        {
+        if ((aBufferMode==RTraceBuffer::EFreeRunning)
+                &&((numberOSTtraces>=aExpectedNum-1)||(numberOSTtraces<=aExpectedNum+1)))
+            {
+            return KErrNone;
+            }
+        return KErrCorrupt;
+        }
+
+    return KErrNone;
+    }
+
+/*
+ * Validate the single trace data in buffer
+ * 
+ * @param aBuffer the buffer containing the trace data
+ * @param aTracePresent determines if trace data should be present or not
+ * @param aGroupID expected GID
+ * @param aComponentID expected CID
+ * @param aData expected trace data
+ * @param aPrintfTrace determines if trace data should be printf data or not
+ * @param aMissingTrace determines if trace data should indicate missing data or not
+ * @param aExpectedPrintfTrace expected printf trace data
+ * @return Standard Symbian error code
+ */
+EXPORT_C TInt TTraceDataParser::ValidatePayload(TDesC8&        aBuffer, 
+                                                TBool          aTracePresent, 
+                                                TGroupId       aGroupID, 
+                                                TComponentId   aComponentID, 
+                                                TUint32        aData,
+                                                TBool          aPrintfTrace,
+                                                TBool          aMissingTrace,
+                                                TDesC8*        aExpectedPrintfTrace)
+    {
+    if ((aBuffer.Length() == 0) && (!aTracePresent))    // size is zero and there should be no traces
+        {
+        return KErrNone;
+        }
+    if ((aBuffer.Length() == 0) && (aTracePresent))     // size is zero and there should be traces
+        {
+        return KErrCorrupt;
+        }
+    if (aBuffer.Length() != 0 && (!aTracePresent))      // size is non-zero and there should be no traces
+        {
+        return KErrCorrupt;
+        }
+
+    TUint8*         data            = (TUint8*) aBuffer.Ptr();
+    TUint8*         endOfData       = data + aBuffer.Size();    
+
+    TTraceHeaderSettings  traceHeaderSettings;
+
+    // Get trace info from header
+    TInt err = ParseHeader(data, endOfData-data, traceHeaderSettings);
+    
+    if (err != KErrNone)
+        {
+        return err;
+        }
+
+    // check trace type
+    if (traceHeaderSettings.iPrintfTrace != aPrintfTrace)
+        {
+        return KErrCorrupt;
+        }
+
+    if (!traceHeaderSettings.iPrintfTrace)
+        {
+        TUint32 testTraceWord = ((TUint32) (aGroupID << GROUPIDSHIFT)) + 1;
+        
+        // check group ID
+        if (traceHeaderSettings.iCategory != aGroupID)
+            {
+            return KErrCorrupt;
+            }
+        // check component ID
+        if (traceHeaderSettings.iComponentID != aComponentID)
+            {
+            return KErrCorrupt;
+            }
+        // check trace word
+        if (traceHeaderSettings.iTraceWord != testTraceWord)
+            {
+            return KErrCorrupt;
+            }
+        
+        if (aMissingTrace)
+            {
+            // check missing flag
+            if (!(traceHeaderSettings.iHeaderFlags & BTrace::EMissingRecord))
+                {
+                return KErrCorrupt;
+                }
+            }
+        
+        TInt i = 0;
+        while (data < endOfData)
+            {
+            TUint32 param = Swap(ReadUint32FromBuf(data, traceHeaderSettings.iFromTestWriter));
+            if (param != aData + i)
+                {
+                return KErrCorrupt;
+                }
+            i++;
+            }
+        }
+    else if (!aExpectedPrintfTrace)
+        {
+        return KErrArgument;
+        }
+    else
+        {
+        TBuf8<KExpectedPrintfMaxLength> expectedPrintf;
+        
+        // In the case of an expected dropped trace, we only check for "* Dropped Trace" because
+        // the test writer has completed the request for data when it writes that bit first (right 
+        // before the next trace), and when it goes to write the actual trace, it doesn't.
+        // If we change this, the "* Dropped Trace" will be overwritten by the actual trace before
+        // the test can check it, since the test writer doesn't buffer trace data.
+        if (aMissingTrace)
+            {
+            // check that "* Dropped Trace" is in the buffer
+            expectedPrintf = KDroppedTrace;
+            }
+        else
+            {
+            // check that "Test Printf Trace" is in the buffer"
+            expectedPrintf = *aExpectedPrintfTrace;
+            }
+        
+        expectedPrintf.Append(TChar(0)); // printf handler appends null at the end.
+
+        TPtrC8 actualprintf(data, traceHeaderSettings.iLengthOfPayload);
+
+        // Need to fix endianess for hw
+#ifndef __WINS__
+        TInt bufpos = 0;
+        while (bufpos < (actualprintf.Length()-4))
+            {
+            // reads a 4 byte integer of expected endianess
+            TUint32 n = actualprintf[bufpos] + (actualprintf[bufpos+1] << 8) + (actualprintf[bufpos+2] << 16) + (actualprintf[bufpos+3] << 24);
+            bufpos += sizeof(TUint32);
+            TUint32 tempData = Swap(n);
+            memcpy((TAny*)(actualprintf.Ptr()+bufpos-4),(TAny*)&tempData, sizeof(TUint32));
+            }        
+#endif //__WINS__
+        
+        if (expectedPrintf.Compare(actualprintf) != 0)
+            {
+            return KErrCorrupt;
+            }
+
+        // Check if there is another trace to follow
+        data += traceHeaderSettings.iLengthOfPayload;
+        if (data != endOfData)
+            {
+            TPtrC8 buffer(data, endOfData - data);
+            
+            return ValidatePayload(buffer, 
+                                   aTracePresent, 
+                                   aGroupID, 
+                                   aComponentID, 
+                                   aData,
+                                   aPrintfTrace,
+                                   EFalse,
+                                   aExpectedPrintfTrace);
+            }
+        }    
+    return KErrNone;
+    }
+
+/*
+ * Verify the priming data contains all the expected values
+ *
+ * @param aBuffer Buffer containing the trace data
+ * @param aSize Size of the trace buffer
+ * @param aCategory BTrace category of the trace data
+ * @param aSubCategory BTrace subcategory of the trace data
+ * @param aElementsFound Parameter to hold current state of expected data found so far
+ * @param aVerificationData1 Optional input value - used differently for different categories
+ * @param aVerificationData2 Optional input value - used differently for different categories
+ * @return Standard Symbian error code
+ */
+TInt TTraceDataParser::VerifyPrimingData(TUint8* aBuffer, 
+                                         TInt    aSize, 
+                                         TUint8  aCategory, 
+                                         TUint8  aSubCategory, 
+                                         TInt&   aElementsFound,
+                                         TBool   aFromTestWriter, 
+                                         TUint32 aVerificationData1, 
+                                         TUint32 aVerificationData2)
+    {
+    TInt err = KErrNotSupported;
+    switch(aCategory)
+        {
+        case BTrace::EThreadIdentification:
+            err = VerifyThreadPrimingData(aBuffer, aSize, aSubCategory, aElementsFound, aFromTestWriter, aVerificationData1, aVerificationData2);
+            break;
+        case BTrace::EFastMutex:
+            err = VerifyFastMutexPrimingData(aBuffer, aSize, aSubCategory, aElementsFound, aFromTestWriter);
+            break;
+        case BTrace::ECodeSegs:
+            err = VerifyCodeSegsPrimingData(aBuffer, aSize, aSubCategory, aElementsFound, aFromTestWriter, aVerificationData1, aVerificationData2);
+            break;
+        default:
+            break;
+        }
+    return err;    
+    }
+
+/*
+ * Verify the EThreadIdentification priming data contains all the expected values
+ *
+ * @param aBuffer Buffer containing the trace data
+ * @param aSize Size of the trace buffer
+ * @param aSubCategory BTrace subcategory of the trace data
+ * @param aElementsFound Parameter to hold current state of expected data found so far
+ * @param aThreadAddr The address of the thread to search for
+ * @param aProcessAddr The address of the process to search for
+ * @return Standard Symbian error code
+ */
+TInt TTraceDataParser::VerifyThreadPrimingData(TUint8* aBuffer, 
+                                               TInt    aSize, 
+                                               TUint8  aSubCategory, 
+                                               TInt&   aElementsFound,
+                                               TBool   aFromTestWriter, 
+                                               TUint32 aThreadAddr, 
+                                               TUint32 aProcessAddr)
+    {
+    RThread currentThread;    
+    RProcess currentProcess;
+
+    TUint32 tempThreadAddr;
+    TUint32 tempProcessAddr;
+    
+    switch(aSubCategory)
+        {
+        case BTrace::EProcessCreate:
+            {
+            tempProcessAddr = Swap(ReadUint32FromBuf(aBuffer, aFromTestWriter));
+            if (tempProcessAddr == aProcessAddr)
+                {
+                aElementsFound |= 0x000000ff;
+                }
+            }
+            break;
+            
+        case BTrace::EProcessName:
+            {
+            tempThreadAddr = Swap(ReadUint32FromBuf(aBuffer, aFromTestWriter));
+            tempProcessAddr = Swap(ReadUint32FromBuf(aBuffer, aFromTestWriter));
+            if ( (tempThreadAddr == aThreadAddr) && (tempProcessAddr == aProcessAddr) )
+                {
+                TBuf8<KMaxName> currentProcessName;
+                currentProcessName.Copy(currentProcess.Name());
+                TPtr8 processName(aBuffer,(aSize-8),(aSize-8)); //should be name of the process
+                processName.Trim();
+                if (StringsMatch(currentProcessName, processName))
+                    {
+                    aElementsFound |= 0x0000ff00;
+                    }
+                }
+            }
+            break;
+        
+        case BTrace::EThreadName:
+            {
+            tempThreadAddr = Swap(ReadUint32FromBuf(aBuffer, aFromTestWriter));
+            tempProcessAddr = Swap(ReadUint32FromBuf(aBuffer, aFromTestWriter));
+            if ( (tempThreadAddr == aThreadAddr) && (tempProcessAddr == aProcessAddr) )
+                {
+                TBuf8<KMaxName> currentThreadName;
+                currentThreadName.Copy(currentThread.Name());
+                TPtr8 threadName(aBuffer,(aSize-8),(aSize-8)); //should be name of the thread
+                threadName.Trim();
+                if (StringsMatch(currentThreadName, threadName))
+                    {
+                    aElementsFound |= 0x00ff0000;
+                    }
+                }
+            }
+            break;
+            
+        case BTrace::EThreadId:
+            {
+            tempThreadAddr = Swap(ReadUint32FromBuf(aBuffer, aFromTestWriter));
+            tempProcessAddr = Swap(ReadUint32FromBuf(aBuffer, aFromTestWriter));
+            if ( (tempThreadAddr == aThreadAddr) && (tempProcessAddr == aProcessAddr) )
+                {
+                TThreadId threadId = Swap(ReadUint32FromBuf(aBuffer, aFromTestWriter));
+                if (currentThread.Id() == threadId)
+                    {
+                    aElementsFound |= 0xff000000;
+                    }
+                }
+            }
+            break; 
+            
+        default:
+            break;
+        }
+    
+    TInt err = KErrNotFound;
+    if (aElementsFound == 0xffffffff)
+        {
+        err = KErrNone;
+        }
+    return err;
+    }
+
+/*
+ * Verify the EFastMutex priming data contains all the expected values
+ *
+ * @param aBuffer Buffer containing the trace data
+ * @param aSize Size of the trace buffer
+ * @param aSubCategory BTrace subcategory of the trace data
+ * @param aElementsFound Parameter to hold current state of expected data found so far
+ * @return Standard Symbian error code
+ */
+TInt TTraceDataParser::VerifyFastMutexPrimingData(TUint8* aBuffer, 
+                                                  TInt    aSize, 
+                                                  TUint8  aSubCategory, 
+                                                  TInt&   aElementsFound,
+                                                  TBool   aFromTestWriter)
+    {
+    if (aSubCategory == BTrace::EFastMutexName)
+        {
+        TUint32 fastMutexId = Swap(ReadUint32FromBuf(aBuffer, aFromTestWriter));
+        TUint32 unspecified = Swap(ReadUint32FromBuf(aBuffer, aFromTestWriter));
+        if (fastMutexId && !unspecified)
+            {
+            TPtr8 fastMutexName(aBuffer,(aSize-8),(aSize-8)); //should be name of the fast mutex
+            fastMutexName.Trim();
+            if (StringsMatch(KFastMutexNameSystemLock(), fastMutexName))
+                {
+                aElementsFound |= 0x000000ff;
+                }
+            else if (StringsMatch(KFastMutexNameMsgLock(), fastMutexName))
+                {
+                aElementsFound |= 0x0000ff00;
+                }
+            else if (StringsMatch(KFastMutexNameObjLock(), fastMutexName))
+                {
+                aElementsFound |= 0x00ff0000;
+                }
+            else if (StringsMatch(KFastMutexNameLogonLock(), fastMutexName))
+                {
+                aElementsFound |= 0xff000000;
+                }
+            }
+        }
+    
+    TInt err = KErrNotFound;
+    if (aElementsFound == 0xffffffff)
+        {
+        err = KErrNone;
+        }
+    return err;
+    }
+
+/*
+ * Verify the ECodeSegs priming data contains all the expected values
+ *
+ * @param aBuffer Buffer containing the trace data
+ * @param aSize Size of the trace buffer
+ * @param aSubCategory BTrace subcategory of the trace data
+ * @param aElementsFound Parameter to hold current state of expected data found so far
+ * @param aSegAddr1 The address of the first code seg to search for
+ * @param aSegAddr2 The address of the second code seg to search for
+ * @return Standard Symbian error code
+ */
+TInt TTraceDataParser::VerifyCodeSegsPrimingData(TUint8* aBuffer, 
+                                                 TInt    aSize, 
+                                                 TUint8  aSubCategory, 
+                                                 TInt&   aElementsFound,
+                                                 TBool   aFromTestWriter, 
+                                                 TUint32 aSegAddr1, 
+                                                 TUint32 aSegAddr2)
+    {
+    TUint32 codeSegAddr;
+    if (aSubCategory == BTrace::ECodeSegCreated)
+        {
+        codeSegAddr = Swap(ReadUint32FromBuf(aBuffer, aFromTestWriter));
+        if (codeSegAddr == aSegAddr1 || codeSegAddr == aSegAddr2)
+            {
+            TPtr8 codeSegName(aBuffer,(aSize-4),(aSize-4)); //should be name of the code seg
+            codeSegName.Trim();
+            if (codeSegAddr == aSegAddr1 && StringsMatch(KCodeSegsName1(), codeSegName))
+                {
+                aElementsFound |= 0x000000ff;
+                }
+            else if (codeSegAddr == aSegAddr2 && StringsMatch(KCodeSegsName2(), codeSegName))
+                {
+                aElementsFound |= 0x0000ff00;
+                }
+            }
+        }
+    else if (aSubCategory == BTrace::ECodeSegInfo)
+        {
+        codeSegAddr = Swap(ReadUint32FromBuf(aBuffer, aFromTestWriter));
+        if (codeSegAddr == aSegAddr1)
+            {
+            aElementsFound |= 0x00ff0000;
+            }
+        else if (codeSegAddr == aSegAddr2)
+            {
+            aElementsFound |= 0xff000000;
+            }
+        }
+    
+    TInt err = KErrNotFound;
+    if (aElementsFound == 0xffffffff)
+        {
+        err = KErrNone;
+        }
+    return err;
+    }
+
+/*
+ * Work out if a trace point is potentially kernel priming data based on category and subcategory
+ *
+ * @param aCategory BTrace category of the trace data
+ * @param aSubCategory BTrace subcategory of the trace data
+ * @param aIsPotentialPrimingTrace Output value set if there is no error
+ * @return Standard Symbian error code
+ */
+TBool TTraceDataParser::IsPotentialPrimingTrace(TUint8 aCategory, TUint8 aSubCategory, TBool& aIsPotentialPrimingTrace)
+    {
+    TInt err = KErrNone;
+    
+    switch(aCategory)
+        {
+        case BTrace::EThreadIdentification:
+            {
+            switch(aSubCategory)
+                {
+                case BTrace::EProcessCreate:
+                case BTrace::EProcessName:
+                case BTrace::EThreadName:
+                case BTrace::EThreadId:
+                    aIsPotentialPrimingTrace = ETrue;
+                    break;
+                default:
+                    aIsPotentialPrimingTrace = EFalse;
+                    break;
+                }
+            }
+            break;
+        case BTrace::ECpuUsage:
+            {
+            switch(aSubCategory)
+                {
+                case BTrace::ENewThreadContext:
+                    aIsPotentialPrimingTrace = ETrue;
+                    break;
+                default:
+                    aIsPotentialPrimingTrace = EFalse;
+                    break;
+                }
+            }
+            break;
+        case BTrace::EChunks:
+            {
+            switch(aSubCategory)
+                {
+                case BTrace::EChunkCreated:
+                case BTrace::EChunkOwner:
+                case BTrace::EChunkInfo:
+                    aIsPotentialPrimingTrace = ETrue;
+                    break;
+                default:
+                    aIsPotentialPrimingTrace = EFalse;
+                    break;
+                }
+            }
+            break;
+        case BTrace::ECodeSegs:
+            {
+            switch(aSubCategory)
+                {
+                case BTrace::ECodeSegCreated:
+                case BTrace::ECodeSegInfo:
+                    aIsPotentialPrimingTrace = ETrue;
+                    break;
+                default:
+                    aIsPotentialPrimingTrace = EFalse;
+                    break;
+                }
+            }
+            break;
+        case BTrace::EPaging:
+            {
+            switch(aSubCategory)
+                {
+                case BTrace::EPagingMemoryModel:
+                    aIsPotentialPrimingTrace = ETrue;
+                    break;
+                default:
+                    aIsPotentialPrimingTrace = EFalse;
+                    break;
+                }
+            }
+            break;
+        case BTrace::EThreadPriority:
+            {
+            switch(aSubCategory)
+                {
+                case BTrace::EProcessPriority:
+                case BTrace::EDThreadPriority:
+                case BTrace::ENThreadPriority:
+                    aIsPotentialPrimingTrace = ETrue;
+                    break;
+                default:
+                    aIsPotentialPrimingTrace = EFalse;
+                    break;
+                }
+            }
+            break;
+        case BTrace::EFastMutex:
+            {
+            switch(aSubCategory)
+                {
+                case BTrace::EFastMutexName:
+                    aIsPotentialPrimingTrace = ETrue;
+                    break;
+                default:
+                    aIsPotentialPrimingTrace = EFalse;
+                    break;
+                }
+            }
+            break;
+        case BTrace::ESymbianKernelSync:
+            {
+            switch(aSubCategory)
+                {
+                case BTrace::EMutexCreate:
+                case BTrace::ESemaphoreCreate:
+                case BTrace::ECondVarCreate:
+                    aIsPotentialPrimingTrace = ETrue;
+                    break;
+                default:
+                    aIsPotentialPrimingTrace = EFalse;
+                    break;
+                }
+            }
+            break;
+        case BTrace::EClientServer:
+            {
+            switch(aSubCategory)
+                {
+                case BTrace::EServerCreate:
+                case BTrace::ESessionAttach:
+                    aIsPotentialPrimingTrace = ETrue;
+                    break;
+                default:
+                    aIsPotentialPrimingTrace = EFalse;
+                    break;
+                }
+            }
+            break;
+        default:
+            err = KErrNotSupported;
+            break;
+        }
+    
+    return err;
+    }
+
+/*
+ * If the next trace is a meta trace true is returned if it is the start of priming data for a given group ID
+ *
+ * @param aBuffer Buffer containing the trace data
+ * @param aGroupId Group ID of kernel priming data
+ * @param aCategory BTrace category of the current trace
+ * @param aSubCategory BTrace subcategory of the current trace
+ * @return True if start of priming data for given group ID, false otherwise
+ */
+TBool TTraceDataParser::IsStartOfKernelPrimingBatch(TUint8* aBuffer, TGroupId aGroupId, TUint8 aCategory, TUint8 aSubCategory)
+    {
+    TBool startOfBatch = EFalse;
+    if (aCategory == BTrace::EMetaTrace)
+        {
+        if (aSubCategory == BTrace::EMetaTraceFilterChange)
+            {
+            TUint8 metaCategory = aBuffer[0];
+            TUint8 isActive = aBuffer[1];
+            if (metaCategory == aGroupId && isActive)
+                {
+                startOfBatch = ETrue;
+                }
+            }        
+        }
+    return startOfBatch;
+    }
+
+/*
+ * Use heuristics to work out if current trace is part of kernel priming data
+ *
+ * @param aCategory BTrace category of the trace data
+ * @param aSubCategory BTrace subcategory of the trace data
+ * @param aTimeDifference Time difference (in microseconds) since last trace for given category
+ * @param aIsInPrimingBatch Output parameter set to true if in priming data
+ * @param aFirstTrace Boolean used to indicate if this is first trace (so there is no valid time difference)
+ * @param aStartOfBatch Output parameter set to true if start of batch of kernel priming data
+ * @return Standard Symbian error code
+ */
+TInt TTraceDataParser::IsInPrimingBatch(TUint8  aCategory, 
+                                        TUint8  aSubCategory, 
+                                        TUint32 aTimeDifference, 
+                                        TBool&  aIsInPrimingBatch, 
+                                        TBool&  aFirstTrace, 
+                                        TBool&  aStartOfBatch)
+    {
+    TBool isPotentialPrimingTrace = EFalse;
+    TInt err = IsPotentialPrimingTrace(aCategory, aSubCategory, isPotentialPrimingTrace);
+    
+    // Look at timestamp to see if this is a new batch of traces
+    if (aFirstTrace)
+        {
+        aFirstTrace = EFalse;
+        }
+    else if (aTimeDifference > KMinMilliSecondsBatchGap * 1000)
+        {
+        aStartOfBatch = ETrue;
+        aIsInPrimingBatch = EFalse;
+        }
+    else
+        {
+        aStartOfBatch = EFalse;
+        }
+    
+    if (isPotentialPrimingTrace && aStartOfBatch)
+        {
+        aIsInPrimingBatch = ETrue;
+        aStartOfBatch = EFalse;
+        }
+    else if (!isPotentialPrimingTrace)
+        {
+        aIsInPrimingBatch = EFalse;
+        }
+    
+    return err;
+    }
+
+/*
+ * Parse the trace data header
+ * 
+ * The following trace types are supported:
+ *     OST traces (ascii and binary)
+ *     XTIv3 traces (ascii and binary)
+ *     Traces from the Test Writer (ascii and binary)
+ *
+ * @param aData Buffer containing the trace data
+ * @param aSize Size of trace data buffer
+ * @param aTraceHeaderSettings Output parameters set to header settings of the trace data
+ * @return Standard Symbian error code
+ */
+TInt TTraceDataParser::ParseHeader(TUint8*&                 aData, 
+                                   TInt                     aSize, 
+                                   TTraceHeaderSettings&    aTraceHeaderSettings)
+    {
+    // Check buffer is large enough to contain header
+    aSize--;
+    if (aSize < 0)
+        {
+        return KErrOverflow;
+        }
+    
+    TInt err = KErrNone;    
+    TUint8* startOfData = aData;
+    aTraceHeaderSettings.iMultiPartType = 0;
+    aTraceHeaderSettings.iMultiPartTraceID = 0;
+    aTraceHeaderSettings.iPrintfTrace = EFalse;
+    aTraceHeaderSettings.iHeaderFlags = EFalse;
+    aTraceHeaderSettings.iFromTestWriter = EFalse;
+    TBool xtiTrace = EFalse;
+    TUint8 version = aData[0];                        // Version (1 byte)
+    aData++;
+    
+    if (version == KXtiHeaderVersion)
+        {
+        // Check buffer is large enough to contain header
+        aSize -= KMinSizeXtiHeader;
+        if (aSize < 0)
+            {
+            aData = startOfData;
+            return KErrOverflow;
+            }
+        xtiTrace = ETrue;
+        TUint8 xtiTraceType = aData[KXtiTraceTypeIndex-1];
+        if (xtiTraceType != KXtiProtocolIdSimpleTrace)
+            {
+            aTraceHeaderSettings.iPrintfTrace = ETrue;
+            aTraceHeaderSettings.iLengthOfPayload = aData[KXtiLengthIndex-1] - 15;
+            aData += KMinSizeXtiHeader;
+            }
+        else
+            {
+            // Check buffer is large enough to contain header
+            aSize -= 1;
+            if (aSize < 0)
+                {
+                aData = startOfData;
+                return KErrOverflow;
+                }
+            // Jump to start of OST buffer
+            aData += KMinSizeXtiHeader + 1;
+            version = aData[0];
+            aData++;
+            }
+        }
+    
+    if (version == KHeaderVersion) // Ost header version byte is correct
+        {
+        // Check buffer is large enough to contain header
+        aSize -= KMinSizeOstHeader;
+        if (aSize < 0)
+            {
+            aData = startOfData;
+            return KErrOverflow;
+            }
+        const TUint8 protocolId = aData[0];                 // Protocol ID (1 byte)
+        aData++;
+        if (xtiTrace)
+            {
+            aTraceHeaderSettings.iLengthOfPayload = aData[0];
+            aData++;
+            aSize++;
+            }
+        else
+            {
+            aTraceHeaderSettings.iLengthOfPayload = ReadUint16FromBuf(aData);        // Size (2 bytes)
+            }
+    
+        if (protocolId == KProtocolIdSimpleTrace) // Normal binary data
+            {
+            // Check buffer is large enough to contain header
+            aSize -= KMinSizeOstBinaryHeader;
+            if (aSize < 0)
+                {
+                aData = startOfData;
+                return KErrOverflow;
+                }
+            ReadUint32FromBuf(aData);                       // Timestamp 1 (4 bytes)
+            aTraceHeaderSettings.iTimestamp = ReadUint32FromBuf(aData);          // Timestamp 2 (4 bytes)
+            }
+        else if (protocolId == KProtocolIdAscii) // Ascii Printf data
+            {
+            aTraceHeaderSettings.iPrintfTrace = ETrue;
+            // Check buffer is large enough to contain header
+            aSize -= KMinSizeOstAsciiHeader;
+            if (aSize < 0)
+                {
+                aData = startOfData;
+                return KErrOverflow;
+                }
+            aData += 8;
+            aTraceHeaderSettings.iLengthOfPayload -= 8;
+            }
+        else // Protocol ID is incorrect
+            {
+            err = KErrCorrupt;
+            }
+        }
+    else if (version == SYMBIAN_TRACE) // Trace data is binary data from Test Writer
+        {
+        aTraceHeaderSettings.iFromTestWriter = ETrue;
+        }
+    else if (version == PRINTF_TRACE) // Trace data is ascii data from Test Writer
+        {
+        aTraceHeaderSettings.iFromTestWriter = ETrue;
+        aTraceHeaderSettings.iPrintfTrace = ETrue;
+        // The end of the printf trace data will have null char, so use that to find end of payload
+        TPtr8 printfString(aData, aSize, aSize);
+        aTraceHeaderSettings.iLengthOfPayload = printfString.Locate(TChar(0));
+        if (aTraceHeaderSettings.iLengthOfPayload >= 0)
+            {
+            aTraceHeaderSettings.iLengthOfPayload++;
+            }
+        else
+            {
+            err = KErrCorrupt;
+            }
+        }
+    else if (version != KXtiHeaderVersion)
+        {
+        err = KErrCorrupt;
+        
+        if(aTraceHeaderSettings.iLengthOfPayload < 0 )
+            {
+            err = KErrOverflow;
+            }
+        }
+              
+    if (aTraceHeaderSettings.iPrintfTrace)
+        {
+        aTraceHeaderSettings.iTimestamp = 0;
+        aTraceHeaderSettings.iComponentID = 0;
+        aTraceHeaderSettings.iCategory = 0;
+        aTraceHeaderSettings.iSubCategory = 0;
+        aTraceHeaderSettings.iTraceWord = 0;
+        }
+    else if (err == KErrNone)
+        {
+        // Check buffer is large enough to contain header
+        aSize -= KMinSizeBinaryHeader;
+        if (aSize < 0)
+            {
+            aData = startOfData;
+            return KErrOverflow;
+            }
+        aTraceHeaderSettings.iComponentID = ReadUint32FromBuf(aData, aTraceHeaderSettings.iFromTestWriter);    // ComponentId (4 bytes)
+        aTraceHeaderSettings.iTraceWord = ReadUint32FromBuf(aData, aTraceHeaderSettings.iFromTestWriter);      // GroupId (2 bytes). TraceId (2 bytes)
+        
+        TUint8* startOfPayload = aData;
+        TUint8 size;
+        
+        TBool testWriterHwData = EFalse;
+#ifndef __WINS__
+        testWriterHwData = aTraceHeaderSettings.iFromTestWriter;
+#endif
+
+        // now look at BTrace header and payload.
+        if (!testWriterHwData)
+            {
+            size = aData[BTrace::ESizeIndex];
+            aTraceHeaderSettings.iHeaderFlags = aData[BTrace::EFlagsIndex];
+            aTraceHeaderSettings.iCategory = aData[BTrace::ECategoryIndex];
+            aTraceHeaderSettings.iSubCategory = aData[BTrace::ESubCategoryIndex];
+            }
+        else
+            {
+            // endianess order is reversed for TestWriter on hw
+            aTraceHeaderSettings.iSubCategory = aData[BTrace::ESizeIndex];
+            aTraceHeaderSettings.iCategory = aData[BTrace::EFlagsIndex];
+            aTraceHeaderSettings.iHeaderFlags = aData[BTrace::ECategoryIndex];
+            size = aData[BTrace::ESubCategoryIndex];
+            }
+        
+        aData+=4;
+
+        //read header extensions
+        if(aTraceHeaderSettings.iHeaderFlags & BTrace::EHeader2Present)
+            {
+            // Check buffer is large enough to contain header
+            aSize -= 4;
+            if (aSize < 0)
+                {
+                aData = startOfData;
+                return KErrOverflow;
+                }
+            TUint32 header2 = Swap(ReadUint32FromBuf(aData, aTraceHeaderSettings.iFromTestWriter));
+            aTraceHeaderSettings.iMultiPartType = header2 & BTrace::EMultipartFlagMask;
+            }
+        if(aTraceHeaderSettings.iHeaderFlags & BTrace::ETimestampPresent)
+            {
+            // Check buffer is large enough to contain header
+            aSize -= 4;
+            if (aSize < 0)
+                {
+                aData = startOfData;
+                return KErrOverflow;
+                }
+            ReadUint32FromBuf(aData, aTraceHeaderSettings.iFromTestWriter);
+            }
+        if(aTraceHeaderSettings.iHeaderFlags & BTrace::ETimestamp2Present)
+            {
+            // Check buffer is large enough to contain header
+            aSize -= 4;
+            if (aSize < 0)
+                {
+                aData = startOfData;
+                return KErrOverflow;
+                }
+            ReadUint32FromBuf(aData, aTraceHeaderSettings.iFromTestWriter);
+            }
+        if(aTraceHeaderSettings.iHeaderFlags & BTrace::EContextIdPresent)
+            {
+            // Check buffer is large enough to contain header
+            aSize -= 4;
+            if (aSize < 0)
+                {
+                aData = startOfData;
+                return KErrOverflow;
+                }
+            ReadUint32FromBuf(aData, aTraceHeaderSettings.iFromTestWriter);
+            }
+        if(aTraceHeaderSettings.iHeaderFlags & BTrace::EPcPresent)
+            {
+            // Check buffer is large enough to contain header
+            aSize -= 4;
+            if (aSize < 0)
+                {
+                aData = startOfData;
+                return KErrOverflow;
+                }
+            ReadUint32FromBuf(aData, aTraceHeaderSettings.iFromTestWriter);
+            }
+        if(aTraceHeaderSettings.iHeaderFlags & BTrace::EExtraPresent)
+            {
+            // Check buffer is large enough to contain header
+            aSize -=4 ;
+            if (aSize < 0)
+                {
+                aData = startOfData;
+                return KErrOverflow;
+                }
+            aTraceHeaderSettings.iMultiPartTraceID = Swap(ReadUint32FromBuf(aData, aTraceHeaderSettings.iFromTestWriter));
+            }
+
+        if (!xtiTrace)
+            {
+            size = (size+3)&~3;  // make it 4 byte aligned
+            }
+        if (size == 0)
+            {
+            // This happens when the trace is larger than maximum size, and we can't use the BTrace size field
+            // Instead calculate payload length based on size in OST header
+            aTraceHeaderSettings.iLengthOfPayload -= (aData-startOfPayload)+16; // size of rest of payload
+            }
+        else
+            {
+            aTraceHeaderSettings.iLengthOfPayload = size-(aData-startOfPayload); // size of rest of payload
+            }
+        }
+
+    
+    // Check buffer is large enough to contain payload
+    aSize -= aTraceHeaderSettings.iLengthOfPayload;
+    if (aSize < 0)
+        {
+        aData = startOfData;
+        err = KErrOverflow;
+        }
+    
+    return err;
+    }
+
+/*
+ * Get the data required to verify kernel priming traces for EThreadIdentification
+ *
+ * @param aBuffer Buffer containing the trace data
+ * @param aSize Size of the trace buffer
+ * @param aThreadAddr Output parameter set to address of current thread
+ * @param aProcessAddr Output parameter set to address of current process
+ * @return Standard Symbian error code
+ */
+TInt TTraceDataParser::GetThreadPrimingVerificationDataL(TUint8*     aBuffer, 
+                                                         TInt        aSize, 
+                                                         TUint32&    aThreadAddr, 
+                                                         TUint32&    aProcessAddr,
+                                                         RFile*      aFile)
+    {
+    TInt    err = KErrNone;
+    TInt    filePos = 0;
+    TUint8* data = NULL;
+    TUint8* startOfData = NULL;
+    TUint8* endOfData = NULL;    
+    RBuf8   fileBuffer;
+    
+    if (aFile)
+        {
+        // Create file buffer and read first chunk from file
+        err = CreateFileBuffer(fileBuffer, *aFile);
+        if (err != KErrNone)
+            {
+            return err;
+            }
+        fileBuffer.CleanupClosePushL();
+        err = ReadNextChunkFromFile(fileBuffer, *aFile, filePos, data, startOfData, endOfData);
+        if (err != KErrNone)
+            {
+            CleanupStack::PopAndDestroy(&fileBuffer); // close file buffer
+            return err;
+            }
+        }
+    else
+        {
+        data = aBuffer;
+        startOfData = data;
+        endOfData = data + aSize;
+        }
+    
+    TInt            headerErr = KErrNone; 
+    RThread         currentThread;            
+    TUint32         tempThreadAddr;
+    TUint32         tempProcessAddr;
+    TThreadId       threadid = 0;
+
+    TTraceHeaderSettings  traceHeaderSettings;
+
+    err = KErrGeneral;
+    
+    while(data < endOfData)
+        {
+        headerErr = ParseHeader(data, endOfData-data, traceHeaderSettings);
+        
+        if (aFile && headerErr == KErrOverflow)
+            {
+            // We don't have all the trace data, so read next chunk from file
+            headerErr = ReadNextChunkFromFile(fileBuffer, *aFile, filePos, data, startOfData, endOfData);
+            if (headerErr == KErrNone)
+                {
+                continue;
+                }
+            }
+        if (headerErr != KErrNone)
+            {
+            err = headerErr;
+            break;
+            }
+        if ( (traceHeaderSettings.iCategory == BTrace::EThreadIdentification) && (traceHeaderSettings.iSubCategory == BTrace::EThreadId) )
+            {
+            tempThreadAddr = Swap(ReadUint32FromBuf(data, traceHeaderSettings.iFromTestWriter));
+            tempProcessAddr = Swap(ReadUint32FromBuf(data, traceHeaderSettings.iFromTestWriter));
+            threadid = Swap(ReadUint32FromBuf(data, traceHeaderSettings.iFromTestWriter));
+            if (currentThread.Id() == threadid)
+                {
+                aThreadAddr = tempThreadAddr;
+                aProcessAddr = tempProcessAddr;
+                err = KErrNone;
+                break;
+                }
+            }
+        else
+            {
+            data += traceHeaderSettings.iLengthOfPayload; //go to next trace
+            }
+
+        if (aFile && data == endOfData)
+            {
+            // We might not have all the trace data, so read next chunk from file
+            headerErr = ReadNextChunkFromFile(fileBuffer, *aFile, filePos, data, startOfData, endOfData);
+            if (headerErr != KErrNone)
+                {
+                err = headerErr;
+                break;
+                }
+            }
+        }
+
+    if (aFile)
+        {
+        CleanupStack::PopAndDestroy(&fileBuffer); // close file buffer
+        }
+
+    return err;
+    }
+
+
+/*
+ * Get the data required to verify kernel priming traces for ECodeSegs
+ *
+ * @param aBuffer Buffer containing the trace data
+ * @param aSize Size of the trace buffer
+ * @param aSegAddr1 Output parameter set to address of first code seg
+ * @param aSegAddr2 Output parameter set to address of second code seg
+ * @return Standard Symbian error code
+ */
+TInt TTraceDataParser::GetCodeSegsVerificationDataL(TUint8*  aBuffer, 
+                                                    TInt     aSize, 
+                                                    TUint32& aSegAddr1, 
+                                                    TUint32& aSegAddr2,
+                                                    RFile*   aFile)
+    {
+    TInt    err = KErrNone;
+    TInt    filePos = 0;
+    TUint8* data = NULL;
+    TUint8* startOfData = NULL;
+    TUint8* endOfData = NULL;    
+    RBuf8   fileBuffer;
+    
+    if (aFile)
+        {
+        // Create file buffer and read first chunk from file
+        err = CreateFileBuffer(fileBuffer, *aFile);
+        if (err != KErrNone)
+            {
+            return err;
+            }
+        fileBuffer.CleanupClosePushL();
+        err = ReadNextChunkFromFile(fileBuffer, *aFile, filePos, data, startOfData, endOfData);
+        if (err != KErrNone)
+            {
+            CleanupStack::PopAndDestroy(&fileBuffer); // close file buffer
+            return err;
+            }
+        }
+    else
+        {
+        data = aBuffer;
+        startOfData = data;
+        endOfData = data + aSize;
+        }
+    
+    TInt            headerErr = KErrNone; 
+    TUint32         tempSegAddr;
+
+    TTraceHeaderSettings  traceHeaderSettings;
+
+    err = KErrGeneral;
+    
+    while(data < endOfData)
+        {
+        headerErr = ParseHeader(data, endOfData-data, traceHeaderSettings);
+        
+        if (aFile && headerErr == KErrOverflow)
+            {
+            // We don't have all the trace data, so read next chunk from file
+            headerErr = ReadNextChunkFromFile(fileBuffer, *aFile, filePos, data, startOfData, endOfData);
+            if (headerErr == KErrNone)
+                {
+                continue;
+                }
+            }
+        if (headerErr != KErrNone)
+            {
+            err = headerErr;
+            break;
+            }
+        if ( (traceHeaderSettings.iCategory == BTrace::ECodeSegs) && (traceHeaderSettings.iSubCategory == BTrace::ECodeSegCreated) )
+            {
+            tempSegAddr = Swap(ReadUint32FromBuf(data, traceHeaderSettings.iFromTestWriter));
+            traceHeaderSettings.iLengthOfPayload -= 4;
+            TPtr8 codeSegName(data,traceHeaderSettings.iLengthOfPayload,traceHeaderSettings.iLengthOfPayload); //should be name of the code seg
+            codeSegName.Trim();
+            if (StringsMatch(KCodeSegsName1(), codeSegName))
+                {
+                aSegAddr1 = tempSegAddr;
+                }
+            if (StringsMatch(KCodeSegsName2(), codeSegName))
+                {
+                aSegAddr2 = tempSegAddr;
+                }
+            if (aSegAddr1 != 0 && aSegAddr2 != 0)
+                {
+                err = KErrNone;
+                break;
+                }
+            }
+
+        data += traceHeaderSettings.iLengthOfPayload; //go to next trace
+
+        if (aFile && data == endOfData)
+            {
+            // We might not have all the trace data, so read next chunk from file
+            headerErr = ReadNextChunkFromFile(fileBuffer, *aFile, filePos, data, startOfData, endOfData);
+            if (headerErr != KErrNone)
+                {
+                err = headerErr;
+                break;
+                }
+            }
+        }
+
+    if (aFile)
+        {
+        CleanupStack::PopAndDestroy(&fileBuffer); // close file buffer
+        }
+    
+    return err;
+    }
+
+/*
+ * Get the data required to verify kernel priming traces
+ *
+ * @param aBuffer Buffer containing the trace data
+ * @param aSize Size of the trace buffer
+ * @param aGroupId Group ID of traces
+ * @param aVerificationData1 Output parameter set to first data required
+ * @param aVerificationData2 Output parameter set to second data required
+ * @return Standard Symbian error code
+ */
+TInt TTraceDataParser::GetPrimingVerificationDataL(TUint8*  aBuffer, 
+                                                   TInt     aSize, 
+                                                   TGroupId aGroupId, 
+                                                   TUint32& aVerificationData1, 
+                                                   TUint32& aVerificationData2,
+                                                   RFile*   aFile)
+    {
+    TInt err = KErrNone;
+    switch(aGroupId)
+        {
+        case BTrace::EThreadIdentification:
+            err = GetThreadPrimingVerificationDataL(aBuffer, aSize, aVerificationData1, aVerificationData2, aFile);
+            break;
+        case BTrace::ECodeSegs:
+            err = GetCodeSegsVerificationDataL(aBuffer, aSize, aVerificationData1, aVerificationData2, aFile);
+            break;
+        default:
+            break;
+        }
+    return err;    
+    }
+
+/*
+ * Parse trace data for kernel priming data
+ * 
+ * Note that this function can only verify priming data if the group ID is EThreadIdentification or EFastMutex,
+ * otherwise KErrNotSupported is returned if aVerifyData is ETrue
+ *
+ * @param aBuffer Buffer containing the trace data
+ * @param aGroupId Group ID of traces to parse
+ * @param aNumPrimingTraces Output parameter set to number of priming traces found for given group ID
+ * @param aNumTraces Output parameter set to total number of traces found for given group ID
+ * @param aVerifyData Flag indicating if priming data should be verified
+ * @param aVerificationData1 Optional first data required for verifying priming data
+ * @param aVerificationData1 Optional second data required for verifying priming data
+ * @return Standard Symbian error code
+ */
+EXPORT_C TInt TTraceDataParser::ParsePrimingDataL(TDesC8&        aBuffer, 
+                                                  TGroupId       aGroupId, 
+                                                  TInt&          aNumPrimingTraces, 
+                                                  TInt&          aNumTraces, 
+                                                  TBool          aVerifyData, 
+                                                  TUint32        aVerificationData1, 
+                                                  TUint32        aVerificationData2)
+    {
+    aNumPrimingTraces = 0;
+    aNumTraces = 0;
+
+    TUint8*         data = (TUint8*) aBuffer.Ptr();
+    TUint8*         endOfData = data + aBuffer.Size();    
+    
+    // If the output data is to be verified but no verification data provided, try getting it automatically
+    if (aVerifyData && aVerificationData1 == 0 && aVerificationData2 == 0)
+        {
+        TInt err = GetPrimingVerificationDataL(data, endOfData-data, aGroupId, aVerificationData1, aVerificationData2);
+        if (err != KErrNone)
+            {
+            return err;
+            }
+        }
+    
+    TInt            returnErr = KErrNone;
+    TInt            dataVerificationErr = KErrNone;
+    TInt            generalErr = KErrNone;
+    TBool           firstTrace = ETrue;
+    TBool           startOfBatch = ETrue;
+    TBool           inPrimingData = EFalse;
+    TBool           useMetaTraces = EFalse;
+    TInt            numPotentialPrimingTraces = 0;
+    TUint32         lastTimestamp = 0;
+    TInt            elementsFound = 0;
+    
+    TTraceHeaderSettings  traceHeaderSettings;
+
+    // Loop through all traces
+    while (data < endOfData)
+        {
+        // Get trace info from header
+        generalErr = ParseHeader(data, endOfData-data, traceHeaderSettings);
+        
+        if (generalErr != KErrNone)
+            {
+            if (returnErr == KErrNone)
+                {
+                // Set error to return, if this is first error so far
+                returnErr = generalErr;
+                }
+            break;
+            }
+
+        // If this is a meta trace, work out if it signifies start of kernel priming data for GID of interest
+        if (traceHeaderSettings.iCategory == BTrace::EMetaTrace)
+            {
+            useMetaTraces = ETrue;
+            startOfBatch = IsStartOfKernelPrimingBatch(data, aGroupId, traceHeaderSettings.iCategory, traceHeaderSettings.iSubCategory);
+            }     
+        
+        // This is a trace of the correct GID/CID
+        if ( (traceHeaderSettings.iComponentID == KKernelHooksOSTComponentUID) && (traceHeaderSettings.iCategory == aGroupId) )
+            {
+            // Increase the number of traces for this GID
+            aNumTraces++;
+
+            if (useMetaTraces)
+                {
+                // If data contains meta traces, work out if this is a priming trace
+                if (startOfBatch)
+                    {
+                    // This is the start of a batch of priming traces
+                    inPrimingData = ETrue;
+                    startOfBatch = EFalse;
+                    }
+                if (inPrimingData)
+                    {
+                    // This is a priming trace, so increase number found for this GID
+                    aNumPrimingTraces++; 
+                    // If data is to be verified, attempt the verification
+                    if (aVerifyData)
+                        {
+                        dataVerificationErr = VerifyPrimingData(data, traceHeaderSettings.iLengthOfPayload, traceHeaderSettings.iCategory, traceHeaderSettings.iSubCategory, elementsFound, traceHeaderSettings.iFromTestWriter, aVerificationData1, aVerificationData2);
+                        }
+                    }
+                }
+            else
+                {
+                // If data contains no meta traces, work out if this is a priming trace using heuristics
+                generalErr = IsInPrimingBatch(traceHeaderSettings.iCategory, traceHeaderSettings.iSubCategory, traceHeaderSettings.iTimestamp-lastTimestamp, inPrimingData, firstTrace, startOfBatch);
+                if ( (generalErr != KErrNone) && (returnErr == KErrNone) )
+                    {
+                    // Set error to return, if this is first error so far
+                    returnErr = generalErr;
+                    }
+                lastTimestamp = traceHeaderSettings.iTimestamp;
+                if (inPrimingData)
+                    {
+                    // This is possibly a priming trace, so increase potential number found for this GID
+                    numPotentialPrimingTraces++;
+                    // If data is to be verified, attempt the verification
+                    if (aVerifyData)
+                        {
+                        dataVerificationErr = VerifyPrimingData(data, traceHeaderSettings.iLengthOfPayload, traceHeaderSettings.iCategory, traceHeaderSettings.iSubCategory, elementsFound, traceHeaderSettings.iFromTestWriter, aVerificationData1, aVerificationData2);
+                        }
+                    }
+                else
+                    {
+                    // If we have enough potential priming traces, assume they are priming traces
+                    if (numPotentialPrimingTraces >= KMinimumPrimingTracesInBatch)
+                        {
+                        aNumPrimingTraces += numPotentialPrimingTraces;
+                        }
+                    numPotentialPrimingTraces = 0;
+                    }                
+                }
+            }
+        else
+            {
+            // This is not a trace of the correct GID/CID
+            inPrimingData = EFalse;
+            }
+        
+        // Go to the next trace
+        data+=traceHeaderSettings.iLengthOfPayload;
+        }
+
+    if (!useMetaTraces)
+        {
+        // If we have enough potential priming traces left over, assume they are priming traces
+        if (numPotentialPrimingTraces >= KMinimumPrimingTracesInBatch)
+            {
+            aNumPrimingTraces += numPotentialPrimingTraces;
+            }
+        }
+
+    if ( (dataVerificationErr != KErrNone) && (returnErr == KErrNone) )
+        {
+        // Set error to return, if this is first error so far
+        returnErr = dataVerificationErr;
+        }
+    return returnErr;
+    }
+
+/*
+ * Parse trace data for kernel priming data
+ * 
+ * Note that this function can only verify priming data if the group ID is EThreadIdentification or EFastMutex,
+ * otherwise KErrNotSupported is returned if aVerifyData is ETrue
+ *
+ * @param aFilePath Full path of file containing the trace data
+ * @param aFs File system object
+ * @param aGroupId Group ID of traces to parse
+ * @param aNumPrimingTraces Output parameter set to number of priming traces found for given group ID
+ * @param aNumTraces Output parameter set to total number of traces found for given group ID
+ * @param aVerifyData Flag indicating if priming data should be verified
+ * @param aVerificationData1 Optional first data required for verifying priming data
+ * @param aVerificationData1 Optional second data required for verifying priming data
+ * @return Standard Symbian error code
+ */
+EXPORT_C TInt TTraceDataParser::ParsePrimingDataL(const TDesC&   aFilePath,
+                                                  RFs&           aFs, 
+                                                  TGroupId       aGroupId, 
+                                                  TInt&          aNumPrimingTraces, 
+                                                  TInt&          aNumTraces, 
+                                                  TBool          aVerifyData, 
+                                                  TUint32        aVerificationData1, 
+                                                  TUint32        aVerificationData2)
+    {
+    aNumPrimingTraces = 0;
+    aNumTraces = 0;
+    
+    RFile file;
+
+    // Open file with trace data
+    TInt err = file.Open(aFs, aFilePath, EFileRead|EFileShareAny);
+    if (err != KErrNone)
+        {
+        return err;
+        }
+    CleanupClosePushL(file);
+    
+    // If the output data is to be verified but no verification data provided, try getting it automatically
+    if (aVerifyData && aVerificationData1 == 0 && aVerificationData2 == 0)
+        {
+        err = GetPrimingVerificationDataL(NULL, 0, aGroupId, aVerificationData1, aVerificationData2, &file);
+        if (err != KErrNone)
+            {
+            CleanupStack::PopAndDestroy(&file); // close file
+            return err;
+            }
+        }
+    
+    RBuf8   fileBuffer;
+    TInt    filePos = 0;
+    
+    // Create file buffer and read first chunk from file
+    err = CreateFileBuffer(fileBuffer, file);
+    if (err != KErrNone)
+        {
+        CleanupStack::PopAndDestroy(&file); // close file
+        return err;
+        }
+    fileBuffer.CleanupClosePushL();
+    
+    TUint8* data = NULL;
+    TUint8* startOfData = NULL;
+    TUint8* endOfData = NULL;    
+
+    err = ReadNextChunkFromFile(fileBuffer, file, filePos, data, startOfData, endOfData);
+    if (err != KErrNone)
+        {
+        CleanupStack::PopAndDestroy(&fileBuffer); // close file buffer
+        CleanupStack::PopAndDestroy(&file); // close file
+        return err;
+        }
+
+    TInt            dataVerificationErr = KErrNone;
+    TInt            generalErr = KErrNone;
+    TBool           firstTrace = ETrue;
+    TBool           startOfBatch = ETrue;
+    TBool           inPrimingData = EFalse;
+    TBool           useMetaTraces = EFalse;
+    TInt            numPotentialPrimingTraces = 0;
+    TUint32         lastTimestamp = 0;
+    TInt            elementsFound = 0;
+    
+    TTraceHeaderSettings  traceHeaderSettings;
+
+    // Loop through all traces
+    while (data < endOfData)
+        {
+        // Get trace info from header
+        generalErr = ParseHeader(data, endOfData-data, traceHeaderSettings);
+        
+        if (generalErr == KErrOverflow)
+            {
+            // We don't have all the trace data, so read next chunk from file
+            generalErr = ReadNextChunkFromFile(fileBuffer, file, filePos, data, startOfData, endOfData);
+            if (generalErr == KErrNone)
+                {
+                continue;
+                }
+            }
+        if (generalErr != KErrNone)
+            {
+            if (err == KErrNone)
+                {
+                // Set error to return, if this is first error so far
+                err = generalErr;
+                }
+            break;
+            }
+
+        // If this is a meta trace, work out if it signifies start of kernel priming data for GID of interest
+        if (traceHeaderSettings.iCategory == BTrace::EMetaTrace)
+            {
+            useMetaTraces = ETrue;
+            startOfBatch = IsStartOfKernelPrimingBatch(data, aGroupId, traceHeaderSettings.iCategory, traceHeaderSettings.iSubCategory);
+            }     
+        
+        // This is a trace of the correct GID/CID
+        if ( (traceHeaderSettings.iComponentID == KKernelHooksOSTComponentUID) && (traceHeaderSettings.iCategory == aGroupId) )
+            {
+            // Increase the number of traces for this GID
+            aNumTraces++;
+
+            if (useMetaTraces)
+                {
+                // If data contains meta traces, work out if this is a priming trace
+                if (startOfBatch)
+                    {
+                    // This is the start of a batch of priming traces
+                    inPrimingData = ETrue;
+                    startOfBatch = EFalse;
+                    }
+                if (inPrimingData)
+                    {
+                    // This is a priming trace, so increase number found for this GID
+                    aNumPrimingTraces++; 
+                    // If data is to be verified, attempt the verification
+                    if (aVerifyData)
+                        {
+                        dataVerificationErr = VerifyPrimingData(data, traceHeaderSettings.iLengthOfPayload, traceHeaderSettings.iCategory, traceHeaderSettings.iSubCategory, elementsFound, traceHeaderSettings.iFromTestWriter, aVerificationData1, aVerificationData2);
+                        }
+                    }
+                }
+            else
+                {
+                // If data contains no meta traces, work out if this is a priming trace using heuristics
+                generalErr = IsInPrimingBatch(traceHeaderSettings.iCategory, traceHeaderSettings.iSubCategory, traceHeaderSettings.iTimestamp-lastTimestamp, inPrimingData, firstTrace, startOfBatch);
+                if ( (generalErr != KErrNone) && (err == KErrNone) )
+                    {
+                    // Set error to return, if this is first error so far
+                    err = generalErr;
+                    }
+                lastTimestamp = traceHeaderSettings.iTimestamp;
+                if (inPrimingData)
+                    {
+                    // This is possibly a priming trace, so increase potential number found for this GID
+                    numPotentialPrimingTraces++;
+                    // If data is to be verified, attempt the verification
+                    if (aVerifyData)
+                        {
+                        dataVerificationErr = VerifyPrimingData(data, traceHeaderSettings.iLengthOfPayload, traceHeaderSettings.iCategory, traceHeaderSettings.iSubCategory, elementsFound, traceHeaderSettings.iFromTestWriter, aVerificationData1, aVerificationData2);
+                        }
+                    }
+                else
+                    {
+                    // If we have enough potential priming traces, assume they are priming traces
+                    if (numPotentialPrimingTraces >= KMinimumPrimingTracesInBatch)
+                        {
+                        aNumPrimingTraces += numPotentialPrimingTraces;
+                        }
+                    numPotentialPrimingTraces = 0;
+                    }                
+                }
+            }
+        else
+            {
+            // This is not a trace of the correct GID/CID
+            inPrimingData = EFalse;
+            }
+        
+        // Go to the next trace
+        data+=traceHeaderSettings.iLengthOfPayload;
+
+        if (data == endOfData)
+            {
+            // We might not have all the trace data, so read next chunk from file
+            generalErr = ReadNextChunkFromFile(fileBuffer, file, filePos, data, startOfData, endOfData);
+            if (generalErr != KErrNone)
+                {
+                if (err == KErrNone)
+                    {
+                    // Set error to return, if this is first error so far
+                    err = generalErr;
+                    }
+                break;
+                }
+            }
+        }
+
+    if (!useMetaTraces)
+        {
+        // If we have enough potential priming traces left over, assume they are priming traces
+        if (numPotentialPrimingTraces >= KMinimumPrimingTracesInBatch)
+            {
+            aNumPrimingTraces += numPotentialPrimingTraces;
+            }
+        }
+
+    if ( (dataVerificationErr != KErrNone) && (err == KErrNone) )
+        {
+        // Set error to return, if this is first error so far
+        err = dataVerificationErr;
+        }
+
+    CleanupStack::PopAndDestroy(&fileBuffer); // close file buffer
+    CleanupStack::PopAndDestroy(&file); // close file
+
+    return err;
+    }
+
+TInt TTraceDataParser::CreateFileBuffer(RBuf8&  aFileBuffer, 
+                                        RFile&  aFile)
+    {
+    TInt fileSize;
+    TInt err = aFile.Size(fileSize);
+    if (err == KErrNone)
+        {
+        if (fileSize < KFileBufferSize)
+            {
+            err = aFileBuffer.Create(fileSize);
+            }
+        else
+            {
+            err = aFileBuffer.Create(KFileBufferSize);
+            }
+        }
+    return err;
+    }
+
+TInt TTraceDataParser::ReadNextChunkFromFile(TDes8&   aFileBuffer, 
+                                             RFile&   aFile, 
+                                             TInt&    aFilePosition,
+                                             TUint8*& aData,
+                                             TUint8*& aStartOfData,
+                                             TUint8*& aEndOfData)
+    {
+    aFilePosition += aData-aStartOfData;
+    TInt err = aFile.Read(aFilePosition, aFileBuffer);
+    if (err == KErrNone)
+        {
+        aData = (TUint8*) aFileBuffer.Ptr();
+        aStartOfData = aData;
+        aEndOfData = aData + aFileBuffer.Size();
+        }
+    return err;
+    }
+
+/*
+ * Parse trace data for Printf data, returning the number of occurances of a given string
+ *
+ * @param aBuffer Buffer containing the trace data
+ * @param aFindString String to search for
+ * @param aNumFound Output parameter set to number of occurances of given string
+ * @return Standard Symbian error code
+ */
+EXPORT_C TInt TTraceDataParser::DataHasPrintfString(TDesC8&        aBuffer,
+                                                    const TDesC8&  aFindString,
+                                                    TInt&          aNumFound)
+    {
+    aNumFound = 0;
+    
+    TInt            err = KErrNone;
+    TUint8*         data = (TUint8*) aBuffer.Ptr();
+    TUint8*         endOfData = data + aBuffer.Size();    
+    
+    TTraceHeaderSettings  traceHeaderSettings;
+
+    while(data < endOfData)
+        {
+        err = ParseHeader(data, endOfData-data, traceHeaderSettings);
+        
+        if (err != KErrNone)
+            {
+            break;
+            }
+        if (traceHeaderSettings.iPrintfTrace)
+            {
+            TPtr8 printfString = ReadTracePrintf(data, traceHeaderSettings.iLengthOfPayload);
+            if (StringsMatch(aFindString, printfString))
+                {
+                aNumFound++;
+                }
+            }
+        data += traceHeaderSettings.iLengthOfPayload; //go to next trace
+        }
+
+    return err;
+    }
+
+/*
+ * Parse trace data file for Printf data, returning the number of occurances of a given string
+ *
+ * @param aFilePath Full path of file containing the trace data
+ * @param aFs File system object
+ * @param aFindString String to search for
+ * @param aNumFound Output parameter set to number of occurances of given string
+ * @return Standard Symbian error code
+ */
+EXPORT_C TInt TTraceDataParser::DataHasPrintfStringL(const TDesC&   aFilePath,
+                                                     RFs&           aFs,
+                                                     const TDesC8&  aFindString,
+                                                     TInt&          aNumFound)
+    {
+    aNumFound = 0;
+    
+    RFile file;
+
+    // Open file with trace data
+    TInt err = file.Open(aFs, aFilePath, EFileRead|EFileShareAny);
+    if (err != KErrNone)
+        {
+        return err;
+        }
+    CleanupClosePushL(file);
+    
+    RBuf8   fileBuffer;
+    TInt    filePos = 0;
+    
+    // Create file buffer and read first chunk from file
+    err = CreateFileBuffer(fileBuffer, file);
+    if (err != KErrNone)
+        {
+        CleanupStack::PopAndDestroy(&file); // close file
+        return err;
+        }
+    fileBuffer.CleanupClosePushL();
+    
+    TUint8* data = NULL;
+    TUint8* startOfData = NULL;
+    TUint8* endOfData = NULL;    
+
+    err = ReadNextChunkFromFile(fileBuffer, file, filePos, data, startOfData, endOfData);
+    if (err != KErrNone)
+        {
+        CleanupStack::PopAndDestroy(&fileBuffer); // close file buffer
+        CleanupStack::PopAndDestroy(&file); // close file
+        return err;
+        }
+
+    TTraceHeaderSettings  traceHeaderSettings;
+
+    while(data < endOfData)
+        {
+        err = ParseHeader(data, endOfData-data, traceHeaderSettings);
+        
+        if (err == KErrOverflow)
+            {
+            // We don't have all the trace data, so read next chunk from file
+            err = ReadNextChunkFromFile(fileBuffer, file, filePos, data, startOfData, endOfData);
+            if (err == KErrNone)
+                {
+                continue;
+                }
+            }
+        if (err != KErrNone)
+            {
+            break;
+            }
+        if (traceHeaderSettings.iPrintfTrace)
+            {
+            TPtr8 printfString = ReadTracePrintf(data, traceHeaderSettings.iLengthOfPayload);
+            if (StringsMatch(aFindString, printfString))
+                {
+                aNumFound++;
+                }
+            }
+        data += traceHeaderSettings.iLengthOfPayload; //go to next trace
+
+        if (data == endOfData)
+            {
+            // We might not have all the trace data, so read next chunk from file
+            err = ReadNextChunkFromFile(fileBuffer, file, filePos, data, startOfData, endOfData);
+            if (err != KErrNone)
+                {
+                break;
+                }
+            }
+        }
+
+    CleanupStack::PopAndDestroy(&fileBuffer); // close file buffer
+    CleanupStack::PopAndDestroy(&file); // close file
+
+    return err;
+    }
+
+/*
+ * Parse trace data file for a sequence of traces
+ *
+ * @param aFilePath Full path of file containing the trace data
+ * @param aFs File system object
+ * @param aLastNumberFound Output parameter set to number in last occurances of given string
+ * @param aNumDroppedTraces Output parameter set to number of dropped traces
+ * @param aFindPrintfPattern Pattern that indicates where in the printf string the number will be, using an asterisk
+ *                           This is only used if aGroupId = BTrace::ERDebugPrintf
+ * @param aGroupId Group ID of traces to parse
+ * @param aComponentID Component ID of traces to parse
+ * @return Standard Symbian error code
+ */
+EXPORT_C TInt TTraceDataParser::DataHasTraceSequenceL(const TDesC&   aFilePath,
+                                                      RFs&           aFs,
+                                                      TInt&          aLastNumberFound,
+                                                      TInt&          aNumDroppedTraces, 
+                                                      TDesC8*        aFindPrintfPattern,
+                                                      TGroupId       aGroupId,
+                                                      TComponentId   aComponentID)
+    {
+    aLastNumberFound = 0;
+    aNumDroppedTraces = 0;
+    
+    RFile file;
+
+    // Open file with trace data
+    TInt err = file.Open(aFs, aFilePath, EFileRead|EFileShareAny);
+    if (err != KErrNone)
+        {
+        return err;
+        }
+    CleanupClosePushL(file);
+    
+    RBuf8   fileBuffer;
+    TInt    filePos = 0;
+    
+    // Create file buffer and read first chunk from file
+    err = CreateFileBuffer(fileBuffer, file);
+    if (err != KErrNone)
+        {
+        CleanupStack::PopAndDestroy(&file); // close file
+        return err;
+        }
+    fileBuffer.CleanupClosePushL();
+    
+    TUint8* data = NULL;
+    TUint8* startOfData = NULL;
+    TUint8* endOfData = NULL;    
+
+    err = ReadNextChunkFromFile(fileBuffer, file, filePos, data, startOfData, endOfData);
+    if (err != KErrNone)
+        {
+        CleanupStack::PopAndDestroy(&fileBuffer); // close file buffer
+        CleanupStack::PopAndDestroy(&file); // close file
+        return err;
+        }
+    
+    TInt            currentNumber = 0;
+    TInt            expectedNumber = 1;
+    TBool           gotNumberFromTrace = EFalse;
+    TBool           isDroppedTrace = EFalse;
+
+    TTraceHeaderSettings  traceHeaderSettings;
+
+    while(data < endOfData)
+        {
+        err = ParseHeader(data, endOfData-data, traceHeaderSettings);
+        
+        if (err == KErrOverflow)
+            {
+            // We don't have all the trace data, so read next chunk from file
+            err = ReadNextChunkFromFile(fileBuffer, file, filePos, data, startOfData, endOfData);
+            if (err == KErrNone)
+                {
+                continue;
+                }
+            }
+        if (err != KErrNone)
+            {
+            break;
+            }
+        
+        gotNumberFromTrace = EFalse;
+                    
+        if (traceHeaderSettings.iPrintfTrace && aGroupId == BTrace::ERDebugPrintf)
+            {
+            TPtr8 printfString = ReadTracePrintf(data, traceHeaderSettings.iLengthOfPayload);
+            // See if this is a printf that matches given string
+            if (!aFindPrintfPattern)
+                {
+                err = KErrArgument;
+                break;
+                }
+            else if (printfString.Match(*aFindPrintfPattern) != KErrNotFound)
+                {
+                // Get the line number from the string
+                err = ParseStringForNumber(printfString, *aFindPrintfPattern, currentNumber);
+                if (err != KErrNone)
+                    {
+                    // Could not extract number from printf, so stop and fail
+                    break;
+                    }
+                gotNumberFromTrace = ETrue;
+                } 
+            // See if this is a dropped trace
+            else if (printfString.Compare(KDroppedTrace()) == 0)
+                {
+                // If we get 2 dropped trace notifications in a row, return an error
+                if (isDroppedTrace)    
+                    {
+                    err = KErrGeneral;
+                    break;
+                    }
+                isDroppedTrace = ETrue;
+                }
+            else
+                {
+                isDroppedTrace = EFalse;
+                }
+            }
+        else if (!traceHeaderSettings.iPrintfTrace && traceHeaderSettings.iCategory == aGroupId && traceHeaderSettings.iComponentID == aComponentID)
+            {
+            // check dropped trace flag
+            if (traceHeaderSettings.iHeaderFlags & BTrace::EMissingRecord)
+                {
+                // If we get 2 dropped trace notifications in a row, return an error
+                if (isDroppedTrace)
+                    {
+                    err = KErrGeneral;
+                    break;
+                    }
+                isDroppedTrace = ETrue;
+                }
+            else
+                {
+                isDroppedTrace = EFalse;
+                }
+
+            if (traceHeaderSettings.iLengthOfPayload >= 4)
+                {
+                currentNumber = (TInt) Swap(ReadUint32FromBuf(data, traceHeaderSettings.iFromTestWriter));
+                traceHeaderSettings.iLengthOfPayload -= 4;
+                gotNumberFromTrace = ETrue;
+                }                
+            else
+                {
+                // Could not get number from trace, so stop and fail
+                err = KErrGeneral;
+                break;
+                }
+            }
+
+        if (gotNumberFromTrace)
+            {
+            if (currentNumber < expectedNumber)
+                {
+                // Start of a new sequence, so stop
+                break;
+                }
+            aLastNumberFound = currentNumber;
+            if (aLastNumberFound != expectedNumber && !isDroppedTrace)
+                {
+                // A printf has been missed out with no notification, so stop and fail
+                err = KErrGeneral;
+                break;
+                }
+            else if (aLastNumberFound == expectedNumber && isDroppedTrace)
+                {
+                // A printf hasn't been missed out despite notification, so stop and fail
+                err = KErrGeneral;
+                break;
+                }
+            
+            aNumDroppedTraces += (aLastNumberFound - expectedNumber);
+            expectedNumber = aLastNumberFound + 1;
+            
+            if (traceHeaderSettings.iPrintfTrace)
+                {
+                isDroppedTrace = EFalse;
+                }
+            }
+        
+        data += traceHeaderSettings.iLengthOfPayload; //go to next trace
+
+        if (data == endOfData)
+            {
+            // We might not have all the trace data, so read next chunk from file
+            err = ReadNextChunkFromFile(fileBuffer, file, filePos, data, startOfData, endOfData);
+            if (err != KErrNone)
+                {
+                break;
+                }
+            }
+        }
+
+    CleanupStack::PopAndDestroy(&fileBuffer); // close file buffer
+    CleanupStack::PopAndDestroy(&file); // close file
+
+    return err;
+    }
+
+/*
+ * Get Printf string from single trace data
+ *
+ * @param aBuffer Buffer containing the trace data
+ * @param aPrintfString Output parameter set to the print string in the trace data
+ * @return Standard Symbian error code
+ */
+EXPORT_C TInt TTraceDataParser::GetPrintfFromTrace(TDesC8& aBuffer, TDes8& aPrintfString)
+    {
+    TUint8*         data = (TUint8*) aBuffer.Ptr();
+
+    TTraceHeaderSettings  traceHeaderSettings;
+
+    TInt err = ParseHeader(data, aBuffer.Size(), traceHeaderSettings);
+
+    if (err == KErrNone && traceHeaderSettings.iPrintfTrace)
+        {
+        aPrintfString.Copy(ReadTracePrintf(data, traceHeaderSettings.iLengthOfPayload));
+        }
+    
+    return err;
+    }
+
+/*
+ * Parse trace data for multipart data, returning the number of traces found and total size of trace data.
+ * The data is expected to contain a sequence of integers, starting at 0
+ *
+ * @param aBuffer Buffer containing the trace data
+ * @param aGroupId Group ID of traces to parse
+ * @param aComponentID Component ID of traces to parse
+ * @param aMultipartDataSize Output parameter set to total size of data in multipart trace
+ * @param aNumMultipartTraces Output parameter set to number of traces that make up multipart trace
+ * @return Standard Symbian error code
+ */
+EXPORT_C TInt TTraceDataParser::ValidateMultipartTraces(TDesC8&        aBuffer,
+                                                        TGroupId       aGroupID, 
+                                                        TComponentId   aComponentID, 
+                                                        TInt&          aMultipartDataSize, 
+                                                        TInt&          aNumMultipartTraces)
+    {
+    aMultipartDataSize = 0;
+    aNumMultipartTraces = 0;
+    
+    TInt            err = KErrNone;
+    TUint8*         data = (TUint8*) aBuffer.Ptr();
+    TUint8*         endOfData = data + aBuffer.Size();    
+    TUint8          currentNumber = 0;
+    TUint8          expectedNumber = 0;
+    TUint32         expectedMultiPartTraceID = 0;
+    TBool           foundStartOfMultipart = EFalse;
+    TBool           foundEndOfMultipart = EFalse;
+    TBool           isMultipartTrace = EFalse;
+    
+    TTraceHeaderSettings  traceHeaderSettings;
+
+    while(data < endOfData)
+        {
+        err = ParseHeader(data, endOfData-data, traceHeaderSettings);
+        if (err != KErrNone)
+            {
+            return err;
+            }
+               
+        // Only look at traces with correct group ID / component ID
+        if (traceHeaderSettings.iCategory == aGroupID && traceHeaderSettings.iComponentID == aComponentID)
+            {
+            isMultipartTrace = EFalse;
+            if (traceHeaderSettings.iMultiPartType == BTrace::EMultipartFirst ||
+                traceHeaderSettings.iMultiPartType == BTrace::EMultipartMiddle ||
+                traceHeaderSettings.iMultiPartType == BTrace::EMultipartLast)
+                {
+                isMultipartTrace = ETrue;
+                }
+            
+            if (!isMultipartTrace)
+                {
+                // If not a multipart trace, then this one trace should contain all data
+                aNumMultipartTraces = 1;
+                aMultipartDataSize = traceHeaderSettings.iLengthOfPayload;
+                // If already found some of the data then we shouldn't have this trace
+                if (foundStartOfMultipart || foundEndOfMultipart)
+                    {
+                    return KErrCorrupt;
+                    }
+                foundStartOfMultipart = ETrue;
+                foundEndOfMultipart = ETrue;
+
+                // Validate payload
+                while (traceHeaderSettings.iLengthOfPayload > 0)
+                    {
+                    currentNumber = (TInt) data[0];
+                    data++;
+                    // Adjust length of payload remaining
+                    traceHeaderSettings.iLengthOfPayload -= 1;   
+                    if (currentNumber != expectedNumber)
+                        {
+                        if (traceHeaderSettings.iLengthOfPayload >= 4 || currentNumber != 0)
+                            {
+                            // Data is 4-byte aligned, so it's ok to have up to 3 zeros at the end of payload
+                            return KErrCorrupt;
+                            }
+                        // This byte is zero padding, so not part of data
+                        aMultipartDataSize--;
+                        }
+                    expectedNumber++;
+                    }
+                }
+            // Only look at multipart traces with correct multipart trace ID
+            else if (traceHeaderSettings.iMultiPartTraceID == expectedMultiPartTraceID || expectedMultiPartTraceID == 0)
+                {
+                aNumMultipartTraces++;
+                
+                // If already found all data then we shouldn't get another trace with this ID
+                if (foundEndOfMultipart)
+                    {
+                    return KErrCorrupt;
+                    }
+                
+                // Trace is start of multipart
+                if (traceHeaderSettings.iMultiPartType == BTrace::EMultipartFirst)
+                    {
+                    // If already found start of data then we shouldn't get this part
+                    if (foundStartOfMultipart)
+                        {
+                        return KErrCorrupt;
+                        }
+                    foundStartOfMultipart = ETrue;
+                    aMultipartDataSize = 0;
+                    
+                    // Set the expected multipart trace ID
+                    expectedMultiPartTraceID = traceHeaderSettings.iMultiPartTraceID;                    
+                    }
+                else if (traceHeaderSettings.iMultiPartType == BTrace::EMultipartMiddle ||
+                         traceHeaderSettings.iMultiPartType == BTrace::EMultipartLast)
+                    {
+                    // If not yet found start of data then we shouldn't get this part
+                    if (!foundStartOfMultipart)
+                        {
+                        return KErrCorrupt;
+                        }
+                    }
+                
+                // Add length of payload to size of total data found
+                aMultipartDataSize += traceHeaderSettings.iLengthOfPayload;
+
+                while (traceHeaderSettings.iLengthOfPayload > 0)
+                    {
+                    // Validate the next part of payload
+                    currentNumber = (TInt) data[0];
+                    data++;
+                    // Adjust length of payload remaining
+                    traceHeaderSettings.iLengthOfPayload -= 1;   
+                    if (currentNumber != expectedNumber)
+                        {
+                        if (traceHeaderSettings.iLengthOfPayload >= 4 || currentNumber != 0)
+                            {
+                            // Data is 4-byte aligned, so it's ok to have up to 3 zeros at the end of payload
+                            return KErrCorrupt;
+                            }
+                        // This byte is zero padding, so not part of data
+                        aMultipartDataSize--;
+                        }
+                    expectedNumber++;
+                    }
+
+                if (traceHeaderSettings.iMultiPartType == BTrace::EMultipartLast)
+                    {                    
+                    // Found end of trace data
+                    foundEndOfMultipart = ETrue;
+                    }
+                }
+            }
+        
+        data += traceHeaderSettings.iLengthOfPayload; //go to next trace
+        }
+
+    if (!foundEndOfMultipart)
+        {
+        // Did not find end of trace data, so return KErrNotFound
+        err = KErrNotFound;
+        }
+    return err;
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/traces/OstTraceDefinitions.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,24 @@
+/*
+* This is Default Licence added by TraceCompiler
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description:
+*
+*/
+#ifndef __OSTTRACEDEFINITIONS_H__
+#define __OSTTRACEDEFINITIONS_H__
+// OST_TRACE_COMPILER_IN_USE flag has been added by Trace Compiler
+// REMOVE BEFORE CHECK-IN TO VERSION CONTROL
+//#define OST_TRACE_COMPILER_IN_USE
+#include <opensystemtrace.h>
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/btrace_handler/traces/fixed_id.definitions	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,163 @@
+##
+# This is Default Licence added by TraceCompiler
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "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:
+#
+# Description: 
+#
+##
+#Fixed group and trace id definitions. If this file is removed, the identifiers are rebuilt.
+[GROUP]TRACE_BORDER=0x84
+[GROUP]TRACE_ERROR=0x82
+[GROUP]TRACE_FLOW=0x8a
+[GROUP]TRACE_IMPORTANT=0x85
+[GROUP]TRACE_INTERNAL=0xde
+[GROUP]TRACE_INTERNALS=0x88
+[GROUP]TRACE_NORMAL=0x86
+[TRACE]TRACE_BORDER[0x84]_DBTRACECATEGORYHANDLER_ADDCATEGORY_ENTRY=0x7
+[TRACE]TRACE_BORDER[0x84]_DBTRACECATEGORYHANDLER_ADDCATEGORY_EXIT=0x8
+[TRACE]TRACE_BORDER[0x84]_DBTRACECATEGORYHANDLER_REGISTER_EXIT=0x9
+[TRACE]TRACE_BORDER[0x84]_DTRACEACTIVATIONIF_DEACTIVATETRACE_ENTRY=0xb
+[TRACE]TRACE_BORDER[0x84]_DTRACECOREMEDIAPLUGIN_MESSAGERECEIVED_ENTRY=0x2
+[TRACE]TRACE_BORDER[0x84]_DTRACECOREMEDIAPLUGIN_REGISTER_EXIT=0x1
+[TRACE]TRACE_BORDER[0x84]_DTRACECORENOTIFIER_TRACEERROR_RETURNED_FROM_NOTIFICATION_RECEIVER=0x23
+[TRACE]TRACE_BORDER[0x84]_DTRACECORESETTINGS_REGISTER_EXIT=0xc
+[TRACE]TRACE_BORDER[0x84]_DTRACECORESUBSCRIBER_SUBSCRIBE_ENTRY=0x3
+[TRACE]TRACE_BORDER[0x84]_DTRACECORESUBSCRIBER_SUBSCRIBE_EXIT=0x24
+[TRACE]TRACE_BORDER[0x84]_DTRACECORESUBSCRIBER_UNSUBSCRIBE_ENTRY=0x5
+[TRACE]TRACE_BORDER[0x84]_DTRACECOREWRITER_REGISTER_EXIT=0x6
+[TRACE]TRACE_BORDER[0x84]_MTRACECORENOTIFICATIONRECEIVER_REGISTERNOTIFICATIONRECEIVER_ENTRY=0x13
+[TRACE]TRACE_BORDER[0x84]_MTRACECORENOTIFICATIONRECEIVER_REGISTERNOTIFICATIONRECEIVER_EXIT=0x14
+[TRACE]TRACE_BORDER[0x84]_MTRACECORENOTIFICATIONRECEIVER_TRACEERROR_ENTRY=0x16
+[TRACE]TRACE_BORDER[0x84]_MTRACECORENOTIFICATIONRECEIVER_UNREGISTERNOTIFICATIONRECEIVER_ENTRY=0x15
+[TRACE]TRACE_BORDER[0x84]_SEND_NOTIFICATION_IMMEDIATELY=0x12
+[TRACE]TRACE_ERROR[0x82]_DBTRACEOSTCATEGORYBITMAP_OVERWRITEGROUPS_ERROR=0x1
+[TRACE]TRACE_FLOW[0x8A]_DBTRACECATEGORYHANDLER_UNREGISTER_ENTRY=0x20
+[TRACE]TRACE_FLOW[0x8A]_DBTRACECOREACTIVATIONBASE_NOTIFYINTERNALACTIVATION_ENTRY=0x25
+[TRACE]TRACE_FLOW[0x8A]_DBTRACECOREACTIVATIONBASE_REGISTERACTIVATIONNOTIFICATION_ENTRY=0x23
+[TRACE]TRACE_FLOW[0x8A]_DBTRACECOREACTIVATIONBASE_REGISTERACTIVATIONNOTIFICATION_EXIT=0x24
+[TRACE]TRACE_FLOW[0x8A]_DBTRACEKERNELCATEGORYHANDLER_ACTIVATIONCHANGED_ENTRY=0x27
+[TRACE]TRACE_FLOW[0x8A]_DBTRACEKERNELCATEGORYHANDLER_PREPARESETWRITER_ENTRY=0x26
+[TRACE]TRACE_FLOW[0x8A]_DBTRACEKERNELCATEGORYHANDLER_PRIMEDFC=0x50
+[TRACE]TRACE_FLOW[0x8A]_DBTRACEKERNELCATEGORYHANDLER_PRIMEDFC_ENTRY=0x28
+[TRACE]TRACE_FLOW[0x8A]_DBTRACEOSTCATEGORYBITMAP_ACTIVATETRACE_ENTRY=0x2d
+[TRACE]TRACE_FLOW[0x8A]_DBTRACEOSTCATEGORYBITMAP_ADDCOMPONENTID_ENTRY=0x33
+[TRACE]TRACE_FLOW[0x8A]_DBTRACEOSTCATEGORYBITMAP_ADDCOMPONENTID_EXIT=0x34
+[TRACE]TRACE_FLOW[0x8A]_DBTRACEOSTCATEGORYBITMAP_ADDGROUPID_ENTRY=0x37
+[TRACE]TRACE_FLOW[0x8A]_DBTRACEOSTCATEGORYBITMAP_ADDGROUPID_EXIT=0x38
+[TRACE]TRACE_FLOW[0x8A]_DBTRACEOSTCATEGORYBITMAP_DEACTIVATETRACE_ENTRY=0x30
+[TRACE]TRACE_FLOW[0x8A]_DBTRACEOSTCATEGORYBITMAP_FINDCOMPONENTID_ENTRY=0x31
+[TRACE]TRACE_FLOW[0x8A]_DBTRACEOSTCATEGORYBITMAP_FINDCOMPONENTID_EXIT=0x32
+[TRACE]TRACE_FLOW[0x8A]_DBTRACEOSTCATEGORYBITMAP_OVERWRITEGROUPS_ENTRY=0x2e
+[TRACE]TRACE_FLOW[0x8A]_DBTRACEOSTCATEGORYBITMAP_OVERWRITEGROUPS_EXIT=0x2f
+[TRACE]TRACE_FLOW[0x8A]_DBTRACEOSTCATEGORYBITMAP_READOSTFRAMEGROUPS_ENTRY=0x41
+[TRACE]TRACE_FLOW[0x8A]_DBTRACEOSTCATEGORYBITMAP_READOSTFRAMEGROUPS_EXIT_=0x42
+[TRACE]TRACE_FLOW[0x8A]_DBTRACEOSTCATEGORYBITMAP_READOSTFRAME_EXIT=0x3c
+[TRACE]TRACE_FLOW[0x8A]_DBTRACEOSTCATEGORYBITMAP_READOSTFRAME_EXIT_=0x40
+[TRACE]TRACE_FLOW[0x8A]_DBTRACEOSTCATEGORYBITMAP_READOSTPROTOCOLFRAMEGROUPS_ENTRY=0x3d
+[TRACE]TRACE_FLOW[0x8A]_DBTRACEOSTCATEGORYBITMAP_READOSTPROTOCOLFRAMEGROUPS_EXIT=0x3e
+[TRACE]TRACE_FLOW[0x8A]_DBTRACEOSTCATEGORYBITMAP_READOSTPROTOCOLFRAME_ENTRY=0x3b
+[TRACE]TRACE_FLOW[0x8A]_DBTRACEOSTCATEGORYBITMAP_REMOVECOMPONENTID_ENTRY=0x35
+[TRACE]TRACE_FLOW[0x8A]_DBTRACEOSTCATEGORYBITMAP_REMOVECOMPONENTID_EXIT=0x36
+[TRACE]TRACE_FLOW[0x8A]_DBTRACEOSTCATEGORYBITMAP_REMOVEGROUPID_ENTRY=0x39
+[TRACE]TRACE_FLOW[0x8A]_DBTRACEOSTCATEGORYBITMAP_REMOVEGROUPID_EXIT=0x3a
+[TRACE]TRACE_FLOW[0x8A]_DBTRACEOSTCATEGORYHANDLER_ACTIVATIONCHANGED_ENTRY=0x2c
+[TRACE]TRACE_FLOW[0x8A]_DBTRACEOSTCATEGORYHANDLER_SETSETTINGS_ENTRY=0x2b
+[TRACE]TRACE_FLOW[0x8A]_DTRACECOREBTRACEHANDLER_REGISTERCATEGORYHANDLER_ENTRY=0x1e
+[TRACE]TRACE_FLOW[0x8A]_DTRACECOREBTRACEHANDLER_SETSETTINGS_ENTRY=0x1d
+[TRACE]TRACE_FLOW[0x8A]_DTRACECOREBTRACEHANDLER_SETWRITER_ENTRY=0x1c
+[TRACE]TRACE_FLOW[0x8A]_DTRACECOREBTRACEHANDLER_UNREGISTERCATEGORYHANDLER_ENTRY=0x1f
+[TRACE]TRACE_FLOW[0x8A]_DTRACECOREHANDLER_UNREGISTER_ENTRY=0x18
+[TRACE]TRACE_FLOW[0x8A]_DTRACECOREMEDIAPLUGIN_MERGEHEADERANDDATA_EXIT=0xf
+[TRACE]TRACE_FLOW[0x8A]_DTRACECORENOTIFIER_GETCOMPONENTREGISTEREDGROUPIDS_ENTRY=0x49
+[TRACE]TRACE_FLOW[0x8A]_DTRACECORENOTIFIER_GETCOMPONENTREGISTEREDGROUPIDS_EXIT=0x4a
+[TRACE]TRACE_FLOW[0x8A]_DTRACECORENOTIFIER_REGISTERNOTIFICATIONRECEIVER_ENTRY=0x47
+[TRACE]TRACE_FLOW[0x8A]_DTRACECORENOTIFIER_REGISTERNOTIFICATIONRECEIVER_EXIT=0x48
+[TRACE]TRACE_FLOW[0x8A]_DTRACECORENOTIFIER_TRACEACTIVATED_ENTRY=0x43
+[TRACE]TRACE_FLOW[0x8A]_DTRACECORENOTIFIER_TRACEDEACTIVATED_ENTRY=0x44
+[TRACE]TRACE_FLOW[0x8A]_DTRACECORENOTIFIER_TRACEERROR_ENTRY=0x45
+[TRACE]TRACE_FLOW[0x8A]_DTRACECORENOTIFIER_TRACEERROR_EXIT=0x46
+[TRACE]TRACE_FLOW[0x8A]_DTRACECORENOTIFIER_UNREGISTERNOTIFICATIONRECEIVERALL_ENTRY=0x4c
+[TRACE]TRACE_FLOW[0x8A]_DTRACECORENOTIFIER_UNREGISTERNOTIFICATIONRECEIVER_ENTRY=0x4b
+[TRACE]TRACE_FLOW[0x8A]_DTRACECOREOSTLDDIF_GETSET_ENTRY=0x4f
+[TRACE]TRACE_FLOW[0x8A]_DTRACECOREPLUGINIF_MESSAGERECEIVED_ENTRY=0xb
+[TRACE]TRACE_FLOW[0x8A]_DTRACECOREPLUGINIF_REGISTERPLUGIN_ENTRY=0xc
+[TRACE]TRACE_FLOW[0x8A]_DTRACECOREPLUGINIF_REGISTERPLUGIN_EXIT=0xd
+[TRACE]TRACE_FLOW[0x8A]_DTRACECOREPLUGINIF_SEND_ENTRY=0x9
+[TRACE]TRACE_FLOW[0x8A]_DTRACECOREPLUGINIF_SEND_EXIT=0xa
+[TRACE]TRACE_FLOW[0x8A]_DTRACECOREPLUGINIF_UNREGISTERPLUGIN_ENTRY=0xe
+[TRACE]TRACE_FLOW[0x8A]_DTRACECOREPRINTFTRACEHANDLER_PREPARESETWRITER_ENTRY=0x19
+[TRACE]TRACE_FLOW[0x8A]_DTRACECOREPRINTFTRACEHANDLER_TRACEACTIVATED=0x1a
+[TRACE]TRACE_FLOW[0x8A]_DTRACECOREPRINTFTRACEHANDLER_TRACEDEACTIVATED=0x1b
+[TRACE]TRACE_FLOW[0x8A]_DTRACECOREROUTER_MESSAGERECEIVED_ENTRY=0x13
+[TRACE]TRACE_FLOW[0x8A]_DTRACECOREROUTER_MESSAGERECEIVED_EXIT=0x14
+[TRACE]TRACE_FLOW[0x8A]_DTRACECOREROUTER_SUBSCRIBE_ENTRY=0x15
+[TRACE]TRACE_FLOW[0x8A]_DTRACECOREROUTER_SUBSCRIBE_EXIT=0x16
+[TRACE]TRACE_FLOW[0x8A]_DTRACECOREROUTER_UNSUBSCRIBEALL_ENTRY=0x17
+[TRACE]TRACE_FLOW[0x8A]_DTRACECORESENDRECEIVE_MESSAGERECEIVED_ENTRY=0x10
+[TRACE]TRACE_FLOW[0x8A]_DTRACECORESENDRECEIVE_MESSAGERECEIVED_EXIT=0x11
+[TRACE]TRACE_FLOW[0x8A]_DTRACECORESENDRECEIVE_SENDMESSAGE_EXIT=0x12
+[TRACE]TRACE_FLOW[0x8A]_DTRACECORESETTINGS_UNREGISTER_EXIT=0x2a
+[TRACE]TRACE_FLOW[0x8A]_DTRACECORE_REGISTERHANDLER_ENTRY=0x3
+[TRACE]TRACE_FLOW[0x8A]_DTRACECORE_REGISTERHANDLER_EXIT=0x4
+[TRACE]TRACE_FLOW[0x8A]_DTRACECORE_REGISTERWRITER_ENTRY=0x5
+[TRACE]TRACE_FLOW[0x8A]_DTRACECORE_REGISTERWRITER_EXIT=0x6
+[TRACE]TRACE_FLOW[0x8A]_DTRACECORE_SWITCHTOWRITER_ENTRY=0x7
+[TRACE]TRACE_FLOW[0x8A]_DTRACECORE_SWITCHTOWRITER_EXIT=0x8
+[TRACE]TRACE_FLOW[0x8A]_DTraceCoreInternalMessageHandler_MESSAGERECEIVED_ENTRY=0x21
+[TRACE]TRACE_FLOW[0x8A]_DTraceCoreInternalMessageHandler_SENDRESPONSE_ENTRY=0x22
+[TRACE]TRACE_FLOW[0x8A]_NOTIFY_IMMEDIATELY_ENTRY=0x4d
+[TRACE]TRACE_FLOW[0x8A]_TRACECOREMESSAGEUTILS_GETMESSAGELENGTH_EXIT=0x4e
+[TRACE]TRACE_IMPORTANT[0x85]_DBTRACEOSTCATEGORYBITMAP_ACTIVATETRACE_INVALID_GROUP=0x2
+[TRACE]TRACE_IMPORTANT[0x85]_DBTRACEOSTCATEGORYBITMAP_ADDCOMPONENTID_INSERT_FAILED=0x5
+[TRACE]TRACE_IMPORTANT[0x85]_DBTRACEOSTCATEGORYBITMAP_DEACTIVATEALL_ENTRY=0x4
+[TRACE]TRACE_IMPORTANT[0x85]_DBTRACEOSTCATEGORYBITMAP_DEACTIVATETRACE_INVALID_GROUP=0x3
+[TRACE]TRACE_IMPORTANT[0x85]_DBTRACEOSTCATEGORYBITMAP_MESSAGERECEIVED_INVALID_MESSAGE_ID=0x8
+[TRACE]TRACE_IMPORTANT[0x85]_DBTRACEOSTCATEGORYBITMAP_READOSTFRAMEGROUPS__=0x6
+[TRACE]TRACE_IMPORTANT[0x85]_DBTRACEOSTCATEGORYBITMAP_READOSTFRAME_TOO_SHORT_FRAME=0x7
+[TRACE]TRACE_IMPORTANT[0x85]_DTRACEACTIVATIONIF_DEACTIVATETRACE_NO_ACTIVATION=0xc
+[TRACE]TRACE_IMPORTANT[0x85]_DTRACEACTIVATIONIF_DEACTIVATETRACE_NULL_TRACECORE=0xd
+[TRACE]TRACE_IMPORTANT[0x85]_DTRACECOREHANDLER_REGISTER_NO_TRACECORE=0x1
+[TRACE]TRACE_IMPORTANT[0x85]_TRACECOREMESSAGEUTILS_GETMESSAGELENGTH_NOT_SUPPORTED=0xb
+[TRACE]TRACE_IMPORTANT[0x85]_TTRACECOREISAUTILS_GETMESSAGELENGTH_INVALID_HEADER_LENGTH=0x9
+[TRACE]TRACE_IMPORTANT[0x85]_TTRACECOREISAUTILS_GETMESSAGELENGTH_MESSAGE_TOO_SHORT=0xa
+[TRACE]TRACE_INTERNALS[0x88]_DTRACECOREBTRACEHANDLER_SETWRITER_WRITERTYPE=0x1
+[TRACE]TRACE_INTERNAL[0xDE]_DBTRACEKERNELCATEGORYHANDLER_PRIMEDFC_NOT_SUPPORTED=0x1
+[TRACE]TRACE_INTERNAL[0xDE]_DBTRACEOSTCATEGORYBITMAP_READOSTFRAME_NOT_FOUND=0x3
+[TRACE]TRACE_INTERNAL[0xDE]_DBTRACEOSTCATEGORYBITMAP_REMOVEGROUPID_NOTIFIER_DEACTIVATED=0x2
+[TRACE]TRACE_NORMAL[0x86]_DBTRACEKERNELCATEGORYHANDLER_PRIMEDFC__=0xe
+[TRACE]TRACE_NORMAL[0x86]_DBTRACEOSTCATEGORYBITMAP_MESSAGERECEIVED_ACTIVATION_QUERY_NOT_IMPLEMENTED=0xf
+[TRACE]TRACE_NORMAL[0x86]_DTRACECOREBTRACEHANDLER_REGISTERCATEGORYHANDLER_HANDLER_REGISTERED=0xb
+[TRACE]TRACE_NORMAL[0x86]_DTRACECOREBTRACEHANDLER_UNREGISTERCATEGORYHANDLER_UNREGISTERED=0xc
+[TRACE]TRACE_NORMAL[0x86]_DTRACECORENOTIFIER_REGISTERNOTIFICATIONRECEIVER_REGISTERED=0x10
+[TRACE]TRACE_NORMAL[0x86]_DTRACECORENOTIFIER_UNREGISTERNOTIFICATIONRECEIVER_UNREGISTERED_=0x11
+[TRACE]TRACE_NORMAL[0x86]_DTRACECOREPLUGINIF_UNREGISTERPLUGIN_UNREGISTERED=0x4
+[TRACE]TRACE_NORMAL[0x86]_DTRACECOREPRINTFTRACEHANDLER_PREPARESETWRITER_HANDLER_NOT_CHANGED=0xa
+[TRACE]TRACE_NORMAL[0x86]_DTRACECOREPRINTFTRACEHANDLER_PREPARESETWRITER_HANDLER_RESET=0x9
+[TRACE]TRACE_NORMAL[0x86]_DTRACECOREPRINTFTRACEHANDLER_SETWRITER_HANDLER_STARTED=0x8
+[TRACE]TRACE_NORMAL[0x86]_DTRACECOREROUTER_SUBSCRIBE_SUBSCRIBED_TO_MESSAGE=0x5
+[TRACE]TRACE_NORMAL[0x86]_DTRACECOREROUTER_UNSUBSCRIBEALL_UNSUBSCRIBED=0x7
+[TRACE]TRACE_NORMAL[0x86]_DTRACECOREROUTER_UNSUBSCRIBE_UNSUBSCRIBED=0x6
+[TRACE]TRACE_NORMAL[0x86]_DTRACECORE_SETWRITERTOHANDLERS_WRITER_SELECTED=0x3
+[TRACE]TRACE_NORMAL[0x86]_DTRACECORE_UNREGISTERHANDLER_HANDLER_REMOVED=0x1
+[TRACE]TRACE_NORMAL[0x86]_DTRACECORE_UNREGISTERHANDLER_WRITER_UNREGISTERED=0x2
+[TRACE]TRACE_NORMAL[0x86]_DTraceCoreInternalMessageHandler_HandleOstVersionQuery_entry=0xd
+[[OBSOLETE]][TRACE]TRACE_BORDER[0x84]_DTRACEACTIVATIONIF_ACTIVATETRACE_ENTRY=0xa
+[[OBSOLETE]][TRACE]TRACE_BORDER[0x84]_DTRACEACTIVATIONIF_DEACTIVATETRACE_EXIT=0x22
+[[OBSOLETE]][TRACE]TRACE_BORDER[0x84]_DTRACECORENOTIFICATIONRECEIVER_REGISTERNOTIFICATIONRECEIVER_ENTRY=0xd
+[[OBSOLETE]][TRACE]TRACE_BORDER[0x84]_DTRACECORENOTIFICATIONRECEIVER_REGISTERNOTIFICATIONRECEIVER_EXIT=0xe
+[[OBSOLETE]][TRACE]TRACE_BORDER[0x84]_DTRACECORENOTIFICATIONRECEIVER_TRACEERROR_ENTRY=0x10
+[[OBSOLETE]][TRACE]TRACE_BORDER[0x84]_DTRACECORENOTIFICATIONRECEIVER_UNREGISTERNOTIFICATIONRECEIVER_ENTRY=0xf
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x8A]_DBTRACEKERNELCATEGORYHANDLER_PRIMECATEGORY_ENTRY=0x29
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x8A]_DBTRACEOSTCATEGORYBITMAP_READOSTFRAME_ENTRY=0x3f
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x8A]_DTRACECORE_GETACTIVATION_ENTRY=0x1
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x8A]_DTRACECORE_GETACTIVATION_EXIT=0x2
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/group/bld.inf	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,24 @@
+// 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 "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:
+//
+// Description:
+//
+
+#include "../tracecert/group/bld.inf"
+#include "../btrace_handler/group/bld.inf"
+#include "../writers/xti/common/group/bld.inf"
+
+
+PRJ_EXPORTS
+tracecoresf.iby           /epoc32/rom/include/tracecoresf.iby
+tracecore.hrh			OS_LAYER_PLATFORM_EXPORT_PATH(tracecore.hrh)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/group/tracecore.hrh	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,27 @@
+// 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 "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:
+//
+// Description:
+// 
+//  
+
+// common definition for tracecore project
+
+
+#ifndef __TRACECORE_HRH_INCLUDED__
+#define __TRACECORE_HRH_INCLUDED__
+
+#ifndef VID_DEFAULT
+#define VID_DEFAULT 0x101FB657 //was 0x70000001
+#endif 
+
+#endif // __TRACECORE_HRH_INCLUDED__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/group/tracecoresf.iby	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,36 @@
+// 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 "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:
+//
+// Description:
+// ROM build file for tracecore project
+
+#ifndef TRACECORESF_IBY
+#define TRACECORESF_IBY
+
+#include <ost.iby>
+
+
+///////////////////////// TraceCertification /////////////////////////
+ROM_IMAGE[0] extension[VARID]=KERNEL_DIR\DEBUG_DIR\trace_certification.dll	SHARED_LIB_DIR\trace_certification.dll 
+
+////////////////////////// TraceCore //////////////////////////
+
+ROM_IMAGE[0] extension[VARID]=KERNEL_DIR\DEBUG_DIR\tracecore.dll				\sys\bin\tracecore.dll
+
+///////////////////////// Xti Writer ///////////////////////// 
+//ROM_IMAGE[0] extension[VARID]=KERNEL_DIR\DEBUG_DIR\_PLATFORM_NAME_xtiwriter.dll			SHARED_LIB_DIR\xtiwriter.dll
+
+///////////////////////// Xti Plugin /////////////////////////
+
+//extension[VARID]=KERNEL_DIR\DEBUG_DIR\_PLATFORM_NAME_tracecorextiifplugin.dll                    SHARED_LIB_DIR\tracecorextiifplugin.dll
+
+#endif // TRACECORESF_IBY
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/plugins/xti_if/common/inc/TraceCoreMessageUtils.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,53 @@
+// 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 "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:
+//
+// Description:
+// Utility functions for messaging
+
+#ifndef __TIsaIfMessageUtils_H__
+#define __TIsaIfMessageUtils_H__
+
+
+// Include files
+#include <kernel/kernel.h>
+
+
+// Forward declarations
+class TTraceMessage;
+
+
+/**
+ * Utility functions for messaging
+ */
+class TXtiIfMessageUtils
+	{
+public:
+    /**
+     * Get the message length 
+     * 
+     * @param aMsg Message to be sent.
+     * @return length of one of symbian error codes
+     */
+    static TInt GetMessageLength( const TTraceMessage& aMsg );
+    
+    /**
+     * Merges the header and data into a single buffer
+     * 
+     * @param aMsg Message to be sent.
+     * @param aMsgBlock The message block where data is merged
+     * @return Symbian error code
+     */
+    static TInt MergeHeaderAndData( const TTraceMessage& aMsg, TDes8& aTarget );
+	};
+    
+
+#endif /*__TRACECOREISAUTILS_H__*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/plugins/xti_if/common/inc/TraceCoreXtiIf.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,145 @@
+// 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 "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:
+//
+// Description:
+// Interface class for XTI IF. 
+
+
+#ifndef __TRACECOREXTIIF_H__
+#define __TRACECOREXTIIF_H__
+
+
+// Include files
+#include <kernel/kernel.h>
+#include <TraceCoreMediaPlugin.h>
+#include "TraceCoreMediaIf.h"
+
+/**
+ * Interface class for XTI
+ */
+NONSHARABLE_CLASS( DTraceCoreXtiIf ) : public DTraceCoreMediaPlugin
+    {
+public:
+
+    /**
+     * Constructor
+     */
+    DTraceCoreXtiIf();
+    
+    /**
+     * Destructor
+     */
+    ~DTraceCoreXtiIf();
+    
+    /**
+     * Initializes this interface
+     */
+    TInt Init( );
+        
+	 /**
+	  * Sends a message
+	  *
+	  * @param aMessage The message to be sent
+	  */
+	 TInt Send( TTraceMessage &aMessage );
+    
+    /**
+     * Called by TraceCore to send a message out
+     */
+    virtual TInt SendMessage( TTraceMessage &aMsg );
+    
+private:
+
+    /**
+     * Starts a timer which calls XtiRegister
+     */
+	void StartTimer();
+	
+	/**
+	 * Timer callback function, register trace core to XTI driver
+	 */
+    static void XtiRegister( TAny* aPtr );
+    
+    /**
+     * Called from the static timer callback function to perform registration
+     */
+    void XtiRegister();
+    
+    /**
+     * DFC function for incoming data from XTI driver
+     */
+    static void ReceiveDfc( TAny* aPtr );
+    
+    /**
+     * Called from the static DFC function to process incoming data
+     */
+    void ReceiveDfc();
+    
+    /**
+     * Add registering to own Dfc
+     */
+    static void XtiRegisterDfc( TAny* aPtr );
+    
+    /**
+     * Forwards incoming message to callback
+     */
+    void NotifyCallback();
+
+    /**
+     * Sends message to XTI
+     * 
+     * @param aMsg Message to be sent.
+     * @return KErrNone if send successful
+     */
+    void SendData( TTraceMessage& aMsg );
+    
+private:
+
+    /**
+     * DFC which is used for incoming ISI-messages
+     */
+    TDfc iReceiveDfc;
+    
+    /**
+     * DFC which is used to receive data from XTI driver
+     */
+    TDfc iXtiRegisterDfc;
+    
+    /**
+     * Timer which is used for registration to XTI driver
+     */
+    TTickLink iXtiRegisterTimer;
+    
+    /**
+     * ISA Kernel IF Initialisation status
+     */
+    TInt iStatus;
+    
+    /** 
+     * Length variable for ISA Kernel interface usage
+     */
+    TUint16 iNeededLength;
+ 
+     /**
+     * Buffer for sending data
+     **/
+    TBuf8< 8204 > iSendBuffer;
+       
+    /**
+     * Buffer for incoming data
+     **/
+    TBuf8< 8204 > iReceiveBuffer;
+    };
+
+#endif // __TRACECOREXTIIF_H__
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/plugins/xti_if/common/src/TraceCoreXtiIf.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,353 @@
+// 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 "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:
+//
+// Description:
+
+
+//- Include Files  ----------------------------------------------------------
+#include <pn_const.h>
+#include <phonetisi.h>
+#include <xtirx.h>
+#include <xtitx.h>
+
+#include "TraceCore.h"
+#include "TraceCoreXtiIf.h" 
+#include "TraceCoreDebug.h"
+#include "TraceCoreMediaIfCallback.h"
+#include "TraceCoreSubscriber.h"
+#include "TraceCoreMessageUtils.h"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "TraceCoreXtiIfTraces.h"
+#endif
+
+#include "xtipluginvariantconstants.h"
+
+/**
+ * 200 millisecond pulse time (0.2 sec)
+ */
+const TUint KXtiRegisterTimer = 200000;
+
+/** 
+ * Default DFC queue priority
+ */
+const TUint8 KDefaultDfcPriority = 3;
+
+/*
+ * ISI header remainder length, 2 + 2 filler bytes
+ */
+const TInt KIsiHeaderRemainder = 4;
+
+
+/**
+ * Prints a message
+ *
+ * @param aMsg Reference to a message. 
+ */
+static void DebugPrintMsg( const TDesC8& aMsg )            
+    {
+    // Phonet message structure print
+    OstTraceData( TRACE_DUMP, TRACECOREXTIIF_PS_DEBUGPRINTMSG,
+    		"DTraceCoreXtiIf::DebugPrintMsg - Msg via XTI IF 0x%{hex8[]}", aMsg.Ptr(), aMsg.Size() );
+    }
+
+/**
+ * Constructor
+ */
+DTraceCoreXtiIf::DTraceCoreXtiIf()
+: iReceiveDfc( DTraceCoreXtiIf::ReceiveDfc, this, DTraceCore::GetActivationQ(), KDefaultDfcPriority )
+, iXtiRegisterDfc( DTraceCoreXtiIf::XtiRegister, this, DTraceCore::GetActivationQ(), KDefaultDfcPriority )
+, iStatus( 0 )
+    {
+    // No implementation in constructor
+    }
+
+/**
+ * Destructor
+ */
+DTraceCoreXtiIf::~DTraceCoreXtiIf()
+    {
+    //iCallback = NULL; 
+    }
+
+/**
+ * Initializes the XTI IF
+ *
+ * @param aCallBack Callback to TraceCore
+ */
+TInt DTraceCoreXtiIf::Init( /*MTraceCoreMediaIfCallback& aCallback*/ )
+    {
+    TC_TRACE( ETraceLevelFlow, Kern::Printf( "> DTraceCoreXtiIf::Init" ) );
+    
+    // Register media plugin to TraceCore
+    TInt ret = Register();
+    
+    StartTimer();
+    TC_TRACE( ETraceLevelFlow, Kern::Printf( "< DTraceCoreXtiIf::Init" ) );
+    return KErrNone;
+    }
+
+/**
+ * Starts the timer which calls the initialization function
+ */
+void DTraceCoreXtiIf::StartTimer()
+    {
+    TC_TRACE( ETraceLevelFlow, Kern::Printf( "> DTraceCoreXtiIf::StartTimer" ) );
+    iXtiRegisterTimer.OneShot( KXtiRegisterTimer, XtiRegisterDfc, this );
+    TC_TRACE( ETraceLevelFlow, Kern::Printf( "< DTraceCoreXtiIf::StartTimer" ) );
+    }
+
+/**
+ * Add registering to own Dfc
+ * 
+ * @param aPtr Pointer to traceCoreIsaIf class
+ */
+void DTraceCoreXtiIf::XtiRegisterDfc( TAny* aPtr )
+    {
+    TC_TRACE( ETraceLevelFlow, Kern::Printf( "> DTraceCoreXtiIf::XtiRegisterDfc" ) );
+    reinterpret_cast< DTraceCoreXtiIf* >( aPtr )->iXtiRegisterDfc.Enque();
+    TC_TRACE( ETraceLevelFlow, Kern::Printf( "< DTraceCoreXtiIf::XtiRegisterDfc" ) );
+    }
+
+/**
+ * Timer callback function to initialize the XTI IF
+ * 
+ * @param aPtr Pointer to DTraceCoreXtiIf class
+ */
+void DTraceCoreXtiIf::XtiRegister( TAny* aPtr )
+    {
+    TC_TRACE( ETraceLevelFlow, Kern::Printf( "> DTraceCoreXtiIf::XtiRegister" ) );
+    DTraceCoreXtiIf* traceCoreXtiIf = static_cast< DTraceCoreXtiIf* >( aPtr );
+    __ASSERT_DEBUG( traceCoreXtiIf != NULL, 
+            Kern::Fault( "DTraceCoreXtiIf::XtiRegister - NULL", KErrGeneral ) );
+    traceCoreXtiIf->XtiRegister();
+    TC_TRACE( ETraceLevelFlow, Kern::Printf( "< DTraceCoreXtiIf::XtiRegister" ) );
+    }
+
+/**
+ * Called from the static callback to register to XtiRx
+ */
+void DTraceCoreXtiIf::XtiRegister()
+    {
+    TInt ret = XtiRx::Register( &iReceiveDfc, iReceiveBuffer );
+    if ( ret != KErrNone )
+        {
+        TC_TRACE( ETraceLevelError, Kern::Printf( "DTraceCoreXtiIf::XtiRegister - Register failed: %d", ret ) );
+        }
+    }
+
+/**
+ * Handle incoming messages from XTI
+ * 
+ * @param aPtr Pointer to DTraceCoreXtiIf class.
+ */
+void DTraceCoreXtiIf::ReceiveDfc( TAny* aPtr )
+    {
+    OstTrace0( TRACE_FLOW, DTRACECOREXTIIF_PS_RECEIVEDFC_ENTRY, "> DTraceCoreXtiIf::ReceiveDfc");
+    DTraceCoreXtiIf* traceCoreXtiIf = static_cast< DTraceCoreXtiIf* >( aPtr );
+    __ASSERT_DEBUG( traceCoreXtiIf != NULL, 
+            Kern::Fault( "DTraceCoreXtiIf::ReceiveDfc - NULL", KErrGeneral ) );
+    traceCoreXtiIf->ReceiveDfc();
+    OstTrace0( TRACE_FLOW, DTRACECOREXTIIF_PS_RECEIVEDFC_EXIT, "< DTraceCoreXtiIf::ReceiveDfc");
+    }
+
+/**
+ * Processes incoming XTI messages
+ */
+void DTraceCoreXtiIf::ReceiveDfc()
+    {
+    // Determine the message we received
+    if ( iReceiveBuffer.Length() > ISI_HEADER_OFFSET_MESSAGEID )
+        {
+        TUint8 resource = iReceiveBuffer[ ISI_HEADER_OFFSET_RESOURCEID ];
+        
+        // Check that resource is PN_EPOC_MON
+        if ( resource == PN_EPOC_MON )
+            {
+            DebugPrintMsg ( iReceiveBuffer );
+            
+            NotifyCallback();
+            }
+        }
+    XtiRx::SetReceiveBufferRead();    
+    }
+
+/**
+ * Notifies the callback with the incoming message
+ * 
+ * @return one of symbian error codes
+ */
+void DTraceCoreXtiIf::NotifyCallback()
+    {
+    OstTrace0( TRACE_FLOW, DTRACECOREXTIIF_PS_NOTIFYCALLBACK_ENTRY, "> DTraceCoreXtiIf::NotifyCallback");
+    // Header length is header size + remainders
+    TInt headerLength = ISI_HEADER_SIZE + KIsiHeaderRemainder;
+    if ( iReceiveBuffer.Length() < headerLength ) {
+        headerLength = iReceiveBuffer.Length();
+    }
+    
+    // Create TraceMessage
+    TTraceMessage traceMsg;
+    TPtrC header( iReceiveBuffer.Ptr(), headerLength );
+    TPtrC data( NULL, 0 );
+    if ( iReceiveBuffer.Length() > headerLength ) {
+        data.Set( iReceiveBuffer.Ptr() + headerLength, iReceiveBuffer.Length() - headerLength );
+    }
+
+    traceMsg.iMsgFormat = EMessageHeaderFormatProprietary;
+    traceMsg.iHeader = &header;
+    traceMsg.iData = &data;
+    traceMsg.iMessageId = iReceiveBuffer[ ISI_HEADER_OFFSET_MESSAGEID ];
+    
+    // Call base class MessageReceived
+    MessageReceived( traceMsg );
+    
+    OstTrace0( TRACE_FLOW, DTRACECOREXTIIF_PS_NOTIFYCALLBACK_EXIT, "< DTraceCoreXtiIf::NotifyCallback");
+    }
+
+/**
+ * Sends messages to XTI
+ * 
+ * @param aMsg Message to be sent.
+ * @return KErrNone if send successful
+ */
+TInt DTraceCoreXtiIf::Send( TTraceMessage& aMsg )
+    {
+    OstTrace0( TRACE_FLOW, DTRACECOREXTIIF_PS_SEND_ENTRY, "> DTraceCoreXtiIf::Send");
+    TInt ret;
+    if ( aMsg.iData != NULL )
+        {
+        ret = TXtiIfMessageUtils::GetMessageLength( aMsg );
+        if ( ret > 0 )
+            {
+            // First send the phone formatted start character
+            ret = XtiTx::StartWrite( KChannel0, KPhoneFormattedMessage );
+            if ( ret == KErrNone )
+                {
+                // Send trace data and end trace
+                SendData( aMsg );
+                XtiTx::StopWrite( KChannel0 );
+                if ( aMsg.iHeader != NULL ) 
+                    {
+                    DebugPrintMsg( iSendBuffer );
+                    }
+                else
+                    {
+                    DebugPrintMsg( *aMsg.iData );
+                    }
+                }
+            else
+                {
+                OstTrace1( TRACE_IMPORTANT , DTRACECOREXTIIF_PS_SEND_START_WRITE_FAILED,
+                		"DTraceCoreXtiIf::Send - XTI StartWrite failed. Ret:%d", ret );
+                }
+            }
+        else
+            {
+            ret = KErrArgument;
+            }
+        }
+    else
+        {
+        OstTrace0( TRACE_IMPORTANT , DTRACECOREXTIIF_PS_SEND_INVALID_DATA, "DTraceCoreXtiIf::Send - NULL data in message");
+        ret = KErrArgument;
+        }
+    OstTrace1( TRACE_FLOW, DTRACECOREXTIIF_PS_SEND_EXIT, "< DTraceCoreXtiIf::Send. Ret:%d", ret );
+    return ret;
+    }
+    
+/**
+ * Called from the TraceCore to send message out.
+ */
+TInt DTraceCoreXtiIf::SendMessage( TTraceMessage &aMsg )
+    {
+    TInt ret = Send( aMsg );
+    return ret;
+    }
+
+/**
+ * Sends message to XTI
+ * 
+ * @param aMsg Message to be sent.
+ */
+void DTraceCoreXtiIf::SendData( TTraceMessage& aMsg )
+    {
+    const TText8* pS = NULL;
+    const TText8* pE = NULL;
+    if ( aMsg.iHeader != NULL )
+        {
+        // Utility function is used to merge the data
+        TInt ret = TXtiIfMessageUtils::MergeHeaderAndData( aMsg, iSendBuffer );
+        if ( ret == KErrNone )
+            {
+            pS = iSendBuffer.Ptr();
+            pE = pS + iSendBuffer.Length();
+            }
+        }
+    else
+        {
+        // Header doesn't exists, all data is in data part
+        pS = aMsg.iData->Ptr();
+        pE = pS + aMsg.iData->Length();
+        }
+    
+    // Print using 8bit write
+    while ( pS < pE )
+        {
+        XtiTx::WriteData8( KChannel0, *( pS++ ) );
+        }
+    }
+
+/**
+ * The entry point for a standard extension. Creates TraceCoreXtiIfPlugin extension.
+ *
+ *  @return KErrNone, if successful
+ */
+DECLARE_STANDARD_EXTENSION()    //lint !e960 !e1717 ¤/#((& Symbian
+    {
+    TC_TRACE( ETraceLevelNormal, Kern::Printf( "DECLARE_STANDARD_EXTENSION Start Trace Core XTI IF Plugin" ) );
+    
+    TInt ret = KErrNone;
+    
+       // Certificate check should be done here e.g. if ( XtiTx::IsTraceEnabled() )
+       // CpuPage::IsRdcAvailable();
+        {
+        DTraceCoreXtiIf* xtiIfPlugin = new DTraceCoreXtiIf();
+        
+        if ( xtiIfPlugin != NULL )
+            {
+            ret = xtiIfPlugin->Init();
+            if ( ret != KErrNone )
+                {
+                delete xtiIfPlugin;
+                }
+            }
+        else
+            {
+            ret = KErrNoMemory;
+            }
+        }
+
+	if (ret == KErrNone) 
+		{
+        POSTCODE( Kern::Printf("[POST][TraceCoreXtiIfPlugin][Start][OK]"); )
+		}
+	else
+		{
+        POSTCODE( Kern::Printf("[POST][TraceCoreXtiIfPlugin][FAIL][%d]", ret ); )
+		}           
+        
+    return ret;
+    }
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/plugins/xti_if/common/src/XtiIfMessageUtils.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,184 @@
+// 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 "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:
+//
+// Description:
+
+
+#include <pn_const.h>
+#include <phonetisi.h>
+#include "TraceCoreMessageUtils.h"
+#include "TraceCoreSubscriber.h"
+#include "TraceCoreOstHeader.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "XtiIfMessageUtilsTraces.h"
+#endif
+
+
+/*
+ * ISI header remainder length, 2 + 2 filler bytes
+ */
+const TInt KIsiHeaderRemainder = 4;
+
+/*
+ * Shift one byte
+ */
+const TInt KByteShift = 8;
+
+/*
+ * Byte mask value
+ */
+const TInt KByteMask = 0xFF;
+
+
+/**
+ * Merges the header and data into a single buffer
+ * 
+ * @param aMsg Message to be sent.
+ * @param aMsgBlock The message block where data is merged
+ * @return Symbian error code
+ */
+TInt TXtiIfMessageUtils::MergeHeaderAndData( const TTraceMessage& aMsg, TDes8& aTarget )
+	{
+    TInt ret(KErrNotSupported);
+    if ( aMsg.iMsgFormat == EMessageHeaderFormatProprietary )
+        {
+        // Merge header and data
+        aTarget.Copy( *aMsg.iHeader );
+        aTarget.Append( *aMsg.iData );
+         
+        // Flip receiver and sender devices
+        TUint8 tmp = aTarget[ ISI_HEADER_OFFSET_RECEIVERDEVICE ];
+        aTarget[ ISI_HEADER_OFFSET_RECEIVERDEVICE ] = aTarget[ ISI_HEADER_OFFSET_SENDERDEVICE ];
+        aTarget[ ISI_HEADER_OFFSET_SENDERDEVICE ] = tmp;
+         
+        // Flip receiver and sender objects
+        tmp = aTarget[ ISI_HEADER_OFFSET_RECEIVEROBJECT ];
+        aTarget[ ISI_HEADER_OFFSET_RECEIVEROBJECT ] = aTarget[ ISI_HEADER_OFFSET_SENDEROBJECT ];
+        aTarget[ ISI_HEADER_OFFSET_SENDEROBJECT ] = tmp;
+        
+        // Assign message length
+        TInt length = aMsg.iHeader->Length() + aMsg.iData->Length() - PN_HEADER_SIZE;
+        
+#ifndef __WINS__
+        aTarget[ ISI_HEADER_OFFSET_LENGTH ] = length & 0xFF; // CodForChk_Dis_Magic
+        aTarget[ ISI_HEADER_OFFSET_LENGTH + 1 ] = ( length >> 8 ) & 0xFF; // CodForChk_Dis_Magic
+#else
+        aTarget[ ISI_HEADER_OFFSET_LENGTH + 1 ] = length & 0xFF; // CodForChk_Dis_Magic
+        aTarget[ ISI_HEADER_OFFSET_LENGTH] = ( length >> 8 ) & 0xFF; // CodForChk_Dis_Magic
+#endif
+                
+        // Assign new message ID
+        aTarget[ ISI_HEADER_OFFSET_MESSAGEID ] = aMsg.iMessageId;
+        ret = KErrNone;
+        }
+    else
+        if (aMsg.iMsgFormat == EMessageHeaderFormatOst)
+            {
+            // Merge header and data
+            aTarget.Copy( *aMsg.iHeader);
+            aTarget.Append( *aMsg.iData);
+
+            
+            // Assign message length
+            TUint16 length = aMsg.iHeader->Length() + aMsg.iData->Length()
+                    - OstHeader::OstBaseProtocol::KOstBaseHeaderSize;
+            
+            aTarget[ OstHeader::OstBaseProtocol::KOstHeaderLengthOffset ] = (length >> KByteShift ) & KByteMask;
+            aTarget[ OstHeader::OstBaseProtocol::KOstHeaderLengthOffset + 1 ] = length & KByteMask;
+
+            // Assign new message ID
+            aTarget[ OstHeader::OstBaseProtocol::KOstHeaderProtocolIdOffset ] = aMsg.iMessageId;
+            ret = KErrNone;
+            }
+    return ret;
+    }
+
+
+/**
+ * Get the message length 
+ * 
+ * @param aMsg Message to be sent.
+ * @return length or -1 if not valid
+ */
+TInt TXtiIfMessageUtils::GetMessageLength( const TTraceMessage& aMsg )
+    {
+    OstTrace0( TRACE_FLOW, TRACECOREMESSAGEUTILS_GETMESSAGELENGTH_ENTRY, "> TraceCoreMessageUtils::GetMessageLength");
+    TInt msgLength;
+    if ( aMsg.iMsgFormat == EMessageHeaderFormatProprietary )
+        {
+        // Get message length
+        msgLength = aMsg.iData->Length();
+        if ( aMsg.iHeader != NULL )
+            {
+            TInt hdrLen( aMsg.iHeader->Length() );
+            // Message header length must be valid
+            if ( hdrLen == ( ISI_HEADER_SIZE + KIsiHeaderRemainder ) )
+                {
+                msgLength += hdrLen;
+                }
+            else
+                {
+                OstTrace1( TRACE_IMPORTANT , TTRACECOREISAUTILS_GETMESSAGELENGTH_INVALID_HEADER_LENGTH,
+                		"TTraceCoreIsaUtils::GetMessageLength - ISI header length was not valid. Len:%d", hdrLen );
+                msgLength = -1;
+                }
+            }
+        else
+            {
+            // If message length is not enough for valid ISI message, an error is returned
+            if ( msgLength < ( ISI_HEADER_SIZE + KIsiHeaderRemainder ) )
+                {
+                OstTrace1( TRACE_IMPORTANT , TTRACECOREISAUTILS_GETMESSAGELENGTH_MESSAGE_TOO_SHORT,
+                		"TTraceCoreIsaUtils::GetMessageLength - Message is too short. Len:%d", msgLength );
+                msgLength = -1;
+                }
+            }
+        }
+    else
+        if (aMsg.iMsgFormat == EMessageHeaderFormatOst)
+            {
+            // Get message length
+            msgLength = aMsg.iData->Length();
+            if (aMsg.iHeader != NULL)
+                {
+                TInt hdrLen(aMsg.iHeader->Length() );
+
+                // Message header length must be valid
+                if (hdrLen == ( OstHeader::OstBaseProtocol::KOstBaseHeaderSize ))
+                    {
+                    msgLength += hdrLen;
+                    }
+                else
+                    {
+                    msgLength = -1;
+                    }
+                }
+            else
+                {
+                // If message length is not enough for valid ISI message, an error is returned
+                if (msgLength < ( ISI_HEADER_SIZE + KIsiHeaderRemainder ))
+                    {
+                    msgLength = -1;
+                    }
+                }
+            }
+        else
+        {
+        OstTrace0( TRACE_IMPORTANT , TRACECOREMESSAGEUTILS_GETMESSAGELENGTH_NOT_SUPPORTED,
+        		"TraceCoreMessageUtils::GetMessageLength - Format not supported");
+        msgLength = -1;
+        }
+    OstTrace1( TRACE_FLOW, TRACECOREMESSAGEUTILS_GETMESSAGELENGTH_EXIT,
+    		"< TraceCoreMessageUtils::GetMessageLength. Len:%d", msgLength );
+    return msgLength;
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/test/group/bld.inf	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,23 @@
+// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+//
+
+#include "../../group/bld.inf"
+#include "../../btrace_handler/test/group/bld.inf"
+
+
+PRJ_TESTEXPORTS
+t_tracecoresf.iby         /epoc32/rom/include/t_tracecoresf.iby
+t_tracecoresf_ldd.iby     /epoc32/rom/include/t_tracecoresf_ldd.iby
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/test/group/t_tracecoresf.iby	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,27 @@
+// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description: Include relevant TraceCore tests in rom
+//
+
+#ifndef TEST_TRACE_CORE_SF_IBY
+#define TEST_TRACE_CORE_SF_IBY
+
+#include <testexecute.iby>  // temp additon for platsim 
+
+#include <tracecoresf.iby>
+#include <core/tools/tracedataparser.iby>
+#include <t_tracecoresf_ldd.iby>
+
+file=ABI_DIR\DEBUG_DIR\t_tracecore.exe                           \sys\bin\t_tracecore.exe
+file=ABI_DIR\DEBUG_DIR\t_tracecore_disabled.exe                  \sys\bin\t_tracecore_disabled.exe
+#endif //TEST_TRACE_CORE_SF_IBY
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/test/group/t_tracecoresf_ldd.iby	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,21 @@
+// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description: Include relevant TraceCore tests in rom
+//
+
+#ifndef TEST_TRACE_CORE_SF_LDD_IBY
+#define TEST_TRACE_CORE_SF_LDD_IBY
+
+ROM_IMAGE[0] device[VARID]=KERNEL_DIR\DEBUG_DIR\d_tracecore.ldd  \sys\bin\d_tracecore.ldd
+   
+#endif //TEST_TRACE_CORE_SF_LDD_IBY
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/tracecert/bwins/trace_certificationu.def	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,3 @@
+EXPORTS
+	?IsTraceCertified@TraceCertification@@SAHXZ @ 1 NONAME ; int TraceCertification::IsTraceCertified(void)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/tracecert/eabi/trace_certificationu.def	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,3 @@
+EXPORTS
+	_ZN18TraceCertification16IsTraceCertifiedEv @ 1 NONAME
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/tracecert/group/bld.inf	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,23 @@
+// Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+//
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXPORTS
+../inc/trace_certification.h			OS_LAYER_PLATFORM_EXPORT_PATH(trace_certification.h)
+
+PRJ_MMPFILES
+trace_certification.mmp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/tracecert/group/trace_certification.mmp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,33 @@
+// Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+//
+// TraceCertification
+// Kernel DLL containing functionality specifying if tracing is certified
+// This is stubbed out by always returning true
+
+#include        <kernel/kern_ext.mmh>
+
+target          trace_certification.dll
+targettype      KDLL
+linkas          trace_certification.dll
+exportlibrary   trace_certification.lib
+uid             0 0x20034B46
+capability      all
+
+userinclude     ../inc
+
+sourcepath      ../src
+source          trace_certification.cpp
+
+deffile         ../~/trace_certification.def
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/tracecert/inc/trace_certification.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,38 @@
+// Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+//
+
+#ifndef __TRACE_CERTIFICATION_H__
+#define __TRACE_CERTIFICATION_H__
+
+
+class TraceCertification
+    {			  
+    public:
+        /**
+         * Get the trace certification status.
+         * This method is called once by TraceCore on initialisation (i.e. during boot of device) to
+         * check whether tracing is certified on the device. It is not called again.
+         * If this method returns EFalse, then TraceCore will suppress traces (except Printf traces).
+         * If this method return ETrue then all traces will come through.
+         * If reimplementing this method it is recommended that the call is not too time consuming,
+         * so that boot time of device is not overly impacted.
+         * @publishedAll
+         * @return ETrue if tracing is certified or EFalse otherwise
+         */
+        IMPORT_C static TBool IsTraceCertified();
+
+    };
+
+#endif // __TRACE_CERTIFICATION_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/tracecert/src/trace_certification.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,34 @@
+// Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+//
+
+#include <kernel/kernel.h>
+#include "trace_certification.h"
+
+/*
+----------------------------------------------------------------------------
+
+    IsTraceCertified
+
+    Stubbed out functionality - tracing always certified
+    
+    @Return ETrue
+    
+-----------------------------------------------------------------------------
+*/
+
+EXPORT_C TBool TraceCertification::IsTraceCertified()
+    {
+    return ETrue;
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/writers/xti/common/group/TCXtiWriterLib.mmp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,37 @@
+// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+// XTI Writer
+//
+
+#include    <kernel/kern_ext.mmh>
+
+uid             0 0x20031674
+targettype      klib
+target          tcxtiwriterlib.lib
+vendorid        VID_DEFAULT
+
+
+OS_LAYER_SYSTEMINCLUDE                   
+
+
+userinclude     ../inc
+userinclude     ../traces
+
+sourcepath      ../src
+SOURCE 		TraceCoreRegisterWriter.cpp
+SOURCE 		TraceCoreRegisterWriter.cia
+
+
+library         tracecore.lib
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/writers/xti/common/group/bld.inf	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,28 @@
+// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "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:
+//
+// Description:
+// Trace Core user-side control interface
+//
+
+#ifndef WINS
+
+PRJ_PLATFORMS
+DEFAULT ARMV5SMP
+
+PRJ_EXPORTS
+../inc/TraceCoreRegisterWriter.h                        OS_LAYER_PLATFORM_EXPORT_PATH(TraceCoreRegisterWriter.h)
+
+PRJ_MMPFILES
+TCXtiWriterLib
+
+#endif // WINS
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/writers/xti/common/inc/TraceCoreRegisterWriter.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,176 @@
+// 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 "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:
+//
+// Description:
+
+/**
+@internalComponent
+*/
+
+#ifndef __TRACECOREREGISTERWRITER_H__
+#define __TRACECOREREGISTERWRITER_H__
+
+
+// Include files
+#include "TraceCoreWriter.h"
+
+
+class TTraceCoreRegisterWriterProperties
+	{
+public:
+	TUint32 iDataRegister0;
+	TUint32 iDataRegister1;
+	TUint32 iControlRegister;
+	TUint8  iDataStart;
+	TUint8  iControlEnd0;
+	TUint8  iControlEnd1;
+	};
+
+
+/**
+ * Base class for optimized writers that use a register address to write data
+ */
+class DTraceCoreRegisterWriter : public DTraceCoreWriter
+    {
+public:
+    
+    /**
+     * Constructor
+     */
+    /*IMPORT_C*/ DTraceCoreRegisterWriter();
+    
+    /**
+     * Destructor
+     */
+    /*IMPORT_C*/ ~DTraceCoreRegisterWriter();
+
+    /**
+     * Registers this writer to TraceCore. The first writer to register becomes the active writer.
+     */
+    /*IMPORT_C*/ TInt Register();
+
+    /**
+     * Initializes the properties of this writer
+     */
+    virtual void InitProperties( TTraceCoreRegisterWriterProperties& aProperties ) = 0;
+    
+    /**
+     * Outputs a TraceCore frame. This calls WriteStart, writes the component and group ID's,
+     * calls WriteBTraceFrame and calls WriteEnd
+     *
+     * @param aComponentId the component ID
+     * @param aTraceId the trace ID
+     * @param aHeader BTrace header
+     * @param aHeader2 Extra header data
+     * @param aContext The thread context in which this function was called
+     * @param a1 The first trace parameter
+     * @param a2 The second trace parameter
+     * @param a3 The third trace parameter
+     * @param aExtra Extra trace data
+     * @param aPc The program counter value
+     * @param aRecordSize The record size
+     */
+    virtual void WriteTraceCoreFrame( const TUint32 aComponentId, const TUint32 aTraceId, 
+            TUint32 aHeader, TUint32 aHeader2, const TUint32 aContext, const TUint32 a1, 
+            const TUint32 a2, const TUint32 a3, const TUint32 aExtra, const TUint32 aPc, TUint32 aRecordSize ) = 0;
+       
+    
+    /**
+     * Writes 8-bit data to given entry (Time stamped channel -> ends the trace for used channel)
+     * 
+     * @param aEntryId the entry ID returned by WriteStart
+     * @param aData the trace data
+     */
+	virtual void WriteDataTs( TUint32 aEntryId, TUint8 aData ) = 0;
+
+    /**
+     * Writes 16-bit data to given entry (Time stamped channel -> ends the trace for used channel)
+     * 
+     * @param aEntryId the entry ID returned by WriteStart
+     * @param aData the trace data
+     */
+    virtual void WriteDataTs( TUint32 aEntryId, TUint16 aData ) = 0;
+
+    /**
+     * Writes 32-bit data to given entry (Time stamped channel -> ends the trace for used channel)
+     * 
+     * @param aEntryId the entry ID returned by WriteStart
+     * @param aData the trace data
+     */
+	virtual void WriteDataTs( TUint32 aEntryId, TUint32 aData ) = 0;
+    
+    /**
+     * Outputs a TraceCore frame
+     *
+     * @param aComponentId the component ID
+     * @param aTraceId the trace ID
+     * @param aHeader BTrace header
+     * @param aHeader2 Extra header data
+     * @param aContext The thread context in which this function was called
+     * @param a1 The first trace parameter
+     * @param a2 The second trace parameter
+     * @param a3 The third trace parameter
+     * @param aExtra Extra trace data
+     * @param aPc The program counter value
+     * @param aRecordSize The record size
+     */
+//    void OptimizedWriteTraceCoreFrame( const TUint32 aComponentId, const TUint32 aTraceId, 
+//    		TUint32 aHeader, TUint32 aHeader2, const TUint32 aContext, const TUint32 a1, 
+//    		const TUint32 a2, const TUint32 a3, const TUint32 aExtra, const TUint32 aPc, TUint32 aRecordSize );
+#ifndef __WINS__    		
+    /**
+     * InterruptsDisabled
+     * 
+     */
+    /*IMPORT_C*/ TUint32 InterruptsDisabled();
+#endif
+    
+protected:
+	
+    /**
+     * Outputs a BTrace frame
+     *
+     * @param aHeader BTrace header
+     * @param aHeader2 Extra header data
+     * @param aContext The thread context in which this function was called
+     * @param a1 The first trace parameter
+     * @param a2 The second trace parameter
+     * @param a3 The third trace parameter
+     * @param aExtra Extra trace data
+     * @param aPc The program counter value
+     * @param aRecordSize The record size
+     */
+    virtual void WriteBTraceFrame( TUint32 aWriteParameter, TUint32 aHeader, TUint32 aHeader2, 
+    		const TUint32 aContext, const TUint32 a1, const TUint32 a2, const TUint32 a3, 
+    		const TUint32 aExtra, const TUint32 aPc, TUint32 aRecordSize ) = 0;
+
+    /**
+     * Writes the remaining bytes if data is not 32-bit aligned
+     */
+    virtual void WriteRemainingBytes( TUint32 aWriteParameter, const TUint32 aSize, const TUint32 a3 ) = 0;
+
+    /**
+	 * Write helper functions
+	 */
+//    inline void LocalWriteData8( TUint32 aWriteParameter, TUint8 aValue, TInt32 aSizeLeftBeforeWrite );
+//    inline void LocalWriteData16( TUint32 aWriteParameter, TUint16 aValue, TInt32 aSizeLeftBeforeWrite  );
+//    inline void LocalWriteData32( TUint32 aWriteParameter, TUint32 aValue, TInt32 aSizeLeftBeforeWrite  );
+    
+	/**
+	 * Writer properties
+	 */
+	TTraceCoreRegisterWriterProperties iProperties;
+};
+
+#endif
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/writers/xti/common/src/TraceCoreRegisterWriter.cia	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,38 @@
+// 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 "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:
+//
+// Description:
+
+#include "TraceCoreRegisterWriter.h"
+
+/**
+ * InterrupsDisabled
+ * Check if interrupts IRQ/FIQ disabled
+ * Return 0x08 if only IRQ disabled, 0x04 if only FIQ disabled, 0x0C if both disabled.
+ * @return true if interrupt(s) disabled, otherwise 0 (false)
+ */
+/*EXPORT_C*/ __NAKED__ TUint32 DTraceCoreRegisterWriter::InterruptsDisabled() 
+    {
+    // save work regs
+    asm( "stmfd sp!, {r2, r4}" );
+	
+    // check if interrupts disabled
+    asm( "mrs r2,cpsr" );
+    asm( "and r0,r2,#0xc0" ); // 0b11000000 IRQ disabled bit 7, FIQ disabled bit 6
+		
+    // restore work regs
+    asm( "ldmfd sp!,{r2,r4}" );
+	
+    // move pc,lr
+    asm( "bx lr" );
+    }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/writers/xti/common/src/TraceCoreRegisterWriter.cpp	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,56 @@
+// 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 "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:
+//
+// Description:
+
+//- Include Files  ----------------------------------------------------------
+
+#include <TraceCoreConstants.h>
+#include "TraceCoreRegisterWriter.h" 
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "TraceCoreRegisterWriterTraces.h"
+#endif
+
+
+/**
+ * Constructor
+ */
+DTraceCoreRegisterWriter::DTraceCoreRegisterWriter()
+: DTraceCoreWriter( EWriterTypeXTI )
+	{
+	}
+
+
+/**
+ * Destructor
+ */
+DTraceCoreRegisterWriter::~DTraceCoreRegisterWriter()
+	{
+	}
+
+
+/**
+ * Registers this writer
+ */
+TInt DTraceCoreRegisterWriter::Register()
+	{
+	OstTrace0( TRACE_BORDER, DTRACECOREREGISTERWRITER_REGISTER_ENTRY, "> DTraceCoreRegisterWriter::Register");
+	InitProperties( iProperties );
+	
+	// Register to TraceCore
+    TInt retval = DTraceCoreWriter::Register();
+	OstTrace1( TRACE_BORDER, DTRACECOREREGISTERWRITER_REGISTER_EXIT, "< DTraceCoreRegisterWriter::Register. Ret:%d", retval );
+	return retval;
+	}
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/writers/xti/common/traces/OstTraceDefinitions.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,23 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "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:
+*
+* Description: 
+*
+*/
+#ifndef __OSTTRACEDEFINITIONS_H__
+#define __OSTTRACEDEFINITIONS_H__
+// OST_TRACE_COMPILER_IN_USE flag has been added by Trace Compiler
+// REMOVE BEFORE CHECK-IN TO VERSION CONTROL
+//#define OST_TRACE_COMPILER_IN_USE
+#include <opensystemtrace.h>
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/writers/xti/common/traces/TraceCoreRegisterWriterTraces.h	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,16 @@
+// Created by TraceCompiler 2.2.0
+// DO NOT EDIT, CHANGES WILL BE LOST
+
+#ifndef __TRACECOREREGISTERWRITERTRACES_H__
+#define __TRACECOREREGISTERWRITERTRACES_H__
+
+#define KOstTraceComponentID 0x20031674
+
+#define DTRACECOREREGISTERWRITER_REGISTER_ENTRY 0x840001
+#define DTRACECOREREGISTERWRITER_REGISTER_EXIT 0x840002
+
+
+#endif
+
+// End of file
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecore/writers/xti/common/traces/fixed_id.definitions	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,4 @@
+#Fixed group and trace id definitions. If this file is removed, the identifiers are rebuilt.
+[GROUP]TRACE_BORDER=0x84
+[TRACE]TRACE_BORDER[0x84]_DTRACECOREREGISTERWRITER_REGISTER_ENTRY=0x1
+[TRACE]TRACE_BORDER[0x84]_DTRACECOREREGISTERWRITER_REGISTER_EXIT=0x2