Skip to content

Commit c215266

Browse files
committed
Only use cDAC on platforms where we implement functionality to get an export symbol
1 parent 85ffbda commit c215266

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/coreclr/debug/daccess/daccess.cpp

+6-1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@
3030
#include <dactablerva.h>
3131
#else
3232
extern "C" bool TryGetSymbol(ICorDebugDataTarget* dataTarget, uint64_t baseAddress, const char* symbolName, uint64_t* symbolAddress);
33+
// cDAC depends on symbol lookup to find the contract descriptor
34+
#define CAN_USE_CDAC
3335
#endif
3436

3537
#include "dwbucketmanager.hpp"
@@ -5493,6 +5495,8 @@ ClrDataAccess::Initialize(void)
54935495
IfFailRet(GetDacGlobalValues());
54945496
IfFailRet(DacGetHostVtPtrs());
54955497

5498+
// TODO: [cdac] TryGetSymbol is only implemented for Linux, OSX, and Windows.
5499+
#ifdef CAN_USE_CDAC
54965500
CLRConfigNoCache enable = CLRConfigNoCache::Get("ENABLE_CDAC");
54975501
if (enable.IsSet())
54985502
{
@@ -5513,6 +5517,7 @@ ClrDataAccess::Initialize(void)
55135517
}
55145518
}
55155519
}
5520+
#endif
55165521

55175522
//
55185523
// DAC is now setup and ready to use
@@ -6945,7 +6950,7 @@ GetDacTableAddress(ICorDebugDataTarget* dataTarget, ULONG64 baseAddress, PULONG6
69456950
return E_INVALIDARG;
69466951
}
69476952
#endif
6948-
// On MacOS, FreeBSD or NetBSD use the RVA include file
6953+
// On FreeBSD, NetBSD, or SunOS use the RVA include file
69496954
*dacTableAddress = baseAddress + DAC_TABLE_RVA;
69506955
#else
69516956
// Otherwise, try to get the dac table address via the export symbol

0 commit comments

Comments
 (0)