@@ -149,7 +149,7 @@ CrashInfo::LogMessage(
149
149
// Gather all the necessary crash dump info.
150
150
//
151
151
bool
152
- CrashInfo::GatherCrashInfo (DumpType* dumpType)
152
+ CrashInfo::GatherCrashInfo (DumpType dumpType)
153
153
{
154
154
// Get the info about the threads (registers, etc.)
155
155
for (ThreadInfo* thread : m_threads)
@@ -182,7 +182,7 @@ CrashInfo::GatherCrashInfo(DumpType* dumpType)
182
182
}
183
183
#endif
184
184
// Load and initialize DAC interfaces
185
- if (!InitializeDAC ())
185
+ if (!InitializeDAC (dumpType ))
186
186
{
187
187
return false ;
188
188
}
@@ -208,13 +208,8 @@ CrashInfo::GatherCrashInfo(DumpType* dumpType)
208
208
region.Trace ();
209
209
}
210
210
}
211
- // If the DAC module present side-by-side (the default for single-file and native AOT apps), fallback to full dump.
212
- if (m_pClrDataProcess == nullptr )
213
- {
214
- *dumpType = DumpType::Full;
215
- }
216
211
// If full memory dump, include everything regardless of permissions
217
- if (* dumpType == DumpType::Full)
212
+ if (dumpType == DumpType::Full)
218
213
{
219
214
for (const MemoryRegion& region : m_moduleMappings)
220
215
{
@@ -233,7 +228,7 @@ CrashInfo::GatherCrashInfo(DumpType* dumpType)
233
228
{
234
229
// Add all the heap read/write memory regions (m_otherMappings contains the heaps). On Alpine
235
230
// the heap regions are marked RWX instead of just RW.
236
- if (* dumpType == DumpType::Heap)
231
+ if (dumpType == DumpType::Heap)
237
232
{
238
233
for (const MemoryRegion& region : m_otherMappings)
239
234
{
@@ -283,9 +278,9 @@ GetHResultString(HRESULT hr)
283
278
// Enumerate all the memory regions using the DAC memory region support given a minidump type
284
279
//
285
280
bool
286
- CrashInfo::InitializeDAC ()
281
+ CrashInfo::InitializeDAC (DumpType dumpType )
287
282
{
288
- // Don't attempt to load the DAC if createdump is statically linked into the runtime
283
+ // Don't attempt to load the DAC if native AOT app (there is no DAC)
289
284
if (m_appModel == AppModelType::NativeAOT)
290
285
{
291
286
return true ;
@@ -312,15 +307,7 @@ CrashInfo::InitializeDAC()
312
307
m_dacModule = dlopen (dacPath.c_str (), RTLD_LAZY);
313
308
if (m_dacModule == nullptr )
314
309
{
315
- // Don't fail for single-file apps when the DAC can't be found. Will fall back to full dump.
316
- if (m_appModel == AppModelType::SingleFile)
317
- {
318
- result = true ;
319
- }
320
- else
321
- {
322
- printf_error (" InitializeDAC: dlopen(%s) FAILED %s\n " , dacPath.c_str (), dlerror ());
323
- }
310
+ printf_error (" InitializeDAC: dlopen(%s) FAILED %s\n " , dacPath.c_str (), dlerror ());
324
311
goto exit ;
325
312
}
326
313
pfnDllMain = (PFN_DLLMAIN)dlsym (m_dacModule, " DllMain" );
0 commit comments