diff options
author | Mike McLaughlin <mikem@microsoft.com> | 2017-04-15 11:09:03 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-15 11:09:03 -0700 |
commit | dc5b99d0e10bb07c6b0c3071e2db9dac3c68b9c0 (patch) | |
tree | 033c59275510587e197b5e72f153097aecfab114 | |
parent | 8dd20ec4f14be0b5e4d4e212bc54adcfa066743a (diff) | |
download | coreclr-dc5b99d0e10bb07c6b0c3071e2db9dac3c68b9c0.tar.gz coreclr-dc5b99d0e10bb07c6b0c3071e2db9dac3c68b9c0.tar.bz2 coreclr-dc5b99d0e10bb07c6b0c3071e2db9dac3c68b9c0.zip |
Make createdump build and work on Centos (#10985)
-rw-r--r-- | src/CMakeLists.txt | 4 | ||||
-rw-r--r-- | src/debug/createdump/createdump.cpp | 5 | ||||
-rw-r--r-- | src/debug/createdump/dumpwriter.h | 4 |
3 files changed, 8 insertions, 5 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index c2e0260ef1..9598d0c36b 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -96,11 +96,11 @@ function(add_executable_clr) endfunction() if(CLR_CMAKE_PLATFORM_UNIX) - if(CLR_CMAKE_PLATFORM_UBUNTU_LINUX) + if(CLR_CMAKE_PLATFORM_LINUX) if(CLR_CMAKE_PLATFORM_UNIX_AMD64) add_subdirectory(debug/createdump) endif(CLR_CMAKE_PLATFORM_UNIX_AMD64) - endif(CLR_CMAKE_PLATFORM_UBUNTU_LINUX) + endif(CLR_CMAKE_PLATFORM_LINUX) add_subdirectory(ToolBox/SOS/Strike) diff --git a/src/debug/createdump/createdump.cpp b/src/debug/createdump/createdump.cpp index 863b3ec447..4f43d11a19 100644 --- a/src/debug/createdump/createdump.cpp +++ b/src/debug/createdump/createdump.cpp @@ -56,7 +56,7 @@ exit: // int __cdecl main(const int argc, const char* argv[]) { - const char* dumpPathTemplate = "/tmp/coredump.%lu"; + const char* dumpPathTemplate = "/tmp/coredump.%d"; char* diagnostics = getenv("COMPlus_CreateDumpDiagnostics"); g_diagnostics = diagnostics != nullptr && strcmp(diagnostics, "1") == 0; @@ -76,7 +76,6 @@ int __cdecl main(const int argc, const char* argv[]) } pid = _atoi64(argv[1]); - //if (!CreateDump(argv[0], dumpPathTemplate, pid, MiniDumpWithPrivateReadWriteMemory)) if (!CreateDump(argv[0], dumpPathTemplate, pid, MiniDumpNormal)) { exitCode = -1; @@ -85,4 +84,4 @@ int __cdecl main(const int argc, const char* argv[]) exit: PAL_TerminateEx(exitCode); return exitCode; -}
\ No newline at end of file +} diff --git a/src/debug/createdump/dumpwriter.h b/src/debug/createdump/dumpwriter.h index 61e3936338..272a2ebd78 100644 --- a/src/debug/createdump/dumpwriter.h +++ b/src/debug/createdump/dumpwriter.h @@ -24,6 +24,10 @@ #define PH_HDR_CANARY 0xFFFF +#ifndef NT_FILE +#define NT_FILE 0x46494c45 +#endif + class DumpWriter : IUnknown { private: |