Skip to content

Commit c60869f

Browse files
author
Mike McLaughlin
authored
Fix "LTTng-UST: Error (-17) while registering..." error when debugging (20874)
Fixes issue #20205. This has been happening in more and more scenarios: 1) SOS when the coreclr hosting the SOS managed code is a different version that the one being debugged 2) Lee ran into it with ClrMD for Linux 3) The dotnet-diagnostictests repo with the current arcade build changes because the coreclr version hosting mdbg is different than the version running the debuggees. This fix is simple: only link the tracepointprovider.cpp code that loads libcoreclrtraceptprovider.so into libcoreclr.so and not in any other module that uses the PAL library (libdbgshim.so, libmscordaccore.so, etc.). Create a new "tracepointprovider" library with the tracepointprovider.cpp source file in it and remove it from the "coreclrpal". Link this new lib into libcoreclr.so.
1 parent 6247672 commit c60869f

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/dlls/mscoree/coreclr/CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ else()
121121
list(APPEND CORECLR_LIBRARIES
122122
${START_WHOLE_ARCHIVE} # force all PAL objects to be included so all exports are available
123123
coreclrpal
124+
tracepointprovider
124125
${END_WHOLE_ARCHIVE}
125126
mscorrc_debug
126127
palrt

src/pal/src/CMakeLists.txt

+5-1
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,6 @@ set(SOURCES
230230
misc/strutil.cpp
231231
misc/sysinfo.cpp
232232
misc/time.cpp
233-
misc/tracepointprovider.cpp
234233
misc/utils.cpp
235234
numa/numa.cpp
236235
objmgr/palobjbase.cpp
@@ -295,6 +294,11 @@ add_library(coreclrpal
295294
${LIBUNWIND_OBJECTS}
296295
)
297296

297+
add_library(tracepointprovider
298+
STATIC
299+
misc/tracepointprovider.cpp
300+
)
301+
298302
if(CMAKE_SYSTEM_NAME STREQUAL Darwin)
299303
find_library(COREFOUNDATION CoreFoundation)
300304
find_library(CORESERVICES CoreServices)

0 commit comments

Comments
 (0)