Skip to content

Commit 08a7b23

Browse files
authored
[debugger]Componentize debugger (dotnet#54887)
* First version of componentize debugger * Trying to save history of debugger-agent.h * adding debugger-agent.h as a new file * Fixing compilation * Fixing wasm compilation * Fixing wasm compilation. * Running wasm app. * Unrelated change. * Fixing debugging console app * Fixing compilation on linux * Fixing wasm debugger. * Remove unused callbacks * Moving mini-wasm-debugger to component folder. * Fixing wasm debugger. * Fix non wasm compilation * Fixing compilation on other platforms. * Removing more code from component callback. * Transforming more functions into static. * Fix compilation. * Moving more files to component folder. * moving files. * Fix android compilation. * Fix wasm compilation. * Try to fix windows compilation. * Changing what @lambdageek suggested. * Changing what @lamdbageek suggested. * Not used anymore. * Using the same function to initialize wasm and non-wasm debugger. * Rollback exported function name. * Changing where components are initialized. Saving debugger transport information outside the component. * set sdb options before component startup. * Fixing console debug. * Fix ios compilation. * Fix calling parse_options without parameters. * Last @lambdageek suggestions.
1 parent 8dad364 commit 08a7b23

83 files changed

Lines changed: 1146 additions & 874 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/installer/pkg/sfx/Microsoft.NETCore.App/Directory.Build.props

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,13 @@
193193
<PlatformManifestFileEntry Include="libmono-component-hot_reload-stub-static.a" IsNative="true" />
194194
<PlatformManifestFileEntry Include="libmono-component-hot_reload-static.lib" IsNative="true" />
195195
<PlatformManifestFileEntry Include="libmono-component-hot_reload-stub-static.lib" IsNative="true" />
196+
<PlatformManifestFileEntry Include="libmono-component-debugger.dll" IsNative="true" />
197+
<PlatformManifestFileEntry Include="libmono-component-debugger.so" IsNative="true" />
198+
<PlatformManifestFileEntry Include="libmono-component-debugger.dylib" IsNative="true" />
199+
<PlatformManifestFileEntry Include="libmono-component-debugger-static.a" IsNative="true" />
200+
<PlatformManifestFileEntry Include="libmono-component-debugger-stub-static.a" IsNative="true" />
201+
<PlatformManifestFileEntry Include="libmono-component-debugger-static.lib" IsNative="true" />
202+
<PlatformManifestFileEntry Include="libmono-component-debugger-stub-static.lib" IsNative="true" />
196203
<!-- Mono WASM-specific files -->
197204
<PlatformManifestFileEntry Include="libmono-ee-interp.a" IsNative="true" />
198205
<PlatformManifestFileEntry Include="libmono-icall-table.a" IsNative="true" />

src/mono/dlls/mscordbi/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,11 +130,11 @@ if (CLR_CMAKE_HOST_UNIX)
130130
append("-Wno-strict-prototypes -Wno-deprecated -Wno-pointer-arith" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
131131
endif (CLR_CMAKE_HOST_UNIX)
132132

133-
add_library(mscordbi SHARED "${mscorbi_sources};${PROJECT_SOURCE_DIR}/../../mono/mini/debugger-protocol.c;${PROJECT_SOURCE_DIR}/../../../coreclr/pal/prebuilt/idl/xcordebug_i.cpp;${PROJECT_SOURCE_DIR}/../../../coreclr/pal/prebuilt/idl/cordebug_i.cpp")
133+
add_library(mscordbi SHARED "${mscorbi_sources};${PROJECT_SOURCE_DIR}/../../mono/component/debugger-protocol.c;${PROJECT_SOURCE_DIR}/../../../coreclr/pal/prebuilt/idl/xcordebug_i.cpp;${PROJECT_SOURCE_DIR}/../../../coreclr/pal/prebuilt/idl/cordebug_i.cpp")
134134

135135
#SET(CMAKE_C_COMPILER ${CMAKE_CXX_COMPILER})
136136

137-
set_source_files_properties(${PROJECT_SOURCE_DIR}/../../mono/mini/debugger-protocol.c PROPERTIES LANGUAGE CXX)
137+
set_source_files_properties(${PROJECT_SOURCE_DIR}/../../mono/component/debugger-protocol.c PROPERTIES LANGUAGE CXX)
138138

139139
set(COREDBI_LIBRARIES
140140
utilcodestaticnohost

src/mono/dlls/mscordbi/cordb.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#include "corhdr.h"
1313
#include "xcordebug.h"
1414

15-
#include <mono/mini/debugger-protocol.h>
15+
#include <mono/component/debugger-protocol.h>
1616
#include <mono/utils/mono-publib.h>
1717

1818
#include "arraylist.h"

src/mono/mono/component/CMakeLists.txt

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ set(MONO_EVENTPIPE_GEN_INCLUDE_PATH "${CMAKE_CURRENT_BINARY_DIR}/eventpipe")
66

77
set(MONO_HOT_RELOAD_COMPONENT_NAME "hot_reload")
88
set(MONO_DIAGNOSTICS_TRACING_COMPONENT_NAME "diagnostics_tracing")
9+
set(MONO_DEBUGGER_COMPONENT_NAME "debugger")
910

1011
# a list of every component.
1112
set(components "")
@@ -14,6 +15,27 @@ set(components "")
1415
# component_name-sources list for each component, and a
1516
# component_name-stub-sources list for the component stub.
1617

18+
# debugger
19+
list(APPEND components
20+
${MONO_DEBUGGER_COMPONENT_NAME}
21+
)
22+
set(${MONO_DEBUGGER_COMPONENT_NAME}-sources
23+
${MONO_COMPONENT_PATH}/debugger.c
24+
${MONO_COMPONENT_PATH}/debugger.h
25+
${MONO_COMPONENT_PATH}/debugger-agent.c
26+
${MONO_COMPONENT_PATH}/debugger-agent.h
27+
${MONO_COMPONENT_PATH}/debugger-engine.c
28+
${MONO_COMPONENT_PATH}/debugger-engine.h
29+
${MONO_COMPONENT_PATH}/debugger-state-machine.h
30+
${MONO_COMPONENT_PATH}/debugger-state-machine.c
31+
${MONO_COMPONENT_PATH}/mini-wasm-debugger.c
32+
${MONO_COMPONENT_PATH}/debugger-protocol.h
33+
${MONO_COMPONENT_PATH}/debugger-protocol.c
34+
)
35+
set(${MONO_DEBUGGER_COMPONENT_NAME}-stub-sources
36+
${MONO_COMPONENT_PATH}/debugger-stub.c
37+
)
38+
1739
# hot_reload
1840
list(APPEND components
1941
${MONO_HOT_RELOAD_COMPONENT_NAME}

0 commit comments

Comments
 (0)