summaryrefslogtreecommitdiff
path: root/src/debug/daccess/nidump.cpp
diff options
context:
space:
mode:
authordanmosemsft <danmose@microsoft.com>2017-02-11 07:20:12 -0800
committerdanmosemsft <danmose@microsoft.com>2017-02-11 07:20:12 -0800
commit56d4ba8a9338c3ff7378d18378f38ad847f130f2 (patch)
tree40b9463880286b1bc0b4c3f858680f1ff210c933 /src/debug/daccess/nidump.cpp
parent8be2f9bb0039e2c49f59c4fb66cebf5467485ba2 (diff)
downloadcoreclr-56d4ba8a9338c3ff7378d18378f38ad847f130f2.tar.gz
coreclr-56d4ba8a9338c3ff7378d18378f38ad847f130f2.tar.bz2
coreclr-56d4ba8a9338c3ff7378d18378f38ad847f130f2.zip
Revert "Remove always defined FEATURE_CORESYSTEM"
This reverts commit 751771a8976f909af772e35c167bd7e3ffbe44c8.
Diffstat (limited to 'src/debug/daccess/nidump.cpp')
-rw-r--r--src/debug/daccess/nidump.cpp48
1 files changed, 48 insertions, 0 deletions
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 )
{