summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/debug/daccess/dacdbiimpl.cpp4
-rw-r--r--src/debug/di/module.cpp2
-rw-r--r--src/debug/ee/debugger.cpp15
-rw-r--r--src/utilcode/clrhost_nodependencies.cpp4
4 files changed, 19 insertions, 6 deletions
diff --git a/src/debug/daccess/dacdbiimpl.cpp b/src/debug/daccess/dacdbiimpl.cpp
index 755b4a0c23..908c31b8aa 100644
--- a/src/debug/daccess/dacdbiimpl.cpp
+++ b/src/debug/daccess/dacdbiimpl.cpp
@@ -480,7 +480,7 @@ BOOL DacDbiInterfaceImpl::IsTransitionStub(CORDB_ADDRESS address)
// Currently IsIPInModule() is not implemented in the PAL. Rather than skipping the check, we should
// either E_NOTIMPL this API or implement IsIPInModule() in the PAL. Since ICDProcess::IsTransitionStub()
// is only called by VS in mixed-mode debugging scenarios, and mixed-mode debugging is not supported on
- // Mac, there is really no incentive to implement this API on Mac at this point.
+ // POSIX systems, there is really no incentive to implement this API at this point.
ThrowHR(E_NOTIMPL);
#else // !FEATURE_PAL
@@ -5621,7 +5621,7 @@ void DacDbiInterfaceImpl::GetContext(VMPTR_Thread vmThread, DT_CONTEXT * pContex
// thread handle. The function to do the conversion is OpenThread(), which is not implemented in PAL.
// Instead, we just zero out the seed CONTEXT for the stackwalk. This tells the stackwalker to
// start the stackwalk with the first explicit frame. This won't work when we do native debugging,
- // but that won't happen on the Linux/Mac since they don't support native debugging.
+ // but that won't happen on the POSIX systems since they don't support native debugging.
ZeroMemory(pContextBuffer, sizeof(*pContextBuffer));
#else // FEATURE_PAL
pContextBuffer->ContextFlags = CONTEXT_ALL;
diff --git a/src/debug/di/module.cpp b/src/debug/di/module.cpp
index d88b789080..f9ecf431ec 100644
--- a/src/debug/di/module.cpp
+++ b/src/debug/di/module.cpp
@@ -882,7 +882,7 @@ HRESULT CordbModule::InitPublicMetaDataFromFile(const WCHAR * pszFullPathName,
bool validateFileInfo)
{
#ifdef FEATURE_PAL
- // TODO: Some intricate details of file mapping don't work on Linux as on Windows.
+ // UNIXTODO: Some intricate details of file mapping don't work on Linux as on Windows.
// We have to revisit this and try to fix it for POSIX system.
return E_FAIL;
#else
diff --git a/src/debug/ee/debugger.cpp b/src/debug/ee/debugger.cpp
index f091b3c9fe..bf6b6bdc83 100644
--- a/src/debug/ee/debugger.cpp
+++ b/src/debug/ee/debugger.cpp
@@ -16736,7 +16736,7 @@ void *DebuggerHeap::Alloc(DWORD size)
// We don't have executable heap in PAL, but we still need to allocate
// executable memory, that's why have change protection level for
// each allocation.
- // TODO: We need to look how JIT solves this problem.
+ // UNIXTODO: We need to look how JIT solves this problem.
DWORD unusedFlags;
if (!VirtualProtect(ret, size, PAGE_EXECUTE_READWRITE, &unusedFlags))
{
@@ -16786,6 +16786,19 @@ void *DebuggerHeap::Realloc(void *pMem, DWORD newSize, DWORD oldSize)
this->Free(pMem);
#endif
+
+#ifdef FEATURE_PAL
+ // We don't have executable heap in PAL, but we still need to allocate
+ // executable memory, that's why have change protection level for
+ // each allocation.
+ // UNIXTODO: We need to look how JIT solves this problem.
+ DWORD unusedFlags;
+ if (!VirtualProtect(ret, newSize, PAGE_EXECUTE_READWRITE, &unusedFlags))
+ {
+ _ASSERTE(!"VirtualProtect failed to make this memory executable");
+ }
+#endif // FEATURE_PAL
+
return ret;
}
diff --git a/src/utilcode/clrhost_nodependencies.cpp b/src/utilcode/clrhost_nodependencies.cpp
index d95ac8f55a..fc670d8b5f 100644
--- a/src/utilcode/clrhost_nodependencies.cpp
+++ b/src/utilcode/clrhost_nodependencies.cpp
@@ -584,7 +584,7 @@ BOOL DbgIsExecutable(LPVOID lpMem, SIZE_T length)
#if defined(CROSSGEN_COMPILE) || defined(FEATURE_PAL)
// No NX support on PAL or for crossgen compilations.
return TRUE;
-#else // !defined(CROSSGEN_COMPILE)
+#else // !(CROSSGEN_COMPILE || FEATURE_PAL)
BYTE *regionStart = (BYTE*) ALIGN_DOWN((BYTE*)lpMem, OS_PAGE_SIZE);
BYTE *regionEnd = (BYTE*) ALIGN_UP((BYTE*)lpMem+length, OS_PAGE_SIZE);
_ASSERTE(length > 0);
@@ -606,7 +606,7 @@ BOOL DbgIsExecutable(LPVOID lpMem, SIZE_T length)
}
return TRUE;
-#endif // defined(CROSSGEN_COMPILE)
+#endif // CROSSGEN_COMPILE || FEATURE_PAL
}
#endif //_DEBUG