diff options
Diffstat (limited to 'src/debug/daccess')
-rw-r--r-- | src/debug/daccess/daccess.cpp | 12 | ||||
-rw-r--r-- | src/debug/daccess/dacimpl.h | 5 | ||||
-rw-r--r-- | src/debug/daccess/nidump.cpp | 48 |
3 files changed, 65 insertions, 0 deletions
diff --git a/src/debug/daccess/daccess.cpp b/src/debug/daccess/daccess.cpp index c5781ae54d..69167ab07e 100644 --- a/src/debug/daccess/daccess.cpp +++ b/src/debug/daccess/daccess.cpp @@ -6573,6 +6573,7 @@ bool ClrDataAccess::GetILImageInfoFromNgenPEFile(PEFile *peFile, return true; } +#if defined(FEATURE_CORESYSTEM) /* static */ // We extract "ni.dll or .ni.winmd" from the NGEM image name to obtain the IL image name. // In the end we add given ilExtension. @@ -6631,6 +6632,7 @@ bool ClrDataAccess::GetILImageNameFromNgenImage( LPCWSTR ilExtension, return false; } +#endif // FEATURE_CORESYSTEM void * ClrDataAccess::GetMetaDataFromHost(PEFile* peFile, @@ -6740,6 +6742,7 @@ ClrDataAccess::GetMetaDataFromHost(PEFile* peFile, goto ErrExit; } +#if defined(FEATURE_CORESYSTEM) const WCHAR* ilExtension[] = {W("dll"), W("winmd")}; WCHAR ngenImageName[MAX_LONGPATH] = {0}; if (wcscpy_s(ngenImageName, NumItems(ngenImageName), uniPath) != 0) @@ -6757,6 +6760,7 @@ ClrDataAccess::GetMetaDataFromHost(PEFile* peFile, { goto ErrExit; } +#endif//FEATURE_CORESYSTEM // RVA size in ngen image and IL image is the same. Because the only // different is in RVA. That is 4 bytes column fixed. @@ -6789,11 +6793,13 @@ ClrDataAccess::GetMetaDataFromHost(PEFile* peFile, (BYTE*)buffer, NULL); } +#if defined(FEATURE_CORESYSTEM) if (SUCCEEDED(hr)) { break; } } +#endif // FEATURE_CORESYSTEM } if (FAILED(hr)) @@ -6983,8 +6989,10 @@ bool ClrDataAccess::TargetConsistencyAssertsEnabled() return m_fEnableTargetConsistencyAsserts; } +#ifdef FEATURE_CORESYSTEM #define ctime_s _ctime32_s #define time_t __time32_t +#endif // // VerifyDlls - Validate that the mscorwks in the target matches this version of mscordacwks @@ -7524,7 +7532,11 @@ BOOL OutOfProcessExceptionEventGetProcessIdAndThreadId(HANDLE hProcess, HANDLE h *pPId = (DWORD)hProcess; *pThreadId = (DWORD)hThread; #else +#if !defined(FEATURE_CORESYSTEM) + HMODULE hKernel32 = WszGetModuleHandle(W("kernel32.dll")); +#else HMODULE hKernel32 = WszGetModuleHandle(W("api-ms-win-core-processthreads-l1-1-1.dll")); +#endif if (hKernel32 == NULL) { return FALSE; diff --git a/src/debug/daccess/dacimpl.h b/src/debug/daccess/dacimpl.h index 91722f5d1f..635be80232 100644 --- a/src/debug/daccess/dacimpl.h +++ b/src/debug/daccess/dacimpl.h @@ -14,11 +14,14 @@ #ifndef __DACIMPL_H__ #define __DACIMPL_H__ +#if defined(_TARGET_ARM_) || defined(FEATURE_CORESYSTEM) // @ARMTODO: STL breaks the build with current VC headers //--------------------------------------------------------------------------------------- // Setting DAC_HASHTABLE tells the DAC to use the hand rolled hashtable for // storing code:DAC_INSTANCE . Otherwise, the DAC uses the STL unordered_map to. #define DAC_HASHTABLE +#endif // _TARGET_ARM_|| FEATURE_CORESYSTEM + #ifndef DAC_HASHTABLE #pragma push_macro("return") #undef return @@ -1479,9 +1482,11 @@ public: DWORD &dwSize, __out_ecount(cchPath) LPWSTR wszPath, const DWORD cchPath); +#if defined(FEATURE_CORESYSTEM) static bool GetILImageNameFromNgenImage(LPCWSTR ilExtension, __out_ecount(cchFilePath) LPWSTR wszFilePath, const DWORD cchFilePath); +#endif // FEATURE_CORESYSTEM }; extern ClrDataAccess* g_dacImpl; diff --git a/src/debug/daccess/nidump.cpp b/src/debug/daccess/nidump.cpp index 3818c4f2bd..9eb761ba32 100644 --- a/src/debug/daccess/nidump.cpp +++ b/src/debug/daccess/nidump.cpp @@ -15,6 +15,9 @@ #include <comcallablewrapper.h> #include <gcdump.h> +#if !defined(FEATURE_CORESYSTEM) +#include <algorithm> +#endif #include <constrainedexecutionregion.h> @@ -28,6 +31,11 @@ #include <mdfileformat.h> +#if !defined(FEATURE_CORESYSTEM) +#include <cassert> +#undef _ASSERTE +#define _ASSERTE(x) assert(x) +#endif #include <compile.h> @@ -6042,6 +6050,16 @@ void NativeImageDumper::DumpTypes(PTR_Module module) //there may be duplicates in the list. Remove them before moving on. COUNT_T mtCount = m_discoveredMTs.GetCount(); +#if !defined(FEATURE_CORESYSTEM) // no STL right now + std::sort(&*m_discoveredMTs.Begin(), + (&*m_discoveredMTs.Begin()) + + (m_discoveredMTs.End() - m_discoveredMTs.Begin())); + PTR_MethodTable* newEnd = std::unique(&*m_discoveredMTs.Begin(), + (&*m_discoveredMTs.Begin()) + + (m_discoveredMTs.End() + - m_discoveredMTs.Begin())); + mtCount = (COUNT_T)(newEnd - &*m_discoveredMTs.Begin()); +#endif DisplayStartArray( "MethodTables", NULL, METHODTABLES ); for(COUNT_T i = 0; i < mtCount; ++i ) @@ -6057,6 +6075,15 @@ void NativeImageDumper::DumpTypes(PTR_Module module) DisplayStartArray( "MethodTableSlotChunks", NULL, METHODTABLES ); { COUNT_T slotChunkCount = m_discoveredSlotChunks.GetCount(); +#if !defined(FEATURE_CORESYSTEM) // no STL right now + std::sort(&*m_discoveredSlotChunks.Begin(), + (&*m_discoveredSlotChunks.Begin()) + + (m_discoveredSlotChunks.End() - m_discoveredSlotChunks.Begin())); + SlotChunk *newEndChunks = std::unique(&*m_discoveredSlotChunks.Begin(), + (&*m_discoveredSlotChunks.Begin()) + + (m_discoveredSlotChunks.End() - m_discoveredSlotChunks.Begin())); + slotChunkCount = (COUNT_T)(newEndChunks - &*m_discoveredSlotChunks.Begin()); +#endif for (COUNT_T i = 0; i < slotChunkCount; ++i) { @@ -6071,6 +6098,16 @@ void NativeImageDumper::DumpTypes(PTR_Module module) //there may be duplicates in the list. Remove them before moving on. COUNT_T clazzCount = m_discoveredClasses.GetCount(); +#if !defined(FEATURE_CORESYSTEM) // no STL right now + std::sort(&*m_discoveredClasses.Begin(), + (&*m_discoveredClasses.Begin()) + + (m_discoveredClasses.End() - m_discoveredClasses.Begin())); + PTR_MethodTable * newEndClazz = std::unique(&*m_discoveredClasses.Begin(), + (&*m_discoveredClasses.Begin()) + +(m_discoveredClasses.End() + -m_discoveredClasses.Begin())); + clazzCount = (COUNT_T)(newEndClazz - &*m_discoveredClasses.Begin()); +#endif for(COUNT_T i = 0; i < clazzCount; ++i ) { @@ -6089,6 +6126,17 @@ void NativeImageDumper::DumpTypes(PTR_Module module) //there may be duplicates in the list. Remove them before moving on. COUNT_T tdCount = m_discoveredTypeDescs.GetCount(); +#if !defined(FEATURE_CORESYSTEM) // no STL right now + std::sort(&*m_discoveredTypeDescs.Begin(), + (&*m_discoveredTypeDescs.Begin()) + + (m_discoveredTypeDescs.End() + - m_discoveredTypeDescs.Begin())); + PTR_TypeDesc* newEndTD = std::unique(&*m_discoveredTypeDescs.Begin(), + (&*m_discoveredTypeDescs.Begin()) + +(m_discoveredTypeDescs.End() + -m_discoveredTypeDescs.Begin())); + tdCount = (COUNT_T)(newEndTD - &*m_discoveredTypeDescs.Begin()); +#endif for(COUNT_T i = 0; i < tdCount; ++i ) { |