diff options
author | Eugene Zemtsov <Eugene.Zemtsov@microsoft.com> | 2015-03-19 21:10:56 -0700 |
---|---|---|
committer | Eugene Zemtsov <Eugene.Zemtsov@microsoft.com> | 2015-03-24 14:13:26 -0700 |
commit | ea381abe930124b66291872f3c938287bc8d1a61 (patch) | |
tree | b1dc1800022edbb68c10c2436ae7c8a27942bb01 /src/debug/debug-pal | |
parent | c6263cacd8bd73bd4d30ad0f708f3c30f28b9f4e (diff) | |
download | coreclr-ea381abe930124b66291872f3c938287bc8d1a61.tar.gz coreclr-ea381abe930124b66291872f3c938287bc8d1a61.tar.bz2 coreclr-ea381abe930124b66291872f3c938287bc8d1a61.zip |
Various DBI related fixes that make it possible to load DBI on Linux and attach to a living CoreCLR process
Diffstat (limited to 'src/debug/debug-pal')
-rw-r--r-- | src/debug/debug-pal/unix/dynamiclibaddress.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/debug/debug-pal/unix/dynamiclibaddress.cpp b/src/debug/debug-pal/unix/dynamiclibaddress.cpp index bd86831d9e..df41c9a66f 100644 --- a/src/debug/debug-pal/unix/dynamiclibaddress.cpp +++ b/src/debug/debug-pal/unix/dynamiclibaddress.cpp @@ -4,11 +4,20 @@ // #include "windefs.h" #include <stdio.h> +#include <string.h> +#include <stdlib.h> +#include <stdio.h> +#include <limits.h> void *GetDynamicLibraryAddressInProcess(DWORD pid, const char *libraryName) { -#ifdef HAVE_PROCFS_CTL + +// We don't have proper API detection in debug-pal +// that's why so far we'll just assume that we run on OS with ProcFS (which is not true on OS) +#define HAVE_PROCFS_CTL +#ifdef HAVE_PROCFS_CTL + // Here we read /proc/<pid>/maps file in order to parse it and figure out what it says // about a library we are looking for. This file looks something like this: // @@ -77,5 +86,5 @@ void *GetDynamicLibraryAddressInProcess(DWORD pid, const char *libraryName) #else _ASSERTE(!"Not implemented on this platform"); return NULL; -#endif +#endif }
\ No newline at end of file |