Update contrib.
1 // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of the License "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // e32test\system\t_reason.cpp
15 // Debugging aid which prints the ESHELL startup banner down the serial port, as an
16 // aid to debugging repeated bleep-bleep-bleep restarting.
21 #include "e32std_private.h"
32 TMachineStartupType reason;
33 UserHal::StartupReason(reason);
36 case EStartupCold: RDebug::Print(_L("Cold Start ")); break;
37 case EStartupColdReset: RDebug::Print(_L("Cold Reset ")); break;
38 case EStartupNewOs: RDebug::Print(_L("New OS ")); break;
39 case EStartupPowerFail: RDebug::Print(_L("Power failed ")); break;
40 case EStartupWarmReset: RDebug::Print(_L("Warm Reset ")); break;
41 case EStartupKernelFault:
43 UserHal::FaultReason(faultno);
44 if (faultno == 0x10000000)
45 RDebug::Print(_L("Kernel Exception "));
47 if (faultno >= 0x10000)
48 RDebug::Print(_L("Kernel PANIC: %d "), faultno-0x10000);
50 RDebug::Print(_L("Kernel FAULT: %d "), faultno);
52 case EStartupSafeReset: RDebug::Print(_L("Safe Reset ")); break;
54 RDebug::Print(_L("<?reason=%d> "), reason);
58 if (reason==EStartupWarmReset || reason==EStartupPowerFail || reason==EStartupKernelFault)
62 UserHal::ExceptionId(exceptno);
63 UserHal::ExceptionInfo(exceptInfo);
64 RDebug::Print(_L("(last exception %d: code %08x data %08x) "), exceptno, exceptInfo.iCodeAddress,exceptInfo.iDataAddress);
67 RDebug::Print(_L("\r\n\nCopyright (C) 1997-1999 Symbian Ltd\r\n\n"));
69 for (TInt i=0; i<1000000; i++)
70 j=i%17; // waste some time