1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
From 9b9c245549cf7bab23e62989951eaf74efed10b1 Mon Sep 17 00:00:00 2001
From: Jonghyun Park <parjong@gmail.com>
Date: Wed, 17 May 2017 23:37:01 +0900
Subject: [PATCH] Fix CreateDump-related undefined reference on non-AMD64/Linux
platforms (#11635)
---
src/ToolBox/SOS/Strike/CMakeLists.txt | 1 +
src/ToolBox/SOS/Strike/strike.cpp | 10 +++++-----
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/src/ToolBox/SOS/Strike/CMakeLists.txt b/src/ToolBox/SOS/Strike/CMakeLists.txt
index ff5f864..65c3f95 100644
--- a/src/ToolBox/SOS/Strike/CMakeLists.txt
+++ b/src/ToolBox/SOS/Strike/CMakeLists.txt
@@ -150,6 +150,7 @@ if(CLR_CMAKE_PLATFORM_ARCH_AMD64)
SOS_LIBRARY
createdump_lib
)
+ add_definitions(-DCREATE_DUMP_SUPPORTED)
endif(CLR_CMAKE_PLATFORM_LINUX)
set(SOS_SOURCES_ARCH
disasmX86.cpp
diff --git a/src/ToolBox/SOS/Strike/strike.cpp b/src/ToolBox/SOS/Strike/strike.cpp
index 1fff17f..7e01635 100644
--- a/src/ToolBox/SOS/Strike/strike.cpp
+++ b/src/ToolBox/SOS/Strike/strike.cpp
@@ -14370,17 +14370,17 @@ _EFN_GetManagedObjectFieldInfo(
#ifdef FEATURE_PAL
-#ifdef __linux__
+#ifdef CREATE_DUMP_SUPPORTED
#include <dumpcommon.h>
#include "datatarget.h"
extern bool CreateDumpForSOS(const char* programPath, const char* dumpPathTemplate, pid_t pid, MINIDUMP_TYPE minidumpType, ICLRDataTarget* dataTarget);
extern bool g_diagnostics;
-#endif // __linux__
+#endif // CREATE_DUMP_SUPPORTED
DECLARE_API(CreateDump)
{
INIT_API();
-#ifdef __linux__
+#ifdef CREATE_DUMP_SUPPORTED
StringHolder sFileName;
BOOL normal = FALSE;
BOOL withHeap = FALSE;
@@ -14440,9 +14440,9 @@ DECLARE_API(CreateDump)
{
Status = E_FAIL;
}
-#else // __linux__
+#else // CREATE_DUMP_SUPPORTED
ExtErr("CreateDump not supported on this platform\n");
-#endif // __linux__
+#endif // CREATE_DUMP_SUPPORTED
return Status;
}
--
2.7.4
|