kerneltest/e32test/misc/crash.cpp
changeset 0 a41df078684a
equal deleted inserted replaced
-1:000000000000 0:a41df078684a
       
     1 // Copyright (c) 1998-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\misc\crash.cpp
       
    15 // 
       
    16 //
       
    17 
       
    18 #include <e32std.h>
       
    19 #include <e32std_private.h>
       
    20 
       
    21 GLDEF_C TInt E32Main()
       
    22 	{
       
    23 	TBuf<256> cmd;
       
    24 	User::CommandLine(cmd);
       
    25 	User::SetCritical(User::ESystemCritical);
       
    26 	cmd.Trim();
       
    27 	if (cmd.Length() && TChar(cmd[0]).IsDigit())
       
    28 		{
       
    29 		TLex lex(cmd);
       
    30 		TInt time=0;
       
    31 		TInt r=lex.Val(time);
       
    32 		if (r==KErrNone && time>0)
       
    33 			User::AfterHighRes(time*1000000);
       
    34 		}
       
    35 	*((TInt*)0x80000001)=0;
       
    36 	return 0;
       
    37 	}