kernel/eka/euser/epoc/win32/uc_epoc.cpp
author Stephane Lenclud <tortoisehg@lenclud.com>
Tue, 27 Apr 2010 20:22:55 +0200
branchanywhere
changeset 95 f561f9ae805b
parent 94 f36eb4948686
child 96 428c5911a502
permissions -rw-r--r--
Trying to get trap/leave to work properly but the whole WINS stuff seems over complicated with a lot of assembly in the middle and it's not working on my compiler. When the throw happens the debugger complains about uncaught exception when I'm definitly inside a catch implemented by our TRAP. I think I'm going to come up with a much simplified trap/leave implementation for SYMC. On my prototype all that stuff was working fine in like 20 lines of C++.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
95
f561f9ae805b Trying to get trap/leave to work properly but the whole WINS stuff seems over complicated with a lot of assembly in the middle and it's not working on my compiler. When the throw happens the debugger complains about uncaught exception when I'm definitly inside a catch implemented by our TRAP.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 94
diff changeset
     1
// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
f561f9ae805b Trying to get trap/leave to work properly but the whole WINS stuff seems over complicated with a lot of assembly in the middle and it's not working on my compiler. When the throw happens the debugger complains about uncaught exception when I'm definitly inside a catch implemented by our TRAP.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 94
diff changeset
     2
// All rights reserved.
f561f9ae805b Trying to get trap/leave to work properly but the whole WINS stuff seems over complicated with a lot of assembly in the middle and it's not working on my compiler. When the throw happens the debugger complains about uncaught exception when I'm definitly inside a catch implemented by our TRAP.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 94
diff changeset
     3
// This component and the accompanying materials are made available
f561f9ae805b Trying to get trap/leave to work properly but the whole WINS stuff seems over complicated with a lot of assembly in the middle and it's not working on my compiler. When the throw happens the debugger complains about uncaught exception when I'm definitly inside a catch implemented by our TRAP.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 94
diff changeset
     4
// under the terms of the License "Eclipse Public License v1.0"
f561f9ae805b Trying to get trap/leave to work properly but the whole WINS stuff seems over complicated with a lot of assembly in the middle and it's not working on my compiler. When the throw happens the debugger complains about uncaught exception when I'm definitly inside a catch implemented by our TRAP.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 94
diff changeset
     5
// which accompanies this distribution, and is available
f561f9ae805b Trying to get trap/leave to work properly but the whole WINS stuff seems over complicated with a lot of assembly in the middle and it's not working on my compiler. When the throw happens the debugger complains about uncaught exception when I'm definitly inside a catch implemented by our TRAP.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 94
diff changeset
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
f561f9ae805b Trying to get trap/leave to work properly but the whole WINS stuff seems over complicated with a lot of assembly in the middle and it's not working on my compiler. When the throw happens the debugger complains about uncaught exception when I'm definitly inside a catch implemented by our TRAP.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 94
diff changeset
     7
//
f561f9ae805b Trying to get trap/leave to work properly but the whole WINS stuff seems over complicated with a lot of assembly in the middle and it's not working on my compiler. When the throw happens the debugger complains about uncaught exception when I'm definitly inside a catch implemented by our TRAP.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 94
diff changeset
     8
// Initial Contributors:
f561f9ae805b Trying to get trap/leave to work properly but the whole WINS stuff seems over complicated with a lot of assembly in the middle and it's not working on my compiler. When the throw happens the debugger complains about uncaught exception when I'm definitly inside a catch implemented by our TRAP.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 94
diff changeset
     9
// Nokia Corporation - initial contribution.
f561f9ae805b Trying to get trap/leave to work properly but the whole WINS stuff seems over complicated with a lot of assembly in the middle and it's not working on my compiler. When the throw happens the debugger complains about uncaught exception when I'm definitly inside a catch implemented by our TRAP.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 94
diff changeset
    10
//
f561f9ae805b Trying to get trap/leave to work properly but the whole WINS stuff seems over complicated with a lot of assembly in the middle and it's not working on my compiler. When the throw happens the debugger complains about uncaught exception when I'm definitly inside a catch implemented by our TRAP.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 94
diff changeset
    11
// Contributors:
f561f9ae805b Trying to get trap/leave to work properly but the whole WINS stuff seems over complicated with a lot of assembly in the middle and it's not working on my compiler. When the throw happens the debugger complains about uncaught exception when I'm definitly inside a catch implemented by our TRAP.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 94
diff changeset
    12
//
f561f9ae805b Trying to get trap/leave to work properly but the whole WINS stuff seems over complicated with a lot of assembly in the middle and it's not working on my compiler. When the throw happens the debugger complains about uncaught exception when I'm definitly inside a catch implemented by our TRAP.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 94
diff changeset
    13
// Description:
f561f9ae805b Trying to get trap/leave to work properly but the whole WINS stuff seems over complicated with a lot of assembly in the middle and it's not working on my compiler. When the throw happens the debugger complains about uncaught exception when I'm definitly inside a catch implemented by our TRAP.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 94
diff changeset
    14
// e32\euser\epoc\win32\uc_epoc.cpp
f561f9ae805b Trying to get trap/leave to work properly but the whole WINS stuff seems over complicated with a lot of assembly in the middle and it's not working on my compiler. When the throw happens the debugger complains about uncaught exception when I'm definitly inside a catch implemented by our TRAP.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 94
diff changeset
    15
// 
f561f9ae805b Trying to get trap/leave to work properly but the whole WINS stuff seems over complicated with a lot of assembly in the middle and it's not working on my compiler. When the throw happens the debugger complains about uncaught exception when I'm definitly inside a catch implemented by our TRAP.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 94
diff changeset
    16
//
f561f9ae805b Trying to get trap/leave to work properly but the whole WINS stuff seems over complicated with a lot of assembly in the middle and it's not working on my compiler. When the throw happens the debugger complains about uncaught exception when I'm definitly inside a catch implemented by our TRAP.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 94
diff changeset
    17
f561f9ae805b Trying to get trap/leave to work properly but the whole WINS stuff seems over complicated with a lot of assembly in the middle and it's not working on my compiler. When the throw happens the debugger complains about uncaught exception when I'm definitly inside a catch implemented by our TRAP.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 94
diff changeset
    18
#include <e32std.h>
f561f9ae805b Trying to get trap/leave to work properly but the whole WINS stuff seems over complicated with a lot of assembly in the middle and it's not working on my compiler. When the throw happens the debugger complains about uncaught exception when I'm definitly inside a catch implemented by our TRAP.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 94
diff changeset
    19
#include <e32std_private.h>
f561f9ae805b Trying to get trap/leave to work properly but the whole WINS stuff seems over complicated with a lot of assembly in the middle and it's not working on my compiler. When the throw happens the debugger complains about uncaught exception when I'm definitly inside a catch implemented by our TRAP.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 94
diff changeset
    20
#include <e32wins.h>
f561f9ae805b Trying to get trap/leave to work properly but the whole WINS stuff seems over complicated with a lot of assembly in the middle and it's not working on my compiler. When the throw happens the debugger complains about uncaught exception when I'm definitly inside a catch implemented by our TRAP.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 94
diff changeset
    21
f561f9ae805b Trying to get trap/leave to work properly but the whole WINS stuff seems over complicated with a lot of assembly in the middle and it's not working on my compiler. When the throw happens the debugger complains about uncaught exception when I'm definitly inside a catch implemented by our TRAP.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 94
diff changeset
    22
//#include <e32cmn.h>
f561f9ae805b Trying to get trap/leave to work properly but the whole WINS stuff seems over complicated with a lot of assembly in the middle and it's not working on my compiler. When the throw happens the debugger complains about uncaught exception when I'm definitly inside a catch implemented by our TRAP.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 94
diff changeset
    23
#include <nwdl.h>
f561f9ae805b Trying to get trap/leave to work properly but the whole WINS stuff seems over complicated with a lot of assembly in the middle and it's not working on my compiler. When the throw happens the debugger complains about uncaught exception when I'm definitly inside a catch implemented by our TRAP.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 94
diff changeset
    24
f561f9ae805b Trying to get trap/leave to work properly but the whole WINS stuff seems over complicated with a lot of assembly in the middle and it's not working on my compiler. When the throw happens the debugger complains about uncaught exception when I'm definitly inside a catch implemented by our TRAP.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 94
diff changeset
    25
#if defined __SYMC__
f561f9ae805b Trying to get trap/leave to work properly but the whole WINS stuff seems over complicated with a lot of assembly in the middle and it's not working on my compiler. When the throw happens the debugger complains about uncaught exception when I'm definitly inside a catch implemented by our TRAP.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 94
diff changeset
    26
f561f9ae805b Trying to get trap/leave to work properly but the whole WINS stuff seems over complicated with a lot of assembly in the middle and it's not working on my compiler. When the throw happens the debugger complains about uncaught exception when I'm definitly inside a catch implemented by our TRAP.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 94
diff changeset
    27
//SL: Empty on FCL ?
f561f9ae805b Trying to get trap/leave to work properly but the whole WINS stuff seems over complicated with a lot of assembly in the middle and it's not working on my compiler. When the throw happens the debugger complains about uncaught exception when I'm definitly inside a catch implemented by our TRAP.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 94
diff changeset
    28
//For now we use this for basic testing on our SYMC implementation
f561f9ae805b Trying to get trap/leave to work properly but the whole WINS stuff seems over complicated with a lot of assembly in the middle and it's not working on my compiler. When the throw happens the debugger complains about uncaught exception when I'm definitly inside a catch implemented by our TRAP.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 94
diff changeset
    29
f561f9ae805b Trying to get trap/leave to work properly but the whole WINS stuff seems over complicated with a lot of assembly in the middle and it's not working on my compiler. When the throw happens the debugger complains about uncaught exception when I'm definitly inside a catch implemented by our TRAP.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 94
diff changeset
    30
f561f9ae805b Trying to get trap/leave to work properly but the whole WINS stuff seems over complicated with a lot of assembly in the middle and it's not working on my compiler. When the throw happens the debugger complains about uncaught exception when I'm definitly inside a catch implemented by our TRAP.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 94
diff changeset
    31
GLDEF_C void MainL()
f561f9ae805b Trying to get trap/leave to work properly but the whole WINS stuff seems over complicated with a lot of assembly in the middle and it's not working on my compiler. When the throw happens the debugger complains about uncaught exception when I'm definitly inside a catch implemented by our TRAP.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 94
diff changeset
    32
	{
f561f9ae805b Trying to get trap/leave to work properly but the whole WINS stuff seems over complicated with a lot of assembly in the middle and it's not working on my compiler. When the throw happens the debugger complains about uncaught exception when I'm definitly inside a catch implemented by our TRAP.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 94
diff changeset
    33
f561f9ae805b Trying to get trap/leave to work properly but the whole WINS stuff seems over complicated with a lot of assembly in the middle and it's not working on my compiler. When the throw happens the debugger complains about uncaught exception when I'm definitly inside a catch implemented by our TRAP.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 94
diff changeset
    34
	CBase* base=new(ELeave) CBase();
f561f9ae805b Trying to get trap/leave to work properly but the whole WINS stuff seems over complicated with a lot of assembly in the middle and it's not working on my compiler. When the throw happens the debugger complains about uncaught exception when I'm definitly inside a catch implemented by our TRAP.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 94
diff changeset
    35
	delete base;
f561f9ae805b Trying to get trap/leave to work properly but the whole WINS stuff seems over complicated with a lot of assembly in the middle and it's not working on my compiler. When the throw happens the debugger complains about uncaught exception when I'm definitly inside a catch implemented by our TRAP.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 94
diff changeset
    36
	
f561f9ae805b Trying to get trap/leave to work properly but the whole WINS stuff seems over complicated with a lot of assembly in the middle and it's not working on my compiler. When the throw happens the debugger complains about uncaught exception when I'm definitly inside a catch implemented by our TRAP.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 94
diff changeset
    37
	//Testing cleanup stack
f561f9ae805b Trying to get trap/leave to work properly but the whole WINS stuff seems over complicated with a lot of assembly in the middle and it's not working on my compiler. When the throw happens the debugger complains about uncaught exception when I'm definitly inside a catch implemented by our TRAP.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 94
diff changeset
    38
	TRAPD(err,
f561f9ae805b Trying to get trap/leave to work properly but the whole WINS stuff seems over complicated with a lot of assembly in the middle and it's not working on my compiler. When the throw happens the debugger complains about uncaught exception when I'm definitly inside a catch implemented by our TRAP.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 94
diff changeset
    39
	base=new(ELeave) CBase();
f561f9ae805b Trying to get trap/leave to work properly but the whole WINS stuff seems over complicated with a lot of assembly in the middle and it's not working on my compiler. When the throw happens the debugger complains about uncaught exception when I'm definitly inside a catch implemented by our TRAP.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 94
diff changeset
    40
	CleanupStack::PushL(base);
f561f9ae805b Trying to get trap/leave to work properly but the whole WINS stuff seems over complicated with a lot of assembly in the middle and it's not working on my compiler. When the throw happens the debugger complains about uncaught exception when I'm definitly inside a catch implemented by our TRAP.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 94
diff changeset
    41
	User::Leave(KErrCancel);
f561f9ae805b Trying to get trap/leave to work properly but the whole WINS stuff seems over complicated with a lot of assembly in the middle and it's not working on my compiler. When the throw happens the debugger complains about uncaught exception when I'm definitly inside a catch implemented by our TRAP.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 94
diff changeset
    42
	);
f561f9ae805b Trying to get trap/leave to work properly but the whole WINS stuff seems over complicated with a lot of assembly in the middle and it's not working on my compiler. When the throw happens the debugger complains about uncaught exception when I'm definitly inside a catch implemented by our TRAP.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 94
diff changeset
    43
f561f9ae805b Trying to get trap/leave to work properly but the whole WINS stuff seems over complicated with a lot of assembly in the middle and it's not working on my compiler. When the throw happens the debugger complains about uncaught exception when I'm definitly inside a catch implemented by our TRAP.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 94
diff changeset
    44
	ASSERT(err==KErrCancel);
f561f9ae805b Trying to get trap/leave to work properly but the whole WINS stuff seems over complicated with a lot of assembly in the middle and it's not working on my compiler. When the throw happens the debugger complains about uncaught exception when I'm definitly inside a catch implemented by our TRAP.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 94
diff changeset
    45
f561f9ae805b Trying to get trap/leave to work properly but the whole WINS stuff seems over complicated with a lot of assembly in the middle and it's not working on my compiler. When the throw happens the debugger complains about uncaught exception when I'm definitly inside a catch implemented by our TRAP.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 94
diff changeset
    46
	//Testing alloc failure
f561f9ae805b Trying to get trap/leave to work properly but the whole WINS stuff seems over complicated with a lot of assembly in the middle and it's not working on my compiler. When the throw happens the debugger complains about uncaught exception when I'm definitly inside a catch implemented by our TRAP.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 94
diff changeset
    47
	TRAP(err,
f561f9ae805b Trying to get trap/leave to work properly but the whole WINS stuff seems over complicated with a lot of assembly in the middle and it's not working on my compiler. When the throw happens the debugger complains about uncaught exception when I'm definitly inside a catch implemented by our TRAP.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 94
diff changeset
    48
	TUint8* test=new(ELeave) TUint8[1024*1024*10];
f561f9ae805b Trying to get trap/leave to work properly but the whole WINS stuff seems over complicated with a lot of assembly in the middle and it's not working on my compiler. When the throw happens the debugger complains about uncaught exception when I'm definitly inside a catch implemented by our TRAP.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 94
diff changeset
    49
	delete[] test;
f561f9ae805b Trying to get trap/leave to work properly but the whole WINS stuff seems over complicated with a lot of assembly in the middle and it's not working on my compiler. When the throw happens the debugger complains about uncaught exception when I'm definitly inside a catch implemented by our TRAP.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 94
diff changeset
    50
	);
f561f9ae805b Trying to get trap/leave to work properly but the whole WINS stuff seems over complicated with a lot of assembly in the middle and it's not working on my compiler. When the throw happens the debugger complains about uncaught exception when I'm definitly inside a catch implemented by our TRAP.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 94
diff changeset
    51
f561f9ae805b Trying to get trap/leave to work properly but the whole WINS stuff seems over complicated with a lot of assembly in the middle and it's not working on my compiler. When the throw happens the debugger complains about uncaught exception when I'm definitly inside a catch implemented by our TRAP.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 94
diff changeset
    52
	ASSERT(err==KErrNoMemory);
f561f9ae805b Trying to get trap/leave to work properly but the whole WINS stuff seems over complicated with a lot of assembly in the middle and it's not working on my compiler. When the throw happens the debugger complains about uncaught exception when I'm definitly inside a catch implemented by our TRAP.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 94
diff changeset
    53
f561f9ae805b Trying to get trap/leave to work properly but the whole WINS stuff seems over complicated with a lot of assembly in the middle and it's not working on my compiler. When the throw happens the debugger complains about uncaught exception when I'm definitly inside a catch implemented by our TRAP.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 94
diff changeset
    54
	}
f561f9ae805b Trying to get trap/leave to work properly but the whole WINS stuff seems over complicated with a lot of assembly in the middle and it's not working on my compiler. When the throw happens the debugger complains about uncaught exception when I'm definitly inside a catch implemented by our TRAP.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 94
diff changeset
    55
f561f9ae805b Trying to get trap/leave to work properly but the whole WINS stuff seems over complicated with a lot of assembly in the middle and it's not working on my compiler. When the throw happens the debugger complains about uncaught exception when I'm definitly inside a catch implemented by our TRAP.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 94
diff changeset
    56
f561f9ae805b Trying to get trap/leave to work properly but the whole WINS stuff seems over complicated with a lot of assembly in the middle and it's not working on my compiler. When the throw happens the debugger complains about uncaught exception when I'm definitly inside a catch implemented by our TRAP.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 94
diff changeset
    57
GLDEF_C TInt E32Main()
f561f9ae805b Trying to get trap/leave to work properly but the whole WINS stuff seems over complicated with a lot of assembly in the middle and it's not working on my compiler. When the throw happens the debugger complains about uncaught exception when I'm definitly inside a catch implemented by our TRAP.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 94
diff changeset
    58
	{
f561f9ae805b Trying to get trap/leave to work properly but the whole WINS stuff seems over complicated with a lot of assembly in the middle and it's not working on my compiler. When the throw happens the debugger complains about uncaught exception when I'm definitly inside a catch implemented by our TRAP.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 94
diff changeset
    59
	//What do we do then
f561f9ae805b Trying to get trap/leave to work properly but the whole WINS stuff seems over complicated with a lot of assembly in the middle and it's not working on my compiler. When the throw happens the debugger complains about uncaught exception when I'm definitly inside a catch implemented by our TRAP.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 94
diff changeset
    60
	
f561f9ae805b Trying to get trap/leave to work properly but the whole WINS stuff seems over complicated with a lot of assembly in the middle and it's not working on my compiler. When the throw happens the debugger complains about uncaught exception when I'm definitly inside a catch implemented by our TRAP.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 94
diff changeset
    61
	__UHEAP_MARK;
f561f9ae805b Trying to get trap/leave to work properly but the whole WINS stuff seems over complicated with a lot of assembly in the middle and it's not working on my compiler. When the throw happens the debugger complains about uncaught exception when I'm definitly inside a catch implemented by our TRAP.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 94
diff changeset
    62
f561f9ae805b Trying to get trap/leave to work properly but the whole WINS stuff seems over complicated with a lot of assembly in the middle and it's not working on my compiler. When the throw happens the debugger complains about uncaught exception when I'm definitly inside a catch implemented by our TRAP.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 94
diff changeset
    63
	//CBase* base=new(ELeave) CBase();
f561f9ae805b Trying to get trap/leave to work properly but the whole WINS stuff seems over complicated with a lot of assembly in the middle and it's not working on my compiler. When the throw happens the debugger complains about uncaught exception when I'm definitly inside a catch implemented by our TRAP.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 94
diff changeset
    64
	CBase* base=new CBase();
f561f9ae805b Trying to get trap/leave to work properly but the whole WINS stuff seems over complicated with a lot of assembly in the middle and it's not working on my compiler. When the throw happens the debugger complains about uncaught exception when I'm definitly inside a catch implemented by our TRAP.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 94
diff changeset
    65
	delete base;
f561f9ae805b Trying to get trap/leave to work properly but the whole WINS stuff seems over complicated with a lot of assembly in the middle and it's not working on my compiler. When the throw happens the debugger complains about uncaught exception when I'm definitly inside a catch implemented by our TRAP.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 94
diff changeset
    66
f561f9ae805b Trying to get trap/leave to work properly but the whole WINS stuff seems over complicated with a lot of assembly in the middle and it's not working on my compiler. When the throw happens the debugger complains about uncaught exception when I'm definitly inside a catch implemented by our TRAP.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 94
diff changeset
    67
	TUint8* test=new TUint8[1024*9];
f561f9ae805b Trying to get trap/leave to work properly but the whole WINS stuff seems over complicated with a lot of assembly in the middle and it's not working on my compiler. When the throw happens the debugger complains about uncaught exception when I'm definitly inside a catch implemented by our TRAP.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 94
diff changeset
    68
	delete[] test;
f561f9ae805b Trying to get trap/leave to work properly but the whole WINS stuff seems over complicated with a lot of assembly in the middle and it's not working on my compiler. When the throw happens the debugger complains about uncaught exception when I'm definitly inside a catch implemented by our TRAP.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 94
diff changeset
    69
f561f9ae805b Trying to get trap/leave to work properly but the whole WINS stuff seems over complicated with a lot of assembly in the middle and it's not working on my compiler. When the throw happens the debugger complains about uncaught exception when I'm definitly inside a catch implemented by our TRAP.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 94
diff changeset
    70
	CTrapCleanup* cleanupStack = CTrapCleanup::New();
f561f9ae805b Trying to get trap/leave to work properly but the whole WINS stuff seems over complicated with a lot of assembly in the middle and it's not working on my compiler. When the throw happens the debugger complains about uncaught exception when I'm definitly inside a catch implemented by our TRAP.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 94
diff changeset
    71
	if (!cleanupStack)
f561f9ae805b Trying to get trap/leave to work properly but the whole WINS stuff seems over complicated with a lot of assembly in the middle and it's not working on my compiler. When the throw happens the debugger complains about uncaught exception when I'm definitly inside a catch implemented by our TRAP.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 94
diff changeset
    72
		{
f561f9ae805b Trying to get trap/leave to work properly but the whole WINS stuff seems over complicated with a lot of assembly in the middle and it's not working on my compiler. When the throw happens the debugger complains about uncaught exception when I'm definitly inside a catch implemented by our TRAP.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 94
diff changeset
    73
		return KErrNoMemory;
f561f9ae805b Trying to get trap/leave to work properly but the whole WINS stuff seems over complicated with a lot of assembly in the middle and it's not working on my compiler. When the throw happens the debugger complains about uncaught exception when I'm definitly inside a catch implemented by our TRAP.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 94
diff changeset
    74
		}
f561f9ae805b Trying to get trap/leave to work properly but the whole WINS stuff seems over complicated with a lot of assembly in the middle and it's not working on my compiler. When the throw happens the debugger complains about uncaught exception when I'm definitly inside a catch implemented by our TRAP.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 94
diff changeset
    75
f561f9ae805b Trying to get trap/leave to work properly but the whole WINS stuff seems over complicated with a lot of assembly in the middle and it's not working on my compiler. When the throw happens the debugger complains about uncaught exception when I'm definitly inside a catch implemented by our TRAP.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 94
diff changeset
    76
	TRAPD(err,MainL());
f561f9ae805b Trying to get trap/leave to work properly but the whole WINS stuff seems over complicated with a lot of assembly in the middle and it's not working on my compiler. When the throw happens the debugger complains about uncaught exception when I'm definitly inside a catch implemented by our TRAP.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 94
diff changeset
    77
f561f9ae805b Trying to get trap/leave to work properly but the whole WINS stuff seems over complicated with a lot of assembly in the middle and it's not working on my compiler. When the throw happens the debugger complains about uncaught exception when I'm definitly inside a catch implemented by our TRAP.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 94
diff changeset
    78
	delete cleanupStack;
f561f9ae805b Trying to get trap/leave to work properly but the whole WINS stuff seems over complicated with a lot of assembly in the middle and it's not working on my compiler. When the throw happens the debugger complains about uncaught exception when I'm definitly inside a catch implemented by our TRAP.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 94
diff changeset
    79
f561f9ae805b Trying to get trap/leave to work properly but the whole WINS stuff seems over complicated with a lot of assembly in the middle and it's not working on my compiler. When the throw happens the debugger complains about uncaught exception when I'm definitly inside a catch implemented by our TRAP.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 94
diff changeset
    80
	__UHEAP_MARKEND;
f561f9ae805b Trying to get trap/leave to work properly but the whole WINS stuff seems over complicated with a lot of assembly in the middle and it's not working on my compiler. When the throw happens the debugger complains about uncaught exception when I'm definitly inside a catch implemented by our TRAP.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 94
diff changeset
    81
f561f9ae805b Trying to get trap/leave to work properly but the whole WINS stuff seems over complicated with a lot of assembly in the middle and it's not working on my compiler. When the throw happens the debugger complains about uncaught exception when I'm definitly inside a catch implemented by our TRAP.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 94
diff changeset
    82
	return err;
f561f9ae805b Trying to get trap/leave to work properly but the whole WINS stuff seems over complicated with a lot of assembly in the middle and it's not working on my compiler. When the throw happens the debugger complains about uncaught exception when I'm definitly inside a catch implemented by our TRAP.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 94
diff changeset
    83
	}
f561f9ae805b Trying to get trap/leave to work properly but the whole WINS stuff seems over complicated with a lot of assembly in the middle and it's not working on my compiler. When the throw happens the debugger complains about uncaught exception when I'm definitly inside a catch implemented by our TRAP.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 94
diff changeset
    84
f561f9ae805b Trying to get trap/leave to work properly but the whole WINS stuff seems over complicated with a lot of assembly in the middle and it's not working on my compiler. When the throw happens the debugger complains about uncaught exception when I'm definitly inside a catch implemented by our TRAP.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 94
diff changeset
    85
f561f9ae805b Trying to get trap/leave to work properly but the whole WINS stuff seems over complicated with a lot of assembly in the middle and it's not working on my compiler. When the throw happens the debugger complains about uncaught exception when I'm definitly inside a catch implemented by our TRAP.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 94
diff changeset
    86
TInt main()
f561f9ae805b Trying to get trap/leave to work properly but the whole WINS stuff seems over complicated with a lot of assembly in the middle and it's not working on my compiler. When the throw happens the debugger complains about uncaught exception when I'm definitly inside a catch implemented by our TRAP.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 94
diff changeset
    87
	{
f561f9ae805b Trying to get trap/leave to work properly but the whole WINS stuff seems over complicated with a lot of assembly in the middle and it's not working on my compiler. When the throw happens the debugger complains about uncaught exception when I'm definitly inside a catch implemented by our TRAP.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 94
diff changeset
    88
	User::InitProcess();
f561f9ae805b Trying to get trap/leave to work properly but the whole WINS stuff seems over complicated with a lot of assembly in the middle and it's not working on my compiler. When the throw happens the debugger complains about uncaught exception when I'm definitly inside a catch implemented by our TRAP.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 94
diff changeset
    89
	//BootEpoc(ETrue);
f561f9ae805b Trying to get trap/leave to work properly but the whole WINS stuff seems over complicated with a lot of assembly in the middle and it's not working on my compiler. When the throw happens the debugger complains about uncaught exception when I'm definitly inside a catch implemented by our TRAP.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 94
diff changeset
    90
	E32Main();
f561f9ae805b Trying to get trap/leave to work properly but the whole WINS stuff seems over complicated with a lot of assembly in the middle and it's not working on my compiler. When the throw happens the debugger complains about uncaught exception when I'm definitly inside a catch implemented by our TRAP.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 94
diff changeset
    91
f561f9ae805b Trying to get trap/leave to work properly but the whole WINS stuff seems over complicated with a lot of assembly in the middle and it's not working on my compiler. When the throw happens the debugger complains about uncaught exception when I'm definitly inside a catch implemented by our TRAP.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 94
diff changeset
    92
	User::Exit(0);
f561f9ae805b Trying to get trap/leave to work properly but the whole WINS stuff seems over complicated with a lot of assembly in the middle and it's not working on my compiler. When the throw happens the debugger complains about uncaught exception when I'm definitly inside a catch implemented by our TRAP.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 94
diff changeset
    93
	return 0;
f561f9ae805b Trying to get trap/leave to work properly but the whole WINS stuff seems over complicated with a lot of assembly in the middle and it's not working on my compiler. When the throw happens the debugger complains about uncaught exception when I'm definitly inside a catch implemented by our TRAP.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 94
diff changeset
    94
	}
f561f9ae805b Trying to get trap/leave to work properly but the whole WINS stuff seems over complicated with a lot of assembly in the middle and it's not working on my compiler. When the throw happens the debugger complains about uncaught exception when I'm definitly inside a catch implemented by our TRAP.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 94
diff changeset
    95
f561f9ae805b Trying to get trap/leave to work properly but the whole WINS stuff seems over complicated with a lot of assembly in the middle and it's not working on my compiler. When the throw happens the debugger complains about uncaught exception when I'm definitly inside a catch implemented by our TRAP.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 94
diff changeset
    96
#endif
f561f9ae805b Trying to get trap/leave to work properly but the whole WINS stuff seems over complicated with a lot of assembly in the middle and it's not working on my compiler. When the throw happens the debugger complains about uncaught exception when I'm definitly inside a catch implemented by our TRAP.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 94
diff changeset
    97