From e46ae5921c510309f252af21c2a88d341e4e15ab Mon Sep 17 00:00:00 2001 From: Mike McLaughlin Date: Wed, 29 May 2019 23:39:31 -0700 Subject: Use /proc//mem to read memory in remote DBI data target. It makes the test case run at (#24844) least 4 to 5 times faster than before. Fallback to old transport ReadMemory if /proc//mem can't be opened. This happens on attach because of permissions/access, but works fine on the launch (the most important case). --- src/pal/inc/pal.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/pal/inc/pal.h') diff --git a/src/pal/inc/pal.h b/src/pal/inc/pal.h index bcb4e8ce8f..884b737d15 100644 --- a/src/pal/inc/pal.h +++ b/src/pal/inc/pal.h @@ -4138,6 +4138,7 @@ PAL_GetCurrentThreadAffinitySet(SIZE_T size, UINT_PTR* data); #define _strdup PAL__strdup #define _getcwd PAL__getcwd #define _open PAL__open +#define _pread PAL__pread #define _close PAL__close #define _wcstoui64 PAL__wcstoui64 #define _flushall PAL__flushall @@ -4507,7 +4508,9 @@ PALIMPORT char * __cdecl ctime(const time_t *); #endif // !PAL_STDCPP_COMPAT PALIMPORT int __cdecl _open_osfhandle(INT_PTR, int); -PALIMPORT int __cdecl _close(int); +PALIMPORT DLLEXPORT int __cdecl _open(const char *szPath, int nFlags, ...); +PALIMPORT DLLEXPORT size_t __cdecl _pread(int fd, void *buf, size_t nbytes, ULONG64 offset); +PALIMPORT DLLEXPORT int __cdecl _close(int); PALIMPORT DLLEXPORT int __cdecl _flushall(); #ifdef PAL_STDCPP_COMPAT -- cgit v1.2.3