void CUnknowns::DumpAddDetail(CUnknown* pcUnknown) { SMemoryAllocation* psAlloc; CChars sz; psAlloc = MEMORY_GET_ALLOCATION(pcUnknown); if (!IsFreed(pcUnknown)) { sz.Init("Size: "); sz.Append(psAlloc->uiSize); sz.AppendNewLine(); sz.Append("AllocCount: "); sz.Append(psAlloc->uiAllocCount); sz.AppendNewLine(); sz.Append("DebugName: "); sz.Append(psAlloc->szDebug, 4); sz.AppendNewLine(); sz.Dump(); sz.Kill(); } else { sz.Init("Freed CUnknown.\n"); sz.Append("AllocCount: "); sz.Append(psAlloc->uiAllocCount); sz.AppendNewLine(); sz.Dump(); sz.Kill(); } }
void CObjects::DumpNames(void) { CChars sz; sz.Init("-------------------------- Names -------------------------- \n"); sz.Dump(); sz.Kill(); // mcMemory.GetNames()->DumpTree(); sz.Init(); sz.Append("------------------------------------------------------------ \n"); sz.Dump(); sz.Kill(); }
void CBaseObject::DumpFroms(void) { CChars sz; int i; int iNumEmbedded; CEmbeddedObject* pcEmbedded; int j; int iNumHeapFroms; CBaseObject* pcFromObject; int iLength; CChars szLine; sz.Init(); sz.Append("-- "); PrintObject(&sz); sz.Append(" --\n"); iLength = sz.Length()-1; szLine.Init('-', iLength); szLine.AppendNewLine(); sz.Insert(0, &szLine); sz.Append("Total Heap Froms ["); sz.Append(NumHeapFroms()); sz.Append("], "); sz.Append("Stack Froms ["); sz.Append(NumStackFroms()); sz.Append("]\n"); iNumEmbedded = GetNumEmbedded(); for (i = 0; i < iNumEmbedded; i++) { pcEmbedded = GetEmbeddedObject(i); iNumHeapFroms = pcEmbedded->CEmbeddedObject::NumHeapFroms(); sz.Append("Embedded "); sz.Append(i); sz.Append(" Heap Froms ["); sz.Append(iNumHeapFroms); sz.Append("], "); sz.Append("Stack Froms ["); sz.Append(pcEmbedded->CEmbeddedObject::NumStackFroms()); sz.Append("]\n"); for (j = 0; j < iNumHeapFroms; j++) { pcFromObject = pcEmbedded->GetHeapFrom(j); sz.Append(" "); pcFromObject->PrintObject(&sz); sz.AppendNewLine(); } } sz.Append(&szLine); szLine.Kill(); sz.Dump(); sz.Kill(); }
void CLogFile::Dump(void) { CChars sz; int i; char* pvData; CLogFileCommandWrite* psWrite; filePos iLen; sz.Init(); sz.Append("Log File (?"); sz.Append(")\n------------------\n"); sz.Append("Commands: "); sz.Append(macCommands.NumElements()); sz.AppendNewLine(); for (i = 0; i < macCommands.NumElements(); i++) { macCommands.Get(i, (void**)&pvData); sz.Append(" "); sz.Append("Write: ("); psWrite = (CLogFileCommandWrite*)pvData; sz.Append(psWrite->iPosition); sz.Append(", "); sz.Append(psWrite->iSize); sz.Append(") "); pvData = (char*)RemapSinglePointer(psWrite, sizeof(CLogFileCommandWrite)); iLen = psWrite->iSize; sz.AppendData(pvData, 80); sz.AppendNewLine(); } sz.AppendNewLine(); sz.Dump(); sz.Kill(); }
void CNamedIndexesBlock::Dump(CArrayBlock* pavFakeBlock) { int i; CNamedIndexedBlock* pvcBlock; CChars szText; szText.Init("--- Block("); szText.Append(pavFakeBlock->NumElements()); szText.Append(") ---\n"); szText.Append("("); szText.Append(mszFirst.Text()); szText.Append(") -> ("); szText.Append(mszLast.Text()); szText.Append(")\n"); for (i = 0; i < pavFakeBlock->NumElements(); i++) { pvcBlock = (CNamedIndexedBlock*)pavFakeBlock->Get(i); szText.Append(pvcBlock->Name()); szText.AppendNewLine(); } szText.AppendNewLine(); szText.Dump(); szText.Kill(); }
void CIndexedFile::Dump(void) { CChars sz; int i; filePos iSizeOnDisk; filePos iPos; BOOL bDurable; char pvData[80]; int iReadSize; iSizeOnDisk = mcFile.SizeFromFile(); bDurable = mcFile.mbDurable; mcFile.mbDurable = FALSE; sz.Init(); sz.Append("File Descriptor ("); sz.Append(miFileIndex); sz.Append(")\n------------------\n"); sz.Append("Primary Name: "); sz.Append(mszFileName); sz.AppendNewLine(); sz.Append("Rewrite Name: "); sz.Append(mszRewriteName); sz.AppendNewLine(); sz.Append("Durable: "); sz.AppendBool(bDurable); sz.AppendNewLine(); sz.Append("Datas (A:"); sz.Append(miNumDatas); sz.Append(", D:"); sz.Append(mcFile.miLength/miDataSize); sz.Append(", F:"); sz.Append(iSizeOnDisk/miDataSize); sz.Append(")\n\n"); sz.Append("Data on Disk\n------------\n"); iReadSize = 80; if (miDataSize < iReadSize) { iReadSize = miDataSize; } iPos = mcFile.Tell(); for (i = 0; i < iSizeOnDisk/miDataSize; i++) { mcFile.Read(i*miDataSize, pvData, iReadSize, 1); sz.AppendData(pvData, iReadSize); sz.AppendNewLine(); } sz.AppendNewLine(); mcFile.Seek(EFSO_SET, iPos); sz.Dump(); sz.Kill(); mcFile.Dump(); mcFile.mbDurable = bDurable; }
void CChars::Dump(const char* sz) { CChars c; c.Init(sz); c.Dump(); c.Kill(); }
void CChannels::Dump(int iLineLength) { int i; CChannel* psChannel; char* szTypeName; CChars c; int iRemain; c.Init(); for (i = 0; i < masChannelOffsets.NumElements(); i++) { psChannel = masChannelOffsets.Get(i); szTypeName = gcTypeNames.GetPrettyName(psChannel->eType); c.Append("Channel["); c.Append(psChannel->iChannel); c.Append("]: Type["); c.Append(szTypeName); c.Append("], ByteOffset["); c.Append(psChannel->miByteOffset); c.Append("], BitOffset["); c.Append(psChannel->miBitOffset); c.Append("]\n"); } c.Append("Number of elements["); c.Append(miSize); c.Append("], Data array size["); c.Append(mabData.NumElements()); c.Append("]\n"); c.Append("ByteStride["); c.Append(miByteStride); c.Append("]\n"); c.Append("BitStride["); c.Append(miBitStride); c.Append("]\n"); if (iLineLength != 0) { for (i = 0; i <= mabData.NumElements()/iLineLength; i++) { if (mabData.NumElements() - iLineLength*i < iLineLength) { iRemain = mabData.NumElements() - iLineLength*i; } else { iRemain = iLineLength; } c.AppendHexLoHi(mabData.Get(i*iLineLength), iRemain); c.AppendNewLine(); } } c.Dump(); c.Kill(); }
void CInputDeviceValues::Dump(void) { CChars sz; sz.Init(16); ToString(&sz); sz.Dump(); sz.Kill(); }
void CMarkupDoc::Dump(void) { CChars sz; sz.Init(); ToString(&sz); sz.Dump(); sz.Kill(); }
void CPPAbstractHolder::SavageDump(void) { CChars sz; sz.Init(); mcTokens.SavageAppend(&sz, 0); sz.Dump(); sz.Kill(); }
void CExternalString::Dump(void) { CChars sz; sz.Init(msz, 0, miLen); sz.AppendNewLine(); sz.Dump(); sz.Kill(); }
////////////////////////////////////////////////////////////////////////// // // // // ////////////////////////////////////////////////////////////////////////// void SFloat4::Dump(void) { CChars sz; sz.Init(); ToString(&sz, 4); sz.AppendNewLine(); sz.Dump(); sz.Kill(); }
void CPPAbstractHolder::Dump(void) { CChars sz; sz.Init(); Append(&sz); sz.AppendNewLine(); sz.Dump(); sz.Kill(); }
void CObjects::DumpIndex(void) { CChars sz; sz.Init("-------------------------- Indices -------------------------- \n"); PrintMemory(&sz); sz.Append("------------------------------------------------------------ \n"); sz.Dump(); sz.Kill(); }
void CIndexedHuge::DumpThirdLevelCache(void) { CChars sz; sz.Init(); DumpThirdLevelCache(&sz); sz.Dump(); sz.Kill(); }
void CDirectInputDetail::Dump(void) { CChars sz; sz.Init(); sz.Append("Joystick "); sz.Append(": "); sz.Append(szID); sz.AppendNewLine(); sz.Dump(); sz.Kill(); }
////////////////////////////////////////////////////////////////////////// // // // // ////////////////////////////////////////////////////////////////////////// void CArrayString::Dump(void) { int i; CChars* psz; CChars sz; sz.Init(1024); for (i = 0; i < mcArray.NumElements(); i++) { psz = mcArray.Get(i); sz.Append(psz); sz.AppendNewLine(); } sz.Dump(); sz.Kill(); }
void CPointer::Dump(void) { CChars sz; CBaseObject* pvBaseObject = BaseObject(); if (pvBaseObject) { pvBaseObject->Dump(); } else { sz.Init("NULL\n"); sz.Dump(); sz.Kill(); } }
////////////////////////////////////////////////////////////////////////// // // // // ////////////////////////////////////////////////////////////////////////// void CPreprocessor::LogIncludes(CCFile* pcFile) { CChars sz; if (mbLogInlucdes) { sz.Init(); sz.Append(' ', miIncludeDepth*4); sz.Append(" "); sz.Append(pcFile->ShortName()); sz.Append("\n"); if (mbDumpLogs) { sz.Dump(); } mpszIncludesLog->Append(sz); sz.Kill(); } }
////////////////////////////////////////////////////////////////////////// // // // // ////////////////////////////////////////////////////////////////////////// void CPreprocessor::ProcessHashError(CPreprocessorTokenParser* pcParser) { CChars szError; CPPToken* pcToken; pcParser->SkipWhiteSpace(); szError.Init("Error ("); szError.Append(mpcCurrentFile->ShortName()); szError.Append("):"); while (pcParser->HasToken()) { pcToken = pcParser->GetToken(); pcToken->Append(&szError); pcParser->NextToken(); } szError.AppendNewLine(); szError.Dump(); szError.Kill(); }
void CTransientIndexedFile::Dump(void) { int iNumElements; int i; SIndexedMemory* psIndexedMemory; void* pvDest; CChars sz; sz.Init(); iNumElements = NumDatas(); sz.Append("Transaction Data ("); sz.Append(iNumElements); sz.Append(") (Huge)\n-----------------\n"); for (i = 0; i < iNumElements; i++) { psIndexedMemory = GetIndexedData(i); pvDest = GetData(psIndexedMemory); sz.Append("Index["); sz.Append((int)psIndexedMemory->oi); sz.Append("] Size["); sz.Append((int)psIndexedMemory->uiSize); sz.Append("] "); if (psIndexedMemory->uiSize > 0) { sz.Append("\""); sz.AppendData((char*)pvDest, 80); sz.Append("\" "); } if (psIndexedMemory->IsRemoved()) { sz.Append("(Removed)"); } sz.Append("\n"); } sz.AppendNewLine(); sz.Dump(); sz.Kill(); }
void CObjects::DumpGraph(void) { CChars sz; Ptr<CRoot> pRoot; sz.Init("-------------------------- Graph --------------------------- \n"); pRoot = Get(ROOT_NAME); if (pRoot.IsNotNull()) { RecurseDumpGraph(&sz, pRoot.Object(), 0, FALSE); } sz.Append("------------------------------------------------------------ \n"); sz.Dump(); sz.Kill(); SIndexesIterator sIter; CBaseObject* pcBaseObject; CBaseObject* pcEmbeddedObject; CObject* pcObject; int i; pcBaseObject = mcMemory.StartIteration(&sIter); while (pcBaseObject) { SetFlag(&pcBaseObject->miFlags, OBJECT_FLAGS_DUMPED, FALSE); if (pcBaseObject->IsObject()) { pcObject = (CObject*)pcBaseObject; for (i = 0; i < pcObject->mapEmbedded.NumElements(); i++) { pcEmbeddedObject = *pcObject->mapEmbedded.Get(i); SetFlag(&pcEmbeddedObject->miFlags, OBJECT_FLAGS_DUMPED, FALSE); } } pcBaseObject = mcMemory.Iterate(&sIter); } }
void CIndexedMemory::Dump(void) { int iNumElements; int i; SIndexedMemory* psIndexedMemory; void* pvDest; CChars sz; sz.Init(); iNumElements = mcDatas.NumElements(); sz.Append("Transaction Data ("); sz.Append(iNumElements); sz.Append(") (Memory)\n-----------------\n"); for (i = 0; i < iNumElements; i++) { mcDatas.Get(i, (void**)&psIndexedMemory); pvDest = RemapSinglePointer(psIndexedMemory, sizeof(SIndexedMemory)); sz.Append("Index["); sz.Append((int)psIndexedMemory->oi); sz.Append("] Size["); sz.Append((int)psIndexedMemory->uiSize); sz.Append("] "); if (psIndexedMemory->uiSize > 0) { sz.Append("\""); sz.AppendData((char*)pvDest, 80); sz.Append("\" "); } if (psIndexedMemory->IsRemoved()) { sz.Append("(Removed)"); } sz.Append("\n"); } sz.AppendNewLine(); sz.Dump(); sz.Kill(); }
////////////////////////////////////////////////////////////////////////// // // // // ////////////////////////////////////////////////////////////////////////// void CPreprocessor::LogBlocks(CCFile* pcFile, SCTokenBlock sResult) { CChars szLine; CCBlockSet* pcBlocksSet; if (mbLogBlocks) { szLine.Init(); szLine.Append(mpcCurrentFile->ShortName()); if (mcConditionalStack.IsParsing()) { szLine.Append(" (Parsing): "); } else { szLine.Append(" : "); } sResult.Append(&szLine); pcBlocksSet = pcFile->macBlockSets.SafeGet(sResult.iBlockIndex); if (!pcBlocksSet) { szLine.AppendNewLine(); } else { szLine.Append(" ("); szLine.Append(pcBlocksSet->miLine); szLine.Append(")\n"); } if (mbDumpLogs) { szLine.Dump(); } mpszBlocksLog->Append(szLine); szLine.Kill(); } }
void CNamedIndexesBlock::Dump(void) { CArrayBlock avFakeBlock; CChars szText; if (IsCached()) { avFakeBlock.Fake(miBlockWidth, mpvCachePos, (int)miUsedBlocks, (int)miBlockChunkSize); Dump(&avFakeBlock); } else { szText.Init("--- Block(Not Cached) ---\n"); szText.Append("("); szText.Append(mszFirst.Text()); szText.Append(") -> ("); szText.Append(mszLast.Text()); szText.Append(")\n\n"); szText.Dump(); szText.Kill(); } }
void CDistCalculatorParameters::Dump(void) { CChars sz; sz.Init("--------- DistCalculatorParameters ---------"); sz.AppendNewLine(); sz.Append(" Touched ["); sz.Append(mapcTouched.NumElements()); sz.Append("]: "); PrintArray(&sz, &mapcTouched); sz.AppendNewLine(); sz.Append("ExpectedDists ["); sz.Append(macExpectedDists.NumElements()); sz.Append("]: "); PrintArray(&sz, &macExpectedDists); sz.AppendNewLine(); sz.Append(" Detached ["); sz.Append(mapcDetachedFromRoot.NumElements()); sz.Append("]: "); PrintArray(&sz, &mapcDetachedFromRoot); sz.AppendNewLine(); sz.AppendNewLine(); sz.Append(" C. Detached ["); sz.Append(mapcCompletelyDetached.NumElements()); sz.Append("]: "); PrintArray(&sz, &mapcCompletelyDetached); sz.AppendNewLine(); sz.Append("--------------------------------------------"); sz.AppendNewLine(); sz.Dump(); sz.Kill(); }
void* CMemory::Add(unsigned int uiSize, int iAlignment, int iOffset) { CFreeList* pcFreeList; void* pv; if ((mbBreakOnAlloc) && (muiAllocCount == muiBreakAlloc)) { CChars sz; sz.Init("CMemory::Add: muiAllocCount == "); sz.Append(muiBreakAlloc); sz.AppendNewLine(); sz.Dump(); sz.Kill(); Break(); } if (uiSize == 0) { muiAllocCount++; return NULL; } if (uiSize <= (muiFreeListSizeLimit - sizeof(SMemoryAllocation))) { pcFreeList = GetOrAddFreeList(uiSize, iAlignment, iOffset); pv = AllocateInFreeList(pcFreeList, uiSize); muiAllocCount++; return pv; } else { pv = AllocateInLargeList(uiSize, iAlignment, iOffset); muiAllocCount++; return pv; } }
////////////////////////////////////////////////////////////////////////// // // // // ////////////////////////////////////////////////////////////////////////// void CCBlockSet::DumpRawTokens(void) { CChars sz; int iLast; iLast = 0; sz.Init(); if (mbTextBlocks) { sz.Append("/* ------- text "); sz.Append(miLine); sz.Append(" ------- */\n"); } else { sz.Append("/* ---- #directive "); sz.Append(miLine); sz.Append(" ---- */\n"); } mcRawTokens.Append(&sz); sz.Dump(); sz.Kill(); }
void CBaseObject::DumpPointerTos(void) { CChars sz; int i; int iNumEmbedded; CEmbeddedObject* pcEmbedded; int j; int iNumTos; CEmbeddedObject** ppcToObject; int iLength; CChars szLine; CArrayTemplateEmbeddedObjectPtr acTos; CBaseObject* pcToObject; int iTotalTos; sz.Init(); sz.Append("-- "); PrintObject(&sz); sz.Append(" --\n"); iLength = sz.Length()-1; szLine.Init('-', iLength); szLine.AppendNewLine(); iTotalTos = 0; iNumEmbedded = GetNumEmbedded(); for (i = 0; i < iNumEmbedded; i++) { pcEmbedded = GetEmbeddedObject(i); iTotalTos += pcEmbedded->NumPointerTos(); } sz.Insert(0, &szLine); sz.Append("Total Tos ["); sz.Append(iTotalTos); sz.Append("]\n"); for (i = 0; i < iNumEmbedded; i++) { pcEmbedded = GetEmbeddedObject(i); acTos.Init(1); pcEmbedded->BaseGetPointerTos(&acTos); iNumTos = acTos.NumElements(); sz.Append("Embedded "); sz.Append(i); sz.Append(" Tos ["); sz.Append(iNumTos); sz.Append("]\n"); for (j = 0; j < iNumTos; j++) { ppcToObject = acTos.Get(j); //A pointed to never comes back NULL. sz.Append(" "); if ((*ppcToObject)->IsBaseObject()) { pcToObject = (CBaseObject*)*ppcToObject; pcToObject->PrintObject(&sz); } else { sz.Append("HollwEmbeddedObject"); } sz.AppendNewLine(); } acTos.Kill(); } sz.Append(&szLine); szLine.Kill(); sz.Dump(); sz.Kill(); }