diff -r 000000000000 -r a41df078684a kerneltest/e32test/device/d_ldd.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/kerneltest/e32test/device/d_ldd.cpp Mon Oct 19 15:55:17 2009 +0100 @@ -0,0 +1,347 @@ +// Copyright (c) 1998-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: +// e32test\device\d_ldd.cpp +// LDD for testing LDD static data +// +// + +#include +#include "d_ldd.h" +#include "d_ldd2.h" + +const TInt KMajorVersionNumber=0; +const TInt KMinorVersionNumber=1; +const TInt KBuildVersionNumber=1; + +TInt AFunction() + { + return KErrNone; + } + +TInt data=0x100; +TAny* dataptr=(TAny*)&AFunction; +TInt TheBss; + +class TGlobal + { +public: + TGlobal(); + ~TGlobal(); + void Update(TUint32 a); + TInt Verify(); +public: + TUint32 iInt; + TAny* iPtr; + }; + +TGlobal Global; + +TGlobal::TGlobal() + { + __KTRACE_OPT(KDEVICE,Kern::Printf("TGlobal::TGlobal()")); + iPtr = Kern::Alloc(65536); + Update(487); + } + +TGlobal::~TGlobal() + { + __KTRACE_OPT(KDEVICE,Kern::Printf("TGlobal::~TGlobal()")); + Kern::Free(iPtr); + } + +void TGlobal::Update(TUint32 a) + { + iInt = a; + if (iPtr) + { + TUint32* p = (TUint32*)iPtr; + TUint32* pE = p + 65536/4; + while (p