}
CONTRACTL_END;
- LOG((LF_CORDB, LL_INFO100000, "DPT::CPFM mod:0x%p (%S)\n",
+ LOG((LF_CORDB, LL_INFO100000, "DPT::CPFM mod:0x%p (%s)\n",
pModule, pModule->GetDebugName()));
// First find all patches of interest
"See http://team/sites/clrdev/Devdocs/StubManagers.rtf for more information on StubManagers.\n"
"Stepper this=0x%p, startMethod='%s::%s'\n"
"---------------------------------\n"
- "Stub manager log:\n%S"
+ "Stub manager log:\n%s"
"\n"
"The thread is now in managed method '%s::%s'.\n"
"---------------------------------\n",
this,
((m_StepInStartMethod == NULL) ? "unknown" : m_StepInStartMethod->m_pszDebugClassName),
((m_StepInStartMethod == NULL) ? "unknown" : m_StepInStartMethod->m_pszDebugMethodName),
- sLog.GetUnicode(),
+ sLog.GetUTF8(),
pDesc->m_pszDebugClassName, pDesc->m_pszDebugMethodName
));
}
_ASSERTE( jitInfo != NULL );
// Add and activate the specified patch
AddBindAndActivateNativeManagedPatch(jitInfo->m_nativeCodeVersion.GetMethodDesc(), jitInfo, offset, LEAF_MOST_FRAME, pAppDomain);
- LOG((LF_ENC,LL_INFO1000, "DEnCBPDEnCBP::adding %S patch!\n",
- fTriggerType == REMAP_PENDING ? W("remap pending") : W("remap complete")));
+ LOG((LF_ENC,LL_INFO1000, "DEnCBPDEnCBP::adding %s patch!\n",
+ fTriggerType == REMAP_PENDING ? "remap pending" : "remap complete"));
}
_ASSERTE(map == MAPPING_EXACT);
LOG((LF_ENC, LL_ALWAYS,
- "DEnCBP::TP: triggered E&C %S breakpoint: tid=0x%x, module=0x%08x, "
+ "DEnCBP::TP: triggered E&C %s breakpoint: tid=0x%x, module=0x%08x, "
"method def=0x%08x, version=%d, native offset=0x%x, IL offset=0x%x\n this=0x%x\n",
- m_fTriggerType == REMAP_PENDING ? W("ResumePending") : W("ResumeComplete"),
+ m_fTriggerType == REMAP_PENDING ? "ResumePending" : "ResumeComplete",
thread, module, md, m_jitInfo->m_encVersion, offset, currentIP, this));
// If this is a REMAP_COMPLETE patch, then dispatch the RemapComplete callback
if (CORDBUnrecoverableError(this))
return;
- LOG((LF_CORDB, LL_INFO100, "D::LA: Load Assembly Asy:0x%p AD:0x%p which:%ls\n",
+ LOG((LF_CORDB, LL_INFO100, "D::LA: Load Assembly Asy:0x%p AD:0x%p which:%s\n",
pDomainAssembly, pDomainAssembly->GetAppDomain(), pDomainAssembly->GetAssembly()->GetDebugName() ));
if (!CORDebuggerAttached())
if (CORDBUnrecoverableError(this))
return;
- LOG((LF_CORDB, LL_INFO100, "D::UA: Unload Assembly Asy:0x%p AD:0x%p which:%ls\n",
+ LOG((LF_CORDB, LL_INFO100, "D::UA: Unload Assembly Asy:0x%p AD:0x%p which:%s\n",
pDomainAssembly, pDomainAssembly->GetAppDomain(), pDomainAssembly->GetAssembly()->GetDebugName() ));
Thread *thread = g_pEEInterface->GetThread();
- LOG((LF_CORDB, LL_INFO100, "D::UM: unload module Mod:%#08x AD:%#08x runtimeMod:%#08x modName:%ls\n",
+ LOG((LF_CORDB, LL_INFO100, "D::UM: unload module Mod:%#08x AD:%#08x runtimeMod:%#08x modName:%s\n",
LookupOrCreateModule(pRuntimeModule, pAppDomain), pAppDomain, pRuntimeModule, pRuntimeModule->GetDebugName()));
DebuggerModule* module = LookupOrCreateModule(pRuntimeModule, pAppDomain);
if (module == NULL)
{
- LOG((LF_CORDB, LL_INFO100, "D::UM: module already unloaded AD:%#08x runtimeMod:%#08x modName:%ls\n",
+ LOG((LF_CORDB, LL_INFO100, "D::UM: module already unloaded AD:%#08x runtimeMod:%#08x modName:%s\n",
pAppDomain, pRuntimeModule, pRuntimeModule->GetDebugName()));
goto LExit;
}
}
CONTRACTL_END;
- LOG((LF_CORDB, LL_INFO100, "D::DM: destruct module runtimeMod:%#08x modName:%ls\n",
+ LOG((LF_CORDB, LL_INFO100, "D::DM: destruct module runtimeMod:%#08x modName:%s\n",
pModule, pModule->GetDebugName()));
// @@@
// handle this in SendSystemClassLoadUnloadEvent below by looping through all AppDomains and dispatching
// events for each that contain this assembly.
- LOG((LF_CORDB, LL_INFO10000, "D::LC: load class Tok:%#08x Mod:%#08x AD:%#08x classMod:%#08x modName:%ls\n",
+ LOG((LF_CORDB, LL_INFO10000, "D::LC: load class Tok:%#08x Mod:%#08x AD:%#08x classMod:%#08x modName:%s\n",
classMetadataToken, (pAppDomain == NULL) ? NULL : LookupOrCreateModule(classModule, pAppDomain),
pAppDomain, classModule, classModule->GetDebugName()));
return;
}
- LOG((LF_CORDB, LL_INFO10000, "D::UC: unload class Tok:0x%08x Mod:%#08x AD:%#08x runtimeMod:%#08x modName:%ls\n",
+ LOG((LF_CORDB, LL_INFO10000, "D::UC: unload class Tok:0x%08x Mod:%#08x AD:%#08x runtimeMod:%#08x modName:%s\n",
classMetadataToken, LookupOrCreateModule(classModule, pAppDomain), pAppDomain, classModule, classModule->GetDebugName()));
Assembly *pAssembly = classModule->GetClassLoader()->GetAssembly();
szName = pADInfo->m_pAppDomain->GetFriendlyNameForDebugger();
pADInfo->SetName(szName);
- LOG((LF_CORDB, LL_INFO100,
- "D::UADEIIPC: New name:%ls (AD:0x%x)\n", pADInfo->m_szAppDomainName,
- pAppDomain));
-
ErrExit:
// UnLock the list
m_pAppDomainCB->Unlock();
_ASSERTE(g_pDebugger->HasDebuggerDataLock());
- LOG((LF_CORDB, LL_INFO1000000, "CMOM:mod:0x%x (%S)\n", pModule
+ LOG((LF_CORDB, LL_INFO1000000, "CMOM:mod:0x%x (%s)\n", pModule
,pModule->GetDebugName()));
HASHFIND info;
StringTableEntry *findStringInsert(
StringTableEntry *&entry, _In_z_ LPWSTR targetValue, ULONG hashId);
void deleteEntries(StringTableEntry *e);
-#ifdef RDATA_STATS
- int dumpEntries(StringTableEntry *e);
- void dumpTable();
-#endif
public:
~CeeSectionString();
RETAIL_CONFIG_STRING_INFO(EXTERNAL_PerfMapJitDumpPath, W("PerfMapJitDumpPath"), "Specifies a path to write the perf jitdump file. Defaults to GetTempPathA()")
RETAIL_CONFIG_DWORD_INFO(EXTERNAL_PerfMapIgnoreSignal, W("PerfMapIgnoreSignal"), 0, "When perf map is enabled, this option will configure the specified signal to be accepted and ignored as a marker in the perf logs. It is disabled by default")
RETAIL_CONFIG_DWORD_INFO(EXTERNAL_PerfMapShowOptimizationTiers, W("PerfMapShowOptimizationTiers"), 1, "Shows optimization tiers in the perf map for methods, as part of the symbol name. Useful for seeing separate stack frames for different optimization tiers of each method.")
-RETAIL_CONFIG_STRING_INFO(EXTERNAL_NativeImagePerfMapFormat, W("NativeImagePerfMapFormat"), "Specifies the format of native image perfmap files generated by crossgen. Valid options are RVA or OFFSET.")
#endif
RETAIL_CONFIG_STRING_INFO(EXTERNAL_StartupDelayMS, W("StartupDelayMS"), "")
{
// check for fake "" first
cnsLength = 0;
- JITDUMP("Trying to unroll MemoryExtensions.Equals|SequenceEqual|StartsWith(op1, \"\")...\n", str)
+ JITDUMP("Trying to unroll MemoryExtensions.Equals|SequenceEqual|StartsWith(op1, \"\")...\n")
}
else
{
delete e;
}
-#ifdef RDATA_STATS
-int CeeSectionString::dumpEntries(StringTableEntry *e)
-{
- if (!e)
- return 0;
- else {
- printf(" HashId: %d, value: %S\n", e->m_hashId, computOffset(e->m_offset));
- return dumpEntries(e->m_next) + 1;
- }
-}
-
-void CeeSectionString::dumpTable()
-{
- int sum = 0, count = 0;
- for (int i=0; i < MaxRealEntries; i++) {
- if (stringTable[i]) {
- printf("Bucket %d\n", i);
- printf("Total size: %d\n\n",
- count = dumpEntries(stringTable[i]));
- sum += count;
- }
- }
- printf("Total number strings: %d\n\n", sum);
-}
-#endif
-
CeeSectionString::~CeeSectionString()
{
-#ifdef RDATA_STATS
- dumpTable();
-#endif
for (int i=0; i < MaxRealEntries; i++)
deleteEntries(stringTable[i]);
}
AssemblyRec *pRecord;
CMiniMdRW *pMiniMd = &(m_pStgdb->m_MiniMd);
- LOG((LOGMD, "RegMeta::GetAssemblyProps(0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
- mda, ppbPublicKey, pcbPublicKey, pulHashAlgId, szName, cchName, pchName, pMetaData,
- pdwAssemblyFlags));
-
LOCKREAD();
_ASSERTE(TypeFromToken(mda) == mdtAssembly && RidFromToken(mda));
AssemblyRefRec *pRecord;
CMiniMdRW *pMiniMd = &(m_pStgdb->m_MiniMd);
- LOG((LOGMD, "RegMeta::GetAssemblyRefProps(0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
- mdar, ppbPublicKeyOrToken, pcbPublicKeyOrToken, szName, cchName,
- pchName, pMetaData, ppbHashValue, pdwAssemblyRefFlags));
-
LOCKREAD();
_ASSERTE(TypeFromToken(mdar) == mdtAssemblyRef && RidFromToken(mdar));
FileRec *pRecord;
CMiniMdRW *pMiniMd = &(m_pStgdb->m_MiniMd);
- LOG((LOGMD, "RegMeta::GetFileProps(%#08x, %#08x, %#08x, %#08x, %#08x, %#08x, %#08x)\n",
- mdf, szName, cchName, pchName, ppbHashValue, pcbHashValue, pdwFileFlags));
-
LOCKREAD();
_ASSERTE(TypeFromToken(mdf) == mdtFile && RidFromToken(mdf));
CMiniMdRW *pMiniMd = &(m_pStgdb->m_MiniMd);
int bTruncation=0; // Was there name truncation?
- LOG((LOGMD, "RegMeta::GetExportedTypeProps(%#08x, %#08x, %#08x, %#08x, %#08x, %#08x, %#08x)\n",
- mdct, szName, cchName, pchName,
- ptkImplementation, ptkTypeDef, pdwExportedTypeFlags));
-
LOCKREAD();
_ASSERTE(TypeFromToken(mdct) == mdtExportedType && RidFromToken(mdct));
ManifestResourceRec *pRecord;
CMiniMdRW *pMiniMd = &(m_pStgdb->m_MiniMd);
- LOG((LOGMD, "RegMeta::GetManifestResourceProps("
- "%#08x, %#08x, %#08x, %#08x, %#08x, %#08x, %#08x)\n",
- mdmr, szName, cchName, pchName,
- ptkImplementation, pdwOffset,
- pdwResourceFlags));
-
LOCKREAD();
_ASSERTE(TypeFromToken(mdmr) == mdtManifestResource && RidFromToken(mdmr));
HENUMInternal **ppmdEnum = reinterpret_cast<HENUMInternal **> (phEnum);
HENUMInternal *pEnum;
- LOG((LOGMD, "MD RegMeta::EnumAssemblyRefs(%#08x, %#08x, %#08x, %#08x)\n",
- phEnum, rAssemblyRefs, cMax, pcTokens));
-
LOCKREAD();
if (*ppmdEnum == 0)
HENUMInternal **ppmdEnum = reinterpret_cast<HENUMInternal **> (phEnum);
HENUMInternal *pEnum;
- LOG((LOGMD, "MD RegMeta::EnumFiles(%#08x, %#08x, %#08x, %#08x)\n",
- phEnum, rFiles, cMax, pcTokens));
LOCKREAD();
if (*ppmdEnum == 0)
HENUMInternal **ppmdEnum = reinterpret_cast<HENUMInternal **> (phEnum);
HENUMInternal *pEnum = NULL;
- LOG((LOGMD, "MD RegMeta::EnumExportedTypes(%#08x, %#08x, %#08x, %#08x)\n",
- phEnum, rExportedTypes, cMax, pcTokens));
-
LOCKREAD();
if (*ppmdEnum == 0)
HENUMInternal **ppmdEnum = reinterpret_cast<HENUMInternal **> (phEnum);
HENUMInternal *pEnum;
- LOG((LOGMD, "MD RegMeta::EnumManifestResources(%#08x, %#08x, %#08x, %#08x)\n",
- phEnum, rManifestResources, cMax, pcTokens));
-
LOCKREAD();
if (*ppmdEnum == 0)
HRESULT hr = NOERROR;
CMiniMdRW *pMiniMd = NULL;
- LOG((LOGMD, "MD RegMeta::GetAssemblyFromScope(%#08x)\n", ptkAssembly));
LOCKREAD();
_ASSERTE(ptkAssembly);
CMiniMdRW *pMiniMd = NULL;
LPSTR szNameUTF8 = NULL;
- LOG((LOGMD, "MD RegMeta::FindExportedTypeByName(%S, %#08x, %#08x)\n",
- MDSTR(szName), tkEnclosingType, ptkExportedType));
-
LOCKREAD();
-
// Validate name for prefix.
if (!szName)
IfFailGo(E_INVALIDARG);
LPCUTF8 szNameTmp = NULL;
CMiniMdRW *pMiniMd = NULL;
- LOG((LOGMD, "MD RegMeta::FindManifestResourceByName(%S, %#08x)\n",
- MDSTR(szName), ptkManifestResource));
-
LOCKREAD();
-
// Validate name for prefix.
if (!szName)
IfFailGo(E_INVALIDARG);
ULONG *pcAssemblies) // [OUT] The number of assemblies returned.
{
#ifdef FEATURE_METADATA_IN_VM
- LOG((LOGMD, "RegMeta::FindAssembliesByName(0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
- szAppBase, szPrivateBin, szAssemblyName, ppIUnk, cMax, pcAssemblies));
-
- // No need to lock this function. It is going through fusion to find the matching Assemblies by name
-
return COR_E_NOTSUPPORTED;
#else //!FEATURE_METADATA_IN_VM
// Calls to fusion are not supported outside VM
if (szName == NULL || pMetaData == NULL || pma == NULL)
return E_INVALIDARG;
- LOG((LOGMD, "RegMeta::DefineAssembly(0x%08x, 0x%08x, 0x%08x, %S, 0x%08x, 0x%08x, 0x%08x)\n",
- pbPublicKey, cbPublicKey, ulHashAlgId, MDSTR(szName), pMetaData,
- dwAssemblyFlags, pma));
-
LOCKWRITE();
_ASSERTE(szName && pMetaData && pma);
if (szName == NULL || pmar == NULL || pMetaData == NULL)
return E_INVALIDARG;
- LOG((LOGMD, "RegMeta::DefineAssemblyRef(0x%08x, 0x%08x, %S, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
- pbPublicKeyOrToken, cbPublicKeyOrToken, MDSTR(szName), pMetaData, pbHashValue,
- cbHashValue, dwAssemblyRefFlags, pmar));
-
LOCKWRITE();
IfFailGo(m_pStgdb->m_MiniMd.PreUpdate());
FileRec *pRecord = NULL;
RID iRecord;
- LOG((LOGMD, "RegMeta::DefineFile(%S, %#08x, %#08x, %#08x, %#08x)\n",
- MDSTR(szName), pbHashValue, cbHashValue, dwFileFlags, pmf));
-
LOCKWRITE();
IfFailGo(m_pStgdb->m_MiniMd.PreUpdate());
LPCSTR szTypeNameUTF8;
LPCSTR szTypeNamespaceUTF8;
- LOG((LOGMD, "RegMeta::DefineExportedType(%S, %#08x, %08x, %#08x, %#08x)\n",
- MDSTR(szName), tkImplementation, tkTypeDef,
- dwExportedTypeFlags, pmct));
-
LOCKWRITE();
// Validate name for prefix.
ManifestResourceRec *pRecord = NULL;
RID iRecord;
- LOG((LOGMD, "RegMeta::DefineManifestResource(%S, %#08x, %#08x, %#08x, %#08x)\n",
- MDSTR(szName), tkImplementation, dwOffset, dwResourceFlags, pmmr));
-
LOCKWRITE();
IfFailGo(m_pStgdb->m_MiniMd.PreUpdate());
_ASSERTE(TypeFromToken(ma) == mdtAssembly && RidFromToken(ma));
- LOG((LOGMD, "RegMeta::SetAssemblyProps(%#08x, %#08x, %#08x, %#08x %S, %#08x, %#08x)\n",
- ma, pbPublicKey, cbPublicKey, ulHashAlgId, MDSTR(szName), pMetaData, dwAssemblyFlags));
-
LOCKWRITE();
IfFailGo(m_pStgdb->m_MiniMd.PreUpdate());
_ASSERTE(TypeFromToken(ar) == mdtAssemblyRef && RidFromToken(ar));
- LOG((LOGMD, "RegMeta::SetAssemblyRefProps(0x%08x, 0x%08x, 0x%08x, %S, 0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
- ar, pbPublicKeyOrToken, cbPublicKeyOrToken, MDSTR(szName), pMetaData, pbHashValue, cbHashValue,
- dwAssemblyRefFlags));
-
LOCKWRITE();
IfFailGo(m_pStgdb->m_MiniMd.PreUpdate());
_ASSERTE(TypeFromToken(file) == mdtFile && RidFromToken(file));
- LOG((LOGMD, "RegMeta::SetFileProps(%#08x, %#08x, %#08x, %#08x)\n",
- file, pbHashValue, cbHashValue, dwFileFlags));
LOCKWRITE();
IfFailGo(m_pStgdb->m_MiniMd.PreUpdate());
{
HRESULT hr = S_OK;
- LOG((LOGMD, "RegMeta::SetExportedTypeProps(%#08x, %#08x, %#08x, %#08x)\n",
- ct, tkImplementation, tkTypeDef, dwExportedTypeFlags));
-
LOCKWRITE();
IfFailGo( _SetExportedTypeProps( ct, tkImplementation, tkTypeDef, dwExportedTypeFlags) );
{
HRESULT hr = S_OK;
- LOG((LOGMD, "RegMeta::SetManifestResourceProps(%#08x, %#08x, %#08x, %#08x)\n",
- mr, tkImplementation, dwOffset,
- dwResourceFlags));
-
_ASSERTE(TypeFromToken(tkImplementation) == mdtFile ||
TypeFromToken(tkImplementation) == mdtAssemblyRef ||
tkImplementation == mdTokenNil);
CMiniMdRW *pMiniMd = &m_pStgdb->m_MiniMd;
int ixKnown; // Index of known custom attribute.
- LOG((LOGMD, "RegMeta::DefineCustomAttribute(0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x)\n", tkOwner, tkCtor,
- pCustomAttribute, cbCustomAttribute, pcv));
LOCKWRITE();
_ASSERTE(TypeFromToken(tkCtor) == mdtMethodDef || TypeFromToken(tkCtor) == mdtMemberRef);
CustomAttributeRec *pRec;
ULONG index;
- LOG((LOGMD, "RegMeta::EnumCustomAttributes(0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
- phEnum, tk, tkType, rCustomAttributes, cMax, pcCustomAttributes));
LOCKREAD();
if ( *ppmdEnum == 0 )
IUnknown **ppIUnk) // [out] Return interface on success.
{
HRESULT hr;
- LOG((LF_METADATA, LL_INFO10, "Disp::OpenScope(%S, 0x%08x, 0x%08x, 0x%08x)\n", MDSTR(szFileName), dwOpenFlags, riid, ppIUnk));
IMDCommon *pMDCommon = NULL;
else
{
pMeta->Release(); // Give back refcount from QI
- LOG((LOGMD, "{%08x} Found in cache '%S'\n", pMeta, MDSTR(szFileName)));
}
goto ErrExit;
// the "other" copy will be released.
IfFailGo(pMeta->AddToCache());
- LOG((LOGMD, "{%08x} Successfully opened '%S'\n", pMeta, MDSTR(szFileName)));
-
#if defined(_DEBUG)
if (CLRConfig::GetConfigValue(CLRConfig::INTERNAL_MD_RegMetaDump))
{
LPUTF8 szNameUtf8;
UTF8STR(szName, szNameUtf8);
- LOG((LOGMD, "MD: RegMeta::DefineMethod(0x%08x, %S, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
- td, MDSTR(szName), dwMethodFlags, pvSigBlob, cbSigBlob, ulCodeRVA, dwImplFlags, pmd));
-
LOCKWRITE();
IfFailGo(m_pStgdb->m_MiniMd.PreUpdate());
MethodImplRec *pMethodImplRec = NULL;
RID iMethodImplRec;
- LOG((LOGMD, "MD RegMeta::DefineMethodImpl(0x%08x, 0x%08x, 0x%08x)\n",
- td, tkBody, tkDecl));
LOCKWRITE();
IfFailGo(m_pStgdb->m_MiniMd.PreUpdate());
MethodRec *pMethodRec;
- LOG((LOGMD, "MD RegMeta::SetMethodImplFlags(0x%08x, 0x%08x)\n",
- md, dwImplFlags));
LOCKWRITE();
_ASSERTE(TypeFromToken(md) == mdtMethodDef && dwImplFlags != UINT32_MAX);
RID iFieldRVA;
FieldRec *pFieldRec;
- LOG((LOGMD, "MD RegMeta::SetFieldRVA(0x%08x, 0x%08x)\n",
- fd, ulRVA));
LOCKWRITE();
_ASSERTE(TypeFromToken(fd) == mdtFieldDef);
#else //!FEATURE_METADATA_EMIT_IN_DEBUGGER
HRESULT hr = S_OK;
- LOG((LOGMD, "MD RegMeta::DefineTypeRefByName(0x%08x, %S, 0x%08x)\n",
- tkResolutionScope, MDSTR(szName), ptr));
LOCKWRITE();
IfFailGo(m_pStgdb->m_MiniMd.PreUpdate());
IMetaModelCommon *pAssemImportMetaModelCommon;
IMetaModelCommon *pImport2MetaModelCommon;
- LOG((LOGMD, "MD RegMeta::DefineImportType(0x%08x, 0x%08x, 0x%08x, 0x%08x, "
- "0x%08x, 0x%08x, 0x%08x)\n",
- pAssemImport, pbHashValue, cbHashValue,
- pImport, tdImport, pAssemEmit, ptr));
-
LOCKWRITE();
IfFailGo(m_pStgdb->m_MiniMd.PreUpdate());
LPUTF8 szNameUtf8;
UTF8STR(szName, szNameUtf8);
- LOG((LOGMD, "MD RegMeta::DefineMemberRef(0x%08x, %S, 0x%08x, 0x%08x, 0x%08x)\n",
- tkImport, MDSTR(szName), pvSigBlob, cbSigBlob, pmr));
LOCKWRITE();
IfFailGo(m_pStgdb->m_MiniMd.PreUpdate());
#else //!FEATURE_METADATA_EMIT_IN_DEBUGGER
HRESULT hr = S_OK;
- LOG((LOGMD, "MD RegMeta::DefineImportMember("
- "0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x,"
- " 0x%08x, 0x%08x, 0x%08x)\n",
- pAssemImport, pbHashValue, cbHashValue, pImport, mbMember,
- pAssemEmit, tkImport, pmr));
-
// No need to lock this function. All the functions that it calls are public APIs.
_ASSERTE(pImport && pmr);
#else //!FEATURE_METADATA_EMIT_IN_DEBUGGER
HRESULT hr = S_OK;
- LOG((LOGMD, "MD RegMeta::DefineEvent(0x%08x, %S, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
- td, szEvent, dwEventFlags, tkEventType, mdAddOn, mdRemoveOn, mdFire, rmdOtherMethods, pmdEvent));
LOCKWRITE();
IfFailGo(m_pStgdb->m_MiniMd.PreUpdate());
int index = 0; // Loop control.
- LOG((LOGMD, "MD RegMeta::SetClassLayout(0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
- td, dwPackSize, rFieldOffsets, ulClassSize));
LOCKWRITE();
IfFailGo(m_pStgdb->m_MiniMd.PreUpdate());
RID ridCur;
ULONG index;
- LOG((LOGMD, "MD RegMeta::DeleteClassLayout(0x%08x)\n", td));
LOCKWRITE();
IfFailGo(m_pStgdb->m_MiniMd.PreUpdate());
#else //!FEATURE_METADATA_EMIT_IN_DEBUGGER
HRESULT hr = S_OK;
- LOG((LOGMD, "MD RegMeta::SetFieldMarshal(0x%08x, 0x%08x, 0x%08x)\n",
- tk, pvNativeType, cbNativeType));
LOCKWRITE();
IfFailGo(m_pStgdb->m_MiniMd.PreUpdate());
FieldMarshalRec *pFieldMarshRec;
RID iFieldMarshRec;
- LOG((LOGMD, "MD RegMeta::DeleteFieldMarshal(0x%08x)\n", tk));
LOCKWRITE();
IfFailGo(m_pStgdb->m_MiniMd.PreUpdate());
#ifdef FEATURE_METADATA_EMIT_ALL
HRESULT hr = S_OK;
- LOG((LOGMD, "MD RegMeta::DefinePermissionSet(0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
- tk, dwAction, pvPermission, cbPermission, ppm));
LOCKWRITE();
IfFailGo(m_pStgdb->m_MiniMd.PreUpdate());
#else //!FEATURE_METADATA_EMIT_IN_DEBUGGER
HRESULT hr = S_OK;
- LOG((LOGMD, "MD RegMeta::SetRVA(0x%08x, 0x%08x)\n",
- md, ulRVA));
-
LOCKWRITE();
IfFailGo(m_pStgdb->m_MiniMd.PreUpdate());
#else //!FEATURE_METADATA_EMIT_IN_DEBUGGER
HRESULT hr = S_OK;
- LOG((LOGMD, "MD RegMeta::GetTokenFromSig(0x%08x, 0x%08x, 0x%08x)\n",
- pvSig, cbSig, pmsig));
-
LOCKWRITE();
_ASSERTE(pmsig);
#else //!FEATURE_METADATA_EMIT_IN_DEBUGGER
HRESULT hr = S_OK;
- LOG((LOGMD, "MD RegMeta::DefineModuleRef(%S, 0x%08x)\n", MDSTR(szName), pmur));
LOCKWRITE();
IfFailGo(m_pStgdb->m_MiniMd.PreUpdate());
MemberRefRec *pMemberRef;
- LOG((LOGMD, "MD RegMeta::SetParent(0x%08x, 0x%08x)\n",
- mr, tk));
LOCKWRITE();
_ASSERTE(TypeFromToken(mr) == mdtMemberRef);
TypeSpecRec *pTypeSpecRec;
RID iRec;
- LOG((LOGMD, "MD RegMeta::GetTokenFromTypeSpec(0x%08x, 0x%08x, 0x%08x)\n",
- pvSig, cbSig, ptypespec));
LOCKWRITE();
_ASSERTE(ptypespec);
ULONG ulMemSize; // Size of memory taken by the string passed in.
PBYTE pb; // Pointer into memory allocated by qb.
-
-
- LOG((LOGMD, "MD RegMeta::DefineUserString(0x%08x, 0x%08x, 0x%08x)\n",
- szString, cchString, pstk));
LOCKWRITE();
IfFailGo(m_pStgdb->m_MiniMd.PreUpdate());
#ifdef FEATURE_METADATA_EMIT_ALL
HRESULT hr = NOERROR;
- LOG((LOGMD, "MD RegMeta::DeleteToken(0x%08x)\n", tkObj));
LOCKWRITE();
if (!IsValidToken(tkObj))
#else //!FEATURE_METADATA_EMIT_IN_DEBUGGER
HRESULT hr = S_OK;
- LOG((LOGMD, "RegMeta::SetTypeDefProps(0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
- td, dwTypeDefFlags, tkExtends, rtkImplements));
LOCKWRITE();
IfFailGo(m_pStgdb->m_MiniMd.PreUpdate());
#else //!FEATURE_METADATA_EMIT_IN_DEBUGGER
HRESULT hr = S_OK;
- LOG((LOGMD, "RegMeta::DefineNestedType(%S, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
- MDSTR(szTypeDef), dwTypeDefFlags, tkExtends,
- rtkImplements, tdEncloser, ptd));
LOCKWRITE();
IfFailGo(m_pStgdb->m_MiniMd.PreUpdate());
mdToken tkRet = mdGenericParamNil;
mdToken tkOwnerType = TypeFromToken(tkOwner);
- LOG((LOGMD, "RegMeta::DefineGenericParam(0x%08x, %d, 0x%08x, %S, 0x%08x, 0x%08x, 0x%08x)\n",
- tkOwner, ulParamSeq, dwParamFlags, szName, reserved, rtkConstraints, pgp));
LOCKWRITE();
IfFailGo(m_pStgdb->m_MiniMd.PreUpdate());
#else //!FEATURE_METADATA_EMIT_IN_DEBUGGER
HRESULT hr = S_OK;
- LOG((LOGMD, "RegMeta::SetGenericParamProps(0x%08x, 0x%08x, %S, 0x%08x, 0x%08x, 0x%08x)\n",
- gp, dwParamFlags,szName,reserved,rtkConstraints));
-
if (reserved != 0)
IfFailGo(META_E_BAD_INPUT_PARAMETER);
#else //!FEATURE_METADATA_EMIT_IN_DEBUGGER
HRESULT hr = S_OK;
- LOG((LOGMD, "RegMeta::GetReferencedTypeSysTables()\n"));
-
ULONG64 refTablesBitVector = 0;
ULONG count = 0;
ULONG* ptr = NULL;
#else //!FEATURE_METADATA_EMIT_IN_DEBUGGER
HRESULT hr = S_OK;
- LOG((LOGMD, "RegMeta::DefinePdbStream()\n"));
-
IfFailGo(m_pStgdb->m_pPdbHeap->SetData(pdbStream));
ErrExit:
UINT32* partsIndexesPtr = NULL;
char* stringToken = NULL;
- LOG((LOGMD, "RegMeta::DefineDocument(%s)\n", docName));
LOCKWRITE();
IfFailGo(m_pStgdb->m_MiniMd.PreUpdate());
#else //!FEATURE_METADATA_EMIT_IN_DEBUGGER
HRESULT hr = S_OK;
- LOG((LOGMD, "RegMeta::DefineSequencePoints()\n"));
-
LOCKWRITE();
IfFailGo(m_pStgdb->m_MiniMd.PreUpdate());
#else //!FEATURE_METADATA_EMIT_IN_DEBUGGER
HRESULT hr = S_OK;
- LOG((LOGMD, "RegMeta::DefineLocalScope()\n"));
-
LOCKWRITE();
IfFailGo(m_pStgdb->m_MiniMd.PreUpdate());
#else //!FEATURE_METADATA_EMIT_IN_DEBUGGER
HRESULT hr = S_OK;
- LOG((LOGMD, "RegMeta::DefineLocalVariable(%s)\n", name));
-
LOCKWRITE();
IfFailGo(m_pStgdb->m_MiniMd.PreUpdate());
MethodSpecRec *pRecord = 0; // The MethodSpec record.
RID iRecord; // RID of new MethodSpec record.
- LOG((LOGMD, "MD RegMeta::DefineMethodSpec(0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
- tkImport, pvSigBlob, cbSigBlob, pmi));
LOCKWRITE();
// See if this version of the metadata can do Generics
#else //!FEATURE_METADATA_EMIT_IN_DEBUGGER
HRESULT hr = S_OK;
- LOG((LOGMD, "RegMeta::SetMethodProps(0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
- md, dwMethodFlags, ulCodeRVA, dwImplFlags));
LOCKWRITE();
if (dwMethodFlags != UINT32_MAX)
#else //!FEATURE_METADATA_EMIT_IN_DEBUGGER
HRESULT hr = S_OK;
- LOG((LOGMD, "MD RegMeta::SetEventProps(0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
- ev, dwEventFlags, tkEventType, mdAddOn, mdRemoveOn, mdFire, rmdOtherMethods));
LOCKWRITE();
IfFailGo(m_pStgdb->m_MiniMd.PreUpdate());
USHORT sAction = static_cast<USHORT>(dwAction); // Corresponding DeclSec field is a USHORT.
mdPermission tkPerm;
- LOG((LOGMD, "MD RegMeta::SetPermissionSetProps(0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
- tk, dwAction, pvPermission, cbPermission, ppm));
LOCKWRITE();
IfFailGo(m_pStgdb->m_MiniMd.PreUpdate());
#else //!FEATURE_METADATA_EMIT_IN_DEBUGGER
HRESULT hr = S_OK;
- LOG((LOGMD, "MD RegMeta::DefinePinvokeMap(0x%08x, 0x%08x, %S, 0x%08x)\n",
- tk, dwMappingFlags, MDSTR(szImportName), mrImportDLL));
LOCKWRITE();
IfFailGo(m_pStgdb->m_MiniMd.PreUpdate());
ImplMapRec *pRecord;
RID iRecord;
- LOG((LOGMD, "MD RegMeta::SetPinvokeMap(0x%08x, 0x%08x, %S, 0x%08x)\n",
- tk, dwMappingFlags, MDSTR(szImportName), mrImportDLL));
LOCKWRITE();
IfFailGo(m_pStgdb->m_MiniMd.PreUpdate());
ImplMapRec *pRecord;
RID iRecord;
- LOG((LOGMD, "MD RegMeta::DeletePinvokeMap(0x%08x)\n", tk));
LOCKWRITE();
IfFailGo(m_pStgdb->m_MiniMd.PreUpdate());
LPUTF8 szNameUtf8;
UTF8STR(szName, szNameUtf8);
- LOG((LOGMD, "MD: RegMeta::DefineField(0x%08x, %S, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
- td, MDSTR(szName), dwFieldFlags, pvSigBlob, cbSigBlob, dwCPlusTypeFlag, pValue, cchValue, pmd));
-
LOCKWRITE();
_ASSERTE(pmd);
LPUTF8 szUTF8Property;
UTF8STR(szProperty, szUTF8Property);
- LOG((LOGMD, "MD RegMeta::DefineProperty(0x%08x, %S, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
- td, szProperty, dwPropFlags, pvSig, cbSig, dwCPlusTypeFlag, pValue, cchValue, mdSetter, mdGetter,
- rmdOtherMethods, pmdProp));
-
LOCKWRITE();
IfFailGo(m_pStgdb->m_MiniMd.PreUpdate());
RID iRecord;
ParamRec *pRecord = 0;
- LOG((LOGMD, "MD RegMeta::DefineParam(0x%08x, 0x%08x, %S, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
- md, ulParamSeq, MDSTR(szName), dwParamFlags, dwCPlusTypeFlag, pValue, cchValue, ppd));
LOCKWRITE();
_ASSERTE(TypeFromToken(md) == mdtMethodDef && md != mdMethodDefNil &&
#else //!FEATURE_METADATA_EMIT_IN_DEBUGGER
HRESULT hr = S_OK;
- LOG((LOGMD, "MD: RegMeta::SetFieldProps(0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
- fd, dwFieldFlags, dwCPlusTypeFlag, pValue, cchValue));
LOCKWRITE();
IfFailGo(m_pStgdb->m_MiniMd.PreUpdate());
#else //!FEATURE_METADATA_EMIT_IN_DEBUGGER
HRESULT hr = S_OK;
- LOG((LOGMD, "MD RegMeta::SetPropertyProps(0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
- pr, dwPropFlags, dwCPlusTypeFlag, pValue, cchValue, mdSetter, mdGetter,
- rmdOtherMethods));
LOCKWRITE();
IfFailGo(m_pStgdb->m_MiniMd.PreUpdate());
#else //!FEATURE_METADATA_EMIT_IN_DEBUGGER
HRESULT hr = S_OK;
- LOG((LOGMD, "MD RegMeta::SetParamProps(0x%08x, %S, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
- pd, MDSTR(szName), dwParamFlags, dwCPlusTypeFlag, pValue, cchValue));
LOCKWRITE();
IfFailGo(m_pStgdb->m_MiniMd.PreUpdate());
mdEvent *pmdEvent) // [OUT] output event token
{
HRESULT hr = S_OK;
- LOG((LOGMD, "MD RegMeta::DefineEventHelper(0x%08x, %S, 0x%08x, 0x%08x, 0x%08x)\n",
- td, szEvent, dwEventFlags, tkEventType, pmdEvent));
LOCKWRITE();
short sAction = static_cast<short>(dwAction);
mdPermission tkPerm = mdTokenNil;
- LOG((LOGMD, "MD RegMeta::AddDeclarativeSecurityHelper(0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
- tk, dwAction, pValue, cbValue, pmdPermission));
-
LOCKWRITE();
IfFailGo(m_pStgdb->m_MiniMd.PreUpdate());
TypeDefRec *pRec;
HENUMInternal *pEnum = NULL;
- LOG((LOGMD, "MD RegMeta::EnumMembers(0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
- phEnum, cl, rMembers, cMax, pcTokens));
-
LOCKREAD();
if ( *ppmdEnum == 0 )
UTF8STR(szName, szNameUtf8);
LPCUTF8 szNameUtf8Tmp;
- LOG((LOGMD, "MD RegMeta::EnumMembersWithName(0x%08x, 0x%08x, %S, 0x%08x, 0x%08x, 0x%08x)\n",
- phEnum, cl, MDSTR(szName), rMembers, cMax, pcTokens));
-
LOCKREAD();
if ( *ppmdEnum == 0 )
TypeDefRec *pRec;
HENUMInternal *pEnum = NULL;
- LOG((LOGMD, "MD RegMeta::EnumMethods(0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
- phEnum, td, rMethods, cMax, pcTokens));
-
LOCKREAD();
if ( *ppmdEnum == 0 )
UTF8STR(szName, szNameUtf8);
LPCUTF8 szNameUtf8Tmp;
- LOG((LOGMD, "MD RegMeta::EnumMethodsWithName(0x%08x, 0x%08x, %S, 0x%08x, 0x%08x, 0x%08x)\n",
- phEnum, cl, MDSTR(szName), rMethods, cMax, pcTokens));
-
LOCKREAD();
if ( *ppmdEnum == 0 )
TypeDefRec *pRec;
HENUMInternal *pEnum = NULL;
- LOG((LOGMD, "MD RegMeta::EnumFields(0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
- phEnum, td, rFields, cMax, pcTokens));
-
LOCKREAD();
if (*ppmdEnum == NULL)
UTF8STR(szName, szNameUtf8);
LPCUTF8 szNameUtf8Tmp;
- LOG((LOGMD, "MD RegMeta::EnumFields(0x%08x, 0x%08x, %S, 0x%08x, 0x%08x, 0x%08x)\n",
- phEnum, cl, MDSTR(szName), rFields, cMax, pcTokens));
-
-
-
LOCKREAD();
if ( *ppmdEnum == 0 )
MethodRec *pRec;
HENUMInternal *pEnum = NULL;
- LOG((LOGMD, "MD RegMeta::EnumParams(0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
- phEnum, mb, rParams, cMax, pcTokens));
LOCKREAD();
-
if ( *ppmdEnum == 0 )
{
// instantiating a new ENUM
MemberRefRec *pRec;
HENUMInternal *pEnum = NULL;
- LOG((LOGMD, "MD RegMeta::EnumMemberRefs(0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
- phEnum, tkParent, rMemberRefs, cMax, pcTokens));
-
-
-
LOCKREAD();
if ( *ppmdEnum == 0 )
HENUMInternal *pEnum = NULL;
HENUMInternal hEnum;
- LOG((LOGMD, "MD RegMeta::EnumMethodImpls(0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
- phEnum, td, rMethodBody, rMethodDecl, cMax, pcTokens));
-
LOCKREAD();
HENUMInternal::ZeroEnum(&hEnum);
mdToken typ = TypeFromToken(tk);
mdToken tkParent;
- LOG((LOGMD, "MD RegMeta::EnumPermissionSets(0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
- phEnum, tk, dwActions, rPermission, cMax, pcTokens));
-
LOCKREAD();
if ( *ppmdEnum == 0 )
{
HRESULT hr = NOERROR;
- LOG((LOGMD, "MD RegMeta::FindMember(0x%08x, %S, 0x%08x, 0x%08x, 0x%08x)\n",
- td, MDSTR(szName), pvSigBlob, cbSigBlob, pmb));
-
-
// Don't lock this function. All of the functions that it calls are public APIs. keep it that way.
// try to match with method first of all
LPUTF8 szNameUtf8;
UTF8STR(szName, szNameUtf8);
- LOG((LOGMD, "MD RegMeta::FindMethod(0x%08x, %S, 0x%08x, 0x%08x, 0x%08x)\n",
- td, MDSTR(szName), pvSigBlob, cbSigBlob, pmb));
-
LOCKREAD();
if (szName == NULL)
CMiniMdRW *pMiniMd = &(m_pStgdb->m_MiniMd);
- LOG((LOGMD, "MD RegMeta::FindField(0x%08x, %S, 0x%08x, 0x%08x, 0x%08x)\n",
- td, MDSTR(szName), pvSigBlob, cbSigBlob, pmb));
-
LOCKREAD();
if (szName == NULL)
LPUTF8 szNameUtf8;
UTF8STR(szName, szNameUtf8);
- LOG((LOGMD, "MD RegMeta::FindMemberRef(0x%08x, %S, 0x%08x, 0x%08x, 0x%08x)\n",
- tkPar, MDSTR(szName), pvSigBlob, cbSigBlob, pmr));
-
// <TODO>@todo: Can this causing building hash table? If so, should this consider the write lock?</TODO>
LOCKREAD();
MethodRec *pMethodRec;
CMiniMdRW *pMiniMd = &(m_pStgdb->m_MiniMd);
- LOG((LOGMD, "MD RegMeta::GetMethodProps(0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
- mb, pClass, szMethod, cchMethod, pchMethod, pdwAttr, ppvSigBlob, pcbSigBlob,
- pulCodeRVA, pdwImplFlags));
-
-
-
LOCKREAD();
_ASSERTE(TypeFromToken(mb) == mdtMethodDef);
CMiniMdRW *pMiniMd = &(m_pStgdb->m_MiniMd);
MemberRefRec *pMemberRefRec;
- LOG((LOGMD, "MD RegMeta::GetMemberRefProps(0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
- mr, ptk, szMember, cchMember, pchMember, ppvSigBlob, pbSig));
-
-
-
LOCKREAD();
_ASSERTE(TypeFromToken(mr) == mdtMemberRef);
RID ridMax = 0;
HENUMInternal *pEnum = NULL;
- LOG((LOGMD, "MD RegMeta::EnumProperties(0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
- phEnum, td, rProperties, cMax, pcProperties));
-
LOCKREAD();
if (IsNilToken(td))
RID ridMax = 0;
HENUMInternal *pEnum = NULL;
- LOG((LOGMD, "MD RegMeta::EnumEvents(0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
- phEnum, td, rEvents, cMax, pcEvents));
-
LOCKREAD();
_ASSERTE(TypeFromToken(td) == mdtTypeDef);
-
if ( *ppmdEnum == 0 )
{
// instantiating a new ENUM
EventRec *pRec;
HENUMInternal hEnum;
- LOG((LOGMD, "MD RegMeta::GetEventProps(0x%08x, 0x%08x, %S, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
- ev, pClass, MDSTR(szEvent), cchEvent, pchEvent, pdwEventFlags, ptkEventType,
- pmdAddOn, pmdRemoveOn, pmdFire, rmdOtherMethod, cMax, pcOtherMethod));
-
LOCKREAD();
_ASSERTE(TypeFromToken(ev) == mdtEvent);
HENUMInternal *pEnum = NULL;
MethodSemanticsRec *pRec;
- LOG((LOGMD, "MD RegMeta::EnumMethodSemantics(0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
- phEnum, mb, rEventProp, cMax, pcEventProp));
-
LOCKREAD();
-
if ( *ppmdEnum == 0 )
{
// instantiating a new ENUM
ULONG ridCur;
HENUMInternal hEnum;
- LOG((LOGMD, "MD RegMeta::GetMethodSemantics(0x%08x, 0x%08x, 0x%08x)\n",
- mb, tkEventProp, pdwSemanticsFlags));
-
-
-
LOCKREAD();
_ASSERTE(TypeFromToken(mb) == mdtMethodDef);
_ASSERTE(TypeFromToken(td) == mdtTypeDef);
- LOG((LOGMD, "MD RegMeta::GetClassLayout(0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
- td, pdwPackSize, rFieldOffset, cMax, pcFieldOffset, pulClassSize));
-
LOCKREAD();
IfFailGo(pMiniMd->FindClassLayoutHelper(td, &ridClassLayout));
RID rid;
FieldMarshalRec *pFieldMarshalRec;
-
_ASSERTE(ppvNativeType != NULL && pcbNativeType != NULL);
- LOG((LOGMD, "MD RegMeta::GetFieldMarshal(0x%08x, 0x%08x, 0x%08x)\n",
- tk, ppvNativeType, pcbNativeType));
-
LOCKREAD();
_ASSERTE(TypeFromToken(tk) == mdtParamDef || TypeFromToken(tk) == mdtFieldDef);
CMiniMdRW *pMiniMd = &(m_pStgdb->m_MiniMd);
- LOG((LOGMD, "MD RegMeta::GetRVA(0x%08x, 0x%08x, 0x%08x)\n",
- tk, pulCodeRVA, pdwImplFlags));
-
LOCKREAD();
if (TypeFromToken(tk) == mdtMethodDef)
{
HRESULT hr = S_OK;
- LOG((LOGMD, "MD RegMeta::GetPermissionSetProps(0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
- pm, pdwAction, ppvPermission, pcbPermission));
-
CMiniMdRW *pMiniMd = NULL;
DeclSecurityRec *pRecord = NULL;
CMiniMdRW *pMiniMd = &(m_pStgdb->m_MiniMd);
StandAloneSigRec *pRec;
- LOG((LOGMD, "MD RegMeta::GetSigFromToken(0x%08x, 0x%08x, 0x%08x)\n",
- mdSig, ppvSig, pcbSig));
-
-
-
LOCKREAD();
_ASSERTE(TypeFromToken(mdSig) == mdtSignature);
CMiniMdRW *pMiniMd = &(m_pStgdb->m_MiniMd);
ModuleRefRec *pModuleRefRec;
- LOG((LOGMD, "MD RegMeta::GetModuleRefProps(0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
- mur, szName, cchName, pchName));
LOCKREAD();
IfFailGo(pMiniMd->GetModuleRefRecord(RidFromToken(mur), &pModuleRefRec));
HENUMInternal **ppmdEnum = reinterpret_cast<HENUMInternal **> (phEnum);
HENUMInternal *pEnum;
- LOG((LOGMD, "MD RegMeta::EnumModuleRefs(0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
- phEnum, rModuleRefs, cMax, pcModuleRefs));
-
LOCKREAD();
if (*ppmdEnum == NULL)
CMiniMdRW *pMiniMd = &(m_pStgdb->m_MiniMd);
TypeSpecRec *pRec = NULL;
- LOG((LOGMD, "MD RegMeta::GetTypeSpecFromToken(0x%08x, 0x%08x, 0x%08x)\n",
- typespec, ppvSig, pcbSig));
-
-
-
LOCKREAD();
_ASSERTE(TypeFromToken(typespec) == mdtTypeSpec);
CMiniMdRW *pMiniMd = &(m_pStgdb->m_MiniMd);
- LOG((LOGMD, "MD RegMeta::GetNameFromToken(0x%08x, 0x%08x)\n",
- tk, pszUtf8NamePtr));
-
LOCKREAD();
_ASSERTE(pszUtf8NamePtr);
HENUMInternal * pEnum = NULL; // Enum we're working with.
CMiniMdRW * pMiniMd = &(m_pStgdb->m_MiniMd);
- LOG((LOGMD, "MD RegMeta::EnumUnresolvedMethods(0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
- phEnum, rMethods, cMax, pcTokens));
-
-
// take the write lock. Because we should have not have two EnumUnresolvedMethods being called at the
// same time. Ref to Def map may be calculated incorrectly.
LOCKWRITE();
ULONG cchStringSize_Dummy;
MetaData::DataBlob userString;
- LOG((LOGMD, "MD RegMeta::GetUserString(0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
- stk, wszString, cchStringSize, pcchStringSize));
-
LOCKREAD();
// Get the string data.
ImplMapRec * pRecord;
uint32_t iRecord;
- LOG((LOGMD, "MD RegMeta::GetPinvokeMap(0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
- tk, pdwMappingFlags, szImportName, cchImportName, pchImportName, pmrImportDLL));
-
LOCKREAD();
_ASSERTE(TypeFromToken(tk) == mdtFieldDef ||
HENUMInternal **ppsigEnum = reinterpret_cast<HENUMInternal **> (phEnum);
HENUMInternal *pEnum;
- LOG((LOGMD, "MD RegMeta::EnumSignatures(0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
- phEnum, rSignatures, cmax, pcSignatures));
-
LOCKREAD();
if (*ppsigEnum == NULL)
HENUMInternal **ppEnum = reinterpret_cast<HENUMInternal **> (phEnum);
HENUMInternal *pEnum;
- LOG((LOGMD, "MD RegMeta::EnumTypeSpecs(0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
- phEnum, rTypeSpecs, cmax, pcTypeSpecs));
-
LOCKREAD();
if (*ppEnum == NULL)
HENUMInternal **ppEnum = reinterpret_cast<HENUMInternal **> (phEnum);
HENUMInternal *pEnum = NULL;
- LOG((LOGMD, "MD RegMeta::EnumUserStrings(0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
- phEnum, rStrings, cmax, pcStrings));
-
LOCKREAD();
if (*ppEnum == NULL)
{
HRESULT hr = S_OK;
- LOG((LOGMD, "MD RegMeta::GetParamForMethodIndex(0x%08x, 0x%08x, 0x%08x)\n",
- md, ulParamSeq, ppd));
-
LOCKREAD();
_ASSERTE((TypeFromToken(md) == mdtMethodDef) && (ulParamSeq != UINT32_MAX) && (ppd != NULL));
{
HRESULT hr = NOERROR;
- LOG((LOGMD, "MD RegMeta::GetMemberProps(0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
- mb, pClass, szMember, cchMember, pchMember, pdwAttr, ppvSigBlob, pcbSigBlob,
- pulCodeRVA, pdwImplFlags, pdwCPlusTypeFlag, ppValue, pchValue));
-
_ASSERTE(TypeFromToken(mb) == mdtMethodDef || TypeFromToken(mb) == mdtFieldDef);
// No need to lock this function. It is calling public APIs. Keep it that way.
FieldRec *pFieldRec;
CMiniMdRW *pMiniMd = &(m_pStgdb->m_MiniMd);
- LOG((LOGMD, "MD RegMeta::GetFieldProps(0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
- fd, pClass, szField, cchField, pchField, pdwAttr, ppvSigBlob, pcbSigBlob, pdwCPlusTypeFlag,
- ppValue, pchValue));
-
LOCKREAD();
_ASSERTE(TypeFromToken(fd) == mdtFieldDef);
PropertyRec *pRec;
HENUMInternal hEnum;
- LOG((LOGMD, "MD RegMeta::GetPropertyProps(0x%08x, 0x%08x, %S, 0x%08x, 0x%08x, "
- "0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, "
- "0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, "
- "0x%08x)\n",
- prop, pClass, MDSTR(szProperty), cchProperty, pchProperty,
- pdwPropFlags, ppvSig, pbSig, pdwCPlusTypeFlag, ppDefaultValue,
- pchDefaultValue, pmdSetter, pmdGetter, rmdOtherMethod, cMax,
- pcOtherMethod));
-
LOCKREAD();
_ASSERTE(TypeFromToken(prop) == mdtProperty);
ParamRec *pParamRec;
CMiniMdRW *pMiniMd = &(m_pStgdb->m_MiniMd);
- LOG((LOGMD, "MD RegMeta::GetParamProps(0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
- pd, pmd, pulSequence, szName, cchName, pchName, pdwAttr, pdwCPlusTypeFlag, ppValue, pchValue));
-
LOCKREAD();
_ASSERTE(TypeFromToken(pd) == mdtParamDef);
CMiniMdRW *pMiniMd = NULL;
RID ridRD = RidFromToken(rd);
-
- LOG((LOGMD, "MD RegMeta::GetGenericParamProps(0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
- rd, pulSequence, pdwAttr, ptOwner, reserved, szName, cchName, pchName));
-
LOCKREAD();
pMiniMd = &(m_pStgdb->m_MiniMd);
CMiniMdRW *pMiniMd = NULL;
RID ridRD = RidFromToken(rd);
- LOG((LOGMD, "MD RegMeta::GetGenericParamConstraintProps(0x%08x, 0x%08x, 0x%08x)\n",
- rd, ptGenericParam, ptkConstraintType));
-
LOCKREAD();
pMiniMd = &(m_pStgdb->m_MiniMd);
MethodSpecRec *pMethodSpecRec;
CMiniMdRW *pMiniMd = NULL;
- LOG((LOGMD, "MD RegMeta::GetMethodSpecProps(0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
- mi, tkParent, ppvSigBlob, pcbSigBlob));
LOCKREAD();
pMiniMd = &(m_pStgdb->m_MiniMd);
HRESULT hr = NOERROR;
MAPPINGTYPE mt = MTYPE_NOMAPPING;
- LOG((LOGMD, "MD RegMeta::GetPEKind(0x%08x, 0x%08x)\n",pdwPEKind,pdwMachine));
-
LOCKREAD();
if (m_pStgdb->m_pStgIO != NULL)
DWORD cch; // Length of WideChar string.
LPCSTR pVer; // Pointer to version string.
- LOG((LOGMD, "MD RegMeta::GetVersionString(0x%08x, 0x%08x, 0x%08x)\n",pwzBuf,cchBufSize,pchBufSize));
-
LOCKREAD();
if (m_pStgdb->m_pvMd != NULL)
uint32_t iRecord;
CMiniMdRW *pMiniMd = &(m_pStgdb->m_MiniMd);
-
- LOG((LOGMD, "MD RegMeta::GetNestedClassProps(0x%08x, 0x%08x)\n",
- tdNestedClass, ptdEnclosingClass));
-
LOCKREAD();
// If not a typedef -- return error.
#define DEFINE_CUSTOM_DUPCHECK 2
#define SET_CUSTOM 3
-#if defined(_DEBUG) && defined(_TRACE_REMAPS)
+#if defined(_DEBUG)
#define LOGGING
#endif
#include <log.h>
#define DEFINE_CUSTOM_DUPCHECK 2
#define SET_CUSTOM 3
-#if defined(_DEBUG) && defined(_TRACE_REMAPS)
+#if defined(_DEBUG)
#define LOGGING
#endif
#include <log.h>
#define DEFINE_CUSTOM_DUPCHECK 2
#define SET_CUSTOM 3
-#if defined(_DEBUG) && defined(_TRACE_REMAPS)
+#if defined(_DEBUG)
#define LOGGING
#endif
#include <log.h>
ModuleRec *pModule; // The module record to modify.
- LOG((LOGMD, "RegMeta::SetModuleProps(%S)\n", MDSTR(szName)));
-
-
LOCKWRITE();
IfFailGo(m_pStgdb->m_MiniMd.PreUpdate());
{
HRESULT hr=S_OK;
- LOG((LOGMD, "RegMeta::Save(%S, 0x%08x)\n", MDSTR(szFile), dwSaveFlags));
LOCKWRITE();
// Check reserved param..
LOCKWRITE();
- LOG((LOGMD, "RegMeta::SaveToStream(0x%08x, 0x%08x)\n", pIStream, dwSaveFlags));
-
IfFailGo(m_pStgdb->m_MiniMd.PreUpdate());
hr = _SaveToStream(pIStream, dwSaveFlags);
IStream *pStream = 0; // Working pointer for save.
- LOG((LOGMD, "MD RegMeta::SaveToMemory(0x%08x, 0x%08x)\n",
- pbData, cbData));
-
#ifdef _DEBUG
ULONG cbActual; // Size of the real data.
IfFailGo(GetSaveSize(cssAccurate, &cbActual));
FilterTable *ft = NULL;
- LOG((LOGMD, "RegMeta::GetSaveSize(0x%08x, 0x%08x)\n", fSave, pdwSaveSize));
LOCKWRITE();
ft = m_pStgdb->m_MiniMd.GetFilterTable();
mdToken tkParent;
int iStart, iEnd;
- LOG((LOGMD, "RegMeta::UnmarkAll\n"));
-
LOCKWRITE();
#if 0
{
HRESULT hr = NOERROR;
- // LOG((LOGMD, "RegMeta::MarkToken(0x%08x)\n", tk));
LOCKWRITE();
if (m_pStgdb->m_MiniMd.GetFilterTable() == NULL || m_pFilterManager == NULL)
FilterTable *pFilter = NULL;
- LOG((LOGMD, "RegMeta::IsTokenMarked(0x%08x)\n", tk));
LOCKREAD();
pFilter = m_pStgdb->m_MiniMd.GetFilterTable();
{
HRESULT hr = S_OK; // A result.
- LOG((LOGMD, "RegMeta::DefineTypeDef(%S, 0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
- MDSTR(szTypeDef), dwTypeDefFlags, tkExtends,
- rtkImplements, ptd));
LOCKWRITE();
IfFailGo(m_pStgdb->m_MiniMd.PreUpdate());
IMapToken *pIMap = NULL;
- LOG((LOGMD, "RegMeta::SetHandler(0x%08x)\n", pUnk));
LOCKWRITE();
m_pHandler = pUnk;
hr = ImportHelper::FindMember(pMiniMd, tkParent, szName, pvSig, cbSig, &mfdef);
if (hr != S_OK)
{
- #if _TRACE_REMAPS
- // Log the failure.
- LOG((LF_METADATA, LL_INFO10, "Member %S//%S.%S not found\n", szNamespace, szTDName, rcMRName));
- #endif
+ // Log the failure.
+ LOG((LF_METADATA, LL_INFO10, "Member %s (0x%p, %u) not found on 0x%x\n", szName, pvSig, cbSig, tkParent));
continue;
}
#define DEFINE_CUSTOM_DUPCHECK 2
#define SET_CUSTOM 3
-#if defined(_DEBUG) && defined(_TRACE_REMAPS)
+#if defined(_DEBUG)
#define LOGGING
#endif
#include <log.h>
void STDMETHODCALLTYPE RegMeta::CloseEnum(
HCORENUM hEnum) // The enumerator.
{
- LOG((LOGMD, "RegMeta::CloseEnum(0x%08x)\n", hEnum));
-
// No need to lock this function.
HENUMInternal *pmdEnum = reinterpret_cast<HENUMInternal *> (hEnum);
// No need to lock this function.
- LOG((LOGMD, "RegMeta::CountEnum(0x%08x, 0x%08x)\n", hEnum, pulCount));
-
_ASSERTE( pulCount );
if (pmdEnum == NULL)
// No need to lock this function.
- LOG((LOGMD, "RegMeta::ResetEnum(0x%08x, 0x%08x)\n", hEnum, ulPos));
-
if (pmdEnum != NULL)
pmdEnum->u.m_ulCur = pmdEnum->u.m_ulStart + ulPos;
HENUMInternal **ppmdEnum = reinterpret_cast<HENUMInternal **> (phEnum);
HENUMInternal *pEnum = NULL;
- LOG((LOGMD, "RegMeta::EnumTypeDefs(0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
- phEnum, rTypeDefs, cMax, pcTypeDefs));
LOCKREAD();
-
if ( *ppmdEnum == 0 )
{
// instantiating a new ENUM
InterfaceImplRec *pRec;
RID index;
- LOG((LOGMD, "RegMeta::EnumInterfaceImpls(0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
- phEnum, td, rImpls, cMax, pcImpls));
LOCKREAD();
_ASSERTE(TypeFromToken(td) == mdtTypeDef);
RID index;
CMiniMdRW *pMiniMd = NULL;
-
- LOG((LOGMD, "RegMeta::EnumGenericParams(0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
- phEnum, tkOwner, rTokens, cMaxTokens, pcTokens));
LOCKREAD();
pMiniMd = &(m_pStgdb->m_MiniMd);
RID index;
CMiniMdRW *pMiniMd = NULL;
- LOG((LOGMD, "RegMeta::EnumMethodSpecs(0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
- phEnum, tkOwner, rTokens, cMaxTokens, pcTokens));
LOCKREAD();
pMiniMd = &(m_pStgdb->m_MiniMd);
RID index;
CMiniMdRW *pMiniMd = NULL;
- LOG((LOGMD, "RegMeta::EnumGenericParamConstraints(0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
- phEnum, tkOwner, rTokens, cMaxTokens, pcTokens));
LOCKREAD();
pMiniMd = &(m_pStgdb->m_MiniMd);
ULONG cTotal;
HENUMInternal *pEnum = *ppmdEnum;
- LOG((LOGMD, "RegMeta::EnumTypeRefs(0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
- phEnum, rTypeRefs, cMax, pcTypeRefs));
LOCKREAD();
if ( pEnum == 0 )
{
HRESULT hr = S_OK;
- LOG((LOGMD, "{%08x} RegMeta::FindTypeDefByName(%S, 0x%08x, 0x%08x)\n",
- this, MDSTR(wzTypeDef), tkEnclosingClass, ptd));
LOCKREAD();
-
if (wzTypeDef == NULL)
IfFailGo(E_INVALIDARG);
PREFIX_ASSUME(wzTypeDef != NULL);
CMiniMdRW *pMiniMd = &(m_pStgdb->m_MiniMd);
ModuleRec *pModuleRec;
-
- LOG((LOGMD, "RegMeta::GetScopeProps(%S, 0x%08x, 0x%08x, 0x%08x)\n",
- MDSTR(szName), cchName, pchName, pmvid));
LOCKREAD();
// there is only one module record
STDMETHODIMP RegMeta::GetModuleFromScope(// S_OK.
mdModule *pmd) // [OUT] Put mdModule token here.
{
- LOG((LOGMD, "RegMeta::GetModuleFromScope(0x%08x)\n", pmd));
-
_ASSERTE(pmd);
// No need to lock this function.
CMiniMdRW *pMiniMd = &(m_pStgdb->m_MiniMd);
mdToken tkParent; // Parent of field or method.
- LOG((LOGMD, "RegMeta::GetTokenForGlobalType(0x%08x, %08x)\n", tk, pbGlobal));
-
// No need to lock this function.
if (!IsValidToken(tk))
TypeDefRec *pTypeDefRec;
BOOL fTruncation = FALSE; // Was there name truncation?
- LOG((LOGMD, "{%08x} RegMeta::GetTypeDefProps(0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
- this, td, szTypeDef, cchTypeDef, pchTypeDef,
- pdwTypeDefFlags, ptkExtends));
LOCKREAD();
if (TypeFromToken(td) != mdtTypeDef)
CMiniMdRW *pMiniMd = NULL;
InterfaceImplRec *pIIRec = NULL;
- LOG((LOGMD, "RegMeta::GetInterfaceImplProps(0x%08x, 0x%08x, 0x%08x)\n",
- iiImpl, pClass, ptkIface));
LOCKREAD();
_ASSERTE(TypeFromToken(iiImpl) == mdtInterfaceImpl);
TypeRefRec *pTypeRefRec;
BOOL fTruncation = FALSE; // Was there name truncation?
- LOG((LOGMD, "RegMeta::GetTypeRefProps(0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
- tr, ptkResolutionScope, szTypeRef, cchTypeRef, pchTypeRef));
-
LOCKREAD();
if (TypeFromToken(tr) != mdtTypeRef)
_ASSERTE(wzTypeName && ptk);
- LOG((LOGMD, "RegMeta::FindTypeRef(0x%8x, %ls, 0x%08x)\n",
- tkResolutionScope, MDSTR(wzTypeName), ptk));
LOCKREAD();
// Convert the name to UTF8.
#define DEFINE_CUSTOM_DUPCHECK 2
#define SET_CUSTOM 3
-#if defined(_DEBUG) && defined(_TRACE_REMAPS)
+#if defined(_DEBUG)
#define LOGGING
#endif
#include <log.h>
WCHAR wzNameSpace[_MAX_PATH];
CMiniMdRW * pMiniMd = NULL;
- LOG((LOGMD, "{%08x} RegMeta::ResolveTypeRef(0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
- this, tr, riid, ppIScope, ptd));
-
LOCKREAD();
pMiniMd = &(m_pStgdb->m_MiniMd);
// Ask the storage system to add stream fixed overhead.
IfFailGo(TiggerStorage::GetStreamSaveSize(szHeap, cbSize, &cbSize));
- // Log the size info.
- LOG((LF_METADATA, LL_INFO10, "Metadata: GetSaveSize for %ls: %d data, %d total.\n",
- szHeap, cbStream, cbSize));
-
// Give the size of the pool to the caller's total.
*pcbSaveSize = cbSize;
}
// Ask the storage system to add stream fixed overhead.
IfFailGo(TiggerStorage::GetStreamSaveSize(szName, cbSize, &cbSize));
- // Log the size info.
- LOG((LF_METADATA, LL_INFO10, "Metadata: GetSaveSize for %ls: %d data, %d total.\n",
- szName, cbStream, cbSize));
-
// Give the size of the pool to the caller's total.
*pcbSaveSize = cbHotSize + cbSize;
cRef = InterlockedDecrement(&m_cRefs);
if (cRef == 0)
{
- LOG((LOGMD, "MDInternalRW(0x%08x)::destruction\n", this));
+ LOG((LOGMD, "MDInternalRW(0x%p)::destruction\n", this));
delete this;
}
return cRef;
cbTotal += cbAlign;
m_cbSaveSize = cbTotal;
- LOG((LOGMD, "CMiniMdRW::GetFullSaveSize: Total size = %d\n", cbTotal));
+ LOG((LOGMD, "CMiniMdRW::GetFullSaveSize: Total size = %u\n", cbTotal));
*pcbSaveSize = cbTotal;
// If we found the token, don't keep the record.
if (pul != 0)
{
- LOG((LOGMD, "PreSave ENCLog skipping duplicate token %d", pFrom->GetToken()));
+ LOG((LOGMD, "PreSave ENCLog skipping duplicate token 0x%x", pFrom->GetToken()));
continue;
}
// First time token was seen, so keep track of it.
HRESULT hr = NOERROR;
MethodSpecRec *pMethodSpecRec;
- LOG((LOGMD, "MD RegMeta::GetMethodSpecProps(0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
- mi, tkParent, ppvSigBlob, pcbSigBlob));
-
_ASSERTE(TypeFromToken(mi) == mdtMethodSpec);
IfFailRet(m_LiteWeightStgdb.m_MiniMd.GetMethodSpecRecord(RidFromToken(mi), &pMethodSpecRec));
#define ENUM_BUFFER_SIZE 10
#define TAB_SIZE 8
-#define ISFLAG(p,x) if (Is##p##x(flags)) strcat_s(sFlags,STRING_BUFFER_LEN, "["#x "] ");
+#define ISFLAG(p,x) if (Is##p##x(flags)) strcat_s(szTempBuf,STRING_BUFFER_LEN, "["#x "] ");
extern HRESULT _FillVariant(
BYTE bCPlusTypeFlag,
"NATIVE_TYPE_ERROR", // = 0x2d, // VT_HRESULT when exporting to a typelib.
};
+// Maximum value needed to convert a UTF16 codepoint to a UTF8 codepoint.
+#define MAX_UTF8_CVT 3
+
+static const char* ConvertToUtf8(LPCWSTR name, _Out_writes_(bufLen) char* buffer, ULONG bufLen)
+{
+ int res = WszWideCharToMultiByte(CP_UTF8, 0, name, -1, buffer, bufLen, NULL, NULL);
+ if (res == 0)
+ buffer[bufLen] = '\0';
+ return buffer;
+}
size_t g_cbCoffNames = 0;
mdModule mdm;
GUID mvid;
WCHAR scopeName[STRING_BUFFER_LEN];
- WCHAR guidString[STRING_BUFFER_LEN];
+ char scopeNameUtf8[ARRAY_SIZE(scopeName) * MAX_UTF8_CVT];
+ char guidString[STRING_BUFFER_LEN];
hr = m_pImport->GetScopeProps( scopeName, STRING_BUFFER_LEN, 0, &mvid);
if (FAILED(hr)) Error("GetScopeProps failed.", hr);
- VWriteLine("ScopeName : %ls",scopeName);
+ VWriteLine("ScopeName : %s",ConvertToUtf8(scopeName, scopeNameUtf8, ARRAY_SIZE(scopeNameUtf8)));
if (!(m_DumpFilter & MDInfo::dumpNoLogo))
- VWriteLine("MVID : %ls",GUIDAsString(mvid, guidString, STRING_BUFFER_LEN));
+ VWriteLine("MVID : %s",GUIDAsString(mvid, guidString, STRING_BUFFER_LEN));
hr = m_pImport->GetModuleFromScope(&mdm);
if (FAILED(hr)) Error("GetModuleFromScope failed.", hr);
// Prints out name of the given memberref
//
-LPCWSTR MDInfo::MemberRefName(mdMemberRef inMemRef, _Out_writes_(bufLen) LPWSTR buffer, ULONG bufLen)
+LPCSTR MDInfo::MemberRefName(mdMemberRef inMemRef, _Out_writes_(bufLen) LPSTR buffer, ULONG bufLen)
{
HRESULT hr;
-
- hr = m_pImport->GetMemberRefProps( inMemRef, NULL, buffer, bufLen,
+ WCHAR tempBuf[STRING_BUFFER_LEN];
+ hr = m_pImport->GetMemberRefProps( inMemRef, NULL, tempBuf, ARRAY_SIZE(tempBuf),
NULL, NULL, NULL);
if (FAILED(hr)) Error("GetMemberRefProps failed.", hr);
- return buffer;
-} // LPCWSTR MDInfo::MemberRefName()
-
+ return ConvertToUtf8(tempBuf, buffer, bufLen);
+} // LPCSTR MDInfo::MemberRefName()
// Prints out information about the given memberref
//
{
HRESULT hr;
WCHAR memRefName[STRING_BUFFER_LEN];
+ char memRefNameUtf8[ARRAY_SIZE(memRefName) * MAX_UTF8_CVT];
ULONG nameLen;
mdToken token;
PCCOR_SIGNATURE pbSigBlob;
&nameLen, &pbSigBlob, &ulSigBlob);
if (FAILED(hr)) Error("GetMemberRefProps failed.", hr);
- VWriteLine("%s\t\tMember: (%8.8x) %ls: ", preFix, inMemRef, memRefName);
+ VWriteLine("%s\t\tMember: (%8.8x) %s: ", preFix, inMemRef, ConvertToUtf8(memRefName, memRefNameUtf8, ARRAY_SIZE(memRefNameUtf8)));
if (ulSigBlob)
DisplaySignature(pbSigBlob, ulSigBlob, preFix);
{
HRESULT hr;
WCHAR moduleRefName[STRING_BUFFER_LEN];
+ char moduleRefNameUtf8[ARRAY_SIZE(moduleRefName) * MAX_UTF8_CVT];
ULONG nameLen;
&nameLen);
if (FAILED(hr)) Error("GetModuleRefProps failed.", hr);
- VWriteLine("\t\tModuleRef: (%8.8x) %ls: ", inModuleRef, moduleRefName);
+ VWriteLine("\t\tModuleRef: (%8.8x) %s: ", inModuleRef, ConvertToUtf8(moduleRefName, moduleRefNameUtf8, ARRAY_SIZE(moduleRefNameUtf8)));
DisplayCustomAttributes(inModuleRef, "\t\t");
} // void MDInfo::DisplayModuleRefInfo()
// member in wide characters
//
-LPCWSTR MDInfo::MemberName(mdToken inToken, _Out_writes_(bufLen) LPWSTR buffer, ULONG bufLen)
+LPCSTR MDInfo::MemberName(mdToken inToken, _Out_writes_(bufLen) LPSTR buffer, ULONG bufLen)
{
HRESULT hr;
-
- hr = m_pImport->GetMemberProps( inToken, NULL, buffer, bufLen,
+ WCHAR tempBuf[STRING_BUFFER_LEN];
+ hr = m_pImport->GetMemberProps( inToken, NULL, tempBuf, ARRAY_SIZE(tempBuf),
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
if (FAILED(hr)) Error("GetMemberProps failed.", hr);
- return (buffer);
-} // LPCWSTR MDInfo::MemberName()
+ return ConvertToUtf8(tempBuf, buffer, bufLen);
+} // LPCSTR MDInfo::MemberName()
// displays information for the given method
HRESULT hr;
mdTypeDef memTypeDef;
WCHAR memberName[STRING_BUFFER_LEN];
+ char memberNameUtf8[ARRAY_SIZE(memberName) * MAX_UTF8_CVT];
ULONG nameLen;
DWORD flags;
PCCOR_SIGNATURE pbSigBlob;
if (pflags)
*pflags = flags;
- VWriteLine("\t\tMethodName: %ls (%8.8X)", memberName, inMethod);
+ VWriteLine("\t\tMethodName: %s (%8.8X)", ConvertToUtf8(memberName, memberNameUtf8, ARRAY_SIZE(memberNameUtf8)), inMethod);
- char sFlags[STRING_BUFFER_LEN];
+ char szTempBuf[STRING_BUFFER_LEN];
- sFlags[0] = 0;
+ szTempBuf[0] = 0;
ISFLAG(Md, Public);
ISFLAG(Md, Private);
ISFLAG(Md, Family);
ISFLAG(Md, RTSpecialName);
ISFLAG(Md, PinvokeImpl);
ISFLAG(Md, UnmanagedExport);
- if (!*sFlags)
- strcpy_s(sFlags, STRING_BUFFER_LEN, "[none]");
+ if (!*szTempBuf)
+ strcpy_s(szTempBuf, STRING_BUFFER_LEN, "[none]");
bool result = (((flags) & mdRTSpecialName) && !wcscmp((memberName), W(".ctor")));
- if (result) strcat_s(sFlags, STRING_BUFFER_LEN, "[.ctor] ");
+ if (result) strcat_s(szTempBuf, STRING_BUFFER_LEN, "[.ctor] ");
result = (((flags) & mdRTSpecialName) && !wcscmp((memberName), W(".cctor")));
- if (result) strcat_s(sFlags,STRING_BUFFER_LEN, "[.cctor] ");
+ if (result) strcat_s(szTempBuf,STRING_BUFFER_LEN, "[.cctor] ");
// "Reserved" flags
ISFLAG(Md, HasSecurity);
ISFLAG(Md, RequireSecObject);
- VWriteLine("\t\tFlags : %s (%08x)", sFlags, flags);
+ VWriteLine("\t\tFlags : %s (%08x)", szTempBuf, flags);
VWriteLine("\t\tRVA : 0x%08x", ulCodeRVA);
flags = ulImplFlags;
- sFlags[0] = 0;
+ szTempBuf[0] = 0;
ISFLAG(Mi, Native);
ISFLAG(Mi, IL);
ISFLAG(Mi, OPTIL);
ISFLAG(Mi, InternalCall);
ISFLAG(Mi, Synchronized);
ISFLAG(Mi, NoInlining);
- if (!*sFlags)
- strcpy_s(sFlags, STRING_BUFFER_LEN, "[none]");
+ if (!*szTempBuf)
+ strcpy_s(szTempBuf, STRING_BUFFER_LEN, "[none]");
- VWriteLine("\t\tImplFlags : %s (%08x)", sFlags, flags);
+ VWriteLine("\t\tImplFlags : %s (%08x)", szTempBuf, flags);
if (ulSigBlob)
DisplaySignature(pbSigBlob, ulSigBlob, "");
HRESULT hr;
mdTypeDef memTypeDef;
WCHAR memberName[STRING_BUFFER_LEN];
+ char memberNameUtf8[ARRAY_SIZE(memberName) * MAX_UTF8_CVT];
ULONG nameLen;
DWORD flags;
PCCOR_SIGNATURE pbSigBlob;
_FillVariant((BYTE)dwCPlusTypeFlag, pValue, cbValue, &defaultValue);
#endif
- char sFlags[STRING_BUFFER_LEN];
+ char szTempBuf[STRING_BUFFER_LEN];
- sFlags[0] = 0;
+ szTempBuf[0] = 0;
ISFLAG(Fd, Public);
ISFLAG(Fd, Private);
ISFLAG(Fd, Family);
ISFLAG(Fd, PinvokeImpl);
// "Reserved" flags
ISFLAG(Fd, HasDefault);
- if (!*sFlags)
- strcpy_s(sFlags, STRING_BUFFER_LEN, "[none]");
+ if (!*szTempBuf)
+ strcpy_s(szTempBuf, STRING_BUFFER_LEN, "[none]");
- VWriteLine("\t\tField Name: %ls (%8.8X)", memberName, inField);
- VWriteLine("\t\tFlags : %s (%08x)", sFlags, flags);
+ VWriteLine("\t\tField Name: %s (%8.8X)", ConvertToUtf8(memberName, memberNameUtf8, ARRAY_SIZE(memberNameUtf8)), inField);
+ VWriteLine("\t\tFlags : %s (%08x)", szTempBuf, flags);
#ifdef FEATURE_COMINTEROP
if (IsFdHasDefault(flags))
- VWriteLine("\tDefltValue: (%s) %ls", g_szMapElementType[dwCPlusTypeFlag], VariantAsString(&defaultValue));
+ VWriteLine("\tDefltValue: (%s) %s", g_szMapElementType[dwCPlusTypeFlag], VariantAsString(&defaultValue, szTempBuf, ARRAY_SIZE(szTempBuf)));
#endif
if (!ulSigBlob) // Signature size should be non-zero for fields
VWriteLine("\t\tERROR: no valid signature ");
mdMethodDef md;
ULONG num;
WCHAR paramName[STRING_BUFFER_LEN];
+ char paramNameUtf8[ARRAY_SIZE(paramName) * MAX_UTF8_CVT];
ULONG nameLen;
DWORD flags;
VARIANT defValue;
_FillVariant((BYTE)dwCPlusFlags, pValue, cbValue, &defValue);
#endif
- char sFlags[STRING_BUFFER_LEN];
- sFlags[0] = 0;
+ char szTempBuf[STRING_BUFFER_LEN];
+ szTempBuf[0] = 0;
ISFLAG(Pd, In);
ISFLAG(Pd, Out);
ISFLAG(Pd, Optional);
// "Reserved" flags.
ISFLAG(Pd, HasDefault);
ISFLAG(Pd, HasFieldMarshal);
- if (!*sFlags)
- strcpy_s(sFlags,STRING_BUFFER_LEN, "[none]");
+ if (!*szTempBuf)
+ strcpy_s(szTempBuf,STRING_BUFFER_LEN, "[none]");
- VWrite("\t\t\t(%ld) ParamToken : (%08x) Name : %ls flags: %s (%08x)", num, inParamDef, paramName, sFlags, flags);
+ VWrite("\t\t\t(%ld) ParamToken : (%08x) Name : %s flags: %s (%08x)",
+ num, inParamDef, ConvertToUtf8(paramName, paramNameUtf8, ARRAY_SIZE(paramNameUtf8)), szTempBuf, flags);
#ifdef FEATURE_COMINTEROP
if (IsPdHasDefault(flags))
- VWriteLine(" Default: (%s) %ls", g_szMapElementType[dwCPlusFlags], VariantAsString(&defValue));
+ VWriteLine(" Default: (%s) %s", g_szMapElementType[dwCPlusFlags], VariantAsString(&defValue, szTempBuf, ARRAY_SIZE(szTempBuf)));
else
#endif
VWriteLine("");
{
ULONG ulSeq;
WCHAR paramName[STRING_BUFFER_LEN];
+ char paramNameUtf8[ARRAY_SIZE(paramName) * MAX_UTF8_CVT];
ULONG nameLen;
DWORD flags;
mdToken tkOwner;
HRESULT hr = m_pImport->GetGenericParamProps(tkParam, &ulSeq, &flags, &tkOwner, NULL, paramName, ARRAY_SIZE(paramName), &nameLen);
if (FAILED(hr)) Error("GetGenericParamProps failed.", hr);
- VWriteLine("%s\t(%ld) GenericParamToken : (%08x) Name : %ls flags: %08x Owner: %08x", prefix, ulSeq, tkParam, paramName, flags, tkOwner);
+ VWriteLine("%s\t(%ld) GenericParamToken : (%08x) Name : %s flags: %08x Owner: %08x",
+ prefix, ulSeq, tkParam, ConvertToUtf8(paramName, paramNameUtf8, ARRAY_SIZE(paramNameUtf8)), flags, tkOwner);
// Any constraints for the GenericParam
while (SUCCEEDED(hr = m_pImport->EnumGenericParamConstraints(&constraintEnum, tkParam,
DisplayCustomAttributes(tkParam, newprefix);
}
-LPCWSTR MDInfo::TokenName(mdToken inToken, _Out_writes_(bufLen) LPWSTR buffer, ULONG bufLen)
-{
- LPCUTF8 pName; // Token name in UTF8.
-
- if (IsNilToken(inToken))
- return W("");
-
- m_pImport->GetNameFromToken(inToken, &pName);
-
- WszMultiByteToWideChar(CP_UTF8,0, pName,-1, buffer,bufLen);
-
- return buffer;
-} // LPCWSTR MDInfo::TokenName()
-
// prints out name of typeref or typedef
//
-LPCWSTR MDInfo::TypeDeforRefName(mdToken inToken, _Out_writes_(bufLen) LPWSTR buffer, ULONG bufLen)
+LPCSTR MDInfo::TypeDeforRefName(mdToken inToken, _Out_writes_(bufLen) LPSTR buffer, ULONG bufLen)
{
if (RidFromToken(inToken))
{
else if (TypeFromToken(inToken) == mdtTypeRef)
return (TypeRefName((mdTypeRef) inToken, buffer, bufLen));
else if (TypeFromToken(inToken) == mdtTypeSpec)
- return W("[TypeSpec]");
+ return "[TypeSpec]";
else
- return W("[InvalidReference]");
+ return "[InvalidReference]";
}
else
- return W("");
-} // LPCWSTR MDInfo::TypeDeforRefName()
+ return "";
+} // LPCSTR MDInfo::TypeDeforRefName()
-LPCWSTR MDInfo::MemberDeforRefName(mdToken inToken, _Out_writes_(bufLen) LPWSTR buffer, ULONG bufLen)
+LPCSTR MDInfo::MemberDeforRefName(mdToken inToken, _Out_writes_(bufLen) LPSTR buffer, ULONG bufLen)
{
if (RidFromToken(inToken))
{
else if (TypeFromToken(inToken) == mdtMemberRef)
return (MemberRefName((mdMemberRef) inToken, buffer, bufLen));
else
- return W("[InvalidReference]");
+ return "[InvalidReference]";
}
else
- return W("");
-} // LPCWSTR MDInfo::MemberDeforRefName()
+ return "";
+} // LPCSTR MDInfo::MemberDeforRefName()
// prints out only the name of the given typedef
//
//
-
-LPCWSTR MDInfo::TypeDefName(mdTypeDef inTypeDef, _Out_writes_(bufLen) LPWSTR buffer, ULONG bufLen)
+LPCSTR MDInfo::TypeDefName(mdTypeDef inTypeDef, _Out_writes_(bufLen) LPSTR buffer, ULONG bufLen)
{
HRESULT hr;
+ WCHAR tempBuf[STRING_BUFFER_LEN];
hr = m_pImport->GetTypeDefProps(
// [IN] The import scope.
inTypeDef, // [IN] TypeDef token for inquiry.
- buffer, // [OUT] Put name here.
- bufLen, // [IN] size of name buffer in wide chars.
+ tempBuf, // [OUT] Put name here.
+ ARRAY_SIZE(tempBuf), // [IN] size of name buffer in wide chars.
NULL, // [OUT] put size of name (wide chars) here.
NULL, // [OUT] Put flags here.
NULL); // [OUT] Put base class TypeDef/TypeRef here.
if (FAILED(hr))
{
- wcscpy_s(buffer, bufLen, W("[Invalid TypeDef]"));
+ strcpy_s(buffer, bufLen, "[Invalid TypeDef]");
+ }
+ else
+ {
+ (void)ConvertToUtf8(tempBuf, buffer, bufLen);
}
return buffer;
-} // LPCWSTR MDInfo::TypeDefName()
+} // LPCSTR MDInfo::TypeDefName()
// prints out all the properties of a given typedef
//
{
HRESULT hr;
WCHAR typeDefName[STRING_BUFFER_LEN];
+ char typeDefNameUtf8[ARRAY_SIZE(typeDefName) * MAX_UTF8_CVT];
ULONG nameLen;
DWORD flags;
mdToken extends;
&extends); // [OUT] Put base class TypeDef/TypeRef here.
if (FAILED(hr)) Error("GetTypeDefProps failed.", hr);
- char sFlags[STRING_BUFFER_LEN];
- WCHAR szTempBuf[STRING_BUFFER_LEN];
+ char szTempBuf[STRING_BUFFER_LEN];
- VWriteLine("\tTypDefName: %ls (%8.8X)",typeDefName,inTypeDef);
- VWriteLine("\tFlags : %s (%08x)",ClassFlags(flags, sFlags), flags);
- VWriteLine("\tExtends : %8.8X [%s] %ls",extends,TokenTypeName(extends),
+ VWriteLine("\tTypDefName: %s (%8.8X)",ConvertToUtf8(typeDefName, typeDefNameUtf8, ARRAY_SIZE(typeDefNameUtf8)),inTypeDef);
+ VWriteLine("\tFlags : %s (%08x)",ClassFlags(flags, szTempBuf), flags);
+ VWriteLine("\tExtends : %8.8X [%s] %s",extends,TokenTypeName(extends),
TypeDeforRefName(extends, szTempBuf, ARRAY_SIZE(szTempBuf)));
hr = m_pImport->GetClassLayout(inTypeDef, &dwPacking, 0,0,0, &dwSize);
hr = m_pImport->GetNestedClassProps(inTypeDef, &tkEnclosingClass);
if (hr == S_OK)
{
- VWriteLine("\tEnclosingClass : %ls (%8.8X)", TypeDeforRefName(tkEnclosingClass,
+ VWriteLine("\tEnclosingClass : %s (%8.8X)", TypeDeforRefName(tkEnclosingClass,
szTempBuf, ARRAY_SIZE(szTempBuf)), tkEnclosingClass);
}
else if (hr == CLDB_E_RECORD_NOTFOUND)
// Prints out the name of the given TypeRef
//
-LPCWSTR MDInfo::TypeRefName(mdTypeRef tr, _Out_writes_(bufLen) LPWSTR buffer, ULONG bufLen)
+LPCSTR MDInfo::TypeRefName(mdTypeRef tr, _Out_writes_(bufLen) LPSTR buffer, ULONG bufLen)
{
HRESULT hr;
+ WCHAR tempBuf[STRING_BUFFER_LEN];
hr = m_pImport->GetTypeRefProps(
tr, // The class ref token.
NULL, // Resolution scope.
- buffer, // Put the name here.
- bufLen, // Size of the name buffer, wide chars.
+ tempBuf, // Put the name here.
+ ARRAY_SIZE(tempBuf), // Size of the name buffer, wide chars.
NULL); // Put actual size of name here.
if (FAILED(hr))
{
- wcscpy_s(buffer, bufLen, W("[Invalid TypeRef]"));
+ strcpy_s(buffer, bufLen, "[Invalid TypeRef]");
+ }
+ else
+ {
+ (void)ConvertToUtf8(tempBuf, buffer, bufLen);
}
- return (buffer);
-} // LPCWSTR MDInfo::TypeRefName()
+ return buffer;
+} // LPCSTR MDInfo::TypeRefName()
// Prints out all the info of the given TypeRef
//
HRESULT hr;
mdToken tkResolutionScope;
WCHAR typeRefName[STRING_BUFFER_LEN];
+ char typeRefNameUtf8[ARRAY_SIZE(typeRefName) * MAX_UTF8_CVT];
ULONG nameLen;
hr = m_pImport->GetTypeRefProps(
tr, // The class ref token.
&tkResolutionScope, // ResolutionScope.
typeRefName, // Put the name here.
- STRING_BUFFER_LEN, // Size of the name buffer, wide chars.
+ ARRAY_SIZE(typeRefName), // Size of the name buffer, wide chars.
&nameLen); // Put actual size of name here.
if (FAILED(hr)) Error("GetTypeRefProps failed.", hr);
VWriteLine("Token: 0x%08x", tr);
VWriteLine("ResolutionScope: 0x%08x", tkResolutionScope);
- VWriteLine("TypeRefName: %ls",typeRefName);
+ VWriteLine("TypeRefName: %s", ConvertToUtf8(typeRefName, typeRefNameUtf8, ARRAY_SIZE(typeRefNameUtf8)));
DisplayCustomAttributes(tr, "\t");
} // void MDInfo::DisplayTypeRefInfo()
// associated with the class.
//
-char *MDInfo::ClassFlags(DWORD flags, _Out_writes_(STRING_BUFFER_LEN) char *sFlags)
+char *MDInfo::ClassFlags(DWORD flags, _Out_writes_(STRING_BUFFER_LEN) char *szTempBuf)
{
- sFlags[0] = 0;
+ szTempBuf[0] = 0;
ISFLAG(Td, NotPublic);
ISFLAG(Td, Public);
ISFLAG(Td, NestedPublic);
ISFLAG(Td, RTSpecialName);
ISFLAG(Td, HasSecurity);
ISFLAG(Td, WindowsRuntime);
- if (!*sFlags)
- strcpy_s(sFlags, STRING_BUFFER_LEN, "[none]");
+ if (!*szTempBuf)
+ strcpy_s(szTempBuf, STRING_BUFFER_LEN, "[none]");
- return sFlags;
+ return szTempBuf;
} // char *MDInfo::ClassFlags()
// prints out all info on the given typeDef, including all information that
mdToken token;
HRESULT hr;
- WCHAR szTempBuf[STRING_BUFFER_LEN];
+ char szTempBuf[STRING_BUFFER_LEN];
hr = m_pImport->GetInterfaceImplProps( inImpl, &typeDef, &token);
if (FAILED(hr)) Error("GetInterfaceImplProps failed.", hr);
- VWriteLine("\t\tClass : %ls",TypeDeforRefName(typeDef, szTempBuf, ARRAY_SIZE(szTempBuf)));
- VWriteLine("\t\tToken : %8.8X [%s] %ls",token,TokenTypeName(token), TypeDeforRefName(token, szTempBuf, ARRAY_SIZE(szTempBuf)));
+ VWriteLine("\t\tClass : %s",TypeDeforRefName(typeDef, szTempBuf, ARRAY_SIZE(szTempBuf)));
+ VWriteLine("\t\tToken : %8.8X [%s] %s",token,TokenTypeName(token), TypeDeforRefName(token, szTempBuf, ARRAY_SIZE(szTempBuf)));
DisplayCustomAttributes(inImpl, "\t\t");
} // void MDInfo::DisplayInterfaceImplInfo()
HRESULT hr;
mdTypeDef typeDef;
WCHAR propName[STRING_BUFFER_LEN];
+ char propNameUtf8[ARRAY_SIZE(propName) * MAX_UTF8_CVT];
DWORD flags;
#ifdef FEATURE_COMINTEROP
VARIANT defaultValue;
if (FAILED(hr)) Error("GetPropertyProps failed.", hr);
- VWriteLine("\t\tProp.Name : %ls (%8.8X)",propName,inProp);
+ VWriteLine("\t\tProp.Name : %s (%8.8X)",ConvertToUtf8(propName, propNameUtf8, ARRAY_SIZE(propNameUtf8)),inProp);
- char sFlags[STRING_BUFFER_LEN];
+ char szTempBuf[STRING_BUFFER_LEN];
- sFlags[0] = 0;
+ szTempBuf[0] = 0;
ISFLAG(Pr, SpecialName);
ISFLAG(Pr, RTSpecialName);
ISFLAG(Pr, HasDefault);
- if (!*sFlags)
- strcpy_s(sFlags, STRING_BUFFER_LEN, "[none]");
+ if (!*szTempBuf)
+ strcpy_s(szTempBuf, STRING_BUFFER_LEN, "[none]");
- VWriteLine("\t\tFlags : %s (%08x)", sFlags, flags);
+ VWriteLine("\t\tFlags : %s (%08x)", szTempBuf, flags);
if (ulSigBlob)
DisplaySignature(pbSigBlob, ulSigBlob, "");
else
VWriteLine("\t\tERROR: no valid signature ");
- WCHAR szTempBuf[STRING_BUFFER_LEN];
-
#ifdef FEATURE_COMINTEROP
_FillVariant((BYTE)dwCPlusTypeFlag, pValue, cbValue, &defaultValue);
- VWriteLine("\t\tDefltValue: %ls",VariantAsString(&defaultValue));
+ VWriteLine("\t\tDefltValue: %s",VariantAsString(&defaultValue, szTempBuf, ARRAY_SIZE(szTempBuf)));
#endif
- VWriteLine("\t\tSetter : (%08x) %ls",setter,MemberDeforRefName(setter, szTempBuf, ARRAY_SIZE(szTempBuf)));
- VWriteLine("\t\tGetter : (%08x) %ls",getter,MemberDeforRefName(getter, szTempBuf, ARRAY_SIZE(szTempBuf)));
+ VWriteLine("\t\tSetter : (%08x) %s",setter,MemberDeforRefName(setter, szTempBuf, ARRAY_SIZE(szTempBuf)));
+ VWriteLine("\t\tGetter : (%08x) %s",getter,MemberDeforRefName(getter, szTempBuf, ARRAY_SIZE(szTempBuf)));
// do something with others?
- VWriteLine("\t\t%ld Others",others);
+ VWriteLine("\t\t%u Others",others);
DisplayCustomAttributes(inProp, "\t\t");
#ifdef FEATURE_COMINTEROP
HRESULT hr;
mdTypeDef typeDef;
WCHAR eventName[STRING_BUFFER_LEN];
+ char eventNameUtf8[ARRAY_SIZE(eventName) * MAX_UTF8_CVT];
DWORD flags;
mdToken eventType;
mdMethodDef addOn, removeOn, fire, otherMethod[ENUM_BUFFER_SIZE];
&totalOther); // [OUT] total number of other method of this event
if (FAILED(hr)) Error("GetEventProps failed.", hr);
- VWriteLine("\t\tName : %ls (%8.8X)",eventName,inEvent);
+ VWriteLine("\t\tName : %s (%8.8X)",ConvertToUtf8(eventName, eventNameUtf8, ARRAY_SIZE(eventNameUtf8)),inEvent);
- char sFlags[STRING_BUFFER_LEN];
+ char szTempBuf[STRING_BUFFER_LEN];
- sFlags[0] = 0;
+ szTempBuf[0] = 0;
ISFLAG(Ev, SpecialName);
ISFLAG(Ev, RTSpecialName);
- if (!*sFlags)
- strcpy_s(sFlags, STRING_BUFFER_LEN, "[none]");
-
- VWriteLine("\t\tFlags : %s (%08x)", sFlags, flags);
-
- WCHAR szTempBuf[STRING_BUFFER_LEN];
+ if (!*szTempBuf)
+ strcpy_s(szTempBuf, STRING_BUFFER_LEN, "[none]");
+ VWriteLine("\t\tFlags : %s (%08x)", szTempBuf, flags);
VWriteLine("\t\tEventType : %8.8X [%s]",eventType,TokenTypeName(eventType));
- VWriteLine("\t\tAddOnMethd: (%08x) %ls",addOn,MemberDeforRefName(addOn, szTempBuf, ARRAY_SIZE(szTempBuf)));
- VWriteLine("\t\tRmvOnMethd: (%08x) %ls",removeOn,MemberDeforRefName(removeOn, szTempBuf, ARRAY_SIZE(szTempBuf)));
- VWriteLine("\t\tFireMethod: (%08x) %ls",fire,MemberDeforRefName(fire, szTempBuf, ARRAY_SIZE(szTempBuf)));
+ VWriteLine("\t\tAddOnMethd: (%08x) %s",addOn,MemberDeforRefName(addOn, szTempBuf, ARRAY_SIZE(szTempBuf)));
+ VWriteLine("\t\tRmvOnMethd: (%08x) %s",removeOn,MemberDeforRefName(removeOn, szTempBuf, ARRAY_SIZE(szTempBuf)));
+ VWriteLine("\t\tFireMethod: (%08x) %s",fire,MemberDeforRefName(fire, szTempBuf, ARRAY_SIZE(szTempBuf)));
VWriteLine("\t\t%ld OtherMethods",totalOther);
ULONG cbSig=0; // Size of the signature.
BOOL bCoffSymbol = false; // true for coff symbol CA's.
WCHAR rcName[MAX_CLASS_NAME]; // Name of the type.
+ char rcNameUtf8[ARRAY_SIZE(rcName) * MAX_UTF8_CVT]; // Name of the type.
hr = m_pImport->GetCustomAttributeProps( // S_OK or error.
inValue, // The attribute.
VWriteLine("%s\tCustomAttribute Type: %08x", preFix, tkType);
// Get the name of the memberref or methoddef.
- tk = tkType;
- rcName[0] = L'\0';
- // Get the member name, and the parent token.
- switch (TypeFromToken(tk))
- {
- case mdtMemberRef:
- hr = m_pImport->GetNameFromToken(tk, &pMethName);
- if (FAILED(hr)) Error("GetNameFromToken failed.", hr);
- hr = m_pImport->GetMemberRefProps( tk, &tk, 0, 0, 0, &pSig, &cbSig);
- if (FAILED(hr)) Error("GetMemberRefProps failed.", hr);
- break;
- case mdtMethodDef:
- hr = m_pImport->GetNameFromToken(tk, &pMethName);
- if (FAILED(hr)) Error("GetNameFromToken failed.", hr);
- hr = m_pImport->GetMethodProps(tk, &tk, 0, 0, 0, 0, &pSig, &cbSig, 0, 0);
- if (FAILED(hr)) Error("GetMethodProps failed.", hr);
- break;
- } // switch
+ tk = tkType;
+ rcName[0] = W('\0');
+ rcNameUtf8[0] = '\0';
+ // Get the member name, and the parent token.
+ switch (TypeFromToken(tk))
+ {
+ case mdtMemberRef:
+ hr = m_pImport->GetNameFromToken(tk, &pMethName);
+ if (FAILED(hr)) Error("GetNameFromToken failed.", hr);
+ hr = m_pImport->GetMemberRefProps( tk, &tk, 0, 0, 0, &pSig, &cbSig);
+ if (FAILED(hr)) Error("GetMemberRefProps failed.", hr);
+ break;
+ case mdtMethodDef:
+ hr = m_pImport->GetNameFromToken(tk, &pMethName);
+ if (FAILED(hr)) Error("GetNameFromToken failed.", hr);
+ hr = m_pImport->GetMethodProps(tk, &tk, 0, 0, 0, 0, &pSig, &cbSig, 0, 0);
+ if (FAILED(hr)) Error("GetMethodProps failed.", hr);
+ break;
+ } // switch
- // Get the type name.
- switch (TypeFromToken(tk))
- {
- case mdtTypeDef:
- hr = m_pImport->GetTypeDefProps(tk, rcName,MAX_CLASS_NAME,0, 0,0);
- if (FAILED(hr)) Error("GetTypeDefProps failed.", hr);
- break;
- case mdtTypeRef:
- hr = m_pImport->GetTypeRefProps(tk, 0, rcName,MAX_CLASS_NAME,0);
- if (FAILED(hr)) Error("GetTypeRefProps failed.", hr);
- break;
- } // switch
+ // Get the type name.
+ switch (TypeFromToken(tk))
+ {
+ case mdtTypeDef:
+ hr = m_pImport->GetTypeDefProps(tk, rcName,MAX_CLASS_NAME,0, 0,0);
+ if (FAILED(hr)) Error("GetTypeDefProps failed.", hr);
+ break;
+ case mdtTypeRef:
+ hr = m_pImport->GetTypeRefProps(tk, 0, rcName,MAX_CLASS_NAME,0);
+ if (FAILED(hr)) Error("GetTypeRefProps failed.", hr);
+ break;
+ } // switch
- if (pSig && pMethName)
+ if (pSig && pMethName)
+ {
+ int iLen= 1 + (ULONG32)strlen(pMethName);
+ LPWSTR pwzName = (LPWSTR)(new WCHAR[iLen]);
+ if(pwzName)
{
- int iLen;
- LPWSTR pwzName = (LPWSTR)(new WCHAR[iLen= 1+(ULONG32)strlen(pMethName)]);
- if(pwzName)
- {
- WszMultiByteToWideChar(CP_UTF8,0, pMethName,-1, pwzName,iLen);
- PrettyPrintSigLegacy(pSig, cbSig, pwzName, &qSigName, m_pImport);
- delete [] pwzName;
- }
+ WszMultiByteToWideChar(CP_UTF8,0, pMethName,-1, pwzName,iLen);
+ PrettyPrintSigLegacy(pSig, cbSig, pwzName, &qSigName, m_pImport);
+ delete [] pwzName;
}
+ }
- VWrite("%s\tCustomAttributeName: %ls", preFix, rcName);
+ VWrite("%s\tCustomAttributeName: %s", preFix, ConvertToUtf8(rcName, rcNameUtf8, ARRAY_SIZE(rcNameUtf8)));
if (pSig && pMethName)
- VWrite(" :: %S", (LPWSTR)qSigName.Ptr());
+ {
+ int iLen = 1 + (ULONG32)qSigName.Size();
+ LPSTR pzSig = (LPSTR)(new char[iLen]);
+ VWrite(" :: %s", ConvertToUtf8((LPWSTR)qSigName.Ptr(), pzSig, iLen));
+ delete [] pzSig;
+ }
// Keep track of coff overhead.
if (!wcscmp(W("__DecoratedName"), rcName))
case ELEMENT_TYPE_U8:
CA.GetU8(&u8);
uI64 = u8;
- VWrite("%#I64x", uI64);
+ VWrite("0x%llx", uI64);
break;
case ELEMENT_TYPE_R4:
dblVal = CA.GetR4();
// simply prints out the given GUID in standard form
-LPWSTR MDInfo::GUIDAsString(GUID inGuid, _Out_writes_(bufLen) LPWSTR guidString, ULONG bufLen)
+LPCSTR MDInfo::GUIDAsString(GUID inGuid, _Out_writes_(bufLen) LPSTR guidString, ULONG bufLen)
{
- GuidToLPWSTR(inGuid, guidString, bufLen);
+ GuidToLPSTR(inGuid, guidString, bufLen);
return guidString;
-} // LPWSTR MDInfo::GUIDAsString()
+} // LPCSTR MDInfo::GUIDAsString()
#ifdef FEATURE_COMINTEROP
-LPCWSTR MDInfo::VariantAsString(VARIANT *pVariant)
+LPCSTR MDInfo::VariantAsString(VARIANT *pVariant, _Out_writes_(bufLen) LPSTR buffer, ULONG bufLen)
{
HRESULT hr = S_OK;
if (V_VT(pVariant) == VT_UNKNOWN)
{
_ASSERTE(V_UNKNOWN(pVariant) == NULL);
- return W("<NULL>");
+ return "<NULL>";
}
else if (SUCCEEDED(hr = ::VariantChangeType(pVariant, pVariant, 0, VT_BSTR)))
- return V_BSTR(pVariant);
+ {
+ return ConvertToUtf8(V_BSTR(pVariant), buffer, bufLen);
+ }
else if (hr == DISP_E_BADVARTYPE && V_VT(pVariant) == VT_I8)
{
- // allocate the bstr.
- char szStr[32];
- WCHAR wszStr[32];
// Set variant type to bstr.
V_VT(pVariant) = VT_BSTR;
- // Create the ansi string.
- sprintf_s(szStr, 32, "%lld", V_CY(pVariant).int64);
- // Convert to unicode.
- WszMultiByteToWideChar(CP_ACP, 0, szStr, -1, wszStr, 32);
- // convert to bstr and set variant value.
- V_BSTR(pVariant) = ::SysAllocString(wszStr);
- if (V_BSTR(pVariant) == NULL)
- Error("SysAllocString() failed.", E_OUTOFMEMORY);
- return V_BSTR(pVariant);
+ sprintf_s(buffer, bufLen, "%lld", V_CY(pVariant).int64);
+ return buffer;
}
else
- return W("ERROR");
+ {
+ return "ERROR";
+ }
-} // LPWSTR MDInfo::VariantAsString()
+} // LPSTR MDInfo::VariantAsString()
#endif
bool TrySigUncompress(PCCOR_SIGNATURE pData, // [IN] compressed data
HRESULT hr = NOERROR;
DWORD flags;
WCHAR rcImport[512];
+ char rcImportUtf8[ARRAY_SIZE(rcImport) * MAX_UTF8_CVT];
mdModuleRef tkModuleRef;
- char sFlags[STRING_BUFFER_LEN];
+ char szTempBuf[STRING_BUFFER_LEN];
hr = m_pImport->GetPinvokeMap(inToken, &flags, rcImport,
ARRAY_SIZE(rcImport), 0, &tkModuleRef);
}
WriteLine("\t\tPinvoke Map Data:");
- VWriteLine("\t\tEntry point: %S", rcImport);
+ VWriteLine("\t\tEntry point: %s", ConvertToUtf8(rcImport, rcImportUtf8, ARRAY_SIZE(rcImportUtf8)));
VWriteLine("\t\tModule ref: %08x", tkModuleRef);
- sFlags[0] = 0;
+ szTempBuf[0] = 0;
ISFLAG(Pm, NoMangle);
ISFLAG(Pm, CharSetNotSpec);
ISFLAG(Pm, CharSetAnsi);
ISFLAG(Pm, ThrowOnUnmappableCharEnabled);
ISFLAG(Pm, ThrowOnUnmappableCharDisabled);
ISFLAG(Pm, ThrowOnUnmappableCharUseAssem);
- if (!*sFlags)
- strcpy_s(sFlags, STRING_BUFFER_LEN, "[none]");
+ if (!*szTempBuf)
+ strcpy_s(szTempBuf, STRING_BUFFER_LEN, "[none]");
- VWriteLine("\t\tMapping flags: %s (%08x)", sFlags, flags);
+ VWriteLine("\t\tMapping flags: %s (%08x)", szTempBuf, flags);
} // void MDInfo::DisplayPinvokeInfo()
// get the name of type ref. Don't care if truncated
if (TypeFromToken(tk) == mdtTypeDef || TypeFromToken(tk) == mdtTypeRef)
{
- sprintf_s(m_tempFormatBuffer, STRING_BUFFER_LEN, " %ls",TypeDeforRefName(tk, m_szTempBuf, ARRAY_SIZE(m_szTempBuf)));
+ sprintf_s(m_tempFormatBuffer, STRING_BUFFER_LEN, " %s",TypeDeforRefName(tk, m_szTempBuf, ARRAY_SIZE(m_szTempBuf)));
IfFailGo(AddToSigBuffer(m_tempFormatBuffer));
}
else
// Print the entry point.
WCHAR memRefName[STRING_BUFFER_LEN];
+ char memRefNameUtf8[ARRAY_SIZE(memRefName) * MAX_UTF8_CVT];
HRESULT hr;
hr = m_pImport->GetMemberRefProps( pCorNLnk->m_entryPoint, NULL, memRefName,
STRING_BUFFER_LEN, NULL, NULL, NULL);
if (FAILED(hr)) Error("GetMemberRefProps failed.", hr);
- VWriteLine("%s\tEntry Point : %ls (0x%08x)", preFix, memRefName, pCorNLnk->m_entryPoint);
+ VWriteLine("%s\tEntry Point : %s (0x%08x)",
+ preFix, ConvertToUtf8(memRefName, memRefNameUtf8, ARRAY_SIZE(memRefNameUtf8)), pCorNLnk->m_entryPoint);
} // void MDInfo::DisplayCorNativeLink()
// Fills given varaint with value given in pValue and of type in bCPlusTypeFlag
ULONG cbPublicKey;
ULONG ulHashAlgId;
WCHAR szName[STRING_BUFFER_LEN];
+ char szNameUtf8[ARRAY_SIZE(szName) * MAX_UTF8_CVT];
ASSEMBLYMETADATA MetaData;
DWORD dwFlags;
WriteLine("Assembly");
WriteLine("-------------------------------------------------------");
VWriteLine("\tToken: 0x%08x", mda);
- VWriteLine("\tName : %ls", szName);
+ VWriteLine("\tName : %s", ConvertToUtf8(szName, szNameUtf8, ARRAY_SIZE(szNameUtf8)));
DumpHex("\tPublic Key ", pbPublicKey, cbPublicKey, false, 24);
VWriteLine("\tHash Algorithm : 0x%08x", ulHashAlgId);
DisplayASSEMBLYMETADATA(&MetaData);
if(MetaData.rProcessor) delete [] MetaData.rProcessor;
if(MetaData.rOS) delete [] MetaData.rOS;
- char sFlags[STRING_BUFFER_LEN];
+ char szTempBuf[STRING_BUFFER_LEN];
DWORD flags = dwFlags;
- sFlags[0] = 0;
+ szTempBuf[0] = 0;
ISFLAG(Af, PublicKey);
ISFLAG(Af, Retargetable);
ISFLAG(AfContentType_, WindowsRuntime);
- if (!*sFlags)
- strcpy_s(sFlags, STRING_BUFFER_LEN, "[none]");
+ if (!*szTempBuf)
+ strcpy_s(szTempBuf, STRING_BUFFER_LEN, "[none]");
- VWriteLine("\tFlags : %s (%08x)", sFlags, dwFlags);
+ VWriteLine("\tFlags : %s (%08x)", szTempBuf, dwFlags);
DisplayCustomAttributes(mda, "\t");
DisplayPermissions(mda, "\t");
WriteLine("");
const BYTE *pbPublicKeyOrToken;
ULONG cbPublicKeyOrToken;
WCHAR szName[STRING_BUFFER_LEN];
+ char szNameUtf8[ARRAY_SIZE(szName) * MAX_UTF8_CVT];
ASSEMBLYMETADATA MetaData;
const BYTE *pbHashValue;
ULONG cbHashValue;
if (FAILED(hr)) Error("GetAssemblyRefProps() failed.", hr);
DumpHex("\tPublic Key or Token", pbPublicKeyOrToken, cbPublicKeyOrToken, false, 24);
- VWriteLine("\tName: %ls", szName);
+ VWriteLine("\tName: %s", ConvertToUtf8(szName, szNameUtf8, ARRAY_SIZE(szNameUtf8)));
DisplayASSEMBLYMETADATA(&MetaData);
if(MetaData.szLocale) delete [] MetaData.szLocale;
if(MetaData.rProcessor) delete [] MetaData.rProcessor;
if(MetaData.rOS) delete [] MetaData.rOS;
DumpHex("\tHashValue Blob", pbHashValue, cbHashValue, false, 24);
- char sFlags[STRING_BUFFER_LEN];
+ char szTempBuf[STRING_BUFFER_LEN];
DWORD flags = dwFlags;
- sFlags[0] = 0;
+ szTempBuf[0] = 0;
ISFLAG(Af, PublicKey);
ISFLAG(Af, Retargetable);
ISFLAG(AfContentType_, WindowsRuntime);
ISFLAG(Af, Library);
ISFLAG(Af, Platform);
#endif
- if (!*sFlags)
- strcpy_s(sFlags, STRING_BUFFER_LEN, "[none]");
+ if (!*szTempBuf)
+ strcpy_s(szTempBuf, STRING_BUFFER_LEN, "[none]");
- VWriteLine("\tFlags: %s (%08x)", sFlags, dwFlags);
+ VWriteLine("\tFlags: %s (%08x)", szTempBuf, dwFlags);
DisplayCustomAttributes(inAssemblyRef, "\t");
WriteLine("");
} // void MDInfo::DisplayAssemblyRefInfo()
{
HRESULT hr;
WCHAR szName[STRING_BUFFER_LEN];
+ char szNameUtf8[ARRAY_SIZE(szName) * MAX_UTF8_CVT];
const BYTE *pbHashValue;
ULONG cbHashValue;
DWORD dwFlags;
(const void **)&pbHashValue, &cbHashValue,
&dwFlags);
if (FAILED(hr)) Error("GetFileProps() failed.", hr);
- VWriteLine("\tName : %ls", szName);
+ VWriteLine("\tName : %s", ConvertToUtf8(szName, szNameUtf8, ARRAY_SIZE(szNameUtf8)));
DumpHex("\tHashValue Blob ", pbHashValue, cbHashValue, false, 24);
- char sFlags[STRING_BUFFER_LEN];
+ char szTempBuf[STRING_BUFFER_LEN];
DWORD flags = dwFlags;
- sFlags[0] = 0;
+ szTempBuf[0] = 0;
ISFLAG(Ff, ContainsMetaData);
ISFLAG(Ff, ContainsNoMetaData);
- if (!*sFlags)
- strcpy_s(sFlags, STRING_BUFFER_LEN, "[none]");
+ if (!*szTempBuf)
+ strcpy_s(szTempBuf, STRING_BUFFER_LEN, "[none]");
- VWriteLine("\tFlags : %s (%08x)", sFlags, dwFlags);
+ VWriteLine("\tFlags : %s (%08x)", szTempBuf, dwFlags);
DisplayCustomAttributes(inFile, "\t");
WriteLine("");
{
HRESULT hr;
WCHAR szName[STRING_BUFFER_LEN];
+ char szNameUtf8[ARRAY_SIZE(szName) * MAX_UTF8_CVT];
mdToken tkImplementation;
mdTypeDef tkTypeDef;
DWORD dwFlags;
- char sFlags[STRING_BUFFER_LEN];
+ char szTempBuf[STRING_BUFFER_LEN];
VWriteLine("\tToken: 0x%08x", inExportedType);
&tkTypeDef,
&dwFlags);
if (FAILED(hr)) Error("GetExportedTypeProps() failed.", hr);
- VWriteLine("\tName: %ls", szName);
+ VWriteLine("\tName: %s", ConvertToUtf8(szName, szNameUtf8, ARRAY_SIZE(szNameUtf8)));
VWriteLine("\tImplementation token: 0x%08x", tkImplementation);
VWriteLine("\tTypeDef token: 0x%08x", tkTypeDef);
- VWriteLine("\tFlags : %s (%08x)",ClassFlags(dwFlags, sFlags), dwFlags);
+ VWriteLine("\tFlags : %s (%08x)",ClassFlags(dwFlags, szTempBuf), dwFlags);
DisplayCustomAttributes(inExportedType, "\t");
WriteLine("");
} // void MDInfo::DisplayExportedTypeInfo()
{
HRESULT hr;
WCHAR szName[STRING_BUFFER_LEN];
+ char szNameUtf8[ARRAY_SIZE(szName) * MAX_UTF8_CVT];
mdToken tkImplementation;
DWORD dwOffset;
DWORD dwFlags;
&dwOffset,
&dwFlags);
if (FAILED(hr)) Error("GetManifestResourceProps() failed.", hr);
- VWriteLine("Name: %ls", szName);
+ VWriteLine("Name: %s", ConvertToUtf8(szName, szNameUtf8, ARRAY_SIZE(szNameUtf8)));
VWriteLine("Implementation token: 0x%08x", tkImplementation);
VWriteLine("Offset: 0x%08x", dwOffset);
- char sFlags[STRING_BUFFER_LEN];
+ char szTempBuf[STRING_BUFFER_LEN];
DWORD flags = dwFlags;
- sFlags[0] = 0;
+ szTempBuf[0] = 0;
ISFLAG(Mr, Public);
ISFLAG(Mr, Private);
- if (!*sFlags)
- strcpy_s(sFlags, STRING_BUFFER_LEN, "[none]");
+ if (!*szTempBuf)
+ strcpy_s(szTempBuf, STRING_BUFFER_LEN, "[none]");
- VWriteLine("\tFlags: %s (%08x)", sFlags, dwFlags);
+ VWriteLine("\tFlags: %s (%08x)", szTempBuf, dwFlags);
DisplayCustomAttributes(inManifestResource, "\t");
WriteLine("");
} // void MDInfo::DisplayManifestResourceInfo()
{
ULONG i;
+ char szLocaleUtf8[STRING_BUFFER_LEN];
VWriteLine("\tVersion: %d.%d.%d.%d", pMetaData->usMajorVersion, pMetaData->usMinorVersion, pMetaData->usBuildNumber, pMetaData->usRevisionNumber);
VWriteLine("\tMajor Version: 0x%08x", pMetaData->usMajorVersion);
VWriteLine("\tMinor Version: 0x%08x", pMetaData->usMinorVersion);
VWriteLine("\tBuild Number: 0x%08x", pMetaData->usBuildNumber);
VWriteLine("\tRevision Number: 0x%08x", pMetaData->usRevisionNumber);
- VWriteLine("\tLocale: %ls", pMetaData->cbLocale ? pMetaData->szLocale : W("<null>"));
+ VWriteLine("\tLocale: %s", pMetaData->cbLocale ? ConvertToUtf8(pMetaData->szLocale, szLocaleUtf8, ARRAY_SIZE(szLocaleUtf8)) : "<null>");
for (i = 0; i < pMetaData->ulProcessor; i++)
VWriteLine("\tProcessor #%ld: 0x%08x", i+1, pMetaData->rProcessor[i]);
for (i = 0; i < pMetaData->ulOS; i++)
void DisplayMD(void);
+private:
#ifdef FEATURE_COMINTEROP
- LPCWSTR VariantAsString(VARIANT *pVariant);
+ LPCSTR VariantAsString(VARIANT *pVariant, _Out_writes_(bufLen) LPSTR buffer, ULONG bufLen);
#endif
void DisplayVersionInfo(void);
void DisplaySignatures(void);
void DisplaySignatureInfo(mdSignature inSignature);
- LPCWSTR TokenName(mdToken inToken, _Out_writes_(bufLen) LPWSTR buffer, ULONG bufLen);
-
- LPCWSTR TypeDeforRefName(mdToken inToken, _Out_writes_(bufLen) LPWSTR buffer, ULONG bufLen);
- LPCWSTR TypeDefName(mdTypeDef inTypeDef, _Out_writes_(bufLen) LPWSTR buffer, ULONG bufLen);
- LPCWSTR TypeRefName(mdTypeRef tr, _Out_writes_(bufLen) LPWSTR buffer, ULONG bufLen);
+ LPCSTR TypeDeforRefName(mdToken inToken, _Out_writes_(bufLen) LPSTR buffer, ULONG bufLen);
+ LPCSTR TypeDefName(mdTypeDef inTypeDef, _Out_writes_(bufLen) LPSTR buffer, ULONG bufLen);
+ LPCSTR TypeRefName(mdTypeRef tr, _Out_writes_(bufLen) LPSTR buffer, ULONG bufLen);
- LPCWSTR MemberDeforRefName(mdToken inToken, _Out_writes_(bufLen) LPWSTR buffer, ULONG bufLen);
- LPCWSTR MemberRefName(mdToken inMemRef, _Out_writes_(bufLen) LPWSTR buffer, ULONG bufLen);
- LPCWSTR MemberName(mdToken inMember, _Out_writes_(bufLen) LPWSTR buffer, ULONG bufLen);
+ LPCSTR MemberDeforRefName(mdToken inToken, _Out_writes_(bufLen) LPSTR buffer, ULONG bufLen);
+ LPCSTR MemberRefName(mdToken inMemRef, _Out_writes_(bufLen) LPSTR buffer, ULONG bufLen);
+ LPCSTR MemberName(mdToken inMember, _Out_writes_(bufLen) LPSTR buffer, ULONG bufLen);
- LPCWSTR MethodName(mdMethodDef inToken, _Out_writes_(bufLen) LPWSTR buffer, ULONG bufLen);
- LPCWSTR FieldName(mdFieldDef inToken, _Out_writes_(bufLen) LPWSTR buffer, ULONG bufLen);
+ LPCSTR MethodName(mdMethodDef inToken, _Out_writes_(bufLen) LPSTR buffer, ULONG bufLen);
+ LPCSTR FieldName(mdFieldDef inToken, _Out_writes_(bufLen) LPSTR buffer, ULONG bufLen);
char *ClassFlags(DWORD flags, _Out_writes_(STRING_BUFFER_LEN) char *sFlags);
void DisplayInterfaceImpls(mdTypeDef inTypeDef);
void DisplayInterfaceImplInfo(mdInterfaceImpl inImpl);
- LPWSTR GUIDAsString(GUID inGuid, _Out_writes_(bufLen) LPWSTR guidString, ULONG bufLen);
+ LPCSTR GUIDAsString(GUID inGuid, _Out_writes_(bufLen) LPSTR guidString, ULONG bufLen);
const char *TokenTypeName(mdToken inToken);
ULONG DumpRawColStats(ULONG ixTbl, ULONG ixCol, ULONG cRows);
const char *DumpRawNameOfType(ULONG ulType);
+public:
static void Error(const char *szError, HRESULT hr = S_OK);
private:
void Init(strPassBackFn inPBFn, DUMP_FILTER DumpFilter); // Common initialization code.
// temporary buffer for TypeDef or TypeRef name. Consume immediately
// because other functions may overwrite it.
- WCHAR m_szTempBuf[STRING_BUFFER_LEN];
+ char m_szTempBuf[STRING_BUFFER_LEN];
// temporary buffer for formatted string. Consume immediately before any function calls.
char m_tempFormatBuffer[STRING_BUFFER_LEN];
if (!IsDebuggerAttached())
return;
- LOG((LF_CORDB, LL_INFO10, "AD::NDD domain %#08x %ls\n",
- this, GetFriendlyNameForLogging()));
+ LOG((LF_CORDB, LL_INFO10, "AD::NDD domain %#08x\n", this));
LOG((LF_CORDB, LL_INFO100, "AD::NDD: Interating domain bound assemblies\n"));
AssemblyIterator i = IterateAssembliesEx((AssemblyIterationFlags)(kIncludeLoaded | kIncludeLoading | kIncludeExecution));
PTR_LoaderAllocator GetLoaderAllocator() { LIMITED_METHOD_DAC_CONTRACT; return m_pLoaderAllocator; }
#ifdef LOGGING
- LPCWSTR GetDebugName()
+ LPCUTF8 GetDebugName()
{
WRAPPER_NO_CONTRACT;
return GetPEAssembly()->GetDebugName();
}
#endif // defined (PROFILING_SUPPORTED) &&!defined(DACCESS_COMPILE)
- LOG((LF_CLASSLOADER, LL_INFO10, "Loaded pModule: \"%ws\".\n", GetDebugName()));
+ LOG((LF_CLASSLOADER, LL_INFO10, "Loaded pModule: \"%s\".\n", GetDebugName()));
}
#endif // DACCESS_COMPILE
SIZE_T size = GetDomainLocalModuleSize();
- LOG((LF_CLASSLOADER, LL_INFO10, "STATICS: Allocating %i bytes for precomputed statics in module %S in LoaderAllocator %p\n",
+ LOG((LF_CLASSLOADER, LL_INFO10, "STATICS: Allocating %zi bytes for precomputed statics in module %s in LoaderAllocator %p\n",
size, this->GetDebugName(), pLoaderAllocator));
// We guarantee alignment for 64-bit regular statics on 32-bit platforms even without FEATURE_64BIT_ALIGNMENT for performance reasons.
if (SUCCEEDED(hr))
{
m_pISymUnmanagedReader = pReader.Extract();
- LOG((LF_CORDB, LL_INFO10, "M::GISUR: Loaded symbols for module %S\n", GetDebugName()));
+ LOG((LF_CORDB, LL_INFO10, "M::GISUR: Loaded symbols for module %s\n", GetDebugName()));
}
else
{
// We failed to create the reader, don't try again next time
- LOG((LF_CORDB, LL_INFO10, "M::GISUR: Failed to load symbols for module %S\n", GetDebugName()));
+ LOG((LF_CORDB, LL_INFO10, "M::GISUR: Failed to load symbols for module %s\n", GetDebugName()));
_ASSERTE( m_pISymUnmanagedReader == k_pInvalidSymReader );
}
_ASSERTE( m_pISymUnmanagedReader == NULL );
#ifdef LOGGING
- LPCWSTR pName = NULL;
+ LPCUTF8 pName = NULL;
pName = GetDebugName();
#endif // LOGGING
const SString &GetPath() { WRAPPER_NO_CONTRACT; return m_pPEAssembly->GetPath(); }
#ifdef LOGGING
- LPCWSTR GetDebugName() { WRAPPER_NO_CONTRACT; return m_pPEAssembly->GetDebugName(); }
+ LPCUTF8 GetDebugName() { WRAPPER_NO_CONTRACT; return m_pPEAssembly->GetDebugName(); }
#endif
PEImageLayout * GetReadyToRunImage();
StackSString codeBase;
GetAssembly()->GetCodeBase(codeBase);
- LOG((LF_CLASSLOADER, LL_INFO10, "Failed to find class \"%s\" in the manifest for assembly \"%ws\"\n", szName, (LPCWSTR)codeBase));
+ LOG((LF_CLASSLOADER, LL_INFO10, "Failed to find class \"%s\" in the manifest for assembly \"%s\"\n", szName, codeBase.GetUTF8()));
}
#endif
LPCUTF8 szName = pName->GetName();
if (szName == NULL)
szName = "<UNKNOWN>";
- LOG((LF_CLASSLOADER, LL_INFO10, "Failed to find type \"%s\", assembly \"%ws\" in hash table. Incomplete = %d\n",
+ LOG((LF_CLASSLOADER, LL_INFO10, "Failed to find type \"%s\", assembly \"%s\" in hash table. Incomplete = %d\n",
szName, GetAssembly()->GetDebugName(), incomplete));
#endif
return FALSE;
{
SString name;
TypeString::AppendTypeKeyDebug(name, pTypeKey);
- LOG((LF_CLASSLOADER, LL_INFO10000, "PHASEDLOAD: About to do incremental load of type %S (%p) from level %s\n", name.GetUnicode(), typeHnd.AsPtr(), classLoadLevelName[currentLevel]));
+ LOG((LF_CLASSLOADER, LL_INFO10000, "PHASEDLOAD: About to do incremental load of type %s (%p) from level %s\n", name.GetUTF8(), typeHnd.AsPtr(), classLoadLevelName[currentLevel]));
}
#endif
{
SString name;
TypeString::AppendTypeKeyDebug(name, pTypeKey);
- LOG((LF_CLASSLOADER, LL_INFO10000, "PHASEDLOAD: LoadTypeHandleForTypeKey for type %S to level %s\n", name.GetUnicode(), classLoadLevelName[targetLevel]));
+ LOG((LF_CLASSLOADER, LL_INFO10000, "PHASEDLOAD: LoadTypeHandleForTypeKey for type %s to level %s\n", name.GetUTF8(), classLoadLevelName[targetLevel]));
CrstHolder unresolvedClassLockHolder(&m_UnresolvedClassLock);
m_pUnresolvedClassHash->Dump();
}
GuidToLPSTR(IClassXIID, rIID);
SString ssName;
thClass.GetName(ssName);
- LOG((LF_CORPROF, LL_INFO100, "COMClassicVTableCreated Class:%ls, IID:%s, vTbl:%#08x\n",
- ssName.GetUnicode(), rIID, pComVtable));
+ LOG((LF_CORPROF, LL_INFO100, "COMClassicVTableCreated Class:%s, IID:%s, vTbl:%#08x\n",
+ ssName.GetUTF8(), rIID, pComVtable));
#else
LOG((LF_CORPROF, LL_INFO100, "COMClassicVTableCreated TypeHandle:%#x, IID:{%08x-...}, vTbl:%#08x\n",
thClass.AsPtr(), IClassXIID.Data1, pComVtable));
SetDebuggerInfoBits((DebuggerAssemblyControlFlags)dacfFlags);
- LOG((LF_CORDB, LL_INFO10, "Assembly %S: bits=0x%x\n", GetDebugName(), GetDebuggerInfoBits()));
+ LOG((LF_CORDB, LL_INFO10, "Assembly %s: bits=0x%x\n", GetDebugName(), GetDebuggerInfoBits()));
#endif // DEBUGGING_SUPPORTED
}
*pdwFlags &= (~DACF_ALLOW_JIT_OPTS);
}
- LOG((LF_CORDB, LL_INFO10, "Assembly %S: has %s=%d,%d bits = 0x%x\n", GetDebugName(),
+ LOG((LF_CORDB, LL_INFO10, "Assembly %s: has %s=%d,%d bits = 0x%x\n", GetDebugName(),
DEBUGGABLE_ATTRIBUTE_TYPE_NAME,
blob[2], blob[3], *pdwFlags));
}
}
#ifdef LOGGING
- LPCWSTR GetDebugName()
+ LPCUTF8 GetDebugName()
{
WRAPPER_NO_CONTRACT;
return GetPEAssembly()->GetDebugName();
}
}
- commandLine.AppendASCII(DumpGeneratorName);
+ commandLine.AppendUTF8(DumpGeneratorName);
if (dumpName != nullptr)
{
- commandLine.AppendPrintf(" --name %S", dumpName);
+ commandLine.AppendUTF8(" --name ");
+ commandLine.Append(dumpName);
}
const char* dumpTypeOption = nullptr;
pszDebugName = (LPCUTF8)name;
}
- LOG((LF_CLASSLOADER, LL_INFO1000, "Loading class \"%s%s%s\" from module \"%ws\" in domain 0x%p %s\n",
+ LOG((LF_CLASSLOADER, LL_INFO1000, "Loading class \"%s%s%s\" from module \"%s\" in domain 0x%p %s\n",
*pszDebugNamespace ? pszDebugNamespace : "",
*pszDebugNamespace ? NAMESPACE_SEPARATOR_STR : "",
debugName.GetUTF8(),
if (peLoadedImage.IsNull())
{
// Failed to locate the native composite R2R image
- LOG((LF_LOADER, LL_ALWAYS, "LOADER: failed to load native image '%s' for component assembly '%s' using search paths: '%S'\n",
+#ifdef LOGGING
+ SString searchPaths(searchPathsConfig != nullptr ? searchPathsConfig : W("<use DOTNET_NativeImageSearchPaths to set>"));
+ LOG((LF_LOADER, LL_ALWAYS, "LOADER: failed to load native image '%s' for component assembly '%s' using search paths: '%s'\n",
nativeImageFileName,
path.GetUTF8(),
- searchPathsConfig != nullptr ? searchPathsConfig : W("<use COMPlus_NativeImageSearchPaths to set>")));
+ searchPaths.GetUTF8()));
+#endif // LOGGING
RaiseFailFastException(nullptr, nullptr, 0);
}
}
}
CONTRACTL_END;
-#if _DEBUG
+#ifdef LOGGING
m_pDebugName = NULL;
-#endif
+#endif // LOGGING
m_PEImage = NULL;
m_MDImportIsRW_Debugger_Use_Only = FALSE;
m_pMDImport = NULL;
m_pHostAssembly = pBindResultInfo;
}
-#if _DEBUG
+#ifdef LOGGING
GetPathOrCodeBase(m_debugName);
- m_debugName.Normalize();
- m_pDebugName = m_debugName;
-#endif
+ m_pDebugName = m_debugName.GetUTF8();
+#endif // LOGGING
}
#endif // !DACCESS_COMPILE
DAC_ENUM_DTHIS();
EMEM_OUT(("MEM: %p PEAssembly\n", dac_cast<TADDR>(this)));
-#ifdef _DEBUG
+#ifdef LOGGING
// Not a big deal if it's NULL or fails.
m_debugName.EnumMemoryRegions(flags);
-#endif
+#endif // LOGGING
if (m_PEImage.IsValid())
{
#ifdef LOGGING
// This is useful for log messages
- LPCWSTR GetDebugName();
-#endif
+ LPCUTF8 GetDebugName();
+#endif // LOGGING
// ------------------------------------------------------------
// Checks
// Instance fields
// ------------------------------------------------------------
-#ifdef _DEBUG
- LPCWSTR m_pDebugName;
+#ifdef LOGGING
+ LPCUTF8 m_pDebugName;
SString m_debugName;
-#endif
+#endif // LOGGING
// IL image, NULL if dynamic
PTR_PEImage m_PEImage;
#endif // DACCESS_COMPILE
#ifdef LOGGING
-inline LPCWSTR PEAssembly::GetDebugName()
+inline LPCUTF8 PEAssembly::GetDebugName()
{
CONTRACTL
{
CANNOT_TAKE_LOCK;
}
CONTRACTL_END;
-
-#ifdef _DEBUG
return m_pDebugName;
-#else
- return GetPath();
-#endif
}
-#endif
+#endif // LOGGING
// ------------------------------------------------------------
// Classification
{
SString name;
TypeString::AppendTypeKeyDebug(name, &m_typeKey);
- LOG((LF_CLASSLOADER, LL_INFO10000, "PHASEDLOAD: Creating loading entry for type %S\n", name.GetUnicode()));
+ LOG((LF_CLASSLOADER, LL_INFO10000, "PHASEDLOAD: Creating loading entry for type %s\n", name.GetUTF8()));
}
#endif
}
SString path;
- path.Printf("%Sperf-%d.map", &tempPath, pid);
+ path.Append(tempPath);
+ path.AppendPrintf("perf-%d.map", pid);
// Open the map file for writing.
OpenFile(path);
pszSig[0] = '\0';
}
}
-
-// Create a new native image perf map.
-NativeImagePerfMap::NativeImagePerfMap(Assembly * pAssembly, BSTR pDestPath)
- : PerfMap()
-{
- STANDARD_VM_CONTRACT;
-
- // Generate perfmap path.
-
- // Get the assembly simple name.
- LPCUTF8 lpcSimpleName = pAssembly->GetSimpleName();
-
- // Get the native image signature (GUID).
- // Used to ensure that we match symbols to the correct NGEN image.
- CHAR szSignature[GUID_STR_BUFFER_LEN];
- GetNativeImageSignature(pAssembly->GetPEAssembly(), szSignature, ARRAY_SIZE(szSignature));
-
- // Build the path to the perfmap file, which consists of <inputpath><imagesimplename>.ni.<signature>.map.
- // Example: /tmp/System.Private.CoreLib.ni.{GUID}.map
- SString sDestPerfMapPath;
- sDestPerfMapPath.Printf("%S%s.ni.%s.map", pDestPath, lpcSimpleName, szSignature);
-
- // Open the perf map file.
- OpenFile(sDestPerfMapPath);
-
- // Determine whether to emit RVAs or file offsets based on the specified configuration.
- m_EmitRVAs = true;
- CLRConfigStringHolder wszFormat(CLRConfig::GetConfigValue(CLRConfig::EXTERNAL_NativeImagePerfMapFormat));
- if(wszFormat != NULL && (wcsncmp(wszFormat, strOFFSET, wcslen(strOFFSET)) == 0))
- {
- m_EmitRVAs = false;
- }
-}
-
-// Log data to the perfmap for the specified module.
-void NativeImagePerfMap::LogDataForModule(Module * pModule)
-{
- STANDARD_VM_CONTRACT;
-
- PEImageLayout * pLoadedLayout = pModule->GetPEAssembly()->GetLoadedLayout();
- _ASSERTE(pLoadedLayout != nullptr);
-
- ReadyToRunInfo::MethodIterator mi(pModule->GetReadyToRunInfo());
- while (mi.Next())
- {
- MethodDesc* hotDesc = mi.GetMethodDesc();
-
- LogPreCompiledMethod(hotDesc, mi.GetMethodStartAddress(), pLoadedLayout, "ReadyToRun");
- }
-}
-
-// Log a pre-compiled method to the perfmap.
-void NativeImagePerfMap::LogPreCompiledMethod(MethodDesc * pMethod, PCODE pCode, PEImageLayout *pLoadedLayout, const char *optimizationTier)
-{
- STANDARD_VM_CONTRACT;
-
- _ASSERTE(pLoadedLayout != nullptr);
- SIZE_T baseAddr = (SIZE_T)pLoadedLayout->GetBase();
-
- // Get information about the NGEN'd method code.
- EECodeInfo codeInfo(pCode);
- _ASSERTE(codeInfo.IsValid());
-
- IJitManager::MethodRegionInfo methodRegionInfo;
- codeInfo.GetMethodRegionInfo(&methodRegionInfo);
-
- // NGEN can split code between hot and cold sections which are separate in memory.
- // Emit an entry for each section if it is used.
- PCODE addr;
- if (methodRegionInfo.hotSize > 0)
- {
- addr = (PCODE)methodRegionInfo.hotStartAddress - baseAddr;
- if (!m_EmitRVAs)
- {
- addr = pLoadedLayout->RvaToOffset(addr);
- }
- LogMethod(pMethod, addr, methodRegionInfo.hotSize, optimizationTier);
- }
-
- if (methodRegionInfo.coldSize > 0)
- {
- addr = (PCODE)methodRegionInfo.coldStartAddress - baseAddr;
- if (!m_EmitRVAs)
- {
- addr = pLoadedLayout->RvaToOffset(addr);
- }
- LogMethod(pMethod, addr, methodRegionInfo.coldSize, optimizationTier);
- }
-}
-
#endif // FEATURE_PERFMAP && !DACCESS_COMPILE
// Close the map and flush any remaining data.
static void Destroy();
};
-
-// Generates a perfmap file for a native image by running crossgen.
-class NativeImagePerfMap : PerfMap
-{
-private:
- const WCHAR *strOFFSET = W("OFFSET");
-
- // Specify the address format since it's now possible for 'perf script' to output file offsets or RVAs.
- bool m_EmitRVAs;
-
- // Log a pre-compiled method to the map.
- void LogPreCompiledMethod(MethodDesc * pMethod, PCODE pCode, PEImageLayout *pLoadedLayout, const char *optimizationTier);
-
-public:
- // Construct a new map for a native image.
- NativeImagePerfMap(Assembly * pAssembly, BSTR pDestPath);
-
- // Log method information for each module.
- void LogDataForModule(Module * pModule);
-};
-
#endif // PERFPID_H
STATIC_CONTRACT_GC_NOTRIGGER;
STATIC_CONTRACT_FORBID_FAULT;
- int length = pStringData->GetCharCount();
- length = min(length, 100);
+ ULONG length = pStringData->GetCharCount();
+ length = min(length, 128);
WCHAR *szString = (WCHAR *)_alloca((length + 1) * sizeof(WCHAR));
memcpyNoGCRefs((void*)szString, (void*)pStringData->GetStringBuffer(), length * sizeof(WCHAR));
szString[length] = '\0';
- LOG((LF_APPDOMAIN, LL_INFO10000, "String literal \"%S\" %s to Global map, size %d bytes\n", szString, action, pStringData->GetCharCount()));
+
+ LPCUTF8 strUtf8 = "<Failed to convert to UTF8>";
+ MAKE_UTF8PTR_FROMWIDE_NOTHROW(cvtStr, szString);
+ if (cvtStr != NULL)
+ strUtf8 = cvtStr;
+
+ LOG((LF_APPDOMAIN, LL_INFO10000, "String literal \"%s\" %s to Global map, %u characters\n", strUtf8, action, length));
}
#endif
SyncBlockCache *pCache = SyncBlockCache::GetSyncBlockCache();
- LogSpewAlways("Dumping SyncBlockCache size %d\n", pCache->m_FreeSyncTableIndex);
+ LogSpewAlways("Dumping SyncBlockCache size %u\n", pCache->m_FreeSyncTableIndex);
static int dumpSBStyle = -1;
if (dumpSBStyle == -1)
if (dumpSBStyle == 0)
return;
- BOOL isString = FALSE;
DWORD objectCount = 0;
DWORD slotCount = 0;
for (DWORD nb = 1; nb < pCache->m_FreeSyncTableIndex; nb++)
{
- isString = FALSE;
- char buffer[1024], buffer2[1024];
+ char buffer[1024];
LPCUTF8 descrip = "null";
SyncTableEntry *pEntry = &SyncTableEntry::GetSyncTableEntry()[nb];
Object *oref = (Object *) pEntry->m_Object;
{
LPCUTF8 descrip;
Object *oref;
- char *buffer2;
- UINT cch2;
- BOOL isString;
} param;
param.descrip = descrip;
param.oref = oref;
- param.buffer2 = buffer2;
- param.cch2 = ARRAY_SIZE(buffer2);
- param.isString = isString;
PAL_TRY(Param *, pParam, ¶m)
{
pParam->descrip = pParam->oref->GetMethodTable()->GetDebugClassName();
if (strlen(pParam->descrip) == 0)
pParam->descrip = "<INVALID>";
- else if (pParam->oref->GetMethodTable() == g_pStringClass)
- {
- sprintf_s(pParam->buffer2, pParam->cch2, "%s (%S)", pParam->descrip, ObjectToSTRINGREF((StringObject*)pParam->oref)->GetBuffer());
- pParam->descrip = pParam->buffer2;
- pParam->isString = TRUE;
- }
}
PAL_EXCEPT(EXCEPTION_EXECUTE_HANDLER) {
param.descrip = "<INVALID>";
PAL_ENDTRY
descrip = param.descrip;
- isString = param.isString;
}
sprintf_s(buffer, ARRAY_SIZE(buffer), "%s", descrip);
descrip = buffer;
}
if (dumpSBStyle < 2)
- LogSpewAlways("[%4.4d]: %8.8x %s\n", nb, oref, descrip);
- else if (dumpSBStyle == 2 && ! isString)
+ LogSpewAlways("[%4.4d]: %zx %s\n", nb, oref, descrip);
+ else if (dumpSBStyle == 2)
LogSpewAlways("[%4.4d]: %s\n", nb, descrip);
}
LogSpewAlways("Done dumping SyncBlockCache used slots: %d, objects: %d\n", slotCount, objectCount);