| 0 |      1 | // Copyright (c) 1996-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".
 | 
|  |      7 | //
 | 
|  |      8 | // Initial Contributors:
 | 
|  |      9 | // Nokia Corporation - initial contribution.
 | 
|  |     10 | //
 | 
|  |     11 | // Contributors:
 | 
|  |     12 | //
 | 
|  |     13 | // Description:
 | 
|  |     14 | // e32test\system\t_panic.cpp
 | 
|  |     15 | // 
 | 
|  |     16 | //
 | 
|  |     17 | 
 | 
|  |     18 | #include <e32test.h>
 | 
|  |     19 | 
 | 
|  |     20 | RTest test(_L("T_PANIC"));
 | 
|  |     21 | 
 | 
|  |     22 | GLDEF_C TInt E32Main()
 | 
|  |     23 | 	{
 | 
|  |     24 | 	test.Title();
 | 
|  |     25 | 	test.Start(_L("Waiting..."));
 | 
|  |     26 | 
 | 
|  |     27 | 	RUndertaker u;
 | 
|  |     28 | 	TInt r=u.Create();
 | 
|  |     29 | 	test(r==KErrNone);
 | 
|  |     30 | 	FOREVER
 | 
|  |     31 | 		{
 | 
|  |     32 | 		TInt h;
 | 
|  |     33 | 		TRequestStatus s;
 | 
|  |     34 | 		r=u.Logon(s,h);
 | 
|  |     35 | 		test(r==KErrNone);
 | 
|  |     36 | 		User::WaitForRequest(s);
 | 
|  |     37 | 		RThread t;
 | 
|  |     38 | 		t.SetHandle(h);
 | 
|  |     39 | 		TBuf8<128> b;
 | 
|  |     40 | 		t.Context(b);
 | 
|  |     41 | 		TInt *pR=(TInt*)b.Ptr();
 | 
|  |     42 | 		TFullName tFullName = t.FullName();
 | 
|  |     43 | 		TExitCategoryName tExitCategory = t.ExitCategory();
 | 
|  |     44 | 		test.Printf(_L("Thread %S Exit %d %S %d\n"),&tFullName,t.ExitType(),&tExitCategory,t.ExitReason());
 | 
|  |     45 | 		test.Printf(_L("r0 =%08x r1 =%08x r2 =%08x r3 =%08x\n"),pR[0],pR[1],pR[2],pR[3]);
 | 
|  |     46 | 		test.Printf(_L("r4 =%08x r5 =%08x r6 =%08x r7 =%08x\n"),pR[4],pR[5],pR[6],pR[7]);
 | 
|  |     47 | 		test.Printf(_L("r8 =%08x r9 =%08x r10=%08x r11=%08x\n"),pR[8],pR[9],pR[10],pR[11]);
 | 
|  |     48 | 		test.Printf(_L("r12=%08x r13=%08x r14=%08x r15=%08x\n"),pR[12],pR[13],pR[14],pR[15]);
 | 
|  |     49 | 		test.Printf(_L("cps=%08x dac=%08x\n"),pR[16],pR[17]);
 | 
|  |     50 | 		t.Close();
 | 
|  |     51 | 		}
 | 
|  |     52 | 	return 0;
 | 
|  |     53 | 	}
 |