sl@0: // Copyright (c) 1996-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of the License "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // e32test\system\t_panic.cpp sl@0: // sl@0: // sl@0: sl@0: #include sl@0: sl@0: RTest test(_L("T_PANIC")); sl@0: sl@0: GLDEF_C TInt E32Main() sl@0: { sl@0: test.Title(); sl@0: test.Start(_L("Waiting...")); sl@0: sl@0: RUndertaker u; sl@0: TInt r=u.Create(); sl@0: test(r==KErrNone); sl@0: FOREVER sl@0: { sl@0: TInt h; sl@0: TRequestStatus s; sl@0: r=u.Logon(s,h); sl@0: test(r==KErrNone); sl@0: User::WaitForRequest(s); sl@0: RThread t; sl@0: t.SetHandle(h); sl@0: TBuf8<128> b; sl@0: t.Context(b); sl@0: TInt *pR=(TInt*)b.Ptr(); sl@0: TFullName tFullName = t.FullName(); sl@0: TExitCategoryName tExitCategory = t.ExitCategory(); sl@0: test.Printf(_L("Thread %S Exit %d %S %d\n"),&tFullName,t.ExitType(),&tExitCategory,t.ExitReason()); sl@0: test.Printf(_L("r0 =%08x r1 =%08x r2 =%08x r3 =%08x\n"),pR[0],pR[1],pR[2],pR[3]); sl@0: test.Printf(_L("r4 =%08x r5 =%08x r6 =%08x r7 =%08x\n"),pR[4],pR[5],pR[6],pR[7]); sl@0: test.Printf(_L("r8 =%08x r9 =%08x r10=%08x r11=%08x\n"),pR[8],pR[9],pR[10],pR[11]); sl@0: test.Printf(_L("r12=%08x r13=%08x r14=%08x r15=%08x\n"),pR[12],pR[13],pR[14],pR[15]); sl@0: test.Printf(_L("cps=%08x dac=%08x\n"),pR[16],pR[17]); sl@0: t.Close(); sl@0: } sl@0: return 0; sl@0: }