sl@0: // Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of the License "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // Responsible for dealing with static info in the Stop Mode framework sl@0: // sl@0: sl@0: /** sl@0: * @file sl@0: * @internalComponent sl@0: * @prototype sl@0: */ sl@0: sl@0: #ifdef __LAUNCH_AS_EXTENSION__ sl@0: sl@0: #include sl@0: #include sl@0: #include sl@0: #include "d_rmd_breakpoints.h" sl@0: sl@0: using namespace Debug; sl@0: sl@0: const TInt KBUFSIZE = 128; sl@0: sl@0: /** sl@0: * Stop Mode routine to retrieve the static info and place it in the response buffer sl@0: * @param aItem List item describing the list sl@0: * @return One of the system wide error codes sl@0: */ sl@0: TInt StopModeDebug::GetStaticInfo(const TListItem* aItem, bool aCheckConsistent) sl@0: { sl@0: __KTRACE_OPT(KDEBUGGER,Kern::Printf("\nDumping the static information")); sl@0: sl@0: if(aItem->iListScope != EScopeGlobal) sl@0: { sl@0: return KErrArgument; //No other scope makes sense for static info sl@0: } sl@0: sl@0: TUint8* buffer = (TUint8*)aItem->iBufferAddress; sl@0: TUint8* bufferPos = Align4(buffer + sizeof(TListReturn)); sl@0: TUint8* bufferEnd = buffer + aItem->iBufferSize; sl@0: sl@0: TListReturn* listResp = (TListReturn*)buffer; sl@0: listResp->iReqNo = EStaticInfo; sl@0: listResp->iNumberItems = 1; //there in only one structure of TStaticListEntry sl@0: listResp->iDataSize = sizeof(TStaticListEntry); sl@0: sl@0: if (bufferPos < bufferEnd) sl@0: { sl@0: // making sure we have enough space to write the static info sl@0: TStaticListEntry& entry = *(TStaticListEntry*)(bufferPos); sl@0: sl@0: // build version and rom build time sl@0: TRomHeader rHdr = Epoc::RomHeader(); sl@0: entry.iTime = rHdr.iTime; sl@0: entry.iBuildNumber = rHdr.iVersion.iBuild; sl@0: entry.iMajorVersion = rHdr.iVersion.iMajor; sl@0: entry.iMinorVersion = rHdr.iVersion.iMinor; sl@0: sl@0: //Number of CPUs sl@0: entry.iCpuNumbers = NKern::NumberOfCpus(); sl@0: sl@0: TBuf bufTime64; sl@0: bufTime64.Num(rHdr.iTime); sl@0: sl@0: __KTRACE_OPT(KDEBUGGER,Kern::Printf("Version%d.%02d(%03d) %d", rHdr.iVersion.iMajor, rHdr.iVersion.iMinor, rHdr.iVersion.iBuild)); sl@0: __KTRACE_OPT(KDEBUGGER,Kern::Printf("Build Time %S ms", &bufTime64)); sl@0: __KTRACE_OPT(KDEBUGGER,Kern::Printf("Number of CPUs in the system: %d", entry.iCpuNumbers)); sl@0: } sl@0: sl@0: return KErrNone; sl@0: } sl@0: sl@0: #endif sl@0: