summaryrefslogtreecommitdiff
path: root/src/debug/shared/dbgtransportsession.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/debug/shared/dbgtransportsession.cpp')
-rw-r--r--src/debug/shared/dbgtransportsession.cpp36
1 files changed, 1 insertions, 35 deletions
diff --git a/src/debug/shared/dbgtransportsession.cpp b/src/debug/shared/dbgtransportsession.cpp
index 14b509aa9c..95fdf25457 100644
--- a/src/debug/shared/dbgtransportsession.cpp
+++ b/src/debug/shared/dbgtransportsession.cpp
@@ -1140,33 +1140,6 @@ DbgTransportSession::Message * DbgTransportSession::RemoveMessageFromSendQueue(D
#ifndef RIGHT_SIDE_COMPILE
-#ifdef FEATURE_PAL
-__attribute__((noinline))
-__attribute__((optnone))
-static void
-ProbeMemory(__in_ecount(cbBuffer) volatile PBYTE pbBuffer, DWORD cbBuffer, bool fWriteAccess)
-{
- // Need an throw in this function to fool the C++ runtime into handling the
- // possible h/w exception below.
- if (pbBuffer == NULL)
- {
- throw PAL_SEHException();
- }
-
- // Simple one byte at a time probing
- while (cbBuffer > 0)
- {
- volatile BYTE read = *pbBuffer;
- if (fWriteAccess)
- {
- *pbBuffer = read;
- }
- ++pbBuffer;
- --cbBuffer;
- }
-}
-#endif // FEATURE_PAL
-
// Check read and optionally write memory access to the specified range of bytes. Used to check
// ReadProcessMemory and WriteProcessMemory requests.
HRESULT DbgTransportSession::CheckBufferAccess(__in_ecount(cbBuffer) PBYTE pbBuffer, DWORD cbBuffer, bool fWriteAccess)
@@ -1220,14 +1193,7 @@ HRESULT DbgTransportSession::CheckBufferAccess(__in_ecount(cbBuffer) PBYTE pbBuf
}
while (cbBuffer > 0);
#else
- try
- {
- // Need to explicit h/w exception holder so to catch them in ProbeMemory
- CatchHardwareExceptionHolder __catchHardwareException;
-
- ProbeMemory(pbBuffer, cbBuffer, fWriteAccess);
- }
- catch(...)
+ if (!PAL_ProbeMemory(pbBuffer, cbBuffer, fWriteAccess))
{
return HRESULT_FROM_WIN32(ERROR_INVALID_ADDRESS);
}