Fix after review:
authorEvgeny Pavlov <e.pavlov@samsung.com>
Tue, 19 Jul 2016 08:55:27 +0000 (11:55 +0300)
committerEvgeny Pavlov <e.pavlov@samsung.com>
Fri, 22 Jul 2016 07:57:30 +0000 (10:57 +0300)
* Remove unneeded whitespace changes
* Extract code related with managed delegate to separate header
* Remove unneded files and defines from cmake files

src/coreclr/hosts/inc/coreclrhost.h
src/coreclr/hosts/unixcoreruncommon/CMakeLists.txt
src/coreclr/hosts/unixcoreruncommon/coreruncommon.cpp
src/dlls/mscoree/unixinterface.cpp
src/inc/utilcode.h
src/vm/CMakeLists.txt
src/vm/gdbjit.cpp
src/vm/gdbjithelpers.h [new file with mode: 0644]

index 8c9f3a3..f0d7952 100644 (file)
@@ -46,7 +46,5 @@ CORECLR_HOSTING_API(coreclr_execute_assembly,
             unsigned int* exitCode);
 
 #undef CORECLR_HOSTING_API
-
+                      
 #endif // __CORECLR_HOST_H__
-
-
index 1bf8f4d..a17e0a0 100644 (file)
@@ -2,10 +2,6 @@ project(unixcoreruncommon)
 
 add_compile_options(-fPIC)
 
-if(FEATURE_GDBJIT)    
-   add_definitions(-DFEATURE_GDBJIT)
-endif(FEATURE_GDBJIT)
-
 _add_library(unixcoreruncommon
     STATIC
     coreruncommon.cpp
index 29f2772..b4c54ca 100644 (file)
@@ -34,6 +34,7 @@
 // If set to 1, server GC is enabled on startup. If 0, server GC is
 // disabled. Server GC is off by default.
 static const char* serverGcVar = "CORECLR_SERVER_GC";
+
 #if defined(__linux__)
 #define symlinkEntrypointExecutable "/proc/self/exe"
 #elif !defined(__APPLE__)
index f48b021..af29302 100644 (file)
@@ -15,6 +15,9 @@
 #include <utilcode.h>
 #include <corhost.h>
 #include <configuration.h>
+#ifdef FEATURE_GDBJIT
+#include "../../vm/gdbjithelpers.h"
+#endif // FEATURE_GDBJIT
 
 typedef int (STDMETHODCALLTYPE *HostMain)(
     const int argc,
@@ -254,7 +257,9 @@ int coreclr_initialize(
 
         if (!SUCCEEDED(hr))
         {
-            fprintf(stderr, "coreclr_create_delegate failed - status: 0x%08x\n", hr);
+            fprintf(stderr,
+                    "Can't create delegate for 'System.Diagnostics.Debug.SymbolReader.SymbolReader.GetInfoForMethod' "
+                    "method - status: 0x%08x\n", hr);
         }
 #endif
     }
index 79bdc69..993d87d 100644 (file)
@@ -5750,21 +5750,4 @@ extern SpinConstants g_SpinConstants;
 
 // ======================================================================================
 
-#ifdef FEATURE_GDBJIT
-struct SequencePointInfo
-{
-    int lineNumber, ilOffset;
-    char16_t* fileName;
-};
-
-struct MethodDebugInfo
-{
-    SequencePointInfo* points;
-    int size;
-};
-
-typedef int (*GetInfoForMethodDelegate)(const char*, unsigned int, MethodDebugInfo& methodDebugInfo);
-extern GetInfoForMethodDelegate getInfoForMethodDelegate;
-#endif // FEATURE_GDBJIT
-
 #endif // __UtilCode_h__
index d82530d..e98178e 100644 (file)
@@ -29,10 +29,6 @@ endif(CLR_CMAKE_PLATFORM_UNIX)
 
 if(FEATURE_GDBJIT)
     set(VM_SOURCES_GDBJIT
-    ../gc/gccommon.cpp
-    ../gc/gcscan.cpp
-    ../gc/gcsvr.cpp
-    ../gc/gcwks.cpp
     gdbjit.cpp
     )
    add_definitions(-DFEATURE_GDBJIT)
index d3a6574..a890630 100644 (file)
@@ -11,8 +11,8 @@
 //*****************************************************************************
 
 #include "common.h"
-#include "../inc/utilcode.h"
 #include "gdbjit.h"
+#include "gdbjithelpers.h"
 
 struct DebuggerILToNativeMap
 {
diff --git a/src/vm/gdbjithelpers.h b/src/vm/gdbjithelpers.h
new file mode 100644 (file)
index 0000000..1fa5d46
--- /dev/null
@@ -0,0 +1,31 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+//*****************************************************************************
+// File: gdbjithelpers.h
+//
+//
+// Helper file with managed delegate for GDB JIT interface implemenation.
+//
+//*****************************************************************************
+
+
+#ifndef __GDBJITHELPERS_H__
+#define __GDBJITHELPERS_H__
+
+struct SequencePointInfo
+{
+    int lineNumber, ilOffset;
+    char16_t* fileName;
+};
+
+struct MethodDebugInfo
+{
+    SequencePointInfo* points;
+    int size;
+};
+
+typedef int (*GetInfoForMethodDelegate)(const char*, unsigned int, MethodDebugInfo& methodDebugInfo);
+extern GetInfoForMethodDelegate getInfoForMethodDelegate;
+
+#endif // !__GDBJITHELPERS_H__