author | Mike Kinghan <mikek@symbian.org> |
Wed, 21 Jul 2010 12:04:49 +0100 | |
branch | GCC_SURGE |
changeset 215 | 8096a832df02 |
parent 109 | b3a1d9898418 |
child 257 | 3e88ff8f41d5 |
permissions | -rw-r--r-- |
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); |
|
109
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
30 |
//to avoid RVCT4 warning of unreachable statement. |
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
31 |
volatile TInt forever = 0; |
b3a1d9898418
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
32 |
while(forever) |
0 | 33 |
{ |
34 |
TInt h; |
|
35 |
TRequestStatus s; |
|
36 |
r=u.Logon(s,h); |
|
37 |
test(r==KErrNone); |
|
38 |
User::WaitForRequest(s); |
|
39 |
RThread t; |
|
40 |
t.SetHandle(h); |
|
41 |
TBuf8<128> b; |
|
42 |
t.Context(b); |
|
43 |
TInt *pR=(TInt*)b.Ptr(); |
|
44 |
TFullName tFullName = t.FullName(); |
|
45 |
TExitCategoryName tExitCategory = t.ExitCategory(); |
|
46 |
test.Printf(_L("Thread %S Exit %d %S %d\n"),&tFullName,t.ExitType(),&tExitCategory,t.ExitReason()); |
|
47 |
test.Printf(_L("r0 =%08x r1 =%08x r2 =%08x r3 =%08x\n"),pR[0],pR[1],pR[2],pR[3]); |
|
48 |
test.Printf(_L("r4 =%08x r5 =%08x r6 =%08x r7 =%08x\n"),pR[4],pR[5],pR[6],pR[7]); |
|
49 |
test.Printf(_L("r8 =%08x r9 =%08x r10=%08x r11=%08x\n"),pR[8],pR[9],pR[10],pR[11]); |
|
50 |
test.Printf(_L("r12=%08x r13=%08x r14=%08x r15=%08x\n"),pR[12],pR[13],pR[14],pR[15]); |
|
51 |
test.Printf(_L("cps=%08x dac=%08x\n"),pR[16],pR[17]); |
|
52 |
t.Close(); |
|
53 |
} |
|
54 |
return 0; |
|
55 |
} |