Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit 8bce159

Browse files
author
Evgeny Pavlov
committed
Fix after review:
* Remove unneeded whitespace changes * Extract code related with managed delegate to separate header * Remove unneded files and defines from cmake files
1 parent 24066e1 commit 8bce159

File tree

8 files changed

+40
-30
lines changed

8 files changed

+40
-30
lines changed

src/coreclr/hosts/inc/coreclrhost.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,5 @@ CORECLR_HOSTING_API(coreclr_execute_assembly,
4646
unsigned int* exitCode);
4747

4848
#undef CORECLR_HOSTING_API
49-
49+
5050
#endif // __CORECLR_HOST_H__
51-
52-

src/coreclr/hosts/unixcoreruncommon/CMakeLists.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@ project(unixcoreruncommon)
22

33
add_compile_options(-fPIC)
44

5-
if(FEATURE_GDBJIT)
6-
add_definitions(-DFEATURE_GDBJIT)
7-
endif(FEATURE_GDBJIT)
8-
95
_add_library(unixcoreruncommon
106
STATIC
117
coreruncommon.cpp

src/coreclr/hosts/unixcoreruncommon/coreruncommon.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
// If set to 1, server GC is enabled on startup. If 0, server GC is
3535
// disabled. Server GC is off by default.
3636
static const char* serverGcVar = "CORECLR_SERVER_GC";
37+
3738
#if defined(__linux__)
3839
#define symlinkEntrypointExecutable "/proc/self/exe"
3940
#elif !defined(__APPLE__)

src/dlls/mscoree/unixinterface.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
#include <utilcode.h>
1616
#include <corhost.h>
1717
#include <configuration.h>
18+
#ifdef FEATURE_GDBJIT
19+
#include "../../vm/gdbjithelpers.h"
20+
#endif // FEATURE_GDBJIT
1821

1922
typedef int (STDMETHODCALLTYPE *HostMain)(
2023
const int argc,
@@ -254,7 +257,9 @@ int coreclr_initialize(
254257

255258
if (!SUCCEEDED(hr))
256259
{
257-
fprintf(stderr, "coreclr_create_delegate failed - status: 0x%08x\n", hr);
260+
fprintf(stderr,
261+
"Can't create delegate for 'System.Diagnostics.Debug.SymbolReader.SymbolReader.GetInfoForMethod' "
262+
"method - status: 0x%08x\n", hr);
258263
}
259264
#endif
260265
}

src/inc/utilcode.h

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5750,21 +5750,4 @@ extern SpinConstants g_SpinConstants;
57505750

57515751
// ======================================================================================
57525752

5753-
#ifdef FEATURE_GDBJIT
5754-
struct SequencePointInfo
5755-
{
5756-
int lineNumber, ilOffset;
5757-
char16_t* fileName;
5758-
};
5759-
5760-
struct MethodDebugInfo
5761-
{
5762-
SequencePointInfo* points;
5763-
int size;
5764-
};
5765-
5766-
typedef int (*GetInfoForMethodDelegate)(const char*, unsigned int, MethodDebugInfo& methodDebugInfo);
5767-
extern GetInfoForMethodDelegate getInfoForMethodDelegate;
5768-
#endif // FEATURE_GDBJIT
5769-
57705753
#endif // __UtilCode_h__

src/vm/CMakeLists.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,6 @@ endif(CLR_CMAKE_PLATFORM_UNIX)
2929

3030
if(FEATURE_GDBJIT)
3131
set(VM_SOURCES_GDBJIT
32-
../gc/gccommon.cpp
33-
../gc/gcscan.cpp
34-
../gc/gcsvr.cpp
35-
../gc/gcwks.cpp
3632
gdbjit.cpp
3733
)
3834
add_definitions(-DFEATURE_GDBJIT)

src/vm/gdbjit.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
//*****************************************************************************
1212

1313
#include "common.h"
14-
#include "../inc/utilcode.h"
1514
#include "gdbjit.h"
15+
#include "gdbjithelpers.h"
1616

1717
struct DebuggerILToNativeMap
1818
{

src/vm/gdbjithelpers.h

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
3+
// See the LICENSE file in the project root for more information.
4+
//*****************************************************************************
5+
// File: gdbjithelpers.h
6+
//
7+
//
8+
// Helper file with managed delegate for GDB JIT interface implemenation.
9+
//
10+
//*****************************************************************************
11+
12+
13+
#ifndef __GDBJITHELPERS_H__
14+
#define __GDBJITHELPERS_H__
15+
16+
struct SequencePointInfo
17+
{
18+
int lineNumber, ilOffset;
19+
char16_t* fileName;
20+
};
21+
22+
struct MethodDebugInfo
23+
{
24+
SequencePointInfo* points;
25+
int size;
26+
};
27+
28+
typedef int (*GetInfoForMethodDelegate)(const char*, unsigned int, MethodDebugInfo& methodDebugInfo);
29+
extern GetInfoForMethodDelegate getInfoForMethodDelegate;
30+
31+
#endif // !__GDBJITHELPERS_H__

0 commit comments

Comments
 (0)