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