--- a/kernel/eka/compsupp/bld.inf Thu Sep 02 21:54:16 2010 +0300
+++ b/kernel/eka/compsupp/bld.inf Fri Sep 17 08:37:04 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of the License "ARM EABI LICENCE.txt"
@@ -13,66 +13,66 @@
// Description:
// Compiler runtime support.
//
-//
PRJ_PLATFORMS
-ARMV4 ARMV5 ARMV5SMP ARMV7
-
+ARMV4 ARMV5 ARMV5SMP ARMV6 ARMV7
PRJ_EXPORTS
-rvct.h SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(rvct/)
-gcce/gcce.h SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(gcce/)
+rvct.h SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(rvct/)
+gcce/gcce.h SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(gcce/)
+symcpp/symcpp.h SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(symcpp.h)
-symcpp/symcpp.h SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(symcpp.h)
-
-compsupp.iby /epoc32/rom/include/
-
+compsupp.iby /epoc32/rom/include/
PRJ_MMPFILES
-#if !defined GCCXML && !defined GCCE
+#if !defined(GCCXML) && !defined(GCCE)
symcpp/scppnwdl.mmp
rvct/dfprvct-thunk.mmp
rvct/usrt.mmp
+ rvct/usrt_nx.mmp
rvct/ksrt.mmp
- #ifndef SMP // Only static libraries build for SMP.
-
- rvct/drtaeabi.mmp
-
- rvct/dfpaeabi.mmp
- rvct/dfpaeabi_vfpv2.mmp
+ #ifndef SMP
+ rvct/drtaeabi.mmp
+ rvct/dfpaeabi.mmp
+ rvct/dfpaeabi_vfpv2.mmp
- #if defined(ARMCC_2_2) || defined(ARMCC_3_1)
-
- rvct/drtrvct.mmp
- rvct/drtrvct_vfpv2.mmp
-
- rvct/dfprvct.mmp
- rvct/dfprvct_vfpv2.mmp
- #endif
-
+ // As of RVCT 4.0 we no longer export compiler-internal functions.
+ #if defined(ARMCC_2_2) || defined(ARMCC_3_1)
+ rvct/drtrvct.mmp
+ rvct/drtrvct_vfpv2.mmp
+ rvct/dfprvct.mmp
+ rvct/dfprvct_vfpv2.mmp
+ #endif
#endif
PRJ_EXTENSIONS
-// Unzip RVCT3.1 runtime if being built with RVCT2.2 or RVCT4.0
-
-start extension tools/compsupp
+ #ifndef ARMCC_2_2
+ start extension tools/compsupp
+ option FILE $(EXTENSION_ROOT)/rt_2_2.zip
+ option TODIR $(EPOCROOT)epoc32/release
+ end
+ #endif
-#if defined(ARMCC_2_2) || defined(ARMCC_4_0)
-option FILE $(EXTENSION_ROOT)/rt_3_1.zip
-#elif defined(ARMCC_3_1)
-option FILE $(EXTENSION_ROOT)/rt_2_2.zip
+ #ifndef ARMCC_3_1
+ start extension tools/compsupp
+ option FILE $(EXTENSION_ROOT)/rt_3_1.zip
+ option TODIR $(EPOCROOT)epoc32/release
+ end
+ #endif
+
+ #ifndef ARMCC_4_0
+ start extension tools/compsupp
+ option FILE $(EXTENSION_ROOT)/rt_4_0.zip
+ option TODIR $(EPOCROOT)epoc32/release
+ end
+ #endif
+
#endif
-option TODIR $(EPOCROOT)epoc32/release
-end
-
-#endif // #if !defined GCCXML && !defined GCCE
-
-
--- a/kernel/eka/compsupp/compsupp.iby Thu Sep 02 21:54:16 2010 +0300
+++ b/kernel/eka/compsupp/compsupp.iby Fri Sep 17 08:37:04 2010 +0300
@@ -25,9 +25,9 @@
# error "RVCT 2.1 is not supported."
#endif
-// Set a default run-time version. In the future, 3.1 or 4.X should be the default.
+// Set RVCT4.0 as the default run-time version for TB10.1
#if !( defined(RVCT2_2) || defined(RVCT3_1) || defined(RVCT4_0) )
-# define RVCT2_2
+# define RVCT4_0
#endif
#if defined(VFPHELPERS) && !defined(NOVFPHELPERS)
--- a/kernel/eka/compsupp/eabi/drtaeabiu.def Thu Sep 02 21:54:16 2010 +0300
+++ b/kernel/eka/compsupp/eabi/drtaeabiu.def Fri Sep 17 08:37:04 2010 +0300
@@ -224,4 +224,6 @@
__aeabi_uidiv @ 223 NONAME
__ARM_get_typeid @ 224 NONAME
__cxa_get_exception_ptr @ 225 NONAME
+ _ZN23TCppRTExceptionsGlobals22Init2ndEmergencyBufferEv @ 226 NONAME
+ _ZN23TCppRTExceptionsGlobals22Kill2ndEmergencyBufferEv @ 227 NONAME
Binary file kernel/eka/compsupp/rt_2_2.zip has changed
Binary file kernel/eka/compsupp/rt_3_1.zip has changed
Binary file kernel/eka/compsupp/rt_4_0.zip has changed
--- a/kernel/eka/compsupp/rvct/usrt.mmp Thu Sep 02 21:54:16 2010 +0300
+++ b/kernel/eka/compsupp/rvct/usrt.mmp Fri Sep 17 08:37:04 2010 +0300
@@ -22,8 +22,6 @@
target usrt3_1.lib
#elif defined(ARMCC_4_0)
target usrt4_0.lib
-#else
-target error
#endif
SMPSAFE
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/kernel/eka/compsupp/rvct/usrt_nx.mmp Fri Sep 17 08:37:04 2010 +0300
@@ -0,0 +1,49 @@
+// Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of the License "ARM EABI LICENCE.txt"
+// which accompanies this distribution, and is available
+// in kernel/eka/compsupp.
+//
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+//
+
+#if defined(ARMCC_2_2)
+target usrt_nx_2_2.lib
+#elif defined(ARMCC_3_1)
+target usrt_nx_3_1.lib
+#elif defined(ARMCC_4_0)
+target usrt_nx_4_0.lib
+#endif
+
+SMPSAFE
+targettype lib
+
+macro ENABLE_2ND_EMERGENCY_BUFFER
+
+always_build_as_arm
+
+source ucppfini.cpp
+source ucppinit.cpp
+source dllexp.cpp
+source ../symaehabi/callfirstprocessfn.cpp
+
+#if defined(ARMCC_2_2) || defined(ARMCC_3_1)
+sourcepath call_via_rx
+source r0.cpp r1.cpp r2.cpp r3.cpp
+source r4.cpp r5.cpp r6.cpp r7.cpp
+#endif
+
+OS_LAYER_SYSTEMINCLUDE_SYMBIAN
+
+start armcc
+ arminc
+end
+
--- a/kernel/eka/compsupp/rvct2_0/callviar0.cpp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-
-extern "C"
-{
-__asm void __call_via_r0()
- {
- CODE32
- BX r0
- }
-}
--- a/kernel/eka/compsupp/rvct2_0/callviar1.cpp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-
-extern "C"
-{
-__asm void __call_via_r1()
- {
- CODE32
- BX r1
- }
-}
--- a/kernel/eka/compsupp/rvct2_0/callviar2.cpp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-
-extern "C"
-{
-__asm void __call_via_r2()
- {
- CODE32
- BX r2
- }
-}
--- a/kernel/eka/compsupp/rvct2_0/callviar3.cpp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-
-extern "C"
-{
-__asm void __call_via_r3()
- {
- CODE32
- BX r3
- }
-}
--- a/kernel/eka/compsupp/rvct2_0/callviar4.cpp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-
-extern "C"
-{
-__asm void __call_via_r4()
- {
- CODE32
- BX r4
- }
-}
--- a/kernel/eka/compsupp/rvct2_0/callviar5.cpp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-
-extern "C"
-{
-__asm void __call_via_r5()
- {
- CODE32
- BX r5
- }
-}
--- a/kernel/eka/compsupp/rvct2_0/callviar6.cpp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-
-extern "C"
-{
-__asm void __call_via_r6()
- {
- CODE32
- BX r6
- }
-}
--- a/kernel/eka/compsupp/rvct2_0/callviar7.cpp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-
-extern "C"
-{
-__asm void __call_via_r7()
- {
- CODE32
- BX r7
- }
-}
--- a/kernel/eka/compsupp/rvct2_0/cppinit.h Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +0,0 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-
-/**
- @file
- @internalComponent
-*/
-
-#ifndef _CPPINIT_H_
-#define _CPPINIT_H_
-extern "C" {
-
-// Doing it like this means no space is taken by the symbols
-#define NUKE_SYMBOL(sig) __asm void sig {}
-typedef void (*PFV)();
-typedef void (DTOR)(void *);
-#define RELOCATE(loc, type) (type)((int)loc + (int)*loc)
-
-typedef struct dtd
-{
-// dtd * prev;
- void * obj;
- DTOR * dtor;
-} dtd;
-
-//extern void run_static_ctors (void);
-extern void run_static_dtors (void);
-
-}
-
-#endif
--- a/kernel/eka/compsupp/rvct2_0/dllexp.cpp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,21 +0,0 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-
-extern "C" {
-
-// This will overridden .exp files
-void __DLL_Export_Table__(){};
-
-}
--- a/kernel/eka/compsupp/rvct2_0/ksrt.mmp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// KSRT.MPP
-//
-//
-
-ALWAYS_BUILD_AS_ARM
-
-TARGET ksrt.lib
-
-TARGETTYPE klib
-
-SOURCEPATH .
-SOURCE callviar0.cpp callviar1.cpp callviar2.cpp callviar3.cpp
-SOURCE callviar4.cpp callviar5.cpp callviar6.cpp callviar7.cpp
-SOURCE ucppinit.cpp ucppfini.cpp
-
-START ARMCC
-ARMRT
-END
-
-VENDORID 0x70000001
--- a/kernel/eka/compsupp/rvct2_0/rtabort.cpp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-
-#include <e32std.h>
-#include <e32std_private.h>
-
-extern "C" {
-// function the runtime can call to abort a process,
-// the runtime library is not finalized and no atexit
-// processing takes places.
-EXPORT_C void __rt_abort() /* never returns */
- {
- RThread().Kill(KErrAbort);
- }
-}
--- a/kernel/eka/compsupp/rvct2_0/rtdiv0.cpp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,24 +0,0 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-
-#include <e32std.h>
-#include <e32std_private.h>
-
-extern "C" {
-EXPORT_C void __rt_div0 (void)
- {
- User::RaiseException(EExcIntegerDivideByZero);
- }
-}
--- a/kernel/eka/compsupp/rvct2_0/rte32dll.cpp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,22 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-#include <e32std.h>
-#include <e32std_private.h>
-
-void E32Dll(TDllReason aReason) {}
--- a/kernel/eka/compsupp/rvct2_0/rtexit.cpp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +0,0 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// function the runtime can call to exit process, 'finalizing'
-// the runtime library but avoiding atexit processing.
-//
-//
-
-#include <e32std.h>
-#include <e32std_private.h>
-
-extern "C" {
-extern void __rt_lib_shutdown(void);
-
-EXPORT_C void __rt_exit(TInt aReturnCode) /* never returns */
- {
- __rt_lib_shutdown();
- User::Exit(aReturnCode);
- }
-}
--- a/kernel/eka/compsupp/rvct2_0/rtlib.cpp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// initialize and shutdown (low-level) runtime.
-// these are intended to go in user side static runtime lib
-//
-//
-
-#include <e32std.h>
-#include <e32std_private.h>
-
-extern "C" {
-EXPORT_C void __rt_lib_shutdown(void){};
-
-extern void _fp_init(void);
-extern void __cpp_initialise(void);
-
-EXPORT_C void __rt_lib_init(void)
- {
- _fp_init();
- __cpp_initialise();
- }
-}
--- a/kernel/eka/compsupp/rvct2_0/rtopdel.cpp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-
-//#include <stddef.h>
-#include <e32std.h>
-#include <e32std_private.h>
-//#include <e32math.h>
-//#include "uc_std.h"
-
-
-EXPORT_C void operator delete(TAny *aPtr)
-//
-// The replacement delete operator.
-//
- {
-
- User::Free(aPtr);
- }
-
-EXPORT_C void operator delete[](TAny * aPtr)
- {
-
- User::Free(aPtr);
- }
--- a/kernel/eka/compsupp/rvct2_0/rtopnew.cpp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +0,0 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-
-//#include <stddef.h>
-#include <e32std.h>
-#include <e32std_private.h>
-//#include <e32math.h>
-//#include "uc_std.h"
-
-
-EXPORT_C TAny *operator new(TUint aSize) __NO_THROW
-//
-// The global new operator.
-//
- {
-
- return(User::Alloc(aSize));
- }
-
-EXPORT_C TAny *operator new[](TUint aSize) __NO_THROW
- {
-
- return(User::Alloc(aSize));
- }
-
-EXPORT_C TAny *operator new(TUint aSize,TUint anExtraSize) __NO_THROW
-//
-// Allocate the requested size plus the extra.
-//
- {
-
- return(User::Alloc(aSize+anExtraSize));
- }
--- a/kernel/eka/compsupp/rvct2_0/rtraise.cpp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,61 +0,0 @@
-// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// function the runtime can call to 'raise an exception'
-//
-//
-
-#include <e32std.h>
-#include <e32std_private.h>
-#include <signal.h> // get from %ARMINC%
-
-extern "C" {
-
-EXPORT_C TInt __rt_raise(TInt signal, TInt type)
- {
- TExcType aExc = EExcGeneral;
- // translate signal into EPOC exception
- switch (signal)
- {
- case SIGABRT :
- aExc = EExcAbort;
- break;
- case SIGFPE :
- switch (type)
- {
- case DIVBYZERO :
- aExc = EExcAbort;
- break;
- default:
- aExc = EExcFloatInvalidOperation;
- }
- break;
- case SIGILL :
- aExc = EExcCodeAbort;
- break;
- case SIGINT :
- aExc = EExcUserInterrupt;
- break;
- case SIGSEGV :
- aExc = EExcDataAbort;
- break;
- case SIGTERM :
- aExc = EExcKill;
- break;
- }
- // yuk. Introduces dependendcy on EUSER!!
- User::RaiseException(aExc);
- return signal;
- }
-}
-
--- a/kernel/eka/compsupp/rvct2_0/rvct2_0.h Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,264 +0,0 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// e32\compsupp\rvct2_0\rvct2_0.h
-// This is the preinclude file for the rvct 2.0 compiler
-// It contains all the compiler specific definitions required by the SOS source
-//
-//
-
-
-#if defined(__PRODUCT_INCLUDE__)
-#include __PRODUCT_INCLUDE__
-#endif
-
-
-// stuff from e32def.h
-/**
-@publishedAll
-@released
-*/
-#define __NO_CLASS_CONSTS__
-
-/**
-@publishedAll
-@released
-*/
-#define __NORETURN__
-
-/**
-@publishedAll
-@released
-*/
-#define __NORETURN_TERMINATOR()
-
-/**
-@publishedAll
-@released
-*/
-#define IMPORT_C __declspec(dllimport)
-
-/**
-@publishedAll
-@released
-*/
-#define EXPORT_C __declspec(dllexport)
-
-/**
-@publishedAll
-@released
-*/
-#define IMPORT_VT __declspec(dllimport)
-
-/**
-@publishedAll
-@released
-*/
-#define __NO_THROW throw ()
-
-/**
-@publishedAll
-@released
-*/
-#define __THROW(t) throw (t)
-
-/**
-@publishedAll
-@released
-*/
-#define TEMPLATE_SPECIALIZATION template<>
-
-#ifndef __int64
-/**
-@internalComponent
-*/
-#define __int64 long long
-#endif
-
-/**
-@internalComponent
-*/
-#define __VALUE_IN_REGS__ __value_in_regs
-
-/**
-@publishedAll
-@released
-*/
-#define I64LIT(x) x##LL
-
-/**
-@publishedAll
-@released
-*/
-#define UI64LIT(x) x##ULL
-
-// __TText from e32cmn.h also e32des16.h
-#ifdef __cplusplus
-/**
-@internalComponent
-*/
-typedef wchar_t __TText; // Only ISO C++ has wchar_t as a primitive type
-
-/**
-@internalComponent
-*/
-#define __wchar_t_defined
-#else
-/**
-@internalComponent
-*/
-typedef unsigned short __TText;
-#endif
-
-/**
-@internalComponent
-*/
-#define __TText_defined
-
-// __NAKED__ from cpudefs.h
-/**
-@publishedAll
-@released
-*/
-#define __NAKED__ __asm
-
-/**
-@internalComponent
-*/
-#define ____ONLY_USE_NAKED_IN_CIA____ __asm
-
-// Int64 and Uint64 from nkern\nklib.h
-/**
-@publishedAll
-@released
-*/
-typedef long long Int64;
-
-/**
-@publishedAll
-@released
-*/
-typedef unsigned long long Uint64;
-
-// Here are RVCT 2.0's definitions for stdarg.h
-// These should be used by e.g. stdlib
-
-// see if we're using the BETA B compiler
-#if (__ARMCC_VERSION == 200022)
-#define RVCTBETA
-#endif
-
-#ifdef __cplusplus
- namespace std {
- extern "C" {
-#endif /* __cplusplus */
-
-#ifdef RVCTBETA
-/**
-@internalComponent
-*/
- typedef int *va_list[1];
-#else
-/**
-@internalComponent
-*/
- typedef struct __va_list { void *__ap; } va_list;
-#endif
-
-#ifdef __cplusplus
- } /* extern "C" */
- } /* namespace std */
-
- using ::std::va_list;
-#endif
-
-/**
-@internalComponent
-*/
-#define va_start(ap, parmN) __va_start(ap, parmN)
-
-/**
-@internalComponent
-*/
-#define va_arg(ap, type) __va_arg(ap, type)
-
-/**
-@internalComponent
-*/
-#define va_end(ap) ((void)0)
-
-// These are for Symbian OS C++ code
-/**
-@publishedAll
-@released
-*/
-#define VA_START(ap,pn) va_start(ap, pn)
-
-/**
-@publishedAll
-@released
-*/
-#define VA_ARG(ap,type) va_arg(ap,type)
-
-/**
-@publishedAll
-@released
-*/
-#define VA_END(ap) va_end(ap)
-
-/**
-@publishedAll
-@released
-*/
-#define VA_LIST va_list
-
-/**
-@internalComponent
-*/
-#define __VA_LIST_defined
-// This should prevent /stdlib/linc/stdarg.h from doing damage.
-#define _STDARG_H
-
-// now deal with stdarg_e.h
-/**
-@internalComponent
-*/
-typedef va_list __e32_va_list;
-
-/**
-@internalComponent
-*/
-#define _STDARG_E_H
-
-// This is an EABI compliant compiler
-#ifndef __EABI__
-/**
-@publishedAll
-@released
-*/
-#define __EABI__
-#endif
-
-// these are hopefully temporary
-
-// defining this means we don't get __NAKED__ ctors
-#ifndef __EABI_CTORS__
-/**
-@publishedAll
-@released
-*/
-#define __EABI_CTORS__
-#endif
-
-//#define __EARLY_DEBUG__
-
--- a/kernel/eka/compsupp/rvct2_0/sftfpini.cpp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,70 +0,0 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-
-#include <e32std.h>
-#include <e32std_private.h>
-
-// support functions for ARM supplied softvfp compiler-helper functions
-
-extern "C" {
-
-//void __rt_fp_status_register_cleanup(TAny * aReg)
-// {
-// delete aReg;
-// }
-
-// set up the fp status register
-EXPORT_C void _fp_init(void)
- {
- TUint32 * aReg = (TUint32 *)User::AllocZ(sizeof(TUint32));
- if (aReg)
- {
- Dll::SetTls(aReg /*, __rt_fp_status_register_cleanup*/);
- }
- else
- {
- // This will force us to try again if we actually get an FP
- // exception later.
- Dll::SetTls(0 /*, __rt_fp_status_register_cleanup*/);
- }
- }
-
-EXPORT_C TAny * __rt_fp_status_addr(void)
- {
- //return &__fp_status_register;
- TAny* aTls = Dll::Tls();
- if (aTls)
- return aTls;
- // we obviously failed to set it up before. Try again, so we can
- // at least try to error meaningfully
- TUint32* aReg = (TUint32*)User::AllocZ(sizeof(TUint32));
- _LIT(KFpGeneralPanic, "FP Emulator");
- if (aReg)
- {
- TInt r = Dll::SetTls(aReg /*, __rt_fp_status_register_cleanup*/);
- if (r==KErrNone)
- return aReg;
- // if we get here we really in trouble. Just Panic.
- User::Panic(KFpGeneralPanic, KErrGeneral);
- }
- else
- {
- // If we get here, we're toast anyway....
- User::Panic(KFpGeneralPanic, KErrNoMemory);
- }
- return 0;
- }
-}
-
--- a/kernel/eka/compsupp/rvct2_0/ucppfini.cpp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,62 +0,0 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// toplevel destruction routines for 'user side' code compiled
-// with the ARMEDG compiler.
-//
-//
-
-#include "cppinit.h"
-
-extern "C" {
-
-// Need to decide what this should do
-//void CppInitializationPanic(){};
-
-#define MAX_DTOR_RECORDS 256
-static dtd dtor_rec[MAX_DTOR_RECORDS];
-
-typedef dtd **dso_handle;
-dtd * __dso_handle = &dtor_rec[MAX_DTOR_RECORDS];
-
-int __cxa_atexit ( void (*f)(void *), void *p, dso_handle d )
- {
- dtd * drec = *d;
- drec--;
- // This is what the spec says to do!!
- if (drec < &dtor_rec[0]) return -1;
-
- drec->dtor = f;
- drec->obj = p;
- *d = drec;
- return 0;
- }
-
-void __cxa_finalize ( dso_handle d )
- {
- dtd * drec = * d;
- dtd * lim = &dtor_rec[MAX_DTOR_RECORDS];
- while (drec < lim)
- {
- drec->dtor(drec->obj);
- drec++;
- }
- *d = drec;
- }
-
-void run_static_dtors (void)
- {
- __cxa_finalize(&__dso_handle);
- }
-}
-
--- a/kernel/eka/compsupp/rvct2_0/ucppinit.cpp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +0,0 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// toplevel initialization/destruction routines for 'user side' code compiled
-// with the ARMEDG compiler. intended for static linking
-//
-//
-
-#include "cppinit.h"
-
-NUKE_SYMBOL(__call_ctors(void));
-NUKE_SYMBOL(__call_dtors(void));
-
-extern "C" {
-// linker symbols
-__weak PFV C$$pi_ctorvec$$Base;
-__weak PFV C$$pi_ctorvec$$Limit;
-__weak void _fp_init(void);
-
-
-// This calls each of the compiler constructed functions referenced from pi_ctorvec.
-// These functions arrange to 'call' the appropriate constructor for the 'static' instance
-// (in fact the call may be inlined). If the class of the instance has a destructor then
-// compiler records that this object needs 'destructing' at 'exit' time. It does this by
-// calling the function __cxa_atexit. We provide our own definition of this.
-//
-void __cpp_initialise(void)
- {
- void (*fp_init_fn)(void) = _fp_init;
- if (fp_init_fn) fp_init_fn();
- PFV * ctor_vec = &C$$pi_ctorvec$$Base;
- PFV * ctor_limit = &C$$pi_ctorvec$$Limit;
- for(; ctor_vec < ctor_limit; ctor_vec++) (RELOCATE(ctor_vec, PFV))();
- }
-}
-
-
-
-
-
--- a/kernel/eka/compsupp/rvct2_0/udfp.mmp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// UDFP.MPP
-//
-//
-
-TARGET udfp.dll
-
-TARGETTYPE dll
-
-SOURCEPATH .
-SOURCE udfpfrce.cpp
-// default _fp_init definition - should be overridden by fp library
-SOURCE sftfpini.cpp
-// dummy for now, needs to go away
-SOURCE rte32dll.cpp
-
-// yuk
-LIBRARY euser.lib
-
-START ARMCC
-//ARMRT - would like to be able to say this but there circularity with EUSER (argghhh!!!)
-ARMINC
-// we want the 'pure' versions to go with softvfp
-#ifdef MARM_ARMV5
-ARMLIBS f_t_p.l c_t__un.l
-#else
-ARMLIBS f_a_p.l c_a__un.l
-#endif
-END
-
-capability all
-
-VENDORID 0x70000001
-
-SMPSAFE
--- a/kernel/eka/compsupp/rvct2_0/udfpfrce.cpp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,136 +0,0 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// This function is simple a way to for these EXPORT statements into
-// the .in file. These symbols will therefore be referenced from
-// the export table and so **forced** into the udfp.dll
-//
-//
-
-__asm void __rt_exporter_dummy(void)
-{
- AREA |.directive|, READONLY, NOALLOC
-
- PRESERVE8
-
- DCB "#<SYMEDIT>#\n"
- // From %ARMLIB%\armlib\f_a_p.l
- DCB "EXPORT _dneg\n" // basic.o
- DCB "EXPORT _fneg\n" // basic.o
- DCB "EXPORT _dabs\n" // basic.o
- DCB "EXPORT _fabs\n" // basic.o
-
- DCB "EXPORT _d2f\n" // d2f.o
-
- DCB "EXPORT _dadd\n" // daddsub.o
- DCB "EXPORT _drsb\n" // daddsub.o
- DCB "EXPORT _dsub\n" // daddsub.o
-
- DCB "EXPORT _deq\n" // dcmp.o
- DCB "EXPORT _dneq\n" // dcmp.o
- DCB "EXPORT _dgr\n" // dcmp.o
- DCB "EXPORT _dgeq\n" // dcmp.o
- DCB "EXPORT _dleq\n" // dcmp.o
- DCB "EXPORT _dls\n" // dcmp.o
-
- DCB "EXPORT __dcmp4\n" // dcmp.o
- DCB "EXPORT _dcmp4\n" // dcmp.o
-
- DCB "EXPORT _drdiv\n" // ddiv.o
- DCB "EXPORT _ddiv\n" // ddiv.o
-// DCB "EXPORT ddiv_mantissas\n" // ddiv.o
-
- DCB "EXPORT _dcmpeq\n" // deqf.o
-
- DCB "EXPORT _dfix\n" // dfix.o
- DCB "EXPORT _dfix_r\n" // dfix.o
-
- DCB "EXPORT _ll_sfrom_d\n" // dfixll.o
- DCB "EXPORT _ll_sfrom_d_r\n" // dfixll.o
-
- DCB "EXPORT _dfixu\n" // dfixu.o
- DCB "EXPORT _dfixu_r\n" // dfixu.o
-
- DCB "EXPORT _ll_ufrom_d\n" // dfixull.o
- DCB "EXPORT _ll_ufrom_d_r\n" // dfixull.o
-
-// DCB "EXPORT _dflt_normalise\n" // dflt.o
- DCB "EXPORT _dfltu\n" // dflt.o
- DCB "EXPORT _dflt\n" // dflt.o
-
- DCB "EXPORT _ll_uto_d\n" // dfltll.o
- DCB "EXPORT _ll_sto_d\n" // dfltll.o
-
- DCB "EXPORT _dcmpge\n" // dgeqf.o
-
- DCB "EXPORT _dcmple\n" // dleqf.o
-
- DCB "EXPORT _dmul\n" // dmul.o
-
- DCB "EXPORT _drem\n" // drem.o
-
- DCB "EXPORT _drnd\n" // drnd.o
-
- DCB "EXPORT _dsqrt\n" // dsqrt.o
-
- DCB "EXPORT _f2d\n" // f2d.o
-
- DCB "EXPORT _fadd\n" // faddsub.o
- DCB "EXPORT _frsb\n" // faddsub.o
- DCB "EXPORT _fsub\n" // faddsub.o
-
- DCB "EXPORT _feq\n" // fcmp.o
- DCB "EXPORT _fneq\n" // fcmp.o
- DCB "EXPORT _fgr\n" // fcmp.o
- DCB "EXPORT _fgeq\n" // fcmp.o
- DCB "EXPORT _fleq\n" // fcmp.o
- DCB "EXPORT _fls\n" // fcmp.o
-
- DCB "EXPORT _fcmp4\n" // fcmp4.o
-
- DCB "EXPORT _frdiv\n" // fdiv.o
- DCB "EXPORT _fdiv\n" // fdiv.o
-
- DCB "EXPORT _fcmpeq\n" // feqf.o
-
- DCB "EXPORT _ffix\n" // ffix.o
- DCB "EXPORT _ffix_r\n" // ffix.o
-
- DCB "EXPORT _ll_sfrom_f\n" // ffixll.o
- DCB "EXPORT _ll_sfrom_f_r\n" // ffixll.o
-
- DCB "EXPORT _ffixu\n" // ffixu.o
- DCB "EXPORT _ffixu_r\n" // ffixu.o
-
- DCB "EXPORT _ll_ufrom_f\n" // ffixull.o
- DCB "EXPORT _ll_ufrom_f_r\n" // ffixull.o
-
- DCB "EXPORT _ffltu\n" // fflt.o
- DCB "EXPORT _fflt\n" // fflt.o
-
- DCB "EXPORT _ll_uto_f\n" // ffltll.o
- DCB "EXPORT _ll_sto_f\n" // ffltll.o
-
- DCB "EXPORT _fcmpge\n" // fgeqf.o
-
- DCB "EXPORT _fcmple\n" // fleqf.o
-
- DCB "EXPORT _fmul\n" // fmul.o
-
- DCB "EXPORT _frem\n" // frem.o
-
- DCB "EXPORT _frnd\n" // frnd.o
-
- DCB "EXPORT _fsqrt\n" // fsqrt.o
-
-}
--- a/kernel/eka/compsupp/rvct2_0/udrt.mmp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,52 +0,0 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// UDRT.MPP
-//
-//
-
-TARGET udrt.dll
-
-TARGETTYPE dll
-
-SOURCEPATH .
-SOURCE rtabort.cpp rtdiv0.cpp rtexit.cpp rtlib.cpp rtraise.cpp
-SOURCE udrtfrce.cpp
-// global new/delete operators
-SOURCE rtopnew.cpp rtopdel.cpp
-// default _fp_init definition - should be overridden by fp library
-SOURCE sftfpini.cpp
-// dummy for now, needs to go away
-SOURCE rte32dll.cpp
-
-// yuk
-LIBRARY euser.lib
-
-START ARMCC
-ARMRT
-ARMINC
-#ifdef MARM_ARMV5
-ARMLIBS c_t__un.l cpprt_t__u.l
-// shouldn't really need this if btod.o wasn't so monolithic....
-ARMLIBS f_t_p.l
-#else
-ARMLIBS c_a__un.l cpprt_a__u.l
-// shouldn't really need this if btod.o wasn't so monolithic....
-ARMLIBS f_a_p.l
-#endif
-END
-
-capability all
-VENDORID 0x70000001
-
-SMPSAFE
--- a/kernel/eka/compsupp/rvct2_0/udrtfrce.cpp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,158 +0,0 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// This function is simple a way to for these EXPORT statements into
-// the .in file. These symbols will therefore be referenced from
-// the export table and so **forced** into the udrt.dll
-//
-//
-
-__asm void __rt_exporter_dummy(void)
-{
- AREA |.directive|, READONLY, NOALLOC
-
- PRESERVE8
-
- DCB "#<SYMEDIT>#\n"
- // From %ARMLIB%\armlib\c_a__un.l
- DCB "EXPORT _ll_cmpeq\n" // _ll_cmpeq.o
- DCB "EXPORT _ll_cmpne\n" // _ll_cmpne.o
- DCB "EXPORT _ll_scmpge\n" // _ll_scmpge.o
- DCB "EXPORT _ll_scmpgt\n" // _ll_scmpgt.o
- DCB "EXPORT _ll_scmple\n" // _ll_scmple.o
- DCB "EXPORT _ll_scmplt\n" // _ll_scmplt.o
- DCB "EXPORT _ll_ucmpge\n" // _ll_ucmpge.o
- DCB "EXPORT _ll_ucmpgt\n" // _ll_ucmpgt.o
- DCB "EXPORT _ll_ucmple\n" // _ll_ucmple.o
- DCB "EXPORT _ll_ucmplt\n" // _ll_ucmplt.o
- DCB "EXPORT _memcpy\n" // _memcpy.o
- DCB "EXPORT abs\n" // abs.o
-
- DCB "EXPORT _btod_etento\n" // bigflt0.o
-
- DCB "EXPORT _btod_d2e\n" // btod.o
- DCB "EXPORT _btod_ediv\n"
- DCB "EXPORT _btod_emul\n"
- DCB "EXPORT _d2e_norm_op1\n"
- DCB "EXPORT _d2e_denorm_low\n"
- DCB "EXPORT _btod_emuld\n"
- DCB "EXPORT _btod_edivd\n"
- DCB "EXPORT _e2e\n"
- DCB "EXPORT _e2d\n"
- DCB "EXPORT __btod_mult_common\n"
- DCB "EXPORT __btod_div_common\n"
-
- DCB "EXPORT div\n" // div.o
- DCB "EXPORT __rt_divtest\n" // divtest.o
- DCB "EXPORT __rt_sdiv32by16\n" // dspdiv32.o
- DCB "EXPORT __rt_udiv32by16\n" // dspdiv32u.o
- DCB "EXPORT __rt_sdiv64by32\n" // dspdiv64.o
-
- DCB "EXPORT ldiv\n" // ldiv.o
-
- DCB "EXPORT llabs\n" // llabs.o
- DCB "EXPORT _ll_add\n" // lladd.o
- DCB "EXPORT _ll_addls\n" // lladdls.o
- DCB "EXPORT _ll_addlu\n" // lladdlu.o
- DCB "EXPORT _ll_addss\n" // lladdss.o
- DCB "EXPORT _ll_adduu\n" // lladduu.o
- DCB "EXPORT _ll_and\n" // lland.o
- DCB "EXPORT _ll_cmpge\n" // llcmpge.o
- DCB "EXPORT _ll_cmple\n" // llcmple.o
- DCB "EXPORT _ll_cmpu\n" // llcmpu.o
- DCB "EXPORT lldiv\n" // lldiv.o
- DCB "EXPORT _ll_eor\n" // lleor.o
- DCB "EXPORT _ll_from_l\n" // llfroml.o
- DCB "EXPORT _ll_from_u\n" // llfromu.o
- DCB "EXPORT _ll_mul\n" // llmul.o
- DCB "EXPORT _ll_mulls\n" // llmulls.o
- DCB "EXPORT _ll_mullu\n" // llmullu.o
- DCB "EXPORT _ll_mulss\n" // llmulss.o
- DCB "EXPORT _ll_muluu\n" // llmuluu.o
- DCB "EXPORT _ll_neg\n" // llneg.o
- DCB "EXPORT _ll_not\n" // llnot.o
- DCB "EXPORT _ll_or\n" // llor.o
- DCB "EXPORT _ll_rsb\n" // llrsb.o
- DCB "EXPORT _ll_rsbls\n" // llrsbls.o
- DCB "EXPORT _ll_rsblu\n" // llrsblu.o
- DCB "EXPORT _ll_rsbss\n" // llrsbss.o
- DCB "EXPORT _ll_rsbuu\n" // llrsbuu.o
- DCB "EXPORT _ll_sdiv\n" // llsdiv.o
- DCB "EXPORT _ll_sdiv10\n" // llsdiv10.o
- DCB "EXPORT _ll_shift_l\n" // llshl.o
- DCB "EXPORT _ll_srdv \n" // llsrdv.o
- DCB "EXPORT _ll_sshift_r\n" // llsshr.o
- DCB "EXPORT _ll_sub\n" // llsub.o
- DCB "EXPORT _ll_subls\n" // llsubls.o
- DCB "EXPORT _ll_sublu\n" // llsublu.o
- DCB "EXPORT _ll_subss\n" // llsubss.o
- DCB "EXPORT _ll_subuu\n" // llsubuu.o
- DCB "EXPORT _ll_to_l\n" // lltol.o
- DCB "EXPORT _ll_udiv_small\n" // lludiv.o
- DCB "EXPORT _ll_udiv_big\n" // lludiv.o
- DCB "EXPORT _ll_udiv_ginormous\n" // lludiv.o
- DCB "EXPORT _ll_div0\n" // lludiv.o
- DCB "EXPORT _ll_udiv\n" // lludiv.o
- DCB "EXPORT _ll_udiv10\n" // lludiv10.o
- DCB "EXPORT _ll_urdv\n" // llurdv.o
- DCB "EXPORT _ll_ushift_r\n" // llushr.o
-
- DCB "EXPORT _memset\n" // rt_memclr.o
- DCB "EXPORT __rt_memclr\n" // rt_memclr.o
- DCB "EXPORT _memset_w\n" // rt_memclr_w.o
- DCB "EXPORT __rt_memclr_w\n" // rt_memclr_w.o
- DCB "EXPORT __rt_memcpy\n" // rt_memcpy.o
- DCB "EXPORT _memcpy_lastbytes\n"// rt_memcpy_w.o
- DCB "EXPORT __rt_memcpy_w\n" // rt_memcpy_w.o
- DCB "EXPORT __rt_memmove\n" // rt_memmove.o
- DCB "EXPORT __memmove_aligned\n"// rt_memmove_w.o
- DCB "EXPORT __rt_memmove_w\n" // rt_memmove_w.o
- DCB "EXPORT __rt_memset\n" // rt_memset.o
-
- // New with RVCT 2.0 Release Candidte 2
- DCB "EXPORT __rt_switch8\n" // switch8.o
-
- DCB "EXPORT __rt_sdiv\n" // rt_sdiv.o
- DCB "EXPORT __rt_udiv\n" // rt_udiv.o
- DCB "EXPORT __rt_sdiv10\n" // rtsdiv10.o
- DCB "EXPORT __rt_udiv10\n" // rtudiv10.o
-
-
- // export the array and vector constructors
- // From %ARMLIB%\cpplib\cpprt_a__un.l
- DCB "EXPORT __cxa_vec_new\n" // vec_newdel.o
- DCB "EXPORT __cxa_vec_new2\n" // vec_newdel.o
- DCB "EXPORT __cxa_vec_new3\n" // vec_newdel.o
- DCB "EXPORT __cxa_vec_ctor\n" // vec_newdel.o
- DCB "EXPORT __cxa_vec_cctor\n" // vec_newdel.o
- DCB "EXPORT __cxa_vec_dtor\n" // vec_newdel.o
- DCB "EXPORT __cxa_vec_delete\n" // vec_newdel.o
- DCB "EXPORT __cxa_vec_delete2\n" // vec_newdel.o
- DCB "EXPORT __cxa_vec_delete3\n" // vec_newdel.o
- DCB "EXPORT __cxa_pure_virtual\n" // pure_virt.o
- DCB "EXPORT __cxa_guard_acquire\n" // cxa_guard_acquire.o
- DCB "EXPORT __cxa_guard_release\n" // cxa_guard_release.o
- DCB "EXPORT __cxa_guard_abort\n" // cxa_guard_abort.o
- // not present in beta b
- // DCB "EXPORT __memzero\n" // memzero.o
-
- DCB "EXPORT _ZTVN10__cxxabiv117__class_type_infoE\n"
- DCB "EXPORT __dynamic_cast\n"
- DCB "EXPORT __get_typeid\n"
- DCB "EXPORT _ZTVN10__cxxabiv120__si_class_type_infoE\n"
- DCB "EXPORT _ZTVN10__cxxabiv121__vmi_class_type_infoE\n"
- // From %ARMLIB%\cpplib\cpp_a__u.l
- // none from here yet
- // From %ARMLIB%\cpplib\cppfp_a__un.l
- // none from here yet.
-}
--- a/kernel/eka/compsupp/rvct2_0/usrt.mmp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// USRT.MPP
-//
-//
-
-TARGET usrt.lib
-
-TARGETTYPE lib
-
-SOURCEPATH .
-SOURCE callviar0.cpp callviar1.cpp callviar2.cpp callviar3.cpp
-SOURCE callviar4.cpp callviar5.cpp callviar6.cpp callviar7.cpp
-SOURCE ucppinit.cpp ucppfini.cpp
-// This will be overriden by .exps
-SOURCE dllexp.cpp
-
-START ARMCC
-ARMRT
-END
-
-VENDORID 0x70000001
--- a/kernel/eka/compsupp/rvct2_1/aeabidiv0.cpp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-
-#include <e32std.h>
-#include <e32std_private.h>
-
-extern "C" {
-
-IMPORT_C void __rt_div0();
-
-EXPORT_C int __aeabi_idiv0 (int return_value)
- {
- __rt_div0();
- return return_value;
- }
-
-EXPORT_C long long __aeabi_ldiv0 (long long return_value)
- {
- __rt_div0();
- return return_value;
- }
-
-}
--- a/kernel/eka/compsupp/rvct2_1/aeabimem.cia Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,65 +0,0 @@
-// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-
-#include <e32cmn.h>
-
-// Call our implementations of memcpy/move/set/clr rather than the ARM supplied
-// ones.
-//
-// Note that the AEABI switched the order of arg2 and arg3 to save an intruction
-// when calling 'memset' from 'memclr'.
-//
-// Prototypes are:
-// void __aeabi_memset8(TAny* aTrg, unsigned int aLength, TInt aValue);
-// void __aeabi_memset4(TAny* aTrg, unsigned int aLength, TInt aValue);
-// void __aeabi_memset(TAny* aTrg, unsigned int aLength, TInt aValue);
-
-extern "C" __NAKED__ void make_mem_functions_call_euser_versions()
- {
- asm(".global __aeabi_memset8 ");
- asm("__aeabi_memset8: ");
- asm(".global __aeabi_memset4 ");
- asm("__aeabi_memset4: ");
- asm(".global __aeabi_memset ");
- asm("__aeabi_memset: ");
- asm(" mov r3, r1 ");
- asm(" mov r1, r2 ");
- asm(" mov r2, r3 ");
- asm(" b memset ");
-
- asm(".global __aeabi_memclr8 ");
- asm("__aeabi_memclr8: ");
- asm(".global __aeabi_memclr4 ");
- asm("__aeabi_memclr4: ");
- asm(".global __aeabi_memclr ");
- asm("__aeabi_memclr: ");
- asm(" b memclr ");
-
- asm(".global __aeabi_memcpy8 ");
- asm("__aeabi_memcpy8: ");
- asm(".global __aeabi_memcpy4 ");
- asm("__aeabi_memcpy4: ");
- asm(".global __aeabi_memcpy ");
- asm("__aeabi_memcpy: ");
- asm(" b memcpy ");
-
- asm(".global __aeabi_memmove8 ");
- asm("__aeabi_memmove8: ");
- asm(".global __aeabi_memmove4 ");
- asm("__aeabi_memmove4: ");
- asm(".global __aeabi_memmove ");
- asm("__aeabi_memmove: ");
- asm(" b memmove ");
- }
--- a/kernel/eka/compsupp/rvct2_1/aehabi/cppsemantics.cpp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,1311 +0,0 @@
-/* The C++ exceptions runtime support
- *
- * Copyright 2002-2003 ARM Limited.
- */
-/*
- Licence
-
- 1. Subject to the provisions of clause 2, ARM hereby grants to LICENSEE a
- perpetual, non-exclusive, nontransferable, royalty free, worldwide licence
- to use this Example Implementation of Exception Handling solely for the
- purpose of developing, having developed, manufacturing, having
- manufactured, offering to sell, selling, supplying or otherwise
- distributing products which comply with the Exception Handling ABI for the
- ARM Architecture specification. All other rights are reserved to ARM or its
- licensors.
-
- 2. THIS EXAMPLE IMPLEMENTATION OF EXCEPTION HANDLING IS PROVIDED "AS IS"
- WITH NO WARRANTIES EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT LIMITED
- TO ANY WARRANTY OF SATISFACTORY QUALITY, MERCHANTABILITY, NONINFRINGEMENT
- OR FITNESS FOR A PARTICULAR PURPOSE.
-*/
-/*
- * RCS $Revision: 1.29.2.1 $
- * Checkin $Date: 2004/01/20 15:11:16 $
- * Revising $Author: achapman $
- */
-
-/* This source file is compiled automatically by ARM's make system into
- * multiple object files. The source regions constituting object file
- * xxx.o are delimited by ifdef xxx_c / endif directives.
- *
- * The source regions currently marked are:
- * arm_exceptions_globs_c
- * arm_exceptions_mem_c
- * arm_exceptions_uncaught_c
- * arm_exceptions_terminate_c
- * arm_exceptions_setterminate_c
- * arm_exceptions_unexpected_c
- * arm_exceptions_setunexpected_c
- * arm_exceptions_support_c
- * arm_exceptions_callterm_c
- * arm_exceptions_callunex_c
- * arm_exceptions_currenttype_c
- * arm_exceptions_alloc_c
- * arm_exceptions_free_c
- * arm_exceptions_throw_c
- * arm_exceptions_rethrow_c
- * arm_exceptions_foreign_c
- * arm_exceptions_cleanup_c
- * arm_exceptions_begincatch_c
- * arm_exceptions_endcatch_c
- * arm_exceptions_bad_typeid_c
- * arm_exceptions_bad_cast_c
- */
-
-#include <string.h>
-#include <typeinfo>
-#include <exception>
-#include <new>
-// Environment:
-#include "unwind_env.h"
-// Language-independent unwinder declarations:
-#include "unwinder.h"
-
-/* By default, none of these routines are unwindable: */
-#pragma noexceptions_unwind
-
-/* For brevity: */
-
-typedef _Unwind_Control_Block UCB;
-
-using std::terminate_handler;
-using std::unexpected_handler;
-using std::terminate;
-using std::unexpected;
-using std::type_info;
-
-/* Redeclare these interface routines as weak, so using them does not
- * pull in the unwind library. We only want the unwind library if
- * someone throws (or raises an exception from some other language).
- */
-WEAKDECL NORETURNDECL void _Unwind_Resume(UCB *);
-WEAKDECL void _Unwind_Complete(UCB *);
-
-/* Diagnostics:
- * Define DEBUG to get extra interfaces which assist debugging this functionality.
- * Define PRINTED_DIAGNOSTICS for printed diagnostics.
- */
-#ifdef DEBUG
-#define PRINTED_DIAGNOSTICS
-#endif
-
-#ifdef PRINTED_DIAGNOSTICS
-extern "C" int printf(const char *, ...);
-#endif
-
-/* --------- "Exceptions_class" string for our implementation: --------- */
-
-#define EXCEPTIONS_CLASS_SIZE 8
-#define ARMCPP_EXCEPTIONS_CLASS "ARM\0C++\0"
-
-
-/* --------- Exception control object: --------- */
-
-// Type __cxa_exception is the combined C++ housekeeping (LEO) and UCB.
-// It will be followed by the user exception object, hence must ensure
-// the latter is aligned on an 8 byte boundary.
-
-struct __cxa_exception {
- const type_info *exceptionType; // RTTI object describing the type of the exception
- void *(*exceptionDestructor)(void *); // Destructor for the exception object (may be NULL)
- unexpected_handler unexpectedHandler; // Handler in force after evaluating throw expr
- terminate_handler terminateHandler; // Handler in force after evaluating throw expr
- __cxa_exception *nextCaughtException; // Chain of "currently caught" c++ exception objects
- uint32_t handlerCount; // Count of how many handlers this EO is "caught" in
- __cxa_exception *nextPropagatingException; // Chain of objects saved over cleanup
- uint32_t propagationCount; // Count of live propagations (throws) of this EO
- UCB ucb; // Forces alignment of next item to 8-byte boundary
-};
-
-
-/* --------- Control "globals": --------- */
-
-// We do this by putting all the thread-specific "globals" into a single
-// area of store, which we allocate space for dynamically.
-// We don't define a constructor for this; see comments with __cxa_get_globals.
-
-typedef void (*handler)(void);
-
-struct __cxa_eh_globals {
- uint32_t uncaughtExceptions; // counter
- unexpected_handler unexpectedHandler; // per-thread handler
- terminate_handler terminateHandler; // per-thread handler
- bool implementation_ever_called_terminate; // true if it ever did
- handler call_hook; // transient field to tell terminate/unexpected which hook to call
- __cxa_exception *caughtExceptions; // chain of "caught" exceptions
- __cxa_exception *propagatingExceptions; // chain of "propagating" (in cleanup) exceptions
- void *emergency_buffer; // emergency buffer for when rest of heap full
-};
-
-
-/* ---------- Entry points: ---------- */
-
-/* There is a little type-delicacy required here as __cxa_throw takes a
- * function pointer. Setting aside the problem of not being able to form
- * a pointer to a destructor in C++, if we simply say extern "C" here
- * then the function pointer will also have C linkage and will be a
- * pointer to a C function. This causes problems when __cxa_throw is
- * defined (unless we repeat the extern "C" at the definition site) because
- * the fnptr in the definition gets C++ linkage, hence that __cxa_throw has
- * a different signature to the declared one, and so the function we wanted
- * doesn't get defined at all.
- * Maybe it should just take a void * but this seems more honest.
- */
-
-typedef void *(*cppdtorptr)(void *);
-
-extern "C" {
-
- // Protocol routines called directly from application code
-
- void *__cxa_allocate_exception(size_t size);
- void __cxa_free_exception(void *);
- WEAKDECL void __cxa_throw(void *, const type_info *, cppdtorptr);
- void __cxa_rethrow(void);
- void *__cxa_begin_catch(UCB *);
- void __cxa_end_catch(void);
- void __cxa_end_cleanup(void);
- const type_info *__cxa_current_exception_type(void);
-
- // Protocol routines usually called only by the personality routine(s).
-
- void __cxa_call_terminate(UCB *);
- void __cxa_call_unexpected(UCB *);
- bool __cxa_begin_cleanup(UCB *);
- bool __cxa_type_match(UCB *, const std::type_info *, void **);
-
- // Auxilliary routines
-
- __cxa_eh_globals *__cxa_get_globals(void);
- void __cxa_bad_typeid(void);
- void __cxa_bad_cast(void);
-
- // Emergency memory buffer management routines
-
- void *__ARM_exceptions_buffer_init(void);
- void *__ARM_exceptions_buffer_allocate(void *, size_t);
- void *__ARM_exceptions_buffer_free(void *, void *);
-}
-
-
-// Support routines
-
-#define NAMES __ARM
-namespace NAMES {
- void default_unexpected_handler(void);
- void call_terminate_handler(UCB *);
- void eh_catch_semantics(UCB *);
- bool is_foreign_exception(UCB *);
- bool same_exceptions_class(const void *, const void *);
- __cxa_exception *get_foreign_intermediary(__cxa_exception *, UCB *);
-}
-
-// Macro: convert ucb pointer to __cxa_exception pointer
-
-#define ucbp_to_ep(UCB_P) ((__cxa_exception *)((char *)(UCB_P) - offsetof(__cxa_exception, ucb)))
-
-
-#ifdef arm_exceptions_globs_c
-
-/* --------- Allocating and retrieving "globals": --------- */
-
-// The exception-handling globals should be allocated per-thread.
-// This is done here assuming the existance of a zero-initialised void*
-// pointer location obtainable by the macro EH_GLOBALS.
-
-// Default terminate handler:
-
-static void __default_terminate_handler(void) {
- abort();
-}
-
-// If std::unexpected() is in the image, include a default handler for it:
-namespace NAMES { WEAKDECL void default_unexpected_handler(void); }
-
-// If this symbol is present, allocate an emergency buffer.
-// As we aren't allowed static data, make it a function
-extern "C" WEAKDECL void __ARM_exceptions_buffer_required(void);
-
-
-// __cxa_eh_globals returns the per-thread memory. There are several complications,
-// all of which relate to not touching the exceptions system while trying to
-// initialise it:
-// 1) We can't obtain memory by calling new or nothrow new as both of these use
-// exceptions internally, so we must use malloc
-// 2) We choose not to initialise the memory via placement new and a constructor,
-// since placement new is declared with an empty function exception specification,
-// which causes more of the exceptions system to always be pulled in.
-// 3) We can't call terminate, as terminate looks in the memory we are trying to
-// allocate.
-
-__cxa_eh_globals *__cxa_get_globals(void)
-{
- __cxa_eh_globals *this_thread_globals = (__cxa_eh_globals *)(EH_GLOBALS);
- if (this_thread_globals == NULL) {
-
- // First call
- // Obtain some memory: this is thread-safe provided malloc is.
- this_thread_globals = (__cxa_eh_globals *)malloc(sizeof(__cxa_eh_globals));
- if (this_thread_globals == NULL) abort(); // NOT terminate(), which calls this fn
-
- // Save the pointer in the specially-provided location
- EH_GLOBALS = this_thread_globals;
-
- // Finally initialise the memory by hand
- this_thread_globals->uncaughtExceptions = 0;
- this_thread_globals->unexpectedHandler = NAMES::default_unexpected_handler;
- this_thread_globals->terminateHandler = __default_terminate_handler;
- this_thread_globals->implementation_ever_called_terminate = false;
- this_thread_globals->call_hook = NULL;
- this_thread_globals->caughtExceptions = NULL;
- this_thread_globals->propagatingExceptions = NULL;
- if (&__ARM_exceptions_buffer_required == NULL)
- this_thread_globals->emergency_buffer = NULL;
- else
- this_thread_globals->emergency_buffer = __ARM_exceptions_buffer_init();
- }
-
- return this_thread_globals;
-}
-
-
-#endif /* arm_exceptions_globs_c */
-#ifdef arm_exceptions_mem_c
-
-/* --------- Emergency memory: --------- */
-
-// It is possible to reserve memory for throwing bad_alloc when the heap
-// is otherwise full. The ARM implementation provides hooks to do this.
-// The default implementation reserves just enough space for a bad_alloc
-// object, so if memory is later exhausted bad_alloc can still be thrown.
-// Note there is no guarantee or requirement that the exception being
-// thrown is actually bad_alloc.
-
-// A usage flag and enough space for a bad_alloc exception control object
-
-struct emergency_eco {
- __cxa_exception ep;
- std::bad_alloc b;
-};
-
-struct emergency_buffer {
- bool inuse;
- struct emergency_eco eco;
-};
-
-// Initialiser
-void* __ARM_exceptions_buffer_init(void)
-{
- emergency_buffer *buffer = (emergency_buffer *)malloc(sizeof(emergency_buffer));
- if (buffer == NULL) return NULL;
- buffer->inuse = false;
- return buffer;
-}
-
-// Allocator
-void *__ARM_exceptions_buffer_allocate(void *buffer, size_t size)
-{
- emergency_buffer *b = (emergency_buffer *)buffer;
- if (size > sizeof(emergency_eco) || b == NULL || b->inuse) return NULL;
- b->inuse = true;
- return &b->eco;
-}
-
-// Deallocator: Must return non-NULL if and only if it recognises
-// and releases the supplied object
-void *__ARM_exceptions_buffer_free(void *buffer, void *addr)
-{
- emergency_buffer *b = (emergency_buffer *)buffer;
- if (b == NULL || addr != &b->eco) return NULL;
- b->inuse = false;
- return b;
-}
-
-
-#endif /* arm_exceptions_mem_c */
-#ifdef arm_exceptions_uncaught_c
-
-/* ---- uncaught_exception() ---- */
-
-/* The EDG (and I think our) interpretation is that if the implementation
- * ever called terminate(), uncaught_exception() should return true.
- */
-
-bool std::uncaught_exception(void)
-{
- __cxa_eh_globals *g = __cxa_get_globals();
- return g->implementation_ever_called_terminate || g->uncaughtExceptions;
-}
-
-
-#endif /* arm_exceptions_uncaught_c */
-#ifdef arm_exceptions_terminate_c
-
-/* ---- terminate() etc ---- */
-
-/* The behaviour of terminate() must differ between calls by the
- * implementation and calls by the application. This is achieved by having the
- * implementation set call_hook immediately before the call to terminate().
- * The hook called by terminate() should terminate the program without
- * returning to the caller. There is no requirement for terminate() itself to
- * intercept throws.
- */
-
-void std::terminate(void)
-{
- __cxa_eh_globals *g = __cxa_get_globals();
-
- if (g->call_hook != NULL) {
- // Clear then call hook fn we were passed
- handler call_hook = g->call_hook;
- g->call_hook = NULL;
- call_hook();
- } else {
- // Call global hook fn
- g->terminateHandler();
- }
- // If hook fn returns:
- abort();
-}
-
-
-#endif /* arm_exceptions_terminate_c */
-#ifdef arm_exceptions_setterminate_c
-
-terminate_handler std::set_terminate(terminate_handler h) throw()
-{
- __cxa_eh_globals *g = __cxa_get_globals();
- terminate_handler old = g->terminateHandler;
- g->terminateHandler = h;
- return old;
-}
-
-
-#endif /* arm_exceptions_setterminate_c */
-#ifdef arm_exceptions_unexpected_c
-
-/* ---- unexpected() etc ---- */
-/* Comments as per terminate() */
-
-void NAMES::default_unexpected_handler(void) {
- terminate();
-}
-
-#pragma exceptions_unwind
-
-void std::unexpected(void)
-{
- __cxa_eh_globals *g = __cxa_get_globals();
-
- if (g->call_hook != NULL) {
- // Clear then call hook fn we were passed
- handler call_hook = g->call_hook;
- g->call_hook = NULL;
- call_hook();
- } else {
- // Call global hook fn
- g->unexpectedHandler();
- }
-
- // If hook fn returns:
- abort();
-}
-
-
-#endif /* arm_exceptions_unexpected_c */
-#ifdef arm_exceptions_setunexpected_c
-
-unexpected_handler std::set_unexpected(unexpected_handler h) throw()
-{
- __cxa_eh_globals *g = __cxa_get_globals();
- unexpected_handler old = g->unexpectedHandler;
- g->unexpectedHandler = h;
- return old;
-}
-
-
-#endif /* arm_exceptions_setunexpected_c */
-#ifdef arm_exceptions_support_c
-
-/* ---------- Helper functions: ---------- */
-
-/* Two routines to determine whether two exceptions objects share a layout.
- * This is determined by checking whether the UCB exception_class members
- * are identical.
- * In principle we could use memcmp to perform this check (the code is
- * given below) but the check is quite frequent and so that is costly.
- * Therefore for efficiency we make use of the fact that the UCB is
- * word aligned, that the exception_class member is consequently
- * word aligned within it, and that we know the size of the member.
- * We take care elsewhere to only ever call the routines with pointers
- * to word-aligned addresses.
- */
-
-#if 0
-
-// Straightforward versions
-
-bool NAMES::same_exceptions_class(const void *ec1, const void *ec2)
-{
- return memcmp(ec1, ec2, EXCEPTIONS_CLASS_SIZE) == 0; // identical
-}
-
-// One of our exception objects, or not?
-
-bool NAMES::is_foreign_exception(UCB *ucbp)
-{
- return !NAMES::same_exceptions_class(&ucbp->exception_class, ARMCPP_EXCEPTIONS_CLASS);
-}
-
-#else
-
-// Faster versions
-
-bool NAMES::same_exceptions_class(const void *ec1, const void *ec2)
-{
- uint32_t *ip1 = (uint32_t *)ec1;
- uint32_t *ip2 = (uint32_t *)ec2;
- return ip1[0] == ip2[0] && ip1[1] == ip2[1];
-}
-
-// One of our exception objects, or not?
-
-bool NAMES::is_foreign_exception(UCB *ucbp)
-{
- // Need a word-aligned copy of the string
- static const union {
- const char s[EXCEPTIONS_CLASS_SIZE+1]; int dummy;
- } is_foreign_exception_static = {ARMCPP_EXCEPTIONS_CLASS};
- return !NAMES::same_exceptions_class(&ucbp->exception_class, &is_foreign_exception_static.s);
-}
-
-#endif
-
-
-#endif /* arm_exceptions_support_c */
-#ifdef arm_exceptions_callterm_c
-
-/* When the implementation wants to call terminate(), do the following:
- * Mark the object as "caught" so it can be rethrown.
- * Set the hook function for terminate() to call;
- * Mark the fact that terminate() has been called by the implementation;
- * We have to be careful - the implementation might encounter an error while
- * unwinding a foreign exception, and also it is possible this might be
- * called after failing to obtain a ucb.
- */
-
-void NAMES::call_terminate_handler(UCB *ucbp)
-{
- __cxa_eh_globals *g = __cxa_get_globals();
-
- if (ucbp == NULL) {
- // Call global hook
- g->call_hook = g->terminateHandler;
- } else {
- // Extract the hook to call
- if (NAMES::is_foreign_exception(ucbp)) {
- // Someone else's
- g->call_hook = g->terminateHandler; // best we can do under the circumstances
- } else {
- // One of ours
- __cxa_exception *ep = ucbp_to_ep(ucbp);
- g->call_hook = ep->terminateHandler; // the one in force at the point of throw
- }
- }
-
- g->implementation_ever_called_terminate = true;
- terminate();
- // never returns
-}
-
-
-void __cxa_call_terminate(UCB *ucbp)
-{
- if (ucbp != NULL) // Record entry to (implicit) handler
- __cxa_begin_catch(ucbp);
-
- NAMES::call_terminate_handler(ucbp);
- // never returns
-}
-
-
-#endif /* arm_exceptions_callterm_c */
-#ifdef arm_exceptions_callunex_c
-
-/* When the implementation wants to call unexpected(), do the following:
- * Mark the object as "caught" so it can be rethrown.
- * Set the hook function for unexpected() to call;
- * Call unexpected and trap any throw to make sure it is acceptable.
- * We have to be careful - the implementation might encounter an error while
- * unwinding a foreign exception.
- */
-
-#pragma exceptions_unwind
-
-void __cxa_call_unexpected(UCB *ucbp)
-{
-
- // Extract data we will need from the barrier cache before
- // anyone has a chance to overwrite it
-
- uint32_t rtti_count = ucbp->barrier_cache.bitpattern[1];
- uint32_t base = ucbp->barrier_cache.bitpattern[2];
- uint32_t stride = ucbp->barrier_cache.bitpattern[3];
- uint32_t rtti_offset_array_addr = ucbp->barrier_cache.bitpattern[4];
-
- // Also get the globals here and the eop
-
- __cxa_eh_globals *g = __cxa_get_globals();
- __cxa_exception *ep = ucbp_to_ep(ucbp);
-
-#ifdef ARM_EXCEPTIONS_ENABLED
- try {
-#endif
-
- // Record entry to (implicit) handler
-
- __cxa_begin_catch(ucbp);
-
- // Now extract the hook to call
-
- if (NAMES::is_foreign_exception(ucbp)) {
- // Someone else's
- g->call_hook = g->unexpectedHandler; // best we can do under the circumstances
- } else {
- // One of ours
- g->call_hook = ep->unexpectedHandler; // the one in force at the point of throw
- }
- unexpected(); // never returns normally, but might throw something
-
-#ifdef ARM_EXCEPTIONS_ENABLED
- } catch (...) {
-
- // Unexpected() threw. This requires some delicacy.
- // There are 2 possibilities:
- // i) rethrow of the same object
- // ii) throw of a new object
- // Unexpected() is an implicit handler, and we manually called
- // __cxa_begin_catch on the ingoing object. We need to call
- // __cxa_end_catch on that object and, if the object is no longer
- // being handled (possible in case ii), this will cause its destruction.
- // The wrinkle is that in case ii the object is not on top of the catch
- // stack because we just caught something else.
-
- // Get hold of what was thrown (which we just caught).
-
- __cxa_exception *epnew = g->caughtExceptions;
-
- // Call __cxa_end_catch on the original object, taking care with the catch chain
-
- if (epnew == ep) {
- // rethrow - easy & safe - object is at top of chain and handlercount > 1
- __cxa_end_catch();
- } else {
- // not rethrow - unchain the top (new) object, clean up the next one,
- // and put the top object back
-
- // unchain
- g->caughtExceptions = epnew->nextCaughtException;
- // assert g->caughtExceptions == ep now
- // Decrement its handlercount (this might call a dtor if the count goes to 0,
- // and the dtor might throw - if it does, just give up)
- try {
- __cxa_end_catch();
- } catch(...) {
- terminate();
- }
- // Chain back in
- epnew->nextCaughtException = g->caughtExceptions;
- g->caughtExceptions = epnew;
- }
-
- // See whether what was thrown is permitted, and in passing
- // see if std::bad_exception is permitted
-
- bool bad_exception_permitted = false;
- uint32_t i;
- for (i = 0; i < rtti_count; i++) {
- void *matched_object;
- const type_info *fnspec = (const type_info *)(*(uint32_t *)rtti_offset_array_addr + base);
- if (__cxa_type_match(&(epnew->ucb), fnspec, &matched_object)) {
-#ifdef PRINTED_DIAGNOSTICS
- printf("__cxa_call_unexpected: fnspec matched\n");
-#endif
- throw; // got a match - propagate it
- }
- if (&typeid(std::bad_exception) == fnspec)
- bad_exception_permitted = true;
- rtti_offset_array_addr += stride;
- }
-
- // There was no match...
- if (bad_exception_permitted) throw std::bad_exception(); // transmute
-
- // Otherwise call epnew's terminate handler
- NAMES::call_terminate_handler(&epnew->ucb);
- }
-#endif
-}
-
-
-#endif /* arm_exceptions_callunex_c */
-#ifdef arm_exceptions_currenttype_c
-
-/* Yield the type of the currently handled exception, or null if none or the
- * object is foreign.
- */
-
-const type_info *__cxa_current_exception_type(void)
-{
- __cxa_eh_globals *g = __cxa_get_globals();
- __cxa_exception *ep = g->caughtExceptions;
- if (ep == NULL || NAMES::is_foreign_exception(&ep->ucb)) return NULL;
- return ep->exceptionType;
-}
-
-
-#endif /* arm_exceptions_currenttype_c */
-#ifdef arm_exceptions_alloc_c
-
-/* Allocate store for controlling an exception propagation */
-
-void *__cxa_allocate_exception(size_t size)
-{
- __cxa_eh_globals *g = __cxa_get_globals();
-
- // Allocate store for a __cxa_exception header and the EO.
- // Allocated store should be thread-safe and persistent, and must do
- // something sensible if the allocation fails
-
- size_t total_size = size + sizeof(__cxa_exception);
- __cxa_exception *ep = (__cxa_exception *)malloc(total_size);
- if (ep == NULL) {
- // Try the emergency memory pool
- ep = (__cxa_exception *)__ARM_exceptions_buffer_allocate(g->emergency_buffer, total_size);
- if (ep == NULL) NAMES::call_terminate_handler(NULL);
- }
-
- UCB *ucbp = &ep->ucb;
-
- // Initialise the UCB
-
- memcpy(ucbp->exception_class, ARMCPP_EXCEPTIONS_CLASS, EXCEPTIONS_CLASS_SIZE);
- ucbp->exception_cleanup = NULL; /* initialise properly before throwing */
- ucbp->unwinder_cache.reserved1 = 0; /* required to do this */
-
- // Initialise parts of the LEO, in case copy-construction of the EO results
- // in a need to call terminate (via __cxa_call_terminate)
-
- ep->handlerCount = 0; // Not in any handlers
- ep->nextCaughtException = NULL; // Not in any handlers
- ep->nextPropagatingException = NULL; // Not saved over cleanup
- ep->propagationCount = 0; // Not propagating
- ep->terminateHandler = g->terminateHandler; // Cache current terminate handler
- ep->unexpectedHandler = g->unexpectedHandler; // Cache current unexpected handler
-
- // Return pointer to the EO
-
- return ep + 1;
-}
-
-
-#endif /* arm_exceptions_alloc_c */
-#ifdef arm_exceptions_free_c
-
-/* Free store allocated by __cxa_allocate_exception */
-
-void __cxa_free_exception(void *eop)
-{
- __cxa_eh_globals *g = __cxa_get_globals();
- char *ep = (char *)eop - sizeof(__cxa_exception);
- if (__ARM_exceptions_buffer_free(g->emergency_buffer, ep)) return;
- free(ep);
-}
-
-
-#endif /* arm_exceptions_free_c */
-#ifdef arm_exceptions_throw_c
-
-/* This routine is called when a foreign runtime catches one of our exception
- * objects and then exits its catch by a means other than rethrow.
- * We should clean it up as if we had caught it ourselves.
- */
-
-static void external_exception_termination(_Unwind_Reason_Code c, UCB *ucbp)
-{
- NAMES::eh_catch_semantics(ucbp);
- __cxa_end_catch();
-}
-
-
-/* Initiate a throw */
-
-#pragma push
-#pragma exceptions_unwind
-
-void __cxa_throw(void *eop, const type_info *t, cppdtorptr d)
-{
- __cxa_exception *ep = (__cxa_exception *)((char *)eop - sizeof(__cxa_exception));
- UCB *ucbp = &ep->ucb;
-
- // Initialise the remaining LEO and UCB fields not done by __cxa_allocate_exception
-
- ucbp->exception_cleanup = external_exception_termination;
- ep->exceptionType = t;
- ep->exceptionDestructor = d;
- ep->propagationCount = 1; // Propagating by 1 throw
-
- // Increment the uncaught C++ exceptions count
-
- __cxa_eh_globals *g = __cxa_get_globals();
- g->uncaughtExceptions++;
-
- // Tell debugger what's happening
-
- DEBUGGER_BOTTLENECK(ucbp, _UASUBSYS_CPP, _UAACT_STARTING, t);
-
- // Initiate unwinding - if we get control back, call C++ routine terminate()
-
- _Unwind_RaiseException(ucbp);
-
-#ifdef PRINTED_DIAGNOSTICS
- printf("__cxa_throw: throw failed\n");
-#endif
-
- __cxa_call_terminate(ucbp);
-}
-
-#pragma pop
-
-/* ----- Type matching: ----- */
-
-/* This is located here so that (in ARM's implementation) it is only retained in
- * an image if the application itself throws.
- */
-
-/* Type matching functions.
- * C++ DR126 says the matching rules for fnspecs are intended to be the same as
- * those for catch:
- * "A function is said to allow an exception of type E if its exception-specification
- * contains a type T for which a handler of type T would be a match (15.3 except.handle)
- * for an exception of type E."
- * Thus we have a single type matching rule.
- */
-
-/* Helper macros: */
-
-#define CV_quals_of_pointee(P) (((const abi::__pbase_type_info *)(P))->__flags & \
- (abi::__pbase_type_info::__const_mask | \
- abi::__pbase_type_info::__volatile_mask))
-
-#define is_const(QUALS) (((QUALS) & abi::__pbase_type_info::__const_mask) != 0)
-
-#define any_qualifier_missing(TEST_QUALS, REF_QUALS) ((~(TEST_QUALS) & (REF_QUALS)) != 0)
-
-/* A routine is required for derived class to base class conversion.
- * This is obtained via a macro definition DERIVED_TO_BASE_CONVERSION
- * in unwind_env.h.
- */
-
-/* External entry point:
- * Type check the c++ rtti object for compatibility against the type of
- * the object containing the ucb. Return a pointer to the matched object
- * (possibly a non-leftmost baseclass of the exception object)
- */
-bool __cxa_type_match(UCB *ucbp, const type_info *match_type, void **matched_objectpp)
-{
- if (NAMES::is_foreign_exception(ucbp))
- return false;
-
- __cxa_exception *ep = ucbp_to_ep(ucbp);
- const type_info *throw_type = ep->exceptionType;
- bool previous_qualifiers_include_const = true; // for pointer qualification conversion
- unsigned int pointer_depth = 0;
- void *original_objectp = ep + 1;
- void *current_objectp = original_objectp;
-
- for (;;) {
-
- // Match if identical
-
- if (throw_type == match_type) {
- *matched_objectpp = original_objectp;
-#ifdef PRINTED_DIAGNOSTICS
- printf("__cxa_type_match: success (exact match after any ptrs)\n");
-#endif
- return true;
- }
-
- // Fail if one is a pointer and the other isn't
-
- const type_info *type_throw_type = &typeid(*throw_type);
- const type_info *type_match_type = &typeid(*match_type);
-
- if ((type_throw_type == &typeid(abi::__pointer_type_info) ||
- type_match_type == &typeid(abi::__pointer_type_info)) &&
- type_throw_type != type_match_type) {
-#ifdef PRINTED_DIAGNOSTICS
- printf("__cxa_type_match: failed (mixed ptr/non-ptr)\n");
-#endif
- return false;
- }
-
- // Both are pointers or neither is
- if (type_throw_type == &typeid(abi::__pointer_type_info)) {
- // Both are pointers
-#ifdef PRINTED_DIAGNOSTICS
- printf("__cxa_type_match: throwing a ptr\n");
-#endif
- pointer_depth++;
- // Check match_type is at least as CV-qualified as throw_type
- unsigned int match_quals = CV_quals_of_pointee(match_type);
- unsigned int throw_quals = CV_quals_of_pointee(throw_type);
- if (any_qualifier_missing(match_quals, throw_quals)) {
-#ifdef PRINTED_DIAGNOSTICS
- printf("__cxa_type_match: failed (missing qualifiers)\n");
-#endif
- return false;
- }
- // If the match type has additional qualifiers not found in the
- // throw type, any previous qualifiers must have included const
- if (any_qualifier_missing(throw_quals, match_quals) &&
- !previous_qualifiers_include_const) {
-#ifdef PRINTED_DIAGNOSTICS
- printf("__cxa_type_match: failed (not all qualifiers have const)\n");
-#endif
- return false;
- }
- if (!is_const(match_quals))
- previous_qualifiers_include_const = false;
- throw_type = ((const abi::__pbase_type_info *)throw_type)->__pointee;
- match_type = ((const abi::__pbase_type_info *)match_type)->__pointee;
- if (current_objectp != NULL)
- current_objectp = *(void **)current_objectp;
- continue;
- }
-
- // Neither is a pointer now but qualification conversion has been done.
- // See if pointer conversion on the original was possible.
- // T* will match void*
-
- if (pointer_depth == 1 && match_type == &typeid(void)) {
- *matched_objectpp = original_objectp;
-#ifdef PRINTED_DIAGNOSTICS
- printf("__cxa_type_match: success(conversion to void *)\n");
-#endif
- return true;
- }
-
- // Else if we have 2 class types, a derived class is matched by a
- // non-ambiguous public base class (perhaps not a leftmost one).
- // __si_class_type_info and __vmi_class_type_info are classes with bases.
-
- void *matched_base_p;
-
- if (pointer_depth < 2 &&
- (type_throw_type == &typeid(abi::__si_class_type_info) ||
- type_throw_type == &typeid(abi::__vmi_class_type_info))) {
- if (DERIVED_TO_BASE_CONVERSION(current_objectp, &matched_base_p,
- throw_type, match_type)) {
-#ifdef PRINTED_DIAGNOSTICS
- printf("__cxa_type_match: success (matched base 0x%x of 0x%x%s, thrown object 0x%x)\n",
- matched_base_p, current_objectp,
- pointer_depth == 0 ? "" : " via ptr",
- original_objectp);
-#endif
- *matched_objectpp = pointer_depth == 0 ? matched_base_p : original_objectp;
- return true;
- } else {
-#ifdef PRINTED_DIAGNOSTICS
- printf("__cxa_type_match: failed (derived to base failed)\n");
-#endif
- return false;
- }
- }
-
-#ifdef PRINTED_DIAGNOSTICS
- printf("__cxa_type_match: failed (types simply differ)\n");
-#endif
- return false;
- } /* for */
-}
-
-
-/* For debugging purposes: */
-#ifdef DEBUG
-extern "C" bool debug__cxa_type_match(void *objptr,
- const type_info *throw_type,
- const type_info *catch_type,
- void **matched_objectpp)
-{
- /* Create enough of an exception object that the type-matcher can run, then
- * check the type. Objptr is expected to be the result of a call to
- * __cxa_allocate_exception, which has then been copy-constructed.
- */
- __cxa_exception *e = ((__cxa_exception *)objptr) - 1;
- e->exceptionType = throw_type;
- return __cxa_type_match(&e->ucb, catch_type, matched_objectpp);
-}
-#endif
-
-
-#endif /* arm_exceptions_throw_c */
-#ifdef arm_exceptions_rethrow_c
-
-/* Redeclare _Unwind_RaiseException as weak (if WEAKDECL is defined
- * appropriately) so the use from __cxa_rethrow does not on its own
- * force the unwind library to be loaded.
- */
-
-extern "C" WEAKDECL _Unwind_Reason_Code _Unwind_RaiseException(UCB *ucbp);
-
-#pragma exceptions_unwind
-
-void __cxa_rethrow(void)
-{
- // Recover the exception object - it is the most recent caught exception object
- __cxa_eh_globals *g = __cxa_get_globals();
- __cxa_exception *ep = g->caughtExceptions;
- bool foreign;
-
- // Must call terminate here if no such exception
- if (ep == NULL) NAMES::call_terminate_handler(NULL);
-
- UCB *ucbp = &ep->ucb;
-
- // Mark the object as being propagated by throw, preventing multiple
- // propagation and also permitting __cxa_end_catch to do the right
- // thing when it is called from the handler's cleanup.
-
- ep->propagationCount++;
-
- // Now reraise, taking care with foreign exceptions
-
- foreign = NAMES::is_foreign_exception(ucbp);
- if (foreign) {
- // Indirect through the intermediate object to the foreign ucb
- ucbp = (UCB *)ep->exceptionType;
- } else {
- // Increment the uncaught C++ exceptions count
- g->uncaughtExceptions++;
- }
-
- // Tell debugger what's happening
-
- DEBUGGER_BOTTLENECK(ucbp, _UASUBSYS_CPP, _UAACT_STARTING, foreign ? NULL : ep->exceptionType);
-
- // Initiate unwinding - if we get control back, call C++ routine terminate()
-
- _Unwind_RaiseException(ucbp);
-
-#ifdef PRINTED_DIAGNOSTICS
- printf("__cxa_rethrow: throw failed\n");
-#endif
-
- __cxa_call_terminate(ucbp);
-}
-
-#endif /* arm_exceptions_rethrow_c */
-#ifdef arm_exceptions_foreign_c
-
-/* During catch and cleanup, foreign exception objects are dealt with using
- * an intermediate __cxa_exception block in the appropriate exceptions
- * chain. This block has the same exception_class as the real foreign
- * ucb, and points to the real ucb via the intermediate block's exceptionType
- * field. This helper function checks whether it has been passed such an
- * intermediate block and sets one up if not. Only call it when the UCB
- * is known to belong to a foreign exception.
- */
-
-__cxa_exception *NAMES::get_foreign_intermediary(__cxa_exception *head_ep, UCB *ucbp)
-{
- if (head_ep != NULL) {
- UCB *head_ucbp = &head_ep->ucb;
- if (NAMES::same_exceptions_class(&head_ucbp->exception_class, &ucbp->exception_class) &&
- (UCB *)head_ep->exceptionType == ucbp)
- return head_ep;
- }
-
- // Create an intermediate block. Only initialise as much as necessary
- __cxa_exception *ep = ((__cxa_exception *)__cxa_allocate_exception(0)) - 1;
- UCB *new_ucbp = &ep->ucb;
- memcpy(new_ucbp->exception_class, ucbp->exception_class, EXCEPTIONS_CLASS_SIZE);
- ep->propagationCount = 0; // Not propagating
- ep->handlerCount = 0; // Not handled
- ep->nextCaughtException = NULL; // Not in chain
- ep->exceptionType = (const type_info *)ucbp; // The foreign UCB
- return ep;
-}
-
-
-#endif /* arm_exceptions_foreign_c */
-#ifdef arm_exceptions_cleanup_c
-
-bool __cxa_begin_cleanup(UCB *ucbp)
-{
- // Indicate that a cleanup is about to start.
- // Save the exception pointer over the cleanup for recovery later, using a chain.
- // If we allowed the exception to be rethrown in a cleanup, then
- // the object might appear multiple times at the head of this chain,
- // and the propagationCount could be used to track this - at this point,
- // the object is logically in the chain propagationCount-1 times, and
- // physically 0 or 1 times. Thus if propagationCount == 1 we should insert
- // it physically. A similar rule is used for physical removal in
- //__cxa_end_cleanup.
- // Foreign exceptions are handled via an intermediate __cxa_exception object
- // in a similar way as __cxa_begin_catch.
-
- __cxa_eh_globals *g = __cxa_get_globals();
- __cxa_exception *ep;
-
- if (NAMES::is_foreign_exception(ucbp)) {
- ep = NAMES::get_foreign_intermediary(g->propagatingExceptions, ucbp);
- ep->propagationCount++; // Indicate one (or one additional) propagation
- } else {
- ep = ucbp_to_ep(ucbp);
- }
-
- if (ep->propagationCount == 1) {
- // Insert into chain
- ep->nextPropagatingException = g->propagatingExceptions;
- g->propagatingExceptions = ep;
- }
-
- return true;
-}
-
-
-// Helper function for __cxa_end_cleanup
-
-extern "C" UCB * __ARM_cxa_end_cleanup(void)
-{
- // Recover and return the currently propagating exception (from the
- // head of the propagatingExceptions chain).
- // propagationCount at this moment is a logical count of how many times the
- // item is in the chain so physically unchain it when this count is 1.
- // Foreign exceptions use an intermediary.
-
- __cxa_eh_globals *g = __cxa_get_globals();
- __cxa_exception *ep = g->propagatingExceptions;
-
- if (ep == NULL) terminate();
-
- UCB *ucbp = &ep->ucb;
- if (NAMES::is_foreign_exception(ucbp)) {
- // Get the foreign ucb
- ucbp = (UCB *)ep->exceptionType;
- if (ep->propagationCount == 1) {
- // Free the intermediate ucb (see description in __cxa_begin_catch)
- void *eop = (void *)(ep + 1);
- g->propagatingExceptions = ep->nextPropagatingException;
- __cxa_free_exception(eop);
- } else {
- ep->propagationCount--;
- }
- } else {
- // Not foreign
- if (ep->propagationCount == 1) { // logically in chain once - so unchain
- g->propagatingExceptions = ep->nextPropagatingException;
- }
- }
- return ucbp;
-}
-
-// __cxa_end_cleanup is called at the end of a cleanup fragment.
-// It must do the C++ housekeeping, then call _Unwind_Resume, but it must
-// damage no significant registers in the process.
-
-__asm void __cxa_end_cleanup(void) {
- extern __ARM_cxa_end_cleanup;
- extern _Unwind_Resume WEAKASMDECL;
-
-#ifdef __thumb
- preserve8; // This is preserve8 (ARM assembler heuristics are inadequate)
- push {r1-r7};
- mov r2, r8;
- mov r3, r9;
- mov r4, r10;
- mov r5, r11;
- push {r1-r5};
- bl __ARM_cxa_end_cleanup; // returns UCB address in r0
- pop {r1-r5};
- mov r8, r2;
- mov r9, r3;
- mov r10, r4;
- mov r11, r5;
- pop {r1-r7};
- bl _Unwind_Resume; // won't return
-#else
- stmfd r13!, {r1-r12}
- bl __ARM_cxa_end_cleanup; // returns UCB address in r0
- ldmia r13!, {r1-r12};
- b _Unwind_Resume; // won't return
-#endif
-}
-
-
-#endif /* arm_exceptions_cleanup_c */
-#ifdef arm_exceptions_catchsemantics_c
-
-/* Update date structures as if catching an object.
- * Call this from __cxa_begin_catch when actually catching an object,
- * and from external_exception_termination when called by a foreign runtime
- * after one of our objects was caught.
- */
-
-void NAMES::eh_catch_semantics(UCB *ucbp)
-{
- __cxa_eh_globals *g = __cxa_get_globals();
- __cxa_exception *ep;
-
- if (NAMES::is_foreign_exception(ucbp)) {
- // Foreign exception. Get the associated intermediary block or
- // make one if there isn't one already.
- // In the case of a rethrow, the foreign object may already be on
- // the handled exceptions chain (it will be first).
- ep = NAMES::get_foreign_intermediary(g->caughtExceptions, ucbp);
- } else {
- // Not foreign
- ep = ucbp_to_ep(ucbp);
- // Decrement the propagation count
- ep->propagationCount--;
- // Decrement the total uncaught C++ exceptions count
- g->uncaughtExceptions--;
- }
-
- // Common code for our EO's, and foreign ones where we work on the intermediate EO
-
- // Increment the handler count for this exception object
- ep->handlerCount++;
-
- // Push the ep onto the "handled exceptions" chain if it is not already there.
- // (If catching a rethrow, it may already be there)
-
- if (ep->nextCaughtException == NULL) {
- ep->nextCaughtException = g->caughtExceptions;
- g->caughtExceptions = ep;
- }
-}
-
-
-#endif /* arm_exceptions_catchsemantics_c */
-#ifdef arm_exceptions_begincatch_c
-
-void *__cxa_begin_catch(UCB *ucbp)
-{
- void *match = (void *)ucbp->barrier_cache.bitpattern[0]; // The matched object, if any
-
- // Update the data structures
-
- NAMES::eh_catch_semantics(ucbp);
-
- // Tell the unwinder the exception propagation has finished,
- // and return the object pointer
-
- _Unwind_Complete(ucbp);
- return match;
-}
-
-
-#endif /* arm_exceptions_begincatch_c */
-#ifdef arm_exceptions_endcatch_c
-
-#pragma exceptions_unwind
-
-void __cxa_end_catch(void)
-{
- // Recover the exception object - it is the most recent caught exception object
- __cxa_eh_globals *g = __cxa_get_globals();
- __cxa_exception *ep = g->caughtExceptions;
-
- if (ep == NULL) terminate();
-
- // Rethrow in progress?
-
- bool object_being_rethrown = ep->propagationCount != 0;
-
- // Decrement the handler count for this exception object
- ep->handlerCount--;
-
- // Unstack the object if it is no longer being handled anywhere.
- // Destroy and free the object if it is no longer alive -
- // it is dead if its handler count becomes 0, unless it is
- // about to be rethrown.
- // If the dtor throws, allow its exception to propagate.
- // Do different things if it is a foreign exception object.
-
- if (ep->handlerCount == 0) {
- void *eop = (void *)(ep + 1);
- UCB *ucbp = &ep->ucb;
- bool foreign = NAMES::is_foreign_exception(ucbp);
-
- // Unstack it from the caught exceptions stack - it is guaranteed to be top item.
- g->caughtExceptions = ep->nextCaughtException;
-
- if (foreign) {
- // Get the foreign ucb and free the intermediate ucb (see description in __cxa_begin_catch)
- ucbp = (UCB *)ep->exceptionType;
- __cxa_free_exception(eop);
- } else {
- ep->nextCaughtException = NULL; // So __cxa_begin_catch knows it isn't in the chain
- }
-
- // Now destroy the exception object if it's no longer needed
- if (!object_being_rethrown) {
- if (foreign) {
-
- // Notify the foreign language, if it so requested
- if (ucbp->exception_cleanup != NULL)
- (ucbp->exception_cleanup)(_URC_FOREIGN_EXCEPTION_CAUGHT, ucbp);
-
- } else {
-
- // One of our objects: do C++-specific semantics
-
- if (ep->exceptionDestructor != NULL) {
- // Run the dtor. If it throws, free the memory anyway and
- // propagate the new exception.
-#ifdef ARM_EXCEPTIONS_ENABLED
- try {
- (ep->exceptionDestructor)(eop);
- } catch(...) {
- // Free the memory and reraise
- __cxa_free_exception(eop);
- throw;
- }
-#else
- (ep->exceptionDestructor)(eop);
-#endif
- }
- // Dtor (if there was one) didn't throw. Free the memory.
- __cxa_free_exception(eop);
- } // !foreign
- } // !object_being_rethrown
- } // ep->handlerCount == 0
-}
-
-
-#endif /* arm_exceptions_endcatch_c */
-#ifdef arm_exceptions_bad_typeid_c
-
-#pragma exceptions_unwind
-
-void __cxa_bad_typeid(void)
-{
- throw std::bad_typeid();
-}
-
-
-#endif /* arm_exceptions_bad_typeid_c */
-#ifdef arm_exceptions_bad_cast_c
-
-#pragma exceptions_unwind
-
-void __cxa_bad_cast(void)
-{
- throw std::bad_cast();
-}
-
-
-#endif /* arm_exceptions_bad_cast_c */
--- a/kernel/eka/compsupp/rvct2_1/aehabi/cxxabi.h Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,193 +0,0 @@
-/* Copyright (c) Edison Design Group, 2002. */
-/*
-cxxabi.h -- Include file for IA-64 ABI entry points.
-*/
-
-#ifndef __CXXABI_H
-#define __CXXABI_H
-
-#ifndef __STDDEF_H
-#include <stddef.h>
-#endif /* ifndef __STDDEF_H */
-#include <typeinfo>
-
-#ifdef __EDG_RUNTIME_USES_NAMESPACES
-namespace __cxxabiv1 {
- using namespace std;
-#endif /* ifdef __EDG_RUNTIME_USES_NAMESPACES */
-
- /* type_info implementation classes */
-
-#pragma define_type_info
- class __fundamental_type_info : public type_info {
- public:
- virtual ~__fundamental_type_info();
- };
-
-#pragma define_type_info
- class __array_type_info : public type_info {
- public:
- virtual ~__array_type_info();
- };
-
-#pragma define_type_info
- class __function_type_info : public type_info {
- public:
- virtual ~__function_type_info();
- };
-
-#pragma define_type_info
- class __enum_type_info : public type_info {
- public:
- virtual ~__enum_type_info();
- };
-
-#pragma define_type_info
- class __class_type_info : public type_info {
- public:
- virtual ~__class_type_info();
- };
-
-#pragma define_type_info
- class __si_class_type_info : public __class_type_info {
- public:
- virtual ~__si_class_type_info();
- const __class_type_info *__base_type;
- };
-
- struct __base_class_type_info {
- const __class_type_info *__base_type;
- long __offset_flags;
-
- enum __offset_flags_masks {
- __virtual_mask = 0x1,
- __public_mask = 0x2,
- __offset_shift = 8
- };
- };
-
-#pragma define_type_info
- class __vmi_class_type_info : public __class_type_info {
- public:
- virtual ~__vmi_class_type_info();
- unsigned int __flags;
- unsigned int __base_count;
- __base_class_type_info __base_info[1];
-
- enum __flags_masks {
- __non_diamond_repeat_mask = 0x1,
- __diamond_shaped_mask = 0x2
- };
- };
-
-#pragma define_type_info
- class __pbase_type_info : public type_info {
- public:
- virtual ~__pbase_type_info();
- unsigned int __flags;
- const type_info *__pointee;
-
- enum __masks {
- __const_mask = 0x1,
- __volatile_mask = 0x2,
- __restrict_mask = 0x4,
- __incomplete_mask = 0x8,
- __incomplete_class_mask = 0x10
- };
- };
-
-#pragma define_type_info
- class __pointer_type_info : public __pbase_type_info {
- virtual ~__pointer_type_info();
- };
-
-#pragma define_type_info
- class __pointer_to_member_type_info : public __pbase_type_info {
- virtual ~__pointer_to_member_type_info();
- const __class_type_info *__context;
- };
-
- extern "C" {
- /* Pure virtual function calls. */
- void __cxa_pure_virtual();
-
- /* Guard variables for the initialization of variables with static storage
- duration. */
-#ifdef __CXXABI_USING_64BIT_GUARD_VARIABLES
- int __cxa_guard_acquire(unsigned long long *);
- void __cxa_guard_release(unsigned long long *);
- void __cxa_guard_abort(unsigned long long *);
-#else
- // C++ ABI for ARM uses 32 bit guard variables
- int __cxa_guard_acquire(int *);
- void __cxa_guard_release(int *);
- void __cxa_guard_abort(int *);
-#endif
-
-// define the 'Structor Return Type
-#ifndef __CXXABI_STORS_RETURN_VOID
- typedef void* SRT; // under C++ ABI for ARM 'structors return 'void *'
-#else
- typedef void SRT; // 'structors return 'void'
-#endif
-
- /* Construction and destruction of arrays. */
- void *__cxa_vec_new(size_t, size_t, size_t, SRT (*)(void *),
- SRT (*)(void *));
- void *__cxa_vec_new2(size_t, size_t, size_t, SRT (*)(void *),
- SRT (*)(void *), void *(*)(size_t),
- void (*)(void *));
- void *__cxa_vec_new3(size_t, size_t, size_t, SRT (*)(void *),
- SRT (*)(void *), void *(*)(size_t),
- void (*)(void *, size_t));
-#ifndef CXXABI_VEC_CTOR_RETURNS_VOID
- /* The C++ ABI says this returns 'void' but we actually return
- 'void *' to remain compatible with RVCT 2.0 objects. But the
- compiler no longer assumes it. */
- void *
-#else /* def CXXABI_VEC_CTOR_RETURNS_VOID */
- void
-#endif /* def CXXABI_VEC_CTOR_RETURNS_VOID */
- __cxa_vec_ctor(void *, size_t, size_t, SRT (*)(void *),
- SRT (*)(void *));
- void __cxa_vec_dtor(void *, size_t, size_t, SRT (*)(void *));
- void __cxa_vec_cleanup(void *, size_t, size_t, SRT (*)(void *));
- void __cxa_vec_delete(void *, size_t, size_t, SRT (*)(void *));
- void __cxa_vec_delete2(void *, size_t, size_t, SRT (*)(void *),
- void (*)(void *));
- void __cxa_vec_delete3(void *, size_t, size_t, SRT (*)(void *),
- void (*)(void *, size_t));
-#ifndef CXXABI_VEC_CTOR_RETURNS_VOID
- /* The C++ ABI says this returns 'void' but we actually return
- 'void *' to remain compatible with RVCT 2.0 objects. But the
- compiler no longer assumes it. */
- void *
-#else /* def CXXABI_VEC_CTOR_RETURNS_VOID */
- void
-#endif /* def CXXABI_VEC_CTOR_RETURNS_VOID */
- __cxa_vec_cctor(void *, void *, size_t, size_t,
- SRT (*)(void *, void *), SRT (*)(void *));
-
- /* Finalization. */
- int __cxa_atexit(void (*)(void *), void *, void *);
- void __cxa_finalize(void *);
-
- /* Exception-handling support. */
- void __cxa_bad_cast();
- void __cxa_bad_typeid();
-
- /* Demangling interface. */
- char *__cxa_demangle(const char* __mangled_name,
- char *__buf,
- size_t *__n,
- int *__status);
-
- } /* extern "C" */
-#ifdef __EDG_RUNTIME_USES_NAMESPACES
-} /* namespace __cxxabiv1 */
-
-/* Create the "abi" namespace alias. */
-namespace abi = __cxxabiv1;
-#endif /* ifdef __EDG_RUNTIME_USES_NAMESPACES */
-
-#endif /* ifndef __CXXABI_H */
--- a/kernel/eka/compsupp/rvct2_1/aehabi/unwind_env.h Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,264 +0,0 @@
-/* unwind_env.h
- *
- * Copyright 2003 ARM Limited.
- */
-/*
- Licence
-
- 1. Subject to the provisions of clause 2, ARM hereby grants to LICENSEE a
- perpetual, non-exclusive, nontransferable, royalty free, worldwide licence
- to use this Example Implementation of Exception Handling solely for the
- purpose of developing, having developed, manufacturing, having
- manufactured, offering to sell, selling, supplying or otherwise
- distributing products which comply with the Exception Handling ABI for the
- ARM Architecture specification. All other rights are reserved to ARM or its
- licensors.
-
- 2. THIS EXAMPLE IMPLEMENTATION OF EXCEPTION HANDLING IS PROVIDED "AS IS"
- WITH NO WARRANTIES EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT LIMITED
- TO ANY WARRANTY OF SATISFACTORY QUALITY, MERCHANTABILITY, NONINFRINGEMENT
- OR FITNESS FOR A PARTICULAR PURPOSE.
-*/
-/*
- * RCS $Revision: 1.3 $
- * Checkin $Date: 2003/10/23 13:57:32 $
- * Revising $Author: agrant $
- */
-
-/* Environment definition - abstractions and requirements - to aid
- * portability of the ARM exceptions code.
- */
-
-#ifndef UNWINDENV_H
-#define UNWINDENV_H
-
-/* ---------------------------------------------------------------------- */
-
-/* Source language
- *
- * The compiler is expected to define preprocessor symbols as follows:
- * __cplusplus when compiling in C++ mode.
- * __thumb when compiling to Thumb code.
- *
- * Some use is made of embedded assembly language, introduced by __asm.
- * This is described in ARM's toolchain documentation. Some edits may be
- * required for other compilers. The compiler should define one or more of:
- * __TARGET_ARCH_4T __TARGET_ARCH_4TXM __TARGET_ARCH_5T __TARGET_ARCH_5TXM
- * __TARGET_ARCH_5TE __TARGET_ARCH_6
- * so the correct assembly wrappers are generated for certain functions.
- *
- * __APCS_INTERWORK should be defined if ARM/Thumb interworking is required.
- *
- * For all the above symbols, if your compiler does not provide appropriate
- * definitions, add them here.
- *
- * Some source language extensions are also used.
- */
-
-/* ---------------------------------------------------------------------- */
-
-/* Library structure
- *
- * ARM's private make system contains an automated facility for compiling
- * source files multiple times to create multiple object files. The source
- * regions intended to constitute object file xxx.o are delimited by
- * #ifdef xxx_c / #endif directives. The exact preprocessor symbols used
- * for this conditionalisation are described in a comment at the start of
- * each file. When porting to a different system, compilations must be
- * performed with these preprocessor symbols appropriately defined
- * (or remove the conditionalisation).
- *
- * ARM declares (or redeclares) some routines as weak in order that
- * references to them are weak, so that the static linker will not load
- * unwanted code. This is achieved by decorating routine declarations
- * with appropriate language extensions. Note that compilers supporting
- * similar features but via a different syntax may require edits to
- * the library source.
- *
- * Define those decorations here (define as empty if not required):
- */
-
-#define WEAKDECL __weak /* token in C and C++ */
-#define WEAKASMDECL [WEAK] /* token in assembler */
-
-/* ---------------------------------------------------------------------- */
-
-/* Source language support and language extensions */
-
-/* It is possible to compile the C++ semantics code using a compiler
- * which does not support C++ exceptions; this was useful to ARM whilst
- * ARM's compiler was being developed, and the facility has not been
- * removed. C++ exceptions syntax is conditionalised by
- * #ifdef ARM_EXCEPTIONS_ENABLED / #endif. Define ARM_EXCEPTIONS_ENABLED
- * by some means here if you want a usable library:
- */
-
-#ifdef __cplusplus
-extern "C" {
- /* For conditionalisation, specifically on ARM_EXCEPTIONS_ENABLED */
-#include "basics.h"
-}
-#endif
-
-/* The following definitions of syntax decoration may be empty if the
- * facility is not required. Note that compilers supporting similar
- * features but via a different syntax may require edits to the library
- * source.
- *
- * Define the decorations here (define as empty if not required):
- */
-
-/* If the compiler understands noreturn functions: */
-#define NORETURNDECL __declspec(noreturn)
-
-/* ---------------------------------------------------------------------- */
-
-/* Types */
-
-/* The implementation requires types uint8_t, uint16_t, uint32_t and
- * uint64_t to be defined as unsigned integers of the appropriate number
- * of bits.
- *
- * Do that here:
- */
-
-#include <stdint.h>
-
-/* The C++ semantics support requires definition of the RTTI object
- * layout. We use the same structures and names as the generic C++
- * ABI for Itanium.
- *
- * Define those structures here:
- */
-
-#ifdef __cplusplus
-extern "C" {
-#include "cxxabi.h"
-}
-#endif
-
-/* ---------------------------------------------------------------------- */
-
-/* External requirements */
-
-/* The C++ exception-handling 'globals' should be allocated per-thread.
- * The Exceptions ABI does not specify how this happens, but it is
- * intended that the details are localised to __cxa_get_globals.
- *
- * In the ARM implementation of __cxa_get_globals, it is assumed that a
- * zero-initialised location in a known per-thread place is somehow
- * obtainable, and can be assigned (by __cxa_get_globals) a pointer to
- * the allocated globals data structure. The macro EH_GLOBALS should be
- * defined here to yield a suitable address of type void*. This is used
- * only in __cxa_get_globals.
- *
- * Define it here:
- */
-
-#ifdef __cplusplus
-extern "C" {
- /* for __user_libspace() machinery */
-#include <interns.h>
-#define EH_GLOBALS libspace.eh_globals
-}
-#endif
-
-
-/* A routine is required for C++ derived class to base class conversion.
- * This is used once, in __cxa_type_match. It is likely that suitable
- * code exists as part of the RTTI support code. Therefore access it
- * via a macro:
- * DERIVED_TO_BASE_CONVERSION(PTR, P_NEW_PTR, CLASS_INFO, BASE_INFO)
- * Convert PTR from a pointer to a derived class (described by
- * CLASS_INFO) to a pointer to a base class (described by BASE_INFO)
- * and store the resulting pointer in P_NEW_PTR. Return true (or
- * non-zero) if the base class was found and the conversion was done,
- * otherwise return false (or zero).
- *
- * Define the macro here:
- */
-
-#ifdef __cplusplus
-/* In the ARM implementation, a suitable routine exists elsewhere in the
- * C++ runtime library, where it is part of the dynamic_cast mechanism.
- */
-extern "C" int __derived_to_base_conversion(void** p_ptr, void** p_new_ptr,
- const std::type_info * class_info,
- const std::type_info * base_info,
- char** access_flags, int use_access_flags);
-
-#define DERIVED_TO_BASE_CONVERSION(PTR, P_NEW_PTR, CLASS_INFO, BASE_INFO) \
- __derived_to_base_conversion(&(PTR), (P_NEW_PTR), (CLASS_INFO), (BASE_INFO), NULL, 0)
-#endif
-
-
-/* ---------------------------------------------------------------------- */
-
-/* Runtime debug support
- *
- * Here we define the interface to a "bottleneck function" to be called
- * by exception handling code at 'interesting' points during execution,
- * and breakpointable by a debugger.
- *
- * This is not part of the Exceptions ABI but is expected to be
- * standardised elsewhere, probably in a Debug ABI.
- *
- * If you don't want this, define DEBUGGER_BOTTLENECK as a dummy, e.g.
- * #define DEBUGGER_BOTTLENECK(UCBP,LANG,ACTIVITY,ARG) (void)0
- */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
- struct _Unwind_Control_Block;
-
- typedef enum {
- _UASUBSYS_CPP = 0x00,
- _UASUBSYS_UNWINDER = 0xff
- } _Unwind_Activity_subsystem;
-
- typedef enum {
- _UAACT_STARTING = 0x0,
- _UAACT_ENDING = 0x1,
- _UAACT_BARRIERFOUND = 0x2,
- _UAACT_PADENTRY = 0x3,
- _UAACT_CPP_TYPEINFO = 0x80
- } _Unwind_Activity_activity;
-
- typedef enum {
- _UAARG_ENDING_UNSPECIFIED = 0x0,
- _UAARG_ENDING_TABLECORRUPT = 0x1,
- _UAARG_ENDING_NOUNWIND = 0x2,
- _UAARG_ENDING_VRSFAILED = 0x3,
- /* C++ only: */
- _UAARG_ENDING_CPP_BADOPCODE = 0x4,
- /* Unwinder only: */
- _UAARG_ENDING_UNWINDER_LOOKUPFAILED = 0x4,
- _UAARG_ENDING_UNWINDER_BUFFERFAILED = 0x5
- } _Unwind_Activity_arg;
-
- void _Unwind_Activity(struct _Unwind_Control_Block *ucbp, uint32_t reason, uint32_t arg);
-#define DEBUGGER_BOTTLENECK(UCBP,LANG,ACTIVITY,ARG) \
- _Unwind_Activity((UCBP),(((LANG)<<24)|ACTIVITY),(uint32_t)(ARG))
-
-#ifdef __cplusplus
-}
-#endif
-
-
-/* ---------------------------------------------------------------------- */
-
-/* Printed diagnostics
- *
- * These may be useful for debugging purposes during development, provided
- * the execution environment supports diagnostics via printf.
- *
- * #define PR_DIAGNOSTICS for printed diagnostics from the personality routine.
- * #define VRS_DIAGNOSTICS for printed diagnostics about VRS operations.
- * #define UNWIND_ACTIVITY_DIAGNOSTICS for printed information from _Unwind_Activity.
- */
-
-/* ---------------------------------------------------------------------- */
-
-#endif /* defined UNWINDENV_H */
--- a/kernel/eka/compsupp/rvct2_1/aehabi/unwind_pr.c Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,785 +0,0 @@
-/* unwind_pr.c - ARM-defined model personality routines
- *
- * Copyright 2002-2003 ARM Limited.
- */
-/*
- Licence
-
- 1. Subject to the provisions of clause 2, ARM hereby grants to LICENSEE a
- perpetual, non-exclusive, nontransferable, royalty free, worldwide licence
- to use this Example Implementation of Exception Handling solely for the
- purpose of developing, having developed, manufacturing, having
- manufactured, offering to sell, selling, supplying or otherwise
- distributing products which comply with the Exception Handling ABI for the
- ARM Architecture specification. All other rights are reserved to ARM or its
- licensors.
-
- 2. THIS EXAMPLE IMPLEMENTATION OF EXCEPTION HANDLING IS PROVIDED "AS IS"
- WITH NO WARRANTIES EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT LIMITED
- TO ANY WARRANTY OF SATISFACTORY QUALITY, MERCHANTABILITY, NONINFRINGEMENT
- OR FITNESS FOR A PARTICULAR PURPOSE.
-*/
-/*
- * RCS $Revision: 1.20 $
- * Checkin $Date: 2003/11/10 17:13:37 $
- * Revising $Author: achapman $
- */
-
-#include <cstdlib>
-/* Environment: */
-#include "unwind_env.h"
-/* Language-independent unwinder declarations: */
-#include "unwinder.h"
-
-/* Define PR_DIAGNOSTICS for printed diagnostics from the personality routine */
-
-#ifdef PR_DIAGNOSTICS
-extern int printf(const char *, ...);
-#endif
-
-
-/* Forward decl: */
-extern _Unwind_Reason_Code __ARM_unwind_cpp_prcommon(_Unwind_State state,
- _Unwind_Control_Block *ucbp,
- _Unwind_Context *context,
- uint32_t idx);
-
-/* Personality routines - external entry points.
- * pr0: short unwind description, 16 bit EHT offsets.
- * pr1: long unwind description, 16 bit EHT offsets.
- * pr2: long unwind description, 32 bit EHT offsets.
- */
-
-#ifdef pr0_c
-_Unwind_Reason_Code __aeabi_unwind_cpp_pr0(_Unwind_State state,
- _Unwind_Control_Block *ucbp,
- _Unwind_Context *context) {
- return __ARM_unwind_cpp_prcommon(state, ucbp, context, 0);
-}
-#endif
-
-#ifdef pr1_c
-_Unwind_Reason_Code __aeabi_unwind_cpp_pr1(_Unwind_State state,
- _Unwind_Control_Block *ucbp,
- _Unwind_Context *context) {
- return __ARM_unwind_cpp_prcommon(state, ucbp, context, 1);
-}
-#endif
-
-#ifdef pr2_c
-_Unwind_Reason_Code __aeabi_unwind_cpp_pr2(_Unwind_State state,
- _Unwind_Control_Block *ucbp,
- _Unwind_Context *context) {
- return __ARM_unwind_cpp_prcommon(state, ucbp, context, 2);
-}
-#endif
-
-/* The rest of the file deals with the common routine */
-
-#ifdef prcommon_c
-
-/* C++ exceptions ABI required here:
- * Declare protocol routines called by the personality routine.
- * These are weak references so that referencing them here is
- * insufficient to pull them into the image - they will only be
- * included if application code uses a __cxa routine.
- */
-
-typedef unsigned char bool;
-static const bool false = 0;
-static const bool true = !false;
-
-typedef struct _ZSt9type_info type_info; /* This names C++ type_info type */
-
-WEAKDECL void __cxa_call_unexpected(_Unwind_Control_Block *ucbp);
-WEAKDECL bool __cxa_begin_cleanup(_Unwind_Control_Block *ucbp);
-WEAKDECL bool __cxa_type_match(_Unwind_Control_Block *ucbp,
- const type_info *rttip,
- void **matched_object);
-
-
-/* ----- Address manipulation: ----- */
-
-/* The following helper function is never called and is present simply
- * for ease of packaging. The constant word within is used by
- * ER_RO_offset_to_addr to compute the RO segment base.
- * The zero word named W is relocated relative to the base B of the
- * segment which includes it, hence B is recoverable at runtime by
- * computing &W - W.
- */
-
-extern const uint32_t __ARM_unwind_cpp_ROSegBase_SelfOffset;
-
-__asm void __ARM_unwind_cpp_basehelper(void)
-{
- export __ARM_unwind_cpp_ROSegBase_SelfOffset;
-R_ARM_ROSEGREL32 EQU 39
-__ARM_unwind_cpp_ROSegBase_SelfOffset;
- dcd 0;
- __RELOC R_ARM_ROSEGREL32,__ARM_unwind_cpp_ROSegBase_SelfOffset;
-}
-
-#define ER_RO_SegBase ((uint32_t)&__ARM_unwind_cpp_ROSegBase_SelfOffset - \
- __ARM_unwind_cpp_ROSegBase_SelfOffset)
-
-/* And now the function used to convert segment-relative offsets
- * to absolute addresses.
- */
-
-static __inline uint32_t ER_RO_offset_to_addr(uint32_t offset)
-{
- return offset + ER_RO_SegBase;
-}
-
-
-/* --------- VRS manipulation: --------- */
-
-#define R_SP 13
-#define R_LR 14
-#define R_PC 15
-
-static __inline uint32_t core_get(_Unwind_Context *context, uint32_t regno)
-{
- uint32_t val;
- /* This call is required to never fail if given a valid regno */
- _Unwind_VRS_Get(context, _UVRSC_CORE, regno, _UVRSD_UINT32, &val);
- return val;
-}
-
-static __inline void core_set(_Unwind_Context *context, uint32_t regno, uint32_t newval)
-{
- /* This call is required to never fail if given a valid regno */
- _Unwind_VRS_Set(context, _UVRSC_CORE, regno, _UVRSD_UINT32, &newval);
-}
-
-static __inline uint32_t count_to_mask(uint32_t count) {
- return (1 << count) - 1;
-}
-
-/* --------- Support for unwind instruction stream: --------- */
-
-#define CODE_FINISH (0xb0)
-
-typedef struct uwdata {
- uint32_t unwind_word; /* current word of unwind description */
- uint32_t *unwind_word_pointer; /* ptr to next word */
- uint8_t unwind_word_bytes_remaining; /* count of bytes left in current word */
- uint8_t unwind_words_remaining; /* count of words left, at ptr onwards */
-} uwdata;
-
-static __inline uint8_t next_unwind_byte(uwdata *u) {
- uint8_t ub;
- if (u->unwind_word_bytes_remaining == 0) { /* Load another word */
- if (u->unwind_words_remaining == 0) return CODE_FINISH; /* nothing left - yield NOP */
- u->unwind_words_remaining--;
- u->unwind_word = *(u->unwind_word_pointer++);
- u->unwind_word_bytes_remaining = 4;
- }
-
- u->unwind_word_bytes_remaining--;
- ub = (u->unwind_word & 0xff000000) >> 24;
- u->unwind_word <<= 8;
- return ub;
-}
-
-
-/* --------- Personality routines: --------- */
-
-/* The C++ Standard is silent on what is supposed to happen if an internal
- * inconsistency occurs during unwinding. In our design, we return to the
- * caller with _URC_FAILURE. During phase 1 this causes a return from the
- * language-independent unwinder to its caller (__cxa_throw or __cxa_rethrow)
- * which will then call terminate(). If an error occurs during phase 2, the
- * caller will call abort().
- */
-
-/* Types to assist with reading EHT's */
-
-typedef struct {
- uint16_t length;
- uint16_t offset;
-} EHT16;
-
-typedef struct {
- uint32_t length;
- uint32_t offset;
-} EHT32;
-
-typedef uint32_t landingpad_t;
-
-typedef struct {
- landingpad_t landingpad;
-} EHT_cleanup_tail;
-
-typedef struct {
- landingpad_t landingpad;
- uint32_t rtti_offset;
-} EHT_catch_tail;
-
-typedef struct {
- uint32_t rtti_count; /* table count (possibly 0) */
- uint32_t (rtti_offsets[1]); /* variable length table, possibly followed by landing pad */
-} EHT_fnspec_tail;
-
-
-/* Macros: */
-
-/* Barrier cache: */
-/* Requirement imposed by C++ semantics module - match object in slot 0: */
-#define BARRIER_HANDLEROBJECT (0)
-/* Requirement imposed by C++ semantics module - function exception spec info */
-#define BARRIER_FNSPECCOUNT (1)
-#define BARRIER_FNSPECBASE (2)
-#define BARRIER_FNSPECSTRIDE (3)
-#define BARRIER_FNSPECARRAY (4)
-/* Private use for us between phase 1 & 2: */
-#define BARRIER_EHTP (1)
-
-#define SAVE_PROPAGATION_BARRIER(UCB_PTR,VSP,EHTP,HANDLEROBJECT) \
- (UCB_PTR)->barrier_cache.sp = (VSP); \
- (UCB_PTR)->barrier_cache.bitpattern[BARRIER_EHTP] = (uint32_t)(EHTP); \
- (UCB_PTR)->barrier_cache.bitpattern[BARRIER_HANDLEROBJECT] = (uint32_t)(HANDLEROBJECT);
-
-#define CHECK_FOR_PROPAGATION_BARRIER(UCB_PTR,VSP,EHTP) \
- ((UCB_PTR)->barrier_cache.sp == (VSP) && \
- (UCB_PTR)->barrier_cache.bitpattern[BARRIER_EHTP] == (uint32_t)(EHTP))
-
-
-/* Cleanup cache: We only use one field */
-#define CLEANUP_EHTP (0)
-
-
-/* Special catch rtti values */
-#define CATCH_ALL (0xffffffff)
-#define CATCH_ALL_AND_TERMINATE (0xfffffffe)
-
-
-/* Common personality routine: receives pr index as an argument.
- *
- * Note this implementation contains no explicit check against attempting to
- * unwind off the top of the stack. Instead it relies (in cooperation with
- * the language-independent unwinder) on there being a propagation barrier
- * somewhere on the stack, perhaps the caller to main being not
- * unwindable. An alternative would be to check for the stack pointer
- * addressing a stack limit symbol.
- */
-
-_Unwind_Reason_Code __ARM_unwind_cpp_prcommon(_Unwind_State state,
- _Unwind_Control_Block *ucbp,
- _Unwind_Context *context,
- uint32_t idx)
-{
- _Unwind_EHT_Header *eht_startp; /* EHT start pointer */
- uint8_t *ehtp; /* EHT pointer, incremented as required */
- /* Flag for fnspec violations in which the frame should be unwound before calling unexpected() */
- bool phase2_call_unexpected_after_unwind;
- /* Flag for whether we have loaded r15 (pc) with a return address while executing
- * unwind instructions.
- * Set this on any write to r15 while executing the unwind instructions.
- */
- bool wrote_pc = false;
- /* Flag for whether we loaded r15 from r14 while executing the unwind instructions */
- bool wrote_pc_from_lr = false;
- uwdata ud;
-
- /* Mark all as well and extract the EHT pointer */
-
- eht_startp = ucbp->pr_cache.ehtp;
-
-#ifdef PR_DIAGNOSTICS
- printf("PR entered: state=%d, r15=0x%x, fnstart=0x%x\n",
- state, core_get(context, R_PC), ucbp->pr_cache.fnstart);
-#endif
-
- /* What are we supposed to do? */
-
- if (state != _US_VIRTUAL_UNWIND_FRAME &&
- state != _US_UNWIND_FRAME_STARTING &&
- state != _US_UNWIND_FRAME_RESUME) {
- DEBUGGER_BOTTLENECK(ucbp, _UASUBSYS_CPP, _UAACT_ENDING, _UAARG_ENDING_UNSPECIFIED);
- return _URC_FAILURE;
- }
-
- phase2_call_unexpected_after_unwind = false;
-
- /* Traverse the current EHT, if there is one.
- * The required behaviours are:
- * _US_VIRTUAL_UNWIND_FRAME: search for a propagation barrier in this frame.
- * otherwise look for the propagation barrier we found in phase 1,
- * performing cleanups on the way. In this case if state will be one of:
- * _US_UNWIND_FRAME_STARTING first time with this frame
- * _US_UNWIND_FRAME_RESUME not first time, we are part-way through the EHT.
- */
-
- if ((ucbp->pr_cache.additional & 1) == 0) { /* EHT inline in index table? */
- /* No: thus there is a real EHT */
-
- if (state == _US_UNWIND_FRAME_RESUME) {
- /* Recover saved pointer to next EHT entry */
- ehtp = (uint8_t *)ucbp->cleanup_cache.bitpattern[CLEANUP_EHTP];
-#ifdef PR_DIAGNOSTICS
- printf("PR EHT recovered pointer 0x%x\n", (int)ehtp);
-#endif
- } else {
- /* Point at the first EHT entry.
- * For pr0, the unwind description is entirely within the header word.
- * For pr1 & pr2, an unwind description extension word count is
- * held in bits 16-23 of the header word.
- */
- uint32_t unwind_extension_word_count = (idx == 0 ? 0 : ((*eht_startp) >> 16) & 0xff);
- ehtp = (uint8_t *)(eht_startp + 1 + unwind_extension_word_count);
-
-#ifdef PR_DIAGNOSTICS
- printf("PR EHT first entry at 0x%x\n", (int)ehtp);
-#endif
- }
-
- /* scan ... */
-
- while (1) {
-
- /* Extract 32 bit length and offset */
- uint32_t length;
- uint32_t offset;
- if (idx == 2) {
- /* 32 bit offsets */
- length = ((EHT32 *)ehtp)->length;
- if (length == 0) break; /* end of table */
- offset = ((EHT32 *)ehtp)->offset;
- ehtp += sizeof(EHT32);
- } else {
- /* 16 bit offsets */
- length = ((EHT16 *)ehtp)->length;
- if (length == 0) break; /* end of table */
- offset = ((EHT16 *)ehtp)->offset;
- ehtp += sizeof(EHT16);
- }
-
-#ifdef PR_DIAGNOSTICS
- printf("PR Got entry at 0x%x code=%d, length=0x%x, offset=0x%x\n",
- (int)(ehtp-4), ((offset & 1) << 1) | (length & 1),
- length & ~1, offset & ~1);
-#endif
-
- /* Dispatch on the kind of entry */
- switch (((offset & 1) << 1) | (length & 1)) {
- case 0: /* cleanup */
- if (state == _US_VIRTUAL_UNWIND_FRAME) {
- /* Not a propagation barrier - skip */
- } else {
- /* Phase 2: call the cleanup if the return address is in range */
- uint32_t padaddress;
- uint32_t rangestartaddr = ucbp->pr_cache.fnstart + offset;
- uint32_t rtn_addr = core_get(context, R_PC);
- if (rangestartaddr <= rtn_addr && rtn_addr < rangestartaddr + length) {
- /* It is in range. */
- landingpad_t landingpad = ((EHT_cleanup_tail *)ehtp)->landingpad;
- ehtp += sizeof(EHT_cleanup_tail);
- /* Dump state into the ECO so we resume correctly after the cleanup. */
- /* We simply save the address of the next EHT entry. */
- ucbp->cleanup_cache.bitpattern[CLEANUP_EHTP] = (uint32_t)ehtp;
- if (!__cxa_begin_cleanup(ucbp)) {
- /* Should be impossible, using ARM's library */
- DEBUGGER_BOTTLENECK(ucbp, _UASUBSYS_CPP, _UAACT_ENDING, _UAARG_ENDING_UNSPECIFIED);
- return _URC_FAILURE;
- }
- /* Set up the VRS to enter the landing pad. */
- padaddress = ER_RO_offset_to_addr(landingpad);
- core_set(context, R_PC, padaddress);
-#ifdef PR_DIAGNOSTICS
- printf("PR Got cleanup in range, cleanup addr=0x%x\n", core_get(context, R_PC));
- printf("PR Saving EHT pointer 0x%x\n", (int)ehtp);
-#endif
- DEBUGGER_BOTTLENECK(ucbp, _UASUBSYS_CPP, _UAACT_PADENTRY, padaddress);
- /* Exit requesting upload the VRS to the real machine. */
- return _URC_INSTALL_CONTEXT;
- }
- }
- /* Phase 1, or phase 2 and not in range */
- ehtp += sizeof(EHT_cleanup_tail);
- break;
- case 1: /* catch */
- {
- if (state == _US_VIRTUAL_UNWIND_FRAME) {
- /* In range, and with a matching type? */
- uint32_t rangestartaddr = ucbp->pr_cache.fnstart + offset;
- uint32_t rtn_addr = core_get(context, R_PC);
- void *matched_object;
- length -= 1; /* length had low bit set - clear it */
- if (rangestartaddr <= rtn_addr && rtn_addr < rangestartaddr + length) {
- /* In range */
- uint32_t rtti_val = ((EHT_catch_tail *)ehtp)->rtti_offset;
- if (rtti_val == CATCH_ALL_AND_TERMINATE) {
- /* Always matches and causes propagation failure in phase 1 */
-#ifdef PR_DIAGNOSTICS
- printf("PR Got CATCH_ALL_AND_TERMINATE in phase 1\n");
-#endif
- DEBUGGER_BOTTLENECK(ucbp, _UASUBSYS_CPP, _UAACT_ENDING, _UAARG_ENDING_NOUNWIND);
- return _URC_FAILURE;
- }
- if ((rtti_val == CATCH_ALL && ((matched_object = ucbp + 1),1)) ||
- __cxa_type_match(ucbp,
- (type_info *)(rtti_val = ER_RO_offset_to_addr(rtti_val)),
- &matched_object)) {
- /* In range and matches.
- * Record the propagation barrier details for ease of detection in phase 2.
- * We save a pointer to the middle of the handler entry -
- * this is fine, so long as we are consistent about it.
- */
-#ifdef PR_DIAGNOSTICS
- printf("PR Got barrier in phase 1\n");
- printf("PR Matched object address 0x%8.8x\n", matched_object);
-#endif
- SAVE_PROPAGATION_BARRIER(ucbp, core_get(context, R_SP), ehtp, matched_object);
- DEBUGGER_BOTTLENECK(ucbp, _UASUBSYS_CPP, _UAACT_BARRIERFOUND,
- ER_RO_offset_to_addr(((EHT_catch_tail *)ehtp)->landingpad));
- DEBUGGER_BOTTLENECK(ucbp, _UASUBSYS_CPP, _UAACT_CPP_TYPEINFO, rtti_val);
- return _URC_HANDLER_FOUND;
- }
- }
- /* Not in range or no type match - fall thru to carry on scanning the table */
- } else {
- /* Else this is phase 2: have we encountered the saved barrier? */
- if (CHECK_FOR_PROPAGATION_BARRIER(ucbp, core_get(context, R_SP), ehtp)) {
- /* Yes we have.
- * Set up the VRS to enter the landing pad,
- * and upload the VRS to the real machine.
- */
- landingpad_t landingpad;
- uint32_t padaddress;
-#ifdef PR_DIAGNOSTICS
- printf("PR Got catch barrier in phase 2\n");
-#endif
- landingpad = ((EHT_catch_tail *)ehtp)->landingpad;
- padaddress = ER_RO_offset_to_addr(landingpad);
- core_set(context, R_PC, padaddress);
- core_set(context, 0, (uint32_t)ucbp);
- DEBUGGER_BOTTLENECK(ucbp, _UASUBSYS_CPP, _UAACT_PADENTRY, padaddress);
- /* Exit requesting upload the VRS to the real machine. */
- return _URC_INSTALL_CONTEXT;
- }
- }
- /* Else carry on scanning the table */
- ehtp += sizeof(EHT_catch_tail);
- break;
- }
- case 2: /* function exception specification (fnspec) */
- {
- uint32_t counter_word = ((EHT_fnspec_tail *)ehtp)->rtti_count;
- uint32_t rtti_count = counter_word & 0x7fffffff; /* Extract offset count */
- if (state == _US_VIRTUAL_UNWIND_FRAME) {
- /* Phase 1 */
- /* In range? Offset had low bit set - clear it */
- uint32_t rangestartaddr = ucbp->pr_cache.fnstart + offset - 1;
- uint32_t rtn_addr = core_get(context, R_PC);
- if (rangestartaddr <= rtn_addr && rtn_addr < rangestartaddr + length) {
- /* See if any type matches */
- uint32_t *rttipp = &((EHT_fnspec_tail *)ehtp)->rtti_offsets[0];
- uint32_t i;
- for (i = 0; i < rtti_count; i++) {
- void *matched_object;
- if (__cxa_type_match(ucbp,
- (type_info *)ER_RO_offset_to_addr(*rttipp),
- &matched_object)) {
-#ifdef PR_DIAGNOSTICS
- printf("PR Fnspec matched in phase 1\n");
-#endif
- break;
- }
- rttipp++;
- }
-
- if (i == rtti_count) { /* NB case rtti_count==0 forces no match [for throw()] */
- /* No match - fnspec violation is a propagation barrier */
-#ifdef PR_DIAGNOSTICS
- printf("PR Got fnspec barrier in phase 1\n");
-#endif
- SAVE_PROPAGATION_BARRIER(ucbp, core_get(context, R_SP), ehtp, 0); /* save ptr to the count of types */
- /* Even if this is a fnspec with a landing pad, we always end up in
- * __cxa_call_unexpected so tell the debugger thats where we're going
- */
- DEBUGGER_BOTTLENECK(ucbp, _UASUBSYS_CPP, _UAACT_BARRIERFOUND, &__cxa_call_unexpected);
- return _URC_HANDLER_FOUND;
- }
- } /* if (in range...) */
-
- /* Fall out of the 'if' to continue table scanning */
-
- } else {
- /* Else this is phase 2: have we encountered the saved barrier? */
- if (CHECK_FOR_PROPAGATION_BARRIER(ucbp, core_get(context, R_SP), ehtp)) {
- /* Yes we have. Fill in the UCB barrier_cache for entry to __cxa_call_unexpected */
- uint32_t *p = (uint32_t *)ehtp; /* ptr to rtti count */
- ucbp->barrier_cache.bitpattern[BARRIER_FNSPECCOUNT] = rtti_count;
- ucbp->barrier_cache.bitpattern[BARRIER_FNSPECBASE] = ER_RO_offset_to_addr(0); /* base address */
- ucbp->barrier_cache.bitpattern[BARRIER_FNSPECSTRIDE] = 4; /* stride */
- ucbp->barrier_cache.bitpattern[BARRIER_FNSPECARRAY] = (uint32_t)(p + 1); /* address of rtti offset list */
-
- /* If this is a fnspec with an attached landing pad, we must enter
- * the pad immediately. Otherwise we need to unwind the frame before
- * calling __cxa_call_unexpected() so set a flag to make this happen.
- */
- if (counter_word == rtti_count)
- phase2_call_unexpected_after_unwind = true; /* no pad, enter later */
- else { /* pad */
- landingpad_t landingpad;
- uint32_t padaddress;
-#ifdef PR_DIAGNOSTICS
- printf("PR Got fnspec barrier in phase 2 (immediate entry)\n");
-#endif
- ehtp += (sizeof(((EHT_fnspec_tail *)ehtp)->rtti_count) +
- sizeof(uint32_t) * rtti_count); /* point at pad offset */
- landingpad = *(landingpad_t *)ehtp;
- padaddress = ER_RO_offset_to_addr(landingpad);
- core_set(context, 0, (uint32_t)ucbp);
- core_set(context, R_PC, padaddress);
- /* Even if this is a fnspec with a landing pad, in phase 1 we said we'd
- * end up in __cxa_call_unexpected so show the same thing now
- */
- DEBUGGER_BOTTLENECK(ucbp, _UASUBSYS_CPP, _UAACT_PADENTRY, &__cxa_call_unexpected);
- return _URC_INSTALL_CONTEXT;
- }
- } /* endif (barrier match) */
- } /* endif (which phase) */
-
- /* Advance to the next item, remembering to skip the landing pad if present */
- ehtp += (sizeof(((EHT_fnspec_tail *)ehtp)->rtti_count) +
- sizeof(uint32_t) * rtti_count +
- (counter_word == rtti_count ? 0 : sizeof(landingpad_t)));
- break;
- }
- case 3: /* unallocated */
- DEBUGGER_BOTTLENECK(ucbp, _UASUBSYS_CPP, _UAACT_ENDING, _UAARG_ENDING_TABLECORRUPT);
- return _URC_FAILURE;
- } /* switch */
-
- } /* while (1) */
-
-#ifdef PR_DIAGNOSTICS
- printf("PR Reached end of EHT\n");
-#endif
-
- } /* if out-of-line EHT */
-
-
- /* Do a virtual unwind of this frame - load the first unwind bytes then loop.
- * Loop exit is by executing opcode CODE_FINISH.
- */
-
- ud.unwind_word = *(uint32_t *)eht_startp; /* first word */
- ud.unwind_word_pointer = (uint32_t *)eht_startp + 1; /* ptr to extension words, if any */
- if (idx == 0) { /* short description */
- ud.unwind_words_remaining = 0; /* no further words */
- ud.unwind_word <<= 8; /* 3 explicit unwind bytes in this word */
- ud.unwind_word_bytes_remaining = 3;
- } else { /* long description: extension word count in bits 16-23 */
- ud.unwind_words_remaining = ((ud.unwind_word) >> 16) & 0xff;
- ud.unwind_word <<= 16; /* 2 explicit unwind bytes in this word */
- ud.unwind_word_bytes_remaining = 2;
- }
-
-#ifdef PR_DIAGNOSTICS
- /* debug_print_vrs(context); */
-#endif
-
- while (1) {
- uint8_t ub = next_unwind_byte(&ud);
-
-#ifdef PR_DIAGNOSTICS
- printf("PR Unwind byte 0x%x\n", ub);
-#endif
-
- /* decode and execute the current byte ... */
-
- if (ub == CODE_FINISH) { /* finished unwinding */
- if (!wrote_pc) {
- uint32_t lr;
- _Unwind_VRS_Get(context, _UVRSC_CORE, R_LR, _UVRSD_UINT32, &lr);
- core_set(context, R_PC, lr);
- wrote_pc_from_lr = true;
- }
-#ifdef PR_DIAGNOSTICS
- {
- uint32_t nextpc;
- _Unwind_VRS_Get(context, _UVRSC_CORE, R_PC, _UVRSD_UINT32, &nextpc);
- printf("PR Next PC is 0x%x\n", nextpc);
- }
-#endif
- break;
- }
- if (ub <= 0x3f) { /* 00nnnnnn: vsp += (nnnnnn << 2) + 4 */
- uint32_t increment = ((ub & 0x3f) << 2) + 4;
- core_set(context, R_SP, core_get(context, R_SP) + increment);
- continue;
- }
- if (ub <= 0x7f) { /* 01xxxxxx: vsp -= (xxxxxx << 2) + 4 */
- uint32_t decrement = ((ub & 0x3f) << 2) + 4;
- core_set(context, R_SP, core_get(context, R_SP) - decrement);
- continue;
- }
- if (ub <= 0x8f) { /* 100000000 00000000: refuse, 1000rrrr rrrrrrrr: pop integer regs */
- uint32_t mask = (ub & 0xf) << 12;
- ub = next_unwind_byte(&ud);
- mask |= ub << 4;
- if (mask == 0) { /* 10000000 00000000 refuse to unwind */
- DEBUGGER_BOTTLENECK(ucbp, _UASUBSYS_CPP, _UAACT_ENDING, _UAARG_ENDING_NOUNWIND);
- return _URC_FAILURE;
- }
- if (_Unwind_VRS_Pop(context, _UVRSC_CORE, mask, _UVRSD_UINT32) != _UVRSR_OK) {
- DEBUGGER_BOTTLENECK(ucbp, _UASUBSYS_CPP, _UAACT_ENDING, _UAARG_ENDING_VRSFAILED);
- return _URC_FAILURE;
- }
- if (mask & (1 << R_PC)) wrote_pc = true;
- continue;
- }
- if (ub <= 0x9f) { /* 1001nnnn: vsp = r[nnnn] if not 13,15 */
- uint8_t regno = ub & 0xf;
- if (regno == 13 || regno == R_PC) { /* reserved */
- DEBUGGER_BOTTLENECK(ucbp, _UASUBSYS_CPP, _UAACT_ENDING, _UAARG_ENDING_CPP_BADOPCODE);
- return _URC_FAILURE;
- }
- core_set(context, R_SP, core_get(context, regno));
- continue;
- }
- if (ub <= 0xaf) { /* 1010xnnn: pop r4-r[4+nnn], +r14 if x */
- uint32_t mask = count_to_mask((ub & 0x7) + 1) << 4;
- if (ub & 0x8) mask |= (1 << R_LR);
- if (_Unwind_VRS_Pop(context, _UVRSC_CORE, mask, _UVRSD_UINT32) != _UVRSR_OK) {
- DEBUGGER_BOTTLENECK(ucbp, _UASUBSYS_CPP, _UAACT_ENDING, _UAARG_ENDING_VRSFAILED);
- return _URC_FAILURE;
- }
- continue;
- }
- if (ub <= 0xb7) {
- /* if (ub == 0xb0) is CODE_FINISH, handled earlier */
- if (ub == 0xb1) { /* 10110001 0000iiii pop integer regs, others reserved */
- uint32_t mask = next_unwind_byte(&ud);
- if (mask == 0 || mask > 0xf) { /* reserved */
- DEBUGGER_BOTTLENECK(ucbp, _UASUBSYS_CPP, _UAACT_ENDING, _UAARG_ENDING_CPP_BADOPCODE);
- return _URC_FAILURE;
- }
- if (_Unwind_VRS_Pop(context, _UVRSC_CORE, mask, _UVRSD_UINT32) != _UVRSR_OK) {
- DEBUGGER_BOTTLENECK(ucbp, _UASUBSYS_CPP, _UAACT_ENDING, _UAARG_ENDING_VRSFAILED);
- return _URC_FAILURE;
- }
- continue;
- }
- if (ub == 0xb2) { /* 10110010 uleb128 : vsp += (uleb128 << 2) + 0x204 */
- uint32_t u = 0;
- uint32_t n = 0;
- /* decode */
- while (1) {
- ub = next_unwind_byte(&ud);
- u |= (ub & 0x7f) << n;
- if ((ub & 0x80) == 0) break;
- n += 7;
- }
- core_set(context, R_SP, core_get(context, R_SP) + (u << 2) + 0x204);
- continue;
- }
- if (ub == 0xb3) { /* 10110011: pop vfp */
- uint32_t discriminator = next_unwind_byte(&ud);
- discriminator = ((discriminator & 0xf0) << 12) | ((discriminator & 0x0f) + 1);
- if (_Unwind_VRS_Pop(context, _UVRSC_VFP, discriminator, _UVRSD_VFPX) != _UVRSR_OK) {
- DEBUGGER_BOTTLENECK(ucbp, _UASUBSYS_CPP, _UAACT_ENDING, _UAARG_ENDING_VRSFAILED);
- return _URC_FAILURE;
- }
- continue;
- }
- { /* 101101nn: pop fpa */
- uint32_t discriminator = 0x40000 | ((ub & 0x3) + 1);
- if (_Unwind_VRS_Pop(context, _UVRSC_FPA, discriminator, _UVRSD_FPAX) != _UVRSR_OK) {
- DEBUGGER_BOTTLENECK(ucbp, _UASUBSYS_CPP, _UAACT_ENDING, _UAARG_ENDING_VRSFAILED);
- return _URC_FAILURE;
- }
- continue;
- }
- } /* if (ub <= 0xb7) ... */
- if (ub <= 0xbf) { /* 10111nnn: pop vfp */
- uint32_t discriminator = 0x80000 | ((ub & 0x7) + 1);
- if (_Unwind_VRS_Pop(context, _UVRSC_VFP, discriminator, _UVRSD_VFPX) != _UVRSR_OK) {
- DEBUGGER_BOTTLENECK(ucbp, _UASUBSYS_CPP, _UAACT_ENDING, _UAARG_ENDING_VRSFAILED);
- return _URC_FAILURE;
- }
- continue;
- }
- if (ub <= 0xc7) {
- if (ub == 0xc7) { /* 11000111: WMMX C regs */
- uint32_t mask = next_unwind_byte(&ud);
- if (mask == 0 || mask > 0xf) { /* reserved */
- DEBUGGER_BOTTLENECK(ucbp, _UASUBSYS_CPP, _UAACT_ENDING, _UAARG_ENDING_CPP_BADOPCODE);
- return _URC_FAILURE;
- }
- if (_Unwind_VRS_Pop(context, _UVRSC_WMMXC, mask, _UVRSD_UINT32) != _UVRSR_OK) {
- DEBUGGER_BOTTLENECK(ucbp, _UASUBSYS_CPP, _UAACT_ENDING, _UAARG_ENDING_VRSFAILED);
- return _URC_FAILURE;
- }
- continue;
- } else if (ub == 0xc6) { /* 11000110: WMMX D regs */
- uint32_t discriminator = next_unwind_byte(&ud);
- discriminator = ((discriminator & 0xf0) << 4) | ((discriminator & 0x0f) + 1);
- if (_Unwind_VRS_Pop(context, _UVRSC_WMMXD, discriminator, _UVRSD_UINT64) != _UVRSR_OK) {
- DEBUGGER_BOTTLENECK(ucbp, _UASUBSYS_CPP, _UAACT_ENDING, _UAARG_ENDING_VRSFAILED);
- return _URC_FAILURE;
- }
- continue;
- } else {
- /* 11000nnn (nnn != 6, 7): WMMX D regs */
- uint32_t discriminator = 0xa00 | ((ub & 0x7) + 1);
- if (_Unwind_VRS_Pop(context, _UVRSC_WMMXD, discriminator, _UVRSD_UINT64) != _UVRSR_OK) {
- DEBUGGER_BOTTLENECK(ucbp, _UASUBSYS_CPP, _UAACT_ENDING, _UAARG_ENDING_VRSFAILED);
- return _URC_FAILURE;
- }
- continue;
- }
- } /* if (ub <= 0xc7) ... */
- if (ub == 0xc8) { /* 11001000: pop fpa */
- uint32_t discriminator = next_unwind_byte(&ud);
- discriminator = ((discriminator & 0x70) << 12) | ((discriminator & 0x03) + 1);
- if (_Unwind_VRS_Pop(context, _UVRSC_FPA, discriminator, _UVRSD_FPAX) != _UVRSR_OK) {
- DEBUGGER_BOTTLENECK(ucbp, _UASUBSYS_CPP, _UAACT_ENDING, _UAARG_ENDING_VRSFAILED);
- return _URC_FAILURE;
- }
- continue;
- }
- /* and in fact everything else is currently reserved or spare */
- DEBUGGER_BOTTLENECK(ucbp, _UASUBSYS_CPP, _UAACT_ENDING, _UAARG_ENDING_CPP_BADOPCODE);
- return _URC_FAILURE;
- }
-
-#ifdef PR_DIAGNOSTICS
- /* debug_print_vrs(context); */
-#endif
-
- /* The VRS has now been updated to reflect the virtual unwind.
- * If we are dealing with an unmatched fnspec, pop intervening frames
- * and call unexpected(). Else return to our caller with an
- * indication to continue unwinding.
- */
-
- if (phase2_call_unexpected_after_unwind) {
- /* Set up the VRS to enter __cxa_call_unexpected,
- * and upload the VRS to the real machine.
- * The barrier_cache was initialised earlier.
- */
-#ifdef PR_DIAGNOSTICS
- printf("PR Got fnspec barrier in phase 2 (unwinding completed)\n");
-#endif
- core_set(context, 0, (uint32_t)ucbp);
- if (!wrote_pc_from_lr) {
- uint32_t pc;
- /* Move the return address to lr to simulate a call */
- _Unwind_VRS_Get(context, _UVRSC_CORE, R_PC, _UVRSD_UINT32, &pc);
- core_set(context, R_LR, pc);
- }
- core_set(context, R_PC, (uint32_t)&__cxa_call_unexpected);
- DEBUGGER_BOTTLENECK(ucbp, _UASUBSYS_CPP, _UAACT_PADENTRY, &__cxa_call_unexpected);
- return _URC_INSTALL_CONTEXT;
- }
-
- /* Else continue with next frame */
- return _URC_CONTINUE_UNWIND;
-}
-
-#endif
-/* end ifdef prcommon_c */
--- a/kernel/eka/compsupp/rvct2_1/aehabi/unwinder.c Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,1034 +0,0 @@
-/* unwinder.c
- *
- * Copyright 2002-2003 ARM Limited.
- */
-/*
- Licence
-
- 1. Subject to the provisions of clause 2, ARM hereby grants to LICENSEE a
- perpetual, non-exclusive, nontransferable, royalty free, worldwide licence
- to use this Example Implementation of Exception Handling solely for the
- purpose of developing, having developed, manufacturing, having
- manufactured, offering to sell, selling, supplying or otherwise
- distributing products which comply with the Exception Handling ABI for the
- ARM Architecture specification. All other rights are reserved to ARM or its
- licensors.
-
- 2. THIS EXAMPLE IMPLEMENTATION OF EXCEPTION HANDLING IS PROVIDED "AS IS"
- WITH NO WARRANTIES EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT LIMITED
- TO ANY WARRANTY OF SATISFACTORY QUALITY, MERCHANTABILITY, NONINFRINGEMENT
- OR FITNESS FOR A PARTICULAR PURPOSE.
-*/
-/*
- * RCS $Revision: 1.16 $
- * Checkin $Date: 2003/10/23 13:57:39 $
- * Revising $Author: agrant $
- */
-
-/* Language-independent unwinder implementation */
-
-/* This source file is compiled automatically by ARM's make system into
- * multiple object files. The source regions constituting object file
- * xxx.o are delimited by ifdef xxx_c / endif directives.
- *
- * The source regions currently marked are:
- * unwinder_c
- * unwind_activity_c
- */
-
-#include <stddef.h>
-#include <stdlib.h>
-/* Environment: */
-#include "unwind_env.h"
-/* Language-independent unwinder declarations: */
-#include "unwinder.h"
-
-/* Define UNWIND_ACTIVITY_DIAGNOSTICS for printed information from _Unwind_Activity */
-/* Define VRS_DIAGNOSTICS for printed diagnostics about VRS operations */
-
-#if defined(VRS_DIAGNOSTICS) || defined(UNWIND_ACTIVITY_DIAGNOSTICS)
-extern int printf(const char *, ...);
-#endif
-
-
-#ifdef unwinder_c
-
-/* ========================= ========================= */
-/* ========================= Virtual register set ========================= */
-/* ========================= ========================= */
-
-/* The approach taken by this implementation is to use the real machine
- * registers to hold all but the values of core (integer)
- * registers. Consequently the implementation must use only the core
- * registers except when manipulating the virtual register set. Non-core
- * registers are saved only on first use, so the single implementation can
- * cope with execution on processors which lack certain registers. The
- * registers as they were at the start of the propagation must be preserved
- * over phase 1 so that the machine state is correct at the start of phase
- * 2. This requires a copy to be taken (which can be stack allocated). During
- * a stack unwind (phase 1 or phase 2), the "current" virtual register set is
- * implemented as core register values held in a data structure, and non-core
- * register values held in the registers themselves. To ensure that all
- * original register values are available at the beginning of phase 2, the
- * core registers are saved in a second structure at the start of phase 1 and
- * the non-core registers are demand-saved into another part of the data
- * structure that holds the current core registers during the phase 1 stack
- * unwind.
- */
-/* Extent to which the access routines are implemented:
- * _Unwind_VRS_Get and _Unwind_VRS_Set implement only access to the core registers.
- * _Unwind_VRS_Pop implements only popping of core, vfp and fpa registers.
- * There is no support here for the Intel WMMX registers, but space is nevertheless
- * reserved in the virtual register set structure to indicate whether demand-saving
- * of those registers is required (as they are unsupported, it never is). The space
- * costs nothing as it is required for alignment.
- * The level of supported functionality is compliant with the requirements of the
- * Exceptions ABI.
- */
-
-typedef unsigned char bool;
-struct core_s { uint32_t r[16]; }; /* core integer regs */
-struct vfp_s { uint64_t vfp[16+1]; }; /* VFP registers saved in FSTMX format */
- /* Extra 2 words for the format word + unused */
-struct fpa_reg { uint32_t word[3]; };
-struct fpa_s { struct fpa_reg fpa[8]; }; /* FPA registers saved in SFM format */
-
-/* Phase 1 virtual register set includes demand-save areas */
-/* The phase 2 virtual register set must be a prefix of the phase 1 set */
-typedef struct phase1_virtual_register_set_s {
- /* demand_save flag == 1 means save the registers in the demand-save area */
- bool demand_save_vfp;
- bool demand_save_fpa;
- bool demand_save_wmmxd;
- bool demand_save_wmmxc;
- struct core_s core; /* current core registers */
- struct vfp_s vfp; /* demand-saved vfp registers */
- struct fpa_s fpa; /* demand-saved fpa registers */
-} phase1_virtual_register_set;
-
-/* Phase 2 virtual register set has no demand-save areas */
-/* The phase 2 virtual register set must be a prefix of the phase 1 set */
-/* The assembly fragments for _Unwind_RaiseException and _Unwind_Resume create
- * a phase2_virtual_register_set_s by hand so be careful.
- */
-typedef struct phase2_virtual_register_set_s {
- /* demand_save flag == 1 means save the registers in the demand-save area */
- /* Always 0 in phase 2 */
- bool demand_save_vfp;
- bool demand_save_fpa;
- bool demand_save_wmmxd;
- bool demand_save_wmmxc;
- struct core_s core; /* current core registers */
-} phase2_virtual_register_set;
-
-/* -- Helper macros for the embedded assembly */
-
-#if defined(__TARGET_ARCH_5T) || defined(__TARGET_ARCH_5TXM) || defined(__TARGET_ARCH_5TE) || \
- defined(__TARGET_ARCH_6) /* || ... */
- #define ARCH_5T_OR_LATER 1
-#else
- #define ARCH_5T_OR_LATER 0
-#endif
-
-#if defined(__APCS_INTERWORK) && !ARCH_5T_OR_LATER
- #define OLD_STYLE_INTERWORKING 1
-#else
- #define OLD_STYLE_INTERWORKING 0
-#endif
-
-#if defined(__TARGET_ARCH_4T) || defined(__TARGET_ARCH_4TXM) || ARCH_5T_OR_LATER
- #define HAVE_BX 1
-#else
- #define HAVE_BX 0
-#endif
-
-#if HAVE_BX
- #define RET_LR bx lr
-#else
- #define RET_LR mov pc,lr
-#endif
-
-/* ----- Routines: ----- */
-
-/* ----- Helper routines, private but external ----- */
-/* Note '%0' refers to local label '0' */
-
-__asm void __ARM_Unwind_VRS_VFPpreserve(void *vfpp)
-{
- /* Preserve the vfp registers in the passed memory */
-#ifdef __thumb
- #define MAYBE_SWITCH_TO_ARM_STATE SWITCH_TO_ARM_STATE
- #define MAYBE_CODE16 code16
- macro;
- SWITCH_TO_ARM_STATE;
-1
- align 4;
-2
- assert (%2 - %1) = 0;
- bx pc;
- nop;
- code32;
- mend;
-#else
- #define MAYBE_SWITCH_TO_ARM_STATE /* nothing */
- #define MAYBE_CODE16 /* nothing */
-#endif
-
-vfp_d0 CN 0;
- MAYBE_SWITCH_TO_ARM_STATE;
- stc p11,vfp_d0,[r0],{0x21}; /* 0xec800b21 FSTMIAX r0,{d0-d15} */
- RET_LR;
- MAYBE_CODE16;
-}
-
-__asm void __ARM_Unwind_VRS_VFPrestore(void *vfpp)
-{
- /* Restore the vfp registers from the passed memory */
-vfp_d0 CN 0;
- MAYBE_SWITCH_TO_ARM_STATE;
- ldc p11,vfp_d0,[r0],{0x21}; /* 0xec900b21 FLDMIAX r0,{d0-d15} */
- RET_LR;
- MAYBE_CODE16;
-}
-
-__asm void __ARM_Unwind_VRS_FPApreserve(void *vfpp)
-{
- /* Preserve the fpa registers in the passed memory */
-fpa_f0 CN 0;
-fpa_f4 CN 0;
- MAYBE_SWITCH_TO_ARM_STATE;
- stc p2, fpa_f0, [r0]; /* 0xed800200 SFM f0,4,[r0,#0] */
- stc p2, fpa_f4, [r0, #48]; /* 0xed80420c SFM f4,4,[r0,#0x30] */
- RET_LR;
- MAYBE_CODE16;
-}
-
-__asm void __ARM_Unwind_VRS_FPArestore(void *vfpp)
-{
- /* Restore the fpa registers from the passed memory */
-fpa_f0 CN 0;
-fpa_f4 CN 0;
- MAYBE_SWITCH_TO_ARM_STATE;
- ldc p2, fpa_f0, [r0]; /* 0xed900200 LFM f0,4,[r0,#0] */
- ldc p2, fpa_f4, [r0, #48]; /* 0xed90020c LFM f4,4,[r0,#0x30] */
- RET_LR;
- MAYBE_CODE16;
-}
-
-__asm NORETURNDECL void __ARM_Unwind_VRS_corerestore(void *corep)
-{
- /* By hypothesis this is preserve8 but the load of sp means the
- * assembler can't infer that.
- */
- preserve8;
- MAYBE_SWITCH_TO_ARM_STATE;
-#if OLD_STYLE_INTERWORKING
- mov r14, r0;
- ldmia r14!,{r0-r12};
- ldr r12,[r14, #4*2]; /* pc */
- ldmia r14,{r13-r14};
- bx r12;
-#else
- ldmia r0,{r0-r15};
-#endif
- MAYBE_CODE16;
-}
-
-
-/* ----- Development support ----- */
-
-#ifdef VRS_DIAGNOSTICS
-static void debug_print_vrs_vfp(struct vfp_s *vfpp)
-{
- uint64_t *lp = (uint64_t *)vfpp;
- int c = 0;
- int i;
- for (i = 0; i < 16; i++) {
- printf("D%-2d 0x%16.16llx ", i, *lp);
- lp++;
- if (c++ == 1) {
- c = 0;
- printf("\n");
- }
- }
-}
-
-static void debug_print_vrs_fpa(struct fpa_s *fpap)
-{
- uint32_t *lp = (uint32_t *)fpap;
- int c = 0;
- int i;
- for (i = 0; i < 8; i++) {
- printf("F%-2d 0x%8.8x%8.8x%8.8x ", i, *lp, *(lp+1), *(lp+2));
- lp+=3;
- if (c++ == 1) {
- c = 0;
- printf("\n");
- }
- }
-}
-
-static void debug_print_vrs(_Unwind_Context *context)
-{
- phase1_virtual_register_set *vrsp = (phase1_virtual_register_set *)context;
- int i;
- int c;
- printf("------------------------------------------------------------------------\n");
- c = 0;
- for (i = 0; i < 16; i++) {
- printf("r%-2d 0x%8.8x ", i, vrsp->core.r[i]);
- if (c++ == 3) {
- c = 0;
- printf("\n");
- }
- }
-
- printf("-----\n");
- if (vrsp->demand_save_vfp == 1)
- printf("VFP is not saved\n");
- else
- debug_print_vrs_vfp(&vrsp->vfp);
- printf("-----\n");
- if (vrsp->demand_save_fpa == 1)
- printf("FPA is not saved\n");
- else
- debug_print_vrs_fpa(&vrsp->fpa);
- printf("------------------------------------------------------------------------\n");
-}
-#endif
-
-
-/* ----- Public routines ----- */
-
-_Unwind_VRS_Result _Unwind_VRS_Set(_Unwind_Context *context,
- _Unwind_VRS_RegClass regclass,
- uint32_t regno,
- _Unwind_VRS_DataRepresentation representation,
- void *valuep)
-{
- phase1_virtual_register_set *vrsp = (phase1_virtual_register_set *)context;
- switch (regclass) {
- case _UVRSC_CORE:
- {
- if (representation != _UVRSD_UINT32 || regno > 15)
- return _UVRSR_FAILED;
- vrsp->core.r[regno] = *(uint32_t *)valuep;
- return _UVRSR_OK;
- }
- case _UVRSC_VFP:
- case _UVRSC_FPA:
- case _UVRSC_WMMXD:
- case _UVRSC_WMMXC:
- return _UVRSR_NOT_IMPLEMENTED;
- default:
- break;
- }
- return _UVRSR_FAILED;
-}
-
-
-_Unwind_VRS_Result _Unwind_VRS_Get(_Unwind_Context *context,
- _Unwind_VRS_RegClass regclass,
- uint32_t regno,
- _Unwind_VRS_DataRepresentation representation,
- void *valuep)
-{
- phase1_virtual_register_set *vrsp = (phase1_virtual_register_set *)context;
- switch (regclass) {
- case _UVRSC_CORE:
- {
- if (representation != _UVRSD_UINT32 || regno > 15)
- return _UVRSR_FAILED;
- *(uint32_t *)valuep = vrsp->core.r[regno];
- return _UVRSR_OK;
- }
- case _UVRSC_VFP:
- case _UVRSC_FPA:
- case _UVRSC_WMMXD:
- case _UVRSC_WMMXC:
- return _UVRSR_NOT_IMPLEMENTED;
- default:
- break;
- }
- return _UVRSR_FAILED;
-}
-
-
-#define R_SP 13
-
-_Unwind_VRS_Result _Unwind_VRS_Pop(_Unwind_Context *context,
- _Unwind_VRS_RegClass regclass,
- uint32_t descriminator,
- _Unwind_VRS_DataRepresentation representation)
-{
- phase1_virtual_register_set *vrsp = (phase1_virtual_register_set *)context;
- switch (regclass) {
- case _UVRSC_CORE:
- {
- /* If SP is included in the mask, the loaded value is used in preference to
- * the writeback value, but only on completion of the loading.
- */
- uint32_t mask, *vsp, *rp, sp_loaded;
- if (representation != _UVRSD_UINT32)
- return _UVRSR_FAILED;
- vsp = (uint32_t *)vrsp->core.r[R_SP];
- rp = (uint32_t *)&vrsp->core;
- mask = descriminator & 0xffff;
- sp_loaded = mask & (1 << R_SP);
- while (mask != 0) {
- if (mask & 1) {
-#ifdef VRS_DIAGNOSTICS
- printf("VRS Pop r%d\n", rp - &vrsp->core.r[0]);
-#endif
- *rp = *vsp++;
- }
- rp++;
- mask >>= 1;
- }
- if (!sp_loaded)
- vrsp->core.r[R_SP] = (uint32_t)vsp;
- return _UVRSR_OK;
- }
- case _UVRSC_VFP:
- {
- uint32_t start = descriminator >> 16;
- uint32_t count = descriminator & 0xffff;
- if (representation != _UVRSD_VFPX || start + count > 16)
- return _UVRSR_FAILED;
- if (vrsp->demand_save_vfp == 1) { /* Demand-save over phase 1 */
- vrsp->demand_save_vfp = 0;
- __ARM_Unwind_VRS_VFPpreserve(&vrsp->vfp);
- }
- /* Now recover from the stack into the real machine registers.
- * Note we assume FSTMX standard format 1.
- * Do this by saving the current VFP registers to a memory area,
- * moving the in-memory values over that area, and
- * restoring from the whole area.
- */
- {
- struct vfp_s temp_vfp;
- uint64_t *vsp;
- __ARM_Unwind_VRS_VFPpreserve(&temp_vfp);
- vsp = (uint64_t *)vrsp->core.r[R_SP];
- while (count--) {
-#ifdef VRS_DIAGNOSTICS
- printf("VRS Pop D%d = 0x%llx\n", start, *vsp);
-#endif
- temp_vfp.vfp[start++] = *vsp++;
- }
- vrsp->core.r[R_SP] = (uint32_t)((uint32_t *)vsp + 1); /* +1 to skip the format word */
- __ARM_Unwind_VRS_VFPrestore(&temp_vfp);
- }
- return _UVRSR_OK;
- }
- case _UVRSC_FPA:
- {
- uint32_t start = descriminator >> 16;
- uint32_t count = descriminator & 0xffff;
- if (representation != _UVRSD_FPAX || start > 7 || count > 4)
- return _UVRSR_FAILED;
- if (vrsp->demand_save_fpa == 1) { /* Demand-save over phase 1 */
- vrsp->demand_save_fpa = 0;
- __ARM_Unwind_VRS_FPApreserve(&vrsp->fpa);
- }
- /* Now recover from the stack into the real machine registers.
- * Do this by saving the current FPA registers to a memory area,
- * moving the in-memory values over that area, and
- * restoring from the whole area.
- * Unlike VFP, here the range is allowed to wrap round.
- */
- {
- struct fpa_s temp_fpa;
- struct fpa_reg *vsp;
- __ARM_Unwind_VRS_FPApreserve(&temp_fpa);
- vsp = (struct fpa_reg *)vrsp->core.r[R_SP];
- while (count--) {
-#ifdef VRS_DIAGNOSTICS
- printf("VRS Pop F%d = 0x%-8.8x%-8.8x%-8.8x\n", start, *(uint32_t *)vsp,
- *((uint32_t *)vsp + 1), *((uint32_t *)vsp + 2));
-#endif
- temp_fpa.fpa[start++] = *vsp++;
- start &= 7;
- }
- vrsp->core.r[R_SP] = (uint32_t)vsp;
- __ARM_Unwind_VRS_FPArestore(&temp_fpa);
- }
- return _UVRSR_OK;
- }
- case _UVRSC_WMMXD:
- case _UVRSC_WMMXC:
- return _UVRSR_NOT_IMPLEMENTED;
- default:
- break;
- }
- return _UVRSR_FAILED;
-}
-
-
-
-/* ========================= ========================= */
-/* ========================= The unwinder ========================= */
-/* ========================= ========================= */
-
-
-/* This implementation uses the UCB unwinder_cache as follows:
- * reserved1 is documented in the EABI as requiring initialisation to 0.
- * It is used to manage nested simultaneous propagation. If the value is 0,
- * the UCB is participating in no propagations. If the value is 1, the UCB
- * is participating in one propagation. Otherwise the value is a pointer to
- * a structure holding saved UCB state from the next propagation out.
- * The structure used is simply a mallocated UCB.
- * reserved2 is used to preserve the call-site address over calls to a
- * personality routine and cleanup.
- * reserved3 is used to cache the PR address.
- * reserved4 is not used.
- * reserved5 is not used.
- */
-
-#define NESTED_CONTEXT unwinder_cache.reserved1
-#define SAVED_CALLSITE_ADDR unwinder_cache.reserved2
-#define PR_ADDR unwinder_cache.reserved3
-
-/* Index table entry: */
-
-typedef struct __EIT_entry {
- uint32_t fnoffset; /* Relative to base of execution region */
- uint32_t content;
-} __EIT_entry;
-
-
-/* Private defines etc: */
-
-static const uint32_t EXIDX_CANTUNWIND = 1;
-static const uint32_t uint32_highbit = 0x80000000;
-
-/* ARM C++ personality routines: */
-
-typedef _Unwind_Reason_Code (*personality_routine)(_Unwind_State,
- _Unwind_Control_Block *,
- _Unwind_Context *);
-
-WEAKDECL _Unwind_Reason_Code __aeabi_unwind_cpp_pr0(_Unwind_State state, _Unwind_Control_Block *,
- _Unwind_Context *context);
-WEAKDECL _Unwind_Reason_Code __aeabi_unwind_cpp_pr1(_Unwind_State state, _Unwind_Control_Block *,
- _Unwind_Context *context);
-WEAKDECL _Unwind_Reason_Code __aeabi_unwind_cpp_pr2(_Unwind_State state, _Unwind_Control_Block *,
- _Unwind_Context *context);
-
-
-/* Various image symbols: */
-
-struct ExceptionTableInfo {
- uint32_t EIT_base;
- uint32_t EIT_limit;
-};
-/* We define __ARM_ETInfo to allow access to some linker-generated
- names that are not legal C identifiers. __ARM_ETInfo is extern only
- because of scope limitations of the embedded assembler */
-extern const struct ExceptionTableInfo __ARM_ETInfo;
-#define EIT_base \
- ((const __EIT_entry *)(__ARM_ETInfo.EIT_base + (const char *)&__ARM_ETInfo))
-#define EIT_limit \
- ((const __EIT_entry *)(__ARM_ETInfo.EIT_limit + (const char *)&__ARM_ETInfo))
-
-
-/* ----- Address manipulation: ----- */
-
-/* The following helper function is never called and is present simply
- * for ease of packaging. The constant word within is used by
- * ER_RO_offset_to_addr to compute the RO segment base.
- * The zero word named W is relocated relative to the base B of the
- * segment which includes it, hence B is recoverable at runtime by
- * computing &W - W.
- */
-
-extern const uint32_t __ARM_unwind_ROSegBase_SelfOffset;
-
-__asm void __ARM_unwind_basehelper(void)
-{
- export __ARM_unwind_ROSegBase_SelfOffset;
-R_ARM_ROSEGREL32 EQU 39
-__ARM_unwind_ROSegBase_SelfOffset;
- dcd 0;
- __RELOC R_ARM_ROSEGREL32,__ARM_unwind_ROSegBase_SelfOffset;
-}
-
-#define ER_RO_SegBase ((uint32_t)&__ARM_unwind_ROSegBase_SelfOffset - \
- __ARM_unwind_ROSegBase_SelfOffset)
-
-/* And now functions used to convert between segment-relative offsets
- * and absolute addresses.
- */
-
-static __inline uint32_t addr_to_ER_RO_offset(uint32_t addr)
-{
- return addr - ER_RO_SegBase;
-}
-
-static __inline uint32_t ER_RO_offset_to_addr(uint32_t offset)
-{
- extern const uint32_t __ARM_unwind_ROSegBase_SelfOffset;
- return offset + ER_RO_SegBase;
-}
-
-
-/* ----- Index table processing ----- */
-
-/* find_and_expand_eit_entry is a support function used in both phases to set
- * ucb.pr_cache and internal cache.
- * Call with a pointer to the ucb and the return address to look up.
- *
- * The table is contained in the half-open interval
- * [EIT_base, EIT_limit) and is an ordered array of __EIT_entrys.
- * Perform a binary search via C library routine bsearch.
- * The table contains only function start addresses (encoded as offsets), so
- * we need to special-case the end table entry in the comparison function,
- * which we do by assuming the function it describes extends to end of memory.
- * This causes us problems indirectly in that we would like to fault as
- * many attempts as possible to look up an invalid return address. There are
- * several ways an invalid return address can be obtained from a broken
- * program, such as someone corrupting the stack or broken unwind instructions
- * recovered the wrong value. It is plausible that many bad return addresses
- * will be either small integers or will point into the heap or stack, hence
- * it's desirable to get the length of that final function roughly right.
- * Here we make no attempt to do it. Code exclusively for use in toolchains
- * which define a suitable limit symbol could make use of that symbol.
- * Alternatively (QoI) a smart linker could augment the index table with a
- * dummy EXIDX_CANTUNWIND entry pointing just past the last real function.
- */
-
-static int EIT_comparator(const void *ck, const void *ce)
-{
- uint32_t return_address_offset = *(const uint32_t *)ck;
- const __EIT_entry *eitp = (const __EIT_entry *)ce;
- const __EIT_entry *next_eitp = eitp + 1;
- uint32_t next_fn;
- if (next_eitp != EIT_limit)
- next_fn = next_eitp->fnoffset;
- else
- next_fn = addr_to_ER_RO_offset(0); /* address 0 is 'just past' the end of memory */
- if (return_address_offset < eitp->fnoffset) return -1;
- if (return_address_offset >= next_fn) return 1;
- return 0;
-}
-
-
-static _Unwind_Reason_Code find_and_expand_eit_entry(_Unwind_Control_Block *ucbp,
- uint32_t return_address)
-{
- /* Search the index table for an entry containing the specified return
- * address. The EIT contains function offsets relative to the base of the
- * execute region so adjust the return address accordingly.
- */
-
- uint32_t return_address_offset = addr_to_ER_RO_offset(return_address);
- const __EIT_entry *base = EIT_base;
- size_t nelems = EIT_limit - EIT_base;
-
- const __EIT_entry *eitp =
- (const __EIT_entry *) bsearch(&return_address_offset, base, nelems,
- sizeof(__EIT_entry), EIT_comparator);
-
- if (eitp == NULL) {
- /* The return address we have was not found in the EIT.
- * This breaks the scan and we have to indicate failure.
- */
- ucbp->PR_ADDR = NULL;
- DEBUGGER_BOTTLENECK(ucbp, _UASUBSYS_UNWINDER, _UAACT_ENDING, _UAARG_ENDING_UNWINDER_LOOKUPFAILED);
- return _URC_FAILURE;
- }
-
- /* Cache the function offset */
-
- ucbp->pr_cache.fnstart = ER_RO_offset_to_addr(eitp->fnoffset);
-
- /* Can this frame be unwound at all? */
-
- if (eitp->content == EXIDX_CANTUNWIND) {
- ucbp->PR_ADDR = NULL;
- DEBUGGER_BOTTLENECK(ucbp, _UASUBSYS_UNWINDER, _UAACT_ENDING, _UAARG_ENDING_NOUNWIND);
- return _URC_FAILURE;
- }
-
- /* Obtain the address of the "real" __EHT_Header word */
-
- if (eitp->content & uint32_highbit) {
- /* It is immediate data */
- ucbp->pr_cache.ehtp = (_Unwind_EHT_Header *)&eitp->content;
- ucbp->pr_cache.additional = 1;
- } else {
- /* The content field is a segment relative offset to an _Unwind_EHT_Entry structure */
- ucbp->pr_cache.ehtp = (_Unwind_EHT_Header *)ER_RO_offset_to_addr(eitp->content);
- ucbp->pr_cache.additional = 0;
- }
-
- /* Discover the personality routine address */
-
- if (*(uint32_t *)(ucbp->pr_cache.ehtp) & uint32_highbit) {
- /* It is immediate data - compute matching pr */
- uint32_t idx = ((*(uint32_t *)(ucbp->pr_cache.ehtp)) >> 24) & 0xf;
- if (idx == 0) ucbp->PR_ADDR = (uint32_t)&__aeabi_unwind_cpp_pr0;
- else if (idx == 1) ucbp->PR_ADDR = (uint32_t)&__aeabi_unwind_cpp_pr1;
- else if (idx == 2) ucbp->PR_ADDR = (uint32_t)&__aeabi_unwind_cpp_pr2;
- else { /* Failed */
- ucbp->PR_ADDR = NULL;
- DEBUGGER_BOTTLENECK(ucbp, _UASUBSYS_UNWINDER, _UAACT_ENDING, _UAARG_ENDING_TABLECORRUPT);
- return _URC_FAILURE;
- }
- } else {
- /* Execute region offset to PR */
- ucbp->PR_ADDR = ER_RO_offset_to_addr(*(uint32_t *)(ucbp->pr_cache.ehtp));
- }
- return _URC_OK;
-}
-
-
-
-
-/* ----- Unwinding: ----- */
-
-/* Fwd decl */
-static NORETURNDECL void unwind_next_frame(_Unwind_Control_Block *ucbp, phase2_virtual_register_set *vrsp);
-
-/* Helper fn: If the demand_save flag in a phase1_virtual_register_set was
- * zeroed, the registers were demand-saved. This function restores from
- * the save area.
-*/
-static void restore_non_core_regs(phase1_virtual_register_set *vrsp)
-{
- if (vrsp->demand_save_vfp == 0)
- __ARM_Unwind_VRS_VFPrestore(&vrsp->vfp);
- if (vrsp->demand_save_fpa == 0)
- __ARM_Unwind_VRS_FPArestore(&vrsp->fpa);
-}
-
-/* _Unwind_RaiseException is the external entry point to begin unwinding */
-
-__asm _Unwind_Reason_Code _Unwind_RaiseException(_Unwind_Control_Block *ucbp)
-{
- extern __ARM_Unwind_RaiseException;
-
- MAYBE_SWITCH_TO_ARM_STATE;
-
- /* Create a phase2_virtual_register_set on the stack */
- /* Save the core registers, carefully writing the original sp value */
- stmfd sp!,{r13-r15}; /* pushed 3 words => 3 words */
- stmfd sp!,{r0-r12}; /* pushed 13 words => 16 words */
- /* Write zeroes for the demand_save bytes so no saving occurs in phase 2 */
- mov r1,#0;
- str r1,[sp,#-4]!; /* pushed 1 word => 17 words */
- mov r1,sp;
- sub sp,sp,#4; /* preserve 8 byte alignment => 18 words */
-
- /* Now pass to C (with r0 still valid) to do the real work.
- * r0 = ucbp, r1 = phase2_virtual_register_set.
- * If we get control back, pop the stack and return preserving r0.
- */
-
-#if OLD_STYLE_INTERWORKING
- ldr r2,Unwind_RaiseException_Offset;
- add r2,r2,pc;
- mov lr,pc;
-Offset_Base
- bx r2;
-#else
- /* on arch 5T and later the linker will fix 'bl' => 'blx' as
- needed */
- bl __ARM_Unwind_RaiseException;
-#endif
- ldr r14,[sp,#16*4];
- add sp,sp,#18*4;
- RET_LR;
-#if OLD_STYLE_INTERWORKING
-Unwind_RaiseException_Offset dcd __ARM_Unwind_RaiseException - Offset_Base;
-#endif
- MAYBE_CODE16;
-
- /* Alternate symbol names for difficult symbols.
- * It is possible no functions included in the image require
- * a handler table. Therefore make only a weak reference to
- * the handler table base symbol, which may be absent.
- */
- extern |.ARM.exidx$$Base|;
- extern |.ARM.exidx$$Limit|;
- extern |.ARM.extab$$Base| WEAKASMDECL;
- export __ARM_ETInfo;
- /* these are offsets for /ropi */
-__ARM_ETInfo /* layout must match struct ExceptionTableInfo */
-eit_base dcd |.ARM.exidx$$Base| - __ARM_ETInfo; /* index table base */
-eit_limit dcd |.ARM.exidx$$Limit| - __ARM_ETInfo; /* index table limit */
-}
-
-
-/* __ARM_Unwind_RaiseException performs phase 1 unwinding */
-
-_Unwind_Reason_Code __ARM_Unwind_RaiseException(_Unwind_Control_Block *ucbp,
- phase2_virtual_register_set *entry_VRSp)
-{
- phase1_virtual_register_set phase1_VRS;
-
- /* Is this a nested simultaneous propagation?
- * (see comments with _Unwind_Complete)
- */
- if (ucbp->NESTED_CONTEXT == 0) {
- /* No - this is only propagation */
- ucbp->NESTED_CONTEXT = 1;
- } else {
- /* Yes - cache the state elsewhere and restore it when the propagation ends */
- /* This representation wastes space and uses malloc; do better?
- * On the other hand will it ever be used in practice?
- */
- _Unwind_Control_Block *saved_ucbp =
- (_Unwind_Control_Block *)malloc(sizeof(_Unwind_Control_Block));
- if (ucbp == NULL) {
- DEBUGGER_BOTTLENECK(ucbp, _UASUBSYS_UNWINDER, _UAACT_ENDING, _UAARG_ENDING_UNWINDER_BUFFERFAILED);
- return _URC_FAILURE;
- }
- saved_ucbp->unwinder_cache = ucbp->unwinder_cache;
- saved_ucbp->barrier_cache = ucbp->barrier_cache;
- saved_ucbp->cleanup_cache = ucbp->cleanup_cache;
- ucbp->NESTED_CONTEXT = (uint32_t)saved_ucbp;
- }
-
- /* entry_VRSp contains the core registers as they were when
- * _Unwind_RaiseException was called. Copy the call-site address to r15
- * then copy all the registers to phase1_VRS for the phase 1 stack scan.
- */
-
- entry_VRSp->core.r[15] = entry_VRSp->core.r[14];
- phase1_VRS.core = entry_VRSp->core;
-
- /* For phase 1 only ensure non-core registers are saved before use.
- * If WMMX registers are supported, initialise their flags here and
- * take appropriate action elsewhere.
- */
-
- phase1_VRS.demand_save_vfp = 1;
- phase1_VRS.demand_save_fpa = 1;
-
- /* Now perform a virtual unwind until a propagation barrier is met, or
- * until something goes wrong. If something does go wrong, we ought (I
- * suppose) to restore registers we may have destroyed.
- */
-
- while (1) {
-
- _Unwind_Reason_Code pr_result;
-
- /* Search the index table for the required entry. Cache the index table
- * pointer, and obtain and cache the addresses of the "real" __EHT_Header
- * word and the personality routine.
- */
-
- if (find_and_expand_eit_entry(ucbp, phase1_VRS.core.r[15]) != _URC_OK) {
- restore_non_core_regs(&phase1_VRS);
- /* Debugger bottleneck fn called during lookup */
- return _URC_FAILURE;
- }
-
- /* Call the pr to decide what to do */
-
- pr_result = ((personality_routine)ucbp->PR_ADDR)(_US_VIRTUAL_UNWIND_FRAME,
- ucbp,
- (_Unwind_Context *)&phase1_VRS);
-
- if (pr_result == _URC_HANDLER_FOUND) break;
- if (pr_result == _URC_CONTINUE_UNWIND) continue;
-
- /* If we get here some sort of failure has occurred in the
- * pr and probably the pr returned _URC_FAILURE
- */
- restore_non_core_regs(&phase1_VRS);
- return _URC_FAILURE;
- }
-
- /* Propagation barrier located... restore entry register state of non-core regs */
-
- restore_non_core_regs(&phase1_VRS);
-
- /* Initiate real unwinding */
- unwind_next_frame(ucbp, entry_VRSp);
- /* Unreached, but keep compiler quiet: */
- return _URC_FAILURE;
-}
-
-
-/* unwind_next_frame performs phase 2 unwinding */
-
-static NORETURNDECL void unwind_next_frame(_Unwind_Control_Block *ucbp, phase2_virtual_register_set *vrsp)
-{
- while (1) {
-
- _Unwind_Reason_Code pr_result;
-
- /* Search the index table for the required entry. Cache the index table
- * pointer, and obtain and cache the addresses of the "real" __EHT_Header
- * word and the personality routine.
- */
-
- if (find_and_expand_eit_entry(ucbp, vrsp->core.r[15]) != _URC_OK)
- abort();
-
- /* Save the call-site address and call the pr to do whatever it
- * wants to do on this new frame.
- */
-
- ucbp->SAVED_CALLSITE_ADDR = vrsp->core.r[15];
- pr_result = ((personality_routine)ucbp->PR_ADDR)(_US_UNWIND_FRAME_STARTING, ucbp,
- (_Unwind_Context *)vrsp);
-
- if (pr_result == _URC_INSTALL_CONTEXT) {
- /* Upload the registers */
- __ARM_Unwind_VRS_corerestore(&vrsp->core);
- } else if (pr_result == _URC_CONTINUE_UNWIND)
- continue;
- else
- abort();
- }
-}
-
-
-/* _Unwind_Resume is the external entry point called after a cleanup
- * to resume unwinding. It tail-calls a helper function,
- * __ARM_Unwind_Resume, which never returns.
- */
-__asm NORETURNDECL void _Unwind_Resume(_Unwind_Control_Block *ucbp)
-{
- extern __ARM_Unwind_Resume;
-
- MAYBE_SWITCH_TO_ARM_STATE;
-
- /* Create a phase2_virtual_register_set on the stack */
- /* Save the core registers, carefully writing the original sp value */
-
- stmfd sp!,{r13-r15}; /* pushed 3 words => 3 words */
- stmfd sp!,{r0-r12}; /* pushed 13 words => 16 words */
- /* Write zeroes for the demand_save bytes so no saving occurs in phase 2 */
- mov r1,#0;
- str r1,[sp,#-4]!; /* pushed 1 word => 17 words */
- mov r1,sp;
- sub sp,sp,#4; /* preserve 8 byte alignment => 18 words */
-
- /* Now pass to C (with r0 still valid) to do the real work.
- * r0 = ucbp, r1 = phase2_virtual_register_set.
- * This call never returns.
- */
-
-#ifdef __APCS_INTERWORK
- ldr r2,Unwind_Resume_Offset;
- add r2,r2,pc;
- bx r2;
-Unwind_Resume_Offset dcd __ARM_Unwind_Resume - .;
-#else
- b __ARM_Unwind_Resume;
-#endif
- MAYBE_CODE16;
-}
-
-
-/* Helper function for _Unwind_Resume */
-
-NORETURNDECL void __ARM_Unwind_Resume(_Unwind_Control_Block *ucbp,
- phase2_virtual_register_set *entry_VRSp)
-{
- _Unwind_Reason_Code pr_result;
-
- /* Recover saved state */
-
- entry_VRSp->core.r[15] = ucbp->SAVED_CALLSITE_ADDR;
-
- /* Call the cached PR and dispatch */
-
- pr_result = ((personality_routine)ucbp->PR_ADDR)(_US_UNWIND_FRAME_RESUME, ucbp,
- (_Unwind_Context *)entry_VRSp);
-
- if (pr_result == _URC_INSTALL_CONTEXT) {
- /* Upload the registers */
- __ARM_Unwind_VRS_corerestore(&entry_VRSp->core);
- } else if (pr_result == _URC_CONTINUE_UNWIND)
- unwind_next_frame(ucbp, entry_VRSp);
- else
- abort();
-}
-
-
-/* _Unwind_Complete is called at the end of a propagation.
- * If we support multiple simultaneous propagations, restore the cached state
- * of the previous propagation here.
- */
-
-void _Unwind_Complete(_Unwind_Control_Block *ucbp)
-{
- _Unwind_Control_Block *context = (_Unwind_Control_Block *)ucbp->NESTED_CONTEXT;
- if ((uint32_t)context == 0) abort(); /* should be impossible */
- if ((uint32_t)context == 1) {
- /* This was the only ongoing propagation of this object */
- ucbp->NESTED_CONTEXT--;
- return;
- }
- /* Otherwise we copy the state back from the cache structure pointed to
- * by ucbp->NESTED_CONTEXT.
- */
- /* This first one updates ucbp->NESTED_CONTEXT */
- ucbp->unwinder_cache = context->unwinder_cache;
- ucbp->barrier_cache = context->barrier_cache;
- ucbp->cleanup_cache = context->cleanup_cache;
- free(context);
-}
-
-#endif /* unwinder_c */
-#ifdef unwind_activity_c
-
-/* Runtime debug "bottleneck function": */
-/* (not in the current Exceptions EABI document) */
-
-void _Unwind_Activity(_Unwind_Control_Block *ucbp, uint32_t reason, uint32_t arg)
-{
-#ifdef UNWIND_ACTIVITY_DIAGNOSTICS
- uint32_t who = reason >> 24;
- uint32_t activity = reason & 0xffffff;
- printf("_Unwind_Activity: UCB=0x%8.8x Reason=(", (uint32_t)ucbp);
- switch (who) {
- case _UASUBSYS_UNWINDER:
- printf("unw,");
- if (activity >= 0x80)
- printf("%x) Arg=0x%8.8x\n", activity, arg);
- break;
- case _UASUBSYS_CPP:
- printf("C++,");
- if (activity >= 0x80) {
- if (activity == _UAACT_CPP_TYPEINFO)
- printf("typeinfo) Typeinfo=0x%8.8x\n", arg);
- else
- printf("%x) Arg=0x%8.8x\n", activity, arg);
- }
- break;
- default:
- printf("???,");
- if (activity >= 0x80)
- printf("%x) Arg=0x%8.8x\n", activity, arg);
- break;
- }
- if (activity < 0x80) {
- switch (activity) {
- case _UAACT_STARTING:
- printf("starting) Typeinfo=0x%8.8x\n", arg);
- break;
- case _UAACT_ENDING:
- printf("ending) Cause=%d\n", arg);
- break;
- case _UAACT_BARRIERFOUND:
- printf("barrierfound) Pad=0x%8.8x\n", arg);
- break;
- case _UAACT_PADENTRY:
- printf("padentry) Pad=0x%8.8x\n", arg);
- break;
- default:
- printf("%x) Arg=0x%8.8x\n", activity, arg);
- break;
- }
- }
-#endif
-}
-
-#endif /* unwind_activity_c */
--- a/kernel/eka/compsupp/rvct2_1/aehabi/unwinder.h Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,141 +0,0 @@
-/* unwinder.h
- *
- * Copyright 2002-2003 ARM Limited.
- */
-/*
- Licence
-
- 1. Subject to the provisions of clause 2, ARM hereby grants to LICENSEE a
- perpetual, non-exclusive, nontransferable, royalty free, worldwide licence
- to use this Example Implementation of Exception Handling solely for the
- purpose of developing, having developed, manufacturing, having
- manufactured, offering to sell, selling, supplying or otherwise
- distributing products which comply with the Exception Handling ABI for the
- ARM Architecture specification. All other rights are reserved to ARM or its
- licensors.
-
- 2. THIS EXAMPLE IMPLEMENTATION OF EXCEPTION HANDLING IS PROVIDED "AS IS"
- WITH NO WARRANTIES EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT LIMITED
- TO ANY WARRANTY OF SATISFACTORY QUALITY, MERCHANTABILITY, NONINFRINGEMENT
- OR FITNESS FOR A PARTICULAR PURPOSE.
-*/
-/*
- * RCS $Revision: 1.7 $
- * Checkin $Date: 2003/09/01 12:45:25 $
- * Revising $Author: achapman $
- */
-
-/* Language-independent unwinder header public defines */
-
-#ifndef UNWINDER_H
-#define UNWINDER_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
- typedef enum {
- _URC_OK = 0, /* operation completed successfully */
- _URC_FOREIGN_EXCEPTION_CAUGHT = 1,
- _URC_HANDLER_FOUND = 6,
- _URC_INSTALL_CONTEXT = 7,
- _URC_CONTINUE_UNWIND = 8,
- _URC_FAILURE = 9 /* unspecified failure of some kind */
- } _Unwind_Reason_Code;
-
- typedef enum {
- _US_VIRTUAL_UNWIND_FRAME = 0,
- _US_UNWIND_FRAME_STARTING = 1,
- _US_UNWIND_FRAME_RESUME = 2
- } _Unwind_State;
-
- typedef struct _Unwind_Control_Block _Unwind_Control_Block;
- typedef struct _Unwind_Context _Unwind_Context;
- typedef uint32_t _Unwind_EHT_Header;
-
-
- /* UCB: */
-
- struct _Unwind_Control_Block {
- char exception_class[8];
- void (*exception_cleanup)(_Unwind_Reason_Code, _Unwind_Control_Block *);
- /* Unwinder cache, private fields for the unwinder's use */
- struct {
- uint32_t reserved1; /* init reserved1 to 0, then don't touch */
- uint32_t reserved2;
- uint32_t reserved3;
- uint32_t reserved4;
- uint32_t reserved5;
- } unwinder_cache;
- /* Propagation barrier cache (valid after phase 1): */
- struct {
- uint32_t sp;
- uint32_t bitpattern[5];
- } barrier_cache;
- /* Cleanup cache (preserved over cleanup): */
- struct {
- uint32_t bitpattern[4];
- } cleanup_cache;
- /* Pr cache (for pr's benefit): */
- struct {
- uint32_t fnstart; /* function start address */
- _Unwind_EHT_Header *ehtp; /* pointer to EHT entry header word */
- uint32_t additional; /* additional data */
- uint32_t reserved1;
- } pr_cache;
- long long int :0; /* Force alignment of next item to 8-byte boundary */
- };
-
- /* Interface functions: */
-
- _Unwind_Reason_Code _Unwind_RaiseException(_Unwind_Control_Block *ucbp);
- NORETURNDECL void _Unwind_Resume(_Unwind_Control_Block *ucbp);
- void _Unwind_Complete(_Unwind_Control_Block *ucbp);
-
- /* Virtual Register Set*/
-
- typedef enum {
- _UVRSC_CORE = 0, /* integer register */
- _UVRSC_VFP = 1, /* vfp */
- _UVRSC_FPA = 2, /* fpa */
- _UVRSC_WMMXD = 3, /* Intel WMMX data register */
- _UVRSC_WMMXC = 4 /* Intel WMMX control register */
- } _Unwind_VRS_RegClass;
-
- typedef enum {
- _UVRSD_UINT32 = 0,
- _UVRSD_VFPX = 1,
- _UVRSD_FPAX = 2,
- _UVRSD_UINT64 = 3,
- _UVRSD_FLOAT = 4,
- _UVRSD_DOUBLE = 5
- } _Unwind_VRS_DataRepresentation;
-
- typedef enum {
- _UVRSR_OK = 0,
- _UVRSR_NOT_IMPLEMENTED = 1,
- _UVRSR_FAILED = 2
- } _Unwind_VRS_Result;
-
- _Unwind_VRS_Result _Unwind_VRS_Set(_Unwind_Context *context,
- _Unwind_VRS_RegClass regclass,
- uint32_t regno,
- _Unwind_VRS_DataRepresentation representation,
- void *valuep);
-
- _Unwind_VRS_Result _Unwind_VRS_Get(_Unwind_Context *context,
- _Unwind_VRS_RegClass regclass,
- uint32_t regno,
- _Unwind_VRS_DataRepresentation representation,
- void *valuep);
-
- _Unwind_VRS_Result _Unwind_VRS_Pop(_Unwind_Context *context,
- _Unwind_VRS_RegClass regclass,
- uint32_t descriminator,
- _Unwind_VRS_DataRepresentation representation);
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /* defined UNWINDER_H */
--- a/kernel/eka/compsupp/rvct2_1/callviar0.cpp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-
-extern "C"
-{
-__asm void __call_via_r0()
- {
- CODE32
- BX r0
- }
-}
--- a/kernel/eka/compsupp/rvct2_1/callviar1.cpp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-
-extern "C"
-{
-__asm void __call_via_r1()
- {
- CODE32
- BX r1
- }
-}
--- a/kernel/eka/compsupp/rvct2_1/callviar2.cpp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-
-extern "C"
-{
-__asm void __call_via_r2()
- {
- CODE32
- BX r2
- }
-}
--- a/kernel/eka/compsupp/rvct2_1/callviar3.cpp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-
-extern "C"
-{
-__asm void __call_via_r3()
- {
- CODE32
- BX r3
- }
-}
--- a/kernel/eka/compsupp/rvct2_1/callviar4.cpp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-
-extern "C"
-{
-__asm void __call_via_r4()
- {
- CODE32
- BX r4
- }
-}
--- a/kernel/eka/compsupp/rvct2_1/callviar5.cpp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-
-extern "C"
-{
-__asm void __call_via_r5()
- {
- CODE32
- BX r5
- }
-}
--- a/kernel/eka/compsupp/rvct2_1/callviar6.cpp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-
-extern "C"
-{
-__asm void __call_via_r6()
- {
- CODE32
- BX r6
- }
-}
--- a/kernel/eka/compsupp/rvct2_1/callviar7.cpp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-
-extern "C"
-{
-__asm void __call_via_r7()
- {
- CODE32
- BX r7
- }
-}
--- a/kernel/eka/compsupp/rvct2_1/cppinit.h Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +0,0 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-
-/**
- @file
- @internalComponent
-*/
-
-#ifndef _CPPINIT_H_
-#define _CPPINIT_H_
-extern "C" {
-
-// Doing it like this means no space is taken by the symbols
-#define NUKE_SYMBOL(sig) __asm void sig {}
-typedef void (*PFV)();
-typedef void (DTOR)(void *);
-#define RELOCATE(loc, type) (type)((int)loc + (int)*loc)
-
-typedef struct dtd
-{
-// dtd * prev;
- void * obj;
- DTOR * dtor;
-} dtd;
-
-//extern void run_static_ctors (void);
-extern void run_static_dtors (void);
-
-}
-
-#endif
--- a/kernel/eka/compsupp/rvct2_1/dfpaeabi.cpp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,96 +0,0 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// This function is simple a way to get these EXPORT statements into
-// the .in file. These symbols will therefore be referenced from
-// the export table and so **forced** into the DLL
-//
-//
-
-__asm void __rt_exporter_dummy(void)
-{
- AREA |.directive|, READONLY, NOALLOC
-
- PRESERVE8
-
- DCB "#<SYMEDIT>#\n"
-
-/// Standard double precision floating-point arithmetic helper functions
-
- DCB "EXPORT __aeabi_dadd\n"
- DCB "EXPORT __aeabi_ddiv\n"
- DCB "EXPORT __aeabi_dmul\n"
- DCB "EXPORT __aeabi_dneg\n"
- DCB "EXPORT __aeabi_drsub\n"
- DCB "EXPORT __aeabi_dsub\n"
-
-/// Standard double precision floating-point comparison helper functions
-
- DCB "EXPORT __aeabi_cdcmpeq\n"
- DCB "EXPORT __aeabi_cdcmple\n"
- DCB "EXPORT __aeabi_cdrcmple\n"
- DCB "EXPORT __aeabi_dcmpeq\n"
- DCB "EXPORT __aeabi_dcmplt\n"
- DCB "EXPORT __aeabi_dcmple\n"
- DCB "EXPORT __aeabi_dcmpge\n"
- DCB "EXPORT __aeabi_dcmpgt\n"
- DCB "EXPORT __aeabi_dcmpun\n"
-
-/// Standard single precision floating-point arithmetic helper functions
-
- DCB "EXPORT __aeabi_fadd\n"
- DCB "EXPORT __aeabi_fdiv\n"
- DCB "EXPORT __aeabi_fmul\n"
- DCB "EXPORT __aeabi_fneg\n"
- DCB "EXPORT __aeabi_frsub\n"
- DCB "EXPORT __aeabi_fsub\n"
-
-/// Standard single precision floating-point comparison helper functions
-
- DCB "EXPORT __aeabi_cfcmpeq\n"
- DCB "EXPORT __aeabi_cfcmple\n"
- DCB "EXPORT __aeabi_cfrcmple\n"
- DCB "EXPORT __aeabi_fcmpeq\n"
- DCB "EXPORT __aeabi_fcmplt\n"
- DCB "EXPORT __aeabi_fcmple\n"
- DCB "EXPORT __aeabi_fcmpge\n"
- DCB "EXPORT __aeabi_fcmpgt\n"
- DCB "EXPORT __aeabi_fcmpun\n"
-
-/// Standard floating-point to integer conversions
-
- DCB "EXPORT __aeabi_d2iz\n"
- DCB "EXPORT __aeabi_d2uiz\n"
- DCB "EXPORT __aeabi_d2lz\n"
- DCB "EXPORT __aeabi_d2ulz\n"
- DCB "EXPORT __aeabi_f2iz\n"
- DCB "EXPORT __aeabi_f2uiz\n"
- DCB "EXPORT __aeabi_f2lz\n"
- DCB "EXPORT __aeabi_f2ulz\n"
-
-/// Standard conversions between floating types
-
- DCB "EXPORT __aeabi_d2f\n"
- DCB "EXPORT __aeabi_f2d\n"
-
-/// Standard integer to floating-point conversions
-
- DCB "EXPORT __aeabi_i2d\n"
- DCB "EXPORT __aeabi_ui2d\n"
- DCB "EXPORT __aeabi_l2d\n"
- DCB "EXPORT __aeabi_ul2d\n"
- DCB "EXPORT __aeabi_i2f\n"
- DCB "EXPORT __aeabi_ui2f\n"
- DCB "EXPORT __aeabi_l2f\n"
- DCB "EXPORT __aeabi_ul2f\n"
-}
--- a/kernel/eka/compsupp/rvct2_1/dfpaeabi.mmp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-
-TARGET dfpaeabi.dll
-
-TARGETTYPE dll
-
-SOURCEPATH .
-SOURCE dfpaeabi.cpp
-// dummy for now, needs to go away
-//SOURCE rte32dll.cpp
-
-START ARMCC
-//ARMRT - would like to be able to say this but there circularity with EUSER (argghhh!!!)
-ARMINC
-// we want the 'pure' versions to go with softvfp
-#ifdef MARM_ARMV5
-ARMLIBS f_t_p.l c_t__un.l
-#else
-ARMLIBS f_a_p.l c_a__un.l
-#endif
-END
-
-capability all
-
-VENDORID 0x70000001
-
-unpagedcode
-
-SMPSAFE
--- a/kernel/eka/compsupp/rvct2_1/dfprvct2_1-thunk.cpp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,70 +0,0 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// Thunks for RVCT synonyms for AEABI functions
-//
-//
-
-extern "C" double __aeabi_l2d(long long val);
-extern "C" double __aeabi_ul2d(unsigned long long val);
-extern "C" long long __aeabi_d2lz(double val);
-extern "C" unsigned long long __aeabi_d2ulz(double val);
-extern "C" float __aeabi_l2f(long long val);
-extern "C" float __aeabi_ul2f(unsigned long long val);
-extern "C" long long __aeabi_f2lz(float val);
-extern "C" unsigned long long __aeabi_f2ulz(float val);
-
-extern "C"
-{
-
-__declspec(dllexport) double _ll_sto_d(long long val)
- {
- return __aeabi_l2d(val);
- }
-
-__declspec(dllexport) double _ll_usto_d(unsigned long long val)
- {
- return __aeabi_ul2d(val);
- }
-
-__declspec(dllexport) long long _ll_sfrom_d(double val)
- {
- return __aeabi_d2lz(val);
- }
-
-__declspec(dllexport) unsigned long long _ll_usfrom_d(double val)
- {
- return __aeabi_d2ulz(val);
- }
-
-__declspec(dllexport) float _ll_sto_f(long long val)
- {
- return __aeabi_l2d(val);
- }
-
-__declspec(dllexport) float _ll_usto_f(unsigned long long val)
- {
- return __aeabi_ul2d(val);
- }
-
-__declspec(dllexport) long long _ll_sfrom_f(float val)
- {
- return __aeabi_d2lz(val);
- }
-
-__declspec(dllexport) unsigned long long _ll_usfrom_f(float val)
- {
- return __aeabi_d2ulz(val);
- }
-
-};
--- a/kernel/eka/compsupp/rvct2_1/dfprvct2_1-thunk.mmp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-
-target dfprvct2_1-thunk.dll
-
-targettype dll
-
-sourcepath .
-source dfprvct2_1-thunk.cpp
-
-library dfpaeabi.lib
-
-start armcc
-armrt
-end // armcc
-
-option armcc --no_exceptions --no_exceptions_unwind
-
-capability all
-vendorid 0x70000001
-
-SMPSAFE
--- a/kernel/eka/compsupp/rvct2_1/dfprvct2_1.cpp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,69 +0,0 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// This function is simple a way to get these EXPORT statements into
-// the .in file. These symbols will therefore be referenced from
-// the export table and so **forced** into the DLL
-//
-//
-
-__asm void __rt_exporter_dummy(void)
-{
- AREA |.directive|, READONLY, NOALLOC
-
- PRESERVE8
-
- DCB "#<SYMEDIT>#\n"
- // From %ARMLIB%\armlib\f_a_p.l
-
- DCB "EXPORT _dfix_r\n"
- DCB "EXPORT _dfixu_r\n"
- DCB "EXPORT _ffix_r\n"
- DCB "EXPORT _ffixu_r\n"
- DCB "EXPORT _ll_sfrom_d_r\n"
- DCB "EXPORT _ll_ufrom_d_r\n"
- DCB "EXPORT _ll_sfrom_f_r\n"
- DCB "EXPORT _ll_ufrom_f_r\n"
-
- DCB "EXPORT _dcmpge\n"
- DCB "EXPORT _fcmpge\n"
-
- DCB "EXPORT _dneq\n" // dcmp.o
- DCB "EXPORT _fneq\n" // fcmp.o
-
- DCB "EXPORT _drem\n" // drem.o
- DCB "EXPORT _drnd\n" // drnd.o
- DCB "EXPORT _frem\n" // frem.o
- DCB "EXPORT _frnd\n" // frnd.o
-
- DCB "EXPORT _dabs\n" // basic.o
- DCB "EXPORT _fabs\n" // basic.o
-
-
- DCB "EXPORT __dcmp4\n" // dcmp.o
- DCB "EXPORT _dcmp4\n" // dcmp.o
- DCB "EXPORT __fcmp4\n" // fcmp4.o
- DCB "EXPORT _fcmp4\n" // fcmp4.o
-
- DCB "EXPORT _drdiv\n" // ddiv.o
- DCB "EXPORT _frdiv\n" // fdiv.o
-
- DCB "EXPORT _dfltu\n" // dflt.o
- DCB "EXPORT _dflt\n" // dflt.o
- DCB "EXPORT _ffltu\n" // fflt.o
- DCB "EXPORT _fflt\n" // fflt.o
-
- DCB "EXPORT _dsqrt\n" // dsqrt.o
- DCB "EXPORT _fsqrt\n" // fsqrt.o
-
-}
--- a/kernel/eka/compsupp/rvct2_1/dfprvct2_1.mmp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,46 +0,0 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-
-target dfprvct2_1.dll
-
-targettype dll
-
-sourcepath .
-source dfprvct2_1.cpp
-
-// yuk
-library euser.lib
-
-library drtrvct2_1.lib
-
-option armcc --no_exceptions --no_exceptions_unwind
-
-start armcc
-armrt
-
-// we want the 'pure' versions to go with softvfp
-#ifdef MARM_ARMV5
-armlibs f_t_p.l c_t__un.l
-#else //!MARM_ARMV5
-armlibs f_a_p.l c_a__un.l
-#endif //MARM_ARMV5
-
-end // armcc
-
-capability all
-
-vendorid 0x70000001
-
-SMPSAFE
--- a/kernel/eka/compsupp/rvct2_1/dllexp.cpp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,21 +0,0 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-
-extern "C" {
-
-// This will overridden .exp files
-void __DLL_Export_Table__(){};
-
-}
--- a/kernel/eka/compsupp/rvct2_1/drtaeabi.cpp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,394 +0,0 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// In preparation for fully CPPABI and RTABI compliant version of RVCT 2.1
-// This function is simple a way to get these EXPORT statements into
-// the .in file. These symbols will therefore be referenced from
-// the export table and so **forced** into the DLL
-//
-//
-
-__asm void __rt_exporter_dummy(void)
-{
- AREA |.directive|, READONLY, NOALLOC
-
- PRESERVE8
-
- DCB "#<SYMEDIT>#\n"
- // Long long functions
- DCB "EXPORT __aeabi_lmul\n"
- DCB "EXPORT __aeabi_ldivmod\n"
- DCB "EXPORT __aeabi_uldivmod\n"
- DCB "EXPORT __aeabi_llsl\n"
- DCB "EXPORT __aeabi_llsr\n"
- DCB "EXPORT __aeabi_lasr\n"
- DCB "EXPORT __aeabi_lcmp\n"
- DCB "EXPORT __aeabi_ulcmp\n"
-
- // Integer (32/32 . 32) division functions
- DCB "EXPORT __aeabi_idivmod\n"
- DCB "EXPORT __aeabi_uidivmod\n"
-
- // Division by Zero
- // SIGFPE not supported on SymbianOS
- // Implemented in rtdiv0.cpp
- DCB "EXPORT __aeabi_idiv0\n"
- DCB "EXPORT __aeabi_ldiv0\n"
-
- // Unaligned memory access
- DCB "EXPORT __aeabi_uread4\n"
- DCB "EXPORT __aeabi_uwrite4\n"
- DCB "EXPORT __aeabi_uread8\n"
- DCB "EXPORT __aeabi_uwrite8\n"
-
- // Memory copying, clearing, and setting
- // we may want to override the toolchain supplied versions of these (or not)
- DCB "EXPORT __aeabi_memcpy8\n"
- DCB "EXPORT __aeabi_memcpy4\n"
- DCB "EXPORT __aeabi_memcpy\n"
- DCB "EXPORT __aeabi_memmove8\n"
- DCB "EXPORT __aeabi_memmove4\n"
- DCB "EXPORT __aeabi_memmove\n"
-
- DCB "EXPORT __aeabi_memset8\n"
- DCB "EXPORT __aeabi_memset4\n"
- DCB "EXPORT __aeabi_memset\n"
- DCB "EXPORT __aeabi_memclr8\n"
- DCB "EXPORT __aeabi_memclr4\n"
- DCB "EXPORT __aeabi_memclr\n"
-
- // C++ helper functions
-
- // Pure virtual call
- DCB "EXPORT __cxa_pure_virtual\n"
-
- // One-time construction API
- DCB "EXPORT __cxa_guard_acquire\n"
- DCB "EXPORT __cxa_guard_release\n"
- DCB "EXPORT __cxa_guard_abort\n"
-
- // Construction and destruction of arrays
-
- // Helper functions defined by the generic C++ ABI
- DCB "EXPORT __cxa_vec_new\n"
- DCB "EXPORT __cxa_vec_new2\n"
- DCB "EXPORT __cxa_vec_new3\n"
- DCB "EXPORT __cxa_vec_ctor\n"
- DCB "EXPORT __cxa_vec_dtor\n"
- DCB "EXPORT __cxa_vec_cleanup\n"
- DCB "EXPORT __cxa_vec_delete\n"
- DCB "EXPORT __cxa_vec_delete2\n"
- DCB "EXPORT __cxa_vec_delete3\n"
- DCB "EXPORT __cxa_vec_cctor\n"
-
- // Helper functions defined by the C++ ABI for the ARM Architecture
- DCB "EXPORT __aeabi_vec_ctor_nocookie_nodtor\n"
- DCB "EXPORT __aeabi_vec_ctor_cookie_nodtor\n"
- DCB "EXPORT __aeabi_vec_cctor_nocookie_nodtor\n"
- DCB "EXPORT __aeabi_vec_new_cookie_noctor\n"
- DCB "EXPORT __aeabi_vec_new_nocookie\n"
- DCB "EXPORT __aeabi_vec_new_cookie_nodtor\n"
- DCB "EXPORT __aeabi_vec_new_cookie\n"
- DCB "EXPORT __aeabi_vec_dtor\n"
- DCB "EXPORT __aeabi_vec_dtor_cookie\n"
- DCB "EXPORT __aeabi_vec_delete\n"
- DCB "EXPORT __aeabi_vec_delete3\n"
- DCB "EXPORT __aeabi_vec_delete3_nodtor\n"
-
- // Object finalization
- // these need SymbianOS specific implementations
- // implemented in ucppfini.cpp
- // and supplied by usrt.lib
-#if 0
- DCB "EXPORT __cxa_atexit\n"
- DCB "EXPORT __aeabi_atexit\n"
- DCB "EXPORT __cxa_finalize\n"
-#endif
-
-/// Exception Support from here. Not needed by system side code.
-#ifndef __KERNEL_MODE__
- // Standard (user-visible) C++ exception related functions
- DCB "EXPORT _ZSt9terminatev\n"
- DCB "EXPORT _ZSt10unexpectedv\n"
- DCB "EXPORT _ZSt18uncaught_exceptionv\n"
- DCB "EXPORT _ZSt13set_terminatePFvvE\n"
- DCB "EXPORT _ZSt14set_unexpectedPFvvE\n"
-
- DCB "EXPORT abort\n"
-
- // Exception-handling support
- DCB "EXPORT __cxa_allocate_exception\n"
- DCB "EXPORT __cxa_free_exception\n"
- DCB "EXPORT __cxa_throw\n"
- DCB "EXPORT __cxa_rethrow\n"
- DCB "EXPORT __cxa_begin_catch\n"
- DCB "EXPORT __cxa_end_catch\n"
- DCB "EXPORT __cxa_end_cleanup\n"
-
- // personality routines for ARM compact EH entries
- DCB "EXPORT __aeabi_unwind_cpp_pr0\n"
- DCB "EXPORT __aeabi_unwind_cpp_pr1\n"
- DCB "EXPORT __aeabi_unwind_cpp_pr2\n"
-
- // Unwinder helper routines
- DCB "EXPORT _Unwind_VRS_Get\n"
- DCB "EXPORT _Unwind_VRS_Set\n"
- DCB "EXPORT _Unwind_VRS_Pop\n"
-
- // personality routine helper functions
- DCB "EXPORT __cxa_begin_cleanup\n"
- // this needs SymbianOS specific implementation
- DCB "EXPORT __cxa_type_match\n"
-
- // this needs SymbianOS specific implementation
- DCB "EXPORT __cxa_call_terminate\n"
-
- DCB "EXPORT __cxa_call_unexpected\n"
-
- // Miscellaneous error handling related to exception processing
- DCB "EXPORT __cxa_bad_cast\n"
- DCB "EXPORT __cxa_bad_typeid\n"
-
- // this needs SymbianOS specific implementation
- DCB "EXPORT __cxa_get_globals\n"
-
- // this needs SymbianOS specific implementation
- DCB "EXPORT __cxa_current_exception_type\n"
-
- // rtti support from rtti.o
- DCB "EXPORT __dynamic_cast\n"
- DCB "EXPORT __get_typeid\n"
-
- // Standard typeinfo
- DCB "EXPORT _ZNSt9type_infoD1Ev\n"
- DCB "EXPORT _ZNSt9type_infoD2Ev\n"
- DCB "EXPORT _ZNSt9type_infoD0Ev\n"
- DCB "EXPORT _ZNKSt9type_info4nameEv\n"
- DCB "EXPORT _ZNKSt9type_infoeqERKS_\n"
- DCB "EXPORT _ZNKSt9type_infoneERKS_\n"
- DCB "EXPORT _ZNKSt9type_info6beforeERKS_\n"
- DCB "EXPORT _ZNSt8bad_castC1Ev\n"
- DCB "EXPORT _ZNSt8bad_castC2Ev\n"
- DCB "EXPORT _ZNSt8bad_castC1ERKS_\n"
- DCB "EXPORT _ZNSt8bad_castC2ERKS_\n"
- DCB "EXPORT _ZNSt8bad_castaSERKS_\n"
- DCB "EXPORT _ZNSt8bad_castD1Ev\n"
- DCB "EXPORT _ZNSt8bad_castD2Ev\n"
- DCB "EXPORT _ZNSt8bad_castD0Ev\n"
- DCB "EXPORT _ZNKSt8bad_cast4whatEv\n"
- DCB "EXPORT _ZNSt10bad_typeidC1Ev\n"
- DCB "EXPORT _ZNSt10bad_typeidC2Ev\n"
- DCB "EXPORT _ZNSt10bad_typeidC1ERKS_\n"
- DCB "EXPORT _ZNSt10bad_typeidC2ERKS_\n"
- DCB "EXPORT _ZNSt10bad_typeidaSERKS_\n"
- DCB "EXPORT _ZNSt10bad_typeidD1Ev\n"
- DCB "EXPORT _ZNSt10bad_typeidD2Ev\n"
- DCB "EXPORT _ZNSt10bad_typeidD0Ev\n"
- DCB "EXPORT _ZNKSt10bad_typeid4whatEv\n"
- DCB "EXPORT _ZN10__cxxabiv123__fundamental_type_infoD1Ev\n"
- DCB "EXPORT _ZN10__cxxabiv123__fundamental_type_infoD2Ev\n"
- DCB "EXPORT _ZN10__cxxabiv123__fundamental_type_infoD0Ev\n"
- DCB "EXPORT _ZN10__cxxabiv117__array_type_infoD1Ev\n"
- DCB "EXPORT _ZN10__cxxabiv117__array_type_infoD2Ev\n"
- DCB "EXPORT _ZN10__cxxabiv117__array_type_infoD0Ev\n"
- DCB "EXPORT _ZN10__cxxabiv120__function_type_infoD1Ev\n"
- DCB "EXPORT _ZN10__cxxabiv120__function_type_infoD2Ev\n"
- DCB "EXPORT _ZN10__cxxabiv120__function_type_infoD0Ev\n"
- DCB "EXPORT _ZN10__cxxabiv116__enum_type_infoD1Ev\n"
- DCB "EXPORT _ZN10__cxxabiv116__enum_type_infoD2Ev\n"
- DCB "EXPORT _ZN10__cxxabiv116__enum_type_infoD0Ev\n"
- DCB "EXPORT _ZN10__cxxabiv117__class_type_infoD1Ev\n"
- DCB "EXPORT _ZN10__cxxabiv117__class_type_infoD2Ev\n"
- DCB "EXPORT _ZN10__cxxabiv117__class_type_infoD0Ev\n"
- DCB "EXPORT _ZN10__cxxabiv120__si_class_type_infoD1Ev\n"
- DCB "EXPORT _ZN10__cxxabiv120__si_class_type_infoD2Ev\n"
- DCB "EXPORT _ZN10__cxxabiv120__si_class_type_infoD0Ev\n"
- DCB "EXPORT _ZN10__cxxabiv121__vmi_class_type_infoD1Ev\n"
- DCB "EXPORT _ZN10__cxxabiv121__vmi_class_type_infoD2Ev\n"
- DCB "EXPORT _ZN10__cxxabiv121__vmi_class_type_infoD0Ev\n"
- DCB "EXPORT _ZN10__cxxabiv117__pbase_type_infoD1Ev\n"
- DCB "EXPORT _ZN10__cxxabiv117__pbase_type_infoD2Ev\n"
- DCB "EXPORT _ZN10__cxxabiv117__pbase_type_infoD0Ev\n"
- DCB "EXPORT _ZN10__cxxabiv119__pointer_type_infoD1Ev\n"
- DCB "EXPORT _ZN10__cxxabiv119__pointer_type_infoD2Ev\n"
- DCB "EXPORT _ZN10__cxxabiv119__pointer_type_infoD0Ev\n"
- DCB "EXPORT _ZN10__cxxabiv129__pointer_to_member_type_infoD1Ev\n"
- DCB "EXPORT _ZN10__cxxabiv129__pointer_to_member_type_infoD2Ev\n"
- DCB "EXPORT _ZN10__cxxabiv129__pointer_to_member_type_infoD0Ev\n"
- DCB "EXPORT _ZSt21__gen_dummy_typeinfosv\n"
- DCB "EXPORT _ZTVSt9type_info\n"
- DCB "EXPORT _ZTVSt8bad_cast\n"
- DCB "EXPORT _ZTVSt10bad_typeid\n"
- DCB "EXPORT _ZTIv\n"
- DCB "EXPORT _ZTVN10__cxxabiv123__fundamental_type_infoE\n"
- DCB "EXPORT _ZTIPv\n"
- DCB "EXPORT _ZTVN10__cxxabiv119__pointer_type_infoE\n"
- DCB "EXPORT _ZTIPKv\n"
- DCB "EXPORT _ZTIb\n"
- DCB "EXPORT _ZTIPb\n"
- DCB "EXPORT _ZTIPKb\n"
- DCB "EXPORT _ZTIw\n"
- DCB "EXPORT _ZTIPw\n"
- DCB "EXPORT _ZTIPKw\n"
- DCB "EXPORT _ZTIc\n"
- DCB "EXPORT _ZTIPc\n"
- DCB "EXPORT _ZTIPKc\n"
- DCB "EXPORT _ZTIa\n"
- DCB "EXPORT _ZTIPa\n"
- DCB "EXPORT _ZTIPKa\n"
- DCB "EXPORT _ZTIh\n"
- DCB "EXPORT _ZTIPh\n"
- DCB "EXPORT _ZTIPKh\n"
- DCB "EXPORT _ZTIs\n"
- DCB "EXPORT _ZTIPs\n"
- DCB "EXPORT _ZTIPKs\n"
- DCB "EXPORT _ZTIt\n"
- DCB "EXPORT _ZTIPt\n"
- DCB "EXPORT _ZTIPKt\n"
- DCB "EXPORT _ZTIi\n"
- DCB "EXPORT _ZTIPi\n"
- DCB "EXPORT _ZTIPKi\n"
- DCB "EXPORT _ZTIj\n"
- DCB "EXPORT _ZTIPj\n"
- DCB "EXPORT _ZTIPKj\n"
- DCB "EXPORT _ZTIl\n"
- DCB "EXPORT _ZTIPl\n"
- DCB "EXPORT _ZTIPKl\n"
- DCB "EXPORT _ZTIm\n"
- DCB "EXPORT _ZTIPm\n"
- DCB "EXPORT _ZTIPKm\n"
- DCB "EXPORT _ZTIx\n"
- DCB "EXPORT _ZTIPx\n"
- DCB "EXPORT _ZTIPKx\n"
- DCB "EXPORT _ZTIy\n"
- DCB "EXPORT _ZTIPy\n"
- DCB "EXPORT _ZTIPKy\n"
- DCB "EXPORT _ZTIf\n"
- DCB "EXPORT _ZTIPf\n"
- DCB "EXPORT _ZTIPKf\n"
- DCB "EXPORT _ZTId\n"
- DCB "EXPORT _ZTIPd\n"
- DCB "EXPORT _ZTIPKd\n"
- DCB "EXPORT _ZTIe\n"
- DCB "EXPORT _ZTIPe\n"
- DCB "EXPORT _ZTIPKe\n"
- DCB "EXPORT _ZTVN10__cxxabiv117__array_type_infoE\n"
- DCB "EXPORT _ZTVN10__cxxabiv120__function_type_infoE\n"
- DCB "EXPORT _ZTVN10__cxxabiv116__enum_type_infoE\n"
- DCB "EXPORT _ZTVN10__cxxabiv117__class_type_infoE\n"
- DCB "EXPORT _ZTVN10__cxxabiv120__si_class_type_infoE\n"
- DCB "EXPORT _ZTVN10__cxxabiv121__vmi_class_type_infoE\n"
- DCB "EXPORT _ZTVN10__cxxabiv117__pbase_type_infoE\n"
- DCB "EXPORT _ZTVN10__cxxabiv129__pointer_to_member_type_infoE\n"
- DCB "EXPORT _ZTSv\n"
- DCB "EXPORT _ZTSPv\n"
- DCB "EXPORT _ZTSPKv\n"
- DCB "EXPORT _ZTSb\n"
- DCB "EXPORT _ZTSPb\n"
- DCB "EXPORT _ZTSPKb\n"
- DCB "EXPORT _ZTSw\n"
- DCB "EXPORT _ZTSPw\n"
- DCB "EXPORT _ZTSPKw\n"
- DCB "EXPORT _ZTSc\n"
- DCB "EXPORT _ZTSPc\n"
- DCB "EXPORT _ZTSPKc\n"
- DCB "EXPORT _ZTSa\n"
- DCB "EXPORT _ZTSPa\n"
- DCB "EXPORT _ZTSPKa\n"
- DCB "EXPORT _ZTSh\n"
- DCB "EXPORT _ZTSPh\n"
- DCB "EXPORT _ZTSPKh\n"
- DCB "EXPORT _ZTSs\n"
- DCB "EXPORT _ZTSPs\n"
- DCB "EXPORT _ZTSPKs\n"
- DCB "EXPORT _ZTSt\n"
- DCB "EXPORT _ZTSPt\n"
- DCB "EXPORT _ZTSPKt\n"
- DCB "EXPORT _ZTSi\n"
- DCB "EXPORT _ZTSPi\n"
- DCB "EXPORT _ZTSPKi\n"
- DCB "EXPORT _ZTSj\n"
- DCB "EXPORT _ZTSPj\n"
- DCB "EXPORT _ZTSPKj\n"
- DCB "EXPORT _ZTSl\n"
- DCB "EXPORT _ZTSPl\n"
- DCB "EXPORT _ZTSPKl\n"
- DCB "EXPORT _ZTSm\n"
- DCB "EXPORT _ZTSPm\n"
- DCB "EXPORT _ZTSPKm\n"
- DCB "EXPORT _ZTSx\n"
- DCB "EXPORT _ZTSPx\n"
- DCB "EXPORT _ZTSPKx\n"
- DCB "EXPORT _ZTSy\n"
- DCB "EXPORT _ZTSPy\n"
- DCB "EXPORT _ZTSPKy\n"
- DCB "EXPORT _ZTSf\n"
- DCB "EXPORT _ZTSPf\n"
- DCB "EXPORT _ZTSPKf\n"
- DCB "EXPORT _ZTSd\n"
- DCB "EXPORT _ZTSPd\n"
- DCB "EXPORT _ZTSPKd\n"
- DCB "EXPORT _ZTSe\n"
- DCB "EXPORT _ZTSPe\n"
- DCB "EXPORT _ZTSPKe\n"
- DCB "EXPORT _ZTISt9type_info\n"
- DCB "EXPORT _ZTISt8bad_cast\n"
- DCB "EXPORT _ZTISt10bad_typeid\n"
- DCB "EXPORT _ZTIN10__cxxabiv123__fundamental_type_infoE\n"
- DCB "EXPORT _ZTIN10__cxxabiv117__array_type_infoE\n"
- DCB "EXPORT _ZTIN10__cxxabiv120__function_type_infoE\n"
- DCB "EXPORT _ZTIN10__cxxabiv116__enum_type_infoE\n"
- DCB "EXPORT _ZTIN10__cxxabiv117__class_type_infoE\n"
- DCB "EXPORT _ZTIN10__cxxabiv120__si_class_type_infoE\n"
- DCB "EXPORT _ZTIN10__cxxabiv121__vmi_class_type_infoE\n"
- DCB "EXPORT _ZTIN10__cxxabiv117__pbase_type_infoE\n"
- DCB "EXPORT _ZTIN10__cxxabiv119__pointer_type_infoE\n"
- DCB "EXPORT _ZTIN10__cxxabiv129__pointer_to_member_type_infoE\n"
- DCB "EXPORT _ZTSSt9type_info\n"
- DCB "EXPORT _ZTSSt8bad_cast\n"
- DCB "EXPORT _ZTSSt10bad_typeid\n"
- DCB "EXPORT _ZTSN10__cxxabiv123__fundamental_type_infoE\n"
- DCB "EXPORT _ZTSN10__cxxabiv117__array_type_infoE\n"
- DCB "EXPORT _ZTSN10__cxxabiv120__function_type_infoE\n"
- DCB "EXPORT _ZTSN10__cxxabiv116__enum_type_infoE\n"
- DCB "EXPORT _ZTSN10__cxxabiv117__class_type_infoE\n"
- DCB "EXPORT _ZTSN10__cxxabiv120__si_class_type_infoE\n"
- DCB "EXPORT _ZTSN10__cxxabiv121__vmi_class_type_infoE\n"
- DCB "EXPORT _ZTSN10__cxxabiv117__pbase_type_infoE\n"
- DCB "EXPORT _ZTSN10__cxxabiv119__pointer_type_infoE\n"
- DCB "EXPORT _ZTSN10__cxxabiv129__pointer_to_member_type_infoE\n"
-
-
-#endif // __KERNEL_MODE__
-
-}
-
-#ifndef __KERNEL_MODE__
-
-extern "C" {
-int __rt_raise(int signal, int type);
-int raise(int signal)
- {
- return __rt_raise(signal, 0);
- }
-
-int __rt_exit(int aReturnCode);
-EXPORT_C void abort(int signal)
- {
- __rt_raise(signal, 1);
- __rt_exit(1);
- }
-
-}
-
-#endif
--- a/kernel/eka/compsupp/rvct2_1/drtaeabi.mmp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-
-TARGET drtaeabi.dll
-
-TARGETTYPE dll
-
-// In theory -L"--diag_suppress=6331" should prevent the linker from moaning. But
-// the compiler passes this to the assembler which then invokes the linker and the
-// option gets dropped somewhere.
-//OPTION ARMCC '-L"--diag_suppress=6331"'
-SOURCEPATH .
-SOURCE aeabidiv0.cpp
-SOURCE drtaeabi.cpp
-SOURCE aeabimem.cia
-
-SOURCEPATH ../symaehabi
-SOURCE symbian_support.cpp
-SOURCE symbian_rtti.cpp
-SOURCE unwinder.c
-SOURCE unwind_pr.c
-SOURCE cppsemantics.cpp
-
-// yuk
-LIBRARY euser.lib dfpaeabi.lib dfprvct2_1.lib drtrvct2_1.lib
-
-START ARMCC
-ARMRT // we're building a runtime support lib so suppress all the default libraries
-ARMINC
-// we want the 'pure' versions to go with softvfp
-#ifdef MARM_ARMV5
-ARMLIBS c_t__un.l cpprt_t__u.l
-#else
-ARMLIBS c_a__un.l cpprt_a__u.l
-#endif
-END
-
-capability all
-
-VENDORID 0x70000001
-
-unpagedcode
-
-SMPSAFE
--- a/kernel/eka/compsupp/rvct2_1/drtrvct2_1.cpp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,139 +0,0 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// This function is simple a way to get these EXPORT statements into
-// the .in file. These symbols will therefore be referenced from
-// the export table and so **forced** into the DLL
-//
-//
-
-__asm void __rt_exporter_dummy(void)
-{
- AREA |.directive|, READONLY, NOALLOC
-
- PRESERVE8
-
- DCB "#<SYMEDIT>#\n"
- // From %ARMLIB%\armlib\c_a__un.l
- // ** delete DCB "EXPORT _ll_cmpeq\n" // _ll_cmpeq.o
- // ** delete DCB "EXPORT _ll_cmpne\n" // _ll_cmpne.o
- // ** delete DCB "EXPORT _ll_scmpge\n" // _ll_scmpge.o
- // ** delete DCB "EXPORT _ll_scmpgt\n" // _ll_scmpgt.o
- // ** delete DCB "EXPORT _ll_scmple\n" // _ll_scmple.o
- // ** delete DCB "EXPORT _ll_scmplt\n" // _ll_scmplt.o
- // ** delete DCB "EXPORT _ll_ucmpge\n" // _ll_ucmpge.o
- // ** delete DCB "EXPORT _ll_ucmpgt\n" // _ll_ucmpgt.o
- // ** delete DCB "EXPORT _ll_ucmple\n" // _ll_ucmple.o
- // ** delete DCB "EXPORT _ll_ucmplt\n" // _ll_ucmplt.o
-
- // ** delete DCB "EXPORT _memcpy\n" // _memcpy.o
-
- DCB "EXPORT abs\n" // abs.o
- DCB "EXPORT llabs\n" // llabs.o
-
- DCB "EXPORT _btod_etento\n" // bigflt0.o
-
- DCB "EXPORT _btod_d2e\n" // btod.o
- DCB "EXPORT _btod_ediv\n"
- DCB "EXPORT _btod_emul\n"
- DCB "EXPORT _d2e_norm_op1\n"
- DCB "EXPORT _d2e_denorm_low\n"
- DCB "EXPORT _btod_emuld\n"
- DCB "EXPORT _btod_edivd\n"
- DCB "EXPORT _e2e\n"
- DCB "EXPORT _e2d\n"
- DCB "EXPORT __btod_mult_common\n"
- DCB "EXPORT __btod_div_common\n"
-
- DCB "EXPORT div\n" // div.o
-
- DCB "EXPORT __rt_divtest\n" // divtest.o
- DCB "EXPORT __rt_sdiv32by16\n" // dspdiv32.o
- DCB "EXPORT __rt_udiv32by16\n" // dspdiv32u.o
- DCB "EXPORT __rt_sdiv64by32\n" // dspdiv64.o
-
- DCB "EXPORT ldiv\n" // ldiv.o
-
- DCB "EXPORT _ll_add\n" // lladd.o
- DCB "EXPORT _ll_addls\n" // lladdls.o
- DCB "EXPORT _ll_addlu\n" // lladdlu.o
- DCB "EXPORT _ll_addss\n" // lladdss.o
- DCB "EXPORT _ll_adduu\n" // lladduu.o
- DCB "EXPORT _ll_and\n" // lland.o
- DCB "EXPORT _ll_cmpge\n" // llcmpge.o
- DCB "EXPORT _ll_cmple\n" // llcmple.o
- DCB "EXPORT _ll_cmpu\n" // llcmpu.o
- DCB "EXPORT lldiv\n" // lldiv.o
- DCB "EXPORT _ll_eor\n" // lleor.o
- DCB "EXPORT _ll_from_l\n" // llfroml.o
- DCB "EXPORT _ll_from_u\n" // llfromu.o
- DCB "EXPORT _ll_mul\n" // llmul.o
- DCB "EXPORT _ll_mulls\n" // llmulls.o
- DCB "EXPORT _ll_mullu\n" // llmullu.o
- DCB "EXPORT _ll_mulss\n" // llmulss.o
- DCB "EXPORT _ll_muluu\n" // llmuluu.o
- DCB "EXPORT _ll_neg\n" // llneg.o
- DCB "EXPORT _ll_not\n" // llnot.o
- DCB "EXPORT _ll_or\n" // llor.o
- DCB "EXPORT _ll_rsb\n" // llrsb.o
- DCB "EXPORT _ll_rsbls\n" // llrsbls.o
- DCB "EXPORT _ll_rsblu\n" // llrsblu.o
- DCB "EXPORT _ll_rsbss\n" // llrsbss.o
- DCB "EXPORT _ll_rsbuu\n" // llrsbuu.o
- // ** delete DCB "EXPORT _ll_sdiv\n" // llsdiv.o
- // ** delete DCB "EXPORT _ll_sdiv10\n" // llsdiv10.o
- // ** delete DCB "EXPORT _ll_shift_l\n" // llshl.o
- DCB "EXPORT _ll_srdv \n" // llsrdv.o
- // ** delete DCB "EXPORT _ll_sshift_r\n" // llsshr.o
- DCB "EXPORT _ll_sub\n" // llsub.o
- DCB "EXPORT _ll_subls\n" // llsubls.o
- DCB "EXPORT _ll_sublu\n" // llsublu.o
- DCB "EXPORT _ll_subss\n" // llsubss.o
- DCB "EXPORT _ll_subuu\n" // llsubuu.o
- DCB "EXPORT _ll_to_l\n" // lltol.o
- DCB "EXPORT _ll_udiv_small\n" // lludiv.o
- DCB "EXPORT _ll_udiv_big\n" // lludiv.o
- DCB "EXPORT _ll_udiv_ginormous\n" // lludiv.o
- // ** delete DCB "EXPORT _ll_udiv\n" // lludiv.o
- DCB "EXPORT _ll_udiv10\n" // lludiv10.o
- DCB "EXPORT _ll_urdv\n" // llurdv.o
- // ** delete DCB "EXPORT _ll_ushift_r\n" // llushr.o
-
- DCB "EXPORT _memset\n" // rt_memclr.o
- // ** delete DCB "EXPORT __rt_memclr\n" // rt_memclr.o
- DCB "EXPORT _memset_w\n" // rt_memclr_w.o
- // ** delete DCB "EXPORT __rt_memclr_w\n" // rt_memclr_w.o
- DCB "EXPORT __rt_memcpy\n" // rt_memcpy.o
- DCB "EXPORT _memcpy_lastbytes\n"// rt_memcpy_w.o
- // ** delete DCB "EXPORT __rt_memcpy_w\n" // rt_memcpy_w.o
- // ** delete DCB "EXPORT __rt_memmove\n" // rt_memmove.o
- DCB "EXPORT __memmove_aligned\n"// rt_memmove_w.o
- // ** delete DCB "EXPORT __rt_memmove_w\n" // rt_memmove_w.o
- DCB "EXPORT __rt_memset\n" // rt_memset.o
-
- DCB "EXPORT __rt_sdiv\n" // rt_sdiv.o
- DCB "EXPORT __rt_udiv\n" // rt_udiv.o
- DCB "EXPORT __rt_sdiv10\n" // rtsdiv10.o
- DCB "EXPORT __rt_udiv10\n" // rtudiv10.o
-
- // New with RVCT 2.0 Release Candidte 2
- DCB "EXPORT __rt_switch8\n" // switch8.o
-
- // rtti support from rtti.o
- // ** delete DCB "EXPORT __dynamic_cast\n"
- // ** delete DCB "EXPORT __get_typeid\n"
-
-}
-
-
-
--- a/kernel/eka/compsupp/rvct2_1/drtrvct2_1.mmp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,61 +0,0 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-
-TARGET drtrvct2_1.dll
-
-TARGETTYPE dll
-
-OPTION ARMCC --no_exceptions --no_exceptions_unwind
-
-SOURCEPATH .
-SOURCE rtabort.cpp
-SOURCE rtdiv0.cpp
-SOURCE rtexit.cpp
-SOURCE rtlib.cpp
-SOURCE rtraise.cpp
-SOURCE drtrvct2_1.cpp
-
-// global new/delete operators
-SOURCE rtopnew.cpp rtopdel.cpp
-// exception support - from RVCT 2.1 onwards
-// SOURCE exception_support.cpp
-// default _fp_init definition - should be overridden by fp library
-SOURCE sftfpini.cpp
-// dummy for now, needs to go away
-// SOURCE rte32dll.cpp
-
-// yuk
-LIBRARY euser.lib
-
-START ARMCC
-ARMRT
-ARMINC
-#ifdef MARM_ARMV5
-ARMLIBS c_t__un.l
-//ARMLIBS cpprt_t__u.l
-// shouldn't really need this if btod.o wasn't so monolithic....
-ARMLIBS f_t_p.l
-#else
-ARMLIBS c_a__un.l
-//ARMLIBS cpprt_a__u.l
-// shouldn't really need this if btod.o wasn't so monolithic....
-ARMLIBS f_a_p.l
-#endif
-END
-
-capability all
-VENDORID 0x70000001
-
-SMPSAFE
--- a/kernel/eka/compsupp/rvct2_1/ksrt.mmp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// KSRT.MPP
-//
-//
-
-ALWAYS_BUILD_AS_ARM
-
-MACRO _NO_FP
-
-TARGET ksrt.lib
-
-TARGETTYPE klib
-
-SOURCEPATH .
-
-#ifndef MARM_ARMV4
-SOURCE callviar0.cpp callviar1.cpp callviar2.cpp callviar3.cpp
-SOURCE callviar4.cpp callviar5.cpp callviar6.cpp callviar7.cpp
-#endif
-
-SOURCE ucppinit_aeabi.cpp // ucppfini.cpp
-
-START ARMCC
-ARMRT
-END
-
-VENDORID 0x70000001
--- a/kernel/eka/compsupp/rvct2_1/ksrt2_1.mmp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// KSRT.MPP
-//
-//
-
-ALWAYS_BUILD_AS_ARM
-
-MACRO _NO_FP
-
-TARGET ksrt2_1.lib
-
-TARGETTYPE klib
-
-SOURCEPATH .
-
-#ifndef MARM_ARMV4
-SOURCE callviar0.cpp callviar1.cpp callviar2.cpp callviar3.cpp
-SOURCE callviar4.cpp callviar5.cpp callviar6.cpp callviar7.cpp
-#endif
-
-SOURCE ucppinit_aeabi.cpp // ucppfini.cpp
-
-START ARMCC
-ARMRT
-END
-
-VENDORID 0x70000001
--- a/kernel/eka/compsupp/rvct2_1/rtabort.cpp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-
-#include <e32std.h>
-#include <e32std_private.h>
-
-extern "C" {
-// function the runtime can call to abort a process,
-// the runtime library is not finalized and no atexit
-// processing takes places.
-EXPORT_C void __rt_abort() /* never returns */
- {
- RThread().Kill(KErrAbort);
- }
-}
-
-namespace std {
-EXPORT_C void terminate(void)
- {
- __rt_abort();
- }
-}
--- a/kernel/eka/compsupp/rvct2_1/rtdiv0.cpp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-
-#include <e32std.h>
-#include <e32std_private.h>
-
-extern "C" {
-EXPORT_C void __rt_div0 (void)
- {
- User::RaiseException(EExcIntegerDivideByZero);
- }
-
-}
--- a/kernel/eka/compsupp/rvct2_1/rte32dll.cpp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,22 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-#include <e32std.h>
-#include <e32std_private.h>
-
-void E32Dll(TDllReason aReason) {}
--- a/kernel/eka/compsupp/rvct2_1/rtexit.cpp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +0,0 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// function the runtime can call to exit process, 'finalizing'
-// the runtime library but avoiding atexit processing.
-//
-//
-
-#include <e32std.h>
-#include <e32std_private.h>
-
-extern "C" {
-IMPORT_C extern void __rt_lib_shutdown(void);
-
-EXPORT_C void __rt_exit(TInt aReturnCode) /* never returns */
- {
- __rt_lib_shutdown();
- User::Exit(aReturnCode);
- }
-}
--- a/kernel/eka/compsupp/rvct2_1/rtlib.cpp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// initialize and shutdown (low-level) runtime.
-// these are intended to go in user side static runtime lib
-//
-//
-
-#include <e32std.h>
-#include <e32std_private.h>
-
-extern "C" {
-EXPORT_C void __rt_lib_shutdown(void){};
-
-IMPORT_C void _fp_init(void);
-extern void __cpp_initialise(void);
-
-EXPORT_C void __rt_lib_init(void)
- {
- _fp_init();
- __cpp_initialise();
- }
-}
--- a/kernel/eka/compsupp/rvct2_1/rtopdel.cpp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +0,0 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-
-//#include <stddef.h>
-#include <e32std.h>
-#include <e32std_private.h>
-//#include <e32math.h>
-//#include "uc_std.h"
-
-EXPORT_C void operator delete(TAny *aPtr) __NO_THROW
-//
-// The replacement delete operator.
-//
- {
-
- User::Free(aPtr);
- }
-
-EXPORT_C void operator delete[](TAny * aPtr) __NO_THROW
- {
-
- User::Free(aPtr);
- }
-
-EXPORT_C void operator delete(TAny *aPtr, const std::nothrow_t& aNoThrow) __NO_THROW
-//
-// The replacement delete operator.
-//
- {
- (void)aNoThrow;
- User::Free(aPtr);
- }
-
-EXPORT_C void operator delete[](TAny * aPtr, const std::nothrow_t& aNoThrow) __NO_THROW
- {
- (void)aNoThrow;
- User::Free(aPtr);
- }
--- a/kernel/eka/compsupp/rvct2_1/rtopnew.cpp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,59 +0,0 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-
-//#include <stddef.h>
-#include <e32std.h>
-#include <e32std_private.h>
-//#include <e32math.h>
-//#include "uc_std.h"
-
-EXPORT_C TAny* operator new(TUint aSize) __NO_THROW
-//
-// The global new operator.
-//
- {
-
- return(User::Alloc(aSize));
- }
-
-EXPORT_C TAny* operator new[](TUint aSize) __NO_THROW
- {
-
- return(User::Alloc(aSize));
- }
-
-EXPORT_C TAny* operator new(TUint aSize, const std::nothrow_t& aNoThrow) __NO_THROW
-//
-// The global new operator.
-//
- {
- (void) aNoThrow;
- return(User::Alloc(aSize));
- }
-
-EXPORT_C TAny* operator new[](TUint aSize, const std::nothrow_t& aNoThrow) __NO_THROW
- {
- (void) aNoThrow;
- return(User::Alloc(aSize));
- }
-
-EXPORT_C TAny* operator new(TUint aSize,TUint anExtraSize) __NO_THROW
-//
-// Allocate the requested size plus the extra.
-//
- {
-
- return(User::Alloc(aSize+anExtraSize));
- }
--- a/kernel/eka/compsupp/rvct2_1/rtraise.cpp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,61 +0,0 @@
-// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// function the runtime can call to 'raise an exception'
-//
-//
-
-#include <e32std.h>
-#include <e32std_private.h>
-#include <signal.h> // get from %ARMINC%
-
-extern "C" {
-
-EXPORT_C TInt __rt_raise(TInt signal, TInt type)
- {
- TExcType aExc = EExcGeneral;
- // translate signal into EPOC exception
- switch (signal)
- {
- case SIGABRT :
- aExc = EExcAbort;
- break;
- case SIGFPE :
- switch (type)
- {
- case DIVBYZERO :
- aExc = EExcAbort;
- break;
- default:
- aExc = EExcFloatInvalidOperation;
- }
- break;
- case SIGILL :
- aExc = EExcCodeAbort;
- break;
- case SIGINT :
- aExc = EExcUserInterrupt;
- break;
- case SIGSEGV :
- aExc = EExcDataAbort;
- break;
- case SIGTERM :
- aExc = EExcKill;
- break;
- }
- // yuk. Introduces dependendcy on EUSER!!
- User::RaiseException(aExc);
- return signal;
- }
-}
-
--- a/kernel/eka/compsupp/rvct2_1/rvct2_1.h Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,194 +0,0 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// e32\compsupp\rvct2_1\rvct2_1.h
-// This is the preinclude file for the rvct 2.1 compiler
-// It contains all the compiler specific definitions required by the SOS source
-//
-//
-
-/**
- @file
- @publishedAll
- @released
-*/
-
-#ifdef __ARMCC_VERSION
-#if (__ARMCC_VERSION < 210000 || __ARMCC_VERSION >= 220000)
-#error This instantiation of the build requires use of RVCT 2.1
-#endif
-#endif
-
-#if defined(__PRODUCT_INCLUDE__)
-#include __PRODUCT_INCLUDE__
-#endif
-
-
-// stuff from e32def.h
-#define __NO_CLASS_CONSTS__
-#define __NORETURN__ __declspec(noreturn)
-#define __NORETURN_TERMINATOR()
-#define IMPORT_C __declspec(dllimport)
-#define EXPORT_C __declspec(dllexport)
-
-
-
-
-/**
-Declares a class as being non-sharable.
-
-If a class is non-sharable, then a class implemented in another DLL cannot
-derive (inherit) from that class.
-
-Declaring a class as non-sharable prevents the compiler from exporting compiler
-implementation-specific symbols, i.e. run-time type-information and virtual
-tables. This prevents classes in other DLLs from being able to derive from it.
-
-Note :
-- if a class is marked as non-sharable, then Symbian OS requires all
-classes that are derived from that class, and which are also implemented in the same DLL,
-to be declared as non-sharable.
-- by default, a class is sharable.
-
-The following code fragment shows how a non-sharable class is declared.
-
-@code
-NONSHARABLE_CLASS(CMyClass) : public CBase
-{
-public :
-...
-private :
-...
-}
-@endcode
-
-@param x The name of the class to be declared as non-sharable.
-*/
-#define NONSHARABLE_CLASS(x) class __declspec(notshared) x
-#define NONSHARABLE_STRUCT(x) struct __declspec(notshared) x
-#define __NO_THROW throw ()
-#define __THROW(t) throw (t)
-#define TEMPLATE_SPECIALIZATION template<>
-#ifndef __int64
-#define __int64 long long
-#endif
-#define __VALUE_IN_REGS__ __value_in_regs
-#define I64LIT(x) x##LL
-#define UI64LIT(x) x##ULL
-#define __SOFTFP __softfp
-
-// __TText from e32cmn.h also e32des16.h
-#ifdef __cplusplus
-typedef wchar_t __TText; // Only ISO C++ has wchar_t as a primitive type
-#define __wchar_t_defined
-#else
-typedef unsigned short __TText;
-#endif
-#define __TText_defined
-
-// __NAKED__ from cpudefs.h
-#define __NAKED__ __asm
-#define ____ONLY_USE_NAKED_IN_CIA____ __asm
-
-// Int64 and Uint64 from nkern\nklib.h
-typedef long long Int64;
-typedef unsigned long long Uint64;
-
-// Here are RVCT 2.0's definitions for stdarg.h
-// These should be used by e.g. stdlib
-
-// see if we're using the BETA B compiler
-#if (__ARMCC_VERSION == 200022)
-#define RVCTBETA
-#endif
-
-#ifdef __cplusplus
- namespace std {
- extern "C" {
-#endif /* __cplusplus */
-
-#ifdef RVCTBETA
- typedef int *va_list[1];
-#else
- typedef struct __va_list { void *__ap; } va_list;
-#endif
-
-#ifdef __cplusplus
- } /* extern "C" */
- } /* namespace std */
-
- using ::std::va_list;
-#endif
-
-#define va_start(ap, parmN) __va_start(ap, parmN)
-#define va_arg(ap, type) __va_arg(ap, type)
-#define va_end(ap) ((void)0)
-
-// These are for Symbian OS C++ code
-#define VA_START(ap,pn) va_start(ap, pn)
-#define VA_ARG(ap,type) va_arg(ap,type)
-#define VA_END(ap) va_end(ap)
-#define VA_LIST va_list
-#define __VA_LIST_defined
-// This should prevent /stdlib/linc/stdarg.h from doing damage.
-#define _STDARG_H
-
-// now deal with stdarg_e.h
-typedef va_list __e32_va_list;
-#define _STDARG_E_H
-
-// This is an EABI compliant compiler
-#ifndef __EABI__
-#define __EABI__
-#endif
-
-// these are hopefully temporary
-
-// defining this means we don't get __NAKED__ ctors
-#ifndef __EABI_CTORS__
-#define __EABI_CTORS__
-#endif
-
-//#define __EARLY_DEBUG__
-
-// Deal with operator new issues here
-#ifdef __cplusplus
-namespace std {
- struct nothrow_t { };
- extern const nothrow_t nothrow;
-}
-
-IMPORT_C void* operator new(unsigned int aSize) __NO_THROW;
-
-IMPORT_C void* operator new[](unsigned int aSize) __NO_THROW;
-
-IMPORT_C void* operator new(unsigned int aSize, const std::nothrow_t& aNoThrow) __NO_THROW;
-
-IMPORT_C void* operator new[](unsigned int aSize, const std::nothrow_t& aNoThrow) __NO_THROW;
-
-IMPORT_C void operator delete(void* aPtr) __NO_THROW;
-
-IMPORT_C void operator delete[](void* aPtr) __NO_THROW;
-
-IMPORT_C void operator delete(void* aPtr, const std::nothrow_t& aNoThrow) __NO_THROW;
-
-IMPORT_C void operator delete[](void* aPtr, const std::nothrow_t& aNoThrow) __NO_THROW;
-
-// Support for throwing exceptions through embedded assembler
-// Should only be needed user side
-
-#define __EH_FRAME_ADDRESS(reg,offset) FRAME ADDRESS reg, offset
-#define __EH_FRAME_PUSH2(reg1,reg2) FRAME PUSH {reg1, reg2}
-#define __EH_FRAME_SAVE1(reg,offset) FRAME SAVE {reg}, offset
-
-#endif
--- a/kernel/eka/compsupp/rvct2_1/sftfpini.cpp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,70 +0,0 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-
-#include <e32std.h>
-#include <e32std_private.h>
-
-// support functions for ARM supplied softvfp compiler-helper functions
-
-extern "C" {
-
-//void __rt_fp_status_register_cleanup(TAny * aReg)
-// {
-// delete aReg;
-// }
-
-// set up the fp status register
-EXPORT_C void _fp_init(void)
- {
- TUint32 * aReg = (TUint32 *)User::AllocZ(sizeof(TUint32));
- if (aReg)
- {
- Dll::SetTls(aReg /*, __rt_fp_status_register_cleanup*/);
- }
- else
- {
- // This will force us to try again if we actually get an FP
- // exception later.
- Dll::SetTls(0 /*, __rt_fp_status_register_cleanup*/);
- }
- }
-
-EXPORT_C TAny * __rt_fp_status_addr(void)
- {
- //return &__fp_status_register;
- TAny* aTls = Dll::Tls();
- if (aTls)
- return aTls;
- // we obviously failed to set it up before. Try again, so we can
- // at least try to error meaningfully
- TUint32* aReg = (TUint32*)User::AllocZ(sizeof(TUint32));
- _LIT(KFpGeneralPanic, "FP Emulator");
- if (aReg)
- {
- TInt r = Dll::SetTls(aReg /*, __rt_fp_status_register_cleanup*/);
- if (r==KErrNone)
- return aReg;
- // if we get here we really in trouble. Just Panic.
- User::Panic(KFpGeneralPanic, KErrGeneral);
- }
- else
- {
- // If we get here, we're toast anyway....
- User::Panic(KFpGeneralPanic, KErrNoMemory);
- }
- return 0;
- }
-}
-
--- a/kernel/eka/compsupp/rvct2_1/ucppfini.cpp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,84 +0,0 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// toplevel destruction routines for 'user side' code compiled
-// with the ARMEDG compiler.
-//
-//
-
-#include "cppinit.h"
-
-extern "C" {
-
-#define MAX_DTOR_RECORDS 256
-static dtd dtor_rec[MAX_DTOR_RECORDS];
-
-typedef dtd **dso_handle;
-dtd * __dso_handle = &dtor_rec[MAX_DTOR_RECORDS];
-
-void __cxa_finalize ( dso_handle d );
-
-// Need to decide what this should do we run out of dtor space.
-// Probably need to run __cxa_finalize then do some kind of panic.
-void CppBSSInitializationError()
- {
-// __cxa_finalize(&dtor_rec[0]);
- };
-
-// This is called by compiler generated code to record needed destructions of
-// dynamically initialized (ctor) top level (BSS) data.
-// I guess this is more efficient for the compiler than __cxa_atexit, since
-// it takes the object that needs dtoring as its first arg, which means its in
-// the right register when the ctor returns.
-void __aeabi_atexit(void *aObject, void (*aDtor)(void *), dso_handle aHandle)
- {
- dtd * drec = *aHandle;
- drec--;
-
- if (drec < &dtor_rec[0])
- // Need to decide what to do here
- return CppBSSInitializationError();
-
- drec->dtor = aDtor;
- drec->obj = aObject;
- *aHandle = drec;
- }
-
-int __cxa_atexit ( void (*aDtor)(void *), void *aObject, dso_handle aHandle )
- {
- __aeabi_atexit(aObject, aDtor, aHandle);
-
- // This is what the C++ GABI spec says to do!!
- if (*aHandle < &dtor_rec[0])
- return -1;
- return 0;
- }
-
-void __cxa_finalize ( dso_handle d )
- {
- dtd * drec = * d;
- dtd * lim = &dtor_rec[MAX_DTOR_RECORDS];
- while (drec < lim)
- {
- drec->dtor(drec->obj);
- drec++;
- }
- *d = drec;
- }
-
-void run_static_dtors (void)
- {
- __cxa_finalize(&__dso_handle);
- }
-}
-
--- a/kernel/eka/compsupp/rvct2_1/ucppinit.cpp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +0,0 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// toplevel initialization/destruction routines for 'user side' code compiled
-// with the ARMEDG compiler. intended for static linking
-//
-//
-
-#include "cppinit.h"
-
-NUKE_SYMBOL(__call_ctors(void));
-NUKE_SYMBOL(__call_dtors(void));
-
-extern "C" {
-// linker symbols
-__weak PFV C$$pi_ctorvec$$Base;
-__weak PFV C$$pi_ctorvec$$Limit;
-__weak void _fp_init(void);
-
-
-// This calls each of the compiler constructed functions referenced from pi_ctorvec.
-// These functions arrange to 'call' the appropriate constructor for the 'static' instance
-// (in fact the call may be inlined). If the class of the instance has a destructor then
-// compiler records that this object needs 'destructing' at 'exit' time. It does this by
-// calling the function __cxa_atexit. We provide our own definition of this.
-//
-void __cpp_initialise(void)
- {
- void (*fp_init_fn)(void) = _fp_init;
- if (fp_init_fn) fp_init_fn();
- PFV * ctor_vec = &C$$pi_ctorvec$$Base;
- PFV * ctor_limit = &C$$pi_ctorvec$$Limit;
- for(; ctor_vec < ctor_limit; ctor_vec++) (RELOCATE(ctor_vec, PFV))();
- }
-}
-
-
-
-
-
--- a/kernel/eka/compsupp/rvct2_1/ucppinit_aeabi.cpp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,136 +0,0 @@
-// Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// toplevel initialization/destruction routines for 'user side' code compiled
-// with the ARMCC EABI compiler. intended for static linking
-//
-//
-
-extern "C" {
-
-// This calls each of the compiler constructed functions referenced from pi_ctorvec.
-// These functions arrange to 'call' the appropriate constructor for the 'static' instance
-// (in fact the call may be inlined). If the class of the instance has a destructor then
-// compiler records that this object needs 'destructing' at 'exit' time. It does this by
-// calling the function __cxa_atexit. We provide our own definition of this.
-//
-// This is the EABI compliant version - it uses .init_array rather than C$$pi_ctorvec
-// which means we need to do via assembler :-(
-
-#ifdef __thumb
- __asm void __cpp_initialize__aeabi_(void)
- {
- CODE16
-#ifndef _NO_FP
- IMPORT _fp_init [WEAK]
-#endif
- IMPORT |.init_array$$Base| [WEAK]
- IMPORT |.init_array$$Limit| [WEAK]
-
- // export std::nothrow from here
- EXPORT _ZSt7nothrow
-
-#ifndef _NO_FP
- LDR r0,fpinit
-#endif
- PUSH {r4-r6,r14}
-#ifndef _NO_FP
- CMP r0,#0
- BEQ skip
- BL _fp_init ;
-skip
-#endif
- LDR r4,base
- LDR r5,limit
- B check
-loop
- LDR r0,[r4,#0]
- ADD r0,r0,r4
-
- BLX r0
- ADD r4,#4
-check
- CMP r4,r5
- BCC loop
- POP {r4-r6,pc}
-
-#ifndef _NO_FP
-fpinit
- DCD _fp_init
-#endif
-
-// cheat - saved a whole 4 bytes!!! - value is never user
-_ZSt7nothrow
-base
- DCD |.init_array$$Base|
-limit
- DCD |.init_array$$Limit|
-
- }
-
-#else
- __asm void __cpp_initialize__aeabi_(void)
- {
- CODE32
-#ifndef _NO_FP
- IMPORT _fp_init [WEAK]
-#endif
- IMPORT |.init_array$$Base| [WEAK]
- IMPORT |.init_array$$Limit| [WEAK]
-
- // export std::nothrow from here
- EXPORT _ZSt7nothrow
-
-#ifndef _NO_FP
- LDR r0, fpinit
-#endif
- STMFD r13!,{r3-r5,r14}
-#ifndef _NO_FP
- CMP r0, #0
- BEQ skip
- BL _fp_init
-skip
-#endif
- LDR r4,base
- LDR r5,limit
- CMP r4,r5
- LDMEQFD r13!,{r3-r5,pc}
-loop
- LDR r0,[r4,#0]
- ADR r14,ret
- ADD r0,r0,r4
- MOV pc,r0
-ret
- ADD r4,r4,#4
- CMP r4,r5
- BNE loop
- LDMFD r13!,{r3-r5,pc}
-
-#ifndef _NO_FP
-fpinit
- DCD _fp_init
-#endif
-
-base
- DCD |.init_array$$Base|
-limit
- DCD |.init_array$$Limit|
-
-// cheat - defining this here saves a whole 4 bytes!!! - value is never user
-_ZSt7nothrow
-
- }
-#endif
-
-}
-
--- a/kernel/eka/compsupp/rvct2_1/usrt.mmp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +0,0 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// USRT.MPP
-//
-//
-
-TARGET usrt.lib
-
-TARGETTYPE lib
-
-SOURCEPATH .
-
-#ifndef MARM_ARMV4
-SOURCE callviar0.cpp callviar1.cpp callviar2.cpp callviar3.cpp
-SOURCE callviar4.cpp callviar5.cpp callviar6.cpp callviar7.cpp
-#endif
-
-SOURCE ucppinit_aeabi.cpp ucppfini.cpp
-// This will be overriden by .exps
-SOURCE dllexp.cpp
-
-SOURCEPATH ../symaehabi
-SOURCE callfirstprocessfn.cpp
-
-START ARMCC
-ARMINC
-ARMRT
-END
-
-VENDORID 0x70000001
--- a/kernel/eka/compsupp/rvct2_1/usrt2_1.mmp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +0,0 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// USRT.MPP
-//
-//
-
-TARGET usrt2_1.lib
-
-TARGETTYPE lib
-
-SOURCEPATH .
-
-#ifndef MARM_ARMV4
-SOURCE callviar0.cpp callviar1.cpp callviar2.cpp callviar3.cpp
-SOURCE callviar4.cpp callviar5.cpp callviar6.cpp callviar7.cpp
-#endif
-
-SOURCE ucppinit_aeabi.cpp ucppfini.cpp
-// This will be overriden by .exps
-SOURCE dllexp.cpp
-
-SOURCEPATH ../symaehabi
-SOURCE callfirstprocessfn.cpp
-
-START ARMCC
-ARMINC
-ARMRT
-END
-
-VENDORID 0x70000001
--- a/kernel/eka/compsupp/rvct2_2/aeabidiv0.cpp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-
-#include <e32std.h>
-#include <e32std_private.h>
-
-extern "C" {
-
-IMPORT_C void __rt_div0();
-
-EXPORT_C int __aeabi_idiv0 (int return_value)
- {
- __rt_div0();
- return return_value;
- }
-
-EXPORT_C long long __aeabi_ldiv0 (long long return_value)
- {
- __rt_div0();
- return return_value;
- }
-
-}
--- a/kernel/eka/compsupp/rvct2_2/aeabimem.cia Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,65 +0,0 @@
-// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-
-#include <e32cmn.h>
-
-// Call our implementations of memcpy/move/set/clr rather than the ARM supplied
-// ones.
-//
-// Note that the AEABI switched the order of arg2 and arg3 to save an intruction
-// when calling 'memset' from 'memclr'.
-//
-// Prototypes are:
-// void __aeabi_memset8(TAny* aTrg, unsigned int aLength, TInt aValue);
-// void __aeabi_memset4(TAny* aTrg, unsigned int aLength, TInt aValue);
-// void __aeabi_memset(TAny* aTrg, unsigned int aLength, TInt aValue);
-
-extern "C" __NAKED__ void make_mem_functions_call_euser_versions()
- {
- asm(".global __aeabi_memset8 ");
- asm("__aeabi_memset8: ");
- asm(".global __aeabi_memset4 ");
- asm("__aeabi_memset4: ");
- asm(".global __aeabi_memset ");
- asm("__aeabi_memset: ");
- asm(" mov r3, r1 ");
- asm(" mov r1, r2 ");
- asm(" mov r2, r3 ");
- asm(" b memset ");
-
- asm(".global __aeabi_memclr8 ");
- asm("__aeabi_memclr8: ");
- asm(".global __aeabi_memclr4 ");
- asm("__aeabi_memclr4: ");
- asm(".global __aeabi_memclr ");
- asm("__aeabi_memclr: ");
- asm(" b memclr ");
-
- asm(".global __aeabi_memcpy8 ");
- asm("__aeabi_memcpy8: ");
- asm(".global __aeabi_memcpy4 ");
- asm("__aeabi_memcpy4: ");
- asm(".global __aeabi_memcpy ");
- asm("__aeabi_memcpy: ");
- asm(" b memcpy ");
-
- asm(".global __aeabi_memmove8 ");
- asm("__aeabi_memmove8: ");
- asm(".global __aeabi_memmove4 ");
- asm("__aeabi_memmove4: ");
- asm(".global __aeabi_memmove ");
- asm("__aeabi_memmove: ");
- asm(" b memmove ");
- }
--- a/kernel/eka/compsupp/rvct2_2/callviar0.cpp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-
-extern "C"
-{
-__asm void __ARM_call_via_r0()
- {
- CODE32
- BX r0
- }
-}
--- a/kernel/eka/compsupp/rvct2_2/callviar1.cpp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-
-extern "C"
-{
-__asm void __ARM_call_via_r1()
- {
- CODE32
- BX r1
- }
-}
--- a/kernel/eka/compsupp/rvct2_2/callviar2.cpp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-
-extern "C"
-{
-__asm void __ARM_call_via_r2()
- {
- CODE32
- BX r2
- }
-}
--- a/kernel/eka/compsupp/rvct2_2/callviar3.cpp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-
-extern "C"
-{
-__asm void __ARM_call_via_r3()
- {
- CODE32
- BX r3
- }
-}
--- a/kernel/eka/compsupp/rvct2_2/callviar4.cpp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-
-extern "C"
-{
-__asm void __ARM_call_via_r4()
- {
- CODE32
- BX r4
- }
-}
--- a/kernel/eka/compsupp/rvct2_2/callviar5.cpp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-
-extern "C"
-{
-__asm void __ARM_call_via_r5()
- {
- CODE32
- BX r5
- }
-}
--- a/kernel/eka/compsupp/rvct2_2/callviar6.cpp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-
-extern "C"
-{
-__asm void __ARM_call_via_r6()
- {
- CODE32
- BX r6
- }
-}
--- a/kernel/eka/compsupp/rvct2_2/callviar7.cpp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-
-extern "C"
-{
-__asm void __ARM_call_via_r7()
- {
- CODE32
- BX r7
- }
-}
--- a/kernel/eka/compsupp/rvct2_2/cppinit.h Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +0,0 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-
-/**
- @file
- @internalComponent
-*/
-
-#ifndef _CPPINIT_H_
-#define _CPPINIT_H_
-extern "C" {
-
-// Doing it like this means no space is taken by the symbols
-#define NUKE_SYMBOL(sig) __asm void sig {}
-typedef void (*PFV)();
-typedef void (DTOR)(void *);
-#define RELOCATE(loc, type) (type)((int)loc + (int)*loc)
-
-typedef struct dtd
-{
-// dtd * prev;
- void * obj;
- DTOR * dtor;
-} dtd;
-
-//extern void run_static_ctors (void);
-extern void run_static_dtors (void);
-
-}
-
-#endif
--- a/kernel/eka/compsupp/rvct2_2/dfpaeabi.cpp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,96 +0,0 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// This function is simple a way to get these EXPORT statements into
-// the .in file. These symbols will therefore be referenced from
-// the export table and so **forced** into the DLL
-//
-//
-
-__asm void __rt_exporter_dummy(void)
-{
- AREA |.directive|, READONLY, NOALLOC
-
- PRESERVE8
-
- DCB "#<SYMEDIT>#\n"
-
-/// Standard double precision floating-point arithmetic helper functions
-
- DCB "EXPORT __aeabi_dadd\n"
- DCB "EXPORT __aeabi_ddiv\n"
- DCB "EXPORT __aeabi_dmul\n"
- DCB "EXPORT __aeabi_dneg\n"
- DCB "EXPORT __aeabi_drsub\n"
- DCB "EXPORT __aeabi_dsub\n"
-
-/// Standard double precision floating-point comparison helper functions
-
- DCB "EXPORT __aeabi_cdcmpeq\n"
- DCB "EXPORT __aeabi_cdcmple\n"
- DCB "EXPORT __aeabi_cdrcmple\n"
- DCB "EXPORT __aeabi_dcmpeq\n"
- DCB "EXPORT __aeabi_dcmplt\n"
- DCB "EXPORT __aeabi_dcmple\n"
- DCB "EXPORT __aeabi_dcmpge\n"
- DCB "EXPORT __aeabi_dcmpgt\n"
- DCB "EXPORT __aeabi_dcmpun\n"
-
-/// Standard single precision floating-point arithmetic helper functions
-
- DCB "EXPORT __aeabi_fadd\n"
- DCB "EXPORT __aeabi_fdiv\n"
- DCB "EXPORT __aeabi_fmul\n"
- DCB "EXPORT __aeabi_fneg\n"
- DCB "EXPORT __aeabi_frsub\n"
- DCB "EXPORT __aeabi_fsub\n"
-
-/// Standard single precision floating-point comparison helper functions
-
- DCB "EXPORT __aeabi_cfcmpeq\n"
- DCB "EXPORT __aeabi_cfcmple\n"
- DCB "EXPORT __aeabi_cfrcmple\n"
- DCB "EXPORT __aeabi_fcmpeq\n"
- DCB "EXPORT __aeabi_fcmplt\n"
- DCB "EXPORT __aeabi_fcmple\n"
- DCB "EXPORT __aeabi_fcmpge\n"
- DCB "EXPORT __aeabi_fcmpgt\n"
- DCB "EXPORT __aeabi_fcmpun\n"
-
-/// Standard floating-point to integer conversions
-
- DCB "EXPORT __aeabi_d2iz\n"
- DCB "EXPORT __aeabi_d2uiz\n"
- DCB "EXPORT __aeabi_d2lz\n"
- DCB "EXPORT __aeabi_d2ulz\n"
- DCB "EXPORT __aeabi_f2iz\n"
- DCB "EXPORT __aeabi_f2uiz\n"
- DCB "EXPORT __aeabi_f2lz\n"
- DCB "EXPORT __aeabi_f2ulz\n"
-
-/// Standard conversions between floating types
-
- DCB "EXPORT __aeabi_d2f\n"
- DCB "EXPORT __aeabi_f2d\n"
-
-/// Standard integer to floating-point conversions
-
- DCB "EXPORT __aeabi_i2d\n"
- DCB "EXPORT __aeabi_ui2d\n"
- DCB "EXPORT __aeabi_l2d\n"
- DCB "EXPORT __aeabi_ul2d\n"
- DCB "EXPORT __aeabi_i2f\n"
- DCB "EXPORT __aeabi_ui2f\n"
- DCB "EXPORT __aeabi_l2f\n"
- DCB "EXPORT __aeabi_ul2f\n"
-}
--- a/kernel/eka/compsupp/rvct2_2/dfpaeabi.mmp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
-// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-
-#include "dfpaeabi_common.mmh"
-
-TARGET dfpaeabi.dll
-START ARMCC
-// we want the 'pure' versions to go with softvfp
-#ifdef MARM_ARMV5
-ARMLIBS f_t_p.l
-#else
-ARMLIBS f_a_p.l
-#endif
-END
-
-unpagedcode
--- a/kernel/eka/compsupp/rvct2_2/dfpaeabi_common.mmh Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-
-TARGETTYPE dll
-
-SOURCEPATH .
-SOURCE dfpaeabi.cpp
-// dummy for now, needs to go away
-//SOURCE rte32dll.cpp
-
-OS_LAYER_SYSTEMINCLUDE_SYMBIAN
-#ifdef SYMBIAN_OLD_EXPORT_LOCATION
-SYSTEMINCLUDE ../../include
-#endif
-
-START ARMCC
-//ARMRT - would like to be able to say this but there circularity with EUSER (argghhh!!!)
-ARMINC
-#ifdef MARM_ARMV5
-ARMLIBS c_t__un.l
-#else
-ARMLIBS c_a__un.l
-#endif
-END
-
-capability all
-
-VENDORID 0x70000001
-
-SMPSAFE
--- a/kernel/eka/compsupp/rvct2_2/dfpaeabi_vfpv2.mmp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
-// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-
-#include "dfpaeabi_common.mmh"
-
-TARGET dfpaeabi_vfpv2.dll
-LINKAS dfpaeabi.dll
-NOEXPORTLIBRARY
-START ARMCC
-ARMRT
-// we want the vfpv2 supporting versions
-#ifdef MARM_ARMV5
-ARMLIBS f_tvp.l
-#else
-ARMLIBS f_avp.l
-#endif
-END
-
-unpagedcode
--- a/kernel/eka/compsupp/rvct2_2/dfprvct2_2-thunk.cpp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,71 +0,0 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// dfprvct2_1-thunk.cpp
-// Thunks for RVCT synonyms for AEABI functions
-//
-//
-
-extern "C" double __aeabi_l2d(long long val);
-extern "C" double __aeabi_ul2d(unsigned long long val);
-extern "C" long long __aeabi_d2lz(double val);
-extern "C" unsigned long long __aeabi_d2ulz(double val);
-extern "C" float __aeabi_l2f(long long val);
-extern "C" float __aeabi_ul2f(unsigned long long val);
-extern "C" long long __aeabi_f2lz(float val);
-extern "C" unsigned long long __aeabi_f2ulz(float val);
-
-extern "C"
-{
-
-__declspec(dllexport) double _ll_sto_d(long long val)
- {
- return __aeabi_l2d(val);
- }
-
-__declspec(dllexport) double _ll_usto_d(unsigned long long val)
- {
- return __aeabi_ul2d(val);
- }
-
-__declspec(dllexport) long long _ll_sfrom_d(double val)
- {
- return __aeabi_d2lz(val);
- }
-
-__declspec(dllexport) unsigned long long _ll_usfrom_d(double val)
- {
- return __aeabi_d2ulz(val);
- }
-
-__declspec(dllexport) float _ll_sto_f(long long val)
- {
- return __aeabi_l2d(val);
- }
-
-__declspec(dllexport) float _ll_usto_f(unsigned long long val)
- {
- return __aeabi_ul2d(val);
- }
-
-__declspec(dllexport) long long _ll_sfrom_f(float val)
- {
- return __aeabi_d2lz(val);
- }
-
-__declspec(dllexport) unsigned long long _ll_usfrom_f(float val)
- {
- return __aeabi_d2ulz(val);
- }
-
-};
--- a/kernel/eka/compsupp/rvct2_2/dfprvct2_2-thunk.mmp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// dfprvct2_1-thunk.mmp
-//
-//
-
-target dfprvct2_2-thunk.dll
-
-targettype dll
-
-sourcepath .
-source dfprvct2_2-thunk.cpp
-OS_LAYER_SYSTEMINCLUDE_SYMBIAN
-
-library dfpaeabi.lib
-
-start armcc
-armrt
-end // armcc
-
-option armcc --no_exceptions --no_exceptions_unwind
-
-capability all
-vendorid 0x70000001
-
-unpagedcode
-
-SMPSAFE
--- a/kernel/eka/compsupp/rvct2_2/dfprvct2_2.cpp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,82 +0,0 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// DFPRVCT2_1.CPP
-// This function is simple a way to get these EXPORT statements into
-// the .in file. These symbols will therefore be referenced from
-// the export table and so **forced** into the DLL
-//
-//
-
-__asm void __rt_exporter_dummy(void)
-{
- AREA |.directive|, READONLY, NOALLOC
-
- PRESERVE8
-
- DCB "#<SYMEDIT>#\n"
- // From %ARMLIB%\armlib\f_a_p.l
-
- DCB "EXPORT _dfix_r\n"
- DCB "EXPORT _dfixu_r\n"
- DCB "EXPORT _ffix_r\n"
- DCB "EXPORT _ffixu_r\n"
- DCB "EXPORT _ll_sfrom_d\n"
- DCB "EXPORT _ll_ufrom_d\n"
- DCB "EXPORT _ll_sfrom_f\n"
- DCB "EXPORT _ll_ufrom_f\n"
- DCB "EXPORT _ll_sfrom_d_r\n"
- DCB "EXPORT _ll_ufrom_d_r\n"
- DCB "EXPORT _ll_sfrom_f_r\n"
- DCB "EXPORT _ll_ufrom_f_r\n"
-
- DCB "EXPORT _ll_sto_d\n"
- DCB "EXPORT _ll_uto_d\n"
- DCB "EXPORT _ll_sto_f\n"
- DCB "EXPORT _ll_uto_f\n"
-
- DCB "EXPORT _dcmpge\n"
- DCB "EXPORT _fcmpge\n"
-
- DCB "EXPORT _dneq\n" // dcmp.o
- DCB "EXPORT _fneq\n" // fcmp.o
-
- DCB "EXPORT _drem\n" // drem.o
- DCB "EXPORT _drnd\n" // drnd.o
- DCB "EXPORT _frem\n" // frem.o
- DCB "EXPORT _frnd\n" // frnd.o
-
- DCB "EXPORT _dabs\n" // basic.o
- DCB "EXPORT _fabs\n" // basic.o
-
-
- DCB "EXPORT __dcmp4\n" // dcmp.o
- DCB "EXPORT _dcmp4\n" // dcmp.o
- DCB "EXPORT __fcmp4\n" // fcmp4.o
- DCB "EXPORT _fcmp4\n" // fcmp4.o
-
- DCB "EXPORT _drdiv\n" // ddiv.o
- DCB "EXPORT _frdiv\n" // fdiv.o
-
- DCB "EXPORT _dfltu\n" // dflt.o
- DCB "EXPORT _dflt\n" // dflt.o
- DCB "EXPORT _ffltu\n" // fflt.o
- DCB "EXPORT _fflt\n" // fflt.o
-
- DCB "EXPORT _dsqrt\n" // dsqrt.o
- DCB "EXPORT _fsqrt\n" // fsqrt.o
-
- DCB "EXPORT __ARM_scalbn\n" // scalbn_noclz.o
- DCB "EXPORT __ARM_scalbnf\n" // scalbnf_noclz.o
-
-}
--- a/kernel/eka/compsupp/rvct2_2/dfprvct2_2.mmp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
-// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-
-#include "dfprvct2_2_common.mmh"
-
-target dfprvct2_2.dll
-
-OS_LAYER_SYSTEMINCLUDE_SYMBIAN
-
-start armcc
-// we want the 'pure' versions to go with softvfp
-#ifdef MARM_ARMV5
-armlibs f_t_p.l g_t_p.l
-#else //!MARM_ARMV5
-armlibs f_a_p.l g_a_p.l
-#endif //MARM_ARMV5
-end // armcc
-
-unpagedcode
--- a/kernel/eka/compsupp/rvct2_2/dfprvct2_2_common.mmh Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +0,0 @@
-// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// dfprvct2_2_common.mmp
-//
-//
-
-targettype dll
-
-sourcepath .
-source dfprvct2_2.cpp
-
-// yuk
-library euser.lib
-
-library scppnwdl.lib drtrvct2_2.lib
-
-option armcc --no_exceptions --no_exceptions_unwind
-
-start armcc
-armrt
-#ifdef MARM_ARMV5
-armlibs c_t__un.l
-#else //!MARM_ARMV5
-armlibs c_a__un.l
-#endif //MARM_ARMV5
-end // armcc
-
-capability all
-
-vendorid 0x70000001
-
-SMPSAFE
--- a/kernel/eka/compsupp/rvct2_2/dfprvct2_2_vfpv2.mmp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-
-#include "dfprvct2_2_common.mmh"
-
-OS_LAYER_SYSTEMINCLUDE_SYMBIAN
-
-target dfprvct2_2_vfpv2.dll
-linkas dfprvct2_2.dll
-noexportlibrary
-start armcc
-// we want the vfpv2 supporting versions
-#ifdef MARM_ARMV5
-armlibs f_tvp.l g_tvp.l
-#else //!MARM_ARMV5
-armlibs f_avp.l g_avp.l
-#endif //MARM_ARMV5
-end // armcc
-
-unpagedcode
--- a/kernel/eka/compsupp/rvct2_2/dllexp.cpp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,21 +0,0 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-
-extern "C" {
-
-// This will overridden .exp files
-void __DLL_Export_Table__(){};
-
-}
--- a/kernel/eka/compsupp/rvct2_2/drtaeabi.cpp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,416 +0,0 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-
-extern char * _ZTVN10__cxxabiv123__fundamental_type_infoE;
-extern const char * const $Sub$$_ZTSv = "v";
-
-
-// This function is simple a way to get these EXPORT statements into
-// the .in file. These symbols will therefore be referenced from
-// the export table and so **forced** into the DLL
-__asm void __rt_exporter_dummy(void)
-{
- EXTERN _ZTVN10__cxxabiv123__fundamental_type_infoE
- EXTERN _ZTSv
- EXPORT |$Sub$$_ZTIv|
-|$Sub$$_ZTIv|
- DCD _ZTVN10__cxxabiv123__fundamental_type_infoE
- DCD _ZTSv
-
- AREA |.directive|, READONLY, NOALLOC
-
- PRESERVE8
-
- DCB "#<SYMEDIT>#\n"
- // Long long functions
- DCB "EXPORT __aeabi_lmul\n"
- DCB "EXPORT __aeabi_ldivmod\n"
- DCB "EXPORT __aeabi_uldivmod\n"
- DCB "EXPORT __aeabi_llsl\n"
- DCB "EXPORT __aeabi_llsr\n"
- DCB "EXPORT __aeabi_lasr\n"
- DCB "EXPORT __aeabi_lcmp\n"
- DCB "EXPORT __aeabi_ulcmp\n"
-
- // Integer division functions
- DCB "EXPORT __aeabi_idiv\n"
- DCB "EXPORT __aeabi_uidiv\n"
-
- // Integer (32/32 . 32) division functions
- DCB "EXPORT __aeabi_idivmod\n"
- DCB "EXPORT __aeabi_uidivmod\n"
-
- // Division by Zero
- // SIGFPE not supported on SymbianOS
- // Implemented in rtdiv0.cpp
- DCB "EXPORT __aeabi_idiv0\n"
- DCB "EXPORT __aeabi_ldiv0\n"
-
- // Unaligned memory access
- DCB "EXPORT __aeabi_uread4\n"
- DCB "EXPORT __aeabi_uwrite4\n"
- DCB "EXPORT __aeabi_uread8\n"
- DCB "EXPORT __aeabi_uwrite8\n"
-
- // Memory copying, clearing, and setting
- // we may want to override the toolchain supplied versions of these (or not)
- DCB "EXPORT __aeabi_memcpy8\n"
- DCB "EXPORT __aeabi_memcpy4\n"
- DCB "EXPORT __aeabi_memcpy\n"
- DCB "EXPORT __aeabi_memmove8\n"
- DCB "EXPORT __aeabi_memmove4\n"
- DCB "EXPORT __aeabi_memmove\n"
-
- DCB "EXPORT __aeabi_memset8\n"
- DCB "EXPORT __aeabi_memset4\n"
- DCB "EXPORT __aeabi_memset\n"
- DCB "EXPORT __aeabi_memclr8\n"
- DCB "EXPORT __aeabi_memclr4\n"
- DCB "EXPORT __aeabi_memclr\n"
-
- // C++ helper functions
-
- // Pure virtual call
- DCB "EXPORT __cxa_pure_virtual\n"
-
- // One-time construction API
- DCB "EXPORT __cxa_guard_acquire\n"
- DCB "EXPORT __cxa_guard_release\n"
- DCB "EXPORT __cxa_guard_abort\n"
-
- // Construction and destruction of arrays
-
- // Helper functions defined by the generic C++ ABI
- DCB "EXPORT __cxa_vec_new\n"
- DCB "EXPORT __cxa_vec_new2\n"
- DCB "EXPORT __cxa_vec_new3\n"
- DCB "EXPORT __cxa_vec_ctor\n"
- DCB "EXPORT __cxa_vec_dtor\n"
- DCB "EXPORT __cxa_vec_cleanup\n"
- DCB "EXPORT __cxa_vec_delete\n"
- DCB "EXPORT __cxa_vec_delete2\n"
- DCB "EXPORT __cxa_vec_delete3\n"
- DCB "EXPORT __cxa_vec_cctor\n"
-
- // Helper functions defined by the C++ ABI for the ARM Architecture
- DCB "EXPORT __aeabi_vec_ctor_nocookie_nodtor\n"
- DCB "EXPORT __aeabi_vec_ctor_cookie_nodtor\n"
- DCB "EXPORT __aeabi_vec_cctor_nocookie_nodtor\n"
- DCB "EXPORT __aeabi_vec_new_cookie_noctor\n"
- DCB "EXPORT __aeabi_vec_new_nocookie\n"
- DCB "EXPORT __aeabi_vec_new_cookie_nodtor\n"
- DCB "EXPORT __aeabi_vec_new_cookie\n"
- DCB "EXPORT __aeabi_vec_dtor\n"
- DCB "EXPORT __aeabi_vec_dtor_cookie\n"
- DCB "EXPORT __aeabi_vec_delete\n"
- DCB "EXPORT __aeabi_vec_delete3\n"
- DCB "EXPORT __aeabi_vec_delete3_nodtor\n"
-
- // Object finalization
- // these need SymbianOS specific implementations
- // implemented in ucppfini.cpp
- // and supplied by usrt.lib
-#if 0
- DCB "EXPORT __cxa_atexit\n"
- DCB "EXPORT __aeabi_atexit\n"
- DCB "EXPORT __cxa_finalize\n"
-#endif
-
-/// Exception Support from here. Not needed by system side code.
-#ifndef __KERNEL_MODE__
- // Standard (user-visible) C++ exception related functions
- DCB "EXPORT _ZSt9terminatev\n"
- DCB "EXPORT _ZSt10unexpectedv\n"
- DCB "EXPORT _ZSt18uncaught_exceptionv\n"
- DCB "EXPORT _ZSt13set_terminatePFvvE\n"
- DCB "EXPORT _ZSt14set_unexpectedPFvvE\n"
-
- DCB "EXPORT abort\n"
-
- // Exception-handling support
- DCB "EXPORT __cxa_allocate_exception\n"
- DCB "EXPORT __cxa_free_exception\n"
- DCB "EXPORT __cxa_throw\n"
- DCB "EXPORT __cxa_rethrow\n"
- DCB "EXPORT __cxa_begin_catch\n"
- DCB "EXPORT __cxa_end_catch\n"
- DCB "EXPORT __cxa_end_cleanup\n"
-
- // personality routines for ARM compact EH entries
- DCB "EXPORT __aeabi_unwind_cpp_pr0\n"
- DCB "EXPORT __aeabi_unwind_cpp_pr1\n"
- DCB "EXPORT __aeabi_unwind_cpp_pr2\n"
-
- // Unwinder helper routines
- DCB "EXPORT _Unwind_VRS_Get\n"
- DCB "EXPORT _Unwind_VRS_Set\n"
- DCB "EXPORT _Unwind_VRS_Pop\n"
-
- // personality routine helper functions
- DCB "EXPORT __cxa_begin_cleanup\n"
-
- // this needs SymbianOS specific implementation
- DCB "EXPORT __cxa_type_match\n"
-
- // this needs SymbianOS specific implementation
- DCB "EXPORT __cxa_call_terminate\n"
-
- DCB "EXPORT __cxa_call_unexpected\n"
-
- // Miscellaneous error handling related to exception processing
- DCB "EXPORT __cxa_bad_cast\n"
- DCB "EXPORT __cxa_bad_typeid\n"
-
-
- // this needs SymbianOS specific implementation
- DCB "EXPORT __cxa_get_globals\n"
-
- // this needs SymbianOS specific implementation
- DCB "EXPORT __cxa_current_exception_type\n"
-
-
- // rtti support from rtti.o
- DCB "EXPORT __dynamic_cast\n"
- DCB "EXPORT __get_typeid\n"
- DCB "EXPORT __ARM_get_typeid\n"
-
- // Standard typeinfo
- DCB "EXPORT _ZNSt9type_infoD1Ev\n"
- DCB "EXPORT _ZNSt9type_infoD2Ev\n"
- DCB "EXPORT _ZNSt9type_infoD0Ev\n"
- DCB "EXPORT _ZNKSt9type_info4nameEv\n"
- DCB "EXPORT _ZNKSt9type_infoeqERKS_\n"
- DCB "EXPORT _ZNKSt9type_infoneERKS_\n"
- DCB "EXPORT _ZNKSt9type_info6beforeERKS_\n"
- DCB "EXPORT _ZNSt8bad_castC1Ev\n"
- DCB "EXPORT _ZNSt8bad_castC2Ev\n"
- DCB "EXPORT _ZNSt8bad_castC1ERKS_\n"
- DCB "EXPORT _ZNSt8bad_castC2ERKS_\n"
- DCB "EXPORT _ZNSt8bad_castaSERKS_\n"
- DCB "EXPORT _ZNSt8bad_castD1Ev\n"
- DCB "EXPORT _ZNSt8bad_castD2Ev\n"
- DCB "EXPORT _ZNSt8bad_castD0Ev\n"
- DCB "EXPORT _ZNKSt8bad_cast4whatEv\n"
- DCB "EXPORT _ZNSt10bad_typeidC1Ev\n"
- DCB "EXPORT _ZNSt10bad_typeidC2Ev\n"
- DCB "EXPORT _ZNSt10bad_typeidC1ERKS_\n"
- DCB "EXPORT _ZNSt10bad_typeidC2ERKS_\n"
- DCB "EXPORT _ZNSt10bad_typeidaSERKS_\n"
- DCB "EXPORT _ZNSt10bad_typeidD1Ev\n"
- DCB "EXPORT _ZNSt10bad_typeidD2Ev\n"
- DCB "EXPORT _ZNSt10bad_typeidD0Ev\n"
- DCB "EXPORT _ZNKSt10bad_typeid4whatEv\n"
- DCB "EXPORT _ZN10__cxxabiv123__fundamental_type_infoD1Ev\n"
- DCB "EXPORT _ZN10__cxxabiv123__fundamental_type_infoD2Ev\n"
- DCB "EXPORT _ZN10__cxxabiv123__fundamental_type_infoD0Ev\n"
- DCB "EXPORT _ZN10__cxxabiv117__array_type_infoD1Ev\n"
- DCB "EXPORT _ZN10__cxxabiv117__array_type_infoD2Ev\n"
- DCB "EXPORT _ZN10__cxxabiv117__array_type_infoD0Ev\n"
- DCB "EXPORT _ZN10__cxxabiv120__function_type_infoD1Ev\n"
- DCB "EXPORT _ZN10__cxxabiv120__function_type_infoD2Ev\n"
- DCB "EXPORT _ZN10__cxxabiv120__function_type_infoD0Ev\n"
- DCB "EXPORT _ZN10__cxxabiv116__enum_type_infoD1Ev\n"
- DCB "EXPORT _ZN10__cxxabiv116__enum_type_infoD2Ev\n"
- DCB "EXPORT _ZN10__cxxabiv116__enum_type_infoD0Ev\n"
- DCB "EXPORT _ZN10__cxxabiv117__class_type_infoD1Ev\n"
- DCB "EXPORT _ZN10__cxxabiv117__class_type_infoD2Ev\n"
- DCB "EXPORT _ZN10__cxxabiv117__class_type_infoD0Ev\n"
- DCB "EXPORT _ZN10__cxxabiv120__si_class_type_infoD1Ev\n"
- DCB "EXPORT _ZN10__cxxabiv120__si_class_type_infoD2Ev\n"
- DCB "EXPORT _ZN10__cxxabiv120__si_class_type_infoD0Ev\n"
- DCB "EXPORT _ZN10__cxxabiv121__vmi_class_type_infoD1Ev\n"
- DCB "EXPORT _ZN10__cxxabiv121__vmi_class_type_infoD2Ev\n"
- DCB "EXPORT _ZN10__cxxabiv121__vmi_class_type_infoD0Ev\n"
- DCB "EXPORT _ZN10__cxxabiv117__pbase_type_infoD1Ev\n"
- DCB "EXPORT _ZN10__cxxabiv117__pbase_type_infoD2Ev\n"
- DCB "EXPORT _ZN10__cxxabiv117__pbase_type_infoD0Ev\n"
- DCB "EXPORT _ZN10__cxxabiv119__pointer_type_infoD1Ev\n"
- DCB "EXPORT _ZN10__cxxabiv119__pointer_type_infoD2Ev\n"
- DCB "EXPORT _ZN10__cxxabiv119__pointer_type_infoD0Ev\n"
- DCB "EXPORT _ZN10__cxxabiv129__pointer_to_member_type_infoD1Ev\n"
- DCB "EXPORT _ZN10__cxxabiv129__pointer_to_member_type_infoD2Ev\n"
- DCB "EXPORT _ZN10__cxxabiv129__pointer_to_member_type_infoD0Ev\n"
- DCB "EXPORT _ZSt21__gen_dummy_typeinfosv\n"
- DCB "EXPORT _ZTVSt9type_info\n"
- DCB "EXPORT _ZTVSt8bad_cast\n"
- DCB "EXPORT _ZTVSt10bad_typeid\n"
- DCB "EXPORT _ZTIv\n"
- DCB "EXPORT _ZTVN10__cxxabiv123__fundamental_type_infoE\n"
- DCB "EXPORT _ZTIPv\n"
- DCB "EXPORT _ZTVN10__cxxabiv119__pointer_type_infoE\n"
- DCB "EXPORT _ZTIPKv\n"
- DCB "EXPORT _ZTIb\n"
- DCB "EXPORT _ZTIPb\n"
- DCB "EXPORT _ZTIPKb\n"
- DCB "EXPORT _ZTIw\n"
- DCB "EXPORT _ZTIPw\n"
- DCB "EXPORT _ZTIPKw\n"
- DCB "EXPORT _ZTIc\n"
- DCB "EXPORT _ZTIPc\n"
- DCB "EXPORT _ZTIPKc\n"
- DCB "EXPORT _ZTIa\n"
- DCB "EXPORT _ZTIPa\n"
- DCB "EXPORT _ZTIPKa\n"
- DCB "EXPORT _ZTIh\n"
- DCB "EXPORT _ZTIPh\n"
- DCB "EXPORT _ZTIPKh\n"
- DCB "EXPORT _ZTIs\n"
- DCB "EXPORT _ZTIPs\n"
- DCB "EXPORT _ZTIPKs\n"
- DCB "EXPORT _ZTIt\n"
- DCB "EXPORT _ZTIPt\n"
- DCB "EXPORT _ZTIPKt\n"
- DCB "EXPORT _ZTIi\n"
- DCB "EXPORT _ZTIPi\n"
- DCB "EXPORT _ZTIPKi\n"
- DCB "EXPORT _ZTIj\n"
- DCB "EXPORT _ZTIPj\n"
- DCB "EXPORT _ZTIPKj\n"
- DCB "EXPORT _ZTIl\n"
- DCB "EXPORT _ZTIPl\n"
- DCB "EXPORT _ZTIPKl\n"
- DCB "EXPORT _ZTIm\n"
- DCB "EXPORT _ZTIPm\n"
- DCB "EXPORT _ZTIPKm\n"
- DCB "EXPORT _ZTIx\n"
- DCB "EXPORT _ZTIPx\n"
- DCB "EXPORT _ZTIPKx\n"
- DCB "EXPORT _ZTIy\n"
- DCB "EXPORT _ZTIPy\n"
- DCB "EXPORT _ZTIPKy\n"
- DCB "EXPORT _ZTIf\n"
- DCB "EXPORT _ZTIPf\n"
- DCB "EXPORT _ZTIPKf\n"
- DCB "EXPORT _ZTId\n"
- DCB "EXPORT _ZTIPd\n"
- DCB "EXPORT _ZTIPKd\n"
- DCB "EXPORT _ZTIe\n"
- DCB "EXPORT _ZTIPe\n"
- DCB "EXPORT _ZTIPKe\n"
- DCB "EXPORT _ZTVN10__cxxabiv117__array_type_infoE\n"
- DCB "EXPORT _ZTVN10__cxxabiv120__function_type_infoE\n"
- DCB "EXPORT _ZTVN10__cxxabiv116__enum_type_infoE\n"
- DCB "EXPORT _ZTVN10__cxxabiv117__class_type_infoE\n"
- DCB "EXPORT _ZTVN10__cxxabiv120__si_class_type_infoE\n"
- DCB "EXPORT _ZTVN10__cxxabiv121__vmi_class_type_infoE\n"
- DCB "EXPORT _ZTVN10__cxxabiv117__pbase_type_infoE\n"
- DCB "EXPORT _ZTVN10__cxxabiv129__pointer_to_member_type_infoE\n"
- DCB "EXPORT _ZTSv\n"
- DCB "EXPORT _ZTSPv\n"
- DCB "EXPORT _ZTSPKv\n"
- DCB "EXPORT _ZTSb\n"
- DCB "EXPORT _ZTSPb\n"
- DCB "EXPORT _ZTSPKb\n"
- DCB "EXPORT _ZTSw\n"
- DCB "EXPORT _ZTSPw\n"
- DCB "EXPORT _ZTSPKw\n"
- DCB "EXPORT _ZTSc\n"
- DCB "EXPORT _ZTSPc\n"
- DCB "EXPORT _ZTSPKc\n"
- DCB "EXPORT _ZTSa\n"
- DCB "EXPORT _ZTSPa\n"
- DCB "EXPORT _ZTSPKa\n"
- DCB "EXPORT _ZTSh\n"
- DCB "EXPORT _ZTSPh\n"
- DCB "EXPORT _ZTSPKh\n"
- DCB "EXPORT _ZTSs\n"
- DCB "EXPORT _ZTSPs\n"
- DCB "EXPORT _ZTSPKs\n"
- DCB "EXPORT _ZTSt\n"
- DCB "EXPORT _ZTSPt\n"
- DCB "EXPORT _ZTSPKt\n"
- DCB "EXPORT _ZTSi\n"
- DCB "EXPORT _ZTSPi\n"
- DCB "EXPORT _ZTSPKi\n"
- DCB "EXPORT _ZTSj\n"
- DCB "EXPORT _ZTSPj\n"
- DCB "EXPORT _ZTSPKj\n"
- DCB "EXPORT _ZTSl\n"
- DCB "EXPORT _ZTSPl\n"
- DCB "EXPORT _ZTSPKl\n"
- DCB "EXPORT _ZTSm\n"
- DCB "EXPORT _ZTSPm\n"
- DCB "EXPORT _ZTSPKm\n"
- DCB "EXPORT _ZTSx\n"
- DCB "EXPORT _ZTSPx\n"
- DCB "EXPORT _ZTSPKx\n"
- DCB "EXPORT _ZTSy\n"
- DCB "EXPORT _ZTSPy\n"
- DCB "EXPORT _ZTSPKy\n"
- DCB "EXPORT _ZTSf\n"
- DCB "EXPORT _ZTSPf\n"
- DCB "EXPORT _ZTSPKf\n"
- DCB "EXPORT _ZTSd\n"
- DCB "EXPORT _ZTSPd\n"
- DCB "EXPORT _ZTSPKd\n"
- DCB "EXPORT _ZTSe\n"
- DCB "EXPORT _ZTSPe\n"
- DCB "EXPORT _ZTSPKe\n"
- DCB "EXPORT _ZTISt9type_info\n"
- DCB "EXPORT _ZTISt8bad_cast\n"
- DCB "EXPORT _ZTISt10bad_typeid\n"
- DCB "EXPORT _ZTIN10__cxxabiv123__fundamental_type_infoE\n"
- DCB "EXPORT _ZTIN10__cxxabiv117__array_type_infoE\n"
- DCB "EXPORT _ZTIN10__cxxabiv120__function_type_infoE\n"
- DCB "EXPORT _ZTIN10__cxxabiv116__enum_type_infoE\n"
- DCB "EXPORT _ZTIN10__cxxabiv117__class_type_infoE\n"
- DCB "EXPORT _ZTIN10__cxxabiv120__si_class_type_infoE\n"
- DCB "EXPORT _ZTIN10__cxxabiv121__vmi_class_type_infoE\n"
- DCB "EXPORT _ZTIN10__cxxabiv117__pbase_type_infoE\n"
- DCB "EXPORT _ZTIN10__cxxabiv119__pointer_type_infoE\n"
- DCB "EXPORT _ZTIN10__cxxabiv129__pointer_to_member_type_infoE\n"
- DCB "EXPORT _ZTSSt9type_info\n"
- DCB "EXPORT _ZTSSt8bad_cast\n"
- DCB "EXPORT _ZTSSt10bad_typeid\n"
- DCB "EXPORT _ZTSN10__cxxabiv123__fundamental_type_infoE\n"
- DCB "EXPORT _ZTSN10__cxxabiv117__array_type_infoE\n"
- DCB "EXPORT _ZTSN10__cxxabiv120__function_type_infoE\n"
- DCB "EXPORT _ZTSN10__cxxabiv116__enum_type_infoE\n"
- DCB "EXPORT _ZTSN10__cxxabiv117__class_type_infoE\n"
- DCB "EXPORT _ZTSN10__cxxabiv120__si_class_type_infoE\n"
- DCB "EXPORT _ZTSN10__cxxabiv121__vmi_class_type_infoE\n"
- DCB "EXPORT _ZTSN10__cxxabiv117__pbase_type_infoE\n"
- DCB "EXPORT _ZTSN10__cxxabiv119__pointer_type_infoE\n"
- DCB "EXPORT _ZTSN10__cxxabiv129__pointer_to_member_type_infoE\n"
-
-#endif // __KERNEL_MODE__
-
-}
-
-#ifndef __KERNEL_MODE__
-
-extern "C" {
-IMPORT_C int __rt_raise(int signal, int type);
-int raise(int signal)
- {
- return __rt_raise(signal, 0);
- }
-
-IMPORT_C int __rt_exit(int aReturnCode);
-EXPORT_C void abort(int signal)
- {
- __rt_raise(signal, 1);
- __rt_exit(1);
- }
-
-IMPORT_C void* __get_typeid(void*);
-EXPORT_C void* __ARM_get_typeid(void* p)
- {
- return __get_typeid(p);
- }
-
-}
-
-#endif
--- a/kernel/eka/compsupp/rvct2_2/drtaeabi.mmp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,59 +0,0 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-
-TARGET drtaeabi.dll
-
-TARGETTYPE dll
-
-// In theory -L"--diag_suppress=6331" should prevent the linker from moaning. But
-// the compiler passes this to the assembler which then invokes the linker and the
-// option gets dropped somewhere.
-//OPTION ARMCC '-L"--diag_suppress=6331"'
-SOURCEPATH .
-SOURCE aeabidiv0.cpp
-SOURCE drtaeabi.cpp
-SOURCE aeabimem.cia
-SOURCE type_info.cpp
-
-OS_LAYER_SYSTEMINCLUDE_SYMBIAN
-
-SOURCEPATH ../symaehabi
-SOURCE symbian_support.cpp
-SOURCE symbian_rtti.cpp
-SOURCE unwinder.c
-SOURCE unwind_pr.c
-SOURCE cppsemantics.cpp
-
-// yuk
-LIBRARY scppnwdl.lib euser.lib dfpaeabi.lib dfprvct2_2.lib drtrvct2_2.lib
-
-START ARMCC
-ARMRT // we're building a runtime support lib so suppress all the default libraries
-ARMINC
-// we want the 'pure' versions to go with softvfp
-#ifdef MARM_ARMV5
-ARMLIBS c_t__un.l cpprt_t__u.l
-#else
-ARMLIBS c_a__un.l cpprt_a__u.l
-#endif
-END
-
-capability all
-
-VENDORID 0x70000001
-
-unpagedcode
-
-SMPSAFE
--- a/kernel/eka/compsupp/rvct2_2/drtrvct2_2.cpp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,126 +0,0 @@
-// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// This function is simple a way to get these EXPORT statements into
-// the .in file. These symbols will therefore be referenced from
-// the export table and so **forced** into the DLL
-//
-//
-
-__asm void __rt_exporter_dummy(void)
-{
- AREA |.directive|, READONLY, NOALLOC
-
- PRESERVE8
-
- DCB "#<SYMEDIT>#\n"
-
- DCB "EXPORT abs\n" // abs.o
- DCB "EXPORT llabs\n" // llabs.o
-
- DCB "EXPORT _btod_etento\n" // bigflt0.o
-
- DCB "EXPORT _btod_d2e\n" // btod.o
- DCB "EXPORT _btod_ediv\n"
- DCB "EXPORT _btod_emul\n"
- DCB "EXPORT _d2e_norm_op1\n"
- DCB "EXPORT _d2e_denorm_low\n"
- DCB "EXPORT _btod_emuld\n"
- DCB "EXPORT _btod_edivd\n"
- DCB "EXPORT _e2e\n"
- DCB "EXPORT _e2d\n"
- DCB "EXPORT __btod_mult_common\n"
- DCB "EXPORT __btod_div_common\n"
-
- DCB "EXPORT div\n" // div.o
-
- DCB "EXPORT __rt_divtest\n" // divtest.o
- DCB "EXPORT __rt_sdiv32by16\n" // dspdiv32.o
- DCB "EXPORT __rt_udiv32by16\n" // dspdiv32u.o
- DCB "EXPORT __rt_sdiv64by32\n" // dspdiv64.o
-
- DCB "EXPORT ldiv\n" // ldiv.o
-
- DCB "EXPORT __ARM_ll_add\n" // lladd.o
- DCB "EXPORT __ARM_ll_addls\n" // lladdls.o
- DCB "EXPORT __ARM_ll_addlu\n" // lladdlu.o
- DCB "EXPORT __ARM_ll_addss\n" // lladdss.o
- DCB "EXPORT __ARM_ll_adduu\n" // lladduu.o
- DCB "EXPORT __ARM_ll_and\n" // lland.o
- DCB "EXPORT __ARM_ll_cmpge\n" // llcmpge.o
- DCB "EXPORT __ARM_ll_cmple\n" // llcmple.o
- DCB "EXPORT __ARM_ll_cmpu\n" // llcmpu.o
- DCB "EXPORT lldiv\n" // lldiv.o
- DCB "EXPORT __ARM_ll_eor\n" // lleor.o
- DCB "EXPORT __ARM_ll_from_l\n" // llfroml.o
- DCB "EXPORT __ARM_ll_from_u\n" // llfromu.o
- DCB "EXPORT _ll_mul\n" // llmul.o
- DCB "EXPORT __ARM_ll_mulls\n" // llmulls.o
- DCB "EXPORT __ARM_ll_mullu\n" // llmullu.o
- DCB "EXPORT __ARM_ll_mulss\n" // llmulss.o
-
- DCB "EXPORT __ARM_ll_mlauu\n" // llmulss.o
- DCB "EXPORT __ARM_ll_mlass\n" // llmulss.o
-
- DCB "EXPORT __ARM_ll_muluu\n" // llmuluu.o
- DCB "EXPORT __ARM_ll_neg\n" // llneg.o
- DCB "EXPORT __ARM_ll_not\n" // llnot.o
- DCB "EXPORT __ARM_ll_or\n" // llor.o
- DCB "EXPORT __ARM_ll_rsb\n" // llrsb.o
- DCB "EXPORT __ARM_ll_rsbls\n" // llrsbls.o
- DCB "EXPORT __ARM_ll_rsblu\n" // llrsblu.o
- DCB "EXPORT __ARM_ll_rsbss\n" // llrsbss.o
- DCB "EXPORT __ARM_ll_rsbuu\n" // llrsbuu.o
-
- DCB "EXPORT _ll_srdv \n" // llsrdv.o
-
- DCB "EXPORT __ARM_ll_sub\n" // llsub.o
- DCB "EXPORT __ARM_ll_subls\n" // llsubls.o
- DCB "EXPORT __ARM_ll_sublu\n" // llsublu.o
- DCB "EXPORT __ARM_ll_subss\n" // llsubss.o
- DCB "EXPORT __ARM_ll_subuu\n" // llsubuu.o
- DCB "EXPORT __ARM_ll_to_l\n" // lltol.o
- DCB "EXPORT _ll_udiv_small\n" // lludiv.o
- DCB "EXPORT _ll_udiv_big\n" // lludiv.o
- DCB "EXPORT _ll_udiv_ginormous\n" // lludiv.o
-
- DCB "EXPORT _ll_udiv10\n" // lludiv10.o
- DCB "EXPORT _ll_urdv\n" // llurdv.o
-
- DCB "EXPORT _memset\n" // rt_memclr.o
-
- DCB "EXPORT _memset_w\n" // rt_memclr_w.o
-
- DCB "EXPORT __rt_memcpy\n" // rt_memcpy.o
- DCB "EXPORT _memcpy_lastbytes\n"// rt_memcpy_w.o
-
- DCB "EXPORT __memmove_aligned\n"// rt_memmove_w.o
-
- DCB "EXPORT __rt_memset\n" // rt_memset.o
-
- DCB "EXPORT __rt_sdiv\n" // rt_sdiv.o
- DCB "EXPORT __rt_udiv\n" // rt_udiv.o
- DCB "EXPORT __rt_sdiv10\n" // rtsdiv10.o
- DCB "EXPORT __rt_udiv10\n" // rtudiv10.o
-
- // New with RVCT 2.0 Release Candidte 2
- DCB "EXPORT __ARM_switch8\n" // switch8.o
-
- // rtti support from rtti.o
- // ** delete DCB "EXPORT __dynamic_cast\n"
- // ** delete DCB "EXPORT __get_typeid\n"
-
-}
-
-
-
--- a/kernel/eka/compsupp/rvct2_2/drtrvct2_2.mmp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-
-#include "drtrvct2_2_common.mmh"
-
-TARGET drtrvct2_2.dll
-START ARMCC
-#ifdef MARM_ARMV5
-ARMLIBS f_t_p.l
-#else
-ARMLIBS f_a_p.l
-#endif
-END
-
-unpagedcode
--- a/kernel/eka/compsupp/rvct2_2/drtrvct2_2_common.mmh Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,66 +0,0 @@
-// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// DRTRVCT2_2_COMMON.MMP
-//
-//
-
-TARGETTYPE dll
-
-OPTION ARMCC --no_exceptions --no_exceptions_unwind
-
-SOURCEPATH .
-SOURCE rtabort.cpp
-SOURCE rtdiv0.cpp
-SOURCE rtexit.cpp
-SOURCE rtlib.cpp
-SOURCE rtraise.cpp
-SOURCE drtrvct2_2.cpp
-// global new/delete operators
-SOURCE rtopnew.cpp rtopdel.cpp
-
-// exception support - from RVCT 2.1 onwards
-// SOURCE exception_support.cpp
-// default _fp_init definition - should be overridden by fp library
-SOURCE sftfpini.cpp
-// dummy for now, needs to go away
-// SOURCE rte32dll.cpp
-
-// yuk
-LIBRARY scppnwdl.lib euser.lib
-
-OS_LAYER_SYSTEMINCLUDE_SYMBIAN
-#ifdef SYMBIAN_OLD_EXPORT_LOCATION
-SYSTEMINCLUDE ../../include
-#endif
-
-START ARMCC
-ARMRT
-ARMINC
-#ifdef MARM_ARMV5
-ARMLIBS c_t__un.l
-ARMLIBS h_t__un.l
-//ARMLIBS cpprt_t__u.l
-// shouldn't really need this if btod.o wasn't so monolithic....
-#else
-ARMLIBS c_a__un.l
-ARMLIBS h_a__un.l
-//ARMLIBS cpprt_a__u.l
-// shouldn't really need this if btod.o wasn't so monolithic....
-#endif
-END
-
-capability all
-VENDORID 0x70000001
-
-SMPSAFE
--- a/kernel/eka/compsupp/rvct2_2/drtrvct2_2_vfpv2.mmp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,29 +0,0 @@
-// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-
-#include "drtrvct2_2_common.mmh"
-
-TARGET drtrvct2_2_vfpv2.dll
-LINKAS drtrvct2_2.dll
-NOEXPORTLIBRARY
-START ARMCC
-#ifdef MARM_ARMV5
-ARMLIBS f_tvp.l
-#else
-ARMLIBS f_avp.l
-#endif
-END
-
-unpagedcode
--- a/kernel/eka/compsupp/rvct2_2/ksrt2_2.mmp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +0,0 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// KSRT2_2.MPP
-// This version is used to support RVCT 2.2 builds.
-// Here the init_array (|SHT$$INIT_ARRAY$$Base|) contains pointers rather than offsets.
-//
-//
-
-ALWAYS_BUILD_AS_ARM
-
-MACRO _NO_FP
-
-TARGET ksrt2_2.lib
-
-TARGETTYPE klib
-
-#ifdef MARM_ARMV5
-OPTION ARMCC --dllimport_runtime
-#endif
-
-SOURCEPATH .
-
-#ifndef MARM_ARMV4
-SOURCE callviar0.cpp callviar1.cpp callviar2.cpp callviar3.cpp
-SOURCE callviar4.cpp callviar5.cpp callviar6.cpp callviar7.cpp
-#endif
-
-SOURCE ucppinit_aeabi.cpp // ucppfini.cpp
-
-// This will be overriden by .exps
-SOURCE dllexp.cpp
-
-OS_LAYER_SYSTEMINCLUDE_SYMBIAN
-
-START ARMCC
-ARMRT
-END
-
-VENDORID 0x70000001
--- a/kernel/eka/compsupp/rvct2_2/rtabort.cpp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-
-#include <e32std.h>
-#include <e32std_private.h>
-
-extern "C" {
-// function the runtime can call to abort a process,
-// the runtime library is not finalized and no atexit
-// processing takes places.
-EXPORT_C void __rt_abort() /* never returns */
- {
- RThread().Kill(KErrAbort);
- }
-}
-
-namespace std {
-EXPORT_C void terminate(void)
- {
- __rt_abort();
- }
-}
--- a/kernel/eka/compsupp/rvct2_2/rtdiv0.cpp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-
-#include <e32std.h>
-#include <e32std_private.h>
-
-extern "C" {
-EXPORT_C void __rt_div0 (void)
- {
- User::RaiseException(EExcIntegerDivideByZero);
- }
-
-}
--- a/kernel/eka/compsupp/rvct2_2/rte32dll.cpp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,22 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-#include <e32std.h>
-#include <e32std_private.h>
-
-void E32Dll(TDllReason aReason) {}
--- a/kernel/eka/compsupp/rvct2_2/rtexit.cpp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +0,0 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// function the runtime can call to exit process, 'finalizing'
-// the runtime library but avoiding atexit processing.
-//
-//
-
-#include <e32std.h>
-#include <e32std_private.h>
-
-extern "C" {
-IMPORT_C extern void __rt_lib_shutdown(void);
-
-EXPORT_C void __rt_exit(TInt aReturnCode) /* never returns */
- {
- __rt_lib_shutdown();
- User::Exit(aReturnCode);
- }
-}
--- a/kernel/eka/compsupp/rvct2_2/rtlib.cpp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// initialize and shutdown (low-level) runtime.
-// these are intended to go in user side static runtime lib
-//
-//
-
-#include <e32std.h>
-#include <e32std_private.h>
-
-extern "C" {
-EXPORT_C void __rt_lib_shutdown(void){};
-
-IMPORT_C void _fp_init(void);
-extern void __cpp_initialise(void);
-
-EXPORT_C void __rt_lib_init(void)
- {
- _fp_init();
- __cpp_initialise();
- }
-}
--- a/kernel/eka/compsupp/rvct2_2/rtopdel.cpp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-
-#include <e32std.h>
-#include <e32std_private.h>
-
-EXPORT_C void operator delete(TAny *aPtr) __NO_THROW
-//
-// The replacement delete operator.
-//
- {
-
- User::Free(aPtr);
- }
-
-EXPORT_C void operator delete[](TAny * aPtr) __NO_THROW
- {
-
- User::Free(aPtr);
- }
-
-EXPORT_C void operator delete(TAny *aPtr, const std::nothrow_t& aNoThrow) __NO_THROW
-//
-// The replacement delete operator.
-//
- {
- (void)aNoThrow;
- User::Free(aPtr);
- }
-
-EXPORT_C void operator delete[](TAny * aPtr, const std::nothrow_t& aNoThrow) __NO_THROW
- {
- (void)aNoThrow;
- User::Free(aPtr);
- }
--- a/kernel/eka/compsupp/rvct2_2/rtopnew.cpp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
-// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-
-#include <e32std.h>
-#include <e32std_private.h>
-
-EXPORT_C TAny* operator new(TUint aSize) __NO_THROW
-//
-// The global new operator.
-//
- {
-
- return(User::Alloc(aSize));
- }
-
-EXPORT_C TAny* operator new[](TUint aSize) __NO_THROW
- {
-
- return(User::Alloc(aSize));
- }
-
-EXPORT_C TAny* operator new(TUint aSize, const std::nothrow_t& aNoThrow) __NO_THROW
-//
-// The global new operator.
-//
- {
- (void) aNoThrow;
- return(User::Alloc(aSize));
- }
-
-EXPORT_C TAny* operator new[](TUint aSize, const std::nothrow_t& aNoThrow) __NO_THROW
- {
- (void) aNoThrow;
- return(User::Alloc(aSize));
- }
-
-EXPORT_C TAny* operator new(TUint aSize,TUint anExtraSize) __NO_THROW
-//
-// Allocate the requested size plus the extra.
-//
- {
-
- return(User::Alloc(aSize+anExtraSize));
- }
--- a/kernel/eka/compsupp/rvct2_2/rtraise.cpp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,61 +0,0 @@
-// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// function the runtime can call to 'raise an exception'
-//
-//
-
-#include <e32std.h>
-#include <e32std_private.h>
-#include <signal.h> // get from %ARMINC%
-
-extern "C" {
-
-EXPORT_C TInt __rt_raise(TInt signal, TInt type)
- {
- TExcType aExc = EExcGeneral;
- // translate signal into EPOC exception
- switch (signal)
- {
- case SIGABRT :
- aExc = EExcAbort;
- break;
- case SIGFPE :
- switch (type)
- {
- case DIVBYZERO :
- aExc = EExcAbort;
- break;
- default:
- aExc = EExcFloatInvalidOperation;
- }
- break;
- case SIGILL :
- aExc = EExcCodeAbort;
- break;
- case SIGINT :
- aExc = EExcUserInterrupt;
- break;
- case SIGSEGV :
- aExc = EExcDataAbort;
- break;
- case SIGTERM :
- aExc = EExcKill;
- break;
- }
- // yuk. Introduces dependendcy on EUSER!!
- User::RaiseException(aExc);
- return signal;
- }
-}
-
--- a/kernel/eka/compsupp/rvct2_2/rvct2_2.h Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// e32\compsupp\rvct2_2\rvct2_2.h
-// This is the preinclude file for the rvct 2.2 compiler
-// It contains all the compiler specific definitions required by the SOS source
-//
-//
-
-/**
- @file
- @publishedAll
- @released
-*/
-
-#ifdef __ARMCC_VERSION
-#if (__ARMCC_VERSION < 220435 || __ARMCC_VERSION >= 230000)
-#error This instantiation of the build requires use of RVCT 2.2 Build 435 (or later)
-#endif
-#endif
-
-#include <rvct/rvct.h>
-
--- a/kernel/eka/compsupp/rvct2_2/sftfpini.cpp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,70 +0,0 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-
-#include <e32std.h>
-#include <e32std_private.h>
-
-// support functions for ARM supplied softvfp compiler-helper functions
-
-extern "C" {
-
-//void __rt_fp_status_register_cleanup(TAny * aReg)
-// {
-// delete aReg;
-// }
-
-// set up the fp status register
-EXPORT_C void _fp_init(void)
- {
- TUint32 * aReg = (TUint32 *)User::AllocZ(sizeof(TUint32));
- if (aReg)
- {
- Dll::SetTls(aReg /*, __rt_fp_status_register_cleanup*/);
- }
- else
- {
- // This will force us to try again if we actually get an FP
- // exception later.
- Dll::SetTls(0 /*, __rt_fp_status_register_cleanup*/);
- }
- }
-
-EXPORT_C TAny * __rt_fp_status_addr(void)
- {
- //return &__fp_status_register;
- TAny* aTls = Dll::Tls();
- if (aTls)
- return aTls;
- // we obviously failed to set it up before. Try again, so we can
- // at least try to error meaningfully
- TUint32* aReg = (TUint32*)User::AllocZ(sizeof(TUint32));
- _LIT(KFpGeneralPanic, "FP Emulator");
- if (aReg)
- {
- TInt r = Dll::SetTls(aReg /*, __rt_fp_status_register_cleanup*/);
- if (r==KErrNone)
- return aReg;
- // if we get here we really in trouble. Just Panic.
- User::Panic(KFpGeneralPanic, KErrGeneral);
- }
- else
- {
- // If we get here, we're toast anyway....
- User::Panic(KFpGeneralPanic, KErrNoMemory);
- }
- return 0;
- }
-}
-
--- a/kernel/eka/compsupp/rvct2_2/type_info.cpp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-#include <typeinfo>
-
-EXPORT_C bool std::type_info::operator==(const std::type_info& rhs) const
- {
- if (this == &rhs)
- {
- return true;
- }
-
- const char* s1 = this->name();
- const char* s2 = rhs.name();
-
- while ( *s1 == *s2 && *s1 != '\0' )
- {
- s1++;
- s2++;
- }
-
- return ( *s1 == '\0' && *s2 == '\0' );
- }
-
-EXPORT_C bool std::type_info::operator!=(const std::type_info& rhs) const
- {
- return !(*this == rhs);
- }
-
--- a/kernel/eka/compsupp/rvct2_2/ucppfini.cpp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,84 +0,0 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// toplevel destruction routines for 'user side' code compiled
-// with the ARMEDG compiler.
-//
-//
-
-#include "cppinit.h"
-
-extern "C" {
-
-#define MAX_DTOR_RECORDS 256
-static dtd dtor_rec[MAX_DTOR_RECORDS];
-
-typedef dtd **dso_handle;
-dtd * __dso_handle = &dtor_rec[MAX_DTOR_RECORDS];
-
-void __cxa_finalize ( dso_handle d );
-
-// Need to decide what this should do we run out of dtor space.
-// Probably need to run __cxa_finalize then do some kind of panic.
-void CppBSSInitializationError()
- {
-// __cxa_finalize(&dtor_rec[0]);
- };
-
-// This is called by compiler generated code to record needed destructions of
-// dynamically initialized (ctor) top level (BSS) data.
-// I guess this is more efficient for the compiler than __cxa_atexit, since
-// it takes the object that needs dtoring as its first arg, which means its in
-// the right register when the ctor returns.
-void __aeabi_atexit(void *aObject, void (*aDtor)(void *), dso_handle aHandle)
- {
- dtd * drec = *aHandle;
- drec--;
-
- if (drec < &dtor_rec[0])
- // Need to decide what to do here
- return CppBSSInitializationError();
-
- drec->dtor = aDtor;
- drec->obj = aObject;
- *aHandle = drec;
- }
-
-int __cxa_atexit ( void (*aDtor)(void *), void *aObject, dso_handle aHandle )
- {
- __aeabi_atexit(aObject, aDtor, aHandle);
-
- // This is what the C++ GABI spec says to do!!
- if (*aHandle < &dtor_rec[0])
- return -1;
- return 0;
- }
-
-void __cxa_finalize ( dso_handle d )
- {
- dtd * drec = * d;
- dtd * lim = &dtor_rec[MAX_DTOR_RECORDS];
- while (drec < lim)
- {
- drec->dtor(drec->obj);
- drec++;
- }
- *d = drec;
- }
-
-void run_static_dtors (void)
- {
- __cxa_finalize(&__dso_handle);
- }
-}
-
--- a/kernel/eka/compsupp/rvct2_2/ucppinit.cpp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +0,0 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// toplevel initialization/destruction routines for 'user side' code compiled
-// with the ARMEDG compiler. intended for static linking
-//
-//
-
-#include "cppinit.h"
-
-NUKE_SYMBOL(__call_ctors(void));
-NUKE_SYMBOL(__call_dtors(void));
-
-extern "C" {
-// linker symbols
-__weak PFV C$$pi_ctorvec$$Base;
-__weak PFV C$$pi_ctorvec$$Limit;
-__weak void _fp_init(void);
-
-
-// This calls each of the compiler constructed functions referenced from pi_ctorvec.
-// These functions arrange to 'call' the appropriate constructor for the 'static' instance
-// (in fact the call may be inlined). If the class of the instance has a destructor then
-// compiler records that this object needs 'destructing' at 'exit' time. It does this by
-// calling the function __cxa_atexit. We provide our own definition of this.
-//
-void __cpp_initialise(void)
- {
- void (*fp_init_fn)(void) = _fp_init;
- if (fp_init_fn) fp_init_fn();
- PFV * ctor_vec = &C$$pi_ctorvec$$Base;
- PFV * ctor_limit = &C$$pi_ctorvec$$Limit;
- for(; ctor_vec < ctor_limit; ctor_vec++) (RELOCATE(ctor_vec, PFV))();
- }
-}
-
-
-
-
-
--- a/kernel/eka/compsupp/rvct2_2/ucppinit_aeabi.cpp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,138 +0,0 @@
-// Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// toplevel initialization/destruction routines for 'user side' code compiled
-// with the ARMCC EABI compiler. intended for static linking
-// The code supports 2.2 both bpabi and non-bpabi. The values in .init_array are
-// pointers in both environments, so the library is common to both.
-//
-//
-
-extern "C" {
-
-// This calls each of the compiler constructed functions referenced from pi_ctorvec.
-// These functions arrange to 'call' the appropriate constructor for the 'static' instance
-// (in fact the call may be inlined). If the class of the instance has a destructor then
-// compiler records that this object needs 'destructing' at 'exit' time. It does this by
-// calling the function __cxa_atexit. We provide our own definition of this.
-//
-
-#ifdef __thumb
- __asm void __cpp_initialize__aeabi_(void)
- {
- CODE16
-#ifndef _NO_FP
- IMPORT _fp_init [WEAK]
-#endif
- IMPORT |SHT$$INIT_ARRAY$$Base| [WEAK]
- IMPORT |SHT$$INIT_ARRAY$$Limit| [WEAK]
-
- // export std::nothrow from here
- EXPORT _ZSt7nothrow
-
-#ifndef _NO_FP
- LDR r0,fpinit
-#endif
- PUSH {r4-r6,r14}
-#ifndef _NO_FP
- CMP r0,#0
- BEQ skip
- BL _fp_init ;
-skip
-#endif
- LDR r4,base
- LDR r5,limit
- B check
-loop
- LDR r0,[r4,#0]
-
- BLX r0
- ADD r4,#4
-check
- CMP r4,r5
- BCC loop
- POP {r4-r6,pc}
-
-#ifndef _NO_FP
- ALIGN 4
-fpinit
- DCD _fp_init
-#endif
-
-// cheat - saved a whole 4 bytes!!! - value is never used
-_ZSt7nothrow
-base
- DCD |SHT$$INIT_ARRAY$$Base|
-limit
- DCD |SHT$$INIT_ARRAY$$Limit|
-
- }
-
-#else
- __asm void __cpp_initialize__aeabi_(void)
- {
- CODE32
-#ifndef _NO_FP
- IMPORT _fp_init [WEAK]
-#endif
- IMPORT |SHT$$INIT_ARRAY$$Base| [WEAK]
- IMPORT |SHT$$INIT_ARRAY$$Limit| [WEAK]
-
- // export std::nothrow from here
- EXPORT _ZSt7nothrow
-
-#ifndef _NO_FP
- LDR r0, fpinit
-#endif
- STMFD r13!,{r3-r5,r14}
-#ifndef _NO_FP
- CMP r0, #0
- BEQ skip
- BL _fp_init
-skip
-#endif
- LDR r4,base
- LDR r5,limit
- CMP r4,r5
- LDMEQFD r13!,{r3-r5,pc}
-loop
- LDR r0,[r4,#0]
-#ifdef __MARM_ARMV4__
- ADR r14,ret
- MOV pc,r0
-#else
- BLX r0
-#endif
-ret
- ADD r4,r4,#4
- CMP r4,r5
- BNE loop
- LDMFD r13!,{r3-r5,pc}
-
-#ifndef _NO_FP
-fpinit
- DCD _fp_init
-#endif
-
-base
- DCD |SHT$$INIT_ARRAY$$Base|
-limit
- DCD |SHT$$INIT_ARRAY$$Limit|
-
-// cheat - defining this here saves a whole 4 bytes!!! - value is never used
-_ZSt7nothrow
-
- }
-#endif
-
-}
--- a/kernel/eka/compsupp/rvct2_2/usrt2_2.mmp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,52 +0,0 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// USRT2_2.MPP
-// This version is used to support RVCT 2.2 builds.
-// Here the init_array (|SHT$$INIT_ARRAY$$Base|) contains pointers rather than offsets.
-//
-//
-
-TARGET usrt2_2.lib
-
-TARGETTYPE lib
-
-ALWAYS_BUILD_AS_ARM
-
-#ifdef MARM_ARMV5
-OPTION ARMCC --dllimport_runtime
-#endif
-
-SOURCEPATH .
-
-#ifndef MARM_ARMV4
-SOURCE callviar0.cpp callviar1.cpp callviar2.cpp callviar3.cpp
-SOURCE callviar4.cpp callviar5.cpp callviar6.cpp callviar7.cpp
-#endif
-
-SOURCE ucppinit_aeabi.cpp ucppfini.cpp
-
-// This will be overriden by .exps
-SOURCE dllexp.cpp
-
-OS_LAYER_SYSTEMINCLUDE_SYMBIAN
-
-SOURCEPATH ../symaehabi
-SOURCE callfirstprocessfn.cpp
-
-START ARMCC
-ARMINC
-ARMRT
-END
-
-VENDORID 0x70000001
--- a/kernel/eka/compsupp/rvct3_1/aeabidiv0.cpp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,38 +0,0 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// This file is part of drtaeabi.dll.
-//
-//
-
-#include <e32std.h>
-#include <e32std_private.h>
-
-
-extern "C" {
-
-IMPORT_C void __rt_div0(); // Import from drtrvct.dll.
-
-EXPORT_C int __aeabi_idiv0 (int return_value)
- {
- __rt_div0();
- return return_value;
- }
-
-EXPORT_C long long __aeabi_ldiv0 (long long return_value)
- {
- __rt_div0();
- return return_value;
- }
-}
-
--- a/kernel/eka/compsupp/rvct3_1/aeabimem.cia Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,68 +0,0 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// This file is part of drtaeabi.dll.
-//
-//
-
-#include <e32cmn.h>
-
-
-// Call our implementations of memcpy/move/set/clr rather than the ARM supplied
-// ones.
-//
-// Note that the AEABI switched the order of arg2 and arg3 to save an intruction
-// when calling 'memset' from 'memclr'.
-//
-// Prototypes are:
-// void __aeabi_memset8(TAny* aTrg, unsigned int aLength, TInt aValue);
-// void __aeabi_memset4(TAny* aTrg, unsigned int aLength, TInt aValue);
-// void __aeabi_memset(TAny* aTrg, unsigned int aLength, TInt aValue);
-
-extern "C" __NAKED__ void make_mem_functions_call_euser_versions()
- {
- asm(".global __aeabi_memset8 ");
- asm("__aeabi_memset8: ");
- asm(".global __aeabi_memset4 ");
- asm("__aeabi_memset4: ");
- asm(".global __aeabi_memset ");
- asm("__aeabi_memset: ");
- asm(" mov r3, r1 ");
- asm(" mov r1, r2 ");
- asm(" mov r2, r3 ");
- asm(" b memset ");
-
- asm(".global __aeabi_memclr8 ");
- asm("__aeabi_memclr8: ");
- asm(".global __aeabi_memclr4 ");
- asm("__aeabi_memclr4: ");
- asm(".global __aeabi_memclr ");
- asm("__aeabi_memclr: ");
- asm(" b memclr ");
-
- asm(".global __aeabi_memcpy8 ");
- asm("__aeabi_memcpy8: ");
- asm(".global __aeabi_memcpy4 ");
- asm("__aeabi_memcpy4: ");
- asm(".global __aeabi_memcpy ");
- asm("__aeabi_memcpy: ");
- asm(" b memcpy ");
-
- asm(".global __aeabi_memmove8 ");
- asm("__aeabi_memmove8: ");
- asm(".global __aeabi_memmove4 ");
- asm("__aeabi_memmove4: ");
- asm(".global __aeabi_memmove ");
- asm("__aeabi_memmove: ");
- asm(" b memmove ");
- }
--- a/kernel/eka/compsupp/rvct3_1/call_via_rx/r0.cpp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// This file is part of usrt.lib and ksrt.lib.
-//
-//
-
-extern "C"
-{
-__asm void __ARM_call_via_r0()
- {
- CODE32
- BX r0
- }
-}
--- a/kernel/eka/compsupp/rvct3_1/call_via_rx/r1.cpp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// This file is part of usrt.lib and ksrt.lib.
-//
-//
-
-extern "C"
-{
-__asm void __ARM_call_via_r1()
- {
- CODE32
- BX r1
- }
-}
--- a/kernel/eka/compsupp/rvct3_1/call_via_rx/r2.cpp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// This file is part of usrt.lib and ksrt.lib.
-//
-//
-
-extern "C"
-{
-__asm void __ARM_call_via_r2()
- {
- CODE32
- BX r2
- }
-}
--- a/kernel/eka/compsupp/rvct3_1/call_via_rx/r3.cpp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// This file is part of usrt.lib and ksrt.lib.
-//
-//
-
-extern "C"
-{
-__asm void __ARM_call_via_r3()
- {
- CODE32
- BX r3
- }
-}
--- a/kernel/eka/compsupp/rvct3_1/call_via_rx/r4.cpp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// This file is part of usrt.lib and ksrt.lib.
-//
-//
-
-extern "C"
-{
-__asm void __ARM_call_via_r4()
- {
- CODE32
- BX r4
- }
-}
--- a/kernel/eka/compsupp/rvct3_1/call_via_rx/r5.cpp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// This file is part of usrt.lib and ksrt.lib.
-//
-//
-
-extern "C"
-{
-__asm void __ARM_call_via_r5()
- {
- CODE32
- BX r5
- }
-}
--- a/kernel/eka/compsupp/rvct3_1/call_via_rx/r6.cpp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// This file is part of usrt.lib and ksrt.lib.
-//
-//
-
-extern "C"
-{
-__asm void __ARM_call_via_r6()
- {
- CODE32
- BX r6
- }
-}
--- a/kernel/eka/compsupp/rvct3_1/call_via_rx/r7.cpp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// This file is part of usrt.lib and ksrt.lib.
-//
-//
-
-extern "C"
-{
-__asm void __ARM_call_via_r7()
- {
- CODE32
- BX r7
- }
-}
--- a/kernel/eka/compsupp/rvct3_1/dfpaeabi.mmp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-
-#include "dfpaeabi_common.mmh"
-
-
-target dfpaeabi.dll
-
-start armcc
- armlibs fj_5s.l
-end
-
-unpagedcode
--- a/kernel/eka/compsupp/rvct3_1/dfpaeabi_common.mmh Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-
-
-targettype dll
-
-OS_LAYER_SYSTEMINCLUDE_SYMBIAN
-#ifdef SYMBIAN_OLD_EXPORT_LOCATION
-systeminclude ../../include
-#endif
-
-source no_extras.cpp
-
-library scppnwdl.dso drtrvct3_1.dso dfprvct3_1.dso drtaeabi.dso
-
-start armcc
- armrt
- armlibs c_5.l
-end
-
-capability all
-
-VENDORID 0x70000001
-
-SMPSAFE
--- a/kernel/eka/compsupp/rvct3_1/dfpaeabi_vfpv2.mmp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-
-#include "dfpaeabi_common.mmh"
-
-
-target dfpaeabi_vfpv2.dll
-linkas dfpaeabi.dll
-
-noexportlibrary
-
-start armcc
- armlibs fj_5v.l
-end
-
-unpagedcode
--- a/kernel/eka/compsupp/rvct3_1/dfprvct.cpp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,55 +0,0 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// This file is part of dfprvct.dll.
-// According to the EABI:
-// 1. "long int" is the same as "int", and
-// 2. "long double" is the same as "double".
-//
-//
-
-
-__asm void __Symbian_exporter_dummy_1()
- {
- CODE32
-
- IMPORT __ARM_scalbn
-
- EXPORT __softfp_scalbln [DYNAMIC]
- EXPORT __softfp_scalblnl [DYNAMIC]
- EXPORT __softfp_scalbn [DYNAMIC]
- EXPORT __softfp_scalbnl [DYNAMIC]
-
-__softfp_scalbln
-__softfp_scalblnl
-__softfp_scalbn
-__softfp_scalbnl
-
- B __ARM_scalbn
- }
-
-__asm void __Symbian_exporter_dummy_2()
- {
- CODE32
-
- IMPORT __ARM_scalbnf
-
- EXPORT __softfp_scalblnf [DYNAMIC]
- EXPORT __softfp_scalbnf [DYNAMIC]
-
-__softfp_scalblnf
-__softfp_scalbnf
-
- B __ARM_scalbnf
- }
-
--- a/kernel/eka/compsupp/rvct3_1/dfprvct.mmp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,29 +0,0 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-
-#include "dfprvct_common.mmh"
-
-
-target dfprvct3_1.dll
-
-OS_LAYER_SYSTEMINCLUDE_SYMBIAN
-
-source dfprvct.cpp
-
-start armcc
- armlibs fj_5s.l
-end
-
-unpagedcode
--- a/kernel/eka/compsupp/rvct3_1/dfprvct_common.mmh Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-
-
-targettype dll
-
-option armcc --no_exceptions --no_exceptions_unwind
-
-source no_extras.cpp
-
-library scppnwdl.dso drtrvct3_1.dso drtaeabi.dso dfpaeabi.dso
-
-start armcc
- armrt
- armlibs c_5.l
-end
-
-capability all
-
-vendorid 0x70000001
-
-SMPSAFE
--- a/kernel/eka/compsupp/rvct3_1/dfprvct_vfpv2.mmp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,29 +0,0 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-
-#include "dfprvct_common.mmh"
-
-OS_LAYER_SYSTEMINCLUDE_SYMBIAN
-
-target dfprvct3_1_vfpv2.dll
-linkas dfprvct3_1.dll
-
-noexportlibrary
-
-start armcc
- armlibs fj_5v.l
-end
-
-unpagedcode
--- a/kernel/eka/compsupp/rvct3_1/dllexp.cpp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,22 +0,0 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// This file is part of usrt.lib and ksrt.lib.
-//
-//
-
-
-extern "C" void __DLL_Export_Table__() { } // This function (and the whole file)
- // can be removed when we drop support
- // for ABIV1.
-
--- a/kernel/eka/compsupp/rvct3_1/drtaeabi.cpp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,66 +0,0 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// This file is part of drtaeabi.dll.
-//
-//
-
-
-#include <e32std.h>
-#include <e32std_private.h>
-#include <e32panic.h>
-
-extern "C" {
-
-// Import these functions from drtrvct.dll.
-IMPORT_C int __rt_raise(int signal, int type);
-IMPORT_C int __rt_exit(int aReturnCode);
-
-int raise(int signal)
- {
- return __rt_raise(signal, 0);
- }
-
-EXPORT_C void abort(int signal)
- {
- __rt_raise(signal, 1);
- __rt_exit(1);
- }
-
-EXPORT_C void __cxa_pure_virtual()
- {
- User::Panic( _L("Pure virtual"), EPureVirtualCalled );
- }
-
-} // extern "C"
-
-
-//
-// Create the type_info object for void.
-//
-
-extern char * _ZTVN10__cxxabiv123__fundamental_type_infoE;
-extern const char * const $Sub$$_ZTSv = "v";
-
-__asm void __rt_exporter_dummy()
-{
- EXTERN _ZTVN10__cxxabiv123__fundamental_type_infoE
- EXTERN _ZTSv
- EXPORT |$Sub$$_ZTIv|
-
-|$Sub$$_ZTIv|
-
- DCD _ZTVN10__cxxabiv123__fundamental_type_infoE
- DCD _ZTSv
-}
-
--- a/kernel/eka/compsupp/rvct3_1/drtaeabi.mmp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +0,0 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-
-
-target drtaeabi.dll
-targettype dll
-
-sourcepath .
-source aeabidiv0.cpp
-source drtaeabi.cpp
-source aeabimem.cia
-source type_info.cpp
-source no_extras.cpp
-
-OS_LAYER_SYSTEMINCLUDE_SYMBIAN
-
-sourcepath ../symaehabi
-source symbian_support.cpp
-source unwinder.c
-source unwind_pr.c
-source cppsemantics.cpp
-
-library euser.dso scppnwdl.dso drtrvct3_1.dso dfprvct3_1.dso dfpaeabi.dso
-
-start armcc
- armrt
- arminc
- armlibs c_5.l h_5.l cpprt_5.l
-end
-
-capability all
-
-vendorid 0x70000001
-
-unpagedcode
-
-
-SMPSAFE
--- a/kernel/eka/compsupp/rvct3_1/drtrvct.mmp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,26 +0,0 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-
-#include "drtrvct_common.mmh"
-
-
-target drtrvct3_1.dll
-
-start armcc
- armlibs fj_5s.l
-end
-
-unpagedcode
-
--- a/kernel/eka/compsupp/rvct3_1/drtrvct_common.mmh Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +0,0 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-
-targettype dll
-
-option armcc --no_exceptions --no_exceptions_unwind
-
-sourcepath .
-source rtabort.cpp
-source rtdiv0.cpp
-source rtexit.cpp
-source rtraise.cpp
-source sftfpini.cpp
-source no_extras.cpp
-
-// These should eventually be removed; they are already defined in scppnwdl.dll. We
-// keep them here only for backwards compatibility.
-SOURCEPATH ..\symcpp
-SOURCE rtopnew.cpp rtopdel.cpp
-
-library euser.dso scppnwdl.dso dfprvct3_1.dso drtaeabi.dso dfpaeabi.dso
-
-OS_LAYER_SYSTEMINCLUDE_SYMBIAN
-#ifdef SYMBIAN_OLD_EXPORT_LOCATION
-systeminclude ../../include
-#endif
-
-start armcc
- armrt
- arminc
- armlibs c_5.l h_5.l cpprt_5.l
-end
-
-capability all
-vendorid 0x70000001
-
-
-SMPSAFE
--- a/kernel/eka/compsupp/rvct3_1/drtrvct_vfpv2.mmp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,29 +0,0 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-
-#include "drtrvct_common.mmh"
-
-
-target drtrvct3_1_vfpv2.dll
-linkas drtrvct3_1.dll
-
-noexportlibrary
-
-start armcc
- armlibs fj_5v.l
-end
-
-unpagedcode
-
--- a/kernel/eka/compsupp/rvct3_1/ksrt.mmp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-
-target ksrt3_1.lib
-targettype klib
-
-always_build_as_arm
-
-macro _NO_FP
-
-sourcepath call_via_rx
-source r0.cpp r1.cpp r2.cpp r3.cpp
-source r4.cpp r5.cpp r6.cpp r7.cpp
-
-sourcepath .
-source ucppinit.cpp
-source dllexp.cpp
-
-OS_LAYER_SYSTEMINCLUDE_SYMBIAN
-
-start armcc
- arminc
-end
-
-vendorid 0x70000001
--- a/kernel/eka/compsupp/rvct3_1/no_extras.cpp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,22 +0,0 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// This file is part of all compsupp DLLs. It makes the linker issue an error
-// message if semihosting or heap functions get pulled in from RVCT's libraries.
-//
-//
-
-
-#pragma import(__use_no_semihosting)
-#pragma import(__use_no_heap)
-
--- a/kernel/eka/compsupp/rvct3_1/rtabort.cpp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// This file is part of drtrvct.dll and drtrvct_vfpv2.dll
-//
-//
-
-#include <e32std.h>
-#include <e32std_private.h>
-
-
-// The run-time can call this function to abort a process. The run-time library is
-// not finalized and no atexit processing takes places.
-extern "C" EXPORT_C void __rt_abort() /* never returns */
- {
- RThread().Kill(KErrAbort);
- }
-
-EXPORT_C void std::terminate(void)
- {
- __rt_abort();
- }
-
--- a/kernel/eka/compsupp/rvct3_1/rtdiv0.cpp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,26 +0,0 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// This file is part of drtrvct.dll and drtrvct_vfpv2.dll.
-//
-//
-
-#include <e32std.h>
-#include <e32std_private.h>
-
-
-extern "C" EXPORT_C void __rt_div0()
- {
- User::RaiseException(EExcIntegerDivideByZero);
- }
-
--- a/kernel/eka/compsupp/rvct3_1/rtexit.cpp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// This file is part of drtrvct.dll and drtrvct_vfpv2.dll
-//
-//
-
-#include <e32std.h>
-#include <e32std_private.h>
-
-
-// The run-time system can call this function to exit the process, 'finalizing' the
-// run-time library but avoiding atexit processing.
-extern "C" EXPORT_C void __rt_exit(TInt aReturnCode) /* never returns */
- {
- User::Exit(aReturnCode);
- }
-
--- a/kernel/eka/compsupp/rvct3_1/rtraise.cpp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,66 +0,0 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// This file is part of drtrvct.dll and drtrvct_vfpv2.dll.
-//
-//
-
-#include <e32std.h>
-#include <e32std_private.h>
-#include <signal.h> // Will be found among RVCT's header files.
-
-
-extern "C" EXPORT_C TInt __rt_raise(TInt signal, TInt type)
- {
- TExcType aExc = EExcGeneral;
-
- // Translate the signal into an EPOC exception.
- switch (signal)
- {
- case SIGABRT :
- aExc = EExcAbort;
- break;
-
- case SIGFPE :
- switch (type)
- {
- case DIVBYZERO :
- aExc = EExcAbort;
- break;
- default:
- aExc = EExcFloatInvalidOperation;
- }
- break;
-
- case SIGILL :
- aExc = EExcCodeAbort;
- break;
-
- case SIGINT :
- aExc = EExcUserInterrupt;
- break;
-
- case SIGSEGV :
- aExc = EExcDataAbort;
- break;
-
- case SIGTERM :
- aExc = EExcKill;
- break;
- }
-
- User::RaiseException(aExc);
-
- return signal;
- }
-
--- a/kernel/eka/compsupp/rvct3_1/sftfpini.cpp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,61 +0,0 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// This file is part of drtrvct.dll and drtrvct_vfpv2.dll.
-//
-//
-
-#include <e32std.h>
-#include <e32std_private.h>
-
-
-extern "C" {
-
-EXPORT_C void _fp_init()
- {
- }
-
-EXPORT_C TAny * __rt_fp_status_addr()
- {
- TAny* aTls = Dll::Tls();
-
- if (aTls)
- return aTls;
-
- // If this is the first time we are called we need to set up some TLS for
- // the FP status word.
-
- TUint32* aReg = (TUint32*)User::AllocZ(sizeof(TUint32));
-
- _LIT(KFpGeneralPanic, "FP Emulator");
-
- if (aReg)
- {
- TInt r = Dll::SetTls(aReg);
- if (r==KErrNone)
- return aReg;
-
- // if we get here we really in trouble. Just Panic.
- User::Panic(KFpGeneralPanic, KErrGeneral);
- }
- else
- {
- // If we get here, we're toast anyway....
- User::Panic(KFpGeneralPanic, KErrNoMemory);
- }
-
- return 0;
- }
-
-}
-
--- a/kernel/eka/compsupp/rvct3_1/type_info.cpp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-#include <typeinfo>
-
-EXPORT_C bool std::type_info::operator==(const std::type_info& rhs) const
- {
- if (this == &rhs)
- {
- return true;
- }
-
- const char* s1 = this->name();
- const char* s2 = rhs.name();
-
- while ( *s1 == *s2 && *s1 != '\0' )
- {
- s1++;
- s2++;
- }
-
- return ( *s1 == '\0' && *s2 == '\0' );
- }
-
-EXPORT_C bool std::type_info::operator!=(const std::type_info& rhs) const
- {
- return !(*this == rhs);
- }
-
--- a/kernel/eka/compsupp/rvct3_1/ucppfini.cpp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,88 +0,0 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// This file is part of usrt.lib (but not ksrt.lib).
-//
-//
-
-
-extern "C" {
-
-typedef void (DTOR)(void *);
-
-struct dtd
-{
- void * obj;
- DTOR * dtor;
-};
-
-
-#define MAX_DTOR_RECORDS 256
-dtd dtor_rec[MAX_DTOR_RECORDS];
-
-typedef dtd** dso_handle;
-dtd * __dso_handle = &dtor_rec[MAX_DTOR_RECORDS];
-
-
-// This is called by compiler generated code to record needed destructions of
-// dynamically initialized (ctor) top level (BSS) data.
-// I guess this is more efficient for the compiler than __cxa_atexit, since
-// it takes the object that needs dtoring as its first arg, which means its in
-// the right register when the ctor returns.
-void __aeabi_atexit(void *aObject, void (*aDtor)(void *), dso_handle aHandle)
- {
- dtd * drec = *aHandle;
- drec--;
-
- if (drec < &dtor_rec[0])
- return; // Need to decide what to do here
-
- drec->dtor = aDtor;
- drec->obj = aObject;
-
- *aHandle = drec;
- }
-
-int __cxa_atexit( void (*aDtor)(void *), void *aObject, dso_handle aHandle )
- {
- __aeabi_atexit(aObject, aDtor, aHandle);
-
- // This is what the C++ GABI spec says to do!!
- if (*aHandle < &dtor_rec[0])
- return -1;
-
- return 0;
- }
-
-void __cxa_finalize(dso_handle d)
- {
- dtd * drec = * d;
- dtd * lim = &dtor_rec[MAX_DTOR_RECORDS];
-
- while (drec < lim)
- {
- drec->dtor(drec->obj);
- drec++;
- }
-
- *d = drec;
- }
-
-void run_static_dtors()
- {
- __cxa_finalize(&__dso_handle);
- }
-
-
-} // extern "C"
-
--- a/kernel/eka/compsupp/rvct3_1/ucppinit.cpp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,75 +0,0 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// This file is part of usrt.lib and ksrt.lib.
-//
-//
-
-
-extern "C" {
-
-// This calls each of the compiler constructed functions referenced from pi_ctorvec.
-// These functions arrange to 'call' the appropriate constructor for the 'static' instance
-// (in fact the call may be inlined). If the class of the instance has a destructor then
-// compiler records that this object needs 'destructing' at 'exit' time. It does this by
-// calling the function __cxa_atexit. We provide our own definition of this.
-//
-
-
-__asm void __cpp_initialize__aeabi_()
- {
- CODE32
-
- IMPORT |SHT$$INIT_ARRAY$$Base| [WEAK]
- IMPORT |SHT$$INIT_ARRAY$$Limit| [WEAK]
-
- // Export std::nothrow from here.
- EXPORT _ZSt7nothrow
-
- STMFD r13!,{r3-r5,r14}
-
- LDR r4,base
- LDR r5,limit
- CMP r4,r5
-
- // Exit if the array is empty.
- LDMEQFD r13!,{r3-r5,pc}
-
-loop
- LDR r0,[r4,#0]
- ADD r0,r0,r4
-#ifdef __MARM_ARMV4__
- ADR r14,ret
- MOV pc,r0
-#else
- BLX r0
-#endif
-
-ret
- ADD r4,r4,#4
- CMP r4,r5
- BNE loop
- LDMFD r13!,{r3-r5,pc}
-
-base
- DCD |SHT$$INIT_ARRAY$$Base|
-limit
- DCD |SHT$$INIT_ARRAY$$Limit|
-
-// cheat - defining this here saves a whole 4 bytes!!! - value is never used
-_ZSt7nothrow
- }
-
-
-} // extern "C"
-
--- a/kernel/eka/compsupp/rvct3_1/usrt.mmp Thu Sep 02 21:54:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of the License "ARM EABI LICENCE.txt"
-// which accompanies this distribution, and is available
-// in kernel/eka/compsupp.
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// usrt.mpp
-//
-//
-
-target usrt3_1.lib
-targettype lib
-
-always_build_as_arm
-
-sourcepath call_via_rx
-source r0.cpp r1.cpp r2.cpp r3.cpp
-source r4.cpp r5.cpp r6.cpp r7.cpp
-
-sourcepath .
-source ucppinit.cpp ucppfini.cpp
-source dllexp.cpp
-
-sourcepath ../symaehabi
-source callfirstprocessfn.cpp
-
-OS_LAYER_SYSTEMINCLUDE_SYMBIAN
-
-start armcc
- arminc
-end
-
-vendorid 0x70000001
--- a/kernel/eka/compsupp/symaehabi/callfirstprocessfn.cpp Thu Sep 02 21:54:16 2010 +0300
+++ b/kernel/eka/compsupp/symaehabi/callfirstprocessfn.cpp Fri Sep 17 08:37:04 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2004-2010 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of the License "ARM EABI LICENCE.txt"
@@ -39,14 +39,18 @@
{
TCppRTExceptionsGlobals aExceptionGlobals;
+ #if ENABLE_2ND_EMERGENCY_BUFFER
+ aExceptionGlobals.Init2ndEmergencyBuffer();
+ #endif
+
if (!aNotFirst)
{
// Init statics for implicitly linked DLLs
User::InitProcess();
- // Init statics for EXE
//pick up export table if we're an exexp
__DLL_Export_Table__();
+ // Init statics for EXE
__cpp_initialize__aeabi_();
}
#ifdef __LEAVE_EQUALS_THROW__
@@ -54,9 +58,15 @@
try {
r = aNotFirst ? (*aFn)(aPtr) : E32Main();
+ #if ENABLE_2ND_EMERGENCY_BUFFER
+ aExceptionGlobals.Kill2ndEmergencyBuffer();
+ #endif
}
catch (XLeaveException&)
{
+ #if ENABLE_2ND_EMERGENCY_BUFFER
+ aExceptionGlobals.Kill2ndEmergencyBuffer();
+ #endif
User::Panic(KLitUser, EUserLeaveWithoutTrap);
}
--- a/kernel/eka/compsupp/symaehabi/cppsemantics.cpp Thu Sep 02 21:54:16 2010 +0300
+++ b/kernel/eka/compsupp/symaehabi/cppsemantics.cpp Fri Sep 17 08:37:04 2010 +0300
@@ -6,7 +6,7 @@
* text file LICENCE.txt (ARM contract number LEC-ELA-00080 v1.0).
*/
-/* Portions copyright Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). */
+/* Portions copyright Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies). */
/*
* RCS $Revision: 92950 $
@@ -354,9 +354,26 @@
void *__ARM_exceptions_buffer_allocate(void *buffer, size_t size)
{
emergency_buffer *b = (emergency_buffer *)buffer;
+
+ #ifndef __EPOC32__
if (size > sizeof(emergency_eco) || b == NULL || b->inuse) return NULL;
b->inuse = true;
return &b->eco;
+ #else
+ ASSERT(b);
+
+ if (size > sizeof(emergency_eco) || b->inuse) {
+ // The first buffer isn't usable; try the second one instead, if it exists.
+ if (b->em_buf2_p)
+ return b->em_buf2_p->Alloc(size);
+ else
+ return NULL;
+ }
+ else {
+ b->inuse = true;
+ return &b->eco;
+ }
+ #endif
}
// Deallocator: Must return non-NULL if and only if it recognises
@@ -364,9 +381,26 @@
void *__ARM_exceptions_buffer_free(void *buffer, void *addr)
{
emergency_buffer *b = (emergency_buffer *)buffer;
+
+ #ifndef __EPOC32__
if (b == NULL || addr != &b->eco) return NULL;
b->inuse = false;
return b;
+ #else
+ ASSERT(b);
+
+ if (addr != &b->eco) {
+ // The object wasn't from the first buffer; see if it is from the second one.
+ if (b->em_buf2_p)
+ return b->em_buf2_p->Free(addr);
+ else
+ return NULL;
+ }
+ else {
+ b->inuse = false;
+ return b;
+ }
+ #endif
}
# if 0
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/kernel/eka/compsupp/symaehabi/emergency_buffer.h Fri Sep 17 08:37:04 2010 +0300
@@ -0,0 +1,75 @@
+// Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of the License "ARM EABI LICENCE.txt"
+// which accompanies this distribution, and is available
+// in kernel/eka/compsupp.
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+//
+
+template<typename T, unsigned N> class TEmergencyBuffer
+ {
+public:
+ void Init();
+public:
+ void* Alloc(unsigned);
+ void* Free(void*);
+private:
+ bool iIsOccupied[N];
+ T iSlots[N];
+private:
+ TEmergencyBuffer();
+ };
+
+template<typename T, unsigned N> inline void TEmergencyBuffer<T,N>::Init()
+ {
+ for (int i=0; i < N; i++)
+ {
+ iIsOccupied[i] = 0;
+ }
+ }
+
+template<typename T, unsigned N> void* TEmergencyBuffer<T,N>::Alloc(unsigned n)
+ {
+ if ( n <= sizeof(T) )
+ {
+ for (int i=0; i < N; i++)
+ {
+ bool& isOccupied = iIsOccupied[i];
+
+ if ( ! isOccupied )
+ {
+ isOccupied = 1;
+ return &iSlots[i];
+ }
+ }
+ }
+
+ return NULL;
+ }
+
+template<typename T, unsigned N> void* TEmergencyBuffer<T,N>::Free(void* p)
+ {
+ for (int i=0; i < N; i++)
+ {
+ const void* bp = &iSlots[i];
+ bool& isOccupied = iIsOccupied[i];
+
+ if ( bp == p && isOccupied )
+ {
+ isOccupied = 0;
+ return p;
+ }
+ }
+
+ return NULL;
+ }
+
+
--- a/kernel/eka/compsupp/symaehabi/symbian_support.cpp Thu Sep 02 21:54:16 2010 +0300
+++ b/kernel/eka/compsupp/symaehabi/symbian_support.cpp Fri Sep 17 08:37:04 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2004-2010 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of the License "ARM EABI LICENCE.txt"
@@ -12,7 +12,7 @@
//
// Description:
// e32/compsupp/symaehabi/symbian_support.cpp
-//
+//
//
/* Environment: */
@@ -40,6 +40,7 @@
EXPORT_C TCppRTExceptionsGlobals::TCppRTExceptionsGlobals()
{
buffer.inuse = false;
+ buffer.em_buf2_p = NULL;
thread_globals.uncaughtExceptions = 0;
thread_globals.unexpectedHandler = NAMES::default_unexpected_handler;
thread_globals.terminateHandler = __default_terminate_handler;
@@ -50,8 +51,27 @@
thread_globals.emergency_buffer = &buffer;
Dll::SetTls(this);
}
+
+EXPORT_C void TCppRTExceptionsGlobals::Init2ndEmergencyBuffer()
+ {
+ ASSERT(buffer.em_buf2_p == NULL);
+
+ TEmergencyBuffer2* p = (TEmergencyBuffer2*) User::Alloc( sizeof(TEmergencyBuffer2) );
+ if (!p)
+ abort();
+ p->Init();
+ buffer.em_buf2_p = p;
+ }
+
+EXPORT_C void TCppRTExceptionsGlobals::Kill2ndEmergencyBuffer()
+ {
+ ASSERT(buffer.em_buf2_p);
+
+ User::Free(buffer.em_buf2_p);
+ }
+
#if __ARMCC_VERSION < 220000
-extern "C"
+extern "C"
{
/*
we have to dummy up the following for 2.1. The names changed in the def file
@@ -78,7 +98,7 @@
}
}
-#else
+#else
// This is the key function that forces the class impedimenta to be get exported in RVCT 2.2 and later.
EXPORT_C void XLeaveException::ForceKeyFunction(){}
#endif
@@ -224,9 +244,9 @@
// look in extension ROM if there is one
TUint main_start = UserSvr::RomHeaderAddress();
TUint main_end = main_start + ((TRomHeader*)main_start)->iUncompressedSize;
-
+
TUint rda = UserSvr::RomRootDirectoryAddress();
-
+
// Assume rom starts on multiple of 4k
if (rda > main_end)
{
@@ -237,7 +257,7 @@
// 3. the extension ROM is mapped starting at a megabyte boundary
// Thus the address of the extension ROM header may be obtained by rounding the root directory
// address down to the next megabyte boundary.
-
+
TUint ext_start = rda &~ 0x000fffffu;
TRomExceptionSearchTable* extrom_exctab = (TRomExceptionSearchTable*)(((TExtensionRomHeader*)ext_start)->iRomExceptionSearchTable);
if (extrom_exctab && addr >= extrom_exctab->iEntries[0] && addr < GET_EST_FENCEPOST(extrom_exctab))
@@ -315,7 +335,7 @@
public:
virtual void Overflow(TDes8& /*aDes*/) {}
};
-
+
#endif
void DebugPrintf(const char * aFmt, ...)
@@ -333,7 +353,7 @@
RDebug::RawPrint(buf2);
#else
(void)aFmt;
-#endif
+#endif
}
} // extern "C"
--- a/kernel/eka/compsupp/symaehabi/symbian_support.h Thu Sep 02 21:54:16 2010 +0300
+++ b/kernel/eka/compsupp/symaehabi/symbian_support.h Fri Sep 17 08:37:04 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2004-2010 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of the License "ARM EABI LICENCE.txt"
@@ -69,8 +69,25 @@
XLeaveException aUserLeaveException;
};
+
+
+#include "emergency_buffer.h"
+
+struct emergency_eco2 : emergency_eco {
+ // The secondary emergency buffer might as well support slightly bigger objects.
+ int spacer[6];
+};
+
+typedef TEmergencyBuffer<emergency_eco2, 2> TEmergencyBuffer2;
+
+
struct emergency_buffer {
bool inuse;
+
+ TEmergencyBuffer2* em_buf2_p; // offset = 4, size = 4.
+
+ // This field has always been forced to an 8-byte alignment, so the fact that
+ // em_buf2_p has been added shouldn't break compatibility with existing binaries.
struct emergency_eco eco;
};
@@ -79,6 +96,9 @@
{
public:
IMPORT_C TCppRTExceptionsGlobals();
+public:
+ IMPORT_C void Init2ndEmergencyBuffer();
+ IMPORT_C void Kill2ndEmergencyBuffer();
private:
__cxa_eh_globals thread_globals;
emergency_buffer buffer;
--- a/kernel/eka/drivers/locmedia/locmedia.cpp Thu Sep 02 21:54:16 2010 +0300
+++ b/kernel/eka/drivers/locmedia/locmedia.cpp Fri Sep 17 08:37:04 2010 +0300
@@ -5386,8 +5386,6 @@
TLocalDriveCapsV6& caps = *(TLocalDriveCapsV6*)capsBuf.Ptr();
blockSize = caps.iBlockSize;
- __ASSERT_DEBUG(blockSize,LOCM_FAULT());
- __ASSERT_DEBUG(__e32_bit_count_32(blockSize)==1,LOCM_FAULT());
TLocDrv* drive;
for (i=0; i<KMaxLocalDrives; ++i)
--- a/kernel/eka/drivers/medmmc/bgahsmmcptn.cpp Thu Sep 02 21:54:16 2010 +0300
+++ b/kernel/eka/drivers/medmmc/bgahsmmcptn.cpp Fri Sep 17 08:37:04 2010 +0300
@@ -328,8 +328,8 @@
// ROM/ROFS partitions have a BB5 checksum header that must be offset for the Symbian OS.
const TUint32 KstartOffset = ((KPartitionTypeROM == partitionType) || (KPartitionTypeRofs == partitionType) || (KPartitionTypeEmpty == partitionType)) ? KBB5HeaderSizeInSectors : 0;
- iPartitionInfo->iEntry[partitionCount].iPartitionBaseAddr = (Int64) ((partitionTable->iPartitions[index].iStart_sector + KstartOffset) << KDiskSectorShift);
- iPartitionInfo->iEntry[partitionCount].iPartitionLen = (Int64) ((partitionTable->iPartitions[index].iSize - KstartOffset) << KDiskSectorShift);
+ iPartitionInfo->iEntry[partitionCount].iPartitionBaseAddr = ((Int64) partitionTable->iPartitions[index].iStart_sector + KstartOffset) << KDiskSectorShift;
+ iPartitionInfo->iEntry[partitionCount].iPartitionLen = ((Int64) partitionTable->iPartitions[index].iSize - KstartOffset) << KDiskSectorShift;
__KTRACE_OPT(KPBUSDRV, Kern::Printf("Registering partition #%d:", partitionCount));
__KTRACE_OPT(KPBUSDRV, Kern::Printf("partitionCount....: %d", partitionCount));
--- a/kernel/eka/include/e32def.h Thu Sep 02 21:54:16 2010 +0300
+++ b/kernel/eka/include/e32def.h Fri Sep 17 08:37:04 2010 +0300
@@ -443,10 +443,13 @@
@see TDblQue
*/
#ifndef _FOFF
+// provide calculation-based version of _FOFF() for when builtin_offsetof()
+// can't be used
+#define _FOFF_DYNAMIC(c,f) (((TInt)&(((c *)0x1000)->f))-0x1000)
#if __GNUC__ < 4
-#define _FOFF(c,f) (((TInt)&(((c *)0x1000)->f))-0x1000)
+#define _FOFF(c,f) _FOFF_DYNAMIC(c,f)
#else
-#define _FOFF(c,f) __builtin_offsetof(c,f)
+#define _FOFF(c,f) (__builtin_offsetof(c,f))
#endif
#endif
--- a/kernel/eka/include/e32ver.h Thu Sep 02 21:54:16 2010 +0300
+++ b/kernel/eka/include/e32ver.h Fri Sep 17 08:37:04 2010 +0300
@@ -28,7 +28,7 @@
const TInt KE32MajorVersionNumber=2;
const TInt KE32MinorVersionNumber=0;
-const TInt KE32BuildVersionNumber=3115;
+const TInt KE32BuildVersionNumber=3117;
const TInt KMachineConfigurationMajorVersionNumber=1;
const TInt KMachineConfigurationMinorVersionNumber=0;
--- a/kernel/eka/kernel/sutils.cpp Thu Sep 02 21:54:16 2010 +0300
+++ b/kernel/eka/kernel/sutils.cpp Fri Sep 17 08:37:04 2010 +0300
@@ -780,9 +780,31 @@
/**
Gets the address of the low priority DFC queue.
+Please note that this function is now deprecated. It is a leftover from the days before Symbian OS v9.3
+when sharing a general purpose DFC queue was acceptable. With the coming of code and ROM paging this
+practice became undesirable, and with the coming of writeable data paging it has become downright dangerous
+due to the unbounded performance times introduced by paging, which can cause drivers that share this queue
+to block one another. Therefore, this is to be removed and all drivers must use their own private queue.
+
+Instead of using this function, create your own DFC queue using code something like the following:
+
+TDynamicDfcQue *iDfcQue; // In class definition in header file
+
+// In your driver or extension's constructor:
+
+const TInt KDfcHelperThreadPriority = 27; // Same as DFC thread 0
+_LIT(KDfcHelperThreadName, "MyDfcHelperThread"); // Name as appropriate for your code
+
+if (Kern::DynamicDfcQCreate(iDfcQue, KDfcHelperThreadPriority, KDfcHelperThreadName) == KErrNone)
+ {
+ // Now you can use iDfcQue wherever you would have called Kern::DfcQue0() and all DFC callbacks
+ // will happen on your private DFC queue
+ }
+
@return A pointer to the low priority DFC queue.
@pre Call in any context.
+@deprecated
*/
EXPORT_C TDfcQue* Kern::DfcQue0()
{
@@ -799,9 +821,19 @@
a personality layer this will usually be the highest priority thread
in the system.
+Please note that this function is now deprecated. It is a leftover from the days before Symbian OS v9.3
+when sharing a general purpose DFC queue was acceptable. With the coming of code and ROM paging this
+practice became undesirable, and with the coming of writeable data paging it has become downright dangerous
+(DfcQue1 particularly so) due to the unbounded performance times introduced by paging, which can cause
+drivers that share this queue to block one another. Therefore, this is to be removed and all drivers must
+use their own private queue.
+
+@see Kern::DfcQue0() for an example of creating a private DFC queue.
+
@return A pointer to the high priority DFC queue.
@pre Call in any context.
+@deprecated
*/
EXPORT_C TDfcQue* Kern::DfcQue1()
{
--- a/kernel/eka/nkern/nk_timer.cpp Thu Sep 02 21:54:16 2010 +0300
+++ b/kernel/eka/nkern/nk_timer.cpp Fri Sep 17 08:37:04 2010 +0300
@@ -60,7 +60,15 @@
The expiry handler will be called in either ISR context or in the context
of the nanokernel timer thread (DfcThread1).
- Note that NKern::TimerTicks() can be used to convert milliseconds to ticks.
+ Note that NKern::TimerTicks() can be used to convert milliseconds to ticks.
+
+ Be aware that if you are being called back in DFC context then the DFC thread
+ involved (DfcThread1) will be shared with both the kernel and other device
+ drivers. YOU MUST DO YOUR WORK AND RETURN AS QUICKLY AS POSSIBLE in order to
+ not interfere with the internal workings of the kernel and with other device
+ drivers. If you need to do anything more complex than signalling a semaphore
+ or similar short term processing then you may want to consider using your own
+ DFC queue. Failure to follow these rules WILL LEAD TO INSTABILITY OF THE PHONE.
@param aTime Timeout in nanokernel ticks
@param aDfc TRUE if DFC callback required, FALSE if ISR callback required.
--- a/kernel/eka/release.txt Thu Sep 02 21:54:16 2010 +0300
+++ b/kernel/eka/release.txt Fri Sep 17 08:37:04 2010 +0300
@@ -1,3 +1,36 @@
+Version 2.00.3117
+=================
+(Made by fadhliM 26/08/2010)
+
+1. kunmitta
+ 1. ou1cimx1#541901 Default macro for TB10.1 builds should be RVCT4_0
+
+
+Version 2.00.3116
+=================
+(Made by fadhliM 23/08/2010)
+
+1. vfebvre
+ 1. ou1cimx1#536515 ENV Remove baseapitest from the kernelhwsrv package definition file
+
+2. stekarls
+ 1. ou1cimx1#359280 Only one active exception object allowed while OOM
+
+3. jimhofe
+ 1. ou1cimx1#516845 Add definition of _FOFF_DYNAMIC(c,f) as an alternative to _FOFF(c,f) where f cannot be computed at compile time
+ 2. MINOR_CHANGE Removing names from documentation
+
+4. amironen
+ 1. ou1cimx1#495567 Improve code coverage for SDIO
+
+5. fagortz
+ 1. ou1cimx1#519356 10.1: Mass Memory size is approx. 2GB, should be approx. 8GB
+ 2. ou1cimx1#521235 LocDrv::RegisterPagingDevice() assumes iblockSize is non-zero
+
+6. coliward
+ 1. ou1cimx1#519459 EI DfcQue0() and DfcQue1() should display an informational trace when used
+
+
Version 2.00.3115
=================
(Made by fadhliM 16/08/2010)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/kernel/eka/rombuild/t_sdiotest.oby Fri Sep 17 08:37:04 2010 +0300
@@ -0,0 +1,27 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+#define BASE_ROM
+#define EXCLUDE_SERIAL_DRIVERS
+#define SYMBIAN_EXCLUDE_SERIALPORT
+
+#include <rom\##VARIANT##\header.iby>
+#include <rom\##VARIANT##\kernel.iby>
+#include "user.iby"
+#include <rom\hal\hal.iby>
+#include <rom\f32\f32.iby>
+#include <rom\##VARIANT##\sdio\t_sdiotest.iby>
+
Binary file kernelhwsrv_info/doc_pub/base_smp_user_side_migration_guide.doc has changed
--- a/kerneltest/f32test/group/bld.inf Thu Sep 02 21:54:16 2010 +0300
+++ b/kerneltest/f32test/group/bld.inf Fri Sep 17 08:37:04 2010 +0300
@@ -265,11 +265,14 @@
t_dircache
-#ifdef SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
+#ifndef WINS
+t_file64bit
+#else
+// This test runs too long on a large drive as it fills up the disk
t_file64bit manual
+#endif
fhserver64bit support
#include "../plugins/version_2/file64bit/group/file64bit_plugin.inf"
-#endif
t_surrogatepair
--- a/kerneltest/f32test/server/t_file64bit.cpp Thu Sep 02 21:54:16 2010 +0300
+++ b/kerneltest/f32test/server/t_file64bit.cpp Fri Sep 17 08:37:04 2010 +0300
@@ -190,10 +190,11 @@
test.Printf(_L("Read File Section %S\n"),&aName);
TInt r = TheFs.ReadFileSection(aName,aPos,aBuffer,aLen);
TInt len = aBuffer.Length();
-
- test_KErrNone(r);
- if(KFileSizeMaxLargerThan4GBMinusOne == EFalse && aPos >= K4GB)
- test(len == 0);
+ test_KErrNone(r);
+ if(KFileSizeMaxLargerThan4GBMinusOne == EFalse && aPos >= K4GB)
+ {
+ test_Equal(0, len);
+ }
return(*this);
}
@@ -367,10 +368,10 @@
test.Printf(_L("%S write\n"),&iName);
TInt64 seekPos = 0;
- TInt rr = RFile64::Seek(ESeekCurrent,seekPos);
- test(rr == KErrNone);
+ TInt r = RFile64::Seek(ESeekCurrent,seekPos);
+ test_KErrNone(r);
- TInt r = RFile64::Write(aDes);
+ r = RFile64::Write(aDes);
if( KErrNone == r) // this is to ensure that the written data is committed and not cached.
r = RFile64::Flush();
@@ -401,8 +402,8 @@
test.Printf(_L("%S write\n"),&iName);
TInt64 seekPos = 0;
- TInt rr = RFile64::Seek(ESeekCurrent,seekPos);
- test(rr == KErrNone);
+ TInt r = RFile64::Seek(ESeekCurrent,seekPos);
+ test_KErrNone(r);
RFile64::Write(aDes, aStatus);
User::WaitForRequest(aStatus);
@@ -415,16 +416,16 @@
{
if((seekPos + aDes.Length()) < K4GB)
{
- test(aStatus.Int() == KErrNone);
+ test_KErrNone(aStatus.Int());
}
else
{
- test(aStatus.Int() == KErrNotSupported);
+ test_Equal(KErrNotSupported, aStatus.Int());
}
}
else
{
- test(aStatus.Int() == KErrNone);
+ test_KErrNone(aStatus.Int());
}
return(*this);
}
@@ -437,10 +438,10 @@
test.Printf(_L("%S write\n"),&iName);
TInt64 seekPos = 0;
- TInt rr = RFile64::Seek(ESeekCurrent,seekPos);
- test(rr == KErrNone);
-
- TInt r = RFile64::Write(aDes, aLength);
+ TInt r = RFile64::Seek(ESeekCurrent,seekPos);
+ test_KErrNone(r);
+
+ r = RFile64::Write(aDes, aLength);
if( KErrNone == r) // this is to ensure that the written data is committed and not cached.
r = RFile64::Flush();
if(KFileSizeMaxLargerThan4GBMinusOne == EFalse)
@@ -469,8 +470,8 @@
test.Printf(_L("%S write\n"),&iName);
TInt64 seekPos = 0;
- TInt rr = RFile64::Seek(ESeekCurrent,seekPos);
- test(rr == KErrNone);
+ TInt r = RFile64::Seek(ESeekCurrent,seekPos);
+ test_KErrNone(r);
RFile64::Write(aDes,aLength,aStatus);
User::WaitForRequest(aStatus);
@@ -483,9 +484,13 @@
if(KFileSizeMaxLargerThan4GBMinusOne == EFalse)
{
if((seekPos + aLength) < K4GB)
- test(aStatus.Int() == KErrNone);
- else
- test(aStatus.Int() == KErrNotSupported);
+ {
+ test_KErrNone(aStatus.Int());
+ }
+ else
+ {
+ test_Equal(KErrNotSupported, aStatus.Int());
+ }
}
else
{
@@ -599,7 +604,14 @@
{
test.Printf(_L("%S writeE 0x%lx-0x%lx\n"),&iName,aPos,aPos+aLen-1);
TInt r = RFile64::Write(aPos,aDes,aLen);
- test_Value(r, r == (aLen < 0) ? KErrArgument : KErrLocked);
+ if (aLen < 0)
+ {
+ test_Equal(KErrArgument, r);
+ }
+ else
+ {
+ test_Equal(KErrLocked, r);
+ }
return(*this);
}
@@ -617,18 +629,24 @@
}
if(aLen < 0)
- test(aStatus.Int() == KErrArgument);
+ {
+ test_Equal(KErrArgument, aStatus.Int());
+ }
else
{
if(KFileSizeMaxLargerThan4GBMinusOne == EFalse)
{
if((aPos + aLen) < K4GB)
- test(aStatus.Int() == KErrNone);
+ {
+ test_KErrNone(aStatus.Int());
+ }
else
- test(aStatus.Int() == KErrNotSupported);
+ {
+ test_Equal(KErrNotSupported, aStatus.Int());
+ }
}
else
- test(aStatus.Int() == KErrNone);
+ test_KErrNone(aStatus.Int());
}
return(*this);
}
@@ -650,13 +668,17 @@
if(KFileSizeMaxLargerThan4GBMinusOne == EFalse)
{
if((aPos + aDes.Length()) < K4GB)
- test(aStatus.Int() == KErrNone);
+ {
+ test_KErrNone(aStatus.Int());
+ }
else
- test(aStatus.Int() == KErrNotSupported);
+ {
+ test_Equal(KErrNotSupported, aStatus.Int());
+ }
}
else
{
- test(aStatus.Int() == KErrNone);
+ test_KErrNone(aStatus.Int());
}
return(*this);
}
@@ -675,7 +697,7 @@
RFile64::Flush(aStatus);
User::WaitForRequest(aStatus);
}
- test(aStatus.Int() == KErrNone);
+ test_KErrNone(aStatus.Int());
return(*this);
}
@@ -695,9 +717,13 @@
}
if(aLen < 0)
- test(aStatus.Int() == KErrArgument);
+ {
+ test_Equal(KErrArgument, aStatus.Int());
+ }
else
- test(aStatus.Int() == KErrNone);
+ {
+ test_KErrNone(aStatus.Int());
+ }
return(*this);
}
@@ -724,21 +750,23 @@
RFile64::Read(aDes, aStatus);
User::WaitForRequest(aStatus);
TInt len = aDes.Length();
- TInt rr = RFile64::Size(size);
- test(rr == KErrNone);
+ TInt r = RFile64::Size(size);
+ test_KErrNone(r);
if(KFileSizeMaxLargerThan4GBMinusOne == EFalse)
{
if(size < K4GB)
- test(aStatus.Int() == KErrNone);
+ {
+ test_KErrNone(aStatus.Int());
+ }
else
{
- test(aStatus.Int() == KErrNone);
- test(len == 0);
+ test_KErrNone(aStatus.Int());
+ test_Equal(0, len);
}
}
else
{
- test(aStatus.Int() == KErrNone);
+ test_KErrNone(aStatus.Int());
}
return(*this);
}
@@ -753,21 +781,23 @@
RFile64::Read(aDes,aLen,aStatus);
User::WaitForRequest(aStatus);
TInt len = aDes.Length();
- TInt rr = RFile64::Size(size);
- test(rr == KErrNone);
+ TInt r = RFile64::Size(size);
+ test_KErrNone(r);
if(KFileSizeMaxLargerThan4GBMinusOne == EFalse)
{
if(size < K4GB)
- test(aStatus.Int() == KErrNone);
+ {
+ test_KErrNone(aStatus.Int());
+ }
else
{
- test(aStatus.Int() == KErrNone);
- test(len == 0);
+ test_KErrNone(aStatus.Int());
+ test_Equal(0, len);
}
}
else
{
- test(aStatus.Int() == KErrNone);
+ test_KErrNone(aStatus.Int());
}
return(*this);
}
@@ -779,7 +809,14 @@
{
test.Printf(_L("%S read 0x%08x bytes\n"),&iName,aLen);
TInt r = RFile64::Read(aDes,aLen);
- test_Value(r, r == (aLen < 0) ? KErrArgument : KErrNone);
+ if (aLen < 0)
+ {
+ test_Equal(KErrArgument, r);
+ }
+ else
+ {
+ test_KErrNone(r);
+ }
return(*this);
}
@@ -791,11 +828,17 @@
test.Printf(_L("%S read 0x%lx-0x%lx\n"),&iName,aPos,aPos+aLen-1);
TInt r = RFile64::Read(aPos,aDes,aLen);
TInt len = aDes.Length();
- test_Value(r, r == (aLen < 0) ? KErrArgument : KErrNone);
- if(KFileSizeMaxLargerThan4GBMinusOne == EFalse)
+ if (aLen < 0)
+ {
+ test_Equal(KErrArgument, r);
+ }
+ else
+ {
+ test_KErrNone(r);
+ }
+ if(KFileSizeMaxLargerThan4GBMinusOne == EFalse && aPos >= K4GB)
{
- if(aPos >= K4GB)
- test(len == 0);
+ test_Equal(0, len);
}
return(*this);
}
@@ -821,13 +864,16 @@
User::WaitForRequest(aStatus);
TInt len = aDes.Length();
if(aLen < 0)
- test(aStatus.Int() == KErrArgument);
+ {
+ test_Equal(KErrArgument, aStatus.Int());
+ }
else
- test(aStatus.Int() == KErrNone);
- if(KFileSizeMaxLargerThan4GBMinusOne == EFalse)
{
- if(aPos >= K4GB)
- test(len == 0);
+ test_KErrNone(aStatus.Int());
+ }
+ if(KFileSizeMaxLargerThan4GBMinusOne == EFalse && aPos >= K4GB)
+ {
+ test_Equal(0, len);
}
return(*this);
}
@@ -864,7 +910,7 @@
test.Printf(_L("%S read 0x%lx\n"),&iName,aPos);
RFile64::Read(aPos,aDes,aStatus);
User::WaitForRequest(aStatus);
- test(aStatus.Int() == KErrNone);
+ test_KErrNone(aStatus.Int());
return(*this);
}
@@ -876,7 +922,14 @@
{
test.Printf(_L("%S read 0x%lx-0x%lx\n"),&iName,aPos,aPos+aLen-1);
TInt r = RFile64::Read(aPos,aDes,aLen);
- test_Value(r, r == (aLen < 0) ? KErrArgument : KErrNone);
+ if (aLen < 0)
+ {
+ test_Equal(KErrArgument, r);
+ }
+ else
+ {
+ test_KErrNone(r);
+ }
return(*this);
}
@@ -890,9 +943,13 @@
RFile64::Read(aPos,aDes,aLen,aStatus);
User::WaitForRequest(aStatus);
if(aLen < 0)
- test(aStatus.Int() == KErrArgument);
+ {
+ test_Equal(KErrArgument, aStatus.Int());
+ }
else
- test(aStatus.Int() == KErrNone);
+ {
+ test_KErrNone(aStatus.Int());
+ }
return(*this);
}
@@ -905,7 +962,7 @@
test.Printf(_L("%S read 0x%lx\n"),&iName,aPos);
RFile64::Read(aPos,aDes,aStatus);
User::WaitForRequest(aStatus);
- test(aStatus.Int() == KErrNone);
+ test_KErrNone(aStatus.Int());
return(*this);
}
@@ -978,7 +1035,14 @@
{
test.Printf(_L("Seek to pos %LD in %d Mode\n"),aPos, aMode);
TInt r = RFile64::Seek(aMode, aPos);
- test_Value(r, r == (aPos < 0) ? KErrArgument : KErrNone);
+ if (aPos < 0)
+ {
+ test_Equal(KErrArgument, r);
+ }
+ else
+ {
+ test_KErrNone(r);
+ }
return(*this);
}
@@ -1018,13 +1082,13 @@
test.Next(_L("2GB File: Open"));
TInt r = TheFs.Entry(fileName, entry);
test_KErrNone(r);
- test((TUint) entry.iSize == testSize);
+ test_Equal(testSize, (TUint) entry.iSize);
TestRFile1.Open(fileName, EFileRead);
TestRFile1.Size(size);
- test(size == testSize);
+ test_Equal(testSize, size);
TestRFile1.Close();
r = TheFs.Delete(fileName);
@@ -1066,12 +1130,12 @@
test.Next(_L("3GB File: Open"));
r = TheFs.Entry(fileName, entry);
test_KErrNone(r);
- test((TUint) entry.iSize == testSize);
+ test_Equal(testSize, (TUint) entry.iSize);
TestRFile1.Open(fileName,EFileRead);
TestRFile1.Size(size);
- test(size == testSize);
+ test_Equal(testSize, size);
TestRFile1.Close();
r = TheFs.Delete(fileName);
@@ -1114,13 +1178,13 @@
r = TheFs.Entry(fileName, entry);
test_KErrNone(r);
- test((TUint) entry.iSize == testSize);
+ test_Equal(testSize, (TUint) entry.iSize);
TestRFile1.Open(fileName, EFileRead);
TestRFile1.Size(size);
- test(size == testSize);
+ test_Equal(testSize, size);
TestRFile1.Close();
r = TheFs.Delete(fileName);
@@ -1167,7 +1231,7 @@
{
TestRFile1.Open(fileName, EFileRead);
TestRFile1.Size(size);
- test(size == testSize);
+ test_Equal(testSize, size);
TestRFile1.Close();
}
@@ -1207,7 +1271,7 @@
void TestOpenMoreThan2GB()
{
// constants and literals
- test.Next(_L("\nTest Files of size more than 2GB\n"));
+ test.Next(_L("Test Files of size more than 2GB\n"));
TInt64 size;
TBuf8<KBUFSIZE> readBuf;
@@ -1232,9 +1296,9 @@
}
test.Next(_L("Write 10 bytes to the file\n"));
- TestRFile1.Write(0, writeBuf, 10);
+ TestRFile1.Write(0, writeBuf, 10);
test.Next(_L("Read 10 bytes from position 0\n"));
- TestRFile1.Read(0, readBuf, 10);
+ TestRFile1.Read(0, readBuf, 10);
test(writeBuf == readBuf);
TInt64 s;
@@ -1916,7 +1980,7 @@
// Check the number of open file handles
TInt resCount = fs.ResourceCount();
- test(resCount == 0);
+ test_Equal(0, resCount);
r = fs.ShareProtected();
test_KErrNone(r);
@@ -1976,7 +2040,7 @@
TInt64 pos = 0;
r = file1.Seek(ESeekCurrent, pos);
test_KErrNone(r);
- test(pos == 0);
+ test_Equal(0, pos);
// make sure we can still use it
test.Next(_L("Read the file from position 4GB-10 and compare the data\n"));
@@ -1994,7 +2058,7 @@
// Check the number of open file handles
resCount = fs.ResourceCount();
- test(resCount == 0);
+ test_Equal(0, resCount);
r = fs.Delete(KClientFileName);
test_KErrNone(r);
@@ -2045,7 +2109,7 @@
// Check the number of open file handles
TInt resCount = fs.ResourceCount();
- test(resCount == 0);
+ test_Equal(0, resCount);
r = fs.ShareProtected();
test_KErrNone(r);
@@ -2096,7 +2160,7 @@
// Check the number of open file handles -
// should be 1 (the one duplicated for the other process)
resCount = fs.ResourceCount();
- test(resCount == 1);
+ test_Equal(1, resCount);
fs.Close();
@@ -2160,7 +2224,7 @@
// Check the number of open file handles
TInt resCount = fs.ResourceCount();
- test(resCount == 0);
+ test_Equal(0, resCount);
r = fs.ShareProtected();
test_KErrNone(r);
@@ -2205,7 +2269,7 @@
TInt ssh;
TInt fsh = handsvr.GetFileHandleLargeFile2(ssh, EFileWrite);
- test (fsh >= 0);
+ test_Value(fsh, fsh >= 0);
// Closing the handle to the server ensures the server has closed it's
// RFs and RFile handles - this provides a means of testing whether we
@@ -2296,7 +2360,7 @@
for(i = pos; i< pos + (KBufSize / 4); i+=4)
{
TUint j = * ((TUint*) &readBuf1[i - pos]);
- test(i == j);
+ test_Equal(i, j);
}
test.Next(_L("Big file is read synchronously in a thread, with aPos = 2GB-1\n"));
@@ -2309,7 +2373,7 @@
for(i = pos; i< pos + (KBufSize / 4); i+=4)
{
TUint j = * ((TUint*) &readBuf2[i - pos]);
- test(i == j);
+ test_Equal(i, j);
}
@@ -2317,7 +2381,7 @@
TBuf8<1> readBuffer;
pos = K4GBMinusTwo;
TestRFile1.ReadP(pos, readBuffer);
- test(readBuffer.Length() == 1);
+ test_Equal(1, readBuffer.Length());
// tests need to be repeated for calling the TUint variant of RFile64::Read()
pos = 0;
@@ -2327,7 +2391,7 @@
for(i = pos; i< pos + (KBufSize / 4); i+=4)
{
TUint j = * ((TUint*) &readBuf1[i - pos]);
- test(i == j);
+ test_Equal(i, j);
}
test.Next(_L("Big file is read synchronously in a thread, with aPos = 2GB\n"));
@@ -2340,14 +2404,14 @@
for(i = pos; i< pos + (KBufSize / 4); i+=4)
{
TUint j = * ((TUint*) &readBuf2[i - pos]);
- test(i == j);
+ test_Equal(i, j);
}
test.Next(_L("Big file is read synchronously in a thread, with aPos = 4GB-2\n"));
pos = K4GBMinusTwo;
TestRFile1.ReadU(pos, readBuffer);
- test(readBuffer.Length() == 1);
+ test_Equal(1, readBuffer.Length());
// tests need to be repeated for calling the current position variant of RFile64::Read()
TInt64 seekPos = 0;
@@ -2358,7 +2422,7 @@
for(i = (TUint)seekPos; i< seekPos + (KBufSize / 4); i+=4)
{
TUint j = * ((TUint*) &readBuf1[i - (TUint)seekPos]);
- test(i == j);
+ test_Equal(i, j);
}
test.Next(_L("Big file is read synchronously in a thread, with aPos = 2GB\n"));
@@ -2372,7 +2436,7 @@
for(i = (TUint)seekPos; i< seekPos + (KBufSize / 4); i+=4)
{
TUint j = * ((TUint*) &readBuf2[i - (TUint)seekPos]);
- test(i == j);
+ test_Equal(i, j);
}
@@ -2380,14 +2444,14 @@
seekPos = K4GBMinusTwo;
TestRFile1.Seek(ESeekStart,seekPos);
TestRFile1.Read(readBuffer);
- test(readBuffer.Length() == 1);
+ test_Equal(1, readBuffer.Length());
if(KFileSizeMaxLargerThan4GBMinusOne == EFalse)
{
TInt64 pos64 = K4GB;
TestRFile1.ReadP(pos64, readBuf1);
- test(readBuf1.Length() == 0);
+ test_Equal(0, readBuf1.Length());
}
TestRFile1.Close();
}
@@ -2438,7 +2502,7 @@
for(i = pos; i< pos + (KBufSize / 4); i+=4)
{
TUint j = * ((TUint*) &readBuf[i - pos]);
- test(i == j);
+ test_Equal(i, j);
}
test.Next(_L("Big file is read asynchronously in a thread, with aPos = 2GB-1\n"));
@@ -2451,7 +2515,7 @@
for(i = pos; i< pos + (KBufSize / 4); i+=4)
{
TUint j = * ((TUint*) &readBuf[i - pos]);
- test(i == j);
+ test_Equal(i, j);
}
test.Next(_L("Big file is read asynchronously in a thread, with aPos = 4GB-1\n"));
@@ -2460,7 +2524,7 @@
TRequestStatus status3 = KRequestPending;
pos = K4GBMinusTwo;
TestRFile1.Read(pos, readBuf1, status3);
- test(readBuf1.Length() == 1);
+ test_Equal(1, readBuf1.Length());
fileSize = K4GBMinusOne;
TestRFile1.Size(size);
@@ -2474,7 +2538,7 @@
for(i = pos; i< pos + (KBufSize / 4); i+=4)
{
TUint j = * ((TUint*) &readBuf[i - pos]);
- test(i == j);
+ test_Equal(i, j);
}
test.Next(_L("Big file is read asynchronously in a thread, with aPos = 2GB-1\n"));
@@ -2487,7 +2551,7 @@
for(i = pos; i< pos + (KBufSize / 4); i+=4)
{
TUint j = * ((TUint*) &readBuf[i - pos]);
- test(i == j);
+ test_Equal(i, j);
}
test.Next(_L("Big file is read asynchronously in a thread, with aPos = 4GB-1\n"));
@@ -2495,7 +2559,7 @@
status3 = KRequestPending;
pos = K4GBMinusTwo;
TestRFile1.ReadU(pos, readBuf1, status3);
- test(readBuf1.Length() == 1);
+ test_Equal(1, readBuf1.Length());
// tests need to be repeated for calling the current position variant of RFile64::Read()
TInt64 seekPos = 0;
@@ -2506,7 +2570,7 @@
for(i = (TUint)seekPos; i< seekPos + (KBufSize / 4); i+=4)
{
TUint j = * ((TUint*) &readBuf[i - (TUint)seekPos]);
- test(i == j);
+ test_Equal(i, j);
}
test.Next(_L("Big file is read asynchronously in a thread, with aPos = 2GB-1\n"));
@@ -2520,7 +2584,7 @@
for(i = (TUint)seekPos; i< seekPos + (KBufSize / 4); i+=4)
{
TUint j = * ((TUint*) &readBuf[i - (TUint)seekPos]);
- test(i == j);
+ test_Equal(i, j);
}
test.Next(_L("Big file is read asynchronously in a thread, with aPos = 4GB-1\n"));
@@ -2529,7 +2593,7 @@
seekPos = K4GBMinusTwo;
TestRFile1.Seek(ESeekStart,seekPos);
TestRFile1.Read(readBuf1, status3);
- test(readBuf1.Length() == 1);
+ test_Equal(1, readBuf1.Length());
// Async read from pos = 4GB
@@ -2539,7 +2603,7 @@
TInt64 pos64;
pos64 = K4GB;
TestRFile1.Read(pos64, readBuf, status5);
- test(readBuf.Length() == 0);
+ test_Equal(0, readBuf.Length());
}
// Close the file
TestRFile1.Close();
@@ -2587,26 +2651,26 @@
// Sync read from pos = 0 and length = 256
pos = 0;
TestRFile1.Read(pos, readBuf, 256);
- test(readBuf.Length() == 256);
+ test_Equal(256, readBuf.Length());
test.Next(_L("Compare the data read to the expected data\n"));
for(i = (TUint)pos; i< pos + (256 / 4); i+=4)
{
TUint j = * ((TUint*) &readBuf[i - (TUint)pos]);
- test(i == j);
+ test_Equal(i, j);
}
test.Next(_L("Big file is read synchronously in a thread, with aPos = 2GB and length = K2KB:"));
// Sync read from pos = 2GB and length = K2KB
pos = K2GB;
TestRFile1.Read(pos, readBuf, K2KB);
- test(readBuf.Length() == K2KB);
+ test_Equal(K2KB, readBuf.Length());
test.Next(_L("Compare the data read to the expected data\n"));
for(i = (TUint)pos; i< pos + (K2KB / 4); i+=4)
{
TUint j = * ((TUint*) &readBuf[i - (TUint)pos]);
- test(i == j);
+ test_Equal(i, j);
}
@@ -2614,7 +2678,7 @@
// Sync read from pos = 4GB-1 and length = 10
pos = K4GBMinusTwo;
TestRFile1.Read(pos, readBuf, 10);
- test(readBuf.Length() == 1);
+ test_Equal(1, readBuf.Length());
// Sync read from pos = 4GB and length = KKB
@@ -2623,7 +2687,7 @@
{
pos = K4GB;
TestRFile1.Read(pos, readBuf, KKB);
- test(readBuf.Length() == 0);
+ test_Equal(0, readBuf.Length());
}
test.Next(_L("Big file is read synchronously in a thread, with aPos = 0 and length = -1"));
@@ -2637,26 +2701,26 @@
// Sync read from pos = 0 and length = 256
pos = 0;
TestRFile1.ReadU((TUint)pos, readBuf, 256);
- test(readBuf.Length() == 256);
+ test_Equal(256, readBuf.Length());
test.Next(_L("Compare the data read to the expected data\n"));
for(i = (TUint)pos; i< pos + (256 / 4); i+=4)
{
TUint j = * ((TUint*) &readBuf[i - (TUint)pos]);
- test(i == j);
+ test_Equal(i, j);
}
test.Next(_L("Big file is read synchronously in a thread, with aPos = 2GB and length = K2KB:"));
// Sync read from pos = 2GB and length = K2KB
pos = K2GB;
TestRFile1.ReadU((TUint)pos, readBuf, K2KB);
- test(readBuf.Length() == K2KB);
+ test_Equal(K2KB, readBuf.Length());
test.Next(_L("Compare the data read to the expected data\n"));
for(i = (TUint)pos; i< pos + (K2KB / 4); i+=4)
{
TUint j = * ((TUint*) &readBuf[i - (TUint)pos]);
- test(i == j);
+ test_Equal(i, j);
}
@@ -2664,7 +2728,7 @@
// Sync read from pos = 4GB-1 and length = 10
pos = K4GBMinusTwo;
TestRFile1.ReadU((TUint)pos, readBuf, 10);
- test(readBuf.Length() == 1);
+ test_Equal(1, readBuf.Length());
//tests need to repeated for current position variant of RFile64::Read()
test.Next(_L("Big file is read synchronously in a thread, with aPos = 0 and length = 256bytes:"));
@@ -2672,13 +2736,13 @@
TInt64 seekPos = 0;
TestRFile1.Seek(ESeekStart,seekPos);
TestRFile1.Read(readBuf, 256);
- test(readBuf.Length() == 256);
+ test_Equal(256, readBuf.Length());
test.Next(_L("Compare the data read to the expected data\n"));
for(i = (TUint)seekPos; i< seekPos + (256 / 4); i+=4)
{
TUint j = * ((TUint*) &readBuf[i - (TUint)seekPos]);
- test(i == j);
+ test_Equal(i, j);
}
test.Next(_L("Big file is read synchronously in a thread, with aPos = 2GB and length = K2KB:"));
@@ -2686,13 +2750,13 @@
seekPos = K2GB;
TestRFile1.Seek(ESeekStart,seekPos);
TestRFile1.Read(readBuf, K2KB);
- test(readBuf.Length() == K2KB);
+ test_Equal(K2KB, readBuf.Length());
test.Next(_L("Compare the data read to the expected data\n"));
for(i = (TUint)seekPos; i< seekPos + (K2KB / 4); i+=4)
{
TUint j = * ((TUint*) &readBuf[i - (TUint)seekPos]);
- test(i == j);
+ test_Equal(i, j);
}
@@ -2701,7 +2765,7 @@
seekPos = K4GBMinusTwo;
TestRFile1.Seek(ESeekStart,seekPos);
TestRFile1.Read(readBuf, 10);
- test(readBuf.Length() == 1);
+ test_Equal(1, readBuf.Length());
// Sync read from pos = 4GB and length = KKB
@@ -2710,7 +2774,7 @@
{
pos = K4GB;
TestRFile1.Read(pos, readBuf, KKB);
- test(readBuf.Length() == 0);
+ test_Equal(0, readBuf.Length());
}
test.Next(_L("Big file is read synchronously in a thread, with aPos = 0 and length = -1"));
@@ -2724,7 +2788,7 @@
// Sync read from pos = 0 and length = 0
pos = 0;
TestRFile1.Read(pos, readBuf, 0);
- test(readBuf.Length() == 0);
+ test_Equal(0, readBuf.Length());
TestRFile1.Close();
}
@@ -2770,13 +2834,13 @@
TRequestStatus status1 = KRequestPending;
pos = 0;
TestRFile1.Read(pos, readBuf, 256, status1);
- test(readBuf.Length() == 256);
+ test_Equal(256, readBuf.Length());
test.Next(_L("Compare the data read to the expected data\n"));
for(i = (TUint)pos; i< pos + (256 / 4); i+=4)
{
TUint j = * ((TUint*) &readBuf[i - (TUint)pos]);
- test(i == j);
+ test_Equal(i, j);
}
test.Next(_L("Big file is read asynchronously in a thread, with aPos = 2GB and length = KKB bytes\n"));
@@ -2784,13 +2848,13 @@
TRequestStatus status2 = KRequestPending;
pos = K2GB;
TestRFile1.Read(pos, readBuf, KKB, status2);
- test(readBuf.Length() == KKB);
+ test_Equal(KKB, readBuf.Length());
test.Next(_L("Compare the data read to the expected data\n"));
for(i = (TUint)pos; i< pos + (KKB / 4); i+=4)
{
TUint j = * ((TUint*) &readBuf[i - (TUint)pos]);
- test(i == j);
+ test_Equal(i, j);
}
@@ -2799,7 +2863,7 @@
TRequestStatus status3 = KRequestPending;
pos = K4GBMinusTwo;
TestRFile1.Read(pos, readBuf, KKB, status3);
- test(readBuf.Length() == 1);
+ test_Equal(1, readBuf.Length());
// tests need to be repeated for TUint variant of RFile64::Read()
test.Next(_L("Big file is read asynchronously in a thread, with aPos = 0 and length = 256 bytes\n"));
@@ -2807,13 +2871,13 @@
status1 = KRequestPending;
pos = 0;
TestRFile1.ReadU((TUint)pos, readBuf, 256, status1);
- test(readBuf.Length() == 256);
+ test_Equal(256, readBuf.Length());
test.Next(_L("Compare the data read to the expected data\n"));
for(i = (TUint)pos; i< pos + (256 / 4); i+=4)
{
TUint j = * ((TUint*) &readBuf[i - (TUint)pos]);
- test(i == j);
+ test_Equal(i, j);
}
test.Next(_L("Big file is read asynchronously in a thread, with aPos = 2GB and length = KKB bytes\n"));
@@ -2821,13 +2885,13 @@
status2 = KRequestPending;
pos = K2GB;
TestRFile1.ReadU((TUint)pos, readBuf, KKB, status2);
- test(readBuf.Length() == KKB);
+ test_Equal(KKB, readBuf.Length());
test.Next(_L("Compare the data read to the expected data\n"));
for(i = (TUint)pos; i< pos + (KKB / 4); i+=4)
{
TUint j = * ((TUint*) &readBuf[i - (TUint)pos]);
- test(i == j);
+ test_Equal(i, j);
}
@@ -2836,7 +2900,7 @@
status3 = KRequestPending;
pos = K4GBMinusTwo;
TestRFile1.ReadU((TUint)pos, readBuf, KKB, status3);
- test(readBuf.Length() == 1);
+ test_Equal(1, readBuf.Length());
// tests need to be repeated for current position variant of RFile64::Read()
test.Next(_L("Big file is read asynchronously in a thread, with aPos = 0 and length = 256 bytes\n"));
@@ -2845,13 +2909,13 @@
TInt64 seekPos = 0;
TestRFile1.Seek(ESeekStart,seekPos);
TestRFile1.Read(readBuf, 256, status1);
- test(readBuf.Length() == 256);
+ test_Equal(256, readBuf.Length());
test.Next(_L("Compare the data read to the expected data\n"));
for(i = (TUint)seekPos; i< seekPos + (256 / 4); i+=4)
{
TUint j = * ((TUint*) &readBuf[i - (TUint)seekPos]);
- test(i == j);
+ test_Equal(i, j);
}
test.Next(_L("Big file is read asynchronously in a thread, with aPos = 2GB and length = KKB bytes\n"));
@@ -2860,13 +2924,13 @@
seekPos = K2GB;
TestRFile1.Seek(ESeekStart,seekPos);
TestRFile1.Read(readBuf, KKB, status2);
- test(readBuf.Length() == KKB);
+ test_Equal(KKB, readBuf.Length());
test.Next(_L("Compare the data read to the expected data\n"));
for(i = (TUint)seekPos; i< seekPos + (KKB / 4); i+=4)
{
TUint j = * ((TUint*) &readBuf[i - (TUint)seekPos]);
- test(i == j);
+ test_Equal(i, j);
}
@@ -2876,7 +2940,7 @@
seekPos = K4GBMinusTwo;
TestRFile1.Seek(ESeekStart,seekPos);
TestRFile1.Read(readBuf, KKB, status3);
- test(readBuf.Length() == 1);
+ test_Equal(1, readBuf.Length());
test.Next(_L("Big file is read asynchronously in a thread, with aPos = 4GB and length = 256 bytes\n"));
@@ -2888,7 +2952,7 @@
TRequestStatus status5 = KRequestPending;
pos = K4GB;
TestRFile1.Read(pos, readBuf, 256, status5);
- test(readBuf.Length() == 0);
+ test_Equal(0, readBuf.Length());
}
test.Next(_L("Big file is read asynchronously in a thread, with aPos = 0 and length = -1 bytes\n"));
@@ -2976,7 +3040,7 @@
TBuf8<1> testReadBuf;
TestRFile1.WriteP(K4GBMinusTwo,_L8("1"));
TestRFile1.ReadP(K4GBMinusTwo, testReadBuf);
- test(testReadBuf.Length() == 1);
+ test_Equal(1, testReadBuf.Length());
//tests need to be repeated for TUint variant of RFile64::Write()
readBuf100.Zero(); //to ensure that the previous data is removed
@@ -2999,7 +3063,7 @@
testReadBuf.Zero();//to ensure that the previous data is removed
TestRFile1.WriteU(pos,_L8("1"));
TestRFile1.ReadU(pos, testReadBuf);
- test(testReadBuf.Length() == 1);
+ test_Equal(1, testReadBuf.Length());
//
//tests need to be repeated for current position variant of RFile64::Write()
@@ -3012,8 +3076,7 @@
TestRFile1.Write(_L8("1"));
TestRFile1.Seek(ESeekStart,seekPos);
TestRFile1.Read(testReadBuf);
- test(testReadBuf.Length() == 1);
-
+ test_Equal(1, testReadBuf.Length());
test.Next(_L("Write a big file synchronously in a thread, with aPos = 4GB and data = 256 bytes\n"));
@@ -3037,7 +3100,7 @@
// Validation for boundary condition 4GB
TestRFile1.ReadP(K4GB,readBuffer256);
TInt rr = readBuffer256.Length();
- test(rr == KErrNone);
+ test_KErrNone(rr);
test(readBuffer256.Length() == 0);
}
TestRFile1.Close();
@@ -3120,7 +3183,7 @@
TRequestStatus status3 = KRequestPending;
TestRFile1.Write(K4GBMinusTwo,writeBuf,status3);
TestRFile1.ReadP(K4GBMinusTwo,readBuf);
- test(readBuf.Length() == 1);
+ test_Equal(1, readBuf.Length());
//tests need to be repeated for TUint variant of RFile64::Write()
test.Next(_L("Write to a big file asynchronously in a thread, with aPos = 0 and data = 256 bytes, File size = 4GB-1\n"));
@@ -3145,7 +3208,7 @@
pos = K4GBMinusTwo;
TestRFile1.WriteU(pos,writeBuf,status3);
TestRFile1.ReadU(pos,readBuf);
- test(readBuf.Length() == 1);
+ test_Equal(1, readBuf.Length());
//
//tests need to be repeated for current position variant of RFile64::Write()
@@ -3159,7 +3222,7 @@
TestRFile1.Write(writeBuf,status3);
TestRFile1.Seek(ESeekStart,seekPos);
TestRFile1.Read(readBuf);
- test(readBuf.Length() == 1);
+ test_Equal(1, readBuf.Length());
if(KFileSizeMaxLargerThan4GBMinusOne == EFalse)
@@ -3177,7 +3240,7 @@
User::After(100000);
// Validation for boundary condition 4GB
TestRFile1.ReadP(K4GB,readBuf256);
- test(readBuf256.Length() == 0);
+ test_Equal(0, readBuf256.Length());
}
TestRFile1.Close();
@@ -3320,9 +3383,9 @@
}
TestRFile1.Write(K4GB,writeBuf256,10);
TestRFile1.Read(K4GB,readBuf256,10);
- test(readBuf256.Length() == 0);
+ test_Equal(0, readBuf256.Length());
}
- test.Next(_L(" Write to a big file synchronously in a thread with aPos = 0 , data = 256 bytes and length =0 bytes\n"));
+ test.Next(_L("Write to a big file synchronously in a thread with aPos = 0 , data = 256 bytes and length =0 bytes\n"));
TBuf8<0x100> wrBuf256;
TBuf8<0x100> reBuf256;
wrBuf256.Zero();
@@ -3333,7 +3396,7 @@
}
TestRFile1.Write(0,wrBuf256,0);
TestRFile1.Read(0,reBuf256,0);
- test(reBuf256.Length() == 0);
+ test_Equal(0, reBuf256.Length());
test.Next(_L("Write to a big file synchronously in a thread with aPos = 0 , data = 256 bytes and length = -1\n"));
TBuf8<0x100> wBuf256;
@@ -3497,7 +3560,7 @@
TRequestStatus status5 = KRequestPending;
TestRFile1.Write(K4GBPlusOne,writeBuf256,10,status5);
TestRFile1.Read(K4GBPlusOne,readBuf256,10);
- test(readBuf256.Length() == 0);
+ test_Equal(0, readBuf256.Length());
}
test.Next(_L("Write to a big file asynchronously in a thread, with aPos = 0, data = 256 bytes and length = 0 bytes\n"));
@@ -3512,7 +3575,7 @@
TRequestStatus status6 = KRequestPending;
TestRFile1.Write(0,wrBuf256,0,status6);
TestRFile1.Read(0,reBuf256,0);
- test(reBuf256.Length() == 0);
+ test_Equal(0, reBuf256.Length());
test.Next(_L("Write to a big file asynchronously in a thread, with aPos = 0, data = 256 bytes and length = -1bytes \n"));
TBuf8<0x100> wBuf256;
@@ -3571,7 +3634,7 @@
TestRFile1.Lock(0, K2GBMinusOne);
- test.Next(_L(" Attempt to lock the same region again\n"));
+ test.Next(_L("Attempt to lock the same region again\n"));
TestRFile1.LockE(0, K2GBMinusOne);
test.Next(_L("Extend the Lock with aPos = 0, aLength = 2GB+10\n"));
@@ -3765,7 +3828,7 @@
test.Next(_L("Seek mode = ESeekEnd, seek position = 80, call RFile64::Seek() "));
seekPos = 80;
TestRFile1.Seek(ESeekEnd, seekPos);
- test(seekPos == 20);
+ test_Equal(20, seekPos);
test.Next(_L("Set the file size as 512\n"));
TestRFile1.SetSize(512);
@@ -3773,31 +3836,31 @@
test.Next(_L("Seek mode =ESeekStart, assign seek position =513, get the seek position using RFile64::Seek()\n"));
seekPos = 513;
TestRFile1.Seek(ESeekStart, seekPos);
- test(seekPos == 513);
+ test_Equal(513, seekPos);
test.Next(_L("Seek mode = ESeekEnd, get the seek position using RFile64::Seek()\n"));
TestRFile1.Seek(ESeekEnd, seekPos);
- test(seekPos == 512);
+ test_Equal(512, seekPos);
test.Next(_L("Seek position =-530, seek mode = ESeekEnd, Get the seek position using RFile64::Seek()\n"));
seekPos = -530;
TestRFile1.Seek(ESeekEnd, seekPos);
- test(seekPos == 0);
+ test_Equal(0, seekPos);
test.Next(_L("Seek position =-10, seek mode = ESeekEnd, get the seek position using RFile64::Seek()\n"));
seekPos = -10;
TestRFile1.Seek(ESeekEnd, seekPos);
- test(seekPos == 502);
+ test_Equal(502, seekPos);
test.Next(_L("Seek position =-10, seek mode = ESeekStart, get the seek position using RFile64::Seek()\n"));
seekPos = -10;
TestRFile1.Seek(ESeekStart,seekPos);
- test(seekPos == -10);
+ test_Equal(-10, seekPos);
test.Next(_L("Seek position =0, seek mode = ESeekEnd, get the seek position using RFile64::Seek()\n"));
seekPos = 0;
TestRFile1.Seek(ESeekEnd,seekPos);
- test(seekPos == 512);
+ test_Equal(512, seekPos);
TestRFile1.Close();
@@ -3975,7 +4038,7 @@
test.Next(_L("Get the file size\n"));
TestRFile1.Size(size);
- test(size == 131072) ;
+ test_Equal(131072, size);
test.Next(_L("Read and compare the data from position = 0\n"));
TBuf8<16> testData2;
@@ -4064,7 +4127,7 @@
test.Next(_L("Open a big file in EFileShareAny | EFileRead mode and read from it using RFs::ReadFileSection() from position 3GB-1, 52byte lengths of data\n"));
TestRFile1.Open(fileName,EFileShareAny|EFileRead);
TestRFs.ReadFileSection(fileName,0,testDes,52);
- test(testDes.Length() == 52);
+ test_Equal(52, testDes.Length());
TestRFile1.Close();
test.Next(_L("Open a big file in EFileShareExclusive | EFileRead mode and read from it using RFs::ReadFileSection( ) from position 3GB-1, 52byte lengths of data\n"));
@@ -4157,7 +4220,7 @@
test_Value(r, r == KErrEof);
test.Next(_L("Check the files count in the directory. Number of files in a directory is 4\n"));
- test(entryArray.Count() == gFilesInDirectory);
+ test_Equal(gFilesInDirectory, entryArray.Count());
test.Next(_L("Get the entry list & Check the files are listed in order of file sizes\n"));
TInt n;
@@ -4181,7 +4244,7 @@
test.Next(_L("Read a directory containing large files using CDir & sort by size"));
CDir* dirList = NULL;
TestRFs.GetDir(dirName, KEntryAttMaskSupported, ESortBySize, dirList);
- test(dirList->Count() == gFilesInDirectory);
+ test_Equal(gFilesInDirectory, dirList->Count());
for (n = 0; n<dirList->Count(); n++)
{
TEntry entry;
@@ -4248,7 +4311,7 @@
for (TInt n = 0; n<anEntryList->Count(); n++)
{
entry = (*anEntryList)[n];
- if (entry.iName.MatchF(KFile4GBMinusOne()) == 0)
+ if (entry.iName.MatchF(KFile4GBMinusOne) == 0)
{
test(entry.FileSize() == K4GBMinusOne);
}
@@ -4257,7 +4320,7 @@
test.Next(_L("Get the file size, using TEntry::FileSize()\n"));
size = entry.FileSize();
test(size == K4GBMinusOne);
- test(entry.iSize == -1);
+ test_Equal(-1, entry.iSize);
@@ -4310,7 +4373,7 @@
test_Value(r, r == KErrEof);
test.Next(_L("Check the count\n"));
- test(entryArray.Count() == gFilesInDirectory);
+ test_Equal(gFilesInDirectory, entryArray.Count());
test.Next(_L("Close using RDir\n"));
dir.Close();
@@ -4350,7 +4413,7 @@
test.Next(_L("Sort with number of entries =0\n"));
TestRFs.GetDir(testDir0, KEntryAttMaskSupported, ESortBySize, anEntryList);
- test(anEntryList->Count() == 0);
+ test_Equal(0, anEntryList->Count());
delete anEntryList;
anEntryList = NULL;
@@ -4362,32 +4425,32 @@
TestRFs.GetDir(testDir, KEntryAttMaskSupported, ESortBySize, aDirList);
test.Next(_L("Get the entries count\n"));
- test(aDirList->Count() == gFilesInDirectory);
+ test_Equal(gFilesInDirectory, aDirList->Count());
test.Next(_L("Check the files are arranged in increasing file size\n"));
for (TInt n = 0; n<aDirList->Count(); n++)
{
entry = (*aDirList)[n];
- if (entry.iName.MatchF(KFile2GBMinusOne()) == 0)
+ if (entry.iName.MatchF(KFile2GBMinusOne) == 0)
{
test(entry.FileSize() == K2GBMinusOne);
- test(n == 0);
+ test_Equal(0, n);
}
else if (entry.iName.MatchF(KFile2GB()) == 0)
{
test(entry.FileSize() == K2GB);
- test(n == 1);
+ test_Equal(1, n);
}
- else if (entry.iName.MatchF(KFile3GB()) == 0)
+ else if (entry.iName.MatchF(KFile3GB) == 0)
{
test(entry.FileSize() == K3GB);
- test(n == 2);
+ test_Equal(2, n);
}
- else if (entry.iName.MatchF(KFile4GBMinusOne()) == 0)
+ else if (entry.iName.MatchF(KFile4GBMinusOne) == 0)
{
test(entry.FileSize() == K4GBMinusOne);
- test(n == 3);
+ test_Equal(3, n);
}
else
test(EFalse);
@@ -4423,31 +4486,31 @@
test.Next(_L("Get the directory entry,using RFs::GetDir()\n"));
TestRFs.GetDir(testDir, KEntryAttMaskSupported, ESortBySize, aDirList);
- test(aDirList->Count() == gFilesInDirectory);
+ test_Equal(gFilesInDirectory, aDirList->Count());
test.Next(_L("Compare with entry added\n"));
for (TInt n = 0; n<aDirList->Count(); n++)
{
entry = (*aDirList)[n];
- if (entry.iName.MatchF(KFile2GBMinusOne()) ==0 )
+ if (entry.iName.MatchF(KFile2GBMinusOne) == 0)
{
test(entry.FileSize() == K2GBMinusOne);
- test(n == 0);
+ test_Equal(0, n);
}
- else if (entry.iName.MatchF(KFile2GB) == 0)
+ else if (entry.iName.MatchF(KFile2GB()) == 0)
{
test(entry.FileSize() == K2GB);
- test(n == 1);
+ test_Equal(1, n);
}
- else if (entry.iName.MatchF(KFile3GB()) == 0)
+ else if (entry.iName.MatchF(KFile3GB) == 0)
{
test(entry.FileSize() == K3GB);
- test(n == 2);
+ test_Equal(2, n);
}
- else if (entry.iName.MatchF(KFile4GBMinusOne()) == 0)
+ else if (entry.iName.MatchF(KFile4GBMinusOne) == 0)
{
test(entry.FileSize() == K4GBMinusOne);
- test(n == 3);
+ test_Equal(3, n);
}
else
test(EFalse);
@@ -4776,15 +4839,14 @@
{
test.Next(_L("Lock a section of large file, position =2GB, aLength = 4GB-1\n"));
TestRFile1.Lock(K2GB,K4GBMinusOne);
-
-
- test.Next(_L("UnLock a section of large file, position =2GB, aLength = 4GB-1\n"));
- TestRFile1.UnLock(K2GB,K4GBMinusOne);
-
- test.Next(_L("Write to the File, position = 4GB-100 and length = 99\n"));
- TestRFile2.Write(K4GBMinus100,writeBuf63,99);
- TestRFile2.Read(K4GBMinus100,readBuf63,99);
- test(writeBuf63 == readBuf63); // Written data == Read data
+
+ test.Next(_L("UnLock a section of large file, position =2GB, aLength = 4GB-1\n"));
+ TestRFile1.UnLock(K2GB,K4GBMinusOne);
+
+ test.Next(_L("Write to the File, position = 4GB-100 and length = 99\n"));
+ TestRFile2.Write(K4GBMinus100,writeBuf63,99);
+ TestRFile2.Read(K4GBMinus100,readBuf63,99);
+ test(writeBuf63 == readBuf63); // Written data == Read data
}
TestRFile2.Close();
@@ -5600,7 +5662,7 @@
test_KErrNone(r);
r = dir.Read(entryArray);
test_Value(r, r == KErrEof);
- test(entryArray.Count() == gFilesInDirectory);
+ test_Equal(gFilesInDirectory, entryArray.Count());
dir.Close();
// then delete the new directory
@@ -5618,8 +5680,8 @@
test.Next(_L("Check observer for number of successful copy and failed copy\n"));
// test that 3 small files and 1 large file were copied
// (For 8 GB disk, the 4GB file is missing)
- test(observer->iNotifyEndedSuccesses == gFilesInDirectory);
- test(observer->iNotifyEndedFailures == 0);
+ test_Equal(gFilesInDirectory, observer->iNotifyEndedSuccesses);
+ test_Equal(0, observer->iNotifyEndedFailures);
test.Next(_L("Get the directory entry and find how many files copied\n"));
// check SMALL files have been copied
@@ -5628,7 +5690,7 @@
r = dir.Read(entryArray);
test_Value(r, r == KErrEof);
- test(entryArray.Count() == gFilesInDirectory);
+ test_Equal(gFilesInDirectory, entryArray.Count());
dir.Close();
// then delete the new directory
@@ -5732,7 +5794,7 @@
TEntryArray entryArray;
r = dir.Read(entryArray);
test_Value(r, r == KErrEof);
- test(entryArray.Count() == 4);
+ test_Equal(4, entryArray.Count());
dir.Close();
// then delete the new directory
@@ -5825,7 +5887,7 @@
TInt aLen=-1;
RFile64 * ptr = (RFile64 *)aPtr;
TInt r=ptr->Lock(aPos, aLen);
- test (KErrNone == r);
+ test_KErrNone(r);
return KErrNone;
}
@@ -5835,7 +5897,7 @@
TInt aLen=-1;
RFile64 * ptr = (RFile64 *)aPtr;
TInt r=ptr->UnLock(aPos, aLen);
- test (KErrNone == r);
+ test_KErrNone(r);
return KErrNone;
}
@@ -5844,7 +5906,7 @@
TInt aSize=-1;
RFile64 * ptr = (RFile64 *)aPtr;
TInt r=ptr->SetSize(aSize);
- test (KErrNone == r);
+ test_KErrNone(r);
return KErrNone;
}
@@ -5852,11 +5914,11 @@
{
test.Start(_L("Test RFile64::Lock, RFile64::Unlock, RFile64::SetSize and RFile::Write with Negative Length parameter"));
- test(TheFs.ShareProtected() == KErrNone);
+ test_KErrNone(TheFs.ShareProtected());
RFile64 aFile;
TInt r = aFile.Create(TheFs, _L("\\testRFile64NegLen.txt"), EFileWrite);
- test((KErrNone == r) || (KErrAlreadyExists == r));
+ test_Value(r, r == KErrNone || r == KErrAlreadyExists);
TRequestStatus status = KRequestPending;
@@ -5870,7 +5932,7 @@
User::WaitForRequest(status);
User::SetJustInTime(ETrue);
test(t.ExitType() == EExitPanic);
- test(t.ExitReason() == 17);
+ test_Equal(17, t.ExitReason());
t.Close();
// Test Unlock with a negative length
@@ -5881,7 +5943,7 @@
t.Resume();
User::WaitForRequest(status);
test(t.ExitType() == EExitPanic);
- test(t.ExitReason() == 18);
+ test_Equal(18, t.ExitReason());
t.Close();
User::SetJustInTime(ETrue);
@@ -5893,7 +5955,7 @@
t.Resume();
User::WaitForRequest(status);
test(t.ExitType() == EExitPanic);
- test(t.ExitReason() == 20);
+ test_Equal(20, t.ExitReason());
t.Close();
User::SetJustInTime(ETrue);
@@ -5917,35 +5979,245 @@
aFile.Write(aPos,gBuf,aLen,status1);
aFile.Write(aPos,gBuf,aLen,status2);
User::WaitForRequest(status1);
- test(status1.Int()==KErrArgument);
+ test_Equal(KErrArgument, status1.Int());
User::WaitForRequest(status2);
- test(status2.Int()==KErrArgument);
+ test_Equal(KErrArgument, status2.Int());
aFile.Close();
r = TheFs.Delete(_L("\\testRFile64NegLen.txt"));
test_KErrNone(r);
test.End();
}
+
+/*
+ * Flush file to ensure that written data is committed and not cached
+ */
+TInt FlushFile(RFile64& aFile64)
+ {
+ TRequestStatus status;
+ aFile64.Flush(status);
+ User::WaitForRequest(status);
+ return status.Int();
+ }
+
+/*
+ * Test inline RFile64 Read/Write APIs
+ */
+void TestInlineReadWrite()
+ {
+ test.Start(_L("Test Inline RFile64 Read/Write APIs"));
+ TFileName fileName;
+ fileName.Append(gDriveToTest);
+ fileName.Append(KTestPath);
+ TInt r = TheFs.MkDir(fileName);
+ test_Value(r, r == KErrNone || r == KErrAlreadyExists);
+
+ fileName.Append(_L("FileInline.txt"));
+ RFile64 file64;
+ r = file64.Replace(TheFs, fileName, EFileWrite);
+ test_KErrNone(r);
+
+ TBuf8<15> writeBuf(_L8("Inline"));
+ TBuf8<15> readBuf;
+ readBuf.Zero();
+
+ test.Next(_L("RFile64::Write(const TDesC8& aDes)"));
+ // Expected text in file: Inline
+ r = file64.Write(writeBuf);
+ test_KErrNone(r);
+ // Flush to ensure that the written data is committed and not cached
+ r = FlushFile(file64);
+ test_KErrNone(r);
+
+ test.Next(_L("RFile64::Read(TInt aPos,TDes8& aDes)"));
+ TInt readPos = 0;
+ r = file64.Read(readPos, readBuf);
+ test_KErrNone(r);
+ test(readBuf == writeBuf);
+
+
+ test.Next(_L("RFile64::Write(const TDesC8& aDes,TRequestStatus& aStatus)"));
+ // Expected text in file: InlineInline
+ TRequestStatus status = KRequestPending;
+ file64.Write(writeBuf, status);
+ User::WaitForRequest(status);
+ test_KErrNone(status.Int());
+ status = KRequestPending;
+ r = FlushFile(file64);
+ test_KErrNone(r);
+
+ test.Next(_L("Read(TInt aPos,TDes8& aDes,TRequestStatus& aStatus)"));
+ file64.Read(readPos, readBuf, status);
+ User::WaitForRequest(status);
+ test_KErrNone(status.Int());
+ status = KRequestPending;
+ TBuf8<15> expectedBuf(_L8("InlineInline"));
+ test(readBuf == expectedBuf);
+
+ test.Next(_L("Write(const TDesC8& aDes,TInt aLength)"));
+ // Expected text in file: InlineInlineInl
+ TInt writeLength = 3;
+ r = file64.Write(writeBuf, writeLength);
+ test_KErrNone(r);
+ r = FlushFile(file64);
+ test_KErrNone(r);
+
+ test.Next(_L("Read(TInt aPos,TDes8& aDes,TInt aLength)"));
+ TInt readLength = 13;
+ r = file64.Read(readPos, readBuf, readLength);
+ test_KErrNone(r);
+ expectedBuf.Append(_L8("I"));
+ test(readBuf == expectedBuf);
+
+
+ test.Next(_L("Write(const TDesC8& aDes,TInt aLength,TRequestStatus& aStatus)"));
+ // Expected text in file: InlineInlineIInl
+ file64.Write(writeBuf, writeLength, status);
+ User::WaitForRequest(status);
+ test_KErrNone(status.Int());
+ status = KRequestPending;
+ r = FlushFile(file64);
+ test_KErrNone(r);
+
+ test.Next(_L("Read(TInt aPos,TDes8& aDes,TInt aLength,TRequestStatus& aStatus)"));
+ readLength = 14;
+ file64.Read(readPos, readBuf, readLength, status);
+ User::WaitForRequest(status);
+ test_KErrNone(status.Int());
+ status = KRequestPending;
+ expectedBuf.Append(_L8("I"));
+ test(readBuf == expectedBuf);
+
+ test.Next(_L("Write(TInt aPos,const TDesC8& aDes)"));
+ // Expected text in file: InlInlineineIInl
+ TInt writePos = 3;
+ r = file64.Write(writePos, writeBuf);
+ test_KErrNone(r);
+ r = FlushFile(file64);
+ test_KErrNone(r);
+
+ // RFile64::Read(TInt aPos,TDes8& aDes) (Again)
+ readPos = 1;
+ r = file64.Read(readPos, readBuf);
+ test_KErrNone(r);
+ expectedBuf.Zero();
+ expectedBuf.Append(_L8("nlInlineineIInl"));
+ test(readBuf == expectedBuf);
+
+ test.Next(_L("Write(TInt aPos,const TDesC8& aDes,TRequestStatus& aStatus)"));
+ // Expected text in file: InlInlineInlinel
+ writePos = 9;
+ file64.Write(writePos, writeBuf, status);
+ User::WaitForRequest(status);
+ test_KErrNone(status.Int());
+ status = KRequestPending;
+ r = FlushFile(file64);
+ test_KErrNone(r);
+
+ // RFile64::Read(TInt aPos,TDes8& aDes,TRequestStatus& aStatus) (Again)
+ file64.Read(readPos, readBuf, status);
+ User::WaitForRequest(status);
+ test_KErrNone(status.Int());
+ status = KRequestPending;
+ expectedBuf.Zero();
+ expectedBuf.Append(_L8("nlInlineInlinel"));
+ test(readBuf == expectedBuf);
+
+ test.Next(_L("Write(TInt aPos,const TDesC8& aDes,TInt aLength)"));
+ // Expected text in file: InlInlInlInlinel
+ writePos = 6;
+ r = file64.Write(writePos, writeBuf, writeLength);
+ test_KErrNone(r);
+ r = FlushFile(file64);
+ test_KErrNone(r);
+
+ // Read(TInt aPos,TDes8& aDes,TInt aLength) (Again)
+ readPos = 5;
+ readLength = 8;
+ r = file64.Read(readPos, readBuf, readLength);
+ test_KErrNone(r);
+ expectedBuf.Zero();
+ expectedBuf.Append(_L8("lInlInli"));
+ test(readBuf == expectedBuf);
+
+
+ test.Next(_L("Write(TInt aPos,const TDesC8& aDes,TInt aLength,TRequestStatus& aStatus)"));
+ // Expected text in file: InlInlInlInlinel
+ writePos = 12;
+ file64.Write(writePos, writeBuf, writeLength, status);
+ User::WaitForRequest(status);
+ test_KErrNone(status.Int());
+ status = KRequestPending;
+ r = FlushFile(file64);
+ test_KErrNone(r);
+
+ // RFile64::Read(TInt aPos,TDes8& aDes,TInt aLength,TRequestStatus& aStatus) (Again)
+ readPos = 7;
+ file64.Read(readPos, readBuf, readLength, status);
+ User::WaitForRequest(status);
+ test_KErrNone(status.Int());
+ status = KRequestPending;
+ expectedBuf.Zero();
+ expectedBuf.Append(_L8("nlInlInl"));
+ test(readBuf == expectedBuf);
+
+
+ // Test the remaining RFile64::Read APIs with the read position at the end of the file
+
+ TBuf8<1> readBuf2;
+ readBuf2.Zero();
+ TBuf8<1> expectedBuf2(_L8("l"));
+
+ test.Next(_L("Read(TDes8& aDes)"));
+ r = file64.Read(readBuf2);
+ test_KErrNone(r);
+ test(readBuf2 == expectedBuf2);
+
+ test.Next(_L("Read(TDes8& aDes,TRequestStatus& aStatus)"));
+ file64.Read(readBuf2, status);
+ User::WaitForRequest(status);
+ test_KErrNone(status.Int());
+ status = KRequestPending;
+ expectedBuf2.Zero();
+ test(readBuf2 == expectedBuf2);
+
+ // These tests should give overflow errors
+ test.Next(_L("Read(TDes8& aDes,TInt aLength)"));
+ r = file64.Read(readBuf2, readLength);
+ test_Equal(KErrOverflow, r);
+
+ test.Next(_L("Read(TDes8& aDes,TInt aLength,TRequestStatus& aStatus)"));
+ file64.Read(readBuf2, readLength, status);
+ User::WaitForRequest(status);
+ test_Equal(KErrOverflow, status.Int());
+
+
+ file64.Close();
+ r = TheFs.Delete(fileName);
+ test_KErrNone(r);
+ test.End();
+ }
+
//-------------------------------------------------------------------------------------------------------------------
static TInt PrepareDisk(TInt aDrive)
{
TInt r;
- r = FormatDrive(TheFs, aDrive, ETrue);
+ if (!Is_Win32(TheFs, aDrive))
+ {
+ r = FormatDrive(TheFs, aDrive, ETrue);
+ test_KErrNone(r);
+ }
r = TheFs.Volume(gDriveVolumeInfo, aDrive);
- if(KErrNone != r)
- {
- test.Printf(_L("\nError in getting drive volume information!! Error code is %d"),r);
- test(EFalse);
- }
- test.Printf(_L("\nDrive volume size is %LU\n"), gDriveVolumeInfo.iSize);
+ test_KErrNone(r);
+ test.Printf(_L("Drive volume size is %LU\n"), gDriveVolumeInfo.iSize);
// don't test if media size is less than 4 GB
if (gDriveVolumeInfo.iFree <= K4GB)
{
- test.Printf(_L("\nSkipping test: test requires disk with capacity more than 4 GB"));
+ test.Printf(_L("Skipping T_FILE64BIT: test requires disk with capacity more than 4 GB\n"));
return KErrNotSupported;
}
@@ -5994,6 +6266,8 @@
PrintDrvInfo(TheFs, gDrive);
+ TestInlineReadWrite();
+
r = PrepareDisk(gDrive);
if(r == KErrNotSupported)
return;
--- a/kerneltest/f32test/server/t_fsys.cpp Thu Sep 02 21:54:16 2010 +0300
+++ b/kerneltest/f32test/server/t_fsys.cpp Fri Sep 17 08:37:04 2010 +0300
@@ -20,6 +20,7 @@
#include <f32file.h>
#include <f32file_private.h>
#include <e32test.h>
+#include <e32math.h>
#include "t_server.h"
#include "fat_utils.h"
#include "filesystem_fat.h"
@@ -27,6 +28,154 @@
using namespace Fat_Test_Utils;
RTest test(_L("T_FSYS"));
+static TInt64 gRndSeed;
+
+//---------------------------------------------------
+
+
+void InitGlobals()
+{
+ //-- initialise random generator
+ gRndSeed = 0xf73c1ab;
+ Math::Rand(gRndSeed);
+}
+
+//---------------------------------------------------
+void DestroyGlobals()
+{
+}
+
+//---------------------------------------------------
+
+/**
+ The maximum length for the file system and extension names is KMaxFSNameLength
+ test how the file server supports this
+*/
+void TestFileSystemNameLength()
+{
+ test.Next(_L("Test file system name lenght limits"));
+ if(Is_SimulatedSystemDrive(TheFs, CurrentDrive()))
+ {
+ test.Printf(_L("Can't test on a simulated drive, skipping!"));
+ return;
+ }
+
+ TInt nRes;
+ TBuf<1024> name;
+ TInt i;
+
+ _LIT(KEmptyName, ""); //-- invalid length == 0
+ _LIT(KDoesNotExist, "RubbishName"); //-- valid length == 11
+ _LIT(KDoesNotExist1, "RubbishName123456789012345678901"); //-- valid length == 32 (KMaxFSNameLength)
+
+ _LIT(KNameTooLong1, "RubbishName123456789012345678901_"); //-- invalid length == 33 (KMaxFSNameLength+1)
+
+
+ test(KDoesNotExist1().Length() == KMaxFSNameLength);
+
+ //-- generate a very long name
+ name.Zero();
+ for(i=0; i<(name.MaxLength()/KDoesNotExist1().Length()); ++i)
+ {
+ name.Append(KDoesNotExist1);
+ }
+
+ //-- 1. try to dismount the existing FS/extension specifying invalid name
+
+ //-- 1.1 try empty names
+ nRes = TheFs.DismountFileSystem(KEmptyName, CurrentDrive());
+ test_Value(nRes, nRes == KErrArgument);
+
+ nRes = TheFs.DismountExtension(KEmptyName, CurrentDrive());
+ test_Value(nRes, nRes == KErrArgument);
+
+ //-- 1.2 valid length, but non-existing name
+ nRes = TheFs.DismountFileSystem(KDoesNotExist, CurrentDrive());
+ test_Value(nRes, nRes == KErrNotFound);
+
+ nRes = TheFs.DismountExtension(KDoesNotExist, CurrentDrive());
+ test_Value(nRes, nRes == KErrNotFound);
+
+ //-- 1.2 valid length == KMaxFSNameLength, but non-existing name
+ nRes = TheFs.DismountFileSystem(KDoesNotExist1, CurrentDrive());
+ test_Value(nRes, nRes == KErrNotFound);
+
+ nRes = TheFs.DismountExtension(KDoesNotExist1, CurrentDrive());
+ test_Value(nRes, nRes == KErrNotFound);
+
+ //-- 1.3 too long name == KMaxFSNameLength+1,
+ nRes = TheFs.DismountFileSystem(KNameTooLong1, CurrentDrive());
+ test_Value(nRes, nRes == KErrArgument);
+
+ nRes = TheFs.DismountExtension(KNameTooLong1, CurrentDrive());
+ test_Value(nRes, nRes == KErrArgument);
+
+ //-- 1.4 a very long name ~ 1024 characters,
+ nRes = TheFs.DismountFileSystem(name, CurrentDrive());
+ test_Value(nRes, nRes == KErrArgument);
+
+ nRes = TheFs.DismountExtension(name, CurrentDrive());
+ test_Value(nRes, nRes == KErrArgument);
+
+
+ //-- try mounting extensions with valid, bu non-existing names
+ nRes = TheFs.MountExtension(KDoesNotExist, CurrentDrive());
+ test_Value(nRes, nRes == KErrNotFound);
+
+ nRes = TheFs.MountExtension(KDoesNotExist1, CurrentDrive());
+ test_Value(nRes, nRes == KErrNotFound);
+
+
+ //====================================================
+ //-- dismount original file system from the drive
+ TFSDescriptor orgFSDesc;
+ nRes = GetFileSystemDescriptor(TheFs, CurrentDrive(), orgFSDesc);
+ test_KErrNone(nRes);
+
+ nRes = TheFs.DismountFileSystem(orgFSDesc.iFsName, CurrentDrive());
+ test_KErrNone(nRes);
+
+ //-- 2. try to mount a FS/extension with the invalid name
+
+ //-- 2.1 try empty names
+ nRes = TheFs.MountFileSystem(KEmptyName, CurrentDrive());
+ test_Value(nRes, nRes == KErrArgument);
+
+ nRes = TheFs.MountExtension(KEmptyName, CurrentDrive());
+ test_Value(nRes, nRes == KErrArgument);
+
+ //-- 1.2 valid length, but non-existing name
+ nRes = TheFs.MountFileSystem(KDoesNotExist, CurrentDrive());
+ test_Value(nRes, nRes == KErrNotFound);
+
+
+ //-- 1.2 valid length == KMaxFSNameLength, but non-existing name
+ nRes = TheFs.MountFileSystem(KDoesNotExist1, CurrentDrive());
+ test_Value(nRes, nRes == KErrNotFound);
+
+
+ //-- 1.3 too long name == KMaxFSNameLength+1,
+ nRes = TheFs.MountFileSystem(KNameTooLong1, CurrentDrive());
+ test_Value(nRes, nRes == KErrArgument);
+
+ nRes = TheFs.MountExtension(KNameTooLong1, CurrentDrive());
+ test_Value(nRes, nRes == KErrArgument);
+
+ //-- 1.4 a very long name ~ 1024 characters,
+ nRes = TheFs.MountFileSystem(name, CurrentDrive());
+ test_Value(nRes, nRes == KErrArgument);
+
+ nRes = TheFs.MountExtension(name, CurrentDrive());
+ test_Value(nRes, nRes == KErrArgument);
+
+
+
+
+ //-- mount original file system back to the drive
+ nRes = MountFileSystem(TheFs, CurrentDrive(), orgFSDesc);
+ test_KErrNone(nRes);
+}
+
static void TestFileSystemNames()
{
@@ -1064,7 +1213,11 @@
//---------------------------------------
+ InitGlobals();
+
+ //---------------------------------------
TestFileSystemNames();
+ TestFileSystemNameLength();
TestDismountFileSystem(CurrentDrive());
#if defined(__EPOC32__)
TestFileSystem(CurrentDrive());
@@ -1085,6 +1238,7 @@
TestFileSystem_MaxSupportedFileSizeQuery();
TestRemountFSWithOpenedObjects();
-
-
+
+ //---------------------------------------
+ DestroyGlobals();
}
--- a/package_definition.xml Thu Sep 02 21:54:16 2010 +0300
+++ b/package_definition.xml Fri Sep 17 08:37:04 2010 +0300
@@ -138,11 +138,6 @@
<unit bldFile="userlibandfileserver/fileserver/etshell" mrp="userlibandfileserver/fileserver/etshell/base_f32_eshell.mrp"/>
</component>
</collection>
- <collection id="baseapitest" name="Base API Tests" level="test">
- <component id="basesvs" name="Base Verification Suite" introduced="^2" purpose="development" filter="test">
- <unit mrp="baseapitest/basesvs/group/basesvs.mrp" bldFile="baseapitest/basesvs/group"/>
- </component>
- </collection>
<collection id="kernelhwsrv_info" name="Kernel and Hardware Services Info" level="test">
<component id="kernelhwsrv_metadata" name="Kernel and Hardware Services Metadata" class="config" introduced="^2" purpose="development" target="desktop">
<unit mrp="kernelhwsrv_info/kernelhwsrv_metadata/kernelhwsrv_metadata.mrp"/>
--- a/userlibandfileserver/fileserver/etshell/ts_com.cpp Thu Sep 02 21:54:16 2010 +0300
+++ b/userlibandfileserver/fileserver/etshell/ts_com.cpp Fri Sep 17 08:37:04 2010 +0300
@@ -42,7 +42,6 @@
// lint -e40,e30
const TShellCommand CShell::iCommand[ENoShellCommands]=
{
-// TShellCommand(_L("BLANK"),_L("Help"),_L("-?"),TShellCommand::EDSwitch,ShellFunction::BLANK),
TShellCommand(_L("ATTRIB"),_L("Displays or changes file attributes"),_L("[drive:][path][filename] [+R | -R] [+H |-H] [+S | -S] [+A | -A] [/p]\n\n /p - Pause after each screen of information"), TShellCommand::EPSwitch, ShellFunction::Attrib),
TShellCommand(_L("CD"),_L("Change the current directory for a drive"),_L("[path] [/d]\n\n /d - Change drive"),TShellCommand::EDSwitch,ShellFunction::Cd),
TShellCommand(_L("CHKDEPS"),_L("Check the dependencies of an executable or a Dll (ARM only)"),_L("[Filename.EXE] or [Filename.DLL]"),0,ShellFunction::ChkDeps),
@@ -50,7 +49,6 @@
TShellCommand(_L("COPY"),_L("Copy one (or more) file(s), overwriting existing one(s)"),_L("source [destination]"),TShellCommand::ESSwitch,ShellFunction::Copy),
TShellCommand(_L("DEL"),_L("Delete one file"),_L("[drive:][path][filename]"),TShellCommand::ESSwitch,ShellFunction::Del),
TShellCommand(_L("DIR"),_L("Show directory contents"),_L("[drive:][path][filename] [/p][/w]\n\n /p - Pause after each screen of information\n /w - Wide format"),TShellCommand::EPSwitch|TShellCommand::EWSwitch|TShellCommand::EASwitch,ShellFunction::Dir),
-// TShellCommand(_L("EDLIN"),_L("Edit a text file"),_L("[drive:][path][filename] [/p]\n\n /p - Pause after each screen of information"),TShellCommand::EPSwitch,ShellFunction::Edit),
TShellCommand(_L("FORMAT"),_L("Format a disk"),ptrFormatHelp,TShellCommand::EQSwitch|TShellCommand::ESSwitch|TShellCommand::EESwitch|TShellCommand::EFSwitch,ShellFunction::Format),
TShellCommand(_L("GOBBLE"),_L("Create a file"),_L("[filename] size [/e]\n\n /e - create an empty file, without writing any data"),TShellCommand::EESwitch,ShellFunction::Gobble),
TShellCommand(_L("HEXDUMP"),_L("Display the contents of a file in hexadecimal"),_L("[drive:][path][filename] [/p]\n\n /p - Pause after each screen of information\n\n Hit escape to exit from hexdump "),TShellCommand::EPSwitch,ShellFunction::Hexdump),
@@ -498,14 +496,16 @@
TInt r=CShell::TheFs.CharToDrive(CShell::currentPath[0], drive);
if (r!=KErrNone)
return(r);
- if (aPath.Length()==0)
+
+ if (aPath.Length()==0)
{
r=CShell::TheFs.Volume(vol, drive);
if (r==KErrNone)
- CShell::TheConsole->Printf(_L("Volume = %S\n"),&vol.iName);
+ CShell::Printf(_L("Volume Label:%S\n"),&vol.iName);
return(r);
}
- r=CShell::TheFs.SetVolumeLabel(aPath, drive);
+
+ r=CShell::TheFs.SetVolumeLabel(aPath, drive);
return(r);
}
@@ -582,21 +582,39 @@
}
-
-void ShellFunction::OutputContentsToConsole(RPointerArray<HBufC>& aText,TUint aSwitches)
-//outputs content of the buffer to console according to settings passed in aSwitches
+/**
+ outputs content of the buffer to console according to settings passed in aSwitches
+ @return ETrue if the user pressed Esc key
+*/
+TBool ShellFunction::OutputContentsToConsole(RPointerArray<HBufC>& aText,TUint aSwitches)
{
if ((aText.Count()>0)&&((aSwitches&TShellCommand::EWSwitch)!=0))
AlignTextIntoColumns(aText);
- for (TInt i=0;i<aText.Count();i++)
- {
- CShell::OutputStringToConsole(((aSwitches&TShellCommand::EPSwitch)!=0),*aText[i]);
- CShell::OutputStringToConsole(EFalse,_L("\n"));
- delete aText[i];
+ TKeyCode key=EKeyNull;
+ TInt i;
+
+ for(i=0;i<aText.Count();i++)
+ {
+ key = CShell::WriteBufToConsole(((aSwitches&TShellCommand::EPSwitch)!=0),*aText[i]);
+ if(key == EKeyEscape)
+ break;
+
+ key = CShell::WriteBufToConsole(EFalse,_L("\n"));
+ if(key == EKeyEscape)
+ break;
+
}
- //empty string array
+
+ //-- clean up string array
+ for(i=0; i<aText.Count(); i++)
+ {
+ delete aText[i];
+ }
+
aText.Reset();
+
+ return (key == EKeyEscape);
}
@@ -606,9 +624,10 @@
TInt count=aDirList->Count();
TInt fileCount=0, dirCount=0, printCount=0;
TInt64 byteCount=0;
+ TBool bBreak=EFalse;
//compose an array of strings describing entries in the directory
- for (TInt j=0;j<count;j++)
+ for (TInt j=0; j<count; j++)
{
HBufC* buf=NULL;
TEntry entry=(*aDirList)[j];
@@ -641,42 +660,76 @@
TPtr name=buf->Des();
name=entry.iName;
- if (entry.IsDir())
+ const TPtrC desName(entry.iName);
+ const TBool bNameCut = desName.Length() > 26;
+
+ _LIT(KDots, ">.."); //-- will be displayed if the name is longer than 26 characters
+ _LIT(KSpc, " ");
+
+
+ if (entry.IsDir())
{
dirCount++;
- name.Format(_L(" %- 26S <DIR> %+02d/%+02d/%- 4d %02d:%02d:%02d.%06d"),
- &entry.iName,modTime.Day()+1,modTime.Month()+1,modTime.Year(),modTime.Hour(),modTime.Minute(),modTime.Second(),modTime.MicroSecond());
+
+ name.Format(_L(" %- 26S%S<DIR> %+02d/%+02d/%- 4d %02d:%02d:%02d.%03d"),
+ &desName,
+ bNameCut ? &KDots : &KSpc,
+ modTime.Day()+1,modTime.Month()+1,modTime.Year(),modTime.Hour(),modTime.Minute(),modTime.Second(),modTime.MicroSecond());
+
+ //name.Format(_L(" %- 26S <DIR> %+02d/%+02d/%- 4d %02d:%02d:%02d.%06d"),
+ // &entry.iName,modTime.Day()+1,modTime.Month()+1,modTime.Year(),modTime.Hour(),modTime.Minute(),modTime.Second(),modTime.MicroSecond());
}
else
{
TInt64 entrySize = entry.FileSize();
byteCount+=entrySize;
fileCount++;
- name.Format(_L(" %- 32S%+ 15Lu %+02d/%+02d/%- 4d %02d:%02d:%02d.%06d"),
- &entry.iName,entrySize,modTime.Day()+1,modTime.Month()+1,modTime.Year(),modTime.Hour(),modTime.Minute(),modTime.Second(),modTime.MicroSecond());
+
+ name.Format(_L(" %- 26S%S%-11Lu %+02d/%+02d/%- 4d %02d:%02d:%02d.%03d"),
+ &desName,
+ bNameCut ? &KDots : &KSpc,
+ entrySize,
+ modTime.Day()+1,modTime.Month()+1,modTime.Year(),modTime.Hour(),modTime.Minute(),modTime.Second(),modTime.MicroSecond());
+
+ //name.Format(_L(" %- 32S%+ 15Lu %+02d/%+02d/%- 4d %02d:%02d:%02d.%06d"),
+ // &entry.iName,entrySize,modTime.Day()+1,modTime.Month()+1,modTime.Year(),modTime.Hour(),modTime.Minute(),modTime.Second(),modTime.MicroSecond());
}
}
User::LeaveIfError(aText.Append(buf ));
printCount++;
- //print the contents if a screen size of data is available. This will prevent huge buffer allocation.
- if(printCount == CShell::TheConsole->ScreenSize().iHeight)
+
+ //print the contents if a screen size of data is available. This will prevent huge buffer allocation.
+ if(printCount == CShell::TheConsole->ScreenSize().iHeight)
{
- OutputContentsToConsole(aText,aSwitches);
+ bBreak = OutputContentsToConsole(aText,aSwitches);
printCount=0;
}
- CleanupStack::Pop();
-
- }
- OutputContentsToConsole(aText,aSwitches);
-
- //output summary information
- CShell::OutputStringToConsole(((aSwitches&TShellCommand::EPSwitch)!=0),_L(" %d File%c\n"),fileCount,(fileCount==1)?' ':'s');
- if (fileCount!=0)
- {
- CShell::OutputStringToConsole(((aSwitches&TShellCommand::EPSwitch)!=0),_L(" %lu byte%c\n"),byteCount,(fileCount==1)?' ':'s');
- }
-
- TBuf<50> buf;// allocate string long enough for additional information(number of directories)
+
+ CleanupStack::Pop();
+
+ if(bBreak)
+ break;
+ }
+
+ if(bBreak)
+ return; //-- the user has interrupted the listing
+
+
+ OutputContentsToConsole(aText,aSwitches);
+
+ //---------------------------------
+ //-- print out summary information
+ TBuf<100> buf;
+ buf.Format(_L(" %d File%c"), fileCount, (fileCount==1) ? ' ':'s');
+ if(fileCount > 0)
+ {
+ buf.AppendFormat(_L(", %LU bytes"), byteCount);
+ }
+
+ buf.Append(KNl);
+
+ CShell::OutputStringToConsole(((aSwitches&TShellCommand::EPSwitch)!=0), buf);
+
buf.Format(_L(" %d Director"),dirCount);
if (dirCount==1)
buf.AppendFormat(_L("y\n"));
@@ -684,7 +737,9 @@
buf.AppendFormat(_L("ies\n"));
CShell::OutputStringToConsole(((aSwitches&TShellCommand::EPSwitch)!=0),buf);
- }
+
+
+ }
TInt ShellFunction::Dir(TDes& aPath,TUint aSwitches)
//
@@ -709,7 +764,7 @@
TInt r=dir.Open(TheShell->TheFs,aPath,KEntryAttMaskSupported);
if (r!=KErrNone)
{
- CShell::TheConsole->Printf(_L("File or directory not found\n"));
+ CShell::Printf(_L("File or directory not found\n"));
return(KErrNone);
}
@@ -724,7 +779,7 @@
//Sets the new length of path to the position of the last path delimiter +1
aPath.SetLength(aPath.LocateReverse(KPathDelimiter)+1);
- CShell::TheConsole->Printf(_L("Directory of %S\n"),&aPath);
+ CShell::Printf(_L("Directory of %S\n"),&aPath);
//allocate array to be used as an output buffer
RPointerArray<HBufC>* text=new(ELeave) RPointerArray<HBufC>();
@@ -742,13 +797,6 @@
};
-TInt ShellFunction::Edit(TDes& /*aPath*/,TUint /*aSwitches*/)
-//
-// Dummy, used by edlin (now retired)
-//
- {
- return(KErrNone);
- }
TInt ShellFunction::Attrib(TDes& aPath,TUint aSwitches)
@@ -1007,14 +1055,14 @@
if(aDrvInfo.iDriveAtt & KDriveAttRedirected) aPrintBuf.Append(_L("KDriveAttRedirected,"));
if(aDrvInfo.iDriveAtt & KDriveAttSubsted) aPrintBuf.Append(_L("KDriveAttSubsted,"));
if(aDrvInfo.iDriveAtt & KDriveAttInternal) aPrintBuf.Append(_L("KDriveAttInternal,"));
- if(aDrvInfo.iDriveAtt & KDriveAttRemovable) aPrintBuf.Append(_L("KDriveAttRemovable"));
-
- if(aDrvInfo.iDriveAtt & KDriveAttRemote) aPrintBuf.Append(_L("KDriveAttRemote"));
- if(aDrvInfo.iDriveAtt & KDriveAttTransaction) aPrintBuf.Append(_L("KDriveAttTransaction"));
-
- if(aDrvInfo.iDriveAtt & KDriveAttPageable) aPrintBuf.Append(_L("KDriveAttPageable"));
- if(aDrvInfo.iDriveAtt & KDriveAttLogicallyRemovable) aPrintBuf.Append(_L("KDriveAttLogicallyRemovable"));
- if(aDrvInfo.iDriveAtt & KDriveAttHidden) aPrintBuf.Append(_L("KDriveAttHidden"));
+ if(aDrvInfo.iDriveAtt & KDriveAttRemovable) aPrintBuf.Append(_L("KDriveAttRemovable,"));
+
+ if(aDrvInfo.iDriveAtt & KDriveAttRemote) aPrintBuf.Append(_L("KDriveAttRemote,"));
+ if(aDrvInfo.iDriveAtt & KDriveAttTransaction) aPrintBuf.Append(_L("KDriveAttTransaction,"));
+
+ if(aDrvInfo.iDriveAtt & KDriveAttPageable) aPrintBuf.Append(_L("KDriveAttPageable,"));
+ if(aDrvInfo.iDriveAtt & KDriveAttLogicallyRemovable) aPrintBuf.Append(_L("KDriveAttLogicallyRemovable,"));
+ if(aDrvInfo.iDriveAtt & KDriveAttHidden) aPrintBuf.Append(_L("KDriveAttHidden,"));
aPrintBuf.Append(_L("\n"));
}
@@ -1036,12 +1084,12 @@
if(aDrvInfo.iMediaAtt & KMediaAttFormattable) aPrintBuf.Append(_L("KMediaAttFormattable,"));
if(aDrvInfo.iMediaAtt & KMediaAttWriteProtected) aPrintBuf.Append(_L("KMediaAttWriteProtected,"));
if(aDrvInfo.iMediaAtt & KMediaAttLockable) aPrintBuf.Append(_L("KMediaAttLockable,"));
- if(aDrvInfo.iMediaAtt & KMediaAttLocked) aPrintBuf.Append(_L("KMediaAttLocked"));
-
- if(aDrvInfo.iMediaAtt & KMediaAttHasPassword) aPrintBuf.Append(_L("KMediaAttHasPassword"));
- if(aDrvInfo.iMediaAtt & KMediaAttReadWhileWrite) aPrintBuf.Append(_L("KMediaAttReadWhileWrite"));
- if(aDrvInfo.iMediaAtt & KMediaAttDeleteNotify) aPrintBuf.Append(_L("KMediaAttDeleteNotify"));
- if(aDrvInfo.iMediaAtt & KMediaAttPageable) aPrintBuf.Append(_L("KMediaAttPageable"));
+ if(aDrvInfo.iMediaAtt & KMediaAttLocked) aPrintBuf.Append(_L("KMediaAttLocked,"));
+
+ if(aDrvInfo.iMediaAtt & KMediaAttHasPassword) aPrintBuf.Append(_L("KMediaAttHasPassword,"));
+ if(aDrvInfo.iMediaAtt & KMediaAttReadWhileWrite) aPrintBuf.Append(_L("KMediaAttReadWhileWrite,"));
+ if(aDrvInfo.iMediaAtt & KMediaAttDeleteNotify) aPrintBuf.Append(_L("KMediaAttDeleteNotify,"));
+ if(aDrvInfo.iMediaAtt & KMediaAttPageable) aPrintBuf.Append(_L("KMediaAttPageable,"));
aPrintBuf.Append(_L("\n"));
@@ -1163,8 +1211,8 @@
CShell::Printf(_L("Mounted FS:%S\n"), &Buf);
- //-- print out the list of supported file systems if there are more than 1
- nRes = aFs.SupportedFileSystemName(fsName, aDrvNum, 0+1); //-- try to get 2nd child name
+ //-- print out the list of supported file systems if there are more than 0
+ nRes = aFs.SupportedFileSystemName(fsName, aDrvNum, 0); //-- try to get 1st child name
if(nRes == KErrNone)
{
Buf.Copy(_L("Supported FS: "));
@@ -2006,52 +2054,60 @@
}
//-----------------------------------------------------------------------------------------------------------------------
-
+/**
+ Hex Dump of a file
+*/
TInt ShellFunction::Hexdump(TDes& aPath,TUint aSwitches)
{
ShellFunction::StripQuotes(aPath);
ParsePath(aPath);
- RFile64 file;
+
+ RFile64 file;
TInt r=file.Open(TheShell->TheFs,aPath,EFileStream);
if (r!=KErrNone)
return(r);
- TInt offset=0;
+ const TInt KLineLength = 16;
+ TBuf<0x100> buf;
+ TBuf<KLineLength> asciiBuf;
+ TBuf8<KLineLength> line;
+
for (;;)
{
- const TInt KLineLength = 16;
-
- TBuf8<KLineLength> line;
r=file.Read(line);
if (r != KErrNone || line.Length() == 0)
break;
- TBuf<KLineLength*3+2> hexaRep;
- TBuf<KLineLength> asciiRep;
+ buf.Zero();
+ asciiBuf.Zero();
+
for (TInt i=0; i<KLineLength; i++)
{
if (i == KLineLength/2)
{
- hexaRep.Append(' ');
- hexaRep.Append(i<line.Length() ? '|' : ' ');
+ buf.Append(' ');
+ buf.Append(i<line.Length() ? '|' : ' ');
}
- hexaRep.Append(' ');
+ buf.Append(' ');
if (i<line.Length())
{
- hexaRep.AppendNumFixedWidth(line[i], EHex, 2);
- asciiRep.Append(TChar(line[i]).IsPrint() ? line[i] : '.');
+ buf.AppendNumFixedWidth(line[i], EHex, 2);
+ asciiBuf.Append(TChar(line[i]).IsPrint() ? line[i] : '.');
}
else
- hexaRep.AppendFill(' ', 2);
+ buf.AppendFill(' ', 2);
}
_LIT(KPrompt , " Hit escape to quit hexdump or any other key to continue\n");
- _LIT(KLineFmt, " %+07x0:%S %S\n");
- TKeyCode key=CShell::OutputStringToConsole(KPrompt ,(aSwitches&TShellCommand::EPSwitch)!=0,KLineFmt, offset++,&hexaRep, &asciiRep);
-
+
+ buf.Append(_L(" "));
+ buf.Append(asciiBuf);
+ buf.Append(KNl);
+
+ TKeyCode key= CShell::WriteBufToConsole((aSwitches&TShellCommand::EPSwitch)!=0, buf, KPrompt);
if (key==EKeyEscape)
break;
}
@@ -2155,7 +2211,7 @@
if(!(aSwitches&TShellCommand::EESwitch))
- {//-- fill created file with randomn data
+ {//-- fill created file with random data
while(rem)
{
@@ -2378,22 +2434,22 @@
TInt DisplayHelp();
TInt DisplayMessage(const TFullName& aName);
TInt DisplayCmdUnknown();
- TInt GetAll(const TDes& aName);
- TInt GetProcesses(const TDes& aName);
- TInt GetThreads(const TDes& aName);
- TInt GetChunks(const TDes& aName);
- TInt GetServers(const TDes& aName);
+ void GetAll(const TDes& aName);
+ void GetProcesses(const TDes& aName);
+ void GetThreads(const TDes& aName);
+ void GetChunks(const TDes& aName);
+ void GetServers(const TDes& aName);
// TInt GetSessions(const TDes& aName);
- TInt GetLibraries(const TDes& aName);
+ void GetLibraries(const TDes& aName);
// TInt GetLogicalChannels(const TDes& aName);
- TInt GetLogicalDevices(const TDes& aName);
- TInt GetPhysicalDevices(const TDes& aName);
- TInt GetSemaphores(const TDes& aName);
- TInt GetMutexes(const TDes& aName);
+ void GetLogicalDevices(const TDes& aName);
+ void GetPhysicalDevices(const TDes& aName);
+ void GetSemaphores(const TDes& aName);
+ void GetMutexes(const TDes& aName);
private:
void DisplayHelpLine(const TDesC& aCommand, const TDesC& aDescription);
- TInt Prepare(const TFullName& aName);
- TInt Prepare(const TFullName& aName,TCallBack& aCallBack);
+ TBool Prepare(const TFullName& aName);
+ TBool Prepare(const TFullName& aName,TCallBack& aCallBack);
TInt Display(TFullName& aName);
TFullName iPrevName;
TCallBack iCallBack;
@@ -2435,9 +2491,8 @@
return KErrNone;
}
-TInt TShowProcInfo::GetAll(const TDes& aName)
+void TShowProcInfo::GetAll(const TDes& aName)
{
-
GetProcesses(aName);
GetThreads(aName);
GetChunks(aName);
@@ -2449,24 +2504,27 @@
GetPhysicalDevices(aName);
GetSemaphores(aName);
GetMutexes(aName);
- return KErrNone;
+
}
-TInt TShowProcInfo::GetProcesses(const TDes& aName)
+void TShowProcInfo::GetProcesses(const TDes& aName)
{
TFindProcess findHb;
findHb.Find(aName);
TFullName name;
- Prepare(_L("PROCESSES"));
- while (findHb.Next(name)==KErrNone)
- {
+
+ if(!Prepare(_L("PROCESSES")))
+ return;
+
+ while(findHb.Next(name)==KErrNone)
+ {
Display(name);
}
- return KErrNone;
+
}
-TInt TShowProcInfo::GetThreads(const TDes& aName)
+void TShowProcInfo::GetThreads(const TDes& aName)
{
TInt threads=0;
TFindThread findHb;
@@ -2476,8 +2534,11 @@
// Modified by WR, November 1997
TCallBack threadCallBack(GetThreadInfo,findPtr);
- Prepare(_L("THREADS"),threadCallBack);
- while (findHb.Next(name)==KErrNone)
+
+ if(!Prepare(_L("THREADS"),threadCallBack))
+ return;
+
+ while (findHb.Next(name)==KErrNone)
{
Display(name);
threads += 1;
@@ -2488,12 +2549,12 @@
message.Format(_L("? No threads called %S"), &aName);
DisplayMessage(message);
}
- return KErrNone;
-// End of modification
+
+
}
-TInt TShowProcInfo::GetChunks(const TDes& aName)
+void TShowProcInfo::GetChunks(const TDes& aName)
{
TFindChunk findHb;
@@ -2501,7 +2562,10 @@
TFullName name;
TAny* namePtr=(TAny*)&name;
TCallBack chunkCallBack(GetChunkInfo,namePtr);
- Prepare(_L("CHUNKS & SIZES"),chunkCallBack);
+
+ if(!Prepare(_L("CHUNKS & SIZES"),chunkCallBack))
+ return;
+
TInt totalChunkSize=0;
TInt protectedChunks = 0;
while (findHb.Next(name)==KErrNone)
@@ -2528,21 +2592,23 @@
CShell::OutputStringToConsole(ETrue,_L(" Total Chunk Size = %dk\n"),totalChunkSize);
if(protectedChunks)
CShell::OutputStringToConsole(ETrue,_L(" %d Protected chunks not counted\n"),protectedChunks);
- return KErrNone;
+
+
}
-TInt TShowProcInfo::GetServers(const TDes& aName)
+void TShowProcInfo::GetServers(const TDes& aName)
{
TFindServer findHb;
findHb.Find(aName);
TFullName name;
- Prepare(_L("SERVERS"));
+ if(!Prepare(_L("SERVERS")))
+ return;
+
while (findHb.Next(name)==KErrNone)
{
Display(name);
}
- return KErrNone;
}
/* TInt TShowProcInfo::GetSessions(const TDes& aName)
@@ -2559,18 +2625,20 @@
return KErrNone;
}
*/
-TInt TShowProcInfo::GetLibraries(const TDes& aName)
+void TShowProcInfo::GetLibraries(const TDes& aName)
{
TFindLibrary findHb;
findHb.Find(aName);
TFullName name;
- Prepare(_L("LIBRARIES"));
+ if(!Prepare(_L("LIBRARIES")))
+ return;
+
while (findHb.Next(name)==KErrNone)
{
Display(name);
}
- return KErrNone;
+
}
/*
TInt TShowProcInfo::GetLogicalChannels(const TDes& aName)
@@ -2588,59 +2656,68 @@
}
*/
-TInt TShowProcInfo::GetLogicalDevices(const TDes& aName)
+void TShowProcInfo::GetLogicalDevices(const TDes& aName)
{
TFindLogicalDevice findHb;
findHb.Find(aName);
TFullName name;
- Prepare(_L("LOGICAL DEVICES"));
+
+ if(!Prepare(_L("LOGICAL DEVICES")))
+ return;
+
while (findHb.Next(name)==KErrNone)
{
Display(name);
}
- return KErrNone;
+
}
-TInt TShowProcInfo::GetPhysicalDevices(const TDes& aName)
+void TShowProcInfo::GetPhysicalDevices(const TDes& aName)
{
TFindPhysicalDevice findHb;
findHb.Find(aName);
TFullName name;
- Prepare(_L("PHYSICAL DEVICES"));
+
+ if(!Prepare(_L("PHYSICAL DEVICES")))
+ return;
+
while (findHb.Next(name)==KErrNone)
{
Display(name);
}
- return KErrNone;
+
}
-TInt TShowProcInfo::GetSemaphores(const TDes& aName)
+void TShowProcInfo::GetSemaphores(const TDes& aName)
{
TFindSemaphore findHb;
findHb.Find(aName);
TFullName name;
- Prepare(_L("SEMAPHORES"));
+ if(!Prepare(_L("SEMAPHORES")))
+ return;
+
while (findHb.Next(name)==KErrNone)
{
Display(name);
}
- return KErrNone;
+
}
-TInt TShowProcInfo::GetMutexes(const TDes& aName)
+void TShowProcInfo::GetMutexes(const TDes& aName)
{
TFindMutex findHb;
findHb.Find(aName);
TFullName name;
- Prepare(_L("MUTEXES"));
+ if(!Prepare(_L("MUTEXES")))
+ return;
while (findHb.Next(name)==KErrNone)
{
Display(name);
}
- return KErrNone;
+
}
void TShowProcInfo::DisplayHelpLine(const TDesC& aCommand, const TDesC& aDescription)
@@ -2649,23 +2726,32 @@
}
-TInt TShowProcInfo::Prepare(const TFullName& aName)
+TBool TShowProcInfo::Prepare(const TFullName& aName)
{
iPrevName=_L("");
- CShell::OutputStringToConsole(ETrue,_L("--%S-->\n"),&aName);
+ TKeyCode key = CShell::OutputStringToConsole(ETrue,_L("--%S-->\n"),&aName);
+
+ if(key==EKeyEscape)
+ return EFalse;
+
useCallBack=EFalse;
- return KErrNone;
+ return ETrue;
}
-TInt TShowProcInfo::Prepare(const TFullName& aName,TCallBack& aCallBack)
+TBool TShowProcInfo::Prepare(const TFullName& aName,TCallBack& aCallBack)
{
-
iPrevName=_L("");
- CShell::OutputStringToConsole(ETrue,_L("--%S-->\n"),&aName);
- useCallBack=ETrue;
+ TKeyCode key = CShell::OutputStringToConsole(ETrue,_L("--%S-->\n"),&aName);
+
+ if(key==EKeyEscape)
+ return EFalse;
+
+
+ useCallBack=ETrue;
iCallBack=aCallBack;
- return KErrNone;
+
+ return ETrue;
}
TInt TShowProcInfo::Display(TFullName& aName)
@@ -2698,7 +2784,11 @@
while (posA>=0)
{
TPtrC16 temp_desc=aName.Left(posA);
- CShell::OutputStringToConsole(ETrue,_L("%+ *S\n"),toTab+temp_desc.Left(posA).Length(),&temp_desc);
+
+ TKeyCode key = CShell::OutputStringToConsole(ETrue,_L("%+ *S\n"),toTab+temp_desc.Left(posA).Length(),&temp_desc);
+ if (key==EKeyEscape)
+ break;
+
toTab+=3;
aName.Delete(0,posA+2);
posA=aName.Match(_L("*::*"));
@@ -2729,7 +2819,7 @@
TBool abort=EFalse;
TBool processSelected=EFalse;
TBuf<0x16> prompt=_L("ps>");
- r=showProcInfo.GetProcesses(processPrefix);
+ showProcInfo.GetProcesses(processPrefix);
do
{
TBuf<0x10> command;
@@ -2791,7 +2881,7 @@
if (findP.Next(findName)==KErrNone)
{
r=showProcInfo.DisplayMessage(_L("command prefixes more than one process"));
- r=showProcInfo.GetProcesses(chosenP);
+ showProcInfo.GetProcesses(chosenP);
}
else
{
@@ -2805,42 +2895,42 @@
break;
case 'A':
{
- r=showProcInfo.GetAll(processPrefix);
+ showProcInfo.GetAll(processPrefix);
command.Zero();
}
break;
case 'P':
- r=showProcInfo.GetProcesses(asterisk);
+ showProcInfo.GetProcesses(asterisk);
break;
case 'T':
- r=showProcInfo.GetThreads(processPrefix);
+ showProcInfo.GetThreads(processPrefix);
break;
case 'C':
- r=showProcInfo.GetChunks(processPrefix);
+ showProcInfo.GetChunks(processPrefix);
break;
case 'S':
- r=showProcInfo.GetServers(processPrefix);
+ showProcInfo.GetServers(processPrefix);
break;
/* case 'I':
r=showProcInfo.GetSessions(processPrefix);
break;
*/ case 'L':
- r=showProcInfo.GetLibraries(processPrefix);
+ showProcInfo.GetLibraries(processPrefix);
break;
// case 'G':
// r=showProcInfo.GetLogicalChannels(processPrefix);
// break;
case 'V':
- r=showProcInfo.GetLogicalDevices(processPrefix);
+ showProcInfo.GetLogicalDevices(processPrefix);
break;
case 'D':
- r=showProcInfo.GetPhysicalDevices(processPrefix);
+ showProcInfo.GetPhysicalDevices(processPrefix);
break;
case 'E':
- r=showProcInfo.GetSemaphores(processPrefix);
+ showProcInfo.GetSemaphores(processPrefix);
break;
case 'M':
- r=showProcInfo.GetMutexes(processPrefix);
+ showProcInfo.GetMutexes(processPrefix);
break;
default:
{
@@ -3144,7 +3234,6 @@
c=*p, *p=p[1], p[1]=c;
}
-_LIT(KLitPercentS, "%S");
TInt ShellFunction::Type(TDes& aPath,TUint aSwitches)
{
ParsePath(aPath);
@@ -3206,8 +3295,8 @@
{
nchars=0;
TPtrC bufLeft=buf.Left(r+1);
- key = CShell::OutputStringToConsole((aSwitches&TShellCommand::EPSwitch)!=0,KLitPercentS(), &bufLeft);
- buf.Set(buf.Mid(r+1));
+ key = CShell::WriteBufToConsole((aSwitches&TShellCommand::EPSwitch)!=0, bufLeft);
+ buf.Set(buf.Mid(r+1));
if(key == EKeyEscape)
goto exit;
@@ -3216,8 +3305,9 @@
nchars=buf.Length();
if (nchars)
{
- key = CShell::OutputStringToConsole((aSwitches&TShellCommand::EPSwitch)!=0,KLitPercentS(), &buf);
- if(key == EKeyEscape)
+ key = CShell::WriteBufToConsole((aSwitches&TShellCommand::EPSwitch)!=0, buf);
+
+ if(key == EKeyEscape)
goto exit;
}
@@ -3635,9 +3725,35 @@
//----------------------------------------------------------------------
+void CShell::Print(const TDesC16& aBuf)
+{
+
+ TheConsole->Write(aBuf);
+
+ if(iDbgPrint)
+ {
+ const TInt bufLen = aBuf.Length();
+
+ if(bufLen >1 && aBuf[bufLen-1] == '\n' && aBuf[bufLen-2] != '\r')
+ {
+ RDebug::RawPrint(aBuf.Left(bufLen-1));
+ RDebug::RawPrint(_L8("\r\n"));
+ }
+ else if(bufLen == 1 && aBuf[bufLen-1] == '\n')
+ {
+ RDebug::RawPrint(_L8("\r\n"));
+ }
+ else
+ {
+ RDebug::RawPrint(aBuf);
+ }
+ }
+
+}
+
void CShell::Printf(TRefByValue<const TDesC16> aFmt, ...)
{
- TBuf<256> buf;
+ TBuf<0x200> buf;
VA_LIST list;
VA_START(list, aFmt);
// coverity[uninit_use_in_call]
@@ -3646,24 +3762,12 @@
if(!buf.Length())
return;
- TheConsole->Printf(buf);
-
- if(iDbgPrint)
- {
- const TInt bufLen = buf.Length();
- if(buf[bufLen-1] == '\n')
- {
- buf.Insert(bufLen-1, _L("\r"));
- }
-
- RDebug::RawPrint(buf);
- }
-
+ Print(buf);
}
void SIPrintf(TRefByValue<const TDesC16> aFmt, ...)
{
- TBuf<256> buf;
+ TBuf<0x200> buf;
VA_LIST list;
VA_START(list, aFmt);
// coverity[uninit_use_in_call]
@@ -3738,7 +3842,7 @@
aProg.Append(_L(".EXE"));
#ifdef _DEBUG
- SIPrintf(_L("RUNEXEC: command %S, parameters %S, count %d, forever %d, issecs %d, exiterr %d"),
+ CShell::Printf(_L("RUNEXEC: command %S, parameters %S, count %d, forever %d, issecs %d, exiterr %d"),
&aProg, ¶meters, count, forever, countIsSecs, exitOnErr);
#endif
TInt i=0;
@@ -3753,7 +3857,7 @@
r = newProcess.Create(aProg, parameters);
if (r != KErrNone)
{
- SIPrintf(KRunExecFailedProcessCreate, &aProg, r);
+ CShell::Printf(KRunExecFailedProcessCreate, &aProg, r);
return (r); // this is systematic - must return
}
newProcess.Logon(status);
@@ -3767,7 +3871,7 @@
timeCurrent.HomeTime();
timeTaken = timeCurrent.MicroSecondsFrom(timeStart);
TInt msecs = I64LOW(timeTaken.Int64() / 1000);
- SIPrintf(KRunExecReportStatusAndTime, msecs, i+1, exitType, retcode, &exitCat);
+ CShell::Printf(KRunExecReportStatusAndTime, msecs, i+1, exitType, retcode, &exitCat);
if (resetDebugRegs)
{
--- a/userlibandfileserver/fileserver/etshell/ts_edshl.cpp Thu Sep 02 21:54:16 2010 +0300
+++ b/userlibandfileserver/fileserver/etshell/ts_edshl.cpp Fri Sep 17 08:37:04 2010 +0300
@@ -532,6 +532,17 @@
}
}
+
+//-------------------------------------------------------------------------
+//-- generic shell commands that don't require sophisticated processing
+
+_LIT(KCmd_Help, "HELP"); ///< displays help
+_LIT(KCmd_Cls, "CLS"); ///< clears the screen
+_LIT(KCmd_Rem, "REM"); ///< *.bat processing - commented out line
+_LIT(KCmd_Break,"BREAK"); ///< stops *.bat file execution
+_LIT(KCmd_Exit, "EXIT"); ///< exit the shell
+
+//-------------------------------------------------------------------------
//////////////////////////////////////
//CShell
//////////////////////////////////////
@@ -728,7 +739,7 @@
tabCount = 0;
#if !defined(_EPOC)
- if(commandText.CompareF(_L("EXIT")) == 0)
+ if(commandText.CompareF(KCmd_Exit) == 0)
{
exit = ETrue;
break;
@@ -816,6 +827,10 @@
CleanupStack::PopAndDestroy(fileManObserver);
}
+
+
+//-------------------------------------------------------------------------
+
void CShell::DoCommand(TDes& aCommand)
//
// Evaluate the commandline and run the command or file
@@ -884,10 +899,13 @@
{
TInt r;
- if (aCommand.CompareF(_L("HELP"))==0)
+ if (aCommand.CompareF(KCmd_Help)==0)
PrintHelp();
- else if (aCommand.CompareF(_L("CLS"))==0)
+ else if (aCommand.CompareF(KCmd_Cls)==0)
TheConsole->ClearScreen();
+ else if (aCommand.CompareF(KCmd_Break)==0)
+ {//-- "break" command, do nothing
+ }
else if (aCommand.Length()==2 && TChar(aCommand[0]).IsAlpha() && aCommand[1]==':')
ChangeDrive(aCommand[0]);
else if (aCommand.Length()!=0)
@@ -1063,11 +1081,18 @@
else
PrintError(KErrNotFound);
}
-
- else if (readBuf.Length()<3 || readBuf.Left(3).CompareF(_L("REM"))!=0)
- DoCommand(readBuf);
+ else if (readBuf.Length()<3 || readBuf.Left(3).CompareF(KCmd_Rem)!=0)
+ {
+ //-- check if it is a "break" command. stop execution in this case
+ if(readBuf.CompareF(KCmd_Break) ==0)
+ break; //-- terminate batch file execution
+ else
+ DoCommand(readBuf);
+ }
}
- file.Close();
+
+
+ file.Close();
return KErrNone;
}
@@ -1218,7 +1243,7 @@
drivePaths[drvNum]=aDrivePath;
}
-
+//----------------------------------------------------------------------
TKeyCode CShell::OutputStringToConsole(TBool aPageSwitch,TRefByValue<const TDesC> aFmt,... )
//function for output of a sring to console
//aPageSwitch flag indicates that output should be page-by-page
@@ -1239,6 +1264,7 @@
return OutputStringToConsole(KPrompt,aPageSwitch,_L("%S"),&aBuf);
}
+//----------------------------------------------------------------------
TKeyCode CShell::OutputStringToConsole(const TDesC& aNotification,TBool aPageSwitch,TRefByValue<const TDesC> aFmt,...)
//function for output of a string to console aPageSwitch flag indicates that output should be page-by-page
//if aPageSwitch==ETrue user will be prompted with the message passed as aNotification
@@ -1251,10 +1277,8 @@
VA_LIST list;
VA_START(list,aFmt);
-
TBuf<0x200> aBuf;
//format output string using argumen list
-
//coverity[uninit_use_in_call]
TRAP_IGNORE(aBuf.AppendFormatList(aFmt,list,&overflow)); // ignore leave in TTimeOverflowLeave::Overflow()
//if we are requested to wait for the user input at the end of each page, we check whether output of next piece of text will fit into the screen
@@ -1263,26 +1287,35 @@
key=PageSwitchDisplay(aNotification);
}
//output current string
- TheConsole->Write(aBuf);
- return key;
+
+ Print(aBuf);
+
+ return key;
}
-TKeyCode CShell::OutputStringToConsole(TBool aPageSwitch, const TDesC& aBuf)
+//----------------------------------------------------------------------
+TKeyCode CShell::WriteBufToConsole(TBool aPageSwitch, const TDesC& aBuf)
{
_LIT(KPrompt , "Press any key to continue\n");
-
+ return WriteBufToConsole(aPageSwitch, aBuf, KPrompt);
+ }
+
+//----------------------------------------------------------------------
+TKeyCode CShell::WriteBufToConsole(TBool aPageSwitch, const TDesC& aBuf, const TDesC& aNotification)
+ {
TKeyCode key=EKeyNull;
//if we are requested to wait for the user input at the end of each page, we check whether output of next piece of text will fit into the screen
if (aPageSwitch)
{
- key = PageSwitchDisplay(KPrompt);
+ key = PageSwitchDisplay(aNotification);
}
- //output current string
- TheConsole->Write(aBuf);
+
+ Print(aBuf);
return key;
- }
+ }
+
TKeyCode CShell::PageSwitchDisplay(const TDesC& aNotification)
{
@@ -1313,3 +1346,9 @@
}
return key;
}
+
+
+
+
+
+
--- a/userlibandfileserver/fileserver/etshell/ts_std.h Thu Sep 02 21:54:16 2010 +0300
+++ b/userlibandfileserver/fileserver/etshell/ts_std.h Fri Sep 17 08:37:04 2010 +0300
@@ -144,10 +144,14 @@
void SetDrivePath(const TDesC& aDes);
static void NewLine();
static TKeyCode OutputStringToConsole(TBool aPageSwitch,TRefByValue<const TDesC> aFmt,...);
- static TKeyCode OutputStringToConsole(TBool aPageSwitch, const TDesC& aBuf);
static TKeyCode OutputStringToConsole(const TDesC& aNotification,TBool aPageSwitch,TRefByValue<const TDesC> aFmt,...);
+ static TKeyCode WriteBufToConsole(TBool aPageSwitch, const TDesC& aBuf);
+ static TKeyCode WriteBufToConsole(TBool aPageSwitch, const TDesC& aBuf, const TDesC& aNotification);
+
+
static void Printf(TRefByValue<const TDesC16> aFmt, ...);
+ static void Print(const TDesC16& aBuf);
static void SetDbgConsoleEcho(TBool aOn) {iDbgPrint = aOn;}
public:
@@ -274,7 +278,7 @@
private:
static TInt ShowDirectoryTree(TDes& aPath,TUint aSwitches,TDes& aTreeGraph);
static TBool Certain();
- static void OutputContentsToConsole(RPointerArray<HBufC>& aText,TUint aSwitches);
+ static TBool OutputContentsToConsole(RPointerArray<HBufC>& aText,TUint aSwitches);
static void OutputDirContentL(CDir* aDirList,RPointerArray<HBufC>& aText,TUint aSwitches);
};
--- a/userlibandfileserver/fileserver/group/release.txt Thu Sep 02 21:54:16 2010 +0300
+++ b/userlibandfileserver/fileserver/group/release.txt Fri Sep 17 08:37:04 2010 +0300
@@ -1,3 +1,18 @@
+Version 2.00.3059
+=================
+(Made by fadhliM 23/08/2010)
+
+1. niccox
+ 1. ou1cimx1#536256 smassstorage is SMPSAFE
+
+2. famustaf
+ 1. ou1cimx1#448104 [DEV] Improve RFile64 Code Coverage
+
+3. dlyokhin
+ 1. ou1cimx1#473234 File Server shouldn't allow removable drives be rugged
+ 2. ou1cimx1#491766 ENV mcl : CAtaFatTable::DataPositionInBytes() Should Fail 'Gracefully' if Cluster is Invalid (Corrupted Media)
+
+
Version 2.00.3058
=================
(Made by fadhliM 30/07/2010)
--- a/userlibandfileserver/fileserver/inc/f32fsys.h Thu Sep 02 21:54:16 2010 +0300
+++ b/userlibandfileserver/fileserver/inc/f32fsys.h Fri Sep 17 08:37:04 2010 +0300
@@ -3414,6 +3414,8 @@
IMPORT_C static TBool GetString(const TDesC8& aSection, const TDesC8& aProperty, TDes8& aPropVal);
IMPORT_C static TBool GetInt(const TDesC8& aSection, const TDesC8& aProperty, TInt32& aPropVal);
IMPORT_C static TBool GetBool(const TDesC8& aSection, const TDesC8& aProperty, TBool& aPropVal);
+ static void GetDriveSection(TInt aDrvNum, TDes8& aSectionName);
+
private:
static TBool iInitialised;
static TInt iRomAddress;
--- a/userlibandfileserver/fileserver/inc/f32ver.h Thu Sep 02 21:54:16 2010 +0300
+++ b/userlibandfileserver/fileserver/inc/f32ver.h Fri Sep 17 08:37:04 2010 +0300
@@ -58,6 +58,6 @@
@see TVersion
*/
-const TInt KF32BuildVersionNumber=3058;
+const TInt KF32BuildVersionNumber=3059;
//
#endif
--- a/userlibandfileserver/fileserver/sfat32/fat_config.cpp Thu Sep 02 21:54:16 2010 +0300
+++ b/userlibandfileserver/fileserver/sfat32/fat_config.cpp Fri Sep 17 08:37:04 2010 +0300
@@ -55,6 +55,18 @@
_LIT8(KPN_FAT32_UseFatBitSupercache, "FAT_FAT32_UseBitSupercache");
static const TUint32 KDef_FAT32_UseFatBitSupercache = 1;
+//-- FAT free space scan thread threshold in MegaBytes. If this value is set, the call to ::VolumeL() may be blocked until
+//-- the given amount of free space (MB) is counted by FAT32 free space scan thread. After this calls to ::VolumeL() will
+//-- become asynchronous, returning _current_ amount of free space (whic is > than the given threshold)
+//-- This may help avoiding the situation when FAT32 asynchronous mounting basically turns into a synchronous one, when someone is calling RFs::Volume()
+//-- just after FAT free space scan thread started. In such a case only first free NNN megabytes will be discovered synchronously, after this
+//-- the RFs::Volume() call will become asynchronous, returning the changing amount of free spece on the volume.
+
+//-- the default value is 0, which means: "no threshold, don't use it"
+_LIT8(KPN_FAT32_SyncScanThreshold, "FAT_FAT32_SyncScanThr");
+static const TUint32 KDef_FAT32_SyncScanThreshold = 0;
+
+
//-- if this parameter is not 0, "clean shutdown mask" bit in FAT16[1] will be used during volume finalisation.
//-- Otherwise, FAT16[1] will not be affected during finalisation
@@ -235,7 +247,8 @@
iFAT32_AsynchMount = ReadUint(section, KPN_FAT32_AsynchMount, KDef_FAT32_AsynchMount);
iFAT32_UseFSInfoOnMount = ReadUint(section, KPN_FAT32_UseFsInfoOnMount, KDef_FAT32_UseFsInfoOnMount);
iFAT32_UseBitSupercache = ReadUint(section, KPN_FAT32_UseFatBitSupercache, KDef_FAT32_UseFatBitSupercache);
- iFAT16_UseCleanShutDownBit = ReadUint(section, KPN_FAT16_UseCleanShutDownBit, KDef_FAT16_UseCleanShutDownBit);
+ iFAT16_UseCleanShutDownBit = ReadUint(section, KPN_FAT16_UseCleanShutDownBit, KDef_FAT16_UseCleanShutDownBit);
+ iSyncScanThresholdMB = ReadUint(section, KPN_FAT32_SyncScanThreshold, KDef_FAT32_SyncScanThreshold);
// If leaf dir cache is supported, read the configuration from estart.txt file
iLeafDirCacheSize = ReadUint(section, KPN_FAT_LeafDirCache, KDef_KLeafDirCacheSize);
@@ -360,6 +373,8 @@
DoDumpUintParam(KPN_FAT32_UseFsInfoOnMount, iFAT32_UseFSInfoOnMount);
DoDumpUintParam(KPN_FAT32_UseFatBitSupercache, iFAT32_UseBitSupercache);
DoDumpUintParam(KPN_FAT16_UseCleanShutDownBit, iFAT16_UseCleanShutDownBit);
+ DoDumpUintParam(KPN_FAT32_SyncScanThreshold, iSyncScanThresholdMB);
+
DoDumpUintParam(_L8("FAT_DirCache Size, KB"), iDirCacheSizeKB);
DoDumpUintParam(_L8("FAT_DirCache MaxPage Size Log2"), iDirCacheMaxPageSizeLog2);
@@ -371,6 +386,8 @@
DoDumpUintParam(_L8("FAT_32Cache RdGr Log2"), iFat32LRUCacheReadGrLog2);
DoDumpUintParam(_L8("FAT_32Cache WrGr Log2"), iFat32LRUCacheWriteGrLog2);
+
+
DoDumpUintParam(KPN_FAT_LeafDirCache, iLeafDirCacheSize);
DoDumpUintParam(KPN_FAT_DynamicDirCacheMin, iDynamicDirCacheSizeMinKB);
--- a/userlibandfileserver/fileserver/sfat32/fat_config.h Thu Sep 02 21:54:16 2010 +0300
+++ b/userlibandfileserver/fileserver/sfat32/fat_config.h Fri Sep 17 08:37:04 2010 +0300
@@ -44,6 +44,7 @@
inline TBool FAT32_UseFSInfoOnMount() const;
inline TBool FAT32_UseBitSupercache() const;
+ inline TUint32 FAT32_SyncScanThresholdMB() const;
inline TUint32 DirCacheSize() const;
inline TUint32 DirCacheMaxPageSizeLog2() const;
@@ -57,6 +58,7 @@
inline TUint32 DynamicDirCacheSizeMax() const;
inline TUint32 DynamicDirCacheMaxPageSizeLog2() const;
+
protected:
TFatConfig(const TFatConfig&);
@@ -103,6 +105,8 @@
TUint32 iDynamicDirCacheSizeMaxKB; ///< maximum directory cache size, Kbytes
TUint32 iDynamicDirCacheMaxPageSizeLog2;///< Log2(maximum dynamic dir cache page size)
+ TUint32 iSyncScanThresholdMB; ///< FAT32 Asynchronous Scan threshold in MegaBytes
+
};
#include"fat_config.inl"
--- a/userlibandfileserver/fileserver/sfat32/fat_config.inl Thu Sep 02 21:54:16 2010 +0300
+++ b/userlibandfileserver/fileserver/sfat32/fat_config.inl Fri Sep 17 08:37:04 2010 +0300
@@ -177,6 +177,17 @@
return iDynamicDirCacheMaxPageSizeLog2;
}
+//-----------------------------------------------------------------------------
+/**
+ @return FAT32 Asynchronous Scan threshold in MegaBytes
+*/
+TUint32 TFatConfig::FAT32_SyncScanThresholdMB() const
+ {
+ ASSERT(iInitialised);
+ return iSyncScanThresholdMB;
+ }
+
+
#endif //FAT_CONFIGURATOR_INL
--- a/userlibandfileserver/fileserver/sfat32/fat_table32.cpp Thu Sep 02 21:54:16 2010 +0300
+++ b/userlibandfileserver/fileserver/sfat32/fat_table32.cpp Fri Sep 17 08:37:04 2010 +0300
@@ -402,7 +402,7 @@
Notify the media drive about media areas that shall be treated as "deleted" if this feature is supported.
@param aFreedClusters array with FAT numbers of clusters that shall be marked as "deleted"
*/
-void CFatTable::DoFreedClustersNotify(RClusterArray &aFreedClusters)
+void CFatTable::DoFreedClustersNotifyL(RClusterArray &aFreedClusters)
{
ASSERT(iMediaAtt & KMediaAttDeleteNotify);
@@ -423,7 +423,7 @@
const TUint currCluster = aFreedClusters[i];
if (deleteLen == 0)
- byteAddress = DataPositionInBytes(currCluster); //-- start of the media range
+ byteAddress = DataPositionInBytesL(currCluster); //-- start of the media range
deleteLen += bytesPerCluster;
@@ -438,7 +438,7 @@
{//-- if DeleteNotify() failed, it means that something terribly wrong happened to the NAND media;
//-- in normal circumstances it can not happen. One of the reasons: totally worn out media.
const TBool platSecEnabled = PlatSec::ConfigSetting(PlatSec::EPlatSecEnforcement);
- __PRINT3(_L("CFatTable::DoFreedClustersNotify() DeleteNotify failure! drv:%d err:%d, PlatSec:%d"),iOwner->DriveNumber(), r, platSecEnabled);
+ __PRINT3(_L("CFatTable::DoFreedClustersNotifyL() DeleteNotify failure! drv:%d err:%d, PlatSec:%d"),iOwner->DriveNumber(), r, platSecEnabled);
if(platSecEnabled)
{
@@ -521,7 +521,7 @@
cntFreedClusters = 0;
SetFreeClusterHint(lastKnownFreeCluster);
- DoFreedClustersNotify(deletedClusters);
+ DoFreedClustersNotifyL(deletedClusters);
}
}
@@ -531,7 +531,7 @@
SetFreeClusterHint(lastKnownFreeCluster);
if(bFreeClustersNotify)
- DoFreedClustersNotify(deletedClusters);
+ DoFreedClustersNotifyL(deletedClusters);
CleanupStack::PopAndDestroy(&deletedClusters);
}
@@ -671,14 +671,6 @@
return (NumberOfFreeClusters() >= aClustersRequired);
}
-//-----------------------------------------------------------------------------
-/**
- @return ETrue if the cluster number aClusterNo is valid, i.e. belongs to the FAT table
-*/
-TBool CFatTable::ClusterNumberValid(TUint32 aClusterNo) const
- {
- return (aClusterNo >= KFatFirstSearchCluster) && (aClusterNo < iMaxEntries);
- }
@@ -1796,17 +1788,20 @@
/**
- Return the location of a Cluster in the data section of the media
+ Return media position in bytes of the cluster start
@param aCluster to find location of
@return Byte offset of the cluster data
*/
-TInt64 CAtaFatTable::DataPositionInBytes(TUint32 aCluster) const
+TInt64 CAtaFatTable::DataPositionInBytesL(TUint32 aCluster) const
{
-
- __ASSERT_DEBUG(ClusterNumberValid(aCluster), Fault(EFatTable_InvalidIndex));
-
- const TInt clusterBasePosition=iOwner->ClusterBasePosition();
+ if(!ClusterNumberValid(aCluster))
+ {
+ __ASSERT_DEBUG(0, Fault(EFatTable_InvalidIndex));
+ User::Leave(KErrCorrupt);
+ }
+
+ const TUint32 clusterBasePosition=iOwner->ClusterBasePosition();
return(((TInt64(aCluster)-KFatFirstSearchCluster) << iOwner->ClusterSizeLog2()) + clusterBasePosition);
}
@@ -2553,9 +2548,15 @@
//-- allow this thread to be preempted by another one that wants to access the media driver.
//-- without this wait we will have priority inversion, because this (low priority) thread continiously reads data by big chunks
//-- and doesn't allow others to access the driver.
- //-- On the other hand, if the thread's priority is boosted, there is no reason to be polite.
+ //-- On the other hand, if the thread's priority is boosted, there is no reason to be so polite.
if(!pSelf->IsPriorityBoosted())
- User::After(K1mSec); //-- User::After() granularity can be much coarser than 1ms
+ {//-- User::After() granularity can be much coarser than 1ms, e.g. 1/64 Sec. This will add up to the scanning time
+ User::After(K1mSec);
+ }
+ else
+ {//-- use much less coarse granularity to allow this thread to be preempted even if its priority is boosted.
+ User::AfterHighRes(128);
+ }
//-------------------------------------------
mediaPos += bytesToRead;
--- a/userlibandfileserver/fileserver/sfat32/inc/fat_table32.h Thu Sep 02 21:54:16 2010 +0300
+++ b/userlibandfileserver/fileserver/sfat32/inc/fat_table32.h Fri Sep 17 08:37:04 2010 +0300
@@ -50,7 +50,7 @@
void WriteL(TUint32 aFatIndex, TUint32 aValue);
void MountL(const TMountParams& aMountParam);
- TInt64 DataPositionInBytes(TUint32 aCluster) const;
+ TInt64 DataPositionInBytesL(TUint32 aCluster) const;
void InitializeL();
void Dismount(TBool aDiscardDirtyData);
@@ -157,7 +157,7 @@
TUint32 ReadL(TUint32 aFatIndex) const;
void WriteL(TUint32 aFatIndex, TUint32 aValue);
- TInt64 DataPositionInBytes(TUint32 aCluster) const;
+ TInt64 DataPositionInBytesL(TUint32 aCluster) const;
void FreeClusterListL(TUint32 aCluster);
TUint32 AllocateSingleClusterL(TUint32 aNearestCluster);
void ExtendClusterListL(TUint32 aNumber, TUint32& aCluster);
@@ -176,7 +176,7 @@
inline void WriteIndirectionTable(TInt aFatIndex,TInt aValue);
inline TUint8* MemCopy(TAny* aTrg,const TAny* aSrc,TInt aLength);
inline TUint8* MemCopyFillZ(TAny* aTrg, TAny* aSrc, TInt aLength);
- inline void ZeroFillCluster(TInt aCluster);
+ inline void ZeroFillClusterL(TInt aCluster);
void UpdateIndirectionTable(TUint32 aStartCluster,TUint32 anEndCluster,TInt aNum);
--- a/userlibandfileserver/fileserver/sfat32/inc/sl_std.h Thu Sep 02 21:54:16 2010 +0300
+++ b/userlibandfileserver/fileserver/sfat32/inc/sl_std.h Fri Sep 17 08:37:04 2010 +0300
@@ -192,7 +192,7 @@
//-- pure virtual interface
virtual TUint32 ReadL(TUint32 aFatIndex) const = 0;
virtual void WriteL(TUint32 aFatIndex, TUint32 aValue) = 0;
- virtual TInt64 DataPositionInBytes(TUint32 aCluster) const = 0;
+ virtual TInt64 DataPositionInBytesL(TUint32 aCluster) const = 0;
virtual void MountL(const TMountParams& aMountParam) = 0;
//-----------------------------------------------------------------
//-- just virtual interface
@@ -266,7 +266,7 @@
inline TBool ClusterNumberValid(TUint32 aClusterNo) const;
typedef RArray<TUint> RClusterArray;
- void DoFreedClustersNotify(RClusterArray &aFreedClusters);
+ void DoFreedClustersNotifyL(RClusterArray &aFreedClusters);
protected:
--- a/userlibandfileserver/fileserver/sfat32/inc/sl_std.inl Thu Sep 02 21:54:16 2010 +0300
+++ b/userlibandfileserver/fileserver/sfat32/inc/sl_std.inl Fri Sep 17 08:37:04 2010 +0300
@@ -645,6 +645,16 @@
}
+//-----------------------------------------------------------------------------
+/**
+ @return ETrue if the cluster number aClusterNo is valid, i.e. belongs to the FAT table
+*/
+inline TBool CFatTable::ClusterNumberValid(TUint32 aClusterNo) const
+ {
+ return (aClusterNo >= KFatFirstSearchCluster) && (aClusterNo < iMaxEntries);
+ }
+
+
/**
@return Maximal number of addresable FAT entries. This value is taken from the owning mount
*/
--- a/userlibandfileserver/fileserver/sfat32/ram_fat_table32.cpp Thu Sep 02 21:54:16 2010 +0300
+++ b/userlibandfileserver/fileserver/sfat32/ram_fat_table32.cpp Fri Sep 17 08:37:04 2010 +0300
@@ -343,9 +343,9 @@
Zero fill RAM area corresponding to the cluster number aCluster
@param aCluster a cluster number to be zero-filled
*/
-void CRamFatTable::ZeroFillCluster(TInt aCluster)
+void CRamFatTable::ZeroFillClusterL(TInt aCluster)
{
- TLinAddr clusterPos= I64LOW(DataPositionInBytes(aCluster));
+ TLinAddr clusterPos= I64LOW(DataPositionInBytesL(aCluster));
Mem::FillZ(iRamDiskBase+clusterPos, 1<< iOwner->ClusterSizeLog2());
}
@@ -356,9 +356,15 @@
@param aCluster to find location of
@return Byte offset of the cluster data
*/
-TInt64 CRamFatTable::DataPositionInBytes(TUint32 aCluster) const
+TInt64 CRamFatTable::DataPositionInBytesL(TUint32 aCluster) const
{
//__PRINT(_L("CRamFatTable::DataPositionInBytes"));
+ if(!ClusterNumberValid(aCluster))
+ {
+ __ASSERT_DEBUG(0, Fault(EFatTable_InvalidIndex));
+ User::Leave(KErrCorrupt);
+ }
+
ReadIndirectionTable(aCluster);
return(aCluster<<iOwner->ClusterSizeLog2());
}
@@ -417,7 +423,7 @@
__PRINT(_L("CRamFatTable::AllocateSingleClusterL"));
iOwner->EnlargeL(1<<iOwner->ClusterSizeLog2()); // First enlarge the RAM drive
TInt fileAllocated=CFatTable::AllocateSingleClusterL(aNearestCluster); // Now update the free cluster and fat/fit
- ZeroFillCluster(fileAllocated); //-- zero-fill allocated cluster
+ ZeroFillClusterL(fileAllocated); //-- zero-fill allocated cluster
return(fileAllocated);
}
@@ -458,7 +464,7 @@
DecrementFreeClusterCount(1);
WriteL(aCluster,freeCluster);
aCluster=freeCluster;
- ZeroFillCluster(freeCluster); //-- zero fill just allocated cluster (RAM area)
+ ZeroFillClusterL(freeCluster); //-- zero fill just allocated cluster (RAM area)
}
SetFreeClusterHint(aCluster);
@@ -493,7 +499,7 @@
endCluster=EOF_32Bit; // endCluster==0 -> file contained FAT loop
// Real position in bytes of the start cluster in the data area
- TLinAddr startClusterPos=I64LOW(DataPositionInBytes(startCluster));
+ TLinAddr startClusterPos=I64LOW(DataPositionInBytesL(startCluster));
// Sliding value when more than one block is freed
TLinAddr trg=startClusterPos-(totalFreed<<clusterShift);
__PRINT1(_L("trg=0x%x"),trg);
@@ -515,7 +521,7 @@
__PRINT1(_L("srcEnd=0x%x"),srcEnd);
}
else // Just move up to the next part of the chain
- srcEnd=I64LOW(DataPositionInBytes(endCluster));
+ srcEnd=I64LOW(DataPositionInBytesL(endCluster));
//-- Copy (srcEnd-srcStart) bytes from iRamDiskBase+srcStart onto iRamDiskBase+trg
//-- zero-filling free space to avoid leaving something important there
@@ -545,7 +551,7 @@
endCluster=EOF_16Bit; // endCluster==0 -> file contained FAT loop
// Real position in bytes of the start cluster in the data area
- TLinAddr startClusterPos=I64LOW(DataPositionInBytes(startCluster));
+ TLinAddr startClusterPos=I64LOW(DataPositionInBytesL(startCluster));
// Sliding value when more than one block is freed
TLinAddr trg=startClusterPos-(totalFreed<<clusterShift);
__PRINT1(_L("trg=0x%x"),trg);
@@ -567,7 +573,7 @@
__PRINT1(_L("srcEnd=0x%x"),srcEnd);
}
else // Just move up to the next part of the chain
- srcEnd=I64LOW(DataPositionInBytes(endCluster));
+ srcEnd=I64LOW(DataPositionInBytesL(endCluster));
//-- Copy (srcEnd-srcStart) bytes from iRamDiskBase+srcStart onto iRamDiskBase+trg
//-- zero-filling free space to avoid leaving something important there
@@ -633,12 +639,12 @@
__PRINT2(_L("CRamFatTable::CountContiguousClustersL() start:%d, max:%d"),aStartCluster, aMaxCount);
TUint32 clusterListLen=1;
TUint32 endCluster=aStartCluster;
- TInt64 endClusterPos=DataPositionInBytes(endCluster);
+ TInt64 endClusterPos=DataPositionInBytesL(endCluster);
while (clusterListLen<aMaxCount)
{
TInt oldCluster=endCluster;
TInt64 oldClusterPos=endClusterPos;
- if (GetNextClusterL(endCluster)==EFalse || (endClusterPos=DataPositionInBytes(endCluster))!=(oldClusterPos+(1<<iOwner->ClusterSizeLog2())))
+ if (GetNextClusterL(endCluster)==EFalse || (endClusterPos=DataPositionInBytesL(endCluster))!=(oldClusterPos+(1<<iOwner->ClusterSizeLog2())))
{
endCluster=oldCluster;
break;
--- a/userlibandfileserver/fileserver/sfat32/sl_file.cpp Thu Sep 02 21:54:16 2010 +0300
+++ b/userlibandfileserver/fileserver/sfat32/sl_file.cpp Fri Sep 17 08:37:04 2010 +0300
@@ -854,9 +854,13 @@
return KErrNotSupported;
// Fetch the address of cluster 0
- aInfo.iStartBlockAddress = fatMount.FAT().DataPositionInBytes(KFirstClusterNum);
+ TInt r;
+ TRAP(r, aInfo.iStartBlockAddress = fatMount.FAT().DataPositionInBytesL(KFirstClusterNum));
+ if (r != KErrNone)
+ return r;
- TRAPD(r, CheckPosL(startPos));
+
+ TRAP(r, CheckPosL(startPos));
if (r != KErrNone)
return r;
--- a/userlibandfileserver/fileserver/sfat32/sl_mnt.cpp Thu Sep 02 21:54:16 2010 +0300
+++ b/userlibandfileserver/fileserver/sfat32/sl_mnt.cpp Fri Sep 17 08:37:04 2010 +0300
@@ -690,10 +690,31 @@
#endif
-
- const TUint32 freeClusters = FAT().NumberOfFreeClusters(bSyncOp);
+ //-- find out number of free clusters on the volume
+ TUint32 freeClusters = FAT().NumberOfFreeClusters(EFalse); //-- this is a _current_ amount of free clusters, this operation is non-blocking
+
+ if(bSyncOp)
+ {//-- the "::VolumeL()" query is synchronous, see if we can make it semi-synchronous
+ const TUint32 KSyncScanThresholdMB = FatConfig().FAT32_SyncScanThresholdMB();
+
+ if(!KSyncScanThresholdMB)
+ {//-- the free clusters scan threshold isn't set, the query is fully synchronous.
+ //-- this call will block until FAT scan thread finishes
+ __PRINT1(_L("CFatMountCB::VolumeL() drv:%d #1"), DriveNumber());
+ freeClusters = FAT().NumberOfFreeClusters(ETrue); //-- this will be _true_ amount of free clusters
+ }
+ else
+ {//-- request number of free clusters enough to satisfy the threshold value
+ const TUint32 KClustersRequired = (TUint32)((TUint64)KSyncScanThresholdMB << 20) >> ClusterSizeLog2();
+ __PRINT2(_L("CFatMountCB::VolumeL() drv:%d req clusters:%d"), DriveNumber(), KClustersRequired);
+ (void)FAT().RequestFreeClusters(KClustersRequired);
+ freeClusters = FAT().NumberOfFreeClusters(EFalse); //-- _current_ amount of free clusters, this operation is non-blocking
+ }
+
+ }
+
aVolume.iFree = (TInt64)freeClusters << ClusterSizeLog2();
- __PRINT1(_L("CFatMountCB::VolumeL() free clusters:%d"), freeClusters);
+ __PRINT2(_L("CFatMountCB::VolumeL() drv:%d, free clusters:%d"), DriveNumber(), freeClusters);
if(drvInfo.iType==EMediaRam)
@@ -1639,7 +1660,7 @@
const TInt maxClusters=((aLength+clusterRelativePos-1)>>ClusterSizeLog2())+1;
const TInt clusterListLen=FAT().CountContiguousClustersL(aPos.iCluster,endCluster,maxClusters);
const TInt writeLength=Min(aLength,(clusterListLen<<ClusterSizeLog2())-clusterRelativePos);
- TInt64 dataStart=FAT().DataPositionInBytes(aPos.iCluster)+clusterRelativePos;
+ TInt64 dataStart=FAT().DataPositionInBytesL(aPos.iCluster)+clusterRelativePos;
TRAPD(r, iRawDisk->WriteL(dataStart,writeLength,aSrc,aMessage,anOffset, aFlag));
@@ -1670,7 +1691,7 @@
if((aPos.iPos != 0) && (badcluster == aPos.iCluster) && (aLastcluster == 0) && (aPos.iCluster == cluster))
{ //Copy the contents already present in this cluster to new cluster allocated.
const TInt sizeToRead = aPos.iPos - ((aPos.iPos >> ClusterSizeLog2()) << ClusterSizeLog2());
- dataStart = FAT().DataPositionInBytes(aPos.iCluster) + ClusterRelativePos((aPos.iPos - sizeToRead));
+ dataStart = FAT().DataPositionInBytesL(aPos.iCluster) + ClusterRelativePos((aPos.iPos - sizeToRead));
//-- Allocate the buffer required to copy the contents from bad cluster
@@ -1699,7 +1720,7 @@
{
//Calculate and copy the contents to new cluster.
aPos.iCluster = goodcluster;
- dataStart = FAT().DataPositionInBytes(aPos.iCluster) + ClusterRelativePos(aPos.iPos - sizeToRead);
+ dataStart = FAT().DataPositionInBytesL(aPos.iCluster) + ClusterRelativePos(aPos.iPos - sizeToRead);
r = LocalDrive()->Write(dataStart, clustBuf);
if(r == KErrNone)
@@ -1807,7 +1828,7 @@
const TInt maxClusters=((aLength+clusterRelativePos-1)>>ClusterSizeLog2())+1;
const TInt clusterListLen=FAT().CountContiguousClustersL(aPos.iCluster,endCluster,maxClusters);
const TInt readLength=Min(aLength,(clusterListLen<<ClusterSizeLog2())-clusterRelativePos);
- const TInt64 dataStart=FAT().DataPositionInBytes(aPos.iCluster)+clusterRelativePos;
+ const TInt64 dataStart=FAT().DataPositionInBytesL(aPos.iCluster)+clusterRelativePos;
TRAPD(r, iRawDisk->ReadL(dataStart,readLength,aTrg,aMessage,anOffset, aFlag));
@@ -3171,7 +3192,7 @@
User::Leave(KErrCorrupt);
TBuf8<sizeof(TCheckedUid)> uidBuf;
- iRawDisk->ReadCachedL(FAT().DataPositionInBytes(aCluster),sizeof(TCheckedUid),uidBuf);
+ iRawDisk->ReadCachedL(FAT().DataPositionInBytesL(aCluster),sizeof(TCheckedUid),uidBuf);
__ASSERT_DEBUG(uidBuf.Length()==sizeof(TCheckedUid),Fault(EFatReadUidFailed));
TCheckedUid uid(uidBuf);
anEntry.iType=uid.UidType();
@@ -3247,7 +3268,7 @@
// Read the remaining length or the entire cluster block whichever is smaller
TInt readLength = Min(aLength-readTotal,(clusterListLen<<ClusterSizeLog2())-pos);
__ASSERT_DEBUG(readLength>0,Fault(EReadFileSectionFailed));
- TInt64 dataAddress=(FAT().DataPositionInBytes(cluster))+pos;
+ TInt64 dataAddress=(FAT().DataPositionInBytesL(cluster))+pos;
iRawDisk->ReadL(dataAddress,readLength,aTrg,aMessage,readTotal, 0);
readTotal += readLength;
@@ -3451,7 +3472,7 @@
if (!IsRootDir(aPos))
{
TInt relPos=ClusterRelativePos(aPos.iPos);
- return FAT().DataPositionInBytes(aPos.iCluster)+relPos;
+ return FAT().DataPositionInBytesL(aPos.iCluster)+relPos;
}
if (aPos.iPos+StartOfRootDirInBytes()>=RootDirEnd())
User::Leave(KErrDirFull); // Past last root dir entry
@@ -4100,7 +4121,7 @@
User::LeaveIfError(r);
if ( caps().iType&EMediaRam )
{
- realPosition = FAT().DataPositionInBytes( aPos.iCluster );
+ realPosition = FAT().DataPositionInBytesL( aPos.iCluster );
aPos.iCluster = I64LOW((realPosition - aInfo.iStartBlockAddress)>>ClusterSizeLog2());
blockMapEntry.SetStartBlock( aPos.iCluster );
}
--- a/userlibandfileserver/fileserver/sfat32/sl_mnt32.cpp Thu Sep 02 21:54:16 2010 +0300
+++ b/userlibandfileserver/fileserver/sfat32/sl_mnt32.cpp Fri Sep 17 08:37:04 2010 +0300
@@ -1067,7 +1067,7 @@
// Read the remaining length or the entire cluster block whichever is smaller
TInt readLength = (TInt)Min((TInt64)(aLength-readTotal),(clusterListLen<<ClusterSizeLog2())-pos);
__ASSERT_DEBUG(readLength>0,Fault(EReadFileSectionFailed));
- TInt64 dataAddress=(FAT().DataPositionInBytes(cluster))+pos;
+ TInt64 dataAddress=(FAT().DataPositionInBytesL(cluster))+pos;
iRawDisk->ReadL(dataAddress,readLength,aTrg,aMessage,readTotal, 0);
readTotal += readLength;
--- a/userlibandfileserver/fileserver/sfile/sf_debug.cpp Thu Sep 02 21:54:16 2010 +0300
+++ b/userlibandfileserver/fileserver/sfile/sf_debug.cpp Fri Sep 17 08:37:04 2010 +0300
@@ -689,8 +689,9 @@
TDirCacheConfig dirCacheConfig;
TInt32 rel;
dirCacheConfig.iDrive = driveNumber;
+
TBuf8<32> driveSection;
- driveSection.Format(_L8("Drive%c"), 'A' + driveNumber);
+ F32Properties::GetDriveSection(driveNumber, driveSection);
if (F32Properties::GetInt(driveSection, _L8("FAT_LeafDirCacheSize"), rel))
dirCacheConfig.iLeafDirCacheSize = rel;
--- a/userlibandfileserver/fileserver/sfile/sf_ext.cpp Thu Sep 02 21:54:16 2010 +0300
+++ b/userlibandfileserver/fileserver/sfile/sf_ext.cpp Fri Sep 17 08:37:04 2010 +0300
@@ -1468,16 +1468,22 @@
}
TInt TFsMountExtension::Initialise(CFsRequest* aRequest)
-//
-//
-//
{
- TInt r=ValidateDrive(aRequest->Message().Int1(),aRequest);
+ TInt r;
+
+ //-- check extension name length. It should not exceed KMaxFSNameLength (32 characters)
+ r = aRequest->GetDesLength(KMsgPtr0);
+ if(r <=0 || r >KMaxFSNameLength)
+ return KErrArgument;
+
+ r = ValidateDrive(aRequest->Message().Int1(),aRequest);
if(r!=KErrNone)
- return(r);
+ return r;
+
if(aRequest->Drive()->IsSubsted())
- return(KErrNotSupported);
- return(r);
+ return KErrNotSupported;
+
+ return r;
}
@@ -1486,7 +1492,7 @@
// Dismount extension
//
{
- TFullName name;
+ TFSName name;
aRequest->ReadL(KMsgPtr0,name);
CProxyDriveFactory* pE=GetExtension(name);
if (pE==NULL)
@@ -1496,18 +1502,25 @@
TInt TFsDismountExtension::Initialise(CFsRequest* aRequest)
-//
-//
-//
{
+ TInt r;
+
+ //-- check extension name length. It should not exceed KMaxFSNameLength (32 characters)
+ r = aRequest->GetDesLength(KMsgPtr0);
+ if(r <=0 || r >KMaxFSNameLength)
+ return KErrArgument;
+
if (!KCapFsDismountExtension.CheckPolicy(aRequest->Message(), __PLATSEC_DIAGNOSTIC_STRING("Dismount File Extension")))
return KErrPermissionDenied;
- TInt r=ValidateDrive(aRequest->Message().Int1(),aRequest);
+
+ r = ValidateDrive(aRequest->Message().Int1(),aRequest);
if(r!=KErrNone)
- return(r);
+ return r;
+
if(aRequest->Drive()->IsSubsted())
return(KErrNotSupported);
- return(r);
+
+ return r;
}
TInt TFsRemoveExtension::DoRequestL(CFsRequest* aRequest)
--- a/userlibandfileserver/fileserver/sfile/sf_file_cache.cpp Thu Sep 02 21:54:16 2010 +0300
+++ b/userlibandfileserver/fileserver/sfile/sf_file_cache.cpp Fri Sep 17 08:37:04 2010 +0300
@@ -2192,9 +2192,6 @@
}
-
-_LIT8(KLitSectionNameDrive,"Drive%C");
-
static const TPtrC8 KCacheFlagEnumStrings[]=
{
_S8("OFF"),
@@ -2241,7 +2238,7 @@
// Get file cache configuration settings for this drive
// N.B. Size/length values are specified in Kilobytes, timer values in Milliseconds
TBuf8<8> sectionName;
- sectionName.Format(KLitSectionNameDrive, 'A' + aDriveNumber);
+ F32Properties::GetDriveSection(aDriveNumber, sectionName);
TInt32 val;
// Read FileCacheSize
--- a/userlibandfileserver/fileserver/sfile/sf_sys.cpp Thu Sep 02 21:54:16 2010 +0300
+++ b/userlibandfileserver/fileserver/sfile/sf_sys.cpp Fri Sep 17 08:37:04 2010 +0300
@@ -32,11 +32,7 @@
extern TBool gInitCacheCheckDrivesAndAddNotifications;
#endif
-struct TFatUtilityFunctions;
GLREF_D TCodePageUtils TheCodePage;
-const TInt KMaxLengthShortNameWithDot = 12;
-const TUint8 KLeadingE5Replacement = 0x05;
-const TUint8 KEntryErasedMarker=0xE5; ///< Erased entry marker for a directory entry
/**
Default constructor.
@@ -353,6 +349,7 @@
TSecurityPolicy policy(RProcess().SecureId(), ECapabilityTCB);
if (!policy.CheckPolicy(aRequest->Message(), __PLATSEC_DIAGNOSTIC_STRING("Add File System")))
return KErrPermissionDenied;
+
return KErrNone;
}
@@ -398,12 +395,15 @@
}
TInt TFsRemoveFileSystem::Initialise(CFsRequest* aRequest)
-//
-//
-//
{
if (!KCapFsRemoveFileSystem.CheckPolicy(aRequest->Message(), __PLATSEC_DIAGNOSTIC_STRING("Remove File System")))
return KErrPermissionDenied;
+
+ //-- check file system name length. It should not exceed KMaxFSNameLength (32 characters)
+ TInt r = aRequest->GetDesLength(KMsgPtr0);
+ if(r <=0 || r >KMaxFSNameLength)
+ return KErrArgument;
+
return KErrNone;
}
@@ -419,11 +419,160 @@
return(aRequest->Drive()->CheckMount());
}
+//-----------------------------------------------------------------------------
+/**
+ Read optional drive setting from estart.txt that may contain additional drive attributes, like KDRIVEATTLOGICALLYREMOVABLE, KDRIVEATTHIDDEN
+ and process them.
+ This may lead to addding/removing some attributes to the existing drive's ones.
+ N.B Implementation of this is quite strange, it knows only about 2 specific additional attributes..
-LOCAL_C TInt DoMountFsInitialise(CFsRequest* aRequest,TDesC& aFsName,TBool aIsExtension,TBool aIsSync)
-//
-//
-//
+ @param aDrvNum drive number
+ @param aDrvAtt in: original drive attributes, out: altered drive attributes.
+
+
+*/
+static void DoProcessAdditionalDriveAttributes(TInt aDrvNum, TUint& aDrvAtt)
+{
+ TUint add_Att= 0; //-- additional drive attributes to be added
+ TUint remove_Att = 0; //-- additional drive attributes to be removed
+
+ _LIT8( KAddAtt, "AddDriveAttributes");
+ _LIT8( KRemoveAtt, "RemoveDriveAttributes");
+ _LIT8( KLogicallyRemovableAtt, "KDRIVEATTLOGICALLYREMOVABLE");
+ _LIT8( KHiddenAtt, "KDRIVEATTHIDDEN");
+ _LIT8( KLogicallyRemovableAttHex, "0X200");
+ _LIT8( KHiddenAttHex, "0X400");
+
+ TBuf8<0x100> buf;
+ TBuf8<8> sectionName;
+ F32Properties::GetDriveSection(aDrvNum, sectionName);
+
+ //-- read and parse "AddDriveAttributes" string
+ buf.Zero();
+ TBool bSectFound = F32Properties::GetString(sectionName, KAddAtt, buf);
+
+ if(bSectFound && buf.Length() > 0)
+ {
+ TInt pos = 0;
+ TInt length = 0;
+ TPtrC8 ptr;
+ TBool endOfFlag=EFalse;
+
+ while(!endOfFlag)
+ {
+ ptr.Set(buf.Mid(pos));
+ length = ptr.Locate(',');
+
+ if(length == KErrNotFound)
+ {
+ endOfFlag = ETrue;
+ }
+ else{
+ ptr.Set(ptr.Left(length));
+ pos += (length +1);
+ }
+
+ if(((ptr.MatchF(KLogicallyRemovableAtt)) != KErrNotFound) || ((ptr.MatchF(KLogicallyRemovableAttHex)) != KErrNotFound))
+ add_Att |= KDriveAttLogicallyRemovable;
+
+ if(((ptr.MatchF(KHiddenAtt)) != KErrNotFound) || ((ptr.MatchF(KHiddenAttHex)) != KErrNotFound))
+ add_Att |= KDriveAttHidden;
+
+ }//while(!endOfFlag)
+ }
+
+ //-- read and parse "RemoveDriveAttributes" string
+ buf.Zero();
+ bSectFound = F32Properties::GetString(sectionName, KRemoveAtt, buf); //oldAtt now contains value of the attributes to be removed from iDriveAtt.
+
+ if(bSectFound && buf.Length() > 0)
+ {
+ TInt pos = 0;
+ TInt length = 0;
+ TPtrC8 ptr;
+ TBool endOfFlag=EFalse;
+
+ while(!endOfFlag)
+ {
+ ptr.Set(buf.Mid(pos));
+ length = ptr.Locate(',');
+
+ if(length == KErrNotFound)
+ {
+ endOfFlag = ETrue;
+ }
+ else
+ {
+ ptr.Set(ptr.Left(length));
+ pos += (length +1);
+ }
+
+ if(((ptr.MatchF(KLogicallyRemovableAtt)) != KErrNotFound) || ((ptr.MatchF(KLogicallyRemovableAttHex)) != KErrNotFound))
+ remove_Att |= KDriveAttLogicallyRemovable;
+
+ if(((ptr.MatchF(KHiddenAtt)) != KErrNotFound) || ((ptr.MatchF(KHiddenAttHex)) != KErrNotFound))
+ remove_Att |= KDriveAttHidden;
+
+ }//while(!endOfFlag)
+
+ }
+
+ if ((add_Att & KDriveAttLogicallyRemovable))
+ {
+ add_Att |= KDriveAttRemovable; //KDriveAttLogicallyRemovale should always set KDriveAttRemovale
+ }
+
+ if ((remove_Att & KDriveAttRemovable))
+ {
+ remove_Att |= KDriveAttLogicallyRemovable;
+ }
+
+
+ aDrvAtt |= add_Att; //-- add new attributes to drive's ones
+ aDrvAtt &= ~remove_Att; //-- remove drive attributes if there are soem indicated
+}
+
+//-----------------------------------------------------------------------------
+/**
+ Try to find and process "ForceRugged" key in the drive section. It looks like:
+ [DriveX]
+ ForceRugged N
+
+ where when N==0, the drive forced to be non-rugged, when N==1, the drive forced to be rugged,
+ otherwise the original value is not overridden.
+
+ @param aDrvNum drive number
+ @param aRugged out: true/false if the setting is found, not changed if there is no such a key in the config file
+*/
+static void DoProcessForceRuggedSetting(TInt aDrvNum, TBool& aRugged)
+{
+ _LIT8(KKeyname, "ForceRugged");
+ TBuf8<8> sectionName;
+ F32Properties::GetDriveSection(aDrvNum, sectionName);
+
+ TInt32 val=-1;
+ if(F32Properties::GetInt(sectionName, KKeyname, val))
+ {
+ if(val == 0)
+ aRugged = EFalse;
+ else if(val == 1)
+ aRugged = ETrue;
+ //else the value is considered to be invalid and nothing changed
+ }
+}
+
+//-----------------------------------------------------------------------------
+/**
+ A helper function that binds a file system to the drive along with the optional primary extension etc.
+
+ @param aRequest FS request object
+ @param aFsName file system name to be bound to the drive
+ @param aIsExtension if true, this means that it's necessary to mount aprimary extension as well
+ @param aIsSync specifies if this drive is synchronous one or not
+
+ @return standard error code
+*/
+static TInt DoMountFsInitialise(CFsRequest* aRequest, TDesC& aFsName, TBool aIsExtension, TBool aIsSync)
{
if (!KCapFsMountFileSystem.CheckPolicy(aRequest->Message(), __PLATSEC_DIAGNOSTIC_STRING("Mount File System")))
return KErrPermissionDenied;
@@ -432,12 +581,14 @@
if(r!=KErrNone)
return(r);
- TBool driveThreadExists = FsThreadManager::IsDriveAvailable(aRequest->DriveNumber(), ETrue);
+ const TBool driveThreadExists = FsThreadManager::IsDriveAvailable(aRequest->DriveNumber(), ETrue);
+ TDrive& drive = *aRequest->Drive();
+
if(driveThreadExists)
{
// A drive thread already exists for this drive.This could be because a filesystem
// is already mounted, or a proxy drive is loaded. Check the mount to be sure...
- if(aRequest->Drive()->GetFSys())
+ if(drive.GetFSys())
{
// Yes, a mount already exists so we can't mount another one!
return(KErrAccessDenied);
@@ -447,18 +598,18 @@
}
// ...therefore no drive thread can be present
- __ASSERT_DEBUG(!&aRequest->Drive()->FSys(),Fault(EMountFileSystemFSys));
+ __ASSERT_DEBUG(! &drive.FSys(),Fault(EMountFileSystemFSys));
- if(aRequest->Drive()->IsSubsted())
+ if(drive.IsSubsted())
return(KErrAccessDenied);
CFileSystem* pF = GetFileSystem(aFsName);
-
- if (pF == NULL)
+ if(!pF)
return(KErrNotFound);
+
// Check that if the drive is a proxy drive (not using TBusLocalDrive) then the filesystem supports these...
- TInt driveNumber = aRequest->DriveNumber();
+ const TInt driveNumber = aRequest->DriveNumber();
if(IsProxyDrive(driveNumber))
{
if(!pF->IsProxyDriveSupported())
@@ -467,15 +618,16 @@
r = LocalDrives::SetupMediaChange(driveNumber);
}
+
+ //-- get drive information from the file system
TDriveInfo driveInfo;
driveInfo.iDriveAtt=0;
- pF->DriveInfo(driveInfo, driveNumber);
+ pF->DriveInfo(driveInfo, driveNumber); //-- the file system can override some driveInfo properties
if(!driveInfo.iDriveAtt)
r = KErrArgument;
if(r == KErrNone && !driveThreadExists)
- {
- // determine whether file system synchronous or not not by flag passed in
+ {// determine whether file system synchronous or not not by flag passed in
r=FsThreadManager::InitDrive(driveNumber, aIsSync);
}
@@ -483,129 +635,66 @@
return(r);
- //-- let TDrive object know if the drive is synchronous
- aRequest->Drive()->SetSynchronous(aIsSync);
-
+ //-- add a primary drive extension if it is specified
if(aIsExtension && aRequest->Message().Ptr2()!=NULL)
{
- TFullName extName;
+ //-- check extension name length. It should not exceed KMaxFSNameLength (32 characters)
+ r = aRequest->GetDesLength(KMsgPtr2);
+ if(r <=0 || r >KMaxFSNameLength)
+ return KErrArgument;
+
+ TFSName extName;
+
r = aRequest->Read(KMsgPtr2,extName);
if (r!=KErrNone)
return r;
+
CProxyDriveFactory* pE=GetExtension(extName);
if(pE==NULL)
return(KErrNotFound);
- r=aRequest->Drive()->MountExtension(pE,ETrue);
+
+ r=drive.MountExtension(pE,ETrue);
if(r!=KErrNone)
return(r);
}
- TInt32 newAtt = 0;
- TInt32 oldAtt = 0;
- _LIT8( KAddAtt, "AddDriveAttributes");
- _LIT8( KRemoveAtt, "RemoveDriveAttributes");
- _LIT8( KLogicallyRemovableAtt, "KDRIVEATTLOGICALLYREMOVABLE");
- _LIT8( KHiddenAtt, "KDRIVEATTHIDDEN");
- _LIT8( KLogicallyRemovableAttHex, "0X200");
- _LIT8( KHiddenAttHex, "0X400");
- TBuf8<0x1000> addbuf;
- addbuf.FillZ();
- TBuf8<0x1000> removebuf;
- removebuf.FillZ();
- TInt drive = aRequest->Message().Int1();
- _LIT8(KLitSectionNameDrive,"Drive%C");
- TBuf8<8> sectionName;
- sectionName.Format(KLitSectionNameDrive, 'A' + drive);
- F32Properties::GetString(sectionName, KAddAtt, addbuf);
- F32Properties::GetString(sectionName, KRemoveAtt, removebuf); //oldAtt now contains value of the attributes to be removed from iDriveAtt.
-
- if(addbuf.Length() != 0)
- {
- TInt pos = 0;
- TInt length = 0;
- TPtrC8 ptr;
- TBool endOfFlag=EFalse;
+ //-- process optional additional drive attributes that can be specified in estart.txt
+ DoProcessAdditionalDriveAttributes(driveNumber, driveInfo.iDriveAtt);
- while(!endOfFlag)
- {
- ptr.Set(addbuf.Mid(pos));
- length = ptr.Locate(',');
-
- if(length == KErrNotFound)
- {
- endOfFlag = ETrue;
- }
- else{
- ptr.Set(ptr.Left(length));
- pos += (length +1);
- }
-
- if(((ptr.MatchF(KLogicallyRemovableAtt)) != KErrNotFound) || ((ptr.MatchF(KLogicallyRemovableAttHex)) != KErrNotFound))
- newAtt |= KDriveAttLogicallyRemovable;
- if(((ptr.MatchF(KHiddenAtt)) != KErrNotFound) || ((ptr.MatchF(KHiddenAttHex)) != KErrNotFound))
- newAtt |= KDriveAttHidden;
-
- }
- }
+ if(driveInfo.iDriveAtt & KDriveAttLogicallyRemovable)
+ {
+ ASSERT(driveInfo.iDriveAtt & KDriveAttRemovable);
+ }
- if(removebuf.Length() != 0)
- {
- TInt pos = 0;
- TInt length = 0;
- TPtrC8 ptr;
- TBool endOfFlag=EFalse;
+
+ //-- process 'rugged drive' property
+ TBool bRuggedDrive = drive.IsRugged();
+
+ //-- reset 'Rugged drive' attribute if this drive is removable. Having 'rugged' file system on a removable drive
+ //-- doesn't make any sense and leads only to the performance degradation
+ if(bRuggedDrive && (driveInfo.iDriveAtt & KDriveAttRemovable))
+ {
+ __PRINT1(_L("DoMountFsInitialise() drv:%d is removable. resetting 'Rugged' flag!"), driveNumber);
+ bRuggedDrive = EFalse;
+ }
- while(!endOfFlag)
- {
- ptr.Set(removebuf.Mid(pos));
- length = ptr.Locate(',');
+ DoProcessForceRuggedSetting(driveNumber, bRuggedDrive); //-- setting in estart.txt can override this flag
+ drive.SetRugged(bRuggedDrive);
+
+
+ //-- let TDrive object know if the drive is synchronous
+ drive.SetSynchronous(aIsSync);
+
+ drive.SetAtt(driveInfo.iDriveAtt); //-- finally set drive attributes
+ drive.GetFSys()=pF; //-- bind a file system to the drive
+
- if(length == KErrNotFound)
- {
- endOfFlag = ETrue;
- }
- else{
- ptr.Set(ptr.Left(length));
- pos += (length +1);
- }
-
- if(((ptr.MatchF(KLogicallyRemovableAtt)) != KErrNotFound) || ((ptr.MatchF(KLogicallyRemovableAttHex)) != KErrNotFound))
- oldAtt |= KDriveAttLogicallyRemovable;
- if(((ptr.MatchF(KHiddenAtt)) != KErrNotFound) || ((ptr.MatchF(KHiddenAttHex)) != KErrNotFound))
- oldAtt |= KDriveAttHidden;
-
- }
- }
-
- if ((newAtt & KDriveAttLogicallyRemovable) && (!(driveInfo.iDriveAtt & KDriveAttRemovable)) && (!(newAtt & KDriveAttRemovable)))
- {
- newAtt |= KDriveAttRemovable; //KDriveAttLogicallyRemovale should always set KDriveAttRemovale
- }
- if ((oldAtt & KDriveAttRemovable) && (!(oldAtt & KDriveAttLogicallyRemovable)))
- {
- oldAtt |= KDriveAttLogicallyRemovable;
- }
- if(newAtt)
- {
- driveInfo.iDriveAtt |= newAtt;
- }
- if(oldAtt)
- {
- if(oldAtt & driveInfo.iDriveAtt)
- {
- driveInfo.iDriveAtt ^= oldAtt;
- }
- }
- aRequest->Drive()->SetAtt(driveInfo.iDriveAtt);
- aRequest->Drive()->GetFSys()=pF;
+ TClosedFileUtils::Remove(driveNumber); // empty the closed file queue
- // empty the closed file queue
- TClosedFileUtils::Remove(aRequest->DriveNumber());
-
- return(KErrNone);
+ return KErrNone;
}
-
+//-----------------------------------------------------------------------------
TInt TFsMountFileSystem::DoRequestL(CFsRequest* aRequest)
//
// Mount a filesystem on a drive.
@@ -625,19 +714,26 @@
return r;
}
-
+//-----------------------------------------------------------------------------
TInt TFsMountFileSystem::Initialise(CFsRequest* aRequest)
-//
-//
-//
{
- TFullName name;
- TInt r = aRequest->Read(KMsgPtr0,name);
+ TInt r;
+
+ //-- check file system name length. It should not exceed KMaxFSNameLength (32 characters)
+ r = aRequest->GetDesLength(KMsgPtr0);
+ if(r <=0 || r >KMaxFSNameLength)
+ return KErrArgument;
+
+ TFSName name;
+ r = aRequest->Read(KMsgPtr0, name);
+
if (r == KErrNone)
r = DoMountFsInitialise(aRequest,name,ETrue,aRequest->Message().Int3());
+
return r;
}
+//-----------------------------------------------------------------------------
TInt TFsMountFileSystemScan::DoRequestL(CFsRequest* aRequest)
//
// mount file system and then call scandrive
@@ -651,25 +747,33 @@
r=aRequest->Drive()->ScanDrive();
FsNotify::DiskChange(aRequest->DriveNumber());
}
+
TPtrC8 pMS((TUint8*)&isMountSuccess,sizeof(TBool));
aRequest->WriteL(KMsgPtr3,pMS);
return(r);
}
+//-----------------------------------------------------------------------------
TInt TFsMountFileSystemScan::Initialise(CFsRequest* aRequest)
-//
-//
-//
{
- TFullName name;
- TInt r = aRequest->Read(KMsgPtr0,name);
+ TInt r;
+
+ //-- check file system name length. It should not exceed KMaxFSNameLength (32 characters)
+ r = aRequest->GetDesLength(KMsgPtr0);
+ if(r <=0 || r >KMaxFSNameLength)
+ return KErrArgument;
+
+ TFSName name;
+ r = aRequest->Read(KMsgPtr0,name);
if (r == KErrNone)
r = DoMountFsInitialise(aRequest,name,ETrue,EFalse);
+
return r;
}
-LOCAL_C TInt DoDismountFileSystem(const TDesC& aName, TDrive* aDrive, TBool aAllowRom, TBool aForceDismount)
+//-----------------------------------------------------------------------------
+static TInt DoDismountFileSystem(const TDesC& aName, TDrive* aDrive, TBool aAllowRom, TBool aForceDismount)
//
// Do file system dismount
//
@@ -747,6 +851,7 @@
return(KErrNone);
}
+//-----------------------------------------------------------------------------
TInt TFsDismountFileSystem::DoRequestL(CFsRequest* aRequest)
//
// Dismount a filesystem from a drive.
@@ -754,7 +859,8 @@
{
TDrive* drive=aRequest->Drive();
__ASSERT_DEBUG(&aRequest->Drive()->FSys() && !drive->IsSubsted(),Fault(EDisMountFileSystemFSys));
- TFullName name;
+
+ TFSName name;
aRequest->ReadL(KMsgPtr0,name);
if(drive->DismountDeferred())
@@ -763,14 +869,24 @@
return DoDismountFileSystem(name, drive, EFalse, EFalse);
}
+//-----------------------------------------------------------------------------
TInt TFsDismountFileSystem::Initialise(CFsRequest* aRequest)
//
//
//
{
+ TInt r;
+
if (!KCapFsDismountFileSystem.CheckPolicy(aRequest->Message(), __PLATSEC_DIAGNOSTIC_STRING("Dismount File System")))
return KErrPermissionDenied;
- TInt r = ValidateDrive(aRequest->Message().Int1(),aRequest);
+
+ //-- check file system name length. It should not exceed KMaxFSNameLength (32 characters)
+ r = aRequest->GetDesLength(KMsgPtr0);
+ if(r <=0 || r >KMaxFSNameLength)
+ return KErrArgument;
+
+
+ r = ValidateDrive(aRequest->Message().Int1(),aRequest);
if(r == KErrNone)
{
TInt driveNumber = aRequest->DriveNumber();
@@ -873,12 +989,13 @@
// Should always leave a filesystem mounted on the drive
//
{
- TFileName newName;
+ TFSName newName;
aRequest->ReadL(KMsgPtr0,newName);
CFileSystem* pF=GetFileSystem(newName);
if (pF==NULL)
return(KErrNotFound);
- TFileName oldName;
+
+ TFSName oldName;
aRequest->ReadL(KMsgPtr2,oldName);
TInt drvNumber=aRequest->Message().Int1();
TBool newFsIsComposite = (newName.CompareF(KCompositeFsName) == 0);
@@ -946,11 +1063,19 @@
return(r);
}
-TInt TFsSwapFileSystem::Initialise(CFsRequest* /*aRequest*/)
-//
-//
-//
+TInt TFsSwapFileSystem::Initialise(CFsRequest* aRequest)
{
+ TInt len;
+
+ //-- check file system name length. It should not exceed KMaxFSNameLength (32 characters)
+ len = aRequest->GetDesLength(KMsgPtr0); //-- new name
+ if(len <=0 || len >KMaxFSNameLength)
+ return KErrArgument;
+
+ len = aRequest->GetDesLength(KMsgPtr2); //-- old name
+ if(len <=0 || len >KMaxFSNameLength)
+ return KErrArgument;
+
return KErrNone;
}
@@ -1569,6 +1694,10 @@
@return False if and only if aUnicode has not enough space remaining.
*/
{
+ const TInt KMaxLengthShortNameWithDot = 12;
+ const TUint8 KLeadingE5Replacement = 0x05;
+ const TUint8 KEntryErasedMarker=0xE5; ///< Erased entry marker for a directory entry
+
// A workaround to handle leading 'E5' byte in short file names
TBuf8<KMaxLengthShortNameWithDot> shortFileNameWithLeadingE5;
TBool convertedLeading05toE5 = EFalse;
--- a/userlibandfileserver/fileserver/sfile/sf_utl.cpp Thu Sep 02 21:54:16 2010 +0300
+++ b/userlibandfileserver/fileserver/sfile/sf_utl.cpp Fri Sep 17 08:37:04 2010 +0300
@@ -1150,3 +1150,20 @@
CActiveScheduler::Stop();
}
+
+//---------------------------------------------------------------------------------------------------------------------------------
+/**
+ formats a string to represent a drive section in the estart.txt file by its number. Like "DriveD"
+ @param aDrvNum drive number
+ @param aSectionName out: formatted string
+*/
+void F32Properties::GetDriveSection(TInt aDrvNum, TDes8& aSectionName)
+ {
+ ASSERT(aDrvNum >= EDriveA && aDrvNum <= EDriveZ);
+ _LIT8(KLitSectionNameDrive,"Drive%C");
+ aSectionName.Format(KLitSectionNameDrive, 'A' + aDrvNum);
+ }
+
+
+
+
--- a/userlibandfileserver/fileserver/sfsrv/cl_cli.cpp Thu Sep 02 21:54:16 2010 +0300
+++ b/userlibandfileserver/fileserver/sfsrv/cl_cli.cpp Fri Sep 17 08:37:04 2010 +0300
@@ -331,23 +331,20 @@
-EFSRV_EXPORT_C TInt RFs::AddFileSystem(const TDesC& aFileName) const
/**
-Adds a file system to the file server.
-
-After calling this function, use MountFileSystem() to mount the file system
-on a drive.
-
-@param aFileName The name of the file system .FSY to install. Its full path can
- be specified.
-
-@return KErrNone, if successful, otherwise one of the other system-wide
- error codes.
+ Load file system plugin (*.fsy module) and add a file system that it implements to the file server.
+ After loading the file system plugin RFs::MountFileSystem() can be used to mount the file system on a drive.
+
+ @param aFileName The name of the file system plugin (*.FSY) to install. If only file name without extension is specified,
+ ".fsy" extension is assumed by default.
+ A full path to the FSY module can be specified, otherwise standard rules of loading DLLs apply.
+
+ @return KErrNone if successful, otherwise one of the other system-wide error codes.
@capability DiskAdmin
-
@see RFs::MountFileSystem
*/
+EFSRV_EXPORT_C TInt RFs::AddFileSystem(const TDesC& aFileName) const
{
OstTrace1(TRACE_BORDER, EFSRV_EFSADDFILESYSTEM, "sess %x", Handle());
OstTraceData(TRACE_BORDER, EFSRV_EFSADDFILESYSTEM_EFILENAME, "FileName %S", aFileName.Ptr(), aFileName.Length()<<1);
@@ -365,20 +362,20 @@
-EFSRV_EXPORT_C TInt RFs::RemoveFileSystem(const TDesC& aFileSystemName) const
/**
-Removes the specified file system.
-
-@param aFileSystemName The fullname of the file system, as returned from
- a call to FileSystemName(), to be removed.
-
-@return KErrNone, if successful;
- KErrNotFound, if aFileSystemName is not found;
- otrherwise one of the other system-wide error codes.
-
-@capability DiskAdmin
+ Removes the specified file system from the file server and unloads its plugin dll (*.fsy)
+
+ @param aFileSystemName The name of the file system to be removed. File system name that is bound to some drive can be retrieved by
+ RFs::FileSystemName(). Note that this is _not_ the name of the plugin (*.fsy).
+
+ @return KErrNone if successful
+ KErrNotFound if aFileSystemName is not found
+ otherwise one of the other system-wide error codes.
+
+ @capability DiskAdmin
*/
+EFSRV_EXPORT_C TInt RFs::RemoveFileSystem(const TDesC& aFileSystemName) const
{
OstTrace1(TRACE_BORDER, EFSRV_EFSREMOVEFILESYSTEM, "sess %x", Handle());
OstTraceData(TRACE_BORDER, EFSRV_EFSREMOVEFILESYSTEM_EFILESYSTEMNAME, "FileSystemName %S", aFileSystemName.Ptr(), aFileSystemName.Length()<<1);
@@ -390,23 +387,31 @@
+/**
+ Mounts a file system on a drive.
+ The file system must first have been added to the file server using AddFileSystem().
+ The drive is mounted as asynchronous, i.e operations on it don't block the file server and other drives;
+
+ @param aFileSystemName The name the file system, like "FAT". Note that this is _not_ the name of the plugin (*.fsy).
+ The file system name is case-insensitive, i.e. "FAT", "fat", "Fat" are equivalent.
+ The maximum lentgth of the file name is KMaxFSNameLength.
+
+ @param aDrive The drive number on which the file system is to be mounted; this can be one of the values defined by TDriveNumber.
+
+ @return KErrNone if successful
+ KErrLocked if the media is locked
+ KErrCorrupt most likely means that the data structures on the media are not recognized by the given file system. This
+ usually happens when the medium is damaged, unformatted, formatted with a different file system or vital file system structures are
+ corrupted.
+
+ otherwise one of the other system-wide error codes.
+
+ @capability DiskAdmin
+
+ @see RFs::AddFileSystem
+ @see RFs::FileSystemName
+*/
EFSRV_EXPORT_C TInt RFs::MountFileSystem(const TDesC& aFileSystemName,TInt aDrive) const
-/**
-Mounts a file system on a drive.
-
-The file system must first have been added to the file server using AddFileSystem().
-The drive is mounted as asynchronous, i.e operations on it don't block the file server and other drives;
-
-@param aFileSystemName The fullname of the file system, as returned from a call to FileSystemName().
-@param aDrive The drive on which the file system is to be mounted; this can be one of the values defined by TDriveNumber.
-
-@return KErrNone if successful, otherwise one of the other system-wide error codes.
-
-@capability DiskAdmin
-
-@see RFs::AddFileSystem
-@see RFs::FileSystemName
-*/
{
OstTraceExt2(TRACE_BORDER, EFSRV_EFSMOUNTFILESYSTEM1, "sess %x aDrive %d", (TUint) Handle(), (TUint) aDrive);
OstTraceData(TRACE_BORDER, EFSRV_EFSMOUNTFILESYSTEM1_EFILESYSTEMNAME, "FileSystemName %S", aFileSystemName.Ptr(), aFileSystemName.Length()<<1);
@@ -419,10 +424,8 @@
-EFSRV_EXPORT_C TInt RFs::MountFileSystem(const TDesC& aFileSystemName,TInt aDrive, TBool aIsSync) const
/**
-Mounts a file system on a specified drive.
-
+ Mounts a file system on a drive.
The file system must first have been added to the file server using AddFileSystem().
Depending on the aIsSync parameter, the drive can be mounted as synchronous or asynchronous.
@@ -431,17 +434,22 @@
all operations on other drives. Mounting a drive as synch. makes a sense if the operations on such drive are very fast e.g. this is an
internal RAM or ROFS drive.
-@param aFileSystemName The fullname of the file system, as returned from a call to FileSystemName().
+ @param aFileSystemName The name the file system, like "FAT". Note that this is _not_ the name of the plugin (*.fsy).
+ The file system name is case-insensitive, i.e. "FAT", "fat", "Fat" are equivalent.
+ The maximum lentgth of the file name is KMaxFSNameLength.
+
@param aDrive The drive number on which the file system is to be mounted; this can be one of the values defined by TDriveNumber.
@param aIsSync if ETrue the drive will be mounted as synchronous one;
if EFalse the drive will be mounted as Asynchronous.
@return KErrNone if successful, otherwise one of the other system-wide error codes.
+
@capability DiskAdmin
@see RFs::AddFileSystem
@see RFs::FileSystemName
*/
+EFSRV_EXPORT_C TInt RFs::MountFileSystem(const TDesC& aFileSystemName,TInt aDrive, TBool aIsSync) const
{
OstTraceExt3(TRACE_BORDER, EFSRV_EFSMOUNTFILESYSTEM2, "sess %x aDrive %d aIsSync %d", (TUint) Handle(), (TUint) aDrive, (TUint) aIsSync);
OstTraceData(TRACE_BORDER, EFSRV_EFSMOUNTFILESYSTEM2_EFILESYSTEMNAME, "FileSystemName %S", aFileSystemName.Ptr(), aFileSystemName.Length()<<1);
@@ -453,24 +461,29 @@
+/**
+ Mounts a file system on a drive, along with the specified primary drive extension.
+
+ The file system must first have been added to the file server using AddFileSystem().
+ The extension must first have been added to the file server using AddExtension().
+ The drive is mounted as asynchronous, i.e operations on it don't block the file server and other drives;
+
+ @param aFileSystemName The name the file system, like "FAT". Note that this is _not_ the name of the plugin (*.fsy).
+ The file system name is case-insensitive, i.e. "FAT", "fat", "Fat" are equivalent.
+ The maximum lentgth of the file name is KMaxFSNameLength.
+
+ @param aExtensionName The name of the primary drive extension. It has the same conventions as the aFileSystemName.
+
+ @param aDrive The drive on which the file system is to be mounted; this can be one of the values defined by TDriveNumber.
+
+ @return KErrNone if successful, otherwise one of the other system-wide error codes.
+
+ @capability DiskAdmin
+
+ @see RFs::AddFileSystem
+ @see RFs::FileSystemName
+*/
EFSRV_EXPORT_C TInt RFs::MountFileSystem(const TDesC& aFileSystemName,const TDesC& aExtensionName,TInt aDrive)
-/**
-Mounts a file system on a drive, and the specified extension.
-
-The file system must first have been added to the file server using AddFileSystem().
-The drive is mounted as asynchronous, i.e operations on it don't block the file server and other drives;
-
-@param aFileSystemName The fullname of the file system, as returned from a call to FileSystemName().
-@param aExtensionName The filename of the extension.
-@param aDrive The drive on which the file system is to be mounted; this can be one of the values defined by TDriveNumber.
-
-@return KErrNone if successful, otherwise one of the other system-wide error codes.
-
-@capability DiskAdmin
-
-@see RFs::AddFileSystem
-@see RFs::FileSystemName
-*/
{
OstTraceExt2(TRACE_BORDER, EFSRV_EFSMOUNTFILESYSTEM3, "sess %x aDrive %d", (TUint) Handle(), (TUint) aDrive);
OstTraceData(TRACE_BORDER, EFSRV_EFSMOUNTFILESYSTEM3_EEXTENSIONNAME, "ExtensionName %S", aExtensionName.Ptr(), aExtensionName.Length()<<1);
@@ -483,33 +496,34 @@
+/**
+ Mounts a file system on a drive, along with the specified primary drive extension.
+
+ The file system must first have been added to the file server using AddFileSystem().
+ The extension must first have been added to the file server using AddExtension().
+ Depending on the aIsSync parameter, the drive can be mounted as synchronous or asynchronous.
+
+ @param aFileSystemName The name the file system, like "FAT". Note that this is _not_ the name of the plugin (*.fsy).
+ The file system name is case-insensitive, i.e. "FAT", "fat", "Fat" are equivalent.
+ The maximum lentgth of the file name is KMaxFSNameLength.
+
+ @param aExtensionName The name of the primary drive extension. It has the same conventions as the aFileSystemName.
+
+ @param aDrive The drive on which the file system is to be mounted; this can be one of the values defined by TDriveNumber.
+
+ @param aIsSync if ETrue the drive will be mounted as synchronous one;
+ if EFalse the drive will be mounted as Asynchronous.
+
+
+ @return KErrNone if successful, otherwise one of the other system-wide error codes.
+
+ @capability DiskAdmin
+
+ @see RFs::AddFileSystem
+ @see RFs::FileSystemName
+
+*/
EFSRV_EXPORT_C TInt RFs::MountFileSystem(const TDesC& aFileSystemName,const TDesC& aExtensionName,TInt aDrive, TBool aIsSync)
-/**
-Mounts a file system on a drive, and the specified extension.
-
-The file system must first have been added to the file server using AddFileSystem().
-
-Depending on the aIsSync parameter, the drive can be mounted as synchronous or asynchronous.
-
-Asynchronous drive has its own processing thread, i.e operations on it don't block the file server and other drives;
-Synchronous drives' requests are being processed by the main file server thread and there is a possibility to block it along with
-all operations on other drives. Mounting a drive as synch. makes sense if the operations on such drive are very fast e.g. this is an
-internal RAM or ROFS drive.
-
-@param aFileSystemName The fullname of the file system, as returned from a call to FileSystemName().
-@param aExtensionName The filename of the extension.
-@param aDrive The drive on which the file system is to be mounted; this can be one of the values defined by TDriveNumber.
-
-@param aIsSync if ETrue the drive will be mounted as synchronous one;
- if EFalse the drive will be mounted as Asynchronous.
-
-@return KErrNone if successful, otherwise one of the other system-wide error codes.
-
-@capability DiskAdmin
-
-@see RFs::AddFileSystem
-@see RFs::FileSystemName
-*/
{
OstTraceExt3(TRACE_BORDER, EFSRV_EFSMOUNTFILESYSTEM4, "sess %x aDrive %d aIsSync %d", (TUint) Handle(), (TUint) aDrive, (TUint) aIsSync);
OstTraceData(TRACE_BORDER, EFSRV_EFSMOUNTFILESYSTEM4_EFILESYSTEMNAME, "FileSystemName %S", aFileSystemName.Ptr(), aFileSystemName.Length()<<1);
@@ -521,28 +535,31 @@
-
+/**
+ Mounts a file system on a drive, and performs a scan on that drive by calling RFs::ScanDrive.
+ The file system must first have been added to the file server using AddFileSystem().
+ Note that the scan is done only if the mount is successful.
+
+ The drive is mounted as asynchronous, i.e operations on it don't block the file server and other drives;
+
+ @param aFileSystemName The name the file system, like "FAT". Note that this is _not_ the name of the plugin (*.fsy).
+ The file system name is case-insensitive, i.e. "FAT", "fat", "Fat" are equivalent.
+ The maximum lentgth of the file name is KMaxFSNameLength.
+
+ @param aDrive The drive on which the file system is to be mounted; this can be one of the values defined by TDriveNumber.
+
+ @param aIsMountSuccess On return, set to: ETrue, if the if the mount is successful, set to EFalse otherwise.
+
+ @return KErrNone if successful, otherwise one of the other system-wide error codes, reflecting the failure of the mount operation.
+
+ @capability DiskAdmin
+
+ @see RFs::ScanDrive
+ @see RFs::TDriveNumber
+ @see RFs::AddFileSystem
+ @see RFs::FileSystemName
+*/
EFSRV_EXPORT_C TInt RFs::MountFileSystemAndScan(const TDesC& aFileSystemName,TInt aDrive,TBool& aIsMountSuccess) const
-/**
-Mounts a file system on a drive, and performs a scan on that drive.
-The file system must first have been added to the file server using AddFileSystem().
-
-Note that the scan is done only if the mount is successful.
-
-The drive is mounted as asynchronous, i.e operations on it don't block the file server and other drives;
-
-@param aFileSystemName The fullname of the file system, as returned from a call to FileSystemName().
-@param aDrive The drive on which the file system is to be mounted; this can be one of the values defined by TDriveNumber.
-@param aIsMountSuccess On return, set to: ETrue, if the if the mount is successful, set to EFalse otherwise.
-
-@return KErrNone if successful, otherwise one of the other system-wide error codes, reflecting the failure of the mount operation.
-
-@capability DiskAdmin
-
-@see RFs::TDriveNumber
-@see RFs::AddFileSystem
-@see RFs::FileSystemName
-*/
{
OstTraceExt2(TRACE_BORDER, EFSRV_EFSMOUNTFILESYSTEMANDSCAN1, "sess %x aDrive %d", (TUint) Handle(), (TUint) aDrive);
OstTraceData(TRACE_BORDER, EFSRV_EFSMOUNTFILESYSTEMANDSCAN1_EFILESYSTEMNAME, "FileSystemName %S", aFileSystemName.Ptr(), aFileSystemName.Length()<<1);
@@ -553,34 +570,29 @@
return r;
}
+/**
+
+ Mounts a file system on a drive, along with the specified primary drive extension and performs a scan on that drive by calling RFs::ScanDrive.
+
+ The file system must first have been added to the file server using AddFileSystem().
+ The extension must first have been added to the file server using AddExtension().
+ Note that the scan is done only if the mount is successful.
+ The drive is mounted as asynchronous, i.e operations on it don't block the file server and other drives.
+
+ @param aFileSystemName The name the file system, like "FAT". Note that this is _not_ the name of the plugin (*.fsy).
+ The file system name is case-insensitive, i.e. "FAT", "fat", "Fat" are equivalent.
+ The maximum lentgth of the file name is KMaxFSNameLength.
+
+ @param aExtensionName The name of the primary drive extension. It has the same conventions as the aFileSystemName.
+
+ @param aDrive The drive on which the file system is to be mounted; this can be one of the values defined by TDriveNumber.
+
+ @param aIsMountSuccess On return, set to: ETrue, if the if the mount is successful, set to EFalse otherwise.
+
+ @return KErrNone if successful, otherwise one of the other system-wide error codes, reflecting the failure of the mount operation.
+
+*/
EFSRV_EXPORT_C TInt RFs::MountFileSystemAndScan(const TDesC& aFileSystemName,const TDesC& aExtensionName,TInt aDrive,TBool& aIsMountSuccess) const
-/**
-Mounts a file system on a drive, and the specified extension and performs a scan on that drive.
-
-The file system must first have been added to the file server,
-using AddFileSystem().
-
-Note that the scan is done only if the mount is successful.
-
-The operation is asynchronous, i.e other concurrent file server operations can continue.
-
-@param aFileSystemName The fullname of the file system, as returned from
- a call to FileSystemName().
-@param aExtensionName The filename of the extension.
-@param aDrive The drive on which the file system is to be mounted;
- this can be one of the values defined by TDriveNumber.
-@param aIsMountSuccess On return, set to: ETrue, if the if the mount
- is successful, set to EFalse otherwise.
-
-@return KErrNone if successful, otherwise one of the other system-wide
- error codes, reflecting the failure of the mount operation.
-
-@capability DiskAdmin
-
-@see RFs::TDriveNumber
-@see RFs::AddFileSystem
-@see RFs::FileSystemName
-*/
{
OstTraceExt3(TRACE_BORDER, EFSRV_EFSMOUNTFILESYSTEMANDSCAN2, "sess %x aDrive %d aIsMountSuccess %d", (TUint) Handle(), (TUint) aDrive, (TUint) aIsMountSuccess);
OstTraceData(TRACE_BORDER, EFSRV_EFSMOUNTFILESYSTEMANDSCAN2_EFILESYSTEMNAME, "FileSystemName %S", aFileSystemName.Ptr(), aFileSystemName.Length()<<1);
@@ -592,28 +604,31 @@
return r;
}
-EFSRV_EXPORT_C TInt RFs::DismountFileSystem(const TDesC& aFileSystemName,TInt aDrive) const
+
/**
Dismounts the file system from the specified drive.
-
-@param aFileSystemName The fullname of the file system, as returned from
- a call to FileSystemName().
-@param aDrive The drive from which the file system is to be dismounted.
+ Note that is not possible to dismount a file system if its has objects opened, like files, directories, formats etc.
+
+ @param aFileSystemName The name the file system, like "FAT". Note that this is _not_ the name of the plugin (*.fsy).
+ The file system name is case-insensitive, i.e. "FAT", "fat", "Fat" are equivalent.
+ The maximum lentgth of the file name is KMaxFSNameLength.
+ The file system name on the drive can be retrieved by a call to RFs::FileSystemName().
+
+ @param aDrive The drive number from which the file system is to be dismounted.
@return KErrNone, if successful;
KErrNotFound, if aFileSystemName is not found;
KErrNotReady, if the drive does not have a file system mounted on it;
KErrInUse, if the drive has a resource open on it;
- KErrAccessDenied, if there is an attempt to dismount a ROM file system,
- a substituted drive, or the drive which is the default drive;
+ KErrAccessDenied, if there is an attempt to dismount a ROM file system, a substituted drive, or the drive which is the default drive;
KErrArgument, if the specified drive value is outsdide of the valid range.
- KErrPermissionDenied, if the client does not have the necessary capabilities
- to dismount the file system.
+ KErrPermissionDenied, if the client does not have the necessary capabilities to dismount the file system.
@capability DiskAdmin
@see RFs::FileSystemName
*/
+EFSRV_EXPORT_C TInt RFs::DismountFileSystem(const TDesC& aFileSystemName,TInt aDrive) const
{
OstTraceExt2(TRACE_BORDER, EFSRV_EFSDISMOUNTFILESYSTEM, "sess %x aDrive %d", (TUint) Handle(), (TUint) aDrive);
OstTraceData(TRACE_BORDER, EFSRV_EFSDISMOUNTFILESYSTEM_EFILESYSTEMNAME, "FileSystemName %S", aFileSystemName.Ptr(), aFileSystemName.Length()<<1);
@@ -634,7 +649,7 @@
Note that the file system name, returned in the aName descriptor shall be threated as case-insensitive string. I.e.
"fileSystem" and "FILESYSTEM" mean absolutely the same. Therefore, case-insensitive string methods (like TDesC::FindF(), TDesC::CompareF())
- shall be used to deal with the names.
+ shall be used to deal with the file system names.
@return KErrNone, if successful;
KErrNotFound if aFileSystemName is not found, or the drive does not have a file system mounted on it;
@@ -694,15 +709,18 @@
-
-EFSRV_EXPORT_C TInt RFs::AddExtension(const TDesC& aFileName)
/**
-Loads the specified extension.
+ Load file system extension module and add it to the file server.
+
+ @param aFileName The name of the extension plugin (usually *.FXT) to install.
+ A full path to the module can be specified, otherwise standard rules of loading DLLs apply.
+
+ @see RFs::AddFileSystem
@param aFileName The file name of the extension
-
@return KErrNone, if successful; otherwise one of the other system wide error codes.
*/
+EFSRV_EXPORT_C TInt RFs::AddExtension(const TDesC& aFileName)
{
OstTrace1(TRACE_BORDER, EFSRV_EFSADDEXTENSION, "sess %x", Handle());
OstTraceData(TRACE_BORDER, EFSRV_EFSADDEXTENSION_EEXTENSIONNAME, "ExtensionName %S", aFileName.Ptr(), aFileName.Length()<<1);
@@ -719,15 +737,14 @@
-
-EFSRV_EXPORT_C TInt RFs::MountExtension(const TDesC& aExtensionName,TInt aDrive)
/**
Mounts the the specified extension.
The extension must first have been loaded using AddExtension().
-@param aExtensionName The fullname of the extension, as returned from
- a call to ExtensionName().
+ @param aExtensionName The fullname of the extension, as returned from a call to ExtensionName().
+ The extension names have the same conventions as file system names i.e. case-insensitive and no longer than KMaxFSNameLength.
+
@param aDrive The drive on which the extension is to be mounted;
@return KErrNone if successful;
@@ -736,6 +753,7 @@
@see RFs::ExtensionName
*/
+EFSRV_EXPORT_C TInt RFs::MountExtension(const TDesC& aExtensionName,TInt aDrive)
{
OstTraceExt2(TRACE_BORDER, EFSRV_EFSMOUNTEXTENSION, "sess %x aDrive %d", (TUint) Handle(), (TUint) aDrive);
OstTraceData(TRACE_BORDER, EFSRV_EFSMOUNTEXTENSION_EEXTENSIONNAME, "ExtensionName %S", aExtensionName.Ptr(), aExtensionName.Length()<<1);
--- a/userlibandfileserver/fileserver/smassstorage/smassstorage.mmh Thu Sep 02 21:54:16 2010 +0300
+++ b/userlibandfileserver/fileserver/smassstorage/smassstorage.mmh Fri Sep 17 08:37:04 2010 +0300
@@ -62,3 +62,6 @@
#include "../group/f32caps.mmh" // Capabilities of File Server process
#include "../group/f32.mmh" // Generic definitions for the whole f32 component
+
+SMPSAFE
+